Improve runtime type guarding capabilities of generated Typescript code

Is your feature request related to a problem? Please describe.
When generating Typescript code the Bebop compiler composes the fields of a record into a Typescript interface and creates a constant which defines encode and decode methods that accept that interface.
So the following schema:
union SuperHero {
   1 -> readonly struct GreenLantern {
      float32 powerLevel;
   }
   2 -> readonly struct Batman {
     float32 powerLevel;
   }
}

produces the following code:
export declare namespace Bebop.Example {
    interface IGreenLantern {
        readonly powerLevel: number;
    }
    const GreenLantern: {
        discriminator: 1;
        encode(message: IGreenLantern): Uint8Array;
        encodeInto(message: IGreenLantern, view: BebopView): number;
        decode(buffer: Uint8Array): IGreenLantern;
        readFrom(view: BebopView): IGreenLantern;
    };
    interface IBatman {
        readonly powerLevel: number;
    }
    const Batman: {
        discriminator: 2;
        encode(message: IBatman): Uint8Array;
        encodeInto(message: IBatman, view: BebopView): number;
        decode(buffer: Uint8Array): IBatman;
        readFrom(view: BebopView): IBatman;
    };
    type ISuperHero = {
        discriminator: 1;
        value: IGreenLantern;
    } | {
        discriminator: 2;
        value: IBatman;
    };
    const SuperHero: {
        encode(message: ISuperHero): Uint8Array;
        encodeInto(message: ISuperHero, view: BebopView): number;
        decode(buffer: Uint8Array): ISuperHero;
        readFrom(view: BebopView): ISuperHero;
    };
}

The promise of Bebop is to be more type-safe than JSON - and at face value this generated code keeps that promise. Now lets define a function that uses this generated code and step through it:
function getSuperHero(): Bebop.Example.ISuperHero {
    if (getRandomNumber() > 5) {
        return {
            discriminator: Bebop.Example.Batman.discriminator,
            value: {
                powerLevel: 200
            } as Bebop.Example.IBatman
        }
    }
    return {
        discriminator: Bebop.Example.GreenLantern.discriminator,
        value: {
            powerLevel: 200
        } as Bebop.Example.IGreenLantern
    }
}

One of the first issues that presents itself is how a developer must go about constructing and returning a superhero:
// creating a superhero is very verbose
return  {
    // while 'discriminator' must be either '1' or '2'
    // there is nothing that prevents a developer from setting the wrong discriminator for a value
    // this can result in subtle and hard to diagnose runtime exceptions
    // especially if a developer fails to use the constant (which they can and will do if given a choice)
    discriminator: Bebop.Example.Batman.discriminator,
   // the type check if done based on the discriminator
   // so even with the 'as` keyword TSC infers the type as whatever matches the `discriminator`
    value: {
        powerLevel: 200
    } as Bebop.Example.IBatman
}

Further, because objects are based on interfaces there is no way to implement type guards or differentiate between types:
const superHero = getSuperHero();
// not possible
if (superHero.value instanceof Bebop.Example.IBatman)
// not possible
if (superHero.value instanceof Bebop.Example.IGreenLantern)
// not possible
function isBatman(superHero: Bebop.Example.ISuperHero) {
    return superHero.value instanceof Bebop.Example.Batman;
}

Which means the following is the only way to check the type of a value within a union:
// this isn't ideal
if (superHero.discriminator === 1 || superHero.discriminator === Bebop.Example.Batman.discriminator) {
    console.log("I'm Batman")
}

And there is no way to check what the type of an object is at all:
const batman: Bebop.Example.IBatman = {
    powerLevel: 200
};
// not valid
if (batman instanceof Bebop.Example.IBatman)

Describe the solution you'd like
The Bebop compiler should produce Typescript code that leverages classes. This would allow not only runtime type checking but also allow unions to be used in a much more ergonomic way, like such:
class Superhero {
  discriminator: 1 | 2;
  value:  BaseGreenLantern | BaseBatman;

  constructor(value: BaseGreenLantern | BaseBatman) {
    this.value = value;
   if (value instanceof BaseGreenLantern) {
       this.discriminator = 1;
   }
  }

That is just one example.

Maybe something like this:
export declare namespace Bebop.Example {
    abstract class BaseGreenLatern {
        readonly powerLevel: number;
        constructor(powerLevel: number);
        encode(): Uint8Array;
        static encodeInto(message: BaseGreenLatern, view: BebopView): number;
        abstract decode(buffer: Uint8Array): BaseGreenLatern;
        static decode(buffer: Uint8Array): BaseGreenLatern;
        static readFrom(view: BebopView): BaseGreenLatern;
    }
    class GreenLantern extends BaseGreenLatern {
    }
}

Typescript doesn't support static abstracts which is a bit annoying.

I talked about this with @bengreenier and we agreed that this change is definitely necessary, but also very breaking. If we implement it, I'd like to put it behind a flag --tsUseClasses or something, and then make that the default in bebop v3. :+1:
After this change, every {x:1, y:2} needs to be replaced with new T({x:1, y:2}). IMO this is good for readability, great for union types, but it definitely breaks all Bebop-using TypeScript code ever, and is btw presumably either-neutral-or-slightly-bad for perf.
Ben and I both don't think we should generate abstract base classes, probably just regular class GreenLantern etc, and then a union type is just export type Superhero = GreenLantern | Batman and we no longer expose the discriminator stuff to the user 🚀

We could have an IGreenLantern and have the class implement that which avoids it being a breaking change. Properties get defined on the interface, and the class is what you type guard against. Polymorphism!

I have been talking a bit with @lynn and I think we should keep what we have right now with a few changes:

Rename the I* types to be the same as the const (static implementation) since TS allows this overlap and it makes sense in almost all cases.

Example of generated code:
export interface MyRecord {
  a: string
  b: number
}

export const MyRecord = {
  serialize(data: MyRecord): Uint8Array {...}
  ...
} as const;

Example of using:
import {MyRecord} from './generated'

const a = 'hello'
const b = 5
const r: MyRecord = {a, b}
MyRecord.serialize(r)

Rename discriminator to something that takes less keystrokes. Sounds like tag is winning.
Generate an enum of the discriminator values for unions. This will make exhaustive checking easier, and more importantly when you want to go over each option you won't have to import each type implementation you are checking for.
Use the enum instead of hardcoding them as numbers

Now building on (1) above, this will give the illusion of having classes from a use standpint without having the added weight of classes that thinly wrap the types. IF we use classes, we will probably end up writing something like
export interface IMyRecord {
  a: string
  b: number
}

class MyRecord implements IMyRecord {
  a: string
  b: number

  constructor(raw: IMyRecord) {
    this.a = a
    this.b = b
  }

  static deserialize(buffer: Uint8Array): MyRecord {...}
  serialize(): Uint8Array {...}
  ...
}

which then means to use you have to write
const buf = new MyRecord({a, b}).serialize()

rather than just
const buf = MyRecord.serialize({a, b})

with my proposal.
Further you add overhead with classes, and unlike in C#, using instanceof in JS is not particularly great most of the time. Example:
abstract class MyUnion { ... }

class MyUnionOptA extends MyUnion {
  tag = 1 as const
  ...
}

class MyUnionOptB extends MyUnion {
  tag: 2 as const
  ...
}

You will be unable to do an exhastive check on a param of type MyUnion because TS does not recgonize all subclasses as options. Instead you will still have to write
function doThing(v: MyUnionOptA | MyUnionOptB) {
  if (v instanceof MyUnionOptA) {...}
  else if (v instanceof MyUnionOptB) {...}
  else { assertUnreachable(v) }
}

In my opinion it is much nicer to write
...
type MyUnion = { tag: MyUnionTag.OptA; value: OptA } | { tag: MyUnionTag.OptB; value: OptB };
...

function doThing(v: MyUnion) {
  switch (v.tag) {
    case MyUnionTag.OptA:
      ...
      break;
    case MyUnionTag.OptB:
      ...
      break;
    default:
      assertUnreachable(v)
  }
}

which has the added benefit of most IDEs being able to auto fill in branches for you because it knows all the enum variants.
BTW, assertUnreachable is a trival function to define that will force a compile-time error if it receives a value that is not never which only can happen if you did not exhaustively handle all cases already:
function assertUnreachable(v: never): never { throw new Error("This code should never run; check your type definitions!") }

Another perk to my suggestions is that they are actually very easy to implement and represent a smaller change to how bebop is used by people.

I disagree. I think the exposure of the discriminator and forcing the user to write their own type guards is a poor design and one that should be addressed. Even in C#, where unions are not actually supported, we don't expose the discriminator or force the end-user to worry about it. The promise of Bebop is to bring type-safety and speed in an ergonomic way. Making discriminator shorter to type is not the solution.

In typescript, the act of checking the discriminator when the type is defined how we are definining it actually tells the compiler what type it is and correctly enforces all the remaining values. E.g.
type UnionT = {tag: 1, value: {a: string}} | {tag: 2, value: {b: number}} as const;

const a: UnionT = {tag: 1, value: {a: "hello"}};

// This is a compile time error because if tag == 1, then the key b is not present.
if (a.tag == 1) console.log(`Value: ${a.b}`)

Also type narrowing would allow for the IDE to create an exhaustive switch on the users behalf; you wouldn’t need a chain of if statements

You can't use instanceof in a switch statement in TypeScript, so making this class-y is what would actually force a chain of if statements. (You can't write switch (typeof v) {}, because the result is "object" for all classes.)
TypeScript in VS Code doesn't seem to support "generate switch cases" by default for either approach, but I found an extension that supports generating cases from switch (v) when v is a union of constants or an enum.
I am starting to think that neither option is clearly more ergonomic or obvious than the other (they have pros and cons). But as @Eadword  points out, the system we already have works and is type-safe and fast. I'm not sure if the constructor perf hit is too bad, but I think that instanceof can involve icky string comparisons and nested [[HasInstance]] function calls etc that I feel a bit weird about, whereas comparing (value.tag === MyEnum.One) is definitely super fast at runtime.
So, I am now leaning towards keeping things as they are and making them better in the ways @Eadword listed.

