text:
@interface AFHTTPRequestOperationManager (JsonModelRequestOperationManager)

- (AFHTTPRequestOperation *)GET:(NSString *)URLString
                     parameters:(id)parameters
                          clazz:(Class)clazz
                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (AFHTTPRequestOperation *)POST:(NSString *)URLString
                      parameters:(id)parameters
                           clazz:(Class)clazz
                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (AFHTTPRequestOperation *)POST:(NSString *)URLString
                      parameters:(id)parameters
       constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
                           clazz:(Class)clazz
                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (AFHTTPRequestOperation *)PUT:(NSString *)URLString
                     parameters:(id)parameters
                          clazz:(Class)clazz
                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (AFHTTPRequestOperation *)PATCH:(NSString *)URLString
                       parameters:(id)parameters
                            clazz:(Class)clazz
                          success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                          failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (AFHTTPRequestOperation *)DELETE:(NSString *)URLString
                        parameters:(id)parameters
                             clazz:(Class)clazz
                           success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                           failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

@end


text:
"""Provide advanced parsing abilities for ParenMatch and other extensions.

HyperParser uses PyParser.  PyParser mostly gives information on the
proper indentation of code.  HyperParser gives additional information on
the structure of code.
"""

import string
from keyword import iskeyword
from idlelib import PyParse

# all ASCII chars that may be in an identifier
_ASCII_ID_CHARS = frozenset(string.ascii_letters + string.digits + "_")
# all ASCII chars that may be the first char of an identifier
_ASCII_ID_FIRST_CHARS = frozenset(string.ascii_letters + "_")

# lookup table for whether 7-bit ASCII chars are valid in a Python identifier
_IS_ASCII_ID_CHAR = [(chr(x) in _ASCII_ID_CHARS) for x in range(128)]
# lookup table for whether 7-bit ASCII chars are valid as the first
# char in a Python identifier
_IS_ASCII_ID_FIRST_CHAR = \
    [(chr(x) in _ASCII_ID_FIRST_CHARS) for x in range(128)]

class HyperParser:
    def __init__(self, editwin, index):
        "To initialize, analyze the surroundings of the given index."

        self.editwin = editwin
        self.text = text = editwin.text

        parser = PyParse.Parser(editwin.indentwidth, editwin.tabwidth)

        def index2line(index):
            return int(float(index))
        lno = index2line(text.index(index))

        if not editwin.context_use_ps1:
            for context in editwin.num_context_lines:
                startat = max(lno - context, 1)
                startatindex = repr(startat) + ".0"
                stopatindex = "%d.end" % lno
                # We add the newline because PyParse requires a newline
                # at end. We add a space so that index won't be at end
                # of line, so that its status will be the same as the
                # char before it, if should.
                parser.set_str(text.get(startatindex, stopatindex)+' \n')
                bod = parser.find_good_parse_start(
                          editwin._build_char_in_string_func(startatindex))
                if bod is not None or startat == 1:
                    break
            parser.set_lo(bod or 0)
        else:
            r = text.tag_prevrange("console", index)
            if r:
                startatindex = r[1]
            else:
                startatindex = "1.0"
            stopatindex = "%d.end" % lno
            # We add the newline because PyParse requires it. We add a
            # space so that index won't be at end of line, so that its
            # status will be the same as the char before it, if should.
            parser.set_str(text.get(startatindex, stopatindex)+' \n')
            parser.set_lo(0)

        # We want what the parser has, minus the last newline and space.
        self.rawtext = parser.str[:-2]
        # Parser.str apparently preserves the statement we are in, so
        # that stopatindex can be used to synchronize the string with
        # the text box indices.
        self.stopatindex = stopatindex
        self.bracketing = parser.get_last_stmt_bracketing()
        # find which pairs of bracketing are openers. These always
        # correspond to a character of rawtext.
        self.isopener = [i>0 and self.bracketing[i][1] >
                         self.bracketing[i-1][1]
                         for i in range(len(self.bracketing))]

        self.set_index(index)

    def set_index(self, index):
        """Set the index to which the functions relate.

        The index must be in the same statement.
        """
        indexinrawtext = (len(self.rawtext) -
                          len(self.text.get(index, self.stopatindex)))
        if indexinrawtext < 0:
            raise ValueError("Index %s precedes the analyzed statement"
                             % index)
        self.indexinrawtext = indexinrawtext
        # find the rightmost bracket to which index belongs
        self.indexbracket = 0
        while (self.indexbracket < len(self.bracketing)-1 and
               self.bracketing[self.indexbracket+1][0] < self.indexinrawtext):
            self.indexbracket += 1
        if (self.indexbracket < len(self.bracketing)-1 and
            self.bracketing[self.indexbracket+1][0] == self.indexinrawtext and
           not self.isopener[self.indexbracket+1]):
            self.indexbracket += 1

    def is_in_string(self):
        """Is the index given to the HyperParser in a string?"""
        # The bracket to which we belong should be an opener.
        # If it's an opener, it has to have a character.
        return (self.isopener[self.indexbracket] and
                self.rawtext[self.bracketing[self.indexbracket][0]]
                in ('"', "'"))

    def is_in_code(self):
        """Is the index given to the HyperParser in normal code?"""
        return (not self.isopener[self.indexbracket] or
                self.rawtext[self.bracketing[self.indexbracket][0]]
                not in ('#', '"', "'"))

    def get_surrounding_brackets(self, openers='([{', mustclose=False):
        """Return bracket indexes or None.

        If the index given to the HyperParser is surrounded by a
        bracket defined in openers (or at least has one before it),
        return the indices of the opening bracket and the closing
        bracket (or the end of line, whichever comes first).

        If it is not surrounded by brackets, or the end of line comes
        before the closing bracket and mustclose is True, returns None.
        """

        bracketinglevel = self.bracketing[self.indexbracket][1]
        before = self.indexbracket
        while (not self.isopener[before] or
              self.rawtext[self.bracketing[before][0]] not in openers or
              self.bracketing[before][1] > bracketinglevel):
            before -= 1
            if before < 0:
                return None
            bracketinglevel = min(bracketinglevel, self.bracketing[before][1])
        after = self.indexbracket + 1
        while (after < len(self.bracketing) and
              self.bracketing[after][1] >= bracketinglevel):
            after += 1

        beforeindex = self.text.index("%s-%dc" %
            (self.stopatindex, len(self.rawtext)-self.bracketing[before][0]))
        if (after >= len(self.bracketing) or
           self.bracketing[after][0] > len(self.rawtext)):
            if mustclose:
                return None
            afterindex = self.stopatindex
        else:
            # We are after a real char, so it is a ')' and we give the
            # index before it.
            afterindex = self.text.index(
                "%s-%dc" % (self.stopatindex,
                 len(self.rawtext)-(self.bracketing[after][0]-1)))

        return beforeindex, afterindex

    # the set of built-in identifiers which are also keywords,
    # i.e. keyword.iskeyword() returns True for them
    _ID_KEYWORDS = frozenset({"True", "False", "None"})

    @classmethod
    def _eat_identifier(cls, str, limit, pos):
        """Given a string and pos, return the number of chars in the
        identifier which ends at pos, or 0 if there is no such one.

        This ignores non-identifier eywords are not identifiers.
        """
        is_ascii_id_char = _IS_ASCII_ID_CHAR

        # Start at the end (pos) and work backwards.
        i = pos

        # Go backwards as long as the characters are valid ASCII
        # identifier characters. This is an optimization, since it
        # is faster in the common case where most of the characters
        # are ASCII.
        while i > limit and (
                ord(str[i - 1]) < 128 and
                is_ascii_id_char[ord(str[i - 1])]
        ):
            i -= 1

        # If the above loop ended due to reaching a non-ASCII
        # character, continue going backwards using the most generic
        # test for whether a string contains only valid identifier
        # characters.
        if i > limit and ord(str[i - 1]) >= 128:
            while i - 4 >= limit and ('a' + str[i - 4:pos]).isidentifier():
                i -= 4
            if i - 2 >= limit and ('a' + str[i - 2:pos]).isidentifier():
                i -= 2
            if i - 1 >= limit and ('a' + str[i - 1:pos]).isidentifier():
                i -= 1

            # The identifier candidate starts here. If it isn't a valid
            # identifier, don't eat anything. At this point that is only
            # possible if the first character isn't a valid first
            # character for an identifier.
            if not str[i:pos].isidentifier():
                return 0
        elif i < pos:
            # All characters in str[i:pos] are valid ASCII identifier
            # characters, so it is enough to check that the first is
            # valid as the first character of an identifier.
            if not _IS_ASCII_ID_FIRST_CHAR[ord(str[i])]:
                return 0

        # All keywords are valid identifiers, but should not be
        # considered identifiers here, except for True, False and None.
        if i < pos and (
                iskeyword(str[i:pos]) and
                str[i:pos] not in cls._ID_KEYWORDS
        ):
            return 0

        return pos - i

    # This string includes all chars that may be in a white space
    _whitespace_chars = " \t\n\\"

    def get_expression(self):
        """Return a string with the Python expression which ends at the
        given index, which is empty if there is no real one.
        """
        if not self.is_in_code():
            raise ValueError("get_expression should only be called"
                             "if index is inside a code.")

        rawtext = self.rawtext
        bracketing = self.bracketing

        brck_index = self.indexbracket
        brck_limit = bracketing[brck_index][0]
        pos = self.indexinrawtext

        last_identifier_pos = pos
        postdot_phase = True

        while 1:
            # Eat whitespaces, comments, and if postdot_phase is False - a dot
            while 1:
                if pos>brck_limit and rawtext[pos-1] in self._whitespace_chars:
                    # Eat a whitespace
                    pos -= 1
                elif (not postdot_phase and
                      pos > brck_limit and rawtext[pos-1] == '.'):
                    # Eat a dot
                    pos -= 1
                    postdot_phase = True
                # The next line will fail if we are *inside* a comment,
                # but we shouldn't be.
                elif (pos == brck_limit and brck_index > 0 and
                      rawtext[bracketing[brck_index-1][0]] == '#'):
                    # Eat a comment
                    brck_index -= 2
                    brck_limit = bracketing[brck_index][0]
                    pos = bracketing[brck_index+1][0]
                else:
                    # If we didn't eat anything, quit.
                    break

            if not postdot_phase:
                # We didn't find a dot, so the expression end at the
                # last identifier pos.
                break

            ret = self._eat_identifier(rawtext, brck_limit, pos)
            if ret:
                # There is an identifier to eat
                pos = pos - ret
                last_identifier_pos = pos
                # Now, to continue the search, we must find a dot.
                postdot_phase = False
                # (the loop continues now)

            elif pos == brck_limit:
                # We are at a bracketing limit. If it is a closing
                # bracket, eat the bracket, otherwise, stop the search.
                level = bracketing[brck_index][1]
                while brck_index > 0 and bracketing[brck_index-1][1] > level:
                    brck_index -= 1
                if bracketing[brck_index][0] == brck_limit:
                    # We were not at the end of a closing bracket
                    break
                pos = bracketing[brck_index][0]
                brck_index -= 1
                brck_limit = bracketing[brck_index][0]
                last_identifier_pos = pos
                if rawtext[pos] in "([":
                    # [] and () may be used after an identifier, so we
                    # continue. postdot_phase is True, so we don't allow a dot.
                    pass
                else:
                    # We can't continue after other types of brackets
                    if rawtext[pos] in "'\"":
                        # Scan a string prefix
                        while pos > 0 and rawtext[pos - 1] in "rRbBuU":
                            pos -= 1
                        last_identifier_pos = pos
                    break

            else:
                # We've found an operator or something.
                break

        return rawtext[last_identifier_pos:self.indexinrawtext]

