This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\DataFixtures; | |
use App\Entity\User; | |
use Doctrine\Bundle\FixturesBundle\Fixture; | |
use Doctrine\Common\Persistence\ObjectManager; | |
use Faker\Factory; | |
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\DataFixtures; | |
use App\Entity\User; | |
use Doctrine\Bundle\FixturesBundle\Fixture; | |
use Doctrine\Common\Persistence\ObjectManager; | |
class UserFixtures extends Fixture | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity(repositoryClass="App\Repository\UserRepository") | |
*/ | |
class User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\DataFixtures; | |
use App\Entity\User; | |
use Doctrine\Bundle\FixturesBundle\Fixture; | |
use Doctrine\Common\Persistence\ObjectManager; | |
class UserFixtures extends Fixture | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/features/dialog/PlayComputerDialog.js | |
import * as React from 'react'; | |
import { useDispatch, useSelector } from 'react-redux'; | |
import CloseIcon from '@mui/icons-material/Close'; | |
import { | |
Button, | |
Dialog, | |
DialogContent, | |
DialogTitle, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/features/dialog/SelectColorButtons.js | |
import * as React from 'react'; | |
import { Avatar, ButtonGroup, IconButton } from '@mui/material'; | |
import { makeStyles } from '@mui/styles'; | |
import wKing from '../../assets/img/pieces/png/150/wKing.png'; | |
import wbKing from '../../assets/img/pieces/png/150/wbKing.png'; | |
import bKing from '../../assets/img/pieces/png/150/bKing.png'; | |
import Pgn from '../../common/Pgn'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useRef } from 'react'; | |
import { useDispatch, useSelector } from 'react-redux'; | |
import Ascii from '../common/Ascii'; | |
import Pgn from '../common/Pgn'; | |
import Piece from '../common/Piece'; | |
// ... | |
const Board = ({props}) => { | |
const state = useSelector(state => state); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function TextInputWithFocusButton() { | |
const inputEl = useRef(null); | |
const onButtonClick = () => { | |
// `current` points to the mounted text input element | |
inputEl.current.focus(); | |
}; | |
return ( | |
<> | |
<input ref={inputEl} type="text" /> | |
<button onClick={onButtonClick}>Focus the input</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Chess\Tests\Unit\Randomizer\Checkmate; | |
use Chess\Randomizer\Checkmate\TwoBishopsRandomizer; | |
use Chess\FEN\BoardToStr; | |
use Chess\PGN\AN\Color; | |
use Chess\Tests\AbstractUnitTestCase; | |
class TwoBishopsRandomizerTest extends AbstractUnitTestCase |
NewerOlder