Hello, I’d like to put my two cents:
I really appreciate this library because it doesn't force me to create intermediate objects for serialization.
For example, I can take an instance of my server model class and serialize it easily because my model class implements the same interface as the bebop data object. Or serialize the plain javascript object.
But when you change interfaces to classes with special methods like encode/decode it breaks my case. And I have to create a special intermediate object and call an encoding method on it, or use prototype method call hacks with typescript casting to cheat the typescript type system.
But typescript supports using classes as types. This way we can generate classes with properties only but no logic and put the serialization logic in a special static object. Like this:
struct MyObject {
    int32 numericField;
    string stringField;
}

export class MyObject {
  numericField: number;
  stringField: string;
}

export const MyObjectSerializer = {
  encode(message: MyObject): Uint8Array {
  },

  encodeInto(message: MyObject, view: BebopView): number {
  },

  decode(buffer: Uint8Array): MyObject {
  },

  readFrom(view: BebopView): MyObject {
  },
};

So, we can pass an instance of the MyObject class or any other object with the same interface to the encode/encodeInto methods. And use runtime checks with instanceof on the result of decode/readFrom calls if we need to.
What do you think about this? What am I missing?


Update the openSUSE distributions

Description
I noticed as I was watching an openSUSE presentations, that the distributions have been updated...

https://events.opensuse.org/conferences/oSC24/program/proposals/4411

https://media.ccc.de/v/4411-we-re-all-grown-up-opensuse-is-not-suse

So made some updates, to fix the "Leap" and the "Tumbleweed" distributions to their current state.

Renamed "opensuse" (symlink) to "opensuse-leap"

Added aarch64 version of "opensuse-tumbleweed"

Added the new logos to the Lima GUI, as well:
https://github.com/afbjorklund/lima-gui/commit/33ff5ba758da48b9ed8f9d02340cee97aa7484ce
https://en.opensuse.org/Logocontest

Unrelated to this issue, just FYI: Lima does not currently work on openSUSE as a host because qemu-ovmf has been broken: https://bugzilla.suse.com/show_bug.cgi?id=1230291


Adding package.json configuration option, or making the jest-puppeteer config path more flexible

🚀 Feature Proposal
How about adding the option to add the configuration parameters directly to package.json as a "jest-puppeteer" field ?
Motivation
Currently the only place you can add the configuration is in the root of the project with the jest-puppeteer.config.js file. This seems a bit unyieldy and could be consider "yet another file" for most people with just 3-4 lines of configuration.
The addition of the package.json config option is something that many other libraries provide e.g. jest, eslint and others.
Certainly it is not so flexible as a JavaScript file, but could fit many cases.
Another consideration would be to be able to search for the jest-puppeteer.config.js recursively from the current file running, and use the first one found. This would make it a bit more "clean" as it would allow people to add the jest-puppeteer.config.js file, closer to where it would belong conceptually.
Note
If this is something wanted, I could begin working on a first implementation 😃

I would like to see this, more and more javascript tools are expecting custom configs in root and it really adds up quick.  I've recently begun trying to move all my tooling configs into a subfolder in effort to clean up the root, and realized this tool doesn't yet support this.

I would do my best to come with a PR in the comming days @StevenWeathers

I would love to see this as well. I am also annoyed bay having yet another config file with 3 options. 😁

@lukasoppermann @StevenWeathers PR is open, if you could check it out it would probably speed up the process a bit 😄

Awesome @igneel64 that is great.

Do you have any news please ?

We will work on it.

Supported in v8+. Docs also updated.


Missing MultiSelectChoiceFilter

Hi all.
This is a feature request.
I just has tried this great filter collection and everything is very good, but I am missing MultiSelectChoiceFilter created with MultiSelectMixin and admin.ChoicesFieldListFilter.
I managed to make this myself, but I suggest including this one into the collection.
Thanks in advance.

Hi George, I believe I'm trying to do the same as you. Would yo share the version you made? Thank you!


list.collapseAll leaves selection in a broken state

Type: Bug
When pressing ctrl+left to collapse all nodes in a list view it leaves selection in such a state that you cannot expand nodes with right until you do something to change the selection.

I believe what's happening is list.collapseAll is leaving the originally selected node selected. So after executing the command you end up with 2 selections, your original selection plus the last root node in the list. The original selection is the primary selection, and if it has no children right does not have anything to expand and is a no-op.
As a user it looks like you have the root node selected, which has children to expand, but pressing right does nothing.
Pressing down then expands the list to reveal your original selection and you see that you unexpectedly have multiple selections.
The current behavior of list.collapseAll appears to be:

Leave the originally selected node selected
Add a second selection to the last root node in the list

The expected behavior here is:

Move selection to the root node of your currently selected node
Ideally this also retains multiple selection: each selection is moved to the root node of that selection.