if __name__ == '__main__':
    import unittest
    unittest.main('idlelib.idle_test.test_hyperparser', verbosity=2)

redpajama_set_name: RedPajamaGithub


text:
/*
Theme Name: Dance Floor
Theme URI: http://www.gorillathemes.com/demo/dancefloor/
Description: Night Club WordPress theme
Version: 1.0
Author: Gorilla Themes
Author URI: http://gorillathemes.com
*/
/* Reset & Common */
html,body,h1,h2,h3,h4,h5,h6,table,thead,tbody,tfoot,tr,th,td,pre,strong,font,b,fieldset,legend,ul,ol,li,form,label,input,textarea,select,option,iframe {
	border:0;
	font:normal 12px arial,sans-serif;
	margin:0;
	padding:0;
	text-align:left;
}
table {
	width:100%;
}
table,thead,tbody,tfoot,tr,th,td {
	border-collapse:collapse;
	vertical-align:top;
}
ul,ol {
	list-style:none;
}
a {
	color:#2883db;
	text-decoration:none;
}
strong {
	font-weight:700;
}
:focus {
	outline:0;
}
.clr {
	clear:both;
}
h1 a {
	color:#fff;
	font-size:36px;
	line-height:32px;
	font-weight:bold;
	text-transform:uppercase;
}
h1 a:visited{color:#fafafa;}
h3 {
	font-size:16px;
}
h4 {
	font-size:16px;
	padding:10px 10px 10px 5px;
	font-weight:bold;
}
/* Main Structure */
body {
	background:#4e0109 url(images/red/back.jpg) top center fixed ;
	text-align:left;
	color:#fff;
	line-height:18px;
	font-family:Arial, serif;
	font-size:13px;
}
.ipad body {
	background:#4e0109 url(images/red/back.jpg) top center no-repeat ;
	text-align:left;
	color:#fff;
	line-height:18px;
	font-family:Arial, serif;
	font-size:13px;
}
.iphone body {
	background:#4e0109 url(images/red/back.jpg) top center no-repeat ;
	text-align:left;
	color:#fff;
	line-height:18px;
	font-family:Arial, serif;
	font-size:13px;
}
.out {
	width:960px;
	margin:0 auto;
	padding:0;
	background:url(images/black-opcity-40.png) top center;
}
.secondary {
	width:960px;
	margin:0 auto;
	padding:0;
}
.main {
	margin:0 auto;
}
#header {
	width:960px;
	position:relative;
	z-index:58;
	height:160px;
	margin:0 auto;
}
#show {
	width:958px;
	margin:0 auto;
	position:relative;
	top:0px;
	z-index:2;
	height:378px;
	background:url(images/slideshow.png) top center no-repeat;
}
#showvideo{width:904px;
	margin:20px auto;
	position:relative;
	top:0px;
	height:410px;
}
.thetitle {
	background:url(images/transslide.png);
	position:absolute;
	z-index:17;
	width:860px;
	height:40px;
	color:#fff;
	margin-top:260px;
	padding:20px 15px 0;
	font-weight:bold;
	text-transform:uppercase;
	font-size:16px;
	text-align:left;
}
/* Top Logo, Main Navigation, Header  */
#logo {
	float:left;
	position:relative;
	z-index:30;
	top:20px;
}
#header #header_ad {
	float:right;
	height:60px;
	padding-top: 34px;
}
/*  ----------  Body - Contents, Blog Posts, Sidebar ----------  */
#body {
	width:980px;
}
.single {
	width:960px;
	padding-top:20px;
}
/*  ----------  Sidebar ----------  */
#body #sidebar {
	display:inline;
	width:296px;
}
:first-child+html #sidebar ul {
	text-align:left;
	margin-top:-8px;
}
#sidebar ul {
	text-align:left;
}
#sidebar,#sidebar li,#sidebar li a {
	color:#6fa7e0;
	line-height:22px;
	font-size:14px;
}
#sidebar .sidebarLiContent {
	background:url(images/sidebarwmiddle.png) top left repeat-y;
	width:300px;
	position: relative;
	left:-4px;
	padding:0!important;
	margin:0!important;
}
#sidebar .WidgetContent {
	padding:10px 20px 20px 28px;
}
#sidebar .sidebarLiContentad {
	width:320px;
	padding:20px 0 0;
}
#sidebar .sidebarLiContent h2 {
	text-transform:uppercase;
	color:#fff;
	font:normal 25px Arial, sans-serif;
	padding:20px 0px;
}
.adSpacetop {
	background:url(images/sidebarwtop.png) bottom left no-repeat;
	height:14px;
	width:300px;
	position: relative;
	left:-4px;
	padding-top:0!important;
	margin-top:0!important;
}
.ie7 .adSpacetop {
	background:url(images/sidebarwtop.png) bottom left no-repeat;
	height:14px;
	width:300px;
	position: relative;
	top:3px;
	left:-4px;
	padding-top:0!important;
	margin-top:0!important;
}
#sidebar .sidebarLiContent {
	background:url(images/sidebarwmiddle.png) top left repeat-y;
	width:300px;
	position: relative;
	left:-4px;
	padding:0!important;
	margin:0!important;
}
.adSpacebot {
	padding-left:30px;
	background:url(images/sidebarwbottom.png) top left no-repeat;
	height:14px;
	position: relative;
	left:-4px;
	margin-bottom:10px;
	width:300px;
}
.adSpace {
	padding:10px 0 0;
	background:#000;
}
.adSpace a {
	float:left;
	display:inline;
	width:125px;
	margin:10px 0 0 22px;
}
ul li.calendar a:hover{text-decoration: underline;color:#ebebeb;}
#sidebar .sidebarLiContent ul li.calendar {
	background:none!important;
	float:right;
	margin:0 0 4px!important;
	padding:0 26px 3px 0!important;
	display:block;
	width:210px;
	border:none!important;
}
#sidebar .event_divider {
	border-bottom:1px solid #192637;
	height:64px;
	padding-top:14px;
	width:286px;
}
#sidebar .sidebarLiContent ul li {
	background:url(images/default/bullet-arrow.png) top left no-repeat;
	height:22px;
	padding:0 0 0 28px;
}
#sidebar .sidebarLiContent ul li a {
	color:#fafafa;
}
#sidebar .sidebarLiContent ul li a:hover {
	color:#6fa7e0;
}
*+html #sidebar input.feed_input {
	float:left;
	text-align:left;
	padding:8px 0 4px 24px;
	margin-left:14px;
	color:#333;
}
*+html #sidebar input.feed_input:hover {
	float:left;
	text-align:left;
	padding:8px 0 4px 24px;
	margin-left:14px;
	color:#333;
}
#sidebar input.feed_input {
	background:#ddd!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	width:230px!important;
	text-align: left!important;
}
#sidebar input.feed_input:hover {
	background:#c9c9c9!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	text-align: left!important;
}
#sidebar input#s {
	background:#ddd!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	width:230px!important;
	text-align: left!important;
}
label.screen-reader-text {
	display:none;
}
#sidebar input[type=text] {
	height:21px;
	width:186px;
	font-size:13px;
	padding-left:33px;
	color:#333;
}
#sidebar input[type=text]:hover {
	height:21px;
	width:186px;
	font-size:13px;
	padding-left:33px;
	color:#666;
}
#sidebar input.searchsubmit {
	width:41px;
	height:34px;
	cursor:pointer;
	padding-left:0;
}
#sidebar input[type=submit] {
	background:#ebebeb;
	border:1px solid #ccc;
	color:#000; font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal; padding:3px 10px;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	text-align: center!important;
	float:right;
	margin:15px 13px 10px 0;
}
#sidebar input[type=submit]:hover {
	cursor:pointer;
}
#bannersSquare {
	margin:auto;
	text-align:center;
}
#bannersSquare img {
	padding:6px;
}
.ad300x250 {
	margin:0px auto 16px auto;
	text-align:right;
}
.ad300x250 img{
	margin:2px 15px 0 0;
}
#centerwidgets{
	margin-left:11px;
}
.homewmiddle h2 {
	font-size:17px;
	top:-24px;
	left:25px;
	position:relative;
	z-index:8;
	text-transform: uppercase;
}
.homewbox {
	float:left;
	width:308px;
	padding:20px 0px 30px 2px;
}
.homewtop{
	height:29px;
	background: url(images/homewtop.png) top center no-repeat;
}
.homewmiddle{
	background: url(images/homewmiddle.png) top center repeat-y;
	padding:10px 0 10px 38px;
}
.homewbottom{
	height:29px;
	background: url(images/homewbottom.png) top center no-repeat;
}
/* flickr Box */
.flickr {
	width:880px;
	text-align:center;
	height:auto;
	padding-left:42px!important;
	color:#660066;
	list-style-type:none;
	margin:0;
}
.flickrbox{ height:110px; background: url(images/flickrbox.png) top center no-repeat;padding:40px 0 0 0;}
.flickr img {
	padding:0 10px 8px 0;
	background:none!important;
}
.flickr img:hover {
	padding:0 10px 8px 0;
	background:none!important;
	opacity:0.4;filter:alpha(opacity=40);
}
/* Post Block */
.taghead {
	text-transform: uppercase;
	font-size:28px;
}
.postMain {
	background:url(images/topnewssec.png) left bottom no-repeat;
	width:614px;
	height:17px;
}
#content {
	width: 614px;
}
#content .post {
	background:url(images/middlenews.png) top left repeat;
	width:520px;
	color:#fff;
	float:left;
	padding:15px 70px 30px 30px;
}
#content .post  ol li {
	list-style-type: decimal;
	padding-bottom: 0.85em;
}
#content .post ul li {
	list-style-type: disc;
	padding-bottom: 0.85em;
}
#content .post ul {
	margin-left:0;
	padding-left:2.5em;
}
#content .post ol {
	margin-left:0;
	padding-left:2.5em;
}
#content .post a{
	color:#2883DB;
}
blockquote {
	color: #e0dc6f;
	font-weight: bold;
	font-style: italic;
	margin: 1em 3em;
}
blockquote p:before {
	content: '"';
}
blockquote p:after {
	content: '"';
}
#content .post h1 a{
	color:#fafafa;
}
#content .postPage {
	background:url(images/middlenews.png) top left repeat;
	width:550px;
	color:#fff;
	float:left;
	padding:15px 30px 30px 30px;
}
#content .postcom {
	background:url(images/middlenews.png) top left repeat;
	width:520px;
	color:#fff;
	float:left;
	padding:4px 70px 4px 30px;
}
#content .post h2 a {
	text-transform:uppercase;
	color:#fafafa;
	font-size:26px;
	line-height:32px;
}
#content .post h2 a:hover {
	color:#fafafa;
	font-size:26px;
	line-height:32px;
}
#content .post h3 {
	font-size:14px;
	color:#666;
	padding:10px 0 20px;
	text-align:left;
}
#content .post .postMeta {
	margin-bottom:0;
	padding:4px 5px 4px 10px;
	color:#b7cbd7;
	text-align:left;
	text-transform: uppercase;
	clear:both;
	background: #031723;
	font-size:11px;
}
#content .post .postMeta a {
	color:#2883DB;
	text-align:left;
	font-size:10px;
}
.homethumb {
	padding:14px 15px 10px 0px;
	float:left;
}
#content .postFoot {
	background:url(images/bottomnews.png) top left repeat;
	height:24px;
	width: 614px;
	margin-bottom: 6px;
	text-align:left;
}
/* Comments */
.commentsMain {

	padding:20px 20px 20px 0;
}
.commentsMain h3{
	font-size: 24px;
	text-transform: uppercase;
	padding-left: 20px;
}
.commentsMain h2#comments,.commentsMain #respond h2 {
	text-transform:uppercase;
	font:bold 22px arial, sans-serif;
	color:#fff;
	padding:20px 0 10px;
}
.commentsMain .commWrap {

	width:600px;
	padding:9px 0 0;
}
.commentsMain ol.commentlist {
	color:#fff;
	width:560px;
}
#content .commentsMain  .post ul,ol {
	margin-left:0;
	padding-left:0;
}
.commentsMain ol.commentlist li {
	padding:10px;
	margin-bottom:14px;
	line-height:22px;
}
.commentsMain ol.commentlist li li {
	margin:10px 10px 20px;
	line-height:22px;
}
.commentsMain .commentlist img {
	float:left;
	margin-right:9px;
}
.commentsMain .commentlist .author {
	font:small-caps bold 1.2em Georgia, "Times New Roman", Times, serif;
	text-decoration:underline;
}
.commentlist .time {
	padding-left:13px;
}
.commentsMain .commenttext {
	border-top:1px solid #c5f386;
	padding:0 20px 10px;
	color:#fafcf6;
}
.commentsMain ol.commentlist li.alt {
	padding:20px 10px 10px;
	margin-bottom:10px;
	color:#fff;
	list-style:none;
	border-top:4px solid #666;
}
.commentsMain .commFoot {
	background:url(images/postBot.png) left top no-repeat;
	height:19px;
}
.commentsMain form#commentform p {
	padding:0 0 10px;
}
.commentsMain form#commentform p input,.commentsMain form#commentform p textarea {
	padding:5px;
}
.commentsMain form#commentform p input#submitcomment {
	cursor:pointer;
	background:#ebebeb;
	border:1px solid #ccc;
	color:#000; font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal; padding:3px 10px;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	text-align: center!important;
	float:right;
	margin:15px 0px 10px 0;
}
.commentsMain form#commentform p input#submitcomment:hover {
	cursor:pointer;
	background:#ebebeb;
	border:1px solid #ccc;
	color:#000; font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal; padding:3px 10px;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	text-align: center!important;
	margin:15px 76px 10px 0;
}
textarea#comment {
	width:520px;
	background:#ddd!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	text-align: left!important;
}
input#url {
	background:#ddd!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	width:180px!important;
	text-align: left!important;
}
input#email {
	background:#ddd!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	width:180px!important;
	text-align: left!important;
}
input#author {
	background:#ddd!important;
	border:1px solid #3d0643!important;
	color:#212121!important;
	font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif!important;
	font-style:normal!important;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px!important;
	width:180px!important;
	text-align: left!important;
}
/*  Images */
p img {
	max-width:100%;
	background:none!important;
	padding:4px;
	border:none!important;
}
img.centered {
	display:block;
	margin-left:auto;
	margin-right:auto;
}
img.alignright {
	padding:4px;
	margin:0 0 2px 7px;
	display:inline;
}
img.alignleft {
	padding:4px;
	margin:0 7px 0 0;
	display:inline;
}
.alignright {
	float:right;
}
.alignleft {
	float:left;
}
div a img {
	border:none;
}
.left_float_image {
	float:left;
	margin:3px 10px 35px 0;
	padding:3px;
}
.thumb_search img {
	margin:4px 10px 16px 0;
	float:left;
}
/*- Main Menu -*/
#menu_navigation {
	width:914px;
	height:51px;
	margin:0 auto;
	padding:16px 0 0 4px;
	background: url(images/menu.png) top center no-repeat;
	position: relative;
	z-index: 99;
}
/*- Main Menu -*/
.menu a {
	font-weight:bold;
	text-decoration:none;
	text-align:left;
	text-transform:uppercase;
	font-size:20px;
	line-height:20px;
	height: 22px;
	color: #fff;
}
#menu-nav ul ul a {
	color:#fff;
	background:black;
	font-weight:bold;
	text-decoration:none;
	text-align:left;
	text-transform:uppercase;
	border-bottom:1px solid #212121;
	height:auto;
	line-height:1em;
	padding:10px 5px 0 13px;
	width:160px;
	text-align:left;
}
#menu-nav li:hover > a,#menu-nav ul ul :hover > a {
		background:#4e0109;
	cursor: pointer;
	z-index:96;
}
.menu-header ul li a {
	color:#fff;
	padding:10px 0;
}
.menu-header .current-menu-item a {
	color:#eee;
	background:#4e0109;
	height:22px;
}
#menu-nav .menu-header,div.menu {
	text-transform:none;
	font-weight:bold;
	padding-left: 20px;
	height:61px;
}
#menu-nav .menu-header ul,div.menu ul {
	list-style:none;
	margin:0!important;
}
#menu-nav .menu-header li,div.menu li {
	float:left;
	position:relative;
	margin:0!important;
}
#menu-nav li a {
	display:block;
	text-decoration:none;
	padding:9px 13px 0px 13px;

}
:first-child+html #menu-nav li a {
	display:block;
	text-decoration:none;
	padding:3px 13px;
	padding-top:5px;
}
#menu-nav ul ul {
	display:none;
	position:absolute;
	top:28px;
	left:0;
	float:left;
	box-shadow:0 3px 3px rgba(0,0,0,0.2);
	-moz-box-shadow:0 3px 3px rgba(0,0,0,0.2);
	-webkit-box-shadow:0 3px 3px rgba(0,0,0,0.2);
	z-index:99999;
}
#menu-nav ul ul ul {
	left:100%;
	top:0;
}
#menu-nav ul li:hover > ul {
	display:block;
}
cufon.cufon.cufon-canvas {
	padding-top:0;
}
/* Calendar */
.date_title {
	font-family:Georgia,"Times New Roman",Times,serif;
	margin:0 0 0px;
	padding:0;
}
.date_title h2 {
	color:#542437;
	font-size:160%;
	font-style:normal;
	font-weight:bold;
	letter-spacing:-1px;
	line-height:115%;
	margin-top:0;
	padding:0;
}
.date_title p.details {
	background:#542437;
}
.date_title .date_back {
	float:right;
	height:83px;
	margin:-14px 0px 0 0;
	overflow:hidden;
	padding:0;
	position: relative;
	left:50px;
	width:52px;
}
.date_title .day {
	font-size:30px;
	padding:0;
	text-align:center;
	text-transform:uppercase;
	color:#ebebeb!important;
	line-height:24px;
}
.date_title .month {
	text-transform:uppercase;
	font-size:20px;
	font-weight:bold;
	padding:4px 0 0px 0;
	color:#e34d4d;
	text-align:center;
	line-height:24px;
}
.event_back {
	background:url(images/default/calendar.png) left no-repeat!important;
	color:#fff;
	float:left;
	height:52px;
	margin:0 10px 0 0!important;
	overflow:hidden;
	padding:0;
	width:34px;
	clear:both;
}
.event_day {
	font-family:Arial;
	text-align:center;
	text-transform:uppercase;
	font-weight:bold;
	font-size:20px;
	color:#000;
	margin-left:8px!important;
	line-height:14px;
}
.event_month {
	font-family:Arial;
	text-transform:uppercase;
	font-size:10px;
	color:#fff;
	font-weight:bold;
	margin-left:8px!important;
	height:22px;
	line-height:22px;
	text-align:center;
}
.event-info {
	color:#fff!important;
	font-size:11px!important;
}
.eventthumb {
	float:left;
	padding-right:20px;
}
/* gallery clearing*/
.gallery {
	margin:auto;
	overflow:hidden;
	width:94%;
	padding-top:20px;
}
.gallery .gallery-item {
	float:left;
	margin:0!important;
	padding:0!important;
	text-align:center;
}
.gallery img {
	background:none!important;
	padding:2px;
	margin:2px;
	border:none!important;
}
.gallery img:hover {
	margin:2px;
	background:none!important;
	padding:2px;
}
.gallery .gallery-caption {
	margin-left:0;
}
.gallery br {
	clear:both;
}
.col-2 {
	width:50%;
}
.col-3 {
	width:33.333%;
}
.col-4 {
	width:25%;
}
.col-5 {
	width:20%;
}
.col-6 {
	width:16.666%;
}
.col-7 {
	width:14.285%;
}
.col-8 {
	width:12.5%;
}
.col-9 {
	width:11.111%;
}
/* Footer */
#footer_ad{
	margin: 10px auto;
	text-align: center;
	width: 100%;
}
#footOut {
	margin:0 auto;
	width:982px;
	padding:10px 0 0;
	clear:both;
	color:#fff;
}
#footer-bottom {
	background:url(images/footer.png) top center no-repeat;
	width:914px;
	height:51px;
	margin:0 auto;
	padding:16px 0 0 4px;
}
#copyright {
	width:960px;
	margin:0 auto;
	padding:6px 0 0 16px;
}
h1,h2,.menu a,.date_title .day,.date_title .month,taghead {
	visibility: hidden;
}
.simple_socialmedia {
	overflow: hidden;
	padding:10px 0 0 0;
	text-align:center;
	color: #fff;
	font-size: 11px;
	border-top: 1px solid #192637;
	width:100%;
}
div#contentRight .twtr-widget{
    font-family:Verdana,Arial,Helvetica,"Trebuchet MS",Trebuchet,sans-serif !important;
}
.twtr-widget .twtr-tweet-wrap {
    padding:6px 0 !important;
}
div.twtr-tweet-wrap {
    background:none!important;
}
div.twtr-widget .twtr-tweet{border-bottom:1px solid #192637;overflow:hidden;zoom:1;}
div#contentRight .twtr-doc {
    background:none!important;
}
a.twtr-hyperlink{
	color:#2883db!important;
}
.showcase-thumbnail-button-backward .showcase-thumbnail-vertical,showcase-thumbnail-button-forward .showcase-thumbnail-vertical,.showcase-thumbnail-button-forward .showcase-thumbnail-horizontal,.showcase-thumbnail-button-backward .showcase-thumbnail-horizontal {
	background-image: url(images/default/arrows-small.png)!important;
	background-repeat: no-repeat;
	display: block;
	width: 26px;
	height: 26px;
}
.showcase-thumbnail {
	width: 100px;
	height: 65px;
	cursor: pointer;
	position: relative;
}
.showcase-thumbnail:hover {

}
.showcase-thumbnail.active {

}
label.gfield_label {
	font-family:Arial, serif; font-size:12px;
	font-weight:normal;
	text-decoration:none;
 	text-transform:none;
 	color:#fff;
 	width: 100px!important;
}
.gform_wrapper .gfield_radio {
	background:none;
}
.gform_wrapper textarea {
	background:#ebebeb;
	border:1px solid #ccc;
	color:#212121;
	font-size:13px;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal; padding:4px;
}
.gform_body {width:240px;}
.gform_wrapper input {
	background:#ebebeb;
	border:1px solid #ccc;
	color:#212121; font-size:13px;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal;
	padding:4px;

}
.gform_wrapper textarea:hover {
	background:#fafafa; color:#212121;
}
#gforms_confirmation_message {
	width: 230px;
}
.gfield {
	margin-bottom:10px;
}
.gform_wrapper .top_label .gfield_label {
	display:block; float:left;
	padding-right:10px;
	width:100px;
	margin:5px 0 4px!important;
}
h3.gform_title {
	color:#ebebeb!important;
	font-size:20px!important;
	padding-top:0!important;margin-top:0!important;
}
.gform_wrapper:focus {
	outline:none;
}
.gform_wrapper input.medium,input.large,input.textarea {
	background:#ddd;
	border:1px solid #3d0643;
	color:#212121;
	font-size:13px;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px;
}
.gform_wrapper .gfield_checkbox li,.gform_wrapper .gfield_radio li {
	padding:5px 0 0!important;
}
.gform_wrapper input:hover {
	background:#8d8d8d;
	color:#ebebeb;
}
.gform_wrapper select {
	padding:4px 5px;
}
.gform_wrapper input.button {
	background:#ebebeb;
	border:1px solid #ccc;
	color:#000; font-size:13px!important;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal; padding:3px 10px;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	text-align: center!important;
	float:right;
	margin:0 32px 10px 0;
}
.gfield_time_hour input{	background:#ddd;
	border:1px solid #3d0643;
	color:#212121;
	font-size:13px;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px;
}
.gfield_time_minute input{	background:#ddd;
	border:1px solid #3d0643;
	color:#212121;
	font-size:13px;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px;
}
.gfield_time_ampm select{	background:#ddd;
	border:1px solid #3d0643;
	color:#212121;
	font-size:13px;
	font-family:Arial, Helvetica, sans-serif;
	font-style:normal;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	padding:4px;}
.gform_wrapper input.button:hover {
	text-align: center!important;
	background:#8d8d8d;
	color:#ebebeb;
	font-style:normal; padding:3px 10px;
	-moz-border-radius:3px;
	-khtml-border-radius:3px;
	-webkit-border-radius:3px;
	cursor:pointer;
	background: #ccc;
}
.gform_wrapper .top_label input.large,.gform_wrapper .top_label select.large,.gform_wrapper .top_label textarea.textarea {
	width:460px!important;
}
.gform_wrapper .gfield_checkbox,.gform_wrapper .gfield_radio {
	margin:0 0 0 80px!important;
}
.gform_footer.top_label{
	margin:0!important;
	padding: 0!important;
}
.gform_wrapper {
	margin:0!important;
	padding: 0!important;
}
.gfield_required{
	color:#ff0000!important;
}
#player .mejs-container{
	margin:0px auto;
	text-align:center;
	width:960px;background: #000;
}
#player {
	background: #000;
	visibility: hidden;}
.iphone.webkit #player {
  	background-color: black;
  	height:40px;margin-top:20px;
}
.iphone.webkit  #player .mejs-container{
	margin:20px 300px 0 auto;
	text-align:center;
	width:960px;
}
.ipad.webkit  .mejs-container{
	height:100px!important;
}
.ipad.webkit  #player{
	margin:20px 300px 0 auto!important;
	text-align:center;
	top:40px!important;
	width:100%!important;
	background:none!important;
}
.iphone.webkit  .mejs-container{
	height:100px!important;
}
.iphone.webkit  #player{
	margin:20px 300px 0 auto!important;
	text-align:center;
	top:40px!important;
	width:100%!important;
	background:none!important;
}


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

  describe('Articles Controller Tests', function () {
    // Initialize global variables
    var ArticlesController,
      $scope,
      $httpBackend,
      $state,
      Authentication,
      ArticlesService,
      mockArticle;

    // The $resource service augments the response object with methods for updating and deleting the resource.
    // If we were to use the standard toEqual matcher, our tests would fail because the test values would not match
    // the responses exactly. To solve the problem, we define a new toEqualData Jasmine matcher.
    // When the toEqualData matcher compares two objects, it takes only object properties into
    // account and ignores methods.
    beforeEach(function () {
      jasmine.addMatchers({
        toEqualData: function (util, customEqualityTesters) {
          return {
            compare: function (actual, expected) {
              return {
                pass: angular.equals(actual, expected)
              };
            }
          };
        }
      });
    });

    // Then we can start by loading the main application module
    beforeEach(module(ApplicationConfiguration.applicationModuleName));

    // The injector ignores leading and trailing underscores here (i.e. _$httpBackend_).
    // This allows us to inject a service but then attach it to a variable
    // with the same name as the service.
    beforeEach(inject(function ($controller, $rootScope, _$state_, _$httpBackend_, _Authentication_, _ArticlesService_) {
      // Set a new global scope
      $scope = $rootScope.$new();

      // Point global variables to injected services
      $httpBackend = _$httpBackend_;
      $state = _$state_;
      Authentication = _Authentication_;
      ArticlesService = _ArticlesService_;

      // create mock article
      mockArticle = new ArticlesService({
        _id: '525a8422f6d0f87f0e407a33',
        title: 'An Article about INFY',
        content: 'INFY rocks!'
      });

      // Mock logged in user
      Authentication.user = {
        roles: ['user']
      };

      // Initialize the Articles controller.
      ArticlesController = $controller('ArticlesController as vm', {
        $scope: $scope,
        articleResolve: {}
      });

      // Spy on state go
      spyOn($state, 'go');
    }));
  });
}());


text:
"""Import all base classes at one place."""

from .cart import BaseCart, BaseCartItem
from .contact import BaseAddress
from .order import BaseOrder, BaseOrderItem
from .product import BaseProduct


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Puccinia exhauriens var. abyssinica Henn.

### Remarks
null


text:
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SFA.DAS.CommitmentsV2.Models;

namespace SFA.DAS.CommitmentsV2.Data.Configuration
{
    public class StandardConfiguration : IEntityTypeConfiguration<Standard>
    {
        public void Configure(EntityTypeBuilder<Standard> builder)
        {
            builder.ToTable("Standard");
            builder.HasKey(x=> x.StandardUId);

            builder.Property(x => x.StandardUId).HasColumnName("StandardUId").HasColumnType("varchar").HasMaxLength(20).IsRequired();
            builder.Property(x => x.LarsCode).HasColumnName("LarsCode").HasColumnType("int").IsRequired().ValueGeneratedNever();
            builder.Property(x => x.IFateReferenceNumber).HasColumnName("IFateReferenceNumber").HasColumnType("varchar").HasMaxLength(10).IsRequired(false);
            builder.Property(x => x.Version).HasColumnName("Version").HasColumnType("varchar").HasMaxLength(10).IsRequired(false);
            builder.Property(x => x.Title).HasColumnName("Title").HasColumnType("varchar").HasMaxLength(500).IsRequired(false);
            builder.Property(x => x.Duration).HasColumnName("Duration").HasColumnType("int").IsRequired();
            builder.Property(x => x.Level).HasColumnName("Level").HasColumnType("tinyint").IsRequired();
            builder.Property(x => x.MaxFunding).HasColumnName("MaxFunding").HasColumnType("int").IsRequired();
            builder.Property(x => x.EffectiveFrom).HasColumnName("EffectiveFrom").HasColumnType("DateTime").IsRequired(false);
            builder.Property(x => x.EffectiveTo).HasColumnName("EffectiveTo").HasColumnType("DateTime").IsRequired(false);
            builder.Property(x => x.StandardPageUrl).HasColumnName("StandardPageUrl").HasColumnType("varchar").HasMaxLength(500).IsRequired(false);
            builder.Property(x => x.IsLatestVersion).HasColumnName("IsLatestVersion").HasColumnType("bit");

            builder.HasMany(c => c.FundingPeriods)
                .WithOne(c => c.Standard)
                .HasPrincipalKey(c => c.LarsCode)
                .HasForeignKey(c => c.Id).Metadata.DeleteBehavior = DeleteBehavior.Restrict;

            builder.HasMany(c => c.Options);

            builder.HasIndex(c => c.StandardUId);
        }
    }
}


text:
typedef struct blk_ops blk_ops_t;
typedef struct blk_dev blk_dev_t;
typedef struct fs      fs_t;

typedef usize (* blk_read_t)  (blk_dev_t * blk, usize sec, usize n,       u8 * buf);
typedef usize (* blk_write_t) (blk_dev_t * blk, usize sec, usize n, const u8 * buf);

struct blk_ops {
    blk_read_t  read;
    blk_write_t write;
};

struct blk_dev {
    kref_t   ref;
    dlnode_t dl;
    usize    ops_mode;
    usize    sec_size;
    usize    sec_count;
};

// we save operations and open mode in one field
#define BLK_OPS(d)  ((blk_ops_t *) ((d)->ops_mode & ~3))
#define BLK_MODE(d) ((int)         ((d)->ops_mode &  3))

// operation modes
#define BLK_READ    1
#define BLK_WRITE   2

extern void  blk_dev_init(blk_dev_t * dev, void * del, const blk_ops_t * ops, int mode);
extern usize blk_read (blk_dev_t * dev, usize sec, usize n, void * buf);
extern usize blk_write(blk_dev_t * dev, usize sec, usize n, const void * buf);

extern int  blk_dev_count();
extern void blk_dev_regist(blk_dev_t * dev);
extern blk_dev_t * blk_dev_get(int idx);

#endif // DRVS_BLK_H


text:
package org.eclipse.winery.repository.resources.servicetemplates.boundarydefinitions.properties;

import org.eclipse.winery.repository.resources.AbstractResourceTest;

import org.junit.Test;

public class PropertiesResourceTest extends AbstractResourceTest{

	@Test
	public void addProperties() throws Exception {
		this.setRevisionTo("a5fd2da6845e9599138b7c20c1fd9d727c1df66f");
		this.assertPut("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/baobab_serviceTemplate/boundarydefinitions/properties/","entitytypes/servicetemplates/boundarydefinitions/properties/baobab_initial_properties.xml");
		this.assertGet("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/baobab_serviceTemplate/boundarydefinitions/","entitytypes/servicetemplates/boundarydefinitions/properties/baobab_initial_properties_get.json");
	}

}


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

package com.viromedia.bridge.component.node.control;

import android.graphics.Bitmap;
import android.net.Uri;
import android.util.Log;
import com.facebook.react.bridge.ReactContext;
import com.viro.core.AnimatedTexture;
import com.viro.core.Texture;
import com.viro.core.ViroContext;
import com.viromedia.bridge.utility.Helper;
import com.viromedia.bridge.utility.ImageDownloadListener;
import com.viromedia.bridge.utility.ImageDownloader;
import com.viromedia.bridge.utility.ViroLog;

public class VRTAnimatedImage extends VRTImage {
    private static final String TAG = ViroLog.getTag(VRTAnimatedImage.class);
    private AnimatedTextureLoadCallback mMainAnimatedTextureDownloadListener;
    private AnimatedImagePlaceholderCallback mAnimatedImagePlaceholderListener;
    private boolean mPaused;
    private boolean mLoop;
    private boolean mPendingTextureLoad;

    public VRTAnimatedImage(ReactContext context) {
        super(context);
        mLatestImageTexture = null;
        mPendingTextureLoad = false;
        mPaused = false;
        mLoop = true;
    }

    public void setPaused(boolean paused) {
        mPaused = paused;
        if (mLatestImageTexture == null) {
            return;
        }

        AnimatedTexture animTexture = (AnimatedTexture) mLatestImageTexture;
        if (mPaused || !shouldAppear()) {
            animTexture.pause();
        } else {
            animTexture.play();
        }
    }

