Commits

Paul Craven committed 60cb2cc

Initial development

Comments (0)

Files changed (81)

book_template.tex

+\documentclass[paper=8in:10in,pagesize=pdftex,
+               headinclude=on,footinclude=on,12pt]{scrbook}
+
+\areaset[0.50in]{6.75in}{9.25in}
+
+% \documentclass[paper=6in:9in,pagesize=pdftex,
+               % headinclude=on,footinclude=on,11pt]{scrbook}
+
+% \areaset[0.50in]{5.0in}{7.5in}
+
+\usepackage{amsmath}
+\usepackage{amssymb}
+\usepackage{graphicx}
+\usepackage{fancyhdr}
+\usepackage{wrapfig}
+\usepackage{multirow}
+\usepackage[tikz]{bclogo}
+
+\usepackage{enumitem}
+\setitemize{noitemsep,topsep=0pt,parsep=0pt,partopsep=0pt}
+
+\definecolor{bgblue}{RGB}{245,243,253}
+\definecolor{Black}{RGB}{0,0,0}
+\definecolor{LightGoldenrod}{rgb}{0.933333,0.866667,0.509804} 
+\definecolor{Sienna}{rgb}{0.627451,0.321569,0.176471}
+\definecolor{RosyBrown}{rgb}{0.73,0.56,0.56}
+\definecolor{BrickRed}{rgb}{0.8, 0.25, 0.33}
+\definecolor{OliveGreen}{rgb}{0.333333,0.419608,0.184314}
+
+\usepackage{listings}
+\lstset{
+		%numbers=left,
+		numberstyle=\tiny,  
+		%stepnumber=2,       
+		numbersep=5pt,    
+		tabsize=2,   
+		extendedchars=true,
+		breaklines=true,      
+		%keywordstyle=\color{brown},
+		%stringstyle=\color{BrickRed},
+		%commentstyle=\color{OliveGreen},
+		%backgroundcolor=\color{lightgray},
+		stringstyle=\color{Black}, 
+		keywordstyle=\color{Black},
+		commentstyle=\color{Black},
+		showspaces=false,   
+		showtabs=false,    
+		xleftmargin=17pt,
+		framexleftmargin=17pt,
+		framexrightmargin=5pt,
+		framexbottommargin=4pt,
+		showstringspaces=false   
+		language=Python,
+        captionpos=t,
+		basicstyle=\ttfamily\footnotesize,
+}
+
+\lstloadlanguages{% Check Dokumentation for further languages ...
+         %[Visual]Basic
+         %Pascal
+         %C
+         %C++
+         %XML
+         %HTML
+         Python
+}
+
+% Add extra space for the code listings index.
+\makeatletter
+\def\l@lstlisting#1#2{\@dottedtocline{1}{1.5em}{3em}{#1}{#2}}
+\makeatother
+
+\usepackage{caption}
+\DeclareCaptionFont{white}{\color{white}}
+\DeclareCaptionFormat{listing}{\colorbox{black}{\parbox{15cm}{#1#2#3}}}
+\captionsetup[lstlisting]{singlelinecheck=false, format=listing,labelfont=white,textfont=white}
+
+%----------------------------------------------------------------------------------------
+%	TITLE PAGE
+%----------------------------------------------------------------------------------------
+\newcommand*{\plogo}{\fbox{$\mathcal{PVC}$}} % Generic publisher logo
+\newcommand*{\rotrt}[1]{\rotatebox{90}{#1}} % Command to rotate right 90 degrees
+\newcommand*{\rotlft}[1]{\rotatebox{-90}{#1}} % Command to rotate left 90 degrees
+
+\newcommand*{\titleBC}{\begingroup % Create the command for including the title page in the document
+\centering % Center all text
+
+\def\CP{\textit{\Huge Book Title}} % Title
+
+\settowidth{\unitlength}{\CP} % Set the width of the curly brackets to the width of the title
+
+%{\color{LightGoldenrod}\resizebox*{\unitlength}{\baselineskip}{\rotrt{$\}$}}} \\[\baselineskip] % Print top curly bracket
+%\textcolor{Sienna}{\CP} \\[\baselineskip] % Print title
+%{\color{RosyBrown}\Large BOOK SUBTITLE} \\ % Tagline or further description
+%{\color{LightGoldenrod}\resizebox*{\unitlength}{\baselineskip}{\rotlft{$\}$}}} % Print bottom curly bracket
+
+{\color{Black}\resizebox*{\unitlength}{\baselineskip}{\rotrt{$\}$}}} \\[\baselineskip] % Print top curly bracket
+\textcolor{Black}{\CP} \\[\baselineskip] % Print title
+{\color{Black}\Large WITH BOOK SUBTITLE} \\ % Tagline or further description
+{\color{Black}\resizebox*{\unitlength}{\baselineskip}{\rotlft{$\}$}}} % Print bottom curly bracket
+
+\vfill % Whitespace between the title and the author name
+
+{\Large\textbf{John and Jane Doe}}\\ % Author name
+
+\vfill % Whitespace between the author name and the publisher logo
+
+% \plogo\\[0.5\baselineskip] % Publisher logo
+\copyright 2013 Copyright Holder % Year published
+
+\endgroup}
+
+\begin{document} 
+\frontmatter
+
+\pagestyle{empty} % Removes page numbers
+
+\titleBC % This command includes the title page
+
+\pagestyle{fancy}
+\lhead{}
+\chead{}
+\rhead{\leftmark}
+\lfoot{}
+\cfoot{}
+\rfoot{\thepage}
+
+\newpage
+
+\noindent{Author Name\\
+Street Address\\
+Indianola, IA 50125}
+
+\vspace{1cm}
+
+Copyright 2013 by Me
+
+\vspace{0.5cm}
+
+All rights reserved. No part of the material protected by this copyright may
+be reproduced or utilized in any form, electronic or mechanical, including 
+photocopying, recording, or by any information storage and retrieval system,
+without written permission from the copyright owner.
+
+\vspace{0.5cm}
+
+\emph{My Book}, is an independent publication 
+and has not been authorized, sponsored, or otherwise approved by the owners
+of the trademarks or service marks referenced in this product.
+
+\vspace{0.5cm}
+
+First Edition: April 2013
+
+
+\newpage
+\thispagestyle{empty}
+    \null\vspace{\stretch {1}}
+        \begin{flushright}
+                Dedicated to everyone.
+        \end{flushright}
+\vspace{\stretch{2}}\null
+
+\tableofcontents 
+
+\input{latex/content} 
+
+\addcontentsline{toc}{section}{Code Listings}
+\lstlistoflistings
+
+\newpage
+
+\emph{About the author:} This author is great.
+
+
+\end{document}  

chapters/02_title2/Motorola_6800_Assembly_Language.png

Removed
Old image

chapters/02_title2/heathet3400.jpg

Removed
Old image

chapters/02_title2/index.php

 <li>What is a third generation language?
 <li>What is an interpreter?
 </ol>
-<p>
+
+<pre class="brush: python" title="Example if statements: less than or equal, greater than or equal"  figure="true">
+if a &lt;= b:
+    print ("a is less than or equal to b")
+
+if a &gt;= b:
+    print ("a is greater than or equal to b")
+</pre>

chapters/02_title2/index_ru.php

+<?php chapter('Что такое компьютерный язык?'); ?>
+
+<p>
+<figure class="video_float_right">
+	<video class="video-js vjs-default-skin" width="341" height="237" controls="controls" preload="auto" data-setup="{}">
+	  <source src="chapters/02_what_is_a_computer_language/computer_languages.ogv" type="video/ogg"></source>
+	  <source src="chapters/02_what_is_a_computer_language/computer_languages.mp4" type="video/mp4"></source>
+	</video> 
+	<figcaption>Видео: Что такое компьютерный язык?</figcaption>
+</figure>
+
+<p>Что является сутью компьютерного языка? Зачем он нужен компьютерам? Почему
+в мире так много компьютерных языков?
+
+<p>Как для понимания принципов работы двигателя не нужно водить машину, так и для
+понимания ответа на эти вопросы не нужно программировать. Но для того, чтобы улучшить
+своё знание темы, необходимо понять как работает компьютер. Здесь даётся краткое
+объяснение.
+
+<?php section('Краткая история программирования'); ?>
+<p>Компьютеры являются цифровой электроникой. Их восприятие данных заключается
+в наличии или отсутствии напряжения в проводах. Отсутствие напряжение выглядит
+для компьютера как ноль, наличие - как единица. На самом деле, компьютеры не знают
+других цифр, так что в итоге ему приходится комбинировать 0 и 1 для составления чисел.
+
+<p>Раньше, особые переключатели использовались для загрузки единиц и нулей
+в компьютерную память. На этой картинке, принадлежащей
+<a href="http://en.wikipedia.org/wiki/File:Altair_Computer_Front_Panel.jpg">Wikimedia Commons</a>, 
+изображён Altair 8800. Переключатели на передней панели использовались для загрузки программы.
+Огни показывали результат. Монитора не было.
+
+<?php figure("fig.altair","chapters/02_what_is_a_computer_language/Altair_Computer_Front_Panel.jpg","Altair 8800",100); ?>
+
+<!--
+http://www.vintage-computer.com/heathkit3400.shtml
+-->
+<p>Каждый набор из переключателей представляет из себя номер. Каждый номер
+представляет данные или инструкцию, которую с ними должен сделать компьютер.
+Эта система, использующая только нули и единицы для репрезентации чисел называется
+бинарной(двоичной) системой исчисления. Этот тип компьютерного языка называется 1GL, или
+язык программирования первого поколения.
+
+<p>Числа в двоичной системе исчисления чаще всего представлены в комбинациях из четырёх цифр. Например:
+<pre>1010 0010 0011</pre>
+
+
+<p>Усовершенствованием ввода через переключатели было начало использования
+шестнадцатеричных кодов. Десятичные числа, используемые в посведневной жизни,
+состоят из цифр 0-9. Шестнадцатеричная система исчисления состоит из цифр 0-9, а также из 
+символов от A до F для репрезентации набора четырёх переключателей, с возможными
+значениями 0-15.
+
+<table>
+<tr><td>Двоичная</td><td>Десятичная</td><td>Шестнадцатиричная</td></tr>
+<tr><td style="text-align: right">0</td><td style="text-align: right">0</td><td style="text-align: right">0</td></tr>
+<tr><td style="text-align: right">1</td><td style="text-align: right">1</td><td style="text-align: right">1</td></tr>
+<tr><td style="text-align: right">10</td><td style="text-align: right">2</td><td style="text-align: right">2</td></tr>
+<tr><td style="text-align: right">11</td><td style="text-align: right">3</td><td style="text-align: right">3</td></tr>
+<tr><td style="text-align: right">100</td><td style="text-align: right">4</td><td style="text-align: right">4</td></tr>
+<tr><td style="text-align: right">101</td><td style="text-align: right">5</td><td style="text-align: right">5</td></tr>
+<tr><td style="text-align: right">110</td><td style="text-align: right">6</td><td style="text-align: right">6</td></tr>
+<tr><td style="text-align: right">111</td><td style="text-align: right">7</td><td style="text-align: right">7</td></tr>
+<tr><td style="text-align: right">1000</td><td style="text-align: right">8</td><td style="text-align: right">8</td></tr>
+<tr><td style="text-align: right">1001</td><td style="text-align: right">9</td><td style="text-align: right">9</td></tr>
+<tr><td style="text-align: right">1010</td><td style="text-align: right">10</td><td style="text-align: right">A</td></tr>
+<tr><td style="text-align: right">1011</td><td style="text-align: right">11</td><td style="text-align: right">B</td></tr>
+<tr><td style="text-align: right">1100</td><td style="text-align: right">12</td><td style="text-align: right">C</td></tr>
+<tr><td style="text-align: right">1101</td><td style="text-align: right">13</td><td style="text-align: right">D</td></tr>
+<tr><td style="text-align: right">1110</td><td style="text-align: right">14</td><td style="text-align: right">E</td></tr>
+<tr><td style="text-align: right">1111</td><td style="text-align: right">15</td><td style="text-align: right">F</td></tr>
+<tr><td style="text-align: right">1 0000</td><td style="text-align: right">16</td><td style="text-align: right">10</td></tr>
+<tr><td style="text-align: right">1 0001</td><td style="text-align: right">17</td><td style="text-align: right">11</td></tr>
+</table>
+
+
+
+<p>Следующее видео немного подробнее объясняет, как работает система исчисления:
+<figure>
+	<video class="video-js vjs-default-skin" width="700" height="532" controls="controls" preload="auto" data-setup="{}">
+	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.ogv" type="video/ogg"></source>
+	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.mp4" type="video/mp4"></source>
+	</video> 
+	<figcaption>Видео: объяснение двоичной, десятичной и шестнадцатеричной систем исчисления.</figcaption>
+</figure>
+
+<p>Для облегчения ввода программ, более поздние компьютеры позволяли
+вводить программы с помощью языка assembly. Каждая команда использовала
+мнемонику, а программа, называемая компилятором, превращала мнемоники
+в числа, обозначающие команды. Такой тип языка называется 2GL, или
+язык второго поколения.
+
+<p>Ниже преведена часть программы на языке assembly, 
+<a href="http://en.wikipedia.org/wiki/File:Motorola_6800_Assembly_Language.png">предоставлено Wikimedia Commons</a>.
+
+<?php figure("fig.assembly","chapters/02_what_is_a_computer_language/Motorola_6800_Assembly_Language.png","Пример языка assembly",50); ?>
+
+<p>Хотя это было улучшением, этого всё ещё было недостаточно для того, чтобы
+сделать процесс программирования лёгким. Следующее поколение языков предоставило
+абстракции более высокого уровня. Первые языки третьего поколения: 
+(<a href="http://ru.wikipedia.org/wiki/COBOL">COBOL</a>, 
+<a href="http://ru.wikipedia.org/wiki/Fortran">FORTRAN</a> и 
+<a href="http://ru.wikipedia.org/wiki/Lisp">LISP</a>)
+были намного проще для понимания и программирования.
+
+<p>Языки второго и третьего поколения использовали программу, называемую
+<em>компилятор</em>. Компилятор берёт программу, введённую пользователем
+(так называемый <em>исходный код</em>) и превращает её в машинный код.
+Программист запускает машинный код. Оригинальный исходный код не
+запускается.
+
+<p>Если программа использует исходный код из разных источников, они могут быть связаны
+вместе в один с помощью программы, называемой <em>linker (линкер, редактор связей, компоновщик)</em>. 
+Редактор связей работает с машинным кодом, сгенерированным компилятором, для создания
+финальной версии программы. Эта финальная версия - то, что запускает пользователь.
+Исходный код для этого не нужен.
+
+<?php figure("fig.compiler_and_linker","chapters/02_what_is_a_computer_language/compiler_and_linker_ru.svg","Компиляторы и редакторы связей",100); ?>
+
+<p>Недостатком машинного языка является то, что программа будет работать
+только на определённых типах компьютера. Программы, скомпилированные для
+компьютеров с Windows скорее всего не будут работать на компьютерах
+Apple Macintosh и наоборот.
+
+<p>Потому что весь процесс компиляции и связи может быть сложным для 
+начинающих программистов, некоторые языки стали использовать <em>интерпретаторы</em>.
+Эти программы спотрят на исходный код и преобразуют его в машинный код на ходу.
+Это также позволяет одним и тем же программам запускаться на Windows, Mac, Unix 
+компьютерах, в случае, если на каждой из этих платформ есть доступ к интерпретатору.
+
+<p>Недостатком использования интерпретатора является то, что он медленнее,
+чем оригинальный, машинный язык. 
+
+<?php figure("fig.interpreter","chapters/02_what_is_a_computer_language/interpreter_ru.svg","Интерпретатор",60); ?>
+
+<p>Python является примером интерпретируемого языка. Легче писать на Python'е, чем на C,
+но Python работает медленнее и требует интерпретатора для успешной работы.
+
+<p>Языки вроде 
+<a href="http://ru.wikipedia.org/wiki/Java">Java</a>
+используют систему, где программы компилируются в машинный код,
+который, вместо самой операционной системы компьютера, затем запускается на 
+ Java Virtual Machine (<a href="http://ru.wikipedia.org/wiki/Java_Virtual_Machine">JVM</a>).
+<a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>, испольщующий
+Common Language Infrastructure (<a href="http://ru.wikipedia.org/wiki/Common_Language_Infrastructure">CLI</a>),
+ - другой популярный язык, который делает то же самое, запуская себя на виртуальной машине
+ Virtual Execution System (<a href="http://en.wikipedia.org/wiki/Virtual_Execution_System">VES</a>).
+Хотя обучение этим языкам не является целью этой книги, вы смело можете с ними ознакомиться.
+
+<p>На сегодняшний день существует очень много языков программирования. В связи с тем,
+что компьютеры способны выполнять так много разных функций, каждый язык специализируется
+на отдельных типах задания. Так, например, 
+язык <a href="http://ru.wikipedia.org/wiki/%D0%A1%D0%B8_%28%D1%8F%D0%B7%D1%8B%D0%BA_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%29">C</a>
+используется для операционных систем и программирования устройств. Другие языки, вроде
+<a href="http://ru.wikipedia.org/wiki/PHP">PHP</a>, подходят для создания страничек
+в интернете. В целом, <a href="http://ru.wikipedia.org/wiki/Python">Python</a>
+является языком общего назначения, специализирующимся на простоте использования.
+ 
+<p>Компания Tiobe следит за популярностью разных языков программирования на своём
+<a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">сайте</a>,
+который обновляется каждый месяц. Можно следить за этими тенденциями, вместе с досками
+объявлений на <a href="http://www.dice.com/">DICE</a>, чтобы составить общую картину
+того, какие языки требуются работодателям на данный момент. 
+
+<p>Большинство языков имеют несколько общих элементов, так что освоив
+один язык программирования, не составит труда выучить другой,
+применяя в нём схожие принципы программирования.
+
+<p>Если вас интересует более подробная история информатики в целом, рекомендую
+ознакомиться со следующими фильмами:
+<ul>
+<li><a href="http://www.imdb.com/title/tt0115398/">Triumph of the Nerds</a>
+<li><a href="http://www.imdb.com/title/tt0207264/">Nerds 2.0.1</a>
+</ul>
+
+Я также рекомендую книгу
+<a href="http://www.amazon.com/Accidental-Empires-Silicon-Millions-Competition/dp/0887308554/ref=sr_1_1?s=books&ie=UTF8&qid=1326140738&sr=1-1">Accidental
+Empires</a>, если вам нравиться читать больше, чем смотреть фильмы.
+
+<?php section('Проверка пройденного'); ?>
+
+<p>Нажмите здесь для <a href="quiz/quiz.php?file=what_is_a_computer_language">теста с несколькими вариантами ответов (англ. яз)</a>.
+
+<ol>
+<li>Приведите пример числа в двоичной системе исчисления. (Хотя число "1" может быть двоичным, десятичным или шестнадцатиричным,
+попытайтесь придумать пример, который показывает разницу между системами исчислений.)
+<li>Дайте пример числа в десятичной системе исчисления. 
+<li>Дайте пример числа в шестнадцатиричной системе исчисления.
+<li>Переведите числа 1, 10, 100, 1000 и 10000 из двоичной в десятичную систему исчисления.
+<li>Что такое компилятор?
+<li>Что такое исходный код?
+<li>Что такое машинный язык?
+<li>Что является языком программирования первого поколения?
+<li>Что является языком программирования второго поколения?
+<li>Что является языком программирования третьего поколения?
+<li>Что такое интерпретатор?
+</ol>
+<p>

chapters/02_title2/index_tr.php

+<?php chapter('Bilgisayar Dili Nedir?'); ?>
+
+<p>
+<figure class="video_float_right">
+	<video class="video-js vjs-default-skin" width="341" height="237" controls="controls" preload="auto" data-setup="{}">
+	  <source src="chapters/02_what_is_a_computer_language/computer_languages.ogv" type="video/ogg"></source>
+	  <source src="chapters/02_what_is_a_computer_language/computer_languages.mp4" type="video/mp4"></source>
+	</video> 
+	<figcaption>Video: Bilgisayar Dili Nedir?</figcaption>
+</figure>
+
+<p>Bilgisayar dilleri ne yapar? Neden bilgisayarlarda onlar var? 
+Neden çok fazla sayıda ve farklı programlama dili vardır?
+
+<p>Nasıl araba sürebilmek için motorun nasıl çalıştığını anlamak gerekli 
+değilse, basit programlama işleri için de bu soruların cevaplarını anlamak 
+gerekli değildir. Ancak, ileri seviyeye doğru yol alındığında, bir bilgisayarın 
+nasıl çalıştığını anlamak önemlidir. Bu bölüm, başlayabilmek için kısa bir açıklama içerir.
+
+<?php section('Programlamanın kısa tarihi'); ?>
+<p>Bilgisayarlar elektroniktir, ayrıca dijitaldirler. Bir bilgisayar için her şey, bir 
+kablo boyunca gerilim(voltaj) olmasından veya olmamasından ibaretttir. Voltaj olmaması 
+bilgisayar için sıfır demektir, herhangi bir voltaj değeri olması ise bir anlamına gelir. 
+Aslında, bilgisayarlar sıfır ve birlerin yanyana gelmesinden daha fazlasını hesaplayamazlar.
+
+<p>In the early days, switches were used to load ones or zeros into
+computer memory. The figure below, 
+<a href="http://en.wikipedia.org/wiki/File:Altair_Computer_Front_Panel.jpg">courtesy of Wikimedia Commons</a>, 
+shows an Altair 8800. The front panel switches were used to load
+in the program. The lights showed the output. There was no monitor.
+İlk zamanlarda, bilgisayarlara bir ve sıfırları yükleyebilmek için anahtarlar 
+kullanılıyordu. Alttaki şekil, <a href="http://en.wikipedia.org/wiki/File:Altair_Computer_Front_Panel.jpg">Wikimedia Commons'un izniyle</a>,
+Altair 8800'ı göstermektedir.
+
+<?php figure("fig.altair","chapters/02_what_is_a_computer_language/Altair_Computer_Front_Panel.jpg","Altair 8800",100); ?>
+
+<!--
+http://www.vintage-computer.com/heathkit3400.shtml
+-->
+<p>Düğmelerin her açılı/kapatılması bir sayıyla temsil edilir. Her sayı 
+bilgisayara işlenmesi için bir veri veya talimat içerir. Sadece sıfır 
+ve birlerden oluşan bu sistemler ikilik sayı sistemi olarak adlandırılır. 
+Bu tür bilgisayar dili 1GL ya da birinci nesil programlama dili olarak adlandırılır.
+
+<p>İkilik sistemde sayılar genellikle dörtlü gruplarla temsil edilir. Örneğin:
+<pre>1010 0010 0011</pre>
+
+
+<p>Onaltılık(hegzadesimal) kodların kullanılmaya başlanması, programların 
+anahtarlarla girilmesinde bir gelişme olmuştu. Onluk sayılar birçok insanın 
+kullandığı 0-9 rakamlarını içerir. Onaltılık sayılar 0-9 sayılarını ve dört anahtarı 
+veya 0-15 arası numaraları temsil etmek için A-F'yi içerir.
+
+<table>
+<tr><td>İkilik</td><td>Onluk</td><td>Onaltılık</td></tr>
+<tr><td style="text-align: right">0</td><td style="text-align: right">0</td><td style="text-align: right">0</td></tr>
+<tr><td style="text-align: right">1</td><td style="text-align: right">1</td><td style="text-align: right">1</td></tr>
+<tr><td style="text-align: right">10</td><td style="text-align: right">2</td><td style="text-align: right">2</td></tr>
+<tr><td style="text-align: right">11</td><td style="text-align: right">3</td><td style="text-align: right">3</td></tr>
+<tr><td style="text-align: right">100</td><td style="text-align: right">4</td><td style="text-align: right">4</td></tr>
+<tr><td style="text-align: right">101</td><td style="text-align: right">5</td><td style="text-align: right">5</td></tr>
+<tr><td style="text-align: right">110</td><td style="text-align: right">6</td><td style="text-align: right">6</td></tr>
+<tr><td style="text-align: right">111</td><td style="text-align: right">7</td><td style="text-align: right">7</td></tr>
+<tr><td style="text-align: right">1000</td><td style="text-align: right">8</td><td style="text-align: right">8</td></tr>
+<tr><td style="text-align: right">1001</td><td style="text-align: right">9</td><td style="text-align: right">9</td></tr>
+<tr><td style="text-align: right">1010</td><td style="text-align: right">10</td><td style="text-align: right">A</td></tr>
+<tr><td style="text-align: right">1011</td><td style="text-align: right">11</td><td style="text-align: right">B</td></tr>
+<tr><td style="text-align: right">1100</td><td style="text-align: right">12</td><td style="text-align: right">C</td></tr>
+<tr><td style="text-align: right">1101</td><td style="text-align: right">13</td><td style="text-align: right">D</td></tr>
+<tr><td style="text-align: right">1110</td><td style="text-align: right">14</td><td style="text-align: right">E</td></tr>
+<tr><td style="text-align: right">1111</td><td style="text-align: right">15</td><td style="text-align: right">F</td></tr>
+<tr><td style="text-align: right">1 0000</td><td style="text-align: right">16</td><td style="text-align: right">10</td></tr>
+<tr><td style="text-align: right">1 0001</td><td style="text-align: right">17</td><td style="text-align: right">11</td></tr>
+</table>
+
+
+
+<p>Alttaki video sayma sistemini biraz daha fazla açıklıyor:
+<figure>
+	<video class="video-js vjs-default-skin" width="700" height="532" controls="controls" preload="auto" data-setup="{}">
+	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.ogv" type="video/ogg"></source>
+	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.mp4" type="video/mp4"></source>
+	</video> 
+	<figcaption>Video: Onluk, ikilik ve onaltılık sayı sistemlerini anlamak</figcaption>
+</figure>
+
+<p>Program girişini kolaylaştırma amacıyla, sonraki bilgisayarlarda programların 
+assembly dili ile girilmesine izin verildi. Her komut bir hatırlatıcı kısaltma olarak 
+kullanıldı ve derleyici adı verilen program hatırlatıcıları komut adı verilen sayılara 
+dönüştürdü. Bu dil türüne 2GL veya ikinci nesil dil adı verildi.
+(Ç.N GL=Generation Language)
+
+<p>Altta yer alan örnek bir assembly dili programıdır, 
+<a href="http://en.wikipedia.org/wiki/File:Motorola_6800_Assembly_Language.png">Wikimedia Commons'un izniyle</a>.
+
+
+<?php figure("fig.assembly","chapters/02_what_is_a_computer_language/Motorola_6800_Assembly_Language.png","Assembly dil örneği",50); ?>
+
+<p>Bu bir gelişme olduğu halde, programlamak hala pek de kolay değildi. Bir sonraki 
+nesilde yer alan diller yüksek-seviye kısaltmalara izin verdi. İlk üçüncü nesil dillerde 
+(<a href="http://en.wikipedia.org/wiki/COBOL">COBOL</a>, 
+<a href="http://en.wikipedia.org/wiki/Fortran">FORTRAN</a> ve 
+<a href="http://en.wikipedia.org/wiki/Lisp_(programming_language)">LISP</a>) 
+programlamak ve programı anlamak çok daha kolaydı.
+
+<p>İkinci ve üçüncü nesil diller, <em>derleyici</em> adı verilen programları kullandı. 
+Derleyici, kullanıcı tarafından yazılan programı (<em>kaynak kodu</em> adı verildi) 
+alıp makine koduna dönüştürür. Programcı bunun ardından makine kodunu çalıştırır. 
+Orijinal kaynak kodu çalışmaz.
+
+<p>Programdaki kaynak kodu farklı parçalardan oluşuyorsa, <em>bağ düzenleyici</em> 
+adı verilen program tarafından tek bir programa bağlanabilir.  Bağ düzenleyici 
+derleyici tarafından üretilen makine kodu üzerinde çalışır ve son bir program üretir.
+Bu son program kullanıcının çalıştırdığı programdır ve orijinal koda 
+gerek duyulmaz.
+(Ç.N derleyici: compiler, bağ düzenleyici: linker)
+
+<?php figure("fig.compiler_and_linker","chapters/02_what_is_a_computer_language/compiler_and_linker.svg","Derleyiciler ve Bağ düzenleyiciler",100); ?>
+
+<p>Makine diline derlemenin bir kötü yanı bu programların sadece özel makine türlerinde 
+çalışmasıdır. Windows bilgisayarlar için derlenen programlar Apple Macintosh 
+bilgisayarlarda ya da Linux bilgisayarlarda çalışmaz.
+
+<p>Yeni programcılar için bütün derleme ve bağlama aşamaları karışık olabileceğinden, 
+bazı diller onun yerine kodu <em>yorumlayıcıları</em> kullanarak çalıştırırlar.
+Bu programlar kaynak koduna bakar ve bu esnada onu makine kodu komutlarına yorumlarlar. 
+Bu ayrıca aynı programın Windows, Mac ve Linux bilgisyarlarda çalışmasını sağlar. Her 
+platform için yorumlayıcılar mevcuttur.
+
+<p>Yorumlayıcı kullanmanın dezavantajı ise kodun makinenin ana dili yerine bir yorumlayıcı 
+üzerinde çalışmasının daha yavaş olmasıdır.
+
+<?php figure("fig.interpreter","chapters/02_what_is_a_computer_language/interpreter.svg","Yorumlayıcı",60); ?>
+
+<p>Python yorumlanan dillere bir örnektir. Python'da geliştirme yapmak C'den daha 
+kolaydır, fakat Python daha yavaş çalışır ve programın çalışabilmesi için 
+Python yorumlayıcısının bulunması şarttır.
+
+<p><a href="http://en.wikipedia.org/wiki/Java_(programming_language)">Java</a> 
+gibi diller asıl makine yerine Java Virtual Machine
+(<a href="http://en.wikipedia.org/wiki/Java_Virtual_Machine">JVM</a>) 
+üzerinde çalışan bir 
+makine diline derlenen bir sistem kullanırlar. Bir başka popüler dil olan 
+<a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>, 
+bir Common Language Infrastructure 
+(<a href="http://en.wikipedia.org/wiki/Common_Language_Infrastructure">CLI</a>) 
+dilidir ve sanal makine üzerinde Virtual Execution System 
+(<a href="http://en.wikipedia.org/wiki/Virtual_Execution_System">VES</a>) 
+üzerinde çalışır.
+Bunlar hakkında tam bir tartışma bu kitabın konusunun ötesindedir. Ancak bunlar hakkında 
+okumaya devam etmekte kendinizi özgür hissedin.
+
+<p>Bugün birçok farklı programlama dili bulunmaktadır. Bilgisayarlar çok fazla değişik 
+türde işler yaptıkları için farklı diller farklı işlerde özelleşebilmeleri için 
+geliştirilmiştir. 
+<a href="http://en.wikipedia.org/wiki/C_(programming_language)">C</a> 
+gibi diller işletim sistemleri ve küçük gömülü bilgisayarlar için iyidir. 
+<a href="http://en.wikipedia.org/wiki/PHP">PHP</a> gibi diğer diller internet siteleri 
+oluşturmak için özelleştirilmişlerdir. 
+<a href="http://en.wikipedia.org/wiki/Python_(programming_language)">Python</a> genel amaçlı 
+olan ve kullanılması-kolay olması için özelleştirilen bir dildir.
+
+<p>Tiobe firması farklı programlama dillerinin popülerliklerini kendi 
+<a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">index</a>lerinde 
+her ay güncelleyerek takip ediyor. Buraya bakmak iyi bir fikir olacaktır, ayrıca 
+<a href="http://www.dice.com/">DICE</a> gibi iş ilan sitelerine bakarak işverenlerin 
+güncel olarak hangi dili bilen eleman aradıklarına ulaşabilirsiniz.
+
+<p>Neyse ki neredeyse bütün diller aynı elementleri paylaşırlar, yani herhangi bir 
+programlama dili bir kere öğrenildiğinde, aynı teoriler diğer dillere de uygulanacaktır.
+
+<p>
+Bilgisayarın eğlenceli bir tarihi için, alttaki videoları izlemenizi ve takip etmenizi 
+öneriyorum:
+<ul>
+<li><a href="http://www.imdb.com/title/tt0115398/">Triumph of the Nerds</a>
+<li><a href="http://www.imdb.com/title/tt0207264/">Nerds 2.0.1</a>
+</ul>
+<p>Bu videolar Netflix, Amazon ve diğer yaygın kaynaklarda bulunabilir. Bunlar bütün ailenizin 
+eğlenebileceği kadar eğlencelidir. Ben ayrıca eğer okumayı videodan daha çok tercih ediyorsanız
+<a href="http://www.amazon.com/Accidental-Empires-Silicon-Millions-Competition/dp/0887308554/ref=sr_1_1?s=books&ie=UTF8&qid=1326140738&sr=1-1">Accidental
+Empires</a> 
+kitabını öneriyorum.
+
+<?php section('Tekrar'); ?>
+
+<p><a href="quiz/quiz.php?file=what_is_a_computer_language">Çoktan seçmeli tekrar quizi için buraya</a> tıklayın..
+
+<ol>
+<li>İkilik sistemde bir sayı örneği verin. ("1" gibi bir sayı ikilik, onluk ve onaltılık olabilirken, 
+farklı tabanlardaki sayılar arasında yer alan farkları daha iyi örnekleyen 
+örnekler bulmaya çalışın.)
+<li>Onluk sistemde bir sayı örneği verin.
+<li>Onaltılık sistemde bir sayı örneği verin.
+<li>1, 10, 100, 1000 ve 10000 sayılarını ikilik sistemden onluk sisteme çevirin.
+<li>Derleyici nedir?
+<li>Kaynak kodu nedir?
+<li>Makine dili nedir?
+<li>Birinci nesil dil nedir?
+<li>İkinci nesil dil nedir?
+<li>Üçüncü nesil dil nedir?
+<li>Yorumlayıcı nedir?
+</ol>
+<p>

chapters/02_title2/interpreter.png

Removed
Old image

chapters/02_title2/linker.png

Removed
Old image

chapters/02_title2/what_is_a_computer_language_ru.php

-<?php chapter('Что такое компьютерный язык?'); ?>
-
-<p>
-<figure class="video_float_right">
-	<video class="video-js vjs-default-skin" width="341" height="237" controls="controls" preload="auto" data-setup="{}">
-	  <source src="chapters/02_what_is_a_computer_language/computer_languages.ogv" type="video/ogg"></source>
-	  <source src="chapters/02_what_is_a_computer_language/computer_languages.mp4" type="video/mp4"></source>
-	</video> 
-	<figcaption>Видео: Что такое компьютерный язык?</figcaption>
-</figure>
-
-<p>Что является сутью компьютерного языка? Зачем он нужен компьютерам? Почему
-в мире так много компьютерных языков?
-
-<p>Как для понимания принципов работы двигателя не нужно водить машину, так и для
-понимания ответа на эти вопросы не нужно программировать. Но для того, чтобы улучшить
-своё знание темы, необходимо понять как работает компьютер. Здесь даётся краткое
-объяснение.
-
-<?php section('Краткая история программирования'); ?>
-<p>Компьютеры являются цифровой электроникой. Их восприятие данных заключается
-в наличии или отсутствии напряжения в проводах. Отсутствие напряжение выглядит
-для компьютера как ноль, наличие - как единица. На самом деле, компьютеры не знают
-других цифр, так что в итоге ему приходится комбинировать 0 и 1 для составления чисел.
-
-<p>Раньше, особые переключатели использовались для загрузки единиц и нулей
-в компьютерную память. На этой картинке, принадлежащей
-<a href="http://en.wikipedia.org/wiki/File:Altair_Computer_Front_Panel.jpg">Wikimedia Commons</a>, 
-изображён Altair 8800. Переключатели на передней панели использовались для загрузки программы.
-Огни показывали результат. Монитора не было.
-
-<?php figure("fig.altair","chapters/02_what_is_a_computer_language/Altair_Computer_Front_Panel.jpg","Altair 8800",100); ?>
-
-<!--
-http://www.vintage-computer.com/heathkit3400.shtml
--->
-<p>Каждый набор из переключателей представляет из себя номер. Каждый номер
-представляет данные или инструкцию, которую с ними должен сделать компьютер.
-Эта система, использующая только нули и единицы для репрезентации чисел называется
-бинарной(двоичной) системой исчисления. Этот тип компьютерного языка называется 1GL, или
-язык программирования первого поколения.
-
-<p>Числа в двоичной системе исчисления чаще всего представлены в комбинациях из четырёх цифр. Например:
-<pre>1010 0010 0011</pre>
-
-
-<p>Усовершенствованием ввода через переключатели было начало использования
-шестнадцатеричных кодов. Десятичные числа, используемые в посведневной жизни,
-состоят из цифр 0-9. Шестнадцатеричная система исчисления состоит из цифр 0-9, а также из 
-символов от A до F для репрезентации набора четырёх переключателей, с возможными
-значениями 0-15.
-
-<table>
-<tr><td>Двоичная</td><td>Десятичная</td><td>Шестнадцатиричная</td></tr>
-<tr><td style="text-align: right">0</td><td style="text-align: right">0</td><td style="text-align: right">0</td></tr>
-<tr><td style="text-align: right">1</td><td style="text-align: right">1</td><td style="text-align: right">1</td></tr>
-<tr><td style="text-align: right">10</td><td style="text-align: right">2</td><td style="text-align: right">2</td></tr>
-<tr><td style="text-align: right">11</td><td style="text-align: right">3</td><td style="text-align: right">3</td></tr>
-<tr><td style="text-align: right">100</td><td style="text-align: right">4</td><td style="text-align: right">4</td></tr>
-<tr><td style="text-align: right">101</td><td style="text-align: right">5</td><td style="text-align: right">5</td></tr>
-<tr><td style="text-align: right">110</td><td style="text-align: right">6</td><td style="text-align: right">6</td></tr>
-<tr><td style="text-align: right">111</td><td style="text-align: right">7</td><td style="text-align: right">7</td></tr>
-<tr><td style="text-align: right">1000</td><td style="text-align: right">8</td><td style="text-align: right">8</td></tr>
-<tr><td style="text-align: right">1001</td><td style="text-align: right">9</td><td style="text-align: right">9</td></tr>
-<tr><td style="text-align: right">1010</td><td style="text-align: right">10</td><td style="text-align: right">A</td></tr>
-<tr><td style="text-align: right">1011</td><td style="text-align: right">11</td><td style="text-align: right">B</td></tr>
-<tr><td style="text-align: right">1100</td><td style="text-align: right">12</td><td style="text-align: right">C</td></tr>
-<tr><td style="text-align: right">1101</td><td style="text-align: right">13</td><td style="text-align: right">D</td></tr>
-<tr><td style="text-align: right">1110</td><td style="text-align: right">14</td><td style="text-align: right">E</td></tr>
-<tr><td style="text-align: right">1111</td><td style="text-align: right">15</td><td style="text-align: right">F</td></tr>
-<tr><td style="text-align: right">1 0000</td><td style="text-align: right">16</td><td style="text-align: right">10</td></tr>
-<tr><td style="text-align: right">1 0001</td><td style="text-align: right">17</td><td style="text-align: right">11</td></tr>
-</table>
-
-
-
-<p>Следующее видео немного подробнее объясняет, как работает система исчисления:
-<figure>
-	<video class="video-js vjs-default-skin" width="700" height="532" controls="controls" preload="auto" data-setup="{}">
-	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.ogv" type="video/ogg"></source>
-	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.mp4" type="video/mp4"></source>
-	</video> 
-	<figcaption>Видео: объяснение двоичной, десятичной и шестнадцатеричной систем исчисления.</figcaption>
-</figure>
-
-<p>Для облегчения ввода программ, более поздние компьютеры позволяли
-вводить программы с помощью языка assembly. Каждая команда использовала
-мнемонику, а программа, называемая компилятором, превращала мнемоники
-в числа, обозначающие команды. Такой тип языка называется 2GL, или
-язык второго поколения.
-
-<p>Ниже преведена часть программы на языке assembly, 
-<a href="http://en.wikipedia.org/wiki/File:Motorola_6800_Assembly_Language.png">предоставлено Wikimedia Commons</a>.
-
-<?php figure("fig.assembly","chapters/02_what_is_a_computer_language/Motorola_6800_Assembly_Language.png","Пример языка assembly",50); ?>
-
-<p>Хотя это было улучшением, этого всё ещё было недостаточно для того, чтобы
-сделать процесс программирования лёгким. Следующее поколение языков предоставило
-абстракции более высокого уровня. Первые языки третьего поколения: 
-(<a href="http://ru.wikipedia.org/wiki/COBOL">COBOL</a>, 
-<a href="http://ru.wikipedia.org/wiki/Fortran">FORTRAN</a> и 
-<a href="http://ru.wikipedia.org/wiki/Lisp">LISP</a>)
-были намного проще для понимания и программирования.
-
-<p>Языки второго и третьего поколения использовали программу, называемую
-<em>компилятор</em>. Компилятор берёт программу, введённую пользователем
-(так называемый <em>исходный код</em>) и превращает её в машинный код.
-Программист запускает машинный код. Оригинальный исходный код не
-запускается.
-
-<p>Если программа использует исходный код из разных источников, они могут быть связаны
-вместе в один с помощью программы, называемой <em>linker (линкер, редактор связей, компоновщик)</em>. 
-Редактор связей работает с машинным кодом, сгенерированным компилятором, для создания
-финальной версии программы. Эта финальная версия - то, что запускает пользователь.
-Исходный код для этого не нужен.
-
-<?php figure("fig.compiler_and_linker","chapters/02_what_is_a_computer_language/compiler_and_linker_ru.svg","Компиляторы и редакторы связей",100); ?>
-
-<p>Недостатком машинного языка является то, что программа будет работать
-только на определённых типах компьютера. Программы, скомпилированные для
-компьютеров с Windows скорее всего не будут работать на компьютерах
-Apple Macintosh и наоборот.
-
-<p>Потому что весь процесс компиляции и связи может быть сложным для 
-начинающих программистов, некоторые языки стали использовать <em>интерпретаторы</em>.
-Эти программы спотрят на исходный код и преобразуют его в машинный код на ходу.
-Это также позволяет одним и тем же программам запускаться на Windows, Mac, Unix 
-компьютерах, в случае, если на каждой из этих платформ есть доступ к интерпретатору.
-
-<p>Недостатком использования интерпретатора является то, что он медленнее,
-чем оригинальный, машинный язык. 
-
-<?php figure("fig.interpreter","chapters/02_what_is_a_computer_language/interpreter_ru.svg","Интерпретатор",60); ?>
-
-<p>Python является примером интерпретируемого языка. Легче писать на Python'е, чем на C,
-но Python работает медленнее и требует интерпретатора для успешной работы.
-
-<p>Языки вроде 
-<a href="http://ru.wikipedia.org/wiki/Java">Java</a>
-используют систему, где программы компилируются в машинный код,
-который, вместо самой операционной системы компьютера, затем запускается на 
- Java Virtual Machine (<a href="http://ru.wikipedia.org/wiki/Java_Virtual_Machine">JVM</a>).
-<a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>, испольщующий
-Common Language Infrastructure (<a href="http://ru.wikipedia.org/wiki/Common_Language_Infrastructure">CLI</a>),
- - другой популярный язык, который делает то же самое, запуская себя на виртуальной машине
- Virtual Execution System (<a href="http://en.wikipedia.org/wiki/Virtual_Execution_System">VES</a>).
-Хотя обучение этим языкам не является целью этой книги, вы смело можете с ними ознакомиться.
-
-<p>На сегодняшний день существует очень много языков программирования. В связи с тем,
-что компьютеры способны выполнять так много разных функций, каждый язык специализируется
-на отдельных типах задания. Так, например, 
-язык <a href="http://ru.wikipedia.org/wiki/%D0%A1%D0%B8_%28%D1%8F%D0%B7%D1%8B%D0%BA_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F%29">C</a>
-используется для операционных систем и программирования устройств. Другие языки, вроде
-<a href="http://ru.wikipedia.org/wiki/PHP">PHP</a>, подходят для создания страничек
-в интернете. В целом, <a href="http://ru.wikipedia.org/wiki/Python">Python</a>
-является языком общего назначения, специализирующимся на простоте использования.
- 
-<p>Компания Tiobe следит за популярностью разных языков программирования на своём
-<a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">сайте</a>,
-который обновляется каждый месяц. Можно следить за этими тенденциями, вместе с досками
-объявлений на <a href="http://www.dice.com/">DICE</a>, чтобы составить общую картину
-того, какие языки требуются работодателям на данный момент. 
-
-<p>Большинство языков имеют несколько общих элементов, так что освоив
-один язык программирования, не составит труда выучить другой,
-применяя в нём схожие принципы программирования.
-
-<p>Если вас интересует более подробная история информатики в целом, рекомендую
-ознакомиться со следующими фильмами:
-<ul>
-<li><a href="http://www.imdb.com/title/tt0115398/">Triumph of the Nerds</a>
-<li><a href="http://www.imdb.com/title/tt0207264/">Nerds 2.0.1</a>
-</ul>
-
-Я также рекомендую книгу
-<a href="http://www.amazon.com/Accidental-Empires-Silicon-Millions-Competition/dp/0887308554/ref=sr_1_1?s=books&ie=UTF8&qid=1326140738&sr=1-1">Accidental
-Empires</a>, если вам нравиться читать больше, чем смотреть фильмы.
-
-<?php section('Проверка пройденного'); ?>
-
-<p>Нажмите здесь для <a href="quiz/quiz.php?file=what_is_a_computer_language">теста с несколькими вариантами ответов (англ. яз)</a>.
-
-<ol>
-<li>Приведите пример числа в двоичной системе исчисления. (Хотя число "1" может быть двоичным, десятичным или шестнадцатиричным,
-попытайтесь придумать пример, который показывает разницу между системами исчислений.)
-<li>Дайте пример числа в десятичной системе исчисления. 
-<li>Дайте пример числа в шестнадцатиричной системе исчисления.
-<li>Переведите числа 1, 10, 100, 1000 и 10000 из двоичной в десятичную систему исчисления.
-<li>Что такое компилятор?
-<li>Что такое исходный код?
-<li>Что такое машинный язык?
-<li>Что является языком программирования первого поколения?
-<li>Что является языком программирования второго поколения?
-<li>Что является языком программирования третьего поколения?
-<li>Что такое интерпретатор?
-</ol>
-<p>

chapters/02_title2/what_is_a_computer_language_tr.php

-<?php chapter('Bilgisayar Dili Nedir?'); ?>
-
-<p>
-<figure class="video_float_right">
-	<video class="video-js vjs-default-skin" width="341" height="237" controls="controls" preload="auto" data-setup="{}">
-	  <source src="chapters/02_what_is_a_computer_language/computer_languages.ogv" type="video/ogg"></source>
-	  <source src="chapters/02_what_is_a_computer_language/computer_languages.mp4" type="video/mp4"></source>
-	</video> 
-	<figcaption>Video: Bilgisayar Dili Nedir?</figcaption>
-</figure>
-
-<p>Bilgisayar dilleri ne yapar? Neden bilgisayarlarda onlar var? 
-Neden çok fazla sayıda ve farklı programlama dili vardır?
-
-<p>Nasıl araba sürebilmek için motorun nasıl çalıştığını anlamak gerekli 
-değilse, basit programlama işleri için de bu soruların cevaplarını anlamak 
-gerekli değildir. Ancak, ileri seviyeye doğru yol alındığında, bir bilgisayarın 
-nasıl çalıştığını anlamak önemlidir. Bu bölüm, başlayabilmek için kısa bir açıklama içerir.
-
-<?php section('Programlamanın kısa tarihi'); ?>
-<p>Bilgisayarlar elektroniktir, ayrıca dijitaldirler. Bir bilgisayar için her şey, bir 
-kablo boyunca gerilim(voltaj) olmasından veya olmamasından ibaretttir. Voltaj olmaması 
-bilgisayar için sıfır demektir, herhangi bir voltaj değeri olması ise bir anlamına gelir. 
-Aslında, bilgisayarlar sıfır ve birlerin yanyana gelmesinden daha fazlasını hesaplayamazlar.
-
-<p>In the early days, switches were used to load ones or zeros into
-computer memory. The figure below, 
-<a href="http://en.wikipedia.org/wiki/File:Altair_Computer_Front_Panel.jpg">courtesy of Wikimedia Commons</a>, 
-shows an Altair 8800. The front panel switches were used to load
-in the program. The lights showed the output. There was no monitor.
-İlk zamanlarda, bilgisayarlara bir ve sıfırları yükleyebilmek için anahtarlar 
-kullanılıyordu. Alttaki şekil, <a href="http://en.wikipedia.org/wiki/File:Altair_Computer_Front_Panel.jpg">Wikimedia Commons'un izniyle</a>,
-Altair 8800'ı göstermektedir.
-
-<?php figure("fig.altair","chapters/02_what_is_a_computer_language/Altair_Computer_Front_Panel.jpg","Altair 8800",100); ?>
-
-<!--
-http://www.vintage-computer.com/heathkit3400.shtml
--->
-<p>Düğmelerin her açılı/kapatılması bir sayıyla temsil edilir. Her sayı 
-bilgisayara işlenmesi için bir veri veya talimat içerir. Sadece sıfır 
-ve birlerden oluşan bu sistemler ikilik sayı sistemi olarak adlandırılır. 
-Bu tür bilgisayar dili 1GL ya da birinci nesil programlama dili olarak adlandırılır.
-
-<p>İkilik sistemde sayılar genellikle dörtlü gruplarla temsil edilir. Örneğin:
-<pre>1010 0010 0011</pre>
-
-
-<p>Onaltılık(hegzadesimal) kodların kullanılmaya başlanması, programların 
-anahtarlarla girilmesinde bir gelişme olmuştu. Onluk sayılar birçok insanın 
-kullandığı 0-9 rakamlarını içerir. Onaltılık sayılar 0-9 sayılarını ve dört anahtarı 
-veya 0-15 arası numaraları temsil etmek için A-F'yi içerir.
-
-<table>
-<tr><td>İkilik</td><td>Onluk</td><td>Onaltılık</td></tr>
-<tr><td style="text-align: right">0</td><td style="text-align: right">0</td><td style="text-align: right">0</td></tr>
-<tr><td style="text-align: right">1</td><td style="text-align: right">1</td><td style="text-align: right">1</td></tr>
-<tr><td style="text-align: right">10</td><td style="text-align: right">2</td><td style="text-align: right">2</td></tr>
-<tr><td style="text-align: right">11</td><td style="text-align: right">3</td><td style="text-align: right">3</td></tr>
-<tr><td style="text-align: right">100</td><td style="text-align: right">4</td><td style="text-align: right">4</td></tr>
-<tr><td style="text-align: right">101</td><td style="text-align: right">5</td><td style="text-align: right">5</td></tr>
-<tr><td style="text-align: right">110</td><td style="text-align: right">6</td><td style="text-align: right">6</td></tr>
-<tr><td style="text-align: right">111</td><td style="text-align: right">7</td><td style="text-align: right">7</td></tr>
-<tr><td style="text-align: right">1000</td><td style="text-align: right">8</td><td style="text-align: right">8</td></tr>
-<tr><td style="text-align: right">1001</td><td style="text-align: right">9</td><td style="text-align: right">9</td></tr>
-<tr><td style="text-align: right">1010</td><td style="text-align: right">10</td><td style="text-align: right">A</td></tr>
-<tr><td style="text-align: right">1011</td><td style="text-align: right">11</td><td style="text-align: right">B</td></tr>
-<tr><td style="text-align: right">1100</td><td style="text-align: right">12</td><td style="text-align: right">C</td></tr>
-<tr><td style="text-align: right">1101</td><td style="text-align: right">13</td><td style="text-align: right">D</td></tr>
-<tr><td style="text-align: right">1110</td><td style="text-align: right">14</td><td style="text-align: right">E</td></tr>
-<tr><td style="text-align: right">1111</td><td style="text-align: right">15</td><td style="text-align: right">F</td></tr>
-<tr><td style="text-align: right">1 0000</td><td style="text-align: right">16</td><td style="text-align: right">10</td></tr>
-<tr><td style="text-align: right">1 0001</td><td style="text-align: right">17</td><td style="text-align: right">11</td></tr>
-</table>
-
-
-
-<p>Alttaki video sayma sistemini biraz daha fazla açıklıyor:
-<figure>
-	<video class="video-js vjs-default-skin" width="700" height="532" controls="controls" preload="auto" data-setup="{}">
-	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.ogv" type="video/ogg"></source>
-	  <source src="chapters/02_what_is_a_computer_language/numbering_systems2.mp4" type="video/mp4"></source>
-	</video> 
-	<figcaption>Video: Onluk, ikilik ve onaltılık sayı sistemlerini anlamak</figcaption>
-</figure>
-
-<p>Program girişini kolaylaştırma amacıyla, sonraki bilgisayarlarda programların 
-assembly dili ile girilmesine izin verildi. Her komut bir hatırlatıcı kısaltma olarak 
-kullanıldı ve derleyici adı verilen program hatırlatıcıları komut adı verilen sayılara 
-dönüştürdü. Bu dil türüne 2GL veya ikinci nesil dil adı verildi.
-(Ç.N GL=Generation Language)
-
-<p>Altta yer alan örnek bir assembly dili programıdır, 
-<a href="http://en.wikipedia.org/wiki/File:Motorola_6800_Assembly_Language.png">Wikimedia Commons'un izniyle</a>.
-
-
-<?php figure("fig.assembly","chapters/02_what_is_a_computer_language/Motorola_6800_Assembly_Language.png","Assembly dil örneği",50); ?>
-
-<p>Bu bir gelişme olduğu halde, programlamak hala pek de kolay değildi. Bir sonraki 
-nesilde yer alan diller yüksek-seviye kısaltmalara izin verdi. İlk üçüncü nesil dillerde 
-(<a href="http://en.wikipedia.org/wiki/COBOL">COBOL</a>, 
-<a href="http://en.wikipedia.org/wiki/Fortran">FORTRAN</a> ve 
-<a href="http://en.wikipedia.org/wiki/Lisp_(programming_language)">LISP</a>) 
-programlamak ve programı anlamak çok daha kolaydı.
-
-<p>İkinci ve üçüncü nesil diller, <em>derleyici</em> adı verilen programları kullandı. 
-Derleyici, kullanıcı tarafından yazılan programı (<em>kaynak kodu</em> adı verildi) 
-alıp makine koduna dönüştürür. Programcı bunun ardından makine kodunu çalıştırır. 
-Orijinal kaynak kodu çalışmaz.
-
-<p>Programdaki kaynak kodu farklı parçalardan oluşuyorsa, <em>bağ düzenleyici</em> 
-adı verilen program tarafından tek bir programa bağlanabilir.  Bağ düzenleyici 
-derleyici tarafından üretilen makine kodu üzerinde çalışır ve son bir program üretir.
-Bu son program kullanıcının çalıştırdığı programdır ve orijinal koda 
-gerek duyulmaz.
-(Ç.N derleyici: compiler, bağ düzenleyici: linker)
-
-<?php figure("fig.compiler_and_linker","chapters/02_what_is_a_computer_language/compiler_and_linker.svg","Derleyiciler ve Bağ düzenleyiciler",100); ?>
-
-<p>Makine diline derlemenin bir kötü yanı bu programların sadece özel makine türlerinde 
-çalışmasıdır. Windows bilgisayarlar için derlenen programlar Apple Macintosh 
-bilgisayarlarda ya da Linux bilgisayarlarda çalışmaz.
-
-<p>Yeni programcılar için bütün derleme ve bağlama aşamaları karışık olabileceğinden, 
-bazı diller onun yerine kodu <em>yorumlayıcıları</em> kullanarak çalıştırırlar.
-Bu programlar kaynak koduna bakar ve bu esnada onu makine kodu komutlarına yorumlarlar. 
-Bu ayrıca aynı programın Windows, Mac ve Linux bilgisyarlarda çalışmasını sağlar. Her 
-platform için yorumlayıcılar mevcuttur.
-
-<p>Yorumlayıcı kullanmanın dezavantajı ise kodun makinenin ana dili yerine bir yorumlayıcı 
-üzerinde çalışmasının daha yavaş olmasıdır.
-
-<?php figure("fig.interpreter","chapters/02_what_is_a_computer_language/interpreter.svg","Yorumlayıcı",60); ?>
-
-<p>Python yorumlanan dillere bir örnektir. Python'da geliştirme yapmak C'den daha 
-kolaydır, fakat Python daha yavaş çalışır ve programın çalışabilmesi için 
-Python yorumlayıcısının bulunması şarttır.
-
-<p><a href="http://en.wikipedia.org/wiki/Java_(programming_language)">Java</a> 
-gibi diller asıl makine yerine Java Virtual Machine
-(<a href="http://en.wikipedia.org/wiki/Java_Virtual_Machine">JVM</a>) 
-üzerinde çalışan bir 
-makine diline derlenen bir sistem kullanırlar. Bir başka popüler dil olan 
-<a href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)">C#</a>, 
-bir Common Language Infrastructure 
-(<a href="http://en.wikipedia.org/wiki/Common_Language_Infrastructure">CLI</a>) 
-dilidir ve sanal makine üzerinde Virtual Execution System 
-(<a href="http://en.wikipedia.org/wiki/Virtual_Execution_System">VES</a>) 
-üzerinde çalışır.
-Bunlar hakkında tam bir tartışma bu kitabın konusunun ötesindedir. Ancak bunlar hakkında 
-okumaya devam etmekte kendinizi özgür hissedin.
-
-<p>Bugün birçok farklı programlama dili bulunmaktadır. Bilgisayarlar çok fazla değişik 
-türde işler yaptıkları için farklı diller farklı işlerde özelleşebilmeleri için 
-geliştirilmiştir. 
-<a href="http://en.wikipedia.org/wiki/C_(programming_language)">C</a> 
-gibi diller işletim sistemleri ve küçük gömülü bilgisayarlar için iyidir. 
-<a href="http://en.wikipedia.org/wiki/PHP">PHP</a> gibi diğer diller internet siteleri 
-oluşturmak için özelleştirilmişlerdir. 
-<a href="http://en.wikipedia.org/wiki/Python_(programming_language)">Python</a> genel amaçlı 
-olan ve kullanılması-kolay olması için özelleştirilen bir dildir.
-
-<p>Tiobe firması farklı programlama dillerinin popülerliklerini kendi 
-<a href="http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html">index</a>lerinde 
-her ay güncelleyerek takip ediyor. Buraya bakmak iyi bir fikir olacaktır, ayrıca 
-<a href="http://www.dice.com/">DICE</a> gibi iş ilan sitelerine bakarak işverenlerin 
-güncel olarak hangi dili bilen eleman aradıklarına ulaşabilirsiniz.
-
-<p>Neyse ki neredeyse bütün diller aynı elementleri paylaşırlar, yani herhangi bir 
-programlama dili bir kere öğrenildiğinde, aynı teoriler diğer dillere de uygulanacaktır.
-
-<p>
-Bilgisayarın eğlenceli bir tarihi için, alttaki videoları izlemenizi ve takip etmenizi 
-öneriyorum:
-<ul>
-<li><a href="http://www.imdb.com/title/tt0115398/">Triumph of the Nerds</a>
-<li><a href="http://www.imdb.com/title/tt0207264/">Nerds 2.0.1</a>
-</ul>
-<p>Bu videolar Netflix, Amazon ve diğer yaygın kaynaklarda bulunabilir. Bunlar bütün ailenizin 
-eğlenebileceği kadar eğlencelidir. Ben ayrıca eğer okumayı videodan daha çok tercih ediyorsanız
-<a href="http://www.amazon.com/Accidental-Empires-Silicon-Millions-Competition/dp/0887308554/ref=sr_1_1?s=books&ie=UTF8&qid=1326140738&sr=1-1">Accidental
-Empires</a> 
-kitabını öneriyorum.
-
-<?php section('Tekrar'); ?>
-
-<p><a href="quiz/quiz.php?file=what_is_a_computer_language">Çoktan seçmeli tekrar quizi için buraya</a> tıklayın..
-
-<ol>
-<li>İkilik sistemde bir sayı örneği verin. ("1" gibi bir sayı ikilik, onluk ve onaltılık olabilirken, 
-farklı tabanlardaki sayılar arasında yer alan farkları daha iyi örnekleyen 
-örnekler bulmaya çalışın.)
-<li>Onluk sistemde bir sayı örneği verin.
-<li>Onaltılık sistemde bir sayı örneği verin.
-<li>1, 10, 100, 1000 ve 10000 sayılarını ikilik sistemden onluk sisteme çevirin.
-<li>Derleyici nedir?
-<li>Kaynak kodu nedir?
-<li>Makine dili nedir?
-<li>Birinci nesil dil nedir?
-<li>İkinci nesil dil nedir?
-<li>Üçüncü nesil dil nedir?
-<li>Yorumlayıcı nedir?
-</ol>
-<p>

document_functions.php

 }
 function ref_figure($id) {
 	global $is_book;
+	global $is_ebook;
 	
 	$fig_id = get_figure_id($id);
 
-	if (!$is_book) {
+	if( $is_ebook ) {
+		echo $fig_id;
+	} else if (!$is_book ) {
 		echo "<a href='#$id'>";
 		echo $fig_id;
 		echo "</a>";

dynatree/GPL-LICENSE.txt

+        GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.

dynatree/MIT-License.txt

+Copyright (c) 2008-2011  Martin Wendt (http://wwWendt.de)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

dynatree/jquery.dynatree.js

+/*************************************************************************
+	jquery.dynatree.js
+	Dynamic tree view control, with support for lazy loading of branches.
+
+	Copyright (c) 2006-2012, Martin Wendt (http://wwWendt.de)
+	Dual licensed under the MIT or GPL Version 2 licenses.
+	http://code.google.com/p/dynatree/wiki/LicenseInfo
+
+	A current version and some documentation is available at
+		http://dynatree.googlecode.com/
+
+	$Version: 1.2.2$
+	$Revision: 627, 2012-10-07 16:55:00$
+
+	@depends: jquery.js
+	@depends: jquery.ui.core.js
+	@depends: jquery.cookie.js
+*************************************************************************/
+
+/* jsHint options*/
+// Note: We currently allow eval() to parse the 'data' attribtes, when initializing from HTML.
+// TODO: pass jsHint with the options given in grunt.js only.
+//       The following should not be required:
+/*global alert */
+/*jshint nomen:false, smarttabs:true, eqeqeq:false, evil:true, regexp:false */
+
+/*************************************************************************
+ *	Debug functions
+ */
+
+var _canLog = true;
+
+function _log(mode, msg) {
+	/**
+	 * Usage: logMsg("%o was toggled", this);
+	 */
+	if( !_canLog ){
+		return;
+	}
+	// Remove first argument
+	var args = Array.prototype.slice.apply(arguments, [1]);
+	// Prepend timestamp
+	var dt = new Date();
+	var tag = dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds();
+	args[0] = tag + " - " + args[0];
+
+	try {
+		switch( mode ) {
+		case "info":
+			window.console.info.apply(window.console, args);
+			break;
+		case "warn":
+			window.console.warn.apply(window.console, args);
+			break;
+		default:
+			window.console.log.apply(window.console, args);
+			break;
+		}
+	} catch(e) {
+		if( !window.console ){
+			_canLog = false; // Permanently disable, when logging is not supported by the browser
+		}
+	}
+}
+
+function logMsg(msg) {
+	Array.prototype.unshift.apply(arguments, ["debug"]);
+	_log.apply(this, arguments);
+}
+
+
+// Forward declaration
+var getDynaTreePersistData = null;
+
+
+
+/*************************************************************************
+ *	Constants
+ */
+var DTNodeStatus_Error   = -1;
+var DTNodeStatus_Loading = 1;
+var DTNodeStatus_Ok      = 0;
+
+
+// Start of local namespace
+(function($) {
+
+/*************************************************************************
+ *	Common tool functions.
+ */
+
+var Class = {
+	create: function() {
+		return function() {
+			this.initialize.apply(this, arguments);
+		};
+	}
+};
+
+// Tool function to get dtnode from the event target:
+function getDtNodeFromElement(el) {
+	alert("getDtNodeFromElement is deprecated");
+	return $.ui.dynatree.getNode(el);
+/*
+	var iMax = 5;
+	while( el && iMax-- ) {
+		if(el.dtnode) { return el.dtnode; }
+		el = el.parentNode;
+	}
+	return null;
+*/
+}
+
+function noop() {
+}
+
+/*************************************************************************
+ *	Class DynaTreeNode
+ */
+var DynaTreeNode = Class.create();
+
+DynaTreeNode.prototype = {
+	initialize: function(parent, tree, data) {
+		/**
+		 * @constructor
+		 */
+		this.parent = parent;
+		this.tree = tree;
+		if ( typeof data === "string" ){
+			data = { title: data };
+		}
+		if( data.key === undefined ){
+			data.key = "_" + tree._nodeCount++;
+		}
+		this.data = $.extend({}, $.ui.dynatree.nodedatadefaults, data);
+		this.li = null; // not yet created
+		this.span = null; // not yet created
+		this.ul = null; // not yet created
+		this.childList = null; // no subnodes yet
+		this._isLoading = false; // Lazy content is being loaded
+		this.hasSubSel = false;
+		this.bExpanded = false;
+		this.bSelected = false;
+
+	},
+
+	toString: function() {
+		return "DynaTreeNode<" + this.data.key + ">: '" + this.data.title + "'";
+	},
+
+	toDict: function(recursive, callback) {
+		var dict = $.extend({}, this.data);
+		dict.activate = ( this.tree.activeNode === this );
+		dict.focus = ( this.tree.focusNode === this );
+		dict.expand = this.bExpanded;
+		dict.select = this.bSelected;
+		if( callback ){
+			callback(dict);
+		}
+		if( recursive && this.childList ) {
+			dict.children = [];
+			for(var i=0, l=this.childList.length; i<l; i++ ){
+				dict.children.push(this.childList[i].toDict(true, callback));
+			}
+		} else {
+			delete dict.children;
+		}
+		return dict;
+	},
+
+	fromDict: function(dict) {
+		/**
+		 * Update node data. If dict contains 'children', then also replace
+		 * the hole sub tree.
+		 */
+		var children = dict.children;
+		if(children === undefined){
+			this.data = $.extend(this.data, dict);
+			this.render();
+			return;
+		}
+		dict = $.extend({}, dict);
+		dict.children = undefined;
+		this.data = $.extend(this.data, dict);
+		this.removeChildren();
+		this.addChild(children);
+	},
+
+	_getInnerHtml: function() {
+		var tree = this.tree,
+			opts = tree.options,
+			cache = tree.cache,
+			level = this.getLevel(),
+			data = this.data,
+			res = "",
+			imageSrc;
+		// connector (expanded, expandable or simple)
+		if( level < opts.minExpandLevel ) {
+			if(level > 1){
+				res += cache.tagConnector;
+			}
+			// .. else (i.e. for root level) skip expander/connector altogether
+		} else if( this.hasChildren() !== false ) {
+			res += cache.tagExpander;
+		} else {
+			res += cache.tagConnector;
+		}
+		// Checkbox mode
+		if( opts.checkbox && data.hideCheckbox !== true && !data.isStatusNode ) {
+			res += cache.tagCheckbox;
+		}
+		// folder or doctype icon
+		if ( data.icon ) {
+			if (data.icon.charAt(0) === "/"){
+				imageSrc = data.icon;
+			}else{
+				imageSrc = opts.imagePath + data.icon;
+			}
+			res += "<img src='" + imageSrc + "' alt='' />";
+		} else if ( data.icon === false ) {
+			// icon == false means 'no icon'
+//			noop(); // keep JSLint happy
+		} else {
+			// icon == null means 'default icon'
+			res += cache.tagNodeIcon;
+		}
+		// node title
+		var nodeTitle = "";
+		if ( opts.onCustomRender ){
+			nodeTitle = opts.onCustomRender.call(tree, this) || "";
+		}
+		if(!nodeTitle){
+			var tooltip = data.tooltip ? ' title="' + data.tooltip.replace(/\"/g, '&quot;') + '"' : '',
+				href = data.href || "#";
+			if( opts.noLink || data.noLink ) {
+				nodeTitle = '<span style="display:inline-block;" class="' + opts.classNames.title + '"' + tooltip + '>' + data.title + '</span>';
+//				this.tree.logDebug("nodeTitle: " + nodeTitle);
+			} else {
+				nodeTitle = '<a href="' + href + '" class="' + opts.classNames.title + '"' + tooltip + '>' + data.title + '</a>';
+			}
+		}
+		res += nodeTitle;
+		return res;
+	},
+
+
+	_fixOrder: function() {
+		/**
+		 * Make sure, that <li> order matches childList order.
+		 */
+		var cl = this.childList;
+		if( !cl || !this.ul ){
+			return;
+		}
+		var childLI = this.ul.firstChild;
+		for(var i=0, l=cl.length-1; i<l; i++) {
+			var childNode1 = cl[i];
+			var childNode2 = childLI.dtnode;
+			if( childNode1 !== childNode2 ) {
+				this.tree.logDebug("_fixOrder: mismatch at index " + i + ": " + childNode1 + " != " + childNode2);
+				this.ul.insertBefore(childNode1.li, childNode2.li);
+			} else {
+				childLI = childLI.nextSibling;
+			}
+		}
+	},
+
+
+	render: function(useEffects, includeInvisible) {
+		/**
+		 * Create <li><span>..</span> .. </li> tags for this node.
+		 *
+		 * <li id='KEY' dtnode=NODE> // This div contains the node's span and list of child div's.
+		 *   <span class='title'>S S S A</span> // Span contains graphic spans and title <a> tag
+		 *   <ul> // only present, when node has children
+		 *       <li id='KEY' dtnode=NODE>child1</li>
+		 *       <li id='KEY' dtnode=NODE>child2</li>
+		 *   </ul>
+		 * </li>
+		 */
+//		this.tree.logDebug("%s.render(%s)", this, useEffects);
+		// ---
+		var tree = this.tree,
+			parent = this.parent,
+			data = this.data,
+			opts = tree.options,
+			cn = opts.classNames,
+			isLastSib = this.isLastSibling(),
+			firstTime = false;
+
+		if( !parent && !this.ul ) {
+			// Root node has only a <ul>
+			this.li = this.span = null;
+			this.ul = document.createElement("ul");
+			if( opts.minExpandLevel > 1 ){
+				this.ul.className = cn.container + " " + cn.noConnector;
+			}else{
+				this.ul.className = cn.container;
+			}
+		} else if( parent ) {
+			// Create <li><span /> </li>
+			if( ! this.li ) {
+				firstTime = true;
+				this.li = document.createElement("li");
+				this.li.dtnode = this;
+				if( data.key && opts.generateIds ){
+					this.li.id = opts.idPrefix + data.key;
+				}
+				this.span = document.createElement("span");
+				this.span.className = cn.title;
+				this.li.appendChild(this.span);
+
+				if( !parent.ul ) {
+					// This is the parent's first child: create UL tag
+					// (Hidden, because it will be
+					parent.ul = document.createElement("ul");
+					parent.ul.style.display = "none";
+					parent.li.appendChild(parent.ul);
+//					if( opts.minExpandLevel > this.getLevel() ){
+//						parent.ul.className = cn.noConnector;
+//					}
+				}
+				// set node connector images, links and text
+//				this.span.innerHTML = this._getInnerHtml();
+
+				parent.ul.appendChild(this.li);
+			}
+			// set node connector images, links and text
+			this.span.innerHTML = this._getInnerHtml();
+			// Set classes for current status
+			var cnList = [];
+			cnList.push(cn.node);
+			if( data.isFolder ){
+				cnList.push(cn.folder);
+			}
+			if( this.bExpanded ){
+				cnList.push(cn.expanded);
+			}
+			if( this.hasChildren() !== false ){
+				cnList.push(cn.hasChildren);
+			}
+			if( data.isLazy && this.childList === null ){
+				cnList.push(cn.lazy);
+			}
+			if( isLastSib ){
+				cnList.push(cn.lastsib);
+			}
+			if( this.bSelected ){
+				cnList.push(cn.selected);
+			}
+			if( this.hasSubSel ){
+				cnList.push(cn.partsel);
+			}
+			if( tree.activeNode === this ){
+				cnList.push(cn.active);
+			}
+			if( data.addClass ){
+				cnList.push(data.addClass);
+			}
+			// IE6 doesn't correctly evaluate multiple class names,
+			// so we create combined class names that can be used in the CSS
+			cnList.push(cn.combinedExpanderPrefix
+					+ (this.bExpanded ? "e" : "c")
+					+ (data.isLazy && this.childList === null ? "d" : "")
+					+ (isLastSib ? "l" : "")
+					);
+			cnList.push(cn.combinedIconPrefix
+					+ (this.bExpanded ? "e" : "c")
+					+ (data.isFolder ? "f" : "")
+					);
+			this.span.className = cnList.join(" ");
+
+			// TODO: we should not set this in the <span> tag also, if we set it here:
+			this.li.className = isLastSib ? cn.lastsib : "";
+
+			// Allow tweaking, binding, after node was created for the first time
+			if(firstTime && opts.onCreate){
+				opts.onCreate.call(tree, this, this.span);
+			}
+			// Hide children, if node is collapsed
+//			this.ul.style.display = ( this.bExpanded || !parent ) ? "" : "none";
+			// Allow tweaking after node state was rendered
+			if(opts.onRender){
+				opts.onRender.call(tree, this, this.span);
+			}
+		}
+		// Visit child nodes
+		if( (this.bExpanded || includeInvisible === true) && this.childList ) {
+			for(var i=0, l=this.childList.length; i<l; i++) {
+				this.childList[i].render(false, includeInvisible);
+			}
+			// Make sure the tag order matches the child array
+			this._fixOrder();
+		}
+		// Hide children, if node is collapsed
+		if( this.ul ) {
+			var isHidden = (this.ul.style.display === "none");
+			var isExpanded = !!this.bExpanded;
+//			logMsg("isHidden:%s", isHidden);
+			if( useEffects && opts.fx && (isHidden === isExpanded) ) {
+				var duration = opts.fx.duration || 200;
+				$(this.ul).animate(opts.fx, duration);
+			} else {
+				this.ul.style.display = ( this.bExpanded || !parent ) ? "" : "none";
+			}
+		}
+	},
+	/** Return '/id1/id2/id3'. */
+	getKeyPath: function(excludeSelf) {
+		var path = [];
+		this.visitParents(function(node){
+			if(node.parent){
+				path.unshift(node.data.key);
+			}
+		}, !excludeSelf);
+		return "/" + path.join(this.tree.options.keyPathSeparator);
+	},
+
+	getParent: function() {
+		return this.parent;
+	},
+
+	getChildren: function() {
+		if(this.hasChildren() === undefined){
+			return undefined; // Lazy node: unloaded, currently loading, or load error
+		}
+		return this.childList;
+	},
+
+	/** Check if node has children (returns undefined, if not sure). */
+	hasChildren: function() {
+		if(this.data.isLazy){
+			if(this.childList === null || this.childList === undefined){
+				// Not yet loaded
+				return undefined;
+			}else if(this.childList.length === 0){
+				// Loaded, but response was empty
+				return false;
+			}else if(this.childList.length === 1 && this.childList[0].isStatusNode()){
+				// Currently loading or load error
+				return undefined;
+			}
+			return true;
+		}
+		return !!this.childList;
+	},
+
+	isFirstSibling: function() {
+		var p = this.parent;
+		return !p || p.childList[0] === this;
+	},
+
+	isLastSibling: function() {
+		var p = this.parent;
+		return !p || p.childList[p.childList.length-1] === this;
+	},
+
+	isLoading: function() {
+		return !!this._isLoading;
+	},
+
+	getPrevSibling: function() {
+		if( !this.parent ){
+			return null;
+		}
+		var ac = this.parent.childList;
+		for(var i=1, l=ac.length; i<l; i++){ // start with 1, so prev(first) = null
+			if( ac[i] === this ){
+				return ac[i-1];
+			}
+		}
+		return null;
+	},
+
+	getNextSibling: function() {
+		if( !this.parent ){
+			return null;
+		}
+		var ac = this.parent.childList;
+		for(var i=0, l=ac.length-1; i<l; i++){ // up to length-2, so next(last) = null
+			if( ac[i] === this ){
+				return ac[i+1];
+			}
+		}
+		return null;
+	},
+
+	isStatusNode: function() {
+		return (this.data.isStatusNode === true);
+	},
+
+	isChildOf: function(otherNode) {
+		return (this.parent && this.parent === otherNode);
+	},
+
+	isDescendantOf: function(otherNode) {
+		if(!otherNode){
+			return false;
+		}
+		var p = this.parent;
+		while( p ) {
+			if( p === otherNode ){
+				return true;
+			}
+			p = p.parent;
+		}
+		return false;
+	},
+
+	countChildren: function() {
+		var cl = this.childList;
+		if( !cl ){
+			return 0;
+		}
+		var n = cl.length;
+		for(var i=0, l=n; i<l; i++){
+			var child = cl[i];
+			n += child.countChildren();
+		}
+		return n;
+	},
+
+	/**Sort child list by title.
+	 * cmd: optional compare function.
+	 * deep: optional: pass true to sort all descendant nodes.
+	 */
+	sortChildren: function(cmp, deep) {
+		var cl = this.childList;
+		if( !cl ){
+			return;
+		}
+		cmp = cmp || function(a, b) {
+//			return a.data.title === b.data.title ? 0 : a.data.title > b.data.title ? 1 : -1;
+			var x = a.data.title.toLowerCase(),
+				y = b.data.title.toLowerCase();
+			return x === y ? 0 : x > y ? 1 : -1;
+			};
+		cl.sort(cmp);
+		if( deep ){
+			for(var i=0, l=cl.length; i<l; i++){
+				if( cl[i].childList ){
+					cl[i].sortChildren(cmp, "$norender$");
+				}
+			}
+		}
+		if( deep !== "$norender$" ){