Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Huy Sokhom sokhomhuy

🏠
Working from home
Block or report user

Report or block sokhomhuy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View How to define class to model in TypeScript
export class ItemsComponent implements OnInit {
testing: Array<inventory>;
ngOnInit() {
this.testing = [
new inventory({
accountName: '',
accountCode: '',
items: [
new item({
@sokhomhuy
sokhomhuy / Custom ngInit in Angular 2+
Last active Jun 14, 2018
Custom ngInit in Angular 2+
View Custom ngInit in Angular 2+
import { Directive, Output, EventEmitter, Input, SimpleChange } from '@angular/core';
@Directive({
selector: '[ngInit]'
})
**export class NgInit {
@Output() ngInit: EventEmitter<any> = new EventEmitter<any>();
constructor() { }
ngOnInit() {
@sokhomhuy
sokhomhuy / Laravel : The page has expired due to inactivity. Please refresh and try again.
Created Apr 11, 2018
Laravel : The page has expired due to inactivity. Please refresh and try again.
View Laravel : The page has expired due to inactivity. Please refresh and try again.
please check this out by update app->Exceptions->Handler.php
public function render($request, Exception $exception)
{
if ($exception instanceof \Illuminate\Session\TokenMismatchException)
{
return redirect()
->back()
->withInput($request->except('password'))
->with([
@sokhomhuy
sokhomhuy / set default value of string length
Last active Apr 11, 2018
Laravel 5.5: Specified key was too long error
View set default value of string length
As outlined in the Migrations guide to fix this all you have to do is edit your
AppServiceProvider.php file and inside the boot method set a default string length:
=> app->Providers->AppServiceProvider.php
use Illuminate\Support\Facades\Schema;
public function boot()
{
@sokhomhuy
sokhomhuy / this package requires php ^7.1.3 but your PHP
Last active Apr 9, 2018
Laravel Configuration for some error
View this package requires php ^7.1.3 but your PHP
if we face the problem for install composer like something what ever..
This package requires php ^7.1.3 but your PHP version (7.0.10) does not satisfy that requirement.
....................
<b>Resolve: </b> => update composer.json with add new line in config object key: "platform": {"php": "you php version"}
View angular fixed column XY scrollable table.markdown

angular fixed column XY scrollable table

sample directive: table content is scrollable both horizontal / vertical while table header and first column is fixed position.

cross browser tested on: IE8-11, Chrome, FF

A Pen by Pasit R. on CodePen.

You can’t perform that action at this time.