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
#!/bin/bash | |
wget http://www.heidisql.com/downloads/releases/HeidiSQL_9.3_Portable.zip -O HeidiSQL.zip | |
mkdir /opt/HeidiSQL | |
unzip HeidiSQL.zip -d /opt/HeidiSQL | |
chmod +x /opt/HeidiSQL/heidisql.exe | |
chmod +x /opt/HeidiSQL/HeidiSQL.com | |
touch /usr/share/applications/HeidiSQL.desktop |
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
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
DROP TABLE IF EXISTS `bd_district_lat_lng`; | |
CREATE TABLE `bd_district_lat_lng` ( | |
`id` tinyint(11) NOT NULL AUTO_INCREMENT, | |
`name` varchar(30) CHARACTER SET utf8 NOT NULL, | |
`lat` double NOT NULL, |
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 commaSeparateNumber(val) | |
{ | |
while (/(\d+)(\d{3})/.test(val.toString())) | |
{ | |
val = val.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); | |
} | |
return val; | |
} | |
var thisVal = commaSeparateNumber(this.value); |
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
1> | |
if($request->get('carrier_pass_validity') != '') | |
$exportPermit->carrier_pass_validity = CommonFunction::changeDateFormat($request->get('carrier_pass_validity'),true); | |
2> | |
class CommonFunction { | |
public static function changeDateFormat($dateicker, $mysql = false) { | |
if ($mysql) { | |
return Carbon::createFromFormat('d-M-Y', $dateicker)->format('Y-m-d'); | |
} else { | |
return Carbon::createFromFormat('Y-m-d', $dateicker)->format('d-M-Y'); |
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
App\Libraries\CommonFunction::changeDateFormat(substr($alreadyExistApplicant->arrival_date, 0, 10) | |
public static function changeDateFormat($dateicker, $mysql = false) { | |
if ($mysql) { | |
return Carbon::createFromFormat('d-M-Y', $dateicker)->format('Y-m-d'); | |
} else { | |
return Carbon::createFromFormat('Y-m-d', $dateicker)->format('d-M-Y'); | |
} | |
} |
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 | |
function serial($str){ | |
$arr = explode(',', $str); | |
$series = array(); | |
foreach($arr as $val){ | |
if(strpos($val,'-')){ | |
$_arr = explode('-', $val); | |
$series = array_merge($series,range($_arr[0], $_arr[1])); |
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
//http://jsonlint.com | |
//single object | |
var persons = { | |
"name": "milon", | |
"roll": 305021, | |
"email": "[email protected]", | |
"address": "Dhaka", | |
"phone": "01831614476" | |
} |
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> | |
$(document).ready(function(){ | |
$.ajax({ | |
type: "GET", | |
url: "<URL HERE>", | |
data: {name:value}, | |
success: function (result) { | |
// do something on success | |
}, | |
error:function(){ |