    public void setLoop(boolean loop) {
        mLoop = loop;
        if (mLatestImageTexture == null) {
            return;
        }

        AnimatedTexture animTexture = (AnimatedTexture) mLatestImageTexture;
        animTexture.setLoop(loop);
    }

    @Override
    protected void handleAppearanceChange() {
        setPaused(mPaused);
        super.handleAppearanceChange();
    }

    @Override
    public void onPropsSet() {
        // Because props are set from the bottom of the scene tree up, if props are set on this
        // node, then we know its the top-most changed element.
        mIsTopMostChangedElement = true;
        setChildrenNotTopMostChangedElement();

        if (isTornDown()) {
            return;
        }

        resizeImage();
        updateQuad();
        if (mImageNeedsDownload) {
            updateImage();
            mImageNeedsDownload = false;
        }
    }

    @Override
    public void updateImage() {
        final ImageDownloader downloader = new ImageDownloader(getContext());
        downloader.setTextureFormat(Texture.Format.RGBA8);

        // If an image isn't already set, then first fetch the placeholder (which should be on disk)
        // before downloading/fetching the source image. Otherwise, just immediately get the source.
        if (!mIsImageSet && mPlaceholderSourceMap != null && mSourceMap != null) {
            mAnimatedImagePlaceholderListener = new AnimatedImagePlaceholderCallback(downloader);
            downloader.getImageAsync(mPlaceholderSourceMap, mAnimatedImagePlaceholderListener);
        } else {
            mPendingTextureLoad = true;
            downloadSourceImage(downloader);
        }
    }

    @Override
    void downloadSourceImage(ImageDownloader downloader) {
        // If no source was provided, just set the material
        if (mSourceMap == null) {
            setMaterialOnQuad();
            return;
        }

        if (mViroContext == null) {
            return;
        }

        // Else, start downloading the animated image source.
        imageDownloadDidStart();

        // Grab and validate the uri from the source map.
        final String URI_KEY = "uri";
        if (!mSourceMap.hasKey(URI_KEY)) {
            throw new IllegalArgumentException("Unable to find \"uri\" key in given source map.");
        }

        Uri sourceUri = Helper.parseUri(mSourceMap.getString(URI_KEY), getContext());
        mMainAnimatedTextureDownloadListener = new AnimatedTextureLoadCallback();
        mLatestImageTexture = new AnimatedTexture(mViroContext, sourceUri, mMainAnimatedTextureDownloadListener);
        mPendingTextureLoad = false;
    }

    @Override
    public void setViroContext(ViroContext context) {
        super.setViroContext(context);

        if (mPendingTextureLoad) {
            downloadSourceImage(null);
        }
    }

    @Override
    public void onTearDown() {
        if (isTornDown()) {
            return;
        }

        if (mMainAnimatedTextureDownloadListener != null) {
            mMainAnimatedTextureDownloadListener.invalidate();
        }

        if (mAnimatedImagePlaceholderListener != null) {
            mAnimatedImagePlaceholderListener.invalidate();
        }

        super.onTearDown();
    }

    @Override
    void setImageOnQuad(Bitmap image) {
        Log.w(TAG,"Unable to set Bitmaps for AnimatedImages!");
    }

    @Override
    public void setMipmap(boolean mipmap) {
        Log.w(TAG,"Unable to set mipmap levels for AnimatedImages!");
    }

    @Override
    public void setFormat(String format) {
        Log.w(TAG,"Unable to set image formats for AnimatedImages!");
    }

    /**
     * This is the ImageDownloadListener for the placeholder image
     */
    class AnimatedImagePlaceholderCallback implements ImageDownloadListener {
        private boolean mIsValid = true;
        private ImageDownloader mDownloader;

        public AnimatedImagePlaceholderCallback(ImageDownloader downloader) {
            mDownloader = downloader;
        }

        public void invalidate() {
            mIsValid = false;
            mDownloader = null;
        }

        @Override
        public boolean isValid() {
            return mIsValid;
        }

        @Override
        public void completed(final Bitmap result) {
            if (!isValid()) {
                return;
            }

            mMainHandler.post(new Runnable() {
                public void run() {
                    if (!isValid()) {
                        return;
                    }
                    setImageOnQuad(result);
                    mPendingTextureLoad = true;
                    downloadSourceImage(mDownloader);
                    mAnimatedImagePlaceholderListener = null;
                }
            });
        }

        @Override
        public void failed(String error) {
            if (!isValid()) {
                return;
            }
            onError(error);
        }
    }

    private class AnimatedTextureLoadCallback implements AnimatedTexture.OnLoadComplete {
        private boolean mIsValid = true;

        public boolean isValid() {
            return mIsValid;
        }

        public void invalidate() {
            mIsValid = false;
        }

        @Override
        public void onSuccess(final AnimatedTexture animatedTexture) {
            mMainHandler.post(new Runnable() {
                @Override
                public void run() {
                    if (!mIsValid) {
                        return;
                    }

                    mIsImageSet = true;
                    updateMainImageDimensions(animatedTexture.getWidth(), animatedTexture.getHeight());

                    setMaterialOnQuad();
                    if (mNativeQuad != null) {
                        mNativeQuad.setImageTexture(animatedTexture);
                    }
                    imageDownloadDidFinish();
                    mMainAnimatedTextureDownloadListener = null;

                    setLoop(mLoop);
                    setPaused(mPaused);
                }
            });
        }

        @Override
        public void onFailure(final String error) {
            mMainHandler.post(new Runnable() {
                @Override
                public void run() {
                    if (!mIsValid) {
                        return;
                    }
                    onError(error);
                }
            });
        }
    }
}


text:
<?php

use common\models\HistoryContact;
use kartik\export\ExportMenu;
use kartik\grid\GridView;
use yii\helpers\Html;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $searchModel common\models\ContactDetailSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'Báo cáo tháng';
$this->params['breadcrumbs'][] = $this->title;
?>

                    Báo cáo tháng

                    <?= $this->render('_report_month', [
                        'model' => $model,
                    ]) ?>

                <?php
                $gridColumns = [
                    [
                        'format' => 'raw',
                        'width' => '15%',
                        'label' => 'Số điện thoại',
                        'class' => '\kartik\grid\DataColumn',
                        'attribute' => 'contact_id',
                        'value' => function ($model, $key, $index, $widget) {
                            /** @var $model \common\models\HistoryContactAsm */
                            return \common\models\ContactDetail::findOne(['id' => $model->contact_id])->phone_number;
                        },
                    ],
                    [
                        'format' => 'raw',
                        'width' => '15%',
                        'class' => '\kartik\grid\DataColumn',
                        'label' => 'Nội dung tin nhắn',
                        'attribute' => 'content',
                        'value' => function ($model, $key, $index, $widget) {
                            /** @var $model \common\models\HistoryContactAsm */
                            return substr(HistoryContact::getContent($model), 0, 60);

                        },
                    ],
                    [
                        'format' => 'raw',
                        'width' => '15%',
                        'class' => '\kartik\grid\DataColumn',
                        'label' => 'Brandname',
                        'attribute' => 'brandname_id',
                        'value' => function ($model, $key, $index, $widget) {
                            /** @var $model \common\models\HistoryContactAsm */
                            return \common\models\HistoryContactAsm::getBrandname($model);

                        },
                    ],
                    [
                        'format' => 'raw',
                        'width' => '15%',
                        'class' => '\kartik\grid\DataColumn',
                        'label' => 'Số tin',
                        'attribute' => 'content_number',
                        'value' => function ($model, $key, $index, $widget) {
                            /** @var $model \common\models\HistoryContactAsm */
                            return $model->content_number;

                        },
                    ],
                    [
                        'format' => 'raw',
                        'width' => '15%',
                        'class' => '\kartik\grid\DataColumn',
                        'label' => 'Trạng thái',
                        'attribute' => 'history_contact_status',
                        'value' => function ($model, $key, $index, $widget) {
                            /** @var $model \common\models\HistoryContactAsm */
                            return $model->getStatusName();

                        },
                    ],
                    [
                        'format' => 'raw',
                        'width' => '15%',
                        'class' => '\kartik\grid\DataColumn',
                        'label' => 'Loại tin',
                        'attribute' => 'type',
                        'value' => function ($model, $key, $index, $widget) {
                            /** @var $model \common\models\HistoryContactAsm */
                            return HistoryContact::getListByType(HistoryContact::find()
                                ->innerJoin('history_contact_asm', 'history_contact_asm.history_contact_id = history_contact.id')
                                ->andWhere(['history_contact.id' => $model->history_contact_id])
                                ->one()->type);

                        },
                    ],
                    [
                        'format' => 'raw',
                        'class' => '\kartik\grid\DataColumn',
                        'width' => '15%',
                        'label' => 'Ngày gửi tin',
                        'filterType' => GridView::FILTER_DATE,
                        'attribute' => 'updated_at',
                        'value' => function ($model) {
                            return date('d-m-Y', $model->updated_at);
                        }
                    ],
                ]
                ?>

                <?php $expMenu = ExportMenu::widget([
                    'dataProvider' => $dataProvider,
                    'columns' => $gridColumns,
                    'showConfirmAlert' => false,
                    'fontAwesome' => true,
                    'showColumnSelector' => true,
                    'dropdownOptions' => [
                        'label' => 'All',
                        'class' => 'btn btn-default'
                    ],
                    'exportConfig' => [
                        ExportMenu::FORMAT_CSV => false,
                        ExportMenu::FORMAT_EXCEL_X => false,
                        ExportMenu::FORMAT_HTML => false,
                        ExportMenu::FORMAT_PDF => false,
                        ExportMenu::FORMAT_TEXT => false,
                        ExportMenu::FORMAT_EXCEL => [
                            'label' => 'Excel',
                        ],
                    ],
                    'target' => ExportMenu::TARGET_SELF,
                    'filename' => "Report"
                ])
                ?>
                <?= GridView::widget([
                    'dataProvider' => $dataProvider,
                    'id' => 'grid-category-ida',
                    'responsive' => true,
                    'pjax' => true,
                    'hover' => true,
                    'columns' => $gridColumns,
                    'panel' => [
                        'type' => GridView::TYPE_DEFAULT,
                    ],
                    'toolbar' => [
                        '{export}',
                        $expMenu,
                        ['content' =>
                            Html::a('', ['search'], [
                                'data-pjax' => 0,
                                'class' => 'btn btn-default',
                                'title' => Yii::t('kvgrid', 'Reset Grid')
                            ])
                        ],
                    ],
                    'export' => [
                        'label' => "Page",
                        'fontAwesome' => true,
                        'showConfirmAlert' => false,
                        'target' => GridView::TARGET_BLANK,

                    ],
                    'exportConfig' => [
                        GridView::EXCEL => ['label' => 'Excel', 'filename' => "Report"],
                    ],
                ]); ?>


text:
<?php
$framework = array(
    'category' => 'boilerplate', /* accepts wordpress,joomla,third_party,boilerplate, course */
    'name' => 'adrienjoly',
    'full_name' => 'adrienjoly/landing-page-boilerplate',
    'short_description' => 'A pure client-side landing page template that you can freely fork, customize, host and link to your own domain name (e.g. using Github Pages). Relies on Mailchimp (for user email subscriptions) and Google Analytics (for stats).',
    'long_description' => '',
    'homepage' => 'https://github.com/adrienjoly/landing-page-boilerplate',
    'github_repo' => 'https://github.com/adrienjoly/landing-page-boilerplate',
    'documentation' => '',
    'demo' => 'http://landing.adrienjoly.com/',
    'pricing' => '',
    'affiliate_program' => '',
    'support' => '',
    'instagram' => '',
    'pinterest' => '',
    'twitter' => '', /* full url */
    'facebook' => '', /* full url */
    'banner' => 'assets/img/banners/adrienjoly.png' /* be sure to commit this asset to frameworks/src/htdocs/assets/img/banners/ */

);


