Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mehmet Emin Kartal mehmeteminkartal

🎯
Focusing
View GitHub Profile
View swift-crypto-example.swift
import Foundation
import Crypto // https://github.com/apple/swift-crypto
extension Data {
struct HexEncodingOptions: OptionSet {
let rawValue: Int
static let upperCase = HexEncodingOptions(rawValue: 1 << 0)
}
func hexEncodedString(options: HexEncodingOptions = []) -> String {
View keybase.md

Keybase proof

I hereby claim:

  • I am mehmeteminkartal on github.
  • I am kartal (https://keybase.io/kartal) on keybase.
  • I have a public key ASAKRKk0ogRvHQ7HLyzHCn4EutKzburI7OM6bGsn9nw_3wo

To claim this, I am signing this object:

View semihhhh.ino
#include <xmotion.h>
typedef char mazeBlock;
#define DIRECTION_UP 1
#define DIRECTION_DOWN 2
#define DIRECTION_RIGHT 4
#define DIRECTION_LEFT 8
#define MAZE_DISCOVERED 16
View calendarOfYear.c
//
// main.c
// timeChallange
//
// Created by Muhammet Mehmet Emin Kartal on 11/17/17.
// Copyright © 2017 Muhammet Mehmet Emin Kartal. All rights reserved.
//
#include <stdio.h>
#include <time.h>
@mehmeteminkartal
mehmeteminkartal / findroots.c
Created Oct 31, 2017
Finds the roots for given quadratic equation values
View findroots.c
#include "findroots.h"
void calcroots(int a, int b, int c) {
printf("%dx^2 + %dx + %d = 0\n", a, b, c);
int delta = pow(b, 2) - (4 * a * c);
printf("Δ = %d\n", delta);
double sqrtdelta = sqrt((double)(delta));
@mehmeteminkartal
mehmeteminkartal / hw_sum_of_even_numbers.c
Created Oct 26, 2017
homework Sum of even numbers in range
View hw_sum_of_even_numbers.c
#include <stdio.h>
int main() {
int ilkTerim, sonTerim;
printf("İlk Terim: ");
scanf("%d", &ilkTerim);
printf("Son Terim: ");
scanf("%d", &sonTerim);
int toplam = 0;
View homework2.c
//
// main.c
// Ödev 2
//
// Created by Muhammet Mehmet Emin Kartal on 10/3/17.
// Copyright © 2017 Muhammet Mehmet Emin Kartal. All rights reserved.
//
#include <stdio.h>
#include <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NGJh
@mehmeteminkartal
mehmeteminkartal / tr.numbers.php
Last active Nov 19, 2016
PHP number to string (Turkish)
View tr.numbers.php
<?php
function numtostr($num, $glue = " ") {
$c = array(
array("", "bir", "iki", "üç", "dört", "beş", "altı", "yedi", "sekiz", "dokuz"),
array("", "on", "yirmi", "otuz", "kırk", "elli", "altmış", "yetmiş", "seksen", "doksan"),
);
$b = array("", "bin", "milyon", "milyar", "trilyon", "katrilyon", "kentilyon");
$ret = "";
$basamaklar = explode(".", number_format((String) ($num), 0, ",", "."));
$len = strlen((String) ($num));