Let's assume we want to deploy our app to http://example.com/projects/laravel-vue-demo/. Here's what you will need to do:
- Add the next keys to your
.env
config:
APP_PUBLIC_PATH=
VUE_PUBLIC_PATH=/
DELIMITER $$ | |
CREATE EVENT employeeResign | |
ON SCHEDULE EVERY 2 MINUTE | |
DO | |
BEGIN | |
DECLARE done INT DEFAULT FALSE; | |
DECLARE rowId INT; | |
DECLARE employeeId INT; |
ALTER TABLE `employees` ADD `last_increment_date` DATE NULL DEFAULT NULL AFTER `signature_by`, ADD `last_increment_amount` DOUBLE NULL DEFAULT NULL AFTER `last_increment_date`; | |
ALTER TABLE `employees` CHANGE `contact_end` `contact_end` DATE NULL DEFAULT NULL; | |
ALTER TABLE `complain_sheet2` CHANGE `qc_remarks` `qc_remarks` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; |
https://averagelinuxuser.com/after-installing-ubuntu-20-04/ | |
https://ubuntuhandbook.org/index.php/2021/10/top-things-ubuntu-21-10-desktop/ | |
php multiple version on same time | |
https://devanswers.co/run-multiple-php-versions-on-apache/ | |
php switch version | |
https://tecadmin.net/install-php-ubuntu-20-04/ | |
SELECT | |
SUM(IF(month = 'Jan', total, 0)) AS 'Jan', | |
SUM(IF(month = 'Feb', total, 0)) AS 'Feb', | |
SUM(IF(month = 'Mar', total, 0)) AS 'Mar', | |
SUM(IF(month = 'Apr', total, 0)) AS 'Apr', | |
SUM(IF(month = 'May', total, 0)) AS 'May', | |
SUM(IF(month = 'Jun', total, 0)) AS 'Jun', | |
SUM(IF(month = 'Jul', total, 0)) AS 'Jul', | |
SUM(IF(month = 'Aug', total, 0)) AS 'Aug', | |
SUM(IF(month = 'Sep', total, 0)) AS 'Sep', |
http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ | |
//SELECT t1.title, t1.id, t1.root FROM chart_of_ac AS t1 LEFT JOIN chart_of_ac as t2 ON t1.id = t2.root WHERE t2.id IS NULL AND t1.title like '%cash%' | |
select leaf node of a parant | |
//SELECT TRIM(RIGHT(TRIM(concat_ws(' ', ifnull(t1.id,''), ifnull(t2.id,''), ifnull(t3.id,''), ifnull(t4.id,'') )),20)) as id FROM chart_of_ac AS t1 LEFT JOIN chart_of_ac AS t2 ON t2.root = t1.id LEFT JOIN chart_of_ac AS t3 ON t3.root = t2.id LEFT JOIN chart_of_ac AS t4 ON t4.root = t3.id WHERE t1.id = '3' ORDER BY t1.title |
Problem 1: count elements | |
input: | |
list = [50, 20, 11, 5, 7, 50, 7] | |
output: | |
dict {5: 1, 7 : 2, 11: 1, 20: 1, 50: 2} | |
Problem 2: | |
n_list = [5,6,8,10, 9,12] | |
op_list = [6,8,10,12] |
<?php | |
// Your code here! | |
// Method: POST, PUT, GET etc | |
// Data: array("param" => "value") ==> index.php?param=value | |
function CallAPI($method, $url, $data = false) | |
{ | |
$curl = curl_init(); | |
switch ($method) |
Let's assume we want to deploy our app to http://example.com/projects/laravel-vue-demo/. Here's what you will need to do:
.env
config:APP_PUBLIC_PATH=
VUE_PUBLIC_PATH=/
MYSQL CONFIGURATION: | |
innodb_buffer_pool_size = 16M | |
innodb_additional_mem_pool_size = 2M | |
## Set .._log_file_size to 25 % of buffer pool size | |
innodb_log_file_size = 5M | |
innodb_log_buffer_size = 8M | |
#---------------------------------------------------- | |
# !!!! Query Cache Config !!!! | |
#---------------------------------------------------- |
/* Initialise the date picker. */ | |
if (!$.datepicker.initialized) { | |
$(document).mousedown($.datepicker._checkExternalClick) | |
.find(document.body).append($.datepicker.dpDiv); // added line | |
$.datepicker.initialized = true; | |
} |