Log a user password change

Hello There,
I haven't been able to find a related issue for this so forgive me if this has already been asked. I'd like to log that a users password has been changed BUT without the hash ending up in the activity log. What would be the best way to go about this ?
I can see that I can use tapActivity then mutate the value of properties->attributes->password && properties->old->password but is there a better way ?

Because in most apps the password change is a dedicated form action or even in general profile forms you can use custom activities.
https://docs.spatie.be/laravel-activitylog/v3/basic-usage/logging-activity/

@TheFrankman You can use the tapActivity method like below:

@vaibhavpandeyvpz - Perfect, that's literally what i was just writing haha.

You can use Arr::has() with dot.notation to combine the two ifs.
if (Arr::has($properties, 'attributes.password')) {
    $attributes = $properties->get('attributes');
    $attributes['password'] = '<secret>';
    $properties->put('attributes', $attributes);
}

These three lines can't be reduced because of the overloading and magic - otherwise you will get

PHP Notice:  Indirect modification of overloaded element of Illuminate/Support/Collection has no effect

In case anyone stumbles upon this, the solution I went with was to setup a separate observer on the password changing.
I let the trait handle logging of the name and email.
use LogsActivity;

protected static $logAttributes = [
        'name', 'email',
    ];

A separate check on when the User is updated checks to see if the password was changed and logs the password was changed.
public static function booted()
    {
        static::updated(function(User $user) {
            if($user->wasChanged('password')) {
                activity()
                    ->causedBy(auth()->user())
                    ->on($user)
                    ->log('password changed');
            }
        });
    }

@TheFrankman You can use the tapActivity method like below:
public function tapActivity(Activity $activity, string $event)
{
    /** @var Collection $properties */
    if ($properties = $activity->properties) {
        if ($properties->has('attributes')) {
            $attributes = $properties->get('attributes');
            if (isset($attributes['password'])) {
                $attributes['password'] = '<secret>';
            }
            $properties->put('attributes', $attributes);
        }
        if ($properties->has('old')) {
            $old = $properties->get('old');
            if (isset($old['password'])) {
                $old['password'] = '<secret>';
            }
            $properties->put('old', $old);
        }
        $activity->properties = $properties;
    }
}

It works fine . Thanks


[module] Unresolved External Symbol timeBeginPeriod

Issue description
so I downloaded the 64 bit version of raylib and added it to my visual studio project, when i tried to build it , it gave me a linking error "Unresolved External Symbol timeBeginPeriod"
it only built successfully when i used the x86 version, apparently linking "winmm.lib" fixes the issue but this is not mentioned anywhere in the examples
Environment
Windows 10,Visual Studio 2019, GTX 1050 ti
Code Example
#include <raylib> int main(){     int width{800};     int height{600};      InitWindow(width,height,"test");      SetTargetFPS(60);      while(!WindowShouldClose()){      BeginDrawing();      ClearBackground(RAYWHITE);       DrawText("hello");      EndDrawing(); } CloseWindow(); return 0; }

This requirement is listed on raylib Wiki dependencies and also on Makefile. WinMM is a system library.


Change HTTP Status Code on Validation ex

ValidationException has status code for response but does not implement HttpExceptionInterface.
Status code by default is 422 but can change it

@SamsamBabadi Can you update the PR with UnitTests?

I will working on UnitTests as soon as possible.


How to add a method and set its ID other than numeric?

Hi, I am now testing addMethod to add... a method ;) but the other side is always asking to not use numeric node IDs as they are not persistent and use string IDs instead. However, addMethod is returning void so I don't seem to have access to set those on the method node once it is created? Is there some workaround? Thanks for hints :)

If you are adding the method "manually" by using the addMethod method, then you might be able to set a custom nodeId by modifying QUaBaseObject::addMethod in quaserver.h and QUaBaseObject::addMethodNodeInternal in quabaseobject.cpp, by adding an extra argument like const QString strNodeId.
Then use QUaTypesConverter::nodeIdFromQString to get a UA_NodeId instance and pass it as a second argument to UA_Server_addMethodNode in here.
But if you add the method as a part of a type instance (by inheriting QUaBaseObject and adding an invokable method) then is not possible at all to set a custom NodeId.
Actually, the intended approach for OPC UA is to set custom NodeIds to known instances and the use BrowsePaths to reach an specific sub-node (i.e. a property or a method). But I can understand that there might be some limiting client implementations out there that do not support calling a method using numeric NodeIds or BrowsePaths.
If you end up modifying the addMethod method, send a PR. Other people might find it useful. But in that case make sure it is has a default value like const QString strNodeId = "" to avoid breaking the existing API. Then if the value is the default empty string, then internally use UA_NODEID_NULL.


(notepadplusplus) New version (8.0.0) available

Notepad++ had a new version released a few days ago: https://notepad-plus-plus.org/news/v8-dark-mode/

Version 8.1 is available but it is pending  automated review.
https://community.chocolatey.org/packages/notepadplusplus.install/8.1

Got the update.


Security vulnerability (missing SECURITY.md)

Could you please create a SECURITY.md file? I found a vulnerability in joplin-outline and would like to report it through GitHub advisories.

Sent you an email. Please check your spam folder as you probably did not get my first one.
And just a small thing: Next time, comment on the issue that you did something as I did not get a notification that this GitHub issue was updated.

Any updates on this?

Any updates on this? @cqroot

Looks got to me. A bit sad that you don't acknowledge the vulnerability via GitHub security. I would have like the credit. But fixed is fixed!


fix(deps): update dependency search-insights to 2.15.0

Summary
Updates search-insights to 2.15.0 which contains features to simplify query id tracking from clicks for use in conversion events.
Result
Updated usage in the insights middleware as well as the local dependency

I think the netlify failure is unrelated. The website doesn't load for me, will give it a moment and retry later


python310Packages.ua-parser: 0.16.1 -> 0.18.0

Description of changes
Diff: https://github.com/ua-parser/uap-python/compare/0.16.1...0.18.0

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

LGTM


Improve handling of null-only enums

We have this pattern in our public API OpenAPI specification[1] where we have this an enum like
NullEnum:
  type: string
  x-lune-name: Null
  enum:
    - null nullable: true

which we use like so
oneOf:
- $ref: '#/components/schemas/DistanceCalculationMethod'
- $ref: '#/components/schemas/NullEnum'
for reasons that aren't particularly important.
What's crucial is this code used to see this NullEnum and render its type as string which removed a lot of type safety from the generated code and from the code using it.
This is an attempt to fix that.
Note that:

The generated type in this situation is "null | null" – the first null comes from the type of the enum itself, the second from the "nullable" property set to true. Probably not worth spending time trying to make this nicer, it's effectively just an enum anyway.

The code can generate TS code with chunks of the schema copied there (no actual TS types generated, just schema pieces verbatim) which is what you see in the snapshot with "type: 'any'" in it.
We don't use that feature so I left it alone.
If we want for the copied piece of the schema to contain something other than "any" we can set model.type (below the line where we set model.base) to whatever we want.

The type is rendered through the base.hbs template called from typeGeneric.hbs.
[1] http://docs.lune.co/openapi.yml
Part-of: https://linear.app/lune/issue/LUN-2704/make-openapi-typescript-codegen-handle-null-values-better

I only have a loose understand of what it is that's going on here.
From what I can tell, we're overriding the "vanilla" openapi 3 to introduce our own custom plug-in that looks at enums that consist of null and nothing else and we make sure they are just null. Base on the PR description they were null | string before?
Does the "custom" openapi spec mean we can not upgrade our openapi version?

In the given example:
oneOf:
- $ref: '#/components/schemas/DistanceCalculationMethod'
- $ref: '#/components/schemas/NullEnum'

we've decided we do NOT want to have DistanceCalculationMethod be "nullable:true" ?

From what I can tell, we're overriding the "vanilla" openapi 3 to introduce our own custom plug-in (...)

Not exactly. My understanding is this construct is a legal OpenAPI schema:
type: string
enum:
  - null

I may be wrong but I've seen no tool reject it yet. So I'd say the problem is the construct was always legal and the change is about making this tool (openapi-typescript-codegen) handle it better than before (before: string, after: null).

In
NullEnum:
  type: string
  x-lune-name: Null
  enum:
    - null nullable: true

why exactly do we add "nullable: true" ?

because last time I checked both of these were needed to make the runtime request/response validator used in Lune backend to permit null values. For the purposes of this project it doesn't really matter why we do it though.

In the given example:
oneOf:
- $ref: '#/components/schemas/DistanceCalculationMethod'
- $ref: '#/components/schemas/NullEnum'

we've decided we do NOT want to have DistanceCalculationMethod be "nullable:true" ?

That'd

