Skip to content

Instantly share code, notes, and snippets.

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

Ariful Islam prodhan

🏠
Working from home
View GitHub Profile
<?php
/* Q1: Suppose this array come from back-end. data of this array can be dynamic.
You have to make a Dynamic HTML Output (using ul tag) based on this array,
where each item will fall under its parent id.
output will look something like this.
Bangladesh
Dhaka
Uttara
Khilgaon
Noyakhali
import 'package:flutter/material.dart';
final Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
@prodhan
prodhan / .htaccess
Created January 12, 2021 07:00
htaccess to remove /public from Laravel
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
RewriteCond %{HTTP:Authorization} .+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -d [OR]
<?php
namespace App\Http\Controllers;
use App\Patient;
use App\Prescription;
use Carbon\Carbon;
use Illuminate\Http\Request;
class PatientController extends Controller
<?php
/* Q1: Suppose this array come from back-end. data of this array can be dynamic.
You have to make a Dynamic HTML Output (using ul tag) based on this array,
where each item will fall under its parent id.
output will look something like this.
Bangladesh
Dhaka
Uttara
@prodhan
prodhan / GitCommitEmoji.md
Created October 6, 2020 10:08 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
<?php
$client = new Client();
try {
$response = $client->request('POST', $uri, [
'headers' => ['Accept' => 'application/json', 'Content-type' => 'application/json', 'Authorization' => $apikey],
['body'=>json_encode($myBody)],
'multipart' => [
[
'Content-type' => 'multipart/form-data',
'name' => 'file',
@prodhan
prodhan / makepost.php
Created April 19, 2020 13:51
wordpress API :: create post error
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
function makePost(){
$uri = 'localhost/wordpress-api/wp-json/wp/v2/posts';
$apikey = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL3dvcmRwcmVzcy1hcGkiLCJpYXQiOjE1ODcwNzEwMDcsIm5iZiI6MTU4NzA3MTAwNywiZXhwIjoxNTg3Njc1ODA3LCJkYXRhIjp7InVzZXIiOnsiaWQiOiIxIn19fQ.yfBzLQS0oLE4sj45Pm73w6DkS7e2eFDffmQhvw5OyLY';
$myBody['title'] = "Demo Title";
@prodhan
prodhan / round-robin.cpp
Created November 20, 2019 10:53
Implementation of Round Robin CPU Scheduling algorithm using C++
//C++ Program to implement Round Robin
//Scheduling CPU Algorithm
//Ariful Islam Batch E-64 Roll: 34
#include <iostream>
/*at = Arrival time,
bt = Burst time,
time_quantum= Quantum time
tat = Turn around time,
; Add two number by taking input
; You may customize this and other start-up templates;
; The location of this template is c:\emu8086\inc\0_com_template.txt
org 100h
;print msg
mov ah,09H
mov dx,offset mes1
int 21h