IndexError when defining and using the outputs of a multi-output layer

I was trying to define a multi-output layer performing pooling and providing both the max-pooled tensor and pooling indexes as outputs. When I tried to use the outputs of this layer, I got this IndexError exception:
Using TensorFlow backend.
Traceback (most recent call last):
 File "[...]/model.py", line 134, in <module>
   model = segnet_basic((256, 256, 3), 2)
 File "[...]/model.py", line 117, in segnet_basic
   x = UnpoolWithArgmax(ksize=2, name="decoder4/unpooling")([x, idx4])
 File "[...]\keras\engine\topology.py", line 574, in __call__
   previous_mask = _collect_previous_mask(inputs)
 File "[...]\keras\engine\topology.py", line 2766, in _collect_previous_mask
   mask = node.output_masks[tensor_index]
IndexError: list index out of range

Here is a minimal snippet to reproduce the error:
import tensorflow as tf
from keras import Input
from keras.engine import Layer, Model

class ArbitraryMultiOutputLayer(Layer):
    def __init__(self, **kwargs):
        super(ArbitraryMultiOutputLayer, self).__init__(**kwargs)

    def call(self, inputs, **kwargs):
        return [tf.negative(tf.abs(inputs)), tf.abs(inputs)]

    def compute_output_shape(self, input_shape):
        out_shape = super(ArbitraryMultiOutputLayer, self).compute_output_shape(input_shape)
        return [out_shape, out_shape]

class ArbitraryMultiInputLayer(Layer):
    def __init__(self, **kwargs):
        super(ArbitraryMultiInputLayer, self).__init__(**kwargs)

    def call(self, inputs, **kwargs):
        negative, positive = inputs
        return tf.add(negative, positive)

if __name__ == "__main__":

    input_layer = Input(shape=(None, 16, 16, 3))
    x, y = ArbitraryMultiOutputLayer()(input_layer)
    z = ArbitraryMultiInputLayer()([x, y])
    model = Model(inputs=input_layer, outputs=z)

which raises the same exception:
Using TensorFlow backend.
Traceback (most recent call last):
  File "[...]test.py", line 31, in <module>
    z = ArbitraryMultiInputLayer()([x, y])
  File "[...]\keras\engine\topology.py", line 574, in __call__
    previous_mask = _collect_previous_mask(inputs)
  File "[...]\keras\engine\topology.py", line 2766, in _collect_previous_mask
    mask = node.output_masks[tensor_index]
IndexError: list index out of range

I guess the compute_mask (at line 712 of engine/topology.py) does not generate a list of mask as stated in its documentation when the layer has several outputs.
Am I right ? Or is there a mistake in my layer implementation ?

As a temporary workaround, one can override the compute_mask function to return the expected number of masks (not very clean though):
class ArbitraryMultiOutputLayer(Layer):

    [...]

    def compute_mask(self, inputs, mask=None):
        mask = super(ArbitraryMultiOutputLayer, self).compute_mask(inputs, mask)
        return [mask, mask]


Validation proxy

Resolves #16.

The validation is not strict - adding the unknown field (not from the required parameters) passes.
#192 will address this.


Split e2e fixtures from anonymized dump

We shoud probably split the fixtures intended for testing from the dump for a couple of reasons:

We can't update the anonymized dump easily
We can't run the e2e tests in staging (since they don't have that stuff)
It's hard to update the test data

To achieve this, we should IMHO:

Add another database (with minimal schema / data) that is intended for automated testing, generated via migrations. This way, the anonymized dump can be exchanged / kept up to date. And the testing database can be rolled back whenever (maybe even similar to django after every test), should also be easily applicable to staging / production deployments

Actually, we can run now e2e tests against staging, so it is not really a problem anymore.


remove _id field from result

How can I remove ( unselect ) _id field from result.
basicly db.users.find({},{"_id" : 0});
Thanks

@jenssegers did you add any functionality for this specific issue or still we have to do this by raw way

@prashant-pokhriyal  you could do something like this
protected $hidden = ['_id'];

@ssatz thank you for your response but it's not always that I don't want it in the result.

I've been tinkering with this.. Anyone has a sample of a raw query with the _id field being hidden? I've tried a bunch of different ways and haven't been able to hide it.

@ssatz thank you for your response but it's not always that I don't want it in the result.

You have 3 choices
1.- Raw query
2.- Duplicate Model with hidden in one of them for the specific cases
3.- You could remove _id after query
$models = MyModel::get(['field1']);
        foreach ($models as $model) {
            unset($model->_id);
        }

We have a number of methods that set or change the $hidden and $visible attributes on a model. You could add something like this to your base Model class:
/**
 * Make the given, typically visible, attributes hidden.
 *
 * @param  array|string  $attributes
 * @return $this
 */
public function makeHidden($attributes)
{
    $attributes = (array) $attributes;
    $this->visible = array_diff($this->visible, $attributes);
    $this->hidden = array_unique(array_merge($this->hidden, $attributes));

    return $this;
}

and then call it via something like:
$models = MyModel::query()->get();
$models->each->makeHidden(['id']);


Password reset reports 'passwords do not match' for any kind of invalidity

Issue Summary
When entering a password that breaks validation rules (e.g. too short) on the password reset workflow, the error message is always "The passwords do not match. Please try again." regardless of the actual validation error.
Steps to Reproduce

Bring up bakerydemo (or any other project with AUTH_PASSWORD_VALIDATORS configured)
Visit /admin, click 'Forgotten it?' and enter a user's email (e.g<EMAIL_ADDRESS>Follow the link in the email, and enter a as the password in both fields

Expected: An error message saying that the password is too short
Actual: An error message saying "The passwords do not match. Please try again."
Technical details

Python version: 3.5.2
Django version: 1.11.8
Wagtail version: 2.0a1

Closing issue. Merged with f7b0b69


Reserve stock for checkout

This PR adds new reservation logic to the saleor.warehouse package. Reservations are closely inspired by stock allocation, except they associate stock with checkouts instead of orders and have expiration date after which they no longer affect available quantities count.
Reservations have time for which they are valid (and subtract the available stock). They are also removed when checkout is completed and order is created.
Checkout type may be queried for stockReservationExpires field to find out if any stock is reserved for the checkout, and when will this stock reservation expire.
Todo

[x] Reservations are part of saleor.warehouse
[x] Reservations are created together with checkout
[x] Reservations are updated together with checkout
[x] Reservations are removed together with checkout lines
[x] Reservations are updated together with shipping zone
[x] Reservation is removed on completed checkout
[x] Expose oldest's reservation's oldest expiration date on Checkout type in GraphQL
[x] Add SQL count tests to verify stable query number for checkout
[x] Reservations are accounted for in availableQuantity and isAvailable resolvers

Impact

[x] New migrations
[x] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[x] Privileged queries and mutations are guarded by proper permission checks
[x] Database queries are optimized and the number of queries is constant
[x] Database migration files are up to date
[x] The changes are tested
[x] GraphQL schema and type definitions are up to date
[x] Changes are mentioned in the changelog

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

I've rebased on master and finished checking if I've missed any place that should account for reservations but doesn't.

Would it make sense to allow the user to "extend" the reservation time by revisiting the checkout? Also; visiting an expired checkout – in the case of the stock still being available – could also automatically reserve it again.
(Both scenarios would improve the client journey towards a successful purchase)


Adding Support for Custom Netlify Functions

As mentioned in the Readme. I need support for custom netlify functions.
It would at least help to move every thing from "/functions" to the "/out_functions".
Which i will do myself as an Workaround.

Hey @LukasOchmann! Awesome, we will add that asap. It will probably work like this:
next-on-netlify --copy-functions-from=./path/to/functions/dir

So in your case, it would be:
  "postbuild": "next-on-netlify --copy-functions-from=functions"

What do you think of that solution? Would that work for you?

I too am looking for Custom Netlify Function support to help migrate in GraphQL data. I think the solution proposed here works well, though since Netlify mentions placing the functions directory in the root, perhaps it's worth just checking if there is already a functions directory and use that, otherwise people can specify the path?

Sounds like a good option @FinnWoelm , I am doing something similar manually and it works:
"postbuild": "next-on-netlify && cp ./functions/* ./out_functions"

Hi @lindsaylevine, can you confirm that this issue is resolved with the new Netlify+Next.js build plugin?
As far as I remember/understand, the build plugin allows you to create custom Netlify functions: Just create the functions as usual in your functions folder (or whatever path you set in netlify.toml). The build plugin will merge any Next.js-internal functions into your functions directory.
If there is a naming-conflict, the build will fail and you will get an error message. So don't worry about accidentally overwriting your custom functions!
If this is indeed the case, we can close this issue 🙂

yes! this is indeed the case! devs can see more info here about the plugin and what's next for next on netlify :) https://github.com/netlify/next-on-netlify#next-on-netlify-roadmap


Is it possible to use this framework on a already build application

Hi,
I am trying to use this automation framework, but the problem I have is that I only want to use an already built application, so that I can install this apk and run the tests on it (so no need for the app folder). Is that possible ?
Thanks in advance,
Ibrahim

In you case, you can follow Setup and add Cucumber/Espresso on your project. Then follow the below instruction to add tests for your project.


elastic -> elastic_abstract

👍

Coverage remained the same at 90.61% when pulling 2480bbc4148d58a616402b496386c6a2857f9181 on mapping into ca4f512b9ed903cf8ce9473800ad02650f7c7956 on master.

Coverage remained the same at 90.61% when pulling 2480bbc4148d58a616402b496386c6a2857f9181 on mapping into ca4f512b9ed903cf8ce9473800ad02650f7c7956 on master.


Fix size/align of ucontext_t on aarch64-apple-darwin

This commit effectively reverts #2817. Currently ucontext_t has both the wrong size and the wrong alignment for aarch64-apple-darwin which causes problems for users referencing the structure 1. The issue linked from #2817 claimed that it fixed #2812 but that's still an issue where FFI warnings are still emitted for usage of ucontext_t due to its transitive usage of u128. I'm not sure how to fix #2812 myself, but given that #2817 doesn't appear to solve its original intent and additionally the size/align are currently wrong this commit reverts in the meantime.

@bors r+

:pushpin: Commit 283ef4b2407a09bf54497d8b75cb1606ed4784ac has been approved by JohnTitor
It is now in the queue for this repository.