Be redundant (as NullEnum already has that)
Not work reliably (because per the message above merely adding nullable: true won't work with our runtime validation and any nullable enums also need an explicit null member)

In the given example:
oneOf:
- $ref: '#/components/schemas/DistanceCalculationMethod'
- $ref: '#/components/schemas/NullEnum'

we've decided we do NOT want to have DistanceCalculationMethod be "nullable:true" ?

That'd

Be redundant (as NullEnum already has that)
Not work reliably (because per the message above merely adding nullable: true won't work with our runtime validation and any nullable enums also need an explicit null member)

Right... but we could NOT have

$ref: '#/components/schemas/NullEnum'
and we could add null and nullable:true to DistanceCalculationMethod and it would be support null as desired? (I can see why we wouldn't want to do it tho )

Yes


TCGA custom connector

Main idea
Allow users to retrieve wsi file directly from tcga repo through easy and intuitive API
Solution
Connector module within data package

thje connector will be in a separate tool / repo https://github.com/histolab/gdc-api-wrapper


Cannot load nvcuda.dll

When I am playing video then error coming like Cannot load nvcuda.dll video is playing perfectly but I am thinking it will create issue once is create build for flutter windows

Why do you think it's an error if everything is working properly?


Does the timeout include time costing for waiting request to be processed in a queue on provider?

如果一个请求堆积在队列超过了timeout时间，会否被丢弃。
我这边看到一个服务正常耗时只有1毫秒的，却花了几十秒，超时1秒。想确认下timeout是否对队列等待的时间生效

By default, dubbo don't use a queue on provider side, if thread is exhausted, upcoming request will be rejected immediately.

Have you configured a queue explicitly?

what do you mean ?
What about queues? I set the thread num as 200 and use fixed thread pool. Does it have queue before we schedule it in thread?

我自己写过超时机制，我想dubbo应该也差不多，配不配线程池的队列，与客户端的超时与否是没有影响的，如果配了进入了队列，这个请求注定是要被执行的（除非发生特殊情况），如果没配，线程池没有空闲，则会拒绝提交抛出RejectedExecution，当然还有重试机制等等

What about queues? I set the thread num as 200 and use fixed thread pool. Does it have queue before we schedule it in thread?

Dubbo has no queue for requests before schedule.


[fusion-plugin-rpc-redux-react] Fix memory leak

The current implementation has a memory leak. Each render, mapStateToParams gets wrapped in a new arrow function that calls the old mapStateToParams. The more insidious side effect of this is that this.context.store gets retained. On the server, this render function is called whenever new SSR markup is generated, and that markup happens to be retained by this.context.store (via the ctx field in the store). That means that every SSR string ever created since the app started will persist in memory!
Below are the heap snapshots from reloading a page powered by a Fusion app three times. You can see that the mapStateToParams stack grows larger each time. I clicked the "Collect Garbage" button before generating the snapshots, yet the three SSR strings remain.

Below is the heap snapshot after this fix. You can see that the blue spikes from earlier (representing the markup) are now cleaned up after clicking "Collect Garbage", and there is only one SSR string in memory now.

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

!merge


Settable region, detect played steam games, new sorting, xbox live import

Merged with the following changes:

2d5a6f1 squashed into its parent
6efa31e omitted; this would break on the files it was originally written to import (which used single tabs as field separators) and backloggery doesn't use spaces in its platform names anyways.


how do i even add wavy bg

What is your question?
so i realized os had shaders and so how do i make a wavy bg

read stuff before you ask

check out wiki (as CrusherMods said)


For long running node installs show a message

Current Behavior
If a node install takes a long time the UI just returns to the list of nodes in the catalogue and allows the currently installing node button to be pressed again.
Expected Behavior
The UI should show a message saying the install will continue in the background at the the node will be added to a palette once complete.
Installing other (or attempting to install the same node again) nodes should be blocked until the first completes
Steps To Reproduce
On a slow machine (limited memory and CPU resources) install a large node e.g openapi-red and wait
Example flow
NA
Environment

Node-RED version: 3.1.7
Node.js version: 18.x
npm version: 9.x
Platform/OS: All
Browser: NA

Should this move to using the editor messaging API rather than wait on a long HTTP request to return (or time out in this case?
It already updates the UI when/if the install completes cleanly, just not if it fails.

OK, so the timeout is actually coming from the reverse proxy, Standalone Node-RED doesn't timeout it waits forever.
Question now is do we extend the reverse proxy timeout or still try and handle this better in Node-RED?


Hint message in tutorial does not correspond to the example code shown

Documentation URL:
https://codeigniter4.github.io/userguide/tutorial/news_section.html
Description:
At the end of the section Display the news, there's a note with the following message:

We are again using using esc() to help prevent XSS attacks. But this time we also passed “url” as a second parameter. That’s because attack patterns are different depending on the context in which the output is used. You can read more about it here.

However, there is no "url" parameter in the code example above that note:

<?= esc($news['title']); ?>

<?= esc($news['body']); ?>

So, either the parameter is missing, or the note is superfluous here.

Hi, this are a duplicate of #2960 and have been fixed in the development branch. I placed it on the wrong code block.


Updating HighlightJS version located in yandex from 7.5 to 8.2

The version used by the project is a bit old, updating it to the newest available version on that same server

fixed here https://github.com/olamy/reflow-maven-skin/pull/13


Update translation source file for v28.0 string freeze

This PR updates the src/qt/locale/bitcoin_en.xlf translation source file according to the Release schedule for 28.0.
Note for reviewers: it is expected to get a zero diff after running make -C src translate locally.

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews
See the guideline for information on the review process.
A summary of reviews will appear here.

Friendly ping @stickies-v @pablomartin4btc :)

@pablomartin4btc @stickies-v
I had to update this PR due to the recently merged bitcoin-core/gui#824.
Sorry for invalidating your ACKs. Mind re-reviewing please?

re-ACK 770b0348c0abe2f63b56cc78c7b7a0e6b4057ce1


feat: added square and diamond

@mohittk , the branch has conflicts because of ESlint and Prettier changes recently. Please sync the branch with current upstream main. Also, this PR is blocked by #12 .

@mohittk , the branch has conflicts because of ESlint and Prettier changes recently. Please sync the branch with current upstream main. Also, this PR is blocked by #12 .

Okay sure! On it.

@ashutosh1919 The PR is synced with resolved conflicts.

@mohittk let it be open till I create deploy previews. It should be done by EOD! Thanks for fixing it.

@mohittk let it be open till I create deploy previews. It should be done by EOD! Thanks for fixing it.

No problem. :)


Highlight changes in goal state

tl;dr: https://twitter.com/famontesi/status/1557346899610443782
We already have both the state before and after a tactic in the info tree, we should use them at the same time! A full diff is probably too noisy since the old state is usually less interesting than the new one, as long as you can see where it changed at all. We could probably do this by diffing the TaggedTexts, introducing a new kind of MsgEmbed. The Coq implementation is documented at https://coq.inria.fr/distrib/current/refman/proofs/writing-proofs/proof-mode.html#how-diffs-are-calculated.

I am keen to work on this

I can think of two ways of implementing this:

VSCode's goal view component intercepts rendering of tagged text and highlights subexpressions that have changed since the last render. React provides some mechanisms for remembering what the last state was, so this could be done entirely on the client.
Lean computes the diffs in goal state, each fileworker remembers the last goal that was requested and alongside the InteractiveGoal object, we also pass an InteractiveGoalDiff, which in turn includes an ExprDiff which the vscode extension can then render.

I don't think it should depend on the navigation history but always, deterministically provide the diff between the selected tactic's pre and post state - which would be convenient because that's exactly the information we already have in every TacticInfo.
I didn't check Coq's behavior myself, but from the description I'm assuming they do this as well.


ipywidgets gives Model not found errors

Describe the feature you'd love to have in Orchest
It would be nice for Orchest to install ipywidgets on Jupyter by default.
Is your feature request related to a problem? Please describe.
Initially I was not able to make anything based on ipywidgets work, but then I realized I probably needed to install it globally for Jupyter, and not as part of a particular environment. That turned out to be the solution.
However, I don't think our average user will reach that conclusion so quickly.
Additional context
One alternative is just to document this better: for example, by adding a "Error displaying widget: model not found" entry to the FAQ. But both approaches are not mutually exclusive: we can add that entry to the FAQ anyway, and still install ipywidgets by default, which is quite common.

I remember implementing this back in the day, don't the following lines install ipywidgets for the user?
https://github.com/orchest/orchest/blob/89d5bdc8b4dd40a0106b9b90bf9c702677b5b445/services/jupyter-server/requirements.in#L4
and
https://github.com/orchest/orchest/blob/b90c2e12604cac5a407f1ff20b8b3042e094800f/services/base-images/runnable-shared/runner/requirements-user.txt#L2
Sounds also like the approach that you took?

I acknowledge that this procedure follows the official documentation though: https://ipywidgets.readthedocs.io/en/stable/user_install.html#installing-in-jupyterlab-3-x

Confirmed that upgrading jupyterlab_widgets on the JupyterLab environment to 3.0 worked.

Mistery solved, PR incoming.

I'm nothing though that this might cause some incompatibilities with ipympl... https://github.com/matplotlib/ipympl/issues/460#issuecomment-1231317821

Repurposed gh-1242 to cap ipywidgets, instead of upgrading it. This still solves the issue while giving time for the ecosystem to adapt.


[Add a new project] Bus booking management System using python [gssoc23]

Title and Issue number

Bus management system using python.
You can create new buses, book tickets, view tickets, and see the summary
Close #3910

Checklist:

[X] I have mentioned the issue number in my Pull Request.
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have created a helpful and easy to understand README.md

https://github.com/pranjay-poddar/Dev-Geeks/assets/111726483/2bfa6929-4258-4ddf-9ede-e6e2d45a6823

@MohitGupta121 @pranjay-poddar @TusharKesarwani Please review this PR.


Uncaught Error: The specified module could not be found./?~\AppData\Local\atom\app-1.57.0\res...

[Enter steps to reproduce:]

...
...

Atom: 1.57.0 x64
Electron: 9.4.4
OS: Microsoft Windows 10 Home Single Language
Thrown From: Atom Core
Stack Trace
Uncaught Error: The specified module could not be found.
\?\C:\Users\hp\AppData\Local\atom\app-1.57.0\resources\app.asar.unpacked\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node
At electron/js2c/asar.js:140

Error: The specified module could not be found.
\\?\C:\Users\hp\AppData\Local\atom\app-1.57.0\resources\app.asar.unpacked\node_modules\keyboard-layout\build\Release\keyboard-layout-manager.node
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
    at Object.func [as .node] (electron/js2c/asar.js:149:18)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module._load (electron/js2c/asar.js:769:28)
    at Module.require (/app.asar/static/index.js:72:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at customRequire (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:1:802772)
    at get_KeyboardLayoutManager (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:14:2893541)
    at get_manager (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:14:2893643)
    at Object.getCurrentKeyboardLayout (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:14:2893769)
    at e.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:14:1118316)
    at KeymapManager.keystrokeForKeyboardEvent (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:1224088)
    at KeymapManager.handleKeyboardEvent (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:1222073)
    at WindowEventHandler.handleDocumentKeyEvent (~/AppData/Local/atom/app-1.57.0/resources/app/static/<embedded>:11:286551)

Commands
     -2:02.1.0 core:undo (input.hidden-input)

Non-Core Packages
atom-terminal 0.8.0
autocomplete-clang 0.13.0
build 0.70.0
build-platformio 1.2.4
busy-signal 2.0.1
file-icons 2.1.39
intentions 1.1.5
language-babel 2.85.0
language-ini 1.23.0
language-javascript-jsx 0.3.7
linter 2.3.1
linter-gcc2 0.8.8
linter-ui-default 1.8.1
meteor-api 2.20.0
meteor-snippets 0.5.0
platformio-ide-debugger 1.2.6
platformio-ide-terminal 2.10.0
platomformio 0.7.1
script 3.32.2
tool-bar 1.2.0

Thanks for taking the time to contribute!
We noticed that this is a duplicate of https://github.com/atom/atom/issues/21285. You may want to subscribe there for updates.
Because we treat our issues list as the Atom team's backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn't an exact duplicate but is closely related.
For information on how to use GitHub's search feature to find out if something is a duplicate before filing, see the How Can I Contribute? section of the Atom CONTRIBUTING guide.


RPi2 build broken

Seems that the RPi2 build has been broken recently.
make -C /home/julianoes/src/Firmware/build_posix_sitl_default -j4 --no-print-directory posix_rpi2_release
make[1]: *** No rule to make target 'posix_rpi2_release'.  Stop.


feat(data/multiset): has_coe_nodup

A simple coercion that makes it easier to create a finset from a coerced list.

I added another useful coercion for l.nodup to finset.

I'm not really liking this coercion. This encourages the usage of proofs as terms in equational reasoning, which I definitely want to avoid. finset.mk is supposed to provide this interface if you need it, but the list is explicit for a reason.

I'm not really liking this coercion. This encourages the usage of proofs as terms in equational reasoning, which I definitely want to avoid.

Would it be better to define the same theorems just using of_nodup_list instead of the coercion?

finset.mk is supposed to provide this interface if you need it, but the list is explicit for a reason.

Can you give that reason?
I'm working on something where I need a list instead of a finset because the list is ordered but I also need to say that the list is disjoint with a finset. Why should I write @finset.mk α l d instead of (d : finset α) or finset.of_nodup_list d if you prefer no coercion?

I haven't seen any response for a while, but I'm also not convinced myself that this is the best the way to go, so closing.


Is it possible to connect to the Heroku Postgres DB ?

I tried to use the Postgres DB with this configuration in app-config.yaml
database:
    client: pg
    connection:
      postgres://xxxxxxxxx:asdwasdwasdwasdwasdwasdwasdw@ec2-xx-xxx-xxx-xxx.eu-west-1.compute.amazonaws.com:5432/wasdasdd

I get this error:
[1] 2022-01-29T07:06:19.692Z backstage info Loaded config from app-config.yaml
[1] 2022-01-29T07:06:19.698Z backstage info 0 secrets found in the config which will be redacted
[1] 2022-01-29T07:06:19.711Z backstage info Created UrlReader predicateMux{readers=azure{host=dev.azure.com,authed=false},bitbucket{host=bitbucket.org,authed=false},github{host=github.com,authed=false},gitlab{host=gitlab.com,authed=false},awsS3{host=amazonaws.com,authed=false},fetch{}
[1] Backend failed to start up, Error: Failed to connect to the database to make sure that 'backstage_plugin_catalog' exists, error: no pg_hba.conf entry for host "xx.xxx.xxx.xxx", user "xxxxxxxxx", database "postgres", SSL off

I thought maybe I should enable ssl.
when I add    ssl=true to the path, I get an error message:
[1] Backend failed to start up, Error: Failed to connect to the database to make sure that 'backstage_plugin_catalog' exists, Error: self signed certificate

The error indicates that the certificate that the server uses is self signed meaning the CA cert is not in the default certificate store. You can tell node to accept the CA cert by supplying it as an environment variable when the backend starts using NODE_EXTRA_CA_CERTS. https://nodejs.org/api/cli.html#node_extra_ca_certsfile

The error indicates that the certificate that the server uses is self signed meaning the CA cert is not in the default certificate store. You can tell node to accept the CA cert by supplying it as an environment variable when the backend starts using NODE_EXTRA_CA_CERTS. https://nodejs.org/api/cli.html#node_extra_ca_certsfile

Hi, thank you very much for the answer!
As I understand it, I now need to create an RSA key on my local machine and put the path to the PEM file in the NODE_EXTRA_CA_CERTS variable, right?
export NODE_EXTRA_CA_CERTS=/path/to/ca_cert.pem
So the backend should be able to connect to the Postgres DB of Heroku, right ?

The usage of the environment variable is correct but you do not need to create any RSA keys on your machine. The database UI/panel should possibly have a CA certificate that you can use when connecting. I don't know how to connect to your database specifically but there shouldn't be any limitations in Backstage that prevents you from doing it.

The usage of the environment variable is correct but you do not need to create any RSA keys on your machine. The database UI/panel should possibly have a CA certificate that you can use when connecting. I don't know how to connect to your database specifically but there shouldn't be any limitations in Backstage that prevents you from doing it.

Hi @jhaals
I downloaded the certificate from the browser data.heroku.com.cer and converted it to certificate.pem and put it in /etc/ssl/certs/certificate.pem.
command:
openssl x509 -inform der -in data.heroku.com.cer -out certificate.pem
then I set "export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/certificate.pem"
unfortunately it doesn't work either and I still get the error
Backend failed to start up, Error: Failed to connect to the database to make sure that 'backstage_plugin_catalog' exists, Error: self signed certificate

It seems to me to be a characteristic of Heroku itself.
Using the free plans, the databases are shared and we only have access to one database.
Bastage creates several databases (catalog, auth) so if the idea is to test the free Heroku plan, the option is to use the sqlite
database.
I tried to make several different configurations but several errors happened.
But I was not successful 😞

My attempt that I found most promising was this one:
  database:
    client: pg
    connection:
      host:
        $env: POSTGRESQL_HOST
      port:
        $env: POSTGRESQL_PORT
      user:
        $env: POSTGRESQL_USER
      password:
        $env: POSTGRESQL_PASSWORD
    knexConfig:
      debug: true
    plugin:
      auth:
        database:
          $env: POSTGRESQL_DATABASE
      catalog:
        database:
          $env: POSTGRESQL_DATABASE

Heroku logs: app[web.1]: Backend failed to start up, Error: Failed to connect to the database to make sure that schema for plugin 'catalog' exists, Error: connect ECONNREFUSED <IP_ADDRESS>:5432
Then I tried to enable this option  pluginDivisionMode: 'schema'
Heroku logs: Backend failed to start up, Error: Failed to connect to the database to make sure that 'backstage_plugin_catalog' exists, Error: connect ECONNREFUSED <IP_ADDRESS>:5432

Oh but for that situation, pluginDivisionMode: 'schema' is definitely the right approach. Now we just have to figure out why you aren't even allowed to connect in the first place... I presume you don't have access to db server logs? Something that may hint at WHY the connection was refused.

Trying to make it work on heroku as well and hitting a similar issue. I opened a ticket on here https://github.com/backstage/demo/issues/50 so we can fix it AND add a functional heroku configuration file with a persistent database so people doesn't struggle with this anymore.

@kwent re: https://github.com/backstage/demo/issues/50 what do you think we need to do to get it working with heroku?

@benjdlambert Because some of us are running their business on heroku i believe

I think it's a perfectly reasonable to get working, it's just we don't have the time to look at getting that setup now, so just so we can get some information on what is missing and hopefully get someone to contribute a fix for it. 👍

I think the documentation is lacking. It works fine for sqlite based but as you might know, dyno's run on an ephemeral filesystem and so redeploying will wipe your data. So

Improve the documentation to handle a persistent database (postgres is fine)
Have a app-config.production.yaml ready to be copy pasted for heroku.

Just to make sure I'm parsing this thread correctly, the current status is that Backstage will not work on Heroku with PostgreSQL?  @kwent is referring to documentation changes rather than code changes, so I wasn't sure whether he'd got this working or not.
I'm facing the same issue with plugin DBs
Error: Failed to connect to the database to make sure that 'backstage_plugin_catalog' exists, error: permission denied for database "postgres"

To answer my own question, code changes are required.  A separate issue was opened above related to the required changes.
https://github.com/backstage/demo/issues/50

@e0d i never got it working but i'm still VERY interested to make it work :) Unsure where to begin tbh

Hi folks :D I went to do some tests and managed to progress.

  database:
    client: pg
    ensureExists: false
    pluginDivisionMode: 'schema'
    connection:
      host: ${POSTGRES_HOST}
      port: ${POSTGRES_PORT}
      user: ${POSTGRES_USER}
      password: ${POSTGRES_PASSWORD}
      database: ${POSTGRESQL_DATABASE}

I imagine these are not the best settings, but it might help with troubleshooting.

@gabriel-dantas98 I tried something similar a month ago with no luck.  I ended up spinning up a separate AWS RDS PostgreSQL database and connecting to it.
I'm curious about this setting
ensureExists: false
I wonder if the breakage in only when checking if the database exists and the migrations will happen if that check isn't executed.
Without the benefit of stepping through the code it looked to me like this is forcing the exists check to use the postgres DB which you won't have available in Heroku where the db is randomly generated.

@gabriel-dantas98 I tried something similar a month ago with no luck. I ended up spinning up a separate AWS RDS PostgreSQL database and connecting to it.
I'm curious about this setting
ensureExists: false
I wonder if the breakage in only when checking if the database exists and the migrations will happen if that check isn't executed.
Without the benefit of stepping through the code it looked to me like this is forcing the exists check to use the postgres DB which you won't have available in Heroku where the db is randomly generated.

@e0d I don't know if I understand your question well and if it can happen that you don't run some migration in case you enable this flag?
@kwent Does this configuration help your case?

update: I noticed that we can use the connection string directly, so we don't need to create the environment variables for each attribute.
So the app-config.yaml would look like:
database:
  client: pg
  ensureExists: false
  pluginDivisionMode: 'schema'
  connection: ${DATABASE_URL}

@jhaals
Are there any tradeoffs in using this approach?
If it's ok, I can update the documentation with these details :)

@gabriel-dantas98 still seeing
with
database:
  client: pg
  ensureExists: false
  pluginDivisionMode: 'schema'
  connection: ${DATABASE_URL}

Backend failed to start up, Error: Failed to connect to the database to make sure that schema for plugin 'catalog' exists, error: no pg_hba.conf entry for host "xx", user "xx", database "xx", no encryption

with
  database:
    client: pg
    ensureExists: false
    pluginDivisionMode: 'schema'
    connection: ${DATABASE_URL}
    plugin:
      auth:
        database:
          $env: DATABASE_URL
      catalog:
        database:
          $env: DATABASE_URL

Backend failed to start up, Error: Failed to connect to the database to make sure that schema for plugin 'catalog' exists, error: no pg_hba.conf entry for host "xx", user "xx", database "xx", no encryption

No luck.

@gabriel-dantas98 which Heroku PostgresSQL add on are you using I wonder?  There are some third-party add ons so I'm curious if that's the difference here.

Default one. heroku-postgresql -> hobby-dev

@gabriel-dantas98 still seeing
with
database:
  client: pg
  ensureExists: false
  pluginDivisionMode: 'schema'
  connection: ${DATABASE_URL}

Backend failed to start up, Error: Failed to connect to the database to make sure that schema for plugin 'catalog' exists, error: no pg_hba.conf entry for host "xx", user "xx", database "xx", no encryption

with
  database:
    client: pg
    ensureExists: false
    pluginDivisionMode: 'schema'
    connection: ${DATABASE_URL}
    plugin:
      auth:
        database:
          $env: DATABASE_URL
      catalog:
        database:
          $env: DATABASE_URL

Backend failed to start up, Error: Failed to connect to the database to make sure that schema for plugin 'catalog' exists, error: no pg_hba.conf entry for host "xx", user "xx", database "xx", no encryption

No luck.

Did you set the PGSSLMODE environment variable?
heroku config:set PGSSLMODE="no-verify" --app <project-name>

I'm using the suggestions in this post but I'm still getting the following error:
Backend failed to start up error: create table "knex_migrations" ("id" serial primary key, "name" varchar(255), "batch" integer, "migration_time" timestamptz) - no schema has been selected to create in

Hard to guess without seeing your config.

This is my config:
  database:
    client: pg
    ensureExists: false
    pluginDivisionMode: 'schema'
    connection: ${DATABASE_URL}
    plugin:
      auth:
        database:
          $env: DATABASE_URL
      catalog:
        database:
          $env: DATABASE_URL

Does the user have permissions to that database?  If you login from psql as that user can you create a trivial table?
I had initially suspected that database property was not specified.

Yes, the user has permission to create a table. Just tested using the psql console.

Sorry should have asked this first.  Are you attempting to connect to Postgres on Heroku?  It wasn't clear to me from the thread that that was working for anyone.  I moved on to Postgres hosted elsewhere.

With the schema division mode it'll try to create a schema too first, per plugin - right?

Yes, for example, in my DB.

Name
Owner
Encoding
Collate
Ctype
Access privileges

backstage_plugin_app
backstage
UTF8
en_US.UTF-8
en_US.UTF-8

backstage_plugin_auth
backstage
UTF8
en_US.UTF-8
en_US.UTF-8

backstage_plugin_catalog
backstage
UTF8
en_US.UTF-8
en_US.UTF-8

backstage_plugin_scaffolder
backstage
UTF8
en_US.UTF-8
en_US.UTF-8

backstage_plugin_search
backstage
UTF8
en_US.UTF-8
en_US.UTF-8

The following change makes me end up with the error #11218
  database:
    client: pg
    ensureExists: false
    pluginDivisionMode: 'schema'
    connection: ${DATABASE_URL}
    ssl: true
+    knexConfig:
+      searchPath: ['knex', 'public']
    plugin:
      auth:
        database:
          $env: DATABASE_URL
      catalog:
        database:
          $env: DATABASE_URL

I also got the "no schema has been selected to create in" error with the setting ensureExists: false.
Fixed this error by setting ensureExists: true.
cc @tuler
My error log:
2022-12-05T06:26:54.202Z catalog info Performing database migration type=plugin
Backend failed to start up, error: create table "knex_migrations" ("id" serial primary key, "name" varchar(255), "batch" integer, "migration_time" timestamptz) - no schema has been selected to create in

You don't want to set:
knexConfig:
  searchPath: ['knex', 'public']

This will create all the tables into the public schema, which is why you see the corruption error. Each plugin needs to be in its own schema if you're using a single database which is likely on Heroku. I managed to get a version of it working, but I had to run CREATE SCHEMA by hand for each plugin's namespace. For the standard scaffold that are these namespaces:

app
auth
catalog
scaffolder
search

I haven't dug into the code, but does setting ensureExists to false skip the schema creation?

Trying to fix this with #24577

Confirming this is fixed  - thanks @chap 🎉
Working configuration:
backend:
  database:
    client: pg
    ensureExists: false
    ensureSchemaExists: true
    pluginDivisionMode: schema
    connection: ${DATABASE_URL}

@jonico could you post the all config ( redact whatever you need ). Cause cannot make it work still on my side.

Are you already on the latest version of Backstage? This config change was introduced in 1.27. How does your DATABASE_URL env look like? What error are you getting?On 25. Jun 2024, at 08:25, Quentin Rousseau @.***> wrote:
@jonico could you post the all config ( redact whatever you need ). Cause cannot make it work still on my side.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Yes 1.28.2. Cannot create catalog schema error.
DATABASE_URL:  postgres://REDACTED:REDACTED@REDACTED:5432/REDACTED

@kwent what's the actual error log that you get?

2024-06-27T19:19:48.105670+00:00 heroku[web.1]: Starting process with command `node packages/backend --config app-config.production.yaml`
2024-06-27T19:19:53.491669+00:00 heroku[web.1]: Process exited with status 1
2024-06-27T19:19:53.229314+00:00 app[web.1]: Loaded config from app-config.production.yaml
2024-06-27T19:19:53.257726+00:00 app[web.1]: 2024-06-27T19:19:53.256Z backstage info Found 3 new secrets in config that will be redacted
2024-06-27T19:19:53.308220+00:00 app[web.1]: 2024-06-27T19:19:53.308Z backstage info Created UrlReader predicateMux{readers=azure{host=dev.azure.com,authed=false},bitbucketCloud{host=bitbucket.org,authed=false},github{host=github.com,authed=false},gitlab{host=gitlab.com,authed=false},awsS3{host=amazonaws.com,authed=false},fetch{}
2024-06-27T19:19:53.374914+00:00 app[web.1]: Backend failed to start up, Error: Failed to connect to the database to make sure that schema for plugin 'catalog' exists, error: no pg_hba.conf entry for host "REDACTED", user "REDACTED", database "REDACTED", no encryption

@kwent can you try adding this config var?
$ heroku config:set PGSSLMODE=no-verify -a <your-app>

It should prevent the connection failure when trying to verify Heroku Postgres's self-signed certificates.

No luck

My Heroku env config:

Could you also link the app-config.yaml ? :pray:


[BUG] Run Error with 3.8.2 for both Android & iOS

@buiphukhuyen  occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action

@buiphukhuyen iOS needs to update the pods repository. Then re-obtain 3.8.2 in the flutter project.


keyd: run systemd service as root user

Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.05 Release Notes (or backporting 22.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

NAME                                                        DESCRIPTION                                                                    EXPOSURE
✓ SystemCallFilter=~@swap                                     System call allow list defined for service, and @swap is not included
✓ SystemCallFilter=~@resources                                System call allow list defined for service, and @resources is not included
✓ SystemCallFilter=~@reboot                                   System call allow list defined for service, and @reboot is not included
✓ SystemCallFilter=~@raw-io                                   System call allow list defined for service, and @raw-io is not included
✓ SystemCallFilter=~@privileged                               System call allow list defined for service, and @privileged is not included
✓ SystemCallFilter=~@obsolete                                 System call allow list defined for service, and @obsolete is not included
✓ SystemCallFilter=~@mount                                    System call allow list defined for service, and @mount is not included
✓ SystemCallFilter=~@module                                   System call allow list defined for service, and @module is not included
✓ SystemCallFilter=~@debug                                    System call allow list defined for service, and @debug is not included
✓ SystemCallFilter=~@cpu-emulation                            System call allow list defined for service, and @cpu-emulation is not included
✓ SystemCallFilter=~@clock                                    System call allow list defined for service, and @clock is not included
✗ RootDirectory=/RootImage=                                   Service runs within the host's root directory                                       0.1
SupplementaryGroups=                                        Service runs as root, option does not matter
RemoveIPC=                                                  Service runs as root, option does not apply
✗ User=/DynamicUser=                                          Service runs as root user                                                           0.4
✓ RestrictRealtime=                                           Service realtime scheduling access is restricted
✓ CapabilityBoundingSet=~CAP_SYS_TIME                         Service processes cannot change the system clock
✓ NoNewPrivileges=                                            Service processes cannot acquire new privileges
✓ AmbientCapabilities=                                        Service process does not receive ambient capabilities
✗ PrivateDevices=                                             Service potentially has access to hardware devices                                  0.2
✗ SystemCallArchitectures=                                    Service may execute system calls with all ABIs                                      0.2
✗ RestrictAddressFamilies=~AF_UNIX                            Service may allocate local sockets                                                  0.1
✓ ProtectSystem=                                              Service has strict read-only access to the OS file hierarchy
✓ ProtectProc=                                                Service has restricted access to process tree (/proc hidepid=)
✓ CapabilityBoundingSet=~CAP_SYS_RAWIO                        Service has no raw I/O access
✓ CapabilityBoundingSet=~CAP_SYS_PTRACE                       Service has no ptrace() debugging abilities
✓ CapabilityBoundingSet=~CAP_SYS_(NICE|RESOURCE)              Service has no privileges to change resource use parameters
✓ CapabilityBoundingSet=~CAP_NET_ADMIN                        Service has no network configuration privileges
✓ CapabilityBoundingSet=~CAP_NET_(BIND_SERVICE|BROADCAST|RAW) Service has no elevated networking privileges
✗ DeviceAllow=                                                Service has no device ACL                                                           0.2
✓ CapabilityBoundingSet=~CAP_AUDIT_*                          Service has no audit subsystem access
✓ CapabilityBoundingSet=~CAP_SYS_ADMIN                        Service has no administrator privileges
✓ PrivateNetwork=                                             Service has no access to the host's network
✓ PrivateTmp=                                                 Service has no access to other software's temporary files
✓ ProcSubset=                                                 Service has no access to non-process /proc files (/proc subset=)
✓ CapabilityBoundingSet=~CAP_SYSLOG                           Service has no access to kernel logging
✓ ProtectHome=                                                Service has no access to home directories
✓ KeyringMode=                                                Service doesn't share key material with other services
✓ Delegate=                                                   Service does not maintain its own delegated control group subtree
✓ PrivateUsers=                                               Service does not have access to other users
✓ NotifyAccess=                                               Service child processes cannot alter service state
✓ ProtectClock=                                               Service cannot write to the hardware clock or system clock
✓ CapabilityBoundingSet=~CAP_SYS_PACCT                        Service cannot use acct()
✓ CapabilityBoundingSet=~CAP_KILL                             Service cannot send UNIX signals to arbitrary processes
✓ ProtectKernelLogs=                                          Service cannot read from or write to the kernel log ring buffer
✓ CapabilityBoundingSet=~CAP_WAKE_ALARM                       Service cannot program timers that wake up the system
✓ CapabilityBoundingSet=~CAP_(DAC_*|FOWNER|IPC_OWNER)         Service cannot override UNIX file/IPC permission checks
✓ ProtectControlGroups=                                       Service cannot modify the control group file system
✓ CapabilityBoundingSet=~CAP_LINUX_IMMUTABLE                  Service cannot mark files immutable
✓ CapabilityBoundingSet=~CAP_IPC_LOCK                         Service cannot lock memory into RAM
✓ ProtectKernelModules=                                       Service cannot load or read kernel modules
✓ CapabilityBoundingSet=~CAP_SYS_MODULE                       Service cannot load kernel modules
✓ CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG                   Service cannot issue vhangup()
✓ CapabilityBoundingSet=~CAP_SYS_BOOT                         Service cannot issue reboot()
✓ CapabilityBoundingSet=~CAP_SYS_CHROOT                       Service cannot issue chroot()
✓ PrivateMounts=                                              Service cannot install system mounts
✓ CapabilityBoundingSet=~CAP_BLOCK_SUSPEND                    Service cannot establish wake locks
✓ MemoryDenyWriteExecute=                                     Service cannot create writable executable memory mappings
✓ RestrictNamespaces=~user                                    Service cannot create user namespaces
✓ RestrictNamespaces=~pid                                     Service cannot create process namespaces
✓ RestrictNamespaces=~net                                     Service cannot create network namespaces
✓ RestrictNamespaces=~uts                                     Service cannot create hostname namespaces
✓ RestrictNamespaces=~mnt                                     Service cannot create file system namespaces
✓ CapabilityBoundingSet=~CAP_LEASE                            Service cannot create file leases
✓ CapabilityBoundingSet=~CAP_MKNOD                            Service cannot create device nodes
✓ RestrictNamespaces=~cgroup                                  Service cannot create cgroup namespaces
✓ RestrictNamespaces=~ipc                                     Service cannot create IPC namespaces
✓ ProtectHostname=                                            Service cannot change system host/domainname
✓ CapabilityBoundingSet=~CAP_(CHOWN|FSETID|SETFCAP)           Service cannot change file ownership/access mode/capabilities
✓ CapabilityBoundingSet=~CAP_SET(UID|GID|PCAP)                Service cannot change UID/GID identities/capabilities
✓ LockPersonality=                                            Service cannot change ABI personality
✓ ProtectKernelTunables=                                      Service cannot alter kernel tunables (/proc/sys, …)
✓ RestrictAddressFamilies=~AF_PACKET                          Service cannot allocate packet sockets
✓ RestrictAddressFamilies=~AF_NETLINK                         Service cannot allocate netlink sockets
✓ RestrictAddressFamilies=~…                                  Service cannot allocate exotic sockets
✓ RestrictAddressFamilies=~AF_(INET|INET6)                    Service cannot allocate Internet sockets
✓ CapabilityBoundingSet=~CAP_MAC_*                            Service cannot adjust SMACK MAC
✓ IPAddressDeny=                                              Service blocks all IP address ranges
✓ RestrictSUIDSGID=                                           SUID/SGID file creation by service is restricted
✓ UMask=                                                      Files created by service are accessible only by service's own user by default

→ Overall exposure level for keyd.service: 1.0 OK 🙂


Wildcard ambient modules declaration override rules

Search Terms
wildcard ambient module override
Suggestion
I could not find written anywhere how wildcard ambient module declaration precedence work in case of overlaps.
In the original pull request "prefix length" was used as the best fit criteria, but I could not locate where that function is located into current code.
Also, prefix length won't help in case of post-fixed *, but maybe that was just naming and it actually meant "longer match".
This feature should be better documented into its handbook page or, if it has been dropped after first implementation, it would be useful to know why so.
The most closely related question I found on StackOverflow doesn't have an answer.
Use Cases
I have a setup with Vue (Quasar actually) + TypeScript + Jest, using SFC.
I have to mount Vue components into Jest tests (which are written into .ts files), but importing SFC won't work (they are not TS files).
Using a shim for all Vue files (the official solution) partially solves this problem, because at least you get typings for the general Vue instance, but you won't get typings for that particular SFC (data, props, computed, etc).
I currently separated the TS script from the SFC to be able to get the typings by importing from the two different files. Now I'm trying to define shims for the component .vue to work by binding its name with a wildcard to it's TS counterpart.
Unluckily, when I import ./demo/QBtn-demo.vue, I still get *.vue shim instead of the specific component one, and nowhere seems to be found how can I force the override.
If I remove Vue shim, it works, but I'm forced to make a personal shim for every component.
I know it's possible by using triple slash references, but that's not the point of this issue.
Current workaround is to import both the .vue SFC and the TS script and then explicitly cast the SFC to the type of the specific instance.
Examples
shims-vue.d.ts
declare module '*.vue' {
  import Vue from 'vue';
  export default Vue;
}

component.d.ts
declare module '*/QBtn-demo.vue' { // <= works when general Vue shim isn't present
  import QBtnDemo from 'test/jest/__tests__/demo/QBtn-demo'; // <= this is the TS file
  export default QBtnDemo;
}

QBtn-demo.vue

<template>

{{ input }}

    {{ counter }}
    <q-btn id="mybutton" @click="increment()"></q-btn>

</template>

QBtn-demo.ts
import Vue from 'vue';

export default Vue.extend({
  name: 'QBUTTON',
  data: function(): { counter: number; input: string } {
    return {
      counter: 0,
      input: 'rocket muffin',
    };
  },
  methods: {
    increment(): void {
      this.counter++;
    },
  },
});

app,spec.ts
import { createLocalVue, mount } from '@vue/test-utils';
import { Quasar } from 'quasar';
import { VueConstructor } from 'vue';

import QBtnDemo from './demo/QBtn-demo.vue'; // <= Gets types as 'Vue' instead of 'QBtnDemo'

describe('Mount Quasar', () => {
  const localVue = createLocalVue();
  localVue.use(Quasar);

  const wrapper = mount(QBtnDemo, { localVue });
  const vm = wrapper.vm;

  it('has a created hook', () => {
    expect(typeof vm.increment).toBe('function'); // <= TS error: could not find 'increment'
  });

  it('sets the correct default data', () => {
    expect(typeof vm.counter).toBe('number');  // <= TS error: could not find 'counter'
    const defaultData = vm.$data;
    expect(defaultData.counter).toBe(0);
  });

  it('correctly updates data when button is pressed', () => {
    const button = wrapper.find('button');
    button.trigger('click');
    expect(vm.counter).toBe(1);  // <= TS error: could not find 'counter'
  });
});

app.spec.ts with casting workaround
import { createLocalVue, mount } from '@vue/test-utils';
import { Quasar } from 'quasar';
import { VueConstructor } from 'vue';

import QBtnDemoComponent from './demo/QBtn-demo.vue';
import QBtnDemo from './demo/QBtn-demo';

describe('Mount Quasar', () => {
  const localVue = createLocalVue();
  localVue.use(Quasar);

  const wrapper = mount(QBtnDemoComponent as typeof QBtnDemo, { localVue });
  const vm = wrapper.vm;

  it('has a created hook', () => {
    expect(typeof vm.increment).toBe('function'); // <= Infered correctly
  });

  it('sets the correct default data', () => {
    expect(typeof vm.counter).toBe('number'); // <= Infered correctly
    const defaultData = vm.$data;
    expect(defaultData.counter).toBe(0);
  });

  it('correctly updates data when button is pressed', () => {
    const button = wrapper.find('button');
    button.trigger('click');
    expect(vm.counter).toBe(1); // <= Infered correctly
  });
});

Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

Is there any progress of this issue? 🤔


ValueError when predicting

Hello,
I have been playing with the repository these days and trained the Cifar10 following all steps mentioned here. However, when I try to generate the Cifar10 images from the trained model stored in /tmp, I keep getting the following error ( I am copying and pasting the whole trace ):

root@46c4d6cfa0ab:~/pixelcnn_keras# python3 predict_keras_datasets.py --nb_pixelcnn_layers 3 -c configs/sample_predict_cifar10.cfg --checkpoint_file /tmp/pixelcnn_cifar10/20170916_192344/pixelcnn-weights.01-3.9469.hdf5
Using TensorFlow backend.
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:135] successfully opened CUDA library libcurand.so.8.0 locally
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:910] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties:
name: GeForce GTX 960M
major: 5 minor: 0 memoryClockRate (GHz) 1.176
pciBusID 0000:01:00.0
Total memory: 1.96GiB
Free memory: 1.17GiB
I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0:   Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 960M, pci bus id: 0000:01:00.0)
W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 1.06GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
W tensorflow/core/common_runtime/bfc_allocator.cc:217] Ran out of memory trying to allocate 1.06GiB. The caller indicates that this is not a failure, but may mean that there could be performance gains if more memory is available.
Traceback (most recent call last):
File "predict_keras_datasets.py", line 159, in
sys.exit(predict())
File "predict_keras_datasets.py", line 145, in predict
sampled_pred = np.array([utils.sample(sampled_pred[i]) for i in range(len(sampled_pred))])
File "predict_keras_datasets.py", line 145, in
sampled_pred = np.array([utils.sample(sampled_pred[i]) for i in range(len(sampled_pred))])
File "/root/pixelcnn_keras/core/utils.py", line 203, in sample
probas = np.random.multinomial(1, preds, 1)
File "mtrand.pyx", line 4593, in mtrand.RandomState.multinomial (numpy/random/mtrand/mtrand.c:37541)
ValueError: sum(pvals[:-1]) > 1.0

I have to mention that I trained a very very small NN with 2 epochs and the number of PixelCNN layers reduced to 3 just because of timing purposes. I don't know if this could be the root of the error. In any case, when I try to run the predict_keras_datasets.py I also update the sample_predict_cifar10.cfg file according to these changes. I can't figure out what I am doing wrong,
Any help with this problem will be highly appreciated,
Thanks in advance.

I am getting the same error


[BUG] Can't watch anything

Describe the bug
Every single search returns the same error and no media
Expected behavior
expected media should play
Error
[!] An Exception has occurred | list index out of range
Here's a better error message
Traceback (most recent call last):   File "/home/shinysocks/.local/bin/mov-cli", line 8, in <module>     sys.exit(movcli())   File "/home/shinysocks/.local/lib/python3.10/site-packages/mov_cli/__main__.py", line 20, in movcli     provider.redo(CMD_ARGS.s)   File "/home/shinysocks/.local/lib/python3.10/site-packages/mov_cli/utils/scraper.py", line 214, in redo     return self.display(search, result)   File "/home/shinysocks/.local/lib/python3.10/site-packages/mov_cli/utils/scraper.py", line 203, in display     self.TV_PandDP(mov_or_tv, "p")   File "/home/shinysocks/.local/lib/python3.10/site-packages/mov_cli/websites/cartoons/kisscartoon.py", line 87, in TV_PandDP     url, ref = self.cdn_url(link)   File "/home/shinysocks/.local/lib/python3.10/site-packages/mov_cli/websites/cartoons/kisscartoon.py", line 70, in cdn_url     hls = re.findall("\\\/cdn\\\/hls\\\/([a-fA-F\d]*)\\\/master\.txt", inter_2)[0] IndexError: list index out of range
Desktop (please complete the following information):

OS: Linux
Version: 1.5.1 installed through pip

how do I support this project btw? ya'll awesome

Its working for me, I have however had similar issues before usually as reinstall fixes it

Well now it has also broken for me, something must have changed again for English providers

Reinstalling, including old versions, didn't solve the issue for me

Guys, I'll try fixing it on Sunday


Run specific targets in bash

Fix passing variables from one shell script to another. Fixes inability to run ./build.sh sometarget in current setup.

cc @victorhurdugaci

Looks good. :shipit:  after you make sure that it works on one of the converted repos


C++ solution for TWTCLOSE

Added C++ solution for TWTCLOSE problem.

There is already a folder of that problem with readme file.
I just added C++ solution.
Its in the folder "Beginner" by the name "Closing the tweets(TWTCLOSE)".

There is already a folder of that problem with readme file. I just added C++ solution. Its in the folder "Beginner" by the name "Closing the tweets(TWTCLOSE)".

If the folder already exists, you can add your .cpp file inside that 💫


Removed unnecessary @Local annotations and their respective imports

Following @rafaelweingartner 's findings in PR #714 that many spring beans contained an @Local annotation, we've decided to remove said annotations and their imports from the ComponentLifecycleBase class and its subclasses seeking a reduction of a few hundred lines of useless code.
I had already opened a pull request for this (#853) but at some point my commit disappeared from the PR entirely, showing no new changes in code, which caused it to be merged automatically (with no changes).

LGTM, based on a set of tests that I run on this branch. Screenshot is from an experimental Jenkins job (that runs the same tests I did manually until now).
These test may not cover your change, all they do is show you didn't break them. Someone else needs to review the code.

LGTM, checked the code. It felt like skimming at times as 607 lines were removed ;) I don't think there is any problem though.

@cristofolini  github doesn't show JuniperSRXExternalFirewallElement. It has a syntax error. Did you compile this? and did you use -Dnoredist? that part would have probably revealed the error.

@DaanHoogland,
@cristofolini did not run a mvn build witth "-Dnoredist". Sadly, we did not realize that there were some projects that were not built without that parameter.
Sorry for the trouble.
From now on, we will make sure to run a "mvn clean install -Dnoredist -P developer,systemvm" to make sure that everything is ok, before we create a PR.


operators hive-operator (2.5.3495-5cfdd44)

Update Hive community operator channel(s) [['mce-2.0']] to 2.5.3495-5cfdd44
/hold

unhold

/unhold

/merge possible

/merge possible

/merge possible


VALUES statement

Intro, Synopsis, and Required Privileges are complete. We need to complete Parameters and Examples. For style reference, see those sections in INSERT or DELETE.

Closed by #686


Localize en/docs/contribute/style into Hindi

Localized some files in /content/en/docs/contribute/style  to hindi
My apologies for deletion for previous PR due to some repo sync problem

/assign

/netlify

[hi] Localized into hindi
content/hi/docs/contribute/style/_index.md
content/hi/docs/contribute/style/content-guide.md
content/hi/docs/contribute/style/content-organization.md


Validation: Removed Absolute Links

Removed absolute links.

Docs Build status updates of commit c411868:
:warning: Validation status: warnings

File
Status
Preview URL
Details

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md
:warning:Warning

Details

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md
:warning:Warning

Details

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md

Line 13, Column 1: [Warning: duplicate-h1s - See documentation] H1 'Changes to Microsoft Dynamics NAV Cmdlets From Previous Release' is duplicated with other articles: 'Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md(13,1), Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md(13,1)'. First level headings must be unique within a docset.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.
Line 25, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Get-NAVServerAppConfiguration?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 26, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/New-NAVServerAppConfiguration?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 27, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Set-NAVServerAppConfiguration?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 28, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Import-NAVConfigurationPackageFile?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 29, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Remove-NAVConfigurationPackageFile?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 30, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Import-NAVMembershipEntitlement?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 31, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Update-NAVScheduledTaskList?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 39, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.apps.management/Get-NAVAppTableModification?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 40, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.apps.management/Remove-NAVAppsForTenant?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 48, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.apps.management/Install-NAVApp?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 49, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Mount-NAVTenant?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 50, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Mount-NAVTenant?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 51, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Start-NAVDataUpgrade?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 52, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/Sync-NAVTenant?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 53, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.management/New-NAVWebServerInstance?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 62, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.apps.tools/Export-NAVAppReportLayout?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 64, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.apps.tools/Export-NAVAppTenantWebService?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.
Line 72, Column 2: [Suggestion: preserve-view-not-set - See documentation] Did you mean to link to a specific version? It's usually better not to specify a version, so the link always goes to the canonical version. If you really need to link to a specific version, add &preserve-view=true to the URL: /powershell/module/microsoft.dynamics.nav.model.tools/New-NAVCrmTable?view=dynamicsnav-ps-2017. Otherwise, remove the view parameter.

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md

Line 13, Column 1: [Warning: duplicate-h1s - See documentation] H1 'Changes to Microsoft Dynamics NAV Cmdlets From Previous Release' is duplicated with other articles: 'Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md(13,1), Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md(13,1)'. First level headings must be unique within a docset.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 9624dd8:
:warning: Validation status: warnings

File
Status
Preview URL
Details

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md
:warning:Warning

Details

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md
:warning:Warning

Details

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md

Line 13, Column 1: [Warning: duplicate-h1s - See documentation] H1 'Changes to Microsoft Dynamics NAV Cmdlets From Previous Release' is duplicated with other articles: 'Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md(13,1), Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md(13,1)'. First level headings must be unique within a docset.
Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

dynamics-nav/Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md

Line 13, Column 1: [Warning: duplicate-h1s - See documentation] H1 'Changes to Microsoft Dynamics NAV Cmdlets From Previous Release' is duplicated with other articles: 'Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release.md(13,1), Changes-to-Microsoft-Dynamics-NAV-Cmdlets-From-Previous-Release-2017.md(13,1)'. First level headings must be unique within a docset.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

@buck1ey
The Content & Learning team is fixing build validation errors on docs.microsoft.com for the rest of H2. This will eliminate potential accessibility, security, and usability issues. This PR includes only build validation fixes and does not change other content. Please review within five business days and merge or comment in the PR with any changes you’d like to see. Thank you!


Plots return 404 when using --base-url option in docker container

Describe the bug
When using the mo.ui.altair_chart for interactive altair charts, the chart cells seem to break completely if you are launching inside of a docker container and using the --base-url option (cells return 404). Confirmed that simply removing the --base-url resolved the issue.
Environment
{
  "marimo": "0.6.17",
  "OS": "Linux",
  "OS Version": "5.15.0-107-generic",
  "Processor": "",
  "Python Version": "3.12.4",
  "Binaries": {
    "Browser": "--",
    "Node": "--"
  },
  "Requirements": {
    "click": "8.1.7",
    "importlib-resources": "missing",
    "jedi": "0.19.1",
    "markdown": "3.6",
    "pymdown-extensions": "10.8.1",
    "pygments": "2.18.0",
    "tomlkit": "0.12.5",
    "uvicorn": "0.30.1",
    "starlette": "0.37.2",
    "websockets": "12.0",
    "typing-extensions": "missing",
    "black": "24.4.2"
  }
}

Code to reproduce
import altair as alt
import marimo as mo
from vega_datasets import data

chart = (
    alt.Chart(data.cars())
    .mark_point()
    .encode(
        x="Horsepower",
        y="Miles_per_Gallon",
        color="Origin",
    )
)

chart = mo.ui.altair_chart(chart)

mo.hstack([chart, chart.value])

Thanks for the repro - i have a fix in review


Migrate Playbook exercises

All of the Playbook exercises have been migrated into the new guide, but we need to remove them from the Playbook and put redirects in place.

[ ] 3-12-3
[ ] assumptions
[ ] back-burner
[ ] card-sorting
[ ] critical-path
[ ] five-whys
[ ] group-critique
[ ] mind-mapping
[ ] needs-wants-desires
[ ] pitch-practice
[ ] problem-statement
[ ] silent-critique
[ ] speedy-eights
[ ] storyboards
[ ] who-what-when-where

@aspencer116 Do you want to take this whole issue since its sort of related ot the identify conflicts thing? Redirects can be added here: https://github.com/thoughtbot/thoughtbot.com/pull/2674

Yep, that makes sense!

Added two missing exercises https://github.com/thoughtbot/design-sprint-guide/pull/74

@cpytel I added redirects to your draft PR https://github.com/thoughtbot/thoughtbot.com/pull/2674/commits/6c6a271b6f1837dc8c1e2e7eb95b856bd4f87e52

Hope that was ok!


Getting validation raised because SPIRV prodces a decoration of clipdistance that isn't used

#version 450

layout(set=0,binding=0) buffer Dynamics
{
     layout(offset=0)  vec4 s_Color;
     layout(offset=16) vec4 s_Color2;
     layout(offset=32) vec2 Scale;
     layout(offset=40) vec2 Offset;
     layout(offset=48) float ZDepth;
} DynamicsI;

layout(set=1,binding=0) uniform samplerBuffer V_Position;
layout(set=1,binding=1) uniform samplerBuffer V_TexCoord;

out vec2 Tex;

void main()
{
    vec4 Pos = texelFetch (V_Position, gl_VertexIndex );
    Pos.xy = Pos.xy * DynamicsI.Scale + DynamicsI.Offset;

    Tex = texelFetch (V_TexCoord, gl_VertexIndex ).xy;
    gl_Position = Pos;
}

This vertex shader, after compilation in glsllang, will cause a validation message (error) because it declares the clipdistance as a decoration but doesn't use it but the device doesn't support it.  All shaders generated from glslang will have this problem because it always adds this decoration.

This has come up before and I believe glslang was going to address this. Assigning to Chris to make sure that was the resolution.

Funny, I posted it to the GLSLang folks and they thought it was a validation issue.

Can you post the bug link for their side here?

The immediate solution is to explicitly redeclare the gl_PerVertex block to have the subset of members that you want.

https://github.com/KhronosGroup/glslang/issues/472
SPIRV folks say it's fine, GLSL compiler is outputting them. In order for the messages to go away I had to hack up GLSLang.

@dankbaker in the interim, include a redeclaration like so:
out gl_PerVertex {
    vec4 gl_Position;
};

As for the issue, it looks like we shouldn't be producing this error unless you actually touch the clipdistance member. Unfortunately, that message isn't produced by the layer, it comes out of the validator within SPIRV-Tools.

Raised a bug in the validator project where this needs to be fixed.

The rule was relaxed in the validator as of July 7, but only for the Vulkan 1.0 context, and remains strict in the "universal SPIR-V" taret environments. (See the SPIRV-Tools bug for details commit hashes).
If using the validator API, you must use it with a context created with SPV_ENV_VULKAN_1_0.
If using spirv-val command line tool, you must specify --target-env, as follows:
$ glslc -c x.vert
$ ls x.*
x.vert  x.vert.spv
$ spirv-val x.vert.spv
error: 43: Operand 4 of MemberDecorate requires one of these capabilities: ClipDistance
$ echo $?
243
$ spirv-val --target-env vulkan1.0  x.vert.spv
$ echo $?
0

After further discussion on https://github.com/KhronosGroup/SPIRV-Tools/issues/365 we'll change the validator to allow these cases to pass with any environment.

@dankbaker I've confirmed that this works using master, and it looks like everything required made it into the <IP_ADDRESS> SDK. Are you still seeing spurious errors?

Latests SDK doesn't seem to generate the error, so looks good!


fix : added mongodb support images

Pull Request Template
Description
Added the images for MongoDB support
Fixes #1221
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue).
[ ] New feature (non-breaking change which adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
[x] This change requires a documentation update.

Checklist:

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have made corresponding changes to the documentation.
[x] I have added corresponding tests.
[x] Any dependent changes have been merged and published in downstream modules.

@Swpn0neel This PR is incomplete. You have just added the images
Please add the paths to the images.

Hey @Arindam200, I've implemented the requested changes, kindly check it now!!

@Swpn0neel This PR is incomplete. You have just added the images
Please add the paths to the images.

Hey @Arindam200 , I've implemented the requested changes, kindly check it now!!

Good to go


Fix Link for Curriculum Vitae on Website

Add your CV to the site in the form of a PDF link.

Updated CV was added to the site.


Questions about the "get_class_embedding.py" file

Hello. I came across your paper and found it very interesting, so I downloaded the code to run it myself. And I want to make my own dataset, I have modified the paths_config.py files. When I run the get_class_embedding.py file, unfortunately it gives me this error "ImportError: No module named 'fused'"

Could you provide the detail of your error?

Thank you very much for your reply, I suspect that I am having problems making my own dataset, I am downloading the dataset of flowers you provided this morning and I plan to make my own dataset after running the dataset you gave me as a reference first. I'll come back chatter if I don't solve the problem.

I downloaded the dataset for flowers and created the packet files with "all_img/test" and "all_img/train",  and modifications the config/paths_config.py  and config/data_config.py
config/paths_config.py
dataset_paths = { 	'af_train': '/home/zeng/AGE-main/all_img/train', 	'af_valid': '/home/zeng/AGE-main/all_img/test', 	# 'fl_train': '/data/dgq/fpsp/data/flowers/train', 	# 'fl_valid': '/data/dgq/fpsp/data/flowers/valid', },
config/data_config.py
from configs import transforms_config from configs.paths_config import dataset_paths DATASETS = { 	'af_encode': { 		'transforms': transforms_config.EncodeTransforms, 		'train_source_root': dataset_paths['af_train'], 		'train_target_root': dataset_paths['af_train'], 		'valid_source_root': dataset_paths['af_valid'], 		'valid_target_root': dataset_paths['af_valid'], 	}, 	# 'fl_encode': { 	# 	'transforms': transforms_config.EncodeTransforms, 	# 	'train_source_root': dataset_paths['fl_train'], 	# 	'train_target_root': dataset_paths['fl_train'], 	# 	'valid_source_root': dataset_paths['fl_valid'], 	# 	'valid_target_root': dataset_paths['fl_valid'], 	# }, }
The program has reported an error
Traceback (most recent call last):   File "tools/get_class_embedding.py", line 19, in <module>     from models.age import AGE   File "./models/age.py", line 12, in <module>     from models.encoders import psp_encoders   File "./models/encoders/psp_encoders.py", line 8, in <module>     from models.stylegan2.model import EqualLinear   File "./models/stylegan2/model.py", line 7, in <module>     from models.stylegan2.op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d   File "./models/stylegan2/op/__init__.py", line 1, in <module>     from .fused_act import FusedLeakyReLU, fused_leaky_relu   File "./models/stylegan2/op/fused_act.py", line 9, in <module>     fused = load(   File "/home/zeng/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1079, in load     return _jit_compile(   File "/home/zeng/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1317, in _jit_compile     return _import_module_from_library(name, build_directory, is_python_module)   File "/home/zeng/anaconda3/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1699, in _import_module_from_library     file, path, description = imp.find_module(module_name, [path])   File "/home/zeng/anaconda3/lib/python3.8/imp.py", line 296, in find_module     raise ImportError(_ERR_MSG.format(name), name=name) ImportError: No module named 'fused'
I found that the naming you used in the given dataset is n02085620_25.JPEG_238_24_392_167.jpg, but the data I downloaded from the internet is named image_00033.jpg, did you perform any manipulation in between? Like stitching the original image and the target like zi2zi?

I guess the program error is because there is something wrong with your environment configuration. You can configure your environment using environment/envrionment.yaml.
As for the naming problem, you should rename you data file in the form of catefgory-id_sample_id.jpg. For example, in n02085620_25.JPEG_238_24_392_167.jpg, "n02085620" is the category id and "25.JPEG_238_24_392_167" is the sample id. They are connected by a "_".

i down your weight in face dataset,but the opt has no attribution named A_length. the error information is:
Traceback (most recent call last):
File "/home/user/.pycharm_helpers/pydev/pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals)  # execute the script
File "/home/user/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/user/Document/fanbing/AGE/tools/get_class_embedding.py", line 82, in
run()
File "/home/user/Document/fanbing/AGE/tools/get_class_embedding.py", line 41, in run
net = AGE(opts)
File "../models/age.py", line 81, in init
self.ax = Ax(self.opts.A_length)
AttributeError: 'Namespace' object has no attribute 'A_length'


[DOC] Move some of the examples to notebooks

PR Description
Please describe the changes proposed in the pull request:

Move examples to notebooks

This PR resolves #(put issue number here, and remove parentheses).

PR Checklist

Please ensure that you have done the following:

[x] PR in from a fork off your branch. Do not PR from <your_username>:dev, but rather from <your_username>:<feature-branch_name>.

[x] If you're not on the contributors list, add yourself to AUTHORS.rst.

[ ] Add a line to CHANGELOG.md under the latest version header (i.e. the one that is "on deck") describing the contribution.

Do use some discretion here; if there are multiple PRs that are related, keep them in a single line.

Automatic checks
There will be automatic checks run on the PR. These include:

Building a preview of the docs on Netlify
Automatically linting the code
Making sure the code is documented
Making sure that all tests are passed
Making sure that code coverage doesn't go down.

Relevant Reviewers

Please tag maintainers to review.

@ericmjl

@samukweku this is my bad for not checking in earlier! I'm so sorry, with the flood of emails to my personal inbox, I sometimes ended up just skipping over things.
I like what's done here. Let's merge, though I also think we should consider moving the examples over to the pyjanitor-examples repository. That would make for a great home for all of these examples we put in the docs.


deleteCookie() function does not return the deleted value

What version of Hono are you using?
4.2.6
What runtime/platform is your app running on?
Bun
What steps can reproduce the bug?
import { Hono } from 'hono'
import { deleteCookie } from 'hono/cookie'

const app = new Hono()

app.post('/', (c) => {
  const user = deleteCookie(c, 'user')
        // ^? const user: void
  return c.text('Signed out', 200)
})

What is the expected behavior?
According to the documentation, deleteCookie() function should return the deleted value.
What do you see instead?
Contrary to the documentation, the deleteCookie() function is defined with a return type of void.
export declare const deleteCookie: (c: Context, name: string, opt?: CookieOptions) => void;

Additional information
No response

Looks like it's available in 4.3.0 https://github.com/honojs/hono/pull/2512.
Can you upgrade your Hono version?

Looks like it's available in 4.3.0 #2512.

By updating hono to the latest version (4.3.7), the problem has been resolved. Thanks for the help, @fzn0x! 😄

Looks like it's available in 4.3.0 #2512.

By updating hono to the latest version (4.3.7), the problem has been resolved. Thanks for the help, @fzn0x! 😄

Your welcome, glad to help 👍


Add basic org-insert-link functionality

Described here
There is no completion support for protocols (http, etc.) yet.
In light of other GH issues that are concerned with hyperlinks I'd like to discuss whether it makes sense to add a hyperlink object. It would possibly ease development in the future. Also, how about parsing them? Opening hyperlinks from the agenda requires to display all the links of a headline body to the user. There is also org-[next|previous]-link, that jumps to the next|previous link in the buffer

In light of other GH issues that are concerned with hyperlinks I'd like to discuss whether it makes sense to add a hyperlink object. It would possibly ease development in the future. Also, how about parsing them?

I definitely support this. Regarding the parsing, we can probably do parsing only when necessary, not on init.

I definitely support this

Great :slightly_smiling_face: I'll prepare another PR for it.

do parsing only when necessary

Sounds sensible. It's also large enough to do it in a dedicated PR imo.
Is there anything left for this PR?

@kristijanhusak ping

@jgollenz the mapping for insert-link does not appear in the list of mappings that I get by pressing g? in an org file. Is that on purpose?
A small but fantastic feature by the way, thanks :)

@jgollenz sorry to bother you again. I noticed that, similar to inserting time stamps, the link is inserted before the cursor and not after. I would find it more intuitive if the link was inserted after the cursor, for the same reasons as the time-stamps (i.e., usually you write some text, then enter a space, and then you'd like to have a link after the space. Currently you have to enter two spaces and then enter the link and then remove one of the spaces again.

Is that on purpose?

of course not :grin:

more intuitive if the link was inserted after the cursor

I agree. Please check this branch. Does it work as expected?

Works like a charm! Thank you! :)


Fix typos in translations placeholders

This is a PR for https://github.com/apache/incubator-superset/issues/7134.
I'm not entirely sure this fixes the problem that was described, because I wasn't able to get the error shown on the screen, but had to check JS console instead. Nevertheless, I'm pretty sure these typos should be corrected.
Also, I'm not sure if the .mo files should be included in the PR as well?

Codecov Report

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

@@           Coverage Diff           @@
##           master    #7161   +/-   ##
=======================================
  Coverage   64.63%   64.63%
=======================================
  Files         422      422
  Lines       20607    20607
  Branches     2253     2253
=======================================
  Hits        13320    13320
  Misses       7165     7165
  Partials      122      122

Continue to review full report at Codecov.

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

Codecov Report

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

@@           Coverage Diff           @@
##           master    #7161   +/-   ##
=======================================
  Coverage   64.63%   64.63%
=======================================
  Files         422      422
  Lines       20607    20607
  Branches     2253     2253
=======================================
  Hits        13320    13320
  Misses       7165     7165
  Partials      122      122

Continue to review full report at Codecov.

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


[Bug] Which tvm version currently supports rocm？

Expected behavior
Execute tvm code on rocm platform
Actual behavior
What actually happened
Environment
tvm 0.10
ubuntu 20.04
Steps to reproduce
Preferably a minimal script to cause the issue to occur.
Triage
There is no specified version of rocm is not in the document

needs-triage

I have tried to execute tvm code in rocm 5.2 platform but it not worked which print no correct result. Can you help me?  @tqchen

For rocm 5, we need the change to contrib/rocm.py in this commit https://github.com/masahi/tvm/commit/26d2701b7823ab4d93b8d980bc8689e9c03b2ee1
Unfortunately the rocm backend is not actively maintained due to fewer interests from users and developers. So our support for rocm is only best-effort basis.