Skip to content

Instantly share code, notes, and snippets.

View rickynguyen4590's full-sized avatar

Ricky Nguyễn rickynguyen4590

View GitHub Profile
@rickynguyen4590
rickynguyen4590 / matrix-pthreads.php
Created March 2, 2021 17:26
Multiple matrix with pthread
<?php
class MatrixThreaded extends Threaded
{
public function __construct($rowIndex, $row, $matrix2)
{
$this->rowIndex = $rowIndex;
$this->row = $row;
$this->matrix2 = $matrix2;
@rickynguyen4590
rickynguyen4590 / pthreads.php
Created January 24, 2021 06:06
Sample code pthreads 3.20 in php 7.2
<?php
class KikiThreaded extends Thread
{
private $id;
public function __construct($id)
{
$this->id = $id;
}
@rickynguyen4590
rickynguyen4590 / php_multi_thread.php
Last active January 19, 2021 15:39
Code mẫu lập trình multi-thread trong php
<?php
class AsyncOperation extends Thread {
public function __construct($arg) {
$this->arg = $arg;
}
public function run() {
if ($this->arg) {
$sleep = mt_rand(1, 10);
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"profiles":
{
"list":
[
{
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart