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
Directions: | |
1. Insert your Windows 10 DVD, or double click its ISO image, or insert your bootable flash drive with Windows 10, depending on what you have. | |
2. Open 'This PC' in File Explorer and note the drive letter of the installation media you have inserted. In my case it is disk I: | |
3. Open CMD with administrative privileges and type the following command: | |
Dism /online /enable-feature /featurename:NetFx3 /All /Source:X:\sources\sxs /LimitAccess |
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
ALTER TABLE mytable CHANGE columnName columnName TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP |
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
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
set @newid=0; | |
update users set ID = (@newid:=@newid+1) order by ID; |
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
Ketika kita terbiasa menggunakan XAMPP, adakalanya ketika kita diharuskan membuat sistem yang terkoneksi ke SQLServer 2008, secara normal XAMPP 1.7.7-VC9 tidak bisa langsung melakukan koneksi ke SQLServer 2008. Ada beberapa langkah yang harus kita lakukan. | |
1. Buka file php.ini di “xampp/php/php.ini”. | |
2. Cari dan aktifkan “extension=php_mssql.dll” dan “extension=php_pdo_mssql.dll” dengan menghilangkan tanda titik koma (;) | |
3. Download file php_mssql.zip | |
4. Extract file tersebut dan rename (sesuaikan nts atau ts PHP XAMPP kita), dimana file yang direname (dicontohkan yang ts): |
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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
RewriteEngine On | |
<Files .env> | |
Order allow,deny | |
Deny from all |
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
// Carbon | |
use Carbon\Carbon; | |
$visitorTraffic = PageView::select('id', 'title', 'created_at') | |
->get() | |
->groupBy(function($date) { | |
return Carbon::parse($date->created_at)->format('Y'); // grouping by years | |
//return Carbon::parse($date->created_at)->format('m'); // grouping by months | |
}); |
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
Route::get('/clear-cache', function() { | |
$exitCode = Artisan::call('cache:clear'); | |
// return what you want | |
}); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.scrolloff { | |
pointer-events: none; | |
} | |
</style> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script> |