retain sort state between views

looking for feedback,  not sure of the appropraiate style for this.
the gist is to save sort predicates betweeen views so when you return
from some other view don't lose any sort order you set.
this pr only covers the events view. if this is an appropriate style I would
extend the pattern to cover the other sortable views.

Thank you for this PR! I'll have to do some research to see the options available and the drawbacks associated to them.
With this proposed implementation, do you know if the sort state is kept once you hard refresh the page?

no sort state is lost on hard refresh.    I think the predicate / reverse state might get to be too much for the urls, but having it in the urls would be nice.    otherwise we could look into cookie or local storage?

You are right, having it within the URLs would be actually very nice but I feel like we'll need some additional mechanism if you browse back to a view without hitting the back button and I'm still wondering what the best approach would be to combine these two solutions!

Ok,  here's a proposal:

Ok,  here's a sketch of a plan:
on entering a view,  look for saved sort state for the view in this order:

in the sort state service.
in the url
the defaults

then update the url with the current state.  removing sort state from the url for any other view to prevent overly large urls.
when sort state is changed, update url and sort state service.
this way a hard reload of the page gets the sort state from the url.   and the url is copy paste ready.
switching views back and forth picks up saved state from the sort state service and updates the url.
thoughts?

keeping query params in the url and reset between views is also touched on in #409   I think the filters,  and these sort params would all want to be handled the same way.


Report confirmationsRequired for pending txns in multisig-transactions/{safe_tx}

What is needed?
Pending transactions do not currently report the number of confirmations required for execution. This would be incredibly helpful to determine how far along a given safe_tx is without doing a separate call, which is unneeded.
Since the model stores the threshold, this doesn't seem to be a terribly expensive query to make.
Endpoint
/api/v1/multisig-transactions/{safe_tx}

The MultisigTransaction model does not store the threshold, where do you see that? Please do a separate call in your app and keep the information about the threshold

So how/where is it retrieved when viewing an executed transaction? Why would it not be the same?


Branch edit task

Add editTask command in the format editTask n/new title d/new description

Codecov Report

Merging #63 (2d9aec1) into master (fa67966) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #63   +/-   ##
=========================================
  Coverage     63.80%   63.80%
  Complexity      413      413
=========================================
  Files            80       80
  Lines          1456     1456
  Branches        153      153
=========================================
  Hits            929      929
  Misses          490      490
  Partials         37       37

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 fa67966...2d9aec1. Read the comment docs.


Rename component class name 'container'

Renamed container so not to clash with other broad container class names

Hi @DonNicoJs, is it possible to release a new minor version that includes this change? Including this component in my project currently messes up the layout.

@kielabokkie I will release a minor this week :) thanks for the ping

@DonNicoJs Nice one, cheers!
By the way, the issue was caused because the scoping of the css was correct. It currently says <style scope> instead of <style scoped>. Renaming the class to be more specific works too though 😄

@kielabokkie Released!

@DonNicoJs Thanks 😄


Add Author + Profile option to blog posts

Add Author to blog posts. Right now this doesn't exist (see image).
Add Autho to blog lists
Add option for author name to link to a profile page on the website, where the author can update any information he/she wants to share.

@Bitc0indad This was the issue we discussed about authors.

GOOD FIRST ISSUE!!

@Bitc0indad This was the issue we discussed about authors.

Thanks BK! I will review with Erik and get PR submitted for this.

Add Author to blog posts. Right now this doesn't exist (see image).
Add Autho to blog lists
Add option for author name to link to a profile page on the website, where the author can update any information he/she wants to share.

@bitkarrot this issue "Add option for author name to link to a profile page on the website, where the author can update any information he/she wants to share." Would this be a new header and footer etc Projects --- Blog --- Store --- Team --- About --- ?

Not too sure what your comment means, do you mean profile pages? Yes there should be a separate folder and section in astro for this if people want to do it. That ground work should be laid out first before links are created.
Also, Can you do a visual mockup of what you're trying to do?  It would help a lot to convey how you see it. thanks
On Fri, Aug 4, 2023, at 3:27 PM, BitcoinDad wrote:

• Add Author to blog posts. Right now this doesn't exist (see image).
• Add Autho to blog lists
• Add option for author name to link to a profile page on the website, where the author can update any information he/she wants to share.
Screenshot 2023-06-22 at 11 10 15 AM https://user-images.githubusercontent.com/73979971/248019197-cef691dc-b442-4f38-8976-c0cac81ba2c7.png
@bitkarrot https://github.com/bitkarrot this issue "Add option for author name to link to a profile page on the website, where the author can update any information he/she wants to share." Would this be a new header and footer etc Projects --- Blog --- Store --- Team --- About --- ?

—
Reply to this email directly, view it on GitHub https://github.com/plebnet-dev/website/issues/5#issuecomment-1666236891, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARUNQQ4RO4OVNG472AAZLD3XTVZMFANCNFSM6AAAAAAZQSHGOU.
You are receiving this because you were mentioned.Message ID: @.***>

Still open?
reassigning reviewr to @eriknewland


Issue #51: Add example with a path parameter for begin new page/api

@hovissimo, what do you think? Is this clear enough for the CLI? We'll need to update the docs on enhance.dev as well.
Signed-off-by: macdonst<EMAIL_ADDRESS>

@hovissimo thanks just wanted to make sure it was clear.


Update to e-g beta.1

This PR updates the e-g dependency to the latest beta.
@jamwaffles A simulator beta release, after this PR is merged, would be useful to update the other crates to the e-g beta.

A release is a good idea indeed. I'll do that when I'm back on my Linux PC in a bit.

I just released v0.3.0-beta.1 of the simulator :+1:

Thanks!


Fix crash in /modlog public

Since we're using a child process now, Rooms was no longer defined there.

@Zarel can this be merged quickly? /modlog currently isn't working at all, since the child process is crashed.

I don't like the idea of loading Rooms in a child process. It's not designed for that.

Hmm, but it's required for /modlog public. I guess another option would be replacing public with a list of actual room names before passing it to the child process,

That's probably a good solution

Okay, I changed it so public is resolved in the main process, so there's no need to load rooms data in the child.
If we ever want to support checking multiple rooms at once in one modlog command, we're already halfway there because it's already treating it as a list instead of a single roomid now, so that's good.


Documentation checker job fails every morning

Documentation job on GitHub actions fails every morning which seems to be caused by
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

It's likely running into these problems because of the sheer number of broken links. Most seem to be coming from broken haddock links, e.g.
[✗] https://hydra.family/head-protocol/haddock/hydra-cardano-api/Cardano-Ledger-Alonzo-TxBody.html

[✗] file:///nix/store/bacifcjs171a4z6qm5h24va3gld04p1j-ghc-8.10.7-doc/share/doc/ghc/html/libraries/base-<IP_ADDRESS>/GHC-Generics.html#t:Rep

[✗] https://hydra.family/head-protocol/haddock/hydra-cardano-api/Cardano-Ledger-BaseTypes.html

[✗] file:///nix/store/bacifcjs171a4z6qm5h24va3gld04p1j-ghc-8.10.7-doc/share/doc/ghc/html/libraries/base-<IP_ADDRESS>/GHC-Generics.html#t:Rep

[✗] file:///nix/store/bacifcjs171a4z6qm5h24va3gld04p1j-ghc-8.10.7-doc/share/doc/ghc/html/libraries/base-<IP_ADDRESS>/GHC-Generics.html#t:D1

[✗] file:///nix/store/bacifcjs171a4z6qm5h24va3gld04p1j-ghc-8.10.7-doc/share/doc/ghc/html/libraries/base-<IP_ADDRESS>/GHC-Generics.html#v:MetaData

So maybe adding file:// or https://hydra.family/head-protocol/haddock to the ignore-patterns of the action could help filter them out? We could/should make sure these documentation references are consistent in other CI jobs.

The problem comes from the Haddock documentation which creates link that do not exist, either to source files as file:// or to external packages.

I have disabled the workflow manually till we have some bandwidth available to fix this.

FYI @abailly-iohk there is a close as "not planned" status, which would've fitted here.

Oh, my bad! Definitely better, I will make be more cautious next time


Cannot build project on Windows 8.1x64

package.sh fails at sudo npm install -g node-gyp nw-gyp n
There is no such command as sudo in Windows environment.
And I cannot figure out what actually module is "n"? But anyways, as Node's npm says, this module (n) is not supported by win32

The build script is for OS X only. Building on Windows is more complex. Im not sure how we will handle packaging on windows.
Honestly I have no idea how to write a build script on Windows. I dont understand how people actually do real work on an OS that refuses to use a real command line interface.

It's actually not that bad :)
I've tried installing node-webkit-builder and run through it. But keytar dependency is failing to install. Will search this problem later. I may help with building system for Windows family.

Hey, this topic may seem a bit old, but did you actually figure it out and get it working? This seems like the only SFTP uploader that is actually good looking, but sadly it's only for OS X. :(

I have multiple different types of builds "working" under windows. Most recently testing out using Electron instead of NWJS. Still no build script. Windows support is our top priority for the next update.

Please try again with the latest build. It is now automated.


before_or_equal/after_or_equal with nullable broken (with date as rule and without date_format rule)

Laravel Version: 8.80
PHP Version: 8.0
Database Driver & Version: sqlsrv (MSSQL)

Description:
before_or_equal/after_or_equal with nullable broken (already fixed if format is defined, but not with simple date rule)
currently I found a workaround: using date_format:Y-m-d\TH:i:s instead of date
Bug is in Class Illuminate\Validation\Concerns\ValidatesAttributes and method compareDates. If a format is set it goes into checkDateTimeOrder which returns true if second date is null. In the case you use date as rule instead of date_format it goes further and into the function compare with a date and null and compares both, which results in a false.
Steps To Reproduce:
Rules (example):
'first_date' => 'nullable|date|before_or_equal:second_date',
'second_date' => 'nullable|date|after_or_equal:first_date|exclude_if:some_key,y',
'some_key' => 'nullable|string',
Request data:
some_key: "y"
first_date: "2022-01-10T00:00:00"
second_date: null
Error I get:
The first date must be a date before or equal to second date.

Solution: like in the other bug -> return true, if any of this nullable dates is null (just ignoring this check)
protected function compareDates($attribute, $value, $parameters, $operator)
{
if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) {
return false;
}
    if ($format = $this->getDateFormat($attribute)) {
        return $this->checkDateTimeOrder($format, $value, $parameters[0], $operator);
    }

    if (! $date = $this->getDateTimestamp($parameters[0])) {
        $date = $this->getDateTimestamp($this->getValue($parameters[0]));
    }

    return $this->compare($this->getDateTimestamp($value), $date, $operator);
}