:hourglass: Testing commit 283ef4b2407a09bf54497d8b75cb1606ed4784ac with merge 66beadac7b43bbd79ccfcda7ae08bb00ce4774d8...

:boom: Test timed out

@bors retry

:hourglass: Testing commit 283ef4b2407a09bf54497d8b75cb1606ed4784ac with merge cd4fc660b58e4b5197f3396db8a007b6b7cc3bcb...

:sunny: Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing cd4fc660b58e4b5197f3396db8a007b6b7cc3bcb to main...


DR20: Search Window: The map is not changing with the query

The fix to #181 may fix this also, needs verification.

Clusters are now being removed from the map when there is a new search query, introduced in a63466451190d9f5d6ef8682602bba61f209480b .


add MariaDB dialect

Currently, only mysql and mysql2 drivers are being promoted.
mariadb should be added as well, linking to this library...
https://www.npmjs.com/package/mariadb
This is already working with Sequelize

Mariadb driver didn't work so well, so the whole dialect was dropped and mysql should be used instead.

I did some stress testing with that driver and there were crashes, leaking and hanging in error cases etc. I don't remember all the details from top of my head.

okay, no problem. @rusher - Got it all working with Sequelize, have to discuss with him what it would take to get it 100% with Knex.

maybe they have fixed some of those driver bugs or sequelize hasn't done proper stress testing for drivers (I did find bugs from most of node db drivers when I did my tests and at most of them were fixed fast by driver maintainers) ... dunno. Anyways new dialects should be done as seaprate npm packages. (checkout contributing.md)

There some differences between mysql and mariadb, and mysql driver blocks mariadb-only features.
https://github.com/knex/knex/issues/5173


Parse Error on every link except the first one.

Describe the bug:
When opening any album only the first image you choose is shown, the rest shows “Parse Error”.
To Reproduce
Steps to reproduce the behavior:
Open any album, only the first image will be shown, any others will show “Parse Error”.
Backing out to the gallery view you can select a new image, but the others still show “Parse Error”.
Device model and Android version
Device model: [Asus Zenpad]
Android version: [Android 5.0.1]
App version: 1.7.18
Additional context
E-hentai changed their site yesterday: https://e-hentai.org/news.php

Same problem here


VoiceOver support

I tried CustomIOS7AlertView (using now) and CustomIOSAlertView and in both cases the non-alert elements are accessible when I believe UIAlertController ensures that non-alert elements are not accessible via voiceover (you cannot touch or scroll to any elements outside the alert via voiceover). If you haven't tried VoiceOver before, you can ask Siri "Turn on VoiceOver" or turn it on in Settings > Accessibility > Voiceover; there is also a triple-tap home button shortcut you can enable in the same settings pane.
With CustomIOS7AlertView, the alert elements are mixed in with the other elements as you scroll through. With CustomIOSAlertView, the alert elements cannot be accessed by scrolling - interestingly you can tap alert elements directly to access them, and then you cannot access the non-alert elements, but you can tap outside the alert to get back to them again .
Ideally if the alert is displayed, the only accessible elements should be those inside the alert, until it is dismissed. It seems with VoiceOver off, I can't tap on anything outside the alert, so maybe it's just a matter of setting accessibilityElementsHidden https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIAccessibility_Protocol/#//apple_ref/occ/instp/NSObject/accessibilityElementsHidden on the right element? I'm not sure how UIAlertController does it...

This seems to be a fair point, thanks! I don't have much experience using VO, so I'll just leave the Issue open here for everyone else to see.

Could you maybe point to where in the code it prevents the non-VO user from tapping anything outside the alert? I can try experimenting there

It also depends on how the alert is attached to the view. It might be added as a subview of the parentView that the user passed on, or, as a subview of [[[UIApplication sharedApplication] windows] firstObject]
In either way, the CustomIOSAlertView view overlays the whole parent view it's attached to. This subview then keeps the user from being able to tap on anything in the parent.


Move CSS compressing to cssnano

We are currently compressing styles using our CSS pre-processor options which are not that smart.
My recommendation is to move to PostCSS plugin cssnano plugin which does more stuff like combining similar rules, reducing selectors and gradients and can even be extended to less safe optimizations.

Just run an experiment with CARS stylesheet and it went from 46Kb to 37Kb, 20% reduced.


Python config/library API

What
Allow users to configure the BAL library using a Python API to simplify the recreation of known states as part of automated testing.
Why
Presently, BAL can only be configured using a JSON library file. This causes several problems with the authoring of automated tests within host integrations:

It is difficult to single-source inputs and expected, values without authoring the JSON file in the test case and re-initializing the manager.
It requires additional side-car data files to accompany the tests which may not be desirable.

Notes

JSON should still be supported for other uses of BAL.
Workflows need careful consideration, including:

Run-time manipulation of BAL in a test case.
Drop-in replacement for the JSON file via declarative Python.
Authoring of JSON at scale via Python.
Can we leverage traitgen classes as part of this?

Acceptance Criteria

BAL has an additional settings key called "library_json", which contains the serialized database.
The JSON is returned from settings() and can be set through initialize()
Implicit interpolation variables, e.g. ${bal_library_dir} etc, are not provided. If required then they must be passed as any other user-configured "variables" entry in the library.
If provided,"library_json" takes precedence over "library_path".
A blank "library_json" reverts the library to the library stored at "library_path", if available.

There is a simpler half-way-house to consider, whereby we add some mechanism within BAL to be able to alter its in-memory JSON database at runtime as a JSON document (as opposed to an imperative API).

Riffing off past me... the settings dict could contain a serialised JSON database, as an alternative to a path to a JSON file.
This means the host could get the current state of the database (as serialised JSON) from settings().  The host could then mutate, re-serialise, and re-initialize(...) with the updated database.
Pros:

(Probably) trivial to implement.
No need to import/expose BAL internals.
Works in C++ too since its using the existing OpenAssetIO bindings.
Allows BAL database to be defined as a string value in an OpenAssetIO .toml config file, rather than in a separate file.

Cons:

Serialisation/deserialsation to/from JSON. The JSON has to be serialized/deserialised since InfoDictionary is a subset of JSON functionality (e.g no nested objects).
C++ standard library cannot natively parse JSON.
Need to rethink ${bal_library_dir} -type variable interpolation.

Expanded acceptance criteria based on findings during implementation.


question

Dear XiouGe:
It's my honor to read your article "Compounding Geometric Operations for Knowledge Graph Completion", and I would appreciate it if you could reply to me that in this picture, whether I just need to adjust the hyperparameter hidden_dim in the command line :
"CUDA_VISIBLE_DEVICES=0 python run.py --do_train --cuda --do_valid --do_test --evaluate_train
--model CompoundE -n 250 -b 4096 -d 100 -g 7 -a 1.0 -adv -tr
-lr 0.005 --max_steps 300000 --cpu_num 8 --test_batch_size 32  --print_on_screen"
to
"CUDA_VISIBLE_DEVICES=0 python run.py --do_train --cuda --do_valid --do_test --evaluate_train
--model CompoundE -n 250 -b 4096 -d (10/ 20/50/ 100/ 150/ 200,/250/ 300) -g 7 -a 1.0 -adv -tr
-lr 0.005 --max_steps 300000 --cpu_num 8 --test_batch_size 32  --print_on_screen"
       so that I can get the performance of CompoundE  in this picture,THANS!!!

Hi, I think you need to use a job scheduler to automate the dimension sweep to reproduce the results.

I am delighted to have received your response.When I reproduce the results use："CUDA_VISIBLE_DEVICES=0 python run.py --do_train --cuda --do_valid --do_test --evaluate_train
--model CompoundE -n 250 -b 4096 -d 300（100 origin） -g 7 -a 1.0 -adv -tr
-lr 0.005 --max_steps 300000 --cpu_num 8 --test_batch_size 32 --print_on_screen"
I can not get the results， if i should change other things？

I am delighted to have received your response.When I reproduce the results use："CUDA_VISIBLE_DEVICES=0 python run.py --do_train --cuda --do_valid --do_test --evaluate_train
--model CompoundE -n 250 -b 4096 -d 300（100 origin） -g 7 -a 1.0 -adv -tr
-lr 0.005 --max_steps 300000 --cpu_num 8 --test_batch_size 32 --print_on_screen"
I can not get the results， if i should change other things？

Thanks for experimenting with different hyperparameter settings. When generating optimal performance of the embedding under different dimension settings, we indeed had to search and change other hyperparameter settings as well. Unfortunately I didn't keep that settings on file.

Thank you very much for your reply， If it is convenient, could you please tell me the parameters in these dimensions? I find that other parameters seem to have a big impact on the result with the change of dimensions, but my computing resources are limited, so It’s hard for me to find out what kind of parameters are appropriate


Delineate most often used methods in the docs

I came across a Sphinx extension that could suit our needs perfectly, could be a solution:


Module '"dripsy"' has no exported member 'makeTheme'.

Hello,
I am using the expo-next-monorepo-example. In the theme.ts file in the app folder I have the following code:
import { makeTheme } from 'dripsy';

const theme = makeTheme({
  colors: { primary: 'blue' }
});

type MyTheme = typeof theme;

declare module 'dripsy' {
  interface DripsyCustomTheme extends MyTheme {}
}

export { theme };

I am getting the following error: Module '"dripsy"' has no exported member 'makeTheme'.
Is there a way to fix this?

you’ll need to upgrade dripsy


Error in fleet system

I have a problem. I deployed latest version of a game on my server. When I send a fleet for an attack or spy mission nothing happens. The fleet is constantly flying but it never reaches the point. And when I'm clicking back it never come back to a start planet.
If someone could point out to me where an option which would enable me to set the fleet as flown or which kick-starts execution of a mission can be found, maybe I would fix it by myself and then I will post a commit.

I send fleet again for spy mission. No repot from mission, no error in log, no locked fleets in admin panel.
https://i.imgur.com/kp7KOkR.png


Refactor out tlv/json struct hanlding function from jni to jsontlv

Refactor TlvToJsonWithStruct and JsonToTlvWithoutStruct to jsontlv module so that application can benefit from it when interacting with IM write and report via Json

Closing as obsolete/stale.


