This file contains 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
#encoding: UTF-8 | |
class Merhaba | |
def self.class_method | |
puts "Merhaba, ben bir sınıf metoduyum!" | |
end | |
def instance_method | |
puts "Merhaba, ben bir nesne metoduyum!" | |
end | |
end |
This file contains 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 csv | |
import time | |
started = time.clock() | |
hash_list = [] | |
unique_hash_list = [] | |
print "\n>> TABLE: << \n" | |
with open('liste.csv', 'rb') as csvfile: |
This file contains 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
def BinaryTree(r): | |
return [r, [], []] | |
def insertLeft(root,newBranch): | |
t = root.pop(1) | |
if len(t) > 1: | |
root.insert(1, [newBranch,t,[]]) | |
else: | |
root.insert(1, [newBranch, [], []]) | |
return root |
This file contains 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
#!/usr/bin/ruby | |
# encoding: utf-8 | |
class Point | |
# XXX Her nitelik için okuyucu yazmamız gerekmiyor | |
attr_reader :x, :y | |
def initialize(x, y) | |
@x, @y = x, y | |
end |
This file contains 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
// Simple module that connects the SW switches to the LEDR lights | |
module part1 (SW, LEDR); | |
input [17:0] SW; | |
// toggle switches | |
output [17:0] LEDR; // red LEDs | |
assign LEDR = SW; | |
endmodule |
This file contains 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 <LiquidCrystal.h> | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
int sayac = 0; | |
void setup() { | |
lcd.begin(16, 2); | |
lcd.print("Merhaba dunya!"); | |
} |
This file contains 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
def dizi_kopyala(dizi) | |
hedef = [] | |
dizi.each do |i| | |
if i < 4 | |
hedef << i | |
end | |
end | |
puts hedef | |
end |
This file contains 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 <math.h> | |
int main(void) { | |
int result, n; | |
n = 0; | |
while (++n < 17) { | |
printf("%d\t", n); |
This file contains 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
start get | |
ifzero print | |
add total | |
store total | |
count | |
goto start | |
printf load total | |
stop | |
count add counter |
This file contains 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 <ctype.h> | |
int main(void) { | |
int c; | |
for ( ; ; ) { | |
c = getchar(); | |
if (islower(c)){ |
OlderNewer