Skip to content

Commit

Permalink
materialy z prvej prednasky
Browse files Browse the repository at this point in the history
  • Loading branch information
ainthek committed Sep 23, 2019
1 parent 82fe888 commit d504f0d
Show file tree
Hide file tree
Showing 12 changed files with 204 additions and 0 deletions.
97 changes: 97 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
node_modules



!.gitignore

# General Backup Files
*.BAK
*.bak

# General Log files
*.log

# OSX and Windows Thumbnail Databases
[Tt]humbs.db
.DS_Store

# Temp Files
*-MarkdownPadPreview.html
_grasp.tmp

# Office Temp Files
~$*

# MS Office Temp files (exceptional cases)
~*.tmp

# OSX Numbers/Libre office Temp Files
.~lock*

# vim Temp Files
*~

# Eclipse (STS)
.metadata
RemoteSystemsTempFiles
Servers
.recommenders

# Sass - no longer used, remove?
.sass-cache/
*.scssc


# Source Control Files (usefull after migration, or coexistence)
*/.git/*
*.scc
.svn
.repository
*.vspscc
*.vssscc


# Java
*.class
*/bin/*

# Maven
target


# Dojo build
*.uncompressed.js
ScreenBuild*.js
commonBuild*.js
*.map
*.min.css



# Compilers and Tools
.sonar
*.Z
*.elc
*.ln
*.o
*.obj
*.olb
*.old
*.orig
*.pyc
*.pyo
*.rej

# KDE Dolphin file manager
.directory

# vim
*.swp

#Unknown
#*rebel.xml
#*$
#,*
#.#*


Binary file added 01-cvicenie/01-cvicenie.pptx
Binary file not shown.
70 changes: 70 additions & 0 deletions 01-cvicenie/zadanie-vzorove-riesenie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Zaujímavé JavaScript aplikácie 

- ardrone-webflight - Pilot the AR.Drone 2.0 directly from your browser
- cheerio-cli - CLI to parse HTML using jQuery
- metalsmith - build a website or blog with a static site generator

## ardrone-webflight

### Ukážka aplikácie

- <http://eschnou.github.io/ardrone-webflight/>
- <https://www.youtube.com/watch?reload=9&v=CF4SlwLkIaU>

### Charakteristika

Server napísaný v node.js a k nemu UI v browsri.
Server používa framework express a EJS, UI využíva jQuery a bootstrap.
Komunikácie UI a Web Server je cez WebSockets.
Komunikácia z dronom je realiozovaná ....

## cheerio-cli

<https://www.npmjs.com/package/cheerio-cli>

CLI použiteľné na automatizované spracovanie (parsovanie) HTML dokumentov,
Web Scraping a iné.

### Ukážka aplikácie

Príklad: Download všetkých obrázkov z danej stránky na disk.
Kombinovateľnosť z bash príkazmi.
Vyhnutie sa manuálnemu parsovaniu HTML (grepovaniu).

curl -s https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/Object-oriented_JS |\
cheerio "img" -a src |\
xargs -I{} curl {} -O -J

Príklad: kedy bola releasnutá prvá verzia mongodb 3.2 ?

curl http://dl.mongodb.org/dl/osx/x86_64 |\
cheerio "TR>TD:first-child>a , TR>TD:nth-child(2)" |\
grep -A 1 "[-]3[.]2[.]" | tail -n1

Príklad: extrakcia obsahu z PDF dokumentu

brew install pdf2htmlEX

pdf2htmlEX ~/Downloads/Node.js-Design-Patterns-Second-Edition.pdf
< Node.js-Design-Patterns-Second-Edition.html cheerio 'DIV#sidebar' |\
pandoc -f HTML --filter delink -t markdown

Samozrejme by sa to dalo celé napísať v JS,
ale to by už bolo "programovanie".

### Charakteristika

CLI aplikácia v node.js, nadstavba nad cheerio, čo je zase nadstavba nad jQuery.
Parsovanie príklazového riadku pomocou modulu commander,
čítanie z stdin pomocou node API process.stdin (on data, on end eventy).

### metalsmith









37 changes: 37 additions & 0 deletions 01-cvicenie/zadanie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## 01 - vypracujte review 3 zaujímavých JavaScript projektov
Review musí obsahovať:

- ukážku aplikácie (video, obrázok)
- popis využitia/prínosu aplikácie
- Kategorizáciu architektúry (CLI, Browser aplikácie, Full Stack aplikácia)
- Hlavné technológie a ich použitie v JS

- možné členenie zadania:
- podľa architektúry:

- niektorá študenti hľadajú demo meteor aplikácie
- iný budú hľadať NW.js
- iný zase zaujímave web socket aplikácie

- Podľa tém:

- spracovanie videa
- spracovanie fotografií
- spracovanie zvuku
- jazykové preklady
- editory
- ...

Na cvičení študenti hľadajú na webe zaujímavé aplikácie,
konzultujú s cvičiacim a dohodnú si 3 ktoré rozpracujú, už na
cvičení prípadne do ďalšieho cvičenia.

Očakávaný výsledok:

- 1-2 A4 max.
- formát *.md, *.pptx, *.docx, ...

Príklady:

- https://blog.sourcerer.io/creating-a-markdown-editor-previewer-in-electron-and-vue-js-32a084e7b8fe
- https://www.npmjs.com/package/ardrone-webflight
Binary file not shown.
Binary file added 01-prednaska/01.02-node-js.pptx
Binary file not shown.
Binary file added 01-prednaska/01.02.01.node-core-modules.pptx
Binary file not shown.
Binary file added 01-prednaska/01.02.01.node-core-modules.xlsx
Binary file not shown.
Binary file added 01-prednaska/01.03-npm.pptx
Binary file not shown.
Binary file added 01-prednaska/Inspirations.pptx
Binary file not shown.
Binary file added 01-prednaska/Literatura.pptx
Binary file not shown.
Binary file added 01-prednaska/js-history.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d504f0d

Please sign in to comment.