text:
package com.eddienicole.checkers;

import java.util.ArrayList;

public class MockPlayer extends AbstractPlayer {
	private MoveInterface theMoveThatThisGuyIsOftenProneToDoing;

	public MockPlayer() {
		super(false);
	}

	public MockPlayer(boolean isRed) {
		super(isRed);
	}

	@Override
	public MoveInterface getMove(ArrayList<MoveInterface> legalMoves) {
		return this.theMoveThatThisGuyIsOftenProneToDoing;
	}

	@Override
	public boolean isRed() {
		return this.isRed;
	}

	public void setRed(boolean isRed) {
		this.isRed = isRed;
	}

	public void setTheMoveThatThisGuyIsOftenProneToDoing(
			MoveInterface theMoveThatThisGuyIsOftenProneToDoing) {
		this.theMoveThatThisGuyIsOftenProneToDoing = theMoveThatThisGuyIsOftenProneToDoing;
	}

}


text:
'use babel';

import path from 'path';
import manager from './atom-ternjs-manager';
import packageConfig from './atom-ternjs-package-config';
import {
  openFileAndGoTo
} from './atom-ternjs-helper';
import navigation from './services/navigation';
import {messages} from './services/debug';

export default class Client {

  constructor(projectDir) {

    this.projectDir = projectDir;
    // collection files the server currently holds in its set of analyzed files
    this.analyzedFiles = [];
  }

  completions(file, end) {

    return this.post('query', {

      query: {

        type: 'completions',
        file: path.normalize(file),
        end: end,
        types: true,
        includeKeywords: true,
        sort: packageConfig.options.sort,
        guess: packageConfig.options.guess,
        docs: packageConfig.options.documentation,
        urls: packageConfig.options.urls,
        origins: packageConfig.options.origins,
        lineCharPositions: true,
        caseInsensitive: packageConfig.options.caseInsensitive
      }
    });
  }

  documentation(file, end) {

    return this.post('query', {

      query: {

        type: 'documentation',
        file: path.normalize(file),
        end: end
      }
    });
  }

  refs(file, end) {

    return this.post('query', {

      query: {

        type: 'refs',
        file: path.normalize(file),
        end: end
      }
    });
  }

  updateFull(editor) {

    return this.post('query', { files: [{

      type: 'full',
      name: path.normalize(atom.project.relativizePath(editor.getURI())[1]),
      text: editor.getText()
    }]});
  }

  updatePart(editor, start, text) {

    return this.post('query', [{

      type: 'full',
      name: path.normalize(atom.project.relativizePath(editor.getURI())[1]),
      offset: {

        line: start,
        ch: 0
      },
      text: editor.getText()
    }]);
  }

  update(editor) {

    const buffer = editor.getBuffer();

    if (!buffer.isModified()) {

      return Promise.resolve({});
    }

    const uRI = editor.getURI();

    if (!uRI) {

      return Promise.reject({type: 'info', message: messages.noURI});
    }

    const file = path.normalize(atom.project.relativizePath(uRI)[1]);

    // check if this file is excluded via dontLoad
    if (
      manager.server &&
      manager.server.dontLoad(file)
    ) {

      return Promise.resolve({});
    }

    // do not request files if we already know it is registered
    if (this.analyzedFiles.includes(file)) {

      return this.updateFull(editor);
    }

    // check if the file is registered, else return
    return this.files().then((data) => {

      const files = data.files;

      if (files) {

        files.forEach(file => file = path.normalize(file));
        this.analyzedFiles = files;
      }

      const registered = files && files.includes(file);

      if (registered) {

        // const buffer = editor.getBuffer();
        // if buffer.getMaxCharacterIndex() > 5000
        //   start = 0
        //   end = 0
        //   text = ''
        //   for diff in editorMeta.diffs
        //     start = Math.max(0, diff.oldRange.start.row - 50)
        //     end = Math.min(buffer.getLineCount(), diff.oldRange.end.row + 5)
        //     text = buffer.getTextInRange([[start, 0], [end, buffer.lineLengthForRow(end)]])
        //   promise = this.updatePart(editor, start, text)
        // else
        return this.updateFull(editor);

      } else {

        return Promise.resolve({});
      }
    }).catch((err) => {

      console.error(err);
    });
  }

  rename(file, end, newName) {

    return this.post('query', {

      query: {

        type: 'rename',
        file: path.normalize(file),
        end: end,
        newName: newName
      }
    });
  }

  type(editor, position) {

    const file = path.normalize(atom.project.relativizePath(editor.getURI())[1]);
    const end = {

      line: position.row,
      ch: position.column
    };

    return this.post('query', {

      query: {

        type: 'type',
        file: file,
        end: end,
        preferFunction: true
      }
    });
  }

  definition() {

    const editor = atom.workspace.getActiveTextEditor();
    const cursor = editor.getLastCursor();
    const position = cursor.getBufferPosition();
    const [project, file] = atom.project.relativizePath(editor.getURI());
    const end = {

      line: position.row,
      ch: position.column
    };

    return this.post('query', {

      query: {

        type: 'definition',
        file: path.normalize(file),
        end: end
      }

    }).then((data) => {

      if (data && data.start) {

        if (navigation.set(data)) {

          const path_to_go = path.isAbsolute(data.file) ? data.file : `${project}/${data.file}`;
          openFileAndGoTo(data.start, path_to_go);
        }
      }
    }).catch((err) => {

      console.error(err);
    });
  }

  getDefinition(file, range) {
    return this.post('query', {
      query: {
        type: 'definition',
        file: path.normalize(file),
        start: {
          line: range.start.row,
          ch: range.start.column
        },
        end: {
          line: range.end.row,
          ch: range.end.column
        }
      }
    });
  }

  files() {

    return this.post('query', {

      query: {

        type: 'files'
      }

    }).then((data) => {

      return data;
    });
  }

  post(type, data) {

    const promise = manager.server.request(type, data);

    return promise;
  }
}


text:
define(["dojo/has","./shape"], function(has, shapeLib){

	has.add("gfxRegistry", 1);

	var registry = {};

	// a set of ids (keys=type)
	var _ids = {};
	// a simple set impl to map shape<->id
	var hash = {};

	registry.register = shapeLib.register = function(/*dojox/gfx/shape.Shape*/s){
		// summary:
		//		Register the specified shape into the graphics registry.
		// s: dojox/gfx/shape.Shape
		//		The shape to register.
		// returns: Number
		//		The unique id associated with this shape.

		// the id pattern : type+number (ex: Rect0,Rect1,etc)
		var t = s.declaredClass.split('.').pop();
		var i = t in _ids ? ++_ids[t] : ((_ids[t] = 0));
		var uid = t+i;
		hash[uid] = s;
		return uid;
	};

	registry.byId = shapeLib.byId = function(/*String*/id){
		// summary:
		//		Returns the shape that matches the specified id.
		// id: String
		//		The unique identifier for this Shape.
		// returns: dojox/gfx/shape.Shape
		return hash[id]; //dojox/gfx/shape.Shape
	};

	registry.dispose = shapeLib.dispose = function(/*dojox/gfx/shape.Shape*/s, /*Boolean?*/recurse){
		// summary:
		//		Removes the specified shape from the registry.
		// s: dojox/gfx/shape.Shape
		//		The shape to unregister.
		if(recurse && s.children){
			for(var i=0; i< s.children.length; ++i){
				registry.dispose(s.children[i], true);
			}
		}
		var uid = s.getUID();
		hash[uid] = null;
		delete hash[uid];
	};

	return registry;
});


