text:
[9.x] Allow using a model instance in place of nested model factories

For applications with nested model factories, tests and seeders can get a little overwhelming when you want the nested models to all be related to a specific model.
For example, imagine you have User, Team, and Post models where posts belong to a user and a team, and the team also belongs to a user.
The following factory call would create two user records. One for the post itself, and one for the team that the post factory created.
$post = Post::factory()->create();

To get around this, you might write something like the following:
$user = User::factory()->create();
$post = Post::factory()
    ->for($user)
    ->for(Team::factory()->for($user))
    ->create();

That's still pretty nice! But maybe your posts have images that also belong to a team and/or a user. It can get out of control pretty quickly, and this is far from the most complex nesting I've seen.
This PR introduces a new using method for factories that allows you to provide one or more model instances to be used in place of any nested factories for the given models. What's more, it works recursively, automatically passing the model instances to any nested factories.
For our example above, your code would now look something like this:
$user = User::factory()->create();
$post = Post::factory()
    ->using($user)
    ->create();

In this example, the post and the nested team would all be owned by the provided user instance, with no additional records created. Depending on your application, this will either tidy up your factory calls, or it will prevent superfluous models from being created.
Of course, to take advantage of this feature, your factories must specify other factory instances in their definitions. If your factory definition calls the create method on any nested factories, then the created model will be used instead of anything passed to the using method.

This is a huge win for cleanliness.
One thought, maybe "using" could be called "provide". Being a vue user of provide, I personally wouldn't overlook "using" and realize "provide" was for all children.

I prefer to keep ->using() to be consistent on how we define a custom pivot model when defining a belongs to many relationship.
But I agree this PR is a huge time saver.

I agree that using usually has a different meaning in Laravel.
What do you think about:
Post::factory()
        ->recycle($user)
        ->create();

Recycle is not very clear IMO, it could mean that something is trashed and then repurposed, It could be confused with delete/restore. Maybe reuse is more accurate?

i think reuse is more clear

@jessarcher it won't work when following this approach: https://laravel.com/docs/9.x/eloquent-factories#defining-relationships-within-factories
// PostFactory
public function definition()
{
    return [
        'user_id' => User::factory(),
    ];
}

// in your test
$user = User::factory()->create();
Post::factory()->recycle($user)->create();
Post::factory()->recycle($user)->create();

ray(User::count()); // 2

Post Model:
class Post extends Model
{
    use HasFactory;

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}

Post Factory:
class PostFactory extends Factory
{
    protected $model = Post::class;

    public function definition(): array
    {
        return [
            'title' => fake()->words(5, true),
            'user_id' => User::factory()->create(),
        ];
    }
}

DatabaseSeeder:
public function run()
    {
        // Creates 1 posts + 1 users
        // Post::factory()->create();

        // Creates 10 posts + 10 users
        // Post::factory(10)->create();

        // Creates 1 posts + 2 users
        // Post::factory()
        //    ->recycle(User::factory()->create())
        //    ->create();

        // Creates 10 posts + 11 users
        Post::factory(10)
            ->recycle(User::factory()->create())
            ->create();
    }

Am I using it wrong?

Hi @basepack, I can't replicate this. Using your code in a fresh Laravel project, I only have one User at the end.
Are you sure there's only 1 user in your database just before you call the Post factory? And are you sure that your PostFactory is just returning the User factory, without calling the create method on it?

without calling the create method on it?

That threw me off at first.

Hi @jessarcher, @martin-ro, no I do not call ->create(), I will post my complete setup here, maybe that will uncover the issue:
// SiteFactory
namespace Database\Factories;

use App\Models\User;
use Faker\Provider\Uuid;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Site>
 */
class SiteFactory extends Factory
{

    public function definition()
    {
        return [
            'uuid' => Uuid::uuid(),
            'user_id' => User::factory()->create()->id,
            'domain_name' => $this->faker->domainName,
        ];
    }
}

// EmailaddressFactory
namespace Database\Factories;

use App\Models\Site;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Emailaddress>
 */
class EmailaddressFactory extends Factory
{
    public function definition()
    {
        return [
            'emailaddress' => $this->faker->unique()->safeEmail,
            'site_id' => Site::factory(),
        ];
    }

    public function withEmailaddress(string $emailaddress): self
    {
        return $this
            ->state([
                'emailaddress' => $emailaddress,
            ])
            ->for(
                Site::factory([
                    'domain_name' => str($emailaddress)->after('@')->toString(),
                ])
            );
    }
}

it('test', function () {
    $site = Site::factory()->create([
        'domain_name' => 'example.com',
    ]);

    $adminEmail = Emailaddress::factory()
        ->recycle($site)
        ->withEmailaddress('info@example.com')
        ->create();

    $userEmail = Emailaddress::factory()
        ->recycle($site)
        ->withEmailaddress('user@example.com')
        ->create();

    ray(Site::count()); // 3 <-- should be 1
    ray(Emailaddress::count()); // 2
});

Thanks @basepack, I was able to replicate it with this setup. It looks like it's the for call in the withEmailaddress state that's triggering the extra site(s) to be created.
I'll dig into this properly tomorrow.

