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
| .directive("currencyInput", ['$filter', '$timeout', function ($filter, $timeout) { | |
| return { | |
| replace: false, | |
| restrict: "A", | |
| require: "?ngModel", | |
| link: function (scope, element, attrs, ngModel) { | |
| if (!ngModel) { | |
| return; | |
| } |
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
| module.controller('ControllerName', [ | |
| '$scope', | |
| '$q', | |
| function ( | |
| $scope, | |
| $q | |
| ) { | |
| var initResources = function (resources) { | |
| // init after data loading | |
| }; |
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(`task_id`) / 66413) * 100 AS percent, | |
| (SELECT `title` FROM `cats` WHERE `cat_id` = `tasks`.`cat_id`) as category | |
| FROM `tasks` | |
| GROUP BY `cat_id` | |
| ORDER BY `percent` DESC |
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 | |
| public function _prettify_order_response($order) | |
| { | |
| // Load dependencies | |
| $subjects = $this->subjects; | |
| // Init field->filter array | |
| $nice_response = array( | |
| 'id' => 'task_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
| <?php | |
| /** | |
| * Give or deny access for some user level | |
| * Examples: | |
| * "+(4)" --> [4] | |
| * "+(user, 4)" --> [1, 4] | |
| * "+(10) -(2, operators) +(all)" --> [1,2,3,4,7,10] | |
| * "+(all)-(3)" --> [1,2,4,7,10] | |
| * "-(all)" --> [] |
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
| mysql> UPDATE files SET href = | |
| IF(POSITION("assignments/uploaded_files" IN href) , | |
| CONCAT( | |
| "http://www.assignmentexpert.com/uploads/users_files" , | |
| SUBSTR( | |
| href , | |
| POSITION("assignments/uploaded_files" IN href) + 26 , | |
| LENGTH(href) - 26 | |
| ) | |
| ) , |
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 | |
| function isSubjectAvailableToRole($subject, $access_level) { | |
| // 9 - Expert | |
| // {N} - {Role} | |
| $denied = array( | |
| 9 => array('price') | |
| ); | |
| return ! in_array($subject, $denied[$access_level]); |
NewerOlder