Steps how to implement ui grid in Angular 4 app?

I couldn't figure out from the code how to use the ui-grid angularjs library in my angular 4 app, can you provide the implementation steps in order to use the ui grid in Angular 4+?
I tried to write in stackoverflow about this but no response:
https://stackoverflow.com/questions/45735596/using-angular-upgradecomponent

I ll try here:
Map A1 component with A2:
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/app/ng1/directive.ts
Register A1 app:
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/anglarjs.ts
Bootstrap it:
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/main.ts
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/app/app.module.ts
Use it:
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/app/ng1/grid.component.ts

Hi @vladotesanovic ,Thanks! but when I'm trying to bootstrap angularjs.ts I get the following errors:
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/angularjs.ts (1,26): Cannot find module 'angular'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/angularjs.ts (2,36): Cannot find module '@angular/upgrade/static'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (1,7): ';' expected.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (4,8): ';' expected.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (1,1): Cannot find name 'mport'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Cannot find name 'Directive'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,14): Cannot find name 'ElementRef'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,26): Cannot find name 'Injector'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,36): Cannot find name 'Input'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,43): Cannot find name 'OnInit'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,51): Cannot find name 'SimpleChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,66): Cannot find name 'OnChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,77): Cannot find name 'DoCheck'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (3,5): Cannot find name 'OnDestroy'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (3,16): Cannot find name 'Output'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (3,24): Cannot find name 'EventEmitter'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (4,3): Cannot find name 'from'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (5,34): Cannot find module '@angular/upgrade/static'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (7,2): Cannot find name 'Directive'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (8,69): Cannot find name 'OnInit'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (8,77): Cannot find name 'OnChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (8,88): Cannot find name 'DoCheck'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (9,3): Cannot find name 'OnDestroy'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (11,4): Cannot find name 'Input'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (12,4): Cannot find name 'Output'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (12,23): Cannot find name 'EventEmitter'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (14,27): Cannot find name 'ElementRef'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (14,49): Cannot find name 'Injector'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (20,24): Cannot find name 'SimpleChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/main.ts (6,31): Cannot find module './anglarjs'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/main.ts (6,31): Cannot find module './anglarjs'.
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './anglarjs' in 'C:\Users\eelnasi\Workspaces\ng1-test\src'
resolve './anglarjs' in 'C:\Users\eelnasi\Workspaces\ng1-test\src'
  using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src)
    using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src/anglarjs)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs.js doesn't exist
      as directory
        C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs doesn't exist
[C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs]
[C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs.ts]
[C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs.js]
[C:\Users\eelnasi\Workspaces\ng1-test\src\anglarjs]
 @ ./src/main.ts 5:0-43
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (1,7): ';' expected.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (4,8): ';' expected.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (1,1): Cannot find name 'mport'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Cannot find name 'Directive'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,3): Left side of comma operator is unused and has no side effects.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,14): Cannot find name 'ElementRef'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,26): Cannot find name 'Injector'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,36): Cannot find name 'Input'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,43): Cannot find name 'OnInit'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,51): Cannot find name 'SimpleChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,66): Cannot find name 'OnChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (2,77): Cannot find name 'DoCheck'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (3,5): Cannot find name 'OnDestroy'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (3,16): Cannot find name 'Output'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (3,24): Cannot find name 'EventEmitter'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (4,3): Cannot find name 'from'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (5,34): Cannot find module '@angular/upgrade/static'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (7,2): Cannot find name 'Directive'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (8,69): Cannot find name 'OnInit'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (8,77): Cannot find name 'OnChanges'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (8,88): Cannot find name 'DoCheck'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (9,3): Cannot find name 'OnDestroy'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (11,4): Cannot find name 'Input'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (12,4): Cannot find name 'Output'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (12,23): Cannot find name 'EventEmitter'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (14,27): Cannot find name 'ElementRef'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (14,49): Cannot find name 'Injector'.
ERROR in C:/Users/eelnasi/Workspaces/ng1-test/src/app/ng1-component-facade.directive.ts (20,24): Cannot find name 'SimpleChanges'.
ERROR in ./src/app/ng1-component-facade.directive.ts
Module not found: Error: Can't resolve '@angular/upgrade/static' in 'C:\Users\eelnasi\Workspaces\ng1-test\src\app'
resolve '@angular/upgrade/static' in 'C:\Users\eelnasi\Workspaces\ng1-test\src\app'
  Parsed request is a module
  using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src/app)
    Field 'browser' doesn't contain a valid alias configuration
  after using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src/app)
    resolve as module
      C:\Users\eelnasi\Workspaces\ng1-test\src\app\node_modules doesn't exist or is not a directory
      C:\Users\eelnasi\Workspaces\ng1-test\src\node_modules doesn't exist or is not a directory
      C:\Users\eelnasi\Workspaces\node_modules doesn't exist or is not a directory
      C:\Users\eelnasi\node_modules doesn't exist or is not a directory
      C:\Users\node_modules doesn't exist or is not a directory
      C:\node_modules doesn't exist or is not a directory
      looking for modules in C:\Users\eelnasi\Workspaces\ng1-test\node_modules
        using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./node_modules)
          using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./node_modules/@angular/upgrade/static)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            as directory
              C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static doesn't exist
      looking for modules in C:\Users\eelnasi\Workspaces\ng1-test\node_modules
        using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./node_modules)
          using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./node_modules/@angular/upgrade/static)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            as directory
              C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static doesn't exist
      looking for modules in C:\Users\eelnasi\Workspaces\ng1-test\src
        using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src)
          using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src/@angular/upgrade/static)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            as directory
              C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static doesn't exist
      looking for modules in C:\Users\eelnasi\Workspaces\ng1-test\src
        using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src)
          Field 'browser' doesn't contain a valid alias configuration
        after using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src)
          using description file: C:\Users\eelnasi\Workspaces\ng1-test\package.json (relative path: ./src/@angular/upgrade/static)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static doesn't exist
            .ts
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
<EMAIL_ADDRESS>doesn't exist
            as directory
              C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static doesn't exist
[C:\Users\eelnasi\Workspaces\ng1-test\src\app\node_modules]
[C:\Users\eelnasi\Workspaces\ng1-test\src\node_modules]
[C:\Users\eelnasi\Workspaces\node_modules]
[C:\Users\eelnasi\node_modules]
[C:\Users\node_modules]
[C:\node_modules]
[C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static]
<EMAIL_ADDRESS><EMAIL_ADDRESS>[C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static]
[C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static]
<EMAIL_ADDRESS><EMAIL_ADDRESS>[C:\Users\eelnasi\Workspaces\ng1-test\node_modules\@angular\upgrade\static]
[C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static]
<EMAIL_ADDRESS><EMAIL_ADDRESS>[C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static]
[C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static]
<EMAIL_ADDRESS><EMAIL_ADDRESS>[C:\Users\eelnasi\Workspaces\ng1-test\src\@angular\upgrade\static]
 @ ./src/app/ng1-component-facade.directive.ts 27:0-59
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

webpack: Failed to compile.

Install:
npm install @angular/upgrade --save
npm install<EMAIL_ADDRESS>--save
npm install angular-ui-grid --save

npm install @types/angular --save-dev

Thanks @vladotesanovic ! But one last error appears:
AppComponent.html:1 ERROR Error: No provider for $injector!
    at injectionError (core.es5.js:1169)
    at noProviderError (core.es5.js:1207)
    at<EMAIL_ADDRESS>(core.es5.js:2649)
    at<EMAIL_ADDRESS>
It happens when using the  directive:
<ui-grid [data]="myData$ | async" (onUpdate)="onUpdate($event)"></ui-grid><pre>{{ data | json }}</pre>

Can you post content of your:
src/main.ts
and
src/app,module.ts

Sure, I just tried to follow your files:
app/main.ts (not in src folder):
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { initAngularjs } from './angularjs';

if (environment.production) {
  enableProdMode();
}

initAngularjs();
platformBrowserDynamic().bootstrapModule(AppModule);

app.module.ts:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { Ng1ComponentFacade } from './ng1-component-facade.directive';
import {HttpClientModule} from "@angular/common/http";

