Skip to content

Instantly share code, notes, and snippets.

View nuryslyrt's full-sized avatar
🌟
Discover Stars!

Nur Gucu nuryslyrt

🌟
Discover Stars!
View GitHub Profile
@nuryslyrt
nuryslyrt / Randompy.py
Created November 25, 2011 17:00
Random sayılar üretmesi içindi.
#!/usr/bin/python
#-*- coding: utf-8 -*-
import random
import math
def printRandomNumbers(y):
status = range(1, y)
while len(status) == y:
i = 0
@nuryslyrt
nuryslyrt / palindrome.c
Created November 19, 2011 22:21
aynılar mı değiller mi?
#include <stdio.h>
#include <string.h>
int main()
{
int a=0, b=0, c=0;
char cumle[9999], kontrol[9999];
puts("stringi gir bakalim\n");
scanf("%s", cumle);
@nuryslyrt
nuryslyrt / degisim.c
Created November 19, 2011 21:19
birazcık oynadığım hali
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
myswap();
}
int myswap(void)
{
@nuryslyrt
nuryslyrt / myswap.c
Created November 19, 2011 18:49
stringi ters çeviriyoruz.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
myswap();
}
int myswap(void)
@nuryslyrt
nuryslyrt / pythonda cookie
Created March 27, 2011 20:16
pythonda cookie
@nuryslyrt
nuryslyrt / cookiedeyazdığına sonradan erişim
Created March 27, 2011 20:14
cookie de yazdığımız değere sonradan erişmek için
FacesContext context = FacesContext.getCurrentInstance();
String cookieName = null;
Cookie[] cookies = ((HttpServletRequest)context.getExternalContext().getRequest()).getCookies();
if(cookies != null && cookies.length > 0) {
for (int i = 0; i < cookies.length;i++) {
Cookie c = cookies[i];
...
}
}
@nuryslyrt
nuryslyrt / cookie yazmak için gerekli kod
Created March 27, 2011 20:12
cookie yazmak için gerekli kod
@nuryslyrt
nuryslyrt / cookie import kodları
Created March 27, 2011 20:11
import edilmesi gereken kodlar
import math
def daire_fonk(r):
cevre = 2*math.pi*r
alan = math.pi*r*r
if r > 0:
print 'dairenin cevresi',cevre,'birimdir.'
print 'dairenin alani',alan,'birim karedir.'
if r < 0:
print 'yaricap sifirdan kucuk olamaz'
@nuryslyrt
nuryslyrt / lab04_mutlak_genel.py
Created March 25, 2011 03:31
mutlak değer fonksiyonum
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import math
def mutLak_geneL():
while True:
print "karmasik sayi icin 1\ntamsayilar icin 2\nondalikli sayilar icin 3\ncikmak icin 4 giriniz:"
secenek = raw_input("seciminiz:")
if secenek == '1':
x = int(raw_input("gercel kısmı giriniz:"))
y = int(raw_input("sanal kısmı giriniz:"))