- XAMPP for Windows: https://www.apachefriends.org/download.html
- The VC14 builds require to have the Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed
- The VC15 builds require to have the Visual C++ Redistributable for Visual Studio 2017 x64 or x86 installed
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
$this->add(array( | |
'name' => 'status', | |
'type' => 'Checkbox', | |
'options' => array( | |
'checked_value' => 'A', | |
'unchecked_value' => 'S' | |
), | |
'attributes' => array( | |
'id' => 'status', | |
'class' => 'form-control ', |
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
<?php | |
// Based on <https://github.com/mecha-cms/extend.minify> | |
define('MINIFY_STRING', '"(?:[^"\\\]|\\\.)*"|\'(?:[^\'\\\]|\\\.)*\''); | |
define('MINIFY_COMMENT_CSS', '/\*[\s\S]*?\*/'); | |
define('MINIFY_COMMENT_HTML', '<!\-{2}[\s\S]*?\-{2}>'); | |
define('MINIFY_COMMENT_JS', '//[^\n]*'); | |
define('MINIFY_PATTERN_JS', '/[^\n]+?/[gimuy]*'); | |
define('MINIFY_HTML', '<[!/]?[a-zA-Z\d:.-]+[\s\S]*?>'); |
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
1. cd module/mymodule | |
2. run this command: | |
../../vendor/zendframework/zendframework/bin/classmap_generator.php -w | |
This will auto search all class in the current module and make a map from class to real path in current project |
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
Use preg_replace function to make regex on HTML tag contain style | |
$value = preg_replace('/(<[^>]*) style=("[^"]+"|\'[^\']+\')([^>]*>)/i', '$1$3', $value); |
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
Config virtual host from httpd.conf (or httpd-vhost.conf file) | |
Http | |
<VirtualHost *:80> | |
DocumentRoot "C:/xampp/htdocs/myproject/web" | |
ServerName www.myurl.com | |
<Directory "C:/xampp/htdocs/myproject/web"> | |
Options All | |
AllowOverride All | |
Require all granted |
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
$form->get("username")->setAttribute('disabled', 'disabled'); |
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
1.activate current env at your path | |
pyvenv-3.5 ~/Envs/thesis_python3/ | |
source ~/Envs/thesis_python3/bin/activate | |
2. list all of modules using in the current environtment by using freeze | |
pip freeze > requirements.txt | |
(this command with generate txt file list all modules have installed) | |
3. create new env, and from this new env, install all modules have list in the txt file | |
pip install -r requirements.txt |
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
This library require some other dependencies as Scipy, numpy... and other library compile c library (gcc, python dev). | |
For Python ver 3.5, let's install python dev as command: | |
sudo apt-get install python3-dev | |
This will require some libs as: libpython3-dev libpython3.5-dev python3.5-dev | |
After clone fastText lib, cd to fastText folder and use pip instsall | |
pip install . |
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 install magento 2, some css and js lib can not run because symlinks Magento 2 create. | |
We can fix this issue by | |
1. on di.xml file at app/etc, and find virtualType name="developerMaterialization" section | |
find item name="view_preprocessed", modify content from Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy | |
2. Delete the files under pub/static to get rid of any existing symlinks. You may want to be careful not to delete the .htaccess file. | |
From https://magento.stackexchange.com/questions/64802/magento-2-404-error-for-scripts-and-css/64808#64808 |
OlderNewer