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
<IfModule mod_headers.c> | |
Header set Access-Control-Allow-Origin "*" | |
Header set Access-Control-Allow-Methods "GET,PUT,POST,DELETE" | |
Header set Access-Control-Allow-Headers "Content-Type, Authorization" | |
</IfModule> |
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 strjoin(a) { | |
if(a.length===0) return ''; | |
let r = a.shift(); | |
while(a.length>1) { | |
r += ', '+a.shift(); | |
} | |
if(a.length) { | |
r += ' and '+a.shift(); | |
} | |
return r; |
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
After reading several solutions in forums this is what worked for me | |
$sheet->setCellValue('A1', number_format(1234.5, 2, '.', '')); | |
$sheet->getStyle('A1')->getNumberFormat()->setFormatCode('#,##0.00 "€"_-'); | |
Must write: 1,234.50 € |
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
HTMLElement.prototype.css = function (props) { | |
for(prop in props) this.style.setProperty(prop, props[prop]); | |
return this; | |
}; | |
/* | |
* Online demo: https://codepen.io/albinsoft/pen/OJrRKvm | |
*/ |
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 file_upload_max_size_int() { | |
static $max_size = -1; | |
if($max_size<0) { | |
$post_max_size = intval(ini_get('post_max_size')); | |
$upload_max_size = intval(ini_get('upload_max_filesize')); | |
$max_size = min($post_max_size, $upload_max_size); | |
} | |
return $max_size; | |
} |
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
/* | |
Initial CSS | |
*/ | |
:root { | |
--font-titles: 'XXXXXX'; | |
--font-text: 'XXXXXX'; | |
--color1: #XXXXXX; | |
--sprites: url('images/sprites.svg'); | |
} |