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
| td= truncate(period.program.name, length: 30) | |
| td= truncate(period.name, length: 47) | |
| td= period.code | |
| td | |
| - if can? :read, Student | |
| = link_to "Öğrenciler", students_admin_period_path(period) | |
| span | | |
| = link_to (t "general.show"), [:admin, period] | |
| - if can? :update, Period | |
| span | |
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
| class Attachment < ActiveRecord::Base | |
| mount_uploader :attachment, AttachmentUploader | |
| # Associations | |
| belongs_to :attached_item, polymorphic: true | |
| # Validations | |
| validates_presence_of :attachment |
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
| [mysqld] | |
| # ---------------------------------------------------------------------- | |
| # UTF-8 temiz bir mysql için ilgili yapılandırma | |
| # ---------------------------------------------------------------------- | |
| init_connect=’SET collation_connection = utf8_general_ci’ | |
| init_connect=’SET NAMES utf8′ | |
| character-set-server=utf8 | |
| collation-server=utf8_general_ci |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 | |
| require 'savon' | |
| require 'awesome_print' | |
| class KPSSorgu | |
| # T.C. Kimlik ile Kişi Sorgulama - Konfigürasyon | |
| @@tc_bilgi_client = Savon.client( | |
| wsdl: "http://192.168.33.25/KPSService/servicetckimliksorgula.asmx?WSDL", | |
| namespace: "http://tempuriTCKimlik.org/", |
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
| s = Stack() | |
| s.push('Ruby') | |
| s.push('Perl') | |
| s.push('Go') | |
| while not s.isEmpty(): | |
| s.pop() | |
| s.pop() |
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
| clc | |
| as = input('Arasinav'); | |
| ds = input('Final'); | |
| ort = as * 40/100 + ds * 60/100 | |
| clc | |
| disp('Vucut-Kitle Index Hesaplama Programina Hosgeldiniz'); | |
| boy = input('Boyunuz: '); | |
| kilo = input('Kilonuz: '); |
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
| - max | |
| - mutlak | |
| - BMI | |
| - Hal (katı, sıvı, gaz) | |
| - Ortalama: geçti, kaldı |
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
| clear all; close all; clc; | |
| im = imread('http://i.imgur.com/TwDQZKO.jpg'); | |
| r = im(:,:, 1); | |
| g = im(:,:, 2); | |
| b = im(:,:, 3); | |
| figure(1); | |
| subplot(2,2,1); imshow(im); title('Boninon'); |
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
| # apt-get install php5-apc --reinstall | |
| Reading package lists... Done | |
| Building dependency tree | |
| Reading state information... Done | |
| The following NEW packages will be installed: | |
| php5-apc | |
| 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
| 19 not fully installed or removed. | |
| Need to get 0 B/70,4 kB of archives. | |
| After this operation, 211 kB of additional disk space will be used. |