text:
<?php

namespace CodeIgniter\Models;

use CodeIgniter\Database\Exceptions\DataException;
use CodeIgniter\I18n\Time;
use InvalidArgumentException;
use Tests\Support\Models\EntityModel;
use Tests\Support\Models\JobModel;
use Tests\Support\Models\SimpleEntity;
use Tests\Support\Models\UserModel;
use Tests\Support\Models\ValidModel;

/**
 * @internal
 */
final class MiscellaneousModelTest extends LiveModelTestCase
{
    public function testChunk(): void
    {
        $rowCount = 0;

        $this->createModel(UserModel::class)->chunk(2, static function ($row) use (&$rowCount) {
            $rowCount++;
        });

        $this->assertSame(4, $rowCount);
    }

    public function testCanCreateAndSaveEntityClasses(): void
    {
        $entity = $this->createModel(EntityModel::class)->where('name', 'Developer')->first();

        $this->assertInstanceOf(SimpleEntity::class, $entity);
        $this->assertSame('Developer', $entity->name);
        $this->assertSame('Awesome job, but sometimes makes you bored', $entity->description);

        $time = time();

        $entity->name       = 'Senior Developer';
        $entity->created_at = $time;

        $this->assertTrue($this->model->save($entity));

        $result = $this->model->where('name', 'Senior Developer')->first();
        $this->assertSame(
            Time::createFromTimestamp($time)->toDateTimeString(),
            $result->created_at->toDateTimeString()
        );
    }

    /**
     * @see https://github.com/codeigniter4/CodeIgniter4/issues/580
     */
    public function testPasswordsStoreCorrectly(): void
    {
        $data = [
            'name'    => password_hash('secret123', PASSWORD_BCRYPT),
            'email'   => 'foo@example.com',
            'country' => 'US',
        ];

        $this->createModel(UserModel::class)->insert($data);
        $this->seeInDatabase('user', $data);
    }

    public function testReplaceObject(): void
    {
        $data = [
            'id'          => 1,
            'name'        => 'my name',
            'description' => 'some description',
        ];

        $this->createModel(ValidModel::class)->replace($data);
        $this->seeInDatabase('job', ['id' => 1, 'name' => 'my name']);
    }

    public function testGetValidationMessagesForReplace(): void
    {
        $jobData = [
            'name'        => 'Comedian',
            'description' => null,
        ];

        $this->createModel(JobModel::class);
        $this->setPrivateProperty($this->model, 'validationRules', ['description' => 'required']);
        $this->assertFalse($this->model->replace($jobData));

        $error = $this->model->errors();
        $this->assertArrayHasKey('description', $error);
    }

    public function testUndefinedTypeInTransformDataToArray(): void
    {
        $this->expectException(InvalidArgumentException::class);
        $this->expectExceptionMessage('Invalid type "whatever" used upon transforming data to array.');

        $this->createModel(JobModel::class);
        $method = $this->getPrivateMethodInvoker($this->model, 'transformDataToArray');
        $method([], 'whatever');
    }

    public function testEmptyDataInTransformDataToArray(): void
    {
        $this->expectException(DataException::class);
        $this->expectExceptionMessage('There is no data to insert.');

        $this->createModel(JobModel::class);
        $method = $this->getPrivateMethodInvoker($this->model, 'transformDataToArray');
        $method([], 'insert');
    }
}

redpajama_set_name: RedPajamaGithub


