Skip to content

Instantly share code, notes, and snippets.

View defrindr's full-sized avatar
👋
Hi there

Defri Indra Mahardika defrindr

👋
Hi there
View GitHub Profile
<?php
namespace app\helpers;
use Yii;
use yii\base\Event;
/**
* ErrorResponseHelper
*
@defrindr
defrindr / Image.php
Created March 22, 2022 04:15
YII2 Faker image problem vendor/fakerphp/faker/src/Faker/Provider/
<?php
namespace Faker\Provider;
/**
* Depends on image generation from http://lorempixel.com/
*/
class Image extends Base
{
protected static $categories = array(
import java.util.Scanner;
public class Kalkulator {
public static void main(String args[]){
double result = 0;
Scanner scan = new Scanner(System.in);
int bil1;
char op, conf;
System.out.print("Masukkan bilangan ke-1: ");
bil1 = scan.nextInt();
This file has been truncated, but you can view the full file.
-- Adminer 4.7.7 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `wilayah_desa`;
CREATE TABLE `wilayah_desa` (
`id` char(10) COLLATE utf8_unicode_ci NOT NULL,
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#define MAX 100
#define SORT_ASC 1
<?php
class HttpHelper {
private static function request($url, $fields, $headers = [], $method = "GET")
{
$valid_header = [];
foreach ($headers as $key => $val) {
<?php
// Created by Defri Indra M
system("git init");
for($a=0;$a<1000;$a++){
system("type nul > $a.txt");
system("git add $a.txt");
system("git commit --date=\"33 day ago\" -m \"commit $a\"");
}
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int n = 0;
void sortDesc(int * data[]) {
int tmp, j, i;
for (j = 1; j < n; j++) {
<?php
/**
* Defri Indra M
* 2021-04-14
*/
class Connection
{
protected $connection;