it won't accept closed audio element

Challenge Name

https://beta.freecodecamp.org/en/challenges/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element
Issue Description

It keeps asking me to close audio element, even though i closed it. Tried to reset code, even refreshed the page, still the same.
Browser Information

Browser Name, Version: Google Chrome, Version 64.0.3282.167 (Official Build) (64-bit)
Operating System: macOS High Sierra
Mobile, Desktop, or Tablet: MacBook Pro 13"

Your Code

Real Coding Ninjas

A sound clip of Zersiaxs screen reader in action.

    <audio controls>
      <source src="https://s3.amazonaws.com/freecodecamp/screen-reader.mp3" type="audio/mpeg" />
    </audio>

Screenshot

Could you provide a screenshot of the tests section? It would be helpful to know which test broke and what error it spouted out.

Strange...this was an issue about a week ago (#16645) and it was fixed by pull request #16653. Yet, I replicated this error ("Cannot read property 'length' of null" in the tests console) on https://beta.freecodecamp.org. However I've tested your code on my local staging branch and everything works fine.
#16653 was merged early last week, supposedly fixing the troublesome test we're encountering now. The snippet that follows is the code for the current test on the staging branch:
assert(
  code.match(/<\\/audio>/g) &&
  code.match(/<audio controls>/g) &&
  code.match(/<\\/audio>/g).length === code.match(/<audio controls>/g).length,
  'message: Make sure your audio element has a closing tag.'
)

JavaScript has short-circuit evaluation, and it is apparent from this code that the length property can never be taken from a null value.
@raisedadead perhaps you could weigh in on this difference between staging and https://beta.freecodecamp.org?

Hi @jkao1 yup, we deploy staging branch to the beta.freecodecamp.org once every couple days, it is possible that the fix has not been deployed yet.

Yes, I just confirmed that we need to deploy a fresh release on the beta, sorry about the delay. I'll check with @BerkeleyTrue if it supposed to be done soon.
Closing as fixed.

Still the same issue.

I still  have the error message"Make sure your audio element has a closing tag."

@Jd536 could you provide your cocde?

I've got the same issue, and rechecked everything lot of times, but it keeps telling me the same: "Make sure your audio element has a closing tag." Anybody solved it?

Just came across this issue as well.

Can someone please report a fresh issue on the tracker.


Pod termination takes too long

Hello Open-Appsec Team,
A few months ago I have already placed the problem around restarts from the pods with the product owner of Open-Appsec. According to a feedback, a restart or deletion of a pod should be relatively fast by now.  The problem itself is still due to a health check of the controller.
Thanks for looking at the problem.

Hi,
Our Helm chart is based on the NGINX helm chart so the "controller.terminationGracePeriodSeconds" is set to default value of 300 seconds.
You can adjust the grace period using --set controller.terminationGracePeriodSeconds=3


Add library using gradle dependencies

Hi! How add library using gradle dependencies?

This library doesn't have Gradle support. You should add it as a module dependency if you want to use it on your project.


ctrl-c did not always terminate the vagrant running process

and it causes errors, especially on Windows - Cygwin, for example, running some vagrant commands did not work). We need to investigate the root cause.
related:

https://github.com/hashicorp/vagrant/issues/3
https://github.com/hashicorp/vagrant/issues/8903
https://stackoverflow.com/questions/32363425/vagrant-on-windows-any-way-to-stop-provisioning-with-ctrl-c
https://github.com/teracyhq/dev/issues/411

The problem is that the mintty is not fully compatible with the window.
Related:
https://mintty.github.io/mintty.1.html#LIMITATIONS
https://github.com/mintty/mintty/issues/56
https://github.com/mintty/mintty/wiki/Tips#inputoutput-interaction-with-alien-programs
Should use winpty in mintty, it will resolve this problem!
Or
can be fix by follow step:

install ruby for cygwin ( by cygwin packages installer )
2 install ruby for window
3 add ruby Path
4 add cygwin/bin, sbin, usr/local/bin, usr/sbin, usr/bin to PATH
5 And the most important thing is: Install git (https://git-scm.com/), and use git-bash instead of cygwin-terminal ( mintty will be integrated in git-bash )

****** TESTED *******
It will work!
Done!

so we need to use git-bash instead of cygwin
related: https://github.com/teracyhq/dev/issues/563

need @hoavt to check the fix provided by @phuonglm

assigned to @hoavt for verification.

@hieptranquoc said that it looked like the problem is fixed on the recent latest version of cygwin, need @phuonglm to verify on this. If so, we don't need to use the wrapper anymore.

@hieptranquoc, I clean install windows 7 x64 cygwin and vagrant 2.2.4, virtualbox 6.0.8 but still got the problem with ctrl+c, could you specify more details about your version

@hieptranquoc, I clean install windows 7 x64 cygwin and vagrant 2.2.4, virtualbox 6.0.8 but still got the problem with ctrl+c, could you specify more details about your version

I ran with window 10 - x64. If windows 7 and windows 8 can not use mintty, you need to confirm that and the solution is switch to another tty!

assign to @hoavt to verify the current (workaround) solution.

assigned to @phuonglm to verify and confirm.

Verified on windows 7 and windows 10 x64 when used winpty as alias and everything work as expected.

closed, thank you.


Icon Request

I want to request this app
https://play.google.com/store/apps/details?id=tw.com.gamer.android.animad&hl=en_US&gl=US&referrer=utm_source%3Dgoogle%26utm_medium%3Dorganic%26utm_term%3D巴哈姆特動畫瘋&pcampaignid=APPU_1_elE7YpqAIIGRr7wPk-qD6Ac

Hello! Weʼre switching to a new system for icon requests in order to be able to better manage them. From now on, icon requests can be submitted here: https://forms.gle/Fx8vZAiWdW1Tyjo57. If your icon request hasnʼt yet been fulfiled, it has been copied to our new icon request database, meaning no action is required. Consequently, this issue will be closed.


(feature request)More languages support

Would it be possible for you to add more languages for Bloxstrap Menu app? People would contribute to your project, and I think it would be kinda useful, some people who don't know English very well could use Bloxstrap.

Yeah, I've never really tried adding localization to an application, but I could definitely do it. I'm kind of just wondering whether Bloxstrap is popular enough for this to be a concern, and so whether it's worth doing this, especially since everything about it online (at least right now) is English only. If this actually gets some use/attention with non-English people, I could add it. For now though, I'm not really seeing this as worthwhile.


[BUG] Notifier does not focus itself when launched by Jamf Binary

Describe the bug
I've created a shell script to open IBM Notifier and perform a series of events upon clicking the main button.
On opening the same script from Self Service, IBM Notifier correctly assumes focus and brings itself to be front most app, but when launched with /usr/local/jamf/bin/jamf policy -event  this does not happen and IBM Notifier keeps in the background.
It seems to always be this way when executed as above, but execution by recurring check in triggers work as expected.
To reproduce:
Create a script on your Jamf server or Jamf Cloud instance and have it open IBM Notifier like this:
#!/bin/bash

# Variables
NOTIFIER="/usr/local/bin/IBM Notifier.app/Contents/MacOS/IBM Notifier"
TITLE="IBM Notifier Test Script"
SUBTITLE="This will be your subtitle."

}

# Script logic
RESPONSE=$(userResponse)

if [[ ${RESPONSE} -eq 0 ]]; then
	/bin/echo "Do stuff..."
else
	exit 1
fi

exit 0

OS: macOS 13.3.1
Jamf Pro: 10.45.1
IBM Notifier: v. 2.9.1

Hi @S-Groening 👋 I'm pretty sure this happens because when you trigger the policy from terminal Jamf verbosity let the terminal regain focus after IBM Notifier kicked in. You can test it by triggering the test policy at checkin and see if the behaviour persist.

Yeah this is not an issue with IBM Notifier itself. It's just a behaviour you see while testing it with some manual policy execution. I'm going to close it as it's out of scope for IBM Notifier.


Support the rest of the Scratch API

users
studios
comments?
more?

Hi GarboMuffin, I'm trying to implement the Scratch search into ScratchGO and I noticed that the turbowarp proxy didn't include the search api. Is there any way I could contribute and add it? I just need the search project api to work.

Thanks for the reply! I forked the trampoline code and added the search functionality after some tinkering. However, I still don't know how to host it on my own. Could you tell me how you set up the hosting for the turbowarp trampoline?
btw ScratchGO is a website I'm making to play Scratch games on mobile browsers. We had a brief exchange about it a few months ago about it when I introduced it to you ;)


Some furnaces do not register properly

*Detailed description of the issue:
Some furnaces will show they are registering when interacting with them, but do not add to the registered count and will show registering every time they are interacted with.   Ie, I interact with the furnace, it says "Registered new ownership for furnace: 1/20". I then click on it again and get the exact same 1/20 message.   If I do /jobs clearownership it tells me I had 0 furnaces registered.  Other furnaces do work properly and I'm unable to tell which will cause an issue and which will work fine, but the behavior is consistent across a restart.  Other players have the exact same issue when interacting with the glitched furnaces, so it's a furnace issue, not a player one. There  is no message on console related to this.

Jobs version:
<IP_ADDRESS>
Server Type (Spigot/Paper/etc):
Paper
Server Version (using /ver):
Paper 762 (1.16.5)