Summers in Browns Plains can be burning! We all understand just how difficult it is to sleep, work, or play while you're suffering in the sweltering heat. Nobody wants to breathe thick, hot air in their own home. Call us 07 4863 4450 for prompt and effective air conditioning repair work in Browns Plains.
Our extremely qualified service technicians will make sure your Air Conditioning unit is running at peak performance. We will promptly and precisely detect and repair any faults with your unit and offer maintenance contracts and guidance to help you lower your energy usage.
There are a number of signs that your air conditioning system will have to be repaired. If you notice odd sounds or smells coming from your system it will need to be fixed. This could be a sign that mold and mildew is growing in the ventilation or that parts have gotten loose. Another indication that your system isn't really working appropriately is drastically reduced airflow. You could examine this by turning on your Air Conditioning system and placing your hand near the vent. If the air flow isn't as strong as you remember this might mean you need to get your system fixed.
Our home Air Conditioner repair Browns Plains technicians can check out your Air Conditioner system to see what repair work should be made. From there, we'll advise new parts and change any component that is causing your system to damage. We could make certain your AC kicks on when you require it to in order to maintain maximum convenience and fresh air. We've serviced many different a/c systems throughout the years, as well as we're certain in our ability to find you a service.
If you observe that your a/c system isn't working, give us a call. More often than not, the a/c system has a broken part that needs to be changed. Systems that leak, blow warm air, or make a loud clanking sound should be serviced as soon as possible. Enjoy optimum comfort once again with the help of our group.
When you prefer to deal with us, you can be certain that you will receive the most expert and cost efficient air conditioning maintenance solutions Browns Plains has to offer. Thanks to our exceptional services our clients can unwind, knowing that all safety measures have been taken to maintain their air conditioner system functioning at their absolute best. When you want the best care for your air conditioner, you can contact us any time to learn more about what we have to provide.
With comprehensive experience in both residential and commercial jobs, we could deal with all your urgent repairs and/or scheduled maintenance work. No job is big or too small. We can collaborate with you to provide a personalized, inexpensive maintenance contract to meet your ac unit servicing requirements. You can be assured of our dedication to professionalism and trust, integrity, safety, top quality workmanship and the environment!
We collaborate with a variety of makes and model a/c systems as well both split and ducted systems. No matter whether you require one a/c system set up or hundreds for your commercial or industrial complex. We are ready and readily available to service all your air conditioning requirements.
Many HVAC business in Browns Plains only service or install one brand because it is less complicated on their team to only learn about one system. This implies that you could select between upgrading older systems that are working fine or letting your present system go without maintenance until a serious trouble develops. Luckily for you, we service and repair most brands so you could give us a call no matter what your trouble is.
Our quick service is exactly what we are known for, and our professional, lasting outcomes are what keep our customers returning. Our company believe in making your A/C system work the way it should with little work on your part.
Our service technicians have years of experience in the industry and successfully done countless air conditioning service Browns Plains for commercial, industrial and domestic systems. We provide unbiased advice for free that would certainly save you cash and minimize your down time. You can be sure that your air conditioner systems are performing at their best with us on the job.


The Minnesota Supreme Court recently issued a decision that impacts an employee's claim for temporary total disability (TTD) benefits under the Minnesota Workers' Compensation Act and whether those benefits can be offset by benefits paid to the employee for the same period of disability under the employer's self-funded, self-administered, short-term disability (STD) plan.
Upholding the decision of the Workers' Compensation Court of Appeals (WCCA), the Supreme Court ruled there is no statutory authority for an offset of workers' compensation benefits by the amount of benefits paid under an employer's self-funded, self-administered STD plan.
The case at hand, Bruton v. Smithfield Foods, Inc. and ESIS, Inc., involved an employee working for a self-insured employer that maintained workers' compensation insurance through a high deductible policy via an independent carrier. The self-insured employer also maintained, funded, and administered the STD benefits in question. The plan did not qualify as an ERISA plan. The employee's workers' compensation claim was initially denied and he was paid STD benefits by the self-insured's plan.
Subsequently, the employee's claim for workers' compensation benefits was admitted and TTD benefits were paid retroactively for the same period during which the employee received STD benefits. A hearing was held at the Office of Administrative Hearings (OAH) to address the issue of "double recovery" of TTD and STD benefits. Relying on public policy, the compensation judge ruled that the self-insured employer was entitled to offset TTD benefits by STD benefits already paid. The WCCA reversed and the reversal was upheld by the Minnesota Supreme Court.
The Supreme Court noted the concern that self-insured employers are effectively penalized for maintaining an additional wage-loss benefit for its employees with a compensable workers' compensation injury by paying out benefits immediately after an injury occurs while compensability and coverage of the workers' compensation claim is assessed. However, in the absence of a legislative offset provision, the Court was compelled to affirm the decision of the WCCA. In essence, the court has left it up to the legislature to address this obvious discrepancy.
We anticipate this issue will be discussed in future legislative sessions. In the interim, we recommend employers act as "intervenors" and file appropriate intervention motions supporting the payment of STD benefits for any period of time workers' compensation wage loss benefits are claimed, providing policy language that denies double-recovery.
Kristine P. Wobig and the attorneys at Hansen Dordell welcome your questions related to workers' compensation benefits and can be reached by phone (651) 482-8900 or our website, www.hansendordell.com.