VS Code version: Code - Insiders 1.76.0-insider (c7930ca55d072608625ba76c13b5f9baaf9a2136, 2023-02-10T16:22:19.445Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes

System Info

Item
Value

CPUs
AMD Ryzen 9 5950X 16-Core Processor             (32 x 3400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
undefined

Memory (System)
31.92GB (20.54GB free)

Process Argv
--crash-reporter-id 22cf4e37-a96e-4ad9-82f0-8715f8e2bf6e

Screen Reader
no

VM
0%

Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vsdfh931cf:30280410
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
pyindex848:30611229
nodejswelcome1:30587009
pyind779:30611226
pythonsymbol12:30651887
2i9eh265:30646982
showlangstatbar:30659908
pythonb192cf:30661257

Looking at this again in the File Explorer it looks like the selection highlight is left on the row where the original selection was despite the fact that the node is now in a different position. However, the "real" selection is still on the node.
This means it looks like one thing is highlighted and pressing enter opens a different thing.

@joaomoreno Just submitted a PR for this. Could you please review it?

What is the behavior supposed to be? Here's what I see:

Use keyboard to focus a tree node that has a parent
ctrl+left to collapse all
Focus moves to the whole tree and arrow down takes me to the first tree element. Right arrow does nothing.

I agree, feel free to send an issue for it. 👌
@alexr00 Your observations are the fixed state. Here's the entire story: https://github.com/microsoft/vscode/pull/182601#issuecomment-1864545683. Marking it as verified.


Please, add a link to open an issue in Argus

Please, add a link to open an issue in Argus

shouldn't it be 4 links? Scylla enterprise, oss, SCT and Argus?

Now it only shows 3 of them:

we should add argus.


Changing the submission message of apostrophe-moderator

Hey guys, I wonder how can I change that message, I tried overide the file
node_modules/apostrophe-moderator/public/js/content.js into lib/modules/apostrophe-moderator/public/js/content.js and change that message, but I'm getting browser error Uncaught ReferenceError: MyModerator is not defined,  so how can I overide this message ?
and btw, is here i18n for client side ?
if there is where do I define it ?
thanks.

Hi @Danny-weebo,
We don't have great support for apostrophe-moderator, but you can change this line if you overwrite the public\js\content.js file that apostrophe-moderator uses. It's on line 56 of the file that comes with it.
Please create a ticket in that module for this feature, and feel free to submit a PR with code that allows for this to the apostrophe-moderator module.

Thanks Ben. Just to clarify, apostrophe-moderator is fully supported.
We should start pushing a dictionary of i18n strings JavaScript needs into
the browser via push.globalData in 0.6.
For now we could just move the string to a configuration option so you can
hit it from app.js. that would be easy to do.
Reopening because this is unresolved and we are using it in our own
projects.
On Feb 20, 2015 11:16 PM, "benirose"<EMAIL_ADDRESS>wrote:

Closed #169 https://github.com/punkave/apostrophe/issues/169.
—
Reply to this email directly or view it on GitHub
https://github.com/punkave/apostrophe/issues/169#event-239548622.

Hey @boutell am, I correct in seeing that these messages can now be overridden here https://github.com/punkave/apostrophe-moderator#overriding-methods
(haven't gotten all the way to testing but it looks like what this issue is after)

Yes, also it's 0.5 and in maintenance mode. Closing.
On Mon, Jun 19, 2017 at 10:41 AM, Stuart Romanek<EMAIL_ADDRESS>wrote:

Hey @boutell https://github.com/boutell am, I correct in seeing that
these messages can now be overridden here https://github.com/punkave/
apostrophe-moderator#overriding-methods
(haven't gotten all the way to testing but it looks like what this issue
is after)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/punkave/apostrophe/issues/169#issuecomment-309460744,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB9fS2N-QneAjQ3hqhACHarxoYYS_-Tks5sFoiZgaJpZM4CzxMJ
.

--
*THOMAS BOUTELL, *SUPPORT LEAD
P'UNK AVENUE |<PHONE_NUMBER>  |  punkave.com


Enhance the visual separation between helm-command and helpfull buffer

Observed behavior
nearly invisible small black (dark-grey) line on a grey background
Expected behavior
line with more contrast or perhaps a text-line or a contrasting background of the helpful buffer
Steps to reproduce
select a command in helm-command window and press TAB
System information

As far as I know, there is no way to make only that divider thicker. You can make all bottom-window dividers however. These are the defaults (source):
(setq-default window-divider-default-places t
              window-divider-default-bottom-width 1
              window-divider-default-right-width 1)
(add-hook 'doom-init-ui-hook #'window-divider-mode)

e.g. Add (setq window-divider-default-bottom-width 2) to your private config.


Add bcdedit trick for hypervisor troubleshooting

Proposed changes
In Docker Desktop for Windows troubleshooting, added information about enabling Hypervisor at Windows launch using bcdedit.
cc @mat007 @stephen-turner

@stephen-turner can you PTAL ?


docs(tabs): correct typo

I found a typo word in comments and correct it.
"whenevfer" to "whenever"

I signed it!


Update HackIllinois Event Times

The hardcoded event times need to be updated. The times can be found in HITimeDataSource.

event times query blobstore/times I think first then it references the hardcoded times (you want to change both)


For a 0.3.4 release

@ablaom I guess we need to update the compat in MLJBase to require this latest release of MMI?

Yes, this was realised https://github.com/alan-turing-institute/MLJBase.jl/pull/401#issue-472846047 is fixed in latest MLJBase patch.


Added code for Binary to Gray Conversion  and vice-versa in C,C++,Python and Java

Issue no #875
👨💻 Changes proposed

Added Code for Binary to Gray conversion and vice-versa in all 4 languages: C,C++,Java and Python

✔ Check List (Check all the applicable boxes)

[✅] My code follows the code style of this project.
[✅] This PR does not contain plagiarized content.
[✅] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

Output for C++ code:

Output for C code:

Output for Python code:

Output for Java code:

@Kumar-laxmi I have modified the file locations as you requested please review it once.


Allowed IPs under Authentication - DNS

Option to allow it to use DNS lookup and not just ip numbers

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3656453-allowed-ips-under-authentication-dns?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).

I do a new commit to this again to clear things out, its a bit annoying that ZNC only allow IP-Adress in "ZNC » webadmin » Edit User - Authentication - Allowed IPs" and not DNS Adress.
Because as many others i have dynamic ip, it changes quite often and because I like to have my ZNC safe so I let only my IP enter.
But every time this happens, I had to go in and change the IP manually in the config file and then restart ZNC which is very annoying.
Instead of just having it locked against a DNS address instead like znc.myhost.com which always has the current IP

I see two options here.

Disallow wildcards in the list; when a client connects, resolve all domains in the list, and match IPs. Domains may be prefetched before actual connect.

When client connects, lookup its PTR record, then lookup A/AAAA records for that client-controlled domain, then match IP of client to be in the list, and finally match the domain against the list. This option allows wildcards, but attempt to resolve domain controlled by an attacker perhaps can be harmful.

As hashed out on IRC with @DarthGandalf, this would look something like the following (subject to revision after feedback):

Zaba said:

it would probably be useful to explicitly distinguish IPs and hosts in the allowed list, so that 1.2.3.* doesn't match 1.2.3.example.com by accident (or malice)

Would wildcards like client.domain.* be allowed? I guess I was operating under the general assumption that IP wildcards come at the end of the IP, and domain wildcards come at the beginning.
Unless the idea is to have separate settings for "Allowed IPs" and "Allowed Hosts", which I would not oppose.

Also related: #207

From my perspective, you may want to do "Allowed IPs" as one option box, and "Allowed Hosts" as another, and have the system handle DNS resolution, and failing DNS resolution fall back to IPs.
Separating it in this way, as well, allows you to process CIDR subnets as well easier, so you aren't trying to figure what's an IP and what's not.


inter-region tutorial fix

This updates the inter_region_reports tutorial to use the zone flag instead of zones and extra_zones.
This addresses issue #3947 and issue #3746
It also updates references to Data Studio to instead reference Looker Studio, the new branding.

Sorry about the churn, looks like we were working on a fix at the same time. I have a general fix for the tutorials in progress
here which should allow flag_matrix_defs to work with multi string flags: https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/pull/4038. I'll look to submit this by early next week in which case this change may not be needed. Thanks!

No, worries, if there is a better fix on the way, I can close this PR.


"Error retrieving token" in new authentication

Describe The Bug:

I've been trying to set up the new authentication, but have run into an issue—both via ConfigUI and via homebridge-simplisafe3 login.
With ConfigUI, I can click "launch simplisafe login", log in on the simplisafe site, and get the com.SimpliSafe.mobile:// address.  When I paste that address into the "redirected URL field", an error pops up saying "Error retrieving token.  Please try again."
Via the command line, I can get the com.SimpliSafe.mobile:// address as with Config UI, but when I enter it, I get the following error:
An error occurred retrieving credentials: Error: Error getting token: Error: Request failed with status code 403     at SimpliSafe3AuthenticationManager.getToken (/usr/local/lib/node_modules/homebridge-simplisafe3/common/authManager.js:189:13)     at processTicksAndRejections (node:internal/process/task_queues:96:5)     at async Login.run (/usr/local/lib/node_modules/homebridge-simplisafe3/commands/login.js:58:7)     at async Login._run (/usr/local/lib/node_modules/homebridge-simplisafe3/node_modules/@oclif/command/lib/command.js:43:20)     at async Config.runCommand (/usr/local/lib/node_modules/homebridge-simplisafe3/node_modules/@oclif/config/lib/config.js:173:24)     at async Main.run (/usr/local/lib/node_modules/homebridge-simplisafe3/node_modules/@oclif/command/lib/main.js:27:9)     at async Main._run (/usr/local/lib/node_modules/homebridge-simplisafe3/node_modules/@oclif/command/lib/command.js:43:20)
To Reproduce:

Via ConfigUI: click "settings" on the Homebridge Simplisafe 3 plugin box on the plugins page.  Get redirect URL via "launch simplisafe login", then paste the redirected URL into the appropriate box.
Via command line: run homebridge-simplisafe3 login, get redirect URL, paste URL into command line.
Expected behavior:

Homebridge recognizes the redirect URL
Environment:

Plugin version<EMAIL_ADDRESS>Node.js Version:  v16.13.1
NPM Version:  8.1.2
Homebridge Version:
Operating System:

Homebridge Config:

{
    "name": "Home Alarm",
    "cameras": false,
    "sensorRefresh": 15,
    "persistAccessories": false,
    "resetSimpliSafeId": false,
    "cameraOptions": {
        "enableHwaccelRpi": false
    },
    "platform": "homebridge-simplisafe3.SimpliSafe 3"
}

Screenshots:

Not applicable
Logs:

Link to logs
[23/12/2021, 13:49:34] [Homebridge UI] [homebridge-simplisafe3] Incoming Request: /getAuthCodeFromUrl
[23/12/2021, 13:49:34] [Homebridge UI] [homebridge-simplisafe3] Incoming Request: /getToken
[23/12/2021, 13:49:34] [Homebridge UI] [homebridge-simplisafe3] Error: Error getting token: Error: Request failed with status code 403
    at SimpliSafe3AuthenticationManager.getToken (/usr/local/lib/node_modules/homebridge-simplisafe3/common/authManager.js:189:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async UiServer.getToken (/usr/local/lib/node_modules/homebridge-simplisafe3/homebridge-ui/server.js:65:11)
    at async UiServer.processRequest (/usr/local/lib/node_modules/homebridge-simplisafe3/node_modules/@homebridge/plugin-ui-utils/dist/server.js:75:30)
[23/12/2021, 13:51:02] [Homebridge UI] [homebridge-simplisafe3] Terminating child process...
[23/12/2021, 13:51:02] [Homebridge UI] [homebridge-simplisafe3] Child process ended

Hey @abraver seems like the plug-in is having trouble actually using the credentials you’re getting. Are you setting this up for the first time or was it working before? You definitely have a monitoring plan etc?

I tried again, disabling all Safari extensions, and it worked.  I guess it was just one of my extensions doing something weird...


Figanos should rescale logos/images to fit the intended purpose

Figanos doesn't use actual scaling; Using zoom will deteriorate the image since it doesn't perform any interpolation (from what I can see in the docs for OffsetImage), but given that it's a PNG, we should be able to scale it down and/or constrain it to a region with Matplotlib (an example of that here: https://stackoverflow.com/questions/16742111/scale-image-in-matplotlib-without-changing-the-axis).
Lowering the logo resolution is a double-edged sword, since maybe it looks fine on monitors or in a notebook, but it'll look bad in print (article, poster) form. This is the exact problem that Seaborn deals with using their set_context() method.
Matplotlib offers lots of ways of interpolating/rescaling images: https://matplotlib.org/stable/api/image_api.html (more if we consider using scipy). Maybe it's worth looking into?
Originally posted by @Zeitsperre in https://github.com/Ouranosinc/figanos/pull/119#discussion_r1353469114

I remember trying a lot of other different ways (like PIL and opencv) to change the logo resolution via python and the logo always came out blurry on the figure that's why I modified it outside code.  I don't know if I tried changing it via matplotlib.
Also offsetImage was convenient for the logo position since it didn't require to look at the data (like ax.imshow extend).
I think it would also be better to not have user ponder on image resolution and have a default option (screen) and other options like poster, report,... where we set ourselves the resolutions

Avez-vous contacté Catherine pour avoir une version plus appropriée du logo (résolution et/ou format) qui fonctionnerait mieux avec Figanos? À condition évidemment de déjà connaitre ce qui fonctionnerait le mieux...


Actuator not working with latest version

The actuator's endpoint configuration is relying on QuickFixJClientConfiguration which is deprecated.  if i use the new way to enable client or server this means this bean not enabled. The actuator is not working in this case.
@AutoConfigureAfter(QuickFixJClientConfiguration.class)
public class QuickFixJClientEndpointAutoConfiguration

Another issue is if i have muliple sessions, it only show one sessionSchedule in the health endpoint

@wtiann I've released https://github.com/esanchezros/quickfixj-spring-boot-starter/releases/tag/2.16.2 with the fix for the bug you raised. Please note enabling the actuator with the new way will need quickfixj.client.actuator.enable=true or quickfixj.server.actuator.enabled=true in the properties


Tool tip overlay placement anomalies and Missing Documentation points

Visiting https://codesandbox.io/s/github/carbon-design-system/carbon-web-components/tree/main/examples/codesandbox/cdn

I see that bx-tooltip has a div surrounding it with attribute data-floating-menu-container and style="position: relative;". I get Javascript errors if I try the same without that surrounding markup. Please update the documentation to make it clear that the surrounding markup is required.

The tooltip menu placement seems to be somewhat challenged. Using the above link with Chrome, the placement seems ok. Doing the same with FF, it shows up some distance below. In some cases, not evident it mapped and not useful. Seems a bug

Update ... I see the same wonky placement issue with chrome depending on surrounding markup. If I just add a Hey after the  in the example using the inspector, it looks like so:

Then, even on chrome, the placement is off. This makes the tipicon not usable at all in its current state. Please raise the priority of this if you can. Thanks


Add "Warn" as an additionalPrinterColumn to display the number of tests with "warn" output

The ClusterScan CRD has columns to show number of total, failed, pass and skipped tests. It should also show total number of warn tests here.

UI ticket: https://github.com/rancher/dashboard/issues/1864

This is added in the CRD, closing it to use UI issue to track this


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/28135

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/28135

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/51459


Draft PR - Issue 352 - Converting booleans to swich

Description
Migrated boolean parameters to switch parameters in order to provide a more consistent approach across all cmdlets.
Note: This has the possibility of providing breaking changes as the syntax of calling the parameters like '-Parameter $true' will no longer be supported.
For Example:
Export-RubrikVM -PowerOn $False will continue to run, however the $False gets assigned to the VM Name.
Get-RubrikOrganization -isGlobal $true will now fail.
Will need to ensure these are addressed in the release notes.
Cmdlets affected are Export-RubrikVM, Get-RubrikEvent, Get-RubrikOrganization, New-RubrikHost, New-RubrikMount, Set-RubrikMount, Set-RubrikNutanixVM, Set-RubrikSupportTunnel and Set-RubrikVM
Related Issue
This project only accepts pull requests related to open issues.

If suggesting a new feature or change, please discuss it in an issue first.
If fixing a bug, there should be an issue describing it with steps to reproduce

Issue 352
Motivation and Context
This provides a consistent approach for our end-users across all of the cmdlets.
How Has This Been Tested?

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc.

Tested within the TM lab on version 4.2 and 5.0
Screenshots (if appropriate):
Types of changes
What types of changes does your code introduce? Put an x in all the boxes that apply:

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:
Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTION document.
[x] I have updated the CHANGELOG file accordingly for the version that this merge modifies.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.

@jaapbrasser - you might want to have a close look at this one as it does introduce the ability to break existing scripts.  For the most part I think the cmdlets are ok - however Export-RubrikVM has changed quite a bit
Export-RubrikVM
Scripts that once passed a true/false to either DisableNetwork, RemoveNetworkDevices, KeepMacAddresses, UnregisterVM, PowerOn, RecoverTags will still run, however, the value of $true/$false will be assigned to vmName - therefore the name of the exported VM is True or False. I feel like this might be a possible issue
These need to be modified to say like Export-RubrikVM -id '111-222' -PowerOn:$false or -PowerOn:$true or simply -PowerOn
Even then, some API attributes have defaults - so even if you leave out the -PowerOn, the VM will be poweredOn.
We may want to proceed with this PR and possibly just exclude the changes on the Export-VM cmdlet ??


Refine construction scenarios

Currently refining using this spreadsheet

Scenarios selected by team:

Default Construction Scenario
"Enhanced Waste Management"
All Electric Jobsite (this one is designated as a try and do some preliminary research)
Off-Site Fabrication Emissions as compared to typical construction (this one is designated as a try and do some preliminary research)


Improve the build shell script and use it for myget

myget supports git-bash as well, so we can use a single build file.
This now packs the projects as well building and testing, and tests
the net451 configuration with dotnet test when on Windows.
Two environment variables (PrereleaseTag and NoVersionSuffix)
control what package version is built.

LGTM


Create Allowance holdings filter logic endpoint

Definition of Ready

[x] Does this meet the INVEST criteria?
[x] Does this have a clearly defined user?
[x] Does this have an estimate?
[x] Does this have acceptance criteria?
[x] Does this have sufficient context for the specific functionality being developed (design, business rules, etc.)
[x] Does this have a dev link been provided in the design?
[x] Is this traceable to a feature, epic, or PI?

User Story
As a custom data download user I want the allowance holdings filter logic endpoint to function So that the filter logic works on the custom data download
Acceptance Criteria
Given that a user has made a GET request to the allowance holdings filter logic endpoint
When the request is executed
Then the system returns the data elements listed below
Development Notes
The endpoint will have the following path:
/api/account-mgmt/allowance-holdings/attributes/applicable
Data Elements
vintageYear
programCode
accountNumber
accountType
facilityId
state
ownerOperator
Does this Story require 508 Testing?

[ ] Implementing a new authoring tool that will produce code / content for the application
[ ] Implementing a 3rd party widget that will be part of the application
[ ] Adding new / updating custom functionality
[ ] Adding new / updating a page template
[ ] Adding new / replacing existing functionality (unless the replacement has already passed 508 testing)
[ ] Full Site Review prior to a scheduled EPA 508 review
[ ] Planning a video that will appear on the application
[ ] Producing a video that will appear on the application
[ ] Producing Training materials
[ ] Producing documents

Context
(User journeys, design mockups, architectural diagrams, business rules, data element definitions)
Allowance Holdings:
SELECT DISTINCT ahd.vintage_year, af.prg_code, af.account_number, af.account_type, af.orispl_code, af.state, aod.own_display
FROM camddmw.allowance_holding_dim ahd
JOIN camddmw.account_fact af
ON ahd.account_number = af.account_number
AND ahd.prg_code = af.prg_code
LEFT JOIN camddmw.account_owner_dim aod
ON af.account_number = aod.account_number
AND af.prg_code = aod.prg_code
Assumptions: All holding dim records have a corresponding account fact record, there can be accounts with no owner information
Testing
Test Case: TC426
Tester: @JanellC
Definition of Done

[x] Have all Acceptance Criteria been agreed to and validated by the scrum team?
[x] Has the code been unit tested and peer reviewed?
[x] Have the functional tests been executed?
[x] Have all defects been reviewed and dispositioned, resolved, or deferred?
[x] Is the user story ready to be deployed to the test/staging environments?

TC426 passed @tlageman-epa  https://easey-dev.app.cloud.gov/api/account-mgmt/allowance-holdings/attributes/applicable


no charge if less than two minutes

Let's not charge if the duration of the log is less than two minutes.

@rultor release, tag is 0.3

@rultor release, tag is 0.3

@yegor256 OK, I will release it now. Please check the progress here

@rultor release, tag is 0.3

@yegor256 Done! FYI, the full log is here (took me 4min)

Oops! Job gh:yegor256/threecopies#13 was not in scope


Add waits in ListenerPrimaryTests to mitigate race with List.Add.

Same as #2038 but for 1.1.

Updated with backport of #1230. @Eilon This doesn't involve any product code change and stabilizes tests.

CI will fail but I verified locally that it builds by reverting 708c4ddcd90ba44a44f64325f65aea7e2c2745c3 (cc @pranavkm).

Build seems to be failing because of https://github.com/aspnet/KestrelHttpServer/commit/708c4ddcd90ba44a44f64325f65aea7e2c2745c3#commitcomment-23967740.

Updated with 30 second timeouts.


Fix width and height when CSS transform scale is not 1

Because patch af2c980 has a drop cursor width bug, which is easier to find when the width of the cursor is large and the scale is small, e.g. drop cursor width = 10 and scale = 0.5, then the width of the cursor is calculated as 40px. the same problem exists with the height.
I was trying to fix the width bug on top of patch, but it didn't work or caused a new bug, so in this PR I just kept the patch code that automatically calculates the scale value and reverted the rest of the code back to my modification, which works correctly.
I tried just removing the division by the scale from halfWidth/halfHeight doesn't seem to fix the problem either. I found another similar solution though in PR #20. Please check it out, thanks a lot!

You seem to just be largely reverting the code to your patch here. What exactly is the problem this is supposed to solve? If you want the cursor with to scale along with the transform, just removing the division by the scale from halfWidth/halfHeight should be enough.

Because patch af2c980 has a drop cursor width bug, which is easier to find when the width of the cursor is large and the scale is small, e.g. drop cursor width = 10 and scale = 0.5, then the width of the cursor is calculated as 40px. the same problem exists with the height.
I was trying to fix the width bug on top of patch, but it didn't work or caused a new bug, so in this PR I just kept the patch code that automatically calculates the scale value and reverted the rest of the code back to my modification, which works correctly.
I tried just removing the division by the scale from halfWidth/halfHeight doesn't seem to fix the problem either. I found another similar solution though in PR https://github.com/ProseMirror/prosemirror-dropcursor/pull/20. Please check it out, thanks a lot!


fix(graph): check for null decorator arg

Changes

Adds a null check to the graph visitor to check for null decorator arguments.

Flags

Screenshots or Video

Related Issues

Issue #
Pull Request #

Author Checklist

[ ] Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
[ ] Vital features and changes captured in unit and/or integration tests
[ ] Commits messages follow AP format
[ ] Extend the documentation, if necessary
[ ] Merging to main from fork:branchname

coverage: 98.768% (+0.001%) from 98.767%
when pulling 3821e95a075664b443bda528a74babb952874052 on ds-decorator-null-arg
into cc70faed167ef2f17e53c17ff4358b38f9b4fce4 on main.


Missing operator icons

As per Microsoft/sqlopsstudio#1061
These operators are always represented as a generic grey square:

Bitmap
Catchall
COND
Population Query
Sequence Project
Snapshot

These operators have no icon at all:

Adaptive Join
Batch Hash Table Build
Clustered Index Merge
Deleted Scan
Index Delete
Index Insert
Index Spool
Index Update
Table Merge
UDX
Window Aggregate
Window Spool

See https://sqlserverfast.com/epr/operator-list/ for a list of operators / icons


Add distinct operator

This should be able to filter out values when they're not distinct. Instead of just using reference equality there could be an isDistinct predicate function input.
So the default usage may be: distinct((a, b) => a === b)

Isnt distinct a combination of scan and skipwhile?

This can indeed be done using scan and filter and a subsequent map. (All take and skip operators will permanently skip or take values, so for instance skipWhile will let values through once the predicate has failed just once)
I think this is a very common operation to create, so I feel like it should be simplified.

In case it helps anyone, here is my naive implementation:
const eq = (lhs: unknown, rhs: unknown) => lhs === rhs;
const distinct = <T>(source: Source<T>, compare = eq) =>
  pipe(
    source,
    scan((acc, v) => [acc.pop()!, v], [] as T[]),
    filter(([prev, val]) => !compare(prev, val)),
    map(([_, val]) => val)
  );

// usage
pipe(
  fromArray([1, 2, 3, 4, 5, 6, 7, 8]),
  map((v) => Math.floor(v / 4)),
  distinct,
  forEach(console.log)
);

// without distinct: logs 0, 0, 0, 1, 1, 1, 1, 2
// with distinct: logs 0, 1, 2

Bonus points for a more concise variant that re-uses the accumulator instead of recreating it.


New icon: company bike

[x] I have carefully read and followed CONTRIBUTING document.

URL of the site:
https://company-bike.com
https://company.bike

Proof of the Aegis-compatible 2FA:

Logo / icon info:
https://company-bike.com/presseportal/

Background color info:
It's from the logo: 00a5c5

Not an easy choice, took Dark pastel blue in the end:

alright! looks good


net/http: parameterized Routes in Handle

This is a feature request and not a bug.
As is a basic requirement during path matching, can defining a path parameter be allowed in http.Handle and getting the value of the passed parameter in the request as a map[string]string be allowed?

As far as I know, http.ServeMux is a simple router and should stay that way. If you want more advanced features, there are a ton of routers out there that you can use, such as https://github.com/go-chi/chi and https://github.com/gorilla/mux.

I would agree if this was a use case which is not encountered often enough. While I can use 3rd party routers, they do a lot  more stuff under the wraps, causing some overhead. I would prefer not to go through that if possible.
Although if you or anyone could provide a router/Mux with comparable runtime performance, I would appreciate that too

A feature that seems fundamental to one may seem useless to another. You can't have a router that is both useful and free of bloat to everyone's standards.
Have you measured performance on third-party routers to be orders of magnitude slower than that of ServeMux? I would be surprised if it were the case, or if it even mattered in most use cases. I also suspect that the introduction of path arguments and maps would incur extra work and a slow-down no matter what.
As said before, I don't know where the line is drawn for ServeMux. I'm simply trying to point out that adding more features can be a slippery slope, and you already have good alternatives elsewhere.

Sorry, http.ServeMux's feature set is frozen, at least for Go 1.
I'll leave this open to consider for later.

I hope to add this feature in Go2.
If the std library supplies it, I don't need to import the third-party router.

A router in stdlib would be sweet IMHO, they're honestly all pretty much the same, barring internal performance differences etc.

You think a simple util would help?
http.HandleFunc("/users/", func (w http.ResponseWriter, r *http.Request) {
    a := r.VarPath(0) // given "/users/", a == "users"
    b := r.VarPath(1) // given "/users/123", b == "123"
    c := r.VarPath(2) // given "/users/123/something", c == "something"
})

At least you can manually check the value inside a handler and call another handler, and everything continues simple.

It's pretty much the only thing that stops me and my team from using the default mux.
Sure chi is fine, but it's stil la third-party to rely on.

see https://github.com/golang/go/discussions/60227 for the current discussions

Closing in favor of #60227.


GoToMeeting with added postinstall_script which adds /Applications/Go…

…ToMeeting.app as a symlink to the .app which includes a build number. The goal is to add GoToMeeting via a Dock-profile through an MDM.

Changing back to the original pull request.


Can Zipkin support AWS Opensearch?

Feature
Can Zipkin support AWS Opensearch?
Rationale
Elasticsearch has changed license and it is not open source project anymore, AWS Opensearch is open source project and it is almost the same as elasticsearch7.10, but it failed to use opensearch directly with Zipkin because Zipkin check the version and only accept ES 5-7.X, opensearch latest version is 1.2.

@reta we own the client here so can make whatever changes we need. I don't think we should add a native client because then we have double maintenance and probably there will be dependencies which makes it not viable for the slim build. We have a lot of armeria here to leverage and that extends to self-tracing, boringssl, etc all made for elasticsearch and probably not wise to jump into something else unless we must.
My suggestion is to make a separate module, sure, but keep the same code. Only new tests and builder-specific stuff should be in the opensearch module, as well we'll need a new test image with the same base layer as the others.
don't forget that if we "support" this, it means we need the spark job updated. That means either swapping its existing native client out with one that also works with opensearch, or using two clients and dealing with dep alignment.
Do you mind giving a try to make this a drop in first? I think that's the best way, and conserves our energy! If we fail, we fail..

@AndrewFarley for the very specific issue here, yeah I agree that we should have a "force version" setting, because we still need to pick a version to emulate. This would be handy in case a contributor stops being active in maintenance (as happened with me in the past), a future version that's compatible with the others yet in a different scheme.. this doesn't stop us in our tracks. That said..
@reta I think that a version translator which isn't terribly high maintenance will help. We might be able to say "future versions of ES are assumed to work without maintenance", so use numeric expressions (e.g. 10 and 9 are assumed to work with 8 schema). This at least gives folks a chance for things to work imho

ps @kendarkfire sorry for being not really aware of naming, but is opensearch "AWS opensearch" or is "AWS Opensearch" when you use it on hosted AWS? One thing that would be nice to get out of this issue is a full scope of things folks want. I'm guessing:

opensearch in general (like k8s or vm or whatever)
AWS hosted opensearch (?)
somebody else hosted opensearch (custom auth?)

@reta we own the client here so can make whatever changes we need. I don't think we should add a native client because then we have double maintenance and probably there will be dependencies which makes it not viable for the slim build.

@codefromthecrypt makes perfect sense, it think that should work, since we don't use any ES specific features that OS does not have

@reta a hint here is that we made LazyHttpClient to allow aws variant to customize things. It is perfectly fine to add things to the ElasticsearchStorage component that make this easier for you to achieve. swapping a function or two may let this all work.


Want to add a Drum Kit Project

I want to add this project under GSSOC'22.
Have a look into it.
https://vipin-creator.github.io/Drum-Kit/

It already exists. Feel free to raise another issue.


Release latest GA (2021-09-16)

Why
Releases latest GA to prod.
How
Checked on dev and testnet hosts.
References
https://discord.com/channels/404106811252408320/730418759298318346/888458893657784390

Looks good to me

Ugg.. Merging was blocked...

Nice. Glad to see Nebras will be updated soon. On the network...
| maker      | not challenged | online | pct                |
| ---------- | -------------- | ------ | ------------------ |
| helium-old | 669            | 13238  | 5.053633479377549  |
| nebra      | 2815           | 6099   | 46.15510739465486  |
| helium     | 46             | 904    | 5.0884955752212395 |

46% of nebra miners (online hotspots that have nebra's maker key as the add gateway payer) don't have a recent challenge on chain. helium maker key data above for reference.


Update examples

Most of our go SDK examples are depending on an old version of numaflow-go. Should update to the latest.

The udf example links still point towards the old version of the sdk
https://pkg.go.dev/github.com/numaproj/numaflow-go/pkg/function
can we please update this ?


[GSSoC'23][Adding new project] Memory Card game

Description

Memory Game, also known as the Concentration card game or Matching Game, is a classic card-flipping game where players test their memory skills by matching cards. The game aims to flip over two cards at a time and find all the matching pairs within the specified number of moves.

Screenshots

Additional information
Functionalities:

You will start by flipping over one card
If the next card you flip matches, both the cards will stay flipped and moves increases by 1.
If the next card you flip does not match, the cards flip back.
The game continues until you match all the cards on the board.
Timer will be running for 5 minutes, after this the game ends.move

Hi @BhumicaPG ,I have assigned this task to you. Kindly complete within a week. Make sure you will make your game in react because it's react based repository. Good luck!

I've completed the task and sent a pull request, I hope it gets merged soon.
Thank you ☺
On Wed, 19 Jul, 2023, 9:46 am Pratigya Panwar, @.***>
wrote:

Hi @BhumicaPG https://github.com/BhumicaPG ,I have assigned this task
to you. Kindly complete within a week. Make sure you will make your game in
react because it's react based repository. Good luck!
—
Reply to this email directly, view it on GitHub
https://github.com/ssitvit/Games-and-Go/issues/802#issuecomment-1641387396,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWY3E5JCWAURNTXKTZBIU2TXQ5NR5ANCNFSM6AAAAAA2LCBNLY
.
You are receiving this because you were mentioned.Message ID:
@.***>


Display resolve or reject value/reason in toast.promise resolve

Hello,
is there any possibility to display the resolve or reject return/value/reason?
I build a wrapper for the wc-toast component to be able to change settings and other stuff more easily.
I now want to display the reject or resolve reason/value after the loading toast instead of a fixed message.
Is there any possibility to archive this?
const notify = (type, message, options, promiseFunction) => {
    let promiseLoadingMessage = ""
    let promiseSuccessMessage = ""
    let promiseErrorMessage = ""

    if(promiseFunction){
        promiseLoadingMessage = message.loading
        promiseSuccessMessage = message.success
        promiseErrorMessage = message.error
    }

    if(!options) {
        options = { "duration": toastDuration }
    }

    switch (type) {
        case 'loading': toast.loading(message, options)
            break;
        case 'success': toast.success(message, options)
            break;
        case 'error': toast.error(message, options)
            break;
        case 'promise':
            toast.promise(
                new Promise((resolve, reject) => {
                    promiseFunction(resolve, reject)
                }),
                {
                    loading: promiseLoadingMessage,
                    success: promiseSuccessMessage,
                    error: { message: "promiseErrorMessage", duration: 10000 }
                }
            )
            .then((message) => {
                toast.success(message)
            })
            .error((message) => {
                toast.success(message)
            })
            break;
    }
}

An alternative is to not display a error or success message and add them as a .then like this:
            toast.promise(
                new Promise((resolve, reject) => {
                    promiseFunction(resolve, reject)
                }),
                {
                    loading: promiseLoadingMessage
                }
            )
            .then((message) => {
                toast.success(message)
            })
            .error((message) => {
                toast.error(message)
            })

In this case the toast will display a success, doesnt matter if i reject or resolve in my promiseFunction(), but i think this is something that can be solved.

Hi @debritde, thanks for your report, my suggestion is to create your own toast.promise implementation, since toast.promise it's just simple wrapper for showing static message, you can create your own like this:
try {
  const result= await new Promise((resolve, reject) => {
    const random = Math.round(Math.random() * 10);
    if (random % 2 === 0) {
      resolve({ data: 'hello', message: `success-${random}` });
    } else {
      reject({ data: null, message: `error-${random}` });
    }
  });
  toast.success(result.message);
} catch (error) {
  toast.error(error.message);
}

See: https://stackblitz.com/edit/react-ts-t9rtww?file=index.tsx%3AL26
I hope it helps!

Hello @abdmmar,
thanks for your answer.
This is not really what i need. In your example the loading toast is missing.
I want the loading notification to be shown as long as the promise is not reolved.
I also, in the best case, want to implement it in my wrapper component like i shown above.
Is there maybe a way to show a loading animation and end it manually?


Fix #126: Provide tox.ini for documentation

This PR contains the following change and fixes #126 :

Add "docs" target to run sphinx and output HTML
Provide docs/requirements.txt file
Fix typo in docs/conf.py

Some comments:

You could run the docs target through Travis, same as with the other targets. However, I wasn't sure if this would be useful for you, because you may create the doc with something else.
I've provided a separate requirements.txt file only for documentation. That way you can add whatever is needed without changing the tox.ini file.
The result of the build can be found at dist/docs.

Any news on this PR? :wink: Do you need help?


Error downloading account name

[04-04-2017 18:00] Error downloading account name, exception details: System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:00] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:01] Error downloading account name, exception details: System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:01] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:04] Error downloading account name, exception details: System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:04] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:06] Error downloading account name, exception details: System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:06] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:06] System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:07] Error downloading account name, exception details: System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:07] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:12] Error downloading account name, exception details: System.ApplicationException: Unable to deserialize object
at POEApi.Model.POEModel.GetProperObjectFromTransport[T](Stream networkData)
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:12] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:17] Error downloading account name, exception details: System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at POEApi.Transport.HttpTransport.GetAccountName()
at POEApi.Model.POEModel.GetAccountName()
[04-04-2017 18:17] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName()
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[04-04-2017 18:19] System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at POEApi.Transport.HttpTransport.Authenticate(String email, SecureString password, Boolean useSessionID)
at POEApi.Model.POEModel.Authenticate(String email, SecureString password, Boolean offline, Boolean useSessionID)
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()

