Skip to content

Instantly share code, notes, and snippets.

View MufidJamaluddin's full-sized avatar

Mufid Jamaluddin MufidJamaluddin

  • Jakarta, Indonesia
View GitHub Profile
@MufidJamaluddin
MufidJamaluddin / LocationDaoImp.java
Created November 15, 2017 03:52
Menyimpan Marker Google Maps ke Database (lat,lng) dan Mendapatkan Kembali Marker dari Database.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package id.ac.polban.jtk.project3.travlendar2A.DaoConcreteClass;
import id.ac.polban.jtk.project3.travlendar2A.DaoInterface.ILocationDao;
import id.ac.polban.jtk.project3.travlendar2A.Models.Location;
import java.sql.ResultSet;
@MufidJamaluddin
MufidJamaluddin / latihan20.php
Created March 9, 2018 03:44
CRUD PHP Dalam Satu Page
<?php
class Koneksi
{
private $servername = "localhost";
private $dbname = "dakademik";
private $username = "root";
private $password = "";
/** Koneksi **/
@MufidJamaluddin
MufidJamaluddin / reflect_qry_full.go
Last active February 3, 2020 17:09
Golang reflection usage : 1) JSON to MySQL query 2) MySQL Query Builder
package main
import (
"encoding/json"
"fmt"
"reflect"
"strings"
)
type Mahasiswa struct {
@MufidJamaluddin
MufidJamaluddin / reflect_qry_partial1.go
Created February 3, 2020 17:06
Struktur Struct Golang
type Mahasiswa struct {
ID int `field:"mhs_id" json:"id"`
Name string `field:"mhs_name" json:"name"`
NIM string `field:"mhs_nim" json:"nim"`
Matkul Matakuliah `json:"matkul_mhs"`
}
type Matakuliah struct {
ID int `field:"matkul_id" json:"id"`
MhsID int `field:"mhs_id" json:"mhs_id"`
package main
import (
"fmt"
"reflect"
"strings"
)
func getInsertQueryByReflection(objValue reflect.Value) string {
objType := objValue.Type()
@MufidJamaluddin
MufidJamaluddin / srp1_violation.cs
Last active February 15, 2020 15:02
Contoh Pelanggaran Single Responsibility Principle
public class SocialDivision
{
private string Name { get; set; }
public void RenderHtml()
{
}
public void DoBhaktiSocial()
@MufidJamaluddin
MufidJamaluddin / srp1_ref.cs
Last active February 15, 2020 15:21
Single Responsibility Principle Example
public class SocialDivision
{
private string Name { get; set; }
public void DoBhaktiSocial()
{
}
public void DoExternalContact()
using Newtonsoft.Json;
using SmartLibrary.Web.IntegrationTest;
using SmartLibrary.Web.Models.Entity;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Xunit;
namespace SmartLibrary.WebAPI.IntegrationTest.Controllers.Catalogue
namespace SmartLibrary.Catalogue
{
[ApiController]
[Route("api/catalogue/[controller]")]
public class BookShelfController : ControllerBase
{
private readonly AppDbCon DbCon;
public BookShelfController(AppDbCon dbC)
{
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using SmartLibrary.Web.Models.Entity;
using SmartLibrary.Web.Models.Repository;
using SmartLibrary.WebAPI.Models.Schema;
namespace SmartLibrary.Web.Controllers.Catalogue
{
[ApiController]