This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" Kesirli sayılar uzayı | |
from: Hüseyin Tekinaslan <[email protected]> | |
subject: Veri Yapıları - Egzersizler-3 | |
""" | |
import fractions as fr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import __builtin__ | |
class ColorizeString(str): | |
def colorize(self, color=None, **kwcolors): | |
if color is not None: | |
kwcolors = None | |
# Renk argüman olarak alınırken bir dict değil ise mutlak suretle | |
# string tipli olmalıdır. | |
if not isinstance(color, basestring): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Java Örneği-1 | |
* Ivır-zıvır örneklerden - Hesap makinesi | |
*/ | |
public class Calculator { | |
public static void main(String[] argv) { | |
if (argv.length != 3) { | |
System.err.println("calculator: " + | |
"Usage: java Calculator <number1> <operator> <number2>"); | |
System.exit(1); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// echo - java | |
public class echo { | |
public static void main(String[] argv) { | |
for (int i=0; i < argv.length; i++) | |
System.out.println(argv[i]); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class cat { | |
public static void main(String[] args) { | |
Scanner s = new Scanner(System.in); | |
while (s.hasNext()) { | |
System.out.println(s.next()); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Java-I Vize sınav sorusu - Dört parçadan oluşan bir yapı tasarımı. | |
* | |
* Kısaltmak amacıyla üç dersin notunun ortalamasına göre hesaplandı. | |
* Her ders için notlar 3'er kez istenmedi. | |
*/ | |
import java.util.Scanner; | |
public class Main { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct pdata | |
{ | |
char* student; | |
int mathematics; | |
int sciences; | |
int linguistics; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <glib.h> | |
int | |
main(int argc, char* argv[]) | |
{ | |
GHashTable* hash = g_hash_table_new(g_int_hash, g_int_equal); | |
guint32* key = (guint32*)malloc(sizeof(guint32)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MORE_LIMIT 16 | |
#define LEAST_LIMIT 1 | |
#define max(x, y) (x > y ? x : y) | |
static const int basket[] = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Veri Yapıları Çalışma - Ertis Shell Dinamik Yönetim için | |
// bir-iki deneme. | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define STACK_MAX_LENGTH 256 // 1 << 8 | |