Skip to content

Instantly share code, notes, and snippets.

View milikkan's full-sized avatar
🏠
Working from home

Mustafa Ilikkan milikkan

🏠
Working from home
View GitHub Profile
@milikkan
milikkan / settings.json
Created December 11, 2024 10:48
vscode config
{
"workbench.colorTheme": "Visual Studio Dark",
"editor.wordWrap": "on",
"liveServer.settings.donotShowInfoMsg": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.indentSize": "tabSize",
"editor.tabSize": 2,
"redhat.telemetry.enabled": true,
"prettier.requireConfig": true,
"window.zoomLevel": 1,
@milikkan
milikkan / constructor1.js
Created November 8, 2024 12:44
JavaScript private methods with ES6 classes vs IIFE's and closure
// private methods with constructor functions without ES6 classes
const Student = (function() {
function privateMethod() {
console.log('Private method...');
}
return function(name, age) {
this.name = name;
this.age = age;
privateMethod();
@milikkan
milikkan / index.html
Last active February 25, 2021 21:43
Array.fill() deneme
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<p>Diziyi fill etmek için değer gir:</p>
@milikkan
milikkan / AABulucu.java
Created January 3, 2021 13:31
Not Hesaplayıcı (Chain of Responsibility pattern)
package dev.milikkan.cor;
public class AABulucu extends NotHarfiBulucu {
public AABulucu(NotHarfiBulucu bulucu) {
super(bulucu);
}
public void notHarfiBul(double not) {
if (not > 90) {
@milikkan
milikkan / gist:b21072b4ac7a127ffb148f4a05a6fa69
Created January 3, 2021 12:26
if-else kullanmadan not hesaplama
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class Notlar {
public static void main(String[] args) {
Map<Integer, String> notHarfleri = new HashMap<>();
notHarfleri.put(90, "AA ile dersi geçtiniz.");
notHarfleri.put(85, "BA ile dersi geçtiniz.");
@milikkan
milikkan / java
Created August 6, 2020 08:11
A Java program that counts duplicate characters from a given string.
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
public class CountDuplicates {
// using classic for loop and Map.merge method
private static Map<Character, Integer> countChars(String input) {
var result = new HashMap<Character, Integer>();