Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
id and filename has to match!
  • Loading branch information
amejiarosario committed Jun 22, 2019
commit a5a0d40ed257f9dc8ae5e1c349218fe192aead3b
4 changes: 1 addition & 3 deletions book-pro/progit.asc → book-pro/book.asc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ ifdef::ebook-format[:leveloffset: -1]

include::ch02-git-basics-chapter.asc[]

// include::part01-algorithms-analysis.asc[]

include::ch01-getting-started.asc[]
include::part01-algorithms-analysis.asc[]


include::[]
Expand Down
33 changes: 0 additions & 33 deletions book-pro/ch01-getting-started.asc

This file was deleted.

18 changes: 6 additions & 12 deletions book-pro/ch02-git-basics-chapter.asc
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,24 @@ This chapter covers every basic command you need to do the vast majority of the
By the end of the chapter, you should be able to configure and initialize a repository, begin and stop tracking files, and stage and commit changes.
We'll also show you how to set up Git to ignore certain files and file patterns, how to undo mistakes quickly and easily, how to browse the history of your project and view changes between commits, and how to push and pull from remote repositories.



[[links]]
=== Links

.Links to things
- Chapter: <<ch01-getting-started#ch01-getting-started>>
- Section: <<ch01-getting-started#_first_time>>
- Section2: <<ch01-getting-started#another-level>>
- Section3: <<ch01-getting-started#links2>>

.Links to DSA
- Chapter: <<part01#>>
- Section: <<part01#constant-example>>
- Chapter: <<part01-algorithms-analysis#part01-algorithms-analysis>>
- Section: <<part01-algorithms-analysis#constant-example>>

In <<ch01-getting-started#_first_time>> we used it to specify our name, email address and editor preference before we even got started using Git.
// In <<ch01-getting-started#_first_time>> we used it to specify our name, email address and editor preference before we even got started using Git.

[source,console]
----
$ git commit
----

Doing so launches your editor of choice.
(This is set by your shell's `EDITOR` environment variable -- usually vim or emacs, although you can configure it with whatever you want using the `git config --global core.editor` command as you saw in <<ch01-getting-started#ch01-getting-started>>).(((editor, changing default)))(((git commands, config)))
(This is set by your shell's `EDITOR` environment variable -- usually vim or emacs, although you can configure it with whatever you want using the `git config --global core.editor` command as you saw in

// <<ch01-getting-started#ch01-getting-started>>).(((editor, changing default)))(((git commands, config)))



Expand Down
15 changes: 9 additions & 6 deletions book-pro/Rakefile → book-pro/config/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ namespace :book do
# puts "Generating contributors list"
# `git shortlog -s | grep -v -E "(Straub|Chacon)" | cut -f 2- | column -c 120 > book/contributors.txt`

params = "-D dist -a revnumber='#{version_string}' -a revdate='#{date_string}'"
input = '../book.asc'
outputFolder = '../dist'
params = "-D #{outputFolder} -a revnumber='#{version_string}' -a revdate='#{date_string}'"

# require = '--trace --require=asciidoctor-diagram'
# require = '--trace -r asciidoctor-diagram'
Expand All @@ -23,27 +25,28 @@ namespace :book do
require_pdf = '-r ./config/extensions/asciidoctor-pdf-extensions.rb'
require_pdf = ''


puts "\r\n>> Converting to HTML..."
cmd = "asciidoctor #{require} #{params} progit.asc 2>&1"
cmd = "asciidoctor #{require} #{params} #{input} 2>&1"
puts cmd
puts `#{cmd}`
puts "\t-- HTML output at progit.html"

puts "\r\nConverting to PDF... (this one takes a while)"
cmd = "bundle exec asciidoctor-pdf #{require} #{require_pdf} #{params} progit.asc 2>&1"
cmd = "bundle exec asciidoctor-pdf #{require} #{require_pdf} #{params} #{input} 2>&1"
puts cmd
puts `#{cmd}`
puts " -- PDF output at progit.pdf"

puts "\r\n>> Converting to EPub..."
# cmd = "bundle exec asciidoctor-epub3 #{require} -a ebook-validate #{params} progit.asc 2>&1"
cmd = "bundle exec asciidoctor-epub3 -a ebook-validate #{require} #{params} progit.asc 2>&1"
# cmd = "bundle exec asciidoctor-epub3 #{require} -a ebook-validate #{params} #{input} 2>&1"
cmd = "bundle exec asciidoctor-epub3 -a ebook-validate #{require} #{params} #{input} 2>&1"
puts cmd
puts `#{cmd}`
puts "\t-- Epub output at progit.epub"

# puts "\r\nConverting to Mobi (kf8)..."
# puts `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc 2>&1`
# puts `bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 #{input} 2>&1`
# puts " -- Mobi output at progit.mobi"

end
Expand Down
4 changes: 2 additions & 2 deletions book-pro/content/part01/big-o-examples.asc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ We a going to provide examples for each one of them.

Before we dive in, here’s a plot with all of them.

.CPU operations vs. Algorithm runtime as the input size grows
image:images/image5.png[CPU time needed vs. Algorithm runtime as the input size increases]
// .CPU operations vs. Algorithm runtime as the input size grows
// image:images/image5.png[CPU time needed vs. Algorithm runtime as the input size increases]

The above chart shows how the running time of an algorithm is related to the amount of work the CPU has to perform. As you can see O(1) and O(log n) are very scalable. However, O(n^2^) and worst can make your computer run for years [big]#😵# on large datasets. We are going to give some examples so you can identify each one.

Expand Down
2 changes: 1 addition & 1 deletion book-pro/part01-algorithms-analysis.asc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[part01]]
[[part01-algorithms-analysis]]
== Algorithms Analysis

In this part, we are going to cover the basics of algorithms analysis. Also, we will discuss the most common runtimes of algorithms and provide a code example for each one.
Expand Down