to
protected function compareDates($attribute, $value, $parameters, $operator)
{
if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) {
return false;
}
    if ($format = $this->getDateFormat($attribute)) {
        return $this->checkDateTimeOrder($format, $value, $parameters[0], $operator);
    }

    if (! $date = $this->getDateTimestamp($parameters[0])) {
        $date = $this->getDateTimestamp($this->getValue($parameters[0]));
    }

    if (is_null($date)) return true;

    return $this->compare($this->getDateTimestamp($value), $date, $operator);
}

I don't think there's a bug here. If you really think there's a bug feel free so send in a PR with a failing test. Thanks

@driesvints this bug got partially solved : https://github.com/laravel/framework/issues/40086 - only for validations where a date format is defined in the rules. but the bug still exists if it doesn't have a defined format. I debugged it and I don't think it should work inconsistent like now. why are you always closing this bug? I even posted how it can be reproduced and an extended explaination and also a solution to this BUG! in the other case you saw it as a bug and fixed it, why not in this case?

Hmm seems you're right. There are some strange things going on with these rules. I also discovered that, for example, the below doesn't fails:
new Validator($trans, ['x' => '2012-01-15', 'y' => '2012-01-14'], ['x' => 'before_or_equal:y'])

Gonna dig into all of this. Sorry about that.

It seems this isn't easily solvable. I've added extra tests to confirm the current behaviour here: https://github.com/laravel/framework/pull/40543
Btw, 'before_or_equal:y' was failing because y is allowed in date in PHP so it's best to use actual field names instead of single characters.
There's currently, as far as I can see, no good solution for this issue. We've decided we won't be spending more time into this but would appreciate PR's if anyone wants to solve this in a clean way.
For now, we suggest you use a different approach at validating this data.

@driesvints
new Validator($trans, ['x' => '2012-01-15', 'y' => '2012-01-14'], ['x' => 'before_or_equal:y']) this may not fail, but
new Validator($trans, ['start' => '2012-01-15', 'end' =>null], ['start' => 'nullable|date|before_or_equal:end',
'end' => 'nullable|date|after_or_equal:start',]) should fail - to reproduce this bug.
dont use x and y als attributes!!! first it tries strtotime and y = yesterday which is totally fine. if it doesn't get a valid date from strtotime it tries to find if there is a other attribute with this name to get its value. i debugged it and tested it and also have given u a solution!!!
protected function compareDates($attribute, $value, $parameters, $operator)
{
if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) {
return false;
}

    if ($format = $this->getDateFormat($attribute)) {
        return $this->checkDateTimeOrder($format, $value, $parameters[0], $operator);
    }

    if (! $date = $this->getDateTimestamp($parameters[0])) {
        $date = $this->getDateTimestamp($this->getValue($parameters[0]));
    }

    return $this->compare($this->getDateTimestamp($value), $date, $operator);
}

this is the current code
u need to change it to the following:
protected function compareDates($attribute, $value, $parameters, $operator)
{
if (! is_string($value) && ! is_numeric($value) && ! $value instanceof DateTimeInterface) {
return false;
}

    if ($format = $this->getDateFormat($attribute)) {
        return $this->checkDateTimeOrder($format, $value, $parameters[0], $operator);
    }

    if (! $date = $this->getDateTimestamp($parameters[0])) {
        $date = $this->getDateTimestamp($this->getValue($parameters[0]));
    }

    if (is_null($date)) return true;

    return $this->compare($this->getDateTimestamp($value), $date, $operator);
}

only one line to solve it:
if (is_null($date)) return true;
it's not really that complicated. i would really need this fix quick to release a module on our test system for our customer to test it and fixing it there in the vendor is not an option. using workarounds also not an option if i have a correct bugfix recommendation to be merged in.
sorry i dont know the process with pr and so on here. but i worked myself in the code and i'm sure it's correct.

If you implement that line you'll notice other tests will fail.

maybe some test could be wrong or inconsistant with date_format functionality - this is why i ask
@driesvints

@driesvints
i checked which tests doesn't work:
$v = new Validator($trans, ['foo' => '2012-01-15 11:00', 'bar' => null], ['foo' => 'before_or_equal:bar']);
$this->assertTrue($v->fails());

why ->fails() - it looks inconstent?! why should it only pass, if a date format is defined
$v = new Validator($trans, ['foo' => '2012-01-15 11:00', 'bar' => null], ['foo' => 'before_or_equal:bar', 'bar' => 'nullable']);
$this->assertTrue($v->fails());

same
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => null], ['start' => 'before:ends', 'ends' => 'nullable']);
$this->assertTrue($v->fails());

same
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => null], ['start' => 'before:ends']);
$this->assertTrue($v->fails());

same
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => '31/12/2000'], ['start' => 'before:ends', 'ends' => 'after:start']);
$this->assertTrue($v->fails());

$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => '31/12/2013'], ['start' => 'before:ends', 'ends' => 'after:start']);
$this->assertTrue($v->fails());

has to be analysed
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => '31/12/2000'], ['start' => 'after:31/12/2000', 'ends' => 'after:start']);
$this->assertTrue($v->fails());

has to be analysed
$v = new Validator($trans, ['x' => '31/12/2012'], ['x' => 'after:31/12/2000']);
$this->assertTrue($v->fails());

has to be analysed
$v = new Validator($trans, ['x' => '31/12/2000'], ['x' => 'before:31/02/2012']);
$this->assertTrue($v->fails());

has to be analysed

@driesvints i now fixed and tested it using following tests:
$x = new ValidationValidatorTest();
$x->testWeakBeforeAndAfter();
$x->testBeforeAndAfter();
$x->testBeforeAndAfterWithFormat();
$x->testValidateImplicitEachWithAsterisksBeforeAndAfter();
$x->testValidateSometimesImplicitEachWithAsterisksBeforeAndAfter();
$x->testAfterCallbacksAreCalledWithValidatorInstance();

some tests were wrong (=inconsistant with the checks using date_format)
i also fixed them
    /**
     * Compare a given date against another using an operator.
     *
     * @param string $attribute
     * @param mixed $value
     * @param array $parameters
     * @param string $operator
     * @return bool
     */
    protected function compareDates($attribute, $value, $parameters, $operator)
    {
        if (!is_string($value) && !is_numeric($value) && !$value instanceof DateTimeInterface) {
            return false;
        }

        if ($format = $this->getDateFormat($attribute)) {
            return $this->checkDateTimeOrder($format, $value, $parameters[0], $operator);
        }

        if (!$date = $this->getDateTimestamp($parameters[0])) {

            if (!Arr::has($this->data, $parameters[0])) return false;
            $date = $this->getDateTimestamp($this->getValue($parameters[0]));
        }

        if ($date === false) return false;

        if (is_null($date)) return true;

        return $this->compare($this->getDateTimestamp($value), $date, $operator);
    }

added
if (!Arr::has($this->data, $parameters[0])) return false;
it checks if even this attribute exists, if not it should be false
if ($date === false) return false;
checks if date could not be converted to a timestamp -> returns false
if (is_null($date)) return true;
checks if second date is null and returns true to skip it
    /**
     * Get the date timestamp.
     *
     * @param mixed $value
     * @return int|false
     */
    protected function getDateTimestamp($value)
    {
        if (is_null($value)) return null;

        $date = $this->getDateTime($value, false);

        return $date ? $date->getTimestamp() : false;
    }

returns false, if conversion failed
    /**
     * Get a DateTime instance from a string with no format.
     *
     * @param string $value
     * @param boolean $value
     * @return \DateTime|null|false
     */
    protected function getDateTime($value, bool $ignoreErrors = true)
    {
        try {
            return $ignoreErrors ? (@Date::parse($value) ?: null) : (Date::parse($value) ?: null);
        } catch (Exception $e) {
            return false;
        }
    }

can be more strict, when date couldn't be converted - and returns also false
corrected tests:
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => null], ['start' => 'before:ends']);
$this->assertTrue($v->passes());

open end should be ok, like using date format
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => null], ['start' => 'before:ends', 'ends' => 'nullable']);
$this->assertTrue($v->passes());

$v = new Validator($trans, ['foo' => '2012-01-15 11:00', 'bar' => null], ['foo' => 'before_or_equal:bar']);
$this->assertTrue($v->passes());

$v = new Validator($trans, ['foo' => '2012-01-15 11:00', 'bar' => null], ['foo' => 'before_or_equal:bar', 'bar' => 'nullable']);
$this->assertTrue($v->passes());

could you evaluate it with your team? fixing this bug is really important to me

@driesvints
in addition maybe following change will be needed:
        if (!$date = $this->getDateTimestamp($parameters[0])) {
            $date = $this->getDateTimestamp(
                Arr::has($this->data, $parameters[0]) ? $this->getValue($parameters[0]) : false
            );
        }

so the end (second date) doesn't need to be in the request

@driesvints should be dates in this asserts '2012-12-31' and not '31/12/2012'?

@danielpdm please just pr something if you want.


Geometry byte string must be little endian

What steps will reproduce the problem?
$query->where ( "ST_Distance_Sphere(:point, `point`) < 1000", [
	'point' => new Expression ( "geomfromtext('POINT(103 1.3)') "),
] );

What is the expected result?
shoud no error. I run the sql command in phpmyadmin, no error.
What do you get instead?
SQLSTATE[HY000]: General error: 3055 Geometry byte string must be little endian.
The SQL being executed was: SELECT COUNT(*) FROM node WHERE  (ST_Distance_Sphere(geomfromtext('POINT(103 1.3)') , point) < 1000)
Error Info: Array
(
[0] => HY000
[1] => 3055
[2] => Geometry byte string must be little endian.
)
Additional info
I run the code using createCommand, no error.
$command = Yii::$app->getDb()->createCommand($query->createCommand()->rawSql);
$result = $command->queryAll();

Q
A

Yii version
2.0.?

PHP version
v7.3.4

Operating system
debian 10

What is the type of the point column?
Does it work with ST_GeomFromText?

What is the type of the point column?
Does it work with ST_GeomFromText?

the type is point.
I have change the query , now works fine. but not secure.
$query->andWhere ( "ST_Distance_Sphere(point($lng,$lat), `point`) < :radius",[
	'radius'=>$this->radius
]);

What is the type of the point column?
Does it work with ST_GeomFromText?

the rawsql yii2 claims have problem, runs ok if directly in mysql console.

Something happens in bindValue with PDO.

Looked at this again.
I think this is from Expressions being treated as strings when in params.
e.g.
(new \yii\db\Query)
  ->from('my_table')
  ->where('NOW() = :now', [':now' => new yii\db\Expression('NOW()')])
  ->scalar());

Will actually execute as on MySQL (with quotes)
SELECT * FROM `my_table` WHERE NOW() = 'NOW()'

The DB query log on the debug toolbar causes a bit of confusion as it reports the query as (without quotes)
SELECT * FROM `my_table` WHERE NOW() = NOW()