text:
Eyebrows raised after India women play World T20 semi-final without Mithali Raj
India's loss in the semifinal was causing the supporters more discomfort since they dropped veteran and their best batter Mithali Raj for the game.
India Women. (Photo Source: Twitter)
SHUBHAM GHOSH
View : 18.3K
Updated - Nov 23, 2018, 12:20 IST
Get every cricket updates! Follow us on
India women failed to better their records at the Women's World T20 this time as well as they lost to England by 8 wickets in the semi-final at Sir Vivian Richards Stadium in North Sound on Thursday. It was a disappointing end to a campaign which was unbeaten till that game and was giving the fans high hopes of the women in blue registering their best performance at the prestigious event.
India's loss in the semifinal was causing the supporters more discomfort since they dropped veteran and their best batter Mithali Raj for the game. The 35-year-old batswoman's omission in a game which was played on a not so conducive wicker raised a lot of eyebrows, including cricket expert Harsha Bhogle.
The decision completely backfired as the Women in Blue were bowled out for just 112 inside 20 overs – their lowest score in this tournament – and the opponent won the game inside 18 overs losing just two wickets. The loss meant India's best performance at the Women's T20 was restricted up to the semi-final.
Decision in team's sake
Indian captain Harmanpreet Kaur, who was picked for the job ahead of the tournament, reflected on the decision to drop Mithali in the post-match presentation saying it was taken aiming at the team's benefit. "Whatever we decided, we decided for the team. Sometimes it works, sometimes it doesn't, no regrets. I'm proud of the way my girls played through the tournament," she said, adding that it was a "learning" for the team.
Mithali, the highest scorer for India in T20Is with 2,283 runs and is nearing 10,000 runs in international cricket, was not played in the Australia game but it was a game with much less pressure compared to the semi-final the pitch for which also required a seasoned batsman to tackle.
Mithali scored half-centuries on both occasions she got the opportunity to bat in the tournament – against Pakistan and Ireland – and was adjudged the player of the match in both games. The decision to ignore her for the crucial tie against England understandably a lot of people stunned and disappointed after the results came out.
Expressing his surprise over the decision to omit Mithali, Bhogle wrote: 'If India can go in without Mithali Raj, this must be twice as good a batting side as any in the world!!! What is the story there?"
If India can go in without Mithali Raj, this must be twice as good a batting side as any in the world!!! What is the story there?
— Harsha Bhogle (@bhogleharsha) November 23, 2018
In another tweet, he spoke on the issue again, asking the wisdom of leaving the veteran batswoman out on a difficult surface.
Can understand, if you have to, that you leave out Mithali in a 180 game. But on a tough pitch? Then you play your best players and she is that. https://t.co/n3bbSodiC6

redpajama_set_name: RedPajamaCommonCrawl


"The rain in Spain stays mainly in the plain" goes the famous song from the musical hit My Fair Lady. "The brain in Jane works mainly in the rain!" was the clever(ish?) quip from my brother.
You can find TheBrainInJane on Twitter, Pinterest, Facebook, Ravelry, and lots of other places.
Born in Switzerland to American parents, I am a CELTA-certified teacher of English as a second language, and I hold an MA in Corporate Communications and Public Relations. Fluent in English, French and Spanish, my hobbies include knitting, crocheting, singing, cycling, baking, amateur theatrics and drinking copious amounts of Yorkshire Tea. I am currently based in Munich, Germany. For more information about what I'm up to, follow the social media links in the right-hand menu.
Pour de plus amples informations en français, veuillez consulter mon profil LinkedIn en français.
Note: All images on this blog are either my own or are sourced from Google images. I try to give credit where it is due. If I have used your image and not credited you properly, please feel free to let me know by commenting on the relevant post.


My Thoughts !: One more year!!
One more year! Let me turn back and see what have I accomplished. There nothing much happened in my personal life. Same old house, same old roomies, same old regular doings and still single. Official life was good. Despite the usual fights with the onsite, designed and shipped a product successfully, which was actually thought as impossible. Now joined a new team and shifted to T.Nagar office. Well. Thats it. One more year has passed and here comes an another birthday saying that you are older by one more year. Most of the new teamies ask me, 'What is your age? hmmmm, 25? 26?'. My answer? I quote from one of my fav songs: '18, till I die'.