Implement tests for poly.jl that are independent from sve.jl

TODO

Implement tests for overlap, deriv, roots
Implement tests for  PiecewiseLegendrePolyVector

Tests for the overlap function can be found at:
https://github.com/SpM-lab/SparseIR.jl/blob/7eabaa9b9f5cb8f6a1bd4eb9a4e4f89907aa4039/test/poly.jl#L59-L61

Sorry, I missed the title > independent from sve.jl

I'm working on it > Implement tests for overlap, deriv, roots


parameter initializer is bound to the wrong variable

TypeScript Version:  2.8.0-dev.20180321

Search Terms:
Code
let foo = 1;

(function (bar = foo) { // unexpected compiler error; works at runtime
    var foo = 2;
    return bar; // returns 1
})();

(function (bar = (baz = foo) => baz) { // unexpected compiler error; works at runtime
    var foo = 2;
    return bar(); // returns 1
})();

(function (bar = foo, foo = 2) { // correct compiler error, error at runtime
    return bar;
})();

Expected behavior:
No error on the first and second function expressions
This used to work in a previous release.
Actual behavior:
Compiler error on the first two function declarations even though the code works at runtime.
Initializer of parameter 'bar' cannot reference identifier 'foo' declared after it.

Variable 'foo' is used before being assigned.

Playground Link:
Related Issues:

Compiler error on the first two function declarations even though the code works at runtime.

The code as emitted by the TS compiler will not work. the first example for instance will result in bar having the value undefined and not 1.
To generate code that would work, the compiler will have to do the initialization in a function scope other than the function itself, effectively warping the function in an IIFE.
We choose a while back to not do that as it impacts the readability of the generated code, and instead we opted in adding an error instead.

This used to work in a previous release.

I do not think this ever worked. I went back to 1.8 and the same errors are reported.

@mhegazy

The code as emitted by the TS compiler will not work. the first example for instance will result in bar having the value undefined and not 1.

That's only true if the target is ES3 or ES5.  I'm currently targeting ES2015.

To generate code that would work, the compiler will have to do the initialization in a function scope other than the function itself, effectively warping the function in an IIFE.

Or you could rename all function scoped identifiers (that are used somewhere in parameter initializers) that shadow declarations outside of the function. (cc @rbuckton)
You already do similar renames for lexical declarations:
// foo.ts
var foo = 1;
{
    let foo = 2;
}

// foo.js
var foo = 1;
{
    var foo_1 = 2;
}

/**********************/

// fn.ts
let foo = 1;

(function (bar = foo) { // unexpected compiler error; works at runtime
    var foo = 2;
    return bar;
})();

// fn.js
var foo = 1;
(function (bar) {
    if (bar === void 0) { bar = foo; }
    var foo_1 = 2;
    return bar; // returns 1
})();

We choose a while back to not do that as it impacts the readability of the generated code, and instead we opted in adding an error instead.

May I ask you to reconsider this decision?
I find this rather concerning as it only applies to code transpiled to ES3 and ES5. It makes using ES2015 features difficult to use because it shows errors that are technically not correct. If I didn't know much ES2015 I would think that it's not possible at all as I assume TypeScript does the correct thing.
You also use this same implementation to power the JS language service which doesn't show errors by default. As a user I'm really confused when "Go to declaration" jumps to a different variable than what's used at runtime.

Or you could rename all function scoped identifiers (that are used somewhere in parameter initializers) that shadow declarations outside of the function.

In the general case, we can't know what other outside variables in scope might exist.

That's only true if the target is ES3 or ES5. I'm currently targeting ES2015.

We can disable the whole check if we are in ES2015 or higher.

feel free to send us a PR for disabling the check for ES2015 or later.

Unfortunately it's not only the error message. The whole name lookup needs to be changed to make this work as expected.

U are right, we can change that too.

one concern i have is that the semantics of the same code snippet would be different based on your target compilation..

one concern i have is that the semantics of the same code snippet would be different based on your target compilation..

That's why I would still prefer to rename function scoped variables that shadow variables used in a parameter initializer when transpiling to ES3 or ES5. That way you don't need to maintain and test two different implementations depending on the target.

In the general case, we can't know what other outside variables in scope might exist.

You already make similar assumptions when transpiling lexical declarations:
// no-shadow.ts
{
    let foo = 1;
}

// no-shadow.js
{
    var foo = 1; // assumes there is no variable `foo` in the global scope
}

/********************/

// shadow.ts
var foo = 0;
{
    let foo = 1;
}

// shadow.js
var foo = 0;
{
    var foo_1 = 1; // assumes there is no variable `foo_1` in the outer scope
}

Accepting PRs to allow the ES6 scoping behavior when targeting ES6+; code should remain an error in downlevel targets


[fix] improved useMediaCapabilities hook

@addyosmani

uninstalled react-dom as I think it's not necessary in this package
updated code styling of useMediaCapabilities in README.md
extracted supported from the hook in useMediaCapabilities
refactored tests of useMediaCapabilities with supported extracted

@wingleung
Could you please review this PR if you have some time?

@addyosmani cc @wingleung
I've fixed it.


Introduce QuantifiedWhereClause and DynTy analogous to Chalk

This introduces a bunch of new binders in lots of places, which we have to be careful about, but we had to add them at some point. There's a lot of skipping of the binders; once we're done with the Chalk move, we should review the remaining ones.

I'll wait until after the release with this.
changelog internal

bors r+


[FLINK-4016] initialize FoldApplyWindowFunction properly

Hi,
I wrote in the issue that you opened. This is a duplicate of https://issues.apache.org/jira/browse/FLINK-3977 and the way to fix it is to make InternalWindowFunction properly forward calls to setOutputType. If you want, could you please change your fix to that and open a PR against the older issue?

I checked in this change with this commit comment:
[FLINK-3977] initialize FoldApplyWindowFunction properly
Hopefully that’s enough, however, on Travis CI I see that on my commit, the [FLINK-4016] is still triggered.
Regards, RvdWenden

On 06 Jun 2016, at 09:46, Aljoscha Krettek<EMAIL_ADDRESS>wrote:
Hi,
I wrote in the issue that you opened. This is a duplicate of https://issues.apache.org/jira/browse/FLINK-3977 https://issues.apache.org/jira/browse/FLINK-3977 and the way to fix it is to make InternalWindowFunction properly forward calls to setOutputType. If you want, could you please change your fix to that and open a PR against the older issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/apache/flink/pull/2070#issuecomment-223889602, or mute the thread https://github.com/notifications/unsubscribe/ACoENn2sN0wGQAn7CaOt_c2R2i7utHKjks5qI9BKgaJpZM4ItrYw.

Hi,
the clean way to go about this is to close this PR and open a new one for FLINK-3977. I wrote a new comment in the issue, outlining how the problem can be solved: https://issues.apache.org/jira/browse/FLINK-3977.

Closing, because the issue has been solved a different way.


Feat/UUID

Oops I did it again. This PR aims at supporting commonly used uuid crate type.
Checklist

[ ] An issue to be fixed by this PR is listed above.
[x] New tests are added to ensure new features are working. End-to-end tests are usually in the ./frb_example/pure_dart example, more specifically, rust/src/api.rs and dart/lib/main.dart.
[x] The code generator is run and the code is formatted (e.g. via just refresh_all).
[x] If this PR adds/changes features, documentations (in the ./book folder) are updated.
[x] CI is passing.

Remark for maintainer
So basically there's one thing that I haven't settled down yet :
I ran some experimentations with uuid::Uuid (which boils down to a [u8;16], see uuid::Bytes).
When converted IntoDart, I already turn Uuid into its :crab: Vec<u8> / :arrows_counterclockwise: DartCObject / :dart: Uint8List IR, so in the case of a Vec<Uuid> by default one get a :crab: Vec<Vec<u8>> / :arrows_counterclockwise: Vec<DartCObject> / :dart: some list of Uint8List.
Looking at documentation on types used on both sides (especially Vec<u8> and Uint8List), there's actually convenient methods to reconstruct it from bytes. So I benchmarked concatenating running IntoDart on different sized vecs of Uuid in a single Vec<u8> vs using default Vec implementation, out of curiosity.
I was actually dubious whether it's overoptimizing or unnecessary, but the results of the benchmark were actually... surprising. See this workflow run for example :

size
duration (default : nested vecs)
duration (packed : flattened in single vec)

100
8.7135 µs
397.21 ns

100_000
16.226 ms
390.64 µs

1000_000
175.02 ms
5.9609 ms

If my benchmark is correct, it's actually almost 30 times faster, so it might be worth the effort, what do you think ?
I gave it a try already, but still haven't found how to tweak codegen to have a specific Vec<T>.

Looks interesting! So I guess maybe we can firstly have a PR about uuid, and then another PR to do the promising optimization :)

Looks interesting! So I guess maybe we can firstly have a PR about uuid, and then another PR to do the promising optimization :)

I agree, thing is it's dependent on the impl IntoDart in allo-isolate so if it gets merged and I open another PR to change it later on, conceptually it's a breaking change (even if realistically speaking, probably nobody would have implemented it in another crate by that time, but still). Hence why I wonder if I should implement it in one-go.

@fzyzcjy I still have this weird error locally that pubspec.lock files are not in sync, giving stuff like this:

That's not a big deal but it's a bit annoying since I need to pay attention each time I commit lol.

You may need to upgrade to flutter 3.3.1?
Anyway, ignore this problem. Only need to worry when I am going to merge the Pr

You may need to upgrade to flutter 3.3.1?

Indeed! My bad 😅

I'm benchmarking on my machine if converting in native endianness would make any difference, performance-wise, but it seems that it's only a delta of ~2%. Do you know of any machines available in Github CI that would be big / little endians to check ? @fzyzcjy

github ci may not be suitable for benchmark I guess, they are virtual machine

Ok then at first sight it might not worth the hassle for such a small delta. Maybe we can just call it a day (well, if CI passes of course) ^^

but then I'm missing something in valgrind runs

maybe intro that dep in frb example packages?

maybe intro that dep in frb example packages?

No, turns out I'm dumb 😅, there was an error shown way above in the Valgrind logs. Mostly casting issues, I'm solving them.

That's OK

If you have time, let's review and fix the nits while waiting for the upstream PR to get merged :)

