remove all branches except master
git branch -a | grep -v "master" | sed -e 's/remotes\/origin\///g' | xargs git push origin --delete| //centering content inside scrollView | |
| override func viewDidLayoutSubviews() { | |
| super.viewDidLayoutSubviews() | |
| let offsetY = max((scrollView.bounds.height - scrollView.contentSize.height) * 0.5, 0) | |
| self.scrollView.contentInset = UIEdgeInsetsMake(offsetY, 0, 0, 0) | |
| } |
remove all branches except master
git branch -a | grep -v "master" | sed -e 's/remotes\/origin\///g' | xargs git push origin --delete| <key>NSAppTransportSecurity</key> | |
| <dict> | |
| <key>NSAllowsArbitraryLoads</key> | |
| <false/> | |
| <key>NSExceptionDomains</key> | |
| <dict> | |
| <key>cocoacasts.com</key> | |
| <dict> | |
| <key>NSIncludesSubdomains</key> | |
| <true/> |
| var activeField: UITextField? = nil | |
| func registerForKeyboardNotifications(){ | |
| NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil) | |
| NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil) | |
| } | |
| func removeForKeyboardNotifications(){ | |
| NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIKeyboardWillShow, object: nil) | |
| NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIKeyboardWillHide, object: nil) |
| <?php | |
| $id = $this->badge_id; | |
| return \common\models\Country::find()->joinWith(['badgeCountryAccess' => function($query) use ($id){ | |
| return $query->andOnCondition(['bca_badge_id' => $id]); | |
| }])->orderBy('country_name')->all(); |
| <?php | |
| namespace backend\models\forms; | |
| use common\models\Badge; | |
| use common\models\BadgeCountryAccess; | |
| use Yii; | |
| use yii\base\Model; | |
| use yii\web\UploadedFile; | |
| /** |
| html::-webkit-scrollbar { | |
| background-image: -webkit-gradient(linear, left top, left bottom, color-stop(59%, black), color-stop(0%, rgba(255, 255, 255, 0))); | |
| background-image: -webkit-linear-gradient(top, black 59%, rgba(255, 255, 255, 0) 0%); | |
| background-image: linear-gradient(to bottom, black 59%, rgba(255, 255, 255, 0) 0%); | |
| background-size: 4px 3px; | |
| background-repeat: repeat-y; | |
| background-position: center center; | |
| width: .7rem; | |
| } | |
| html::-webkit-scrollbar-button { |
openssl req -newkey rsa:2048 -sha256 -nodes -keyout hostname.key -x509 -days 365 -out hostname.pem -subj "/C=US/ST=New York/L=Brooklyn/O=Example Brooklyn Company/CN=hostname.com" && \
openssl x509 -in hostname.pem -out hostname.crt
| <?php | |
| $result = Order::find()->select(['price', 'firstname', 'lastname'])->joinWith('user')->createCommand()->queryAll(); | |
| Array | |
| ( | |
| [client_id] => f43e28ff | |
| [client_name] => name | |
| ) |
| <?php | |
| $dataProvider = new ActiveDataProvider([ | |
| 'query' => $query->select('client.*')->joinWith(['r_cli_tt.tt'])->addSelect('SUM(r_cli_tt_potential_sellers_cnt) as potentialsSum')->groupBy(['client_id']), | |
| ]); | |
| и соответственно добавить potentialsSum в модель |