Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Selim Çoban fanatikhamsi

🎯
Focusing
View GitHub Profile
@fanatikhamsi
fanatikhamsi / bellman.ford.algorithm.cs
Created Apr 8, 2021
Bellman ford algorithm with C#
View bellman.ford.algorithm.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace BellmanFord
{
class Path
{
public string From;
public string To;
@fanatikhamsi
fanatikhamsi / Queue.js
Last active Apr 8, 2021
Generate Binary Numbers from 1 to n Queue in JS
View Queue.js
class Queue {
constructor() {
this.items = [];
this.front = null;
this.back = null;
}
isEmpty() {
@fanatikhamsi
fanatikhamsi / Stack.js
Last active Apr 8, 2021
Stack of characters in JS
View Stack.js
class Stack {
constructor() {
this.items = [];
this.top = null;
}
getTop() {
if (this.items.length == 0)
return null;
View array_filter.php
<?php
class Filter {
private $value;
private $propertyName;
private $type;
public function __construct($value, $propertyName, $type = 'equal') {
$this->value = $value;
$this->propertyName = $propertyName;
$this->type = $type;
@fanatikhamsi
fanatikhamsi / toTurkishFormatDate.js
Last active Mar 4, 2021
Javascriptte tarih formatına göre Türkçe ay ve gün formatlarını da destekleyen js eklentisidir.
View toTurkishFormatDate.js
*
Based on fanatikhamsi code https://github.com/fanatikhamsi/
Contributors:
Selim Çoban - @fanatikhamsi
------------------
Örnek:
var simdikiTarih = new Date();
simdikiTarih.toTurkishFormatDate("dd.mm.yyyy")
Çıktı: 14.02.2016
simdikiTarih.toTurkishFormatDate("dd MM DD yyyy")
View url_helper.php
<?php
/**
* Create URL Title
*
* Takes a "title" string as input and creates a
* human-friendly URL string with a "separator" string
* as the word separator.
*
* @access public
* @param string the string