The operation has timed out

This is a network related issue, are you sure a firewall or similar is not blocking Procurement from reaching pathofexile.com ?


ModMenu crashes when attempting to launch Minecraft

crash-2021-04-30_20.44.22-server.txt
I'm still unsure of what happened or the cause of this crash.

I did try it, but it still didn't work. I did found the reason why it doesn't work, and it's not because I'm using an old version of ModMenu; ModMenu doesn't support FastChests.
FastChests is a mod that optimizes the chests to a huge margin, and ModMenu doesn't appear to support it.
I hope I get a word soon about this and hopefully even support for it.

Please send the new crash report that you're getting now, if it's different from before.

I can't reproduce this with<EMAIL_ADDRESS>and<EMAIL_ADDRESS>Please reopen this issue if you still encounter this crash.


Bugs of ol4j.mdx.parser

Hello, i'm doing a project about MDX parser.
When I use MdxParser to parse a MDX statement to a parseTree, I find some bugs.
Those statements contain follow parts can not be parsed.

"Having"
"("xxx")"
"$"

You are correct that the parser doesn't handle the HAVING clause. We would welcome a contribution that could handle that.
The other two examples don't look like valid MDX to me.


OIDC: Allow SHA in job_workflow_ref claim.

Resolves https://github.com/pypa/gh-action-pypi-publish/issues/173.
Sometimes we receive an OIDC token where the ref claim is an empty string and the job_workflow_ref claim takes the form {owner}/{repo}/.github/workflows/{filename}@{sha} rather than {owner}/{repo}/.github/workflows/{filename}@{ref}. It's currently unclear why/when this happens.
Since the job_workflow_ref claim can still be considered valid if it contains the SHA, we can expand our validation of it to check for the form containing the SHA.
This PR also makes the sha claim a required unverifiable claim, and removes the Sentry message introduced in #14333.

