Modify the built in token service to include Custom Headers/Body

Hello,
I'd like to modify the currently implemented Auth services in Nebular to include headers of my own, which files should I modify to include simple Username/Password JWT? I couldn't modify the currently EmailPassowrdAuthService to includea simple username and password auth.
I couldn't find the Token body being used even to send to my Auth api end point. Which auth modules should I configure in this case?

As I've read in other questions similar to this it seems as though the suggested route is to copy and paste the auth folder in the nebular git repo into your own project and import your new copied auth components into your modules instead of theirs. This way you can make the types of changes you need.
I did this and it's working fine. It's obviously not ideal but works.

I don't know if this issue is still relevant, but here is something you could do :
export class EmailPassAuthProvider extends NbEmailPassAuthProvider {
    refreshToken(): Observable<NbAuthResult> {
        const method = this.getConfigValue('login.method');
        const url = this.getActionEndpoint('login') + '/refresh';

        //TODO: Add your headers right here

        return this.http.request(method, url, {body: {}, observe: 'response'})
            .pipe(
                map((res) => {
                    if (this.getConfigValue('login.alwaysFail')) {
                        throw this.createFailResponse();
                    }

                    return res;
                }),
                this.validateToken('refreshToken'),
                map((res) => {
                    return new NbAuthResult(
                        true,
                        res,
                        null, //Don't redirect
                        [],
                        this.getConfigValue('messages.getter')('refreshToken', res),
                        this.getConfigValue('token.getter')('refreshToken', res));
                }),
                catchError((res) => {
                    let errors = [];
                    if (res instanceof HttpErrorResponse) {
                        errors = this.getConfigValue('errors.getter')('refreshToken', res);
                    } else {
                        errors.push('Something went wrong.');
                    }

                    return observableOf(
                        new NbAuthResult(
                            false,
                            res,
                            null, //Don't redirect
                            errors,
                        ));
                }),
            );
    }
}

Of course, you will have to modify the module to use your own instance of the provider
...NbAuthModule.forRoot({
    providers: {
        email: {
            service: EmailPassAuthProvider, //Use our own provider
            config: {
                //TODO: Add you own config
            },
        },
    },
    forms: {
        //TODO: Add your own forms
    },
}).providers,

In my opinion this is much more clean and future-proof than copying the whole source code over.

Did not work on the latest release of nebular, any changes done to auth are not appearing on the html of the components. I made sure to add the EmailPassAuthProvider in app.module.ts as well

I did copy them, should there be any other modifications? the folder is
from /frameworks/auth
On Thu, May 3, 2018, 7:07 PM Gabriel<EMAIL_ADDRESS>wrote:

As I said, the html of the components need to be copied if you want to
modify them
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/akveo/ngx-admin/issues/1387#issuecomment-386348420,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQZmu_BJBHZQBlcTAoDg-U1-AXiAB1s-ks5tuysrgaJpZM4QZdm2
.

@Safo91 did you change the components in app-routing.module.ts? By default it's something like this :
path: 'auth',
component: NbAuthComponent,
children: [
  {
    path: '',
    component: NbLoginComponent,
  },
  {
    path: 'login',
    component: NbLoginComponent,
  },
  {
    path: 'register',
    component: NbRegisterComponent,
  },
  {
    path: 'logout',
    component: NbLogoutComponent,
  },
  {
    path: 'request-password',
    component: NbRequestPasswordComponent,
  },
  {
    path: 'reset-password',
    component: NbResetPasswordComponent,
  },
],

You should change it to the name of your own components. For example :
{
  path: 'login',
  component: CustomLoginComponent,
},

What do you mean by "just rename the login component"?
As for calling your backend, refer to the nebular documentation on configuring a provider

What I meant is I just want to slightly modify the login html thats already
in nebular  I couldn't find the sources to edit it.Other issues suggested I
copy over the sources from framework/auth over to my project and simply
edit them, however this wasn't working for me. I will elaborate in further
detail and provide step by step reproduction
On Thu, May 3, 2018, 9:36 PM Gabriel<EMAIL_ADDRESS>wrote:

What do you mean by "just rename the login component"?
As for calling your backend, refer to the nebular documentation on configuring
a provider
https://akveo.github.io/nebular/#/docs/auth/configuring-a-provider
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/akveo/ngx-admin/issues/1387#issuecomment-386394713,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQZmu44t8V7l-ipIeh0nrjT14N18PtfXks5tu04QgaJpZM4QZdm2
.

How do you edit the auth pages provided by nebular without renaming the components? I tried pointing the import to folder rather than @nebular/auth, but the changes aren't applying still

@Safo91 can you provide some of your code? It's really hard to pinpoint what the problem may be. Can you also clarify what exactly is not working?

Its a vanilla copy of nebular with the auth folder copied over from the sources (from the link you gave me), I just want to edit the html of the login page. Are there any changes I should do in app.module.ts or routing.module.ts to change? Anytime I point the routing module to the copied over folder I get this error:
Uncaught Error: Component NbAuthComponent is not part of any NgModule or the module has not been imported into your module.
how I import the auth modules:
app.routing.module.ts
`
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import {
NbAuthComponent,
NbLoginComponent,
NbLogoutComponent,
NbRegisterComponent,
NbRequestPasswordComponent,
NbResetPasswordComponent,
} from './@theme/components/auth/'
const routes: Routes = [
{ path: 'pages', loadChildren: 'app/pages/pages.module#PagesModule' },
{
path: 'auth',
component: NbAuthComponent,
children: [
{
path: '',
component: NbLoginComponent,
},
{
path: 'login',
component: NbLoginComponent,
},
{
path: 'register',
component: NbRegisterComponent,
},
{
path: 'logout',
component: NbLogoutComponent,
},
{
path: 'request-password',
component: NbRequestPasswordComponent,
},
{
path: 'reset-password',
component: NbResetPasswordComponent,
},
],
},
{ path: '', redirectTo: 'pages', pathMatch: 'full' },
{ path: '**', redirectTo: 'pages' },
];
const config: ExtraOptions = {
useHash: true,
};
@NgModule({
imports: [RouterModule.forRoot(routes, config)],
exports: [RouterModule],
})
export class AppRoutingModule {
}
`
its really just editing the built-in nebular login page, nothing more.

Alright, I went ahead and deleted the auth folder except for the login page which I wanted to edit, however now im facing an error with the auth module. I'm getting this error:

Uncaught Error: Template parse errors:
Can't bind to 'routerLink' since it isn't a known property of 'a'. ("r *ngFor="let socialLink of socialLinks">
<a *ngIf="socialLink.link"
[ERROR ->][routerLink]="socialLink.link"
[attr.target]="socialLink.target"
[a"): ng:///ThemeModule/NgxLoginComponent.html@74:17
'nb-auth-block' is not a known element:

If 'nb-auth-block' is an Angular component, then verify that it is part of this module.
If 'nb-auth-block' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the<EMAIL_ADDRESS>of this component to suppress this message. ("

this is within login.component.ts template html  not being part of the module.
here is my theme.module.ts
`
import { ModuleWithProviders, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

import {
  NbActionsModule,
  NbCardModule,
  NbLayoutModule,
  NbMenuModule,
  NbRouteTabsetModule,
  NbSearchModule,
  NbSidebarModule,
  NbTabsetModule,
  NbThemeModule,
  NbUserModule,
  NbCheckboxModule,
  NbPopoverModule,
  NbContextMenuModule,
} from '@nebular/theme';

import {
  NbAuthComponent,
  // Notice you have to remove NbLoginComponent from here
  NbLogoutComponent,
  NbRegisterComponent,
  NbRequestPasswordComponent,
  NbResetPasswordComponent,
} from '@nebular/auth';

import { NgxLoginComponent } from './components/auth/components/login/login.component';

import { NbSecurityModule } from '@nebular/security';

import {
  FooterComponent,
  HeaderComponent,
  SearchInputComponent,
  ThemeSettingsComponent,
  ThemeSwitcherComponent,
  TinyMCEComponent,
} from './components';
import { CapitalizePipe, PluralPipe, RoundPipe, TimingPipe } from './pipes';
import {
  OneColumnLayoutComponent,
  SampleLayoutComponent,
  ThreeColumnsLayoutComponent,
  TwoColumnsLayoutComponent,
} from './layouts';
import { DEFAULT_THEME } from './styles/theme.default';
import { COSMIC_THEME } from './styles/theme.cosmic';

const BASE_MODULES = [CommonModule, FormsModule, ReactiveFormsModule];

const NB_MODULES = [
  NbCardModule,
  NbLayoutModule,
  NbTabsetModule,
  NbRouteTabsetModule,
  NbMenuModule,
  NbUserModule,
  NbActionsModule,
  NbSearchModule,
  NbSidebarModule,
  NbCheckboxModule,
  NbPopoverModule,
  NbContextMenuModule,
  NgbModule,
  NbSecurityModule, // *nbIsGranted directive
];

const COMPONENTS = [
  ThemeSwitcherComponent,
  HeaderComponent,
  FooterComponent,
  SearchInputComponent,
  ThemeSettingsComponent,
  TinyMCEComponent,
  OneColumnLayoutComponent,
  SampleLayoutComponent,
  ThreeColumnsLayoutComponent,
  TwoColumnsLayoutComponent,
];

const PIPES = [
  CapitalizePipe,
  PluralPipe,
  RoundPipe,
  TimingPipe,
];

const NB_THEME_PROVIDERS = [
  ...NbThemeModule.forRoot(
    {
      name: 'cosmic',
    },
    [ DEFAULT_THEME, COSMIC_THEME ],
  ).providers,
  ...NbSidebarModule.forRoot().providers,
  ...NbMenuModule.forRoot().providers,
];

@NgModule({
  imports: [...BASE_MODULES, ...NB_MODULES],
  exports: [...BASE_MODULES, ...NB_MODULES, ...COMPONENTS, ...PIPES],
  declarations: [...COMPONENTS, NgxLoginComponent, ...PIPES],
})
export class ThemeModule {
  static forRoot(): ModuleWithProviders {
    return <ModuleWithProviders>{
      ngModule: ThemeModule,
      providers: [...NB_THEME_PROVIDERS],
    };
  }
}
`

app.routing.module.ts
`import { NgxLoginComponent } from<EMAIL_ADDRESS>import { ExtraOptions, RouterModule, Routes } from '@angular/router';
import { NgModule } from '@angular/core';
import {
  NbAuthComponent,
  // NbLoginComponent,
  NbLogoutComponent,
  NbRegisterComponent,
  NbRequestPasswordComponent,
  NbResetPasswordComponent,
} from '@nebular/auth';

const routes: Routes = [
  { path: 'pages', loadChildren: 'app/pages/pages.module#PagesModule' },
  {
    path: 'auth',
    component: NbAuthComponent,
    children: [
      {
        path: '',
        component: NgxLoginComponent,
      },
      {
        path: 'login',
        component: NgxLoginComponent,
      },
      {
        path: 'register',
        component: NbRegisterComponent,
      },
      {
        path: 'logout',
        component: NbLogoutComponent,
      },
      {
        path: 'request-password',
        component: NbRequestPasswordComponent,
      },
      {
        path: 'reset-password',
        component: NbResetPasswordComponent,
      },
    ],
  },
  { path: '', redirectTo: 'pages', pathMatch: 'full' },
  { path: '**', redirectTo: 'pages' },
];

const config: ExtraOptions = {
  useHash: true,
};

@NgModule({
  imports: [RouterModule.forRoot(routes, config)],
  exports: [RouterModule],
})
export class AppRoutingModule {
}
`

any other files that require changes to just change the login.html/login component? copying the sources over and editing them is not applying any changes whatsoever.
thank you for the answers btw!

@dizco I attempted all your suggested changes and still get an issue with NbAuthModule whenever I copy over the login component from frameworks/auth/components, and then reference it in the theme.module.ts file + app-routing modules. can you provide a step by step on how to import a single component from the auth folder to a clean install of nebular? thank you!

Hey @Safo91 I'm sorry I've been really busy and probably will be for a couple of weeks, so I don't have time to provide step by step... but if you set up a plunkr or something where I can test a couple of things that could really make it easier

alright, I'll see what I can do. thanks again!

I have the same issue @Safo91  could you solve it?


[10.0-pos_order_note] Predefined notes not being sent to Kitchen

Just the notes that are written are being sent to the kitchen, the predefined notes are just shown in the orderlines screen, but not sent.
Also, after an orderline has been sent to the kitchen, and I write a note in the textbox, the "Order" button highlights in green, but this does not happen with the predefined notes.
Nice to have: If a predefined note has not been sent, show it in green. If it has been sent, show it in black (default color being used now).
cc: @yelizariev

I confirm this issue, also, the note doesn't propagate to other multisession

hello @gustavovalverde , @dhecar you can chek the PR https://github.com/it-projects-llc/pos-addons/pull/358

Just an FYI, as this is not working yet on my side.


Is it possible to use inheritance if there are no fields involved?

Good afternoon.
I was wondering if it is possible to allow some form of inheritance if fields are not involved. I have the following example code:
// BaseConfig<T> provides a Load and Save functions for easy reusability / pre-processing before calling rfl functions
struct PatchNoteConfig : BaseConfig<PatchNoteConfig>
{
    PatchNoteConfig() : BaseConfig("patch_notes.yml", false) {}

    std::string url = "http://localhost:8080/notes.md";
    bool sortPatchNotes = true;
};

In this example, BaseConfig simply defines some functions for some code reuse, but it contains no fields directly. I assume that this fails due to the std::is_aggregate_v call failing, but I imagine that if read_struct was called, it would probably work? Would it be possible for us to reflect on structs that have no fields and a parameterless constructor?

It is.
The catch is that it is deactivated by default, because it increases compile time:
https://rfl.getml.com/c_arrays_and_inheritance/


hello，how I run my own dataset？

When i try run own dataset，this error appears：dataset name  is not in the dataset registry'

Hi, you need to add @DATASETS.register_module() before your own dataset class to register the dataset. Just like this line

Yes，I write this line，but this error also appears。

Double-check the dataset name in cfgs/dataset_configs/your_dataset_config for any errors, this is all the advice I can provide.

In init.py,I didn't import the dataset.py


not support url params in route?

version of docz: 0.10.3
In my .mdx file the config is
---
name: models
route: /model/:id
---

When I enter http://localhost:3000/model/12, the browser renders what I exactly want. However, when I click the menu of the sidebar, the url changes to http://localhost:3000/model/:id#whateveris not the original http://localhost:3000/model/12 following anchor #whateveris.
So currently docz not support url params?

Docz works with absolute to title and hash to subtitle. For what do you wanna to use params? What do you think about? Tell me 🙂


Add support for persistent connections

This adds support for persistent connections for the Interbase driver (supported via ibase_pconnect)

Looking at the diff, this modification and cleanup obviously created many not visible changes g
BTW..., after the new protected $persistent attribute there is an empty doc-block now. Did you reserve this space for something?
And many thanks for all the improvments you provide. I hope firebird will finally find it's way in the head.
Andreas

Hi Andreas.
I've reset the commits to one without formatting the entire file, and removed the empty doc-block (it had no purpose, sorry).
If you are aware of any outstanding issues that needs to be solved before this can be merged back into the Doctrine project, you can open them as issues and I'll gladly help out.
Thanks for your input and the work you put into this implementation.
// Daniel


Breaking change to argument parsing in Weave was not tagged as a breaking change

See https://buildkite.com/julialang/scimlbenchmarks-dot-jl/builds/85#d245dbcd-7d88-4272-9409-70ad5b3626e7/147-231
https://github.com/SciML/SciMLBenchmarks.jl/blob/0a725726e0a62de00d94d880502c7712ae310771/benchmarks/test.jmd
That form julia{echo=false} was accepted for years, but now has been removed without a breaking release. That should get reverted.

Fixed in 0.10.8.


Swift crash in NSAttributedString+Adapt.swift

There's a swift crash when building release. Need to determine a workaround.
https://dashboard.buddybuild.com/apps/5723679e7b69200100ba4c35/build/57e9335cae25ca010032434c#logs

I think this must be an intermittent swift bug that was flushed out some how. I don't see this anymore, and CI is building everything fine. Closing


Eliminate "devices cannot be modified after being initialized"

This one line was preventing all imports from being at the top in agent.py
Somehow, using tf.constant(1) (in a function that's not even called yet) initializes the GPU.

Replaced by https://github.com/neureal/neureal-ai-util/commit/55eda72838efdd2828891da7c72177ec4bd4e20d


Play source outside of Main bundle directory

I have an issue trying to play a video that I recorded, the file is outside of the mainBundle directory and so the player can't of course find the file.
The issue is related to that code:
NSURL *url = (isNetwork || isAsset) ?
    [NSURL URLWithString:uri] :
    [[NSURL alloc] initFileURLWithPath:[[NSBundle mainBundle] pathForResource:uri ofType:type]];

A solution would be to override the isNetwork property, but unfortunately impossible on the js side, I think the variable is initialized by React.
@brentvatne do you have any idea ? We could maybe create a prop to force the use of URLWithString
Thanks,

Makes sense, this seems like it would be very useful. We can add an isStatic option to the source object. Do you have time to submit a PR for it?

Sure, but it's not possible to add any property on the source object, I guess React filter the properties.

Looks like this needs closing? Re: https://github.com/brentvatne/react-native-video/pull/54

Yup :smile: Thanks


Add a way to set resource config through pcf configure

Added for Ops Manager 1.8 in 08fa9ea. Won't fix for Ops Manager 1.7 or earlier unless there is an urgent need.


Python 3 compatibility

simple change to allow python3 compatibility

If you look on line 39 you see sio = StringIO.StringIO(stat).
According to the python six documentation (and my own experiments)
six.StringIO
This is an fake file object for textual data. It’s an alias for StringIO.StringIO in Python 2 and io.StringIO in Python 3.

So you are changing StringIO to mean the class in the module instead of the module it meant before.  Since you are also not changing leaving line 39 the same, this breaks the code.
We end up with an error similar to the following:
AttributeError: class StringIO has no attribute 'StringIO'

Previous commit with python3:
 File "/home/miguel/Sandbox/zookeeper_dashboard/zookeeper_dashboard/zkadmin/models.py", line 2, in <module>     import StringIO ImportError: No module named 'StringIO'

I understand why it is breaking in python3.  I am saying that your proposed change does not fix the issue.  It allows you to import, but a new runtime error is introduced, because StringIO no longer references to the module StringIO. Using six, StringIO refers to the class StringIO (from either StringIo or Io).  To fix this, you need to change line 39 from
sio = StringIO.StringIO(stat)

to
sio = StringIO(stat)

Sorry, I misunderstood you!

Great!  Thanks for the contribution, will merge now.


Implement API compatibility with serial LCD drivers

Try to make the driver as much of a drop-in replacement for Parallax's Serial_Lcd.spin (or display.lcd.serial.spin equivalent) driver as possible, so that a developer wishing to migrate their project from LCD to OLED will have less difficulty doing so.

Some of this has been implemented in the testing branch - aliases to existing equivalent methods were created (code is duplicated instead of simply calling the existing methods, so if only one of the two is used, unused code elimination will actually eliminate unused code). Custom characters, and handling of some of the control characters used in the LCD object haven't been implemented yet.

This was planned at a time when the spin-standard-library didn't have a clear mission/focus. display.lcd.serial.spin was, at the time, a 1:1 copy of the original Parallax Serial_Lcd.spin object. Writing this driver to mimic it wouldn't make sense. Instead, the display.lcd.serial.spin driver was updated/rewritten to current more unified standards in the S-S-L display API.


Fix onTimeout params

I was testing this library and happened to notice that onTimeout params were not logging properly.
Check out if this makes any sense.

Thank you for your contribution! This indeed looks like an error on our part, and something that should be checked in the tests.
Could you add a test case that fails without your change and passes with your change?


When running the A-Frame location-based sample code in React, errors occur.

Do you want to request a feature or report a bug?
bug

What is the current behavior?
I am developing based on the A-Frame location based sample code using React, but I am getting an error when I run it on the device. I am not familiar with web programming, so I am not sure if this is a bug or if I am doing something wrong. To resolve the issue, I received the AR.js source and made a few modifications and now it works without errors.
The errors are:

THREEx is not defined

Math.radToDeg, Math.degToRad

The development environment and source are as follows:

Environment set up with Webpack following the guide on the AR.js home page in React.

List of packages used.

Source code sample that causes the error.

Modifications to the AR.js source:

Changed "import { Math as MathUtils } from "three"" to "import { Math as MathUtils } from "three""

Changed "THREE.Math" to "THREE.MathUtils"

Affected code is listed in the following list:

AR.js/aframe/dist/main.js
AR.js/three.js/src/threex/threex-arvideoinwebgl.js
AR.js/three.js/src/location-based/js/location-based.js
AR.js/three.js/src/location-based/js/lb.js
AR.js/aframe/src/location-based/gps-projected-camera.js
AR.js/aframe/src/location-based/gps-camera.js
AR.js/aframe/src/new-location-based/gps-new-entity-place.js
AR.js/aframe/src/location-based/ArjsDeviceOrientationControls.js

I hope to confirm whether this is a bug and incorporate it into an update.
If the current behavior is a bug, please provide the steps to reproduce.

Please mention other relevant information such as the browser version, Operating System and Device Name
What is the expected behavior?
If this is a feature request, what is motivation or use case for changing the behavior?

Not sure what the problem is but will try and investigate it.
Do you use create-react-app or write your own build script? If the latter, do you have your package.json?

"I am using a project created using 'Create React App.

Thanks - will take a look if I have a moment.

This is happening to me also with the three.js location based example.
When using the A-Frame location based example it does not happen:
ar-threex-location-only.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'degToRad')
    at i._haversineDist (ar-threex-location-only.js:1:3291)
    at i._gpsReceived (ar-threex-location-only.js:1:2957)
    at ar-threex-location-only.js:1:1989

Strange, I don't get that with the three location-based example but will have a look.

I've created a gist with the code:
https://gist.github.com/miqmago/e1430405b34d384dec5fd393d6ee3ded
This is meant to be useed in a stencil 3.0.1 component.

FYI - I am getting this also - but only on my mobile device, the browser on my PC works...

@Hyeonoo-Park it looks like you have made additional changes, additional to those in @GordonSmith's PR.
Do you want to submit a PR for your other changes?

The same problem occurs in v3.4.4.
I made a sample project and submitted a PR for the code I modified.
https://github.com/Hyeonoo-Park/react-ar-js-test

@Hyeonoo-Park i merged the fix for MathUtils from #523 #532 in the master branch now, It should be fine but can you test and tell me if it is ok?

"I'm sorry, it still hasn't been fixed. To run the React A-Frame code without errors, you need to add the following code to arjs-device-orientation-control.js."
Error!

Fix:  arjs-device-orientation-controls.js
import * as THREEx from "../../../three.js/build/ar-threex-location-only.js";

This is the entry code for a React component that uses A-Frame.
import React from "react";
import<EMAIL_ADDRESS>import "../components/avatar/a-character-gps";

import modelAvatar from "../avatar/svravatar.json";

function ArLBSAFrame() {
  return (
    <a-scene vr-mode-ui="enabled: false;" renderer="antialias: true; alpha: true" arjs='sourceType: webcam; videoTexture: false; debugUIEnabled: false'>
    <a-camera gps-new-camera='gpsMinDistance: 5'></a-camera>
    <a-entity id='character-gps' character-gps={JSON.stringify(modelAvatar)}  gps-new-entity-place="longitude: 100, latitude: 30"></a-entity>
    </a-scene>
  );
}

export default ArLBSAFrame;

Hi, I got the same error THREEx is not defined with a similar setup and am not using three.js, just a-frame. I will try to adapt the solution import * as THREEx from "../../../three.js/build/ar-threex-location-only.js"; by also including that file... but that seems like it shouldn't be necessary?
full error: https://gist.github.com/jywarren/c3f0670903e0595f1f37ae33be202837
which I believe leads to this line:
https://github.com/AR-js-org/AR.js/blob/e2f2893a7e0af8853687d34ca0aee7edf5321e9b/aframe/src/new-location-based/arjs-device-orientation-controls.js#L25
Shouldn't it be possible to not use any threejs code? Thank you!

Also, including the same file just above the aframe script worked for me:
     <script src="https://raw.githack.com/AR-js-org/AR.js/master/three.js/build/ar-threex-location-only.js">
     <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js">

I was using Nuxt3 and had the same problem, but I solved it by specifying version 3.4.5 with reference to the following ISSUE.
https://github.com/AR-js-org/AR.js/issues/538#issuecomment-1544316282
<script type="text/javascript" src="https://aframe.io/releases/1.6.0/aframe.min.js" ></script>
<script type="text/javascript" src="https://www.unpkg.com/<EMAIL_ADDRESS>></script>
<script type="text/javascript" src="https://www.unpkg.com/<EMAIL_ADDRESS>

@jywarren not sure if this is what you meant by "Shouldn't it be possible to not use any threejs code?" but the current A-Frame location-based code uses functionality from the three.js location-based code to avoid code duplication.
PR #563 might fix it, I haven't had time to work on AR.js for a while but might get the chance to test it.

This is also discussed in #538, try downgrading to 3.4.4.


B2 Backblaze connection refused part way through backup

Output of restic version
debug enabled
restic 0.9.5 (604b18aa) compiled with go1.10.4 on linux/amd64
How did you run restic exactly?

$ restic --cleanup-cache --option b2.connections=30 backup --exclude-caches --exclude /dev --exclude /proc --exclude /net --exclude /run --exclude /sys --exclude /mnt/sshfs --exclude /var/lib/lxcfs --exclude-file=/etc/restic/exclude.list /

What backend/server/service did you use to store the repository?
Backblaze B2
Expected behavior

Backup should finish.
Actual behavior

I get this repeated in the logs:

2019/10/04 10:29:30 debug/round_tripper_debug.go:82     debug.loggingRoundTripper.RoundTrip     185     RoundTrip() returned error: dial tcp <IP_ADDRESS>:443: connect: connection refused
2019/10/04 10:29:31 debug/round_tripper_debug.go:77     debug.loggingRoundTripper.RoundTrip     185     ------------  HTTP REQUEST -----------
POST /b2api/v1/b2_upload_file/5dbeb941b946af20614b0d16/c001_v0001017_t0025 HTTP/1.1
Host: pod-000-1017-10.backblaze.com
User-Agent: blazer/0.5.3
Content-Length: 5295953
Authorization: 4_001de9196f01bd60000000000_018f55f1_62367b_upld_ImYhg1oGmvOuVShmHMHtdBobGRE=
Content-Type: application/octet-stream
X-Blazer-Method: b2_upload_file
X-Blazer-Request-Id: 13186
X-Bz-Content-Sha1: hex_digits_at_end
X-Bz-File-Name: data/eb/eb0242e8299e64afd1f3130286dd86bb25fb278678c9fcf5a8e4810f8b967228
Accept-Encoding: gzip

Steps to reproduce the behavior
Run a backup to B2.

Do you have any idea what may have caused this?
Nope.
Do you have an idea how to solve the issue?
Nope.
Did restic help you or made you happy in any way?

Restic is the ONLY backup tool I use on my Linux Dev server!

If it helps, when I do not set DEBUG_LOG to a file (aka disable "debug mode") it seems to be OK,
Restic is built with the following command:

$ go run build.go -tags debug

Closing this issue as it's quite old and has probably solved itself in the meantime. Feel free to complain if the issue still exists.


bump semver range version, fix ambiguity with throw

fixes #68
fixes part of #62, namely the fix to semver-range bug which prevented some version ranges from matching correctly. But circular dependencies issues remain as todo.

cc @gilligan

@adnelson cool thanks. I had tried and failed to build nixfromnpm just the other day- will try again with this change ;)


Fade Out

Hello,
If you need to hide elements or if you are looking for a fadeout add this in aos.css:
[data-aos^=hide][data-aos^=hide] {
    opacity: 1;
    transition-property: opacity, transform
}

[data-aos^=hide][data-aos^=hide].aos-animate {
    opacity: 0;
    transform: translate(0)
}

and use like a normal animation with: data-aos="hide"
Hope @michalsnik could add this in the main repo. 🎉

Hey @mungle, I think this is not as common scenario that I should put it in repository. If anyone needs it - this can be easily added in application's styles based on the example in README :)

@michalsnik It would be awesome if you added a simple way for this to be added. For example, if one item that was faded in got to a certain point where it was not required anymore, then it would fade out.


Add migration instruction for deprecated apis

ReferenceConfig.setApplication is    @Deprecated
how to set name?

Please assign it to me

@hqgordon , Hi, You can use another method,
AbstractInterfaceConfig#setScopeModel(ScopeModel) To replace the existing setApplication() method,
The usage example is as follows:
... ApplicationConfig applicationConfig = new ApplicationConfig("name"); ApplicationModel applicationModel = new ApplicationModel(FrameworkModel.defaultModel()); applicationModel.getApplicationConfigManager().setApplication(applicationConfig); referenceConfig.setScopeModel(new ModuleModel(applicationModel)); ...


Use temporary directory to store image when sharing on Windows

Currently, the getTemporaryDirectory() method from path_provider is not supported on Windows.  Issue https://github.com/flutter/flutter/issues/105386
So, as for now we will use Document directory (same directory to store Hive data)

This issue is fixed on upstream. The app now can use (and already implemented) Windows temp path.


Update Config files!!!

It's a big project but you can look at my .gitignore on my repo  and also CCOSTAN's Repo as I borrowed a lot from his .gitignore. If you need any help feel free to let me know :)

DrZzs config files are available at
https://github.com/Snipercaine/home_assistant_config
So this repo can be safely archived or deleted. Also you may want to pin your new home assistant configuration repo to your profile page to make it easier to find


Cleaned up the spacing between the Select and Deselect buttons in multiple file select panel

Changes proposed in this pull request:

Cleaned up the spacing between the Select and Deselect buttons in multiple file select panel.

Before:

After:

I had to fix flaky tests in sort.spec by removing cy.reload() to get the CI check to pass.


OIDC Implementation: Missing state Parameter

I cannot use my OIDC provider (Authelia) because LubeLogger is not including a &state=something parameter in the request URL.
Additional reading:

https://auth0.com/docs/secure/attack-protection/state-parameters
https://stackoverflow.com/questions/35165793/what-attack-does-the-state-parameter-in-openid-connect-server-flow-prevent
https://github.com/authelia/authelia/issues/5566

I'll probably release a fix for this next week

This is scheduled to be released tomorrow(25/2).

Released in 1.2.3
LubeLogger will now generate a state token and pass it onto the IdP; however, I have set it to not validate the state echoed back by default since it will break IdP-initiated sessions. You can enable state validation by adding an environment variable, see OpenID Authentication in LubeLogger

@wkeiuluf do you have any console errors?

we don't log the JWT / JSON response from the OpenID Provider for security reasons. I don't have any experience with Authelia so I can't really troubleshoot this.

Does LL make a POST request to the Token URL of your Authelia instance? I'm not sure if Authelia logs this, but that will be a good place to start.

I also have not gotten Authelia to work with LubeLogger.  When I select the Login with Authelia button, I'm taken to authelia and given the option to authorize lubelogger.  I'm then redirected to the login page, but nothing further happens.  I use the same endpoints with Audio book shelf with no issues.
My authelia client section:
    - client_id: lube
      client_name: LubeLogger
      client_secret: 'secret'
      public: false
      authorization_policy: two_factor
      pre_configured_consent_duration: 1M
      scopes:
        - openid
        - email
        - profile
      grant_types:
        - 'authorization_code'
      redirect_uris:
        - https://lube.xxxxxx.cc/Login/RemoteAuth
      userinfo_signed_response_alg: none
      token_endpoint_auth_method: 'client_secret_post'

My lubelogger compose.yml:
version: "3.4"
services:
  app:
    image: ghcr.io/hargata/lubelogger:latest
    build: .
    restart: unless-stopped
    # volumes used to keep data persistent
    volumes:
      - config:/App/config
      - data:/App/data
      - translations:/App/wwwroot/translations
      - documents:/App/wwwroot/documents
      - images:/App/wwwroot/images
      - temp:/App/wwwroot/temp
      - log:/App/log
      - keys:/root/.aspnet/DataProtection-Keys
    # expose port and/or use serving via traefik
    ports:
      - 5230:8080
    environment:
      - OpenIDConfig__Name=Authelia
      - OpenIDConfig__ClientId=lube
      - OpenIDConfig__ClientSecret=secret
      - OpenIDConfig__AuthURL=https://auth.xxxxx.cc/api/oidc/authorization
      - OpenIDConfig__TokenURL=https://auth.xxxxx.cc/api/oidc/token
      - OpenIDConfig__RedirectURL=https://lube.xxxxx.cc/Login/RemoteAuth
      - OpenIDConfig__Scope=email
      - OpenIDConfig__ValidateState=true
      - OpenIDConfig__DisableRegularLogin=false
      - OpenIDConfig__LogOutURL=https://auth.xxxxx.cc/api/oidc/logout
    env_file:
      - .env
    networks:
      - network1
networks:
  network1:
    name: proxynet
    external: true
volumes:
  config: null
  data: null
  translations: null
  documents: null
  images: null
  temp: null
  log: null
  keys: null

I'm having this same issue too. It seems to be trying to validate the authorization code response and not using it as the code?
Lubelogger logs
lubelogger  | info: CarCareTracker.Controllers.LoginController[0]
lubelogger  |       OpenID Provider did not provide a valid id_token
lubelogger  | fail: CarCareTracker.Controllers.LoginController[0]
lubelogger  |       Expected id_token, received {"access_token":"authelia_at_xxxxxxx","expires_in":28800,"scope":"email","token_type":"bearer"}

Testing the same config with https://openidconnect.net seems to work fine.

For anyone else that comes across this. Google must be automatically returning the right scope, but following the documented env vars was not enough for Authelia. Turning on trace logs in Authelia led me to the right path that it was missing the openid scope.
Make sure your env var is like this:
OpenIDConfig__Scope="openid email"

@chriscarpenter12
Thanks, added to the troubleshooting docs


Uncaught TypeError

I'm having trouble getting the plugin to save videos with 0.2.0.... I keep getting an Uncaught TypeError. I can search for videos fine, but trying to save brings up this error:
Uncaught TypeError: Cannot read property 'id' of undefined  EmbeddedAssets.js:49
This is on a localhost (WAMP) server, Craft 2.5.2761
Thanks!

Thanks for reporting! Seems like 0.2.0 is having quite a few issues. What browser are you using?

Hi, using Chrome 48.0.2564.103 on Win 7. Haven’t tested Firefox or IE yet.
Thanks for replying though, very cool plugin.
From: Benjamin Fleming<EMAIL_ADDRESS>Sent: Monday, February 08, 2016 9:29 PM
To: benjamminf/craft-embedded-assets<EMAIL_ADDRESS>Cc: Briggs, Joseph<EMAIL_ADDRESS>Subject: Re: [craft-embedded-assets] Uncaught TypeError (#10)
Thanks for reporting! Seems like 0.2.0 is having quite a few issues. What browser are you using?
—
Reply to this email directly or view it on GitHubhttps://github.com/benjamminf/craft-embedded-assets/issues/10#issuecomment-181690117.

Looking into this, it seems like adding the embedded asset is failing at some point, and that failure is not being picked up. I've implemented better error checking and reporting so hopefully this will solve your issue.


Fix subunit2junitxml output

I started to be embarrassed because of the long list of small fixes that I should have tested previously.
At least the html report is working :) https://ci.opensuse.org/view/OpenStack/job/openstack-devstack-ipv4/36/artifact/results.html
I apologize, but seems that the subunit2junitxml --output-to options needs and =

It would be nice to have CI on changes to jobs automatically test the jobs with those changes...


Dedicated cyclemaps

It wil be nice to have a way to set different mapcycles for different game modes and tied to the commands that changes the mode.
For example, !ffa command sets the FFa game mode and the dedicated map (if there is any).

It would require to ignore the mapcycle.txt file and force the different mapcycles as part of the bot settings.conf file (same as small_cycle and big_cycle feature).
If this would be sufficient, it would be somehow possible to implement, but very ugly...

My ugly hack, working in SpunkyBot 1.12.2
Sorry, I'm not a dev and I hadn't fully red the code.

My ugly hack, working in SpunkyBot 1.12.2
Sorry, I'm not a dev and I hadn't fully red the code.


chore: update jx-gitops & jx-api

jx-boot-upgrade cron is removing the recent additions to jx-requirements. Updating deps here to stop this.

/cc @tomhobson

/ok-to-test

/test pr


Out of memory issue: PayPal OpenAPI spec

Using the following model from PayPal (https://github.com/paypal/paypal-rest-api-specifications/blob/main/openapi/reporting_transactions_v1.json) I get a memory error when running npx openapicmd typegen https://raw.githubusercontent.com/paypal/paypal-rest-api-specifications/main/openapi/reporting_transactions_v1.json
EDIT: Using Node 18

Another example:
npx openapicmd typegen https://raw.githubusercontent.com/Stedi/openApi/main/core.json

same here, any updates?

Help appreciated. This is not something I’m facing in any of my projects, so unlikely to find the time to take a look. Will accept a PR to fix

this effects all large openapi specs i guess. also the is failing:
https://app.tolgee.io/v3/api-docs/Public API (All)


Port all emojis to uqcstesting slack

It can be confusing when a command that uses emojis isn't working because of the different emoji sets between the main and testing slacks

Apparently this might be of use: https://github.com/d-lord/slackmoji-swarm

Uploading these at the moment :^) closing


feat: add compression options

Which issue does this PR close?

Closes #3844
Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

https://github.com/apache/arrow-rs/blob/9ce0ebb06550be943febc226f61bf083016d7652/parquet/src/format.rs#L453


Last thread only processes a single iteration due to missing eof-reset

The last thread only processes a single iteration and then breaks, because the eof-Flag is not reset to 0 along with word_count, last_word_count and sentence_length at the end of each iteration.
eof = 0 needs to be added in the codeblock beginning in line 419 and ending in line 426.

This change is already proposed in #39.


[Help] Token validation bypass

Description
I've been using v0.12 and was quite impressed with its implementation. Recently, I decided to upgrade to the latest version, v0.17.1, and noticed numerous changes. Primarily, I utilize this tool for mocking responses. I managed to add the MockResponsePlugin into the configuration and updated the old responses.json file to mocks.json to match the new structure.
However, I've encountered a challenge with token validation. In v0.12, including the token in the Authorization header would simply flag the token itself, but in the current version, it's throwing an error regarding the actual token validity. It appears to be attempting to validate the mock token against the genuine Microsoft token validation endpoint.
HTTP/2 401
content-type: application/json
strict-transport-security: max-age=31536000
request-id: 5fcaa28a-48f2-4120-898f-99726419a2fc
client-request-id: 5fcaa28a-48f2-4120-898f-99726419a2fc
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"MW2PEPF0000836F"}}
www-authenticate: Bearer realm="", authorization_uri="https://login.microsoftonline.com/common/oauth2/authorize", client_id="00000003-0000-0000-c000-000000000000"
date: Thu, 09 May 2024 18:10:16 GMT

