TypeScript error: No overload matches this call.

Description
I'm using better-typescript-lib to enforce better TS definitions. This is giving me 5 TypeScript errors in 2 of the generated files.
I could work on this (probably next month), if you think it is worth handling these.
src/client/core/CancelablePromise.ts:91:3 - error TS2322: Type 'Promise<T>' is not assignable to type 'Promise<TResult1 | TResult2>'.
  Type 'T' is not assignable to type 'TResult1 | TResult2'.

91   return this.promise.then(onFulfilled, onRejected);
     ~~~~~~

  src/client/core/CancelablePromise.ts:20:32
    20 export class CancelablePromise<T> implements Promise<T> {
                                      ~
    This type parameter might need an `extends TResult1 | TResult2` constraint.

src/client/core/CancelablePromise.ts:91:28 - error TS2769: No overload matches this call.
  Overload 1 of 2, '(onfulfilled?: null | undefined, onrejected?: ((reason: unknown) => T | PromiseLike<T>) | null | undefined): Promise<T>', gave the following error.
    Argument of type '((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined' is not assignable to parameter of type 'null | undefined'.
      Type '(value: T) => TResult1 | PromiseLike<TResult1>' is not assignable to type 'null | undefined'.
  Overload 2 of 2, '(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: ((reason: unknown) => TResult1 | PromiseLike<TResult1>) | null | undefined): Promise<...>', gave the following error.
    Argument of type '((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined' is not assignable to parameter of type '(value: T) => TResult1 | PromiseLike<TResult1>'.
      Type 'undefined' is not assignable to type '(value: T) => TResult1 | PromiseLike<TResult1>'.

91   return this.promise.then(onFulfilled, onRejected);
                              ~~~~~~~~~~~

src/client/core/CancelablePromise.ts:97:29 - error TS2345: Argument of type '((reason: unknown) => TResult | PromiseLike<TResult>) | null | undefined' is not assignable to parameter of type '((reason: unknown) => T | PromiseLike<T>) | null | undefined'.
  Type '(reason: unknown) => TResult | PromiseLike<TResult>' is not assignable to type '(reason: unknown) => T | PromiseLike<T>'.
    Type 'TResult | PromiseLike<TResult>' is not assignable to type 'T | PromiseLike<T>'.
      Type 'TResult' is not assignable to type 'T | PromiseLike<T>'.

97   return this.promise.catch(onRejected);
                               ~~~~~~~~~~

  src/client/core/CancelablePromise.ts:94:15
    94  public catch<TResult = never>(
                     ~~~~~~~~~~~~~~~
    This type parameter might need an `extends T | PromiseLike<T>` constraint.

src/client/core/request.ts:73:24 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '(substring: string, group: string) => string' is not assignable to parameter of type '(substring: string, ...rest: (string | number)[]) => string'.
      Types of parameters 'group' and 'rest' are incompatible.
        Type 'string | number' is not assignable to type 'string'.
          Type 'number' is not assignable to type 'string'.

73   .replace(/{(.*?)}/g, (substring: string, group: string) => {
                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@typescript/lib-es5/index.d.ts:666:3
    666   replace(
          ~~~~~~~~
    667     searchValue: string | RegExp,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ...
    673     ) => string,
        ~~~~~~~~~~~~~~~~
    674   ): string;
        ~~~~~~~~~~~~
    The last overload is declared here.

src/client/core/request.ts:92:26 - error TS2769: No overload matches this call.
  Overload 1 of 3, '(name: string, value: string | Blob): void', gave the following error.
    Argument of type 'StringifyResult<unknown>' is not assignable to parameter of type 'string | Blob'.
      Type 'undefined' is not assignable to type 'string | Blob'.
  Overload 2 of 3, '(name: string, value: string): void', gave the following error.
    Argument of type 'StringifyResult<unknown>' is not assignable to parameter of type 'string'.
      Type 'undefined' is not assignable to type 'string'.
  Overload 3 of 3, '(name: string, blobValue: Blob, filename?: string | undefined): void', gave the following error.
    Argument of type 'StringifyResult<unknown>' is not assignable to parameter of type 'Blob'.
      Type 'undefined' is not assignable to type 'Blob'.

92     formData.append(key, JSON.stringify(value));
                            ~~~~~~~~~~~~~~~~~~~~~

Found 5 errors in 2 files.

Errors  Files
     3  src/client/core/CancelablePromise.ts:91
     2  src/client/core/request.ts:73

OpenAPI specification (optional)
The content doesn't matter. The files with errors are part of the core.
{
"openapi": "3.0.0",
"info": {
"title": "Anything",
"description": "Anything Documentation",
"version": "0.1.0"
}
}
Configuration
openapi-ts -i ./openapi.json -o ./src/client --client axios --schemas true
System information (optional)
Linux
Node 20.15.0
npm 10.7.0
"@hey-api/openapi-ts": "^0.48.0" -> 0.48.1

I closed this issue because it seems like the problem is with better-typescript-lib that has the wrong definitions.

@jpenna do you have a link to the issue? Just want to get context and ensure this really isn't a fault on our end

Hey @mrlubos , I didn't create any issue on their side nor checked for it. When I uninstalled the lib, the error stopped showing up.
One of the errors is on a string.replace(regex, func) call that they are complaining it doesn't overload with any replace signature. I started a REPL Node session and ran the exact same thing you have in openapi-ts and it worked fine. I believe "better-ts" might have the wrong/outdated signature for the function or something alike... I don't want to have these types of errors in the future, so I uninstalled it :man_shrugging:


how to change view from mobile to desktop.

Hi again,
The websites are always displayed in their mobile form, is there a way to change that ? It tried changing TLabWebView and WebView width and height related properties to 1920x1080 and it still shows as the mobile website. Thanks!

Hi Stefan,
A sample of displaying WebView in desktop form has been added to the repository.
This sample changes the user agent of WebView to change the page display to desktop.

// WebViewSample.cs
public void SetUserAgent(string ua)
{
    // Change user agent (Switches the browser display to the desktop form).
    // WebView.SetUserAgent(string ua)
    m_webView.SetUserAgent("Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0");
}

SetUserAgent(string ua) is a new feature added in this update, so clone the latest version of the repository when checking the operation.
See also User agent settings.
mozilla user-agent

God like! Thank you!


AWS CodeCommit

Hi,
For checking out from AWS CodeCommit, I had to:

Remove lines 45-47 from clients/common/common.go (that adds the .git suffix)
Modify DefaultBranch in remote.go to return branch = "refs/heads/master" when SymbolicReference("HEAD") returns the empty string.

We never tried with AWS CodeCommit, interesting... I will take a look.

https://github.com/src-d/go-git/commit/b024ef7713008e5be1f865df2b9563af2f005712
Solve!


support kube_config exec

Is there a plan to support the kube_config exec function? as in:
users:
- name: user-name
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: heptio-authenticator-aws
      args:

@cjhodges77 I needed this as well so I just implemented it ;)


Add the translation into Spanish - Argentina

It is my first pull request, so just in case add it carefully

The file was added: es-ar.js

Greetings

Apologies, I totally missed this PR. I'll merge it in v2 but you might have to add a few missing translations.


localhost:3000 showed the below error ; went off after refresh

Not reproducible by Gaurav or I.  Deferring to 8.0-2.  This is more of a code refactoring task than anything and not critical to the release.

I can reproduce it and fix it.

You need either fast fingers, an e2e test or a slow machine.
I just got it:
Exception:
Cannot read property 'name' of undefined
Stack trace:
{anonymous}()@http://localhost:3000/app/directives/ssFacetDateRange.js:366:49
Object.forEach@http://localhost:3000/deps/angular/angular.js:323:20
{anonymous}()@http://localhost:3000/app/directives/ssFacetDateRange.js:362:25
{anonymous}()@http://localhost:3000/deps/angular/angular.js:16205:28
completeOutstandingRequest@http://localhost:3000/deps/angular/angular.js:4902:10
{anonymous}()@http://localhost:3000/deps/angular/angular.js:5282:7
I've already explained how it occurs and how to fix it, so if you didn't understand, I can handle it.

You're good.  :)  Thanks for looking at it.

Not able to reproduce . Marking it as done. Thanks for adding check around it .


How to integrate this with OwinStartup?

I've got my old web forms project setup to now include MVC. And I have automatic startup via OwinStartup:
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Owin;
using Owin;
using System.Web.Mvc;

[assembly: OwinStartup( typeof( ProvPubs.Compline.Web.Startup ) )]
namespace ProvPubs.Compline.Web
{
	public partial class Startup
	{
		public void Configuration( IAppBuilder app )
		{
			var services = new ServiceCollection( );
			ConfigureServices( services );
			var resolver = new DefaultDependencyResolver( services.BuildServiceProvider( ) );
			DependencyResolver.SetResolver( resolver );
			ConfigureAuth( app );
		}
	}
}

My services are registered in a partial (Startup) class.
But since my startup is automatically called by the framework, how would I incorporate your project such that I can use constructor di in aspx pages?

@cosmoKenney You'll want to use WebActivatorEx as per the examples in the documentation.
This is because WebActivatorEx.PreStart runs before OwinStartup: https://stackoverflow.com/questions/21462777/webactivatorex-vs-owinstartup
The ASP.NET MVC functionality in AspNetDependencyInjection doesn't work right now, but I've got a fix in the works I'll publish shortly - in a few hours.

@cosmoKenney Did my reply help? May I close this issue now?

Yes I believe so.


Feature Request Slack option field

Slack supports interactive messages with a drop down of pre-defined actions like:
See Slack API docs for option fields and option groups.
Allowing interactive slack messages with these drop-down menus would enable users to respond in various ways to alerts sent by the Prometheus Alertmanager conveniently from slack.
I'd like to contribute and implement that.
WDYT @simonpasquier?

Hi @mxinden,

Hi @mxinden,
Users would be able to conveniently respond to Prometheus Alerts from Slack, like silence an alert, open a ticket in a system, creating a reminder, etc. .
With a growing number of options buttons might overload a message.
Instead of adding these multiple buttons, a drop down menu wouldn't overload the message while still offering a variety of response actions.
With the option_groups this would look like:

It sounds like a valid scenario although I'm a bit worried that the Slack configuration is getting very complex and prone to mistakes.

This is something I want to add to the alertmanager-bot with Slack support #11.

I follow up with a PR for this to see the impact. Should be easier to decide whether the slack config in the alertmanager gets too bloated with that. Good plan @simonpasquier, @mxinden?

Sure, go for it. We just can't promise it to be merged.


Add 'source file' as a column into combined outputs.

We often want to know where a particular event originated from when combining files - this can help us make that determination.

Resolved in https://github.com/joeavanzato/LogBoost/releases/tag/prod_1_2_0


Fix typo in openstack-exporter's revision.

See PR title

/canonical/self-hosted-runners/run-workflows 7575ba0fddc5bf2db90970e8482db478d74cdce2


Fix admin search on 1.0.0

It is currently not working

Fixed in:
slifszyc/list.js
slifszyc/javve-events


[Fix #6067] Prevent auto-correct error for Performance/InefficientHashSearch

Fixes #6067.
This PR prevents an auto-correct error for Performance/InefficientHashSearch when a method defined by itself and include? method are method chaining.
Essentially, static analysis targeted by RuboCop does not know the type determined at run-time.
So, this implementation may be false negative if it defines method itself.
def keys
  # When delegation instead of an array,
  # it does not know the type until run-time.
  []
end

def my_include?(key)
  keys.include?(key)
end

If the above keys method defined by itself will return a Hash, it will be false negative, so there is room for improvement in the future.
The aim of this change is to make it more valuable to prevent auto-correct error than false negative.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run rake default or rake parallel. It executes all tests and RuboCop for itself, and generates the documentation.

I updated this PR. Thanks for the review.


Graphical User Interface for Tensorflow

Hello @pradeeban @lastlegion ,
I am really interested in this issue and would like to contribute to it. Can anyone please help me get more details regarding this idea and how can I get started with this.
Thank you

Hi Riya,
Thanks for your interest. The GSoC selected organizations will be announced on February 26 12:00 UTC. If Emory BMI is selected as a mentoring organization this year, we will invite all our interested student applicants to our Slack room. You may send us an email for us to add you to the Slack channel by the 26th.
In the meantime, you may focus on getting familiarized with the technologies listed. Feel free to contact the respective mentors, if you have any specific questions on the project idea.

Hi,
Here is my e-mail id -<EMAIL_ADDRESS>Thank you for your response. I will go through the technologies. How can I contact the Mentors?

The mentors' email addresses are included under each project. I have added you to our slack.
You can use the Slack to discuss project ideas when the mentors are online. It will be helpful if you are more specific in your questions when you contact the mentors.

Ok. Thanks :)


tx_log.csv being created in wrong directory?

Playing with AMLSim for the first time for a dissertation project. Getting an error on this step - python3 scripts/convert_logs.py conf.json
Simulation name: sample
Load alert groups: alert_members.csv
Convert transaction list from tmp/sample/tx_log.csv to transactions.csv, cash_tx.csv and alert_transactions.csv
Traceback (most recent call last):
File "scripts/convert_logs.py", line 912, in
converter.convert_acct_tx()
File "scripts/convert_logs.py", line 632, in convert_acct_tx
in_tx_f = open(self.log_file, "r")  # Transaction log file from the Java simulator
FileNotFoundError: [Errno 2] No such file or directory: 'tmp/sample/tx_log.csv'

@apkil I have a pr for this currently open.  You can apply the one-line fix in your local until I get it merged.


Linux yum repository signature broken

VSCode Version: N/A
OS Version: openSUSE tumbleweed

Steps to Reproduce:

Follow the guide at https://code.visualstudio.com/docs/setup/linux#_opensuse-and-slebased-distributions
Run sudo zypper refresh as the guide suggests (and needed to install the package)
The following message appears:

Signature verification failed for file 'repomd.xml' from repository 'Visual Studio Code'.

    Note: Signing data enables the recipient to verify that no modifications occurred after the data
    were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system
    and in extreme cases even to a system compromise.

    Note: File 'repomd.xml' is the repositories master index file. It ensures the integrity of the
    whole repo.

    Warning: This file was modified after it has been signed. This may have been a malicious change,
    so it might not be trustworthy anymore! You should not continue unless you know it's safe.

Does this issue occur when all extensions are disabled?: Yes/No
N/A

could it be that this happens every time one of the non-stable builds gets updated in the repository?

This also happens to other microsoft repositories all the time like the one at https://packages.microsoft.com/opensuse/15/prod/
Besides the problem with the repomd.xml I also get errors with packages that fail signature checks.
The problems go away and reappear constantly.

/duplicate https://github.com/microsoft/vscode/issues/108672


[Severe] Unexpected keras Convolution2D shape?

Here is how to reproduce the result:
    model = Sequential()
    model.add(Convolution2D(64, 3, 3, border_mode='same', input_shape=(3, 256, 256)))
    print(model.input_shape, model.output_shape)

According to the document, the output should be
((None, 3, 256, 256), (None, 64, 256, 256))

but I got
((None, 3, 256, 256), (None, 3, 256, 64))

I have no idea why. My keras version is 1.2.2 and I tried with both tensorflow 0.10.0 and 0.12.0.

Your dim_ordering is set opposite to the data you are using.

Got it. I found the document is targeted at theano dim ordering, however, I am using tensorflow.


asar is deprecated

Please move package dep. to "@electron/asar": "^3.2.1"

https://github.com/electron/asar
<EMAIL_ADDRESS>/test-electron
└─┬<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └─┬<EMAIL_ADDRESS>      └──<EMAIL_ADDRESS>
ping

I didn't realize that #186 was already opened on this, feel free to close and/or redirect this issue there.

@malept @fcastilloec @MarshallOfSound can you do a release with this please?

Thank you for putting in the effort to smooth the installation and use flow.


Requires import of types to use import type

https://biomejs.dev/linter/rules/use-import-type/
This has been a change i wanted to add for a while, and luckily biome applied the fixes for me so no manual work needed 🤩
Also added the orignal [@typescript-eslint/consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports) rule to our eslint-config to make sure that future imports will need correct use of type
Had to remove the eslint rule since it does not respect globals like import React from "react". Eslint wants to add a import type React, something that would break everything.

Closing this for now since it can easily be recreated with biome lint --apply. Right now this change will lead to lots of discrepancies until we potentially adopt biome 100%


chore: Fix linting in CI

Description

Type of change

[ ] 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 before)
[x] Chore

Checklist

[x] Read the Contributing Guide
[x] Perform a code self-review
[x] Comment the code, particularly in hard-to-understand areas
[ ] Add documentation
[ ] Add hook's story at Storybook
[ ] Cover changes with tests
[ ] Ensure the test suite passes (yarn test)
[ ] Provide 100% tests coverage
[x] Make sure code lints (yarn lint). Fix it with yarn lint:fix in case of failure.
[ ] Make sure types are fine (yarn lint:types).

Closing in favour of c1384dd52045ad1b070621b7dbc1b138286c49f4. Looks like we worked on this in parallel with @streamich 😁

Because CI still fails in c1384dd52045ad1b070621b7dbc1b138286c49f4, I’ve decided to reopen this PR as #2080. It is in sync with the latest master branch, so has no merge conflicts. @streamich if you want to make changes to my diff, feel free to abandon the PR and recycle the changes 🙂

Sorry for two PRs instead of one – I did not know that GitHub had ‘Reopen’ button for PRs in someone else‘s repos 👀


Augment OLM e2e to ensure PackageManifests API contains deprecation info

Background
We're working on a feature that would enable operator authors to deprecate and provide deprecation messages for packages, channels, and bundles via a new FBC type.
We are working in the operator-registry repository to define the FBC schema, update the GRPC schema, and implement the necessary functionality to parse, validate, and propagate that information into the GRPC responses sent to catalog clients.
OLM has two catalogs clients: the package server, which provides the PackageManifest API and provides visibility into the catalog contents, and the catalog-operator, which reconciles Subscription which ultimately results in the installation and lifecycling of operators on a cluster. We need to propagate the deprecation information to both APIs
Request
Let's implement (or update an existing) e2e test to ensure that we correctly propagate all deprecation information about packages, channels, and bundles into the PackageManifests object.

Resolved as part of PR #3110


Added missing condition in the Test case

Added the missing condition in the existing testcase

@aselle can you pls review the PR and let me know your comments

@pragyaak & @aselle , this PR is approved but cannot see the label ready to pull, can you please replace the label.

@rthadur, i have checked the failures, it has nothing to do with this changes, can you pls check and merge this PR.

@rthadur , i have checked the failure is because of some other reason and not because of the PR, kindly check and merge.

@rthadur , this PR is approved quiet some time , but not still merge, i have checked the error and these are not related to this PR, can you please help.

@rthadur , all checks have passed for this PR, kindly help to merge this one.

@rthadur , can you pls help to get this merged, as this is approved for long with all checks passed and i am afraid that if it stays longer again some merge conflicts might come.
Regards
Amit

@aselle and @rthadur , can you pls help to merge this PR.
Regards
Amit

Can one of the admins verify this patch?

Can you please describe why the test got changed? Is there a bug to link against?

@amitsrivastava78 Can you please check reviewer comments and keep us posted. Thanks!

Closing as it stalled. Please reopen if there is still a need for the PR


and keyword in type predicates to chain assertions

Suggestion
🔍 Search Terms

predicate
union predicate
assertion
union assertion
type predicate
combined predicate

Also searched on Google for solutions prior to concluding this doesn't have a workaround which isn't simply chaining separate predicates at the point of use.
✅ Viability 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, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
and operator in predicate expressions to allow making assertions about more than one of the arguments supplied to the function.
function stringNumberBoolean(
  maybeString: unknown,
  maybeNumber: unknown,
  maybeBoolean: unknown
): maybeString is string
  and maybeNumber is number
  and maybeBoolean is boolean {
  return typeof maybeString === "string"
    && typeof maybeNumber === "number"
    && typeof maybeBoolean === "boolean"
}

📃 Motivating Example
It's reasonable to assume that for any given values a and b, the below function check will either log twice, or not log at all;
function and(a, b) {
  return a && b;
}

function check(a, b) {
  if (a && b) console.log("both")
  if (and(a, b)) console.log("both")
}

It's pretty clear to see why; it doesn't matter if you run the && check directly, or if you run it behind a function, the result will be the same. I'll be ignoring the possibility of the values changing, as this is regarding situations such as using only the and function or only directly checking.
In TypeScript, this is not always the case. We can't use console.log because that's runtime, but we can take a look at the types that our variables have. Here, check demonstates two if statements which are functionally identical (again we're considering using only one of these, not both) but have different resulting type inference.
function isString(arg: unknown): arg is string {
  return typeof arg === "string";
}

function bothString(arg1: unknown, arg2: unknown) {
  return isString(arg1) && isString(arg2);
}

function check(a: unknown, b: unknown) {
  if (bothString(a, b)) {
    a; // expected `string`, actual `unknown`
    b; // expected `string`, actual `unknown`
  }
  if (isString(a) && isString(b)) {
    a; // expected `string`, actual `string`
    b; // expected `string`, actual `string`
  }

By changing where the check is run, the result of the check differs.
Instead of this behavior, it would make sense to allow predicates to be combined. The return type of check in this example ought to be some type which asserts that arg1 and arg2 are both strings. Something such as : arg1 is string and arg2 is string.
The reason to not use & or &&, and to instead use and;

it's consistent with the written-word style of type assertions in TypeScript, such as is, as, satisfies.
& already has meaning in TypeScript, and giving it different meaning depending on context could be confusing to developers, and could be difficult to implement as arg1 is string & arg2 is string could be interpreted as either two predicates or as arg1 is string & arg2 and a syntax error at is string.
&& is a boolean operation, taking lhs and rhs and producing either true or false. Strictly speaking, this is not what combined predicates are doing; rather they're making multiple type assertions.

💻 Use Cases
I'll save you the explaination of what and how, but I'm creating a tool which imports from a config file, and reads a CLI name from the command line. It needs to know that;

the default export of the config file is an object
said object contains a key which is the read CLI name
It doesn't care about branching out into a few possible errors; if it works it works, if it doesn't it doesn't.

It would be nice to have a toolNameInImport function which can provide both predicates. It would improve readability, document what the if statement is checking for, and generally be a QOL improvement. Instead, I'm required to work around the somewhat inconsistent handling of boolean logic regarding predicates and have `if (isStringIndexable(imported) && isKeyof(toolName, imported)), which is less appealing and requires a comment.

This doesn't fit elsewhere, but I wanted to note this here somewhere;
The addition of assertion expression keywords such as this one would fit nicely alongside the recent satisfies keyword, which has greatly improved QOL and the ability to make type-safe assertions regarding the types of variables.
I'm also certain this has been suggested before. Not because I recall seeing an issue regarding this, but because I don't believe that nobody has thought of this before. Unfortunately of the issues I clicked through to based on the titles, none of them appeared to request multiple assertions in a single predicate. I'll be very surprised if this isn't a duplicate, but it's possible even if unlikely.

Wanted to highlight and rule out a potential workaround;
Chatting about this elsewhere, the following workaround was suggested to me
function isCombined(candidate: {a: unknown, b: unknown}): candidate is {a: string, b: number} {
  return isString(candidate.a) && isNumber(candidate.b);
}

Unfortunately, TypeScript doesn't track this back to asserting that the variables passed to a and b properties are themselves a string and a number respectively.

Duplicate #26916


NoneType' object has no attribute 'tzinfo'

I am trying to use eo-datasets to generate a dataset document, and then load that data using datacube.
I use the devel branches from both eo-datasets and datacube-core.
I use the following script to generate the dataset document:

from eodatasets3 import DatasetAssembler
from datetime import datetime
from pathlib import Path

lc8 = Path('/home/danlipsa/data/iarpa_smart_sampledata/LC08_L1GT_044034_20130330_20170310_01_T2')
[blue_geotiff_path] = lc8.rglob("L*_B2.TIF")
out = Path(blue_geotiff_path.parent / Path(blue_geotiff_path.stem + '.yaml'))
print("Out: {}", out)

with DatasetAssembler(metadata_path=out) as p:
  p.datetime = datetime(2019, 7, 4, 13, 7, 5)
  p.product_family = "landsat8_example_product"
  p.properties["odc:file_format"] = "GeoTIFF"
  p.processed_now()

  # Note the measurement in the metadata. (instead of ``write``)
  p.note_measurement('blue', blue_geotiff_path,
                     relative_to_dataset_location=True)

  p.done()

which results in the following yaml file:

---
# Dataset
$schema: https://schemas.opendatacube.org/dataset
id: 2828e23a-8501-43ca-9449-fa7427e49614

label: landsat8_example_product_2019-07-04
product:
  name: landsat8_example_product

crs: epsg:32610
geometry:
  type: Polygon
  coordinates: [[[374895.0, 4258485.0], [332775.0, 4080195.0], [334387.96078400686,
        4079775.8375337427], [514935.0, 4036365.0], [515054.10427500436, 4036717.7239312488],
      [515804.18418644054, 4039868.051384181], [534524.1924086247, 4118768.0860084835],
      [557466.2132034355, 4216026.213203436], [556671.7954048398, 4216244.220240811],
      [374895.0, 4258485.0]]]
grids:
  default:
    shape: [7421, 7511]
    transform: [30.0, 0.0, 332385.0, 0.0, -30.0, 4258815.0, 0.0, 0.0, 1.0]

properties:
  datetime: 2019-07-04 13:07:05Z
  odc:file_format: GeoTIFF
  odc:product_family: landsat8_example_product

image:
  bands:
    'blue':
      path: LC08_L1GT_044034_20130330_20170310_01_T2_B2.TIF

accessories: {}

lineage: {}
...

Note that I had to replace

measurements:
  blue:

with

image:
  bands:
    'blue':

Otherwise the dataset does not get added to datacube. After this I can add both the product and the dataset to datacube.
Here is the product:

name: landsat8_example_product
description: Landsat 8 example product
metadata_type: eo

metadata:
    product:
        name: landsat8_example_product
    # Alternatively, include specific items to match
    # properties:
        # eo:instrument: OLI_TIRS
        # eo:platform: landsat-8

measurements:
    - name: 'blue'
      aliases: [band_2, sr_band2]
      dtype: int16
      nodata: -9999
      units: 'reflectance'

I try to show the image using datacube using the following script:

import datacube
import matplotlib.pyplot as plt

dc = datacube.Datacube(app='plot-rgb-recipe')
print(dc.list_products())
print(dc.list_measurements())

query = {
    'lat': (36.46, 38.46),
    'lon': (-124.92, -122.35)
}

data = dc.load(product='landsat8_example_product', measurements=['blue'], resolution=(-30, 30), output_crs="EPSG:32610")
print(data.data_vars['blue'])
data.data_vars['blue'].plot()
plt.show()

however I get the following error:

env) [~/tasks/datacube]$ python show-result-assembler.py
                        name                description   lon   lat  time format platform creation_time label instrument product_type  crs  resolution  tile_size  spatial_dimensions
id
1   landsat8_example_product  Landsat 8 example product  None  None  None   None     None          None  None       None         None  NaN         NaN        NaN                 NaN
----------------------------------------------------------------------
                                      name  dtype        units  nodata             aliases
product                  measurement
landsat8_example_product blue         blue  int16  reflectance   -9999  [band_2, sr_band2]
Traceback (most recent call last):
  File "show-result-assembler.py", line 14, in
    data = dc.load(product='landsat8_example_product', measurements=['blue'], resolution=(-30, 30), output_crs="EPSG:32610")
  File "/home/danlipsa/projects/datacube-core/env/lib/python3.8/site-packages/datacube/api/core.py", line 315, in load
    grouped = self.group_datasets(datasets, group_by)
  File "/home/danlipsa/projects/datacube-core/env/lib/python3.8/site-packages/datacube/api/core.py", line 404, in group_datasets
    datasets = sorted(datasets, key=group_func)
  File "/home/danlipsa/projects/datacube-core/env/lib/python3.8/site-packages/datacube/api/query.py", line 153, in _extract_time_from_ds
    return normalise_dt(ds.center_time)
  File "/home/danlipsa/projects/datacube-core/env/lib/python3.8/site-packages/datacube/utils/dates.py", line 109, in normalise_dt
    if dt.tzinfo is not None:
AttributeError: 'NoneType' object has no attribute 'tzinfo'

Any suggestions of what am I doing wrong? Thanks!

Hey mate, you should NOT need to change the EO Datasets document.
One thing I notice is you have an eo product type definition, whereas EO Datasets will be creating a eo3 type. I recommend you update your product definition to EO3.
We have some example EO3 product definitions here: https://github.com/GeoscienceAustralia/digitalearthau/tree/develop/digitalearthau/config/eo3/products-aws

One thing I notice is you have an eo product type definition, whereas EO Datasets will be creating a eo3 type. I recommend you > update your product definition to EO3.

Thank you! That was the problem! I think I got an error complaining that datacube does not know about eo3 and I changed it to eo. Not sure how I got that. Maybe I did not install the devel version of datacube-core.
Just to confirm: eos3 works with the devel version of datacube-core (datacube --version
Open Data Cube core, version 1.8.4.dev52+g07bc51a5)?

Does it work with older releases of datacube?

Any datacube from 1.8 onwards "natively" supports the eo3 format. On older releases, you can use the indexing commands in odc-tools which can convert eo3 on the fly.
But I don't think you're missing datacube compatibility, you're missing an eo3 metadata type in your datacube instance. ODC adds some default metadata types automatically to new datacubes, but won't add them to existing datacubes, and I'm guessing yours predated datacube 1.8 before eo3 was included by default.
You should be able to add it like so:
datacube metadata add https://raw.githubusercontent.com/GeoscienceAustralia/digitalearthau/develop/digitalearthau/config/eo3/eo3.odc-type.yaml

(this is one of the more confusing parts of datacube: metadata types tell ODC what metadata fields matter in your document. eo3 is a plain default one for the eo3 format, but in other environments we add extra custom fields to them.)

Great, thank you very much!


Missing lines Error while canceling klarna order

Expected behavior
Successfull cancellation of order (all lines).
Actual behavior
No lines are cancelled
Steps to reproduce the behavior
Order with Klarna pay later method. Cancel order (all lines).
Environment

PrestaShop version: <IP_ADDRESS>
Mollie module version: 4.2.4
PHP version: 7.3.27

Hi @vanengers ,
Could you please provide more information on this please? Is it just 1 order that was cancelled which was paid with Klarna? Does it happen with other payment methods or not?
Looking forward to your reply!
--
Best regards,
Invertus Support team

This happens with all orders which are authorized at Klarna.
When i press cancel i select the items (this case: all items) and press OK.

If you need further information please contact me at<EMAIL_ADDRESS>

Hi @vanengers ,
I've just sent an email for you!
--
Best regards,
Invertus Support team

Issue resolved, fix added to the client's shop.


Adjust social media icons in infobox

Social media icons now in the infobox are not similar to the designed art

boards

done


Create alumni.txt

@Aria-S First stage of verification passed, official domain is abaroma.it as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.


fixes for tests/kernel/interrupt

Fix a broken test scenario that assumed interrupts are locked when handling ISRs (which is patently false)
Run on only one CPU, since one scenario locks interrupts, sets up a timer, and fails if it fires (which can happen on another CPU)
Don't re-use k_timer objects between cases, fixing a crash I saw on riscv64
Greatly simplify testcase.yaml
Add a note as to why Nios II is still excluded #22956

Note: does not address https://github.com/zephyrproject-rtos/zephyr/issues/22955


History state

In the router package, the default behavior of popstate is prevented, and thus the state is not updated. Therefor the history.state cannot really be used (even though it works, as far is I can see, with hashbang:true).
Are there any reason for not replacing current state with the state received from the event?
I can of course make a pull request if you are interested.
Thanks for your great work!
Anders

No particular reason. Added in the PR above, and published in the latest rc.


Add a forbid mount host volume option to docker daemon

As mounting any host folder in a container can be a security issue (as say mount /etc and mess with passwd and shadow), it would be nice to be able to forbid mounting host volume in a container as an option for the docker daemon.
Using data volume is most of the time enough, and this option would give a safer environment when non root users need to manage containers.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.
For more information about reporting issues, see CONTRIBUTING.md.
You don't have to include this information if this is a feature request
(This is an automated, informational response)

BUG REPORT INFORMATION
Use the commands below to provide key information from your environment:
docker version:
docker info:
Provide additional environment details (AWS, VirtualBox, physical, etc.):
List the steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Provide additional info you think is important:
----------END REPORT ---------
#ENEEDMOREINFO

Sounds like something that could be achieved through an authorization plugin; https://docs.docker.com/engine/extend/authorization/

I don't think this type of feature would be a good idea as it encourages a false sense of security. Volume mounts are the easiest way to manipulate the host system, but not the only one.

agreed

Closing since this would be something to include as an authz plugin.


Brilliant

Seriously - this is the first of its kind in self hosted dashboards. Agnostic OIDC allowing me to restrict dashboard items based on groups is something I wanted for a long time!
If you take feature requests, i'd love the ability to be able to set default settings for my users (default them to unsplash or a custom wallpaper, for example)
It'd also be nice to be able to choose different locations for the apps to appear, like just under the search bar.
One last ask, would be to have a help text option, that would either display additional text information about a tile either on hover, or attached to a small ? on each tile with the property. Or however else.
Anyways, thank you again. So happy this exists.

Oh - and I don't know how edge case this is - but it'd be nice to have the ability to set the headers the dashboard authenticates against. I had to have my idp rewrite the headers, which was workable, but it'd allow it to be easier to use for sure.
That and parse/strip the header values. I had to write a custom expression to pass the groups header properly out of Authentik, and couldn't figure out why it wasn't working. Turns out it was getting hung up on newlines, so if there was a way to strip newlines/whitespace, that might help?

thanks for your positive feedback :)
you brought up many good points of possible optimizations ... I will definitely look into it, but it may take some time

Hubleys was my "learning Sveltekit" project. So I had to refactor a bit in order to implement new features. But I think it was worth it.
Please give it a try by running the docker image with the edge tag:  ghcr.io/knrdl/hubleys-dashboard:edge.  (Backup your data folder first!)

If you take feature requests, i'd love the ability to be able to set default settings for my users (default them to unsplash or a custom wallpaper, for example)

now possible via /data/users/default-config.json

It'd also be nice to be able to choose different locations for the apps to appear, like just under the search bar.

new dashboard settings ui

One last ask, would be to have a help text option, that would either display additional text information about a tile either on hover, or attached to a small ? on each tile with the property. Or however else.

that one was a bit tricky. a popup on tile hover is not mobile friendly. and small (?) popups tend to overload the ui.
so instead I implemented subtitles for tiles and menus, and also messages which can be shown on the dashboard.

Oh - and I don't know how edge case this is - but it'd be nice to have the ability to set the headers the dashboard authenticates against. I had to have my idp rewrite the headers, which was workable, but it'd allow it to be easier to use for sure.

now possible via env vars, see https://github.com/knrdl/hubleys-dashboard/blob/main/Dockerfile#L49

That and parse/strip the header values. I had to write a custom expression to pass the groups header properly out of Authentik, and couldn't figure out why it wasn't working. Turns out it was getting hung up on newlines, so if there was a way to strip newlines/whitespace, that might help?

tried to implement that: https://github.com/knrdl/hubleys-dashboard/blob/main/src/hooks.server.ts#L13
but not sure if it helps, please test it
From your PR: #213

You may need to restart the application to have the icons load correctly

that one should be fixed now too

Having an issue with the edge build. It's 404ing and the container is reporting unhealthy. I've deleted and set perms on the data folder, so i'm not sure what's going on. I'll keep poking at it.

Would there be a new or different header requirement from the current docker image from Oct 27th?
I'm not sure what the issue is. I have it reverse proxied through traefik using docker labels, which works great for the previous version but is throwing a 404 with the edge build.
I've set log level to debug through ENV, but the container isn't actually throwing errors

2024-01-02T04:11:43.584191784Z Listening on <IP_ADDRESS>:3000```

Here is the docker config I'm using

version: '2.4'
services:
hubleys:
image: ghcr.io/knrdl/hubleys-dashboard:edge
hostname: hubleys
restart: unless-stopped
env_file:
- stack.env
labels:
traefik.enable: true
traefik.http.routers.dash.rule: Host(tld.domain)
traefik.http.routers.dash.entryPoints: web-secure
traefik.http.routers.dash.middlewares: auth@file #this is a forward auth redirect middleware for authentik
traefik.http.services.dash.loadbalancer.server.port: 3000
volumes:
  - /path/to/appdata/hubley-dashboard:/data
networks:
  - proxy
mem_limit: 100m

networks:
proxy:
external: true

stack.env has

OPENWEATHERMAP_API_KEY=blahblahblah
UNSPLASH_API_KEY=blahblahblah
ADMIN_USERIDS=blahblahblah
LOG_LEVEL=debug

I've cleared out the data folder as well, made sure permissions were right. The docker compose works perfectly with the current build

the healthcheck was broken, so it always reported unhealthy ... now fixed.
Traefik ignores starting and unhealthy containers. So from traefik's point of view, your routing rules simply didn't exist.
As a result, it returned 404's. That's pretty misleading IMHO. But at least you can configure traefik to return more meaningful 503's instead: https://doc.traefik.io/traefik/providers/docker/#allowemptyservices

Thanks for the update. Been going through and testing things
I've tested the default settings, icon positions, messages, subtitles and they're all working flawlessly
The headers seem to be working as well.
The only issue i've run into with the edge build is that my svg icons will no longer render. I needed to use png instead

svg icons work flawlessly for me in firefox and chrome. not sure where that problem comes from

Interesting. So I started digging into it a little more and what i'm seeing is that the svg now has a plaintext content type rather than image/svg+xml
I'm not sure what the cause could be, but with the edge version - the svg is loading with a content/mime type text/plain, and on the old version it loads correctly as image
The file referenced is identical and is reporting as image/svg+xml on the host machine. Any ideas?

/svg+xml

very good observation! you were right, I tested wrong  ... now fixed

It's working great. I'm going to go ahead and close out this issue! Thanks for all the changes, I honestly didn't expect you to jump on them and knock them all out. Thanks a billion.

very good observation! you were right, I tested wrong ... now fixed

I've tried both v0.1.0 as well as edge, but my instance appears to have an issue rendering svg icons as well? It was working back on v0.6.0
Any advice on how to troubleshoot? Preferred browser is Chrome

please provide more details: what problems exactly? icon filename? icon content?

All of my icons are .svg files, and it seems like now none of the files are being pulled/rendered correctly? (FYI, I am not a coder/developer; just an advanced homelaber). Image attached of what my screen is like.
I have cleared all cookies, history, used a new browser (Firefox); but still the same end result.
There are no error logs in my Hubley's instance. I've seen before where I map an icon incorrectly and the log notifies me of the files not being found/accessible, but there are no errors

that is odd. please check:

your images are in the /data/logos folder
your images have the file extension .svg in the filename
your images are readable by the user with uid=1000 (that's the user hubleys runs as, in the container)

if the wekan logo file is "wekan.svg", please open in the browser https://yourhubleys.instance/logo/wekan ... you should see the image being displayed
please also provide your docker-compose.yaml or k8s manifest for hubleys

docker-compose regarding volumes:
    volumes:     - ./data:/data     - /mnt/Media/Icons:/data/logos

ownership of /mnt/Media/Icons folder & the wekan.svg file is 1000:1000

can confirm mounts correctly when entering Hubley console and navigating to /data/logos (i.e., /data/logos/wekan.svg exists)

config.yml for the WeKan app:
`tiles:

title: Apps
allow: true
menu:

title: WeKan!(ban) Board
url: https://wekan.example.com
logo: /data/logos/wekan.svg`

image filename of WeKan icon: wekan.svg

result when navigating to hubleys.example.com/logo/wekan

When I take down the container, remove it, change release tag back to 0.6.0; everything renders correctly

Navigating to hubleys.example.com/logos/wekan.svg results in:

ahh, you are not supposed to use the full image path in config.yml! Please change into logo: wekan.svg or logo: wekan

Amazing, you have no idea how many variations I tried lol
Thank you! All working


Translation Portuguese Brazilian (PT-BR)

Here is a Brazilian Portuguese translation for this amazing project.

Thanks!


[Bug] [DAO] Workflow execution time increases gradually

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
说明：耗时随着数据增加而增加，测试耗时从4s增加到20s，只有一个调度任务在跑。
排查：发现是工作流执行时会查询t_ds_task_instance表，主要的耗时集中在这里，如果能减少查询时间即可降低耗时。
临时解决：t_ds_task_instance表增加索引（当前t_ds_task_instance表数据量为20万）
CREATE INDEX t_ds_task_instance_process_instance_id_idx ON t_ds_task_instance (process_instance_id,task_code);

效果：有效提升

What you expected to happen
耗时降低
How to reproduce
t_ds_task_instance表数据量越大，耗时增加越多
Anything else
No response
Version
2.0.5
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @winskin , please use english to descirbe it. Feel free to reopen this issue while you change it to english.

Search before asking

[x]  I had searched in the issues and found no similar issues.

What happened
Note: The time-consuming increases as the data increases, the test time increases from 4s to 20s, and only one scheduling task is running.
Troubleshooting: It is found that the t_ds_task_instance table is queried when the workflow is executed. The main time-consuming is concentrated here. If the query time can be reduced, the time-consuming can be reduced.
Temporary solution: add an index to the t_ds_task_instance table (the current data volume of the t_ds_task_instance table is 200,000)
CREATE INDEX t_ds_task_instance_process_instance_id_idx ON t_ds_task_instance (process_instance_id,task_code);

Effect: Effectively improve

What you expected to happen
time-consuming reduction
How to reproduce
The larger the amount of data in the t_ds_task_instance table, the more time-consuming
Anything else
No response
Version
2.0.5
Are you willing to submit PR?

[ ]  Yes I am willing to submit a PR!

Code of Conduct

[x]  I agree to follow this project's Code of Conduct

Hi @winskin , please use english to describe it. Feel free to reopen this issue while you change it to english.

Bot has helped translate it into English, here

@winskin You can copy it to your issue's description.


Not compatible with Hugo Academic Latest release (v4.5)

Thanks for the nice design and stuff.
While using my current website configuration with Academia (which works fine with Academic v4.5), I am getting some error. Looks like Academia is not compatible with Academic-v4.5 release?
Thanks

I am just learning, so I spend 2 days trying to figure it out, googling the error, treating to understand what I was doing wrong, all before coming to post an issue. And here I am, facing exactly the same. Lesson learned, next time I will come and check what the known issues are.

I tried the same installation method and ended up facing the same error. Is there any way to get it running?

This theme is forked from the Academic theme. But it does not support the academic latest release anymore. Now it has it's won way to set up and run this theme.

I am closing this issue as it has different installation procedure now.

Can someone please help with the installation procedure now? Which version of academic theme would be needed?


aql.render can now use the dag's template_searchpath

Users might not always want to keep their SQL files in a path that is relative to the DAG file. This allows the users to set a different path using the dag object's template_searchpath parameter.
Acceptance criteria

[ ] aql.render tries to fetch SQL files from the DAG's template_searchpath.
[ ] if the directory does not exist in the template_searchpath, we try the local relative path instead

@dimberman just confirming, does this ticket relate to #123 ?
Regarding the acceptance criteria, perhaps template_searchpath should be the default. Still, if the user specifies a path in render, that would take priority - so a user can have a default location but customize in case of need. What are your thoughts on this?

@dimberman, I have another question: how does this work relate to #140 ?
I also remember some discussion about not being able to use default_args to set a default schema per DAG due to Task Flow API limitations. Could the approach adopted in this PR be also used in that context?

@dimberman, I have another question: how does this work relate to #140 ?
I also remember some discussion about not being able to use default_args to set a default schema per DAG due to Task Flow API limitations. Could the approach adopted in this PR be also used in that context?

@tatiana the difference here is that template_searchpath is an existing Airflow functionality, so it wouldn't make sense for us to override that. I think that default_args for other more astro specific things would make sense (e.g. conn_ids and databases), but we can defer to the standard here.


Improved error message when start_link is called without :plug option.

Thanks! Typos are teh worst.


[FW] Fix Scoreboard Sorting

Add missing GameMode_SetScoreCompareFunc() for FW, so it's scoreboard will sort properly

Someone test this please so that we can merge it <3

I can assure you that, provided we use assault score for the main scoring in FW, this will work. It is very standard script code


Creating Account without an image shows an uncaught error

Make it such that a default image is shown in place of that the image if it is not entered during registration

Make it such that a default image is shown in place of that the image if it is not entered during registration

Okay. will do.

I'm concerned about this. I don't think this was handled, yet the issue is closed.
I have a working progress.

Coding period is over. Thus closed the issue. You can work but wont get any points.


Facets

Currently we show facets only for file type, but other ideas are floating around:

filter email by sender/ receiver
filter by date or date range [date of file creation, date of email sent, date of file modification]
filter by language
filter for money related terms: IBAN, sum of money (USD, CHF, EUR etc) [doable, regex - Spiegel]
filter for address and related terms: telephone, website, email other contact info [doable, regex - Spiegel]

Some of these can be added today, but some require changes to the index (i.e. needs to be not_analyzed).
Can be added today

date
date created
lang

Needs to be changed to not_analyzed in the Elasticsearch mapping
(Parsing should possibly be improved as well).

from
to

Needs to be parsed/extracted

money related terms
address and related terms
links and their domains (new idea)
domain of email address (new idea)

Note that since Elasticsearch 5, not_analyzed is gone, and the default behaviour is to add both the analyzed and the non-analyzed version (now called keyword) of the string to the index. This means that without any custom mapping, you can query both from (analyzed) and from.keyword (not-analyzed, which is needed for faceting). More about the change here.
As for the UI, in addition to traditional facet filters in the search UI, I think it could be useful to have some sort of "facet explorer" where these fields can be explored separately. Have to think about what that could look like.

Most of these are implemented. Money/address needs new fields.


_getTitle() function is mandatory for implementation in my custom class which implements IHeader

OpenUI5 version: 1.98.0
Browser/version (+device/version): Google chrome 98.0.4758.109
Any other tested browsers/devices(OK/FAIL): FAIL
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:

We created a custom CardHeader class that implements the IHeader interface.

What is the expected result?
We expect that I don't need to implement _getTitle() function.
What happens instead?
It turned out that it only works when we explicitly implement _getTitle() in our custom class.

Any other information? (attach screenshot if possible)

Hello @Vladimir1203 ,
Thank you for sharing this finding. I've created an internal incident<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards,
Dobrin

Hello @Vladimir1203 ,
Thank you for finding this. The issue is now fixed. The fix will be available with OpenUI5 version 1.100.
Best regards,
Petar


[PreviewHandler] SVG preview handler steals focus from Explorer

Environment
Windows build number: 10.0.17763.1158
PowerToys version: 0.17.0-x64
PowerToy module for which you are reporting the bug (if applicable): PreviewHandler

Steps to reproduce

Start the Explorer with a folder containing SVG files
Click on a file which is NOT an SVG file, but is located above or below one in the file list
Use the cursor keys to go to the SVG file

Expected behavior
With all other preview handlers, Explorer keeps the focus, and we can switch to the next file with the cursor keys.
Actual behavior
Explorer loses the focus (title bar changes color), and we cannot switch to the next file with the cursor keys any more. This sometimes even happens when clicking on a file, but with the above instructions it happens every time.
Screenshots
Not needed
Reason
This happens because the preview window does NOT have the WS_CHILD style, so the SetParent() function fails. When calling GetParent() on the preview, it returns 0. Preview handlers are supposed to create a child window within the window received via SetWindow() method.
Suggested bugfix
Call (via pInvoke) SetWindowLong to add the WS_CHILD style after creating the form.

if you'd like to create a PR, that would be amazing here as it sounds like you know the issue / solution

I have created a pull request:
https://github.com/microsoft/PowerToys/pull/3048
I have compiled the new PreviewHandlerCommon.dll, and it fixes the issue in my tests. This is my first GitHub pull request, so I'm sorry if I did anything wrong.

We will do a look next week, we are finalizing 0.18. This is awesome!

@chrisgch, i can't reproduce this, nor can @jyuwono.

Here is a short video of the issue. I can reproduce it every time this way. You can see it better when changing apps to dark mode via new settings - colors. Only in dark mode the title bar changes color.
explorertest.zip

@chrisgch can we setup a teams call here<EMAIL_ADDRESS>is my email address.  For the life of me, i can't repro it but i do see it happening in your video.

Sorry, I don't have teams since I don't use MS Office, I only have skype.
The reason why I reported this issue is that it happens in my own Windows desktop program, even on  the latest Windows 10, I checked whether it also happens in the Explorer so I can report it to you (it would be too much to ask you to support 3rd party programs). I didn't expect that the Explorer would contain measures against misbehaving shell extensions. I will therefore implement my own workaround in my program for your extension.

we could do skype too.  trying to figure out how we can repro it.  Teams can also do webclient as well.
can you email me<EMAIL_ADDRESS>so i can set something up?

I have just tried it in Windows 10 inside a virtual machine, and it doesn't occur there in the Explorer. It still occurs in my own app (but only with the Power Toys preview handler). I think I will close this issue and distribute the fixed previewer dll to my users myself.

@chrisgch, is there maybe another app that could be causing a conflict here?  We're happy to do the fix, we just need to see the E2E and validate

I have thought about that too, but couldn't find anything low level which might cause this. I'm using the normal Windows Defender, no extra antivirus or firewall. I have closed all other programs which might interfere, including Visual Studio, Android Studio, AutoHotkey, but it still occurs. However, it only occurs on a real PC, it doesn't occur within Virtualbox (Windows 10 1803 and 1809). I don't know what else I can do to reproduce it.
Maybe you could check in the debugger whether the inner part of
if ((windowStyle & wsChild) == 0)
is reached or not. If not, then the window already has the WS_CHILD style.

Fixed in 0.19.0, please visit https://github.com/microsoft/PowerToys/releases/ for the latest release


feat: import from autoware_common

This PR has Imported autoware_utils package from https://github.com/autowarefoundation/autoware_common
ref. https://github.com/orgs/autowarefoundation/discussions/4671

@youtalk thanks for doing the import. I was wondering if it'd be useful to preserve the commit history from the autoware_common repository, git subtree split should help https://git-memo.readthedocs.io/en/latest/subtree.html#subtree-split


Kestrel diagnostics doc

@Rick-Anderson  edit: Internal review URL

@Rick-Anderson Does the anchor tag not work on xref links? I want to link to a section of the doc.

Yes it does. You were missing /index on one suggestion I made, but I left the anchor.

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-5.0#connection-logging
Should one of them be removed or abbreviated and linked to the other?

abbreviate it if you want to keep it.

@Rick-Anderson Good to merge?

@shirhatti  https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/diagnostics?view=aspnetcore-6.0
It's live


[10.x] Fallback to default values instead of null

If you want to set up a custom queue for a channel, you are forced to use the default value for all other channels. The same applies to the viaConnections and withDelay methods. Here it would be easier to fallback to the respective default values instead of null. Then you could only change the values for the channels you want to adjust:
Before:

After:

A little worried about this being a subtle breaking change.


TextField hintStyle overriden by TextField.style

While trying to achieve a custom UI. I provide a foreground to the style of TextField and I also provide a hintStyle.
The problem is that TextField's style overrides my hintStyle. It shows the foreground to my hintStyle as well.
Steps to Reproduce

Provide a style element to TextField with foreground property in it.

          TextField(
            autofocus: hasFocus,
            enabled: hasFocus,
            style: CustomTheme.headline4.copyWith(
              foreground: ColorPallet.dialogShaderPaint,
            ),
          ),

Similarly, In the decoration property of TextField provide hintStyle which only has color in it.

          TextField(
            autofocus: hasFocus,
            enabled: hasFocus,
            style: CustomTheme.headline4.copyWith(
              foreground: ColorPallet.dialogShaderPaint,
            ),
            maxLines: 3,
            minLines: 1,
            decoration: InputDecoration(
              border: InputBorder.none,
              hintText: 'Enter Question',
              hintStyle: CustomTheme.headline4.copyWith(
                color: ColorPallet.white,
              ),
            ),
          ),

Observe the UI

Expected results: hintStyle should have its own independent styling.
Actual results: hintStyle is overridden from TextField's style property.

Code sample
return Container(
      margin: EdgeInsets.symmetric(
        vertical: 10.toHeight,
      ),
      padding: EdgeInsets.symmetric(
        vertical: 20.toHeight,
        horizontal: 22.toWidth,
      ),
      decoration: BoxDecoration(
        color: hasFocus
            ? ColorPallet.black.withOpacity(0.15)
            : ColorPallet.black.withOpacity(0.05),
        borderRadius: BorderRadius.circular(8.0),
      ),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          TextField(
            autofocus: hasFocus,
            enabled: hasFocus,
            style: CustomTheme.headline4.copyWith(
              foreground: ColorPallet.dialogShaderPaint,
            ),
            maxLines: 3,
            minLines: 1,
            decoration: InputDecoration(
              border: InputBorder.none,
              hintText: 'Enter Question',
              hintStyle: CustomTheme.headline4.copyWith(
                color: ColorPallet.white,
              ),
            ),
          ),
          const Divider(),
          Text(
            'Options',
            style: CustomTheme.headline4,
          )
        ],
      ),
    );

[✓] Flutter (Channel stable, 2.10.5, on macOS 12.4 21F79 darwin-arm, locale en-IN)
    • Flutter version 2.10.5 at /Users/vikaskumar/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5464c5bac7 (3 months ago), 2022-04-18 09:55:37 -0700
    • Engine revision 57d3bac3dd
    • Dart version 2.16.2
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/vikaskumar/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/vikaskumar/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.69.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.44.0

[✓] Connected device (2 available)
    • iPhone 13 Pro Max (mobile) • 5A6F0CD3-BB9C-4EB1-A2E1-4F254FCB74D6 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Hi @Vikaskumar75, Thanks for filing the issue. In your output based on your code sample I see the hintText is white, based on the hintStyle provided, Also based on the below code sample I do see the hint style is getting applied. So I am not sure what this bug is reporting, Could you please clarify that?

code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;
  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            TextField(
                style: Theme.of(context)
                    .textTheme
                    .headline4!
                    .copyWith(foreground: ColorPallete.linearGradient)),
            TextField(
              style: Theme.of(context)
                  .textTheme
                  .headline4!
                  .copyWith(foreground: ColorPallete.linearGradient),
              decoration: InputDecoration(
                border: InputBorder.none,
                hintText: 'Enter Question',
                hintStyle: Theme.of(context).textTheme.headline4!.copyWith(
                      color: Colors.red,
                    ),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

class ColorPallete {
  static final Paint? linearGradient = Paint()
    ..shader = LinearGradient(
      colors: <Color>[Color(0xffDA44bb), Color(0xff8921aa)],
    ).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0));

  static final Paint? randomColorGradient = Paint()
    ..shader = LinearGradient(
      colors: [
        Color(0xff21aadd),
        Color(0xff44aadd),
        Color(0xff88aadd),
        Color(0xffaadd88),
        Color(0xffaadd44),
        Color(0xffaadd21),
        Color(0xffaadd00),
        Color(0xffaadd00),
      ],
    ).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0));
}

flutter doctor -v (mac)
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-arm, locale en-IN)
    • Flutter version 3.0.5 at /Users/mahesh/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (5 days ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-32, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.44.0

[✓] Connected device (3 available)
    • sdk gphone arm64 (mobile) • emulator-5554 • android-arm64  • Android 11 (API 30) (emulator)
    • macOS (desktop)           • macos         • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)              • chrome        • web-javascript • Google Chrome 103.0.5060.114

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!


Switch ollama api endpoint from /api/generate to /api/chat

Fixes this bug: https://github.com/di-sukharev/opencommit/issues/302

will be tested and put into next version <3


feat: modify the style of the horizontal menu

Fix: #2011

@907997375 demo video?

@hsluoyz
https://github.com/casdoor/casdoor/assets/82175017/7c87e835-80cd-406b-87b7-2e30cf594037


Multiple pages overlapped into one image when pdf is loaded from url

I have used url to load a pdf and then converted into images.
$pdf   = new \Spatie\PdfToImage\Pdf('http://www.africau.edu/images/default/sample.pdf');
$pages = $pdf->getNumberOfPages();

for ($i = 1; $i <= $pages; $i++) {
    $imageName = $i.'.png';
    $saveImgTo = 'images/' . '/' . $imgName;
    $pdf->setPage($i)->saveImage($saveImgTo);
}

Image Output:

How to Reproduce ?
Version: 1.8.2
PDF Url: http://www.africau.edu/images/default/sample.pdf

Don't close it mister roboto! I encountered the same issue, and opened a PR #182 which resolves it. Don't really know what caused this unfortunately.

I was able to fix this issue with:
$pdf->setLayerMethod(null)->saveImage($target);

We'll handle this further in #182


Line continuation with backslashe generates error in some cases

I noticed the line continuation with backslashes generates errors in some cases. Unfortunately, I failed to understand exactly when it happens. Most of the time, it seems not to be an issue.
Here two real life examples taken from Poky:
https://git.yoctoproject.org/poky/tree/meta/classes/recipe_sanity.bbclass#n45
https://git.yoctoproject.org/poky/tree/meta/classes/copyleft_filter.bbclass#n76
Here an other example I made myself:
def example():
    print('test', \
        True
    )

Curiously, in this example, the parsing works properly if True is replaced by a string.
Thank you

Fixed, thanks


Wrong argument type definition in Matrix multiplyByScale functions

The type of the scale parameter is annotated as Number in https://github.com/CesiumGS/cesium/blob/fb8158eba1ece2406556fad53fa58403b659f76f/Source/Core/Matrix3.js#L1196 and https://github.com/CesiumGS/cesium/blob/fb8158eba1ece2406556fad53fa58403b659f76f/Source/Core/Matrix2.js#L785 , although it should be Cartesian3 and Cartesian2, respectively.
This may raise the question of whether it should be Cartesian4 (instead of Cartesian3) at https://github.com/CesiumGS/cesium/blob/fb8158eba1ece2406556fad53fa58403b659f76f/Source/Core/Matrix4.js#L2097 ...

I could create a PR for that. But iff the type is changed from Cartesian3 to Cartesian4 for the Matrix4, then this would be a breaking change. (I think it should be, for consistency, but am not sure about the trade-offs here...)

Cartesian3 is fine for Matrix4 since scale is only expected to apply to the top-left 3x3 portion of the matrix.

A little more context for non-graphics people who come across this thread:
We are using Matrix4 to transform homogeneous coordinates. The scaling matrix in this case is usually:
$$ {\left\lbrack \matrix{s_x & 0 & 0 & 0 \cr 0 & s_y & 0 & 0 \cr 0 & 0 & s_z & 0 \cr 0 & 0 & 0 & 1} \right\rbrack}$$
See Yan-Bin Jia's course notes, or this interactive guide.

The same type of error - just added here to keep track of it: https://github.com/CesiumGS/cesium/blob/fb8158eba1ece2406556fad53fa58403b659f76f/Source/Core/S2Cell.js#L267
It returns a string, not a BigInt.


gmailieer -> lieer: 1.0 -> 1.1

Motivation for this change
Things done

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

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

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

Perhaps add this rename to pkgs/top-level/aliases.nix ?


fix: minor typo in account data source docs

Resolves https://github.com/PrefectHQ/terraform-provider-prefect/issues/139

@jamiezieziula just saw this, but no changes are in the branch 🤔

one sec, lemme see whats wrong with the labeler


How to manually trigger a stage?

Right now with release pipelines it is possible to re-deploy a stage if it fails. I have not seen any way to do that with YAML pipelines. How can I achieve that?

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

ID: 4266f72c-c774-0046-4593-d01eb775d3c3
Version Independent ID: f20827aa-a6c5-96a8-5969-e576ffbc2e38
Content: Stages in Azure Pipelines - Azure Pipelines
Content Source: docs/pipelines/process/stages.md
Product: devops
Technology: devops-cicd
GitHub Login: @vijayma
Microsoft Alias: vijayma

@poveilleux Thanks for your question. It looks like you're working through an issue with your scenario or implementation, rather than an issue with the documentation.
Here are a few options where you might consider asking your question:

Azure DevOps on Stack Overflow
Azure DevOps Support Bot

Any news MS on how to do this in YAML?

The ability to retry a failed stage in YAML pipelines is implemented, and it will be available in all orgs over the next 2-3 weeks.


[IOTDB-4751] Fix tag aggregation  being without any error message

See JIRA: https://issues.apache.org/jira/browse/IOTDB-4751

@HTHou PTAL


fix hard coded menu item policy (#3501)

Fixes #3501

We need to make sure that we pass browse as the action to this method and not an empty string for example.
Otherwise we could let it default to browse.

@emptynick While making the empty check or default action to 'browse' is trivial, I don't think we should encourage the bad practices. We could make the 'browse' default action for all polices by editing the Base Policy, of course, but why? Someone has to pass intentionally the null or '' as first argument. That is very strange decision and not correct (just imagine the nightmare to review that code by someone else).
On the other hand, if we make that check only for Menu Item Policy, we will violate the uniformity of working with policies.

I'm just saying that we need to make sure that we don't pass an empty string or null


test: [divider, split, tag] fix current test errors

PR
PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our Commit Message Guidelines
[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: N/A
What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Summary by CodeRabbit

Tests

Updated test assertions for better alignment with the new styling conventions in various components.
Enhanced specificity of color definitions in tests for improved rendering consistency.
Modified event handler naming conventions in tests to reflect updated standards.
Improved type safety and corrected element indices in event handling tests for better accuracy.
Adjusted mouse movement distances and height expectations in tests for more precise UI behavior validation.
Simplified metadata structure in the grid API for improved clarity and usability.
Removed placeholder configurations for better handling of empty data scenarios in components.
Changed component status annotations from versioning to clearer stability markings in the menus configuration.

@gweesin 以下命令可以单独执行某个组件的单元测试用例，这样验证起来会快一些
pnpm test:unit3 button

@gweesin 以下命令可以单独执行某个组件的单元测试用例，这样验证起来会快一些
pnpm test:unit3 button

ok了解了！我之前单独跑的时候直接改vite.config.ts配置文件的单元测试扫描路径来做调试，多此一举了🤣

@gweesin split/tag组件的e2e测试用例报错

你好，代码有冲突，修改下，我来合入哈

这么mr貌似有点问题740个文件改动，是不是分支污染了，可以重新拉个分支提交

确实奇怪，我based分支压根没这些调整，但却要我处理这些conflict，我看看重新拉个分支

已合入新拉的分支，这个mr我就关闭了哈


Duplicated presentation of text in breadcrumb and title

There is a duplication of title and breadcrumb with the same text that takes unnecessary real estate on the screen. (This happens cross product)
Please see how it can be improved.
@dclarizio @serenamarie125

@miq-bot add_label ui

This issue is stale, so I'm moving this over to the Classic UI repository to be reevaluated as it will likely never get reviewed here. If you know this has been fixed or is no longer valid, please feel free to close the issue there.
@miq-bot move_issue manageiq-ui-classic


HLS parser does not offset presentation timeline for event type playlists

Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
3.1.0
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from master?
Yes
Are you using the demo app or your own custom app?
custom
If custom app, can you reproduce the issue using our demo app?
yes
What browser and OS are you using?
Chrome+MacOS
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
n/a
What are the manifest and license server URIs?
What configuration are you using?  What is the output of player.getConfiguration()?
What did you do?
Play HLS content with #EXT-X-PLAYLIST-TYPE:EVENT
What did you expect to happen?
Presentation timeline is offset toward 0 by the minimum segment start time
What actually happened?
The HLS parser treats event type streams as live streams for the purpose of offsetting (or not offsetting in this case) the presentation timeline. This is contrary to the stated intent in the comments regarding VOD/EVENT type streams (hls_parser.js line 516). Additionally, the condition at line 501 seems to indicate you are explicitly aware you may be handling event streams in that block, so the overall intent is confusing.

@pcruiksh Can you test with 4.3.0? Thanks!


Refreshing Windows with Autopilot Reset and Self Deploying Mode - WS4 stuck after autopilot reset

Module: 0802
Task: 00
Step: 00
Description of issue
WS4 stuck on Device preparation after autopilot reset. I have waited around 6 hours but it has not moved forward tried resetting the VM as well.
However, on Intune, it shows that autopilot reset is completed and VM is given a new name as well using the Contoso-%RAND:2%

Repro steps:

Perform all prerequisite steps.
See that WS4 is stuck as shown in the screenshot

See #49 - this lab has never worked properly and should be removed. Self-deploy only works with a physical TPM, not virtuals.

We are currently working on an update for the course and will be replacing this lab with an alternative one.


Can't build due to possibly uninitialized value

When building, I get the following message:
g++  -MD -Wall -Werror -O3  -I. -c -o objs_linux/cc.o discrete_src/cc.cpp
g++  -MD -Wall -Werror -O3  -I. -c -o objs_linux/operations.o discrete_src/operations.cpp
discrete_src/operations.cpp: In function ‘void doAssign_X_E(WRValue*, WRValue*)’:
discrete_src/operations.cpp:350:46: error: ‘element.WRValue::<anonymous>.WRValue::<unnamed union>::<anonymous>.WRValue::<unnamed union>::<unnamed struct>::type’ may be used uninitialized [-Werror=maybe-uninitialized]
  350 |                 wr_assign[(WR_EX<<2)+element.type](to, &element);
      |                                      ~~~~~~~~^~~~
discrete_src/operations.cpp:348:25: note: ‘element’ declared here
  348 |                 WRValue element;
      |                         ^~~~~~~
cc1plus: all warnings being treated as errors
make: *** [Makefile:47: objs_linux/operations.o] Error 1

Repo commit: 8c0447b
g++ version: g++ (GCC) 12.2.0

It was indeed possible if a default case was reached for the element to go uninitialized. In practice it "can't happen" but now it really can't.
fixed in latest

Thank you :)


Create initial SDK swift library

Are there any plans for a XCUITest agent or Swift SDK?

@benquinteros thanks for your ticket
didn't plan it as I have no experience with swift yet
would you like to try making it?

hello, could you share a link to spec or some implementation guide?

@sqandrew basic functionality of agent is to make http calls:

start/stop build
upload image

additionally  you could add any usefull methods like:

config via file/env
retry on failure
etc

you could check some already implemented examples for other languages


Enable the auto_cross_origin setting in pushpin

Hopefully I got the sed-fu right

Thanks-- should be addressed now.

lgtm
:+1:
looks good to me
merge away
I approve
canned replies are great.


selector doesn't return all elements

Basic info:

Node.js version:
 8.0.0
jsdom version:
11.0.0

Minimal reproduction case
here is what chrome returns

const r = require('request')
const jsdom = require("jsdom");
const { JSDOM } = jsdom

r('http://www.clasificadosonline.com/Rentals.asp', function (err, response, body) {
  const dom = new JSDOM(body, {
    userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
  });

  console.log(
    dom.window.document
      .querySelectorAll('tr[bgcolor="#ffffff"] a[href^="/PartnersListingREFRID.asp?"]')
      .length
  )
})

here is what jsdom returns

note that I've test requestjs response and it does include the complete HTML

Almost certainly what is happening here is that some elements are being added from script, and you are not running scripts.

Yeah, that is what I thought, I have stripped every script tag in the requestjs response manually, opened it in Chrome and reperformed the query.

Hmm OK, thanks. Could you upload the stripped-of-script-tags version to a gist or pastebin or something? Any help moving it down to a small repro case of like a 20-line page would be even better. E.g. maybe you could analyze which elements are excluded and see if they have anything in common.

here is the stripped gist.

I think it be achrome's problem not jsodom's
now the selector is 'tr[bgcolor="#ffffff"] a[href^="/PartnersListingREFRID.asp?"]'
looking at the following two pics
![](https://i.imgur.com/w5VZpND.png]
![](https://i.imgur.com/nv59Aqm.png]
chrome detecting 1160 query result.
now clearly looking at the HTML

no every a[href^="/PartnersListingREFRID.asp? is a descendent of tr[bgcolor="#ffffff"]
although it could be a parsing problem in either chrome or jsdom
firefox results agrees with chromes

From a quick test, it appears to have something to do with case-sensitivity. Replacing #ffffff with #FFFFFF in the selector yields 1160 nodes as with browsers. It is presumably related to this logic, though I don't have time to delve further into it today. Pinging @dperini, in case you'd like to have a look.

Thanks, I always thought CSS attribute selectors are case-insensitive though .

Let's reopen, as being different from browsers is definitely a bug. They're not case-insensitive though unless you use the "i" modifier.

The spec has a vague mention of different rules for case sensitivity based on document language - potentially including quirks mode. That said, I see no difference in output from jsdom or browsers when adding a DOCTYPE.

Oh, I guess we or nwmatcher need to implement this: https://html.spec.whatwg.org/#case-sensitivity-of-selectors

Seems like nwmatcher.js (but not nwmatcher-noqsa.js) already implements it: https://github.com/dperini/nwmatcher/blob/master/src/nwmatcher.js#L380. As I'm fairly unfamiliar with the project, it is not clear to me whether there's an intentional reason for that list being present in only one of the files.

@Zirro / @domenic you brought up a ancient problem, probably not easy to handle ...
Yes, the knowledge and distinction between Quirks Mode and Standard Mode is already embedded in "nwmatcher" but I am not sure browsers implement that correctly. I hope to be proved wrong and I am willing to work on that, also, I already tried hard in the past without success.
At the time I implemented that table from: http://rakaz.nl/item/css_selector_bugs_case_sensitivity browsers were still buggy and didn't bother fixing that aspect of "Quirks Mode". Only with the advent of the HTML5 standards things started to change and browsers started to implement it.
I was basically forced to give up and bending my good will to the inconsistency and inaccuracy of browser vendors.
To make a long story short when I forked the "-noqsa" version the browsers were still buggy so to have the most accurate emulation I decided to implement that table partially in the "-noqsa" version by picking only the most popular attributes. See the INSENSITIVE_MAP: https://github.com/dperini/nwmatcher/blob/master/src/nwmatcher-noqsa.js#L122
I can port the complete table (46 attributes) to the "-noqsa" version but I then expect somebody else will be unhappy about the changed behavior and we will still have difference with some browser. So we will be back at "zero" problems solved again.
Please download the two test pages from this folder, I kept them ... waiting for the problem to resurrect and hit me back again:
https://github.com/dperini/nwmatcher/tree/master/test/quirks/

now from the console execute the following queries, in each of the test pages, in Chrome and Firefox:
document.querySelectorAll('#dom .foobar');
document.querySelectorAll('#dom [class="foobar"]');
document.querySelectorAll('#dom [class~="foobar"]');
document.getElementById('dom').getElementsByClassName('foobar');

document.querySelectorAll('#qsa .foobar');
document.querySelectorAll('#qsa [class="foobar"]');
document.querySelectorAll('#qsa [class~="foobar"]');
document.getElementById('qsa').getElementsByClassName('foobar');

then try to draw your conclusions on this case sensitivity problem. Maybe you can find out were I am doing something wrong and can help me out fixing this longstanding bug once and forever.
Or ... could it be that "nwmatcher" implements Quirk/Standard Mode distinction correctly ?
Thank you for the report, for the patience to read and for digging in to this mud :9)
P.S. Slightly related, I just added Selectors Level 4 case sensitivity flag [class="MiXeD" i]

@dperini That is interesting! Thanks for sharing the history around this issue.
From the spec, it looks like the list of attributes with case-insensitive values (which includes bgcolor) should apply regardless of standards/quirks mode. I created a testcase with the bgcolor attribute instead of class and this showed a consistent passing behaviour in Firefox, Chrome and Safari. The class attribute is not included in this list, however.

Or ... could it be that "nwmatcher" implements Quirk/Standard Mode distinction correctly ?

The class attribute seems to be a special case. The spec says that "IDs and classes in no-quirks mode and limited-quirks mode" should be matched case-sensitively. I suppose that doesn't explicitly tell us that the match should be case-insensitive in quirks mode, but that has to be the intention given the context. That's also how nwmatcher works right now.
However, the browsers I tested in (Firefox, Chrome, Safari) seem to do a case-sensitive match on class attribute values even in quirks mode, contradicting the spec. I don't have IE/Edge available to test in right now, but if their behaviour matches the other browsers it would seem like the spec should be changed to say that class attribute values always should be matched case sensitively.
It is possible that confusion was derived from the following sentence, which is part of the same section:

Selectors defines that ID and class selectors, when matched against elements in documents that are in quirks mode, will be matched in an ASCII case-insensitive manner.

I believe that refers only to .foo selectors, and not [class="foo"] selectors.
I'll check more thoroughly tomorrow whether I've got this right and file a spec bug if that turns out to be the case. I might also submit a PR to nwmatcher :-)

Excellent, you got to the right point:

I believe that refers only to .foo selectors, and not [class="foo"] selectors.

The difference is that in Quirks Mode the .foo selector does not yeld the same results as the [class="foo"] selector. Also consider comparing the other alternative to collect elements with a specific class name: document.getElementsByClassName("foo").
This is really confusing, anyway my hair were already gone a few years ago so that couldn't make things worst in that respect.
English is not my native language and even after reading the various specs a few times I couldn't find a clear statement saying the above but I am happy you could guess it from the sentence you mentioned above.
If that turns to be true I can easily import the full exception table even in "nwmatcher-noqsa" and mimic the browser way of always match the class attribute case sensitively. This will level up the current inconsistencies with the browsers in Quirks Mode.
Thank you for your time and precious help !

As a reference these are links to "nwmatcher" commits regarding the HTML_TABLE and older case sensitivity bugs and fixes. The HTML_TABLE is a list of 46 attributes names that need special handling due to case sensitivity bugs in various browsers. These links are ordered by descending dates (all from 2009):
https://github.com/dperini/nwmatcher/commit/060350ffd998c5894854a059b72ce185c1ee8b7b
https://github.com/dperini/nwmatcher/commit/47079733b571e6e1fac7bebde1de1f168622a4c9
https://github.com/dperini/nwmatcher/commit/0b222e8f142cc010c0d4cc1657c7236d78162ada
https://github.com/dperini/nwmatcher/commit/0b222e8f142cc010c0d4cc1657c7236d78162ada
https://github.com/dperini/nwmatcher/commit/e12acc50e2b85d4de65e0e2b4e247fb7f9c8a937
https://github.com/dperini/nwmatcher/commit/a77eb04bb5ca4b555f2efc5cdfed01ce1d064dcb

I have pushed the requested (case sensitivity) fix here: https://github.com/dperini/nwmatcher/commit/3a1cd75a by copying it from the complete "nwmatcher.js"  implementation.
Browsers do not agree with the specifications on how to match class attributes in Quirks Mode.
The HTML Living Standard (https://html.spec.whatwg.org/#case-sensitivity-of-selectors) is recommending a case insensitive match. This has been the same for the last 8/10 years now.
Since most browsers do not follow this specific rule, in Quirks Mode,  there will be inconsistencies with the results returned by "nwmatcher". Though due to extremely rare use of Quirks Mode the impact will probably be minimal.
I will wait for comments/suggestion and bugs review before pushing these changes to npm.
Please test and let me know if this solves the reported issue.

Great work! However, I just submitted a pull request to change the standard and clarify that id and class in attribute selectors should always match their values case-sensitively. The change ought to get accepted since that's what browsers actually do (thankfully, that's how the standards are written these days). You'll want to change nwmatcher to do that instead.

@Zirro I already applied the suggested change in this commit:
https://github.com/dperini/nwmatcher/commit/88b2278
Maybe I can take advantage of your knowledge and skills, when you see you have the time for it,
I would appreciate one last check to ensure everything is correct, so I can sleep over this case.
Thank you for helping out with this.

I should revert and re-apply the commit, it was wrong and not commented/described in the sources:
The latest commit is: https://github.com/dperini/nwmatcher/commit/0ab4041
I edited and corrected also my previous message.

I'd be happy to help test the changes in detail, though it might take a day or two before I have time. I hope that's alright.

@Zirro sure that's perfect ...
There is no real rush on this so take the time you need.
Thank you again for the help.
Have a nice day.

Okay, the attributes are being treated correctly now when it comes to HTML documents. Great!
However, the specification mentions that the list only applies to HTML documents. When I've tested on XML/XHTML documents in Firefox, Chrome and Safari it seems like the attribute values are always treated case-sensitively. In other words, there should be no need for the XHTML_TABLE as they are always case-sensitive in XML.
I believe that's all that remains to match browsers now :-)

@Zirro thank you so much for the review !!!
I removed the XHTML_TABLE from the sources so for XML document the comparison will always be case sensitive also in "nwmatcher.js". Notice that in previous versions of "nwmatcher-noqsa.js", the one used in "jsdom", the behavior was already like that, the XHTML_TABLE has never been used.
@domenic I will wait a couple of days before pushing 1.4.1 to npm.

Looks like this is fixed! Master, which will be published shortly, has nwmatcher 1.4.1 as the new minimum version, so all new installs will get this.


IndexError for Tickers w/ no institutional holders in .info

Running the following code:
deo = yf.Ticker('deo')
deo.info
Produces the following error:

This is only an issue when the Ticker does not have institutional holders on the "holders" page due to holders[1] having no value and causing the list index out of range error.
Inevitably, it flows through to the info function and I haven't been able to dig deep enough to see how to correct it.
I assumed just changing the index value to [0] would fix it or using a try/except statement, but to no avail.
Also, the condition of len(holders)>1 as in the pull request does not seem to work for me.

This appears to occur when there is no "Top institutional holders" section under the "holders" and "major holders" page of a given ticker.
It's a very big issue causing around a third of my tickers to error.

I am having this exact same problem and haven't been able to find a solution yet.