@NgModule({
  declarations: [
    AppComponent,
    Ng1ComponentFacade,
  ],
  imports: [
    BrowserModule,
    HttpClientModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Update: I imported UpgradeModule and added
schemas: [
    CUSTOM_ELEMENTS_SCHEMA
  ]

and there is a progress but I still get a runtime error:
ERROR Error: Trying to get the AngularJS injector before it being set.

check this: main.ts
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/main.ts
and app,module.ts
https://github.com/vladotesanovic/ui-grid-angular2/blob/master/src/app/app.module.ts

@vladotesanovic Where did you import your angular 1.x?
zone.js:654 Unhandled Promise rejection: AngularJS v1.x is not loaded! ; Zone: <root> ; Task: Promise.then ; Value: Error: AngularJS v1.x is not loaded!

in main.ts as you did, and in app.module.ts

@vladotesanovic Strange.. I tried to look for what could have gone wrong and didn't find anything.
Can you take a look? I just uploaded a repo for that. That's a new angular 4 project where i'm trying to import ui-grid in.
https://github.com/theunreal/ng-mix

hi @vladotesanovic thanks for your great work.
Somehow I integrated your work to my angular2 app. The there is no error now,but the data is not binding to the ui-grid.

@theunreal
Where is you Angular 1 app, your main.ts and app,module.ts does not implement Upgrading process...
@vishnued Is Dashboard lazy loaded?
All components/directives must be declared to Module in declarations array. Do it in your app.module.ts

@vladotesanovic Thank you for your quick response.
Now its working. :)

Sorry @vladotesanovic, it wasn't the correct code. I just updated the repo (https://github.com/theunreal/ng-mix) with my attempt to use ui-grid in angular 2 with your instructions.
Hope you can let me know if I missed something, I double checked and couldn't figure out what could have gone wrong.

Changes:
https://gist.github.com/vladotesanovic/1d0746651b0595044d3bd1af40a47388
https://gist.github.com/vladotesanovic/6a46c99971ee6c481f269a1ad535a5f9
https://gist.github.com/vladotesanovic/555d54eb6b81343121884d8356bc6b54
https://gist.github.com/vladotesanovic/acd30253e7209e84801c93262415a59c

@vladotesanovic Works great, thanks! seems like including angular.min.js inside the angular-cli scripts array did the trick.


YR weather sensors does not auto-update

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version): 0.32.4
Python release (python3 --version): Python 3.4.2
Component/platform: RPI3 + Tellstick Duo and using YR weather platform for weather related information
Description of problem:
In my UI I can see the YR sensors and they show relevant and valid information as far as I can tell. However, they never update. The only time I see the values updating is when restarting HA, then all the sensors gets new values. After leaving the system running for say 12 hours, the YR sensores show they were updated the last time 12h ago.
Expected:
YR weather sensors are updated automatically.
Problem-relevant configuration.yaml entries and steps to reproduce:
Snippet of my configuration.yaml file:
sensor:
# Date and time
  - platform: time_date
    display_options:
      - 'date_time'

# Weather prediction
  - platform: yr
    monitored_conditions:
      - windSpeed
      - humidity
      - precipitation
      - pressure
      - windDirection
      - cloudiness

1.
2.
3.

**Traceback (if applicable):**
```bash

Additional info:
When enabling debug information for the logfile I can see the entry when the sensors are updated once after restart, but after this no more entries for the yr sensors.

Possibly a duplicate of https://github.com/home-assistant/home-assistant/issues/4467

Yes, the yr sensor is currently broken.
More info here: https://github.com/home-assistant/home-assistant/pull/4158

You can add https://raw.githubusercontent.com/home-assistant/home-assistant/be272ac64a691f04bbd8ea92d7914521cc59508e/homeassistant/components/sensor/yr.py
to .homeassistant/custom_components/sensor/yr.py for a temporary solution

Downloaded the code yesterday and it has been running fine for the last 24h now with updates to the yr sensors I'm using.
Many thanks.

You should try this version: https://github.com/home-assistant/home-assistant/pull/4521/files
If it works, it will be merge in for the next release.

Ok, will download and leave it running over night. I assume I just replace the old code with this one, i.e. in the custom_components directory as mentioned above.

That should work.

Sorry, I'm not very familiar with github. How do I download the entire and latest yr.py file? In the previous link you sent me I simply saved the link and uploaded the file to the directory on my RPi. The latest link shows me what seems to be a delta view of changes.
Sorry.....

https://raw.githubusercontent.com/kellerza/home-assistant/98941286c074969dba9dbe02e4d7ccb38fb46349/homeassistant/components/sensor/yr.py

Got it, but it fails to start. This is the tail of the homeassistant.log file:
16-11-22 22:01:20 homeassistant.components.sensor: Error while setting up platform yr
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 143, in _async_setup_platform
entity_platform.async_add_entities, discovery_info
File "/home/homeassistant/.homeassistant/custom_components/sensor/yr.py", line 82, in async_setup_platform
yield from weather.async_update()
File "/home/homeassistant/.homeassistant/custom_components/sensor/yr.py", line 164, in async_update
self.hass.async_add_job(resp.release())
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 217, in async_add_job
if is_callback(target):
File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py", line 89, in is_callback
return '_hass_callback' in func.dict
AttributeError: 'generator' object has no attribute 'dict'

noticed there is a new release today 0.33.2. I'll update my system to this release as well, I'm still on 0.32.4.

That seemed to make a difference! System is up and running and yr is displaying values again. Will let it run over night and check in the morning.

@ShaakTiHA hopefully this resolved it for you, mine worked fine over night. Closing this as it should be included in 0.33.3

Yes, it has been running fine all night with hourly updates.
Many thanks for your support!


Serverless Logo

Logo: https://s3-us-west-2.amazonaws.com/assets.site.serverless.com/logos/serverless-logo.svg

I already have this one ready to upload! :)

Added in 84fc2abe2b9d0b5b39ceac4af32c6e7eccecd657


Blind

explain

explain

https://github.com/si-nn-er-ls/WilliamButcherBot/commit/d45280d1fbfb06008a1b86190bbf869f38589263


Can't prototype-chain objects defined in .NET

I'm having trouble creating a prototype chain of objects that I have defined on the .NET side. I'm creating my objects using the pattern described under the Building and instance class header.
Regardless of what other ObjectInstances I pass through the constructor and instance function constructors (on the .NET side of the code) I always end up with objects that have an Object prototype rather than the specific object that I wanted the new instance to 'prototype' from.
Is this currently possible to achieve with Jurassic, or am I going about this the wrong way?

There shouldn't be any limitations on how you construct your prototype chain.  Can you post sample code that reproduces the problem?

Hi Paul,
If it should be achievable, I'm almost certain that I'm doing something wrong here. If I want instances of OuterObject to have the prototype InnerObject, where should I 'set' that prototype?
I have attempted the following:

Setting the third parameter of OuterObjectConstructor's base constructor to new OuterObjectInstance(new InnerObjectInstance(engine.Object.InstancePrototype)
returning new OuterObjectInstance(new InnerObjectInstance(this.InstancePrototype, i), i) from the Construct function
Making OuterObjectInstance inherit (on the .NET side) from the InnerObjectInstance class.
All combinations of the above.

I fully expect this to be a hugely obvious thing that I've overlooked :)
public class OuterObjectConstructor : ClrFunction
{
	public OuterObjectConstructor(ScriptEngine engine)
		: base(engine.Function.InstancePrototype, "OuterObject", new OuterObjectInstance(engine.Object.InstancePrototype))
	{
	}

	[JSConstructorFunction]
	public OuterObjectInstance Construct(int i)
	{
		return new OuterObjectInstance(this.InstancePrototype, i);
	}

public class OuterObjectInstance : ObjectInstance
{

	public OuterObjectInstance(ObjectInstance prototype)
		: base(prototype)
	{
		this.PopulateFunctions();
	}

	public OuterObjectInstance(ObjectInstance prototype, int i)
		: base(prototype)
	{
	}

	[JSFunction(Name = "OuterFunction")]
	public string OuterFunction()
	{
		return "Outer function";
	}
}

Your code looks correct.  What makes you think it's wrong?
var engine2 = new ScriptEngine();
engine2.SetGlobalValue("O", new OuterObjectConstructor(engine2));
Console.WriteLine("instance: {0}", engine2.Evaluate<string>("var x = new O(); Object.getOwnPropertyNames(x)"));
Console.WriteLine("prototype: {0}", engine2.Evaluate<string>("x = Object.getPrototypeOf(x); Object.getOwnPropertyNames(x)"));
Console.WriteLine("prototype.prototype: {0}", engine2.Evaluate<string>("x = Object.getPrototypeOf(x); Object.getOwnPropertyNames(x)"));
Console.WriteLine("Anything else? {0}", engine2.Evaluate<string>("x = Object.getPrototypeOf(x); x"));

Gives this output:
instance:
prototype: OuterFunction,constructor
prototype.prototype: hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,valueOf,toString,constructor
Anything else? null

This is exactly what I would expect.  The instance itself has no properties defined, the instance prototype has two (including the OuterFunction function), then you have the base object prototype which is shared by all objects.  It has toString, etc.

I think I've discovered the problem; my outerObject contains all the expected properties inherited from innerObject, but outerObject instanceof InnerObject evaluates to false. I think this is because I'm not using the same constructor instance to create the innerObject instance within the OuterObjectConstructor class, so although they are the same class on the .NET side, on the Javascript side they are entirely different objects, just with identical signatures.
So my question now is; what is the correct way to provide the OuterObjectConstructor with the correct constructor (or a correct instance) of InnerObject such that instanceof will behave as I expect?
Here is the Javascript of what I would like to achieve. Basically; outerObject inherits (prototypes?) from innerObject.
var JSInnerObject = function() {
	this.innerValue = "my inner value";
};

var JSOuterObject = function() {
	this.outerValue = "my outer value";
};

// OuterObject instances prototype InnerObject
JSOuterObject.prototype = new JSInnerObject();

var jsInnerObject = new JSInnerObject();
var jsOuterObject = new JSOuterObject();

console.log(jsInnerObject instanceof JSInnerObject);
console.log(jsOuterObject instanceof JSOuterObject);
console.log(jsOuterObject instanceof JSInnerObject);

console.log(jsOuterObject.innerValue + " - " + jsOuterObject.outerValue);

And the output;
true
true
true
my inner value - my outer value

And here are the C# classes I'm using to achieve the same thing on the .NET side
InnerObject
using Jurassic;
using Jurassic.Library;

public class InnerObjectConstructor : ClrFunction
{
	public InnerObjectConstructor(ScriptEngine engine)
		: base(engine.Function.InstancePrototype, "InnerObject", new InnerObjectInstance(engine.Object.InstancePrototype))
	{
	}

	[JSConstructorFunction]
	public InnerObjectInstance Construct(int i)
	{
		return new InnerObjectInstance(this.InstancePrototype, i);
	}
}

public class InnerObjectInstance : ObjectInstance
{

	public InnerObjectInstance(ObjectInstance prototype)
		: base(prototype)
	{
		this.PopulateFunctions();
	}

	public InnerObjectInstance(ObjectInstance prototype, int i)
		: base(prototype)
	{
		this["innerValue"] = "my inner value";
	}

	[JSFunction(Name = "innerFunction")]
	public string InnerFunction()
	{
		return "Inner function";
	}
}

OuterObject
using Jurassic;
using Jurassic.Library;

public class OuterObjectConstructor : ClrFunction
{
	public OuterObjectConstructor(ScriptEngine engine)
		: base(engine.Function.InstancePrototype, "OuterObject", new OuterObjectInstance(engine.Object.InstancePrototype))
	{
	}

	[JSConstructorFunction]
	public OuterObjectInstance Construct(int i)
	{
		return new OuterObjectInstance(new InnerObjectInstance(this.InstancePrototype, i), i);
	}
}

public class OuterObjectInstance : ObjectInstance
{

	public OuterObjectInstance(ObjectInstance prototype)
		: base(prototype)
	{
		this.PopulateFunctions();
	}

	public OuterObjectInstance(ObjectInstance prototype, int i)
		: base(prototype)
	{
		this["outerValue"] = "my outer value";
	}

	[JSFunction(Name = "OuterFunction")]
	public string OuterFunction()
	{
		return "Outer function";
	}
}

Setup in Jurassic
js = new ScriptEngine();

js.SetGlobalValue("InnerObject", new InnerObjectConstructor(js));
js.SetGlobalValue("OuterObject", new OuterObjectConstructor(js));

js.Evaluate("var innerObject = new InnerObject(0)");
js.Evaluate("var outerObject = new OuterObject(0)");

js.Evaluate("console.log(innerObject instanceof InnerObject)");
js.Evaluate("console.log(outerObject instanceof OuterObject)");
js.Evaluate("console.log(outerObject instanceof InnerObject)");

js.Evaluate("console.log(outerObject.innerValue + \" - \" + outerObject.outerValue)");

And the output
true
true
false
my inner value - my outer value

After that enormous post, I feel as though I should express my thanks for your excellent library, by the way :)

The instanceof operator works by traversing the LHS operand's prototype chain, looking for an object which is equal to the RHS operand's prototype property (this is called InstancePrototype in Jurassic).
Pseudocode for lhs instanceof rhs:
Object.getPrototypeOf(lhs) === rhs.prototype ||
   Object.getPrototypeOf(Object.getPrototypeOf(lhs)) === rhs.prototype ||
   Object.getPrototypeOf(Object.getPrototypeOf(Object.getPrototypeOf(lhs))) === rhs.prototype || ...

So the reason outerObject instanceof InnerObject == false is because InnerObject.prototype never appears in the outerObject prototype chain.  Try referencing InnerObject.InstancePrototype in your OuterObjectConstructor.Construct method instead of using new InnerObjectInstance.

Thanks for that Paul.
I managed to get the results I expected, but not quite in the way you suggested. I think this is correct though; when instantiating the OuterObjectConstructor object, I pass in the InnerObjectConstructor and use new OuterObjectInstance(innerObjectConstructor.InstancePrototype) to set the instance prototype object for OuterObjectConstructor. When instantiating an OuterObjectInstance with Construct(), I then use this.InstancePrototype as currently. See the C# code below.
OuterObject
using Jurassic;
using Jurassic.Library;

public class OuterObjectConstructor : ClrFunction
{

	public OuterObjectConstructor(ScriptEngine engine, InnerObjectConstructor innerObjectConstructor)
		: base(engine.Function.InstancePrototype, "OuterObject", new OuterObjectInstance(innerObjectConstructor.InstancePrototype))
	{
	}

	[JSConstructorFunction]
	public OuterObjectInstance Construct(ObjectInstance prot, int i)
	{
		return new OuterObjectInstance(this.InstancePrototype, i);
	}
}

public class OuterObjectInstance : ObjectInstance
{

	public OuterObjectInstance(ObjectInstance prototype)
		: base(prototype)
	{
		this.PopulateFunctions();
		this["outerValue"] = "my outer value";
	}

	public OuterObjectInstance(ObjectInstance prototype, int i)
		: base(prototype)
	{
	}

	[JSFunction(Name = "OuterFunction")]
	public string OuterFunction()
	{
		return "Outer function";
	}
}

InnerObject
using Jurassic;
using Jurassic.Library;

public class InnerObjectConstructor : ClrFunction
{
	public InnerObjectConstructor(ScriptEngine engine)
		: base(engine.Function.InstancePrototype, "InnerObject", new InnerObjectInstance(engine.Object.InstancePrototype))
	{
	}

	[JSConstructorFunction]
	public InnerObjectInstance Construct(int i)
	{
		return new InnerObjectInstance(this.InstancePrototype, i);
	}
}

public class InnerObjectInstance : ObjectInstance
{

	public InnerObjectInstance(ObjectInstance prototype)
		: base(prototype)
	{
		this.PopulateFunctions();
		this["innerValue"] = "my inner value";
	}

	public InnerObjectInstance(ObjectInstance prototype, int i)
		: base(prototype)
	{
	}

	[JSFunction(Name = "innerFunction")]
	public string InnerFunction()
	{
		return "Inner function";
	}
}

Setup code
js = new ScriptEngine();

InnerObjectConstructor innerObjectConstructor = new InnerObjectConstructor(js);
OuterObjectConstructor outerObjectConstructor = new OuterObjectConstructor(js, innerObjectConstructor);

js.SetGlobalValue("InnerObject", innerObjectConstructor);
js.SetGlobalValue("OuterObject", outerObjectConstructor);

js.Evaluate("var innerObject = new InnerObject(0)");
js.Evaluate("var outerObject = new OuterObject(0)");

js.Evaluate("console.log(innerObject instanceof InnerObject)");
js.Evaluate("console.log(outerObject instanceof OuterObject)");
js.Evaluate("console.log(outerObject instanceof InnerObject)");

js.Evaluate("console.log(outerObject.innerValue + \" - \" + outerObject.outerValue)");

And the output
true
true
true
my inner value - my outer value


Query all data from the HTTP_SERVICE_CONFIG_SSL_PARAM structure

done in https://github.com/segor/SslCertBinding.Net/commit/740559cc2f4985bfd8ae8178432ccf8115ee5c8e


fix bridge-utils missing from dev

For some reason this is in master but not develop. May cause merge conflict but needed.

Tested on my pi4


Create git Bot for Automate Greetings

This PR resolves issues #292
Make sure you are allowing  read and write  permission under the Workflow permission

@Its-Aman-Yadav  Kindly review the PR and i request you to also add tags and labels in this PR according to the guidelines.
Thank you.

Thank you @shubhammjha22

@Kalivarapubindusree hey can you please assign the labels in this PR as well, as this won't be counted if labels aren't there .
i have been continuously asking @Its-Aman-Yadav for the same  but it seems like he is inactive.
Thank you


Add an example of using event metadata in both EventProjection and AggregateProjection

User had a question about that, and I realized there was no sample in the documentation for that. Lots in unit tests, but nothing in the website.

I did this finally today in a local branch.


Close to end of FY2023, have discussion with FIMS implementation team about FIT and FIMS relationship

Discuss at Aug 2023 Meeting

We had a discussion at about how FIT and FIMS relate to one another at the Aug 2023. Right now, we don't feel that we are duplicating effort by working on FIT and FIMS, but did note some synergies:

FIT and FIMS both need to think about tool quality
There are questions with upcoming stock assessment whether FIMS should be used or a new tool should be built, and not a clear answer.
FIMS should be listed in the FIT soon (opened an issue on this)

Committee members also brought up the point that some tools may never be part of FIMS (e.g., protected species tools might not be part of the FIMS ecosystem, which is focus on fish assessment) so the need for FIT may persist, even with FIMS being used tactically. Clarifying and communicating where the FIMS boundary is may be something helpful for FIMS to do.
Thanks @ChristineStawitz-NOAA (FIMS lead and FIT committee optional attendee) for participating in the discussion!
Given there isn't much duplicated effort between FIT and FIMS, not much action is needed and I will close this issue.


[Authority] Remove standalone next sequence from store struct

Given the latest logic for maintaining batches and a local sequence of commands, we do not need the atomic next_sequence_number in the store any more. So this PR removes it, and its initialisation.

Given the latest logic for maintaining batches and a local sequence of commands, we do not need the atomic next_sequence_number in the store any more. So this PR removes it, and its initialisation.

Nice observation


[th2-2334] prepare test build

Thank you for your revive. It has been moved to https://github.com/th2-net/th2-conn/pull/64


Cursor glitch on icons

The cursor keeps glitching when hovering icons, the tooltip blink and sometimes need 3 tries to click it... it's very disappointing while developing :/ Please fix it soon :) it's about css I suppose, maybe increase the hitbox of the icon

New try : spamming right-click

@Aetherall Are you using the Atom Material theme?

@ivankravets We had a very similar issue for users with the Atom Material theme https://github.com/Fred-Barclay/Termination/issues/41. The solution is to add the following to Atom's stylesheet:
.tooltip {
  transition: opacity 500ms;
}

Just thought you might want to know (and possibly add to the docs?), especially if it is the same problem as @Aetherall is having.

I got the same issue but the instructions from @Fred-Barclay solved the problem.
Thanks

Thought it might be worth mentioning the css fix from @Fred-Barclay worked for me on OSX and Win10


Svelte client-side fetching not working in v6

In my SvelteKit project, I can get the native fetch to work, but when I pass fetch to the Client, I get this error in the console:
Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
    at Client.fetch (index.es.js:497)
    at Client.getRepository (index.es.js:323)
    at Client.getCachedRepository (index.es.js:432)
    at Client.getResolvedRefString (index.es.js:485)
    at Client.buildQueryURL (index.es.js:364)
    at Client.get (index.es.js:265)
    at Client.getAll (index.es.js:279)
    at getData (clientside.svelte:13)

This is in the clientside route in this repo:
https://github.com/samlfair/svelte-docs-tester-01

Thanks @samlfair, this is fixed in v6.0.0-alpha.3 (via https://github.com/prismicio/prismic-javascript/commit/83c6290ec79a4f5bbecc1d2d9308816300101138).

Oops, spoke too soon! I forgot I edited a bit of your project while debugging.
It's actually fixed in v6.0.0-alpha.4 (via https://github.com/prismicio/prismic-javascript/commit/d22ae21483f967b4366d501f7e98934d6ee668bb) with no changes to your project except updating the @prismicio/client version.


Disable v1alpha1 API by default

Fixes https://github.com/google/exposure-notifications-server/issues/1426
Release Note
**Breaking change!** This release disables the v1alpha1 API by default. If your clients depend on the v1alpha1 API, you **must** set `ENABLE_V1ALPHA1_API=true` on the `exposure` service.

/kind breaking


Extra request might slip past ratelimit checks

After spending some time debugging why i was getting 429's on stuff that i really shouldn't be getting it on i managed to boil it down to a bug in twilight's ratelimit handling and make a pretty simple reproducible case.
The below code will cause a ratelimit error:
use std::{sync::Arc, time::Duration};

use twilight_http::Client;
use twilight_model::id::ChannelId;

#[tokio::main]
async fn main() {
    let token = std::env::var("DISCORD_TOKEN").expect("set DISCORD_TOKEN");
    let client = Arc::new(Client::new(token));

    send_test_message(client.clone()).await;
    tokio::time::sleep(Duration::from_secs(6)).await;

    tokio::join!(
        send_test_message(client.clone()),
        send_test_message(client.clone()),
        send_test_message(client.clone()),
        send_test_message(client.clone()),
        send_test_message(client.clone()),
        send_test_message(client.clone()),
    );
}

async fn send_test_message(client: Arc<Client>) {
    println!("sending req");
    match client
        .create_message(ChannelId::new(913455776704638996).unwrap())
        .content("test")
        .unwrap()
        .exec()
        .await
    {
        Ok(_) => {}
        Err(e) => {
            println!("got error: {}", e);
        }
    }
}

1 request in that join should have been delayed, but somehow slipped past twilight's ratelimit handling.
I suspect it has something to do with the order of checks, how you wait for ratelimits before popping things off the queue but im not knowledgeable enough about twilight's internals to be sure.

Assigning to self.

This might be related to #1047 and #600

#1348 will close this if you want to give it a try with your test case:
[dependencies]
twilight-http = { branch = "fix-http-ratelimiting-started-at", git = "https://github.com/zeylahellyer/twilight" }

this is still triggering an error for me and looking back at the releases it seems like the fix was reverted (#1357)

re-opening so this doesn't get lost


fix file query

This info is stored in the files graph instead of the dcat graph.

Switched to draft:
To do:

further check for similar errors
test thoroughly

Tested successfully:

dumps are cleaned up correctly when dcat and files graph are different.


Add cache to package hover details

Whenever I hover over a package version it starts loading the details (like the package link).
And also, when the mouse moves, the details get loaded again.
Add caching to only check for outdated packages once and display the details from the cache.

@mskelton any updates on this please?

@erropix I don't use or maintain this extension anymore. @rentalhost has done a lot of the recent maintenance and might be able to help out.

@erropix: This has nothing to do with this extension. The package information is loaded by VSCode and this loading behavior is triggered by VSCode. Just try it out with this extension disabled. You will see, that the popup disappears for a second and appears again after VSCode loaded the package information again.
So please close this issue here and report it again in the vscode repo.


check tagsets for trailing commas before querying job-board

When .travis.yml contains trailing commas, those commas propagate all
the way through to to worker, which builds them into tags and passes
those tags on to job-board.
job-board does not like tags with commas and returns a 500, which then
causes a retry loop.
This patch adds a clearer error message for when that happens, displays
this error message to the user, and also makes sure we do not requeue.

I am going to test this on staging today.


Error Handling Bridging Promise to AnyPromise

I'm having trouble handling errors when bridging a Promise to an AnyPromise in Swift-
For ex:
func p() -> Promise<String> {
//do some stuff
}

let a = AnyPromise(bound: p())

a.then {
//do some more stuff
}.catch {
//handle error - how can I do this?
}

The issue seems to be in bridging Promise -> AnyPromise. The compiler won't let me use .recover/.error, and I can't seem to find any resources that cover this. Any help is much appreciated.

then in swift returns Promise. So error and recover should be available. If they are not then something has gone with your build. Please provide complete build details.

thanks- this resolved my issue; didn't realize I had to definitely use then to first return a Promise from the AnyPromise.

Oh right, yeah AnyPromise has no catch in Swift.


Parsing of Separators

First of all, this is really a great library! According to my knowledge, there are very few open-source attempt at UnicodeMath. Excellent job!
I'm also writing my own UnicodeMath parser in Dart. One problem I found within  UnicodeMath, A Nearly Plain-Text Encoding of Mathematics, Version 3.1 Appendix A. UnicodeMath Grammar is that, it fails to account for separators in the grammar for expBracket.
Example
(1/2 \mid 3)
The \mid here needs to be identified as a separator to stretch.
Solution
We may need to change the grammar from
expBracket ← opOpener exp opCloser
← ‘||’ exp ‘||’
← ‘|’ exp ‘|’

to
expBracket ← opOpener exp (opSeparator exp)+? opCloser
← ‘||’ exp ‘||’
← ‘|’ exp ‘|’

However this introduces backtracking problems. Since | U+007C can at the same time be opener, separator or closer. I haven't got a good solution to this now.
Meanwhile it would be great if we can collaborate on this matter. I have been documenting my findings in https://github.com/znjameswu/flutter_math/issues/2

Hiya! I'm glad someone out there is finding my work useful! 😄

I'm also writing my own UnicodeMath parser in Dart. One problem I found within UnicodeMath, A Nearly Plain-Text Encoding of Mathematics, Version 3.1 Appendix A. UnicodeMath Grammar is that, it fails to account for separators in the grammar for expBracket.

Yeah, the given grammar is rather incomplete – during the process of implementing of my parser, I had to piece together many details based on the text, which has likely led to a number of subtle incompatibilities with the canonical implementation in Microsoft Office (which I don't currently have access to).

Addressing your specific issue, Sargent's document contains the following description of separators:

With the most common use cases and a desire to end up with a comprehensible parsing grammar in mind, I've interpreted/implemented this basically as follows:

The pipe symbol (|, U+007C) is interpreted as a special type of bracket that must be paired with itself (to denote absolute values, supposedly), as is two pipe symbols or a double vertical line (‖, U+2016).
The vertical bar separator \vbar (│, U+2502) is to be used for separatos in expressions like (a|b). Sargent writes about using the pipe symbol for this in some cases, but admits that "the resulting ambiguities are insurmountable in general", which I took as a signal not to bother trying to make it work in this context.
The mid character \mid (∣, 2223) is for expressions like {x | f(x) = 0}. Note that you seem to be conflating it with the pipe symbol U+007C, which might not be wrong: both of which may indeed work in Office.

I hope that's somewhat helpful!

Taking a look at your notes, it strikes me that you're also looking to implement the "input method" part of UnicodeMath, with successive (sub)equation build-up. I suspect that in this environment, you might be able to derive some context from the already-built-up portion of the expression that would e.g. allow using the pipe symbol for separators without the insurmountable ambiguities.

Hiya! I'm glad someone out there is finding my work useful! 😄

I'm also writing my own UnicodeMath parser in Dart. One problem I found within UnicodeMath, A Nearly Plain-Text Encoding of Mathematics, Version 3.1 Appendix A. UnicodeMath Grammar is that, it fails to account for separators in the grammar for expBracket.

Yeah, the given grammar is rather incomplete – during the process of implementing of my parser, I had to piece together many details based on the text, which has likely led to a number of subtle incompatibilities with the canonical implementation in Microsoft Office (which I don't currently have access to).

Addressing your specific issue, Sargent's document contains the following description of separators:

With the most common use cases and a desire to end up with a comprehensible parsing grammar in mind, I've interpreted/implemented this basically as follows:

The pipe symbol (|, U+007C) is interpreted as a special type of bracket that must be paired with itself (to denote absolute values, supposedly), as is two pipe symbols or a double vertical line (‖, U+2016).
The vertical bar separator \vbar (│, U+2502) is to be used for separatos in expressions like (a|b). Sargent writes about using the pipe symbol for this in some cases, but admits that "the resulting ambiguities are insurmountable in general", which I took as a signal not to bother trying to make it work in this context.
The mid character \mid (∣, 2223) is for expressions like {x | f(x) = 0}. Note that you seem to be conflating it with the pipe symbol U+007C, which might not be wrong: both of which may indeed work in Office.

I hope that's somewhat helpful!

Taking a look at your notes, it strikes me that you're also looking to implement the "input method" part of UnicodeMath, with successive (sub)equation build-up. I suspect that in this environment, you might be able to derive some context from the already-built-up portion of the expression that would e.g. allow using the pipe symbol for separators without the insurmountable ambiguities.

Thank you for the comment. I might have misintepreted your code when I opened up this issue (didn't see the expBracketContent).

Also thanks for your advice on the interactive build-up strategies. In general, I found it quite hard to speculate MS Office's implementation. I still don't have a solid speculation and still have to try some solutions.

Thank you for the comment. I might have misintepreted your code when I opened up this issue (didn't see the expBracketContent).

Also thanks for your advice on the interactive build-up strategies. In general, I found it quite hard to speculate MS Office's implementation. I still don't have a solid speculation and still have to try some solutions.


By default insecure TLS v1 and v1.1 are now disabled

This disables TLS 1.0 and 1.1 to be disabled by default. To allow them, you can override this option with an empty string.

"67108864 (TLS V1.0) | 268435456 (TLS V1.1)" becomes 335544320. So you can just manually put "secureOptions: 335544320" on your "laravel-echo-server.json".


Payment Method Text Not Visible in Dark Mode on Enatega Single Vendor Customer App.

Issue: Payment Method Text Not Visible in Dark Mode on Enatega Single Vendor Customer App
Description:
A significant issue has been identified in the Enatega Single Vendor Customer App while using dark mode. In dark mode, the payment method text is not visible or is difficult to read, affecting the user's ability to select and manage their preferred payment method.
Impact:
User Frustration: Users may experience frustration when they cannot see or properly read payment method text in dark mode, leading to a poor user experience.
Usability Impairment: The issue hinders users' ability to manage their payment options effectively, impacting the app's overall usability.
Steps to Reproduce:

Open the Enatega Single Vendor Customer App.
Enable dark mode or ensure it is set as the default theme.
Navigate to the payment method selection section.
Observe that the payment method text is not clearly visible or readable due to issues with text color or contrast.

Expected Resolution:
The Enatega Single Vendor Customer App should be reviewed and adjusted to ensure that payment method text is clearly visible and legible in dark mode. This may involve enhancing text color, contrast, or typography choices to make payment method information stand out effectively. Addressing this issue is crucial for providing a seamless and user-friendly experience, particularly for users who prefer dark mode.

Hello @Sohailqureshi9 ,
I'm pleased to share that we've fixed the issue where the payment method text was not visible in dark mode on the Enatega Single Vendor Customer App.
Thank you for reporting this issue, and your patience is much appreciated. If you encounter any more problems or have additional feedback, please don't hesitate to reach out.
Best regards,
@beKashif
@Ninjas-Code-official/ninjas-code


Keycloak Relationship Authorization does not appear to work as described in documentation

Module: @graphback/keycloak-authz
Version: 1.0.0-beta*

According to the Keycloak-Authz Relationship Authorization documentation I can apply authorization restrictions on one-to-many fields, like the example below:
const authConfig = {
  Task: {
    relations: {
      taskUsers: { roles: ['admin'] }
      allTasksComments: { roles: ['commenter'] }
    },
},

Take a look at my auth config below. Note.comments is a one-to-many field.
const authConfig: CrudServicesAuthConfig = {
  Note: {
    ...,
    relations: {
      // Note.comments oneToMany field
      comments: { roles: ['super_admin'] }
    }
  }
}

Datamodel:
""" @model """
type Note {
  """ @id """
  _id: ID!
  title: String!
  description: String
  """
  @oneToMany(field: 'note')
  """
  comments: [Comment]!
}

""" @model """
type Comment {
  """ @id """
  _id: ID!
  text: String
  description: String
}

However I am able to retrieve the comments relation data without any user privileges.
Upon inspection of the KeycloakCrudService, it is comparing the relationField parameter to comments, but this parameter is noteId (as it is in CRUDService), so the auth check is never executed.
https://github.com/aerogear/graphback/blob/315bce80131d3838604acb952450f36d0c1bd40c/packages/graphback-keycloak-authz/src/KeycloakCrudService.ts#L160-L162
To get it to work I would need to do:
Comment: {
  relations: {
    noteId: { roles: ['super_admin'] }
  }
}

Is this a bug or a docs issue?

Automatically generated comment to notify maintainers
/cc @machi1990, @wtrocki

@craicoverflow update docs

Temporary fix added in #2101

@craicoverflow thanks. Looks like the fix just landed in master. What I see here:

Either close the issue as now everything works as designed
Change issue title to what would be desirable way of doing things.

/cc @wtrocki

I would love to get back to it once 1.0 dust will settle.

Has this issue been fixed as mentioned by @craicoverflow in #2101? If not then what more needs to be done?

Hi @RinkiyaKeDad - this is not fixed yet. The description already covers what is required to do this, and to be honest it is not an easy fix at all, as yet we are unsure how it can be fixed. You can give it a go, but there are probably better issues to take for now.


Fix alignMols so that it takes into account of QueryAtoms and QueryBonds

This is a quick fix so that the substructure matcher in the align tools takes into account of QueryAtoms and QueryBonds.
This may introduce backwards incompatibility issues if there's alignment code that for some reason depended on the lack of query matching (which albeit, is a bit weird).

At the minimum this change will require a regression test and perhaps an example in the documentation of how one can align queries to queries.

+1 on getting rid of magic booleans. It's not quite clear to me how to write a regression test for this yet, any suggestions?

Maybe use one of the existing tests of alignMol() from Code/GraphMol/MolAlign/testMolAlign.cpp where you've updated the input structures to include queries?

After digging around, this is isn't a totally safe change. I was hoping that this would always result in alignment identifying more atoms to use for the alignment. However, because the semantics of SubstructMatch changes, this could break backwards compatibility for people who are setting atomic numbers and other properties on the base Atom class of QueryAtoms (in addition to setting various QueryAtom properties).
Nevertheless, I think for the purpose of aligning molecules, this change still makes sense.
None of this would be a problem if we forbade the base Atom class of QueryAtoms actually representing real atoms of any sort. (Eg. completely disallow QueryAtoms from having non zero AtomicNumbers).
  std::string rdbase = getenv("RDBASE");
  std::string fname1 = rdbase + "/Code/GraphMol/MolAlign/test_data/1oir.mol";
  RWMol *m1 = new RWMol(*MolFileToMol(fname1));
  std::string fname2 =
      rdbase + "/Code/GraphMol/MolAlign/test_data/1oir_conf.mol";
  RWMol *m2 = new RWMol(*MolFileToMol(fname2));

  // atomCompat never triggers QueryMatch() if only one of the two atoms is a query

  auto a1 = new QueryAtom();
  auto a2 = new QueryAtom();

  // UNCHANGED
  a1->setAtomicNum(5);
  a2->setAtomicNum(5);
  a1->setQuery(makeAtomNumQuery(7));
  a2->setQuery(makeAtomNumQuery(8));
  m1->replaceAtom(28, a1);
  m2->replaceAtom(19, a2);

  MatchVectType match;

  std::cout << "BEFORE" << SubstructMatch(*m1, *m2, match, true, false, false) << std::endl; // 0
  std::cout << "AFTER" << SubstructMatch(*m1, *m2, match, true, false, true) << std::endl; // 0

  // IMPROVED
  auto a3 = new QueryAtom();
  auto a4 = new QueryAtom();
  a3->setAtomicNum(0);
  a4->setAtomicNum(0);
  a3->setQuery(makeAtomNumQuery(7));
  a4->setQuery(makeAtomNumQuery(7));

  m1->replaceAtom(28, a3);
  m2->replaceAtom(19, a4);

  std::cout << "BEFORE" << SubstructMatch(*m1, *m2, match, true, false, false) << std::endl; // 0
  std::cout << "AFTER" << SubstructMatch(*m1, *m2, match, true, false, true) << std::endl; // 1

  // UNCHANGED
  auto a5 = new QueryAtom();
  auto a6 = new QueryAtom();
  a5->setAtomicNum(7);
  a6->setAtomicNum(7);
  a5->setQuery(makeAtomNumQuery(7));
  a6->setQuery(makeAtomNumQuery(7));

  m1->replaceAtom(28, a5);
  m2->replaceAtom(19, a6);

  std::cout << "BEFORE" << SubstructMatch(*m1, *m2, match, true, false, false) << std::endl; // 1
  std::cout << "AFTER" << SubstructMatch(*m1, *m2, match, true, false, true) << std::endl; // 1

  // REGRESSION
  auto a7 = new QueryAtom();
  auto a8 = new QueryAtom();
  a7->setAtomicNum(7);
  a8->setAtomicNum(7);
  a7->setQuery(makeAtomNumQuery(7));
  a8->setQuery(makeAtomAliphaticQuery());

  m1->replaceAtom(28, a7);
  m2->replaceAtom(19, a8);

  std::cout << "BEFORE" << SubstructMatch(*m1, *m2, match, true, false, false) << std::endl; // 1
  std::cout << "AFTER" << SubstructMatch(*m1, *m2, match, true, false, true) << std::endl; // 0

  return;

So one solution is to combined QueryAtom::Match and QueryAtom::QueryMatch into a single proper polymorphic function:
bool QueryAtom::Match(Atom const *what) const {
  PRECONDITION(what, "bad query atom");
  PRECONDITION(dp_query, "no query set");
  return dp_query->Match(what);
}

to
bool QueryAtom::Match(Atom const *what) const {
  PRECONDITION(what, "bad query atom");
  PRECONDITION(dp_query, "no query set");
  if(what->hasQuery()) {
    return queriesMatch(dp_query, what->getQuery());
  } else {
    return dp_query->Match(what);
  }
}

I'm sure you already know this, but I just realized that Match isn't even symmetric:
  auto a0 = new Atom(6);
  auto a1 = new QueryAtom(1);
  a1->setQuery(makeAtomNumQuery(6));

  std::cout << a1->Match(a0) << std::endl; // 1
  std::cout << a0->Match(a1) << std::endl; // 0

Match should not be symmetric, as query atoms aren't really atoms.  It could quite complicated indeed in the general case (think recursive smarts, or matchers etc).  For a much better discussion see here<EMAIL_ADDRESS>And actually, you can replace query atoms with fairly arbitrary code, i.e. match two atoms if they have the same property tag.
In a pinch you could add it as an option (although the function is pretty top heavy already)
double getAlignmentTransform(const ROMol &prbMol, const ROMol &refMol,
                             RDGeom::Transform3D &trans, int prbCid, int refCid,
                             const MatchVectType *atomMap,
                             const RDNumeric::DoubleVector *weights,
                             bool reflect, unsigned int maxIterations,
                             bool UseQueryQueryMatches=false
)

Without a concrete example of the issues you are trying to solve, I worry that this might be a solution looking for a problem.  I can completely understand adding query atoms to the probe molecule to better align more targets, but I expect you may be thinking that query query matches allow more things to match which is probably not true, it might actually make fewer match because query query matches have to be exact.

It's not the non-symmetry itself that bothers me, but the part (as mentioned in the linked thread) whereby a normal atom's properties are matched against the BASE class of a query atom. I (again this is just me) always set all the properties of the query atom to zero values via the default constructor, and only customize the query property. So I'd always want to call queryatom's match on the normal atom instead. I'd ideally want Match() to behave as follows:

this/what
QueryAtom
Atom

QueryAtom
queryquerymatch
querymatch

Atom
querymatch
match

instead of:
Match():

this/what
QueryAtom
Atom

QueryAtom
querymatch
querymatch

Atom
match
match

QueryMatch():

this/what
QueryAtom
Atom

QueryAtom
queryquerymatch
querymatch

This behavior would be also be quite easy to implement.
PS: The use case is that I don't have a clear cut delineation between query and target when mols start to have both QueryAtoms and normal Atoms attached to it.

I think there are distinct reasons not to have this as the default behavior of the default query matching.
I admit to being confused about what you are asking, it really doesn't match with my experience (pardon the pun, it's late).  I tend to do something along the lines of (also apologies for python code here, but it's easier to test), but isn't what you want exactly what replaceAtom is for?  In the code below I'm changing nitrogens in m2 into atoms that look for properties with certain values, there is no matching of anything but the query:
from rdkit import Chem
from rdkit.Chem import rdqueries

m = Chem.MolFromSmiles("CCCCC")
m2 = Chem.RWMol(Chem.MolFromSmiles("NN"))

for atom in m2.GetAtoms():
    m2.ReplaceAtom(atom.GetIdx(),
                  rdqueries.HasIntPropWithValueQueryAtom("bar", atom.GetIdx()))

print "done"
assert m.HasSubstructMatch(m2)==False

# set the props so we can now match
m.GetAtomWithIdx(0).SetProp("bar", "0")
m.GetAtomWithIdx(1).SetProp("bar", "1")

assert m.HasSubstructMatch(m2)==True

However, the symmetry is now quite broken:  "m2.HasSubstructMatch(m) == False" which I think is what we are talking about here.
The query molecule stored as a psuedo-real molecule is a debate that I have had with Greg before and we ended up on different sides of the fence.  I think that it can seem like the matches should be symmetric, however in the previous toolkits I have been involved with, the use or a smarts pattern was similar to generating regular expressions:
pat = smarts.compile("[C,N]")
groups = pat.match( molecule )

One wouldn't necessarily expect this to be symmetric as the matcher is a finite state machine and the molecule is not :)  However, I will concede that adding symmetry might be useful, but I'm not sure that this is what QueryQueryMatches actually do.  I expect what you want is something like:
  match = probe_atom->Match(refatom) || refatom->Match(probeatom);
  and likewise for bonds.

Here is the atom matching at the bottom level (Code/GraphMol/Atom.cpp)
bool QueryAtom::Match(Atom const *what) const {
  PRECONDITION(what, "bad query atom");
  PRECONDITION(dp_query, "no query set");
  return dp_query->Match(what);
}
bool QueryAtom::QueryMatch(QueryAtom const *what) const {
  PRECONDITION(what, "bad query atom");
  PRECONDITION(dp_query, "no query set");
  if (!what->hasQuery()) {
    return dp_query->Match(what);
  } else {
    return queriesMatch(dp_query, what->getQuery());
  }
}

And QueryQueryMatch is pretty much a straight up do the two query atom match exactly.  This note has gotten long enough that I might be completely on the wrong track, so please let me know if I am.

I admit to being confused about what you are asking, it really doesn't match with my experience (pardon the pun, it's late). Isn't what you want exactly what replaceAtom is for?

My point is that for me personally, there's no point to QueryAtom subclassing Atom save for the fact that it lets us attach it to Mol objects easily. QueryAtom doesn't  really use any of the base class members (eg: df_isAromatic, d_atomicNum, d_chiralTag etc.). To me, it's an entirely ethereal construct whose primary purpose is for querying, not representing real atoms. As such, to have a regular Atom::Match(what) compare against properties of this ethereal QueryAtom's base class is just plain weird to me.

However, the symmetry is now quite broken: "m2.HasSubstructMatch(m) == False" which I think is what we are talking about here.

However in the previous toolkits I have been involved with, the use or a smarts pattern was similar to generating regular expressions.

I view the SMARTS as nothing more than encoding of query mols analogous to SMILES as being an encoding of normal molecules. But I can certainly see the analogy to FSMs.

I expect what you want is something like:  match = probe_atom->Match(refatom) || refatom->Match(probeatom);

I have something much more fun:
bool Atom::Match(Atom const *what) const {
  PRECONDITION(what, "bad query atom");

  // this is needed to symmetrize Matching
  if(dynamic_cast<const QueryAtom *>(what) && what->hasQuery()) {
    return what->Match(this);
  }

If it is just the subclass issue, I think that is because QueryAtom adds extra data to the atom (in this case a pointer to a query structure) that isn't needed in general, so why use the extra memory hit.  There are a lot of atoms in general.  One could argue that this could be moved into a property, but I think that is the main reason.  If we assume this is the case, a QueryAtom has to be an Atom since that is how the graph is traversed.  You are correct that any additional atom information is essentially lost in the query, but I think that is a small price to pay here.
Also note that you don't have to dynamic cast, you can just all what->hasQuery().  Your Match proposal is along the lines I was thinking.   Now the question is what are the ramifications of this?  I worry with recursive smarts the semantics of "SubstructureMatch" won't make sense mainly because switching the matching order may be doing a "SuperstructureMatch" instead.

If it is just the subclass issue, I think that is because QueryAtom adds extra data to the atom (in this case a pointer to a query structure) that isn't needed in general, so why use the extra memory hit.

It's more a matter of QueryAtom subclassing Atom. I'd actually propose both QueryAtom and Atom subclassing a generic Node class instead :) but that's opening another can of worms I won't get into for now.

I worry with recursive smarts the semantics of "SubstructureMatch" won't make sense mainly because switching the matching order may be doing a "SuperstructureMatch" instead.

I guess it comes down to how we view Matching: either as a subset operator or as an order-invariant, symmetric compatibility operator. I'm arguing for the latter because Atoms aren't really proper subsets of QueryAtoms to begin with, since all the dp_* properties in the base class are just dummy attributes to start with, and they're only there because it's convenient for attaching to Mols.
As for the actual PR, I totally forgot we weren't using C++11 yet. I also added explicit names to the magic booleans. I agree that alignment transforms are top-heavy to begin with, and for all the reasons we listed above, I think it's ok to replace the default behavior. I'll do a quick rebase to clean up once you or greg think its ready to go.

Hm.. python 2.7 builds failed on building the java wrappers, but python 3.x passed and so did appveyor
1 error
5 warnings
Generating /home/travis/build/rdkit/rdkit/Code/JavaWrappers/gmwrapper/doc/index.html...
Generating /home/travis/build/rdkit/rdkit/Code/JavaWrappers/gmwrapper/doc/help-doc.html...
Note: Custom tags that could override future standard tags:  @example, @notes. To avoid potential overrides, use at least one period character (.) in custom tag names.
5 warnings
make[2]: *** [../Code/JavaWrappers/gmwrapper/org.RDKit.jar] Error 1
make[2]: *** Deleting file `../Code/JavaWrappers/gmwrapper/org.RDKit.jar'
make[1]: *** [Code/JavaWrappers/gmwrapper/CMakeFiles/GraphMolWrapJar.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 50%] Generating ../../../../Code/JavaWrappers/gmwrapper/build-test/org/RDKit/WrapperTests.class
/home/travis/build/rdkit/rdkit/Code/JavaWrappers/gmwrapper/src-test/org/RDKit/GraphMolTest.java:67: error: cannot find symbol
	public static void assertPointEquals(Point3D pt1, Point3D pt2, double tol) {
	                                     ^
  symbol:   class Point3D
  location: class GraphMolTest
/home/travis/build/rdkit/rdkit/Code/JavaWrappers/gmwrapper/src-test/org/RDKit/GraphMolTest.java:67: error: cannot find symbol
	public static void assertPointEquals(Point3D pt1, Point3D pt2, double tol) {

@DoliathGavid sometimes this happens, I usually just restart the travis build. (the circle button with the arrow).
While I'm not in favor of a node subclass per-se, I am in favor of an abstract API that can be fulfilled by an implementation class.  What goes into that abstract API should be atom specific though, so we probably will disagree on that point.
What might be amusing is that we actually do have a node API in the underlying boost-graph, so there are actually two ways of getting the underlying graph structure which I personally think if overkill, though some would say that is the best kind of kill.
I'm still waffling on the symmetric match, I can see it from an atom perspective, but not from a substructmatch perspective, but perhaps I am overthinking this.  It boils down to this:
subtract match query qatom -> Carbon ( that must be in an an enol )
target atom -> carbon that is in an enol
Are these really symmetric?  Should they be?

OK it looks like the tests pass.
Maybe we can defer the symmetry problem to a later discussion?

Is there anything else that needs to be done to punt on this immediate PR?

Yeah, my day needs to get about 4 hours longer. :-S
I'll try to make some time to review it later today.

To be clear before I really get into this:

I consider the fact that an ROMol can contain Atoms and QueryAtoms to be a good thing. I believe it makes the toolkit simpler and more natural to use. It may be different from how other toolkits handle things, but that isn't something I find remotely alarming.
Queries are not, and don't need to be, symmetric. The operator is "Match", not "Equals". You don't even need to look to QueryAtoms to see that this is the case:

In [16]: a1 = Chem.Atom(6)

In [17]: a3 = Chem.Atom(6)

In [18]: a3.SetFormalCharge(1)

In [19]: a1.Match(a3)
Out[19]: True

In [20]: a3.Match(a1)
Out[20]: False

This behavior is documented here: http://www.rdkit.org/docs/RDKit_Book.html#atom-atom-matching-in-substructure-queries
Changing either of these things would require a fairly large amount of RDKit code to be rewritten. It's a backwards incompatible change, so it would break a completely unknown amount of code that other people have written that uses the RDKit, and would deliver, as far as I can tell, no actual value.

This looks fine now.
Thanks for submitting the PR!


Missing image for Windows Imaging Component - Clip

🛑 IMPORTANT: You can get your feedback addressed faster if you use the comment section for the article in which you encountered a problem.
Link to article:
How to Clip a Bitmap Source
Problem:
Image showing how clipping works at bottom of article is missing.

Looking at Developer Tools, here is the HTML that is generated on the article:
<img alt="illustration of imaging clipping" src="graphics/cliparegion-axisalignedclip.png" data-linktype="relative-path">

Thank you for creating the issue! One of our team members will get back to you shortly with additional information

@GrantMeStrength Can you please take a look at this issue?


Api Profile bug

Describe the bug
When I use this irl https://sky.shiiyu.moe/api/v2/profile/lecookieplayer
it gives me that
{
"error": "Cannot read properties of undefined (reading 'special_0')"
}
Expected behavior
To return a player's profile
Screenshots

Desktop (please complete the following information):
windows 10
chrome Version 107.0.5304.88 (Official Build) (64-bit)

Describe the bug When I use this irl https://sky.shiiyu.moe/api/v2/profile/lecookieplayer it gives me that { "error": "Cannot read properties of undefined (reading 'special_0')" }
Expected behavior To return a player's profile
Screenshots
Desktop (please complete the following information):
windows 10 chrome Version 107.0.5304.88 (Official Build) (64-bit)

Hello, we're currently aware of this bug. There's currently PR #1758 which fixes that. Thanks for your patience


mgmt, move AzureServiceClient to fluentcore

Let me know if there is better place.

/check-enforcer override

CI fails on storage client, not touched.


Type Inference fails in Kotlin

When attempting to use RxLifecycle from Kotlin in an Observable chain the compiler cannot infer types in some cases unless explicitly specified.
Consider if I have a variable tasks of type Observable<List>
If I try to use that in an observable chain:
tasks.compose(RxLifecycle.bindView(taskList)) // followed by other clauses

The compiler complains that it cannot infer the type unless I explicitly specify it as in:
tasks.compose(RxLifecycle.bindView<List<Task>>(taskList)) // followed by other clauses

I think the problem is that you are not explicitly bounding the generic type to match the compose method. You have the method returning
Transformer<T, T>

And I think that should really be:
Transformer<? super T, ? extends T>

to match the semantics of the Observable.compose method.
I tested by writing a wrapper method that uses the latter return type and it fixes the type inference.

I've not been using Kotlin myself, but if you submit a pull request I'll gladly take it.

Sorry, I do not do PR's on GitHub, but the change is just a global search and replace of "Transformer<T, T>" and replacing that with "Transformer<? super T, ? extends T>"

Your boycotting comes off as "I don't want to do the work myself."

My boycotting is the fact that GitHub should be just about technology and be politically neutral, but it instead decided to promote an offensive political agenda. Therefore I can no longer in good conscience support them with my code. Note I also boycotted Stack Overflow for the same reason no longer have an account there and filter SO results from my search queries.
I'd be happy to submit a patch file or host the change on GitLab, but most people are not happy with that.

Could you please provide a link to GitHub's offensive political agenda? I'm not aware of that. Thx.

You're not boycotting GitHub if you're just getting other people to make changes for you. You're submitting changes by proxy.

...Not to mention the obvious, which is that the existence of this issue calls into question whether this is a boycott or a dodge for doing work.

I don't want to get into the specifics of their political agenda because unlike GitHub I am not trying to promote a political agenda here and don't want to see this devolve into a political debate. My point is that Github should have been politics free, but they crossed a line
To understand my position, just pick your own hot button political issue that you feel passionately about. Now imagine how you would feel if Github changed the logo at the top of every page, including YOUR OWN pages, to show support for the opposite opinion of your own. The particular issue itself is not as important as the fact that Github should be just about tech, not politics.
While I refuse to support Github itself directly with my own code, I am not boycotting the people like you that use GitHub and the projects they create. I maintain an identity primarily so that I can support them with issue reports to make their software better. If GitHub could accept PRs from other repos, like GitLab I would gladly do it. I am sorry, but I have to draw the line somewhere.


Maintenance

Hi @defunctzombie, this module is heavily used by browserify and we'd like to do some updates (like bumping the resolve dependency). I understand you're not actively working on this package and I'd be happy to maintain it for the foreseeable future. Would you be open to transfering it to the @browserify org? Thanks!

Sure - what do I need to do to make that happen?

Great, we have some migration docs here: https://github.com/browserify/admin#adding-a-package-to-the-browserify-org

To add a package to the browserify org, you will need to transfer ownership on github as well as add the package to the browserify org on npm.
For github:
Visit the project page settings for a github user $USER and a project name $PROJECT at:
https://github.com/defunctzombie/node-browser-resolve/settings
At the bottom in the "danger zone" box, click "transfer ownership".
Type the name of the repository to confirm and below that box, type "browserify" in the field labeled "new owner's github username or organization name".
For npm, run this command, replacing $PKGNAME with the name of the package on npm:
npx<EMAIL_ADDRESS>access grant read-write browserify:developers browser-resolve

(An old version of npm is required because recent versions of npm prohibit orgs from managing unscoped packages.)

all that's required is transferring the github repository to the org and then granting access to the npm package to the browserify org. The npm access command can be a bit finicky in my experience so if it doesn't immediately work you can also add me as an owner using
npm owner add goto-bus-stop browser-resolve

and then i can figure it out from there. Thanks!

I've transferred the repo to the browserify org and granted goto-bus-stop owner access to the browser-resolve package. Thank you for picking up maintenance of this module.

Thank you!


Week 1 2 and 3 update : Airbyte connector for avni

Project
Airbyte Connector for Avni
Changes
Added week 1 2 and 3 update
Notes
If there are any further notes : No

@photon0205 can you review it now


fix propertyLoader.mergeDict

Hi, I found bug about merge process in loader.py.
dict can’t call set function in list.
>>> set([dict(a=1)])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'dict'

please check it.

I checked unit test before Pull-Request.
I don't know why Travis check is failed.
> nosetests test_loader.py
........2016-08-18 23:56:51,586 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: qfx5100-24q-2p, role: leaf, topology: 3Stage. KeyError: 'leaf'
2016-08-18 23:56:51,587 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: qfx5100-48s-6q, role: fabric, topology: 3Stage. KeyError: 'fabric'
2016-08-18 23:56:51,588 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: qfx5100-48s-6q, role: spine, topology: 3Stage. KeyError: 'spine'
.2016-08-18 23:56:51,615 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: None, role: fabric, topology: 3Stage
2016-08-18 23:56:51,615 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: unknown, role: spine, topology: 3Stage. KeyError: 'unknown'
2016-08-18 23:56:51,616 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: qfx5100-24q-2p, role: None, topology: 3Stage
.2016-08-18 23:56:51,644 [loader      ] [ERROR   ] [7fff7db0d000] No ports found, deviceFamily: qfx5100-24q-2p, role: fabric, topology: 3Stage. KeyError: 'qfx5100-24q-2p'
..2016-08-18 23:56:51,707 [loader      ] [ERROR   ] [7fff7db0d000] deviceFamily.yaml was not loaded properly
......2016-08-18 23:56:51,814 [loader      ] [ERROR   ] [7fff7db0d000] DEFAULT file: "non-existing.yaml" not found at /Users/servak/.ghq/github.com/Juniper/OpenClos/jnpr/openclos/conf
.........
----------------------------------------------------------------------
Ran 27 tests in 0.636s

OK


Correct link to Windows.md in README.me

The link in README.md was still referencing SlidingWindows.md after it was renamed to Windows.md.
Checklist

[x] I've added at least one test that validates that my change is working, if appropriate
[x] I've followed the code style of the rest of the project
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary

Thanks, @mdznr!


Standards In Plotting For Inference & Forecasting Output

Presently, Models in metaclass.py have a method called plot_posterior, which calls plot_posterior located in mcmcutils.py. The tutorial Fitting a hospital admissions-only model employs arviz cohesively throughout, and in previous discussions, MSR developers seemed to converge on using arviz abundantly.
Should Model be made to have additional plotting features, such as plot_trace or plot_ppc from arviz? If not, then can we develop some standards for what to plot after retrieving samples from our MSR models?

Agree in general that there should be support for more convenient plotting. If we go this direction, I think we should start with more support for converting model output to ArviZ InferenceData.

Agree in general that there should be support for more convenient plotting. If we go this direction, I think we should start with more support for converting model output to ArviZ InferenceData.

Wrt your latter remark, I agree. I spent some time playing around with InferenceData because trace, HDI, and ppc plots are easier to use this way, but didn't get as far as I would like. Expected value for our inference / forecasting pipelines from really understanding arviz seems high. Hopefully #135 can demonstrate some arviz utilities not previously demonstrated.


Cameras

How should we handle cameras? Adding a Matrix parameter to IRenderer.Draw(...) ?
And OpenTK doesn't support System.Numerics.Vector's for GL.UniformMatrix4(...) . So we either have to convert the matrices or use unsafe code like OpenTK.

Adding a Matrix parameter to IRenderer.Draw(...) ?

Yeah, but we'll need Matrix3x2 for 2D cameras and two Matrix4x4 (view and projection) for 3D cameras. This cannot be added to IRenderer<T>, so we'll first remove the IRenderer<T> interface and add the parameters to SpriteRenderer.Draw and ModelRenderer.Draw methods.

So we either have to convert the matrices or use unsafe code

WP8/Silverlight prevents the use of unsafe code. Now that our target is corefx/Windows 10, unsafe code can be used for performance sensitive code path.

OpenTK is also discussing using System.Numerics.Vectors https://github.com/opentk/opentk/issues/245 , so the problem will go away when everything works on top of the same vector library.


Cache jobs and intermediates (e.g. ODEProblems)

Acsets should be hashed and cached, along with their inputs and intermediary representations like ODESystems and ODEProblems

no reason to do this atm


[1.2-Beta4] Crafting task collision

Issue description:
What happens:
If you set the pattern for the basic processor and it's component to the same solderer the system it's going to push the component all at the same time. Causing the solderer to not work.
What you expected to happen:
Do one crafting task at a time, If it need to craft the Basic Processor wait until the printed basic processor "sub-task" finish and then start crafting the Basic Processor
Steps to reproduce:

Craft all the pattern required for the Basic Processor to be crafted in the solderer
Put all of those pattern in the same solderer
Craft 10 Basic Processor
Jackpot!!!

Version (Make sure you are on the latest version before reporting):

Minecraft: 1.10.2
Forge: <IP_ADDRESS>9
Refined Storage: 1.2-beta4

Does this issue occur on a server? yes
If a (crash)log is relevant for this issue, link it here: Not relevant

Hmm, this shouldn't be happening, as it checks if all items go in the machine. If not, it shouldn't even start the other one.

I'm going to test it again tomorrow.


[TCID-DIR-TEAMING-USER-INVITE]: Teaming test for user invite

Below test cases will be covered in this tcid:

Invite user as ProjectAdmin
Invite user as ProjectMember
Invite user as ProjectReadAdmin

https://github.com/mayadata-io/oep-e2e-aws/pull/29
https://github.com/mayadata-io/gui-automation/pull/24


View one by one overlay / swipe

User can navigate within  a sorted list of dreams by clicking an 'eye' icon in a result list. The eye opens an overlay that can be navigated with 'next' and 'previous' within the list. User can navigate with buttons or using a swipe motion on the main dream image.


Spring Application Freezes When Redis Connection Fails in Redisson

When using Redisson with Spring for caching, if Redis is unavailable during a call to get(Object key, Class type) in the RedissonCache class, the application becomes unresponsive because connection problems are not properly caught. Specifically, in the line value = map.get(key);, no exception is handled when a connection issue occurs, causing the application to freeze or fail to start. This behavior prevents the application from handling Redis outages gracefully and violates resilience principles. To resolve this, the map.get(key) call should be wrapped in a try-catch block to handle exceptions like RedisConnectionException and allow the application to log a warning and continue operation.

The exception is rethrown in the latest version. Below is the output
org.redisson.client.WriteRedisConnectionException: test1

	at org.redisson.spring.cache.RedissonCache.get(RedissonCache.java:83)
	at org.springframework.cache.interceptor.AbstractCacheInvoker.doGet(AbstractCacheInvoker.java:73)
	at org.springframework.cache.interceptor.CacheAspectSupport.findInCaches(CacheAspectSupport.java:524)
	at org.springframework.cache.interceptor.CacheAspectSupport.findCachedValue(CacheAspectSupport.java:481)
	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:431)
	at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:395)
	at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:65)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)
	at org.redisson.spring.cache.RedissonSpringCacheTest$SampleBean$$SpringCGLIB$$0.read(<generated>)
	at org.redisson.spring.cache.RedissonSpringCacheTest.testPutGet(RedissonSpringCacheTest.java:180)