{"error":{"code":"InvalidAuthenticationToken","message":"Lifetime validation failed, the token is expired.","innerError":{"date":"2024-05-09T18:10:17","request-id":"5fcaa28a-48f2-4120-898f-99726419a2fc","client-request-id":"5fcaa28a-48f2-4120-898f-99726419a2fc"}}}

Given that the purpose of using this tool is to mock up Microsoft GraphQL API endpoints, I need to bypass this validation. I believe there might be a configuration setting I missed in the documentation to achieve this. Could you please advise on how to proceed? Thank you!
Expected behaviour
It skips the validity of the authorization token.
Actual behaviour
It throws an error.
Steps to reproduce

install the lasted version of the tool.
run:curl --header "Authorization: bearer <token>" -ix http://localhost:8000 "https://graph.microsoft.com/v1.0/users/*"

Dev Proxy Version
v0.17.1
Operating system (environment)
Linux
Shell
bash
Configuration file
{
  "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.16.2/rc.schema.json",
  "plugins": [
    {
      "name": "RetryAfterPlugin",
      "enabled": true,
      "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll"
    },
    {
      "name": "GenericRandomErrorPlugin",
      "enabled": true,
      "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
      "configSection": "genericRandomErrorPlugin"
    },
    {
      "name": "MockResponsePlugin",
      "enabled": true,
      "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
      "configSection": "mocksPlugin"
    }
  ],
  "urlsToWatch": [
    "https://jsonplaceholder.typicode.com/*"
  ],
  "genericRandomErrorPlugin": {
    "errorsFile": "devproxy-errors.json"
  },
  "rate": 50,
  "labelMode": "text",
  "logLevel": "information",
  "newVersionNotification": "stable"
}

