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\Http; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
class Kernel extends HttpKernel | |
{ | |
/** | |
* The application's global HTTP middleware stack. |
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
-- phpMyAdmin SQL Dump | |
-- version 2.11.7 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Feb 11, 2010 at 09:36 AM | |
-- Server version: 5.0.51 | |
-- PHP Version: 5.2.6 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
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
myApp.directive("scrollable", function() { | |
return function(scope, element, attrs) { | |
var container = angular.element(element); | |
container.bind("scroll", function(evt) { | |
if (container[0].scrollTop <= 0) { | |
alert('On the top of the world I\'m singing I\'m dancing.'); | |
} | |
/*if (container[0].offsetHeight + container[0].scrollTop >= container[0].scrollHeight) { | |
alert('On the bottom of the world I\'m waiting.'); | |
}*/ |
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
function displayPreview(files) { | |
var reader = new FileReader(); | |
var img = new Image(); | |
reader.onload = function (e) { | |
img.src = e.target.result; | |
img.onload = function () { | |
if(this.width != 622 || this.height != 400){ | |
new PNotify({ | |
title: 'Warning', | |
text: "That image size will not show a better view", |
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
<script> | |
$("#recordVidoePublish").submit(function(event){ | |
event.preventDefault(); | |
var fd = new FormData(); | |
fd.append('data', player.recordedData); | |
$.ajax({ | |
url: "your/url.php", | |
type: "POST", | |
data: fd, | |
cache: false, |
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
{{-- first use this directive in html --}} | |
<div ng-cloak> | |
{{ test }} | |
</div> | |
{{-- Then use this style in your page --}} | |
<style> | |
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { | |
display: none !important; |
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 | |
//first check is count variable exists and also count variable is not null | |
echo $count ?? $count ?? 10; | |
//output 10; | |
$count = 'data'; | |
echo $count ?? $count ?? 10; | |
//output data; |
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 | |
//right way | |
function foo(): array { | |
return []; | |
} | |
var_dump(foo()); | |
//wrong way |
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 | |
//right way | |
function test(int $a){ | |
return $a; | |
} | |
var_dump(test(1)); | |
//wrong way |
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 | |
//example | |
$array = [ | |
[ | |
'foo' => 5.5, | |
'bar' => 'abc' | |
], | |
[ | |
'foo' => 7.7, | |
'bar' => 'xyz' |