Unable to reproduce


Fix single convert

Convert to a single file did not work, there was a simple typo.
I have tested this and it works now
(Thanks for this program!)

Canceling pull request, something is wrong in the bash AAXtoMP3 file for singles. Will reopen with fix,
Sorry!


Upgrade to rustc 1.0.0-dev (68d694156 2015-03-20)

Fixed test for array type of strings.

Thanks!


[BUG] Upgrade fails because upgrade-repo VM is not becoming healthy and gets deleted again

Describe the bug
The Harvester cluster was installed with 1.0.2 and is imported into a Rancher 2.6.8. Now it should be updated to 1.0.3, but the update fails when starting the upgrad-repo VM.
To Reproduce
Start an update from 1.0.2 to 1.0.3. The update starts and the upgrade download finishes successfully after a few minutes. The upgrade-repo VM is being started and also comes up. In Harvester you can see that the VM is running, but not healthy. In Longhorn you can see that a VM disk volume was successfully created and mounted.
You can see the following events on the VM:
Readiness probe failed: Get "http://<IP_ADDRESS>:80/harvester-iso/harvester-release.yaml": dial tcp <IP_ADDRESS>:80: connect: no route to host
Readiness probe failed: Get "http://<IP_ADDRESS>:80/harvester-iso/harvester-release.yaml": dial tcp <IP_ADDRESS>:80: connect: connection refused