Additional Info
No response

closing this issue as found the solution; it requires to set urlsToWatch:
  "urlsToWatch": [
    "https://graph.microsoft.com/*"
  ],


Re-enable .NET Interactive in Ipynb notebooks

We had to bump the Jupyter extension version because of some vscode extension API changes after the merge, but that new version broke the Interactive kernel in Ipynb notebooks. The old Jupyter extension had a notebooks contribution in its manifest that associated the provider Interactive uses with the Ipynb file extension, but that was removed in the new extension version. I'm guessing they look at the jupyter.kernels contributions instead because Ipynb is already built in, but no idea. This PR adds that old manifest contribution to our builtin notebook extension to get the file association working again.
I also fixed some other things here and there and disabled new VS Code notebook ExtHost bits we don't need while I was at it.

Looks like the new jupyter-notebook contribution breaks the extension tests. Looking into it

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 5 (40.0%)  changed or added relevant lines in 2 files are covered.
451 unchanged lines in 7 files lost coverage.
Overall coverage decreased (-0.007%) to 41.93%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sql/workbench/services/notebook/common/notebookRegistry.ts
0
3
0.0%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/common/ports.ts
4
74.14%

src/sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet.ts
12
25.0%

src/sql/workbench/contrib/executionPlan/browser/executionPlanView.ts
72
18.07%

