Skip to content

Instantly share code, notes, and snippets.

View hossainrkb's full-sized avatar
🎯
Focusing

Rakib hossainrkb

🎯
Focusing
View GitHub Profile
@hossainrkb
hossainrkb / Networking-Basic.txt
Created December 26, 2022 17:10
Networking Basic
Description ...
// get child node inside parent node;
// you have to grab concern on order (higher - lower);
//param start
triggeredField,
parentSectionAutoGenId,
triggeredFieldId
//param end
let parentNode = document.getElementById(parentSectionAutoGenId);
@hossainrkb
hossainrkb / AppServiceProvider.php
Created September 13, 2020 15:24 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@hossainrkb
hossainrkb / group_by_alphabetic_order.php
Last active September 4, 2020 10:20
group string data from an array by alphabetical order, complex array won't handled yet!
<?php
class SortByAlphabetic
{
public $input_array = [
"sanjoy", "rakib", "hossain", "iqbal", "Sham", "raju", "hola", "^ron", "abir", "#abid", 10, 100
];
public $input_string_filter = [];
public $input_key_null_filter = [];
public $output_array = [];
public $final_array = [];
@hossainrkb
hossainrkb / convert_array_to_query_string.php
Created September 2, 2020 09:07
convert one dimensional array to equivalent query string
<?php
function convert_array_to_query_string($array = [])
{
if (count($array) == 0) {
$data = [
"name" => "rakib",
"email" => "rakib@gmail.cm",
"id" => "C151045",
];
@hossainrkb
hossainrkb / exclude_string_from_array.php
Last active June 17, 2020 02:35
exclude_strings_from_array
<?php
class Exclude_string {
public $input;
public $output = array();
public function collapse_func(array $input_data) {
try {
if (!is_array($input_data)) {
throw new Exception("Can not be able to decode data");
}
foreach ($input_data as $key => $value) {