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
function endOfWeek(date) | |
{ | |
var lastday = date.getDate() - (date.getDay() - 1) + 6; | |
return new Date(date.setDate(lastday)); | |
} | |
$('#datetimepicker1').datetimepicker({ | |
format: 'dddd, MMMM Do YYYY, h a', |
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 | |
$fields = []; | |
$moduleFields = $module->fields; | |
foreach ( $moduleFields as $key => $field) | |
{ | |
if(in_array(substr($field['colname'],-3),['_en','_ka','_az','_ru','_hy'])) | |
{ | |
$fields[ substr($field['colname'],-2) ][] = $field; |
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
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css"/> | |
<script src="https://cdn.datatables.net/buttons/1.5.2/js/dataTables.buttons.min.js"></script> | |
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.flash.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script> | |
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/pdfmake.min.js"></script>--> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.36/vfs_fonts.js"></script> | |
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.html5.min.js"></script> | |
<script src="https://cdn.datatables.net/buttons/1.5.2/js/buttons.print.min.js"></script> |
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
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3&sensor=false"></script> | |
<div id="map_div" style="height: 400px;"></div> | |
<script type="text/javascript"> | |
/** | |
* Define an array of custom styles. | |
*/ | |
var CustomMapStyles = [ | |
{ |
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
// route.php | |
$locale = Request::segment(1); | |
// url ში არსებული უკვე ვალიდური ენი სკოდი გამოვიყნოთ ენის პარამეტრების | |
// დაყენებისთვის | |
if (in_array( $locale, ['en', 'ru','ge'] )) | |
{ | |
if(\App::getLocale() != $locale) | |
{ | |
\App::setLocale($locale); |
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
The simple answer is to set the Access-Control-Allow-Origin header to localhost or *. Here's how I usually do it: | |
Add the following code to bootstrap/app.php: | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Methods: *'); | |
header('Access-Control-Allow-Headers: *'); |
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
CREATE TABLE newtable LIKE oldtable; | |
INSERT newtable SELECT * FROM oldtable; | |
To copy just structure and data use this one: | |
CREATE TABLE tbl_new AS SELECT * FROM tbl_old; |
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
// Line 180 ზე laraadmin ის UplaodController | |
$filepath = $file_date_folder.'/'.$filename; | |
$result = shell_exec("ffmpeg -i ".$filepath.' 2>&1 | grep -o \'Duration: [0-9:.]*\''); | |
$duration = str_replace('Duration: ', '', $result); // 00:05:03.25 | |
//get the duration in seconds | |
$timeArr = preg_split('/:/', str_replace('s', '', $duration[0])); | |
$t = (($timeArr[3])? $timeArr[3]*1 + $timeArr[2] * 60 + $timeArr[1] * 60 * 60 : $timeArr[2] + $timeArr[1] * 60)*1000; | |
Log::info( $duration ); | |
Log::info( $result ); |
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
audio = document.getElementsByTagName("audio")[0]; | |
//functions | |
audio.load(); | |
audio.play(); | |
audio.pause(); | |
//properties | |
audio.currentSrc | |
audio.currentTime |
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
use Dwij\Laraadmin\Controllers\FieldController; | |
$titles = [ | |
'ქალაქი' => 'city', | |
'რეგიონი' => 'region', | |
'დონორი' => 'donor', | |
'კონტრაქტორი' => 'contractor', | |
'ხელშეკრულების ხელმოწერის თარიღი' => 'Signing_contract_date', | |
'სამუშაოების დაწყების თარიღი' => 'job_start_date', | |
'სამუშაოების თავდაპირველი დასრულების თარიღი' => 'job_original_finish_date', |