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. Copy MandrillServiceProvider in app/Providers/ directory. | |
2. Copy Mandrill in app/Facades/ directory | |
3. add MandrillServiceProvider in providers array | |
'providers' => [ | |
\App\Providers\MandrillServiceProvider::class, | |
] | |
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
def permutations(s): | |
result = [x for x in s] | |
copy = [] | |
for i in s: | |
for v in result: | |
copy.append(i + v) | |
result = copy + result |
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
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache |
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
0 => "yii\base\ActionFilter" | |
1 => "yii\behaviors\AttributeBehavior" | |
2 => "yii\behaviors\AttributeTypecastBehavior" | |
3 => "yii\behaviors\AttributesBehavior" | |
4 => "yii\behaviors\BlameableBehavior" | |
5 => "yii\behaviors\SluggableBehavior" | |
6 => "yii\behaviors\TimestampBehavior" | |
7 => "yii\filters\AccessControl" | |
8 => "yii\filters\AjaxFilter" | |
9 => "yii\filters\ContentNegotiator" |
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
Schema | |
------ | |
customer | |
id | |
username | |
created_at | |
order |
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
var T_HTML = 'T_HTML'; | |
var T_VAL = 'T_VAL'; | |
var T_TEXT = 'T_TEXT'; | |
var T_FUNCTION = 'T_FUNCTION'; | |
window.Observer = { | |
types: [T_HTML, T_VAL, T_TEXT, T_FUNCTION], | |
add: function (key, value, observer, type) { | |
var that = this; |
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 | |
/** | |
An array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. | |
Your goal is to find that missing element. | |
Write a function: | |
function solution($A); |
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 | |
$a = [1, 2, 3, 4, 6, 7]; | |
sort($a); | |
if ($a[0] != 1) { | |
return 0; | |
} |
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\Models\ImageAware; | |
interface ImageAwareInterface | |
{ | |
public function saveImage($file, $attribute = 'image', $disk = 'local'); | |
public function getImageUrl($attribute = 'image', $default = null); | |
} |
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\Models\ImageAware; | |
use Illuminate\Http\UploadedFile; | |
trait ImageAwareTrait | |
{ | |
/** | |
* Save image and get image name |