text:
=========================================================================================================

> A curated list of awesome lists

-   [What is an awesome list?](awesome.md)
-   [Contribution guide](contributing.md)
-   [Creating a list](create-list.md)
    Please\\ take\\ the\\ time\\ to\\ read\\ this\\ and\\ do\\ an\\ actual\\ effort\\ with\\ your\\ list.\\ All\\ the\\ low-quality\\ submissions\\ are\\ burning\\ me\\ out...
-   [Buy a sticker](https://www.stickermule.com/marketplace/10034-awesome)

[![Awesome chat](https://badges.gitter.im/sindresorhus/awesome.svg)](https://gitter.im/sindresorhus/awesome)

-

Check out my [blog](https://blog.sindresorhus.com) and follow me on [Twitter](https://twitter.com/sindresorhus) .

Table of Contents
-----------------

-   [Platforms](#platforms)
-   [Programming Languages](#programming-languages)
-   [Front-end Development](#front-end-development)
-   [Back-end Development](#back-end-development)
-   [Computer Science](#computer-science)
-   [Big Data](#big-data)
-   [Theory](#theory)
-   [Books](#books)
-   [Editors](#editors)
-   [Gaming](#gaming)
-   [Development Environment](#development-environment)
-   [Entertainment](#entertainment)
-   [Databases](#databases)
-   [Media](#media)
-   [Learn](#learn)
-   [Security](#security)
-   [Content Management System](#content-management-system)
-   [Miscellaneous](#miscellaneous)

Platforms
---------

-   [Node.js](https://github.com/sindresorhus/awesome-nodejs)  ★ 11350, pushed 0 days ago
-   [Frontend Development](https://github.com/dypsilon/frontend-dev-bookmarks)  ★ 18691, pushed 27 days ago
-   [iOS](https://github.com/vsouza/awesome-ios)  ★ 11186, pushed 2 days ago
-   [Android](https://github.com/JStumpp/awesome-android)  ★ 2335, pushed 8 days ago
-   [IoT & Hybrid Apps](https://github.com/weblancaster/awesome-IoT-hybrid)  ★ 186, pushed 88 days ago
-   [Electron](https://github.com/sindresorhus/awesome-electron)  ★ 5765, pushed 0 days ago
-   [Cordova](https://github.com/busterc/awesome-cordova)  ★ 103, pushed 114 days ago
-   [React Native](https://github.com/jondot/awesome-react-native)  ★ 4345, pushed 0 days ago
-   [Xamarin](https://github.com/benoitjadinon/awesome-xamarin)  ★ 100, pushed 8 days ago
-   [Linux](https://github.com/aleksandar-todorovic/awesome-linux)  ★ 331, pushed 0 days ago
    -   [Containers](https://github.com/Friz-zy/awesome-linux-containers)  ★ 85, pushed 45 days ago
-   [OS X](https://github.com/iCHAIT/awesome-osx)  ★ 3923, pushed 1 days ago
    -   [Command-Line](https://github.com/herrbischoff/awesome-osx-command-line)  ★ 7524, pushed 0 days ago
    -   [Screensavers](https://github.com/aharris88/awesome-osx-screensavers)  ★ 192, pushed 23 days ago
-   [watchOS](https://github.com/yenchenlin1994/awesome-watchos)  ★ 162, pushed 75 days ago
-   [JVM](https://github.com/deephacks/awesome-jvm)  ★ 122, pushed 2 days ago
-   [Salesforce](https://github.com/mailtoharshit/awesome-salesforce)  ★ 56, pushed 13 days ago
-   [Amazon Web Services](https://github.com/donnemartin/awesome-aws)  ★ 1859, pushed 3 days ago
-   [Windows](https://github.com/RiseLedger/awesome-windows)  ★ 63, pushed 52 days ago
-   [IPFS](https://github.com/ipfs/awesome-ipfs)  ★ 177, pushed 9 days ago
-   [Fuse](https://github.com/vinkla/awesome-fuse)  ★ 112, pushed 18 days ago
-   [Heroku](https://github.com/ianstormtaylor/awesome-heroku)  ★ 14, pushed 27 days ago

Programming Languages
---------------------

-   [JavaScript](https://github.com/sorrycc/awesome-javascript)  ★ 5883, pushed 2 days ago
    -   [Promises](https://github.com/wbinnssmith/awesome-promises)  ★ 573, pushed 8 days ago
    -   [Standard Style](https://github.com/feross/awesome-standard)  ★ 119, pushed 17 days ago
    -   [Must Watch Talks](https://github.com/bolshchikov/js-must-watch)  ★ 10625, pushed 2 days ago
    -   [Tips](https://github.com/loverajoel/jstips)  ★ 9517, pushed 5 days ago
    -   [Network Layer](https://github.com/Kikobeats/awesome-network-js)  ★ 218, pushed 43 days ago
    -   [Micro npm Packages](https://github.com/parro-it/awesome-micro-npm-packages)  ★ 234, pushed 0 days ago
    -   [Mad Science npm Packages](https://github.com/feross/awesome-mad-science)  ★ 452, pushed 67 days ago
    -   [Maintenance Modules](https://github.com/maxogden/maintenance-modules)  ★ 230, pushed 102 days ago  - For npm packages
    -   [npm](https://github.com/sindresorhus/awesome-npm)  ★ 1711, pushed 0 days ago
    -   [AVA](https://github.com/sindresorhus/awesome-ava)  ★ 100, pushed 0 days ago  - Test runner
    -   [ESLint](https://github.com/dustinspecker/awesome-eslint)  ★ 213, pushed 3 days ago
-   [Swift](https://github.com/matteocrippa/awesome-swift)  ★ 7964, pushed 0 days ago
    -   [Education](https://github.com/hsavit1/Awesome-Swift-Education)  ★ 4478, pushed 21 days ago
    -   [Playgrounds](https://github.com/uraimo/Awesome-Swift-Playgrounds)  ★ 407, pushed 9 days ago
-   [Python](https://github.com/vinta/awesome-python)  ★ 20415, pushed 2 days ago
-   [Rust](https://github.com/kud1ing/awesome-rust)  ★ 2099, pushed 4 days ago
-   [Haskell](https://github.com/krispo/awesome-haskell)  ★ 733, pushed 23 days ago
-   [PureScript](https://github.com/passy/awesome-purescript)  ★ 62, pushed 70 days ago
-   [Go](https://github.com/avelino/awesome-go)  ★ 12506, pushed 0 days ago
-   [Scala](https://github.com/lauris/awesome-scala)  ★ 3381, pushed 4 days ago
-   [Ruby](https://github.com/markets/awesome-ruby)  ★ 5650, pushed 0 days ago
    -   [Events](https://github.com/planetruby/awesome-events)  ★ 167, pushed 17 days ago
-   [Clojure](https://github.com/razum2um/awesome-clojure)  ★ 686, pushed 11 days ago
-   [ClojureScript](https://github.com/emrehan/awesome-clojurescript)  ★ 251, pushed 41 days ago
-   [Elixir](https://github.com/h4cc/awesome-elixir)  ★ 3654, pushed 0 days ago
-   [Elm](https://github.com/isRuslan/awesome-elm)  ★ 595, pushed 4 days ago
-   [Erlang](https://github.com/drobakowski/awesome-erlang)  ★ 425, pushed 21 days ago
-   [Julia](https://github.com/svaksha/Julia.jl)  ★ 328, pushed 0 days ago
-   [Lua](https://github.com/LewisJEllis/awesome-lua)  ★ 821, pushed 64 days ago
-   [C](https://github.com/aleksandar-todorovic/awesome-c)  ★ 214, pushed 0 days ago
-   [C/C++](https://github.com/fffaraz/awesome-cpp)  ★ 4938, pushed 0 days ago
-   [R](https://github.com/qinwf/awesome-R)  ★ 1316, pushed 3 days ago
-   [D](https://github.com/zhaopuming/awesome-d)  ★ 124, pushed 20 days ago
-   [Common Lisp](https://github.com/CodyReichert/awesome-cl)  ★ 276, pushed 2 days ago
-   [Perl](https://github.com/hachiojipm/awesome-perl)  ★ 267, pushed 87 days ago
-   [Groovy](https://github.com/kdabir/awesome-groovy)  ★ 261, pushed 7 days ago
-   [Dart](https://github.com/yissachar/awesome-dart)  ★ 136, pushed 125 days ago
-   [Java](https://github.com/akullpp/awesome-java)  ★ 6783, pushed 0 days ago
    -   [RxJava](https://github.com/eleventigers/awesome-rxjava)  ★ 27, pushed 7 days ago
-   [Kotlin](https://github.com/JavaBy/awesome-kotlin)
-   [OCaml](https://github.com/rizo/awesome-ocaml)  ★ 601, pushed 6 days ago
-   [Coldfusion](https://github.com/seancoyne/awesome-coldfusion)  ★ 29, pushed 104 days ago
-   [Fortran](https://github.com/rabbiabram/awesome-fortran)  ★ 65, pushed 109 days ago
-   [.NET](https://github.com/quozd/awesome-dotnet)  ★ 1722, pushed 0 days ago
-   [PHP](https://github.com/ziadoz/awesome-php)  ★ 11657, pushed 0 days ago
-   [Delphi](https://github.com/Fr0sT-Brutal/awesome-delphi)  ★ 128, pushed 6 days ago
-   [Assembler](https://github.com/mat0thew/awesome-asm)
-   [AutoHotkey](https://github.com/ahkscript/awesome-AutoHotkey)  ★ 234, pushed 11 days ago
-   [AutoIt](https://github.com/J2TeaM/awesome-AutoIt)  ★ 34, pushed 60 days ago
-   [Crystal](https://github.com/veelenga/awesome-crystal)  ★ 301, pushed 9 days ago
-   [TypeScript](https://github.com/dzharii/awesome-typescript)  ★ 105, pushed 1 days ago

Front-end Development
---------------------

-   [ES6 Tools](https://github.com/addyosmani/es6-tools)  ★ 3010, pushed 65 days ago
-   [Web Performance Optimization](https://github.com/davidsonfellipe/awesome-wpo)  ★ 5366, pushed 13 days ago
-   [Web Tools](https://github.com/lvwzhen/tools)  ★ 188, pushed 63 days ago
-   [CSS](https://github.com/sotayamashita/awesome-css)  ★ 411, pushed 7 days ago
    -   [Critical-Path Tools](https://github.com/addyosmani/critical-path-css-tools)  ★ 572, pushed 65 days ago
    -   [Scalability](https://github.com/davidtheclark/scalable-css-reading-list)  ★ 1023, pushed 11 days ago
    -   [Must-Watch Talks](https://github.com/AllThingsSmitty/must-watch-css)  ★ 1997, pushed 62 days ago
    -   [Protips](https://github.com/AllThingsSmitty/css-protips)  ★ 6717, pushed 0 days ago
-   [React](https://github.com/enaqx/awesome-react)  ★ 13207, pushed 0 days ago
    -   [Relay](https://github.com/expede/awesome-relay)  ★ 60, pushed 47 days ago
-   [Web Components](https://github.com/mateusortiz/webcomponents-the-right-way)  ★ 797, pushed 170 days ago
-   [Polymer](https://github.com/Granze/awesome-polymer)  ★ 207, pushed 11 days ago
-   [Angular 2](https://github.com/AngularClass/awesome-angular2)  ★ 1449, pushed 3 days ago
-   [Angular](https://github.com/gianarb/awesome-angularjs)  ★ 1491, pushed 6 days ago
-   [Backbone](https://github.com/sadcitizen/awesome-backbone)  ★ 319, pushed 36 days ago
-   [HTML5](https://github.com/diegocard/awesome-html5)  ★ 472, pushed 74 days ago
-   [SVG](https://github.com/willianjusten/awesome-svg)  ★ 2862, pushed 5 days ago
-   [Canvas](https://github.com/raphamorim/awesome-canvas)  ★ 97, pushed 73 days ago
-   [KnockoutJS](https://github.com/dnbard/awesome-knockout)  ★ 36, pushed 0 days ago
-   [Dojo Toolkit](https://github.com/peterkokot/awesome-dojo)  ★ 46, pushed 136 days ago
-   [Inspiration](https://github.com/NoahBuscher/Inspire)  ★ 372, pushed 144 days ago
-   [Ember](https://github.com/nmec/awesome-ember)  ★ 125, pushed 16 days ago
-   [Android UI](https://github.com/wasabeef/awesome-android-ui)  ★ 13914, pushed 4 days ago
-   [iOS UI](https://github.com/cjwirth/awesome-ios-ui)  ★ 7880, pushed 4 days ago
-   [Meteor](https://github.com/Urigo/awesome-meteor)  ★ 547, pushed 28 days ago
-   [BEM](https://github.com/sturobson/BEM-resources)  ★ 147, pushed 30 days ago
-   [Flexbox](https://github.com/afonsopacifer/awesome-flexbox)  ★ 340, pushed 18 days ago
-   [Web Typography](https://github.com/deanhume/typography)  ★ 144, pushed 12 days ago
-   [Web Accessibility](https://github.com/brunopulis/awesome-a11y)  ★ 126, pushed 21 days ago
-   [Material Design](https://github.com/sachin1092/awesome-material)  ★ 337, pushed 102 days ago
-   [D3](https://github.com/wbkd/awesome-d3)  ★ 2787, pushed 6 days ago
-   [Emails](https://github.com/jonathandion/awesome-emails)  ★ 78, pushed 10 days ago
-   [jQuery](https://github.com/peterkokot/awesome-jquery)  ★ 188, pushed 6 days ago
    -   [Tips](https://github.com/AllThingsSmitty/jquery-tips-everyone-should-know)  ★ 3682, pushed 1 days ago
-   [Web Audio](https://github.com/notthetup/awesome-webaudio)  ★ 149, pushed 22 days ago
-   [Offline-First](https://github.com/pazguille/offline-first)  ★ 1414, pushed 0 days ago
-   [Static Website Services](https://github.com/aharris88/awesome-static-website-services)  ★ 178, pushed 7 days ago
-   [A-Frame VR](https://github.com/aframevr/awesome-aframe)  ★ 228, pushed 2 days ago  - Virtual reality
-   [Cycle.js](https://github.com/vic/awesome-cyclejs)  ★ 316, pushed 4 days ago
-   [Text Editing](https://github.com/dok/awesome-text-editing)  ★ 8, pushed 54 days ago
-   [Motion UI Design](https://github.com/fliptheweb/motion-ui-design)  ★ 244, pushed 32 days ago
-   [Vue.js](https://github.com/vuejs/awesome-vue)  ★ 2425, pushed 2 days ago
-   [Marionette.js](https://github.com/sadcitizen/awesome-marionette)  ★ 104, pushed 24 days ago
-   [Aurelia](https://github.com/behzad888/awesome-aurelia)  ★ 20, pushed 4 days ago
-   [Charting](https://github.com/zingchart/awesome-charting)  ★ 559, pushed 7 days ago
-   [Ionic Framework 2](https://github.com/candelibas/awesome-ionic2)  ★ 50, pushed 2 days ago
-   [Chrome DevTools](https://github.com/ChromeDevTools/awesome-chrome-devtools)  ★ 1354, pushed 13 days ago

Back-end Development
--------------------

-   [Django](https://github.com/rosarior/awesome-django)  ★ 3650, pushed 24 days ago
-   [Flask](https://github.com/humiaozuzu/awesome-flask)  ★ 2366, pushed 11 days ago
-   [Docker](https://github.com/veggiemonk/awesome-docker)  ★ 3119, pushed 0 days ago
-   [Vagrant](https://github.com/iJackUA/awesome-vagrant)  ★ 177, pushed 67 days ago
-   [Pyramid](https://github.com/uralbash/awesome-pyramid)  ★ 248, pushed 46 days ago
-   [Play1 Framework](https://github.com/PerfectCarl/awesome-play1)  ★ 23, pushed 112 days ago
-   [CakePHP](https://github.com/friendsofcake/awesome-cakephp)  ★ 393, pushed 4 days ago
-   [Symfony](https://github.com/sitepoint/awesome-symfony)  ★ 698, pushed 2 days ago
    -   [Education](https://github.com/Symfonisti/awesome-symfony-education)  ★ 131, pushed 49 days ago
-   [Laravel](https://github.com/chiraggude/awesome-laravel)  ★ 2728, pushed 0 days ago
    -   [Education](https://github.com/fukuball/Awesome-Laravel-Education/blob/master/langs/en_US.md)
-   [Rails](https://github.com/ekremkaraca/awesome-rails)  ★ 830, pushed 46 days ago
    -   [Gems](https://github.com/hothero/awesome-rails-gem)  ★ 1621, pushed 32 days ago
-   [Phalcon](https://github.com/sergeyklay/awesome-phalcon)  ★ 181, pushed 12 days ago
-   [Useful `     .htaccess    ` Snippets](https://github.com/phanan/htaccess)  ★ 9218, pushed 26 days ago
-   [nginx](https://github.com/fcambus/nginx-resources)  ★ 1628, pushed 64 days ago
-   [Dropwizard](https://github.com/stve/awesome-dropwizard)  ★ 13, pushed 6 days ago
-   [Kubernetes](https://github.com/ramitsurana/awesome-kubernetes)  ★ 152, pushed 25 days ago
-   [Lumen](https://github.com/unicodeveloper/awesome-lumen)  ★ 62, pushed 36 days ago

Computer Science
----------------

-   [University Courses](https://github.com/prakhar1989/awesome-courses)  ★ 14960, pushed 12 days ago
-   [Data Science](https://github.com/okulbilisim/awesome-datascience)  ★ 2359, pushed 6 days ago
-   [Machine Learning](https://github.com/josephmisiti/awesome-machine-learning)  ★ 12660, pushed 2 days ago
    -   [Tutorials](https://github.com/ujjwalkarn/Machine-Learning-Tutorials)  ★ 2205, pushed 78 days ago
-   [Speech and Natural Language Processing](https://github.com/edobashira/speech-language-processing)  ★ 1194, pushed 104 days ago
    -   [Spanish](https://github.com/dav009/awesome-spanish-nlp)  ★ 46, pushed 143 days ago
-   [Linguistics](https://github.com/theimpossibleastronaut/awesome-linguistics)  ★ 40, pushed 269 days ago
-   [Cryptography](https://github.com/MaciejCzyzewski/retter)  ★ 1544, pushed 190 days ago
-   [Computer Vision](https://github.com/jbhuang0604/awesome-computer-vision)  ★ 1256, pushed 45 days ago
-   [Deep Learning](https://github.com/ChristosChristofidis/awesome-deep-learning)  ★ 1924, pushed 6 days ago  - Neural networks
    -   [TensorFlow](https://github.com/jtoy/awesome-tensorflow)  ★ 28, pushed 6 days ago
-   [Deep Vision](https://github.com/kjw0612/awesome-deep-vision)  ★ 1269, pushed 7 days ago
-   [Open Source Society University](https://github.com/open-source-society/computer-science)  ★ 13734, pushed 7 days ago
-   [Functional Programming](https://github.com/lucasviola/awesome-functional-programming)  ★ 115, pushed 62 days ago
-   [Static Analysis & Code Quality](https://github.com/mre/awesome-static-analysis)  ★ 76, pushed 4 days ago
-   [Software-Defined Networking](https://github.com/sdnds-tw/awesome-sdn)  ★ 20, pushed 46 days ago

Big Data
--------

-   [Big Data](https://github.com/onurakpolat/awesome-bigdata)  ★ 3107, pushed 11 days ago
-   [Public Datasets](https://github.com/caesar0301/awesome-public-datasets)  ★ 13892, pushed 5 days ago
-   [Hadoop](https://github.com/youngwookim/awesome-hadoop)  ★ 324, pushed 2 days ago
-   [Data Engineering](https://github.com/igorbarinov/awesome-data-engineering)  ★ 467, pushed 22 days ago
-   [Streaming](https://github.com/manuzhang/awesome-streaming)  ★ 45, pushed 7 days ago

Theory
------

-   [Papers We Love](https://github.com/papers-we-love/papers-we-love)  ★ 16165, pushed 10 days ago
-   [Talks](https://github.com/JanVanRyswyck/awesome-talks)  ★ 1167, pushed 21 days ago
-   [Algorithms](https://github.com/tayllan/awesome-algorithms)  ★ 1432, pushed 12 days ago
-   [Algorithm Visualizations](https://github.com/enjalot/algovis)  ★ 502, pushed 92 days ago
-   [Artificial Intelligence](https://github.com/owainlewis/awesome-artificial-intelligence)  ★ 1518, pushed 25 days ago
-   [Search Engine Optimization](https://github.com/marcobiedermann/search-engine-optimization)  ★ 222, pushed 64 days ago
-   [Competitive Programming](https://github.com/lnishan/awesome-competitive-programming)  ★ 139, pushed 26 days ago
-   [Math](https://github.com/rossant/awesome-math)  ★ 152, pushed 6 days ago

Books
-----

-   [Free Programming Books](https://github.com/vhf/free-programming-books)  ★ 54415, pushed 2 days ago
-   [Free Software Testing Books](https://github.com/ligurio/free-software-testing-books/blob/master/free-software-testing-books.md)
-   [Go Books](https://github.com/dariubs/GoBooks)  ★ 2109, pushed 38 days ago
-   [R Books](https://github.com/RomanTsegelskyi/rbooks)  ★ 29, pushed 3 days ago
-   [Mind Expanding Books](https://github.com/hackerkid/Mind-Expanding-Books)  ★ 345, pushed 16 days ago
-   [Book Authoring](https://github.com/TalAter/awesome-book-authoring)  ★ 2, pushed 0 days ago

Editors
-------

-   [Sublime Text](https://github.com/dreikanter/sublime-bookmarks)  ★ 380, pushed 80 days ago
-   [Vim](https://github.com/mhinz/vim-galore)  ★ 4635, pushed 8 days ago
-   [Emacs](https://github.com/emacs-tw/awesome-emacs)
-   [Atom](https://github.com/mehcode/awesome-atom)  ★ 326, pushed 3 days ago
-   [Visual Studio Code](https://github.com/viatsko/awesome-vscode)  ★ 114, pushed 9 days ago

Gaming
------

-   [Game Development](https://github.com/ellisonleao/magictools)  ★ 2890, pushed 37 days ago
-   [Game Talks](https://github.com/hzoo/awesome-gametalks)  ★ 274, pushed 33 days ago
-   [Godot](https://github.com/Calinou/awesome-godot)  ★ 131, pushed 21 days ago  - Game engine
-   [Open Source Games](https://github.com/leereilly/games)  ★ 2591, pushed 17 days ago
-   [Unity](https://github.com/RyanNielson/awesome-unity)  ★ 540, pushed 3 days ago  - Game engine
-   [Chess](https://github.com/hkirat/awesome-chess)  ★ 19, pushed 10 days ago
-   [LÖVE](https://github.com/JanWerder/awesome-love2d) - Game engine
-   [PICO-8](https://github.com/felipebueno/awesome-PICO-8)  ★ 88, pushed 31 days ago  - Fantasy console

Development Environment
-----------------------

-   [Quick Look Plugins](https://github.com/sindresorhus/quick-look-plugins)  ★ 5953, pushed 2 days ago  - OS X
-   [Dev Env](https://github.com/jondot/awesome-devenv)  ★ 389, pushed 12 days ago
-   [Dotfiles](https://github.com/webpro/awesome-dotfiles)  ★ 1062, pushed 6 days ago
-   [Shell](https://github.com/alebcay/awesome-shell)  ★ 6675, pushed 16 days ago
-   [Command-Line Apps](https://github.com/aharris88/awesome-cli-apps)  ★ 399, pushed 0 days ago
-   [ZSH Plugins](https://github.com/unixorn/awesome-zsh-plugins)  ★ 1465, pushed 1 days ago
-   [GitHub](https://github.com/phillipadsmith/awesome-github)  ★ 187, pushed 42 days ago
    -   [Browser Extensions](https://github.com/stefanbuck/awesome-browser-extensions-for-github)  ★ 450, pushed 2 days ago
    -   [Cheat Sheet](https://github.com/tiimgreen/github-cheat-sheet)  ★ 18494, pushed 26 days ago
-   [Git Cheat Sheet & Git Flow](https://github.com/arslanbilal/git-cheat-sheet)  ★ 1139, pushed 48 days ago
-   [Git Tips](https://github.com/git-tips/tips)  ★ 516, pushed 3 days ago
-   [Git Add-ons](https://github.com/stevemao/awesome-git-addons)  ★ 227, pushed 8 days ago
-   [SSH](https://github.com/moul/awesome-ssh)  ★ 315, pushed 45 days ago
-   [FOSS for Developers](https://github.com/httpsGithubParty/FOSS-for-Dev)  ★ 115, pushed 53 days ago

Entertainment
-------------

-   [Science Fiction](https://github.com/sindresorhus/awesome-scifi)  ★ 999, pushed 0 days ago  - Scifi
-   [Fantasy](https://github.com/RichardLitt/awesome-fantasy)  ★ 169, pushed 73 days ago
-   [Podcasts](https://github.com/guipdutra/awesome-geek-podcasts)  ★ 602, pushed 14 days ago
-   [Email Newsletters](https://github.com/vredniy/awesome-newsletters)  ★ 293, pushed 19 days ago

Databases
---------

-   [Database](https://github.com/numetriclabz/awesome-db)  ★ 209, pushed 29 days ago
-   [MySQL](https://github.com/shlomi-noach/awesome-mysql/blob/gh-pages/index.md)
-   [SQLAlchemy](https://github.com/dahlia/awesome-sqlalchemy)  ★ 1106, pushed 29 days ago
-   [InfluxDB](https://github.com/mark-rushakoff/awesome-influxdb)  ★ 99, pushed 23 days ago
-   [Neo4j](https://github.com/Neueda4j/awesome-neo4j)  ★ 74, pushed 9 days ago
-   [Doctrine](https://github.com/TomasVotruba/awesome-doctrine)  ★ 91, pushed 20 days ago  - PHP ORM
-   [MongoDB](https://github.com/ramnes/awesome-mongodb)  ★ 200, pushed 5 days ago

Media
-----

-   [Creative Commons Media](https://github.com/shime/creative-commons-media)  ★ 109, pushed 101 days ago
-   [Fonts](https://github.com/brabadu/awesome-fonts)  ★ 115, pushed 46 days ago
-   [Codeface](https://github.com/chrissimpkins/codeface)  ★ 3139, pushed 27 days ago  - Text editor fonts
-   [Stock Resources](https://github.com/neutraltone/awesome-stock-resources)  ★ 5176, pushed 12 days ago
-   [GIF](https://github.com/ibaaj/awesome-gif)  ★ 91, pushed 82 days ago
-   [Music](https://github.com/ciconia/awesome-music)  ★ 84, pushed 37 days ago
-   [Open Source Documents](https://github.com/nacyot/awesome-opensource-documents)
-   [Audio Visualization](https://github.com/willianjusten/awesome-audio-visualization)  ★ 261, pushed 2 days ago

Learn
-----

-   [CLI Workshoppers](https://github.com/therebelrobot/awesome-workshopper)  ★ 128, pushed 86 days ago  - Interactive tutorials
-   [Learn to Program](https://github.com/karlhorky/learn-to-program)  ★ 174, pushed 5 days ago
-   [Speaking](https://github.com/matteofigus/awesome-speaking)  ★ 360, pushed 111 days ago
-   [Tech Videos](https://github.com/lucasviola/awesome-tech-videos)  ★ 116, pushed 113 days ago
-   [Dive into Machine Learning](https://github.com/hangtwenty/dive-into-machine-learning)  ★ 5164, pushed 4 days ago
-   [Computer History](https://github.com/watson/awesome-computer-history)  ★ 588, pushed 19 days ago

Security
--------

-   [Application Security](https://github.com/paragonie/awesome-appsec)  ★ 1669, pushed 22 days ago
-   [Security](https://github.com/sbilly/awesome-security)  ★ 523, pushed 48 days ago
-   [CTF](https://github.com/apsdehal/awesome-ctf)  ★ 423, pushed 33 days ago  - Capture The Flag
-   [Malware Analysis](https://github.com/rshipp/awesome-malware-analysis)  ★ 968, pushed 5 days ago
-   [Android Security](https://github.com/ashishb/android-security-awesome)  ★ 1009, pushed 4 days ago
-   [Hacking](https://github.com/carpedm20/awesome-hacking)  ★ 511, pushed 10 days ago
-   [Honeypots](https://github.com/paralax/awesome-honeypots)  ★ 604, pushed 45 days ago
-   [Incident Response](https://github.com/meirwah/awesome-incident-response)  ★ 472, pushed 10 days ago

Content Management System
-------------------------

-   [Umbraco](https://github.com/leekelleher/awesome-umbraco)  ★ 52, pushed 66 days ago
-   [Refinery CMS](https://github.com/refinerycms-contrib/awesome-refinerycms)  ★ 10, pushed 25 days ago

Miscellaneous
-------------

-   [JSON](https://github.com/burningtree/awesome-json)  ★ 306, pushed 23 days ago
-   [Discounts for Student Developers](https://github.com/najela/discount-for-student-dev)
-   [Slack](https://github.com/matiassingers/awesome-slack)  ★ 218, pushed 102 days ago
    -   [Communities](https://github.com/filipelinhares/awesome-slack)  ★ 133, pushed 47 days ago
-   [Conferences](https://github.com/RichardLitt/awesome-conferences)  ★ 407, pushed 33 days ago
-   [GeoJSON](https://github.com/tmcw/awesome-geojson)  ★ 270, pushed 65 days ago
-   [Sysadmin](https://github.com/n1trux/awesome-sysadmin)  ★ 3497, pushed 3 days ago
-   [Radio](https://github.com/kyleterry/awesome-radio)  ★ 73, pushed 268 days ago
-   [Awesome](https://github.com/sindresorhus/awesome)  ★ 34542, pushed 0 days ago
-   [Analytics](https://github.com/onurakpolat/awesome-analytics)  ★ 335, pushed 13 days ago
-   [Open Companies](https://github.com/opencompany/awesome-open-company)  ★ 93, pushed 117 days ago
-   [REST](https://github.com/marmelab/awesome-rest)  ★ 637, pushed 12 days ago
-   [Selenium](https://github.com/christian-bromann/awesome-selenium)  ★ 99, pushed 27 days ago
-   [Endangered Languages](https://github.com/RichardLitt/endangered-languages)  ★ 81, pushed 36 days ago
-   [Continuous Delivery](https://github.com/ciandcd/awesome-ciandcd)  ★ 167, pushed 3 days ago
-   [Services Engineering](https://github.com/mmcgrana/services-engineering)  ★ 2106, pushed 268 days ago
-   [Free for Developers](https://github.com/ripienaar/free-for-dev)  ★ 13076, pushed 4 days ago
-   [Bitcoin](https://github.com/igorbarinov/awesome-bitcoin)  ★ 83, pushed 22 days ago
-   [Answers](https://github.com/jugoncalves/awesome-answers) - Stack Overflow, Quora, etc
-   [Sketch](https://github.com/diessica/awesome-sketch)  ★ 413, pushed 11 days ago  - OS X design app
-   [Places to Post Your Startup](https://github.com/mmccaff/PlacesToPostYourStartup)  ★ 852, pushed 97 days ago
-   [PCAPTools](https://github.com/caesar0301/awesome-pcaptools)  ★ 379, pushed 3 days ago
-   [Remote Jobs](https://github.com/lukasz-madon/awesome-remote-job)  ★ 5437, pushed 0 days ago
-   [Boilerplate Projects](https://github.com/melvin0008/awesome-projects-boilerplates)  ★ 199, pushed 69 days ago
-   [Readme](https://github.com/matiassingers/awesome-readme)  ★ 360, pushed 40 days ago
-   [Tools](https://github.com/cjbarber/ToolsOfTheTrade)  ★ 6274, pushed 0 days ago
-   [Styleguides](https://github.com/RichardLitt/awesome-styleguides)  ★ 291, pushed 20 days ago
-   [Design and Development Guides](https://github.com/NARKOZ/guides)  ★ 1097, pushed 35 days ago
-   [Software Engineering Blogs](https://github.com/kilimchoi/engineering-blogs)  ★ 7777, pushed 6 days ago
-   [Self Hosted](https://github.com/Kickball/awesome-selfhosted)  ★ 6806, pushed 2 days ago
-   [FOSS Production Apps](https://github.com/jwaterfaucett/awesome-foss-apps)  ★ 82, pushed 156 days ago
-   [Gulp](https://github.com/alferov/awesome-gulp)  ★ 142, pushed 2 days ago
-   [AMA](https://github.com/sindresorhus/amas)  ★ 527, pushed 5 days ago  - Ask Me Anything
    -   [Answers](https://github.com/stoeffel/awesome-ama-answers)  ★ 86, pushed 223 days ago
-   [Open Source Photography](https://github.com/ibaaj/awesome-OpenSourcePhotography)  ★ 44, pushed 54 days ago
-   [OpenGL](https://github.com/eug/awesome-opengl)  ★ 267, pushed 22 days ago
-   [Productivity](https://github.com/jyguyomarch/awesome-productivity)  ★ 67, pushed 111 days ago
-   [GraphQL](https://github.com/chentsulin/awesome-graphql)  ★ 1178, pushed 3 days ago
-   [Transit](https://github.com/luqmaan/awesome-transit)  ★ 91, pushed 13 days ago
-   [Research Tools](https://github.com/emptymalei/awesome-research)  ★ 95, pushed 31 days ago
-   [Niche Job Boards](https://github.com/wfhio/awesome-job-boards)  ★ 30, pushed 33 days ago
-   [Data Visualization](https://github.com/fasouto/awesome-dataviz)  ★ 431, pushed 9 days ago
-   [Social Media Share Links](https://github.com/vinkla/share-links)
-   [JSON Datasets](https://github.com/jdorfman/awesome-json-datasets)  ★ 88, pushed 139 days ago
-   [Microservices](https://github.com/mfornos/awesome-microservices)  ★ 886, pushed 3 days ago
-   [Unicode Code Points](https://github.com/Codepoints/awesome-codepoints)  ★ 81, pushed 76 days ago
-   [Internet of Things](https://github.com/HQarroum/awesome-iot)  ★ 212, pushed 72 days ago
-   [Beginner-Friendly Projects](https://github.com/MunGell/awesome-for-beginners)  ★ 304, pushed 24 days ago
-   [Bluetooth Beacons](https://github.com/beaconinside/awesome-beacon)  ★ 131, pushed 55 days ago
-   [Programming Interviews](https://github.com/MaximAbramchuck/awesome-interviews)
-   [Ripple](https://github.com/vhpoet/awesome-ripple)  ★ 32, pushed 101 days ago  - Open source distributed settlement network
-   [Katas](https://github.com/gmontalvoriv/awesome-katas)  ★ 30, pushed 73 days ago
-   [Tools for Activism](https://github.com/drewrwilson/toolsforactivism)  ★ 152, pushed 82 days ago
-   [TAP](https://github.com/sindresorhus/awesome-tap)  ★ 198, pushed 0 days ago  - Test Anything Protocol
-   [Robotics](https://github.com/Kiloreux/awesome-robotics)  ★ 162, pushed 26 days ago
-   [MQTT](https://github.com/hobbyquaker/awesome-mqtt)  ★ 41, pushed 29 days ago  - "Internet of Things" connectivity protocol
-   [Hacking Spots](https://github.com/diasdavid/awesome-hacking-spots)  ★ 245, pushed 14 days ago
-   [For Girls](https://github.com/cristianoliveira/awesome4girls)  ★ 95, pushed 6 days ago
-   [Vorpal](https://github.com/vorpaljs/awesome-vorpal)  ★ 54, pushed 7 days ago  - Node.js CLI framework
-   [OKR Methodology](https://github.com/domenicosolazzo/awesome-okr)  ★ 33, pushed 86 days ago  - Goal setting & communication best practices
-   [Vulkan](https://github.com/vinjn/awesome-vulkan)  ★ 186, pushed 5 days ago
-   [LaTeX](https://github.com/egeerardyn/awesome-LaTeX)  ★ 19, pushed 27 days ago  - Typesetting language
-   [Network Analysis](https://github.com/briatte/awesome-network-analysis)  ★ 178, pushed 0 days ago
-   [Economics](https://github.com/antontarasenko/awesome-economics)  ★ 34, pushed 6 days ago  - An economist's starter kit

License
-------

[![CC0](http://mirrors.creativecommons.org/presskit/buttons/88x31/svg/cc-zero.svg)](https://creativecommons.org/publicdomain/zero/1.0/)

To the extent possible under law, [Sindre Sorhus](http://sindresorhus.com) has waived all copyright and related or neighboring rights to this work.


text:
Défilement de contenus (images) avec effet de déplacement par transitions CSS.
Fait appel à <https://hammerjs.github.io/> pour l'activation des événements touch (écran tactile).

### Paramètres

* `selectorLinks` : sélecteur ciblant les liens (défaut : `.slider-pagination-list-item`)
* `selectorWrapper` : sélecteur ciblant le conteneur du slider (défaut : `.slider-wrapper`)
* `selectorItem` : sélecteur ciblant les items du slider (défaut : `.slider-item`)
* `selectorItemTitle` : sélecteur ciblant les éléments de titre des items (défaut : `.slider-item-title`)
* `selectorControlBtn` : sélecteur ciblant les boutons de contrôle (défaut : `.slider-control-btn`)
* `classControlBtnPlay` : sélecteur ciblant le bouton de lecture (défaut : `slider-control-btn-play`)
* `classControlBtnPause` : sélecteur ciblant le bouton de pause (défaut : `slider-control-btn-pause`)
* `selectorControlPrev` : sélecteur ciblant le bouton précédent (défaut : `.slider-item-control-prev`)
* `selectorControlNext` : sélecteur ciblant le bouton suivant (défaut : `.slider-item-control-next`)
* `classActive` : classe appliquée sur un item actif (défaut : `slider-item-active`)
* `classActiveLink` : classe appliquée sur un lien actif (défaut : `slider-pagination-list-link-active`)
* `autoTimer` : délai automatique entre chaque défilement (défaut : `1500`)
* `autoPlay` : lecture automatique au chargement (défaut : `false`)
* `loop` : boucler si le défilement arrive à la fin (défaut : `true`)
* `touchEnabled` : comportement au touch (tactile) activé (défaut : `true`)
* `touching` : en train d'être contrôlé de manière tactile (défaut : `false`)
* `touchDelta` : valeur de défilement au touch (défaut : `50`)
* `animating` : en cours d'animation (défaut : `false`)
* `activeIndex` : index de l'élément/item actif  (défaut : `0`)

### Exemple

Voir index.html

## Usage de base

1. Placer la classe `.js-slider` sur l'élément qui contient les items
2. Utiliser l'exemple de code HTML fourni (respecter la structure des classes).
3. Configurer les dimensions du slider dans la taille des images et dans la feuille de styles.
4. Affiner les paramètres les plus communs tels que `autoTimer`, `autoPlay` et `loop`

Voir la démonstration dans index.html

redpajama_set_name: RedPajamaGithub


text:
cd ..
sphinx-build sphinx docs


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="description" content="The intersection of software with photography">

        <meta property="og:title" content="Configuration | Matthew Trask"/>
        <meta property="og:type" content="website" />
        <meta property="og:url" content="http://matthewtrask.net/blog/categories/configuration"/>
        <meta property="og:description" content="The intersection of software with photography" />

        <title>Matthew Trask | Configuration</title>

        <link rel="home" href="http://matthewtrask.net">
        <link rel="icon" href="/favicon.ico">
        <link href="/blog/feed.atom" type="application/atom+xml" rel="alternate" title="Matthew Trask Atom Feed">

            <meta property="og:title" content="Configuration" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="http://matthewtrask.net/blog/categories/configuration"/>
    <meta property="og:description" content="Posts related to configuring the Jigsaw blog starter template" />

        <link href="https://fonts.googleapis.com/css?family=Nunito+Sans:300,300i,400,400i,700,700i,800,800i" rel="stylesheet">
        <link rel="stylesheet" href="/assets/build/css/main.css?id=809d2e8642c680c81a36">

Matthew Trask
                            The intersection of software with photography

                    <search></search>

        Blog

        About

        Contact

                    <button class="flex justify-center items-center bg-blue border border-blue h-10 px-5 rounded-full lg:hidden focus:outline-none"
    onclick="navMenu.toggle()"
>
    <svg id="js-nav-menu-show" xmlns="http://www.w3.org/2000/svg"
        class="fill-current text-white h-9 w-4" viewBox="0 0 32 32"
    >
        <path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2  s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2  S29.104,22,28,22z"/>
    </svg>

    <svg id="js-nav-menu-hide" xmlns="http://www.w3.org/2000/svg"
        class="hidden fill-current text-white h-9 w-4" viewBox="0 0 36 30"
    >
        <polygon points="32.8,4.4 28.6,0.2 18,10.8 7.4,0.2 3.2,4.4 13.8,15 3.2,25.6 7.4,29.8 18,19.2 28.6,29.8 32.8,25.6 22.2,15 "/>
    </svg>
</button>

            Blog

            About

            Contact

Configuration

These posts are all related to configuring your Jigsaw blog starter template.

        <form action="https://your-mail-chimp-list-manage-url" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>

Sign up for our newsletter

                    Email Address
                    <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="Email address">

<input type="text" name="b_25582686a9fc051afd5453557_189578c854" tabindex="-1" value="">

<input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button">

        </form>

                    © Tighten 2019.

                    Built with Jigsaw
                    and Tailwind CSS.


text:
#include <bonefish/rawsocket/uds_listener.hpp>
#include <bonefish/rawsocket/uds_connection.hpp>

#include <unistd.h>

namespace bonefish {

uds_listener::uds_listener(
        boost::asio::io_service& io_service,
        const std::string& path)
    : rawsocket_listener()
    , m_socket(io_service)
    , m_acceptor(io_service)
    , m_endpoint(path)
{
}

uds_listener::~uds_listener()
{
    stop_listening();
}

void uds_listener::start_listening()
{
    assert(get_error_handler());
    assert(get_accept_handler());

    if (is_listening()) {
        return;
    }

    unlink(m_endpoint.path().c_str());
    m_acceptor.open(m_endpoint.protocol());
    m_acceptor.set_option(
           boost::asio::local::stream_protocol::acceptor::reuse_address(true));
    m_acceptor.bind(m_endpoint);
    m_acceptor.listen();

    set_listening(true);
    async_accept();
}

void uds_listener::stop_listening()
{
    if (!is_listening()) {
        return;
    }

    m_acceptor.close();
    set_listening(false);
}

std::shared_ptr<rawsocket_connection> uds_listener::create_connection()
{
    return std::make_shared<uds_connection>(std::move(m_socket));
}

void uds_listener::async_accept()
{
    m_acceptor.async_accept(m_socket,
            std::bind(&rawsocket_listener::handle_accept,
                    shared_from_this(),
                    std::placeholders::_1));
}

} // namespace bonefish


text:
package browseserver

import (
	"bytes"
	gocontext "context"
	"encoding/json"
	"errors"
	"fmt"
	"html"
	"html/template"
	"io/fs"
	"net"
	"net/http"
	"net/url"
	"os/exec"
	"runtime"
	"sort"
	"strings"
	"sync"
	"time"

	v23 "v.io/v23"
	"v.io/v23/context"
	"v.io/v23/naming"
	"v.io/v23/security"
	"v.io/v23/services/logreader"
	"v.io/v23/services/stats"
	svtrace "v.io/v23/services/vtrace"
	"v.io/v23/uniqueid"
	"v.io/v23/verror"
	"v.io/v23/vom"
	"v.io/v23/vtrace"
	"v.io/x/ref/services/debug/debug/browseserver/internal/templates"
	"v.io/x/ref/services/internal/pproflib"
	s_stats "v.io/x/ref/services/stats"
)

const browseProfilesPath = "/profiles"

const (
	chromeTmpl = "chrome.html"
)

// Serve serves the debug interface over http.  An HTTP server is started (serving at httpAddr), its
// various handlers make rpc calls to the given name to gather debug information.  If log is true
// we additionally log debug information for these rpc requests.  Timeout defines the timeout for the
// rpc calls.  The HTTPServer will run until the passed context is canceled.
func Serve(ctx *context.T, httpAddr, name string, timeout time.Duration, assets fs.FS, log bool) error {
	if assets == nil {
		assets = templates.HTML
	}
	mux, err := CreateServeMux(ctx, timeout, log, assets, "")
	if err != nil {
		return err
	}
	if len(httpAddr) == 0 {
		httpAddr = "127.0.0.1:0"
	}
	ln, err := net.Listen("tcp", httpAddr)
	if err != nil {
		return err
	}
	go func() {
		url := "http://" + ln.Addr().String() + "/?n=" + url.QueryEscape(name)
		fmt.Printf("Visit %s and Ctrl-C to quit\n", url)
		// Open the browser if we can
		switch runtime.GOOS {
		case "linux":
			exec.Command("xdg-open", url).Start() //nolint:errcheck
		case "darwin":
			exec.Command("open", url).Start() //nolint:errcheck
		}

		<-ctx.Done()
		ln.Close()
	}()
	return http.Serve(ln, mux)
}

// CreateServeMux returns a ServeMux object that has handlers set up.
func CreateServeMux(ctx *context.T, timeout time.Duration, log bool, assets fs.FS, urlPrefix string) (*http.ServeMux, error) {
	mux := http.NewServeMux()
	h, err := newHandler(ctx, timeout, log, assets, urlPrefix)
	if err != nil {
		return nil, err
	}
	mux.Handle("/", &resolveHandler{h})
	mux.Handle("/name", &resolveHandler{h})
	mux.Handle("/stats", &statsHandler{h})
	mux.Handle("/blessings", &blessingsHandler{h})
	mux.Handle("/logs", &logsHandler{h})
	mux.Handle("/glob", &globHandler{h})
	mux.Handle(browseProfilesPath, &profilesHandler{h})
	mux.Handle(browseProfilesPath+"/", &profilesHandler{h})
	mux.Handle("/vtraces", &allTracesHandler{h})
	mux.Handle("/vtrace", &vtraceHandler{h})
	mux.Handle("/favicon.ico", http.NotFoundHandler())

	return mux, nil
}

type handler struct {
	ctx        *context.T
	timeout    time.Duration
	log        bool
	urlPrefix  string
	fs         fs.FS
	cacheMapMu sync.Mutex
	cacheMap   map[string]*template.Template // GUARDED_BY(cacheMapMu)
	funcs      template.FuncMap
}

func newHandler(ctx *context.T, timeout time.Duration, log bool, assets fs.FS, urlPrefix string) (*handler, error) {
	h := &handler{
		ctx:       ctx,
		timeout:   timeout,
		log:       log,
		urlPrefix: urlPrefix,
	}
	colors := []string{"red", "blue", "green"}
	pos := 0
	h.funcs = template.FuncMap{
		"verrorID":           verror.ErrorID,
		"unmarshalPublicKey": security.UnmarshalPublicKey,
		"endpoint": func(n string) (naming.Endpoint, error) {
			if naming.Rooted(n) {
				n, _ = naming.SplitAddressName(n)
			}
			return naming.ParseEndpoint(n)
		},
		"endpointName": func(ep naming.Endpoint) string { return ep.Name() },
		"goValueFromVOM": func(v *vom.RawBytes) interface{} {
			var ret interface{}
			if err := v.ToValue(&ret); err != nil {
				panic(err)
			}
			return ret
		},
		"nextColor": func() string {
			c := colors[pos]
			pos = (pos + 1) % len(colors)
			return c
		},
	}

	h.cacheMap = make(map[string]*template.Template)
	h.fs = assets
	return h, nil
}

func (h *handler) cached(name string) *template.Template {
	h.cacheMapMu.Lock()
	defer h.cacheMapMu.Unlock()
	return h.cacheMap[name]
}

func (h *handler) template(ctx *context.T, name string) (t *template.Template, err error) {
	if t = h.cached(name); t != nil {
		return t, nil
	}
	if name == chromeTmpl {
		t = template.New(name).Funcs(h.funcs)
	} else {
		if t, err = h.template(ctx, chromeTmpl); err != nil {
			return nil, err
		}
		if t, err = t.Clone(); err != nil {
			return nil, err
		}
	}
	if _, err = t.ParseFS(h.fs, name); err != nil {
		return nil, err
	}
	h.cacheMapMu.Lock()
	h.cacheMap[name] = t
	h.cacheMapMu.Unlock()
	return t, nil
}

func (h *handler) execute(ctx *context.T, w http.ResponseWriter, r *http.Request, tmplName string, args interface{}) {
	if h.log {
		ctx.Infof("DEBUG: %q -- %+v", r.URL, args)
	}
	t, err := h.template(ctx, tmplName)
	if err != nil {
		fmt.Fprintf(w, "ERROR:%v", err)
		ctx.Errorf("Error parsing template %q: %v", tmplName, err)
		return
	}
	if err := t.Execute(w, args); err != nil {
		fmt.Fprintf(w, "ERROR:%v", err)
		ctx.Errorf("Error executing template %q: %v", tmplName, err)
		return
	}
}

func (h *handler) withTimeout(ctx *context.T) (*context.T, func()) {
	return context.WithTimeout(ctx, h.timeout)
}

type resolveHandler struct{ *handler }

func (h *resolveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	name := r.FormValue("n")
	var suffix string
	ctx, tracer := newTracer(h.ctx)
	timeoutCtx, cancel := h.withTimeout(ctx)
	defer cancel()
	m, err := v23.GetNamespace(ctx).Resolve(timeoutCtx, name)
	if m != nil {
		suffix = m.Name
	}
	args := struct {
		ServerName  string
		CommandLine string
		Vtrace      *Tracer
		MountEntry  *naming.MountEntry
		Error       error
	}{
		ServerName:  strings.TrimSuffix(name, suffix),
		CommandLine: fmt.Sprintf("debug resolve %q", name),
		Vtrace:      tracer,
		MountEntry:  m,
		Error:       err,
	}
	h.execute(h.ctx, w, r, "resolve.html", args)
}

type blessingsHandler struct{ *handler }

func (h *blessingsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	name := r.FormValue("n")
	ctx, tracer := newTracer(h.ctx)
	timeoutCtx, cancel := h.withTimeout(ctx)
	call, err := v23.GetClient(ctx).StartCall(timeoutCtx, name, "DoNotReallyCareAboutTheMethod", nil)
	args := struct {
		ServerName        string
		CommandLine       string
		Vtrace            *Tracer
		Error             error
		Blessings         security.Blessings
		Recognized        []string
		CertificateChains [][]security.Certificate
	}{
		ServerName:  name,
		Vtrace:      tracer,
		CommandLine: fmt.Sprintf("vrpc identify %q", name),
		Error:       err,
	}
	if call != nil {
		args.Recognized, args.Blessings = call.RemoteBlessings()
		args.CertificateChains = security.MarshalBlessings(args.Blessings).CertificateChains
		// Don't actually care about the RPC, so don't bother waiting on the Finish.
		cancel()
		defer func() {
			go call.Finish() //nolint:errcheck
		}()
	} else {
		cancel()
	}
	h.execute(h.ctx, w, r, "blessings.html", args)
}

type statsHandler struct{ *handler }

func (h *statsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	var (
		server      = r.FormValue("n")
		stat        = r.FormValue("s")
		prefix      = naming.Join(server, "__debug", "stats")
		name        = naming.Join(prefix, stat)
		ctx, tracer = newTracer(h.ctx)
		hasValue    = true
	)
	timeoutCtx, cancel := h.withTimeout(ctx)
	defer cancel()
	v, err := stats.StatsClient(name).Value(timeoutCtx)
	if errors.Is(err, verror.ErrNoExist) {
		// Stat does not exist as a value, that's okay.
		err = nil
		hasValue = false
	}
	var children []string
	var childrenErrors []error
	timeoutCtx2, cancel2 := h.withTimeout(ctx)
	defer cancel2()
	if glob, globErr := v23.GetNamespace(ctx).Glob(timeoutCtx2, naming.Join(name, "*")); globErr == nil {
		for e := range glob {
			switch e := e.(type) {
			case *naming.GlobReplyEntry:
				children = append(children, strings.TrimPrefix(e.Value.Name, prefix))
			case *naming.GlobReplyError:
				childrenErrors = append(childrenErrors, e.Value.Error)
			}
		}
		if len(children) == 1 && !hasValue {
			// Single child, save an extra click
			redirect, err := url.Parse(r.URL.String())
			if err == nil {
				q := redirect.Query()
				q.Set("n", server)
				q.Set("s", children[0])
				redirect.RawQuery = q.Encode()
				ctx.Infof("Redirecting from %v to %v", r.URL, redirect)
				redirectString := redirect.String()
				if h.urlPrefix != "" {
					redirectString = fmt.Sprintf("%s/%s", h.urlPrefix, redirectString)
				}
				http.Redirect(w, r, redirectString, http.StatusTemporaryRedirect)
				return
			}
		}
	} else if err == nil {
		err = globErr
	}
	timeSeriesData, tsErr := h.GetTimeSeriesData(server, children, timeoutCtx)
	if tsErr != nil {
		err = tsErr
	}

	args := struct {
		ServerName     string
		CommandLine    string
		Vtrace         *Tracer
		StatName       string
		Value          *vom.RawBytes
		Children       []string
		ChildrenErrors []error
		Globbed        bool
		TimeSeriesData string
		Error          error
	}{
		ServerName:     server,
		Vtrace:         tracer,
		StatName:       strings.TrimPrefix(stat, "/"),
		Value:          v,
		Error:          err,
		Children:       children,
		ChildrenErrors: childrenErrors,
		TimeSeriesData: timeSeriesData,
		Globbed:        len(children)+len(childrenErrors) > 0,
	}
	if hasValue {
		args.CommandLine = fmt.Sprintf("debug stats watch %q", name)
	} else {
		args.CommandLine = fmt.Sprintf("debug glob %q", naming.Join(name, "*"))
	}
	h.execute(h.ctx, w, r, "stats.html", args)
}

func (h *statsHandler) GetTimeSeriesData(server string, children []string, ctx *context.T) (string, error) {
	// duration -> [[t0, v0], [t1, v1], ... , [tn, vn]]
	timeSeriesData := map[string][][]string{}
	for _, child := range children {
		// Read data from time series related children.
		if strings.Contains(child, "/timeseries") {
			n := fmt.Sprintf("%s%s", naming.Join(server, "__debug", "stats"), child)
			v, err := stats.StatsClient(n).Value(ctx)
			if err != nil && !errors.Is(err, verror.ErrNoExist) {
				return "", err
			}
			var value interface{}
			if err := v.ToValue(&value); err != nil {
				return "", err
			}
			ts, ok := value.(s_stats.TimeSeries)
			if !ok {
				return "", fmt.Errorf("%q doesn't contain time series data", child)
			}
			d := [][]string{}
			startTime := ts.StartTime.Unix()
			resolutionInSeconds := int64(ts.Resolution / time.Second)
			for i, v := range ts.Values {
				curTime := startTime + int64(i)*resolutionInSeconds
				d = append(d, []string{fmt.Sprintf("%d", curTime), fmt.Sprintf("%d", v)})
			}
			parts := strings.Split(child, "/")
			duration := strings.TrimPrefix(parts[len(parts)-1], "timeseries")
			timeSeriesData[duration] = d
		}
	}
	if len(timeSeriesData) == 0 {
		return "", nil
	}
	b, err := json.Marshal(timeSeriesData)
	if err != nil {
		return "", err
	}
	return string(b), nil
}

type logsHandler struct{ *handler }

func (h *logsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { //nolint:gocyclo
	var (
		server = r.FormValue("n")
		log    = r.FormValue("l")
		prefix = naming.Join(server, "__debug", "logs")
		name   = naming.Join(prefix, log)
		path   = strings.TrimPrefix(r.URL.Path, "/")
		list   = func() bool {
			for _, a := range r.Header[http.CanonicalHeaderKey("Accept")] {
				if a == "text/event-stream" {
					return true
				}
			}
			return false
		}()
		ctx, _ = newTracer(h.ctx)
	)
	// The logs handler streams result to the web browser because there
	// have been cases where there are ~1 million log files, so doing this
	// streaming thing will make the UI more responsive.
	//
	// For the same reason, avoid setting a timeout.
	if len(log) == 0 && list {
		w.Header().Add("Content-Type", "text/event-stream")
		glob, err := v23.GetNamespace(ctx).Glob(ctx, naming.Join(name, "*"))
		if err != nil {
			writeErrorEvent(w, err)
			return
		}
		flusher, _ := w.(http.Flusher)
		for e := range glob {
			switch e := e.(type) {
			case *naming.GlobReplyEntry:
				logfile := strings.TrimPrefix(e.Value.Name, prefix+"/")
				writeEvent(w, fmt.Sprintf(
					`<a href="%s?n=%s&l=%s">%s</a>`,
					path,
					url.QueryEscape(server),
					url.QueryEscape(logfile),
					html.EscapeString(logfile)))
			case *naming.GlobReplyError:
				writeErrorEvent(w, e.Value.Error)
			}
			if flusher != nil {
				flusher.Flush()
			}
		}
		return
	}
	if len(log) == 0 {
		args := struct {
			ServerName  string
			CommandLine string
			Vtrace      *Tracer
		}{
			ServerName:  server,
			CommandLine: fmt.Sprintf("debug glob %q", naming.Join(name, "*")),
		}
		h.execute(h.ctx, w, r, "logs.html", args)
		return
	}
	w.Header().Add("Content-Type", "text/plain")
	stream, err := logreader.LogFileClient(name).ReadLog(ctx, 0, logreader.AllEntries, true)
	if err != nil {
		fmt.Fprintf(w, "ERROR(%v): %v\n", verror.ErrorID(err), err)
		return
	}
	var (
		entries  = make(chan logreader.LogEntry)
		abortRPC = make(chan bool)
		errch    = make(chan error, 1) // At most one write on this channel, avoid blocking any goroutines
	)
	go func() {
		// writes to: entries, errch
		// reads from: abortRPC
		defer stream.Finish() //nolint:errcheck
		defer close(entries)
		iterator := stream.RecvStream()
		for iterator.Advance() {
			select {
			case entries <- iterator.Value():
			case <-abortRPC:
				return
			}
		}
		if err := iterator.Err(); err != nil {
			errch <- err
		}
	}()
	goctx, cancel := gocontext.WithCancel(r.Context())
	defer cancel()
	// reads from: entries, errch, cancel
	// writes to: abortRPC
	defer close(abortRPC)
	for {
		select {
		case e, more := <-entries:
			if !more {
				return
			}
			fmt.Fprintln(w, e.Line)
		case err := <-errch:
			fmt.Fprintf(w, "ERROR(%v): %v\n", verror.ErrorID(err), err)
			return
		case <-goctx.Done():
			return
		}
	}
}

type globHandler struct{ *handler }

func (h *globHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	type entry struct {
		Suffix string
		Error  error
	}
	var (
		server      = r.FormValue("n")
		suffix      = r.FormValue("s")
		pattern     = naming.Join(server, suffix, "*")
		ctx, tracer = newTracer(h.ctx)
		entries     []entry
	)
	timeoutCtx, cancel := h.withTimeout(ctx)
	defer cancel()
	ch, err := v23.GetNamespace(ctx).Glob(timeoutCtx, pattern)
	if err != nil {
		entries = append(entries, entry{Error: err})
	}
	if ch != nil {
		for e := range ch {
			switch e := e.(type) {
			case *naming.GlobReplyEntry:
				entries = append(entries, entry{Suffix: strings.TrimPrefix(e.Value.Name, server)})
			case *naming.GlobReplyError:
				entries = append(entries, entry{Error: e.Value.Error})
			}
		}
	}
	args := struct {
		ServerName  string
		CommandLine string
		Vtrace      *Tracer
		Pattern     string
		Entries     []entry
	}{
		ServerName:  server,
		CommandLine: fmt.Sprintf("debug glob %q", pattern),
		Pattern:     pattern,
		Vtrace:      tracer,
		Entries:     entries,
	}
	h.execute(h.ctx, w, r, "glob.html", args)
}

type profilesHandler struct{ *handler }

func (h *profilesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	var (
		server = r.FormValue("n")
		name   = naming.Join(server, "__debug", "pprof")
	)
	if len(server) == 0 {
		w.WriteHeader(http.StatusBadRequest)
		fmt.Fprintf(w, "Must specify a server with the URL query parameter 'n'")
		return
	}
	if path := strings.TrimSuffix(r.URL.Path, "/"); strings.HasSuffix(path, strings.TrimSuffix(browseProfilesPath, "/")) {
		urlPrefix := fmt.Sprintf("%s/pprof", strings.TrimPrefix(browseProfilesPath, "/"))
		args := struct {
			ServerName  string
			CommandLine string
			Vtrace      *Tracer
			URLPrefix   string
		}{
			ServerName:  server,
			CommandLine: fmt.Sprintf("debug pprof run %q", name),
			URLPrefix:   urlPrefix,
		}
		h.execute(h.ctx, w, r, "profiles.html", args)
		return
	}
	pproflib.PprofProxy(h.ctx, browseProfilesPath, name).ServeHTTP(w, r)
}

const (
	allTracesLabel       = ">0s"
	oneMsTraceLabel      = ">1ms"
	tenMsTraceLabel      = ">10ms"
	hundredMsTraceLabel  = ">100ms"
	oneSecTraceLabel     = ">1s"
	tenSecTraceLabel     = ">10s"
	hundredSecTraceLabel = ">100s"
)

var (
	labelToCutoff = map[string]float64{
		allTracesLabel:       0,
		oneMsTraceLabel:      0.001,
		tenMsTraceLabel:      0.01,
		hundredMsTraceLabel:  0.1,
		oneSecTraceLabel:     1,
		tenSecTraceLabel:     10,
		hundredSecTraceLabel: 100,
	}
	sortedLabels = []string{allTracesLabel, oneMsTraceLabel, tenMsTraceLabel, hundredMsTraceLabel, oneSecTraceLabel, tenSecTraceLabel, hundredSecTraceLabel}
)

type traceWithStart struct {
	ID    string
	Start time.Time
}

type traceSort []traceWithStart

func (t traceSort) Len() int           { return len(t) }
func (t traceSort) Less(i, j int) bool { return t[i].Start.After(t[j].Start) }
func (t traceSort) Swap(i, j int)      { t[i], t[j] = t[j], t[i] }

func bucketTraces(ctx *context.T, name string) (map[string]traceSort, error) {
	stub := svtrace.StoreClient(name)

	call, err := stub.AllTraces(ctx)
	if err != nil {
		return nil, err
	}
	stream := call.RecvStream()
	var missingTraces []string
	bucketedTraces := map[string]traceSort{}
	for stream.Advance() {
		trace := stream.Value()
		node := vtrace.BuildTree(&trace)
		if node == nil {
			missingTraces = append(missingTraces, trace.Id.String())
			continue
		}
		startTime := findStartTime(node)
		endTime := findEndTime(node)
		traceNode := traceWithStart{ID: trace.Id.String(), Start: startTime}
		duration := endTime.Sub(startTime).Seconds()
		if endTime.IsZero() || startTime.IsZero() {
			// Set the duration so something small but greater than zero so it shows up in
			// the first bucket.
			duration = 0.0001
		}
		for l, cutoff := range labelToCutoff {
			if duration >= cutoff {
				bucketedTraces[l] = append(bucketedTraces[l], traceNode)
			}
		}
	}

	for _, v := range bucketedTraces {
		sort.Sort(v)
	}
	if err := stream.Err(); err != nil {
		return bucketedTraces, err
	}
	if err := call.Finish(); err != nil {
		return bucketedTraces, err
	}
	if len(missingTraces) > 0 {
		return bucketedTraces, fmt.Errorf("missing information for: %s", strings.Join(missingTraces, ","))
	}
	return bucketedTraces, nil
}

type allTracesHandler struct{ *handler }

func (a *allTracesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	var (
		server = r.FormValue("n")
		name   = naming.Join(server, "__debug", "vtrace")
	)
	if len(server) == 0 {
		w.WriteHeader(http.StatusBadRequest)
		fmt.Fprintf(w, "Must specify a server with the URL query parameter 'n'")
		return
	}
	ctx, tracer := newTracer(a.ctx)
	buckets, err := bucketTraces(ctx, name)

	data := struct {
		Buckets      map[string]traceSort
		SortedLabels []string
		Err          error
		ServerName   string
		CommandLine  string
		Vtrace       *Tracer
	}{
		Buckets:      buckets,
		SortedLabels: sortedLabels,
		Err:          err,
		CommandLine:  fmt.Sprintf("debug vtraces %q", name),
		ServerName:   server,
		Vtrace:       tracer,
	}
	a.execute(a.ctx, w, r, "alltrace.html", data)
}

type divTree struct {
	ID string
	// Start is a value from 0-100 which is the percentage of time into the parent span's duration
	// that this span started.
	Start int
	// Width is a value from 0-100 which is the percentage of time in the parent span's duration this span
	// took
	Width       int
	Name        string
	Annotations []annotation
	Children    []divTree
}

type annotation struct {
	// Position is a value from 0-100 which is the percentage of time into the
	// span's duration that this annotation occurred.
	Position int
	Msg      string
}

func convertToTree(n *vtrace.Node, parentStart time.Time, parentEnd time.Time) *divTree {
	// If either start of end is missing, use the parent start/end.
	startTime := n.Span.Start
	if startTime.IsZero() {
		startTime = parentStart
	}

	endTime := n.Span.End
	if endTime.IsZero() {
		endTime = parentEnd
	}

	parentDuration := parentEnd.Sub(parentStart).Seconds()
	start := int(100 * startTime.Sub(parentStart).Seconds() / parentDuration)
	end := int(100 * endTime.Sub(parentStart).Seconds() / parentDuration)
	width := end - start
	if width == 0 {
		width = 1
	}
	top := &divTree{
		ID:    n.Span.Id.String(),
		Start: start,
		Width: width,
		Name:  n.Span.Name,
	}

	top.Annotations = make([]annotation, len(n.Span.Annotations))
	for i, a := range n.Span.Annotations {
		top.Annotations[i].Msg = a.Message
		if a.When.IsZero() {
			top.Annotations[i].Position = 0
			continue
		}
		top.Annotations[i].Position = int(100*a.When.Sub(parentStart).Seconds()/parentDuration) - start
	}

	top.Children = make([]divTree, len(n.Children))
	for i, c := range n.Children {
		top.Children[i] = *convertToTree(c, startTime, endTime)
	}
	return top

}

// findStartTime returns the start time of a node.  The start time is defined as either the span start if it exists
// or the timestamp of the first annotation/sub span.
func findStartTime(n *vtrace.Node) time.Time {
	if !n.Span.Start.IsZero() {
		return n.Span.Start
	}
	var startTime time.Time
	for _, a := range n.Span.Annotations {
		startTime = a.When
		if !startTime.IsZero() {
			break
		}
	}
	for _, c := range n.Children {
		childStartTime := findStartTime(c)
		if startTime.IsZero() || (!childStartTime.IsZero() && startTime.After(childStartTime)) {
			startTime = childStartTime
		}
		if !startTime.IsZero() {
			break
		}
	}
	return startTime
}

// findEndTime returns the end time of a node.  The end time is defined as either the span end if it exists
// or the timestamp of the last annotation/sub span.
func findEndTime(n *vtrace.Node) time.Time {
	if !n.Span.End.IsZero() {
		return n.Span.End
	}

	size := len(n.Span.Annotations)
	var endTime time.Time
	for i := range n.Span.Annotations {
		endTime = n.Span.Annotations[size-1-i].When
		if !endTime.IsZero() {
			break
		}
	}

	size = len(n.Children)
	for i := range n.Children {
		childEndTime := findEndTime(n.Children[size-1-i])
		if endTime.IsZero() || (!childEndTime.IsZero() && childEndTime.After(endTime)) {
			endTime = childEndTime
		}
		if !endTime.IsZero() {
			break
		}
	}
	return endTime
}

type vtraceHandler struct{ *handler }

func (v *vtraceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	var (
		server  = r.FormValue("n")
		traceID = r.FormValue("t")
		name    = naming.Join(server, "__debug", "vtrace")
	)

	if len(server) == 0 {
		w.WriteHeader(http.StatusBadRequest)
		fmt.Fprintf(w, "Must specify a server with the URL query parameter 'n'")
		return
	}

	stub := svtrace.StoreClient(name)
	ctx, tracer := newTracer(v.ctx)
	id, err := uniqueid.FromHexString(traceID)

	if err != nil {
		w.WriteHeader(http.StatusBadRequest)
		fmt.Fprintf(w, "Invalid trace id %s: %v", traceID, err)
		return
	}

	trace, err := stub.Trace(ctx, id)
	if err != nil {
		w.WriteHeader(http.StatusNotFound)
		fmt.Fprintf(w, "Unknown trace id: %s", traceID)
		return
	}

	var buf bytes.Buffer

	vtrace.FormatTrace(&buf, &trace, nil)
	node := vtrace.BuildTree(&trace)

	if node == nil {
		w.WriteHeader(http.StatusInternalServerError)
		fmt.Fprintf(w, "coud not find root span for trace")
		return
	}

	tree := convertToTree(node, findStartTime(node), findEndTime(node))
	data := struct {
		ID          string
		Root        *divTree
		ServerName  string
		CommandLine string
		DebugTrace  string
		Vtrace      *Tracer
	}{
		ID:          traceID,
		Root:        tree,
		ServerName:  server,
		CommandLine: fmt.Sprintf("debug vtraces %q", name),
		Vtrace:      tracer,
		DebugTrace:  buf.String(),
	}
	v.execute(v.ctx, w, r, "vtrace.html", data)
}

//nolint:unused
func internalServerError(w http.ResponseWriter, doing string, err error) {
	w.WriteHeader(http.StatusInternalServerError)
	fmt.Fprintf(w, "Problem %s: %v", doing, err)
}

//nolint:unused
func badRequest(w http.ResponseWriter, problem string) {
	w.WriteHeader(http.StatusBadRequest)
	fmt.Fprint(w, problem)
}

func writeEvent(w http.ResponseWriter, data string) {
	fmt.Fprintf(w, "data: %s\n\n", strings.TrimSpace(data))
}

func writeErrorEvent(w http.ResponseWriter, err error) {
	id := fmt.Sprintf("%v", verror.ErrorID(err))
	writeEvent(w, fmt.Sprintf("ERROR(%v): %v", html.EscapeString(id), html.EscapeString(err.Error())))
}

// Tracer forces collection of a trace rooted at the call to newTracer.
type Tracer struct {
	ctx  *context.T
	span vtrace.Span
}

func newTracer(ctx *context.T) (*context.T, *Tracer) {
	ctx, span := vtrace.WithNewTrace(ctx, "browserserver", nil)
	vtrace.ForceCollect(ctx, 0)
	return ctx, &Tracer{ctx, span}
}

func (t *Tracer) String() string {
	if t == nil {
		return ""
	}
	tr := vtrace.GetStore(t.ctx).TraceRecord(t.span.Trace())
	if len(tr.Spans) == 0 {
		// Do not bother with empty traces
		return ""
	}
	var buf bytes.Buffer
	// nil as the time.Location is fine because the HTTP "server" time is
	// the same as that of the "client" (typically a browser on localhost).
	vtrace.FormatTrace(&buf, vtrace.GetStore(t.ctx).TraceRecord(t.span.Trace()), nil)
	return buf.String()
}


text:
import { Managers } from 'czechidm-core';
import { ProvisioningBreakConfigService } from '../services';

const service = new ProvisioningBreakConfigService();

export default class ProvisioningBreakConfigManager
 extends Managers.EntityManager {

  constructor() {
    super();
  }

  getService() {
    return service;
  }

  getEntityType() {
    return 'ProvisioningBreakConfig';
  }

  getCollectionType() {
    return 'provisioningBreakConfigs';
  }
}


text:
<?php

namespace YASV\Validator;

use YASV\Validator;

/**
 * Checks if a value is not null (and not empty)
 */
class NotNull extends Validator {

    protected $error_message = '"{label}" must be checked';

    public function validate($value) {
        if (is_null($value) || $value == false || $value == '') {
            $this->raiseError();
            return false;
        }
        return $value;
    }

}


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>BLOG</title>
<meta name="description" content="The personal blog of Hossain Mohd. Faysal, a doctoral candidate in Electrical Engineering at University of Pennsylvania.">
<meta name="keywords" content="Hossain, Mohd, Faysal, electrical, engineering, blog, university, pennsylvania, doha, Qatar">

<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://madewithpi.github.io/images/logo3.png">
<meta name="twitter:title" content="BLOG">
<meta name="twitter:description" content="The personal blog of Hossain Mohd. Faysal, a doctoral candidate in Electrical Engineering at University of Pennsylvania.">
<meta name="twitter:creator" content="@hmfaysal">

<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="BLOG">
<meta property="og:description" content="The personal blog of Hossain Mohd. Faysal, a doctoral candidate in Electrical Engineering at University of Pennsylvania.">
<meta property="og:url" content="http://madewithpi.github.io/index.html">
<meta property="og:site_name" content="Notepad">
<meta property="og:image" content="http://madewithpi.github.io/images/">

<link rel="canonical" href="http://madewithpi.github.io/">
<link href="http://madewithpi.github.io/feed.xml" type="application/atom+xml" rel="alternate" title="Notepad Feed">
<link rel="author" href="https://plus.google.com/u/0/102602916593522619858?rel=author">

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700&subset=latin,latin-ext' rel='stylesheet'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600&subset=latin,latin-ext' rel='stylesheet'>
    <link rel="stylesheet" href="http://madewithpi.github.io/assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="http://madewithpi.github.io/assets/css/vendor/normalizeb146.css?v=77a7756db2">
    <link rel="stylesheet" href="http://madewithpi.github.io/assets/css/vendor/foundation.minb146.css?v=77a7756db2">
    <link rel="stylesheet" href="http://madewithpi.github.io/assets/css/styleb146.css?v=77a7756db2">
    <link rel="stylesheet" href="http://madewithpi.github.io/assets/css/postb146.css?v=77a7756db2">

<link rel="shortcut icon" href="http://madewithpi.github.io/favicon.ico">

<link rel="shortcut icon" href="http://madewithpi.github.io/favicon.png">

<link rel="apple-touch-icon-precomposed" href="http://madewithpi.github.io/images/apple-touch-icon-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://madewithpi.github.io/images/apple-touch-icon-72x72-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://madewithpi.github.io/images/apple-touch-icon-114x114-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://madewithpi.github.io/images/apple-touch-icon-144x144-precomposed.png">

            Home

            Featured Posts

            Categories

            About

 Feed

                Notepad

Blogging is fun

                <time datetime="2014-05-15T00:00:00-04:00">

                        15

                        May 2014

                </time>

                        Jekyll + Prose.io

Nothing beats Medium when it comes to blogging. Its overly simplistic, minimal and its true WYSIWYG editor put itself ahead of the races. But there comes a time, when you might need a self hosted blog. Maybe its for a...

                Webdevelopment

                <time datetime="2014-05-15T00:00:00-04:00">

                        15

                        May 2014

                </time>

                        How many things are there?

Awesome post by VSauce

                <time datetime="2014-05-15T00:00:00-04:00">

                        15

                        May 2014

                </time>

                        First Commit

"The beginning is the most important part of the work." Plato I have been away from the blogging scene for quite a while now, suddenly today it dawned upon me that I need to start writing/posting again. My writing is...

                Personal

     Newer

    Page 1 of 1

    	Older

All content copyright MadeWithpi © 2014 • All rights reserved.

Proudly published with Jekyll


text:
package com.opengamma.util.metric;

import java.util.concurrent.TimeUnit;

import org.slf4j.LoggerFactory;

import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Slf4jReporter;
import com.opengamma.util.ArgumentChecker;

/**
 * Contains the {@link MetricRegistry} that should be used by OpenGamma components at runtime.
 * The component system will configure this at startup.
 */
public final class OpenGammaMetricRegistry {

  private static MetricRegistry s_summaryInstance;
  private static MetricRegistry s_detailedInstance;

  /**
   * Creates an instance.
   */
  private OpenGammaMetricRegistry() {
  }

  //-------------------------------------------------------------------------
  public static MetricRegistry getSummaryInstance() {
    initializeIfNecessary();
    return s_summaryInstance;
  }

  public static MetricRegistry getDetailedInstance() {
    initializeIfNecessary();
    return s_detailedInstance;
  }

  /**
   * Sets the summary registry.
   * This should only be set at startup.
   *
   * @param metricRegistry  the registry, not null
   */
  public static synchronized void setSummaryRegistry(final MetricRegistry metricRegistry) {
    ArgumentChecker.notNull(metricRegistry, "metricRegistry");
    s_summaryInstance = metricRegistry;
  }

  /**
   * Sets the detailed registry.
   * This should only be set at startup.
   *
   * @param metricRegistry  the registry, not null
   */
  public static synchronized void setDetailedRegistry(final MetricRegistry metricRegistry) {
    ArgumentChecker.notNull(metricRegistry, "metricRegistry");
    s_detailedInstance = metricRegistry;
  }

  /**
   * Creates a basic registry.
   */
  public static synchronized void createBasicDebuggingRegistry() {
    s_summaryInstance = new MetricRegistry();
    s_detailedInstance = s_summaryInstance;
    final Slf4jReporter logReporter = Slf4jReporter.forRegistry(s_summaryInstance)
                                          .outputTo(LoggerFactory.getLogger(OpenGammaMetricRegistry.class))
                                          .convertRatesTo(TimeUnit.SECONDS)
                                          .convertDurationsTo(TimeUnit.MILLISECONDS)
                                          .build();
    logReporter.start(1, TimeUnit.MINUTES);
    final JmxReporter jmxReporter = JmxReporter.forRegistry(s_summaryInstance).build();
    jmxReporter.start();
  }

  private static void initializeIfNecessary() {
    if (s_summaryInstance == null) {
      createBasicDebuggingRegistry();
    }
  }

}


text:
A mind reading game implemented using Java

#How-to

* Compile ReadYourMind.java
* Run 'java ReadYourMind'
* Play


text:
package org.bdgenomics.adam.rich

import htsjdk.samtools.{ Cigar, TextCigarCodec }
import org.bdgenomics.adam.rich.RichAlignmentRecord._
import org.bdgenomics.formats.avro.AlignmentRecord
import org.scalatest.FunSuite

class RichCigarSuite extends FunSuite {

  test("moving 2 bp from a deletion to a match operator") {
    val read = AlignmentRecord.newBuilder()
      .setReadMapped(true)
      .setStart(0)
      .setCigar("10M10D10M")
      .build()

    val newCigar = RichCigar(new Cigar(read.samtoolsCigar.getCigarElements)).moveLeft(1)
    val newCigar2 = newCigar.moveLeft(1)

    assert(newCigar2.cigar.getReadLength == read.samtoolsCigar.getReadLength)
    assert(newCigar2.cigar.toString === "8M10D12M")
  }

  test("moving 2 bp from a insertion to a match operator") {
    val read = AlignmentRecord
      .newBuilder()
      .setReadMapped(true)
      .setStart(0)
      .setCigar("10M10I10M")
      .build()

    val newCigar = RichCigar(new Cigar(read.samtoolsCigar.getCigarElements)).moveLeft(1)
    val newCigar2 = newCigar.moveLeft(1)

    assert(newCigar2.cigar.getReadLength == read.samtoolsCigar.getReadLength)
    assert(newCigar2.cigar.toString === "8M10I12M")
  }

  test("moving 1 base in a two element cigar") {
    val read = AlignmentRecord
      .newBuilder()
      .setReadMapped(true)
      .setStart(0)
      .setCigar("10M1D")
      .build()

    val newCigar = RichCigar(new Cigar(read.samtoolsCigar.getCigarElements)).moveLeft(1)

    assert(newCigar.cigar.getReadLength == read.samtoolsCigar.getReadLength)
    assert(newCigar.cigar.toString === "9M1D1M")
  }

  test("move to start of read") {
    val read = AlignmentRecord
      .newBuilder()
      .setReadMapped(true)
      .setStart(0)
      .setCigar("1M1D1M")
      .build()

    val newCigar = RichCigar(new Cigar(read.samtoolsCigar.getCigarElements)).moveLeft(1)

    assert(newCigar.cigar.getReadLength == read.samtoolsCigar.getReadLength)
    assert(newCigar.cigar.toString === "1D2M")
  }

  val rightClippedCigar = new RichCigar(TextCigarCodec.decode("10H2S10M"))
  val leftClippedCigar = new RichCigar(TextCigarCodec.decode("12M4S5H"))
  val bothClippedCigar = new RichCigar(TextCigarCodec.decode("1S12M3S2H"))

  test("process right clipped cigar") {
    assert(rightClippedCigar.softClippedBasesAtStart === 2)
    assert(rightClippedCigar.softClippedBasesAtEnd === 0)
  }

  test("process left clipped cigar") {
    assert(leftClippedCigar.softClippedBasesAtStart === 0)
    assert(leftClippedCigar.softClippedBasesAtEnd === 4)
  }

  test("process cigar clipped on both ends") {
    assert(bothClippedCigar.softClippedBasesAtStart === 1)
    assert(bothClippedCigar.softClippedBasesAtEnd === 3)
  }
}


text:
/* global mixitup, h */

/**
 * A group of optional callback functions to be invoked at various
 * points within the lifecycle of a mixer operation.
 *
 * Each function is analogous to an event of the same name triggered from the
 * container element, and is invoked immediately after it.
 *
 * All callback functions receive the current `state` object as their first
 * argument, as well as other more specific arguments described below.
 *
 * @constructor
 * @memberof    mixitup.Config
 * @name        callbacks
 * @namespace
 * @public
 * @since       2.0.0
 */

mixitup.ConfigCallbacks = function() {
    mixitup.Base.call(this);

    this.callActions('beforeConstruct');

    /**
     * A callback function invoked immediately after any MixItUp operation is requested
     * and before animations have begun.
     *
     * A second `futureState` argument is passed to the function which represents the final
     * state of the mixer once the requested operation has completed.
     *
     * @example
Example: Adding an `onMixStart` callback function

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixStart: function(state, futureState) {
     *              console.log('Starting operation...');
     *         }
     *     }
     * });
     *
     * @name        onMixStart
     * @memberof    mixitup.Config.callbacks
     * @instance
     * @type        {function}
     * @default     null
     */

    this.onMixStart = null;

    /**
     * A callback function invoked when a MixItUp operation is requested while another
     * operation is in progress, and the animation queue is full, or queueing
     * is disabled.
     *
     * @example
Example: Adding an `onMixBusy` callback function

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixBusy: function(state) {
     *              console.log('Mixer busy');
     *         }
     *     }
     * });
     *
     * @name        onMixBusy
     * @memberof    mixitup.Config.callbacks
     * @instance
     * @type        {function}
     * @default     null
     */

    this.onMixBusy  = null;

    /**
     * A callback function invoked after any MixItUp operation has completed, and the
     * state has been updated.
     *
     * @example
Example: Adding an `onMixEnd` callback function

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixEnd: function(state) {
     *              console.log('Operation complete');
     *         }
     *     }
     * });
     *
     * @name        onMixEnd
     * @memberof    mixitup.Config.callbacks
     * @instance
     * @type        {function}
     * @default     null
     */

    this.onMixEnd   = null;

    /**
     * A callback function invoked whenever an operation "fails", i.e. no targets
     * could be found matching the requested filter.
     *
     * @example
Example: Adding an `onMixFail` callback function

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixFail: function(state) {
     *              console.log('No items could be found matching the requested filter');
     *         }
     *     }
     * });
     *
     * @name        onMixFail
     * @memberof    mixitup.Config.callbacks
     * @instance
     * @type        {function}
     * @default     null
     */

    this.onMixFail  = null;

    /**
     * A callback function invoked whenever a MixItUp control is clicked, and before its
     * respective operation is requested.
     *
     * The clicked element is assigned to the `this` keyword within the function. The original
     * click event is passed to the function as the second argument, which can be useful if
     * using `<a>` tags as controls where the default behavior needs to be prevented.
     *
     * Returning `false` from the callback will prevent the control click from triggering
     * an operation.
     *
     * @example
Example 1: Adding an `onMixClick` callback function

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixClick: function(state, originalEvent) {
     *              console.log('The control "' + this.innerText + '" was clicked');
     *         }
     *     }
     * });
     *
     * @example
Example 2: Using `onMixClick` to manipulate the original click event

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixClick: function(state, originalEvent) {
     *              // Prevent original click event from bubbling up:
     *              originalEvent.stopPropagation();
     *
     *              // Prevent default behavior of clicked element:
     *              originalEvent.preventDefault();
     *         }
     *     }
     * });
     *
     * @example
Example 3: Using `onMixClick` to conditionally cancel operations

     * var mixer = mixitup(containerEl, {
     *     callbacks: {
     *         onMixClick: function(state, originalEvent) {
     *              // Perform some conditional check:
     *
     *              if (myApp.isLoading) {
     *                  // By returning false, we can prevent the control click from triggering an operation.
     *
     *                  return false;
     *              }
     *         }
     *     }
     * });
     *
     * @name        onMixClick
     * @memberof    mixitup.Config.callbacks
     * @instance
     * @type        {function}
     * @default     null
     */

    this.onMixClick = null;

    this.callActions('afterConstruct');

    h.seal(this);
};

mixitup.BaseStatic.call(mixitup.ConfigCallbacks);

mixitup.ConfigCallbacks.prototype = Object.create(mixitup.Base.prototype);

mixitup.ConfigCallbacks.prototype.constructor = mixitup.ConfigCallbacks;


text:
module Minecraft
  module JSONAPI
    class JSONAPI
      attr_reader :host, :port, :username

      def initialize(options = {})
        raise 'A username must be provided.' if options[:username].nil?
        raise 'A password must be provided.' if options[:password].nil?
        raise 'Please use a salt.'           if options[:salt].nil?

        @host     = options[:host]     || 'localhost'
        @port     = options[:port]     || 20059
        @username = options[:username]
        @password = options[:password]
        @salt     = options[:salt]
      end

      def inspect
        %Q{#<Minecraft::JSONAPI::JSONAPI:#{object_id} @host="#{@host}", @port=#{@port}, @username="#{@username}">}
      end

      def make_url(method, args)
        if method.is_a? Array
          Minecraft::JSONAPI::CALL_MULTIPLE_URL % { host: @host, port: @port, method: Minecraft::JSONAPI.url_encoded_json(method), args: Minecraft::JSONAPI.url_encoded_json(args), key: create_key(method) }
        else
          Minecraft::JSONAPI::CALL_URL          % { host: @host, port: @port, method: Minecraft::JSONAPI.url_encoded_json(method), args: Minecraft::JSONAPI.url_encoded_json(args), key: create_key(method) }
        end
      end

      def call(methods)
        method_names = methods.keys.map(&:to_s)
        method_arguments = methods.values.map { |args| Minecraft::JSONAPI.map_to_array args }

        url = make_url(method_names, method_arguments)
        Minecraft::JSONAPI.send_request(url)
      end

      def method_missing(method, *args, &block)
        if block_given?
          block.call Minecraft::JSONAPI::Namespace.new(self, method.to_s)
        else
          url = make_url(method.to_s, args)
          Minecraft::JSONAPI.send_request(url)
        end
      end

      def create_key(method)
        method = JSON.generate(method) if method.is_a? Array

        Digest::SHA2.new.update([@username, method, @password, @salt].join).to_s
      end

      def namespace
      end
    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Web;
using System.Xml;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using XK.Common.web;

namespace ConsoleAppTest {
    class Program {
        private static void Main(string[] args) {
            //TestM testM = new TestM();
            //Console.WriteLine(testM.GetResult("3"));
            //Console.WriteLine(testM.GetResultBridge("3"));
            //Console.WriteLine("end");
            //Console.Read();

            //                 string xmlSend = @"<xml>
            //                            <ToUserName><![CDATA[123]]></ToUserName>
            //                            <FromUserName><![CDATA[2]]></FromUserName>
            //                            <CreateTime>123</CreateTime>
            //                            <MsgType><![CDATA[text]]></MsgType>
            //                            <Content><![CDATA[333]]></Content>
            //                            </xml>";
            //            XmlDocument xmldoc = new XmlDocument();
            //            xmldoc.LoadXml(xmlSend);
            //            string a = XK.Common.XmlHelper.GetXmlNodeTextByXpath(xmldoc, "//ToUserName");
            //            Console.WriteLine(a);
            //            Console.WriteLine("end");
            //            Console.Read();
            //XK.Common.web.HttpWebHelper webHelper = new HttpWebHelper("http://d.10jqka.com.cn/v2/realhead/hs_600372/last.js");
            //string res = webHelper.GetResponseStr();
            //int firstIndex = res.IndexOf('{');
            //string s = res.Substring(firstIndex).TrimEnd(')');

            //JObject jo = (JObject)JsonConvert.DeserializeObject(s);
            //string zone = jo["items"]["7"].ToString();
            //Newtonsoft.Json.JsonReader reader=new JTokenReader();

            string reqBase = "http://news.10jqka.com.cn/public/index_keyboard_{0}_stock,hk,usa_5_jsonp.html";
            string reqUrl = string.Format(reqBase, "zh");
            XK.Common.web.HttpWebHelper webHelper = new HttpWebHelper(reqUrl);
            string res = HttpUtility.UrlDecode(webHelper.GetResponseStr());
            int firstIndex = res.IndexOf('[');
            string s = res.Substring(firstIndex).TrimEnd(')');
            var a = s.Substring(1);
            var aa = a.Substring(0, a.Length - 1);
            var aa1 = aa.Substring(1);
            var aindex = aa1.IndexOf(']');
            var aa2 = aa1.Substring(0, aindex);
            var rarr = aa2.Split(',');
            List<string> stocks = new List<string>();
            foreach (string s1 in rarr) {
                var sArr = s1.Split(' ');
                string code = sArr[0];
                string name = sArr[1]  ;

                string outStr = "";
                if (!string.IsNullOrEmpty(name)) {
                    string[] strlist = name.Replace("\\", "").Split('u');
                    try {
                        for (int i = 1; i < strlist.Length; i++) {
                            //将unicode字符转为10进制整数,然后转为char中文字符
                            outStr += (char)int.Parse(strlist[i], System.Globalization.NumberStyles.HexNumber);
                        }
                    }
                    catch (FormatException ex) {
                        outStr = ex.Message;
                    }
                }
                stocks.Add(code + " " + outStr);
            }
            Console.WriteLine(string.Join("\n", stocks));
          //  Console.WriteLine("\u4e2d\u822a\u7535\u5b50");
            Console.Read();
        }

    }

    public class TestM {

        #region 普通 if else 逻辑判断

        /// <summary>
        /// 普通 if else
        /// </summary>
        /// <param name="act"></param>
        /// <returns></returns>
        public string GetResult(string act) {
            if (act == "1") {
                return n1();
            }
            else if (act == "2") {
                return n2();
            }
            else if (act == "3") {
                return n3();
            }
            return "unknow";
        }

        #endregion

        #region 不用 if else 用委托进行逻辑判断(免除大量的 if else 分支判断)

        private readonly Dictionary<string, Func<string>> dicFunc = new Dictionary<string, Func<string>>();

        public TestM() {
            dicFunc.Add("1", n1);
            dicFunc.Add("2", n2);
            dicFunc.Add("3", n3);
        }

        public string GetResultBridge(string num) {
            Func<string> methodFunc;
            //bool has = dicFunc.TryGetValue(num, out methodFunc);
            //if (!has) {
            //    return "unknow";
            //}
            methodFunc = dicFunc.FirstOrDefault(d => d.Key == num).Value;
            if (methodFunc == null) {
                return "unknow";
            }
            string res = methodFunc();
            return res;
        }

        #endregion

        private string n1() {
            return "n1";
        }

        private string n2() {
            return "n2";
        }

        private string n3() {
            return "n3";
        }

    }

}


text:
if applications.find(&:meteor?)
  execute 'curl https://install.meteor.com/ | sh' do
    creates '/usr/local/bin/meteor'
  end
end


text:
namespace binary_format
{

class SizeCountingSerializer : public SerializerMixin<SizeCountingSerializer>
{
    boost::uintmax_t byteCount;
public:
    SizeCountingSerializer()
        : byteCount(0)
    {
    }

    /// @brief Returns number of bytes that has been stored to this serializer so far.
    boost::uintmax_t getByteCount()
    {
        return byteCount;
    }

    bool saving()
    {
        return true;
    }

public:
    void serializeData(boost::uint8_t* data, size_t size)
    {
        byteCount += size;
    }
};

} // namespace binary_format

#endif // BinaryFormatSerializer_SizeCountingSerializer_H


text:
=================================
Deploying without BMC Credentials
=================================

The Bare Metal service usually requires BMC credentials for all provisioning
operations. Starting with the Victoria release series there is limited support
for inspection, cleaning and deployments without the credentials.

.. warning::
   This feature is experimental and only works in a limited scenario. When
   using it, you have to be prepared to provide BMC credentials in case of
   a failure or any non-supported actions.

How it works
============

The expected workflow is as follows:

#. The node is discovered by manually powering it on and gets the
   `manual-management` hardware type and `agent` power interface.

   If discovery is not used, a node can be enrolled through the API and then
   powered on manually.

#. The operator moves the node to `manageable`. It works because the `agent`
   power only requires to be able to connect to the agent.

#. The operator moves the node to `available`. Cleaning happens normally via
   the already running agent. If reboot is needed, it is done by telling the
   agent to reboot the node in-band.

#. A user deploys the node. Deployment happens normally via the already
   running agent.

#. In the end of the deployment, the node is rebooted via the reboot command
   instead of power off+on.

Enabling
========

:doc:`fast-track` is a requirement for this feature to work. After enabling it,
adds the ``agent`` power interface and the ``manual-management`` hardware type
to the enabled list:

.. code-block:: ini

   [DEFAULT]
   enabled_hardware_types = manual-management
   enabled_management_interfaces = noop
   enabled_power_interfaces = agent

   [deploy]
   fast_track = true

As usual with the ``noop`` management, enable the networking boot fallback:

.. code-block:: ini

   [pxe]
   enable_netboot_fallback = true

If using discovery, :ironic-inspector-doc:`configure discovery in
ironic-inspector <user/usage.html#discovery>` with the default driver set
to ``manual-management``.

Limitations
===========

* Only the ``noop`` network interface is supported.

* Undeploy and rescue are not supported, you need to add BMC credentials first.

* If any errors happens in the process, recovery will likely require BMC
  credentials.

* Only rebooting is possible through the API, power on/off commands will fail.


text:
/***************
 * MODUL:         LWOB handler (Lighwave Object File Format)
 * NAME:          lwob.h
 * DESCRIPTION:   In this module are all the definitions to read LWOB-files
 * AUTHORS:       Andreas Heumann, Mike Hesser
 * HISTORY:
 *    DATE     NAME  COMMENT
 *    24.09.97 ah    initial release
 ***************/

#ifndef LWOB_H
#define LWOB_H

#ifndef TYPEDEFS_H
#include "typedefs.h"
#endif

#ifndef COLOR_H
#include "color.h"
#endif

#define ID_LWOB MAKE_ID('L','W','O','B')	// LightWave object
#define ID_PNTS MAKE_ID('P','N','T','S')	// points
#define ID_SRFS MAKE_ID('S','R','F','S')	// surface names
#define ID_POLS MAKE_ID('P','O','L','S')	// polygons
#define ID_SURF MAKE_ID('S','U','R','F')	// surface attributes
#define ID_COLR MAKE_ID('C','O','L','R')	// color
#define ID_FLAG MAKE_ID('F','L','A','G')	// flag
#define ID_LUMI MAKE_ID('L','U','M','I')	// luminosity
#define ID_DIFF MAKE_ID('D','I','F','F')	// diffuse
#define ID_SPEC MAKE_ID('S','P','E','C')	// specular
#define ID_REFL MAKE_ID('R','E','F','L')	// reflection
#define ID_TRAN MAKE_ID('T','R','A','N')	// transparency
#define ID_GLOS MAKE_ID('G','L','O','S')	// glossiness
#define ID_RIMG MAKE_ID('R','I','M','G')	// reflection image
#define ID_RSAN MAKE_ID('R','S','A','N')	// reflection map seam heading angle
#define ID_RIND MAKE_ID('R','I','N','D')	// refractive index
#define ID_EDGE MAKE_ID('E','D','G','E')	// edge transparency threshold
#define ID_SMAN MAKE_ID('S','M','A','N')	// smooth shaded angle
#define ID_CTEX MAKE_ID('C','T','E','X')	// color texture
#define ID_DTEX MAKE_ID('D','T','E','X')	// diffuse texture
#define ID_STEX MAKE_ID('S','T','E','X')	// specular texture
#define ID_RTEX MAKE_ID('R','T','E','X')	// reflection texture
#define ID_TTEX MAKE_ID('T','T','E','X')	// transparency texture
#define ID_BTEX MAKE_ID('B','T','E','X')	// bump texture
#define ID_TIMG MAKE_ID('T','I','M','G')	// texture mapping image
#define ID_TFLG MAKE_ID('T','F','L','G')	// texture flag
#define ID_TSIZ MAKE_ID('T','S','I','Z')	// texture size
#define ID_TCTR MAKE_ID('T','C','T','R')	// texture center
#define ID_TFAL MAKE_ID('T','F','A','L')	// texture falloff
#define ID_TVEL MAKE_ID('T','V','E','L')	// texture velocity
#define ID_TCLR MAKE_ID('T','C','L','R')	// texture color
#define ID_TVAL MAKE_ID('T','V','A','L')	// texture value
#define ID_TAMP MAKE_ID('T','A','M','P')	// texture amplitude (bump)
#define ID_TFRQ MAKE_ID('T','F','R','Q')	// texture noise frequencies
#define ID_TSP0 MAKE_ID('T','S','P','0')	// texture parameter 0
#define ID_TSP1 MAKE_ID('T','S','P','1')	// texture parameter 1
#define ID_TSP2 MAKE_ID('T','S','P','2')	// texture parameter 2

#endif // LWOB_H


text:
using System.Linq;
using Entitas.Unity;
using UnityEditor;
using UnityEngine;

namespace Entitas.VisualDebugging.Unity.Editor {

    [CustomEditor(typeof(EntityLink))]
    public class EntityLinkInspector : UnityEditor.Editor {

        public override void OnInspectorGUI() {
            var link = (EntityLink)target;

            if (link.entity != null) {
                if (GUILayout.Button("Unlink")) {
                    link.Unlink();
                }
            }

            if (link.entity != null) {
                EditorGUILayout.Space();

                EditorGUILayout.LabelField(link.entity.ToString());

                if (GUILayout.Button("Show entity")) {
                    Selection.activeGameObject = FindObjectsOfType<EntityBehaviour>()
                        .Single(e => e.entity == link.entity).gameObject;
                }

                EditorGUILayout.Space();

                EntityDrawer.DrawEntity(link.entity);
            } else {
                EditorGUILayout.LabelField("Not linked to an entity");
            }
        }
    }
}


text:
HaarTasks::HaarTasks(void) {;}

HaarStage HaarTasks::readStage(const int x,
                               const QDomElement & de)
{
    HaarStage stage(x, de);
    return stage;
}


text:
package com.containant

import scala.reflect.ClassTag
import com.containant.heuristics._

class ContainAnt(heuristic: Heuristic) {

  def create[T](module: Module, optimizeFor: T => Double)(implicit ev: ClassTag[T]): T = {
    val grammar = new ModuleGrammar(module)
    def fitness(tree: grammar.SyntaxTree): Double = grammar.construct(tree) match {
      case (t: T) => optimizeFor(t)
      case _      => 0
    }
    val target: grammar.Sort = ev.runtimeClass
    val result: T = heuristic(grammar)( fitness, target ) match {
      case None => throw new Exception("Could not satisfy constraint")
      case Some(x) => grammar.construct(x).asInstanceOf[T]
    }
    result
  }

}


text:
(function () {
  'use strict';

  module('utils', function () {
    var utils = {};

    utils.isArray = function (obj) {
      return Object.prototype.toString.call(obj) === '[object Array]';
    };

    utils.isBoolean = function (value) {
      return typeof value === 'boolean';
    };

    utils.isFunction = function (obj) {
      return Object.prototype.toString.call(obj) === '[object Function]';
    };

    utils.isNaN = function (value) {
      return typeof value === 'number' && isNaN(value);
    };

    utils.isNull = function (value) {
      return Object.prototype.toString.call(value) === '[object Null]';
    };

    utils.isNumber = function (value) {
      return typeof value === 'number' && !isNaN(value);
    };

    utils.isObject = function (obj) {
      return Object.prototype.toString.call(obj) === '[object Object]';
    };

    utils.isPrimitive = function (value) {
      var type = '';
      var match;

      if (utils.isUndefined(value)) {
        return true;
      }

      match = Object.prototype.toString.call(value).match(/^\[object\s(.*)\]$/);
      type = match && match[1] || '';

      switch (type) {
        case 'Number':
        case 'Boolean':
        case 'Null':
        case 'String':
          return true;
      }
    };

    utils.isString = function (value) {
      return typeof value === 'string';
    };

    utils.isUndefined = function (value) {
      return typeof value === 'undefined';
    };

    utils.objectType = function (obj) {
      var type = '';
      var match;

      if (utils.isUndefined(obj)) {
        return 'undefined';
      }

      if (utils.isObject(obj)) {
        return 'object';
      }

      if (utils.isNaN(obj)) {
        return 'nan';
      }

      match = Object.prototype.toString.call(obj).match(/^\[object\s(.*)\]$/);
      type = match && match[1] || '';

      switch (type) {
        case 'Array':
        case 'Boolean':
        case 'Date':
        case 'Function':
        case 'Number':
        case 'Null':
        case 'RegExp':
        case 'String':
          return type.toLowerCase();
      }
    };

    module.exports = utils;
  });
}());