Put SearchTrait.php in app directory. Then use SearchTrait in your model, like so
use App\SearchTrait;
use Illuminate\Database\Eloquent\Model;
class Article extends Model {I hereby claim:
To claim this, I am signing this object:
| <?php | |
| class NgayThangNam { | |
| protected $ngay, $thang, $nam; | |
| function __construct($ngay = 1, $thang = 1, $nam = 2020) | |
| { | |
| if (is_string($ngay) || is_string($thang) || is_string($nam)) { | |
| print("Dữ liệu nhập vào không hợp lệ"); | |
| return; | |
| } |
| /* | |
| * Problem: | |
| * Given an array of words and a length l, format the text such that each line has exactly l characters and is fully justified on both the left and the right. Words should be packed in a greedy approach; that is, pack as many words as possible in each line. Add extra spaces when necessary so that each line has exactly l characters. | |
| * Extra spaces between words should be distributed as evenly as possible. If the number of spaces on a line does not divide evenly between words, the empty slots on the left will be assigned more spaces than the slots on the right. For the last line of text and lines with one word only, the words should be left justified with no extra space inserted between them. | |
| * Example: | |
| * For ["This", "is", "an", "example", "of", "text", "justification."] | |
| * and l = 16, the output should be ["This is an", | |
| * "example of text", | |
| * "justification. "] | |
| * |
cmd@fb:/tmp|❯ wc -l 33m-subdomain-wordlist.txt
33927885 33m-subdomain-wordlist.txtTranslated from https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/, author: Mark Erikson (from Redux team)
Bài viết cung cấp chi tiết về cách mà React render hoạt động, và việc sử dụng Context và Redux ảnh hưởng thế nào tới quá trình render của React.
Rendering is the process of React asking your components to describe what they want their section of the UI to look like, now, based on the current combination of props and state.
| const id = (Math.random() + 1).toString(36).substring(4); | |
| const endpoint = `ws://tokyo.thuc.space/socket?key=${id}&name=${id}`; | |
| const ws = new WebSocket(endpoint); | |
| const rotate = (deg: number) => ws.send(`{"e": "rotate", "data": ${deg}}`); | |
| const fire = () => ws.send(`{"e": "fire"}`); | |
| ws.onopen = () => { |