This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem Statement | |
----------------------------- | |
Find an Array: | |
Implement a method that given two arrays as parameters will find the starting index where the second parameter occurs as a sub-array in the array given as the first parameter. | |
Your implementations should return -1 if the sub-array cannot be found. | |
Your implementation must implement the FindArray interface given bellow: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A implementation of Stack using Java Generic Programming | |
* @author Al- Imran Ahmed | |
*/ | |
public class Stack<T>{ | |
//Top node of the stack | |
private Node top = null; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implementation of Queue using Java | |
* @author Al- Imran Ahmed | |
*/ | |
public class Queue<T>{ | |
Node font = null; | |
Node back = null; | |
private class Node{ | |
T item; | |
Node next; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of Stack using PHP | |
* @author Al- Imran Ahmed | |
*/ | |
class Node{ | |
public $value; | |
public $next; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implementation of Queue using PHP | |
* @author Al- Imran Ahmed | |
*/ | |
class Element{ | |
public $value; | |
public $next; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Al- Imran Ahmed | |
* Sorting an array using insertion sort algorithm | |
* @param int a[] is an array to be sorted | |
* @param int size is the size of the array | |
*/ | |
void insertionSort(int a[], int size){ | |
for(int i = 1; i < size; i++){ | |
for(int j = i; j >= 0; j--){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Change the leader key from \\ to comma | |
let mapleader = ',' | |
"Show line number of row | |
set number | |
"Write automatically when close the buffer | |
set autowriteall | |
"Limit the Text window with 80 character |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services\EmailVerify; | |
use \DOMDocument; | |
use \DOMXpath; | |
use Log; | |
/** | |
* Verifies email address by attempting to connect and check with the mail server of that account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import html | |
from tkinter import * | |
import xml.dom.minidom as dom | |
# author Al Imran Ahmed | |
# A very simple interface to decoded xml. i.e. <tag> => <tag> | |
# requires python3^ with tkinter GUI library installed | |
class Application(Frame): | |
def decode_xml(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request | |
- Or, request confirmation in the process - | |
<a href="posts/2" data-method="delete" data-confirm="Are you sure?"> | |
*/ | |
(function() { |
OlderNewer