text:
(function($) {
	// loop toggle
	$.extend(MediaElementPlayer.prototype, {
		buildloop: function(player, controls, layers, media) {
			var
				t = this,
				// create the loop button
				loop =
				$('
' +
					'<button type="button" aria-controls="' + t.id + '" title="Toggle Loop" aria-label="Toggle Loop"></button>' +
				'
')
				// append it to the toolbar
				.appendTo(controls)
				// add a click toggle event
				.click(function() {
					player.options.loop = !player.options.loop;
					if (player.options.loop) {
						loop.removeClass('mejs-loop-off').addClass('mejs-loop-on');
					} else {
						loop.removeClass('mejs-loop-on').addClass('mejs-loop-off');
					}
				});
		}
	});

})(mejs.$);


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.apache.hadoop.hbase.rest.client (HBase 0.98.8-hadoop2 API)</title>
<meta name="date" content="2014-11-14">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Package org.apache.hadoop.hbase.rest.client

Class Summary

Class
Description

Client

A wrapper around HttpClient which provides some useful function and
 semantics for interacting with the REST gateway.

Cluster

A list of 'host:port' addresses of HTTP servers operating as a single
 entity, for example multiple redundant web service gateways.

RemoteAdmin

RemoteHTable

HTable interface to remote tables accessed via REST gateway

Response

The HTTP result code, response headers, and body of a HTTP response.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Package

Next Package

Frames

No Frames

All Classes

Copyright © 2014 The Apache Software Foundation. All rights reserved.


text:
goog.module('grrUi.cron.cronJobInspectorDirective');
goog.module.declareLegacyNamespace();

/**
 * CronJobInspectorDirective definition.
 *
 * @return {angular.Directive} Directive definition object.
 */
exports.CronJobInspectorDirective = function() {
  return {
    scope: {
      cronJobId: '=',
    },
    restrict: 'E',
    templateUrl: '/static/angular-components/cron/cron-job-inspector.html'
  };
};

/**
 * Directive's name in Angular.
 *
 * @const
 * @export
 */
exports.CronJobInspectorDirective.directive_name = 'grrCronJobInspector';


text:
<!DOCTYPE html>

<title>MessageStorage_findMessages_filter_isRead_valid</title>
<meta charset="utf-8">


text:
from setuptools import setup, find_packages
import sys, os

version = '0.3'

setup(name='pytravis',
      version=version,
      description="Python wrapper for Travis-CI API",
      long_description="""\
Python wrapper for Travis-CI API. Set of scripts to get information from travis.""",
      classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
      keywords='travis ci countinuous-integration api',
      author='Guillermo Carrasco Hernandez',
      author_email='guillermo.carrasco@scilifelab.se',
      url='http://guillermo-carrasco.github.com/pytravis/',
      license='GPLv3',
      packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
      include_package_data=True,
      zip_safe=True,
      install_requires=[
          'requests',
          'prettytable'
      ],
      data_files=[(os.environ['HOME'], ['config/.pytravisrc'])]
      )


text:
import React, {Component, PropTypes} from 'react';
import Drawer from 'material-ui/Drawer';
import {List, ListItem, MakeSelectable} from 'material-ui/List';
import Divider from 'material-ui/Divider';
import Subheader from 'material-ui/Subheader';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
import {spacing, typography, zIndex} from 'material-ui/styles';
import {cyan500} from 'material-ui/styles/colors';

const SelectableList = MakeSelectable(List);

const styles = {
  logo: {
    cursor: 'pointer',
    fontSize: 24,
    color: typography.textFullWhite,
    lineHeight: `${spacing.desktopKeylineIncrement}px`,
    fontWeight: typography.fontWeightLight,
    backgroundColor: cyan500,
    paddingLeft: spacing.desktopGutter,
    marginBottom: 8,
  },
  version: {
    paddingLeft: spacing.desktopGutterLess,
    fontSize: 16,
  },
};

class AppNavDrawer extends Component {
  static propTypes = {
    docked: PropTypes.bool.isRequired,
    location: PropTypes.object.isRequired,
    onChangeList: PropTypes.func.isRequired,
    onRequestChangeNavDrawer: PropTypes.func.isRequired,
    open: PropTypes.bool.isRequired,
    style: PropTypes.object,
  };

  static contextTypes = {
    muiTheme: PropTypes.object.isRequired,
    router: PropTypes.object.isRequired,
  };

  state = {
    muiVersions: [],
  };

  componentDidMount() {
    const self = this;
    const url = '/versions.json';
    const request = new XMLHttpRequest();

    request.onreadystatechange = function() {
      if (request.readyState === 4 && request.status === 200) {
        self.setState({
          muiVersions: JSON.parse(request.responseText),
          version: JSON.parse(request.responseText)[0],
        });
      }
    };

    request.open('GET', url, true);
    request.send();
  }

  firstNonPreReleaseVersion() {
    let version;
    for (let i = 0; i < this.state.muiVersions.length; i++) {
      version = this.state.muiVersions[i];
      // If the version doesn't contain '-' and isn't 'HEAD'
      if (!/-/.test(version) && version !== 'HEAD') {
        break;
      }
    }
    return version;
  }

  handleVersionChange = (event, index, value) => {
    if (value === this.firstNonPreReleaseVersion()) {
      window.location = 'http://www.material-ui.com/';
    } else {
      window.location = `http://www.material-ui.com/${value}`;
    }
  };

  currentVersion() {
    if (window.location.hostname === 'localhost') return this.state.muiVersions[0];
    if (window.location.pathname === '/') {
      return this.firstNonPreReleaseVersion();
    } else {
      return window.location.pathname.replace(/\//g, '');
    }
  }

  handleRequestChangeLink = (event, value) => {
    window.location = value;
  };

  handleTouchTapHeader = () => {
    this.context.router.push('/');
    this.props.onRequestChangeNavDrawer(false);
  };

  render() {
    const {
      location,
      docked,
      onRequestChangeNavDrawer,
      onChangeList,
      open,
      style,
    } = this.props;

    return (
      <Drawer
        style={style}
        docked={docked}
        open={open}
        onRequestChange={onRequestChangeNavDrawer}
        containerStyle={{zIndex: zIndex.drawer - 100}}
      >

          Material-UI

        Version:
        <DropDownMenu
          value={this.currentVersion()}
          onChange={this.handleVersionChange}
          maxHeight={300}
          style={{width: 181}}
        >
          {this.state.muiVersions.map((version) => (
            <MenuItem
              key={version}
              value={version}
              primaryText={version}
            />
          ))}
        </DropDownMenu>
        <SelectableList
          value={location.pathname}
          onChange={onChangeList}
        >
          <ListItem
            primaryText="Get Started"
            primaryTogglesNestedList={true}
            nestedItems={[
              <ListItem primaryText="Prerequisites" value="/get-started/prerequisites" />,
              <ListItem primaryText="Installation" value="/get-started/installation" />,
              <ListItem primaryText="Usage" value="/get-started/usage" />,
              <ListItem primaryText="Server Rendering" value="/get-started/server-rendering" />,
              <ListItem primaryText="Examples" value="/get-started/examples" />,
            ]}
          />
          <ListItem
            primaryText="Customization"
            primaryTogglesNestedList={true}
            nestedItems={[
              <ListItem primaryText="Themes" value="/customization/themes" />,
              <ListItem primaryText="Inline Styles" value="/customization/inline-styles" />,
              <ListItem primaryText="Colors" value="/customization/colors" />,
            ]}
          />
          <ListItem
            primaryText="Components"
            primaryTogglesNestedList={true}
            nestedItems={[
              <ListItem primaryText="App Bar" value="/components/app-bar" />,
              <ListItem primaryText="Auto Complete" value="/components/auto-complete" />,
              <ListItem primaryText="Avatar" value="/components/avatar" />,
              <ListItem primaryText="Badge" value="/components/badge" />,
              <ListItem
                primaryText="Buttons"
                primaryTogglesNestedList={true}
                nestedItems={[
                  <ListItem primaryText="Flat Button" value="/components/flat-button" />,
                  <ListItem primaryText="Raised Button" value="/components/raised-button" />,
                  <ListItem primaryText="Floating Action Button" value="/components/floating-action-button" />,
                  <ListItem primaryText="Icon Button" value="/components/icon-button" />,
                ]}
              />,
              <ListItem primaryText="Card" value="/components/card" />,
              <ListItem primaryText="Date Picker" value="/components/date-picker" />,
              <ListItem primaryText="Dialog" value="/components/dialog" />,
              <ListItem primaryText="Divider" value="/components/divider" />,
              <ListItem primaryText="Drawer" value="/components/drawer" />,
              <ListItem primaryText="Grid List" value="/components/grid-list" />,
              <ListItem
                primaryText="Icons"
                primaryTogglesNestedList={true}
                nestedItems={[
                  <ListItem primaryText="Font Icon" value="/components/font-icon" />,
                  <ListItem primaryText="SVG Icon" value="/components/svg-icon" />,
                ]}
              />,
              <ListItem primaryText="List" value="/components/list" />,
              <ListItem
                primaryText="Menus"
                primaryTogglesNestedList={true}
                nestedItems={[
                  <ListItem primaryText="Menu" value="/components/menu" />,
                  <ListItem primaryText="Icon Menu" value="/components/icon-menu" />,
                  <ListItem primaryText="Drop Down Menu" value="/components/dropdown-menu" />,
                ]}
              />,
              <ListItem primaryText="Paper" value="/components/paper" />,
              <ListItem primaryText="Popover" value="/components/popover" />,
              <ListItem
                primaryText="Progress"
                primaryTogglesNestedList={true}
                nestedItems={[
                  <ListItem primaryText="Circular Progress" value="/components/circular-progress" />,
                  <ListItem primaryText="Linear Progress" value="/components/linear-progress" />,
                  <ListItem primaryText="Refresh Indicator" value="/components/refresh-indicator" />,
                ]}
              />,
              <ListItem primaryText="Select Field" value="/components/select-field" />,
              <ListItem primaryText="Slider" value="/components/slider" />,
              <ListItem
                primaryText="Switches"
                primaryTogglesNestedList={true}
                nestedItems={[
                  <ListItem primaryText="Checkbox" value="/components/checkbox" />,
                  <ListItem primaryText="Radio Button" value="/components/radio-button" />,
                  <ListItem primaryText="Toggle" value="/components/toggle" />,
                ]}
              />,
              <ListItem primaryText="Snackbar" value="/components/snackbar" />,
              <ListItem primaryText="Stepper" value="/components/stepper" />,
              <ListItem primaryText="Subheader" value="/components/subheader" />,
              <ListItem primaryText="Table" value="/components/table" />,
              <ListItem primaryText="Tabs" value="/components/tabs" />,
              <ListItem primaryText="Text Field" value="/components/text-field" />,
              <ListItem primaryText="Time Picker" value="/components/time-picker" />,
              <ListItem primaryText="Toolbar" value="/components/toolbar" />,
            ]}
          />
          <ListItem
            primaryText="Discover More"
            primaryTogglesNestedList={true}
            nestedItems={[
              <ListItem primaryText="Community" value="/discover-more/community" />,
              <ListItem primaryText="Contributing" value="/discover-more/contributing" />,
              <ListItem primaryText="Showcase" value="/discover-more/showcase" />,
              <ListItem primaryText="Related projects" value="/discover-more/related-projects" />,
            ]}
          />
        </SelectableList>
        <Divider />
        <SelectableList
          value=""
          onChange={this.handleRequestChangeLink}
        >
          <Subheader>Resources</Subheader>
          <ListItem primaryText="GitHub" value="https://github.com/callemall/material-ui" />
          <ListItem primaryText="React" value="http://facebook.github.io/react" />
          <ListItem
            primaryText="Material Design"
            value="https://www.google.com/design/spec/material-design/introduction.html"
          />
        </SelectableList>
      </Drawer>
    );
  }
}

export default AppNavDrawer;


text:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/login_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#FF0000" >

</FrameLayout>


text:
class AnsibleCmdb < Formula
  desc "Generates static HTML overview page from Ansible facts"
  homepage "https://github.com/fboender/ansible-cmdb"
  url "https://github.com/fboender/ansible-cmdb/releases/download/1.31/ansible-cmdb-1.31.tar.gz"
  sha256 "ab1be4a85184647bcec08d4e65bda66c7d08c0f88c81eca4d0e44e02b768c2bb"
  license "GPL-3.0-or-later"

  depends_on "libyaml"

  def install
    prefix.install_metafiles
    man1.install "ansible-cmdb.man.1" => "ansible-cmdb.1"
    inreplace "ansible-cmdb.py", "/usr/local", HOMEBREW_PREFIX
    libexec.install Dir["*"] - ["Makefile"]
    bin.write_exec_script libexec/"ansible-cmdb"
  end

  test do
    system bin/"ansible-cmdb", "-dt", "html_fancy", "."
  end
end


text:
#import "NSObject.h"

#import "PBXCompletionItem-Protocol.h"

@class NSImage, NSString;

@interface PBXStringCompletionItem : NSObject <PBXCompletionItem>
{
    NSString *_name;
    NSString *_localizedName;
    long long _priority;
    NSImage *_icon;
}

- (id)completionText;
- (void)dealloc;
- (id)description;
- (id)descriptionText;
- (id)displayText;
- (id)displayType;
- (unsigned long long)hash;
- (id)icon;
- (id)initWithString:(id)arg1;
- (BOOL)isEqual:(id)arg1;
- (id)localizedName;
- (id)name;
- (long long)priority;
- (void)setIcon:(id)arg1;
- (void)setLocalizedName:(id)arg1;
- (void)setPriority:(long long)arg1;

@end


text:
pulp_rpm_repo 'test' do
  pulp_cert_verify false
  display_name 'TPS repository'
  description 'This repository is to keep all TPS reports'
  feed 'https://intech.local/pulp/tps/'
  http true
  https true
end

pulp_rpm_repo 'test-1' do
  pulp_server node['fqdn']
  pulp_ca_cert '/etc/pki/tls/certs/ca.crt'
  display_name 'Param test repository'
  description 'This repository is used to test if parameters are set correctly'
  feed 'https://localhost/'
  skip %w[item1 item2]
  require_signature false
  allowed_keys %w[key1key1 key2key2]
  ssl_ca_cert 'ca_certificate'
  ssl_validation true
  ssl_client_cert 'certificate'
  ssl_client_key 'key'
  relative_url 'repositories/test1'
  max_downloads 10
  max_speed 10_000
  remove_missing false
  retain_old_count 1
  download_policy 'immediate'
  http false
  https true
  checksum_type 'sha1'
  gpgkey 'gpgkey'
  generate_sqlite true
  repoview true
  updateinfo_checksum_type true
end

pulp_rpm_repo 'pulp-2.11-stable' do
  pulp_server node['fqdn']
  pulp_ca_cert '/etc/pki/tls/certs/ca.crt'
  display_name 'Pulp 2.11 Production Releases'
  feed 'https://repos.fedorapeople.org/repos/pulp/pulp/stable/'
  http true
  https true
  action %i[create sync publish]
end

pulp_rpm_repo 'test' do
  pulp_cert_verify false
  action :delete
end


text:
namespace typeConv {
	short bytes2short(uint8_t * bytes);

	void short2bytes(short val, uint8_t *outputLoc);

	long bytes2long(uint8_t * bytes);

	void long2bytes(long val, uint8_t *outputLoc);
}


text:
package net.sf.javaml.filter.discretize;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;

import net.sf.javaml.classification.bayes.AbstractBayesianClassifier;
import net.sf.javaml.classification.bayes.AbstractBayesianClassifier_compact;
import net.sf.javaml.classification.bayes.ClassCounter;
import net.sf.javaml.classification.bayes.ClassCounter_compact;
import net.sf.javaml.core.Dataset;
import net.sf.javaml.core.Instance;
import net.sf.javaml.core.exception.TrainingRequiredException;
import net.sf.javaml.filter.AbstractFilter;

/**
 * A filter that discretizes a range of numeric attributes in the data set into
 * 2 nominal attributes. This discretization process is entropy based.
 *
 * @author Lieven Baeyens
 * @author Thomas Abeel
 */
public class TwoBinMinimalEntropyPartitioning extends AbstractFilter {

	private Hashtable<Integer, Hashtable<Double, ClassCounter>> featureName_HT;
	private Hashtable<Integer, Hashtable<Double, ClassCounter_compact>> featureName_HT_compact;
	private AbstractBayesianClassifier_compact abc_compact;
	private AbstractBayesianClassifier abc;
	private double[] workingfValues;
	private int IndexFirstElementInCurrentBin;
	private int IndexLastElementInCurrentBin;
	private int numFeatures;
	private boolean memoryMode;
	private int initialCap;
	private Hashtable<Integer, Vector<Double>> featureName_HT_Discretized;
	private Vector<Double> borders;
	private boolean sparse;

	/**
	 * Create a new TwoBinMinimalEntropyPartitioning instance.
	 *
	 * @param sparse
	 *            indicates whether the data will be sparse during training and
	 *            filtering
	 */
	public TwoBinMinimalEntropyPartitioning(boolean sparse) {
		this.sparse = sparse;
		// standard time mode (memory vs time cost mode)
		this.memoryMode = false;
	}

	public void setMemoryMode(boolean m) {
		memoryMode = m;
	}

	// building process
	public void build(Dataset data) {
		determineBorders(data, sparse);
	}

	/**
	 * determine borders for every feature
	 *
	 * @param data
	 *            dataset
	 * @param sparse
	 *            sparseness of dataset
	 */
	private void determineBorders(Dataset data, boolean sparse) {

		// for discretisation we need a list of all features and all
		// featurevalues
		abc_compact = new AbstractBayesianClassifier_compact(true, false,
				sparse);
		abc_compact.buildClassifier(data);
		featureName_HT_compact = abc_compact.getFeatureTable_compact();
		numFeatures = featureName_HT_compact.size();
		initialCap = ((int) Math.ceil(numFeatures / 0.75) + 10);
		featureName_HT_Discretized = new Hashtable<Integer, Vector<Double>>(
				initialCap);

		for (Object key : featureName_HT_compact.keySet()) {
			workingfValues = new double[featureName_HT_compact.get(key)
					.keySet().size()];
			int featureName = (Integer) key;
			int index = 0;
			for (Object value : featureName_HT_compact.get(key).keySet()) {
				Double featureValue = (Double) value;
				workingfValues[index] = featureValue;
				index++;
			}

			Arrays.sort(workingfValues);
			borders = new Vector<Double>();
			calculateBins(featureName);
			Collections.sort(borders);
			featureName_HT_Discretized.put(featureName, borders);
		}

	}

	/**
	 * determine borders for one feature recusively
	 *
	 * @param FN
	 *            feature name
	 */
	private void calculateBins(int FN) {
		// start with whole bin
		IndexFirstElementInCurrentBin = 0;
		IndexLastElementInCurrentBin = workingfValues.length - 1;
		// border check (at least 2 elements and 1 border)
		if (IndexLastElementInCurrentBin - IndexFirstElementInCurrentBin >= 1) {
			Border resultBorder = calcLowestEntropyFunction(FN,
					IndexFirstElementInCurrentBin, IndexLastElementInCurrentBin);
			borders.addAll(resultBorder.getTminC());
		}
	}

	/**
	 * Calculate Lowest Entropy Function
	 *
	 * @param FN
	 *            feature name
	 * @param leftborder
	 *            begin of range
	 * @param rightborder
	 *            end of range
	 */

	private Border calcLowestEntropyFunction(int FN, int index1stElement,
			int indexLastElement) {
		// f.e. 3 elements so index 0,1,2 so interval 0-1 , 1-2, 2-3
		// if border is behind first element so index 1 the left bin consists of
		// 1 and the right bin consist of 3-1=2
		Border border = new Border();
		double lowestLEF = Double.MAX_VALUE;
		// starts at 1(after element at index 0) so borderindex=left border of
		// element
		// -1 because of 3 borders
		for (int borderindex = index1stElement + 1; borderindex <= indexLastElement; borderindex++) {
			int sizeBinLeft = borderindex - index1stElement;
			int sizeBinRight = indexLastElement - borderindex + 1;
			HashMap<Integer, Double> classfreqBinS1 = calcClassLabelFreqInS(FN,
					index1stElement, borderindex - 1);
			HashMap<Integer, Double> classfreqBinS2 = calcClassLabelFreqInS(FN,
					borderindex, indexLastElement);
			double EntS1 = calcEntropy(classfreqBinS1);
			double EntS2 = calcEntropy(classfreqBinS2);
			double LEF = ((double) (sizeBinLeft) / (double) (sizeBinLeft + sizeBinRight))
					* (EntS1);
			LEF += ((double) sizeBinRight)
					/ ((double) (sizeBinLeft + sizeBinRight)) * (EntS2);
			if (LEF < lowestLEF) {
				lowestLEF = LEF;
				border.setlowestLEF(LEF);
				Vector<Double> v = new Vector<Double>();
				v.add(workingfValues[borderindex]);
				border.setTMinC(v);
			}
		}

		return border;

	}

	/**
	 * Collect frequencies as input for entropy calculation
	 *
	 * @param FN
	 *            feature name
	 * @param leftborder
	 *            begin of range
	 * @param rightborder
	 *            end of range
	 */
	private HashMap<Integer, Double> calcClassLabelFreqInS(int FN,
			int leftborder, int rightborder) {
		// iterate all elements in interval and check for all classes if there
		// is a count
		HashMap<Integer, Double> classfreqBin = new HashMap<Integer, Double>();

		for (int i = leftborder; i <= rightborder; i++) {
			double FV = workingfValues[i];
			double[] counterTable = abc_compact.getFeatureTable_compact().get(
					FN).get(FV).getCounterTable();
			for (int j = 0; j < counterTable.length; j++) {
				if (counterTable[j] > 0) {
					if (!classfreqBin.containsKey(j)) {
						classfreqBin.put(j, counterTable[j]);
					} else {
						classfreqBin.put(j, classfreqBin.get(j)
								+ counterTable[j]);
					}
				}
			}
		}
		return classfreqBin;

	}

	/**
	 * Entropy calculation
	 *
	 */
	private double calcEntropy(HashMap<Integer, Double> classfreqBin) {

		int numOfClassInstances = 0;
		for (Object key : classfreqBin.keySet()) {
			numOfClassInstances += classfreqBin.get(key);
		}

		double entropy = 0.0;
		for (Object cl : classfreqBin.keySet()) {
			double pClass = ((double) classfreqBin.get(cl) / (double) numOfClassInstances);
			if (pClass != 0.0) {
				entropy += pClass * (Math.log(pClass) / Math.log(2));
			}
		}
		if (entropy == 0.0) {
			return entropy;
		}
		return -1.0 * entropy;

	}

	// filter
	@Override
	public void filter(Instance instance) {
		if (featureName_HT_Discretized == null)
			throw new TrainingRequiredException();

		for (Object key : instance.keySet()) {
			double repVal = calcReplacementValue((Integer) key, instance
					.value((Integer) key));
			instance.put((Integer) key, repVal);
		}

	}

	@Override
	public void filter(Dataset ddata) {

		// we build another bc because of possible folds (validationdata !=
		// trainingdata) as filter argument
		// so not every sampleid is avaliable so index out of bound errors...
		// so we need updated list of available samples and values

		if (memoryMode) {
			// doesnt need the memory usage of AbstractBayesianClassifier
			// but will be slower
			for (Instance inst : ddata) {
				filter(inst);
			}
		} else {
			// faster solution: every unqiue value -> only one calculation of
			// replacement value
			// but needs a list of all sample-ids so needs memory

			abc = new AbstractBayesianClassifier(true, false, sparse);
			abc.buildClassifier(ddata);
			// for discretisation we need a list of all features and all
			// featurevalues
			featureName_HT = abc.getFeatureTable();
			for (Integer key : featureName_HT.keySet()) {
				int FN = key;
				for (Object value : featureName_HT.get(key).keySet()) {
					Double FV = (Double) value;
					// not adding zero values again)
					if ((!sparse) || (FV != 0.0)) {
						double repVal = calcReplacementValue(FN, FV);
						Vector<Integer> v = featureName_HT.get(FN).get(FV)
								.getClassInstanceIDLists();
						Iterator it = v.iterator();
						while (it.hasNext()) {
							int instanceID = (Integer) it.next();
							ddata.get(instanceID - 1).put(key, repVal);
						}
					}

				}

			}
		}

	}

	/**
	 * Determine discrete bin to map on continuous value
	 *
	 * @param FN
	 *            feature name
	 * @param FV
	 *            feature value
	 */

	private double calcReplacementValue(int FN, double FV) {
		if (!featureName_HT_Discretized.containsKey(FN)) {
			// with folds it could be not all features are yet discovered (with
			// sparse dataset)

			return FV;
		} else {

			Vector fvalues = featureName_HT_Discretized.get(FN);
			int bin = 0;
			boolean ok = true;
			if (!fvalues.isEmpty()) {

				while ((ok) && (FV >= (Double) fvalues.get(bin))) {

					// +1 for next bin index +1 for relative to size
					if ((bin + 2) > fvalues.size()) {
						ok = false;
					}// for new bin at the end
					bin++;
				}
			}
			return (double) bin;
		}

	}

}


text:
struct Foo {
    x: isize,
    y: isize,
}

fn main() {
    let f = Foo {
        x: 1,
        y: 2,
    };
    f.x::<isize>;
    //~^ ERROR field expressions may not have generic arguments
    f.x::<>;
    //~^ ERROR field expressions may not have generic arguments
    f.x::();
    //~^ ERROR field expressions may not have generic arguments
}


text:
Julius Sans One is a sans serif typeface family from Chilean type foundry LatinoType.

Updated, April 2015:
hinting was applied (with ttfautohint) and the non-breaking space glyph was adjusted to be the same width as space.


text:
using DGS.Controllers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Web.Mvc;

namespace DGS.Tests.Controllers
{
    [TestClass]
    public class HomeControllerTest
    {
        [TestMethod]
        public void Index()
        {
            // Arrange
            HomeController controller = new HomeController();

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            Assert.IsNotNull(result);
        }

    }
}