Not sure if it's relevant, but we do have both mcmmo (2.1.200) and LWC interacting with furnaces, though all the furnaces in question (both working and non-working) were locked, so I don't think that's likely the issue.

4f87750bfab14c9dea9bb79a81d1e5e2b7111bfc


Add rel=noopener with fallback

This ensures that github.com can not mess with the list-powered HTML document in any way.
See https://mathiasbynens.github.io/rel-noopener/ for more information.

An alternate solution (that I’d personally prefer) is to just drop target=_blank instead.

On 🔥


Package installer search field broken

In the "Install" tab under "Settings", the search box is no longer searching when the enter key is pressed.  In order to search I have to click on the inactive button in the button group with "Packages/Themes", then click back to the category that I actually want to search.  I'm on a new MacBook running OS X 10.10 with Atom v0.206.0.

I can reproduce this on Ubuntu 15.04 with atom v0.207.0
I can only search for one package per time I open atom.

Yup, I can reproduce it on v0.208.0 too.

This seems like a duplicate of https://github.com/atom/settings-view/issues/535 – let's move the discussion to that issue.


vizh runs into error with dlopen on Windows

I'm running Windows 10, and python for windows 3.9.
Installed all modules asked for.
I've attached the stacktrace.

Never mind, it was a PATH issue.


Root page Delete button is visible in List view

As discussed on Discord:

Thanks very much,
Paul

@w00fz It looks like we never finished implementing those buttons. What should we do with them?

Thanks @mahagr , could we also please keep this issue open re: larger fix to support deleting of this root page if functionality not needed. In the short-term, I've also started testing with Git Sync and it seems that the root page is not synced over to the repo, which is EXCELLENT!

See also #2972

Already fixed and released.


peer-protocol.md spelling

If you add [skip ci] in your push or the HEAD commit of your PR you can skip the workflows, which is useful for doc changes
https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/


[5.7] Sqlite & dropForeign

Laravel Version: 5.7.1
PHP Version: 7.2
Database Driver & Version: MySQL 8, Sqlite

Description:
When using Laravel, using in-memory Sqlite for tests while using MySQL/Postgres for dev/prod requests is quite common.
Laravel 5.7 contains an undocumented change which throws an exception when trying to drop foreign keys in Sqlite: https://github.com/laravel/framework/pull/24052
When a testsuite runs migrations, it produces the message:
SQLite doesn't support dropping foreign keys (you would need to re-create the table).
While this is technically correct, this strict behavior also removes the possibility to silently ignore foreign keys in Sqlite and use the same migrations with multiple drivers.
Could the checks in https://github.com/laravel/framework/pull/24052 be reverted, or be made configurable?
If not, I think it should at least be added to the 5.7 upgrade docs to set expectations. Rewriting hundreds of migrations is quite impactful.

Just use the new migrate:refresh in your test suite? i.e. why are you trying to drop tables, just drop the database, it would be faster?

@laurencei
migrate:refresh is not new right? I'm using the builtin refreshDatabase trait on functional tests, which calls Illuminate\Foundation\Testing::refreshInMemoryDatabase() in every setUp.
This is the way to do it according to the 5.7 documentation.
I am not even dropping tables yet, just migrating upwards.
It happens quite often that a table is removed, renamed after creation, hence there are plenty of dropForeign() calls in the up() methods.
It seems messy to rewrite all existing migrations to add database driver checks: if (DB::getDriverName() !== 'sqlite') $table->dropForeign('...'), so I was hoping the warning could be handled more gracefully.

@laurencei That is indeed a reasonable option. I understand there are conflicting interests here, if you are deliberately trying to work with foreign keys on a production SQLite database, you would be glad to be informed by an exception.
I do think this should be added to the 5.7 upgrade guide though.
I have created a PR on the docs repository

Can you close the issue?

You can also just catch that exception instead of extending Illuminate/Database/Schema/Blueprint.php
try {
   parent::tearDown();
}catch(\BadMethodCallException $e) {
   // do something, or nothing: just ignore
}

I found a way to replace sqlite connection, don't update any migration.
Hopefully can help.
abstract class TestCase extends BaseTestCase
{
    public function __construct(?string $name = null, array $data = [], string $dataName = '')
    {
        parent::__construct($name, $data, $dataName);
        $this->hotfixSqlite();
    }
    /**
     *
     */
    public function hotfixSqlite()
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    $builder = new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                    return $builder;
                }
            };
        });
    }
}

I found a way to replace sqlite connection, don't update any migration.
Hopefully can help.
abstract class TestCase extends BaseTestCase
{
    public function __construct(?string $name = null, array $data = [], string $dataName = '')
    {
        parent::__construct($name, $data, $dataName);
        $this->hotfixSqlite();
    }
    /**
     *
     */
    public function hotfixSqlite()
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }
}

Adding a little detail, remember to inject the classes needed on top:
use \Illuminate\Database\SQLiteConnection; use \Illuminate\Database\Schema\{SQLiteBuilder, Blueprint}; use \Illuminate\Support\Fluent;

Reopen?

Note when using PHPUnit ^9 you need to register the connection before calling parent::setUp() like so:
    protected function setUp(): void
    {
        $this->hotfixSqlite();
        parent::setUp();
    }
`

This confused me for a while so hopefully it helps someone!

So full version for your base TestCase class:
    public function __construct(?string $name = null, array $data = [], string $dataName = '')
    {
        $this->hotfixSqlite();
        parent::__construct($name, $data, $dataName);
    }
    /**
     *
     */
    public function hotfixSqlite()
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends \Illuminate\Database\SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends \Illuminate\Database\Schema\SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends \Illuminate\Database\Schema\Blueprint {
                                public function dropForeign($index)
                                {
                                    return new \Illuminate\Support\Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }

ErrorException: Declaration of class@anonymous::createBlueprint($table, ?Tests\Closure $callback = NULL) should be compatible with Illuminate\Database\Schema\Builder::createBlueprint($table, ?Closure $callback = NULL)

Maybe change createBlueprint($table, Closure $callback = null) to createBlueprint($table, \Closure $callback = null) ?

I tried the edited TestCase, now it raises this... Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 Cannot add a PRIMARY KEY column any idea?

I tried the edited TestCase, now it raises this... Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 Cannot add a PRIMARY KEY column any idea?

this looks like another problem...you must have solved the one above successfully. if not the case, you need to provide more info

I tried the edited TestCase, now it raises this... Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 Cannot add a PRIMARY KEY column any idea?

this looks like another problem...you must have solved the one above successfully. if not the case, you need to provide more info

I don't want to spam on a closed issue, but it works perfectly if I run tests on an empty MySQL database.
I think it's related to the fix because I'm dropping a foreign key to replace it with another one on the same column, and as the deletion is faked, creation fails. I tried mocking the foreign() call without success unfortunately.

public function hotfixSqlite()
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }

I feel like there should be a blog post explaining what has been done. I would love to read that !

I found a way to replace sqlite connection, don't update any migration.
Hopefully can help.
abstract class TestCase extends BaseTestCase
{
    public function __construct(?string $name = null, array $data = [], string $dataName = '')
    {
        parent::__construct($name, $data, $dataName);
        $this->hotfixSqlite();
    }
    /**
     *
     */
    public function hotfixSqlite()
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }
}

This works for dropForeign. For the migrations where you drop or rename the column which stills fails, with the need to add these minor additions to the above solution.
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }

                                public function dropColumn($columns)
                                {
                                    return new Fluent();
                                }

                                public function renameColumn($from, $to)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }

Any suggestion for
public function dropColumn($columns)
{
    return new Fluent();
}

That really executes the drop of the column?

maybe the easiest way to resolve this, is by ignoring dropForeign when not sqlite
    if (\DB::getDriverName() !== 'sqlite') {
        $table->dropForeign('index_name');
    }

I found a way to replace sqlite connection, don't update any migration.
Hopefully can help.
abstract class TestCase extends BaseTestCase
{
    public function __construct(?string $name = null, array $data = [], string $dataName = '')
    {
        parent::__construct($name, $data, $dataName);
        $this->hotfixSqlite();
    }
    /**
     *
     */
    public function hotfixSqlite()
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }
}

This works for dropForeign. For the migrations where you drop or rename the column which stills fails, with the need to add these minor additions to the above solution.
    {
        \Illuminate\Database\Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
            return new class($connection, $database, $prefix, $config) extends SQLiteConnection {
                public function getSchemaBuilder()
                {
                    if ($this->schemaGrammar === null) {
                        $this->useDefaultSchemaGrammar();
                    }
                    return new class($this) extends SQLiteBuilder {
                        protected function createBlueprint($table, Closure $callback = null)
                        {
                            return new class($table, $callback) extends Blueprint {
                                public function dropForeign($index)
                                {
                                    return new Fluent();
                                }

                                public function dropColumn($columns)
                                {
                                    return new Fluent();
                                }

                                public function renameColumn($from, $to)
                                {
                                    return new Fluent();
                                }
                            };
                        }
                    };
                }
            };
        });
    }

I have used your code improvement, but I'm still with some problems:
I have one migration that changes the name of the column, name to first_name for example, and when I try to insert this data on the column, the test fails saying that the column doesn't exist.
public function dropColumn($columns)
{
    return new Fluent();
}

the new Fluent doesn't return anything

The hotfix didn't help, but the https://github.com/lunarphp/lunar/issues/485#issue-1339748185 did :+1:

i wonder why this is not part of framework yet.

what about @taylorotwell  ??

i wonder why this is not part of framework yet.

what about @taylorotwell  ??

For those facing the issue I've rewritre the hotfixsql method to drop the table and recreate it  without the dropped columns.
`    public function hotfixSqlite(): void
{
Connection::resolverFor('sqlite', function ($connection, $database, $prefix, $config) {
return new class($connection, $database, $prefix, $config) extends SQLiteConnection
{
public function getSchemaBuilder(): SQLiteBuilder
{
if ($this->schemaGrammar === null) {
$this->useDefaultSchemaGrammar();
}
                return new class($this) extends SQLiteBuilder
                {
                    protected function createBlueprint($table, ?Closure $callback = null): Blueprint
                    {
                        return new class($table, $callback) extends Blueprint
                        {
                            public function dropForeign($index)
                            {
                                return new Fluent;
                            }

                            public function dropColumn($columns)
                            {
                                // Get the columns of the original table
                                $originalColumns = Schema::getColumnListing($this->table);

                                // Remove the column you want to drop from the original columns
                                $newColumns = array_diff($originalColumns, (array) $columns);

                                // Get the table's column details
                                $columnDetails = DB::select('PRAGMA TABLE_INFO('.$this->table.')');

                                // Create a new temporary table without the column you want to drop.
                                Schema::create('temp_'.$this->table, function (Blueprint $table) use ($newColumns, $columnDetails) {
                                    foreach ($newColumns as $column) {
                                        // Get the type of the column
                                        $type = Schema::getConnection()->getSchemaBuilder()->getColumnType($this->table, $column);

                                        // Check if the column is nullable
                                        $columnDetail = collect($columnDetails)->firstWhere('name', $column);
                                        $isNullable   = ! ($columnDetail->notnull == 1);

                                        // Recreate the column with the same type
                                        $newColumn = match ($type) {
                                            'integer'   => $column === 'id' ? $table->increments($column) : $table->integer($column),
                                            'boolean'   => $table->boolean($column),
                                            'date'      => $table->date($column),
                                            'text'      => $table->text($column),
                                            'float'     => $table->float($column),
                                            'double'    => $table->double($column),
                                            'decimal'   => $table->decimal($column),
                                            'timestamp' => $table->timestamp($column),
                                            'time'      => $table->time($column),
                                            'binary'    => $table->binary($column),
                                            default     => $table->string($column),
                                        };

                                        // If the column is nullable, call the nullable method
                                        if ($isNullable) {
                                            $newColumn->nullable();
                                        }
                                    }
                                });

                                Schema::dropIfExists($this->table);

                                Schema::rename('temp_'.$this->table, $this->table);

                                return new Fluent;
                            }

                            public function dropMorphs($name, $indexName = null)
                            {
                                // Define the columns to drop
                                $columnsToDrop = [$name.'_type', $name.'_id'];

                                // Call the dropColumn method with the columns to drop
                                $this->dropColumn($columnsToDrop);

                                return new Fluent;
                            }

                            public function renameColumn($from, $to)
                            {
                                return new Fluent;
                            }
                        };
                    }
                };
            }
        };
    });
}

