Skip to content

Instantly share code, notes, and snippets.

:octocat:
online

Amir Shokri amirshnll

:octocat:
online
Block or report user

Report or block amirshnll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View matrix-transpose
#include "stdafx.h"
#include "iostream"
#include "conio.h"
using namespace std;
// Matrix Class
class matrix
{
public:
matrix(int n, string shape);
View draw-chessboard-matlab
close all
clear
clc
axis([1 13 1 13]);
a=1
for i=3:1:10
for j=3:1:10
View sorting-multidimensional-arrays-php
<?php
function myArray_sort($myArray, $myKey, $orderBy = SORT_ASC)
{
$new_myArray = myArray();
$sortable_myArray = myArray();
if ( count( $myArray ) > 0 )
{
foreach ( $myArray as $k => $v )
{
if ( is_myArray($v) )
View stack-php
<?php
class MyStack
{
protected $stack;
protected $limit;
public function __construct($limit = 10)
{
$this->stack = array();
$this->limit = $limit;
}
View stack-c-sharp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
View bubblesort-php
<?php
function bubblesort($a1, $a2)
{
for( $i = sizeof($a1) ; $i >= 1 ; $i-- )
{
for( $j = 1 ; $j <= $i ; $j++ )
{
if( $a1[$j-1] > $a1[$j] )
{
$t = $a1[$j-1];
View doubly-linked-list-cplusplus
#include "stdafx.h"
#include "iostream"
using namespace std;
struct node
{
int data;
struct node *next;
struct node *last;
View Sieve-of-Eratosthenes-prime-numbers
#include "stdafx.h"
#include "iostream"
#include "conio.h"
#include "cmath"
using namespace std;
bool *primes;
void primeNumber(int N)
{
View eight-minister
public class EightMinister
{
/* Private */
private int[][] arr;
private void setQueen(int row, int col)
{
this.arr[row][col] = 1;
}
View hanoi-tower
public class Hanoi
{
public void run(int n, String start, String auxiliary, String end)
{
if (n == 1)
{
System.out.println(start + " Go To " + end);
}
else
You can’t perform that action at this time.