This is a great feature, making factories much easier to write.
However, could we maybe go 1 step further, allowing for providing multiple models of a given type, which would be then randomly picked? This would allow developers to provide their own, already created pool of models, so they could be reused in all nested relations.
For example, we often see that the User model relates to everything - as an author of some content, comments, reactions, performed operations etc. In more complex applications, that nesting can go deep. In that scenario, much better would be seeding a number of users once and then reusing them in other relations (so we don't create a user only to be the author of a single comment). If that nested reuse could be achieved with a one-liner (which seems to be not far away from what this PR achieves), that would be a game changer.
In my opinion, Eloquent Factories is a great concept and the only thing it lacks is better support for model reuse. That enhancement would fix that and make them much more versatile.

Hey @basepack, I've created #44265 to address your issue :+1:

@michal3377 Feel free to attempt a PR. I can potentially see the benefit in seeders where you might want a handful of users to be used throughout instead of either recycling a single user, or creating a new user for every relationship.

@jessarcher thanks for that, looks good! 👍

today I realized recycle is basically the "primer" feature I tried to get merged 5 years ago 😂
https://github.com/laravel/framework/pull/30880

authors: WAZIRI123 basepack browner12 dillingham jessarcher martin-ro michal3377 rodrigopedra sebdesign taylorotwell


text:
[11.x] Switch Js::encode() to return HtmlString

Updating the Js::encode() helper to return an instance of HtmlString rather than a raw string.
The primary reason is to support using the normal escaping Blade tags: {{ Js::encode() }}, rather than {!! Js::encode() !}}, when using this in Blade. This will then match the behaviour already possible with Js::from() which returns an instance of Htmlable and supports {{ Js::from() }}.
Since this is a breaking change, it will need to go into v11 - hence the master branch.
There are no downsides to this change, it may just require minor code updates - which should be trivial to identify and perform with a search for Js::encode(.

Thanks. Paging in @calebporzio to see if this affects Livewire.

@calebporzio took a Quick Look at this one but didn't see anything wrong with it at first sight. So marking this as ready for review again.

@taylorotwell does that mean this'll need to wait for Laravel 12?
Can we apply this to master now so it doesn't get forgotten again?

Best to just attempt a PR @valorin

source: gharchive/pull-request

authors: driesvints valorin

repo: laravel/framework

license: MIT

license_type: permissive

license_source: github-api


text:
[11.x] Add phpstan assertions for last in Collection isEmpty and isNotEmpty

#51998 and #52184 added PHPStan assertions for Collection::first() in Collection::isEmpty() and Collection::isNotEmpty()
This PR adds the same for Collection::last() as it would be very useful
/**
 * @var Collection<int, string>
 */
$collection = new Collection(['laravel']);

if ($collection->isNotEmpty()) {
    // before this PR:
    \PHPStan\dumpType($collection->last()); // Dumped type: string|null

    // after this PR:
    \PHPStan\dumpType($collection->last()); // Dumped type: string
}

Thanks !


text:
fix change column in Grammar.php

Bug found changing a float to decimal.
Artisan returns
'Doctrine\DBAL\DBALException' with message 'Unknown column type "decimal(8, 2)"
because $this->getType($fluent) returns decimal(8,2).
$fluent['type'] should be used in order to call the proper Doctrine getType function to work

Tests?

Sorry Graham, I'm new on tests :( don't know how.
I did some dd just to figure out where it hanged.

authors: GrahamCampbell angelomaragna


text:
Latest reply user profile link is broken on threads

On forum page, the little description under each thread, something like this
posted by [OriginalAuthor] - latest reply X hours ago by [LastReplyAuthor] <= the link is broken

Attached a screenshot.

Should be fixed now. Thanks for reporting!

source: gharchive/issue

authors: awsp driesvints


text:
Obtain ParserPuppet directly?

Suggestion
I'm writing a language server with Lark, and I'm using a recursion-based approach for error handling and inference. For this I make use of ParserPuppet extensively, as a helper to store copies of states and try other branches. However, right now ParserPuppet can only be created through exceptions during parsing. It would be much more convenient if there is a method that generates a ParserPuppet directly based on the initial states of the parser, so that I can start off with a puppet at the root.
This should be as simple as creating a method similar to _Parser.parse in LALR_Parser but instead returning a ParserPuppet instead of parsing.
Describe alternatives you've considered
Creating a ParserPuppet manually, but this feels quite hacky as ParserPuppet, ParserState and ParseConf are not explicitly exported.
Additional context
None

The 'problem' is that ParserPuppet is lalr specific:

We can have a method on Lark that fails if parser!='lalr'. This would probably mean we would create get_puppet methods for all classes in the .parser chain.
We could have a method only on LALR_Parser/lalr_parser._Parser. This would be accessed with lalr_instance.parser.parser.parser.create_puppet() (plus minus a parser). I don't like this. It would also kinda force us to fix that part of the internals.
The method could also be ParserPuppet.create(lark_instance, text). I don't like this either.

How about an optional keyword argument for Lark.parse() (e.g. get_puppet), which if True, will return a ParserPuppet if we are using an LALR_Parser, or throws an exception otherwise?

@evilnose I created a PR: #869

Great, thank you!

authors: MegaIng evilnose

repo: lark-parser/lark


text:
Create Pages “info”

Automatically generated by Netlify CMS

👷 Deploy Preview for singular-belekoy-185ac4 processing.

Name
Link

🔨 Latest commit
209e7dbdc74ad2d0588ba273319cee88f20fd790

🔍 Latest deploy log
https://app.netlify.com/sites/singular-belekoy-185ac4/deploys/677010c93371d400085e4b40

repo: lassepehkonen/astro-decap-haasivu


text:
[hf parser] Text2Image: Use GPU if available

[hf parser] Text2Image: Use GPU if available
Based on Ankush's comments in https://github.com/lastmile-ai/aiconfig/pull/460#discussion_r1424810992
Wanted to make this a separate diff to show the effect it has in test plan. Tested by rabsing onto: https://github.com/lastmile-ai/aiconfig/pull/461

Testing by rebasing onto https://github.com/lastmile-ai/aiconfig/pull/461

Before
After

repo: lastmile-ai/aiconfig


text:
{WIP} default enable_telemetry is False, env info

{WIP} default enable_telemetry is False, env info

default config.yaml

Stack created with Sapling. Best reviewed with ReviewStack.

-> #865
#864

sapling rememnant of #899


text:
About pretrained resnet on shapenet image dataset

hi,thank you to release this nice work! I want follow this do some further experiments, could you offer pretrained resnet on shapenet image dataset?

Can you download the pre-training model? If so, can you share it with me? thank you

repo: laughtervv/DISN


text:
Connect a PgListener with PgConnectOptions

Pool has two connect function variants, one from a raw Postgres URI connect and one from a typed PgConnectOptions connect_with.
PgListener also has two connect function variants, one from a raw Postgres URI connect and one from a pool connect_with.
I need a function to use PgConnectOptions to connect a PgListener.
As connect_with has already been taken, a non-breaking solution would be connect_with_option.
In my opinion, we should have connect, connect_with and connect_with_pool to match the names of the Pool functions.

is #2924 related to this?

authors: Virgiel nMessage

repo: launchbadge/sqlx


text:
Fix several inter doc links

Fix several inter doc links.
Might fix more while looking though the documentation.

If you rebase it should hopefully fix those errors.

Nitpick about PR title / commit message, this kind of link is called "intra-doc", not "inter-doc".

@ralpha can you rebase? It should fix the build.

authors: abonander jplatte ralpha


text:
Add .csv to gitignore

Standard formatting options in this program are yaml and csv. This
commit add all *.csv to gitignore. Generated files are not shown as
untracked changes anymore.

@lauripiispanen

Thanks for the contribution, @fabianschwarzfritz! I've merged it in my fork (see the commit referenced above).

authors: ashkulz fabianschwarzfritz


text:
Tests for Clusters

Clusters need testing. Create a test for all cluster functions with observable effects.
ClusterGreenhouse too

clusters removd

repo: lavinrp/GameBackbone


text:
(GREGTECH Ore Gen) Ore block descriptor for CoalBedHintVeins is empty or does not match any registered blocks

I have a problem with your mod and Gregtech Community Edition on 1.12.2, it seems to stop the server from generating and loading existing worlds!
What I've tried:

Deleting the world
Deleting the configs
Trying to manually fix this error in COG and Gregtech configs, or stop the coal beds from generation to avoid the error
Reinstalled whole server

Nothing helped((
Please, can you provide some fixes to your mod, just because your mod can't be replaced with other ore generation mods, it have all the functions I need!
MC version: 1.12.2
Forge version: 1.12.2-14.23.5.2847
Gregtech version: 1.12.2-1.8.13.465
COG version: 1.12-1.8.1 and 1.8.0 tried
Error log available below
[00:02:32] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[00:02:32] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLServerTweaker
[00:02:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLServerTweaker
[00:02:32] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2847 for Minecraft 1.12.2 loading
[00:02:32] [main/INFO] [FML]: Java is OpenJDK 64-Bit Server VM, version 1.8.0_40, running on Linux:amd64:4.19.0-5-amd64, installed at /home/minecraft/jdk/java-se-8u40-ri/jre
[00:02:33] [main/WARN] [FML]: The coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin) is not signed!
[00:02:33] [main/WARN] [FML]: The coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin) is not signed!
[00:02:33] [main/INFO] [FML]: Searching /home/minecraft/Server_1.12.2/./mods for mods
[00:02:33] [main/INFO] [FML]: Searching /home/minecraft/Server_1.12.2/./mods/1.12.2 for mods
[00:02:33] [main/INFO] [FML]: Loading tweaker codechicken.asm.internal.Tweaker from ChickenASM-1.12-1.0.2.7.jar
[00:02:33] [main/WARN] [FML]: Found FMLCorePluginContainsFMLMod marker in gregtech-1.12.2-1.8.13.465.jar. This is not recommended, @Mods should be in a separate jar from the coremod.
[00:02:33] [main/WARN] [FML]: The coremod GTCELoadingPlugin (gregtech.common.asm.GTCELoadingPlugin) is not signed!
[00:02:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[00:02:33] [main/INFO] [LaunchWrapper]: Loading tweak class name codechicken.asm.internal.Tweaker
[00:02:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[00:02:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[00:02:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[00:02:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[00:02:36] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[00:02:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[00:02:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[00:02:36] [main/INFO] [LaunchWrapper]: Calling tweak class codechicken.asm.internal.Tweaker
[00:02:36] [main/INFO] [STDOUT]: [codechicken.asm.internal.Tweaker:injectIntoClassLoader:30]: false
[00:02:36] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[00:02:37] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[00:02:37] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[00:02:38] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.server.MinecraftServer}
[00:02:46] [Server thread/INFO] [minecraft/DedicatedServer]: Starting minecraft server version 1.12.2
[00:02:46] [Server thread/INFO] [FML]: MinecraftForge v14.23.5.2847 Initialized
[00:02:46] [Server thread/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients.
[00:02:46] [Server thread/INFO] [FML]: Invalid recipe found with multiple oredict ingredients in the same ingredient...
[00:02:46] [Server thread/INFO] [FML]: Replaced 1227 ore ingredients
[00:02:46] [Server thread/INFO] [FML]: Searching /home/minecraft/Server_1.12.2/./mods for mods
[00:02:46] [Server thread/INFO] [FML]: Searching /home/minecraft/Server_1.12.2/./mods/1.12.2 for mods
[00:02:47] [Server thread/WARN] [FML]: Mod codechickenlib is missing the required element 'version' and a version.properties file could not be found. Falling back to metadata version 3.2.3.358
[00:02:47] [Server thread/INFO] [FML]: Mod customoregen is missing the required element 'name'. Substituting customoregen
[00:02:47] [Server thread/WARN] [FML]: Mod gregtech is missing the required element 'version' and a version.properties file could not be found. Falling back to metadata version 1.8.13.465
[00:02:48] [Server thread/INFO] [FML]: Forge Mod Loader has identified 8 mods to load
[00:02:48] [Server thread/WARN] [FML]: Missing English translation for FML: assets/fml/lang/en_us.lang
[00:02:48] [Server thread/WARN] [FML]: Missing English translation for codechickenlib: assets/codechickenlib/lang/en_us.lang
[00:02:48] [Server thread/WARN] [FML]: Missing English translation for customoregen: assets/customoregen/lang/en_us.lang
[00:02:49] [Server thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, codechickenlib, customoregen, gregtech, rtg] at CLIENT
[00:02:49] [Server thread/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, codechickenlib, customoregen, gregtech, rtg] at SERVER
[00:02:50] [Server thread/INFO] [FML]: Processing ObjectHolder annotations
[00:02:50] [Server thread/INFO] [FML]: Found 1169 ObjectHolder annotations
[00:02:50] [Server thread/INFO] [FML]: Identifying ItemStackHolder annotations
[00:02:50] [Server thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[00:02:50] [Server thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[00:02:50] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[00:02:51] [Server thread/INFO] [gregtech]: 0 annotated material handlers registered
[00:02:51] [Server thread/INFO] [gregtech]: Freezing material registry...
[00:02:53] [Server thread/INFO] [gregtech]: Registering MetaTileEntities
[00:02:54] [Server thread/INFO] [gregtech]: Registering Blocks...
[00:02:54] [Server thread/INFO] [FML]: Applying holder lookups
[00:02:54] [Server thread/INFO] [FML]: Holder lookups applied
[00:02:54] [Server thread/INFO] [gregtech]: Registering Items...
[00:02:55] [Server thread/INFO] [FML]: Applying holder lookups
[00:02:55] [Server thread/INFO] [FML]: Holder lookups applied
[00:02:55] [Server thread/INFO] [FML]: Applying holder lookups
[00:02:55] [Server thread/INFO] [FML]: Holder lookups applied
[00:02:55] [Server thread/INFO] [FML]: Applying holder lookups
[00:02:55] [Server thread/INFO] [FML]: Holder lookups applied
[00:02:55] [Server thread/INFO] [FML]: Injecting itemstacks
[00:02:55] [Server thread/INFO] [FML]: Itemstack injection complete
[00:02:55] [Server thread/INFO] [minecraft/DedicatedServer]: Loading properties
[00:02:55] [Server thread/INFO] [minecraft/DedicatedServer]: Default game type: SURVIVAL
[00:02:55] [Server thread/INFO] [minecraft/DedicatedServer]: Generating keypair
[00:02:55] [Server thread/INFO] [minecraft/DedicatedServer]: Starting Minecraft server on *:25565
[00:02:55] [Server thread/INFO] [minecraft/NetworkSystem]: Using epoll channel type
[00:02:55] [Server thread/INFO] [gregtech]: Registering ore dictionary...
[00:02:56] [Server thread/INFO] [gregtech]: Registering OreDict entries.
[00:02:56] [Server thread/INFO] [gregtech]: Registering recipes...
[00:02:56] [Server thread/INFO] [gregtech]: Modifying vanilla recipes according to config. DON'T BE SCARED OF FML's WARNING ABOUT DANGEROUS ALTERNATIVE PREFIX.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `bucket`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `heavy_weighted_pressure_plate`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `light_weighted_pressure_plate`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `iron_door`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `iron_trapdoor`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `cauldron`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `hopper`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `iron_bars`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `bowl`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `paper`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `sugar`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:56] [Server thread/WARN] [FML]: Potentially Dangerous alternative prefix `minecraft` for name `flint_and_steel`, expected `gregtech`. This could be a intended override, but in most cases indicates a broken mod.
[00:02:57] [Server thread/INFO] [gregtech]: Running early material handlers...
[00:02:59] [Server thread/INFO] [gregtech]: Running late material handlers...
[00:02:59] [Server thread/INFO] [FML]: Applying holder lookups
[00:02:59] [Server thread/INFO] [FML]: Holder lookups applied
[00:02:59] [Server thread/INFO] [gregtech]: Initializing ore generation registry...
[00:02:59] [Server thread/INFO] [gregtech]: Reloading ore generation files from config...
[00:02:59] [Server thread/INFO] [gregtech]: Loaded 53 worldgen definitions
[00:03:00] [Server thread/INFO] [gregtech]: Registering cover behaviors...
[00:03:00] [Server thread/INFO] [gregtech]: Registering dungeon loot...
[00:03:00] [Server thread/INFO] [FML]: Injecting itemstacks
[00:03:00] [Server thread/INFO] [FML]: Itemstack injection complete
[00:03:00] [Server thread/INFO] [customoregen]: Loading global config '/home/minecraft/Server_1.12.2/config/CustomOreGen' ...
[00:03:00] [Forge Version Check/INFO] [forge.VersionCheck]: [codechickenlib] Starting version check at http://chickenbones.net/Files/notification/version.php?query=forge&version=1.12&file=CodeChickenLib
[00:03:03] [Server thread/INFO] [FML]: Forge Mod Loader has successfully loaded 8 mods
[00:03:03] [Server thread/INFO] [minecraft/DedicatedServer]: Preparing level "NW"
[00:03:04] [Server thread/INFO] [FML]: Loading dimension 0 (NW) (net.minecraft.server.dedicated.DedicatedServer@1ac01b6b)
[00:03:04] [Server thread/INFO] [minecraft/AdvancementList]: Loaded 488 advancements
[00:03:05] [Server thread/INFO] [RTG]: World Seed: -6299757100929148188
[00:03:05] [Server thread/INFO] [customoregen]: Loading config data for dimension './NW/DIM0' ...
[00:03:06] [Server thread/ERROR] [customoregen]: Problem loading world config
java.lang.IllegalStateException: *Ore block descriptor for CoalBedHintVeins is empty or does not match any registered blocks.*
	at CustomOreGen.Server.MapGenOreDistribution.validate(MapGenOreDistribution.java:371) ~[MapGenOreDistribution.class:?]
	at CustomOreGen.Server.MapGenVeins.validate(MapGenVeins.java:142) ~[MapGenVeins.class:?]
	at CustomOreGen.Server.ServerState.validateDistributions(ServerState.java:110) [ServerState.class:?]
	at CustomOreGen.Server.ServerState.onServerChanged(ServerState.java:313) [ServerState.class:?]
	at CustomOreGen.Server.ServerState.checkIfServerChanged(ServerState.java:284) [ServerState.class:?]
	at CustomOreGen.ForgeInterface.onLoadWorld(ForgeInterface.java:48) [ForgeInterface.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_40_ForgeInterface_onLoadWorld_Load.invoke(.dynamic) [?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
	at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:309) [MinecraftServer.class:?]
	at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:270) [nz.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]

I'll be very appreciated to talk about this error and how to fix it. Thank you!

The configuration file probably needs to be updated. Note that the mod automatically copies fresh XML files from its jar file on every load. If you already know how to fix the config, you could make a fork of this repository, fix it, and submit a pull request.

Sorry, but I'm not sure how to do it, can you help me with that?

The configuration file probably needs to be updated. Note that the mod automatically copies fresh XML files from its jar file on every load. If you already know how to fix the config, you could make a fork of this repository, fix it, and submit a pull request.

I just need to mention, that I've tried to delete config files in /config directiory, so the mod pulled default config files from its jar, and nothing happened - the error still persists.

The configuration is out of date, in the mod itself, because Gregtech changed their block identifiers. I'm not going to have time to fix this, but if someone wants to contribute something, I'd be happy to accept a pull request.

authors: JalapenoPepper lawremi

repo: lawremi/CustomOreGen

license_source: bigquery


text:
[CI] Add automatic GitHub issue labeler configuration for Cloud and MeshMap paths

Current Behavior
GitHub PRs are not auto labeled based on the docs sections that they affect.
Implementation
e.g. content/en/meshmap/**/* should be automatically labeled with component/cloud-docs (https://github.com/layer5io/docs/labels/component%2Fcloud-docs)
Acceptance Tests
Both Cloud and MeshMap sections are covered.

Contributor Guides and Resources

🛠 Meshery Build & Release Strategy
🎨 Wireframes and designs for Layer5 site in Figma (open invite)
🙋🏾🙋🏼 Questions: Layer5 Discussion Forum and Layer5 Community Slack

I would like to work on this

Thank you, sir.


text:
Use fixed footer

Desired State of the GetNighthawk.dev site

Use fixed footer across the website so that it stays at the bottom even when the content in the page is very less.

There is whitespace below the footer if it is not obvious from the screenshot.

Contributor Resources

See the Contributing to getnighthawk.dev Website
See the Project Site section of GetNighthawk project doc

@navendu-pottekkat I think you mean a fixed footer right? A sticky one would travel with the page.

Yes, that is what I meant. Bad with UI jargons.

@navendu-pottekkat can you please mention the steps to reproduce the error? The footer seems fine on my device (Chrome).

Yes, this works fine for me too, even if the content is less... is the error reproduced in a specific page?? // @navendu-pottekkat

https://getnighthawk.dev/docs/section2
i think this would help. @ruhi09 @toth2000

Okay, I will look into it.

Huh, that's weird 🤔🤔. This is in chrome though.

@ruhi09 try checking different resolutions using the chrome developer tools.

@toth2000 yes, it is visible only in some resolutions, I get it!

I looked into the issue and it is caused by the empty content. It will get fixed automatically when we add content to the empty sections. For now, it can be fixed by setting the height of the div container containing Test text to 100vh. What do you people think?

If empty page is the issue, then it should not be an issue. Because I opened a PR that adds content.

@navendu-pottekkat I checked your PR. If the content height is not enough, the issue persists. I have created a PR to fix this.


text:
[Docs] README - Add NGINX Service Mesh adapter

Current Behavior
NGINX Service Mesh is missing. A new adapter has been created - https://github.com/layer5io/meshery-nginx-sm
Desired Behavior

Meshery's readme should have NGINX Service Mesh adapter listed as an alpha adapter.
use the Nginx service mesh logo recently included in the https://layer5.io/landscape

Contributor Resources

Meshery documentation site
Meshery documentation source
Instructions for contributing to documentation

I would like to work on this issue

Yeah sure @UnkleTayo ✌

I will start right away

authors: UnkleTayo kishore007k leecalcote


text:
Loosen Sidekiq dependency constraint to allow upgrade

First of all: thanks for the great project! This is really neat and clean and saved me from writing a hacky solution myself :)
While trying to upgrade to Sidekiq 4.x I ran into the problem that sidekiq-gelf-rb was stopping bundler from upgrading Sidekiq, since the dependency is defined as ~> 3, which doesn't include Sidekiq 4.x.
After checking the current Sidekiq code, the documentation for Sidekiq middlewares and running it locally with some debug statements I think this gem still works perfectly fine with Sidekiq 4.x.
And this change loosens the dependency definition so it's possible to upgrade to Sidekiq 4.x.
What do you think?

Yeah, it doesn't appear that the middleware system was changed in Sidekiq 4 so this gem should definitely work fine. Thanks for the PR!

That was fast! Nice. Thanks a lot for merging this!
Are you planning to release a new version soon?

Yeah working on that now.

:raised_hands: Version 1.2.0 :raised_hands:

Thanks very much!

authors: meltingice mrnugget

repo: layervault/sidekiq-gelf-rb

license: mit


text:
Removed SecureRadom dep

I don't think we need this dependency anymore since it was only being used to generate a random hash to the auth_token field on users which was already removed and if we want to go back to this approach again we can use guardian or bcrypt to generate random token.

Love it!
I love deleting code!
good job!

authors: lbighetti webofbits

repo: lbighetti/hades


text:
Channel Descriptions

The Issue
The current channel page looks a bit empty with the "Channel pages are empty for all publishers currently, but will be coming in a future update." message.  Can we add this issue to the Publishing Epic to at least add some descriptions to channels?
In the future, other channel data could include:
Channel Image
Stats (creation date, total subscribers, total videos, total views, etc)
Tip Button (channel side vs content side)
Contact information
Linked channels?
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

Yes, I have the same request.  Having a channel without a description of the channel really doesn't do much for the content, except give the publisher a place to put it.  Also, I noticed that doing a search for a channel name (@whatever) doesn't return any meaningful results, just a list of files that has a portion of the search string in the file name or title.

@unclejed613 search is being worked on i heard it was almost finished

You definitely could do a linked channels list, but I'd like a social media links list better IMO.

related to https://github.com/lbryio/lbryschema/issues/21

/link #2462

Displaying new channel metadata on pages was added in #2462
Support for publishing/editing channels with these fields will come later. But it's possible to do it from the sdk cli right now.

authors: MSFTserver liamcardenas seanking2919 seanyesmunt tzarebczan unclejed613

repo: lbryio/lbry-app


text:
Use something other than "types" for action types

Now that we are adding flow, I think we should change types to actions to prevent confusion.
Snippet:
import * as types from "constants/action_types";
reducers[types.FETCH_AVAILABILITY_STARTED] = function(state, action) {
    ....
};

import * as actions from "constants/action_types";
reducers[actions.FETCH_AVAILABILITY_STARTED] = function(state, action) {
    ....
};

See https://github.com/lbryio/lbry-app/pull/652#discussion_r154789628 for my thoughts on approach here

authors: kauffj seanyesmunt


text:
Allow delete of LBRY/local content on DMCA page

The Issue
Similar to https://github.com/lbryio/lbry-desktop/issues/1719 but for downloaders. We should have the delete option available to users who have downloaded DMCA/copyright content and wish to delete it from LBRY/local drive.
The page should show the local path and a delete button if the file exists in file_list.
Suggested Solutions
Tell us your suggested solutions if you have any.
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Anything Else

Screenshots

Acceptance Criteria

Definition of Done

[ ]  Tested against acceptance criteria
[ ] Tested against the assumptions of the user story
[ ] The project builds without errors
[ ] Unit tests are written and passing
[ ] Tests on devices/browsers listed in the issue have passed
[ ] QA performed & issues resolved
[ ] Refactoring completed
[ ] Any configuration or build changes documented
[ ] Documentation updated
[ ] Peer Code Review performed

How do I view the DMCA page?

Create a sample claim and paste it here, I can add it to the blocklist. This will be changing a bit once we move away from blocklists, but we'll need to make similar changes in other areas.
Thanks for taking a look!

I created this template based on https://lbry.com/dmca
=====
Sample Claim:
YOUR NAME: Sean Logan King
RIGHTSHOLDER OR YOUR NAME: Sean Logan King
EMAIL ADDRESS: seanloganking@gmail.com
REPORTED CONTENT IDENTIFIER: https://open.lbry.com/@testAccount146:6/20200318_193125:3
=====
@tzarebczan let me know if that works

Ah sorry about that, I got confused. You need to download one of my items
and then I'd block it. Try this one: lbry://test-ff-video#d
But I did block yours and we can ensure that you can still see it locally.
On Fri, Apr 24, 2020 at 6:21 PM Logan King notifications@github.com wrote:

I created this template based on https://lbry.com/dmca
=====
Sample Claim:
YOUR NAME: Sean Logan King
RIGHTSHOLDER OR YOUR NAME: Sean Logan King
EMAIL ADDRESS: seanloganking@gmail.com
REPORTED CONTENT IDENTIFIER:
https://open.lbry.com/@testAccount146:6/20200318_193125:3
=====
@tzarebczan https://github.com/tzarebczan let me know if that works
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lbryio/lbry-desktop/issues/1763#issuecomment-619262989,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB56TEMZN7E3GEX7M3MJ7B3ROIGGDANCNFSM4FJUX33Q
.

repo: lbryio/lbry-desktop


text:
Fixes #3383 by formatting lbry links differently

PR Checklist
Please check all that apply to this PR using "x":

[X] I have checked that this PR is not a duplicate of an existing PR (open, closed or merged)
[X] I have checked that this PR does not introduce a breaking change

Read as: I clicked a bunch of links on the desktop and web apps, please review carefully

PR Type
What kind of change does this PR introduce?

[X] Bugfix

Fixes
Issue Number: #3383
What is the current behavior?
Please see the image below as a reference for the inspection images to follow.

When using @(some_user) in a comment, both the desktop app and lbry.tv use the following style.

This works on the desktop app but prompts the lbry.tv user to open up the desktop app which is not the desired behavior.
What is the new behavior?
The desktop app continues to open these links in the desktop app, though the link path is different.

The lbry.tv app now opens these links in the user's browser.

Other information
I've got three concerns.

With the added code, I don't know if "SimpleLink" is fitting anymore.
I've got a hunch that there is a more elegant solution, but I'll post this for now to favor results over perfection. I welcome all feedback.
A separate issue exists. When @(some_user) is specified in a comment, it doesn't give the full path to the user. In my example above, @(mh) is trying to reply to the user @(OzFlor:367e8ca0bcd353126212947982ae0aee29a0d880). However, when using @(OzFlor), the user is routed to OzFlor which is a channel for a different user. In my opinion this is a separate issue from #3383 but I figured I'd bring it up here.

Thanks for the fix @dalhill!!

authors: dalhill seanyesmunt


text:
Updating documentation for clarity

Updating claim_new_support documentation to add a bit more clarity to the name field.

upon entering a different name for this command it generates a new url and replaces the old one within the publishes section of the app and doesn't know what to so with itself, the name I think should be allocated from the id I would presume?
.GIF of Issue

@lyoshenka @wallermadev
This needs to be in the docstring, these changes in the markdown file will be overwritten the next time mkdocs gets run.

authors: MSFTserver jackrobison wallermadev

repo: lbryio/lbry


text:
TOTP 2FA

Please add TOTP 2FA for LBRY accounts as an extra layer of security

There is a separate issue for this as it's not related to this reposititory.

authors: trymeouteh tzarebczan

repo: lbryio/lbrycrd


text:
Client event routing issue

File ./lib/client/client.js Line 1260
let event = msg.constructor.name
// Generate the event name for the event emitter, i.e. "searchEntry"
// and "searchReference".
event = (event[0].toLowerCase() + event.slice(1)).replaceAll('Result', '')
return sendResult(event, msg)

For some reason event[0] is undefined and therefore my app crashes on the toLowerCase call
I suggest to replace the if block with:
if(msg instanceof SearchEntry) {
      return sendResult('searchEntry', msg)
} else if(msg instanceof SearchReference) {
      return sendResult('searchReference', msg)
} else {
    ...
}

I think it's a terrible idea to base decision on constructor.name value.
I've struggled 2.5 days to figure it out.

Please provide a minimal reproducible example. Doing so will help us diagnose your issue. It should be the bare minimum code needed to trigger the issue, and easily runnable without any changes or extra code.
You may use a GitHub repository to host the code if it is too much to fit in a code block (or two).

Hello, same error for me and here

@melissakintz yes that's actually a post of mine, I'm gonna mark it as resolved and link the post to this ticket

We had the same problem and applied the patch mentioned above using a nifty NPM module called patch-package to persist it across our development team.
if(msg instanceof SearchEntry) {       return sendResult('searchEntry', msg) } else if(msg instanceof SearchReference) {       return sendResult('searchReference', msg)
This package unmodified works on Node18 on Windows but when we deploy to our node image running on ocp 3.11 on a container the issue the OP occurs.
By applying the fix our NextAuth works flawlessly.  I suggest perhaps taking a closer look at this issue.

authors: DukeVenator MathieuBerthellemy jsumners melissakintz

repo: ldapjs/node-ldapjs


text:
add test(s) on w and e_zz calcs

Need to add tests covering the vertical velocity and vertical strain rate calcs added in #51

done in #51

repo: ldeo-glaciology/xapres


text:
Change readme abdalrhman

Adding a language

[ ] The code displays "Hello World" (tio.run may help for testing)
[ ] I have no association with the language
[ ] There are no copyright issues with this code
[ ] The language has not been added prior to this pull request
[ ] I have updated the README

Link to programming language:

please accept


text:
Where will the pictorial directory live?

Need to find a place for the pictorial directory to live that is secure (uses https).
Acceptance Criteria

Get an answer on where the files need to live (the final url).
Determine the best way to have https support.

Maybe Let's Encrypt might be something to look into for this project.

repo: leadiv/directory-poc


text:
Implement deepvariant directly

Implement deepvariant directly rather than using deepvariant implemented by clara parabricks. This will allow us to use a newer version of deepvariant and remove one layer of software (clara parabricks). Most importantly, it allows us the remove the requirement that clara parabricks deepvariant enforces; a modification to the read groups in the input aligned bam. So basically we can leave read groups alone as well allow the pipeline to proceed when the input uBAM doesn't contain any read groups.

closes #7
closes #8

repo: leahkemp/pipeface


text:
Not able to tap on flutter button after using native tap

I have a dialog after google sign in is done, native tap works fine and it opens up a dialog, which cannot to be tapped for some unknown reason.
await $('Login with Google').tap(andSettle: false);
await $.pump(const Duration(seconds: 1));
await $.native.tap(Selector(textContains: 'mobile'));
await $.pumpAndSettle();
await $.waitUntilVisible(find.byType(PrivacyPolicyDialog));
expect(find.text('Privacy Policy'), findsWidgets);
await $('Accept').tap();
expect(find.byType(DashboardScreen), findsOneWidget);

Hi @icodelifee, thanks for reporting this issue.
To be able to help you and fix it, I need more info. Please create a minimal, reproducible example, but if it's not possible, at least share the following info:

flutter version (flutter --version), patrol version
video recording of what happens
logs

Closing because of lack of response. Feel free to comment and I'll be happy to continue the discussion :)

authors: bartekpacia icodelifee

repo: leancodepl/patrol


text:
perf(Abelian.InjectiveResolution): refactor Cocomplex.mkAux

Similary to the changes for ChainComplex.mkAux we remove the ad-hoc MkStruct and replace with it ShortComplex.

bors d+

bors merge

authors: mattrobball semorrison


text:
chore: Protect Nat.xor_comm

as it conflicts with xor_comm in the root namespace. Also protect Nat.xor_assoc in case someone adds xor_assoc.

bors d+

bors merge

authors: YaelDillies j-loreaux


text:
feat(IsSelfAdjoint): add aesop tags relevant for proving IsSelfAdjoint a automatically

These are needed for the specialized tactic cfc_tac to work well. This tactic is used for proving side goals related to the continuous functional calculus.
Some of the safe attributes are not technically safe (i.e. they might turn a provable goal into an unprovable one), but I would claim that in those cases, it's not really reasonable to expect automation to work anyway.

bors merge

authors: dupuisf j-loreaux


text:
feat(CategoryTheory/Adjunction): the left partial adjoint

Given a functor F : D ⥤ C, we define a functorF.partialLeftAdjoint : F.PartialLeftAdjointSource ⥤ D which is defined on a certain full subcategory of C. It satisfies similar properties to the left adjoint of F (if this existed). We show that the domain of definition of this partial left adjoint is stable under certain colimits.
This shall be used in #17366 in order to show the existence of the pullback functor on categories of presheaves of modules.

[x] depends on: #17389

Do you have plans to dualize it? Or is the right-adjoint version not useful?

I do not know a concrete application of the dual result, but I have added a TODO in the docstring of the file.

bors merge

authors: joelriou kim-em


text:
feat(CategoryTheory): Pi.eval is final

Thanks!
bors merge

authors: TwoFX joelriou


text:
feat: reassoc_of term elaborator

As requested on zulip.

:tada:
bors r+

authors: gebner semorrison


text:
feat: port CategoryTheory.Limits.Shapes.Reflexive

I don't remember seeing "unsupported infer kinds" before, but this thread helped:
https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Infer.20kinds.20are.20unsupported
Please check if I understood correctly

bors r+


text:
feat(CategoryTheory): a version of sheafCompose for functors preserving smaller limits

The top comment in this PR (which is the commit message) should explain a little that a certain typeclass is introduced, etc.
bors d+

bors r+

authors: dagurtomas joelriou


text:
feat: add basic API lemmas for BddAbove (range f) and BddBelow (range f)

This PR adds some basic API lemmas for BddAbove (range f) (resp BddBelow). This is a ubiquitous side condition when working with iInf/iSup in conditionally complete lattices, so I think it's worth having.

Thanks :tada:
bors merge

bors r-
Sorry, I thought you were done...
bors d+

bors merge

authors: dupuisf jcommelin


text:
perf (Algebra.DirectLimit): use suppress_compilation

Uses suppress_compilation to lessen the load on Lean when building the file.

!bench


text:
feat: TransOrd and BEqOrd + instances

This addresses a current hole in the API with respect to the RBMap lemmas. The issue is that most RBMap lemmas are written in terms of some cmp function satisfying TransCmp, but there is no way to get from cmp x y = .eq to x = y when the key type is a builtin. We solve this using two classes (and two abbrevs):
/-- `TransCmp cmp` asserts that `cmp` induces a transitive relation. -/
class TransCmp (cmp : α → α → Ordering) extends OrientedCmp cmp : Prop where
  /-- The comparator operation is transitive. -/
  le_trans : cmp x y ≠ .gt → cmp y z ≠ .gt → cmp x z ≠ .gt

/-- `BEqCmp cmp` asserts that `cmp x y = .eq` and `x == y` coincide. -/
class BEqCmp [BEq α] (cmp : α → α → Ordering) : Prop where
  /-- `cmp x y = .eq` holds iff `x == y` is true. -/
  cmp_iff_beq : cmp x y = .eq ↔ x == y

/-- `TransOrd α` asserts that the `Ord` instance satisfies `TransCmp`. -/
abbrev TransOrd (α) [Ord α] := TransCmp (α := α) compare

/-- `BEqOrd α` asserts that the `Ord` and `BEq` instances are coherent via `BEqCmp`. -/
abbrev BEqOrd (α) [BEq α] [Ord α] := BEqCmp (α := α) compare

The abbrevs allow stating a property directly about the Ord instance on a type. The combination of TransOrd and BEqOrd, along with LawfulBEq, suffice to establish that the type is linearly ordered by the Ord instance, so compare x y = .eq <-> x = y holds.
Most of the actual work in this PR is proving that every type from Init and Lean (except for a few oddballs like JsonNumber that we can revisit later) with an Ord instance also has a TransOrd and BEqOrd instance.
This also needs a corresponding mathlib PR, not because of breakage but to have instances of TransOrd and BEqOrd for LinearOrder as well.

Tangential: Core's compareOfLessAndEq is not the best choice since it requires two decidable relations, including decidable equality.
The following two alternatives are objectively better:
def compareOfLE {α} [LE α] [DecidableRel (α:=α) (.≤.)] (x y : α) : Ordering :=
  if x ≤ y then if y ≤ x then .eq else .lt else .gt

which is designed to work with LECmp.
def compareOfLT {α} [LT α] [DecidableRel (α:=α) (.<.)] (x y : α) : Ordering :=
  if x < y then .lt else if y < x then .gt else .eq

which is designed to work with LTCmp.
None of these should be considered "canonical" since they all lead to diamond issues.

compareOfLT is defined in mathlib by the name cmp too.
As far as "objectively better", this also depends on the performance of the two operations. I can imagine situations where < is more expensive than ==, in which case compareOfLessAndEq might perform better than compareOfLT.
Re: canonical, this is true, we certainly can't always infer cmp from LT or BEq or both. Besides the diamond issues, there is also the case that we can implement cmp directly and more efficiently (which is not uncommon, especially in derived Ord instances). Primitive types usually don't come with cmp built in though, because the hardware (or at least C) don't provide native three-way comparison mechanisms. (But see C++...) So in these cases we use compareOfLessAndEq or its friends to produce a cmp instance, and the theorems here allow us to prove that these instances are suitably well behaved.

By "objectively better", I only meant that neither requires decidable equality. Sorry that wasn't clear.

Re: "canonical", I completely agree. I would only add that vectorized comparisons are commonly available in hardware, they often use cmp rather than plain ordering relations.

There's a conflict, unfortunately, but otherwise I think we can merge.

authors: digama0 fgdorais semorrison


text:
Implement tags search functionality

This PR implements optimized tags search functionality.

If I add space after the word the search is not working.
The columns in the table shouldnt change their height based on how many entries we have.
If on search there is one item, that row takes the whole height of the table. If we have two items, they split the table height in two.
This shouldn't happen.
You should define the height of the rows to prevent this behaviour.

If I add space after the word the search is not working.

Why would we want to still show the tag if we add space after? From what I see, this seems kind of unnecessary since I see no use case for it.
I have fixed the issue with the height of the rows.

If I add space after the word the search is not working.

@edichoska
Why would we want to still show the tag if we add space after? From what I see, this seems kind of unnecessary since I see no use case for it.
I have fixed the issue with the height of the rows.

Thank you for fixing the row issue. It is better from user experience perspective. Since not only developers will be using this platform, but the marketing team will also be using it. We should always try to remove effort/thinking from the user. We should opt for implementing the following: -a fuzzy search or partial matching algorithm that can handle slight variations or typos in the input

trim leading or trailing spaces or ".,
or we can opt for giving feedback to the user. If the user misspells something we can give suggestions: similar to google when you misspell something while you search

Fixed!

repo: learnhubmk/app


text:
Added Discord link

added discord link to the navbar and moved LTC roadmap to the left of navbar

looks good, thank you

repo: learntocloud/learn-to-cloud


text:
Change page  according to given page number

I need to change page according to given page number dynamically

you can do this using scrollBy(index)

How explain it

Sure,
So you need to add ref to your swiper component (https://facebook.github.io/react/docs/more-about-refs.html).
Something like, <Swiper ref={(swiper) => {this._swiper = swiper;}}>--views--</Swiper>
Then you can use this._swiper.scrollBy(1), and it will scroll forward by 1. If you use this._swiper.scrollBy(-1) it will scroll back by 1.
Also, you should use the initial index property <Swiper index={1}... to dynamically set the starting point for your Swiper.

It's not working
Actual I need when change my index state then show the page according to my index state

Is it possible when change state then re-render swipper component

Currently, thats not how the component works, the index property only sets the initial state - it does not command the current index.
When the Swiper component mounts, whatever the value of the index property is, is where the swiper will start - so if you re-render it with a new index, it will certainly change.
That said, you're better off calculating the index and using scrollBy() as mentioned earlier.
If you're having trouble using your ref, it probably means you're trying to access it before the component has finished mounting / rendering - and therefore isn't available yet.
To work around this, you should use a timeout, or placeholder value somewhere else so you can access the ref. I'm not sure if this is the correct way to do this - would love to hear input from anyone else on the matter (but google hasn't shown be a better way of dealing with it).

it did work for me . @uc-asa can you post the code.

hey @getnashty , I'm having a problem with the index in Swiper. I have a list of thumbnails and when I click in one of the items I want to open the Swiper with this image as initial. I'm setting the index index={this.state.clickedThumbnail} but its only working on iOs, dont know whats happening on android. Any idea?

authors: getnashty ismdcf pgonzalez-santiago uc-asa

repo: leecade/react-native-swiper


text:
create conda recipe

There should be a conda recipe for CSIP, because there's already one for scipoptlib, so the dependency could be covered implicitely.

Or we just build SCIP/CSIP in the build.jl and don't require Python.

repo: leethargo/CSIP


text:
Not working in IE11.

Open in IE11 and try
http://plnkr.co/edit/Aww1cb785mZIPqNHgZ4v?p=preview

It shall be fixed long time ago, see: issue-13.
But plunker was not updated, Thanks for pointing out it.

authors: leftstick tatran

repo: leftstick/angular-number-picker


text:
can't access legacysurvey.org

Hi,
I can't access the site pages yesterday and today, try different browsers and with/without VPN. Will this be resolved soon?
Thanks in advance
P.S. Is there is a place where I can monitor related news (e.g. technical work and server shutdown)?

Expect a return to service some time this weekend: https://nersc-status.lbl.gov/ .  There's some functionality on this Viewer mirror: http://viewer.legacysurvey.org .  Sorry!

Thanks a lot for the links and info

Hi,
I decide not to open the new one, just comment on existed. Me and my colleagues can access the viewer, but model and residual layers are not loading (both for DR8 & DR9). As far as I can see there is no specific error in Chrome's Dev Console, and the issue persists in Firefox too. Could you please elaborate on that? Thanks!

Update: now everything is ok again (but it actually happen time to time. Maybe some db update?)

authors: Amarchuk djschlegel

repo: legacysurvey/imagine


text:
Create README.md

https://discordapp.com/channels/1168655651455639582/1168656318345777313/1191554711007002634
Great first contribution, amarite?

overwhelmed by greatness

authors: Xilophor legoandmars

repo: legoandmars/BiggerLobby


text:
Add typing

Is your feature request related to a problem? Please describe.
Modern IDEs use typing to make small errors like typos, or bad types mixing easier with typing. This should be implemented to have a cleaner code, since the variable types would be known.
Describe the solution you'd like
Add typing to all the expressions in the library, for example:
def __init__(self, username:str = None, password:str = None):

@ArnyminerZ, thanks for the issue. Do you have an interest to take a lead on this one?

I will take it ☺

authors: ArnyminerZ leikoilja

repo: leikoilja/glocaltokens


text:
Time To Live

I'd like to use Hive as a temporary cache for resources.
Setup would be done with a TTL field that can be set at the Box and write method level.
box.putAll({'key1': 'value1', 42: 'life'}, ttl: const Duration(seconds:30))
Is this a feature in the scope of Hive ?
Thanks

This is a very good idea. I don't know if it is possible but I'll think about how to implement this.

I've tinkered with something like this :
class Ephemere {
  final Duration defaultDuration;
  final Map<Object, dynamic> _cache;

  Ephemere(this.defaultDuration) : _cache = Map();

  dynamic get(Object key, Function defaultValue) {
    final rs = _cache[key] ?? defaultValue();
    return rs;
  }

  Future put(Object key, value, {Duration duration}) {
    Completer completer = Completer();
    _cache.putIfAbsent(key, () => value);

    Future.delayed(duration ?? defaultDuration, () {
      _cache.remove(key);
      completer.complete(value);
    });

    return completer.future;
  }
}

Yes that looks promising but how would you handle a TTL greater than the runtime of the app?
It would need to be persisted and checked when the app is started again.

Also I'm not sure this approach is the best when you have a huge numbers of keys ...
If you have a hash you can have an external manager with timestamp, seems more efficient

Correct, Also I'm not sure this approach is the best when you have a huge numbers of keys ...
If you have a hash you can have an external manager with timestamp, seems more efficient.

I agree...

Completers would resume on the diff time now and previously calculated expiration timestamps.

Could you please explain that? I don't understand what you mean exactly.

I'm going to close this for now. I think a external solution would be easier to implement...

authors: Solido leisim

repo: leisim/hive


text:
App label issues when following dotted path convention

Fixes #36
WIP, still testing

Codecov Report

Merging #37 (0550606) into master (0db999e) will decrease coverage by 0.14%.
The diff coverage is 96.00%.

@@            Coverage Diff             @@
##           master      #37      +/-   ##
==========================================
- Coverage   97.20%   97.07%   -0.14%
==========================================
  Files          11       11
  Lines         430      445      +15
==========================================
+ Hits          418      432      +14
- Misses         12       13       +1

Files
Coverage Δ

django_custom_admin_pages/boot_django.py
93.33% <ø> (ø)

...ustom_admin_pages/tests/test_custom_admin_pages.py
99.57% <100.00%> (+0.02%)
:arrow_up:

django_custom_admin_pages/admin.py
95.68% <80.00%> (-0.78%)
:arrow_down:

:mega: Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

authors: codecov-commenter lekjos

repo: lekjos/django-custom-admin-pages


text:
Add new tag

You can add a new tag by using the enter key. Is it possible to add a new tag if you use your tab key or click outside the form field?

yes, you can use
addOnBlur | Boolean | Add new tags on blur (only if allowNew is enabled)
separator | Array | String | A list (pipe separated) of characters that should act as separator (default is using enter key)

or maybe we should leave the value with the invalid message, i don't know :-) i think both logic make sense

@jackyraimond actually, i didn't manage to replicate the issue. the only time the input is cleared is when you try to input the same value twice without allowSame being set. otherwise, the input stays the same.
i did some more tests in the demo https://github.com/lekoala/bootstrap5-tags/commit/21cb596185e6eb971a0f44aa33e3430270d1b9ad
do you have an example with the actual issue?

I’m using these settings:

multiple
data-allow-new="true"
data-add-on-blur="true"
data-separator="| , |"
data-allow-clear="1"
data-full-width="1"
data-badge-style="secondary"
data-regex="^[^\s@]+@[^\s@]+\.[^\s@]+$"
data-max="1"

If you then fill in an invalid email (for example with a space in the email) and click on enter, you’ll see the invalid feedback message. But if you use tab or click outside the form, it clears the field and not showing the invalid feedback message. This is the case when you try to create a new tag.

@jackyraimond thanks for your input, based on that i can see your issue. so many use cases :-)
https://github.com/lekoala/bootstrap5-tags/releases/tag/1.5.13 this should fix your issue

authors: jackyraimond lekoala


text:
Add stripe API to get account info

@lemieux
Renamed StripeApi -> StripeAppUserApi
StripeApi is now used for the /v1/stripe endpoint.

:+1:

repo: lemieux/smooch-core-js


text:
Carousel extension is not working

Hi,
I would like to use the carousel extension, but somehow I'm not able to load the carousel properly. I'm getting the images below each other. The following I have setup.
base.html
{% load static %}

		{% load django_simple_bulma %}
		{% bulma theme %}
		{% font_awesome %}

{% block title %}{% endblock %}Pocketminerals

			Saul Gadgets

					<form method="get" action="{% url 'search' %}">

								<input type="text" class="input" placeholder="Search..." name="query">

								<button class="button is-success">Search</button>

					</form>

				{% for category in menu_categories %}
					{% if not category.children.all %}
                    	{{ category.title }}
					{% else %}

							{{ category.title }}

								{% for subcategory in category.children.all %}
									{{ subcategory.title }}
								{% endfor %}

					{% endif %}
				{% endfor %}

					Cart ([[ numItems ]])

				{% if request.user.is_authenticated %}

						My account

				{% else %}

							Sign up
							Log in

				{% endif %}

			{% block content %}
            {% endblock %}

	{% include 'parts/newsletter.html' %}

Saul Gadgets

				Contact
				About

	{% block scripts %}
	{% endblock %}

=======================
scripts.js
bulmaCarousel.attach('#carousel-demo', {
slidesToScroll: 1,
slidesToShow: 3
});
=======================
settings.py
(.....)
Custom settings for django-simple-bulma
BULMA_SETTINGS = {
"extensions": [
"all"
],
"variables": {
"primary": "#000000",
"size-1": "6rem",
},
"alt_variables": {
"primary": "#fff",
"scheme-main": "#000",
},
"output_style": "compressed",
"fontawesome_token": "e761a01be3",
}
=======================
I hope someone can help me.
Thank you!
Kind regards,
Joshua

I think the carousel has been abandoned: https://www.npmjs.com/package/bulma-carousel/v/4.0.24#user-content-exclamationexclamationexclamation-looking-for-new-maintainer-exclamationexclamationexclamation

Hmm.. Thanks @tehfink, that seems like a likely culprit for the problem that @jeavanderwiel is having.
I will deprecate support for this plugin in the next version of django-simple-bulma then. It probably just doesn't work with the version of bulma that we have bundled.

Hi Guys,
Thx for coming back to this. Is there another way to show carousels in my project?
Please let me know!
Kind regards,
Joshua

If you need a carousel, you could try something like glide.js, perhaps? It's available as a CDN (so you don't need npm to install it), and should be very easy to get working. Quite minimalist, too.
There is also a school of thought that says that you should not be using carousels at all, as they are considered to be poor UX. Perhaps this problem could be better solved without one?

authors: jeavanderwiel lemonsaurus tehfink

repo: lemonsaurus/django-simple-bulma


text:
[Task] Describe the Lenra app configuration file

What should be done
Create a JSON Schema to describe the Lenra app configuration file.
Technical recommandation
To keep the JSON Schema and the Rust structs we should generate one from the other one:

generate the JSON Schema from the existing structs using schemars or equivalent
OR
create the JSON Schema and regenerate the structs from it using typify or equivalent

Ecological concerns
If generating the structs from JSON Schema, generate it at build time with a build.rs instead of loading it at runtime.

The config file will be described in the new doc thanks to this issue #221
The schema generation can wait


text:
[EPIC] OAuth Provider & Login

What should be done
The "hard" part of this work is described here :
https://rattle-llama-7da.notion.site/OAuth-Provider-c43ec6d6f23e47c6939166c3d594d698

[ ] lenra-io/kubernetes#91
[ ] lenra-io/server#369
[ ] lenra-io/server#370
[ ] lenra-io/server#372
[ ] lenra-io/server#373
[ ] lenra-io/server#374
[ ] lenra-io/server#375
[ ] lenra-io/client-common#82
[ ] lenra-io/client#67
[ ] lenra-io/backoffice#91
[ ] lenra-io/server#376
[ ] lenra-io/server#377
[ ] lenra-io/server#378
[ ] lenra-io/docs#98

What can be done additionally

[ ] [Server/Client] Add the 2FA Authentication using One-Time Passcode ? (OTP)
[ ] Add the Webauthn protocol

Technical recommandation
Most of the complexity is handled by Ory Hydra. We will add some applications and library once to simplify the system overhaul.
Most of the security concerns are handled by Ory Hydra. Be careful with the Ory Hydra configuration to only expose specific port(s).

@taorepoara i've created the subtask for this Epic with some description of the work that must be done.
Some of the task need some discussions and decisions about the design and/or features.
Depending of the decisions made, some other task will be created.

This epic can be closed. The remaining tasks will be managed later

authors: Nesqwik taorepoara


text:
Can't download binary: extremely slow DL speed

Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/ can't be finished: tried out more than a day

Downloaded from another ISP

repo: lensapp/lens


text:
Getting entity from cluster is unreliable in ExtensionRenderer.isEnabledForCluster()

Describe the bug
The following code, which makes a custom cluster page either visible or not given the active cluster, is unreliable:
  public async isEnabledForCluster(cluster): Promise<boolean> {
    const entity = Renderer.Catalog.catalogEntities.getById(cluster.id);
    return entity?.metadata.source === "my-source";
  }

As I understand it, when this method is called, there should never be a case where getById(id) returns undefined because the associated entity isn't found in the Catalog.
The result is my custom page shows-up on one of the clusters added by my extension, while it doesn't on another one. It should show-up on both.
To Reproduce
Steps to reproduce the behavior:

Install https://github.com/Mirantis/lens-extension-cc from the cluster-page branch (if still available, or from master if not, since that would mean it was merged).
Add 2 clusters via the extension.
Open one cluster, the "Container Cloud" page might be there. Open another cluster, it might not be there.

Expected behavior
This test should never fail to find the associated Catalog entity.
Screenshots
Not there:

There:

Environment (please complete the following information):

Lens Version: 5.2 (official)
OS: macOS 11.5.2
Installation method: .dmg

Logs:
When you run the application executable from command line you will see some logging output. Please paste them here:
There's too much sensitive stuff like usernames, emails, etc., in here to post these logs into a public repo.

IMHO this method currently passes wrong (legacy) object. It should actually give KubernetesCluster, not Cluster (which is "private" api).

@jakolehm

IMHO this method currently passes wrong (legacy) object. It should actually give KubernetesCluster, not Cluster (which is "private" api).

There are actually 2 problems with this old API:

The one you mention.
The fact that it's not possible for an extension to have multiple cluster pages, and decide which one is visible and which one isn't -- it's "all or nothing". This is because Lens' visibility check is tied to the cluster, not the cluster page menu item.

So this is a good opportunity to fix this API:

Deprecate this API entirely. Using public async isEnabledForCluster(cluster) should result in a console warning, if possible. Might not be since people are encouraged to override it and not call its super impl. At least mark it deprecated in the docs.

Add a new option to check this in the cluster page menu item itself, so that the check is per menu item, given the activated cluster:
this.clusterPageMenus = [
  {
    target: { pageId: "page-id" },
    title: "My cluster page",
    isEnabled(entity) {
      return entity.metadata.source === "my-source";
    },
    components: {
      Icon: () => <MyIcon />,
    },
  },
];

isEnabled should obviously default to true when not specified, and it's given the newly-activated entity instead of that old cluster object thing.

authors: jakolehm stefcameron


text:
[Bug] Import builtin with node:

Node version : 16.13.2
Npm version : 8.4.0
Steps To Reproduce

Step 1
npm install -g @leon-ai/cli
Step 2
leon create birth

The current behavior
internal/modules/cjs/loader.js:818
  throw err;
  ^

Error: Cannot find module 'node:path'
Require stack:
- /usr/local/lib/node_modules/@leon-ai/cli/build/cli.js
- /usr/local/lib/node_modules/@leon-ai/cli/build/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@leon-ai/cli/build/cli.js:6:40)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/local/lib/node_modules/@leon-ai/cli/build/cli.js',
    '/usr/local/lib/node_modules/@leon-ai/cli/build/index.js'
  ]

The expected behavior
✔ Downloading Leon from https://github.com/leon-ai/leon/archive/master.zip
✔ Extracting Leon
✔ Installing npm dependencies
✔ Building Leon core

Success: Leon is born! 🎉
You can start your leon instance using:
exec $SHELL
leon start

Cause: The bug seems to be related by putting node when importing module like require("node:path")
When I remove all node: in module leon-ai folders the installation worked perfectly

Hey! :wave: @rootkit7628
Thanks for your report!
node: Imports has been added since Node.js v16.0.0 for require.
Make sure you have the right Node.js version or open an issue on Node.js repo.
I also have Node.js v16.13.2 installed and have no issues.
Closing as this a non issue for leon-cli.
Please reopen if you think this is a mistake.

repo: leon-ai/leon-cli


text:
implementatio of do-not-answer #517

This is a working version for the issue https://github.com/leondz/garak/issues/517.
Please feel free to edit or give comments, I'd be happy to work further on it.

I have read the DCO Document and I hereby sign the DCO

repo: leondz/garak


text:
Use ^ and popcount calculate distance

As #43 mentions, the simhash.value will change, but distance should be the same.
I've test on python3.7, python2 should work
import time

from simhash import Simhash

a = Simhash('kk rocks')
print(a.value)

s = time.time()
for i in range(10000):
    a = Simhash('kk rocks')
print(time.time() - s, a.value)

s = time.time()
a = Simhash('kk rocks')
b = Simhash('kk really rocks')
for i in range(1000000):
    dis = a.distance(b)
print(time.time() - s, dis)

output:
new:
864692470817131398
0.8506567478179932 864692470817131398
0.5275230407714844 19

old:
7048486158682030128
0.8147940635681152 7048486158682030128
3.1718358993530273 19

It should work. I change this to make the code cleaner and more intuitive. In general, binary str 0001 represent 1.
On Apr 20, 2020, 00:21 +0800, Leon , wrote:

@leonsim commented on this pull request.
In simhash/init.py:

@@ -105,20 +107,12 @@ def build_by_features(self, features):
w = f[1]
for i in range(self.f):
v[i] += w if h & masks[i] else -w

   ans = 0

   for i in range(self.f):

       if v[i] > 0:

           ans |= masks[i]

   self.value = ans

   binary_str = ''.join(['0' if i <= 0 else '1' for i in v])

If we don't change this, the popcount will still work, right? The join command here is O(n) the same complexity as the old implementation. May I ask why you change this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@bebound Thanks for your work! 👍
Merged and published to PyPi: https://pypi.org/project/simhash/#history

authors: bebound leonsim

repo: leonsim/simhash


text:
Compilation error using specific crates

Hello,
I am incapable of compiling while using cargo-leptos, when specific packages are included. For example, I currently use sea-orm, and unless I set it to optional and include it as a dependency under ssr, I get a compilation error:

I unfortunately cannot disable it for lib, as sea-orm is directly used within modules attached to app, which is then sourced within lib.rs. Upon setting sea-orm to optional, I can no longer use the crate within libraries.
Have you encountered this problem before? Is it related to cargo-leptos, or wasm compilation in general?

Thanks,
Can't believe I missed this...

repo: leptos-rs/cargo-leptos


text:
feat: new sounds

because why not

lol, nice

repo: lesesalen/lesebot


text:
I fucked up and needa undo a commit grumble grumble

GRUMBLE GRUMBLE

AH I SEE U DONE FUCKED UP BUDDY


text:
Opening file which the path contain Hebrew characters

Hi,
Is there a way to open a file which it's location (path) contain Hebrew characters?
currently when doing:
rawpy.imread( path_for_raw )
where path_for_raw variable contrain Hebrew letters i get:
{LibRawFatalError}b'Input/output error'
i am using:
Python 3.6.4
Rawpy 0.13.1
Thanks!

Seems to be a limitation of the underlying libraw library. You can work around it by opening the file yourself in Python:
with open(path_for_raw, 'rb') as f:
  raw = rawpy.imread(f)
foo = raw.postprocess()

Let me know if this works.

it does work :)
Thanks!!!
i am closing the issue.

Reopening this as it seems this can be fixed on our side, similar to what rawkit is doing: https://github.com/photoshell/rawkit/pull/153/files

Could you send the exact filename that didn't work for you? Also, which operating system are you on?

Can't reproduce this. If someone else got the issue, please send an offending filename.

Hello, here's an example of a pathname generating a rawpy._rawpy.LibRawIOError:
C:\Temp\photo\Excursion Fattoria Pasquè\20060902-101156-GH01C04-S00.ORF
Probably happens with all accented characters.
Thanks

@ghotz I'm still unable to reproduce it. Would you mind attaching a minimal Python file as zip file here? It may be something to do with file encoding.

@ghotz Nevermind, I can reproduce it now.

authors: ghotz letmaik yoavchai

repo: letmaik/rawpy


text:
Remove Line Break

is "convert_newlines_to_brs" option can be implemented?

http://www.tinymce.com/wiki.php/Configuration3x:convert_newlines_to_brs
$form->field($model, 'content')->widget(letyii\tinymce\Tinymce::className(), [
'options' => [
'class' => 'your_class',
],
'configs' => [
'convert_newlines_to_brs' => true,
],
]);

authors: RGTimothy nguago


text:
I am getting build time error when using the plugin.

dio 4.0.0
dio_retry_fixed: ^0.1.15-beta-null-safety
The issue is inside plugin files here is the error log.

../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:30:32: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
err.request!.extra = err.request!.extra..addAll(extra.toExtra());
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:33:40: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
errorCallback!(ErrorResult(err.request!.uri.toString(), err.message, extra.retries, err.error.toString()));
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:39:15: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
err.request!.path,
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:40:28: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
cancelToken: err.request!.cancelToken,
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:41:21: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
data: err.request!.data,
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:42:34: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
onReceiveProgress: err.request!.onReceiveProgress,
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:43:31: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
onSendProgress: err.request!.onSendProgress,
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:44:32: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
queryParameters: err.request!.queryParameters,
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:45:39: Error: The getter 'request' isn't defined for the class 'DioError'.
- 'DioError' is from 'package:dio/src/dio_error.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/dio_error.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'request'.
options: Options(extra: err.request!.extra),
^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:38:16: Error: A value of type 'Response' can't be returned from an async function with return type 'void'.
- 'Response' is from 'package:dio/src/response.dart' ('../../.pub-cache/hosted/pub.dartlang.org/dio-4.0.0/lib/src/response.dart').
return await dio.request(
^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:48:16: Error: A value of type 'Object' can't be returned from an async function with return type 'void'.
- 'Object' is from 'dart:core'.
return e;
^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:52:25: Error: Too few positional arguments: 2 required, 1 given.
return super.onError(err);
^
../../.pub-cache/hosted/pub.dartlang.org/dio_retry_fixed-0.1.15-beta-null-safety/lib/src/retry_interceptor.dart:52:18: Error: A value of type 'invalid-type' can't be returned from an async function with return type 'void'.
return super.onError(err);
^
Command PhaseScriptExecution failed with a nonzero exit code
FirebasePerformance-gmrrcesyyvkfjbflfjwkdefehdqi
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)

This is my code and there is no issue.
import 'dart:async';
import 'package:dio/dio.dart';
import 'package:dio_retry_fixed/dio_retry_fixed.dart';
// import 'package:dio_firebase_performance/dio_firebase_performance.dart';
// import 'package:dio_retry/dio_retry.dart';
import 'theme_action.dart';
import 'package:path/path.dart' as path;

int _apiCounter = 0;
Dio _dioObj;

Dio get _dio {
  if (_dioObj == null) {
    _dioObj ??= new Dio();
    _dioObj
      ..interceptors.add(RetryInterceptor(
        dio: _dioObj,
        // logger: Logger("Retry"),
        options: RetryOptions(
            retries: 3, // Number of retries before a failure
            retryInterval: const Duration(seconds: 3),
            retryEvaluator: (error) =>
                error.type != DioErrorType.cancel &&
                error.type != DioErrorType.response),
      ));
    // _dioObj.interceptors.add(DioFirebasePerformanceInterceptor());
  }
  return _dioObj;
}

See if the following inside the pubspec.yaml work for you:
dio: ^4.0.0
dio_retry:
git:
url: https://github.com/appsailor/dio_retry
path: dio_retry

dio_retry

I am getting below error while using it can you please update it.

I've updated the dependencies. You might have to remove the pubspec.lock and do pub get again. See if it works.

I've updated the dependencies. You might have to remove the pubspec.lock and do pub get again. See if it works.

Thanks now it is working.
Have ever tried to retry file download. normal get post request is working fine but dio.download gives an error while retrying. below is the screenshot, if you have any idea please share with me.
thanks

authors: appsailor uc-dve


text:
make some way how to change language of spellchecking

couldn’t we use spelllang even when nospell is set, or
possibly respect editorconfig/editorconfig#315

'spelllang' should now be respected.


text:
ReferenceError

const { Math, Object } = primordials;
                         ^

ReferenceError: primordials is not defined
    at fs.js:27:26
    at req_ (/Users/me/Downloads/electron-flask-master/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/Users/me/Downloads/electron-flask-master/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/Users/me/Downloads/electron-flask-master/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)

happens whenever i run any of the gulp commands

Hi! This is an old, quick and dirty project and I'm not familiar with the status of the dependencies anymore, and I don't have time to look deeply into the problem.
I might suspect this to be a version problem - are you using a globally installed gulp? If so, try using the version pinned in the package (3.9) instead.

Ok, I'll try that

I ran into this issue - seems gulp 3 is broken with node 12 and so you need to use node 11 instead, and use the gulp locally installed.
nvm use 11
npm install
node_modules/.bin/gulp electron

authors: ThatOneCalculator abulka lewisacidic

repo: lewisacidic/electron-flask


text:
Q: Change nanodbc::result iteration model and rename bool end()

Mateusz already did some work in #155, and introduced the result_iterator. His todo list now contains implementation of .begin() and .end() of the nanodbc::result.
I am writing this just to support his activity that is a bit farther in his branch, to attract the attention :)
Changing the iteration model will make the processing more natural to all C++ developers. Being a container, the nanodbc::result seems to be natural candidate for that C++ kind of iteration. Also, there will be no doubt what values should .begin() and namely the new .end() have when called after the execute -- as discussed for example in #78.
However, the older .end() returns bool, and it conflicts with classical end iterator method/value. The older .end() could be renamed to .end_of_data() or so. The name could be that long to make a psychological push to use the classical iteration or--even better--using the range-based loop whenever possible.

@pepr Thanks for supporting this idea.
The current bool end() could be renamed to bool at_end() - as also corresponding to internal flag - or if we want an ugly name, then I'd go for a self-descriptive end_of_result since data is ambiguous (result data, row data, column value data...?)

Regarding rationale and intention of the current bool end(), it is important to have a look at https://github.com/lexicalunit/nanodbc/issues/78#issuecomment-161364477 (whole discussion too) and #88.

The requested feature has been Implemented in #155

authors: mloskot pepr

repo: lexicalunit/nanodbc


text:
($authenticator) must be of type Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface, Lexik\Bundle\JWTAuthenticationBundle\Security\Guard\JWTTokenAuthenticator given

Hello everyone.
I upgraded my symfony from 5.3 to 5.4
I tried using the guard and the custom_authenticaion
But no option really works
here is the security.yml which causes this error message when trying to call an endpoint after generating a Bearer Token
Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator::__construct(): Argument #1 ($authenticator) must be of type Symfony\\Component\\Security\\Http\\Authenticator\\AuthenticatorInterface, Lexik\\Bundle\\JWTAuthenticationBundle\\Security\\Guard\\JWTTokenAuthenticator given
For example i send /api/login I get a Token and then i try to use /api/XYZ
Then the error happens
security:
    enable_authenticator_manager: true

    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
        App\Entity\BackendUser:
            algorithm: auto
        App\Entity\User:
            algorithm: auto

    # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
    providers:
        # used to reload user from session & other features (e.g. switch_user)
        app_user_provider:
            entity:
                class: App\Entity\BackendUser
                property: email
        auth_token:
            id: App\Security\AuthTokenUserProvider
        jwt:
            id: App\Security\JwtUserProvider

    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        login:
            pattern:  ^/api/login
            stateless: true
            provider: auth_token
            json_login:
                check_path: /api/login
                success_handler: lexik_jwt_authentication.handler.authentication_success
                failure_handler: lexik_jwt_authentication.handler.authentication_failure
            custom_authenticators:
                - App\Security\UserAuthenticator

        api:
           pattern:   ^/api
           stateless: true
           provider: jwt
           custom_authenticators:
               - lexik_jwt_authentication.jwt_token_authenticator

        easy_admin:
            pattern:   ^/admin
            lazy: true
            provider: app_user_provider
            custom_authenticators:
                - App\Security\EasyAdminAuthenticator
            logout:
                path: app_logout
                target: app_login

    # Easy way to control access for large sections of your site
    # Note: Only the *first* access control that matches will be used
    access_control:
        # Easy Admin Routes
        - { path: ^/admin/login,      roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin,            roles: IS_AUTHENTICATED_FULLY }
        # Api Routes
        - { path: ^/api/login,        roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/api,              roles: IS_AUTHENTICATED_FULLY }
        # Translations
        - { path: ^/translations,                   roles: IS_AUTHENTICATED_FULLY }
        - { path: ^/translations/grid,              roles: IS_AUTHENTICATED_FULLY }`

After this i tried using
           guard:
             authenticators:
               - lexik_jwt_authentication.jwt_token_authenticator

With
   enable_authenticator_manager: false
But this also does not work
What i can see is that when i add my jwt token to https://jwt.io/
It says
Invalid Signature
So i'm really not sure if this is a version problem or a config problem

Since you are using Symfony 5.4, you really should start using new authenticator instead of guard (and do not mix them together).
What is the different between auth_token and jwt provider? I saw your firewall config the login using auth_token provider and api using jwt provider.
I think you can just remove the custom_authenticators under login and api firewall if you have no custom logic during authentication.

Closing as explained.

authors: chalasr fd6130 robibubble

repo: lexik/LexikJWTAuthenticationBundle


text:
Update shuli-goodman.md

Signed-off-by: Jeff Osier-Mixon jefro@jefro.net

Thank you @Jefro

authors: Jefro jmertic

repo: lf-energy/memorials


text:
What is the connection between BuildSystems and Backends

I am struggling a bit with the organization. Currently LFC appears as both code-generator and backend and build system. The distinction between the two latter is also not clear. What is really the meaning of backend and build-system in the context of lingo?

The notion in my head is that the combination of target language and specified build system tells lingo which build backend to use.
   (C, Zephyre) -> Zephyre
   (Python, Zephyre) -> Invalid
   (Cpp, Cmake) -> CppCmake

So, to make the list complete, we have:

Target Language (C, Cpp, Python)
Target platform (macOS, Linux, Windows, Zephyr, FreeRTOS, Arduino, nrf52)
Build tool (CMake, GNU Make, arduino-cli, west)
Build platform (macOS, Linux, Windows)

Yet, we don't specify the build platform, it is implied. So I'm not sure that we need to treat cross compilation specially. Whether the compiled code runs on the platform that it was compiled on doesn't really matter from a tooling perspective...does it?

@lhstrh The only problem with your summary is that 2.) and 4.) are overlapping.
We have a platform we compile for and currently (MacOS, Linux and Windows) are currently summarized in the enum value Native. And Platforms like nrf52 are treated separately and directly depend on some build tools (west).

authors: erlingrj lhstrh revol-xut

repo: lf-lang/lingo


text:
🛑 INTRANET is down

In 1200511, INTRANET (https://intranet.samsa.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: INTRANET is back up in ae66232.

repo: lgimenezdev/samsanet


text:
Avoid switching wine versions

When using Proton we should avoid using the system wine as the versions probably differs.
Calling wine with a different version than the prefix results in the whole prefix being up- or downgraded by copying all necessary files to adjust to the calling wine version. With a working proton prefix this results in a prefix upgrade on updating the game files and a downgrade afterwards when starting the game.
Let's avoid this unnecessary waiting time and hard drive stress either by using protons wine version or by reconsidering the wine call.
https://github.com/lhark/truckersmp-cli/blob/master/truckersmp_cli/steamcmd.py#L123

If Windows version of Steam is already running on Wine, this change might cause "version mismatch xxx/yyy" error because of version difference. The current Wine command is system Wine intentionally.
Alternatively, we can add an option to skip checking whether Windows version of Steam is running (e.g. --skip-checking-windows-steam):
    wine = env["WINE"] if "WINE" in env else "wine"
    os.makedirs(Dir.steamcmdpfx, exist_ok=True)
    if not Args.skip_checking_windows_steam:
        try:
            subproc.check_call((wine, "--version"), stdout=subproc.DEVNULL, env=env)
            logging.debug("Wine (%s) is available", wine)
        except subproc.CalledProcessError:
            logging.debug("Wine is not available")
            wine = None
    if Args.proton:
        # we don't use ...
        # ...

    # ...

    if not Args.skip_checking_windows_steam and wine and ... :
        logging.debug("Closing Windows version of Steam in %s", Args.wine_steam_dir)
        # ...

If you think the behavior (skipping) should be the default, you can change the default because (I think) only few users really need the checking.

Agreed, should be better this way around.

Ready to merge this, but I'm considering releasing 0.2.2 for recent changes before merging.

Yes, we need that discord bridge url change.

PyPI package has been released. I'll merge this now.

authors: Lucki kakurasan

repo: lhark/truckersmp-cli


text:
Add example of how to use ZipArchiver

Solves https://github.com/lhns/fs2-compress/issues/135

If https://github.com/lhns/fs2-compress/pull/148 is accepted then this example can be changed to not read the size of the file.