src/sql/workbench/contrib/query/browser/queryEditor.ts
80
4.59%

src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts
82
2.59%

src/sql/workbench/services/query/common/queryManagement.ts
96
2.07%

src/sql/workbench/contrib/executionPlan/browser/azdataGraphView.ts
105
7.51%

Totals

Change from base Build<PHONE_NUMBER>:
-0.007%

Covered Lines:
28866

Relevant Lines:
63939

💛  - Coveralls


Yaml_examples and extras

This PR implements a couple of fixes and missing features:

[x] Adds a runSerialSolver operation -> moved to #90
[x] Adds a quickfix for cmd operations to avoid running all jobs if -j was provided -> moved to #90
[ ] Fixes refineMesh
[x] Fixes OpenFOAMTutorialCase case origin -> moved to #91
[ ] Add example yamls and postProcessing scripts. For now lets keep use only test/cavity.yaml
[x] Implements case.time_folder

format!

format!

closed since most of the stuff was merged via separate PRs


Is it possible to output a link to the session in Browserstack?

Hi,
This is more of a feature/documentation request. I've been using this plugin for a while and it works great, thanks! However, I was wondering if it was possible to report the Browserstack job URL in the log, so that we can easily click from a test run to the Browserstack session. For example, karma-browserstack-launcher outputs the job URL when instantiating the session, and it is pretty helpful when we need to dig into the logs:

As it is I just set a unique Browserstack "project" per job and so I can find it, but a link would simplify this workflow considerably.
Apologies if this is already supported, and I just missed it! Thanks.

Sorry I was on vacation, it looks like it might be possible. I'll look into it.


OCM-141: Terraform for IMDSv2 support

Adding support for http_tokens_state field. This field can be used only
from 4.11.0 and have 2 options: optional/required

SGTM, @bardielle Can you also take a look?


OpenCR needing to upload twice to work

Hi,
When following the e-Manual of the OpenManipulator-X, I noticed that almost all the time I need to perform upload twice to OpenCR in order to succeed the uploading process. In the first trial, the error is always:
ser_open: unable to open port: No such file or directory
opencr_ld ver 1.0.2
opencr_ld_main

file name : /tmp/arduino_build_802820/usb_to_dxl.ino.bin
file size : 111 KB
Fail to open port 1
Without doing anything, when I pressed the upload button the second time, then upload succeed. How come? Is there something wrong with my OpenCR board?

I got the same probrem in several boards too ，but it  won't affect the work,


[refactor]remove seek block in segmentIterator

Proposed changes
remove std::unique_ptr<RowBlockV2> _seek_block from in SegmentIterator , make prepare for subsequent deletion of non vectorized code.
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[x] No
[ ] I don't know

Has unit tests been added:

[x] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[x] No Need

Does it need to update dependencies:

[ ] Yes
[x] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[x] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.74 seconds
load time: 637 seconds
storage size:<PHONE_NUMBER>7 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221227165226_clickbench_pr_69635.html


Api doen't work with NONE Permission

I tried this command;
@Override
public void onEnable() {
    // Plugin startup logic
    final LinkedHashMap<String, Argument> args = new LinkedHashMap<>();
    args.put("player-name", new PlayerArgument());
    args.put("message-text", new GreedyStringArgument());

    CommandAPI.getInstance().register("messageSend", args, (commandSender, objects) -> {
        final Player player = (Player) objects[0];
        final String message = (String) objects[1];
        player.sendMessage(ChatColor.translateAlternateColorCodes('&', message));
    });
}

And console output like that;
[CommandAPI] Loading CommandAPI v2.2
[CommandAPI] Hooked into NMS Version 14 rev 1 (compatible with 1.14, 1.14.1, 1.14.2, 1.14.3, 1.14.4)
[Debug] Loading Debug v1.0-SNAPSHOT
[CommandAPI] Enabling CommandAPI v2.2
[Debug] Enabling Debug v1.0-SNAPSHOT
[CommandAPI] Registering command /messageSend <PlayerArgument> <GreedyStringArgument>
Server permissions file permissions.yml is empty, ignoring it
CONSOLE: Reload complete.
[CommandAPI] Linking permissions to commands:
[CommandAPI] NONE -> /messagesend

So, i tried to use /messageSend myName <messages...>
And in game;

Also, i tried;
CommandPermission.fromString("debug.command.sendmessage")
When I register the command and I installed groupmanager then I give the permission but result is same.
When use the command, it's work but the suggestions don't work.

After my initial testing, I have not been able to confirm that the NONE permission doesn't work.
When using the following code:
LinkedHashMap<String, Argument> args = new LinkedHashMap<>();
args.put("player-name", new PlayerArgument());
args.put("message-text", new GreedyStringArgument());

CommandAPI.getInstance().register("messageSend", args, (commandSender, objects) -> {
    final Player player = (Player) objects[0];
    final String message = (String) objects[1];
    player.sendMessage(ChatColor.translateAlternateColorCodes('&', message));
});

On a server with no permission system, it worked fine when not being OP.
After installing groupmanager, it worked fine when not being OP.
Perhaps it depends on your Minecraft version? The tests I did were on Minecraft 1.14.4 using CommandAPI version 2.2.
However, CommandPermission.fromString("debug.command.sendmessage") not working is indeed a bug that needs to be addressed.


Potential bugs with pointers within loops

Describe the bug
Iterating over a reference using the range operator, then using the pointer to the iterated variable, oftentimes yields
undesirable results. In some cases, this works, but on many occasions, we pass the pointer of the last iteration.
In order to systematically avoid this kind of code smell, I'd advise pinning the iterated reference before using the pointer.
I could detect occurrences of this issue in the following places:

core/cautils/getter/loadpolicy.go
core/pkg/opaprocessor/processorhandler.go
core/pkg/registryadaptors/armosec/v1/civksadaptor.go
core/pkg/registryadaptors/gcp/v1/gcpadaptor.go
core/pkg/registryadaptors/gcp/v1/gcpadaptormock.go
core/pkg/resultshandling/printer/v2/prometheusutils.go
core/pkg/resultshandling/printer/v2/sarifprinter.go

NOTE: this came from static code analysis performed by the linter "gosec".
We might want to enable such code analysis in CI later, in order to make it harder for such issues to sneak into the code base.
Environment
OS: the OS + version you’re running Kubescape on, e.g Ubuntu 22.04 LTS
Version: the version that Kubescape reports when you run kubescape version
Your current version is:

Steps To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Actual Behavior
A clear and concise description of what happened. If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

fixed with   #984


fragnix -cabal

We want to write
>fragnix -cabal containers

and get all slices from a containers package.
We also want to get all modules from a containers package into our environment.

The creation of environments from existing packages is no longer in scope.


[foxcomtr] Add new extractor

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[x] At least skimmed through adding new extractor tutorial and youtube-dl coding conventions sections
[x] Searched the bugtracker for similar pull requests
[x] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[ ] Improvement
[x] New extractor
[ ] New feature

Description of your pull request and other information
The generic extractor was downloading advertisement webm video from Fox Turkey's website. I added m3u8 parsing support for the Fox Turkey group that downloads .ts files.
Another issue that I encountered is the quality of video selects 600k for best (even it did not have better bitrate) and I reversed the formats list to choose 2400k, I am open for a proper fix. For now it works just as it should.

Read coding conventions.

Any follow-up? @dstftw


Fields are not being encoding when marked optional (proto2 only)

