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 <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
// 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
#!/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
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
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
#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
a="merve" | |
b="evrem" | |
i=0 | |
y=b.length - 1 | |
saydir=0 | |
if a.length == b.length | |
while i < a.length | |
if a[i]==b[y] | |
saydir += 1 |
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
girdi=[1,[2,3],4,[5],[6,7]] | |
b=[] | |
i=0 | |
while i < girdi.length | |
if girdi[i].kind_of?(Array) | |
if !girdi[i][0].nil? | |
b << girdi[i][0] | |
end | |
if !girdi[i][1].nil? | |
b << girdi[i][1] |
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
girdi = "on3d1oku5zm7ayis3" | |
sayilar = "0123456789" | |
toplam = 0 | |
i=0 | |
while i < girdi.length | |
j=0 | |
while j < sayilar.length | |
if girdi[i] == sayilar[j] | |
toplam += girdi[i].to_i |