`
Hope it could help someone

Fixed on Laravel 11.15 via #51373


Possibility of support for other databases

Hi Lawrence,
I just read about your project in the moodle dev chat.
Are you using some code/api/? that prevents the use with other databases,
or are specific to MariaDB?
How complex do you think is it, to make this work with postgres?
Best regards
Christian

Hi @christianwolters.
I am using PHP's PDO that can access many databases. However, as you know, each database has its specific set of commands to retrieve data.
Freezer needs to query some information from tables:

The list of database's table names.
The structure of each table, containing at least:

All table's fields and its types.
Which field is the auto incremented one (if has an auto incremented field)

So if I get this information I could abstract those and add other databases (postgres in this case).
Can you send me the query commands I need to run on Postgres to get the information mentioned above? This would save me a precious time.
Thanks.


Error: "python/BugDetection.py", line 134, in   ...

I have followed all the instructions in read me file. The first part works fine where I get call_* files for training and eval. When I run the second step, below message is printed with bunch of other stuff:
Traceback (most recent call last):
File "python/BugDetection.py", line 134, in
learning_data.pre_scan(training_data_paths, validation_data_paths)

Something seems to be wrong with the calls_x2.json. Can you check that this file looks like a correct JSON file, and if it does but it still doesn't work, share (part of) this file, please?

Hi Michael! Thanks for replying!
calls_x2 File looks good to me. Below is the screenshot

Can you please share the entire file, and also the calls_y2.json, so I can reproduce the problem?

call_files.zip
See the attachment. Thank you for looking into it! :)

Running your command with these files works fine with me. The reason probably is that a different default encoding is used on your machine than on mine. I've just pushed a small change that may solve the problem. Can you pull, re-run your command, and let me know if works now?

Hi Michael! Thank you for making those changes! I got some warnings, otherwise, it works perfectly fine :) see the screenshot.

This looks the way it should be. Of course, if you use more training data, your accuracy will be higher.


Move reducer/saga injection to separate library

Is your feature request related to a problem? Please describe.
I use this boilerplate for multiple projects, which means I have some duplicate code in my utils folders for the reducer/saga injection.
Describe the solution you'd like
It would be nice to move the reducer/saga injection to a separate library, that this boilerplate then imports as a dependency. This would reduce code duplication when using this boilerplate for multiple projects. It would also let developers use the reducer/saga injection without using the entire boilerplate.
Describe alternatives you've considered
N/A
Additional context
I'd like to work on this if I can get the blessing of the maintainers. I'd probably also need help from the maintainers in creating a separate repo within the react-boilerplate organization. Alternatively, we could set up a monorepo, but that would be more work.

@julienben Any thoughts on this?

Sounds like a good idea in theory.
A few thoughts:

I'm assuming we're talking about the code in these files: injectReducer, injectSaga, reducerInjectors, sagaInjectors + the corresponding tests. Is that correct?
This code is very specific to react-boilerplate. It expects a Redux store as configured inside configureStore and as verified by checkStore. How do we deal with the tight coupling between these? (At the very very least, I think the name of the project should be specific, i.e. react-boilerplate-injectors, and the documentation should be detailed.)
Whenever the idea to turn react-boilerplate into a monorepo has arisen, we've tried to stay away from it because many devs come to this repo to learn best practices and a monorepo would feel over-engineered and harder to grok. It could make sense as an additional package in the react-boilerplate organization though.
Not that this code would require a ton of maintenance but nonetheless, would you be willing to take care of it? At this time react-boilerplate itself doesn't have many maintainers/contributors and I wouldn't want to add additional projects which might fall into disrepair.

Btw, in my team at work, we build 10+ frontend apps from the same react-boilerplate-inspired monorepo. It's not a Lerna monorepo though. It just has an apps folder (note the "s") containing multiple apps and we use env variables to start/build/deploy the relevant app. It allows us to share much more than just the injectors (i.e. all the config files, the generators, shared components, etc). I'd be happy to help you understand how that works because IMO it would be a more holistic solution to your issue.

Thanks for the detailed response. Here’s my answers to the above points:

Yep
I think we could pull some code out of configureStore and checkStore and move it to the library. For example, we could create a ‘setupInjectors’ function and a ‘checkInjectorsSetup’ function and export these from the new library. Then ‘configureStore’ and ‘checkStore’ could respectively use these two functions.  I think this would reduce the implicit coupling. And then of course all that would need to be documented. If we do that I’m not sure the library needs react-boilerplate in the name, since it could be used without the boilerplate.
Good point, I agree.
Yep. I’ve been looking for a bigger open source project besides just small bug fixes and typing fixes so I’m willing to maintain this for the foreseeable future.

Regarding your side note, that seems like a good approach, but would require bigger changes our side that I don’t think we have time to make right now. I’d also argue a library has the added bonus of being easier to upgrade and keep up to date with the upstream.

I'd like to hear back from other contributors here but my hunch is that we might prefer to leave the injector code in the main rbp repo.
Mostly for these reasons (from my POV at least):

Pulling code from configureStore and checkStore feels like it would still make it hard to tell where the injectors end and where the boilerplate begins.

It would still feel a little over-engineered and thus make it hard for people who just come to learn from the rbp setup and code.

It wouldn't in any way stop you from having a copy of the injectors living in a separate library.
This code changes rarely enough that I don't think there'd be too much of an issue with keeping rbp and the injectors library in sync.
Do you know precisely what the API would look like? Which functions would you expose and what would be their inputs and outputs?
My suggestion would be to just go ahead and build this library, possibly inside the react-boilerplate organization.
When it's ready, you can start using it for your own projects and we can also reconsider at that time whether or not we'd want react-boilerplate itself to use it.

I agree that I'd like to see the API design but I also recognize sometimes it's easier to just start writing the library in order to flesh out the design itself 😄.
I'm not a great reliance here- I don't use sagas in any of my projects, never really have with the exception of working with this bp BUT I will say one point @julienben made that I also want to echo is keeping this bp simple so that newcomers can get acquainted with a typical, production-ready react app.

I went ahead and created the basics of the library so we can see what it would look like.
Here's the rough api design: https://github.com/BenLorantfy/react-redux-injectors#api-reference
Here's a link to the changes that would be required to the boilerplate: https://github.com/react-boilerplate/react-boilerplate/compare/master...BenLorantfy:master
A few notes:

I ended up moving checkStore to the library. I think it makes sense here because it seems like it's purpose is to ensure the store is setup properly for the injectors. It's also not used outside of the injectors. We may not even want to export this function, since it's just used internally at the moment.
You can see how to setup the injectors here: https://github.com/react-boilerplate/react-boilerplate/compare/master...BenLorantfy:master#diff-ea94aca90fbef7f544d2a96cf1da5f8eR50 .You just call setupStoreForInjectors with the store and a few options required for the setup.
You can see how the imports would have to change here: https://github.com/react-boilerplate/react-boilerplate/compare/master...BenLorantfy:master#diff-b40dc3de2b66cf46597584200a5599f7R15 (We may want to write a codemod to help with this)
These lines wouldn't be needed. I just had to add them to get the linking to work properly for local development. https://github.com/react-boilerplate/react-boilerplate/compare/master...BenLorantfy:master#diff-0ce70994be1370e72714431f8e7cc804R122
After implementing this, I think it actually makes the boilerplate simpler. It hides away the complexity of the injectors, and allows us to remove a lot of code from the boilerplate.
I also think the injector setup in the createStore function is clearer / more expressive now.
I was able to remove a somewhat backwards coupling. A file in the utils depended on the reducers file. This was replaced by attaching a createReducer property to the store, similar to the runSaga function on the store. See here for the old import: https://github.com/react-boilerplate/react-boilerplate/compare/master...BenLorantfy:master#diff-85e83bd213032a5aa4c82d09f55994d9L5
The documentation isn't complete. For example, I still have to document the hooks.

@julienben @gretzky Please let me know what you think of the api design and boilerplate changes.

(Sorry, super busy rn. I know this is waiting for review. Will get to it asap.)

I like the idea of this being separate I think after seeing this implementation. I don't think I could be convinced of rbp becoming a monorepo, but I can see the validity in having some of this logic totally external.
The only thing I'd say before we bring it in fully would be to make sure the docs are where they need to be / match the rest of our docs. I'll leave the saga investigation to @julienben.

Yeah I don't think a monorepo makes sense, I was just mentioning it as an option. I think the better option would be a separate repo which could be under the react-boilerplate organization.

@BenLorantfy I'm actually pretty interested in this. I've taken a lot of inspiration from react-boilerplate's "modular redux" implementation, and would like to help get it extracted.
I've also seen https://github.com/Microsoft/redux-dynamic-modules but think it's a bit much

@BenLorantfy sorry for my lack of further response-- I'm getting married next week, I've never been so busy with planning!

@gretzky Haha no problem, that's a little more important than a GitHub issue.
I'm mostly waiting for @julienben 's response anyway... nudge nudge, wink wink 😉

@bwhitty That library is interesting, I didn't know that existed. It's similar to the injection in rbp but the api is a little different.

@julienben Not trying to be an annoyance but have you gotten a chance to look at this yet?

Hey @BenLorantfy,
Sorry for how long it took me to reach this... I only have so much time I can dedicate to rbp + I was on holiday for a while.
Overall, this LGTM. I'd be happy to help you open a new project in the react-boilerplate org and get this working.
Before that, do you have a final name?
My vote still goes to react-boilerplate-injectors or rbp-injectors because when you also think of the redux-sagas setup it's just so specific to react-boilerplate.
If you want to stick to react-redux-injectors, you might still want to add sagas to the name though since this is still specific to redux-sagas and might not be obvious right away. (Or at the very least make sure it's mentioned early on in the README.)
Some other thoughts:

Your documentation should start with an explanation of what this project is about. Before publishing we'll look in more details at making sure the 2 projects are aligned.
You need to set up your repo so that your npm build contains a dist folder from which users can import. (Check out bili. immer and many others use that.)
Your react-boilerplate branch should use dev as its base branch. It also needs to update the template app as well as the generators.
In your package.json, could you pin the dependencies the same way it's done inside react-boilerplate?
Question: Why expose the checkStore API to the user? Isn't it something that's only useful inside the injector functions?
Regarding the lodash dependency you shouldn't have to worry about it. There are several ways to guarantee that you're only importing the parts you need (as done by react-boilerplate following this article).

I'm sure more stuff will come up and it'd also be great if we can get others to review closer to publication. For now though let's pick a name and open the project so you can set up Travis and continue working from there.

@julienben No worries, hope you enjoyed your holiday. That all sounds great; I'm excited to get started.
Regarding the name: I'm hesitant to add rbp to the name because I think we can make it de-coupled enough to be used outside of rbp if users want to.
I do see your point about adding saga to the name though. This is the best name I can think of at the moment: reducer-saga-injectors. We could always rename up until the point we publish to npm.
I agree with all your other points, I'll make sure to address them as I work on this. If you could help me setup a repo that would be great. Thinking we create an empty repo and I'll do a PR into it with what I have so far?

You should have an invitation to https://github.com/react-boilerplate/injectors in your email.
I simply called it injectors for now since we can rename it later. It's more or less set up like react-boilerplate.
Let's please follow the same git strategy:

Never push to dev or master
Branch from dev to write your code
Merge it into dev when ready
Merge dev into master when releasing a new version
Squash merging only for super clean history

awesome idea, very excited for this!
re: the setupStoreForInjectors function, i would consider exporting a store enhancer since it's safer than monkey patching and is really the canonical approach to extending the store API...
type StoreEnhancer = (next: StoreCreator) => StoreCreator

so, something like...
export default function setupStoreForInjectors(options) {
  invariant(
    conformsTo(options, {
      runSaga: isFunction,
      createReducer: isFunction
    }),
    '(injectors...) setupStoreForInjectors: options `runSaga` and ' +
      '`createReducer` are required.',
  )
  return createStore => (...args) => {
    const store = createStore(...args)

    return {
      ...store,
      createReducer: options.createReducer,
      runSaga: options.runSaga,
      injectedReducers: {}, // Reducer registry
      injectedSagas: {}, // Saga registry
    }
  }
}

which would make the example usage:
import { createStore } from "redux"
import { setupStoreForInjectors } from "react-redux-injectors"

function createReducer(injectedReducers = {}) {
  const rootReducer = combineReducers({
    ...injectedReducers,
    // other non-injected reducers can go here...
  });

  return rootReducer
}

const runSaga = sagaMiddleware.run

const store = createStore(
  createReducer(),
  undefined,
  setupStoreForInjectors({
    createReducer,
    runSaga,
  })
)

@justingreenberg Seems like a good idea, I'll try it out

@julienben Sounds good, thanks

OK, first PR is up for review to the new library 😁: https://github.com/react-boilerplate/injectors/pull/1

Awesome, that's what I was trying to do in my project recently. I copied the injection stuff from react-boilerplate into a create react app skeleton a while ago and now was working on improving the project's structure and extracting the injection functionality into a separate package. In future I might be able to just use your package instead :+1:

Tooling and docs PR is up: https://github.com/react-boilerplate/injectors/pull/2
By the way, I think we need a little bit more discussion to decide on a name. These are a few options:

name
pros
cons

redux-injectors
Concise; Shorter to type; Conveys it's for use with redux
Does not convey support for redux-saga; Does not convey it's for use with react.

reducer-saga-injectors
Conveys support for redux-saga; Conveys support for redux
Awkward to say; Longer to type

react-boilerplate-injectors
Conveys usage by react-boilerplate
Does not convey support for redux; Does not convey support for redux-saga; Couples name to react-boilerplate; i.e. name does not make sense if using library outside of react-boilerplate; Longer to type

react-redux-injectors
Conveys it's for use with react; Conveys it's for use with redux
Does not convey it's for use with redux-saga; Longer to type

dynamic-redux
Concise; Shorter to type; Conveys it's for use with redux
Does not convey support for redux-saga; Does not convey for use with react

I'm leaning towards redux-injectors because I think it's a decent balance between brevity when typing import statements and expressiveness.

If I were to throw in my 2c, I'd say dynamic-redux captures the ethos the best. Fundamentally, the package is about running Redux in a way that allows it to become "dynamic" at runtime. It's also general enough to cover the fact that the package deals with React and Redux Saga.
The reason I'd lean towards that name instead of redux-injectors is that the "injectors" part to me feels tied to the current API (which has functions called inject, etc), and it doesn't convey the inverse of injecting, which is removing the reducers / sagas upon component unmount. I think "dynamic" conveys that a bit more.
Negatives to dynamic-redux is that there are a couple packages in the NPM ecosystem which already carry a name like it (including Microsoft's https://github.com/Microsoft/redux-dynamic-modules): https://www.npmjs.com/search?q=dynamic redux while redux-injectors simply has less: https://www.npmjs.com/package/redux-inject-reducer-and-saga
Interestingly, it also appears someone has already shipped something which tries to extract react-boilerplate's reducer/saga injection like what is being done here 😄 https://www.npmjs.com/package/redux-inject-reducer-and-saga (though it appears more opinionated, and is tied to Immutablejs, etc)

Good points. I'm also OK with dynamic-redux

Interesting points about dynamic-redux! It feels like a more "ambitious" name which could even expand the scope of the project.
Perhaps as a start the documentation can "zoom out" from just explaining injection and instead explain from a larger POV what it enables in a React+Redux app (=> runtime management of reducers and sagas).
And maybe down the road, it could somehow be rewritten to disconnect from sagas and instead work generically with similar redux middleware.

I personally don't like ambiguous names like dynamic-redux, it tells me nothing other than it's probably used with redux. I prefer the long, wordy ones-- redux-saga-injectors, redux-injectors, etc. especially when the project is scoped to very specific libraries, like we are here. react-redux-saga-injectors is too long, but I'd still prefer something more wordy along those lines.

Fair points. I think I'm good with either redux-injectors or dynamic-redux. dynamic-redux does feel less coupled to the API.

Ok so we can eliminate react-redux-saga-injectors for the reasons cited above but also redux-saga-injectors because it just sounds related to sagas but not reducers as well.
That leaves us with react-redux-injectors, redux-injectors and dynamic-redux. My vote goes for keeping only the first two options. They feel like more of a middle ground between the "benefits" of dynamic-redux and the "descriptiveness" of the longer options.
As for which to settle on... I have no strong preference. 😅

A great benefit that will come out of this project: Because react-boilerplate isn't a dependency we don't have any usage stats. But all future react-boilerplate-based projects will have this library so it'll give us some kind of usage stats. (Obviously we'll also have non-react-boilerplate users of this library but it'll be interesting nonetheless.)

Ok so we can eliminate react-redux-saga-injectors for the reasons cited above but also redux-saga-injectors because it just sounds related to sagas but not reducers as well.
...[omitted]

Just my $0.02 on the matter, but I feel redux-saga-injectors best encapsulates what the project provides, as sagas are a part of this (and reducers are inherently a part of redux). But I'm not that partial ;-)
Anyway, good work on all of this @BenLorantfy (and @julienben et al)

I kind of want to avoid redux-saga-injectors because I can foresee in the future adopting a "plugin" type system so people could use the library without redux-saga, and then use a plugin if they want sagas. This could enable the library to be used with other side-effect libraries as-well.

I agree with @BenLorantfy. Let's not attach this to sagas permanently.
Btw, I wanted to release react-boilerplate v4.1 with the release of styled-components v5 but it's been stuck on beta 8 since July 1st so IMO the new goal should be to finish this project, embed it into react-boilerplate and release. (The release of rbp 4.1 can also be a small opportunity to promote the injectors.)

@BenLorantfy valid (and good) point, then redux-injectors, if available makes sense 😄
@julienben sounds like a good plan 👍

ok, for the sake of making a decision, do we go with redux-injectors ?

Sounds good to me.

OK, I think these are the last few things to do:

[ ] Review and merge this PR: https://github.com/react-boilerplate/injectors/pull/3
[ ] Rename repo within GitHub settings (Need help with this one)
[ ] Publish (Need help with this one)
[ ] Make PR to change rbp to use redux-injectors

We're almost there! @julienben I'm assuming you want to do the actual publish to npm. After that, I can update my PR to use the published version :)

We should publish to npm as an organization so it's not tied to either one of us but react-boilerplate seems to be taken already :(
There's this page and also it told me this when I tried to create it:

Doesn't seem like there's an easy way to find out who it belongs to. I'll write to @mxstbr on Twitter to see if he knows. Otherwise, we might need to find an alternative name.

(I wrote to npm support as well. Will update if I get a reply.)

npm won't give us contact info for the owner of the react-boilerplate organization (makes sense) but they've offered to contact the current owner on our behalf and ask if they would be willing to transfer ownership. They say it can take up to 4 weeks though (to give them time to respond) so let's wait a little and if we don't get a response within a week or two we can start considering alternative names.

(If we're impatient, we can also consider publishing under a different org name - redux-injectors? - and transfer ownership of the package if/when we get ownership of react-boilerplate.)

@julienben I would probably prefer the second option of transferring the package but that's just me 😄

"The owner of the react-boilerplate organization account has responded back and has declined to release ownership of the scope." 😓
Doesn't seem very fair since it's not even used but there's nothing we can do about it. The important thing is that redux-injectors still seems available.
I ended up creating an organization called reactboilerplate and invited you. Feel free to publish ;)

Some people just be like that! Hopefully this won't create too much confusion in the future.

@julienben So I had a few hick-ups while publishing.

I tried following these docs to publish under the reactboilerplate org, but it just published under my user account 🤷♂ . I invited you as a maintainer, so you should be able to transfer it to the org. I tried but I don't think I have access since I'm not the org owner.

I accidentally published 1.1.0 on dev instead of 1.0.0 on master. I hastily unpublished 1.1.0 and published 1.0.0, but now the 1.1.0 version can't be republished 🙁

Even if a package version is unpublished, that specific name and version combination can never be reused. In order to publish the package again, a new version number must be used.

Therefore, I made this PR to bump the version.

Last PR is ready for review now https://github.com/react-boilerplate/react-boilerplate/pull/2749 🙂

Closing this as we're about to merge #2749. 🎉


Seems that nodejs:10 doesnt have package redis

Environment details:

local deployment, docker compose in dev-tools

Steps to reproduce the issue:

compose workflow
deploy with default option (kind = nodejs:10)
invoke

Provide the expected results and outputs:
start workflow
Provide the actual results and outputs:
{    "error": "Initialization has failed due to: Error: Cannot find module 'redis'\n    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)\n    at Function.Module._load (internal/modules/cjs/loader.js:508:25)\n    at Module.require (internal/modules/cjs/loader.js:637:17)\n    at require (internal/modules/cjs/helpers.js:22:18)\n    at eval (eval at initializeActionHandler (/nodejsAction/runner.js:57:23), :361:55)\n    at eval (eval at initializeActionHandler (/nodejsAction/runner.js:57:23), :446:3)\n    at eval (eval at initializeActionHandler (/nodejsAction/runner.js:57:23), :447:14)\n    at initializeActionHandler (/nodejsAction/runner.js:57:23)\n    at doInit (/nodejsAction/src/service.js:163:16)\n    at initCode (/nodejsAction/src/service.js:93:24)"
}
Additional information you deem important:
the workflow starts when deploying it with --kind=nodejs:6

I have seen package.json have no dependency on redis but nodejs: 6.
If so, the composer should only run on nodejs: 6. Why does the deploy command default to nodejs: 10?
Is openwhisk installed on my machine registering nodejs: 10 as runtime by default?

@lesomnus Hi.
Thank you for the report.
There was a discussion about this<EMAIL_ADDRESS>And we decided to keep the upstream runtime as pure as possible based on the assumption that
required packages can be added by OW operator in each downstream.
It would be easier for downstream to customize packages if we keep the upstream pure enough.
Regarding the default runtime, we relatively recently updated our default runtime to nodejs:10, so there might be some missing parts which do not take in nodejs:10 as a defaut runtime yet.
We are still updating them whenever we find them.
Thank you to let us know.

thank you for the reply.

Including Redis (since it’s useful for composer) might be a good idea. @tardieu?


Array#shift is slow

I was using array shift a lot, but I found out it's pretty slow compared to using an index lookup
This is the current implementation
  def shift
    if @size == 0
      yield
    else
      value = @buffer[0]
      @size -= 1
      @buffer.move_from(@buffer + 1, @size)
      (@buffer + @size).clear
      value
    end
  end

If I change this function by
  def shift
    if @size == 0
      yield
    else
      value   = @buffer[0]
      @size   -= 1
      @buffer += 1
      value
    end
  end

It is a lot faster
Shifting Array(String).new(100_000, "a") shows the following speed improvement
                 user     system      total        real
shift        1.600000   0.000000   1.600000 (  1.602299)
each         0.000000   0.000000   0.000000 (  0.000487)
fast shift   0.000000   0.000000   0.000000 (  0.000530)

Question is, can it really be implemented like this or is there in important reason the buffer move and clear is required for this operation? I've made the change in the current master branch and tests all pass.

Well, doesn't your implementation leak memory? That is the array will never shrink again?
However I agree we should only move after some threshold, that is move if there' X free space in front of the buffer and also check that when pushing.

Duplicate of #573

We should probably document that Array#shift is O(n)

Well Deque has the fast shift implementation, but I need other functions from array first before shifting.

@benoist As to why your implementation doesn't work, later when you need to grow the array later you lost the reference to the original pointer to invoke realloc on.

Alternatively we could store an offset inside the array, but maybe that's a big penalty for just this use case.

converting to deque before shift has some overhead of course, but it's already a 160x speedup
                       user     system      total        real
shift              1.600000   0.000000   1.600000 (  1.606989)
each               0.000000   0.000000   0.000000 (  0.000606)
fast shift         0.000000   0.000000   0.000000 (  0.000649)
convert to deque   0.010000   0.000000   0.010000 (  0.001799)

In Ruby they do increase the base pointer... I don't know how they can later reallocate. So it's worth investigating how they do it, it might worth doing the same in our case.

If I'm reading the ruby implementation correctly it seems like they are holding off the memmove until inserts and they double the capacity upon the insert. That would give you the move penalty only once to when you actually need to reallocate. If the array is shifted until empty it would never need the reallocation. Just need to make sure it doesn't leak memory like @jhass pointed out.

But how do they retain the original pointer and the current pointer?

If the array is not shared when shift is called, it will call the ary_make_shared function. I think this makes a copy of the original pointer and freezes it. This pointer is used in ary_modify to determine the shift.
https://github.com/ruby/ruby/blob/trunk/array.c#L590
https://github.com/ruby/ruby/blob/trunk/array.c#L322

Well, what functions do you need that Deque doesn't have? I would have thought that all Array functions could work on Deque once implemented. If Deque is the right datastructure to use here, then you should use it.
Another option is reverse! then pop in your code.

I'm currently using uniq and sort from array, which might be a lot slower to do in deque as those functions are not just pushes and shifts for which deque is optimized. Thats just an assumption though, I might be wrong here.

Have you tried it? benchmarked it? Don't work on assumptions.
You can always convert the array into a deque rather easilly.
Or if use reverse! and pop to get O(1) element removal from the ends in Array.

There's a bit of a problem: Deque.sort! does not exist, because sorting implementation is hardcoded in Array.

@oprypin which is exactly why I asked @benoist what functions he needed from array that were not on deque...

@RX14 Yes I know I can convert it to deque or use reverse and pop, but thats not really the issue. If we can make Array#shift a lot faster, isn't that worth investigating? It's not very intuitive to do all these workarounds because Array#shift is slow. The reason I'm making assumptions for the other parts now, is because putting the effort in testing and verifying still leaves this problem unsolved.
If the general conclusion is that Array#shift is as fast as it's going to get for now, then I have no problem if this issue gets closed. :-)

I would still consider that a workaround, but if thats just me, I can live with that :-)

@benoist Using the correct datastructure with the correct algorithmic complexity is a workaround?

if Deque is the only data structure that should do shifts, that shift should be removed from array. But I don't think that should be the case. If the overall operations on the same data are faster within one data structure, then it makes no sense to change. I think Array#shift can be made faster.
start = Time.now
a = Array.new(100_000, "a")
index = 0
a.size.times do
  s = a.shift
  index += s.size
end
puts Time.now - start

Crystal: 1.6069080
Ruby: 0.006131

Ruby implements an optionally shared buffer for the Array. Some Array instances owns the memory they use, and they will themselves reallocate it and free it when needed. But some Array instances are shared, in which they will keep reference to an external reference-counted buffer and maintain an offset on it. This shared Array will never touch the buffer unless it is the only array referencing it. This also has Copy-on-Write semantics. Then an shared Array tries to modify some data, it will first allocate its own buffer and copy everything to it. This is all done without any external impact, so the user of an Array cannot tell the difference, except with timing.
Here is some proof of it, taking @benoist sample:
start = Time.now
a = Array.new(100_000, "a")
a.size.times do
  a[0] = "b"  # Modifying the array will force the array to own its own memory. This has no impact for Crystal.
  a.shift
end
puts Time.now - start

Running on my computer: (I did not run crystal with release optimizations!)
Ruby without changing array:     0.007283187
Ruby changing array:             3.364405281
Crystal without changing array:  2.3464860
Crystal changing array:          2.3259410

This kind of optimization is nice because it makes some things faster and you only have to pay some costs if you need to pay the costs. But it also brings inexplicable slowdowns in functions that shouldn't ever be slow. Who could tell that a[0] = "b" would take time proportional to the length of the array?

Refs:
rb_ary_shift calls ary_make_shared if the Array is not yet shared.
Everything that may modify the array call rb_ary_modify, which will make shared Arrays not shared (by allocating memory and copying/moving).
All happens here: https://github.com/ruby/ruby/blob/trunk/array.c

@lbguilherme thank you for this explanation! Just to be sure, what would be your suggestion to do with the current Array#shift implementation, leave it as is or change it into something similar to ruby?

I'm not sure in which direction Crystal wants to go here. We could:

Leave it as it is now. shift is popping from the front of a container and it is slow. Document it and so that it is now a burden on the user to adapt to another structure (like copying the data into a Deque before) or pay the cost if he knows the array is small. The nice thing about this is that each operation has a clear cost that can be explained in documentation.

Apply extensive optimizations in all sorts of places. This would have an impact on how data is stored and on pretty much all functions. The end result would be that everything is faster for the average user, but this makes the code more complicated to maintain and it also makes behavior less predictable. Why did writing to a single byte of memory cause my program to slowdown 462 times? This is hard to explain.

Still on point 2, there are simpler optimizations, like keeping an buffer and offset and only reallocating the they differ too much. This would be of much less impact than shared buffers, but still.
Just to be clear, there are possible optimizations for many other functions as well, not just shift. Taking a slice could benefit too, for example.
I don't dislike either solution. Maybe a speed focused container could come as a shard so not everybody would have to fear unpredictable performance. Or maybe is should be in the standard Array itself, so that everybody can benefit the performance. I particularly like optimizing for the average user, even with surprising behavior.
I would like to hear from @asterite on this.

From a user perspective, I always liked how Array, Hash and String are super generally optimized data structures in Ruby. They can share data with other instances, they are mutable and can be made immutable, they have generally fast operations, etc. Of course that comes at the cost of implementing all of that. Maybe in Ruby it makes more sense because it's a dynamic language and implementing other data structures is inefficient, unless implemented in C. In most (all?) compiled languages you have different data structures, like in Java you have ArrayList, LinkedList, Dequeue, etc. That's nice but it's more cumbersome for the user, because she has to pick a data structure.
So... I don't know. If you need to shift a lot maybe just use another data structure? If sort! is missing in Dequeue maybe we should implement that? Maybe you can just use reverse! and then shift afterwards? It's hard to know without knowing what problem you are trying to solve, @benoist
Maybe adding an offset to Array is acceptable, I don't know. Maybe String could also have shared memory with parent strings to form views. I think all of that falls in the field of optimization, and right now that's not important, because that can always be done later without changing the external API.

This discussion should happen later once optimizations like this come to the top of our agenda, instead of simply features and stability. At that time we'll have a lot more data on array performance in practice.

@asterite I've written a simple column storage database with encoding and to convert the columns to rows again I was shifting the values to form the rows. I'm using iterators because the column storage is not always aligned to values that belong to the same row due to compression.
I'm keeping an offset now and iterate through the array instead of shifting. This allows me to use the sort function without an extra conversion to Deque.

What I find interesting is that I can read more about how ruby implements arrays here on crystal, than I can find on the ruby issue tracker or what not. Sorry for the distraction. ;-)

With regards to the discussion of tradeoffs. Using a circular buffer like in Deque, only incurs a slowdown when the Array has prepended or shifted elements. The added overhead is a memcpy of a subset less then half the size of the whole, which is much faster then the realloc that would have to be done every time an element is prepended or shifted in the current implementation.
For anyone Interested, this is the implementation used by NSArray in Cocoa.
http://ciechanowski.me/blog/2014/03/05/exposing-nsmutablearray/

There's also the thing that passing an Array to C is an O(1) operation right now. If we change Array to use a circular buffer that's not true anymore. I guess when passing it to C we'd have to rearrange its elements so that the first item is at the first position, and then we can pass a pointer. But once that's done there's no need to do that again, unless there's a subsequent shift. And since most array instances won't be passed to C maybe that's a good compromise, because the shift penalty is only payed when you pass it to C.
Then the other penalty is having each Array instance be 4 bytes bigger. Maybe that's not a big issue. We could probably try to remove Deque and let Array be implemented like that. It will simplify the choice a user has to make when choosing a data structure, and Array will be efficient as a stack and as a queue (like in Ruby).

Just a note: Array being a few bytes larger is probably not an issue. It could even be an optimization to make Array even larger (say 12 or 16 bytes more) to hold short arrays inline, as short arrays are common. This would need a benchmark, of course.

There's a bit of a problem: Deque.sort! does not exist, because sorting implementation is hardcoded in Array.

Couldn't you sort in reverse order? Then you could use pop.
Or you can find index of minimum, swap it with last element, and then pop.
Or you may make binary heap, and pop minimum/maximum as you go.
Do you really need sort! + shift, or it is just "quick and dirty way to remove smallest element"?

Do you really need sort! + shift, or it is just "quick and dirty way to remove smallest element"?

Well for my use case it was the best readable version of what it needs to do. I don't really care about actually removing the elements from the array it just saves having to keep an index and checking the index against the size. In ruby the speed was the same, in crystal it was different. That is not a problem, just a bit surprising. As shifting in it's current state is too slow for my use case, i've changed it to just looping through the elements in a sorted order. But if array gets implemented as Deque and shifting is fast again I might change it back for readability.

Looks like sorting in reverse order and pop will also do the job for you.

Yes that would also work :-)

@asterite there is no need in circular buffer. Just move array's content to the begin of allocation when allocation end is reached. That is the way Ruby's Array works actially. 'Shared array' is just implementation trick.
Crystal can use just pointer to begin of allocation, size of allocation, pointer to first element and size. In other words, only pointer to first element should be added (or pointer to begin of allocation).

@funny-falcon Yes, that's a possibility. But if you do shift + push in a loop doesn't it always grow the array infinitely? The current pointer would be increased but never decreased.

If Array will be used as Deque, then there should be amortization room, so move doesn't happen too often.
I did fix for Ruby's Array exactly for this scenario (ie Ruby as Deque).

@asterite

But if you do shift + push in a loop doesn't it always grow the array infinitely?

As I've said, when push reaches bound of capacity, and there is a room caused by shifts, elements are moved to begin of allocation.

If i'm not non-grata here, I can make PR for this.

@funny-falcon Sure! No one is non-grata here.
I still have my doubts about this, though: adding four bytes to all arrays for just one method that's maybe not used all the time. And for example in the OPs use case there was really no need for a shift.

Haven't we already mentioned that it's too early for this kind of optimization? Besides, this is nothing more than a workaround.

Bleh nevermind, not having to use Deque would be tempting.

Unless someone really wants to work on this I wouldn't encourage anyone in the core team to work on it instead of the many other things to do...

Just a quick question, what downsides are there of a deque over an array with a start offset from the allocation start? Apart from the obvious to_unsafe one, which I don't think is a big deal. I wouldn't have thought that the array accesses would have been slowed down much by the tiny bit of extra maths.

@asterite , single benefit of implementing this is getting rid of Deque, and being closer to Ruby.
All other issues could be solved with programmers discipline.
@RX14 simplest way is to not change usage of @buffer, just move it with shift (and, possibly, with unshift). There is only need to save pointer to allocation, or amount of elements @buffer were shifted from allocation (ie offset). In latter way allocation start is calculated as @buffer - @offset.

I'd preffer to store pointer to allocation.

First about the upsides of Deque and downsides of this suggested approach (which, frankly, has NOT been clearly described so far).
This kind of workaround cannot achieve its asymptotic complexity. Deque guarantees O(1) complexity when using a balanced number of push+shift or unshift+pop. This kind of shifted array would instead occasionally (with a constant factor!) cause an O(N) operation. So the improvement is by a constant factor (or as some would say, no improvement) over the basic Array.
Sure, it improves the situation of many consequent shift calls (which Deque also covers very well), but why all the complexity just for this case? And now I'm sure that it definitely cannot replace Deque.
The downside of a Deque is, hmm, I don't know, but it probably destroys various kinds of caches so is unforgivably slower at typical operations you do with it.

I really don't think that Deque will be any slower than Array in typical operations. The only downsides I can think of is that the prefetcher will get confused when wrapping, and that the branch prediction might fail too. Hopefully LLVM can compile it to a conditional move to avoid having to stall the pipeline.

In fact, instead of this suggestion, why not actually mix the implementations of Array and Deque? Have a shortcut scenario for when it's aligned. Re-align it to zero when required (to_unsafe) and before expensive operations (sort!).

@oprypin what do you mean by a "shortcut scenario". The check that offset + i < size will always be true and it'll just act like an array?

That or just offset == 0

@oprypin no, why? That means that there's more branches in the non-zero case and for what gain? Avoiding an addition instruction in a piece of code that is memory bound, not IPC bound anyway?

@oprypin , you are not fully correct about complexity. Yes, occasional single operation is O(n). But amortized complexity is still O(1), cause big move is made once in n/c operations, so its amortized complexity is O(n / (n/c)) = O(c) = O(1) (iirc c=8 in Ruby) . I will not be surprised if Array's amortized performance will exactly the same as Deque for push+shift patern.

@funny-falcon what about simple Hash implementation w/o normalization etc.?
Now I think that small PRs will be reviewed quickly.

LBTM, there are no reasons to mix Array with Deque.

there are no reasons to mix Array with Deque.

If I did language, I'd repeat Ruby's trick, just "because I can".
But yeah, given Deque already implemented, there is no much point.

@akzhan what are the reasons not to? Deque appears to be a superset of Array's functionality with the cost being in implementation complexity.

It's just my point. I rarely use Arrays in Deque manner.

I've created #5148 . It contains now smallest change in this direction.
To match with Deque, #insert, #delete_at and #unshift also should be improved.
If you strongly think, it is a way to go, then I will work in this direction.
Otherwise lets close this and #5148.


Add Makefile

Just copy & update the example https://github.com/gomzyakov/php-cs-fixer-config/blob/main/Makefile

@LeTraceurSnork
Can you make the PR?

NOTE: This repository is no longer supported or updated by @gomzyakov . If you wish to continue to develop this code yourself, we recommend you fork it.


How to use cloudpathlib for accessing custom S3 installations?

For instance, I've deployed MinIO to my cluster and have its endpoint URL.
The only solution that comes to my mind is to instantiate CloudPath with a boto3 client, authenticated to this endpoint.
Am I correct with this assumption?

I'm not familiar with MinIO. Is this documentation describing something similar your situation and how you'd access your S3 with boto3? https://docs.min.io/docs/how-to-use-aws-sdk-for-python-with-minio-server.html

@jayqi just posted a PR #137 as an example for it


Broken CSS

To replicate simply go to https://web-energyvision-dev.radix.equinor.com/about-us and click on top left logo to go back to the homepage

This is fixed already


Ability to store violation error message

In flumine.controls.__init__.py, BaseControl._on_error() logs error message then it is gone, something like
class BaseControl:
    def _on_error(self, order: BaseOrder, error: str) -> None:
        order.violation_message = error
        ....
   ...

to store error?

Like this?
https://github.com/liampauling/flumine/pull/298

yeah, it is the specific error string, looks like it's covered in the commit where the message is passed to the violation function order.violation(violation_msg). Do you know when that branch/task will be added to master? I am fairly new to Github so not 100% sure how that works

Will get a release out this evening or tomorrow am

Released in 0.14.1


Add macOS to github-release-build action

CI gfxreconstruct build # 4531 running.

Did this get tested by doing a release on a separate fork or anything like that?

CI gfxreconstruct build # 4531 failed.

CI gfxreconstruct build queued with queue ID 230113.

CI gfxreconstruct build # 4539 running.

CI gfxreconstruct build # 4539 passed.

Did this get tested by doing a release on a separate fork or anything like that?

not yet. I was looking for a manual trigger to test the action, but that seems not defined.
from what I see, the action is only run when pushing into a tag-branch:
on:
  push:
    tags:
      - v*

should I add a manual trigger for testing (and remove that afterwards) or is there another way to invoke the action?

Did this get tested by doing a release on a separate fork or anything like that?

not yet. I was looking for a manual trigger to test the action, but that seems not defined. from what I see, the action is only run when pushing into a tag-branch:
on:
  push:
    tags:
      - v*

should I add a manual trigger for testing (and remove that afterwards) or is there another way to invoke the action?

I think if you brought your dev on your fork of this repo or a separate temporary testing forked repo up to date with this branch, you could push a v* tag to that repo and that would start the "release" action and you'd see the results in Releases on that fork.
You can delete the release from the forked repo afterwards.  If you change dev on your personal development fork you can just force-push your dev back to matching the main dev after that.
You can see in my personal development fork that I've done that in the past and just was sloppy about deleting the releases: https://github.com/bradgrantham-lunarg/gfxreconstruct/releases

CI gfxreconstruct build queued with queue ID 231037.

CI gfxreconstruct build # 4548 running.

CI gfxreconstruct build queued with queue ID 231054.

looking good:
https://github.com/fabian-lunarg/gfxreconstruct/actions/runs/10280694169
@bradgrantham-lunarg

CI gfxreconstruct build # 4549 running.

CI gfxreconstruct build # 4549 passed.


Support inprocess hosting in IISExpressDeployer via switching the HostingModel property.

I added the HostingModel property a while ago, but it was never consumed. I will make reaction PRs in ServerTests and MusicStore.

@Tratcher Microsoft.AspNetCore.TestHost.ClientHandlerTests.ClientDisposalCloses failed both on AppVeyor and Travis; Managed HttpClient?


Document babel target env configuration

This adds a new file for "Babel Configuration" and links it from SUMMARY.md. Specifically, it explains the reason why we have browser targets configuration in two places. As to why I am adding a new file, currently there isn't a section dealing with the Babel setup. Since there is a file which explains linter configuration, I think it makes sense to have a file to document babel related things.
Preview link - sudo-suhas/pwa:docs/babel.md@docs-babel-preset-env
Note: This PR is a clone of vuejs-templates/webpack#1144(merged). If the docs are not maintained in this repo, please close the PR.

Thanks, @sudo-suhas!


Category factory: Expose CharacterBody2D velocity

And add a "Move and slide" statement block so it can be used.

Usage example:


[Assessor] Added request form

- Workflow :

- Step 1 :

- Step 2 :

- Step 3 :

Merged in https://github.com/EnMarche/en-marche.fr/pull/3571


What a bs reply.

Tails is probably blocking the connection - all non-Tor connections are blocked by default. I don't believe this is a Sparrow bug, so closing this issue.

Really Rick? A new issue just to complain about my reply?


multilabel confusion matrices

I got the following error for a multilabel problem:
UserWarning: multilabel confusion matrices not yet supported
warnings.warn('multilabel confusion matrices not yet supported')
Is there any plan to add this functionality in a feature release?
Thanks,
Jorge

Hello: I have marked this as an enhancement request to be added in future release.   Thanks.


Article show if published

Ticket and context
Ticket: HFEYP-547
Tech review
Updates to ticket 547 - show articles if they've been published
Also added published date to article page
How can someone see it in review app?

Click the link to review app (posted by a github-actions bot below)
Follow the steps from the ticket.

Did bello change his mind about having the published date on shown? Last I heard, that and the author would be added in the body of the content if needed and published date was only needed on the CMS side.

This is what he told me 1-2 weeks ago, just Title and Date on the article page. I'm not sure if he's told you something new since then?


Invalid CSS properties in follower script page header

I was looking at the follower script page header and noticed some invalid CSS applied to the header text. Properties in question shown with arrows ( <--- ):
.section-header {
font-size: 1.1em;
text-transform: uppercase;
font-weight: medium; <---
letter-spacing: .2; <---
}
I think these are supposed to be are font-weight: bold and letter-spacing: .2em.
Which one do you guys like better?
Current version:

Updated properties:

@kate-rose and I looked at it and decided to go with the third option of bold font weight and no letter spacing 🕶
I can make a quick PR for it now :)


Add php decryption example

Anvil user Derek Hildreth wrote sample code for us to include in our community repo. This code demonstrates how to decrypt Anvil payloads in PHP

I was going to create an issue, but in the same amount of time i could create this PR. Would one of you guys take this over the finish line?
I took a first stab at creating a folder structure that could house community submitted code snippets.


Header: intergrated my account

I've committed a suggestion, please check. Until data isn't used as real block, we can avoid blocks. Directives also works with data, however path looks differently, like

delete body.header.account.customer/links/overview
slash is used if you navigate data but not blocks.

If everything ok, please squash and merge


Additional Error Codes

we are seeing error 31044 for the passwordresetservice but its not listed on the table. Please update the table to provide information about this code.

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

ID: a6c7b290-3f3e-70c9-7524-80d7364dd763
Version Independent ID: d12b324f-57b2-9fd8-a433-b25644424171
Content: Troubleshoot self-service password reset writeback- Azure Active Directory
Content Source: articles/active-directory/authentication/troubleshoot-sspr-writeback.md
Service: active-directory
Sub-service: authentication
GitHub Login: @Justinha
Microsoft Alias: justinha

@DeanGross
Thanks for your feedback! I've assigned this issue to the author who will investigate and update as appropriate.

@DeanGross Sorry for delay. This is done.

#please-close


[FEATURE]: Don't assume 'None' for agency_id when column is missing from route table

I see this entry in my log and it is causing me to miss other issues that may be present:
2024-02-19 18:28:55.982 WARNING (MainThread) [custom_components.gtfs2.sensor] Agency ID 'None' was not found in agency table, you may want to update the routes database table to fix this missing reference
In my case, the agency.txt file has "CATS" as the agency_id value  and it is the only entry in the file.  The routes.txt file doesn't have a column for agency_id--and I don't believe it is required when there is only a single agency represented--my opinion only.
Can this message be scaled back to maybe only written upon start up of the service?

The agency is used to select the timezone it belongs to and can indeed be missing/incorrect.... I cannot tell as the loading of that is done by the external pygtfs library (out of my control). At the moment it indeed runs every time the sensor collects data and I have no 1-time-only setting for that. What I can do is to change the log level to 'debug'.

The agency table is present, it is just the agency_id value doesn't match what is assumed from the routes table what that table doesn't have an agency_id colunn.
If 'debug' can keep the message from showing up twice a minute, that would be great.

Changed it but will await more changes before creating a new release. If you are in a hurry you can update sensor.py yourselves :)

Fixed in 035


Add MTG card search functionality from CardBot

Don't approve this yet, I still need to test this to see if it works, but I'm putting up the PR now to get comments and such. Not entirely sure if the setup is correct here.
The idea is that the Scrython package needs to be included in a .zip of this project and put into the lambda to work. I don't think I want to put an entire other git repository into this one though (and git yells at you if you try). Not sure how we want to go about this for other contributors.
Resolves #55

According to the aws docs: https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
Use the pip --target  flag

At this point this probably just isn't going to happen, so I'm closing it. I don't think Animutiny is too hard up on bot slots at the moment, so I may just try fixing Cardbot on my own end instead of porting it to Lisa.

I'll leave the unmerged branch for a while just in case


[apptools] Add nodeunit cases for apptools

Impacted tests(approved): new 4, update 0, delete 0
Unit test platform: [Android]
Unit test result summary: pass 4, fail 0, block 0

LGTM


Sheets bugged after version update

The following is happening to me after the foundry update to 0.7.5 and the starfinder system update to 0.6.0/0.6.1
I tryed to reinstall the system, to reinstall the whole foundry, create new world, but it continues to happen.

Open up your devloper console on your browser (hit F12 on windows or linux, cmd+opt+i on a mac), and look for errors. Usually this happens when some of the data for an actor gets corrupted or is missing.

I should have added that you should post those errors here ;)

Hello, @wildj79
Thanks for your response.
Yes, there is errors on my browser console.

The manual installation worked, as you suggested. Closing this issue. Thanks a lot!


Missing top level data field during serialization?

Hi, Thank for this library. Just not sure if I'm serializing correctly as I'm missing the top level data field as required by JSON API spec 1.0.
let dict = JSONAPIResourceParser.dictionaryFor(object)

@v-ken Thanks for using the library 😊  Are you able to provide me with a sample object of what you are trying to parse? Easier to help with examples 😉

@joshdholtz Thanks for the quick response.
Looking at the current test case, the serialized dictionary has type and attributes at the top level but according to the spec,

A document MUST contain at least one of the following top-level members:

data: the document’s “primary data”
errors: an array of error objects
meta: a meta object that contains non-standard meta-information.

So, it should be
{
  "data": {
    "type": "articles",
    "id": "1",
    "attributes": {
      // ... this article's attributes
    },
    "relationships": {
      // ... this article's relationships
    }
  }
}

instead of,
{
    "type": "articles",
    "id": "1",
    "attributes": {
      // ... this article's attributes
    },
    "relationships": {
      // ... this article's relationships
    }
}

Not a huge issue as we can just wrap the dictionary in another data level. Just wondering if this was intended?

@v-ken I personally did not write the serializer part of this library (somebody else kindly wrote it for me) so I'm not actually sure if it was intended or not 😇  but I think the intention of this was to only output the serialized object itself (leaving out the data wrapper). The dictionaryForObject method only outputs the dictionary for the object and not the whole request.
We probably could/should add a helper to add that data for you though. I'm resisting to add the data into this call because that would be a pretty nice breaking change but we could create a new call with another parameter added on that adds the data around that object. It would look something like
let dict = JSONAPIResourceParser.dictionaryFor(object, wrapInData: true)

Thoughts?

@joshdholtz Looks good!
Not urgent though, as manually wrapping it ourselves is really not that much of an issue. Just thought it might have been unintentional rather than intended.


fixes #18 to use embit wordlist

this removes the need to hard code the bip39 English word list into seedsigner code

Will pull this branch down and make sure word entry is working fine before approving the PR.

Good idea, looks good, thank you.


Everything Be True bonfire function name incorrect

Challenge Everything Be True has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36.
The tests are calling a function called truthCheck, but the code populates a function called every. Until you change the function name to match the test, the tests will always fail. This might be an intentional speed bump, but I can't tell, and it's super confusing when the tests have matched the provided function name up until this point.

Hello @megnotarte, thanks for reporting.
I can't replicate the issue. If you hit the reset button, it populates with the correctly named function. Can you elaborate?

@BerkeleyTrue Checking again, since I had loaded the bonfire and worked on it over the course of a few days. I don't see the issue anymore. Closing this!

Actually I had this problem too. The function in the console was called "every" which was not being called. I had to change it to truthCheck by hand.


chore(main): release 0.0.0

:robot: I have created a release beep boop
0.0.0 (2024-03-25)
init

工程初始化 (7eeb06a)

Continuous Integration

修改 Commitlint 与 Husky 的配置 (530d11c)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/thelastcookies/WEB-BASE/releases/tag/v0.0.0 :sunflower:


🐞 Bug: Heading Color Defaults to White For All Colorschemes

Before reporting:

[X] Ensure that the issue is reproducable on the main branch.
[X] Ensure that there isn't an issue on this(either open or closed).

Problem:
When I open a markdown file, my headings always get colored with the default white color, regardless of colorscheme. I am sure to set my colorschemes after all plugins load. The ways I've learned to fix this are to

also change the colorscheme to what is wanted within the lua file that I have to configure the markview plugin for Lazy (under the config = function() section. So effectively, my fix is to improperly set the colorscheme early, then set it again when I would expect it.
change the colorscheme during my session to force it to load.

Example 1: I set my colorscheme to catppuccin at the end of my plugin loading. They load in as white.

I then type colorscheme catppuccin and now the headings work

Example 2: I set my colorscheme in the plugin file that is returned to Lazy as well as after plugins are loaded.

After it is loaded twice, I open the file and the headings are correct on first try

I have reproduced this on nvim 0.10.1 with the following plugins

Steps to reproduce the issue:
Open a markdown file
Expected behavior:
Markview should have rendered the headings in the correct colorscheme upon opening the file without the need to set the colorscheme again.
Neovim version:
0.10.1

I am sure to set my colorschemes after all plugins load.

That's the problem. It should be loaded before this plugin.


arm architecture ?

Hello,
Can you adapt the code to work on a remote ARM machine ?
For example, for : Odroid ARMBIAN 5.38 (Ubuntu 16.04.6 LTS)
Currently we have the following error message:
bash: / tmp / codessh-code-server: can not execute binary file: Exec format error
Thank you in advance.

We're tracking ARM support over on the code-server repo. See: https://github.com/codercom/code-server/issues/35