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 / DB-2025-Lab2.md
Created March 3, 2025 10:00
# Homework Lab: Implementing Laravel Blade Layout

Objective

In this lab, you will learn how to create and use Laravel Blade layouts to structure your application efficiently. The key tasks include:

  • Creating a Blade layout template
  • Using Blade sections and components
  • Extending the layout in child views
  • Rendering dynamic content in views

Homework Lab: Building a Laravel CRUD Application

Objective

In this lab, you will create a Laravel application that includes the following:

  • A Model with an associated Migration
  • A Factory to generate dummy data
  • A View to display data
  • A Controller and Route to fetch and render data from the database
@putheakhem
putheakhem / en-kh.md
Last active October 27, 2021 02:53
Getting started with Machine Translation

Khmer MT

Moses is a statistical machine translation system that allows you to automatically train machine translation models

Before Installing moses install the following packages

 sudo apt-get install g++ git subversion automake libtool zlib1g-dev libboost-all-dev libbz2-dev liblzma-dev python-dev libtcmalloc-minimal4
@putheakhem
putheakhem / crudlaravel7.md
Last active April 16, 2020 04:50
This tutorial will guide you how to create CRUD on Laravel 7.X

Step 1 : Install Laravel 7.6

First of all we need to get fresh Laravel 7.6 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

the --disable-gpu-compositing CEF flag to OBS Studio's Browser Source plugin, you'll need to add it to your OBS Studio shortcut.

Windows

  1. Locate your shortcut to OBS Studio.
  2. Right click the shortcut and hit "Properties".
  3. Add the following to the end of the "Target" field. Be sure to put a space before it: --disable-gpu-compositing
  4. Launch OBS Studio via this shortcut, and try out a Browser Source animation to verify that it does indeed appear smoother.
  5. OBS Studio updates usually delete and re-make this shortcut, so you may need to repeat these steps after every OBS Studio update.

FAQ

#include <stdio.h>
#include <stdlib.h>
// Write a function that can calculate the summation from 1 to n positive number where n is passed as parameter.
// we need function sum()
int sum(int n) {
int sum1toN = 0;
for(int i = 0; i < n; i++) {
@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);