Huh, was not expecting to be able to accidentally push to main with this...


Descriptions containing unicode characters gets encoded

After some testing, I got unlucky with superb with a description containing an apostrophe.
Yeoman seems to encode Unicode characters to be HTML-safe.
My cat's meow module
package.json:
{
  "description": "My cat's meow module"
}

readme.md:
> My cat's meow module

It does not break the package.json file, nor the readme rendering though.
Related: #59 #60

This is an edge-case, so I'm most likely not going to look into this. But a PR is always welcome.

did some testing, checked which chars would break package.json
Tested:
& é ~ " # ' { ( [ - | è ` _ \ ç ^ à @ ) ] ° = + } ¨ $ £ ¤ ù % * µ < > , ? ; . : / ! § a ã ä â à

Ones that gets HTML-encoded:
& " ' < >

One that does not get encoded but still break
\

Emojis seems to work as expected.
There will always be some random unicode chars that will always break it, but that's too edgy, no one really care.
Escaping is not enough (they still get converted by yeoman when using fs.copyTpl
I can do a PR that simply replace these with a space.


Force Android Ninja builds on CircleCI to only use 4 concurrent jobs

LGTM
Just found that CMake 3.11 provides these options for more fine-tuning
-DCMAKE_JOB_POOL_COMPILE:STRING=compile
-DCMAKE_JOB_POOL_LINK:STRING=link
'-DCMAKE_JOB_POOLS:STRING=compile=5;link=2'

https://stackoverflow.com/questions/51557585/limit-cpu-cores-for-ndkbuild-with-cmake-and-ninja

Still isn't limiting concurrency like we want.
Changing the make program like I tried doesn't work because the make program variable is called within quotes, as if its a file name.
The current version of CMake in the NDK is 3.6, so we can't use any features introduced later than that. I do see that CMake 3.6 has JOB_POOLS documented (https://cmake.org/cmake/help/v3.6/prop_gbl/JOB_POOLS.html) so that might still work, but it currently isn't. It might just not be entering the conditional block at all.

By the way I'm testing this by SSHing into the CircleCI job and watching top during the native compile task.  The change to the build configuration is very localized and readable and the build times don't seem noticeably slower with "compile pool" of 4 jobs and a "link pool" of 2 jobs.


"Reflected list" is being deprecated when there is no reflection?

Hi,
When I run this code:
@njit
def test(arr):
	return [0]
test([0])

I get the error:
 Encountered the use of a type that is scheduled for deprecation: type 'reflected list' found for argument 'arr' of function 'test'.

However, I think this is a false positive given that there is no reflection being performed in the function. Is this behavior genuinely being deprecated, and if so, should it in fact be deprecated? It seems find to me to allow this given that the list isn't being written to at all, but I"m not sure what all the implications are.
Thank you!

Thanks for the report. The warning is issued based on finding an inferred type of reflected list, all lists passed as arguments will be this type irrespective of whether they are mutated. The reason in part for this, specific to this case, is that it is hard in general to tell if a list is being mutated (consider aliasing or a write in a branch based taken based on the value of an input argument).
The behaviour above will cease to work once numba.typed.List is implemented and list reflection is removed so I think the above message is valid.

Wouldn't it be easy to detect if a list might be potentially mutated at least (regardless of whether branches are actually taken), and, if it is not, then allow it to be used without reflection? It seems quite reasonable for the above code to keep working on that basis...

Reflection happens eagerly when a list is passed as argument to a jit'ed function irregardless of whether the list is used.  But you are right that this type of non-mutating list usage should keep working.

At jit-time it should be easy to tell that that there is no write instruction to the list in the body, in which case reflection should always be suppressed for that argument. There's no need to perform reflection all the time.

Only for some types.  Others like array types, the mutation is far too complicated to detect.  One worry is that a conservative detection will make it difficult for users to understand what works and what doesn't.

But you are right that this type of non-mutating list usage should keep working.

After discussing with the core devs, I recalled why even non-mutating list is going to be a challenge.

When a Python list is used as argument to a jit'ed function, every item it holds must be scanned to determine the type.  This leads to an unexpected performance hit for the users.  If it's a list of heterogeneous types, the types will be coerced, which is the current behavior but also unexpected for users.
Mutation is hard to detect for the general case.  For a non-nested list of immutable types (i.e. ints, floats), the only mutation is by direct mutation on the list.  That is the simple case.  (Maybe we can do something special for this case.)  For others, there are indirect mutations, such as self-mutating methods in element of the list.

The current plan is to switch to a more explicit form for handling list.  Such that users can better control the type and better understand when costly operations are performed.
For details, please see http://numba.pydata.org/numba-doc/latest/reference/deprecation.html?highlight=deprecation#deprecation-of-reflection-for-list-and-set-types.  And, please let us know what you think.

Thanks. Yup I read that page before coming here; it specifically talks about deprecation of reflection which reinforced to me the notion that non-reflected lists shouldn't be disallowed.
Re: mutation being hard to detect: again, you don't need to. The rules only need to be exactly the same as final in Java or const for variables in C/C++ -- as long as you don't even pretend to write to the the target, the code is valid. Beginners tend to grasp this pretty easily. (Although I would also debate the notion that the target of the library should be beginners who are new to programming...)
Re: indirect mutations: this does sound like potentially a genuine problem, I'm not sure I see how it arises in the first place (and I also think it shouldn't preclude arrays of primitives). Can a list of arbitrary objects be passed to nopython code? Would you mind providing an example of the situation?
Re: scanning being O(n): this is the most compelling argument to me. In terms of homogeneity here, I agree it must be a requirement (it should just be an error otherwise), but scanning genuinely can't be avoided altogether. Can I ask what the "more explicit" forms would look like in the new plan?
Thanks!

