Skip to content

Instantly share code, notes, and snippets.

View fanatikhamsi's full-sized avatar
🎯
Focusing

Selim Çoban fanatikhamsi

🎯
Focusing
View GitHub Profile
<?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
<?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 / bellman.ford.algorithm.cs
Created April 8, 2021 06:22
Bellman ford algorithm with C#
using System;
using System.Collections.Generic;
using System.Linq;
namespace BellmanFord
{
class Path
{
public string From;
public string To;
@fanatikhamsi
fanatikhamsi / Stack.js
Last active April 8, 2021 06:23
Stack of characters in JS
class Stack {
constructor() {
this.items = [];
this.top = null;
}
getTop() {
if (this.items.length == 0)
return null;
@fanatikhamsi
fanatikhamsi / Queue.js
Last active April 8, 2021 06:23
Generate Binary Numbers from 1 to n Queue in JS
class Queue {
constructor() {
this.items = [];
this.front = null;
this.back = null;
}
isEmpty() {
@fanatikhamsi
fanatikhamsi / toTurkishFormatDate.js
Last active January 27, 2023 08:50
Javascriptte tarih formatına göre Türkçe ay ve gün formatlarını da destekleyen js eklentisidir.
*
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")