Should Expressions in params be treated differently?
Two options I can think of,
Use strtr on Expressions in params to replace placeholders or update Command::getRawSql() so expressions are quoted for consistency.

Should Expressions in params be treated differently?

Well, actually no. It accepts parameters as a second argument already.

Ok, I think Command::getRawSql() should quote expressions in params as it'll cause confusion as is.

Yes. Would be good. Would you please pull request it?


[Feature Request] PEP 604 Support

Hi @leycec , thanks for a great library!
Upon discovered of this decorator, I thought I'd give beartype a run in my codebase -- I am a heavy user of dataclasses. And, of course, a heavy user of runtime-checks!
After the proof-of-concept work, everything still works. But I did notice:

the from future import __annotations__ had to be removed (I'm a 3.9 user). Is this required by your users?
the initial performance was poorer -- I'd continue to move the handcrafted runtime checks into Is[]. I'd report back later on this.

...thanks for a great library!

Oh, you're most welcome. Let's make it even greater, everyone! :hugs:

everything still works

This calls for celebratory gunpowder-filled explosives. :fireworks: :boom: :fireworks:

the from future import __annotations__ had to be removed (I'm a 3.9 user).

Yikes. That's unexpected. beartype explicitly supports PEP 563 in all its hideous glory and shame. In fact, we pride ourselves on fielding the best, fastest, and most robust PEP 563 resolver – unlike our more popular forebears who shall remain nameless because they're really super nice. cough pydantic cough
Did something specifically blow up on you? If so, we'll fix that post-haste. Hit me repeatedly with your best traceback and I'll push out a new stable release resolving that for everyone within four picoyears ± twelve nanodays.

the initial performance was poorer

Yup. That's expected, sadly. I know, right? PEP 563: the busted standard that was so busted it had to be forcefully removed from Python 3.10 by jackhammers at dawn before anyone noticed.
Both PEP 563 and PEP 569, PEP 563's possible replacement substantially reduce performance. If Python's Steering Committee ever forces a future version of Python to unconditionally enable either of these PEPs, both beartype and all other runtime type checkers will become much, much slower – possibly prohibitively slower.
If this concerns you, please consider posting to the official python-dev mailing list. :disappointed:

Well, latest news is that the Steering Council has deferred accepting either of those PEPs, and are requesting more input from all stakeholders.

</phew>
Feels like this is PEP Bullet Hell and we're still at the first Ikaruga boss. These PEPs will rise from the grave like shambolic standard zombies. When they do, @beartype will be there with a fistful of timings and an unruly mob waving incoherent placards.
If only Cisco Systems would publicly release their runtime type-checking profiling suite. Apparently, @beartype is faster than Cythonized pydantic by two orders of magnitude. How is this possible!?!?

Hi @leycec , let me try work out a minimal example.

Hi @leycec , I remember now; please see this repo.

Wow. Thanks a Canadian-standard metric ton for beartype-annotations, Derek. Yet again, you're absolutely right; that's shameful badness on beartype's part and make no mistake. :sweat:
Well, This Is Awkward
I'm actually kinda shocked that int | None is valid Python. I mean, int | type(None), sure – because type(None) is a type. None isn't. That would be like allowing int | 0x42, you know? But Python clearly wants None to be transparently usable as a type in type unions, even if that doesn't really make semantic or syntactic sense and violates everything good and sane left in the multiverse.
At least Python internally reduces int | None to int | type(None) at runtime:
>>> (int | type(None)).__args__
(int, NoneType)

Very well, Guido: you win this round.
That must be yet another inscrutable small-font footnote embedded at the end of PEP 604 where they knew no one would look. When you're speed-reading these things with one eye while grinding demon fusions in Persona 5 Royal with the other, you're bound to royally screw up both. So much "Urgh!"
We May not Be Able to Fix This
uhoh. You may have discovered a critical bug in Python itself. I can trivially confirm that eval('int | None') behaves as expected. This can only mean that from __future__ import annotations (i.e., PEP 563) is erroneously stringifying int | None into int | NoneType. Since NoneType doesn't actually exist anywhere, eval('int | NoneType') raises the exception you're seeing.
In other words, we may need to escalate this to the Python bug tracker. </gulp>

Oh, oh, oh. I finally exhausted five spare brain cells (which now seem to be comatose) on this. Phew! Hope I didn't need those cells. On the bright side, Python ain't broke. On the dark side, both of us are:

foo | bar only works under Python ≥ 3.10. Python 3.9 is right out. That explains why this failed hard for you: "I'm a 3.9 user." ←problem statement
foo | bar still doesn't work under Python ≥ 3.10 with beartype 0.9.1. ←problem statement

We foolishly speedread "PEP 604 -- Allow writing union types as X | Y" to mean that:
foo | bar is typing.Union[foo, bar]

In fact, PEP 484 unions (e.g., typing.Union[...]) and PEP 604 unions (e.g., foo | bar) hate each other's standardized guts and are pretending the other guy no longer exists. Yes, PEP 484 and 604 unions are ghosting each another. What is this – Tinder all over again!?!?
Of course, this is insane. In a sane world, PEP 484 and 604 unions would have been implemented in terms of the same underlying primitives. This is not that world. We're on the bad timeline, guys. We now need to explicitly support both PEP 484 and 604 unions as totally distinct things that absolutely have no semantic or syntactic relation to one another. </facepalm>
Our upcoming beartype 0.10.0 release will explicitly support New Wave PEP 604 unions. Until then, please continue using Ye Ol' PEP 484 unions. The collective sadness of humanity grows by the day.

This is a sad world indeed. But somewhere someone told me we're working in the

lawless world of dynamically-typed Python

and it wouldn't be lawless without some lawlessness, right?
Damn, these unions are crazy. Can't wait for the new release - thanks @leycec !

Yo, homie! Crazy union supported just dropped. Now you too can leverage the dark power of the | operator to satisfy all your succinct typing needs. Wow coworkers! Wow the wifey! Wow even that twenty-year stray cat with mange you took in against your University roommate's wishes. You showed him, didn't you? Now, show everyone else.
All this and more is coming up in... beartype 0.10.0. Activate the thunderbolts and lightning, Zeus. :cloud_with_lightning:

@leycec すごい!
The codebase is going to be so happy for this. Really, amazing stuff!

でしょうね！
...heh. I just love sounding like a polite Japanese housewife. Gotta rock that 東京方言 (Tokyo-ben; Tokyo dialect) for those nostalgic feels. Oh, boy! All this hiragana got me fired up to repeatedly beat up uncouth Japanese gangsters as Kiryu-chan in 龍が如く極 (Yakuza Kiwami) this weekend.

I feel this way about PEP 640.


Thread 'main' panicked at 'Stash does not have enough balance to bond.'

I want to run local blockchain, but after 5-th point i have this error:
Version: 3.0.0-dev-1cb0290-x86_64-linux-gnu

   0: sp_panic_handler::set::{{closure}}
   1: std::panicking::rust_panic_with_hook
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panicking.rs:628:17
   2: std::panicking::begin_panic::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: std::panicking::begin_panic
   5: std::thread::local::LocalKey<T>::with
   6: sp_state_machine::basic::BasicExternalities::execute_with_storage
   7: <realis_node_runtime::GenesisConfig as sp_runtime::BuildStorage>::assimilate_storage
   8: sp_runtime::BuildStorage::build_storage
   9: <sc_chain_spec::chain_spec::ChainSpec<G,E> as sp_runtime::BuildStorage>::build_storage
  10: sc_service::client::client::Client<B,E,Block,RA>::new
  11: sc_service::builder::new_full_parts
  12: realis_service::new_full
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  14: tokio::park::thread::CachedParkThread::block_on
  15: tokio::runtime::thread_pool::ThreadPool::block_on
  16: tokio::runtime::Runtime::block_on
  17: sc_cli::runner::Runner<C>::run_node_until_exit
  18: node_cli::command::run
  19: realis::main
  20: std::sys_common::backtrace::__rust_begin_short_backtrace
  21: std::rt::lang_start::{{closure}}
  22: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panicking.rs:403:40
      std::panicking::try
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panicking.rs:367:19
      std::panic::catch_unwind
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panic.rs:133:14
      std::rt::lang_start_internal::{{closure}}
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/rt.rs:128:48
      std::panicking::try::do_call
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panicking.rs:403:40
      std::panicking::try
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panicking.rs:367:19
      std::panic::catch_unwind
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/panic.rs:133:14
      std::rt::lang_start_internal
             at /rustc/1af55d19c7a9189374d89472f97dc119659bb67e/library/std/src/rt.rs:128:20
  23: main
  24: __libc_start_main
  25: _start

Thread 'main' panicked at 'Stash does not have enough balance to bond.', /home/user/CLionProjects/Realis.Network-main/frame/staking-pool/src/pallet/mod.rs:536

This is a bug. Please report it at:

        https://github.com/paritytech/substrate/issues/new

What i need to do, to fix this error. Where did the error come from?

Please explain what you did with a bit more detail.
Which tutorial did you follow, which commands did you execute?

Please explain what you did with a bit more detail.
Which tutorial did you follow, which commands did you execute?

Sorry, i forgot to tell my way.
To put it bluntly, I was refactoring a substrate-based blockchain from polkadot-v0.9.9 branch to an updated polkadot-v0.9.13 branch. The main changes were the addition of parachain pallets and the change in pallet staking (it is custom). Then I fixed all the errors and tried to run the blockchain to see if it was successfully or not to add the desired functionality (parachain). But I could not start, because I received the error that I described above.
I follow this tutorial to run blockchain after changes: https://docs.substrate.io/tutorials/v3/private-network/.
 Firstly i tried to use this without any changes, just to run a chain. But i'm using a custom pallet-staking that works earlier with substrate from branch "polkadot-v0.9.9".
At now i can't even generate spec.json file to run a chain with this command:
./target/release/myProjectName build-spec --chain=customSpec.json --raw --disable-default-bootnode > spec.json

Before that i generated a customSpec.json with this command:
./target/release/myProjectName build-spec --disable-default-bootnode --chain local > customSpec.json

I'm facing this same issue

The mentioned version is quite old. did either one of you try this on a more recent version?

I've fixed this now
pallet_balances should come before pallet_staking in the construct_runtime macro

I have the same issue and I do not have pallet_staking in my runtime


Today‘s Power Losses with SG04LP3.yaml for DEYE 8K Hybrid shows high value

Hi David,
are you or anyone else able to explain the value of „Today‘s Power Losses“ to me? I think this value is not calculated the right way maybe?
My configuration:
Deye 8K Hybrid SG04 LP3-EU
Inverter_definition file: (unedited orriginal file from release v24.07.24):
deye_sg04lp3.yaml
Result:

(These values are from 0:00 until 8:00 o‘clock)
Thanx again for your help!
Joe

I guess it should be 0,4 right?
Here is mine:

Yes sure, here we go:

Gosh If that would be right I would feel so sorry for u, lol!
Guess I'm gonna need Also the other values from the equation used...
My thoughts are that it's a scaling issue but if you used the same file (or copy pasted sensors even without changes) it's weird cause I'm using it too!

Ah! forget everything! I know where is the issue! You proly have a version where is a typo!
Try find in that definition file: "soperator"
HAHA!

That was a quick fix 😄
I corrected the typo in:
deye_sg04lp3.yaml
From: soperator
To: operator
Result after fix:

Well done David!
I think it will be fixed permanently with your next release right?
Keep going ☀

Yes it's already committed and also as part of pre-releases I think. ;)

Leave this Issue open for some time for maybe other which could experience the same thing. ;)


lpcxpresso55s16 SPI hardware chip select not working

Describe the bug
When sending SPI data via spi_transceive_dt() the data is send on MOSI pin with matching clock but CS pin (HS_SPI_SSEL1) does not switch to low. Therefor communication does not work. Was checked by logic analyser.
To Reproduce
Any HS_SPI project should do (on lpcxpresso55s16)
Expected behavior
Should stransmit data by setting MOSI, CLK and CS lines.
Impact
Showstopper but can but workarounded
Environment (please complete the following information):
OS: Ubuntu Linux LTS 20.04, Docker container with Linux
Toolchain: Zephyr SDK
Zephyr version: 2.7
Additional context
May be cause by LPC55xx having multiple SSEL pins. Did not look into it that deep though. DMA is used by the driver and this may not work well with setting the SSEL target (usually by writing to FIFOWR register which also gets the data)
Workaround
Changing the pin setting in zephyr/boards/arm/lpcxpresso55s16/pinmux.c to GPIO and adding this GPIO as CS pin to the board overlay causes the driver to use the zephyr SPI software chip select. This works well (also checked by analyser).

Please edit the template text in this issue to provide more information than just the title.
E.g. how did you reproduce this? How did you conclude it isn't working, etc.

Sorry, I did add text and am unsure why it / I switched back to the default description. Will edit soon.

Done. Have not found an easy to use example but will build a main() code to test if needed.

@metratec-mkoehler are you observing this problem on the lpcxpresso55s16 EVK board? I run the tests/drivers/spi/spi_loopback where I had to modify the lpc55s16 project file to disable CONFIG_SPI_ASYNC to get the test to complete. With that setup I observe the CS working.

Closed due to no response from @metratec-mkoehler. Please reopen if you have additional information


MissingInputError when Bidirectional LSTM with dropout

Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or join the Keras Slack channel and ask there instead of filing a GitHub issue.
Thank you!

[x] Check that you are up-to-date with the master branch of Keras. You can update with:
pip install git+git://github.com/fchollet/keras.git --upgrade --no-deps

[x] If running on Theano, check that you are up-to-date with the master branch of Theano. You can update with:
pip install git+git://github.com/Theano/Theano.git --upgrade --no-deps

[x] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).