The pattern for list support we are aiming for (will take several steps due to the need to deprecate the existing support) will be similar to how we implemented dictionary support:
http://numba.pydata.org/numba-doc/latest/reference/pysupported.html#dict
For lists it will go something like:

Within nopython mode, creating a list literal ([1, 2]) will create a typed list where the element type is known.  Numba's type inference will determine this type from the way the list is used.
A list returning from nopython mode will be boxed into a numba.typed.List object which functionally behaves like a list, but uses an internal storage that has no Python objects.  These typed list objects can be passed with minimal overhead to other Numba-compiled functions, or used directly from the Python interpreter.  (Interpreter get/set item will necessarily have more overhead than a Python list because Numba will have to unbox and box elements on their way in and out.)
Users can convert their Python list to a Numba typed list outside of nopython mode in order to take the conversion hit only once at a location of their choosing in the code, rather than having to do it on entry to every Numba-compiled function.

Interesting, thanks. Tangent, but out of curiosity, why not just use array.array instead of a custom numba.typed.List type? It's already serving the role of being a homogeneous list that behaves like list.

The list element type in a Numba typed list will be any type that Numba supports, not just simple scalars.  So it will be possible to make things like List[List[int]] or List[Dict[int, str]].

Oh whoa I see, I didn't realize that. I think the approach overall makes sense then. The (more minor) concerns I have are that (a) there's no chance for the user to opt-in to the current default behavior if that's really what they wanted all along, and (b) explicit conversion by users might be slower than automatic conversion for smaller containers. They're not big deals but given that the current behavior still has its uses it'd be nice if it could be opted-in somehow.

