Skip to content

Instantly share code, notes, and snippets.

View aabir's full-sized avatar
🙂

Shible Chowdhury aabir

🙂
View GitHub Profile
@aabir
aabir / index.js
Created February 17, 2021 09:18
JQuery Ajax call as function and invoke the function
jQuery.extend({
userCount: function() {
var result = null;
$.ajax({
url:"yourURL.asp?param1="+val1+"&param2="+val1=2,
type: 'get',
async: false,
success: function(data) {
result = data;
}
@aabir
aabir / index.js
Created November 20, 2019 04:21
Selection Sort in Javascript
function selectionSort(items)
{
var itemLen = items.length;
var min;
for( i = 0; i < itemLen; i++){
min = i;
for( j = i+1; j < itemLen; j++ ){
if(items[j] < items[min]){
min = j
@aabir
aabir / program.cs
Created November 20, 2019 04:19
Selection Sort in C#
using System;
namespace SelectionSort
{
class Program
{
static void Main(string[] args)
{
int[] inputAry = new int[] { 39, 12, 33, 68, 44 };
int aryLen = inputAry.Length;
@aabir
aabir / index.js
Created November 20, 2019 03:28
Binary Search in JavaScript
function binarySearch(sortedArry, itemToFind)
{
var minIndex = 0;
var maxIndex = sortedArry.length - 1;
while (minIndex <= maxIndex)
{
var midIndex = Math.floor((minIndex + maxIndex) / 2);
if(sortedArry[midIndex] == itemToFind)
@aabir
aabir / program.cs
Created November 20, 2019 03:27
BinarySearch in C#
using System;
namespace BinarySearch
{
class Program
{
static void Main(string[] args)
{
int[] inputArray = new int[4] { 10, 11, 12, 13 };
int key = 12;
@aabir
aabir / Zipper.bat
Last active October 30, 2019 10:24
Create a zip file from batch command using 7zip exclude file or folder.
echo on
for /f "tokens=1,2,3 delims=:. " %%x in ("%time%") do set t=%%x%%y%%z
set time=%t%
set sevenZip="C:\Program Files\7-Zip\7zG.exe"
set outputFld="C:\Users\Shible.Noman\Desktop\ZipperBat\"
set fileToZip="C:\Users\Shible.Noman\Desktop\ZipperBat"
Echo zipping...
@aabir
aabir / index.php
Created August 28, 2019 03:03
Google Recaptcha v2 Example - Demo - http://shiblenoman.com/recaptcha/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Google reCAPTCHA v3</title>
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
</head>
@aabir
aabir / gist:822e1ed67eab69f3b180be6e7b9f0bbf
Created March 25, 2017 10:30
Display all error message from Laravel Controller to view
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach($errors->all() as $error)
<li> {{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@aabir
aabir / DemoController.php
Created April 20, 2016 15:01
Rapyd demoController anyDatatree method $root object var_dump result.
object(Zofe\Rapyd\Demo\Menu)[204]
protected 'guarded' =>
array (size=0)
empty
protected 'table' => string 'demo_menus' (length=10)
protected 'parentColumn' => string 'parent_id' (length=9)
protected 'leftColumn' => string 'lft' (length=3)
protected 'rightColumn' => string 'rgt' (length=3)
protected 'depthColumn' => string 'depth' (length=5)
protected 'orderColumn' => null
$merge_vars=array(
'FNAME'=>'Aabir',
);
$email = 'aabir@aabir.com';
$send_data=array(
'email'=>array('email'=>$email),
'apikey'=>"", //API KEY
'id'=>"", //List ID
'merge_vars'=>$merge_vars,
'double_optin'=>false,