This file contains hidden or 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
| if (isset($_POST['CategoryFeatureRestrictedValue'])) { | |
| $model->attributes = $_POST['CategoryFeatureRestrictedValue']; | |
| if ($model->validate()) { | |
| //$response['status'] = $model->save(); | |
| //$response['flash_msg'] = Yii::app()->user->getFlashes(); | |
| //echo CJSON::encode($response); | |
| $this->redirect(array('index', 'categoryFeatureId' => $model->category_feature_id)); |
This file contains hidden or 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
| //Yii::app()->clientScript->scriptMap['*.js'] = false; | |
| //Yii::app()->clientScript->scriptMap['*.css'] = false; |
This file contains hidden or 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
| SELECT COUNT(*) | |
| FROM ( | |
| SELECT `pf`.`product_id` | |
| FROM `products` `p` | |
| JOIN `products_feature` `pf` ON p.product_id = pf.product_id | |
| WHERE | |
| p.`category_id` = 151 AND | |
| (pf.feature_id=5 AND (`value` IN ('1600'))) | |
| OR | |
| (pf.feature_id=6 AND `value` IN ('1024', '2048')) |
This file contains hidden or 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
| While you are logged into a server, you can run a script in detached mode by the following command: | |
| nohup script >script.out 2>script.err & | |
| Later when you log in again, you can check script.out for any output, and script.err for any error messages. If you want output and error messages in the same file, then do: | |
| nohup script >script.out 2>&1 & |
This file contains hidden or 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
| 194.28.87.71 |
This file contains hidden or 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
| ./programma | |
| ctrl + Z | |
| bg | |
| disown -h | |
| Когда нужно ее в foreground вернуть уже после нового входа на сервер по ssh : | |
| fg | |
| Список запущенных прог - команда jobs |
This file contains hidden or 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
| $value_str = self::model()->find( | |
| "category_id = :category_id AND feature_id = :feature_id", | |
| array( | |
| ':category_id' => $category_id, | |
| ':feature_id' => $feature_id, | |
| ) | |
| ); |
This file contains hidden or 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
| SELECT login, COUNT(login) AS cnt | |
| FROM users GROUP BY login | |
| HAVING ( COUNT(login)>1 ); |
This file contains hidden or 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 bin/phpdoc.php run -d ./src -t ./web/api |
This file contains hidden or 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
| <? | |
| //Controller: | |
| if ($this->getRequest()->isXmlHttpRequest()) | |
| { | |
| $response = new JsonResponse(); | |
| $response->setData(array( | |
| 'title' => $title, | |
| 'data' => $this->render('AcmeMainBundle:Default:index.html.twig' | |
| ) |