text:
[awesome-link]:  https://github.com/sindresorhus/awesome
[awesome-badge]: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
[travis-link]:   https://travis-ci.org/sotayamashita/awesome-css
[travis-badge]:  https://api.travis-ci.org/sotayamashita/awesome-css.svg

# Awesome CSS  [![awesome][awesome-badge]][awesome-link]
> A curated list of awesome frameworks, style guide and other cool nuggets for the amazing CSS

* [Awesome CSS](#awesome-css)
  * [Preprocessors](#preprocessors)
  * [Framework](#frameworks)
  * [Structure](#css-structure)
  * [Reset & Normalize](#reset-and-normalize)
  * [CSS Development at Large-Scale Websites](#css-development-at-large-scale-websites)
  * [Code Style Guideline](#code-style-guideline)
  * [Style Guide](#style-guide)
  * [Naming conventions & Methodologies](#naming-conventions--methodologies)
  * [CSS in JS](#css-in-js)
  * [CSS Polyfills](#css-polyfills)
  * [Miscellaneous](#miscellaneous)
  * [Resources](#resources)
* [Resources](#resources)
    * [Podcasts](#podcasts)
    * [Twitter](#twitter)
    * [Videos](#videos)
* [Contributing](#contributing)
* [License](#license)

## Preprocessors

*Build CSS faster*

* [LESS](https://github.com/less/less.js) - Backwards compatible with CSS and the extra features it adds use existing CSS syntax.
* [PostCSS](https://github.com/postcss/postcss) - Transforming CSS with JS plugins.
* [Sass](https://github.com/sass/sass) - Mature, stable, and powerful professional grade CSS extension language.
* [Stylus](http://learnboost.github.io/stylus/) - Expressive, robust, feature-rich CSS language built for nodejs.

_[Find more CSS preprocessors on wiki](https://github.com/sotayamashita/awesome-css/wiki#preprocessors)_

## Frameworks

* [960 Grid System](http://960.gs/) - An effort to streamline web development workflow.
* [Blueprint](http://www.blueprintcss.org/) - CSS framework who gives you an easy-to-use grid system, sensible typography, useful plugins and stylesheet for printing.
* [Bootstrap](http://getbootstrap.com/) - Most popular HTML, CSS, and JS framework.
* [inuit.css](http://inuitcss.com/) - Powerful, scalable, Sass-based, BEM, OOCSS framework.
* [Foundation](http://foundation.zurb.com/) - advanced responsive front-end framework.
* [Material Design Lite](https://getmdl.io/started/) - Great framework to make cool Material Design websites.
* [Materialize](http://materializecss.com/) - A modern responsive front-end framework based on Material Design.
* [Pure.css](http://purecss.io/) - A set of small, responsive CSS modules that you can use in every web project.
* [Scooter](http://dropbox.github.io/scooter/) - SCSS framework built to provide base styles, CSS components, and rapid static prototyping for Dropbox.
* [Semantic UI](http://semantic-ui.com/) - Powerful framework that use friendly-human html.
* [Skeleton](http://getskeleton.com/) - A dead simple, responsive boilerplate.
* [UIkit](http://getuikit.com/) - A lightweight and modular front-end framework.
* [unsemantic](http://unsemantic.com/) - Fluid grid for mobile, tablet, and desktop.

## Toolkits
* [Basscss](http://www.basscss.com/) - a lightweight collection of base element styles and immutable utilities.
* [Bourbon](http://bourbon.io/) - simple and lightweight mixin library for Sass.
* [Corpus](http://corpuscss.com/) - Yet another CSS toolkit.
* [Susy](http://susy.oddbird.net/) - Responsive layout toolkit for Sass.

## CSS Structure

- [RSCSS](https://github.com/rstacruz/rscss) - Reasonable Standard for CSS Stylesheet Structure.
- [ITCSS](https://twitter.com/itcss_io) - A sane, scalable, managed CSS architecture for large UI projects.

## Reset and Normalize

- [Normalize](https://github.com/necolas/normalize.css) - A set of CSS rules that provide better cross-browser consistency in the default styling of HTML elements.
- [Normalize-OpenType](https://github.com/kennethormandy/normalize-opentype.css) - Adds OpenType features—ligatures, kerning, and more—to Normalize.css.
- [Reset](http://meyerweb.com/eric/tools/css/reset/) - A set of CSS rules that resets the styling of all HTML elements to a consistent baseline.
- [sanitize.css](https://github.com/jonathantneal/sanitize.css/) - A set of CSS rules that style with today's best practices out-of-the-box
- [unstyle.css](https://github.com/Martin-Pitt/css-unstyle) - Specialised stylesheet for removing user agent styles, style the web with your baseline

## CSS Development at Large-Scale Websites

* [GitHub's CSS](http://markdotto.com/2014/07/23/githubs-css/) by [Mark Otto](https://twitter.com/mdo).
* [CodePen's CSS](http://codepen.io/chriscoyier/post/codepens-css) by [Chris Coyier](https://twitter.com/chriscoyier).
* [Lonely Planet](http://ianfeather.co.uk/css-at-lonely-planet/) by [Ian Feather](https://twitter.com/ianfeather).
* [CSS at Groupon](http://mikeaparicio.com/2014/08/10/css-at-groupon/) by [Mike Aparicio](https://twitter.com/peruvianidol).
* [CSS AT HOOTSUITE](http://code.hootsuite.com/css-at-hootsuite/) by Steve Mynett.
* [Refining The Way We Structure Our CSS At Trello](http://blog.trello.com/refining-the-way-we-structure-our-css-at-trello/) by [Bobby Grace](https://twitter.com/bobbygrace).
* [Bugsnag's CSS Architecture](http://blog.bugsnag.com/bugsnags-css-architecture) by [Max Luster](https://twitter.com/maxluster).
* [How we do CSS at Ghost](https://dev.ghost.org/css-at-ghost/) by Paul Davis.
* [Medium's CSS is actually pretty f***ing good.](https://medium.com/@fat/mediums-css-is-actually-pretty-fucking-good-b8e2a6c78b06) by [Jacob Thornton](https://twitter.com/fat).

## Code Style Guideline

* [idiomatic CSS](https://github.com/necolas/idiomatic-css) by [Nicolas Gallagher](https://twitter.com/necolas).
* [CSS Styleguide](https://github.com/grvcoelho/css) by [Guilherme Rv Coelho](https://github.com/grvcoelho).
* [CSS Guidelines](http://cssguidelin.es/) by [Harry Roberts](https://twitter.com/csswizardry).
* [Sass Guidelines](https://sass-guidelin.es/) by [Hugo Giraudel](https://twitter.com/HugoGiraudel).
* [Code Guide](http://codeguide.co/) by [Mark Otto](https://twitter.com/mdo).
* [ThinkUp CSS Style Guide](https://github.com/ThinkUpLLC/ThinkUp/wiki/Code-Style-Guide:-CSS) by ThinkUp.
* [Google HTML/CSS Style Guide](https://google.github.io/styleguide/htmlcssguide.xml) by Google.
* [WordPress CSS Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/) by WorldPress.

## Style Guide

* [AUI](https://docs.atlassian.com/aui/latest/) by [Atlassian Design](https://design.atlassian.com/).
* [Design Elements](http://rizzo.lonelyplanet.com/styleguide/design-elements/colours) by [lonely planet](http://www.lonelyplanet.com/).
* [Dropbox (S)CSS Style Guide](https://github.com/dropbox/css-style-guide) by Dropbox
* [GitHub CSS Style Guide](http://primercss.io) by Github.
* [Official Trello CSS Guide](https://gist.github.com/bobbygrace/9e961e8982f42eb91b80) by [Bobby Grace](https://twitter.com/bobbygrace).
* [Solid](http://solid.buzzfeed.com/) by BuzzFeed.
* [Patterns](http://ux.mailchimp.com/patterns) by [MailChimp](http://mailchimp.com/).
* [Lighting Design System](https://www.lightningdesignsystem.com/) by [Salesforce](http://www.salesforce.com/).
* [Walmart Web Style Guide](http://walmartlabs.github.io/web-style-guide/)
* [SASS Style Guide](http://sass-lang.com/styleguide) by Sass team.
* [Style Guide](http://www.starbucks.com/static/reference/styleguide/) by [Starbucks](http://www.starbucks.com/).
* [Website Style Guide Resources](http://styleguides.io/examples.html) by [Awesome people](https://github.com/maban/styleguides/graphs/contributors).

Here is also great resource to understand. [Website style guide resource](http://styleguides.io/)

# Naming conventions & Methodologies

* [Atomic OOBEMITSCSS](http://www.sitepoint.com/atomic-oobemitscss/)
* [BEM](https://en.bem.info/)
* [SMACSS](https://smacss.com/)
* [Point North](http://pointnorth.io/#base-browser-styling)
* [ITCSS](http://itcss.io/)
* [OOCSS](https://www.smashingmagazine.com/2011/12/an-introduction-to-object-oriented-css-oocss/)
* [Title CSS](http://www.sitepoint.com/title-css-simple-approach-css-class-naming/)
* [idiomatic-css](https://github.com/necolas/idiomatic-css)
* [Atomic Design](http://patternlab.io/resources.html)
* [SUIT CSS](https://github.com/suitcss/suit/blob/master/doc/naming-conventions.md#u-utilityname)
* [Kickoff CSS](http://trykickoff.com/learn/css.html#namingscheme)
* [MaintainableCSS](http://maintainablecss.com)

# CSS in JS

* [babel-plugin-css-in-js](https://github.com/martinandert/babel-plugin-css-in-js)
* [react-styled](https://github.com/bloodyowl/react-styled)
* [classy](https://github.com/inturn/classy)
* [csjs](https://github.com/rtsao/csjs)
* [css-loader](https://github.com/webpack/css-loader)

Here is [CSS in JS techniques comparison](https://github.com/MicheleBertoli/css-in-js)

# CSS Polyfills

* [polyfill.js](https://github.com/philipwalton/polyfill/) - A library to make creating CSS polyfills much easier.
* [prefixfree](https://github.com/LeaVerou/prefixfree) - Break free from CSS prefix hell!
* [fixed-sticky](https://github.com/filamentgroup/fixed-sticky) - A CSS position:sticky polyfill.
* [selectivizr](https://github.com/keithclark/selectivizr) - selectivizr is a JavaScript utility that emulates CSS3 pseudo-classes and attribute selectors in Internet Explorer 6-8.
* [PIE](https://github.com/lojjic/PIE) - A behavior for Internet Explorer allowing it to recognize and render various CSS3 box decoration properties.

# Miscellaneous

* [Single Div Project](https://github.com/ManrajGrover/SingleDivProject) - One `<div>`. Many possibilities.

# References

* [scalable-css-reading-list](https://github.com/davidtheclark/scalable-css-reading-list)

# Resources

## Podcasts

*Something to listen to while programming.*

* [Shop Talk Show](http://shoptalkshow.com/) - A live podcast with Chris Coyier and Dave Rupert about front end web design, development, and UX.
* [Style Guide Podcast](http://styleguides.io/podcast/index.html) - A small batch series of interviews on Style Guides, hosted by Anna Debenham and Brad Frost.
* [The Big Web Show](http://5by5.tv/bigwebshow/) - topics like web publishing, art direction, content strategy, typography, web technology, and more. It's everything web that matters.
* [The Web Ahead](http://5by5.tv/webahead/) - Conversations with world experts on changing technologies and future of the web.
* [Non Breaking Space Show](http://goodstuff.fm/nbsp) - Seeking out the best, brightest, and smartest creative people on digital art, design, and development.
* [The Changelog](https://changelog.com/) - The tagline for the Changelog says it all: "Open Source moves fast. Keep up." This podcast, and the accompanying blog, is all about keeping you updated with the latest in Open Source Technology.

## Twitter

*Active accounts to follow.*

* [CSS Animation](https://twitter.com/cssanimation)
* [Andrey Sitnik](https://twitter.com/andreysitnik) - Author of @Autoprefixer, http://easings.net  and @PostCSS.
* [Evangelina Ferreira](https://twitter.com/evaferreira92) - Web Designer. Professor at @multimedial_utn HTML5 & CSS Freak. Ocassional Translator.
* [Sara Soueidan](https://twitter.com/SaraSoueidan) - Author of the @Codrops CSS Reference & Co-author of the Smashing Book #5.
* [Hugo Giraudel](https://twitter.com/HugoGiraudel) - CSS goblin & Sass hacker at @edenspiekermann.
* [Guy Routledge](https://twitter.com/guyroutledge) - Front-end dev, Teacher @GA_London, Screencaster at http://www.atozcss.com, property snob, Foodie.
* [Heydon Pickering](https://twitter.com/heydonworks) - Moderate consumer of rice. Also a UX designer, author, @smashingmag editor and programmer.
* [Adam Morse](https://twitter.com/mrmrs_) - Advocate for users and open-source.
* [Donovan Hutchinson](https://twitter.com/donovanh) - Designer, developer, writer. Occasionally blogs at http://Hop.ie , and currently building @cssanimation.
* [CSS Commits](https://twitter.com/CSScommits) - Latest commits to @CSSWG's public Mercurial repository.
* [Scott Jehl](https://twitter.com/scottjehl) - Author of @responsiblerwd, now on sale from @abookapart.
* [Dudley Storey](https://twitter.com/dudleystorey) - Web development writer, teacher, and speaker.
* [Zoe M. Gillenwater](https://twitter.com/zomigi) - Web designer/developer specializing in CSS, RWD, UX, & accessibility.
* [Ben Briggs](https://twitter.com/ben_eb) - Final year web technologies student. node.js, javascript, open source modules, client side optimisation, web performance.
* [Paul Lewis](https://twitter.com/aerotwist) - Googler who noodles with code and design.
* [Thierry Koblentz](https://twitter.com/thierrykoblentz) - CSSer @ Yahoo Only Tweeting Tech.
* [Nicolas Gallagher](https://twitter.com/necolas) - Software Engineer at @twitter.
* [Harry Roberts](https://twitter.com/csswizardry)- Consultant Front-end Architect: @google, @Etsy, @kickstarter, @BBC, @Deloitte, @FT, more.
* [Phil Walton](https://twitter.com/philwalton) - Engineer at Google • Open Source Advocate • Developer • Designer • Writer.
* [Lea Verou](https://twitter.com/LeaVerou) - Research Assistant @MIT_CSAIL, @CSSWG IE, @OReillyMedia author, Ex @W3C staff.
* [Manoela Ilic](https://twitter.com/crnacura) - ...aka Mary Lou @codrops ༶ CSS & HTML are my crayons ༶ Interested in Cognitive Science, AI, HCI, UI Design & Astrophysics ༶ Digital nomad.
* [Una Kravets](https://twitter.com/Una) - Front-end @IBMDesign. Sassvocate, community builder, & handcrafter. STEMinist :) Open source all the things!
* [Chris Coyier](https://twitter.com/chriscoyier) - Designer @CodePen. Writer @Real_CSS_Tricks.
* [Nicole Sullivan](https://twitter.com/stubbornella) - GEEK!
* [Eric Bidelman](https://twitter.com/ebidel) - Engineer at Google working on Chrome, web components, and Polymer.
* [Patrick Hamann](https://twitter.com/patrickhamann) - Lover of mountains, craft beers and discovering new food.
* [Dave McFarland](https://twitter.com/davemcfarland) - Web developer, author of CSS: The Missing Manual, JavaScript & jQuery.
* [L. David Baron](https://twitter.com/davidbaron) - Mozilla developer, CSS and W3C standards diplomat.
* [Daniel Glazman](https://twitter.com/glazou)W3C CSS Working Group Co-chairman, entrepreneur, software engineer, geek, father of two, polyglot, duck lover. Nah. Tweets are strictly mine.
* [The Chris Eppstein](https://twitter.com/chriseppstein) - Loves love. Hates hate. Has a kick-ass family. Writes code. Leads stylesheet tech @LinkedIn.
* [앗킨스 탭](https://twitter.com/tabatkins) - Literally Jenn Schiffer's Mom.
* [Natalie Weizenbaum](https://twitter.com/nex3) - Trans coder lady. Lead designer/developer of @SassCSS, working for @google on @dart_lang.
* [Brad Frost](https://twitter.com/brad_frost) - Web designer, speaker, writer, consultant, musician.
* [Maxime Thirouin](https://twitter.com/MoOx) - Freelance front-end vigilante, UI/UX developer.
* [Mark Otto](https://twitter.com/mdo) - GitHub and Bootstrap. Formerly at Twitter. Huge nerd.
* [Simon](https://twitter.com/simurai) - UI designer, CSS doodler.
* [Connor Sears](https://twitter.com/connors) - Designer at GitHub.
* [Remy Sharp](https://twitter.com/rem) - All about CSS sizing units.
* [Jonathan Snook](https://twitter.com/snookca) - Designer, Developer, Writer, Speaker. I make stuff on the web. I wrote SMACSS.

## Videos

*A useful list of must-watch videos. This list was taken from [AllThingsSmitty/must-watch-css](https://github.com/AllThingsSmitty/must-watch-css) of [908a28](https://github.com/AllThingsSmitty/must-watch-css/commit/908a28bf36517a5bac9a34e3174885ea57a62017). [I told him on Twitter](https://twitter.com/sota0805/status/527635856031375360). Thank you so much.*

###2015

1. [**mdo-ular CSS**](http://jqueryuk.com/2015/videos.php?s=mdo-ular-css): Mark Otto, jQuery UK `30:06`.
1. [**CSS Architecture with SMACSS**](https://www.youtube.com/watch?v=6co781JgoqQ): Caleb Meredith, DevTips channel `30:15`.
1. [**CSS Workflow from the Ground Up**](https://www.youtube.com/watch?v=ZVk3GQHfkbU): Jonathan Snook, Generate conf 2015 `46:06`.

###2014

1. [**What Is a CSS Framework Anyway?**](https://vimeo.com/95734680): Harry Roberts, Industry Conf `48:48`.
1. [**CSS Is a Mess**](https://vimeo.com/99877232): Jonathan Snook, Beyond Tellerand `53:49`.
1. [**10 Commandments for Efficient CSS Architecture**](https://www.youtube.com/watch?v=FYcu-wWrNqo&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Kushagra Gour, CSSConf.Asia `35:55`.
1. [**Slaying the Dragon: How to Refactor CSS for Maintainability**](https://vimeo.com/100501790): Alicia Liu, Front-Trends `33:21`.
1. [**CSS in Your Pocket - Mobile CSS Tips from the Trenches**](https://www.youtube.com/watch?v=vBHt61yDO9U&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Angelina Fabbro, CSSConf.US `34:19`.
1. [**Styling and Animating Scalable Vector Graphics with CSS**](https://www.youtube.com/watch?v=lf7L8X6ZBu8&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Sara Soueidan, CSSConf.EU `29:16`.
1. [**Play Nice With CSS Tools and Methodologies**](https://www.youtube.com/watch?v=-bZSTMLqf8Q&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Brad Westfall, HTML5DevConf `42:47`.
1. [**CSS and the Critical Path**](https://www.youtube.com/watch?v=_0Fk85to6hA&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Patrick Hamann, CSSConf.EU `33:42`.
1. [**All the Right Moves: How to Put Your UI in Motion**](http://livestream.com/accounts/6779986/events/2928486/videos/51426837): Val Head, Multi-Mania `45:49`.
1. [**Present and Future of CSS Layout**](https://vimeo.com/98746172): Tab Atkins, CSS Day `49:31`.
1. [**Thinking Beyond "Scalable CSS"**](https://www.youtube.com/watch?v=L8w3v9m6G04&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Nicolas Gallagher, dotCSS `28:46`.
1. [**Web Components & the Future of CSS**](https://www.youtube.com/watch?v=QHxrr6Q82yI&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Philip Walton, SFHTML5 `40:02`.
1. [**CSS Performance Tooling**](https://www.youtube.com/watch?v=FEs2jgZBaQA&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Addy Osmani, CSSConf.EU `46:27`.
1. [**3.14 Things I Didn't Know About CSS**](https://vimeo.com/100264064): Mathias Bynens, CSS Day `45:35`.
1. [**Effortless Style**](https://vimeo.com/101718785): Heydon Pickering, CSS Day `49:51`.
1. [**CSS: Yawn to Yay!**](https://vimeo.com/99916682) Kyle Simpson, Front-Trends `39:04`.

###2013

1. [**When Bootstrap Attacks**](https://www.youtube.com/watch?v=xbpnqbM6cRk&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Pamela Fox, CSSConf.US `28:48`.
1. [**CSS in the 4th Dimension**](https://www.youtube.com/watch?v=NTJUFQmHbvc&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Lea Verou, JSConf.Asia `44:49`.
1. [**Automated CSS Testing**](https://www.youtube.com/watch?v=2PU6JX4S7zI&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Jakob Mattsson, JSConf.Asia `42:07`.
1. [**CSSConf.EU Keynote**](https://www.youtube.com/watch?v=ue-Z_HxS3cc&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Nicole Sullivan, CSSConf.EU `20:57`.
1. [**CSS Application Architecture**](https://vimeo.com/74359951): Nicolas Gallagher, SmashingConf `38:36`.
1. [**Realigning & Refactoring UI**](https://www.youtube.com/watch?v=I82ytAWxzrI&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Jina Bolton, SassConf `48:08`.
1. [**Normalizing Designs for Better Quality CSS**](https://www.youtube.com/watch?v=ldx4ZFxMEeo&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Harry Roberts, CSSConf.EU `43:40`.
1. [**Automating the Removal of Unused CSS**](https://www.youtube.com/watch?v=833xr1MyE30&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Addy Osmani, Velocity Europe Conference `5:57`.
1. [**The Humble Border-Radius**](https://www.youtube.com/watch?v=2iFw2GCOPj0&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Lea Verou, Future of Web Design `37:07`.
1. [**The Mind-blowing Power of Sass 3.3**](https://www.youtube.com/watch?v=-ZJeOJGazgE&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Chris Eppstein, CSSConf.EU `38:54`.
1. [**Front-End Tools for the Young Developer**](https://www.youtube.com/watch?v=5_nt5qV15po&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Christian Vuerings, SF HTML5 User Group `14:16`.
1. [**Maths-Powered Transforms for Creating 3D Shapes**](https://www.youtube.com/watch?v=w9HeWBH_kvg&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Ana-Maria Tudor, CSSConf.EU `30:27`.
1. [**Sass and OOCSS Sitting in a Tree K-I-S-S-I-N-G**](https://vimeo.com/66039168): Nicole Sullivan, TXJS `27:50`.
1. [**CSS Levels Up**](https://www.youtube.com/watch?v=UpVj5azI-iI&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Angelina Fabbro, CSSConf.EU `31:38`.
1. [**Architecting Scalable CSS**](https://vimeo.com/70041549): Harry Roberts, Beyond Tellerand `41:57`.
1. [**More CSS Secrets: Another 10 Things You May Not Know about CSS**](https://www.youtube.com/watch?v=3ikye7Qc7Ak&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Lea Verou, W3Conf `60:39`.
1. [**Atomic Cascading Style Sheets**]( https://www.youtube.com/watch?v=ojj_-6Xiud4): Renato Iwashima, HTML5DevConf `52:33`.

###2012

1. [**Open Source Tools and Libraries for Designers**](https://www.youtube.com/watch?v=hFdbE6T9QGc&list=PLUS3uVC08ZaqVEGFkl_dS_3FUzILkOIzA): Julie Ann Horvath, HTML5DevConf `29:39`.
1. [**GitHub's CSS Performance**](https://vimeo.com/54990931): Jon Rohan, CSS Dev Conf `40:50`.

###2010

1. [**Handcrafted CSS**](https://vimeo.com/17091905): Dan Cederholm, Build Conference `44:29`.
1. [**The Top 5 Mistakes of Massive CSS**](https://www.youtube.com/watch?v=j6sAm7CLoCQ): Nicole Sullivan, Build Conference `37:53`.

# Contributing

Fork, add your amazing nugget and send a PR.

# License

[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](http://creativecommons.org/publicdomain/zero/1.0/)

To the extent possible under law, [Sota Yamashita](https://github.com/sotayamashita) has waived all copyright and related or neighboring rights to this work.


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:animateLayoutChanges="true"
    android:background="@color/md_black_1000"
    tools:context=".fullscreenimage.FullScreenImageActivity">

    <ImageView
        android:id="@+id/image_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:layout_gravity="center"
        tools:src="@android:drawable/ic_lock_lock" />

    <TextView
        android:id="@+id/image_view_category"
        android:layout_width="match_parent"
        android:layout_height="26dp"
        android:layout_alignBottom="@+id/image_view"
        android:background="@color/md_grey_600"
        android:gravity="center_vertical"
        android:paddingStart="4dp"
        android:textColor="@color/md_white_1000"
        android:visibility="invisible"
        tools:text="Sports"
        tools:visibility="visible" />
</RelativeLayout>

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.ComponentModel;
using System.Globalization;
using System.Windows.Data;
using NuPattern.Reflection;

namespace NuPattern.Runtime.Guidance.UI
{
    [ValueConversion(typeof(Enum), typeof(string))]
    internal class EnumToDescriptionValueConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is Enum)
            {
                var description = value.GetType().GetField(value.ToString()).GetCustomAttribute<DescriptionAttribute>(true);
                return description != null ? description.Description : value.ToString();
            }

            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}


text:
(function(){

	var prefix = "libs/plugins/jquery/jquery.";

	define({

	    load: function (name, req, load, config) {

	    	req(['jquery'], function ($) {

	    		if (!config.isBuild) {
					req([prefix + name], function (val) {
						load(val);
					});
				}
				else {
					load("");
				}
			});
		},

		loadFromFileSystem : function (plugin, name) {
			var fs = nodeRequire('fs');
			var file = require.toUrl(prefix + name) + ".js";
			var text = fs.readFileSync(file).toString();

			text = "define('" + plugin + "!" + name  +
			"', ['jquery'], function () {\n" + text + "\nreturn jQuery;\n});\n";

			return text;
		},

		write: function (pluginName, moduleName, write, config) {
			write(this.loadFromFileSystem(pluginName, moduleName));
		}
	});

})();


text:
package org.diretto.util.push;

import java.net.URI;

/**
 * The Subscription interface represents a subscription to a feed using a
 * distinct hub. Note that a {@link NotificationCallback} should be set in order
 * to react on incoming updates.
 *
 * @author Benjamin Erb
 *
 */
public interface Subscription
{
	/**
	 * Returns the internal id of this subscription.
	 *
	 * @return
	 */
	String getInternalId();

	/**
	 * Returns the verification token for this subscription.
	 *
	 * @return
	 */
	String getVerifyToken();

	/**
	 * Returns the topic/feed URI this subscription is bound to.
	 *
	 * @return
	 */
	URI getFeedTopicUri();

	/**
	 * Returns the hub URI this subscription is bound to.
	 *
	 * @return
	 */
	URI getHubUri();

	/**
	 * Returns the corresponding {@link Subscriber}.
	 *
	 * @return
	 */
	Subscriber getSubscriber();

	/**
	 * Sets a new {@link NotificationCallback}. If there is already callback
	 * registered, the old one will be discarded.
	 *
	 * @param callback
	 */
	void setNotificationCallback(NotificationCallback callback);

	/**
	 * Returns the current {@link NotificationCallback} of this
	 * {@link Subscription}.
	 *
	 * @return
	 */
	NotificationCallback getNotificationCallback();
}


text:
var expect = require('expect.js');
var path = require('path');
var fs = require('../../../lib/util/fs');
var Logger = require('apella-logger');
var helpers = require('../../helpers');
var Q = require('q');
var mout = require('mout');
var multiline = require('multiline').stripIndent;
var GitRemoteResolver = require('../../../lib/core/resolvers/GitRemoteResolver');
var defaultConfig = require('../../../lib/config');

describe('GitRemoteResolver', function () {
    var testPackage = path.resolve(__dirname, '../../assets/package-a');
    var logger;

    before(function () {
        logger = new Logger();
    });

    afterEach(function () {
        logger.removeAllListeners();
    });

    function clearResolverRuntimeCache() {
        GitRemoteResolver.clearRuntimeCache();
    }

    function create(decEndpoint) {
        if (typeof decEndpoint === 'string') {
            decEndpoint = { source: decEndpoint };
        }

        return new GitRemoteResolver(decEndpoint, defaultConfig(), logger);
    }

    describe('.constructor', function () {
        it('should guess the name from the path', function () {
            var resolver;

            resolver = create('file://' + testPackage);
            expect(resolver.getName()).to.equal('package-a');

            resolver = create('git://github.com/twitter/apella.git');
            expect(resolver.getName()).to.equal('apella');

            resolver = create('git://github.com/twitter/apella');
            expect(resolver.getName()).to.equal('apella');

            resolver = create('git://github.com');
            expect(resolver.getName()).to.equal('github.com');
        });
    });

    describe('.resolve', function () {
        it('should checkout correctly if resolution is a branch', function (next) {
            var resolver = create({ source: 'file://' + testPackage, target: 'some-branch' });

            resolver.resolve()
            .then(function (dir) {
                expect(dir).to.be.a('string');

                var files = fs.readdirSync(dir);
                var fooContents;

                expect(files).to.contain('foo');
                expect(files).to.contain('baz');
                expect(files).to.contain('baz');

                fooContents = fs.readFileSync(path.join(dir, 'foo')).toString();
                expect(fooContents).to.equal('foo foo');

                next();
            })
            .done();
        });

        it('should checkout correctly if resolution is a tag', function (next) {
            var resolver = create({ source: 'file://' + testPackage, target: '~0.0.1' });

            resolver.resolve()
            .then(function (dir) {
                expect(dir).to.be.a('string');

                var files = fs.readdirSync(dir);

                expect(files).to.contain('foo');
                expect(files).to.contain('bar');
                expect(files).to.not.contain('baz');

                next();
            })
            .done();
        });

        it('should checkout correctly if resolution is a commit', function (next) {
            var resolver = create({ source: 'file://' + testPackage, target: 'bdf51ece75e20cf404e49286727b7e92d33e9ad0' });

            resolver.resolve()
            .then(function (dir) {
                expect(dir).to.be.a('string');

                var files = fs.readdirSync(dir);

                expect(files).to.not.contain('foo');
                expect(files).to.not.contain('bar');
                expect(files).to.not.contain('baz');
                expect(files).to.contain('.master');
                next();
            })
            .done();
        });

        describe('shallow cloning', function () {
            var gitRemoteResolverFactory;

            beforeEach(function () {
                gitRemoteResolverFactory = function (handler) {
                    return helpers.require('lib/core/resolvers/GitRemoteResolver', {
                        '../../util/cmd': handler
                    });
                };
            });

            it('should add --depth=1 when shallow cloning is supported', function (next) {
                var testSource = 'http://foo/bar.git';

                var MyGitRemoteResolver = gitRemoteResolverFactory(function (cmd, args) {
                    // The first git call fetches the tags for the provided source
                    if (mout.array.equals(args, ['ls-remote', '--tags', '--heads', testSource])) {
                        // Return list of commits, including one tag.
                        // The tag will be used for the clone call.
                        return Q.all([multiline(function () {/*
                         e4655d250f2a3f64ef2d712f25dafa60652bb93e refs/heads/some-branch
                         0a7daf646d4fd743b6ef701d63bdbe20eee422de refs/tags/0.0.1
                         */
                        })]);
                    }
                    else if (args[0] === 'clone') {
                        // Verify parameters of the clone call.
                        // In this case, the arguments need to contain "--depth 1".
                        expect(args).to.eql(['clone', 'http://foo/bar.git', '-b', '0.0.1', '--progress', '.', '--depth', 1]);

                        // In this case, only the stderr content is evaluated. Everything's fine as long as it
                        // does not contain any error description.
                        return Q.all(['stdout', 'stderr']);
                    }
                });

                // Mock the call, return true for this test.
                MyGitRemoteResolver.prototype._supportsShallowCloning = function () {
                    return Q.resolve(true);
                };

                var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig(), logger);

                resolver.resolve().then(function () {
                    next();
                });
            });

            it('should not add --depth=1 when shallow cloning is not supported', function (next) {
                var testSource = 'http://foo/bar.git';

                var MyGitRemoteResolver = gitRemoteResolverFactory(function (cmd, args) {
                    // The first git call fetches the tags for the provided source
                    if (mout.array.equals(args, ['ls-remote', '--tags', '--heads', testSource])) {
                        // Return list of commits, including one tag.
                        // The tag will be used for the clone call.
                        return Q.all([multiline(function () {/*
                         e4655d250f2a3f64ef2d712f25dafa60652bb93e refs/heads/some-branch
                         0a7daf646d4fd743b6ef701d63bdbe20eee422de refs/tags/0.0.1
                         */
                        })]);
                    }
                    else if (args[0] === 'clone') {
                        // Verify parameters of the clone call.
                        // In this case, the arguments should not contain "--depth 1".
                        expect(args).to.eql(['clone', 'http://foo/bar.git', '-b', '0.0.1', '--progress', '.']);

                        // In this case, only the stderr content is evaluated. Everything's fine as long as it
                        // does not contain any error description.
                        return Q.all(['stdout', 'stderr']);
                    }
                });

                // Mock the call, return false for this test.
                MyGitRemoteResolver.prototype._supportsShallowCloning = function () {
                    return Q.resolve(false);
                };

                var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig(), logger);

                resolver.resolve().then(function () {
                    next();
                });
            });
        });

        it.skip('should handle gracefully servers that do not support --depth=1');
        it.skip('should report progress when it takes too long to clone');
    });

    describe('#refs', function () {
        afterEach(clearResolverRuntimeCache);

        it('should resolve to the references of the remote repository', function (next) {
            GitRemoteResolver.refs('file://' + testPackage)
            .then(function (refs) {
                // Remove master and test only for the first 7 refs
                refs = refs.slice(1, 8);

                expect(refs).to.eql([
                    'e4655d250f2a3f64ef2d712f25dafa60652bb93e refs/heads/some-branch',
                    '0a7daf646d4fd743b6ef701d63bdbe20eee422de refs/tags/0.0.1',
                    '0791865e6f4b88f69fc35167a09a6f0626627765 refs/tags/0.0.2',
                    '2af02ac6ddeaac1c2f4bead8d6287ce54269c039 refs/tags/0.1.0',
                    '6ab264f1ba5bafa80fb0198183493e4d5b20804a refs/tags/0.1.1',
                    'c91ed7facbb695510e3e1ab86bac8b5ac159f4f3 refs/tags/0.2.0',
                    '8556e55c65722a351ca5fdce4f1ebe83ec3f2365 refs/tags/0.2.1'
                ]);
                next();
            })
            .done();
        });

        it('should cache the results', function (next) {
            var source = 'file://' + testPackage;

            GitRemoteResolver.refs(source)
            .then(function () {
                // Manipulate the cache and check if it resolves for the cached ones
                GitRemoteResolver._cache.refs.get(source).splice(0, 1);

                // Check if it resolver to the same array
                return GitRemoteResolver.refs('file://' + testPackage);
            })
            .then(function (refs) {
                // Test only for the first 7 refs
                refs = refs.slice(0, 7);

                expect(refs).to.eql([
                    'e4655d250f2a3f64ef2d712f25dafa60652bb93e refs/heads/some-branch',
                    '0a7daf646d4fd743b6ef701d63bdbe20eee422de refs/tags/0.0.1',
                    '0791865e6f4b88f69fc35167a09a6f0626627765 refs/tags/0.0.2',
                    '2af02ac6ddeaac1c2f4bead8d6287ce54269c039 refs/tags/0.1.0',
                    '6ab264f1ba5bafa80fb0198183493e4d5b20804a refs/tags/0.1.1',
                    'c91ed7facbb695510e3e1ab86bac8b5ac159f4f3 refs/tags/0.2.0',
                    '8556e55c65722a351ca5fdce4f1ebe83ec3f2365 refs/tags/0.2.1'
                ]);
                next();
            })
            .done();
        });
    });

    describe('#_supportsShallowCloning', function () {
        var gitRemoteResolverFactory;

        beforeEach(function () {
            gitRemoteResolverFactory = function (handler) {
                return helpers.require('lib/core/resolvers/GitRemoteResolver', {
                    '../../util/cmd': handler
                });
            };
        });

        function createCmdHandlerFn(testSource, stderr) {
            return function (cmd, args, options) {
                expect(cmd).to.be('git');
                expect(args).to.eql([ 'ls-remote', '--heads', testSource ]);
                expect(options.env.GIT_CURL_VERBOSE).to.be('2');

                return Q.all(['stdout', stderr]);
            };
        }

        it('should call ls-remote when using http protocol', function (next) {
            var testSource = 'http://foo/bar.git';

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                createCmdHandlerFn(testSource, multiline(function () {/*
                    foo: bar
                    Content-Type: none
                    1234: 5678
                */}))
            );

            var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(false);

                next();
            });
        });

        it('should call ls-remote when using https protocol', function (next) {
            var testSource = 'https://foo/bar.git';

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                createCmdHandlerFn(testSource, multiline(function () {/*
                    foo: bar
                    Content-Type: none
                    1234: 5678
                */}))
            );

            var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(false);

                next();
            });
        });

        it('should evaluate to false when the URL can not be parsed', function (next) {
            var testSource = 'grmblfjx///:::.git';

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                createCmdHandlerFn(testSource, multiline(function () {/*
                    foo: bar
                    Content-Type: none
                    1234: 5678
                */}))
            );

            var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig(), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(false);

                next();
            }, function (err) {
                next(err);
            });
        });

        it('should evaluate to true when the smart content type is returned', function (next) {
            var testSource = 'https://foo/bar.git';

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                createCmdHandlerFn(testSource, multiline(function () {/*
                    foo: bar
                    Content-Type: application/x-git-upload-pack-advertisement
                    1234: 5678
                */}))
            );

            var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(true);

                next();
            });
        });

        it('should cache hosts that support shallow cloning', function (next) {
            var testSource = 'https://foo/bar.git';

            var counter = 0;

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                function (cmd, args, options) {
                    counter++;

                    if (counter === 1) {
                        expect(cmd).to.be('git');
                        expect(args).to.eql([ 'ls-remote', '--heads', testSource ]);
                        expect(options.env.GIT_CURL_VERBOSE).to.be('2');

                        return Q.all(['stdout', multiline(function () {/*
                         foo: bar
                         Content-Type: application/x-git-upload-pack-advertisement
                         1234: 5678
                         */
                        })]);
                    }
                    else {
                        return Q.reject(new Error('More calls than expected'));
                    }
                }
            );

            var resolver = new MyGitRemoteResolver({ source: testSource }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(true);

                var resolver2 = new MyGitRemoteResolver({ source: testSource }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

                resolver2._shallowClone().then(function (shallowCloningSupported) {
                    expect(shallowCloningSupported).to.be(true);

                    next();
                }, function (err) {
                    next(err);
                });
            });
        });

        it('should cache hosts that support shallow cloning across multiple repos', function (next) {
            var testSource1 = 'https://foo/bar.git';
            var testSource2 = 'https://foo/barbaz.git';

            var counter = 0;

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                function (cmd, args, options) {
                    counter++;

                    if (counter === 1) {
                        expect(cmd).to.be('git');
                        expect(args).to.eql([ 'ls-remote', '--heads', testSource1 ]);
                        expect(options.env.GIT_CURL_VERBOSE).to.be('2');

                        return Q.all(['stdout', multiline(function () {/*
                         foo: bar
                         Content-Type: application/x-git-upload-pack-advertisement
                         1234: 5678
                         */
                        })]);
                    }
                    else {
                        return Q.reject(new Error('More calls than expected'));
                    }
                }
            );

            var resolver = new MyGitRemoteResolver({ source: testSource1 }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(true);

                var resolver2 = new MyGitRemoteResolver({ source: testSource2 }, defaultConfig({ shallowCloneHosts: ['foo'] }), logger);

                resolver2._shallowClone().then(function (shallowCloningSupported) {
                    expect(shallowCloningSupported).to.be(true);

                    next();
                }, function (err) {
                    next(err);
                });
            });
        });

        it('should run separate checks for separate hosts ', function (next) {
            var testSource1 = 'https://foo/bar.git';
            var testSource2 = 'https://foo.bar.baz/barbaz.git';

            var counter = 0;

            var MyGitRemoteResolver = gitRemoteResolverFactory(
                function (cmd, args, options) {
                    counter++;

                    if (counter === 1) {
                        expect(cmd).to.be('git');
                        expect(args).to.eql([ 'ls-remote', '--heads', testSource1 ]);
                        expect(options.env.GIT_CURL_VERBOSE).to.be('2');

                        return Q.all(['stdout', multiline(function () {/*
                         foo: bar
                         Content-Type: application/x-git-upload-pack-advertisement
                         1234: 5678
                         */
                        })]);
                    }
                    else {
                        expect(cmd).to.be('git');
                        expect(args).to.eql([ 'ls-remote', '--heads', testSource2 ]);
                        expect(options.env.GIT_CURL_VERBOSE).to.be('2');

                        return Q.all(['stdout', multiline(function () {/*
                         foo: barbaz
                         Content-Type: application/x-git-upload-pack-advertisement
                         1234: 5678
                         */
                        })]);
                    }
                }
            );

            var resolver = new MyGitRemoteResolver({ source: testSource1 }, defaultConfig({ shallowCloneHosts: ['foo', 'foo.bar.baz'] }), logger);

            resolver._shallowClone().then(function (shallowCloningSupported) {
                expect(shallowCloningSupported).to.be(true);

                var resolver2 = new MyGitRemoteResolver({ source: testSource2 }, defaultConfig({ shallowCloneHosts: ['foo', 'foo.bar.baz'] }), logger);

                resolver2._shallowClone().then(function (shallowCloningSupported) {
                    expect(shallowCloningSupported).to.be(true);

                    next();
                }, function (err) {
                    next(err);
                });
            });
        });
    });
});


text:
function pad(direction, value, width, character) {
    value = value + '';

    if(!character){
        character = '0';
    }

    if(!width){
        width = 0;
    }

    while(value.length < width){
        if(direction){
            value = value + character;
        } else {
            value = character + value;
        }
    }

    return value;
}

module.exports = {
    lpad: pad.bind(null, 0),
    rpad: pad.bind(null, 1)
};


text:
---
uid: SolidEdgePart.ResizeHole.SuppressVariable
summary:
remarks:
---


text:
var _ = require('lodash')
var random_name = require('node-random-name');
var Firebase = require('firebase');

// San Francisco
var city_location = {
  lat: 37.78,
  lon: -122.41
}

var radius = 0.03

// simualate a random person entering, staying for a duration, and leaving
function simulate(){

  // generate a random person with a random name,
  // random location, and random duration
  var name = random_name()
  var duration = 1 + 5 * Math.random()
  var lat = city_location.lat + radius * (Math.random() - 0.5) * 2
  var lon = city_location.lon + radius * (Math.random() - 0.5) * 2
  var person = {
    name: name,
    duration: duration,
    lat: lat,
    lon: lon
  }

  // simulate this person entering
  enter(person)

  // simulate this person leaving after 'duration' seconds
  setTimeout(function(){
    leave(person)
  }, duration * 1000)

}

function enter(person){
  console.log('enter', person)

  var ref = new Firebase('https://team-titans.firebaseio.com/');
  var usersRef = ref.child("users");
  var personRef = usersRef.child(person.name);

  personRef.set({
    lat: person.lat,
    lon: person.lon,
    name: person.name
  });
}

function leave(person){
  console.log('leave', person)
  var ref = new Firebase('https://team-titans.firebaseio.com/')
  var usersRef = ref.child("users")
  var personRef = usersRef.child(person.name);

  personRef.remove();
}

function clear(){
  // TODO: remove all people from the Firebase
  var ref = new Firebase('https://team-titans.firebaseio.com/')
  var usersRef = ref.child("users")

  usersRef.remove()
}

// clear the firebase, so that the simulation always starts from no one
clear()

// run each second
setInterval(simulate, 2000)


text:
<applet code="HelloWorld.class" width="400" height="450" archive="HelloWorld.jar">
</applet>


text:
#ifndef _SNF_NIO_H_
#define _SNF_NIO_H_

#include <string>
#include "net.h"
#include "error.h"

namespace snf {
namespace net {

/*
 * A base class (think of it as interface) that is implemented
 * by socket and ssl::connection class to provide a consistent
 * read/write interface.
 */
class nio
{
private:
	union u4 {
		float   r;      // real number
		int32_t i;      // hopefully an equal sized integer
	};

	union u8 {
		double  r;      // real number
		int64_t i;      // hopefully an equal sized integer
	};

	bool m_buffered = false;    // is read buffered?
	char *m_buf = nullptr;      // data buffer
	int  m_max = 0;             // maximum buffer size
	int  m_len = 0;             // valid data in the buffer
	int  m_idx = 0;             // next i/o index

	int read_buffered(void *, int, int *, int, int *);

public:
	nio() {}
	nio(const nio &) = delete;

	nio(nio &&io)
		: m_buffered(io.m_buffered)
		, m_max(io.m_max)
		, m_len(io.m_len)
		, m_idx(io.m_idx)
	{
		m_buf = io.m_buf;
		io.m_buf = nullptr;
	}

	virtual ~nio()
	{
		if (m_buf)
			delete [] m_buf;
	}

	const nio & operator=(const nio &) = delete;

	virtual nio & operator=(nio &&io)
	{
		if (this != &io) {
			m_buffered = io.m_buffered;

			if (m_buf) {
				delete [] m_buf;
				m_buf = nullptr;
			}

			if (io.m_buf) {
				m_buf = io.m_buf;
				io.m_buf = nullptr;
			}

			m_max = io.m_max;
			m_len = io.m_len;
			m_idx = io.m_idx;
		}

		return *this;
	}

	virtual int readn(void *, int, int *, int to = POLL_WAIT_FOREVER, int *oserr = 0) = 0;
	virtual int writen(const void *, int, int *, int to = POLL_WAIT_FOREVER, int *oserr = 0) = 0;

	void setbuf(int);

	int read(void *, int, int *, int to = POLL_WAIT_FOREVER, int *oserr = 0);
	int write(const void *, int, int *, int to = POLL_WAIT_FOREVER, int *oserr = 0);

	int get_char(char &, int to = POLL_WAIT_FOREVER, int *oserr = 0);
	int put_char(char, int to = POLL_WAIT_FOREVER, int *oserr = 0);

	int read_string(std::string &, int to = POLL_WAIT_FOREVER, int *oserr = 0);
	int write_string(const std::string &, int to = POLL_WAIT_FOREVER, int *oserr = 0);

	/*
	 * Reads integral data of size 2, 4, or 8.
	 *
	 * @param [out] data  - integral data to read.
	 * @param [in]  to    - timeout in milliseconds.
	 *                      POLL_WAIT_FOREVER for inifinite wait.
	 *                      POLL_WAIT_NONE for no wait.
	 * @param [out] oserr - system error in case of failure, if not null.
	 *
	 * @return E_ok on success, -ve error code on failure.
	 *
	 * The call can possibly throw one or more exceptions if the derived
	 * class of implementation of read throws one.
	 */
	template<typename T, typename std::enable_if<
		std::is_integral<T>::value &&
		!std::is_same<T, bool>::value, int>::type = 0>
	int read_integral(T *data, int to = POLL_WAIT_FOREVER, int *oserr = 0)
	{
		int to_read = static_cast<int>(sizeof(T));
		int bread = 0;

		if ((to_read != 2) && (to_read != 4) && (to_read != 8))
			return E_invalid_arg;

		T val;
		int retval = read(&val, to_read, &bread, to, oserr);
		if (E_ok == retval)
			if (to_read != bread)
				retval = E_read_failed;
		if (E_ok == retval)
			*data = ntoh(val);

		return retval;
	}

	/*
	 * Writes integral data of size 2, 4, or 8.
	 *
	 * @param [in]  data  - integral data to write.
	 * @param [in]  to    - timeout in milliseconds.
	 *                      POLL_WAIT_FOREVER for inifinite wait.
	 *                      POLL_WAIT_NONE for no wait.
	 * @param [out] oserr - system error in case of failure, if not null.
	 *
	 * @return E_ok on success, -ve error code on failure.
	 *
	 * The call can possibly throw one or more exceptions if the derived
	 * class of implementation of write throws one.
	 */
	template<typename T, typename std::enable_if<
		std::is_integral<T>::value &&
		!std::is_same<T, bool>::value, int>::type = 0>
	int write_integral(T data, int to = POLL_WAIT_FOREVER, int *oserr = 0)
	{
		int to_write = static_cast<int>(sizeof(T));
		int bwritten = 0;

		if ((to_write != 2) && (to_write != 4) && (to_write != 8))
			return E_invalid_arg;

		data = hton(data);

		int retval = write(&data, to_write, &bwritten, to, oserr);
		if (E_ok == retval)
			if (to_write != bwritten)
				retval = E_write_failed;
		return retval;
	}

	/*
	 * Reads floating point data of size 4 or 8.
	 *
	 * @param [out] data  - floating point data to read.
	 * @param [in]  to    - timeout in milliseconds.
	 *                      POLL_WAIT_FOREVER for inifinite wait.
	 *                      POLL_WAIT_NONE for no wait.
	 * @param [out] oserr - system error in case of failure, if not null.
	 *
	 * @return E_ok on success, -ve error code on failure.
	 *
	 * The call can possibly throw one or more exceptions if the derived
	 * class of implementation of read throws one.
	 */
	template<typename T, typename std::enable_if<
		std::is_floating_point<T>::value, int>::type = 0>
	int read_real(T *data, int to = POLL_WAIT_FOREVER, int *oserr = 0)
	{
		int to_read = static_cast<int>(sizeof(T));
		int bread = 0;

		if ((to_read != 4) && (to_read != 8))
			return E_invalid_arg;

		T val;
		int retval = read(&val, to_read, &bread, to, oserr);
		if (E_ok == retval)
			if (to_read != bread)
				retval = E_read_failed;
		if (E_ok == retval) {
			if (to_read == 4) {
				u4 f;
				f.i = ntoh(val);
				*data = f.r;
			} else if (to_read == 8) {
				u8 d;
				d.i = ntoh(val);
				*data = d.r;
			}
		}

		return retval;
	}

	/*
	 * Writes floating point data of size 4 or 8.
	 *
	 * @param [out] data  - floating point data to write.
	 * @param [in]  to    - timeout in milliseconds.
	 *                      POLL_WAIT_FOREVER for inifinite wait.
	 *                      POLL_WAIT_NONE for no wait.
	 * @param [out] oserr - system error in case of failure, if not null.
	 *
	 * @return E_ok on success, -ve error code on failure.
	 *
	 * The call can possibly throw one or more exceptions if the derived
	 * class of implementation of write throws one.
	 */
	template<typename T, typename std::enable_if<
		std::is_floating_point<T>::value, int>::type = 0>
	int write_real(T data, int to = POLL_WAIT_FOREVER, int *oserr = 0)
	{
		int to_write = static_cast<int>(sizeof(T));
		int bwritten = 0;

		if (to_write == 4) {
			u4 f;
			f.r = data;
			data = hton(f.i);
		} else if (to_write == 8) {
			u8 d;
			d.r = data;
			data =  hton(d.i);
		} else {
			return E_invalid_arg;
		}

		int retval = write(&data, to_write, &bwritten, to, oserr);
		if (E_ok == retval)
			if (to_write != bwritten)
				retval = E_write_failed;
		return retval;
	}

	int readline(std::string &, int to = POLL_WAIT_FOREVER, int *oserr = 0);
};

} // namespace net
} // namespace snf

#endif // _SNF_NIO_H_


text:
<tool id="stacks_genotypes" name="Stacks: genotypes" version="@WRAPPER_VERSION@.1">
    <description>analyse haplotypes or genotypes in a genetic cross ('genotypes' program)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command><![CDATA[
        #import re

        mkdir stacks_outputs

        &&

        #for $input_file in $input_col:
            #set $filename = str($input_file.element_identifier)
            #if not $filename.endswith('.tsv'):
                #set $filename = $filename + ".tsv"
            #end if
            #if re.search('\.(tags|snps|alleles|matches)(\.tsv)?$', $filename):
                ln -s "${input_file}" "stacks_outputs/${filename}" &&
            #end if
        #end for

        genotypes

            -P stacks_outputs
            -b $advanced_options.batchid

            -t $options_usage.cross_type
            -o $options_usage.map_out.map_out_type

            #if str( $options_usage.map_out.map_out_type ) == "genomic":
                -e ${options_usage.map_out.enzyme}
            #end if

            #if str($advanced_options.minprogeny):
                -r $advanced_options.minprogeny
            #end if

            #if str($advanced_options.mindepth):
                -m $advanced_options.mindepth
            #end if

            #if str($advanced_options.lnl):
                --lnl_lim $advanced_options.lnl
            #end if

            #if $advanced_options.blacklist:
                -B "$advanced_options.blacklist"
            #end if
            #if $advanced_options.whitelist:
                -W "$advanced_options.whitelist"
            #end if

            #if $advanced_options.manual_cor:
                --corr_path "$advanced_options.manual_cor"
            #end if

            #if $options_autocorr.corrections:
                -c
                --min_hom_seqs $options_autocorr.hom
                --min_het_seqs $options_autocorr.het
                --max_het_seqs $options_autocorr.hetmax
            #end if

            ## output SQL file (as denovo/refmap)
            -s

            @NORM_GENOTYPES_OUTPUT_FULL@
    ]]></command>
    <inputs>
        <param name="input_col" format="tabular,txt" type="data_collection" collection_type="list" label="Output from previous Stacks pipeline steps (e.g. denovo_map or refmap)" />

            <param name="cross_type" argument="-t" type="select" label="Cross type">
                <expand macro="cross_types"/>
            </param>

            <conditional name="map_out">
                <param argument="-o" name="map_out_type" type="select" label="Output file type" help="Output map file type to write" >
                    <option value="joinmap">JoinMap</option>
                    <option value="onemap">OneMap</option>
                    <option value="rqtl">R/QTL</option>
                    <option value="genomic">Genomic</option>
                </param>
                <when value="genomic">
                    <param name="enzyme" argument="-e" type="select" label="Restriction enzyme used" help="Only needed for Genomic output format">
                        <expand macro="enzymes"/>
                    </param>
                </when>
            </conditional>

        <conditional name="options_autocorr">
            <param name="corrections" argument="-c" type="boolean" checked="true" truevalue="-c" falsevalue="" label="Make automated corrections to the data" />
            <when value="-c">
                <param name="hom" argument="--min_hom_seqs" type="integer" value="5" label="Minimum number of reads required at a stack to call a homozygous genotype" />
                <param name="het" argument="--min_het_seqs:" type="float" value="0.05" label="Heterozygote minor allele minimum frequency" help="below this minor allele frequency a stack is called a homozygote, above it (but below --max_het_seqs) it is called unknown" />
                <param name="hetmax" argument="--max_het_seqs:" type="float" value="0.1" label="Heterozygote minor allele maximum frequency" help="minimum frequency of minor allele to call a heterozygote" />
            </when>
            <when value="">
            </when>
        </conditional>

            <param name="minprogeny" type="integer" value="0" optional="true" argument="-r" label="Minimum number of progeny required to print a marker" />
            <param name="mindepth" type="integer" value="" optional="true" argument="-m" label="Minimum stack depth required before exporting a locus in a particular individual" />
            <param name="lnl" type="float" value="" optional="true" argument="--lnl_lim" label="Filter loci with log likelihood values below this threshold" />

            <param name="whitelist" argument="-W" format="txt,tabular" type="data" optional="true" label="Specify a file containing Whitelisted markers to include in the export" />
            <param name="blacklist" argument="-B" format="txt,tabular" type="data" optional="true" label="Specify a file containing Blacklisted markers to be excluded from the export" />

            <param name="manual_cor" argument="--cor_path" type="data" format="tabular,txt" optional="true" label="Path to file containing manual genotype corrections from a Stacks SQL database to incorporate into output." />

            <param name="batchid" type="integer" value="1" label="Batch ID to examine when exporting from the catalog" help="Only useful if you analyse data that was processed outside galaxy" />

    </inputs>
    <outputs>
        <expand macro="genotypes_output_full"/>
    </outputs>

    <tests>
        <test>
            <param name="input_col">
                <collection type="list">
                    <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
                    <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" />
                    <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" />
                    <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" />
                    <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" />
                    <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" />
                    <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" />
                    <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" />
                    <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" />
                    <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" />
                    <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" />
                </collection>
            </param>
            <param name="map_out_type" value="joinmap" />
            <param name="cross_type" value="CP" />
            <param name="advanced_options|minprogeny" value="1" />

            <output name="out_generic_haplo">
                <assert_contents>
                    <has_text text="Catalog ID" />
                </assert_contents>
            </output>
            <output name="out_sql_markers">
                <assert_contents>
                    <has_text text="Total Genotypes" />
                </assert_contents>
            </output>
            <output name="out_joinmap">
                <assert_contents>
                    <has_text text="batch_1.genotypes_" />
                </assert_contents>
            </output>
            <output name="out_sql_genotypes">
                <assert_contents>
                    <has_text text="SQL ID" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
<![CDATA[
.. class:: infomark

**What it does**

This program exports a Stacks data set either as a set of observed haplotypes at each locus in the population, or with the haplotypes encoded into genotypes. The -r option allows only loci that exist in a certain number of population individuals to be exported. In a mapping context, raising or lowering this limit is an effective way to control the quality level of markers exported as genuine markers will be found in a large number of progeny. If exporting a set of observed haplotypes in a population, the "min stack depth" option can be used to restict exported loci to those that have a minimum depth of reads.

By default, when executing the pipeline (either denovo_map or ref_map) the genotypes program will be executed last and will identify mappable markers in the population and export both a set of observed haplotypes and a set of generic genotypes with "min number of progeny" option = 1.

Making Corrections

If enabled with the "make automated corrections to the data" option, the genotypes program will make automated corrections to the data. Since loci are matched up in the population, the script can correct false-negative heterozygote alleles since it knows the existence of alleles at a particular locus in the other individuals. For example, the program will identify loci with SNPs that didn't have high enough coverage to be identified by the SNP caller. It will also check that homozygous tags have a minimum depth of coverage, since a low-coverage polymorphic locus may appear homozygous simply because the other allele wasn't sequenced.

Correction Thresholds

The thresholds for automatic corrections can be modified by using the "automated corrections option" and changing the default values for the "min number of reads for homozygous genotype", "homozygote minor minimum allele frequency" and "heterozygote minor minimum allele frequency" parameters to genotypes. "min number of reads for homozygous genotype" is the minimum number of reads required to consider a stack homozygous (default of 5). The "homozygote minor minimum allele frequency" and "heterozygote minor minimum allele frequency" variables represent fractions. If the ratio of the depth of the the smaller allele to the bigger allele is greater than "heterozygote minor minimum allele frequency" (default of 1/10) a stack is called a het. If the ratio is less than homozygote minor minimum allele frequency (default of 1/20) a stack is called homozygous. If the ratio is in between the two values it is unknown and a genotype will not be assigned.

Automated corrections made by the program are shown in the output file in capital letters.

--------

**Input files**

Output from denovo_map or ref_map

**Output files:**

- XXX.tags.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

Notes: For the tags file, each stack will start in the file with a consensus sequence for the entire stack followed by the flags for that stack. Then, each individual read that was merged into that stack will follow. The next stack will start with another consensus sequence.

- XXX.snps.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one.

- XXX.alleles.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

- XXX.matches.tsv file:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

Notes: Each line in this file records a match between a catalog locus and a locus in an individual, for a particular haplotype. The Batch ID plus the Catalog ID together represent a unique locus in the entire population, while the Sample ID and the Stack ID together represent a unique locus in an individual sample.

- other files:

See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_

@STACKS_INFOS@
]]>
    </help>
    <expand macro="citation" />
</tool>


text:
namespace WomenMarket.Models.ViewModels.AccountViewModels
{
    using System.ComponentModel.DataAnnotations;
    public class ExternalLoginConfirmationViewModel
    {
        [Required]
        [Display(Name = "Username")]
        public string Username { get; set; }

        [Required]
        [Display(Name = "Email")]
        public string Email { get; set; }
    }
}


text:
<?php
include_once('utilities.php');
$xml = simplexml_load_file('http://feeds.feedburner.com/metacafe/TYps');
print "
\n";
foreach ($xml->channel->item as $item){
  echo "
link.">".$item->title."
\n";
  print "
$item->description
\n";
 //  print "
$item->link
\n";
}
print "
";

foreach ($xml->channel as $value){
    echo_array($value);
}
?>


text:
using System.IO;

namespace UnrealBuildTool.Rules
{
	public class DataAccess : ModuleRules
	{
		public DataAccess(TargetInfo Target)
		{
			PrivateIncludePaths.AddRange(
				new string[] {
					"DataAccess/Private"
				}
            );

			PrivateDependencyModuleNames.AddRange(
				new string[] {
					"Core",
                    "CoreUObject",
                    "Json",
                    "SQLiteSupport"
				}
			);
		}
	}
}


text:
    #ifdef _CompressAPI
        #define CompressAPI _declspec(dllimport)
    #else
        #define CompressAPI _declspec(dllexport)
    #endif
#else
    #if defined(__GNUC__) && __GNUC__ >= 4
        #define CompressAPI __attribute__ ((visibility("default")))
    #else
        #define CompressAPI
    #endif
#endif

#if defined(STATIC_LIB)
    #undef CompressAPI
    #define CompressAPI
#endif


text:
##核心动画(Core Animation)

```
fromwork:QuartzCore in iOS 2.0 and later

使用它需要先添加QuartzCore.framework
引入对应的框架<QuartzCore/QuartzCore.h>
(IOS7.0之后,系统已经默认添加)
```

####图层的核心动画(CAAnimation)

```
其4个实现类
CABasicAnimation    --
                      |- CAPropertyAnimation --
CAKeyframeAnimation --                         |
                                               |
CAAnimationGroup  ------------------------------- CAAnimation
                                               |
CATransition      -----------------------------
```

 常用属性(通用属性)

* duration:动画的持续时间
* repeatCount:动画的重复次数
* repeatDuration:动画的重复时间
* fillMode:决定当前对象在非active时间段的行为.比如动画开始之前,动画结束之后
* beginTime:可以用来设置动画延迟执行时间,若想延迟2s,就设置为CACurrentMediaTime()+2,CACurrentMediaTime()为图层的当前时间

以上来自CAMediaTiming协议的属性

* timingFunction:速度控制函数,控制动画运行的节奏
* delegate:动画代理
* removedOnCompletion:默认为YES,代表动画执行完毕后就从图层上移除,图形会恢复到动画执行前的状态。如果想让图层保持显示动画执行后的状态,那就设置为NO,不过还要设置fillMode为kCAFillModeForwards

####CAPropertyAnimation

```
CAAnimation的子类,也是个抽象类,要想创建动画对象,应该使用它的两个子类:
CABasicAnimation和CAKeyframeAnimation
```

#####常用的keyPath
######CATransform3D Key Paths

```
transform.rotation.x      NSNumber object
transform.rotation.y      NSNumber object
transform.rotation.z      NSNumber object
transform.rotation       NSNumber object
transform.scale.x        NSNumber object
transform.scale.y        NSNumber object
transform.scale.z        NSNumber object
transform.scale            NSNumber object
transform.translation.x    NSNumber object
transform.translation.y     NSNumber object
transform.translation.z    NSNumber object
transform.translation/NSValue object containing an NSSize or CGSize data type
```

######CGPoint Key Paths

```
position.x
position.y
position   CGPoint
```

######CGRect Key Paths

```
bounds.origin     CGPoint.
bounds.origin.x
bounds.origin.y
bounds.size       CGSize.
bounds.size.width
bounds.size.height
```

####CABasicAnimation

常用属性

* keyPath:通过指定CALayer的一个属性名称为keyPath(NSString类型),并且对CALayer的这个属性的值进行修改,达到相应的动画效果。比如,指定@"position"为keyPath,就修改CALayer的position属性的值,以达到平移的动画效果
* fromValue:keyPath相应属性的初始值
* toValue:keyPath相应属性的结束值随着动画的进行,在长度为duration的持续时间内,keyPath相应属性的值从fromValue渐渐地变为toValue

**注意事项**

```
如果fillMode=kCAFillModeForwards和removedOnComletion=NO,
那么在动画执行完毕后,图层会保持显示动画执行后的状态。
但在实质上,图层的属性值还是动画执行前的初始值,并没有真正被改变。
比如,CALayer的position初始值为(0,0),
CABasicAnimation的fromValue为(10,10),toValue为(100,100),
虽然动画执行完毕后图层保持在(100,100)这个位置,实质上图层的position还是为(0,0)
```

####CAKeyframeAnimation

属性解析:

* values:就是上述的NSArray对象。里面的元素称为"关键帧"(keyframe)。动画对象会在指定的时间(duration)内,依次显示values数组中的每一个关键帧
* path:可以设置一个CGPathRef\CGMutablePathRef,让层跟着路径移动。path只对CALayer的anchorPoint和position起作用。如果你设置了path,那么values将被忽略
* keyTimes:可以为对应的关键帧指定对应的时间点,其取值范围为0到1.0,keyTimes中的每一个时间值都对应values中的每一帧.当keyTimes没有设置的时候,各个关键帧的时间是平分的

> CABasicAnimation可看做是最多只有2个关键帧的CAKeyframeAnimation

####CAAnimationGroup

```
CAAnimation的子类,可以保存一组动画对象,将CAAnimationGroup对象加入层后,组中所有动画对象可以同时并发运行
```

属性解析:

* animations:用来保存一组动画对象的NSArray 默认情况下,一组动画对象是同时运行的,也可以通过设置动画对象的beginTime属性来更改动画的开始时间

**注意**,动画的时间,次数,应该由CAAnimationGroup对象进行设置。

####CATransition

```
CAAnimation的子类,用于做转场动画,能够为层提供移出屏幕和移入屏幕的动画效果。iOS比Mac OS X的转场动画效果少一点

UINavigationController就是通过CATransition实现了将控制器的视图推入屏幕的动画效果
```

属性解析:

* type:动画过渡类型
* subtype:动画过渡方向
* startProgress:动画起点(在整体动画的百分比)
* endProgress:动画终点(在整体动画的百分比)
* fade    |   交叉淡化过渡(不支持过渡方向) kCATransitionFade
      |      push      |  新视图把旧视图推出去 kCATransitionPush   moveIn    | 新视图移到旧视图上面 kCATransitionMoveIn
 reveal  |   将旧视图移开,显示下面的新视图 kCATransitionReveal
   cube     |  立方体翻滚效果
   oglFlip   | 上下左右翻转效果
   suckEffect |    收缩效果,如一块布被抽走(不支持过渡方向)
   rippleEffect  | 滴水效果(不支持过渡方向)
   pageCurl      |  向上翻页效果
   pageUnCurl      | 向下翻页效果
   cameraIrisHollowOpen  |  相机镜头打开效果(不支持过渡方向)
   cameraIrisHollowClose | 相机镜头关上效果(不支持过渡方向)                      过渡方向:
  kCATransitionFromRight
  kCATransitionFromLeft
  kCATransitionFromBottom
  kCATransitionFromTop

  CATransition的使用

  ```
   CATransition *anim = [CATransition animation];
  anim.type = @"cube"; // 动画过渡类型
  anim.subtype = kCATransitionFromTop; // 动画过渡方向
  anim.duration = 1; // 动画持续1s
  // 代理,动画执行完毕后会调用delegate的animationDidStop:finished:
  anim.delegate = self;

  /*******中间穿插改变layer属性的代码**********/

  [layer addAnimation:anim forKey:nil];
  ```

####UIView动画

```
UIKit直接将动画集成到UIView类中,当内部的一些属性发生改变时,UIView将为这些改变提供动画支持
执行动画所需要的工作由UIView类自动完成,但仍要在希望执行动画时通知视图,
为此需要将改变属性的代码放在[UIView beginAnimations:nil context:nil]
和[UIView commitAnimations]之间
```

常见方法解析:

```
    + (void)setAnimationDelegate:(id)delegate
    //设置动画代理对象,当动画开始或者结束时会发消息给代理对象
    + (void)setAnimationWillStartSelector:(SEL)selector
    //当动画即将开始时,执行delegate对象的selector,
    //并且把beginAnimations:context:中传入的参数传进selector
    + (void)setAnimationDidStopSelector:(SEL)selector
    //当动画结束时,执行delegate对象的selector,
    //并且把beginAnimations:context:中传入的参数传进selector
    + (void)setAnimationDuration:(NSTimeInterval)duration
    //动画的持续时间,秒为单位
    + (void)setAnimationDelay:(NSTimeInterval)delay
    //动画延迟delay秒后再开始
    + (void)setAnimationStartDate:(NSDate *)startDate
    //动画的开始时间,默认为now
    + (void)setAnimationCurve:(UIViewAnimationCurve)curve
    //动画的节奏控制
    动画的节奏控制,跟CAAnimation的timingFunction属性类似
    typedef NS_ENUM(NSInteger, UIViewAnimationCurve) {
        UIViewAnimationCurveEaseInOut,    // slow at beginning and end
        UIViewAnimationCurveEaseIn,       // slow at beginning
        UIViewAnimationCurveEaseOut,     // slow at end
        UIViewAnimationCurveLinear
    };
    + (void)setAnimationRepeatCount:(float)repeatCount
    //动画的重复次数
    + (void)setAnimationRepeatAutoreverses:(BOOL)repeatAutoreverses
    //如果设置为YES,代表动画每次重复执行的效果会跟上一次相反

    + (void)setAnimationTransition:(UIViewAnimationTransition)transition
            forView:(UIView *)view cache:(BOOL)cache
     设置视图view的过渡效果, transition指定过渡类型, cache设置YES代表使用视图缓存,性能较好

     typedef NS_ENUM(NSInteger, UIViewAnimationTransition) {
        UIViewAnimationTransitionNone,
        UIViewAnimationTransitionFlipFromLeft,
        UIViewAnimationTransitionFlipFromRight,
        UIViewAnimationTransitionCurlUp,
        UIViewAnimationTransitionCurlDown,
    };
```

####Block动画

```
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion
    参数:
    duration:动画的持续时间
    delay:动画延迟delay秒后开始
    options:动画的节奏控制
    animations:将改变视图属性的代码放在这个block中
    completion:动画结束后,会自动调用这个block

    动画的节奏控制枚举常量
    UIViewAnimationOptionCurveEaseInOut
    UIViewAnimationOptionCurveEaseIn
    UIViewAnimationOptionCurveEaseOut
    UIViewAnimationOptionCurveLinear

+ (void)transitionWithView:(UIView *)view duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion
    参数解析:
    duration:动画的持续时间
    view:需要进行转场动画的视图
    options:转场动画的类型
    animations:将改变视图属性的代码放在这个block中
    completion:动画结束后,会自动调用这个block

    转场动画的类型
    UIViewAnimationOptionTransitionNone
    UIViewAnimationOptionTransitionFlipFromLeft
    UIViewAnimationOptionTransitionFlipFromRight
    UIViewAnimationOptionTransitionCurlUp
    UIViewAnimationOptionTransitionCurlDown
    UIViewAnimationOptionTransitionCrossDissolve
    UIViewAnimationOptionTransitionFlipFromTop
    UIViewAnimationOptionTransitionFlipFromBottom

+ (void)transitionFromView:(UIView *)fromView toView:(UIView *)toView duration:(NSTimeInterval)duration options:(UIViewAnimationOptions)options completion:(void (^)(BOOL finished))completion
    方法调用完毕后,相当于执行了下面两句代码:
    // 添加toView到父视图
    [fromView.superview addSubview:toView];
    // 把fromView从父视图中移除
    [fromView.superview removeFromSuperview];
    参数解析:
    duration:动画的持续时间
    options:转场动画的类型
    animations:将改变视图属性的代码放在这个block中
    completion:动画结束后,会自动调用这个block
```

####UIImageView的帧动画

```
    UIImageView可以让一系列的图片在特定的时间内按顺序显示
    相关属性解析:
    animationImages:要显示的图片(一个装着UIImage的NSArray)
    animationDuration:完整地显示一次animationImages中的所有图片所需的时间
    animationRepeatCount:动画的执行次数(默认为0,代表无限循环)
    相关方法解析:
    - (void)startAnimating; 开始动画
    - (void)stopAnimating;  停止动画
    - (BOOL)isAnimating;  是否正在运行动画
```

####UIActivityIndicatorView

```
    是一个旋转进度轮,可以用来告知用户有一个操作正在进行中,一般用initWithActivityIndicatorStyle初始化
    方法解析:
    - (void)startAnimating; 开始动画
    - (void)stopAnimating;  停止动画
    - (BOOL)isAnimating;  是否正在运行动画
    UIActivityIndicatorViewStyle有3个值可供选择:
    UIActivityIndicatorViewStyleWhiteLarge   //大型白色指示器
    UIActivityIndicatorViewStyleWhite      //标准尺寸白色指示器
    UIActivityIndicatorViewStyleGray    //灰色指示器,用于白色背景
```


text:
using System;
using System.Net.Sockets;
using System.Text.Json;

using NetCoreServer;

namespace Benchmarks
{

    public class HttpBenchmarkSession : HttpSession
    {

        public HttpBenchmarkSession(HttpServer server) : base(server) { }

        protected override void OnReceivedRequest(HttpRequest request)
        {
            if (request.Url.StartsWith("/plaintext"))
            {
                SendResponseAsync(MakeResponse("Hello, World!", "text/plain; charset=UTF-8"));
            }
            else if (request.Url.StartsWith("/json"))
            {
                var value = new JsonResult() { Message = "Hello, World!" };
                var serialized = JsonSerializer.Serialize(value);

                SendResponseAsync(MakeResponse(serialized, "application/json; charset=UTF-8"));
            }
            else
            {
                SendResponseAsync(Response.MakeErrorResponse("Not found", 404));
            }
        }

        protected override void OnReceivedRequestError(HttpRequest request, string error)
        {
            Console.WriteLine($"Request error: {error}");
        }

        protected override void OnError(SocketError error)
        {
            Console.WriteLine($"HTTP session caught an error: {error}");
        }

        private static HttpResponse MakeResponse(string value, string contentType)
        {
            var response = new HttpResponse(200, "OK", "HTTP/1.1");

            response.SetHeader("Server", "NetCoreServer");
            response.SetHeader("Date", DateTime.UtcNow.ToString("r"));
            response.SetHeader("Content-Type", contentType);

            response.SetBody(value);

            return response;
        }

    }

}


text:
<creeper_core>
  <log_file>${server.home}/log/creeper.log</log_file>
  <db>
    <driver_class>oracle.jdbc.driver.OracleDriver</driver_class>
    <user_name>creeper</user_name>
    <password>creeper</password>
    <url>jdbc:oracle:thin:@10.1.7.79:1521:tjkf</url>
  </db>
  <jpa>
    <!-- <property name="hibernate.hbm2ddl.auto" value="create"/> -->
    <property name="hibernate.show_sql" value="true"/>
  </jpa>
</creeper_core>


text:
package com.dianping.cat.status.model.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import com.dianping.cat.status.model.BaseEntity;
import com.dianping.cat.status.model.IVisitor;

import java.util.LinkedHashMap;
import java.util.Map;

import static com.dianping.cat.status.model.Constants.ATTR_ID;
import static com.dianping.cat.status.model.Constants.ENTITY_EXTENSIONDETAIL;

@Data
@EqualsAndHashCode(callSuper = true)
public class ExtensionDetail extends BaseEntity<ExtensionDetail> {
    private String id;
    private double value;
    private Map<String, String> dynamicAttributes = new LinkedHashMap<String, String>();

    public ExtensionDetail() {
    }

    public ExtensionDetail(String id) {
        this.id = id;
    }

    @Override
    public void accept(IVisitor visitor) {
        visitor.visitExtensionDetail(this);
    }

    @Override
    public void mergeAttributes(ExtensionDetail other) {
        assertAttributeEquals(other, ENTITY_EXTENSIONDETAIL, ATTR_ID, id, other.getId());

        for (Map.Entry<String, String> e : other.getDynamicAttributes().entrySet()) {
            dynamicAttributes.put(e.getKey(), e.getValue());
        }

        value = other.getValue();
    }

    public void setDynamicAttribute(String name, String value) {
        dynamicAttributes.put(name, value);
    }

    public ExtensionDetail setId(String id) {
        this.id = id;
        return this;
    }

    public ExtensionDetail setValue(double value) {
        this.value = value;
        return this;
    }

}


text: Search for wifi networks with a Raspberry Pi Zero.


text:
@echo off
set /p pathName=Enter Path to Folder where you want delete video from?
cd /d %pathName%
set /p check=is this correct path to your osu song folder: %pathName%?
IF %check%==y (
	echo okey press any key to start program
	pause
	del /s *.avi
	del /s *.flv
	del /s *.wmv
	del /s *.mp4
) ELSE (
	echo Restart program
	pause
)
@echo on
echo Thank You Using John Osu Video Deleter Program press any key to quit
pause