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
| using System; | |
| using System.IO; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace MetinBicimleme | |
| { | |
| public class OkumaYazma | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace Agac | |
| { | |
| public class KelimeAgaci | |
| { | |
| string kelime; |
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
| rename 's/eski/yeni/' * #bulundugumuz dizinde dosya ismi değiştirmek için. | |
| echo '/tmp/foo/bar/baz.jpeg' | sed -ne 's/\(.*\)\.\(.*\)$/dosya:\1\nuzanti:\2\n/p' # p parametresini kaldırırsak sed'in sesiz kalmasını `-n` paremetresini kaldırmalıyız. `-ne` olmalı `-en` olamıyor | |
| echo '<a href="http:www.google.com">' | sed -ne 's/\(.*\)\:\(.*\)">$/link:\2/p' | |
| echo '10-12-2011' | sed -e 's/\(\d\{2\}\)-\(\d\{2\}\)-\(\d\{4\}\)/\3-\2-\1/' | |
| echo '10-12-2011' | sed -e 's/\([^-]*\)-\(\([^-]*\)-\(.*\)\)$/\4-\3-\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
| % 1) Analogoutput nesnesi olusturma | |
| AO = analogoutput('nidaq','Dev1'); | |
| % 2) Kanal ekleme | |
| chan = addchannel(AO,0); | |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import xlrd | |
| sayf1 = xlrd.open_workbook("Rehber.xls") | |
| sh = sayf1.sheet_by_index(0) | |
| for i in range(sh.nrows): |
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
| #! /bin/bash | |
| # | |
| # Mevcut dizindeki tüm mp4 uzantılı dosyaları mp3'e dönüştürür.. | |
| # | |
| for f in *.mp4; do | |
| newname=`echo $f | tr ' ' '_' ` | |
| mv "$f" $newname | |
| f=$newname | |
| mplayer $f -ao pcm:file=tmp.wav | |
| lame -b 128 -q 2 tmp.wav ${f/.mp4/.mp3} |
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
| #!/bin/bash | |
| if [ $# -eq 0 ]; then | |
| echo "kullanimi: '<user> <dbname> <dbpass>' " | |
| echo "Yedekleme dizini belirtmek istiyorsaniz: '<user> <dbname> <dbpass> <path>' " | |
| fi | |
| date=$(date +"%d-%m-%Y") | |
| if [ $# -eq 4 ]; then |
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
| require 'rexml/document' | |
| include REXML | |
| UTF8 = "<head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/></head>" | |
| file = File.new( "yazılar.xml" ) | |
| doc = REXML::Document.new file | |
| doc.elements.each("*/channel/item/") do |f| | |
| garbage = File.new('foo.html',"w") | |
| garbage.write(UTF8 + f.elements['title'].text + f.elements['content:encoded'].text) | |
| garbage.close |
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
| function renk_sayisi=different() | |
| I = imread('autumn.tif'); | |
| J = {}; | |
| [R C L] = size(I); | |
| for r=1:R | |
| for c=1:C | |
| if ( bul(J,I(r,c,1),I(r,c,2),I(r,c,3))) | |
| J{length(J)+1} = [I(r,c,1),I(r,c,2),I(r,c,3)]; |
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
| for f in *jpg | |
| do | |
| convert -resize 10% $f $f | |
| done |