Another useful feature of the typed list will be, that it can grow as you append items to it, so you will not need to know ahead of time, how big it should be.

But you are right that this type of non-mutating list usage should keep working.

After discussing with the core devs, I recalled why even non-mutating list is going to be a challenge.

When a Python list is used as argument to a jit'ed function, every item it holds must be scanned to determine the type.  This leads to an unexpected performance hit for the users.  If it's a list of heterogeneous types, the types will be coerced, which is the current behavior but also unexpected for users.
Mutation is hard to detect for the general case.  For a non-nested list of immutable types (i.e. ints, floats), the only mutation is by direct mutation on the list.  That is the simple case.  (Maybe we can do something special for this case.)  For others, there are indirect mutations, such as self-mutating methods in element of the list.

A common pattern I have seen is small read-only lists of scalars passed to Numba functions. For example, a list of parameters for computation, list of file names, etc. Unboxing the list into typed list is not performance critical. Can we support this pattern?

I'm in this situation where I have a function (_sum()) that must support both arrays and lists, seamlessly. There is no reflection, I'm just reading what's in the array/list.
The array_or_list is something that users will provide, and it may be big: I don't want to convert it to an array or a typed list.
What is the recommended solution here?  With the reflected lists deprecation, are we loosing the ability to deal with arrays and lists in a unified manner?
from numba import njit
import numpy as np

@njit
def _sum(array_or_list):
    out = 0
    for i in range(len(array_or_list)):
        out += array_or_list[i]
    return out

def work(array_or_list):
    # do stuff

    s = _sum(array_or_list)

    # do other stuff

work(np.array([1, 2]))
work([1, 2])  # throws pending dep warning

In the current, as of Numba 0.45, situation, if your user passes a standard Python list to the _sum function Numba will have to unbox the list before use in the jitted code. Unboxing is the terminology used to describe creating a Numba internal list representation and then converting each element of the Python list into a native value and put that into the internal list representation. In the future situation (which you can also do now, electively, with numba.typed.List), there is no automatic conversion from a standard Python list to a internal list, instead a user has to declare the list type and build it for use in e.g. _sum, i.e. do the unboxing process by virtue of using the new typed.List. With time I anticipate convenience methods to help do this will be added.
One way right now of handling this might be:
from numba import njit, typeof
from numba.typed import List
import numpy as np

@njit
def _sum(array_or_list):
    out = 0
    for i in range(len(array_or_list)):
        out += array_or_list[i]
    return out

def fix_array_or_list(l, dtype=None):
    if isinstance(l, np.ndarray):
        return l

    if not l:
        raise ValueError("List must contain at least one element")
    if dtype is None:
        dt = typeof(l[0])
    else:
        dt = dtype
    new_list = List.empty_list(dt)
    for x in l:
        new_list.append(x)
    return new_list

def work(array_or_list):
    # do stuff
    new_array_or_list = fix_array_or_list(array_or_list)
    s = _sum(new_array_or_list)

    # do other stuff

work(np.array([1, 2]))
work([1, 2])

After some feedback and thought on this, we are leaning toward solving this by have an "immutable typed list" and Python list arguments will be cast to that form.  If the list is modified, a compilation error would be raised.  The fundamental problem with reflected lists is the mutation, the performance issue with unboxing a Python list is a secondary issue.

Thank you both for the insightful feedback.
Would the new "immutable typed list" also involve an O(n) unboxing?
I wanted to avoid converting to a numpy array specifically to avoid copying / unboxing, but if unboxing always happens then I might just always convert to an array (with the assumption that np.asarray() is as fast as numba's unboxing?)

Yes, it would involve O(n) unboxing, just as reflected lists do today.

Closing this issue as it seems to be resolved. If this is not the case please re-open with a comment about any item that appears to be unresolved. Many thanks.


[WW-5327] Stop using JavaBeans notation for setters in SecurityMemberAccess & MemberAccessValueStack

Closes WW-5327

@JCgH4164838Gh792C124B5 @gregh3269 @kusalk could you take a look?

Seems OK.  Running from the branch directly.


Created operationsonstack.c file in DSA_USING_C

hacktoberfest,Please merge my PR.

Please merge my PR.


Add config point to support raw JSON as unions

Right now, users can't supply raw JSON for union members because Fern is expecting a _visit property on the member. For some use cases, this is confusing!

+1

this now exists!


Update install-on-multiple-vm.md

According to playbook in test-infra for provisioning, enabling or disabling KinD cluster shall be achieved by
kind.enabled not kind.enable (reference).
However, the document had kind.enable which sets up a KinD cluster that overwrites the current kubeconfig which I had. This seems not to be an expected behavior.

@electrocucaracha Are you fine with this change? In the master branch, it is kind.enabled for test-infra.

@electrocucaracha Are you fine with this change? In the master branch, it is kind.enabled for test-infra.

@arora-sagar that's correct, the default value is defined here
/lgtm

@isu-kim could you sign the CLA or CCLA to be able to merge this change

@electrocucaracha I have just signed ICLA, since I am currently in a university lab that does not belong as a corporate.
If ICLA is not allowed, I will contact my supervisor for a reference for CCLA.
However, as mentioned in PR #120, I had no "details" button next to EasyCLA.
[reference below:]

@nyrahul Can you finish the EasyCLA process?

I think my EasyCLA is already done (since my PR in nephio repo is already merged and where I had followed that process). I think this PR is awaiting approval from maintainers before the easycla check can be done. Typically if the EasyCLA fails it provides the "details" link which is not provided in this case.
Btw, it seems EasyCLA is not working for any PRs in this repo.

Therefore, I have signed using the original nephio repo's PR EasyCLA "details" button.
(Since in that PR, there was one)
If I have made a mistake or anything goes wrong, please let me know.

/check-cla

/easycla

/approve
/lgtm


 Watch support?

Hey Calle, I love Tofu and I tell people about it as much as I can (...just like people who eat tofu, lol). I recently purchased an  Watch and I was wondering if support for it was in the pipeline.

Hey @NetOperatorWibby, I'm happy you enjoy using Tofu and thanks for spreading the word about it! 😃 I haven't planned any time to work a watch extension but I'm definitely not opposed to one and if I get some time over I might work on it.


how to set options

Dear Rios,
thanks for your great work, I can run it in my Mac computer now.
Here I have one more questions:
where can we set the output options like the metamap originally have, eg: set semtype to dysn only...

Im out of town right now but you can see supported types in the commens in this file: pymetamap/SubprocessBackend.py
It should be simple to add extra features. If you have any issues, then when i get back i can implement whatever you need

I have added one command in SubprocessBckend.py, but ended up with no results output. could you please take a look at my code in the third line which I added?
        command = [self.metamap_filename, '-N']
        command.append('-Q')
        command.append('-J dsyn,neop') # added option for select specific semtype
        command.append(str(composite_phrase))

I resolved the problem
that is because I accidentally inserted the new line between "-Q" and the "composite_phrase".
thanks all the same :)

Awesome! Glad you got it working!


Absurdly slow response time for /paths endpoint on custom Horizon deployment.

Playing around with the /paths endpoint I noticed today that our custom Horizon deployment has absurdly slow response times when calculating paths.
Below query takes 75-90 seconds on our deployment. On public SDF Horizon it only takes 6 seconds. What could be causing this? The machine is extremely fast (AMD EPYC, 48 cores, 3TB SSD, 128GB RAM) and I'm suspecting it could be some PostgreSQL settings/configuration? (EDIT: It's not, see first comment below).
Any ideas would be highly appreciated.
Slow endpoint:
time curl -v "http://localhost:8000/paths?source_account=GDUMWJ3ISSVBKGZHVQZRVUN6TUOJETXDV7POKVNXEYBCRN4CQOYCV5AA&destination_account=GDUMWJ3ISSVBKGZHVQZRVUN6TUOJETXDV7POKVNXEYBCRN4CQOYCV5AA&destination_asset_type=credit_alphanum4&destination_asset_code=BTC&destination_asset_issuer=GBSTRH4QOTWNSVA6E4HFERETX4ZLSR3CIUBLK7AXYII277PFJC4BBYOG&destination_amount=0.01".
Horizon logs confirm slow processing time:
Start:
time="2019-02-21T11:47:24.993Z" level=info msg="Starting request" client_name= client_version= forwarded_ip= host="localhost:8000" ip=<IP_ADDRESS> ip_port="<IP_ADDRESS>:35696" method=GET path="/paths?...

Finish:
time="2019-02-21T11:48:40.327Z" level=info msg="Finished request" bytes=14631 client_name= client_version= duration=75.332587881 forwarded_ip= host="localhost:8000" ip=<IP_ADDRESS> ip_port="<IP_ADDRESS>:35696" method=GET path="/paths?...

Here are the relevant segments of our postgresql.conf:
#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------

# - Memory -

shared_buffers = 24GB			# min 128kB
					# (change requires restart)
#huge_pages = try			# on, off, or try
					# (change requires restart)
#temp_buffers = 8MB			# min 800kB
#max_prepared_transactions = 0		# zero disables the feature
					# (change requires restart)
# Caution: it is not advisable to set max_prepared_transactions nonzero unless
# you actively intend to use prepared transactions.
work_mem = 64MB				# min 64kB
maintenance_work_mem = 32GB		# min 1MB
#replacement_sort_tuples = 150000	# limits use of replacement selection sort
#autovacuum_work_mem = -1		# min 1MB, or -1 to use maintenance_work_mem
max_stack_depth = 4MB			# min 100kB
dynamic_shared_memory_type = posix	# the default is the first option
					# supported by the operating system:
					#   posix
					#   sysv
					#   windows
					#   mmap
					# use none to disable dynamic shared memory
					# (change requires restart)

# - Disk -

#temp_file_limit = -1			# limits per-process temp file space
					# in kB, or -1 for no limit

# - Kernel Resource Usage -

#max_files_per_process = 1000		# min 25
					# (change requires restart)
#shared_preload_libraries = ''		# (change requires restart)

# - Cost-Based Vacuum Delay -

