View example.php
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; |
View example.php
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 | |
{ |
View example.php
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 |
View example.php
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 | |
{ |
View example.js
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, |
View example.js
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'; |
View example.js
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); |
View example.js
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> |
View TwoBishopsRandomizerTest.php
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