I am very busy with https://github.com/flutter/flutter/issues/101227, but will review as soon as possible

@Desdaemon What do you think? 👀

LGTM

Thanks guys, I know I solicited you a lot lately ! 🚀 🚀 🚀

Hi
Unsure if this is the right place, but I ran into an issue with this. When trying to use flutter_rust_bridge and build on the web I currently get an error when using the command (which is the one used by flutter_rust_bridge_serve or equivalently dart run flutter_rust_bridge:serve)
cargo build --lib --target wasm32-unknown-unknown -Z build-std=std,panic_abort

With the actual error being:
error[E0432]: unresolved import `crate::ffi::UUID_SIZE_IN_BYTES`
 --> src\ffi\web.rs:4:5
  |
4 | use crate::ffi::UUID_SIZE_IN_BYTES;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `UUID_SIZE_IN_BYTES` in `ffi`

I've checked that this now doesn't occur on the latest master branch, so presumably it's been fixed but not released?
Anything I could do do work around this issue in the meantime?

@rob-mur hi could you please create an issue in the issues section? may need more info e.g versions

@rob-mur btw ensure your flutter_rust_bridge dependency, in your Cargo.toml (and Cargo.lock), is also the latest

So you are correct that the template repository is still pointing to version 1 and so my Cargo.toml had that too. However, pointing to 1.48.0 leads to the observed crash. Thankfully though this gives me a workaround, if I use the following entry in Cargo.toml then it works as the current master branch works.
flutter_rust_bridge = {git = "https://github.com/fzyzcjy/flutter_rust_bridge.git", branch = "master"}

I can make an issue on why it doesn't work on 1.48.0 but at least I can keep going for now!


LICENSE discussion

Discussion on license
All my contributions for this will be unlicense: http://unlicense.org/
@eMBee please add any authors

@alexeygrigorev @tayiorbeii @paschoaletto could you please look at this question?
@lionelyoung proposes to publish this under the unlicense.
since all of you contributed to the code, your input on the license is appreciated.
personally i think if we can't get a consensus, then the primary choice of license should be with @alexeygrigorev since his code is the start.
myself i favor the GPL in some form or at least something compatible (which i believe the unlicense is) but given my minimal contribution i am fine with any other choice.

my code is WTF PL, but feel free to change that :-)

uh, sorry, could you elaborate please :-)

if it's the questions to me, the elaborate answer is "I don't care, do WFT you want" (that's basically what the licence says)

Whatever is clever.

Same from here. This code helped me on what I needed, I just want to leave it and help some others on the same situation.

excellent, thank you everyone.
as there are no objections, unlicense it is then. @lionelyoung
i feel the same as @paschoaletto btw, it's my motivation to collect all branches into this repo. i probably won't do much with it until i have that problem again.
maintenance ought to fall on whoever uses the code the most or last :-)
everyone has been given write access so that anyone can take over at any time even with out forking.

excellent, thank you everyone.
as there are no objections, unlicense it is then. (@lionelyoung)
and as it turns out, youtube-dl is also using the unlicense, so we are in good company with that choice.
i feel the same as @paschoaletto btw, it's my motivation to collect all branches into this repo. i probably won't do much with it until i have that problem again.
maintenance ought to fall on whoever uses the code the most or last :-)
everyone has been given write access so that anyone can take over at any time even with out forking.


Allow users to search and select references

In addition to PDF uploads, it would be nice if users could search and select references from something like the Semantic Scholar (S2) API.

@shauryr This video shows an example of how EndNote allows references to be added from an external reference database: https://youtu.be/S3xo6ZjBV6U?t=40. I'd of course want a better UX for our product, but hopefully you can get the general idea. I'd like to use S2 as our first external source. A lot of this work will be in the UI, I think (cc @cguedes @sehyod)

@hammer thanks for sharing the video. It looks great.
Semantic Scholar has a search endpoint where we can send our query and get the metadata of the paper -
endpoint link
Here it will return 10 papers with the metadata title, venue, year but we can add more keys like abstract and authors if needed. We can also increase the size of the number of papers returned. If the paper is open access we can wget the paper and run grobid for full text extraction.
I also want to add that the ranking of the search results is custom and is detailed here - blog by Sergey ; in practice exact title search is great, but for other queries it is not perfect, especially long queries will usually fail (limitation of there elasticsearch implementation). For our purposes it should be fine, and if we want to improve it we can later look into the SERP API.

@gjreda I've made my first commit! - https://github.com/refstudio/refstudio/commit/b7d0adaa582750af1a80ddc825d26d29c9b6fa2f
This script enables search functionality using S2 search endpoint. Please review and let me know if there are any improvements or changes you would suggest.

@shauryr have you considered using https://github.com/danielnsilva/semanticscholar instead of RAW http request to the API?

@shauryr Some general thoughts:

re: @hammer's comment about this living on the front-end, @cguedes and I think it's worth briefly discussing that on tomorrow's call. I could see it living in either place, but do think type-ahead should live on the front-end given our current architecture.
To @cguedes question, I think implementing this via the semanticscholar library would beneficial as it has a lot of built-in functionality for things like HTTP retries, exceptions, searching via specific fields, pulling down specific papers via unique IDs, etc. Rewriting all of that logic ourselves means more code for us to write, test, and maintain. It also seems pretty lightweight as a dependency, requiring only requests and tenacity, both of which are already needed for our inclusion of openai in our dependencies.
Based on tomorrow's chat, I think it'd be good to open up any backend work in need of review as a PR (and it's not "ready for review" yet, we can do a draft PR). I find commenting and discussion on PRs much easier to find later on, rather than having to find a specific commit hash.

@gjreda Thank you for the feedback. I have created a PR for this considering all the feedback that I have received here.
#250

@hammer I wasn't able to view the EndNote video above but I gave it a try anyway. Check out this Figma Preview

Image preview for reference...

Oh cool I hadn't thought to use a modal for this interface! I presume we would disable summoning the command palette when this is up. I like the focus and increased screen real estate to display search results. Does the search happen after each keystroke, or does the user need to hit enter? I suppose we should make it possible to navigate to this modal from the command palette and from the sidebar too...

We could search after a debounced keystroke (not immediately, but once the user stops typing) and/or on "enter." I think it should be added wherever you can upload references. I need to play with this command palette.


report software versions

This package relies on several underlying packages.  Report their versions, to the fullest extent possible.

gi.__version__ (gobject-introspection)
gi.repositories.GLib._version (maybe not used?)
gi.repositories.Hkl._version (libhkl: ? how to get the build number ?)

def get_versions():
    """Return dictionary of software versions."""
    versions = dict(gi=gi.__version__)
    if GLib is not None:
        versions["GLib"] = GLib._version
    if libhkl is not None:
        versions["libhkl"] = libhkl._version
    return versions

Not sure if it's possible to get the version of libhkl via Python API, but that can be parsed from the conda list hkl output (as long as we keep using conda for our deployments/distribution).
In [1]: import subprocess

In [2]: res = subprocess.run('conda list hkl'.split(), capture_output=True)

In [3]: res.stdout
Out[3]: b'# packages in environment at /home/vagrant/conda_envs/hkl:\n#\n# Name                    Version                   Build  Channel\nhkl                       <IP_ADDRESS>3       py39hf706f7a_2    nsls2forge\nhklpy                     0.3.16           py39h95b5467_0    nsls2forge\n'

In [4]: res.stdout.decode()
Out[4]: '# packages in environment at /home/vagrant/conda_envs/hkl:\n#\n# Name                    Version                   Build  Channel\nhkl                       <IP_ADDRESS>3       py39hf706f7a_2    nsls2forge\nhklpy                     0.3.16           py39h95b5467_0    nsls2forge\n'

In [5]: res.stdout.decode().split('\n')
Out[5]:
['# packages in environment at /home/vagrant/conda_envs/hkl:',
 '#',
 '# Name                    Version                   Build  Channel',
 'hkl                       <IP_ADDRESS>3       py39hf706f7a_2    nsls2forge',
 'hklpy                     0.3.16           py39h95b5467_0    nsls2forge',
 '']

In [6]: res.stdout.decode().split('\n')[3:]
Out[6]:
['hkl                       <IP_ADDRESS>3       py39hf706f7a_2    nsls2forge',
 'hklpy                     0.3.16           py39h95b5467_0    nsls2forge',
 '']

In [7]: res.stdout.decode().split('\n')[3:][0]
Out[7]: 'hkl                       <IP_ADDRESS>3       py39hf706f7a_2    nsls2forge'

In [8]: res.stdout.decode().split('\n')[3:][0].split()
Out[8]: ['hkl', '<IP_ADDRESS>3', 'py39hf706f7a_2', 'nsls2forge']

In [9]: res.stdout.decode().split('\n')[3:][0].split()[1]
Out[9]: '<IP_ADDRESS>3'

We can dig that out of ${CONDA_PREFIX}/conda-meta/hkl-*.json["version"].  This can be implemented in direct Python code with a default to "unknown".

Either:
(bluesky_2021_2) prjemian@zap:~/.../envs/bluesky_2021_2$ conda list | grep "hkl "
hkl                       <IP_ADDRESS>3       py38hf706f7a_2    nsls2forge

Even though this involves a system call, it seems more pragmatic and less OS-dependent. (The conda command carries the burden of providing just the information needed, independent of the OS.)

This way is very slow (multiple subprocess calls):
import subprocess

def package_version(package_name):
    args = f"conda list {package_name}".split()
    s = subprocess.run(args, capture_output=True)
    for line in s.stdout.splitlines():
        if line.decode().startswith(f"{package_name} "):
            return line.decode().strip().split()[1]
    return "unknown"

keys = "hkl hklpy gi gobject-introspection bluesky ophyd databroker".split()
versions = {
    key: package_version(key)
    for key in keys
}
versions

Out[49]:
{'hkl': '<IP_ADDRESS>3',
 'hklpy': '0.3.16+131.ga5a449a.dirty',
 'gi': 'unknown',
 'gobject-introspection': '1.68.0',
 'bluesky': '1.6.7',
 'ophyd': '1.6.1',
 'databroker': '1.2.3'}

This is faster to run.  The conda list command is slow:
In [62]: import subprocess
    ...: def installed_packages():
    ...:     s = subprocess.run("conda list".split(), capture_output=True)
    ...:     packages = {}
    ...:     for line in s.stdout.splitlines():
    ...:         if not line.decode().startswith("#"):
    ...:             args = line.decode().strip().split()
    ...:             packages[args[0]] = dict(
    ...:                 version=args[1],
    ...:                 build=args[2]
    ...:             )
    ...:             if len(args) == 4:
    ...:                 packages[args[0]]["channel"] = args[3]
    ...:     return packages
    ...:
    ...: keys = "hkl hklpy gobject-introspection bluesky ophyd databroker".split()
    ...: p = installed_packages()
    ...: versions = {
    ...:     key: p[key].get("version", "package-not-found")
    ...:     for key in keys
    ...: }
    ...: versions
    ...:
Out[62]:
{'hkl': '<IP_ADDRESS>3',
 'hklpy': '0.3.16+131.ga5a449a.dirty',
 'gobject-introspection': '1.68.0',
 'bluesky': '1.6.7',
 'ophyd': '1.6.1',
 'databroker': '1.2.3'}

Since we don't expect the installed packages to change once a process has started, we only need to call conda list once.  Also get info about the packages known by pip.
In [99]: keys = "hkl hklpy gobject-introspection bluesky ophyd databroker".split()
    ...: versions = {
    ...:     key: get_package_info(key).get("version", "unknown")
    ...:     for key in keys
    ...: }
    ...: versions
    ...:
Out[99]:
{'hkl': '<IP_ADDRESS>3',
 'hklpy': '0.3.16+131.ga5a449a.dirty',
 'gobject-introspection': '1.68.0',
 'bluesky': '1.6.7',
 'ophyd': '1.6.1',
 'databroker': '1.2.3'}

Keep in mind this info is indexed by package name, which might not be the name used for import:
In [105]: print(f'{get_package_info("epics") = }')
get_package_info("epics") = None

In [106]: print(f'{get_package_info("pyepics") = }')
get_package_info("pyepics") = {'version': '3.5.0', 'build': 'py38h578d9bd_0', 'channel': 'conda-forge'}

This new capability (to report software versions) belongs in hkl.util but there is an import cycle problem: util imports diffract imports calc imports sample imports util
The util module should not import any other hklpy module, otherwise it is not truly a utility.  The Constraint class has to move into util from diffract, which will break the above import cycle.


fix(releasenotes): bump package number

PatternFly-Next preview: https://patternfly-next-pr-2416.surge.sh

:tada: This PR is included in version 2.40.3 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


add rtype in session.request,help pycharm easy.

add rtype in session.request,help pycharm easy.

Thanks! :sparkles: :cake: :sparkles:

Interesting! I didn't know about this feature.

We should add these all over.


Smaller Diameter Profiles Please

Awesome job. Thread have never been easier to print.
Really liking the profiles but am running into times where smaller diameters are needed. As small as 3mm. Is it possible to add smaller diameters with an accompanying pitch decrease around 1.5-3mm?

I'm somewhat weary of supplying every conceivable thread configuration out of the box, as it's not an achievable goal.

Initially i had the same problem but changing the code allowed me to add any configuration I wanted.

The issue I am having i cannot generate any of file with main.py with python 3.12+


Edit Mode

Implement UI and logic for edit mode

There's a bug.... switching to night bode and then trying to drag crashes... doesn't happen in main, which is pretty werid

Seems to be fixed but landmarks still disappear when theme switches


Counter example HMR only works for React components but not for reducers

What is the current behavior?
The hot module reloading in the counter example only works for changes inside the react components but not for changes in the reducer. ex. if I change the INCREMENT action from return state + 1 to return state + 5 I get the following error:
[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details.
process-update.js?e13e:89 [HMR]  - ./reducers/index.js

What is the expected behavior?
Wouldn't it be nice to have changes in react components and reducers work with persistent state.
Or would you say that's too confusing for a simple counter example .. but then again why is React HMR in there then?

Will probably fix this as part of #1800.

Closing in favor of #1800. You can pick up discussion there :)


Save bytes

Codecov Report

Merging #97 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master    #97   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          15     14    -1
  Lines         234    231    -3
  Branches       51     52    +1
=====================================
- Hits          234    231    -3

Impacted Files
Coverage Δ

src/FormHoc.tsx
100% <100%> (ø)
:arrow_up:

src/Form.tsx
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Question: Is it possible to format a column to the number format?

First of all, what you guys have done is great. As a novice, it makes things so much easier on me, and I really appreciate it.
What I am running into though is after I convert a .htm file to .xlsx, I have a column in my spreadsheet, E, that the format needs to be converted to number instead of the default "general." Is there a way I can do that with this?
I know that I can setup the Excel COM, but that would defeat the purpose using ImportExcel! Here is a segment of what I have:
$xls = ForEach ($item in $spreadsheet | Where-Object {$PSItem.P4 -match '\w+'}) {
    [pscustomobject]@{
        ## Define the colums for the CSV file
        'MnsTransTy'      = $item.P1.TrimStart()
        'Del. Date'       = $item.P2
        'Time'            = $item.P3
        'Name 1'          = $item.P4
        'Purch.Doc.'      = [double]$item.P5
        ## Remove white space
        'Cases'           = $item.P6.TrimStart()
        ## Remove white space
        'line'            = $item.P7.TrimStart()
        'Name'            = $item.P8
        ## Remove white space
        'Tot Pallet'      = $Item.P9.TrimStart()
    }
}

$xls | Export-Excel -Path $filelocation\$date.xlsx -WorkSheetname $worksheetname

New-Item -Path $processedfiles -ItemType Directory

The column in question is P5. When I look at the spreadsheet, it shows up like this: 1.24511E+11
Sorry if this is a dumb question. I am still learning all of this. Any help would be greatly appreciated!

If I understand correctly. The key is -PassThru then you can grab the sheet (similar to how you'd work with COM), and then Close-ExcelPackage wraps it up.
NumberFormat that will show you a range of choices or you can do a custom format.
$path = "$env:TEMP\Test.xlsx"
Remove-item -Path $path -ErrorAction SilentlyContinue

$xlPkg = @"
"MnsTransTy","Del. Date","Time","Name 1","Purch.Doc.","Cases","line","Name","Tot Pallet"
What1,01/01/2018,01:00,Name1,PurchDoc,100,2,NameX1,100
What1,01/01/2018,01:00,Name1,PurchDoc,100.21,2,NameX1,100
What1,01/01/2018,01:00,Name1,PurchDoc,100.31,2,NameX1,100
What1,01/01/2018,01:00,Name1,PurchDoc,100.41,2,NameX1,100
"@ |
    ConvertFrom-Csv |
    Export-Excel $path -AutoSize -PassThru

$WorkSheet = $xlPkg.Workbook.WorkSheets["Sheet1"]

Set-Format -WorkSheet $WorkSheet -Range "F:F" -NumberFormat '$  #,##0.#0'
Set-Format -WorkSheet $WorkSheet -Range "I:I" -NumberFormat Currency

Close-ExcelPackage $xlPkg -Show

Thanks @dfinke. I appreciate it! I have tried this, and am getting an error. Sorry if I'm missing something. I'm still learning all of this.
## Build custom object which allows for modification of the spreadsheet that will be generated
$xls = ForEach ($item in $spreadsheet | Where-Object {$PSItem.P4 -match '\w+'}) {
    [pscustomobject]@{
        ## Define the colums for the CSV file
        'MnsTransTy'      = $item.P1.TrimStart()
        'Del. Date'       = $item.P2
        'Time'            = $item.P3
        'Name 1'          = $item.P4
        'Purch.Doc.'      = [double]$item.P5
        ## Remove white space
        'Cases'           = $item.P6.TrimStart()
        ## Remove white space
        'line'            = $item.P7.TrimStart()
        'Name'            = $item.P8
        ## Remove white space
        'Tot Pallet'      = $Item.P9.TrimStart()
    }
}

## Export to XLSX
$xls | Export-Excel -Path $filelocation\$date.xlsx -WorkSheetname $worksheetname -PassThru

## Create new directory based on date
New-Item -Path $processedfiles -ItemType Directory

## Move local htm files to processed folder
Move-Item $logicappsfiles $processedfiles

$WorkSheet = $xlPkg.Workbook.WorkSheets["Sheet1"]

Set-Format -WorkSheet $WorkSheet -Range "E:E" -NumberFormat '############'

Close-ExcelPackage $xlPkg -Show

And here is the output I receive. It looks like it's not sending an xlsx file to my destination directory now.

At line:54 char:1
+ $WorkSheet = $xlPkg.Workbook.WorkSheets["Sheet1"]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : NullArray

Set-Format : Cannot bind argument to parameter 'WorkSheet' because it is null.
At line:56 char:23
+ Set-Format -WorkSheet $WorkSheet -Range "E:E" -NumberFormat '######## ...
+                       ~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-Format], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Set-Format

Close-ExcelPackage : Cannot bind argument to parameter 'ExcelPackage' because it is null.
At line:58 char:20
+ Close-ExcelPackage $xlPkg -Show
+                    ~~~~~~
    + CategoryInfo          : InvalidData: (:) [Close-ExcelPackage], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Close-ExcelPackage

I was curious if it would be possible to use Set-Format, or Set-Row in this?

Oh man! It works! It's looking good over here. Thank you for this!


update chart version

Issue #, if available:
Description of changes:
Update chart version to trigger CDK to redeploy.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm
/approve


Develop

:white_check_mark: Build Microsoft.Owin.Security.ApiKey 6-eoyldnit completed (commit https://github.com/jamesharling/Microsoft.Owin.Security.ApiKey/commit/0ad0eb3e5a by @jamesharling)

:white_check_mark: Build Microsoft.Owin.Security.ApiKey 6-eoyldnit completed (commit https://github.com/jamesharling/Microsoft.Owin.Security.ApiKey/commit/0ad0eb3e5a by @jamesharling)

:white_check_mark: Build Microsoft.Owin.Security.ApiKey 7-rwohcvcg completed (commit https://github.com/jamesharling/Microsoft.Owin.Security.ApiKey/commit/980d0d013b by @jamesharling)

:white_check_mark: Build Microsoft.Owin.Security.ApiKey 7-rwohcvcg completed (commit https://github.com/jamesharling/Microsoft.Owin.Security.ApiKey/commit/980d0d013b by @jamesharling)


Add ability to display icons in Code Lenses

VSCode Version: Insiders

Add ability to display Octicons in Code Lenses.
My plan is to display the results (as done here in VS) of unittests against each method.
Part of the functionality has been provided through #10648 (refreshing code lenses).
Now i'd like to display a red "X" or a green "Tick" (what ever the standard Octicons may be).

As a workaround, you may be able to use emoji or regular unicode symbols to achieve a similar effect:

One downside to this is that these will vary somewhat between operating systems

Excellent, what Unicode characters have you used?

Thanks for the tip

@jrieken I would like to try fixing it. Would that be ok? Maybe you can think of some pitfalls?

Use the utils from octiconLabel.ts and wire things up here: codelensWidget.ts#L78 One thing to consider is that maybe not all users want octicons, e.g one might be using $(zap) and not want ⚡ but we can consider that later


gazpar still working with HA udate 2022.11.3?

Hi,
first of all, thanks a lot for this integration. I had integrated this into my HA setup two weeks ago, and it worked fine until some days ago. The sensor.gazpar just disappeared - latest available gas data in the energy board was as of 14/11/22.
I than reinstalled the gazpar integration with then new 1.1.6 update some some minutes ago but again, HA  is not showing the sensor.gazpar. I even added the ', which apparently are required now for the config file (which you updated in the latest readme file).
As I don't know, where to look elsewhere, I was wonderting if there have been any changes in HA 2022.11.3 (which I updated also some days ago), which may stop gazpar to work?
I'm greatful for any hints to make it working again.
thanks in advance !

problem solved - the configuration in the .yaml file was wrongly formated. some missting spaces...


Add Lafferty and Sriver partition

Pull Request Checklist:

[x] This PR addresses an already opened issue (for bug fixes / features)

This PR fixes #1497

[x] Tests for the changes have been added (for bug fixes / features)

[x] (If applicable) Documentation has been added / updated (for bug fixes / features)

[x] CHANGES.rst has been updated (with summary of main changes)

[x] Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

Add partition algo from Lafferty and Sriver (2023)

Does this PR introduce a breaking change?
depends (see options below)
Other information:
TODO list in this PR:

[x] Add weights
[x] add tests
[x] Maybe add num to hawkins_sutton ?
[x]  Clean up based on changes outside of this PR (eg. remove functions that are now elsewhere)

TODO list outside of this PR:

[ ] Add a more general graph_fraction_of_total_variance to figanos (in progress by Juliette, https://github.com/Ouranosinc/figanos/pull/134)
[ ] Add a function in xscen to prepare the data from a catalog. (https://github.com/Ouranosinc/xscen/pull/289)

In this function, I could rename the dimension to fit what the partition vocabulary (model, scenario, downscaling) OR we could change the partition vocab to the catalog/xscen vocab (source, experiment, bias_adjust_project). Option 2 is my personal preference, but that would be a breaking change for hawkins_sutton.

Right now, da = variance / variance.sel(uncertainty="total") * 100 is inside the plotting function. But, this goes against the figanos philosphy "only plot, no calculation". I suggest adding a bool arg fraction which would replace the variance values in uncertainty by fractions or return a 3rd output with fractions.

coverage: 89.662%. first build
when pulling 69509fa5a9978055a79792e000f3e811475fe425 on add_laferty_partition
into d3829126b0e62a06fa0e90695c19ea60585fccf8 on master.

@juliettelavoie Be sure to follow the steps in the README for testing things on the PR before merging to master: https://github.com/Ouranosinc/xclim-testdata/blob/main/README.md

I'm feeling so-so regarding the fraction keyword. The issue I see is that there are a bunch of different figures typically created from those results, some using the fraction of variance, others using the variance itself. If the fraction calculation is embedded in the function, you need to run it twice.
My proposal would be to add a function, e.g. to_fraction that would do this calculation.
The workflow would then be
uncertainty = lafferty_sriver(da)
fraction = to_fraction(uncertainty)
figanos.plot(fraction)

@huard How about a fraction arg that creates a 3rd output instead of replacing the second?

Meh, I also find it annoying when the number of output changes based on the arguments you pass. It reminds me too much of matlab. ; )

Added a function for fractional uncertainty, but did not make any changes to the functions themselves. The test can reproduce the figure from the notebook. I think we're almost there.

J'assume qu'il faut merge la PR dans xclim-testdata pour que le test passe ?

@juliettelavoie Be sure to follow the steps in the README for testing things on the PR before merging to master: https://github.com/Ouranosinc/xclim-testdata/blob/main/README.md

@Zeitsperre not sure what I am supposed to do in this PR  to make the test pass ?


[Bug]: Puppeteer click don't fail when actual element is overlapped

Minimal, reproducible example
await this.page.waitForSelector('selector', { visible: true })
await this.page.click('selector')

Error string
no error
Bug behavior

[] Flaky
[ ] PDF

Background
I'm trying to click an element on my page after performing some action.
Previous action renders a popup like element which covers the element. When I try to click the element before the overlapping popup closes, I expect puppeteer to fail. But, it don't throw any error.
I can add explicit timeout or wait for the overlapping element to be removed. But, why is puppeteer not throwing any error when element is not actually clicked?
I see puppeteer implementation of click is, just move the cursor to that x/y coordinate and do a mouse click. But, it's not actually validating it is clicking the element or some other element which is overlapping it.
async click(
    this: ElementHandle<Element>,
    options: Readonly<ClickOptions> = {}
  ): Promise<void> {
    await this.scrollIntoViewIfNeeded();
    const {x, y} = await this.clickablePoint(options.offset);
    await this.frame.page().mouse.click(x, y, options);
  }

WDIO has proper implementation of throwing an error for similar behaviour - https://webdriver.io/docs/api/element/click/

Expectation
I would expect page.click fails if element is overlapped by any other element.
Reality
Nothing happens. No error thrown by puppeteer.
Puppeteer configuration file (if used)
No response
Puppeteer version
22.6.2
Node version
20.11.1
Package manager
npm
Package manager version
10.2.4
Operating system
macOS

Thanks for the response @OrKoN
Could you please help how can we implement this check on client side, to validate what was actually clicked?

One way could be to await the click event to be actually emitted on the element you click:
const elementHandle = await this.page.waitForSelector('selector', { visible: true });
const clicked = elementHandle.evaluate((el) => {
   return new Promise((resolve, reject) => {
       el.addEventListener('click', resolve, {once: true});
       setTimeout(() => reject(new Error('notClicked')), 10000);
   });
});
await elementHandle.click();
await clicked; // either resolves or throws

There could be multiple reasons why it does not receive a click.
Or you can use a modern API to check if element is covered before trying to click:
const elementHandle = await this.page.waitForSelector('selector', { visible: true });
const isCovered = elementHandle.evaluate((el) => {
   const rect = el.getBoundingClientRect();
   // there are many ways to detect overlap, it could be partially overlapping or completeltey.
   // you might want to check the center or something else depending on how you intend to click.
   const overlap = document.elementFromPoint(rect.left, rect.top);
   return overlap !== el;
});
if (isCovered) { throw ... }

Thanks @OrKoN Let me this this out


Support spec.deployments to override configuration of system deployments

Current spec has some problems:

Annotations and Labels cannot be added safely into system pods.
HA Logic is obsolete.
HA setting applies to the all system pods. e.g. HA=2 means all deployments (webhook,controller,etc) scale to 2.
HA setting does not work for Ingress manifests like Kourier and Contour.
Resource setting does not work accurately if there are two pods have a same name container. e.g. webhook and istio-webhook have webhook container.
...etc.

To fix them, this patch introduces deployments field to override HA,
resources and Label/Annitations field for system deployments.
Fixes https://github.com/knative/operator/issues/442 https://github.com/knative/operator/issues/382 https://github.com/knative/operator/issues/337
e.g. Override webhook and 3scale-kourier-controller
cat <<-EOF | kubectl apply -f -
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
  name: ks
  namespace: knative-serving
spec:
  deployments:
  - name: webhook # Override webhook.
    replicas: 2
    labels:
      foo: bar
    containers:
    - name: webhook
      limits:
        memory: 1G
  - name: 3scale-kourier-control # override 3scale-kourier-control.
    replicas: 2
    labels:
      foo: bar
    containers:
    - name: kourier-control
      limits:
        memory: 1G
  ingress:
    istio:
      enabled: false
    kourier:
      enabled: true
  config:
    network:
      ingress.class: kourier.ingress.networking.knative.dev
EOF

Release Note
Support `spec.deployments` to override configuration of system deployments.
`spec.high-availability` is deprecated. Use `spec.deployments.replicas` instead.
`spec.resources` is deprecated. Use `spec.deployments.containers.{limits,requests}` instead.

Is there an issue captured for documenting these changes on knative/docs repo?

@nak3 I would suggest NOT deprecate the spec.HA.
We can leave it as an option to configure all the deployments with the same number of replicas.
spec.deployment to overwrite if available.

@matzew I haven't filed the change on knative/docs repo yet because I was (am still) not sure if this change will be accepted or not :worried:
@houshengbo Okay, I understand about spec.HA.
So, if we have the following configuration, webhook has 3 replicas, but other deployments have 2 replicas. Is that alright?
spec:
  high-availability:
    replicas: 2
  deployments:
  - name: webhook
    replicas: 3

For spec.resources, okay I will drop the change now.
But https://github.com/knative/operator/issues/382#issuecomment-741002226 needs to be solved somehow. istio-webhook and webhook already hit the issue.

@nak3 Right, that's how we can plan the usage of the ha and the deployment replicas together.

/lgtm
/approve


find_by

Hello!
Awesome work! I love how consistent and simple the API is!
I think it worth having a Model.find_by({key: 'value'}) method like the find_by in ActiveRecord.
It is easier to write
const user = await User.find_by({email: 'a@b.c'});

comparing to
const user = (await User.where({email: 'a@b.c'}).limit(1)).pop();

Or maybe there is a similar API that I'm missing?

Thanks Amir!
Currently there is no equivalent function to the ActiveRecord find_by. But you could easily create a scope.
e.g.
// in your model definition
this.scope('find_by_email', function(email){
  this.where({email}).singleResult()
})

singleResult is not yet documented, but on my todo list! It's a breaking change to version 1 - in V1 limit(1) would return a single record.
So your query would look like this:
const user = await<EMAIL_ADDRESS>
If you need a generic find_by method, it's better to write a plugin, so it's automatically available to all your models:
// plugins/find_by.js
exports.model = {
  find_by: function(condition){
    return this.where(conditions).singleResult()
  }
}

Instead of singleResult You could also write first. It‘s an alias

Amazing.
Having it as a plugin is even better. keeping the core as minimal as possible.
Thanks for the explanation. I'm getting more familiar with openrecord as i'm trying to use it to replace sequelizejs in a project of mine.
The documentation needs a bit of work though. I'll try to make prepare some PRs for the docs :)


ExcelHelper.ToDataTable 报 Cannot get a text value from a numeric cell

InvalidOperationException: Cannot get a text value from a numeric cell
DataTable dataTable=ExcelHelper.ToDataTable(saveFileName);

Thanks for your feedback, I'll try to solve it as soon as possible.

Could you please provide a demo to reproduce? Sorry that I can not reproduce this problem

@zl33842901 能否提供一个可重现这个问题的简单示例？我这里测试的没有问题，
测试代码： https://github.com/WeihanLi/WeihanLi.Npoi/blob/dev/samples/DotNetCoreSample/Program.cs#L64


Fix crashing on vmlinux files

Allow for processing non-PE files that use the same DOS format, like linux vmlinux/boot images. The full linux boot image header description can be found at https://www.kernel.org/doc/Documentation/x86/boot.txt
This fixes issue #24; feel free to add more robust checking as needed/desired. Given the kernel documentation, it should be pretty easy to write out a plugin to get the various properties for a SBOM. Perhaps a new feature request :smile:
If desired, I can see about finding a test file for the vmlinux portion, but this does manage to fix the crash without seeming to cause other issues.
Closes #24.

I added in the changes; they were things that I had been thinking about anyway, and thanks for catching the PE vs PE\x00\x00 distinction.

Thanks! Just two minor changes to the PE/COFF address read and malformed PE check. If you want to do a rebase and manual squash that includes (#28) at the end of the commit title that would be great -- otherwise there aren't any conflicts so GitHub's squash and merge should work.

Awesome, merged!

Given the kernel documentation, it should be pretty easy to write out a plugin to get the various properties for a SBOM. Perhaps a new feature request 😄

Could you create an issue or a GitHub discussion thread to track that idea?

If desired, I can see about finding a test file for the vmlinux portion, but this does manage to fix the crash without seeming to cause other issues.

If there's a relatively small vmlinux file that could be used for testing that would be great to have for a future plugin that extracts information from linux kernel images.


refactor(runtime.py): count resource variables in native code

Move the counting of resource variables from the Python code to the native code
of the soon-to-be-public Python module tflm_micro.runtime. This avoids what
would be a large, complex dependency in the public module on the third-party
packages tensorflow, tflite-runtime, and flatbuffers (or vendored parts
thereof).
This code is covered by the existing tests.
BUG=part of #1484

We will want to do flatbuffer manipulations from the tflm pypi package so I'm assuming that the dependencies being removed here will still creep in.

I don't foresee a problem with depending on tensorflow and lite if we must.
As originally implemented, we would need to package up some of the lite code we vendor in from upstream (which I presume is already published in the tflite-runtime package) and declare a runtime dependency on the tensorflow package. That should work, it was just a complicated way to implement this particular, small detail (counting the number of resource variables).
I agree with goal of keeping things thin. My sense of thin here was: keep these Python bindings (including the Python dependencies they drag in) small and delegate down to our native code ASAP. True I added a little code to the native part of the bindings, but I traded that off as better than dragging in all that stuff at the Python layer.
I hear what you're saying—maybe the bigger picture of other things we'll want to do in the Python layer make the dependencies unavoidable and reverse the tradeoff I was trying to make.

Thanks, I better understand where you were coming from. We will be doing a lot more in Python so following the same pattern here would be the way to go from my perspective.


Update attack.technique regex in detectionrule.py

I have updated the attack.technique regex so that it accepts inputs which contain sub-techniques, as well.

Hello @efeerdur!
Thank you very much for your contribution (:

Hello @efeerdur!
Thank you very much for your contribution (:


Fix detecting own address if URL is lowercase

Part of https://github.com/oasisprotocol/explorer/issues/1577
https://explorer.dev.oasis.io/mainnet/sapphire/address/0x95d683e4365209e5ce64f2e26e00c23207fe7ec3

Before
After

Oh yeah, that's a much better idea


Convert the first argument to optional to match the underlying API.

See https://tc39.es/ecma262/#sec-sharedarraybuffer.prototype.slice and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/slice

Anything that needs to done to get this looked at?


add eclipse project files and missing idea files to gitignore

Got un-tracked notification for building files in maven build, so add them to gitignore

Add to whitelist

Looks like I need to troubleshoot the CI environment. This isn't a code failure.

retest this please


Convert a document-by-term frequency matrix to corpus class

Hi,
As I know, genism provides a function Sparse2Corpus to convert sparse matrix to Gensim corpus format. Is there a similar function in tomotopy which can convert a document-by-term matrix to corpus class in tomotopy?
Thanks.

Oops, sorry for late answer. I forgot this issue totally.
Currently, tomotopy doesn't provide such function, because its internal implementation cannot accept a matrix in bag-of-words format. To insert sparse matrix into tomotopys corpus at current version, you should restore the word list from the matrix, and call add_doc() repeatedly.
If utility functions like Dense2Corpus or Sparse2Corpus are needed often, I can improve tomotopy.corpus to accept matrix input by modifying its internal implementation. But it takes some times.

Adding new features into tomotopy.corpus.Corpus

Corpus.from_dense_matrix(matrix, vocab_dict) -> Corpus
Corpus.from_sparse_matrix(matrix, vocab_dict) -> Corpus


Refactor service main.go code so its a little easier to write an app

Currently I'm copying/pasting a lot of code just to create an app that uses the service configuration. I'm hoping to figure out a way to put most of that into a package so its easier to write a main.go. Post Delhi.

@tsconn23 Please assign to me

Do you mean init.go? That tends to be more verbose than main.go. This issue is another place where GoKit could help.

Closing due to inactivity.


PrismaUtils prismaCreate does not respect Prisma.XxxxInput interface

Hi !
Running through the documentation, I applied the chapter "Creating input for mutations" and found a strange behavior :
export const UserSelfCreateInput: InputObjectRef<Prisma.UserCreateInput> =
  builder.prismaCreate('User', {
    name: 'UserCreateInput',
    fields: () => ({
      // Empty
    }),
  });

This perfectly TS compile, while Prisma.UserCreateInput is like this :
type Prisma.UserCreateInput = {
    id?: string | undefined;
    contactEmail: string;
    name: string;
}

The consequence is in the resolver, when using it like so :
  t.prismaField({
    type: User,
    // used here
    args: { input: t.arg({ type: UserSelfCreateInput, required: true }) },

    resolve: async (query, parent, { input: payload }, context) => {
      // `payload` resolves to `Prisma.UserCreateInput`

      const createdUser = await database.user.create({
        // So compiler is happy here
        data: payload,
      });

      return createdUser;
    },
  }),

And the generate GraphQL is like so :
input UserCreateInput

(empty input)
Which lead to runtime errors; because the GraphQL schema is not consistent to what is passed to the resolver.

I observed the exact same behavior with any kind of more complex configuration, example :
export const UserSelfCreateInput: InputObjectRef<Prisma.UserCreateInput> =
  builder.prismaCreate('User', {
    name: 'UserCreateInput',
    fields: (t) => ({
      contactEmail: t.string({
        required: true,
        validate: { schema: z.string().email() },
      }),
      name: t.string({
        // This shouldn't be accepted as it's not nullable in the model
        required: false
      }),
    }),
  });

My observation is that prismaCreate.fields is basically just not producing something type-checkable with a type like so :
const variable: InputObjectRef<Prisma.UserCreateInput>

This used to be stricter, but some changes prisma made, made maintaining it very painful.
You could probably define your type as:
export const UserSelfCreateInput: InputObjectRef<Partial<Prisma.UserCreateInput>> =
  builder.prismaCreate('User', {
    name: 'UserCreateInput',
    fields: () => ({
      // Empty
    }),
  });

For a lot of create inputs, you want to mix user provided inputs with things provided in the resolver, it is rare that the user is providing all fields in their input.    This does lead to some lack of type-saftey.
I am not against having the types be more accurate here, but getting this to work reliably with prisma's input types without compromising other parts of the developer experience is tricky and there are higher priority features I am working on right now, so I probably won't be able to improve this until after v4 releases


activation_token: Provide GTK 4 helper

cc @jsparber
I noticed that cargo clippy --features=gtk4 -- -W clippy::pendantic will complain:
warning: casting from `*const glib::Class<gtk4::gdk4::AppLaunchContext>` to a more-strictly-aligned pointer (`*mut gtk4::gio::gio_sys::GAppLaunchContextClass`) (1 < 8 bytes)
  --> src/activation_token/mod.rs:63:17
   |
63 |                 std::ptr::addr_of!((*context.class().parent()?)) as *mut _;
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_ptr_alignment
   = note: `-W clippy::cast-ptr-alignment` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::cast_ptr_alignment)]`

Should this add the v2_76 feature to glib?

Should this add the v2_76 feature to glib?

We will need to figure out a way to expose that, yes. Enabling it by default is a no-no

I'm not sure having a helper like this is helpful. That your helper introduces more confusion. I have the worry that users may think they can keep the ActivationToken object around, but they actually can't since it may be invalid.
Maybe a better way would be to hide the activation token from the user all together and call g_app_launch_context_get_startup_notify_id () just right before we send the DBus message if the user opts in.
For context have a look on how the token is generated: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkapplaunchcontext-wayland.c#L65

I'm not sure having a helper like this is helpful. That your helper introduces more confusion. I have the worry that users may think they can keep the ActivationToken object around, but they actually can't since it may be invalid.
Maybe a better way would be to hide the activation token from the user all together and call g_app_launch_context_get_startup_notify_id () just right before we send the DBus message if the user opts in.
For context have a look on how the token is generated: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkapplaunchcontext-wayland.c#L65

Alternatively, one can make the token non-clonable, hence single use. But yeah, this is something to take into account.

I'm not sure having a helper like this is helpful. That your helper introduces more confusion. I have the worry that users may think they can keep the ActivationToken object around, but they actually can't since it may be invalid.
Maybe a better way would be to hide the activation token from the user all together and call g_app_launch_context_get_startup_notify_id () just right before we send the DBus message if the user opts in.
For context have a look on how the token is generated: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkapplaunchcontext-wayland.c#L65

Alternatively, one can make the token non-clonable+require ownership, hence single use. But yeah, this is something to take into account.

It could be an option to get the activation token from the launch context only on deref().
Would be good to have some usage examples.

I'm not sure having a helper like this is helpful. That your helper introduces more confusion. I have the worry that users may think they can keep the ActivationToken object around, but they actually can't since it may be invalid.

Well, one can make all the methods that takes an ActivationToken not take a reference.

Maybe a better way would be to hide the activation token from the user all together and call g_app_launch_context_get_startup_notify_id () just right before we send the DBus message if the user opts in.

That assumes the library is targetting gtk only, which is not.

For context have a look on how the token is generated: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gdk/wayland/gdkapplaunchcontext-wayland.c#L65

Well, it seems there is no way to destroy the xdg-activation? so what would make it invalid per your sentence above?
Imho, we are already doing exactly this for the WindowIdentifier. Except in those cases, we have a proper way to unexport the handle under wayland which we are properly handling under wayland.

I'm not sure having a helper like this is helpful. That your helper introduces more confusion. I have the worry that users may think they can keep the ActivationToken object around, but they actually can't since it may be invalid.

Well, one can make all the methods that takes an ActivationToken not take a reference.

If we want to be strict:

Remove the current From<String/str> and make a unsafe fn from_string method
Remove the Clone trait
Do not take references to activation tokens on any method that uses them (this is already done, afaik)
Remove deserialize to enforce that from_string  is unsafe

I feel we can get away with just removing the Clone trait and documenting it better.

Well, it seems there is no way to destroy the xdg-activation? so what would make it invalid per your sentence above?

It's not that the token gets invalidated. But it may not be accepted any more for activation from Mutter. The token is tight to the user interaction. See: https://wayland.app/protocols/xdg-activation-v1

Imho, we are already doing exactly this for the WindowIdentifier. Except in those cases, we have a proper way to unexport the handle under wayland which we are properly handling under wayland.

Yeah, i saw how you handle WindowIdentifier and it matches the suggestion here.

That assumes the library is targetting gtk only, which is not.

I didn't mend that we shouldn't remove the current way of setting the activation token.

Yeah, i saw how you handle WindowIdentifier and it matches the suggestion here. But activation token works differently.

What are the differences?

I didn't mend that we shouldn't remove the current way of setting the activation token.

Understood that

It's not that the token gets invalidated. But it may not be accepted any more for activation from Mutter

I don't see where in the spec it says anything like that?

What are the differences?

The activation token should be created with a recent serial (generally obtained from an input event). The window handle on the other side is constant and valid till it's unexported.

I don't see where in the spec it says anything like that?

https://wayland.app/protocols/xdg-activation-v1#xdg_activation_token_v1:request:set_serial
Some compositors might refuse to activate toplevels when the token doesn't have a valid and recent enough event serial.

Sure, but nothing in the currently suggested API makes it sound like you can keep it around. We can just make any API that takes an ActivationToken takes it by value instead of by ref, remove Clone implementation and you are done? Basically what @A6GibKm suggested above.

I think consuming and not allowing clones of  ActivationToken is a good idea .
My concern is that the developer gets the impression that the ActivationToken is tide to the Gtk::Window which is mostly false.  It's tide to the GdkWalyandDisplay, the current user input (serial) and current focus window (wayland surface).
Also we really don't want developers to call ActicationToken::from_window() at a random time. We need to make sure that the developer obtains the token immediately after user input that activates a different window/app (focus and/or launched)  and that the developer make the portal request a quickly as possible before future user input happens.
I'm not sure that good documentation is enough.

Also we really don't want developers to call ActicationToken::from_window() at a random time. We need to make sure that the developer obtains the token immediately after user input that activates a different window/app (focus and/or launched) and that the developer make the portal request as quickly as possible before future user input happens.

Wait what, you would call the portal the moment the user clicks on a button. Why would you create it beforehand ? I am not sure about your worry here. People would just copy paste the examples, so if the examples are correct I don't see what more we could do here.

Wait what, you would call the portal the moment the user clicks on a button.

Yes, that's how focus stealing prevention works. I really need to finish my blogpost about this.

I understand what you are saying here, but your "requirements" can not be worked around by a "better API", it is the programmer's job. If you think this could be documented a bit better, sure.
Otherwise, I don't really see any solution here

As the required glib patch have made it to a release, can we get this updated please? thanks!

The bindings still don't accept an option https://gtk-rs.org/gtk-rs-core/git/docs/gio/prelude/trait.AppLaunchContextExt.html#method.startup_notify_id. One option is to use the method via ffi and the other is to wait for bindings and implement it then.

The bindings still don't accept an option https://gtk-rs.org/gtk-rs-core/git/docs/gio/prelude/trait.AppLaunchContextExt.html#method.startup_notify_id. One option is to use the method via ffi and the other is to wait for bindings and implement it then.
EDIT: it seems the nullable part has not reached gtk-rs-core's master.

We have not updated gir-files in a long time. I will try to take care of that this weekend

EDIT: it seems the nullable part has not reached gtk-rs-core's master.

it is there now


Add Pulsar integration

What does this PR do?
Rewrite of https://github.com/DataDog/integrations-extras/tree/master/pulsar
Motivation
Popularity

Can you help me understand what will happen to the existing integration in integrations-extras? How do you know which set of docs and settings will be used?

@urseberry We'll soon make a PR like this https://github.com/DataDog/integrations-extras/pull/346

As a member of the Pulsar community, this is really awesome work and is a much more comprehensive solution. I will be working with my team to help contribute more to the dashboards!

Thanks @addisonj!


Shift focus to response when it comes

It's a bit of a scroll to reach the response especially on a smaller screen. So the focus should shift directly to response. Also a button to view response full-screen.

Will it make sense to have a downward arrow show up pointing to the response?


feat: Add Market Operator role

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4797db1) 9.94% compared to head (ad40f77) 16.64%.
Report is 11 commits behind head on main.

Files
Patch %
Lines

...ts/MarketParticipant/V1/MarketParticipantClient.cs
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff            @@
##            main    #2289      +/-   ##
=========================================
+ Coverage   9.94%   16.64%   +6.70%
=========================================
  Files         85      103      +18
  Lines       4244     4625     +381
  Branches     792        0     -792
=========================================
+ Hits         422      770     +348
- Misses      3812     3839      +27
- Partials      10       16       +6

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Added solution to event 10443

Text for event ID 10443 for Storage Replica directs user to use Diskpart.exe but there is no information about which steps should be executed. This post list all the required commands to solve this issue.

@fdelossantos : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@robinharwood, @Xelu86
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team


the tracing feature does not seem to play well with console

When compiling with all-features, we currently get an a default trace dispatcher has already been set error.

We should probably just get rid of console.


Split form code into old and new calculator versions; Tailwind the latter

Description
This keeps Tailwind classes out of anything that's used by the old
calculator, which I don't want to convert. It also allows some
simplification in both copies, since a lot of branches can be
eliminated. I probably should have done this a while ago.
I don't know how Github will do at displaying this as a
copy+modify. You may want to pull locally and use git show -C to
make use of git's copy detection; it works on this diff.
Test Plan
Look at old and new forms; make sure they're the same as before.
(There is actually an intentional minor difference: in an earlier
Tailwind PR I broke the alignment of the tooltip icons a little bit,
and this fixes them by making the label div a flexbox.)
Text search to make sure the deleted variables aren't in use by
anything imported by the state calculator.

As I thought, Github shows state-calculator-form.tsx as a brand new file. I definitely recommend pulling locally and using git show -C to see what I've actually changed in it.

Noticed minor visual changes:

old embed form vertical spacing is tighter; I think it's better in this branch than on main
new embed tooltips are aligned better with labels

LGTM!

For me, rather than showing state-calculator-form.tsx as a new file, I see this:
diff --git a/src/calculator-form.tsx b/src/state-calculator-form.tsx
similarity index 80%
copy from src/calculator-form.tsx
copy to src/state-calculator-form.tsx
index 93d10d5..c0d0038 100644
--- a/src/calculator-form.tsx
+++ b/src/state-calculator-form.tsx

followed by a diff of the old file and the copy. Maybe copy detection is influenced by some environmental factor that's different for you?


[middleman] failed to keepalive to  connection in dubious state

Hi Team,
I'm getting 502 Bad Gateway from middleman with below error for few calls while doing concurrent testing with 100+ request. Increased keep-alive time to 300s and lua_socket_pool_Size to 60 and still same error exists.  While the upstream connection sends the response with proper response body.
The issue is  when sending large concurrent request, previous connection is not properly closed and unread data still present in buffer. Can anybody give insight on proceeding this issue?
2020/07/20 14:22:15 [error] 167#0: *1153003 [lua] access.lua:102: execute(): [middleman] failed to keepalive to :443: connection in dubious state, client: , server: kong, request: "GET /xyz HTTP/1.1", host: "", referrer: "https://xyz"

Nithya - If you get 502 Bad Gateway that tells me that the downstream system is unable to handle the requests and appears to be unavailable Kong. Try to see whether the downstream application is able to handle the connections. To test it out replace the downstream application with a mock server that just records the request and responds and see whether this issue is going away.


Swiftwave Staging Environment

Prepare a staging environment , which will

provide demo of swiftwave
as well as, helps frontend developers avoiding dependency of swiftwave stack

It need to be

[x] managed from github actions
[x] deploy on EC2 from GH actions on new update on master branch
[x] reset server every 4 hr [remove all images, volumes, network stacks] and reinstall swiftwave
[x] add healthcheck to uptime to track status

CC : @The-Debarghya  @cAmartya

Every task has been completed . So closing !
Thanks 👍