<IP_ADDRESS> is the IP of the upgrade-repo VM.

Then the VM is deleted again. The upgrade fails with a 502 Host not found error.

Expected behavior
The update successfully runs through.
Support bundle
Can be provided internally.
Environment

Harvester ISO version:  1.0.2
Underlying Infrastructure:
4 nodes, each 64 cores, 756gb ram. 2TB disks. Usage of all resources very low.
Internet access through HTTP proxy. HTTP proxy is configured within Harvester and working. The HTTP proxy does not intercept or break TLS. no_proxy is configured will all internal ip ranges and TLDs. We also added longhorn-system and cattle-system manually to rule out https://github.com/harvester/harvester/issues/2436.

According to the logs in the support bundle, there are apply-system-agent-upgrader jobs failing with this:
2022-09-19T08:36:16.202270909Z + eval 'v="$HTTP_PROXY"'
2022-09-19T08:36:16.202289376Z + v=http://<IP_ADDRESS>:8080/
2022-09-19T08:36:16.202297040Z + '[' -z http://<IP_ADDRESS>:8080/ ]
2022-09-19T08:36:16.202302932Z + var=HTTPS_PROXY
2022-09-19T08:36:16.202309944Z + val=
2022-09-19T08:36:16.202324403Z + eval 'v="$HTTPS_PROXY"'
2022-09-19T08:36:16.202334984Z + v=http://<IP_ADDRESS>:8080/
2022-09-19T08:36:16.202355673Z + '[' -z http://<IP_ADDRESS>:8080/ ]
2022-09-19T08:36:16.202364107Z + var=NO_PROXY
2022-09-19T08:36:16.202378916Z + val=,localhost,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>/8,cattle-system.svc,.svc,.cluster.local
2022-09-19T08:36:16.202388443Z + eval 'v="$NO_PROXY"'
2022-09-19T08:36:16.202412613Z + v=redacted,.redacted,.redacted,.redacted,.redacted,.redacted,<IP_ADDRESS>,<IP_ADDRESS>/24,<IP_ADDRESS>/24,<IP_ADDRESS>/24,longhorn-system,cattle-system,localhost,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>/8,cattle-system.svc,.svc,.cluster.local
2022-09-19T08:36:16.202428391Z + '[' -z redacted,.redacted,.redacted,.redacted,.redacted,.redacted,<IP_ADDRESS>,<IP_ADDRESS>/24,<IP_ADDRESS>/24,<IP_ADDRESS>/24,longhorn-system,cattle-system,localhost,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>/8,cattle-system.svc,.svc,.cluster.local ]
2022-09-19T08:36:16.202437797Z + chroot /host /var/lib/rancher/agent/tmp/tmp.7An2NIivQE/install.sh
2022-09-19T08:36:16.212819217Z [INFO]  Using default agent configuration directory /etc/rancher/agent
2022-09-19T08:36:16.212901059Z [INFO]  Using default agent var directory /var/lib/rancher/agent
2022-09-19T08:36:16.218658450Z [WARN]  /usr/local is read-only or a mount point; installing to /opt/rancher-system-agent
2022-09-19T08:36:31.600918129Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.
2022-09-19T08:36:52.081757796Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.
2022-09-19T08:37:12.565070754Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.
2022-09-19T08:37:33.042196553Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.
2022-09-19T08:37:53.528619959Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.
2022-09-19T08:38:14.002510749Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.
2022-09-19T08:38:34.481101439Z [ERROR]  Error while connecting to Rancher to verify CA necessity. Sleeping for 5 seconds and trying again.