from keras.layers.wrappers import Bidirectional
from keras.layers import LSTM, Dense, Input
from keras.models import Model
import numpy as np
data=np.random.rand(1,5,10)
label=np.asarray([[1,0,0]])

inp = Input(shape=data.shape[1:])
x = Bidirectional(LSTM(units=32,recurrent_dropout=0.5))(inp)
x = Dense(3,activation='softmax')(x)
model = Model(input=inp, output=x)
model.compile(loss='binary_crossentropy',
              optimizer='adam',
              metrics=['accuracy'])
model.fit(data, label, epochs=1)

Above code gives the following error, If I remove recurrent_dropout=0.5 it trains without error:
MissingInputError: Input 0 of the graph (indices start from 0), used to compute if{}(keras_learning_phase, Elemwise{true_div,no_inplace}.0, Reshape{2}.0), was not provided and not given a value. Use the Theano flag exception_verbosity='high', for more information on this error.

Backtrace when that variable is created:

  File "<ipython-input-1-aa27b7e1da0a>", line 1, in <module>
    runfile('/home/bozkurt.a/DEJ/train_lstm_seq.py', wdir='/home/bozkurt.a/DEJ')
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 866, in runfile
    execfile(filename, namespace)
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/spyder/utils/site/sitecustomize.py", line 94, in execfile
    builtins.execfile(filename, *where)
  File "/home/bozkurt.a/DEJ/train_lstm_seq.py", line 11, in <module>
    from keras.models import Model
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/__init__.py", line 3, in <module>
    from . import activations
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/activations.py", line 3, in <module>
    from . import backend as K
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/__init__.py", line 61, in <module>
    from .theano_backend import *
  File "/home/bozkurt.a/miniconda2/lib/python2.7/site-packages/Keras-2.0.2-py2.7.egg/keras/backend/theano_backend.py", line 28, in <module>
    _LEARNING_PHASE = T.scalar(dtype='uint8', name='keras_learning_phase')  # 0 = test, 1 = train

Seems like wrapper is not taking good care of learning phase.
Dirty workaround:
K.set_learning_phase(1)
model.fit(data, label, epochs=1)

I have the same problem in Python 3 with a Bidrectional LSTM and recurrent_dropout.

@iskandr Fixed in #5985. Please update to Keras master branch.


Fix Python 3 compatibility on error

This fixes a "TypeError: write() argument must eb str, not bytes" when
the compilation command fails.
(discovered this when trying to invoke hererocks on Windows which failed due to missing GCC)

Thanks! By the way Windows is not yet supported completely, I should mention that in the docs.

Yes, I am working on it now. The changes are not that evasive, but right now luarocks removes the prefix, so I guess I have to patch the Luarocks installer script.


Update to latest nightly [request]

