Text from many User (A, B, C, D and E ...)
/**
* Message text:
* A has been
* A and B have been
* A, B, C, D and E have been
*/
function messageTextFromManyUsers ($messageText, $nameUser, $count, $total) {
if ($total == 1) {
$messageText =...
Cách tạm thời dừng công việc hiện tại để làm việc khác:
1 Tạm thời lưu lại các phần công việc còn đang làm dở
$ git stash -u
2 Chuyển sang một branch khác và làm việc
$ git checkout -b other-branch
~làm việc, làm việc, làm việc~
$ git add <các file cần thiết> $ git commit -m "commit message"
3...
Cách tạo nhánh mới từ commit bất kỳ:
1. Copy hash và pull commit trên git về:
git checkout d6f52db93645955904f42421483b59e75240dbb7
git pull
2. Checkout develop rồi tạo nhánh mới với commit:
git checkout develop
git checkout -b Task#1234-2 d6f52db93645955904f42421483b59e75240dbb7
1. Cài đặt trên Visual studio Code:
Import libary: Live sass
Sau đó để kích hoạt click vào "Watch Sass" dưới góc phải màn hình VSC.
2. Sử dụng biến:
$main-color:blue;
3. Kế thừa:
Tạo file với tên _header.scss
Lệnh:
@import "header";
4. Function:
Dùng @mixin
$main-color:blue;
@mixin buttonStyle...
1. Chat GPT : Giải đáp mọi thứ
2. Altered.ai : Biến đổi giọng nói
3. Synthesia.io : Chuyển văn bản sang video
4. Midjourney.com : Chuyển văn bản thành hình ảnh.
5. Playgroundai.com : Chỉnh sửa ảnh bằng văn bản.
Mô tả: Khi dùng data (object) và sử dụng từ data đó không cần gọi lại sql. Ta có thể dùng filter.
Ví dụ:
isset($_GET['category_id']) ? $category_id = $_GET['category_id'] : $category_id = '';
$allVideos = $this->videoRepository->getAllVideos();
$filtered_collection =...
The MG10 supplies up to 10KW of electricity (single or 3 phase) for domestic and commercial applications
The Magnetic Generator is complex system with an organized structural arrangement of permanent magnets, bifilar coils and PCB controller with specially designed software.
Initial start is...
Những thiết lập Customizer bạn tùy biến khi sử dụng themes gốc thì giờ bạn hãy chuyển nó về cơ sở dữ liệu themes child. Thoải mái cập nhật, không sợ bị mất code!
Để dễ hình dùng thì trong video mình có nói chi tiết về phần này.
Bước 1: Truy cập vào phpmyadmin để cho dễ dàng thực hiện.
Bước 2...
Các hàm xử lý mảng trong PHP
Hàm
Mô tả
PHP
array()
Tạo một mảng
3
array_change_key_case()
Trả về một mảng với tất cả key trong dạng chữ hoa hoặc chữ thường
4
array_chunk()
Chia một mảng thành một mảng các mảng
4
array_combine()
Tạo một mảng bởi sử dụng một mảng cho key và mảng khác cho...
<div style="width: 50%">
<div id = "heightTablet1">
<p style="font-size: 14px; font-weight: 400;">
Anh là ai nỗi nhớ khôn nguôi là anh
Mưa phùn rơi từ nơi quá khứ như đưa về đâu
Tôi đang ở đây cơn mưa làm rơi ướt vai vì ai, vì sao?
Giờ anh ở đâu?
Anh là ai ngày mai nếu bước chân tôi cô đơn về...
This crontab run everyday at every hours to check if video upload already convert to another format.
Note code:
Docker:
- webserver\Dockerfile
#setup crontab
COPY crontabs/root /var/spool/cron/crontabs
RUN crontab /var/spool/cron/crontabs/root
RUN touch /var/log/crons.log
-...
UserSeeder.php
<?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
class ThumbnailS3Seeder extends Seeder
{
/**
* Run the database seeds.
*
*...
pll_current_language
Returns the current language
Usage:
pll_current_language($value);
‘$value’ => (optional) either ‘name’ or ‘locale’ or ‘slug’, defaults to ‘slug’
returns either the full name, or the WordPress locale (just as the WordPress core function ‘get_locale’ or the slug (...