Hi @bashofmann, we have spotted the root cause. This is particularly triggered by the http proxy settings. The readiness probe tries to hit the endpoint with HTTP GET request, and the request is being proxied by the proxy server, which is not able to access the repo VM, so the readiness probe fails again and again.
We set up a Squid server and a Harvester v1.0.2 VM with http(s)-server pointed to the Squid server. After triggering the upgrade to v1.0.3, we can see the logs from the access.log of the Squid server:

And the readiness fails, hence the repo VM can't start normally:

To work around this in the user's current environment, harvester-system needs to be added into the noProxy setting like the following:

We will also append harvester-system to the user configured no-proxy to ensure the internal traffic works, just like #2436.

Test plan 1
Setup airgapped environment with proxy server, do not set the no proxy attribute in Harvester http-proxy
And perform upgrade according to https://github.com/harvester/harvester/pull/2808#issue-1381869632
The purpose is testing whether Harvester can automatically add the no proxy settings.
Test plan 2
Setup airgapped environment with proxy server, set the related no proxy attribute in Harvester http-proxy
And integrate Harvester to Rancher according to the existing test plan https://harvester.github.io/tests/manual/harvester-rancher/38-import-airgapped-harvester-from-airgapped-rancher/

Discussed we will verify this issue on v1.1 head.
Move to ready for testing and verify after related PR https://github.com/harvester/harvester/pull/3296 have been merged

