Skip to content

Instantly share code, notes, and snippets.

View pasali's full-sized avatar
🎯
Focusing

Mehmet Başal pasali

🎯
Focusing
View GitHub Profile
#include <stdio.h>
#include <pthread.h>
#define LIMIT 1000
#define THREAD_SAYISI 4
static pthread_mutex_t kilit;
void *dongu(void *p) {
@pasali
pasali / passwordcard.go
Last active December 29, 2015 04:49
prog. dilleri ödev
package main
import (
"fmt"
"github.com/ActiveState/golor"
"math/rand"
"os"
"strconv"
"strings"
"time"
@pasali
pasali / patato.py
Last active December 28, 2015 08:39
class Queue:
def __init__(self):
self.liste = []
def isEmpty(self):
return self.liste == []
def enqueue(self, item):
self.liste.insert(0, item)
@pasali
pasali / thread.c
Created November 14, 2013 19:19
c thread example
#include <pthread.h>
#include <stdio.h>
void *kare_al(void * p){
int a;
a = (int *) p
printf(" %d\n", a * a);
pthread_exit(NULL);
}
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js">
</script>
<script type="text/javascript" src="jquery.chained.js" charset="utf-8"></script>
</head>
<body>
<select id="mark" name="mark">
<option value="">--</option>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js">
</script>
<script type="text/javascript" src="jquery.chained.js" charset="utf-8"></script>
</head>
<body>asdasd
<select id="mark" name="mark">
<option value="">--</option>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
float
F(float x)
{
return x*x;
}
@pasali
pasali / matrice_mul.c
Created May 12, 2013 21:03
Multithreading Example
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <pthread.h>
#define N 100
#define RANDOM_RANGE 100000
#define NTHREAD 10
#define VECTOR_LENGTH_PER_THREAD (N/NTHREAD)
@pasali
pasali / dsd.py
Last active December 16, 2015 17:29 — forked from emreyh/dsd.py
class BinaryTree:
def __init__(self,rootObj):
self.key=rootObj
self.left = None
self.right = None
def insertLeft(self,newNode):
if self.left == None:
self.left = BinaryTree(newNode)
else:
t = BinaryTree(newNode)
@pasali
pasali / shellim.c
Last active December 15, 2015 14:09
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<unistd.h>
#include<string.h>
#include<readline/readline.h>
#include<readline/history.h>
#include<sys/wait.h>