The current version of Rust being used, rustc 1.22.0-dev (b1cfd1750 2017-09-21, has a bug that prevents crates from being compiled if they're generating dynamic documentation with macros. (Report here, fix here.) I (selfishly) need nightly in order to be able to compile my crate. I can confirm it works on my local machine using nightly, but not using stable.
Build log from docs.rs here, offending code here.

Hi, after I lost my OSX machine building rustc became a serious problem, I am still looking for a replacement I'll try my best to update rustc as soon as possible.

This is currently affecting pleco and pleco_engine as well due to the use of NonNull.

@steveklabnik docs.rs has been broken for over a month, any chance that the rust docs team / infrastructure teams can help @onur here somehow ? docs.rs is an important part of the docs ecosystem.

@gnzlbg @onur is actively trying to update it, there appears to be some problems. Look here https://github.com/onur/rust/pull/6

Would be awesome to upstream onur's rust/rustdoc patches so that this problem didn't have to exist.

I'd like to give you an update.
I managed to successfully build rustc for every platform docs.rs supports, but theme picker in the recent rustdoc is not compatible with docs.rs' css/js cache and actually did break entire UI. I'll try to fix or disable theme picker.

@GuillaumeGomez can we make theme picker a bit more sane? Docs.rs is re-naming every common css and js file (main.css, main.js, rustdoc.css etc.) to serve them once instead of serving same copy over and over again for each crate documentation. Therefore dark.css and main.css is becoming: http://docs.rs/dark-{RUSTC_VERSION}.css in docs.rs. But unfortunately switchTheme in storage.js is not compatible with this model and only works with filenames like main.css and dark.css.

That'll require a new option to rustdoc but here what I propose:
Providing an option to replace an existing theme by yours so you'll be able to rename a theme.
What do you think about it?

@GuillaumeGomez I prefer a single theme.css file with both dark and light color schemes and a basic javascript to change class of main element.
Imagine you have a themes.css with:
body.dark-theme {
   background-color: #000;
}
body.light-theme {
   background-color: #fff;
}

And your javascript file can change class attribute of body to set desired theme. With this way docs.rs can move/rename/reuse every css/js file.
I don't think your idea will work on docs.rs, it seems user has to choose and replace theme, not docs.rs.

I don't think this is a good idea. It'd make the CSS content much bigger or would greatly increase the javascript runtime load. Also, having all themes in a single file would make the add of new themes very difficult to both do and test (the themes tests just got merged and I don't really want to have to update it to take such a specific rule into account).


Change to startup process to make health checking easier

Before the Document Layer binds to its listening address, it reads data from its backing FoundationDB cluster. This may present problems with health checking. Depending on how the organization's is using health checks, they may want to have health checks that succeed even if downstream dependencies are failing. For instance, if a FoundationDB database goes unavailable, the operators may not want the Document Layer instances to report as unhealthy, because that could cause a cascading series of failures. It may be preferable to have the Document Layer instances continue to receive traffic, so they can report more helpful error messages to their upstream clients.
Could we restructure this flow so that the Document Layer instances open their listening connection before reading from their FoundationDB cluster?

@apkar Please assign this ticket to me


[MRG] A small bug in docsting example of lobpcg.py

Updating lobpcg docsting example and comments to underscore that components of the initial vectors better be on both sides of zero, rather than uniformly distributed on the interval [0, 1]
Reference issue
N/A, but see related #15152
What does this implement/fix?
Changes the components of the initial vectors in the docstring example from uniformly distributed on the interval [0, 1] to normal around zero, and updates the comment accordingly.
Additional information
A trivial but important change not requiring unit tests.
Common sense suggest that vectors with only positive components cover the positive quadrant only, not the whole vector space, are not so good to approximate eigenvectors. All examples in the original MATLAB/Octave code, written for the 2001 paper, https://github.com/lobpcg/blopex/blob/master/blopex_tools/matlab/lobpcg/lobpcg.m use randn, e.g., line 97.

The failure appears unrelated to this PR, so ready for review/merge. Could someone please have a look?


Question in Metrics

https://github.com/YingtongDou/CARE-GNN/blob/411f726169cdef10da6306bc41b2aa2382aaeaa0/utils.py#L198-L211
Hey, may I know why the code outputs "GNN AUC" and "Label" in test phase? Which one is used in Table 3?

The GNN results are used in Table 3. The Label represents the classification results solely based on the label predictor.


strange behavior with PathValid

Hi @pirix-gh
First I'm glad to see you finally released v3!
I have the following problem: (using v3)
import { Object, Any, Union } from 'ts-toolbelt';

export function getProp<O extends object, P extends Array<string | number>>(
  obj: Union.Nullable<O>,
  ...keys: Any.Cast<P, Object.PathValid<O, P>>
): Object.Path<O, P> | undefined {
  return keys.reduce(
    (result: any, key: string | number | symbol) => (result === null || result === undefined ? undefined : result[key]),
    obj,
  );
}

interface IInterface {
  a: {
    b: string[];
  };
}

type elem = IInterface['a']['b'][1]; // string
const a: IInterface = undefined as any;
const res = getProp(a, 'a', 'b'); // string[] | undefined
const res = getProp(a, 'a', 'b', 0); // TS2345: Argument of type '0' is not assignable to parameter of type 'never'.

Any thoughts?

Hi @regevbr, glad to see you again!
I see that the curse of the PathValid is still following us.
My bad, I was casting the type parameter O by doing O & [] instead of O & {}.
It's been fixed!

@pirix-gh thanks it is working now!


Bug: Google Cloud CLI install of 503.0.0 requires python 3.12 dependency check on Ubuntu 24.04

Google Cloud CLI 503.0.0 fails to install because of missing dependency on Ubuntu 24.04:
The following packages have unmet dependencies:
 google-cloud-cli : Depends: python3 (< 3.12) but 3.12.3-0ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

Please see: https://issuetracker.google.com/issues/383568269

The Google Cloud CLI requires Python 3.8 to 3.13.

Source: https://cloud.google.com/sdk/docs/install#linux
With pull https://github.com/Cyclenerd/cloud-tools-container/pull/21 Python 3.12 from Ubuntu 24.04 is used.


Investigate higher gas usage of PQ operations after changing python testing framework

Having switched from py-ethereum to ganache evm backend, the operations on PQ are significantly more expensive.
We should probably manually check the cost on some other backends.

Lines to be investigated:
https://github.com/omisego/plasma-contracts/blob/1a7719607985ee60e9cfc6949b04a30192baae1c/tests/contracts/root_chain/test_process_exits.py#L253
https://github.com/omisego/plasma-contracts/blob/1a7719607985ee60e9cfc6949b04a30192baae1c/tests/contracts/root_chain/test_process_exits.py#L233
https://github.com/omisego/plasma-contracts/blob/1a7719607985ee60e9cfc6949b04a30192baae1c/tests/contracts/priority_queue/test_priority_queue.py#L108


do not support https url?

[CURL-EASY][UNSUPPORTED_PROTOCOL] Unsupported protocol (1)

This is all depends on how libcurl (not Lua-cURL) was build.
So try rebuild libcurl with supporting secure connections.

thanks, add ssl and re-compile the normal


Mention how Control focus loss affects Viewport.gui_focus_change

resolve #88770

Very, very minor nitpick: the commit could use a more specific name

Thanks!


Extension no longer works for Carbon for IBM Products after package name change

Detailed description
The Carbon for IBM Products component library had a package name change which included a prefix change as well. These changes prevented the Carbon devtools extensions to stop working for our component library.

What did you expect to happen?

That the Carbon devtools extension would identify Carbon for IBM Products components in the component list.

What happened instead?

Our components are no longer listed.

What would you like to see changed?

Our package name needs to be updates, which will fix the issue.

What version of the Carbon Design System or IBM.com Library are you using?

Current
Steps to reproduce the issue

For example, visit https://carbon-for-ibm-products.netlify.app/?path=/story/carbon-for-ibm-products-patterns-create-flows-createtearsheet--multi-step-tearsheet
Open Carbon devtools, notice how the CreateTearsheet component is not listed under the Component list

Please create a reduced test case if you can

Additional information

Screenshots or code
Notes

https://github.com/carbon-design-system/devtools/pull/199 address this issue


Support reading Python version from runtime.txt file?

(I'm a newcomer to Python so bear with me!)
Heroku relies on a runtime.txt file to decide which version to pick.
I figured out it would be nice if I could also use pyenv (which I'm just discovering) to pick the same version.
Is there a way (even a solid trick) to make sure pyenv would also read from there?
thanks!

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/32859211-support-reading-runtime-txt?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282009&utm_medium=issues&utm_source=github).

I was mistaken and apparently, it seems that a symlink works perfectly so far. Closing!

This won't work even with a symlink. If you read the heroku page you linked you will notice that the names of the versions of python are different between heroku and pyenv.

pyenv: 2.7.11
heroku: python-2.7.11


FsDialogToolbar.java:26-26: Make the toolbar text true color

The puzzle 9-7c25cd84 in lib/src/main/java/com/nikialeksey/fullscreendialog/FsDialogToolbar.java (lines 26-26) has to be resolved: "Make the toolbar text true color"
The puzzle was created by Alexey Nikitin on 18-Jul-17.
Estimate: 60 minutes, role: IMP.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

The puzzle 9-7c25cd84 has disappeared from the source code, that's why I closed this issue.


Cannot send pictures from the Photo-App on iPhone with german system language

iPhone 8 with iOS 15.5
Sending files via the files app does work; however not via the Photos App. I always get the error, that I do not have the required rights to do so as seen in the attached screenshot

If i tap on the error-message it jumps to the following block inside the shortcut

it's because for some strange reason Apple doesn't allow to take content directly from the photo application. I found a workaround to this, you can see it above, just convert the image or video.
The problem here I guess is that to differentiate the type of content you want to send you have to make textual comparison with the type in input. Since your device is in German there is a good chance that you will have to change the name of the type in the condition.

In french it is "Multimé(dia photo)"  but since in german photo is spelled "Foto".
that's why at each shortcut startup it displays the file type in the language of the device.
I think that replacing "dia photo" by a part of the type name in your language the condition should work
I also noticed a bug when trying to copy text. I fixed the problem and I will commit it in a few minutes, it will have to replace the python file and the shortcut

I will try to add a translation action in a future version but for the moment I don't know if it is really reliable.

You are right, I changed the language of my phone to french and it does work now - thus just changing the condition should work for me. But how do you see the type of a file in iOS? Neither the files nor the photos app provides these information.

When the script runs first you should get an alert notification with the name of the file type in the language of the device.
(URL,Text,Image).

Ahh it's that simple :)
FYI it's "Fotomedien" in german and after changing the condition I can now transfer pictures via Photo-App aswell.

I did skim the rest and changed other instances where it might go wrong on a german iPhone. I'll test ist a couple of days and upload the shortcut then.

Awesome, did you make the changes on the last version of the shortcut?
There was a bug with the text copy, only a part of the text was transmitted.
It was necessary to modify the init.py as well as the shortcut itself.

Unfortuantely not; but I just downloaded the latest version (1.5) and will change it again; will be no hassle since I know what to edit now.
But I struggle at the initial setup now - where exactly do I need to put the SSID of the network? There are two comments directly among each other - it looks like there is a field missing

It's really easy, just put the name of your SSID in the key section, and the IP in the value section.

here is mine for exemple

hmm that's exactly how I did it. I think there is a simple mistake in the current ShareFallServer.bat.
py .\__main__.py" 80 -d .\share -t "token"
Using this bat-file will not start the server - I just see the command prompt for a second and that's it

Oh I can see the problem, there is a "  that shouldn't be here.
Gonna fix that

Yes, it's awesome, thanks a lot for the effort
The following shortcut does the trick for now on my german iPhone: https://www.icloud.com/shortcuts/32b8421080d6413bb2353cb14934215b


Fixed some bugs and added TF sensor

Fixed publishing frequency error, pointcloud coordinate error in ROS and build error,  added TF sensor

Sorry for the delay in confirming.
Thanks for fixing the bug and adding the TF sensor!
I have confirmed that it works. And I will merge it.
(I'm using Google Translate)


Parser

Several constructs need to be correctly parsed and grouped:

[x] Function
[ ] Color
[ ] URL
[x] Number
[x] Identifier
[ ] String
[x] Value with Unit

We close this in favor of smaller issues


Implement changes as discussed

I did quick lookup, everything seems fine. Have you tested this on clean user?

Not yet. Sorry I don't have time to do this.
On Tue, 20 Mar 2018, 22:51 Andrey Orst<EMAIL_ADDRESS>wrote:

I did quick lookup, everything seems fine. Have you tested this on clean
user?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/andreyorst/kde_wallpaper_blur/pull/8#issuecomment-374626481,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFBMl3rABrAm06FGRx53nyDJ_pWktXiuks5tgRdygaJpZM4Sx9r6
.

I'll try it later this day.

I've tested this on clean user, and it seems work fine. Merging. Thank you a lot


Disabled the Sync to Teams button in the SharePoint tenant App Catalog

Select the teams-tab-client-side-solution package in the SharePoint tenant App Catalog and disabled the Sync to Teams button at in the ribbon at the Files tab.
While creating sample Teams tab SPfx 1.10 and also Updated the web part manifest

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

ID: 4521ae6c-2ac6-8898-4731-0a5a50349d76
Version Independent ID: 49edacf9-9538-079b-24ab-3ce17017ba77
Content: Building Microsoft Teams tab using SharePoint Framework - Tutorial
Content Source: docs/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab.md
Product: sharepoint
Technology: sharepoint-framework
GitHub Login: @spdevdocs
Microsoft Alias: spdevdocs

I've analysed your sppkg file. The file WebPart_1baa6995-0828-4855-8004-51268b2903a4.xml doesn't contain TeamsTab as a supported host. This is the reason why the Sync to Teams button is disabled. The WebPart_1baa6995-0828-4855-8004-51268b2903a4.xml file represents part of your web part's manifest. For some reason your changes to the manifest file didn't get saved! Would you like to give the web part a new chance?

Thanks for your suggestion @JarbasHorst, sure I will try and let you know.

Thanks @JarbasHorst , now it is working you are right manifest file didn't get saved.


Can't install NuGet package

Hi
I'm having troubles installing Masstransit 3.4.1 from NuGet into my .NET 4.5 project. At first I was pussled, so I tried installing a bounch of other, randomly picked, packages and they all worked fine, so I can only conclude that this has something to do with Masstransit or maybe one of it´s dependencies.
Installation log:
PM> Install-Package masstransit -Version 3.4.1 -Verbose -Debug
Attempting to gather dependency information for package 'masstransit.3.4.1' with respect to project 'WebApp', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'masstransit.3.4.1' with DependencyBehavior 'Lowest'
Resolving actions to install package 'masstransit.3.4.1'
Resolved actions to install package 'masstransit.3.4.1'
For adding package 'NewId.2.1.3' to project 'WebApp' that targets 'net45'.
For adding package 'NewId.2.1.3' to project 'WebApp' that targets 'net45'.
Adding package 'NewId.2.1.3' to folder 'C:\work\webapp\webapp\source\packages'
Added package 'NewId.2.1.3' to folder 'C:\work\webapp\webapp\source\packages'
Added reference 'NewId' to project 'WebApp'.
Added package 'NewId.2.1.3' to 'packages.config'
Successfully installed 'NewId 2.1.3' to WebApp
For adding package 'MassTransit.3.4.1' to project 'WebApp' that targets 'net45'.
Install failed. Rolling back...
Could not install package 'MassTransit 3.4.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Anyone?

Upgrading my project to .NET 4.5.2 solved it.


[Enhancement] evaluate gitter.im for a combined slack+irc alternative

Description
Currently, we need multiple accounts to communicate with the community (IRC+slack). Furthermore, Slack has some "flaws" when it comes to open communities. I just had a short look at gitter.im, which seems to offer a nice package as listed below:

clients for win/mac/linux
integration in github
logins without special registration, but github/gitlab/bitbucket
embedable chat for websites
irc bridge

Criteria

evaluate if it may work for us
test if integration options for the below list are exiting

notify github events (new ticket, pull request)
notify for twitter messages
notify for ghost blog messages
irc bridge to another network

private channels
voice/audio chat
markdown in chat
overall experience

Gitter is out. Instead, I have added matrix channels. In the future, we can also think about a dedicated instance under the while-true-do.io domain.
Channels as below:
space: #whiletruedoio:matrix.org
channel: #whiletruedoio-community:matrix.org
channel: #whiletruedoio-development:matrix.org
channel: #whiletruedoio-infrastructure:matrix.org
channel: #whiletruedoio-random:matrix.org

I will document the same accordingly and remove the slack space afterwards.

channels done and published via .github repository.


Create a .github folder with Issue and PR templates.

https://github.com/ropensci/dotgithubfiles#ropensci-github-files


[Bug] Editor is uninteractive

Reproducible in vscode.dev or in VS Code Desktop?

[X] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

[x] Not reproducible in the monaco editor playground

Monaco Editor Playground Link
Not reproducible in the monaco editor playground, but here is a codeflow link. https://stackblitz.com/~/github.com/caleb1248/monaco-editor-test
Monaco Editor Playground Code
Not reproducible in the monaco editor playground.

Reproduction Steps
main.ts
import * as monaco from 'monaco-editor';
import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
import cssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker';
import htmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker';
import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';

self.MonacoEnvironment = {
  getWorker: function (_moduleId: any, label: string) {
      if (label === 'json') {
          return new jsonWorker();
      }
      if (label === 'css' || label === 'scss' || label === 'less') {
          return new cssWorker();
      }
      if (label === 'html' || label === 'handlebars' || label === 'razor') {
          return new htmlWorker();
      }
      if (label === 'typescript' || label === 'javascript') {
          return new tsWorker();
      }
      return new editorWorker();
  }
};

const editorDiv = document.body.appendChild(document.createElement('div'));

const model = monaco.editor.createModel(
  'console.log("hello world")',
  undefined,
  monaco.Uri.parse('file://code/index.ts')
);
const editor = monaco.editor.create(editorDiv, {
  language: 'typescript',
  theme: 'vs-dark',
  automaticLayout: true
});
editor.setModel(model);

index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <style>
      html,
      body,
      div {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
      }
    </style>
    <title>Vite + TS</title>
  </head>
  <body>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>

I am using vite + typescript.
Actual (Problematic) Behavior
The editor is uninteractive - the cursor stays as the normal cursor, clicking has no effect, and I can't type anything.
Expected Behavior
I would expect the editor to be interactive.
Additional Context
There are no messages or errors in the console.

The problem was that the div style applied to all divs, which was interfering with another monaco-editor placed div. I changed it to affect only the editor div and it fixed.
index.html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <style>
      html,
      body,
      div#editor {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
      }
    </style>
    <title>Vite + TS</title>
  </head>

  <body>
    <script type="module" src="/src/main.ts"></script>
  </body>
</html>


Removed Cloud Shell reference

Removed Cloud Shell reference since this article doesn't have any PS commands and is referencing the Portal experience.

cc: @msmbaldwin
GitHub Issue: https://github.com/MicrosoftDocs/azure-docs/issues/88030

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

#label:"aq-pr-triaged"

#sign-off


ServerBusyOrOfflineException every 10 Minutes

Expected Behavior
Bot runs uninterrupted.
Actual Behavior
After 10 minutes (almost on the dot):
Server seems to be busy or offline - try again - 1/5
Server seems to be busy or offline - try again - 2/5
Server seems to be busy or offline - try again - 3/5
Server seems to be busy or offline - try again - 4/5
Server seems to be busy or offline - try again - 5/5
Trackback (most recent call last):
File "D:\Github\PokemonGo-Bot\pokecli.py", line 490, in
File "D:\Github\PokemonGo-Bot\pokecli.py", line 81, in main
File "D:\Github\PokemonGo-Bot\pokecli.py", line 89, in report_summary
File "D:\Github\PokemonGo-Bot\pokemongo_bot\metrics.py, line 75, in capture_stats
File "D:\Github\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 74, in call
pgoapi.exceptions.ServerBusyOrOfflineException
Steps to Reproduce
Running pokecli.py with login info and default config. Pokemon are captured and forts are spun within the 10 minute period, but is disconnected afterwards.
Other Information
OS: Windows 10
Git Commit: (562959056d966e92de394955a703fec5e4fee80d)

I'm actually seeing it every 8minutes 45 seconds +/- 3 seconds.
I setup the run.sh to track the run time, restart after a 5 minute wait and count the iterations through the loop. Sitting here watching the output while doing other random crap it's been 8min 45sec for the disconnect with minor timing slides....

It's odd how consistent the disconnects are. I'd expect them to much more scattered were it an actual problem with the servers.

I've been screwing about with the configs for the past few hours thinking it was something I had setup/tweaked wrong.... Nothing I'm doing in the configs seems to make a difference. And I don't think it's a memory issue... python never exceeds 100mb of RAM, I have 128gb in the system... Something is breaking, but the details are a little thin as to where to poke....

Yeah same here. Pretty damn annoying.  I usually make it 15 minutes.  I need to write a script that just restarts it every 14 minutes.

Confirmed!
I guess the issue is making too much API calls

I'm currently set to a 5 minimum, 12 max delay and I'm getting the same "timeout" as I was at the defaults of 1 and 4.... Not sure if it's "too many API calls"...

@raxxon
That 5,12 is a misleading set. It only affects capture/release stuff. :D

Well that's kinda odd... I'm watching the timestamps and all actions are at those time limits... I know it's going to make a few more calls that aren't getting events logged, but if it's just making a chain series of requests without a timer control then what's the point of having the delays for capture/release?

The master does not have this problem.  My dev was crashing so often but the master is rock solid.

i have problem same too...

This commit from 2 days ago does not have the issue and is rock solid 50716223fece99832b11d643f0347fe6eec52655.  I'm trying to narrow down the exact commit this started for me.  It is within four commits past this one for sure.

but after branch dev update branch master same issue too, and always server busy,
i try to change vps or ip public and gmail account but same too

I cant even get initial login to work, https://github.com/PokemonGoF/PokemonGo-Bot/commit/50716223fece99832b11d643f0347fe6eec52655 dosnt work either

commit 50716223fece99832b11d643f0347fe6eec52655 doesnt have the bug,  then commit after that one 2805cb75be3d30de272095675316f1bf9138b639 has it and every commit since

I don't have this issue on the latest dev.

whats your id.? ptc or google.?
On Jul 31, 2016 16:08, "Steffan Long"<EMAIL_ADDRESS>wrote:

I don't have this issue on the latest dev.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/PokemonGoF/PokemonGo-Bot/issues/2009#issuecomment-236419445,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATrzCiG1xXPkOGU2JJWOqq5jzmO3L1-oks5qbGX0gaJpZM4JY9oP
.

Mine is a google login with the bug.  I have not tried with a ptc login yet.

Mine's google as well....

5071622 does not work for me.

Yeah, I'm also using google.
Also, currently using bdaddec9ee64691e5b0a8bda55bf76f83442232f

Just tried latest dev with a PTC login and same crash after 9 mins 45 seconds.
[02:50:03]  50 xp
[02:50:04]  - 3x Pokeball (Total: 82)
[02:50:04] PokeStop on cooldown. Time left: 5 minutes, 2 seconds
[02:50:06] Moving towards fort Pier 39 Mural, 0.04km left
[02:50:11] Walking from (37.80854248124627, -122.41007007104047) to [37.810317000000005, -122.410119] 0.20km
[02:50:27]  Server seems to be busy or offline - try again - 1/5
[02:50:28]  Server seems to be busy or offline - try again - 2/5
[02:50:29]  Server seems to be busy or offline - try again - 3/5
[02:50:30]  Server seems to be busy or offline - try again - 4/5
[02:50:31]  Server seems to be busy or offline - try again - 5/5
[02:50:31]  Server seems to be busy or offline - try again - 1/5
[02:50:32]  Server seems to be busy or offline - try again - 2/5
[02:50:33]  Server seems to be busy or offline - try again - 3/5
[02:50:34]  Server seems to be busy or offline - try again - 4/5
[02:50:35]  Server seems to be busy or offline - try again - 5/5
Traceback (most recent call last):
File "pokecli.py", line 494, in
File "pokecli.py", line 81, in main
File "pokecli.py", line 89, in report_summary
File "C:\PokemonGo-Bot\pokemongo_bot\metrics.py", line 75, in capture_stats
File "C:\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 74, in call
pgoapi.exceptions.ServerBusyOrOfflineException

I went with a little more detail in my run.sh....
loops=0 while true do   SECONDS=0   python pokecli.py --config ${config}   ((loops++))   echo -e   echo -e "We seeem to have crashed, removing webcache location, sleeping 3 minutes and restarting...."   echo -e "Loop Iterations: " $loops   duration=$SECONDS   echo -e "Runtime was $(($duration / 60)) minutes and $(($duration % 60)) seconds"   echo -e   rm web/location*.json   sleep 180 done

Thanks for this, Raxxon. I'll probably use this w/ cygwin until there's a proper fix.

trying to do some digging... The error points to this chunk from pgoapi.py:
if try_cnt >= max_retry:
raise ServerBusyOrOfflineException()
I follow that back and as far as I can tell, it just generates the error message that is displayed in the log/console. After it reaches 5 times in that loop it breaks hard and dies. Commenting out the 2 lines so that it doesn't trip still ultimately causes a failure, it just doesn't break hard after 5 tries....
[06:18:47]  Server seems to be busy or offline - try again - 206/5
[06:18:47]  Server seems to be busy or offline - try again - 207/5
[06:18:49]  Server seems to be busy or offline - try again - 208/5
[06:18:50]  Server seems to be busy or offline - try again - 209/5

Perhaps this is true? https://github.com/PokemonGoF/PokemonGo-Bot/issues/2027#issuecomment-236422398

I'm not having problems logging in, just in staying connected with the bot. I can play from my ipad on the same internet connection and it has no problems with me being online for an hour or more (except that the GPS appears to be shit on the ipad).

I have the same problem, a solution is avaible please ?
[15:46:04]  Server seems to be busy or offline - try again - 4/5
[15:46:05]  Server seems to be busy or offline - try again - 5/5
[15:46:05]  Server seems to be busy or offline - try again - 1/5
[15:46:07]  Server seems to be busy or offline - try again - 2/5
[15:46:08]  Server seems to be busy or offline - try again - 3/5
[15:46:09]  Server seems to be busy or offline - try again - 4/5
[15:46:10]  Server seems to be busy or offline - try again - 5/5
[15:46:10]  Server seems to be busy or offline - try again - 1/5
[15:46:11]  Server seems to be busy or offline - try again - 2/5
[15:46:12]  Server seems to be busy or offline - try again - 3/5
[15:46:13]  Server seems to be busy or offline - try again - 4/5
[15:46:14]  Server seems to be busy or offline - try again - 5/5
Traceback (most recent call last):
File "./pokecli.py", line 494, in
File "./pokecli.py", line 81, in main
File "./pokecli.py", line 89, in report_summary
File "C:\Users\Melina\Documents\pokemon\dev\PokemonGo-Bot\pokemongo_bot\metrics.py", line 75, in capture_stats
File "C:\Users\Melina\Documents\pokemon\dev\PokemonGo-Bot\pokemongo_bot\api_wrapper.py", line 74, in call
pgoapi.exceptions.ServerBusyOrOfflineException

My guess is that they have banned all IP addresses from amazon, azure etc.

the bot turn on my computer.

https://github.com/PokemonGoF/PokemonGo-Bot/issues/1654

An observation: the bot tends to encounter this problem when it arrives at a pokestop it already visited, in other words, walking in a circle.

Not in my case. The path I have has the bot in an area where there are no pokestops when it crashes. When I let the bot "free roam" it was usually just meandering across a highway or something when it crashed.

Thanks metheos for the reply , my issue is resolved. I edited the file src\pgoapi\pgoapi/rpc_api.py.
https://github.com/tejado/pgoapi/commit/e6db98b9a931731a9f449365a31dc1a9b794f5a0
Thanks too @douglascamata for answer at my problem.

Testing to see if it addresses issue for me....

Been running for longer than 20 minutes now, previously it was less than 10. Appears to have addressed issue for me.

server busy for me

also testing if this fixes the issue for me

Have been running it without any problem now

Editing the file src\pgoapi\pgoapi/rpc_api.py as described above seemed to have resolved the issue for me as well.

Have this problem too. Fixing src\pgoapi\pgoapi/rpc_api.py didn't help. :(

Did not help editing rpc_api.py

Appears to be fixed in the current state, but most likely you'll need to run an extra command...
git pull
pip install --upgrade -r requirements.txt
That should update the bot (make sure you check your configs as they've been altered several times in the last 24h) and makes sure that the pgoapi is updated.


Allow negative indices in move_child()

Now move_child() will support negative indices, properly taking internal children into account.
Fixes #65575

Thanks!


Move the fileaway-site microsite into the main repository

OpoLua demonstrates that this works pretty well and it seems good to keep everything in one place if possible.

Done.


Combining "largest" and "units" options can cause a unit to be skipped if zero

I'm not entirely sure if this qualifies as a bug, but it wasn't what I expected.
Code:
var humanizeDuration = require("humanize-duration")
humanizeDuration(
  90005000, {
    largest: 3,
    units: ["d", "h", "m", "s"],
  }
)

Result:
"1 day, 1 hour, 5 seconds"

Expected:
"1 day, 1 hour, 0 minutes"

or alternatively
"1 day, 1 hour"

My interpretation of using the "largest" option in this way would be that once days > 0, seconds are no longer displayed. In the context of something like a duration that counts up live, it's somewhat incongruous to see a large number of days alongside a precise number of seconds, but only once an hour.

I've just realised that round does what I want. I should RTFM. Sorry for the noise!

No worries!


Mutation refetchQueries does not set loading to true in useQuery

Following the https://www.howtographql.com guide here, and I decided to spice things up by using hooks. I have the following query for fetching the feed:
export const FEED_QUERY = gql`
  {
    feed {
      links {
        id
        url
        description
        createdAt
        postedBy {
          id
          name
        }
        votes {
          id
          user {
            id
          }
        }
      }
    }
  }
`;

and a simple useQuery which fetches the feed and then displays the data on the homepage:
const { data, error, loading } = useQuery(FEED_QUERY);

then I have the following mutation on a different page which adds a new link to the feed:

  const postMutation = useMutation(POST_MUTATION, {
    variables: { description, url },
    onCompleted: () => history.push("/"),
    refetchQueries: [
      {
        query: FEED_QUERY
      }
    ]
  });

After rerouting to the home page, the old feed is still displayed and after a couple of seconds after the refetch query is complete, the new updated feed is displayed. However for the duration while the refetch query is executing loading remains set to false for useQuery.

This is the same behaviour as in Apollo itself, you need to work with the networkStatus in the returned object, and set notifyOnNetworkStatusChange to true in your hook call. https://www.apollographql.com/docs/react/essentials/queries.html#loading


Out of memory errors from large metadata.json files being parsed during OpenRefine Project Open

Sometimes large strings are being stored in the metadata.json that can reach into the Megabyte and Gigabytes of size.
Issue was found at the following JSON paths (could not provide JSON snippets since it exceeded the memory needed to show in full hierarchy form):

metadata.json > [ ] importOptionMetadata > { } 0 > projectName
metadata.json > [ ] importOptionMetadata > [{ "sheets": [{"name":"xxxxxxxxxxx...1+ gig long string ..." }
metadata.json > [ ] importOptionMetadata > [{ "sheets": [{"name":"DATA AAAAAAAA.xlsx#xxxxx... 500+ meg long string ..." }

To Reproduce
Steps to reproduce the behavior:

First, do ...
Then, ...
Finally, ...

Current Results

Expected Behavior
Project metadata should not be exceedingly large for projectName or sheets name and should probably have a confined limit and some error handling to warn user when this limit is exceeded (sometimes for known reasons, and proactively, for unknown reasons).
Additional Exception handling should also be in place with appropriate logging for users to capture and give us feedback on issues, just in case we miss some serialization issues or POI corner cases, etc. for Project Name writing/reading from metadata.json.
Screenshots

Versions

Operating System: Windows 10
Browser Version: All
JRE or JDK Version: JDK8
OpenRefine: 3.4.1

Datasets
https://drive.google.com/file/d/1l9B-77ixA7mmghSbCUwH9tj3aRLC_ci7/view?usp=sharing
Additional context
https://groups.google.com/g/openrefine/c/GVNKIM8BM1M/m/_5KNHbiSBAAJ

@thadguidry This is the XLSX you asked for:
https://drive.google.com/file/d/1cVMO5X7hdVMG9J6-sjTzq4t3jjmxmTfm/view?usp=sharing

@VojtechDostal
I was able to download the the XLSX file correctly.
Thanks for the info... I wanted to be sure and reproduce the steps exactly on my Windows 10 machine.
Is it possible that some of the older projects, perhaps like that XLSX file... was initially created with an older OpenRefine version?  Quite likely or no?
Reason I ask is because we did have a few bugs that might be closely aligned to affecting something like this.
I imported your XLSX file and didn't see any problem with the metadata... it looks fine to me with the current 3.4.1 handling, and does not have the super long json as your metadata files contain and causing the memory loading issue for you.

@VojtechDostal Can you tell us when you downloaded and actually began using OpenRefine 3.4.1?  That will help eliminate my concerns around the Importers refactoring that our kind @tfmorris did beginning in #2963 where a bunch of bugs were indeed found, fixed, and then landed in 3.4.1 release on 2020-09-24

regarding this screenshot:
https://user-images.githubusercontent.com/986438/102655165-74972000-4137-11eb-8701-86e2596f9718.png
It's interesting that the metadata is still kept from the time when I included non-ASCII characters in descriptions. I then deleted those descriptions with ASCII characters, but it seems you can still retrieve them from the project.

Is it possible that some of the older projects, perhaps like that XLSX file... was initially created with an older OpenRefine version? Quite likely or no?
Can you tell us when you downloaded and actually began using OpenRefine 3.4.1?

Yes, that is quite possible. I only downloaded 3.4.1. a few months ago but I don't remember when precisely. Could have been in November or October. Most likely before 24 September if that helps. My download log in Chrome suggests it might have been on 10 November.

Then that might explain it "I think".
Now the question is HOW to fix all your metadata.json files.  That could probably be done with a cleanup script that would iterate over all of them and then automatically substring cut down to only the first 255 chars of each ones sheets [{ "name"="..." field.
Do you have bash or python skills to handle that script yourself?

This doesn't sound familiar to me. What is the content of the multihundreds of MB (ie where did it come from)? Is it the data content of the original file or ...? Is it always the sheet names that are the offenders? Are they all from XLSX imports?
@thadguidry were you able to reproduce the problem when importing into the current version or is this purely a historical issue? (not to say that that's not a problem too)

@tfmorris It is always the sheet names from XLSX files.  I tried for 4 hours this afternoon to try to reproduce with 3.4.1 and could not using as weird of XLSX files and sheet names with Unicode as I could find.  So likely this is a POI issue now fixed with update, or your refactoring that has now fixed something.  I did try 3.3 to see if I could get really long sheet name in metadata, but again, it seemed to work OK for me.  It's likely some system issue, locale issue, etc. that I couldn't reproduce on my English Windows 10.

Now the question is HOW to fix all your metadata.json files. That could probably be done with a cleanup script that would iterate over all of them and then automatically substring cut down to only the first 255 chars of each ones sheets [{ "name"="..." field.
Do you have bash or python skills to handle that script yourself?

Unfortunately I don't have programming skills. I tried to open one of the larger metadata.json files (about 500 MB) and edit it manually, but I cannot even open it. Running a script might be not only the simplest, but possibly the only option... I am able to run simple commands from the command line, but iterating over a directory tree and replacing some text in these large files is above my level.

Potentially relevant issues / PRs:
#2647 - Jun 2020 - fix character encoding for JSON workspace files
#2597 - Apr 2020 - switch to streaming XLSX import
#2258 - Dec 2019 - Apache POI 4.1.0 -> 4.1.1
#2011 - Apr 2019 - Apache POI 4.0.1 -> 4.1.0  and fixed mismatched POI component versions
#1398 - Dec 2017 - project metadata added
#1029 - Sep 2015 - Apache POI 3.8 -> 3.12
There are 10 projects with large (>2KB) metadata (sizes in MB):
536	./1781864111473.project/metadata.json
478	./1621259914321.project/metadata.json
303	./1865935361423.project/metadata.json
238	./2042959776995.project/metadata.json
76	./2207521617959.project/metadata.json
53	./2193321283605.project/metadata.json
49	./1752256550554.project/metadata.json
47	./1638916963113.project/metadata.json
11	./2335512028683.project/metadata.json

which were created between 2020-03-30 and 2020-09-29:
2020-03-30T20:28:55Z ./2042959776995.project/metadata.json.new
2020-03-30T20:31:09Z ./2335512028683.project/metadata.json.new
2020-03-30T20:31:43Z ./1752256550554.project/metadata.json.new
2020-04-02T15:32:42Z ./2207521617959.project/metadata.json.new
2020-04-02T15:32:42Z ./2207521617959.project/metadata.json.new.new
2020-04-02T15:35:08Z ./1638916963113.project/metadata.json.new
2020-04-02T15:35:08Z ./1638916963113.project/metadata.json.new.new
2020-08-17T17:22:34Z ./1621259914321.project/metadata.json.new
2020-08-30T13:50:54Z ./2193321283605.project/metadata.json.new
2020-09-29T07:02:38Z ./1865935361423.project/metadata.json.new
2020-09-29T07:15:58Z ./1781864111473.project/metadata.json.new

Unfortunately, we don't keep the OpenRefine version in the project metadata. Dates for release are:
v3.4.1 - Sep 2020
v3.3 - Jan 2020
v3.2 - Jul 2019
The most likely explanation would seem to be that either Apache POI or OpenRefine used the entire sheet object instead of just it's name, but a cursory search doesn't turn up an matching bug.
It looks like the files are not to big to process with jq, so this one-liner will take care of most of them (after you make sure that you've got a good backup):
find . -name metadata.json -size +1M -exec sh -c 'jq -c -r "del(.importOptionMetadata[].sheets) | del(.importOptionMetadata[].fileSource)" "$1" > "$1.new"' -- {} \; -print
You can run it from your workspace directory and it will create a new set of metadata files:
1	./2042959776995.project/metadata.json.new
1	./2335512028683.project/metadata.json.new
1	./1621259914321.project/metadata.json.new
1	./1752256550554.project/metadata.json.new
47	./1638916963113.project/metadata.json.new
1	./2193321283605.project/metadata.json.new
1	./1781864111473.project/metadata.json.new
81	./2207521617959.project/metadata.json.new
1	./1865935361423.project/metadata.json.new

Two of the files are smaller, but still much too large. They have 47 MB and 81 MB projectName values. They can be fixed up with
find . -name metadata.json.new -size +1M -exec sh -c 'jq -c -r "del(.importOptionMetadata[].projectName)" "$1" > "$1.new"' -- {} \; -print
which will create *.new.new versions with that field deleted as well.
If, after careful inspection, the new metadata files look correct, you can rename them on top of the old bloated files and delete the originals.
If you don't have jq installed, you can find it here: https://stedolan.github.io/jq/

Since it's not believed to be a bug in the current version and we have a way to fix up the metadata, I've removed the Critical priority from this.

@VojtechDostal If you have trouble with jq on Windows (like I did this afternoon) I can help you get it setup correctly with Windows Terminal and a Profile that includes (commandline "cmd /K doskey jq=E:\Downloads\jq-win64.exe")
or ideally through Git for Windows installed and then just use Git Bash:
$ alias jq='/e/Downloads/jq-win64.exe'

then Tom's one-liner should work.

Thanks so much @tfmorris and @thadguidry . I wasn't able to install jq from Git (not sure why) but I set it up in my Cygwin. The commands worked perfectly using Cygwin and I am now able to open the whole original project directory without problems!  I recommend the solution above to anyone having the same sort of issues.

@VojtechDostal Great!  We'll close this issue out now.
@tfmorris Thanks so much for providing great support on this!

This happened again and I was able to fix it again with this approach. Kudos indeed :)

Looks like this was a real bug after all. Sorry about closing it prematurely!

@tfmorris I could not reproduce if you read much further up but it seems you were able to now? What steps?

I wasn't, but there are multiple reports on #4402.


Go Vendoring Standardization

This PR was mostly autogenerated.
Changes to expect:

removal of *_test.go files in /vendor
addition of non go files in /vendor
addtions to README.md & Makefile

Before your merge!:

Please carefully check the Makefile changes
Ensure that the build is passing
Check that drone is using the proper image (Clever/drone-go:1.5)

Feel free to ping @natebrennand or #golang for clarification or help.
If you'd like more of an explanation please join us in #golang.

LGTM!


Parameters multipartFormData

Hello,
I am trying to send upload image through multipartFormData
I want to send something like this:
{
    'user': {
        'id': 'toto',
        // …
        picture: // the image data
    }
}

How is it possible to handle this format with a multipartFormData object ?
For the moment I have this code which works well but it doesn't have the JSON format above :
multipartFormData.appendBodyPart(data: dataImage, name: "picture")
if let parameters = parameters {
     for (key, value) in parameters {
                    multipartFormData.appendBodyPart(data: value.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!, name :key)
                }
      }
}

Thanks in advance for your help 😬👍

@remirobert You could base64 encode the image data and include that into the JSON. I've seen that used for smaller images.

@tobiasoleary , this is what I have done in the end. uploading images is always painful in the front side. 🍜


Develop

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 1 (0.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 74.545%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

vs_listener/models.py
0
1
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
164

Relevant Lines:
220

💛  - Coveralls


Add MACs to personalise to the output JSON.

Optionally, a TestEvaluator can be provided with an OpsCounter. In this case, the output JSON contains task_macs_to_personalise for each user and task. The notebook (orbit_challenge_getting_started) is updated to show an example of how to save MACs to personalise in the results file.

@microsoft-github-policy-service agree company="Microsoft"

I think we need to make sure the starter task completes without errors before finalizing. This is the error I see whilst running with the current code.
Also, the model checkpoint path no longer matches the model that is downloaded:

Hi @martinpgrayson -- I think I figured out why this error appears. This is an existing error that has only been exposed now by setting the number of tasks per user to 1 in the notebook. The thing being evaluated as nan is the mean of num_context_clips_per_task, which can happen when the list is empty. If the number of tasks per user is 1, it indeed is empty, because in every case we're omitting the last task for each user. This is fixed by moving the following lines before the conditional branching:
num_context_clips_per_task.append(num_context_clips)
num_target_clips_per_task.append(num_target_clips)

This is done correctly in single-step-learner.py and multi-step-learner.py, but not in the notebook! I'll make those fixes as part of this PR.


fix building error

There is an error happened when building with swift 4, I found it caused by type of the variable query is optional, need to unwrap the variable.
building target: MacOS
Xcode: 9.1
swift: 4.0.2

Please PR to the main repo instead https://github.com/httpswift/swifter


Ensure toContain only accepts strings when received is a string

Summary
The following expectations were still passing after #10119:
expect("false").toContain(false);
expect("0").toContain(0n);

This PR ensures only strings will be accepted when received is a string itself in toContain.

Test plan
They pass before that PR:
expect("false").toContain(false);
expect("0").toContain(0n);

They do not pass now.

Thanks 👍


[BUG] Set-PnPListItem doesnt work with batching "Cannot find item with Identity PnP.PowerShell.Commands.Base.PipeBinds.ListItemPipeBind"

When using the -batch parameter with Set-PnPListItem, it fails with the following error:
"Cannot find item with Identity PnP.PowerShell.Commands.Base.PipeBinds.ListItemPipeBind"
For example, this works (no batching):
$targetFolder = "Path/To/Folder"
$batch = New-PnPBatch -Connection $DestinationConnection
ForEach ($folder in $folders) {
$folderUpload = Add-PnPFolder -Name $folder.FileLeafRef -Folder $targetFolder -Connection $DestinationConnection
$metaData = @{
"Created" = $folder.Created_x0020_Date
}
# Set Metadata on folder just created
Set-PnPListItem -List $DestinationLibrary -Identity $folderUpload.ListItemAllFields -Values $metaData -Connection $DestinationConnection
}
Whereas, this does not, just gives error:
$targetFolder = "Path/To/Folder"
$batch = New-PnPBatch -Connection $DestinationConnection
ForEach ($folder in $folders) {
$folderUpload = Add-PnPFolder -Name $folder.FileLeafRef -Folder $targetFolder -Connection $DestinationConnection
$metaData = @{
"Created" = $folder.Created_x0020_Date
}
# Set Metadata on folder just created
Set-PnPListItem -List $DestinationLibrary -Identity $folderUpload.ListItemAllFields -Values $metaData -Batch $batch -Connection $DestinationConnection
}
Invoke-PnPBatch -Batch $batch
I believe this has been the case since batching was introduced, and i have personally experienced it in versions 1.9, 1.11, 1.12 (With PS 5.1), 2.0, and now 2.2 (with PS 7.3.5)
Expected behavior
Items to be batched as per documentation to reduce API calls
Actual behavior
Each time Set-PnPListItem is called, it gives this error:
Set-PnPListItem -List $DestinationLibrary -Identity $folderUp …
|          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot find item with Identity PnP.PowerShell.Commands.Base.PipeBinds.ListItemPipeBind
Set-PnPListItem:
Steps to reproduce behavior
See code above
What is the version of the Cmdlet module you are running?
2.2 but also experienced in older versions as mentioned above
Which operating system/environment are you running PnP PowerShell on?

[x] Windows
[ ] Linux
[ ] MacOS
[ ] Azure Cloud Shell
[ ] Azure Functions
[ ] Other : please specify

Additionally, if you use the item ID along with batching it does work, however, Add-PnPFolder does not return the ID so that complicates the process somewhat. The documentation says that -Identity parameter can accept either ID or the listitem object itself - both work without batching but only ID works when batching is implemented.


Create login page

Motivation and Context
We now have a login screen that connects to the backend!
Your Changes

Created the login page (Login.js)
Added a folder to store images (src/images)
Removed components that are no longer needed (Header.js, Home.js, Layout.js)
Updated App.js to reflect the changes in point 3 - updated routing and made Login.js the home page.

Type of change:

[x] New feature (non-breaking change which adds functionality)

Notes for Reviewer
I suggest you follow the Project Individual Contribution guide when creating your review so this can count towards your 1%!
When connected to the backend branch login-use-case, you should be able to run the following functionalities:
If you press "Login"

without entering a ClientId, the app will display "Please enter client ID."
with an incorrect ClientId, the app will display "User not found."
with a correct ClientId, nothing will happen. I have commented out code that will allow us to redirect to other pages in the future.

Checklist

[x] I have performed a self-review of my own code.

Code Review
✅ Coding style: Appropriately named tests and location of test files.
✅ Correctness (code runs): Runs correctly and returns correct responses when following instructions provided.
X  Comments: Can improve annotations regarding the overall function of JS Files
✅ Clear pull request information: Provides a strong template for future test implementation and is easy to follow/execute code as required.
Comments
Confirm that the front-end runs, and does as described. The endpoints are currently aligned with those in the back-end for the login use case.
Next Steps are to add comments at the top of the Login.js file describing the overall role of the file. The file is well-named, but the comments would be helpful for future documentation!