Test Plan 1 result: Failed

By adding the following proxy settings in Harvester (did not include no proxy value)

{
  "httpProxy": "http://<IP_ADDRESS>:3128",
  "httpsProxy": "http://<IP_ADDRESS>:3128",
}

Then atart upgrade from v1.1 master to v1.1 master

We did not encounter the vm display unhealthy status

But we failed to upgrade, stuck at Upgrading node with error `Job was active longer than specific deadline

Found the upgrade pod encounter ImagePullBackOff error

Support bundle:
supportbundle_7caabd91-015c-4d35-b858-c934eecd0316_2022-12-21T14-24-27Z.zip

Trying to add no proxy settings back and rerun the test plan 1.

For dev build only, we need to update the upgrade image to the required name
ctr -n k8s.io i tag docker.io/rancher/harvester-upgrade:26c395ac docker.io/rancher/harvester-upgrade:v1.1-26c395ac-head

And set the following proxy setting
{
  "httpProxy": "http://<IP_ADDRESS>:3128",
  "httpsProxy": "http://<IP_ADDRESS>:3128",
  "noProxy": "localhost,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>/8,cattle-system.svc,<IP_ADDRESS>/16,.svc,.cluster.local,example.com, cattle-system, longhorn-system"
}

Then we can successfully complete the Harvester upgrade

Verified fixed on v1.1-26c395ac-head .Close this issue.
Result

Pass the test plan 1 as result: https://github.com/harvester/harvester/issues/2782#issuecomment-1362525952
Pass the test plan 2 as result: https://github.com/harvester/harvester/issues/2782#issuecomment-1362755325

Test Information

Test Environment: 1 node Harvester on local kvm machine
Harvester version: v1.1-26c395ac-head
Rancher version: v2.7.0

Verify Steps
Test plan 1: https://github.com/harvester/harvester/pull/2808#issue-1381869632
Test plan 2: https://github.com/harvester/harvester/issues/1052#issuecomment-997620981
Additional Context
Please remember to use the following docker script to startup Rancher container instance with proxy support
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 -e HTTP_PROXY="http://<IP_ADDRESS>:3128" -e HTTPS_PROXY="http://<IP_ADDRESS>:3128" -e NO_PROXY="localhost,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>/8,cattle-system.svc,<IP_ADDRESS>/16,.svc,.cluster.local,example.com, cattle-system, longhorn-system, harvester-system" --privileged rancher/rancher:v2.7.0