I encountered this issue, that the encoding fails for fields which are set to optional in the proto2 syntax.
I followed the code down to where the issue appears and it looks like it is always returning true with the code comment "Missing optional field".
Once the return true; is commented out it seems to work.
/* Encode a single field of any callback, pointer or static type. */
static bool checkreturn encode_field(pb_ostream_t *stream, pb_field_iter_t *field)
{
    /* Check field presence */
    if (PB_HTYPE(field->type) == PB_HTYPE_ONEOF)
    {
        if (*(const pb_size_t*)field->pSize != field->tag)
        {
            /* Different type oneof field */
            return true;
        }
    }
    else if (PB_HTYPE(field->type) == PB_HTYPE_OPTIONAL)
    {
        if (field->pSize)
        {
            if (safe_read_bool(field->pSize) == false)
            {
                /* Missing optional field */
                return true;    // <================== here
            }
        }
        else if (PB_ATYPE(field->type) == PB_ATYPE_STATIC)
        {
            /* Proto3 singular field */
            if (pb_check_proto3_default_value(field))
                return true;
        }
    }

Could you give some advice as to what is going on or if I am using the API wrong?
I am not getting any errors, just an empty buffer. This is my encoding code:
    bool status;
    ProtoNotification notification = ProtoNotification_init_zero;

    /* Create a stream that will write to our buffer. */
    pb_ostream_t stream = pb_ostream_from_buffer(buffer, length);

    /* Fill in the data */
    char* app_name = "WhatsApp";
    char* title = "Message for you, Sir!";
    char* subtitle = "Juliet";
    char* message = "O Romeo, Romeo, wherefore art thou Romeo?";

    strcpy(notification.app_name, app_name);
    strcpy(notification.title, title);
    strcpy(notification.subtitle, subtitle);
    strcpy(notification.message, message);

    /* Now we are ready to encode the notification! */
    status = pb_encode(&stream, ProtoNotification_fields, &notification);

    /* Then just check for any errors.. */
    if (!status)
    {
        printf("Encoding failed: %s\n", PB_GET_ERROR(&stream));
        return 1;
    }

Proto file for completeness:
syntax = "proto2";

message ProtoNotification {
  optional string app_name = 1;
  optional string title = 2;
  optional string subtitle = 3;
  optional string message = 4;
}

You have to set notification.has_app_name = true; and similar.

Thank you that works!

I have the same problem in proto3, how to solve it ?

You have to set notification.has_app_name = true; and similar.

I have the same problem in proto3, how to solve it ?


Restforce CometD connection degrades over time

On my local development machine, I am seeing a stable CometD connection of about 1 minute between COMETD UP and COMETD DOWN messages.
As an aside, that seems very short to begin with.
However, after deploying to an ec2 instance in AWS, I am seeing that connection slowly degrade, eventually down to the connection being up for only 1-2 seconds.
D, [2015-07-09T15:11:07.702916 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:12:19.701093 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:13:10.973763 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:14:22.793086 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:14:27.987411 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:15:09.420705 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:15:14.922415 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:15:39.820389 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:15:44.986111 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:16:26.765462 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:16:31.909075 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:16:56.840699 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:17:02.004995 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:17:13.105245 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:17:18.564525 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:17:43.792276 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:17:48.986450 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:18:13.864538 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:18:19.029704 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:18:30.396848 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:18:35.588754 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:19:00.819996 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:19:05.956041 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:19:16.738989 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:19:22.090076 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:19:30.875752 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:19:36.065752 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:19:47.407385 #289] DEBUG -- : [COMETD DOWN]
D, [2015-07-09T15:19:52.570507 #289] DEBUG -- : [COMETD UP]
D, [2015-07-09T15:20:17.848773 #289] DEBUG -- : [COMETD DOWN]

Gemfile.lock relevant lines:
$ grep restforce Gemfile.lock
    restforce (2.1.0)
  restforce

$ grep faye Gemfile.lock
    faye (1.1.1)
      faye-websocket (>= 0.9.1)
    faye-websocket (0.9.2)
  faye

As a secondary issue, which maybe due to constant reconnections, I sometimes get a 400 on the authentication call, with invalid_grant as the error detail.
Any insight into how to resolve this issue would be greatly appreciated.
I have included relevant code samples bellow - but can provide more details if needed.
  def client
    @_client ||= create_client
  end

  def create_client
    logger.info("Creating Client")
    Restforce.log = true
    Restforce.configure do |config|
      config.logger = Logger.new(RESTFORCE_LOGFILE)
      config.log_level = :info
    end

    c = Restforce.new
    c.authenticate!
    c
  end

    def add_push_topic(topic_name, topic_query, topic_action_proc)
      push_topics[topic_name] = { query: topic_query, action: topic_action_proc }
    end

    def subscribe_to_topics
      EM.run do
        Signal.trap('INT')  { EM.stop }
        Signal.trap('TERM') { EM.stop }

        push_topics.each do |name, value|
          client.subscribe name do |message|
            value[:action].call(message)
          end
        end
      end
    end

UPDATE: Seems to be an issue between faye client and the Salesforce server
I am seeing this once I attached the faye debugger
[Faye::Client] Passing through incoming extensions: {"clientId":"redacted","error":"403::Unknown client","successful":false}

Seems related to the newer versions of faye.
Rolled back down to 0.8.9 and the connections seems stable - and does not disconnect after an hour.
What is the status of https://github.com/ejholmes/restforce/issues/114? It says its open, and can be used against the master branch of faye/faye - but the commit in faye in question is available in 1.1.0 and 1.1.1 - and I have the same issues when using those tags.

Giving a quick update: after rolling back to faye 0.8.9, the connection is stable, and the last COMETD UP message was about 20 hours ago, and updates are coming through.

@smzchaudary thanks for reporting on this! I just stumbled on the same problem with faye version 1.x, and reverting to faye 0.8.9 made all the difference.

@greenmindPDX glad downgrading worked for you.
I tried looking at the project README and documentation, but I don't see any caveat that the version of faye needs to be 0.8.9 - I think thats a pretty important omission due to the fact that subscribing to push topics will simply not work out of the box with  the latest versions of faye.

@smzchaudary :+1:
I would agree that this should make it into the README. It may be that users aren't using the streaming API that much, or that streaming is working just enough of the time in later versions of Faye to be ignored. I had some connectivity with later versions, but 0.8.9 is bombproof.

I'm open to putting this in the README. Do one of you guys want to make a
PR?
--
Tim Rogers
GoCardless.com https://gocardless.com
On Tue, Sep 22, 2015 at 6:43 PM, Greg Robillard<EMAIL_ADDRESS>wrote:

@smzchaudary https://github.com/smzchaudary [image: :+1:]
I would agree that this should make it into the README. It may be that
users aren't using the streaming API that much, or that streaming is
working just enough of the time in later versions of Faye to be ignored. I
had some connectivity with later versions, but 0.8.9 is bombproof.
—
Reply to this email directly or view it on GitHub
https://github.com/ejholmes/restforce/issues/194#issuecomment-142359921.

@timrogers OK, PR created - https://github.com/ejholmes/restforce/pull/207.


Some validation test, to see if things are correct.

Added some validation tests, to see if assumptions are correct.

Hey @RolfHuisman, we already have a comprehensive set of tests for the Simulator on a different repo, and these do not seem to fit the goal of this repo so I'm going to close this PR.


[3.0] Fix @escaping printing (from #4905)

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
3.0 version of https://github.com/apple/swift/pull/4905
Risk assessment details coming soon

Resolves SR-NNNN.

@swift-ci please test OS X Platform

@jrose-apple
@DougGregor, please provide your judgement

@DougGregor blessed this for inclusion


[Bug] Tooltip is not showing upon hovering over Filters and download Widget: Table

Description
Tooltip is not showing upon hovering over Filters and download
Widget: Table
Steps to reproduce the behaviour:

Go to link http://rc.app.appsmith.com/user/login
Login into Appsmith through your user credentials.
Go to the widget screen by clicking on the Add icon of widgets
Drag and drop the table widget
Hover on Filters and download
Tooltip is not showing for Filters and Download

Important Details

Version: [Cloud]
OS: [MacOS]
Browser [chrome, safari]
Environment [Release/Frozen]

video

Screenshot
https://www.screencast.com/t/XWSsvPYNWjP

design has updated, the row height option does not exist anymore


Add-on controller is not called

Hi there,
I built a simple Add-on, installed them to Foundation NET5 Core, but it doesn't work.
I'm not sure it is mine issue, or Foundation/EPi12.
Ok, my add-on has only one class
using Microsoft.AspNetCore.Mvc;

namespace MyEPiModule
{
    public class HelloController : Controller
    {
        [HttpGet]
        public ActionResult Index()
        {
            return new ContentResult { Content = "Hello from my EPiServer module!" };
        }

        [HttpGet]
        public ActionResult Show()
        {
            return new ContentResult { Content = "Show: Hello from my EPiServer module!" };
        }
    }
}

It depends on EPiServer.CMS 12.2.1 only.
module.config is simple
<?xml version="1.0" encoding="utf-8"?>
<module loadFromBin="false"
		moduleJsonSerializerType="Net"
		prefferedUiJsonSerializerType="Net"
		clientResourceRelativePath=""
		description="My first EPiServer NET5 Core module"
		tags="EPiServerModulePackage">
  <assemblies>
    <add assembly="MyEPiModule"/>
  </assemblies>

  <routes>
    <route url="{moduleArea}/{controller}/{action}/">
      <defaults>
		<add key="moduleArea" value="MyEPiModule" />
        <add key="controller" value="Hello"/>
		<add key="action" value="Index"/>
      </defaults>
    </route>
  </routes>
</module>

I put MyEPiModule.dll to bin folder near Foundation.dll. module.config is put under /modules/_protected/MyEPiModule.
Requests /episerver/myepimodule/hello/index and /episerver/myepimodule/hello/show response HTTP404 Not Found.
In EPi11 I had to desribe my add-on in web.config. But it is obsolete for Foundation NET5 Core (according to EPi doc).
Am I missed something? Are there additional steps for registering add-on in Foundation/EPi12?

By default the module system does not autodiscover.  You can either turn on autodiscover
 services.Configure<ProtectedModuleOptions>(x => x.AutoDiscovery = EPiServer.Shell.Configuration.AutoDiscoveryLevel.Modules);
or register manually like
services.Configure<ProtectedModuleOptions>(x =>             {                 if (!x.Items.Any(x => x.Name.Equals("MyEPiModule")))                 {                     x.Items.Add(new ModuleDetails                     {                         Name = "Foundation"                     });                 }             });

It works! Thank you @lunchin!
Good point to mention that somewhere in https://world.optimizely.com/documentation/developer-guides/CMS/add-ons/

Found out one more issue.
Add-on controller works fine in browser. It works with auth after login with username/password. But it shows login page in Postman after auth via OpenID.
Content Delivery API request /api/episerver/v3.0/content/14 works fine in Postman (OpenID auth), but responses
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","title":"Not Found","status":404,"detail":"Content not found","instance":"/api/episerver/v3.0/content/14","traceId":"00-0fcc7f10a1b91f4dab46163febf2ef3c-c6ad6aa9d43c2140-00","code":"NotFound"}

in browser.
I saw doc about introducing OpenID in EPiServer https://world.optimizely.com/documentation/developer-guides/content-delivery-api/getting-started/api-authentication/ but
[Authorize(OpenIDConnectOptionsDefaults.AuthenticationScheme)]
public class MyApiController : ControllerBase
{
}

doesn't work for me.
What did I missed to cause my add-on work with auth by OpenID? I appreciate any help.
@lunchin I know you have a hidden knowledge ;-)

In foundation https://github.com/episerver/Foundation/blob/main/src/Foundation/Startup.cs#L118 we register episerver.openconnect
To get a token
http://localhost:50244/epi/episerver/connect/token
grant_type=client_credentials
client_id = postman-client
client_secret= postman

@lunchin yes, it works fine. epi/episerver/connect/token gives me accessToken. I use them as Authentication: Bearer {{accessToken}} for calling episerver/mymodule/hello/index but EPiServer responses with login page.

Hi @lunchin
Tried authorizationPolicy
<?xml version="1.0" encoding="utf-8"?>
<module loadFromBin="false"
		moduleJsonSerializerType="Net"
		prefferedUiJsonSerializerType="Net"
		clientResourceRelativePath=""
		description="My first EPiServer NET5 Core module"
		tags="EPiServerModulePackage"
		authorizationPolicy="episerver:cmsadmin">
  <assemblies>
    <add assembly="MyEPiModule"/>
  </assemblies>

  <routes>
    <route url="{moduleArea}/{controller}/{action}/">
      <defaults>
	    <add key="moduleArea" value="MyEPiModule" />
        <add key="controller" value="Hello"/>
	    <add key="action" value="Index"/>
      </defaults>
    </route>
  </routes>
</module>

and [Authorize(Policy = "episerver:cmsadmin")] but no luck.
I checked both grant_types password and client_credentials. OpenID gives access_token, but server responses login page for a module again (

okay i will put a sample together today


Can't pass metamask qr code scan with walletConnect

I tested on reactdemo.blocknative.com and mostly doesn't appear some times like 10 min later notifications comes to my phone screen. Why is slow ?.  But https://example.walletconnect.org/ this works fine

@burakakca I am not able to reproduce this issue. It could possibly be related to your network speed. Let me know if this issue persists and feel free to re-open.

Walletconnect had performance issues and they switched to new infrastructure which needs upgrade on walletconnect version. Maybe that's the issue? https://twitter.com/WalletConnect/status/1426226788515078144

@makoto yes you are right, that's why, with version 1.34.1, my problem was solved.


Content Security Policy

I'm trying to interact with some API, but i get a CSP error.
index.tsx?0839:15 Refused to connect to 'https://demo/api/auth/login' because it violates the following Content Security Policy directive: "default-src 'self' 'unsafe-inline' data:". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
Here the code to reproduce the issue:
const increment = async () => {     store.dispatch(incrementChar());     store.dispatch(incrementCounter(1));     await fetch('https://demo/api/auth/login').then(res => {console.log(res)}).then(data => {console.log(data)})   };
After some hours of trying i still can't do a single API request.
I tried to add a meta http-equiv="Content-Security-Policy" in the index.html file but it doesn't work.
I also tried to:

launch the command from inside the electronBridge
launch the command with ipcMain

Now i'm really out of ideas.

See #15

Yep, i just saw the other issue.
Sorry.


TSServer: snippet completions

Provide a generic, cross editor snippet type that can be used to express complex text insertion operations. At a minimum, these snippets should include placeholder values and indicate where the cursor should end up.
For example, snippets could fill in function call arguments with placeholders. If the user completes ad to add here:
function add(x, y) { return x + y; }

ad|

The inserted snippet would be:
function add(x, y) { return x + y; }

add(«x», «y»)

Where  the user can tab from the placeholder values «x» to «y».
Use Cases

Method completions (currently implemented manually by VSCode under useCodeSnippetsOnMethodSuggest)
React completions — https://github.com/Microsoft/vscode/issues/48562
Js doc template completions
implement overridden method

Why is this needed
Snippets speed up coding and provide additional hints while writing code. VS Code already tries to convert TS's existing response types to snippets but fails to handle many edge cases. In order to improve reliability and support more advanced used cases such as https://github.com/Microsoft/vscode/issues/48562, I believe that TS needs to start generating these snippets directly

I imagine that the snippet type could  similar to SymbolDisplayPart. Just a quick sketch:
interface Snippet {
    parts: SnippetPart[];
}

type SnippetPart = SnippetText | SnippetPlaceholder;

interface SnippetText {
    kind: 'text'
    text: string
}

interface SnippetPlaceholder {
    kind: 'placeholder'
    text: string
}

For completions, the snippet could be new optional additional field on CompletionEntry. That way we don't break clients that do not support snippets.

Another possible use case that we discussed: refactorings such as extract constant. We currently implement this by triggering a rename after the extraction but a snippet could be a better fit. Example:
const three = 1 + 2;

Run extract constant on 2. This could generate a placeholder that is duplicated twice in the file:
const «newLocal» = 2
const three = 1 + «newLocal»;

Typing would update both locations
(Note that VS Code's api would not support this currently since the placeholders are at unconnected locations in the file)

Typing would update both locations

but is not that what rename does today?

Another possible use case: generate complete method signature when overriding a method in a subclass https://github.com/Microsoft/vscode/issues/46038

Inspiration from Eclipse. Notice how the one tab stop for the method name is even linked!

Yes I'll can close this since these already snuck in :)


Investigate having a mandatory long-running stellar core

What
We need to figure out if it is reasonable to require the user to set up and run a stellar-core instance. We need to determine when it is necessary (possibly not needed for ledgers, transactions, and operations).
Why
Captive core takes a while to startup, so we can't run a new instance every time the CLI command is called. We need to have a core instance running in the background that can handle all exports.

We determined that it is reasonable to have this requirement. We are using captive core in order to export accounts, offers, and trades. We have an unbounded export, which will allow us to keep the core instance running.


[material-ui][Tooltip] Tooltip/popper styles are not applying through direct sx styles in Tooltip component

Steps to reproduce
Link to live example
Steps:

See how the styles applied to tooltip or popper are not applying in the link above

Current behavior
No response
Expected behavior
No response
Context
Styles don't apply when using the Tooltip sx prop. It does work using slotProps and add the sx styles on the tooltip
<Tooltip
   ...
   slotProps={{ tooltip: { sx: { ... } } }}
/>...

(the code above works)
The problem is, if I want to use the styled API, I'm not able to override the tooltip/popper styles.
Your environment

npx @mui/envinfo
Browser: Google chrome 127.0.6533.72 on ubuntu 22.04

Search keywords: tooltip, styles, popper

Steps to reproduce
Link to live example
Steps:

See how the styles applied to tooltip or popper are not applying in the link above

Current behavior
No response
Expected behavior
No response
Context
Styles don't apply when using the Tooltip sx prop. It does work using slotProps and add the sx styles on the tooltip
<Tooltip
   ...
   slotProps={{ tooltip: { sx: { ... } } }}
/>...

(the code above works)
The problem is, if I want to use the styled API, I'm not able to override the tooltip/popper styles.
Your environment
npx @mui/envinfo
Search keywords: tooltip, styles, popper

Hey @jvega190,
The reason behind this issue is Tooltip component is structured in a way that the sx prop doesn't directly target the desired elements.
It can be solve by using the slotProps
<Tooltip
  slotProps={{
    tooltip: { sx: { backgroundColor: 'red', color: 'white' } },
    popper: { sx: { backgroundColor: 'blue' } }
  }}
>
  ...
</Tooltip>

you can customise the Tooltip as well but this approach allows granular control over Tooltip and Popper styles.

It is expected. See #28679 and #11467. As for styling using the styled API, did you take a look at https://mui.com/material-ui/integrations/interoperability/#portals.

Thanks, noted!


Update client-side components from server responses

Annotate root elements for Unicorn components with unicorn:data attributes.
Post-process Unicorn responses: delete Component objects for nodes that were
removed from the DOM, and add new Component instances for newly created nodes.

Ref: #530

This is an interesting approach! Does it make initjs data redundant if it's all attributes on the component itself? Would calls be able to be stored as an attribute as well?
At first glance having this data sitting in the HTML of the element feels like we are mixing separation of concerns, but I'm not sure it actually matters (?) and it does seem like it will be easier to keep the component state up to date.

Yes, this is redundant. In its current form, we are passing the same attributes twice. Additionally, we are initializing components in two different ways:
Unicorn.componentInit(...);
Unicorn.componentInit(...);
...

and then:
findUnicorns().forEach((el) => {
	Unicorn.insertComponentFromDom(el);
});

I feel like calling findUnicorns() -> insertComponentFromDom() can also work to initialize components on the first load, but I haven't experimented with it.
As for mixing separation of concerns, I don't have a strong opinion on this. Putting JSON in HTML attributes is likely weird, but not as weird as putting JavaScript in attributes, like some others do.

Would calls be able to be stored as an attribute as well?

Yes! I added a commit that does that.

I feel like calling findUnicorns() -> insertComponentFromDom() can also work to initialize components on the first load, but I haven't experimented with it.

That was what I was wondering. Looking at the code, I would think it would work fine, but I've been wrong before when I assume I understand how code works in the past. 😆
This seems like a more sustainable approach than what is currently implemented and solves some gnarly bugs with nested components. What do you need from me to push this PR forward? Is it just stress testing and making sure the implementation seems sound?

What do you need from me to push this PR forward? Is it just stress testing and making sure the implementation seems sound?

Yes, I would appreciate it if you could look in depth at this code to see if it works well and covers all corner cases. I am still fairly new to Unicorn, and I might overlook some issues with existing functionality that I didn't take into account.
Then, to avoid scope creep, maybe we could have a follow-up issue if we want to replace a series of Unicorn.componentInit(...); with Unicorn.insertComponentFromDom().

@adamghill, I have rebased this PR on top of the latest "main" branch and resolved the conflicts. Do you think we can proceed with making it mergeable? If so, what would you expect from me here? Thanks!

Thanks for rebasing! Yep, this is next on my list to look at it. 😄 I will start looking at it this week, but I need to dedicate a few hours to making sure this is stable before merging. 👍

I added an example that would fail previously, but works with this PR. I can understand the code and it appears to work to solve #530. One thing I'm personally not thrilled about is the unicorn:data attribute in the HTML attribute. I do realize this is pretty subjective, though.
Could the current script tag used with the initial JSON be used/updated instead? It would feel cleaner to me. The downside is that it's separated from the component HTML.
Or another option would be to base64 encode the unicorn:data HTML attribute?
Or should I not worry about this at all? 😆

I added:

more to the wizard example
removed data keys from being included in the payload if it wasn't used by a unicorn:model (not sure how this interacts with javascript_exclude
$parent special variable for the template
tweaked the morphdom options to hopefully diff better

I might cherrypick some of these fixes and features into main before merging this branch in, but I haven't decided for sure yet. And everything needs some tests to be added before merging in.

This got merged in 0.58.0, thank you for this approach and all your thoughts on improving Unicorn!


Create Cosine Similarity.json

Your operation doesn't work with 2D tensors. For instance, consider dim = 1, eps = 1e-8 and the following:
Tensor 1:
tensor([[1., 2., 3.],
[4., 5., 6.]])
Tensor 2:
tensor([[1., 2., 3.],
[6., 5., 4.]])
The output should be
tensor([1.0000, 0.9481])
Yours gives an error, first with broadcasting. But even when I fixed the broadcasting and the input went through, it gave me something else that doesn't match the Python function. would suggest looking into this, especially working with 2D/3D tensors and dim = 1,2, etc other than just 0.
Also, you did not name your composites correctly. Composite and Composite(1) are not good names to use (inside Get Numerator and Denominator). Finally, you should also follow good naming conventions for inputs/outputs as well, not just leaving them as Input(1). Lastly, there are places where you can avoid lines crossing over.


merge package template from Kronos-Tools/npm-package-template

Updated standard to latest version

Codecov Report

Merging #86 into master will not change coverage.
The diff coverage is n/a.

@@         Coverage Diff          @@
##           master   #86   +/-   ##
====================================
  Coverage      80%   80%
====================================
  Files           1     1
  Lines          10    10
====================================
  Hits            8     8
  Misses          2     2

Continue to review full report at Codecov.

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


suggestion: download row ID in clusters

Hi there,
thanks for this amazing fancy version of mapper! After working through couple datasets using km, I have few suggestions for the next update and hopefully would be helpful to others as well:

in the 3D output, when we move the mouse to nodes, we only see the classification label (e.g., if the outcome is binary, then we only see 0/1), what was not generated but would be extremely helpful in later on validation of the results in traditional statistical approaches is: (number of ) row IDs within each nodes.  if there is a way to see how many rows (assuming your data is one ID per row) are in each cluster, it would be really informative...

after realizing that feature, maybe it would be worth adding another function from which we can select a specific cluster (assuming we have several clusters in the output) and download the row IDs in there. In this way, we can make use of the clusters generated from km and load them in logistic regression or other traditional approaches to find out what drives the separation of such clusters.

Thanks again and please let me know if you need extra clarification on this.
-Yuzu

As for 2. I can do two things. Easy:

create an extra function: .data_from_cluster_id(id) where id is an int (or maybe list of ints) donating cluster ID you gathered from the tooltip. It creates data/or maybe dataframe which you can store to_csv.

Harder:

create a dynamic keplermapper application that runs in the browser. Then add ability to download as .csv from the tooltips, or create lasso tools to select nodes/subset of network.

As for 1. I'll implement this soon.
As for "what drives the seperation of such clusters", I am coding up a decision tree based method to find decision rules for "random sample" negative class and "member of cluster" positive class.
I also already looked at providing statistics on the cluster compared to the entire dataset. Provide stats like: age = 3STD over dataset mean. for every cluster: http://mlwave.github.io/tda/bake.html
Any feedback on this?

import km

# Load digits data
from sklearn import datasets
data, labels = datasets.load_digits().data, datasets.load_digits().target

# Initialize
mapper = km.KeplerMapper(verbose=2)

# Fit and transform data
projected_data = mapper.fit_transform(data,
                                      projection=km.manifold.TSNE(random_state=1))

# Create the graph (we cluster on the projected data and suffer projection loss)
graph = mapper.map(projected_data,
                   clusterer=km.cluster.DBSCAN(eps=0.3, min_samples=15),
                   nr_cubes=35,
                   overlap_perc=0.9)

# Create the visualizations (increased the graph_gravity for a tighter graph-look.)
mapper.visualize(graph,
                 path_html="keplermapper_digits_ylabel_tooltips.html",
                 graph_gravity=0.25,
                 custom_tooltips=labels)

# Collect cluster data
X_cluster = mapper.data_from_cluster_id(430, graph, data)
y_cluster = mapper.data_from_cluster_id(430, graph, labels)

print(X_cluster)
print(X_cluster.shape)
print(y_cluster)
print(y_cluster.shape)

[[ 0.  0.  1. ...,  3.  0.  0.]
 [ 0.  0.  7. ...,  0.  0.  0.]
 [ 0.  0.  1. ...,  8.  0.  0.]
 ...,
 [ 0.  0.  0. ...,  0.  0.  0.]
 [ 0.  0.  0. ...,  0.  0.  0.]
 [ 0.  0.  0. ...,  2.  0.  0.]]
(24, 64)
[1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
(24,)

We might be able to quickly build a Javascript function that could do most of this from the visualization.
The html already has all of the graph metadata, which includes index information. I could see a right-click on a node providing options to save the data, or copy it to the clipboard.
Otherwise, this kind of exploration loop would be best done inside a notebook, where the mapper is persistent.

@MLWave @sauln :+1:  Perhaps selecting multiple nodes using a lasso tool, and then exporting them. This feature would help in studying and understanding cluster/groups of nodes with similar features and color.

A lasso tool is a great idea. I've been working on a few updates to the visualize parts and will take a look at incorporating something like this.
I've been having trouble myself in trying to extract the data of multiple nodes. Going node by node can be tedious.
Do you use mapper within Jupyter or open the html in a browser?

KeplerMapper is great! Definitely interested in Having a lasso tool (or other method of extracting multiple nodes) as part of the visualization.
Have there been any updates on this since last spring?
Thanks,
Jackson


Bsechelski/swaggercli

This PR replaces #7 to follow our workflow, merging first into the downloader branch

OK as martin reviewed #7


Fix: Added removal of subscriptions on complete

Previously there was only a single disposal for all the subsriptions. So, all the subscriptions were getting cancelled when the disposal bag was going out of scope and not when a completion request was received on a particular subscription. So, I added a dictionary of disposal bags with subscription 'id' as key and the disposal bag for that subscription as value. On subscription, a new disposal bag corresponding to the subscription is created and inserted in the dictionary. On completion, the disposal bag is removed from the dictionary. Now, the test for consecutive subscription of same operation is passing.
Link: https://app.clickup.com/t/866amdey9

Excellent catch @Soumyajit-Saha! LGTM, I'll give @NeedleInAJayStack final say on this one


Sample download link - 404 not found

'nuf said.

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

ID: a9d4ba1f-8a3a-b72a-75b4-4ad6138ecec9
Version Independent ID: 4fd13d66-c654-7ab3-58ce-1806c8383d67
Content: Xamarin.Forms RefreshView - Xamarin
Content Source: docs/xamarin-forms/user-interface/refreshview.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @davidbritch
Microsoft Alias: dabritch

Hi @timmi4sa
Sorry about this. For some reason the build system didn't detect the sample in the repo. I've given it a prod and will close this issue once it's fixed.

This is now fixed.


'Cancel' button does not appear in portrait mode on iPhone 6

Trying on an iPhone 6, the Cancel button only appears in landscape. When rotate to portrait disappears.

It works great for me. Have you some sample of code or more details please?

True, in the example works fine. I'll try to find what I'm doing wrong and if I found it, I'll write it down here.
Thanks anyway!


Windows is problematic

I've spent quite some time trying to figure out Windows and I got it to compile like so:
$ENV:VCPKG_INSTALLATION_ROOT='C:\vcpkg'; $ENV:WITH_LIBUV='1'; nmake
This uses LTO and O3 optimizations from Clang and so I figured let's benchmark it using the same tools I benchmark on Linux and macOS.
I get completely CPU-time saturated at 67k msg/sec on this particular computer. On Linux it is more like 300k or 400k - these numbers are completely off and it makes me just want to delete Windows and forget it ever existed.
If I run Linux inside Windows, WSL, I get 300k so it's not exactly small differences. I bet there's some kind of mspaint.exe hogging the network on host or whatever

makes me just want to delete Windows

FWIW, that it works on Windows is what matters. The fact it will be (much) slower than Linux is OK, and expected.
What's important is to be able to have a cross-platform source code, and ability to debug using Visual Studio. My $0.02.
BTW, what uSocket event-backend do you use in this test? Just curious. Maybe another one does better?

I need to do some benchmarking here. Using other servers and compare. Is there some kind of setting I should make on windows?  No difference.

  Same for disk performance, but that I already knew for sure. I guess the only thing Windows is good for is playing games. These numbers are ridiculously low, 5x as slow as Linux

I have the same results on Windows, nobody should use windows to serve anything, almost any language/Lib I tried I have a huge performance decrease with windows. But it's useful to support it for development. I'm trying to compile using clang + boringssl without success on Windows but I will try using cl or clang-cl to see if I got better results than clang on Windows.


ARTEMIS-1611 Added support for 1.x transformer API

I've added support for the old API back.  There was no real need to remove it other than some internal refactoring.  I haven't written a test as I'll need to compile against 1.x classes.  I could probably do this using @clebertsuconic new test suite.  But it seems a little overkill for this, I've built and tested manually,

@mtaylor I assume you still working on this, as the TODO is still there?

I meant to merge this. If someone could merge it please ?

Will do


Use our own hub client

We were importing the whole hub in there but this was hard to test and I
realise only now that installing from latest was always broken.
So let's define our own litle hub client and make it testable properly.
Signed-off-by: Chmouel Boudjnah<EMAIL_ADDRESS>

Ah damn! never push a PR at noon because infra is reinstalling 😡

/retest

/retest

/lgtm


rough draft of home.js with routes for card display and user display …

…upon login now, Navbar and Footer also debugged. This was much much pain.

authorization for first-person merge given in Slack by J (his computer is not available atm)


fix release note file name

What type of PR is this?

What this PR does / why we need it:
Which issue(s) this PR fixes:

Cherry-pick #3792

/retest

/retest

@guydc hey, I think we need to delete branch release/v1.1.0, and the existed git tag, retag it after this commit merged in the release branch