- Download the perforce visual tool suite from here: http://www.perforce.com/perforce/downloads/index.html
- Copy only the p4merge.app file into your /Applications/ directory
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
class RestCreateComponent extends RestComponent | |
{ | |
public $components = ['RestError']; | |
public function initialize(array $config) | |
{ | |
parent::initialize($config); | |
$con = $this->getController(); | |
$this->eventManager($con->eventManager()); | |
} | |
public function create() { |
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 | |
/** | |
* Wraps the callable in a try/finally before calling dispose() | |
* | |
* @param GemsDisposable $obj | |
* @param callable $worker | |
* @return mixed | |
*/ | |
function using(GemsDisposable $obj, callable $worker) | |
{ |
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 | |
namespace Gems\Tools; | |
use Cake\Datasource\EntityInterface; | |
use Cake\Error\PHP7ErrorException; | |
use Cake\Log\Log; | |
use Cake\ORM\Table; | |
use Cake\Utility\Hash; | |
use Error; |
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 | |
namespace App\Controller; | |
use CakeDC\Users\Controller\Traits\LoginTrait; | |
use CakeDC\Users\Controller\Traits\RegisterTrait; | |
class UsersController extends AppController { | |
use RegisterTrait { |
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
@ECHO OFF | |
start notepad++ %* |
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
@ECHO OFF | |
git status | |
IF %ERRORLEVEL% NEQ 0 (EXIT /B -1) | |
git add --all | |
IF %ERRORLEVEL% NEQ 0 (EXIT /B -1) | |
IF "%~1"=="" GOTO END_BATCH | |
git commit -m %1 | |
IF %ERRORLEVEL% NEQ 0 (GOTO END_BATCH) |
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
@ECHO OFF | |
git remote -v | |
git status | |
git branch |
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
public function saveKeyValues(Model $Model, $data){ | |
if(empty($data) || !isset($data[$Model->alias]) || empty($data[$Model->alias])) | |
{ | |
return false; | |
} | |
$optionKey = $this->options[$Model->alias]['fields']['key']; | |
$optionValue = $this->options[$Model->alias]['fields']['value']; | |
// I don't understand this part. |
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
public boolean isPrime(int n) | |
{ | |
int divisor = 2; | |
int limit = n-1 ; | |
if (n == 2) | |
{ | |
return true; | |
} | |
NewerOlder