#vacuum_cost_delay = 0			# 0-100 milliseconds
#vacuum_cost_page_hit = 1		# 0-10000 credits
#vacuum_cost_page_miss = 10		# 0-10000 credits
#vacuum_cost_page_dirty = 20		# 0-10000 credits
#vacuum_cost_limit = 200		# 1-10000 credits

# - Background Writer -

#bgwriter_delay = 200ms			# 10-10000ms between rounds
#bgwriter_lru_maxpages = 100		# 0-1000 max buffers written/round
#bgwriter_lru_multiplier = 2.0		# 0-10.0 multiplier on buffers scanned/round
#bgwriter_flush_after = 512kB		# measured in pages, 0 disables

# - Asynchronous Behavior -

#effective_io_concurrency = 1		# 1-1000; 0 disables prefetching
#max_worker_processes = 8		# (change requires restart)
#max_parallel_workers_per_gather = 0	# taken from max_worker_processes
#old_snapshot_threshold = -1		# 1min-60d; -1 disables; 0 is immediate
					# (change requires restart)
#backend_flush_after = 0		# measured in pages, 0 disables

#------------------------------------------------------------------------------
# QUERY TUNING
#------------------------------------------------------------------------------

# - Planner Method Configuration -

#enable_bitmapscan = on
#enable_hashagg = on
#enable_hashjoin = on
#enable_indexscan = on
#enable_indexonlyscan = on
#enable_material = on
#enable_mergejoin = on
#enable_nestloop = on
#enable_seqscan = on
#enable_sort = on
#enable_tidscan = on

# - Planner Cost Constants -

#seq_page_cost = 1.0			# measured on an arbitrary scale
random_page_cost = 1.0			# same scale as above
#cpu_tuple_cost = 0.01			# same scale as above
#cpu_index_tuple_cost = 0.005		# same scale as above
#cpu_operator_cost = 0.0025		# same scale as above
#parallel_tuple_cost = 0.1		# same scale as above
#parallel_setup_cost = 1000.0	# same scale as above
#min_parallel_relation_size = 8MB
#effective_cache_size = 4GB

# - Genetic Query Optimizer -

#geqo = on
#geqo_threshold = 12
#geqo_effort = 5			# range 1-10
#geqo_pool_size = 0			# selects default based on effort
#geqo_generations = 0			# selects default based on effort
#geqo_selection_bias = 2.0		# range 1.5-2.0
#geqo_seed = 0.0			# range 0.0-1.0

# - Other Planner Options -

#default_statistics_target = 100	# range 1-10000
#constraint_exclusion = partition	# on, off, or partition
#cursor_tuple_fraction = 0.1		# range 0.0-1.0
#from_collapse_limit = 8
#join_collapse_limit = 8		# 1 disables collapsing of explicit
					# JOIN clauses
#force_parallel_mode = off

UPDATE: It's not PostgreSQL. When the /path endpoints is invoked and lingers around for 90 seconds there is no database activity showing that a path is being queried:
horizon=# SELECT datname,pid,query FROM pg_stat_activity ORDER BY pid ;
 datname |  pid  |                                                 query
---------+-------+-------------------------------------------------------------------------------------------------------
 horizon | 80867 | SELECT id FROM history_assets WHERE asset_issuer = $1 AND asset_type = $2 AND asset_code = $3 LIMIT 1
 horizon | 80868 | SELECT COALESCE(MIN(sequence), 0) FROM history_ledgers
 horizon | 80869 | SELECT COALESCE(MAX(sequence), 0) FROM history_ledgers
 horizon | 80906 | SELECT datname,pid,query FROM pg_stat_activity ORDER BY pid ;
(4 rows)

Just regular stuff. Any ideas?

Could it have something to do with --max-path-length=5 ? What is a reasonable number of hops here?

Could it have something to do with our --max-path-length=5 ?

Yes, default is 4 (and that's also what SDF Horizon is using). As far as I remember +1 increases the time exponentially in the current algorithm. It will be much faster when #849 is done. For now I recommend setting this value to 4.

--max-path-length=4 got it down to a more respectable 14s. Still 8s slower than SDF. Hmm. Could anything else be influencing this?


Added  links to docs: for words that mention organizations and authen…

…tication
for example [organizations](Link that leads to github  documentation for organizations)

Why:
Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):

Check off the following:

[ ] A subject matter expert (SME) has reviewed the technical accuracy of the content in this PR. In most cases, the author can be the SME. Open source contributions may require a SME review from GitHub staff.
[ ] The changes in this PR meet the docs fundamentals that are required for all content.
[ ] All CI checks are passing.

@zufichris Thanks so much for opening a PR! I'll get this triaged for review ✨ In the meantime, I wanted to provide a link to our style guide just for reference 💛

Beravo thank you and so much

@zufichris Thanks for raising a PR and your interest in the docs :wave
Unfortunately, we can't accept this submission for the following reasons:

It doesn't conform to the style guide in terms of sentence casing and the use of AUTOTITLE (see https://docs.github.com/en/contributing/style-guide-and-content-model/style-guide)
It's not clear exactly what benefit the changes would provide, other than the additional links. Travel between our different pages is something we're constantly reviewing, and we'd generally only make changes if there was a very clear user trend indicating a need for that. In this case there isn't

I'd generally recommend opening an issue first, so we can validate proposed changes before you raise them and everyone—most importantly, you—has a better experience. In the meantime, you can always have a look at our issues marked help wanted. Thank you!


Setting icons at the widget level

Is your feature request related to a problem? Please describe.
The battery widget icon currently blends into my bar. I'd like to be able to change the icon(s) without changing the whole bar's icon theme.
Describe the solution you'd like
Some way to set an icon per widget, like how you're able to set a ramp in polybar or how you're able to set multiple icons in the format in waybar.
Describe alternatives you've considered
I could just switch the bar's icon theme however I would like to use a different theme per widget. Doing it with text as well ( like polybar and waybar ) would allow it to have the same color as the font for a more cohesive look.

All icons should be customisable, ideally with support for both images and textual icons. This is inconsistent at the moment and I know I've made it worse with the introduction of the volume and notification modules. Because of that I'll look to address this as part of the next update.

Moving this back to 0.16.0 because I've been working on a library to assist with both this and the upcoming sysinfo changes, so I think it makes sense to tackle both at once.
This will be towards the top of the pile in the next update.


Path parameter: raise if path not found on parameter instantiation and add check_exists attribute

Fixes https://github.com/holoviz/param/issues/304
Changes introduced:

instantiating a Path parameter with a path that can't be resolved raises an error. This was a strange behavior as discussed today with @philippjfr
Path gets a new check_exists attribute that is True by default (previous behavior) and that when set to False allows to set a non materialized path

TODO:

[ ] Add more tests
[ ] Document
[ ] Nice to have: more validation of the default/value when check_exists is False? I'm not sure to which extent I can validate whether a path would be a valid materialized path, I've found nothing that can do that in os and this stackoverflow indicates it's not that straightforward.

I'm interested in feedback on naming that attribute and its default. Also I wonder whether __get__ should resolve?

Having a flag to control whether the path is checked when the parameter is declared makes sense to me.
I think __get__ should resolve the path if the file exists at a later point: this seems to be one of the reasons such a parameter is useful (otherwise it is really just a string with some slashes in it).

Alright I have renamed the attribute as check_exists with a default of True (backwards compatible behavior) in https://github.com/holoviz/param/pull/800/commits/0b1825b3285f6f2458cd0eb19e00d05472be1f62.

The attribute had been already updated to the better check_exists name, maybe it'll change again!
Thinking about the various options, it seems to me we cover all the cases by adding the new option check_exists=False:

with check_exists=True - the default value that preserves backwards compatibility - you can create a Path parameter for an input with a default existing path param.Path('/path/to/existing') or without a default if you don't have any to provide with param.Path().
with check_exists=False you can create a Path parameter for an output with a default existing path param.Path('/path/to/nonexisting') or without a default if you don't have any to provide with param.Path().

user may want the file not to exist (at least not when first checked) so that it can be used as an output file

Presumably if you declare that you want a file not to exist, that is so that you can create it at some point later, in which case after you create it accessing the Parameter value will fail:
import param

class P(param.Parameterized):

    file = param.Filename('does/not/exist', exists='not_happy_when_it_exists')

    def save(self):
        with open(self.file, 'w') as f:
            f.write('holoviz')
        logger.log('File saved in %s', self.file)  # BOOM!

I don't really want to put more into this PR than what was required in the issue, which was to allow a non existing filename, unless we have some concrete use case in mind (I'm trying to release Param 2.0!). In the case we'd add support for more use cases in the future, we could indeed rename the attribute exists and start with just two options: 'always' (current, avoiding 'required' as Param may introduce the notion of required argument on instantiation https://github.com/holoviz/param/pull/724) and 'ignore/optional'.

Interestingly I have found out that Path actually supports pathlib.Path objects!

Well I tried a few things and circled back to Jean-Luc's suggestion with check_exists that handles the two simple cases being 1) the path must exist (True, default and backwards compatible) and 2) the path can exist (False). I think it'd still be possible to extend the values accepted by this attribute in the future if that is requested.
As for validating the path in the check_exists=False case, I'm not super enthusiastic about adding even part of the code shared on the SO post. I guess I can be convinced otherwise...
What I've done though is add some basic type validation (whatever the value of check_exists), expecting the value to be of type str or pathlib.Path (the latter being surprisingly supported!).
This is ready for review again @jbednar and @jlstevens.


Add video recorder

fixes #1308
This PR adds video recorder widget in the project section.
https://github.com/user-attachments/assets/51238a2c-7193-4f4f-9136-3034a863693e

i am closing the pr as all checks are failed Please make a new pr


osx small icon looks corrupted after 1.55 update

VS Code Version:
Versione: 1.55.0
Commit: c185983a683d14c396952dd432459097bc7f757f
Data: 2021-03-30T16:01:05.981Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
Sistema operativo: Darwin x64 20.3.0

OS Version: OSX 11.2.3

Steps to Reproduce:

Install VSCODE
Look for small app icon in app list as in this screenshot

Does this issue occur when all extensions are disabled?: Yes

/duplicate of #120305 and will be fixed in upcoming 1.55.1