San Jose-based ODM Supermicro Computer has announced that they are now shipping a new all-flash NVMe storage server, the SSG-1029P-NMR36L, which is specifically optimized for Samsung's new NF1 form factor SSDs. Designed for high-capacity network storage apps where latency is an issue, it features over ten million IOPS of performance and over half a petabyte of flash storage.
The new all-flash server is a 36-drive 1U system. It supports dual Intel Xeon Scalable processors up to 205 watts [up to 56 cores] and 24 DIMMs for up to 3TB of system memory, which allows it to deliver ten million IOPS of performance and 20GB per second of end-to-end network throughput. The hot-swappable drives can house up to 576TB of all-flash storage.
The customized approach with this model is part and parcel of Supermicro's larger strategy of differentiating itself in the market.
SuperMicro and Samsung will collaborate heavily in promoting the new offering, which should increase its attractiveness to channel partners.
Supermicro's channel strategy has evolved over time.
The new 1U server is available now.


In today's very competitive landscape your website needs to showcase your property at its best.
That is why iko.travel has partnered with Web Connection Asia to offer you the best web-design services.
Your website is one of your best asset and our readymade designs look fantastic while offering functions and features that meet the needs modern online distribution.
We create websites just for hotels that grow conversions and increase profits. Our responsive designs are compatible with all devices so travellers can book on the go.
Choose among our beautiful ready-made mobile-friendly designs that will fit your property and increase conversion.
Ideal for hotels that need a functional, good looking website, yet don't have the time, expertise or patience to do it alone.
Onsite and offsite SEO optimisation, ensuring successful online business.
Our responsive designs are compatible with all devices so travelers can book on the go.
Straightforward and easy to use CMS platform to keep your content and media up to date.
Our web-design specialists will guide you through the process up until your website is ready and live.


We understand that you have many options when chosing where to buy your books these days – both on the high street and online.
Get 10% off your next book on us!
Every time you buy a book from us (either from the shop or from our website) we will give you 10% of it's value towards a future purchase. Just come into the shop to register, or fill in the form below.
It's our way of saying 'thank you' for supporting an independent bookshop.
Please note: Credits last for one year from the date of accrual. Be sure to use them before they expire!


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports System.Threading
Imports Microsoft.CodeAnalysis.CodeActions
Imports Microsoft.CodeAnalysis.CodeFixes
Imports Microsoft.CodeAnalysis.Simplification
Imports Microsoft.CodeAnalysis.VisualBasic.Syntax

Namespace Microsoft.CodeAnalysis.VisualBasic.CodeFixes.RemoveUnnecessaryCast
    Partial Friend Class RemoveUnnecessaryCastCodeFixProvider
        Inherits CodeFixProvider

        Private Class RemoveUnnecessaryCastFixAllProvider
            Inherits BatchSimplificationFixAllProvider

            Friend Shared Shadows ReadOnly Instance As RemoveUnnecessaryCastFixAllProvider = New RemoveUnnecessaryCastFixAllProvider()

            Protected Overrides Function GetNodeToSimplify(root As SyntaxNode, model As SemanticModel, diagnostic As Diagnostic, workspace As Workspace, ByRef codeActionId As String, cancellationToken As CancellationToken) As SyntaxNode
                codeActionId = Nothing
                Return GetCastNode(root, model, diagnostic.Location.SourceSpan, cancellationToken)
            End Function

            Protected Overrides ReadOnly Property NeedsParentFixup As Boolean
                Get
                    Return True
                End Get
            End Property

            Protected Overrides Async Function AddSimplifyAnnotationsAsync(document As Document, nodeToSimplify As SyntaxNode, cancellationToken As CancellationToken) As Task(Of Document)
                Dim cast = TryCast(nodeToSimplify, ExpressionSyntax)
                If cast Is Nothing Then
                    Return document
                End If

                Return Await RemoveUnnecessaryCastAsync(document, cast, cancellationToken).ConfigureAwait(False)
            End Function
        End Class
    End Class
End Namespace