Skip to content

Instantly share code, notes, and snippets.

View putheakhem's full-sized avatar
🏠
Working from home

Khem Puthea putheakhem

🏠
Working from home
View GitHub Profile
@putheakhem
putheakhem / sumThreeInteger.c
Created February 12, 2020 13:03
Write a function that can calculate the summation of 3 integers
#include <stdio.h>
#include <stdlib.h>
// code will post in the description of our youtube .
// Write a function that can calculate the summation of 3 integers
int sum( int a, int b, int c) {
// we can declare new variable to store the result from a+b+c
int sum = 0;
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDBPDO";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDBPDO";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
@putheakhem
putheakhem / SortArray.php
Created November 6, 2019 15:34
Store these colors in array: 'red', 'green', 'blue', 'yellow', 'purple' as $colors then update your list of colors to be sorted in alphabetical order.
<!--
Store these colors in array: 'red', 'green', 'blue', 'yellow', 'purple'
as $colors then update your list of colors to be sorted in alphabetical order.
-->
<?php
$colors = array(

Step 1 : Install Laravel 6.0

first of all we need to get fresh Laravel 6.0 version application using bellow command, So open your terminal OR command prompt and run bellow command:

composer global require laravel/installer
laravel new blog --dev
@putheakhem
putheakhem / calculateblue.py
Created July 16, 2019 15:10
Use for validation accuracy Neural Machine Translation
import sys
import codecs
import os
import math
import operator
import json
from functools import reduce

Step 1 : Install Laravel 5.8

first of all we need to get fresh Laravel 5.8 version application using bellow command, So open your terminal OR command prompt and run bellow command:

composer create-project --prefer-dist laravel/laravel blog

Step 2: Update Database Configuration

HTML

CSS

JS

What you will learn in this tutrials

  • PHP 7 Connect to MySQL
  • PHP 7 Create a MySQL Database
  • PHP 7 Create MySQL Tables
  • PHP 7 Insert Data Into MySQL
  • PHP 7 Get ID of Last Inserted Record
  • PHP 7 Insert Multiple Records Into MySQL
  • PHP 7 Prepared Statements
  • PHP 7 Select Data From MySQL

Step 1 : Install Laravel 5.8

first of all we need to get fresh Laravel 5.8 version application using bellow command, So open your terminal OR command prompt and run bellow command:

composer create-project --prefer-dist laravel/laravel blog

Step 2: Update Database Configuration