--- title: Home content_blocks: - _bookshop_name: hero title: Hi there, I am Vanessa Marley description_html: >-
Photographer and Visual Content Strategist from Albany. I work as a lifestyle, product, and landscape photographer, creating images for a diverse range of requests, from online media to printed artwork.
image: /images/01.jpg image_alt: Vanessa Marley's picture cta_button: Get in touch cta_button_link: "#contact" works_button: See my works works_button_link: "#projects" - _bookshop_name: projects-section title: Latest Works description_html: >-I show only my best works built completely with passion, simplicity, and creativity!
link_url: /projects show_projects: true - _bookshop_name: testimonials-section title: Happy Clients description_html: show_testimonials: true - _bookshop_name: blog-section title: Recent Posts description_html: >-Vonge blog features productivity, tips, inspiration and strategies for massive profits. Find out how to set up a successful blog or how to make yours even better!
link_url: /blog show_posts: true - _bookshop_name: newsletter newsletter_title: Join my mailing list newsletter_description: Get inspiration, updates and, cool stuff! newsletter_identifier: >- frnla.us6.list-manage.com/subscribe/post?u=6314d69a3f315af7ce3fb00a0&id=3038727cc3 newsletter_button: Subscribe - _bookshop_name: contact-form form_title: Get in touch form_description: Vonge comes with a built-in contact form. form_submission_email<EMAIL_ADDRESS>form_button_text: Send now ---


top
| up
| prev
| next
FiberClient Class
Definition at line 15
of FiberConnection.hpp
Constructors
Member Functions
| void |
Exit() override |
| const std::string& |
Name() const override |
Member Variables
Constructor Details
FiberClient Constructor
cmajor::build::FiberClient::FiberClient()
Definition at line 14
of FiberConnection.cpp
:
14 : name("fiber client")
15 {
16 }
Declaration at line 18
of FiberConnection.hpp
Member Function Details
Exit Member Function
void
cmajor::build::FiberClient::Exit() override
Definition at line 23
of FiberConnection.cpp
:
24 {
25 }
Declaration at line 20
of FiberConnection.hpp
Base class overridden functions: cmajor::build::Host::Exit
Name Member Function
const
std::string& cmajor::build::FiberClient::Name() const override
Definition at line 18
of FiberConnection.cpp
:
19 {
20 return name;
21 }
Declaration at line 19
of FiberConnection.hpp
Base class overridden functions: cmajor::build::Host::Name
Called by: cmajor::build::FiberConnection::GetActor
top
| up
| prev
| next


Six more added to Zesa board
by Staff ReporterEnergy and Power Development Minister Fortune Chasi, has in consultation with President Mnangagwa yesterday announced the appointment of six more members of the ZESA Holdings (Pvt) Ltd board.
The six are development economist Professor Ashok Chakravati, Ms Rosemary Siyachitema, experienced accountant Mrs Caroline Mathonsi, seasoned lawyer Mr James Muzangaza, investment banker Mr Jonathan Wood, seasoned marketing enthusiast and business executive Ms Stella Nkomo and accomplished energy engineer Ms Wadzanai Chigwa.
The board members join new executive chairman Dr Sydney Zukuzo Gata and his deputy Mrs Tsitsi Makovah, who were appointed on Wednesday.
In his statement announcing the board Minister Chasi said the new members had their work cut out for them in ensuring that the country has adequate supplies of electricity.


Portfolio
I design and grow digital products
I design and grow digital products
Attended my third hackathon in a row that month with low spirits and high caffeine levels, but lo-and-behold, my team and I managed to clinch the top 5 teams out of over 300 at the API World Hackathon 2016 in San Francisco.
Kingfashion is a white-label, augmented reality mobile app that gamifies the shopping experience for online consumers.
This idea came about when we realized how mundane and impersonal the current online shopping experience is. KingFashion lets users go through an immersive experience of browsing and trying on clothes just by using the smartphone. We give users recommendations based on their personality, previous purchases and preferences, in order to provide a better match.
API World Hackathon 2016 had a range of companies providing their APIs to create useful applications, and my team used the following APIs:
One of the most exhilarating 24 hours with the best bunch trying to figure out augmented reality and machine learning.
Do write to me if you’re excited to learn more about this project. And if you found this interesting, there’s a good chance you’ll find some of my other projects interesting too!


Methods to parse lines of AsciiDoc into an object hierarchyrepresenting the structure of the document. All methods are class methods andshould be invoked from the Lexer class. The main entry point is ::next_block.No Lexer instances shall be discovered running around. (Any attempt toinstantiate a Lexer will be futile).
The object hierarchy created by the Lexer consists of zero or more Sectionand Block objects. Section objects may be nested and a Section objectcontains zero or more Block objects. Block objects may be nested, but mayonly contain other Block objects. Block objects which represent lists maycontain zero or more ListItem objects.
# Create a Reader for the AsciiDoc lines and retrieve the next block from it. # Lexer::next_block requires a parent, so we begin by instantiating an empty Document. doc = Document.new reader = Reader.new lines block = Lexer.next_block(reader, doc) block.class # => Asciidoctor::Block
whether a block supports complex content should be a config settingif terminator is false, that means the all the lines in the reader should be parsedNOTE could invoke filter in here, before and after parsing
# File lib/asciidoctor/lexer.rb, line 769 def self.build_block(block_context, content_type, terminator, parent, reader, attributes, options = {}) if terminator.nil? if content_type == :verbatim buffer = reader.grab_lines_until(:break_on_blank_lines => true, :break_on_list_continuation => true) else buffer = reader.grab_lines_until( :break_on_blank_lines => true, :break_on_list_continuation => true, :preserve_last_line => true, :skip_line_comments => true) {|line| COMPLIANCE[:block_terminates_paragraph] && (is_delimited_block?(line) || line.match(REGEXP[:attr_line])) } # QUESTION check for empty buffer? end elsif content_type != :complex buffer = reader.grab_lines_until(:terminator => terminator, :chomp_last_line => true) elsif terminator == false buffer = nil block_reader = reader else buffer = nil block_reader = Reader.new reader.grab_lines_until(:terminator => terminator) end if content_type == :verbatim && attributes.has_key?('indent') reset_block_indent! buffer, attributes['indent'].to_i end block = Block.new(parent, block_context, buffer) # should supports_caption be necessary? if options.fetch(:supports_caption, false) block.title = attributes.delete('title') if attributes.has_key?('title') block.assign_caption attributes.delete('caption') end if buffer.nil? # we can look for blocks until there are no more lines (and not worry # about sections) since the reader is confined within the boundaries of a # delimited block while block_reader.has_more_lines? parsed_block = next_block(block_reader, block) block.blocks << parsed_block unless parsed_block.nil? end end block end
# File lib/asciidoctor/lexer.rb, line 1309 def self.is_single_line_section_title?(line1) if !line1.nil? && (line1.start_with?('=') || (COMPLIANCE[:markdown_syntax] && line1.start_with?('#'))) && (match = line1.match(REGEXP[:section_title])) single_line_section_level match[1] else false end end
# File lib/asciidoctor/lexer.rb, line 1318 def self.is_two_line_section_title?(line1, line2) if !line1.nil? && !line2.nil? && SECTION_LEVELS.has_key?(line2[0..0]) && line2.match(REGEXP[:section_underline]) && line1.match(REGEXP[:section_name]) && # chomp so that a (non-visible) endline does not impact calculation (line1.chomp.size - line2.chomp.size).abs <= 1 section_level line2 else false end end
# File lib/asciidoctor/lexer.rb, line 1671 def self.process_attribute_entries(reader, parent, attributes = nil) reader.skip_comment_lines while process_attribute_entry(reader, parent, attributes) # discard line just processed reader.advance reader.skip_comment_lines end end
# File lib/asciidoctor/lexer.rb, line 1680 def self.process_attribute_entry(reader, parent, attributes = nil, match = nil) match ||= reader.has_more_lines? ? reader.peek_line.match(REGEXP[:attr_entry]) : nil if match name = match[1] value = match[2].nil? ? '' : match[2] if value.end_with? LINE_BREAK value.chop!.rstrip! while reader.advance next_line = reader.peek_line.strip break if next_line.empty? if next_line.end_with? LINE_BREAK value = "#{value} #{next_line.chop.rstrip}" else value = "#{value} #{next_line}" break end end end store_attribute(name, value, parent.nil? ? nil : parent.document, attributes) true else false end end
Remove the indentation (block offset) shared by all the lines, thenindent the lines by the specified amount if specified
Trim the leading whitespace (indentation) equivalent to the lengthof the indent on the least indented line. If the indent argumentis specified, indent the lines by this many spaces (columns).
The purpose of this method is to shift a block of text toalign to the left margin, while still preserving the relativeindentation between lines
the Array of String lines to process
the integer number of spaces to add to the beginningof each line; if this value is nil, the existingspace is preserved (optional, default: 0)
source = <<EOS def names @name.split ' ') end EOS source.lines.entries # => [" def names\n", " @names.split ' '\n", " end\n"] Lexer.reset_block_indent(source.lines.entries) # => ["def names\n", " @names.split ' '\n", "end\n"] puts Lexer.reset_block_indent(source.lines.entries).join # => def names # => @names.split ' ' # => end
returns the Array of String lines with block offset removed
# File lib/asciidoctor/lexer.rb, line 2162 def self.reset_block_indent!(lines, indent = 0) return if indent.nil? || lines.empty? tab_detected = false # TODO make tab size configurable tab_expansion = ' ' # strip leading block indent offsets = lines.map do |line| # break if the first char is non-whitespace break [] unless line.chomp[0..0].lstrip.empty? if line.include? "\t" tab_detected = true line = line.gsub("\t", tab_expansion) end if (flush_line = line.lstrip).empty? nil elsif (offset = line.length - flush_line.length) == 0 break [] else offset end end unless offsets.empty? || (offsets = offsets.compact).empty? if (offset = offsets.min) > 0 lines.map! {|line| line = line.gsub("\t", tab_expansion) if tab_detected line[offset..-1] || "\n" } end end if indent > 0 padding = ' ' * indent lines.map! {|line| %Q(#{padding}#{line}) } end nil end
Private: Get the Integer section level based on the charactersused in the ASCII line under the section title.
the String line from under the section title.
# File lib/asciidoctor/lexer.rb, line 1259 def self.section_level(line) SECTION_LEVELS[line[0..0]] end
# File lib/asciidoctor/lexer.rb, line 1265 def self.single_line_section_level(marker) marker.length - 1 end
Determines whether this line is the start of any of the delimited blocks
returns the match data if this line is the first line of a delimited block or nil if not
# File lib/asciidoctor/lexer.rb, line 716 def self.is_delimited_block?(line, return_match_data = false) line_len = line.length # optimized for best performance if line_len > 2 if line_len == 3 tip = line.chop tl = 2 else tip = line[0..3] tl = 4 if COMPLIANCE[:markdown_syntax] # special case for fenced code blocks tip_alt = tip.chop if tip_alt == '```' || tip_alt == '~~~' tip = tip_alt tl = 3 end end end if DELIMITED_BLOCKS.has_key? tip # if tip is the full line if tl == line_len - 1 #return_match_data ? BlockMatchData.new(DELIMITED_BLOCKS[tip], tip, tip) : true if return_match_data context, masq = *DELIMITED_BLOCKS[tip] BlockMatchData.new(context, masq, tip, tip) else true end elsif match = line.match(REGEXP[:any_blk]) #return_match_data ? BlockMatchData.new(DELIMITED_BLOCKS[tip], tip, match[0]) : true if return_match_data context, masq = *DELIMITED_BLOCKS[tip] BlockMatchData.new(context, masq, tip, match[0]) else true end else nil end else nil end else nil end end
Checks if these lines are a section title
the first line as a String
the second line as a String (default: nil)
returns the section level if these lines are a section title,false otherwise
# File lib/asciidoctor/lexer.rb, line 1299 def self.is_section_title?(line1, line2 = nil) if (level = is_single_line_section_title?(line1)) level elsif (level = is_two_line_section_title?(line1, line2)) level else false end end
Make sure the Lexer object doesn’t get initialized.
Raises RuntimeError if this constructor is invoked.
# File lib/asciidoctor/lexer.rb, line 31 def initialize raise 'Au contraire, mon frere. No lexer instances will be running around.' end
Return the next Section or Block object from the Reader.
Begins by skipping over blank lines to find the start of the next Sectionor Block. Processes each line of the reader in sequence until a Section orBlock is found or the reader has no more lines.
Uses regular expressions from the Asciidoctor module to match Sectionand Block delimiters. The ensuing lines are then processed accordingto the type of content.
The Reader from which to retrieve the next block
The Document, Section or Block to which the next block belongs
Returns a Section or Block object holding the parsed content of the processed lines
# File lib/asciidoctor/lexer.rb, line 288 def self.next_block(reader, parent, attributes = {}, options = {}) # Skip ahead to the block content skipped = reader.skip_blank_lines # bail if we've reached the end of the parent block or document return nil unless reader.has_more_lines? text_only = options[:text] # check for option to find list item text only # if skipped a line, assume a list continuation was # used and block content is acceptable if text_only && skipped > 0 options.delete(:text) text_only = false end parse_metadata = options.fetch(:parse_metadata, true) #parse_sections = options.fetch(:parse_sections, false) document = parent.document parent_context = parent.is_a?(Block) ? parent.context : nil block = nil style = nil explicit_style = nil while reader.has_more_lines? && block.nil? # if parsing metadata, read until there is no more to read if parse_metadata && parse_block_metadata_line(reader, document, attributes, options) reader.advance next #elsif parse_sections && parent_context.nil? && is_next_line_section?(reader, attributes) # block, attributes = next_section(reader, parent, attributes) # break end # QUESTION introduce parsing context object? this_line = reader.get_line delimited_block = false block_context = nil terminator = nil # QUESTION put this inside call to rekey attributes? if attributes[1] style, explicit_style = parse_style_attribute(attributes) end if delimited_blk_match = is_delimited_block?(this_line, true) delimited_block = true block_context = delimited_blk_match.context terminator = delimited_blk_match.terminator if !style style = attributes['style'] = block_context.to_s elsif style != block_context.to_s if delimited_blk_match.masq.include? style block_context = style.to_sym elsif delimited_blk_match.masq.include?('admonition') && ADMONITION_STYLES.include?(style) block_context = :admonition else puts "asciidoctor: WARNING: line #{reader.lineno}: invalid style for #{block_context} block: #{style}" style = block_context.to_s end end end if !delimited_block # this loop only executes once; used for flow control # break once a block is found or at end of loop # returns nil if the line must be dropped # Implementation note - while(true) is twice as fast as loop while true # process lines verbatim if !style.nil? && COMPLIANCE[:strict_verbatim_paragraphs] && VERBATIM_STYLES.include?(style) block_context = style.to_sym reader.unshift_line this_line # advance to block parsing => break end # process lines normally if !text_only # NOTE we're letting break lines (ruler, page_break, etc) have attributes if (match = this_line.match(REGEXP[:break_line])) block = Block.new(parent, BREAK_LINES[match[0][0..2]]) break # TODO make this a media_blk and handle image, video & audio elsif (match = this_line.match(REGEXP[:media_blk_macro])) blk_ctx = match[1].to_sym block = Block.new(parent, blk_ctx) if blk_ctx == :image posattrs = ['alt', 'width', 'height'] elsif blk_ctx == :video posattrs = ['poster', 'width', 'height'] else posattrs = [] end unless style.nil? || explicit_style attributes['alt'] = style if blk_ctx == :image attributes.delete('style') style = nil end block.parse_attributes(match[3], posattrs, :unescape_input => (blk_ctx == :image), :sub_input => true, :sub_result => false, :into => attributes) target = block.sub_attributes(match[2]) if target.empty? # drop the line if target resolves to nothing return nil end attributes['target'] = target block.title = attributes.delete('title') if attributes.has_key?('title') if blk_ctx == :image document.register(:images, target) attributes['alt'] ||= File.basename(target, File.extname(target)) # QUESTION should video or audio have an auto-numbered caption? block.assign_caption attributes.delete('caption'), 'figure' end break # NOTE we're letting the toc macro have attributes elsif (match = this_line.match(REGEXP[:toc])) block = Block.new(parent, :toc) block.parse_attributes(match[1], [], :sub_result => false, :into => attributes) break end end # haven't found anything yet, continue if (match = this_line.match(REGEXP[:colist])) block = Block.new(parent, :colist) attributes['style'] = 'arabic' items = [] block.buffer = items reader.unshift_line this_line expected_index = 1 begin # might want to move this check to a validate method if match[1].to_i != expected_index puts "asciidoctor: WARNING: line #{reader.lineno + 1}: callout list item index: expected #{expected_index} got #{match[1]}" end list_item = next_list_item(reader, block, match) expected_index += 1 if !list_item.nil? items << list_item coids = document.callouts.callout_ids(items.size) if !coids.empty? list_item.attributes['coids'] = coids else puts "asciidoctor: WARNING: line #{reader.lineno}: no callouts refer to list item #{items.size}" end end end while reader.has_more_lines? && match = reader.peek_line.match(REGEXP[:colist]) document.callouts.next_list break elsif (match = this_line.match(REGEXP[:ulist])) reader.unshift_line this_line block = next_outline_list(reader, :ulist, parent) break elsif (match = this_line.match(REGEXP[:olist])) reader.unshift_line this_line block = next_outline_list(reader, :olist, parent) # QUESTION move this logic to next_outline_list? if !(attributes.has_key? 'style') && !(block.attributes.has_key? 'style') marker = block.buffer.first.marker if marker.start_with? '.' # first one makes more sense, but second on is AsciiDoc-compliant #attributes['style'] = (ORDERED_LIST_STYLES[block.level - 1] || ORDERED_LIST_STYLES.first).to_s attributes['style'] = (ORDERED_LIST_STYLES[marker.length - 1] || ORDERED_LIST_STYLES.first).to_s else style = ORDERED_LIST_STYLES.detect{|s| marker.match(ORDERED_LIST_MARKER_PATTERNS[s]) } attributes['style'] = (style || ORDERED_LIST_STYLES.first).to_s end end break elsif (match = this_line.match(REGEXP[:dlist])) reader.unshift_line this_line block = next_labeled_list(reader, match, parent) break elsif (style == 'float' || style == 'discrete') && is_section_title?(this_line, reader.peek_line) reader.unshift_line this_line float_id, float_title, float_level, _ = parse_section_title(reader, document) float_id ||= attributes['id'] if attributes.has_key?('id') block = Block.new(parent, :floating_title) if float_id.nil? || float_id.empty? # FIXME remove hack of creating throwaway Section to get at the generate_id method tmp_sect = Section.new(parent) tmp_sect.title = float_title block.id = tmp_sect.generate_id else block.id = float_id end document.register(:ids, [block.id, float_title]) if block.id block.level = float_level block.title = float_title break # FIXME create another set for "passthrough" styles elsif !style.nil? && style != 'normal' if PARAGRAPH_STYLES.include?(style) block_context = style.to_sym reader.unshift_line this_line # advance to block parsing => break elsif ADMONITION_STYLES.include?(style) block_context = :admonition reader.unshift_line this_line # advance to block parsing => break else puts "asciidoctor: WARNING: line #{reader.lineno}: invalid style for paragraph: #{style}" style = nil # continue to process paragraph end end break_at_list = (skipped == 0 && parent_context.to_s.end_with?('list')) # a literal paragraph is contiguous lines starting at least one space if style != 'normal' && this_line.match(REGEXP[:lit_par]) # So we need to actually include this one in the grab_lines group reader.unshift_line this_line buffer = reader.grab_lines_until( :break_on_blank_lines => true, :break_on_list_continuation => true, :preserve_last_line => true) {|line| # a preceding blank line (skipped > 0) indicates we are in a list continuation # and therefore we should not break at a list item # (this won't stop breaking on item of same level since we've already parsed them out) # QUESTION can we turn this block into a lambda or function call? (break_at_list && line.match(REGEXP[:any_list])) || (COMPLIANCE[:block_terminates_paragraph] && (is_delimited_block?(line) || line.match(REGEXP[:attr_line]))) } reset_block_indent! buffer block = Block.new(parent, :literal, buffer) # a literal gets special meaning inside of a definition list if LIST_CONTEXTS.include?(parent_context) attributes['options'] ||= [] # TODO this feels hacky, better way to distinguish from explicit literal block? attributes['options'] << 'listparagraph' end # a paragraph is contiguous nonblank/noncontinuation lines else reader.unshift_line this_line buffer = reader.grab_lines_until( :break_on_blank_lines => true, :break_on_list_continuation => true, :preserve_last_line => true, :skip_line_comments => true) {|line| # a preceding blank line (skipped > 0) indicates we are in a list continuation # and therefore we should not break at a list item # (this won't stop breaking on item of same level since we've already parsed them out) # QUESTION can we turn this block into a lambda or function call? (break_at_list && line.match(REGEXP[:any_list])) || (COMPLIANCE[:block_terminates_paragraph] && (is_delimited_block?(line) || line.match(REGEXP[:attr_line]))) } # NOTE we need this logic because we've asked the reader to skip # line comments, which may leave us w/ an empty buffer if those # were the only lines found if buffer.empty? # call get_line since the reader preserved the last line reader.get_line return nil end catalog_inline_anchors(buffer.join, document) first_line = buffer.first if !text_only && (admonition_match = first_line.match(REGEXP[:admonition_inline])) buffer[0] = admonition_match.post_match.lstrip block = Block.new(parent, :admonition, buffer) attributes['style'] = admonition_match[1] attributes['name'] = admonition_name = admonition_match[1].downcase attributes['caption'] ||= document.attributes["#{admonition_name}-caption"] elsif !text_only && COMPLIANCE[:markdown_syntax] && first_line.start_with?('> ') buffer.map! {|line| if line.start_with?('> ') line[2..-1] elsif line.chomp == '>' line[1..-1] else line end } if buffer.last.start_with?('-- ') attribution, citetitle = buffer.pop[3..-1].split(', ') buffer.pop while buffer.last.chomp.empty? buffer[-1] = buffer.last.chomp else attribution, citetitle = nil end attributes['style'] = 'quote' attributes['attribution'] = attribution unless attribution.nil? attributes['citetitle'] = citetitle unless citetitle.nil? # NOTE will only detect headings that are floating titles (not section titles) # TODO could assume a floating title when inside a block context block = build_block(:quote, :complex, false, parent, Reader.new(buffer), attributes) elsif !text_only && buffer.size > 1 && first_line.start_with?('"') && buffer.last.start_with?('-- ') && buffer[-2].chomp.end_with?('"') buffer[0] = first_line[1..-1] attribution, citetitle = buffer.pop[3..-1].split(', ') buffer.pop while buffer.last.chomp.empty? buffer[-1] = buffer.last.chomp.chop attributes['style'] = 'quote' attributes['attribution'] = attribution unless attribution.nil? attributes['citetitle'] = citetitle unless citetitle.nil? block = Block.new(parent, :quote, buffer) #block = Block.new(parent, :quote) #block << Block.new(block, :paragraph, buffer) else # QUESTION is this necessary? #if style == 'normal' && [' ', "\t"].include?(buffer.first[0..0]) # # QUESTION should we only trim leading blanks? # buffer.map! &:lstrip #end block = Block.new(parent, :paragraph, buffer) end end # forbid loop from executing more than once break end end # either delimited block or styled paragraph if block.nil? && !block_context.nil? # abstract and partintro should be handled by open block # FIXME kind of hackish...need to sort out how to generalize this block_context = :open if block_context == :abstract || block_context == :partintro case block_context when :admonition attributes['name'] = admonition_name = style.downcase attributes['caption'] ||= document.attributes["#{admonition_name}-caption"] block = build_block(block_context, :complex, terminator, parent, reader, attributes) when :comment reader.grab_lines_until(:break_on_blank_lines => true, :chomp_last_line => false) return nil when :example block = build_block(block_context, :complex, terminator, parent, reader, attributes, {:supports_caption => true}) when :listing, :fenced_code, :source if block_context == :fenced_code style = attributes['style'] = 'source' lang = this_line[3..-1].strip attributes['language'] = lang unless lang.empty? terminator = terminator[0..2] if terminator.length > 3 elsif block_context == :source AttributeList.rekey(attributes, [nil, 'language', 'linenums']) end block = build_block(:listing, :verbatim, terminator, parent, reader, attributes, {:supports_caption => true}) when :literal block = build_block(block_context, :verbatim, terminator, parent, reader, attributes) when :pass block = build_block(block_context, :simple, terminator, parent, reader, attributes) when :open, :sidebar block = build_block(block_context, :complex, terminator, parent, reader, attributes) when :table block_reader = Reader.new reader.grab_lines_until(:terminator => terminator, :skip_line_comments => true) case terminator[0..0] when ',' attributes['format'] = 'csv' when ':' attributes['format'] = 'dsv' end block = next_table(block_reader, parent, attributes) when :quote, :verse AttributeList.rekey(attributes, [nil, 'attribution', 'citetitle']) block = build_block(block_context, (block_context == :verse ? :verbatim : :complex), terminator, parent, reader, attributes) else # this should only happen if there is a misconfiguration raise "Unsupported block type #{block_context} at line #{reader.lineno}" end end end # when looking for nested content, one or more line comments, comment # blocks or trailing attribute lists could leave us without a block, # so handle accordingly # REVIEW we may no longer need this check if !block.nil? # REVIEW seems like there is a better way to organize this wrap-up block.id ||= attributes['id'] if attributes.has_key?('id') block.title = attributes['title'] unless block.title? block.caption ||= attributes.delete('caption') # AsciiDoc always use [id] as the reftext in HTML output, # but I'd like to do better in Asciidoctor if block.id && block.title? && !attributes.has_key?('reftext') document.register(:ids, [block.id, block.title]) end block.update_attributes(attributes) if block.context == :listing || block.context == :literal catalog_callouts(block.buffer.join, document) end end block end
Return the next section from the Reader.
This method process block metadata, content and subsections for thissection and returns the Section object and any orphaned attributes.
If the parent is a Document and has a header (document title), thenthis method will put any non-section blocks at the start of documentinto a preamble Block. If there are no such blocks, the preamble isdropped.
Since we are reading line-by-line, there’s a chance that metadatathat should be associated with the following block gets consumed.To deal with this case, the method returns a running Hash of“orphaned” attributes that get passed to the next Section or Block.
the source Reader
a Hash of metadata that was left orphaned from theprevious Section.
source # => "Greetings\n---------\nThis is my doc.\n\nSalutations\n-----------\nIt is awesome." reader = Reader.new source.lines.entries # create empty document to parent the section # and hold attributes extracted from header doc = Document.new Lexer.next_section(reader, doc).first.title # => "Greetings" Lexer.next_section(reader, doc).first.title # => "Salutations"
returns a two-element Array containing the Section and Hash of orphaned attributes
# File lib/asciidoctor/lexer.rb, line 167 def self.next_section(reader, parent, attributes = {}) preamble = false # FIXME if attributes[1] is a verbatim style, then don't check for section # check if we are at the start of processing the document # NOTE we could drop a hint in the attributes to indicate # that we are at a section title (so we don't have to check) if parent.is_a?(Document) && parent.blocks.empty? && (parent.has_header? || attributes.delete('invalid-header') || !is_next_line_section?(reader, attributes)) if parent.has_header? preamble = Block.new(parent, :preamble) parent << preamble end section = parent current_level = 0 if parent.attributes.has_key? 'fragment' expected_next_levels = nil # small tweak to allow subsequent level-0 sections for book doctype elsif parent.doctype == 'book' expected_next_levels = [0, 1] else expected_next_levels = [1] end else section = initialize_section(reader, parent, attributes) # clear attributes, except for title which carries over # section title to next block of content attributes = attributes.delete_if {|k, v| k != 'title'} current_level = section.level # subsections in preface & appendix in multipart books start at level 2 if current_level == 0 && section.special && section.document.doctype == 'book' && ['preface', 'appendix'].include?(section.sectname) expected_next_levels = [current_level + 2] else expected_next_levels = [current_level + 1] end end reader.skip_blank_lines # Parse lines belonging to this section and its subsections until we # reach the end of this section level # # 1. first look for metadata thingies (anchor, attribute list, block title line, etc) # 2. then look for a section, recurse if found # 3. then process blocks # # We have to parse all the metadata lines before continuing with the loop, # otherwise subsequent metadata lines get interpreted as block content while reader.has_more_lines? parse_block_metadata_lines(reader, section, attributes) next_level = is_next_line_section? reader, attributes if next_level next_level += section.document.attr('leveloffset', 0).to_i doctype = parent.document.doctype if next_level > current_level || (section.is_a?(Document) && next_level == 0) if next_level == 0 && doctype != 'book' puts "asciidoctor: ERROR: line #{reader.lineno + 1}: only book doctypes can contain level 0 sections" elsif !expected_next_levels.nil? && !expected_next_levels.include?(next_level) puts "asciidoctor: WARNING: line #{reader.lineno + 1}: section title out of sequence: " + "expected #{expected_next_levels.size > 1 ? 'levels' : 'level'} #{expected_next_levels * ' or '}, " + "got level #{next_level}" end # the attributes returned are those that are orphaned new_section, attributes = next_section(reader, section, attributes) section << new_section else if next_level == 0 && doctype != 'book' puts "asciidoctor: ERROR: line #{reader.lineno + 1}: only book doctypes can contain level 0 sections" end # close this section (and break out of the nesting) to begin a new one break end else # just take one block or else we run the risk of overrunning section boundaries new_block = next_block(reader, (preamble || section), attributes, :parse_metadata => false) if !new_block.nil? (preamble || section) << new_block attributes = {} else # don't clear attributes if we don't find a block because they may # be trailing attributes that didn't get associated with a block end end reader.skip_blank_lines end if preamble && !preamble.blocks? # drop the preamble if it has no content section.delete_at(0) end # The attributes returned here are orphaned attributes that fall at the end # of a section that need to get transfered to the next section # see "trailing block attributes transfer to the following section" in # test/attributes_test.rb for an example [section != parent ? section : nil, attributes.dup] end
Parses AsciiDoc source read from the Reader into the Document
This method is the main entry-point into the Lexer when parsing a full document.It first looks for and, if found, processes the document title. It thenproceeds to iterate through the lines in the Reader, parsing the documentinto nested Sections and Blocks.
the Reader holding the source lines of the document
the empty Document into which the lines will be parsed
a Hash of options to control processing
returns the Document object
# File lib/asciidoctor/lexer.rb, line 47 def self.parse(reader, document, options = {}) block_attributes = parse_document_header(reader, document) unless options[:header_only] while reader.has_more_lines? new_section, block_attributes = next_section(reader, document, block_attributes) document << new_section unless new_section.nil? end end document end
Parses the document header of the AsciiDoc source read from the Reader
Reads the AsciiDoc source from the Reader until the end of the documentheader is reached. The Document object is populated with information fromthe header (document title, document attributes, etc). The documentattributes are then saved to establish a save point to which to rollbackafter parsing is complete.
This method assumes that there are no blank lines at the start of the document,which are automatically removed by the reader.
returns the Hash of orphan block attributes captured above the header
# File lib/asciidoctor/lexer.rb, line 72 def self.parse_document_header(reader, document) # capture any lines of block-level metadata and plow away any comment lines # that precede first block block_attributes = parse_block_metadata_lines(reader, document) # special case, block title is not allowed above document title, # carry attributes over to the document body if block_attributes.has_key?('title') document.clear_playback_attributes block_attributes document.save_attributes block_attributes['invalid-header'] = true return block_attributes end # yep, document title logic in AsciiDoc is just insanity # definitely an area for spec refinement assigned_doctitle = nil unless (val = document.attributes.fetch('doctitle', '')).empty? document.title = val assigned_doctitle = val end section_title = nil # check if the first line is the document title # if so, add a header to the document and parse the header metadata if is_next_line_document_title?(reader, block_attributes) document.id, doctitle, _, _ = parse_section_title(reader, document) unless assigned_doctitle document.title = doctitle assigned_doctitle = doctitle end document.attributes['doctitle'] = section_title = doctitle # QUESTION: should this be encapsulated in document? if document.id.nil? && block_attributes.has_key?('id') document.id = block_attributes.delete('id') end parse_header_metadata(reader, document) end if !(val = document.attributes.fetch('doctitle', '')).empty? && val != section_title document.title = val assigned_doctitle = val end # restore doctitle attribute to original assignment if assigned_doctitle document.attributes['doctitle'] = assigned_doctitle end document.clear_playback_attributes block_attributes document.save_attributes # NOTE these are the block-level attributes (not document attributes) that # precede the first line of content (document title, first section or first block) block_attributes end
Consume and parse the two header lines (line 1 = author info, line 2 = revision info).
Returns the Hash of header metadata. If a Document object is supplied, the metadatais applied directly to the attributes of the Document.
the Reader holding the source lines of the document
the Document we are building (default: nil)
parse_header_metadata(Reader.new ["Author Name<EMAIL_ADDRESS>"v1.0, 2012-12-21: Coincide w/ end of world.\n"]) # => {'author' => 'Author Name', 'firstname' => 'Author', 'lastname' => 'Name', 'email' =><EMAIL_ADDRESS># 'revnumber' => '1.0', 'revdate' => '2012-12-21', 'revremark' => 'Coincide w/ end of world.'}
# File lib/asciidoctor/lexer.rb, line 1420 def self.parse_header_metadata(reader, document = nil) # NOTE this will discard away any comment lines, but not skip blank lines process_attribute_entries(reader, document) metadata = {} implicit_author = nil implicit_authors = nil if reader.has_more_lines? && !reader.peek_line.chomp.empty? author_metadata = process_authors reader.get_line unless author_metadata.empty? # apply header subs and assign to document if !document.nil? author_metadata.map do |key, val| val = val.is_a?(String) ? document.apply_header_subs(val) : val document.attributes[key] = val if !document.attributes.has_key?(key) val end implicit_author = document.attributes['author'] implicit_authors = document.attributes['authors'] end metadata = author_metadata end # NOTE this will discard any comment lines, but not skip blank lines process_attribute_entries(reader, document) rev_metadata = {} if reader.has_more_lines? && !reader.peek_line.chomp.empty? rev_line = reader.get_line if match = rev_line.match(REGEXP[:revision_info]) rev_metadata['revdate'] = match[2].strip rev_metadata['revnumber'] = match[1].rstrip unless match[1].nil? rev_metadata['revremark'] = match[3].rstrip unless match[3].nil? else # throw it back reader.unshift_line rev_line end end unless rev_metadata.empty? # apply header subs and assign to document if !document.nil? rev_metadata.map do |key, val| val = document.apply_header_subs(val) document.attributes[key] = val if !document.attributes.has_key?(key) val end end metadata.update rev_metadata end # NOTE this will discard any comment lines, but not skip blank lines process_attribute_entries(reader, document) reader.skip_blank_lines end if !document.nil? # process author attribute entries that override (or stand in for) the implicit author line author_metadata = nil if document.attributes.has_key?('author') && (author_line = document.attributes['author']) != implicit_author # do not allow multiple, process as names only author_metadata = process_authors author_line, true, false elsif document.attributes.has_key?('authors') && (author_line = document.attributes['authors']) != implicit_authors # allow multiple, process as names only author_metadata = process_authors author_line, true else authors = [] author_key = "author_#{authors.size + 1}" while document.attributes.has_key? author_key authors << document.attributes[author_key] author_key = "author_#{authors.size + 1}" end if authors.size == 1 # do not allow multiple, process as names only author_metadata = process_authors authors.first, true, false elsif authors.size > 1 # allow multiple, process as names only author_metadata = process_authors authors.join('; '), true end end unless author_metadata.nil? document.attributes.update author_metadata # special case if !document.attributes.has_key?('email') && document.attributes.has_key?('email_1') document.attributes['email'] = document.attributes['email_1'] end end end metadata end
Parse the first positional attribute and assign named attributes
Parse the first positional attribute to extract the style, role and idparts, assign the values to their cooresponding attribute keys and returnboth the original style attribute and the parsed value from the firstpositional attribute.
The Hash of attributes to process
puts attributes => {1 => "abstract#intro.lead", "style" => "preamble"} parse_style_attribute(attributes) => ["abstract", "preamble"] puts attributes => {1 => "abstract#intro.lead", "style" => "abstract", "id" => "intro", "role" => "lead"}
Returns a two-element Array of the parsed style from thefirst positional attribute and the original style that wasreplaced
# File lib/asciidoctor/lexer.rb, line 2088 def self.parse_style_attribute(attributes) original_style = attributes['style'] raw_style = attributes[1] if !raw_style || raw_style.include?(' ') attributes['style'] = raw_style [raw_style, original_style] # FIXME this logic could be condensed else hash_index = raw_style.index('#') dot_index = raw_style.index('.') if !hash_index.nil? && (dot_index.nil? || hash_index < dot_index) parsed_style = attributes['style'] = (hash_index > 0 ? raw_style[0..(hash_index - 1)] : nil) id = raw_style[(hash_index + 1)..-1] if !dot_index.nil? id, roles = id.split('.', 2) attributes['id'] = id attributes['role'] = roles.tr('.', ' ') else attributes['id'] = id end elsif !dot_index.nil? && (hash_index.nil? || dot_index < hash_index) parsed_style = attributes['style'] = (dot_index > 0 ? raw_style[0..(dot_index - 1)] : nil) roles = raw_style[(dot_index + 1)..-1] if !hash_index.nil? roles, id = roles.split('#', 2) attributes['id'] = id attributes['role'] = roles.tr('.', ' ') else attributes['role'] = roles.tr('.', ' ') end else parsed_style = attributes['style'] = raw_style end [parsed_style, original_style] end end
Convert a string to a legal attribute name.
the String name of the attribute
Returns a String with the legal AsciiDoc attribute name.
sanitize_attribute_name('Foo Bar') => 'foobar' sanitize_attribute_name('foo') => 'foo' sanitize_attribute_name('Foo 3 #-Billy') => 'foo3-billy'
# File lib/asciidoctor/lexer.rb, line 2218 def self.sanitize_attribute_name(name) name.gsub(REGEXP[:illegal_attr_name_chars], '').downcase end
Store the attribute in the document and register attribute entry if accessible
the String name of the attribute to store
the String value of the attribute to store
the Document being parsed
the attributes for the current context
returns a 2-element array containing the attribute name and value
# File lib/asciidoctor/lexer.rb, line 1714 def self.store_attribute(name, value, doc = nil, attrs = nil) if name.end_with?('!') # a nil value signals the attribute should be deleted (undefined) value = nil name = name.chop end name = sanitize_attribute_name(name) accessible = true unless doc.nil? accessible = value.nil? ? doc.delete_attribute(name) : doc.set_attribute(name, value) end unless !accessible || attrs.nil? Document::AttributeEntry.new(name, value).save_to(attrs) end [name, value] end
Catalog any callouts found in the text, but don’t process them
The String of text in which to look for callouts
The current document on which the callouts are stored
Returns nothing
# File lib/asciidoctor/lexer.rb, line 882 def self.catalog_callouts(text, document) text.scan(REGEXP[:callout_scan]) { # alias match for Ruby 1.8.7 compat m = $~ next if m[0].start_with? '\' document.callouts.register(m[1]) } end
Catalog any inline anchors found in the text, but don’t process them
The String text in which to look for inline anchors
The current document on which the references are stored
Returns nothing
# File lib/asciidoctor/lexer.rb, line 897 def self.catalog_inline_anchors(text, document) text.scan(REGEXP[:anchor_macro]) { # alias match for Ruby 1.8.7 compat m = $~ next if m[0].start_with? '\' id, reftext = m[1].split(',') id.sub!(REGEXP[:dbl_quoted], '\2') if !reftext.nil? reftext.sub!(REGEXP[:m_dbl_quoted], '\2') end document.register(:ids, [id, reftext]) } nil end
Collect the lines belonging to the current list item, navigatingthrough all the rules that determine what comprises a list item.
Grab lines until a sibling list item is found, or the block is broken by aterminator (such as a line comment). Definition lists are more greedy ifthey don’t have optional inline item text…they want that text
The Reader from which to retrieve the lines.
The Symbol context of the list (:ulist, :olist, :colist or :dlist)
A Regexp that matches a sibling of this list item or String list marker of the items in this list (default: nil)
Whether the list item has text defined inline (always true except for labeled lists)
Returns an Array of lines belonging to the current list item.
# File lib/asciidoctor/lexer.rb, line 1028 def self.grab_lines_for_list_item(reader, list_type, sibling_trait = nil, has_text = true) buffer = [] # three states for continuation: :inactive, :active & :frozen # :frozen signifies we've detected sequential continuation lines & # continuation is not permitted until reset continuation = :inactive # if we are within a nested list, we don't throw away the list # continuation marks because they will be processed when grabbing # the lines for those nested lists within_nested_list = false # a detached continuation is a list continuation that follows a blank line # it gets associated with the outermost block detached_continuation = nil while reader.has_more_lines? this_line = reader.get_line # if we've arrived at a sibling item in this list, we've captured # the complete list item and can begin processing it # the remainder of the method determines whether we've reached # the termination of the list break if is_sibling_list_item?(this_line, list_type, sibling_trait) prev_line = buffer.empty? ? nil : buffer.last.chomp if prev_line == LIST_CONTINUATION if continuation == :inactive continuation = :active has_text = true buffer[-1] = "\n" unless within_nested_list end # dealing with adjacent list continuations (which is really a syntax error) if this_line.chomp == LIST_CONTINUATION if continuation != :frozen continuation = :frozen buffer << this_line end this_line = nil next end end # a delimited block immediately breaks the list unless preceded # by a list continuation (they are harsh like that ;0) if match = is_delimited_block?(this_line, true) if continuation == :active buffer << this_line # grab all the lines in the block, leaving the delimiters in place # we're being more strict here about the terminator, but I think that's a good thing buffer.concat reader.grab_lines_until(:terminator => match.terminator, :grab_last_line => true) continuation = :inactive else break end # technically attr_line only breaks if ensuing line is not a list item # which really means attr_line only breaks if it's acting as a block delimiter elsif list_type == :dlist && continuation != :active && this_line.match(REGEXP[:attr_line]) break else if continuation == :active && !this_line.chomp.empty? # literal paragraphs have special considerations (and this is one of # two entry points into one) # if we don't process it as a whole, then a line in it that looks like a # list item will throw off the exit from it if this_line.match(REGEXP[:lit_par]) reader.unshift_line this_line buffer.concat reader.grab_lines_until( :preserve_last_line => true, :break_on_blank_lines => true, :break_on_list_continuation => true) {|line| # we may be in an indented list disguised as a literal paragraph # so we need to make sure we don't slurp up a legitimate sibling list_type == :dlist && is_sibling_list_item?(line, list_type, sibling_trait) } continuation = :inactive # let block metadata play out until we find the block elsif this_line.match(REGEXP[:blk_title]) || this_line.match(REGEXP[:attr_line]) || this_line.match(REGEXP[:attr_entry]) buffer << this_line else if nested_list_type = (within_nested_list ? [:dlist] : NESTABLE_LIST_CONTEXTS).detect {|ctx| this_line.match(REGEXP[ctx]) } within_nested_list = true if nested_list_type == :dlist && $~[3].to_s.empty? # get greedy again has_text = false end end buffer << this_line continuation = :inactive end elsif !prev_line.nil? && prev_line.chomp.empty? # advance to the next line of content if this_line.chomp.empty? reader.skip_blank_lines this_line = reader.get_line # if we hit eof or a sibling, stop reading break if this_line.nil? || is_sibling_list_item?(this_line, list_type, sibling_trait) end if this_line.chomp == LIST_CONTINUATION detached_continuation = buffer.size buffer << this_line else # has_text is only relevant for dlist, which is more greedy until it has text for an item # for all other lists, has_text is always true # in this block, we have to see whether we stay in the list if has_text # slurp up any literal paragraph offset by blank lines if this_line.match(REGEXP[:lit_par]) reader.unshift_line this_line buffer.concat reader.grab_lines_until( :preserve_last_line => true, :break_on_blank_lines => true, :break_on_list_continuation => true) {|line| # we may be in an indented list disguised as a literal paragraph # so we need to make sure we don't slurp up a legitimate sibling list_type == :dlist && is_sibling_list_item?(line, list_type, sibling_trait) } # TODO any way to combine this with the check after skipping blank lines? elsif is_sibling_list_item?(this_line, list_type, sibling_trait) break elsif nested_list_type = NESTABLE_LIST_CONTEXTS.detect {|ctx| this_line.match(REGEXP[ctx]) } buffer << this_line within_nested_list = true if nested_list_type == :dlist && $~[3].to_s.empty? # get greedy again has_text = false end else break end else # only dlist in need of item text, so slurp it up! # pop the blank line so it's not interpretted as a list continuation buffer.pop unless within_nested_list buffer << this_line has_text = true end end else has_text = true if !this_line.chomp.empty? if nested_list_type = (within_nested_list ? [:dlist] : NESTABLE_LIST_CONTEXTS).detect {|ctx| this_line.match(REGEXP[ctx]) } within_nested_list = true if nested_list_type == :dlist && $~[3].to_s.empty? # get greedy again has_text = false end end buffer << this_line end end this_line = nil end reader.unshift_line this_line if !this_line.nil? if detached_continuation buffer.delete_at detached_continuation end # strip trailing blank lines to prevent empty blocks buffer.pop while !buffer.empty? && buffer.last.chomp.empty? # We do need to replace the optional trailing continuation # a blank line would have served the same purpose in the document if !buffer.empty? && buffer.last.chomp == LIST_CONTINUATION buffer.pop end #puts "BUFFER[#{list_type},#{sibling_trait}]>#{buffer.join}<BUFFER" #puts "BUFFER[#{list_type},#{sibling_trait}]>#{buffer.inspect}<BUFFER" buffer end
Initialize a new Section object and assign any attributes provided
The information for this section is retrieved by parsing the lines at thecurrent position of the reader.
the source reader
a Hash of attributes to assign to this section (default: {})
# File lib/asciidoctor/lexer.rb, line 1213 def self.initialize_section(reader, parent, attributes = {}) section = Section.new parent section.id, section.title, section.level, _ = parse_section_title(reader, section.document) # parse style, id and role from first positional attribute if attributes[1] section.sectname, _ = parse_style_attribute(attributes) section.special = true document = parent.document # HACK needs to be refactored so it's driven by config if section.sectname == 'abstract' && document.doctype == 'book' section.sectname = "sect1" section.special = false section.level = 1 # FIXME refactor to use assign_caption (also check requirements) elsif section.sectname == 'appendix' && !attributes.has_key?('caption') && !document.attributes.has_key?('caption') number = document.counter('appendix-number', 'A') section.caption = "#{document.attributes['appendix-caption']} #{number}: " Document::AttributeEntry.new('appendix-number', number).save_to(attributes) end else section.sectname = "sect#{section.level}" end if section.id.nil? && (id = attributes['id']) section.id = id else # generate an id if one was not *embedded* in the heading line # or as an anchor above the section section.id ||= section.generate_id end if section.id section.document.register(:ids, [section.id, section.title]) end section.update_attributes(attributes) reader.skip_blank_lines section end
Convenience API for checking if the next line on the Reader is the document title
the source Reader
a Hash of attributes collected above the current line
returns true if the Reader is positioned at the document title, false otherwise
# File lib/asciidoctor/lexer.rb, line 1288 def self.is_next_line_document_title?(reader, attributes) is_next_line_section?(reader, attributes) == 0 end
Checks if the next line on the Reader is a section title
the source Reader
a Hash of attributes collected above the current line
returns the section level if the Reader is positioned at a section title,false otherwise
# File lib/asciidoctor/lexer.rb, line 1276 def self.is_next_line_section?(reader, attributes) return false if !(val = attributes[1]).nil? && ['float', 'discrete'].include?(val) return false if !reader.has_more_lines? is_section_title?(*reader.peek_lines(2)) end
Determine whether the this line is a sibling list itemaccording to the list type and trait (marker) provided.
The String line to check
The context of the list (:olist, :ulist, :colist, :dlist)
The String marker for the list or the Regexp to match a sibling
Returns a Boolean indicating whether this line is a sibling list item giventhe criteria provided
# File lib/asciidoctor/lexer.rb, line 1836 def self.is_sibling_list_item?(line, list_type, sibling_trait) if sibling_trait.is_a?(Regexp) matcher = sibling_trait expected_marker = false else matcher = REGEXP[list_type] expected_marker = sibling_trait end if m = line.match(matcher) if expected_marker expected_marker == resolve_list_marker(list_type, m[1]) else true end else false end end
Parse and construct a labeled (e.g., definition) list Block from the current position of the Reader
The Reader from which to retrieve the labeled list
The Regexp match for the head of the list
The parent Block to which this labeled list belongs
Returns the Block encapsulating the parsed labeled list
# File lib/asciidoctor/lexer.rb, line 919 def self.next_labeled_list(reader, match, parent) pairs = [] block = Block.new(parent, :dlist) block.buffer = pairs # allows us to capture until we find a labeled item # that uses the same delimiter (::, :::, :::: or ;;) sibling_pattern = REGEXP[:dlist_siblings][match[2]] begin pairs << next_list_item(reader, block, match, sibling_pattern) end while reader.has_more_lines? && match = reader.peek_line.match(sibling_pattern) block end
Parse and construct the next ListItem for the current bulleted(unordered or ordered) list Block, callout lists included, or the nextterm ListItem and definition ListItem pair for the labeled list Block.
First collect and process all the lines that constitute the next listitem for the parent list (according to its type). Next, parse those linesinto blocks and associate them with the ListItem (in the case of alabeled list, the definition ListItem). Finally, fold the first blockinto the item’s text attribute according to rules described in ListItem.
The Reader from which to retrieve the next list item
The parent list Block of this ListItem. Also provides access to the list type.
The match Array which contains the marker and text (first-line) of the ListItem
The list marker or the Regexp to match a sibling item
Returns the next ListItem or ListItem pair (depending on the list type)for the parent list Block.
# File lib/asciidoctor/lexer.rb, line 951 def self.next_list_item(reader, list_block, match, sibling_trait = nil) list_type = list_block.context if list_type == :dlist list_term = ListItem.new(list_block, match[1]) list_item = ListItem.new(list_block, match[3]) has_text = !match[3].to_s.empty? else # Create list item using first line as the text of the list item list_item = ListItem.new(list_block, match[2]) if !sibling_trait sibling_trait = resolve_list_marker(list_type, match[1], list_block.buffer.size, true) end list_item.marker = sibling_trait has_text = true end # first skip the line with the marker / term reader.get_line list_item_reader = Reader.new grab_lines_for_list_item(reader, list_type, sibling_trait, has_text) if list_item_reader.has_more_lines? comment_lines = list_item_reader.consume_line_comments subsequent_line = list_item_reader.peek_line list_item_reader.unshift(*comment_lines) unless comment_lines.empty? if !subsequent_line.nil? continuation_connects_first_block = (subsequent_line == "\n") # if there's no continuation connecting the first block, then # treat the lines as paragraph text (activated when has_text = false) if !continuation_connects_first_block && list_type != :dlist has_text = false end content_adjacent = !subsequent_line.chomp.empty? else continuation_connects_first_block = false content_adjacent = false end # only relevant for :dlist options = {:text => !has_text} # we can look for blocks until there are no more lines (and not worry # about sections) since the reader is confined within the boundaries of a # list while list_item_reader.has_more_lines? new_block = next_block(list_item_reader, list_block, {}, options) list_item.blocks << new_block unless new_block.nil? end list_item.fold_first(continuation_connects_first_block, content_adjacent) end if list_type == :dlist unless list_item.text? || list_item.blocks? list_item = nil end [list_term, list_item] else list_item end end
Parse and construct an outline list Block from the current position of the Reader
The Reader from which to retrieve the outline list
A Symbol representing the list type (:olist for ordered, :ulist for unordered)
The parent Block to which this outline list belongs
Returns the Block encapsulating the parsed outline (unordered or ordered) list
# File lib/asciidoctor/lexer.rb, line 823 def self.next_outline_list(reader, list_type, parent) list_block = Block.new(parent, list_type) items = [] list_block.buffer = items if parent.context == list_type list_block.level = parent.level + 1 else list_block.level = 1 end Debug.debug { "Created #{list_type} block: #{list_block}" } while reader.has_more_lines? && (match = reader.peek_line.match(REGEXP[list_type])) marker = resolve_list_marker(list_type, match[1]) # if we are moving to the next item, and the marker is different # determine if we are moving up or down in nesting if items.size > 0 && marker != items.first.marker # assume list is nested by default, but then check to see if we are # popping out of a nested list by matching an ancestor's list marker this_item_level = list_block.level + 1 p = parent while p.context == list_type if marker == p.buffer.first.marker this_item_level = p.level break end p = p.parent end else this_item_level = list_block.level end if items.size == 0 || this_item_level == list_block.level list_item = next_list_item(reader, list_block, match) elsif this_item_level < list_block.level # leave this block break elsif this_item_level > list_block.level # If this next list level is down one from the # current Block's, append it to content of the current list item items.last.blocks << next_block(reader, list_block) end items << list_item unless list_item.nil? list_item = nil reader.skip_blank_lines end list_block end
Parse the table contained in the provided Reader
a Reader containing the source lines of an AsciiDoc table
the parent Block of this Asciidoctor::Table
attributes captured from above this Block
returns an instance of Asciidoctor::Table parsed from the provided reader
# File lib/asciidoctor/lexer.rb, line 1863 def self.next_table(table_reader, parent, attributes) table = Table.new(parent, attributes) table.title = attributes.delete('title') if attributes.has_key?('title') table.assign_caption attributes.delete('caption') if attributes.has_key? 'cols' table.create_columns(parse_col_specs(attributes['cols'])) explicit_col_specs = true else explicit_col_specs = false end table_reader.skip_blank_lines parser_ctx = Table::ParserContext.new(table, attributes) while table_reader.has_more_lines? line = table_reader.get_line if parser_ctx.format == 'psv' if parser_ctx.starts_with_delimiter? line line = line[1..-1] # push an empty cell spec if boundary at start of line parser_ctx.close_open_cell else next_cell_spec, line = parse_cell_spec(line, :start) # if the cell spec is not null, then we're at a cell boundary if !next_cell_spec.nil? parser_ctx.close_open_cell next_cell_spec else # QUESTION do we not advance to next line? if so, when # will we if we came into this block? end end end while !line.empty? if m = parser_ctx.match_delimiter(line) if parser_ctx.format == 'csv' if parser_ctx.buffer_has_unclosed_quotes?(m.pre_match) # throw it back, it's too small line = parser_ctx.skip_matched_delimiter(m) next end else if m.pre_match.end_with? '\' line = parser_ctx.skip_matched_delimiter(m, true) next end end if parser_ctx.format == 'psv' next_cell_spec, cell_text = parse_cell_spec(m.pre_match, :end) parser_ctx.push_cell_spec next_cell_spec parser_ctx.buffer = %Q(#{parser_ctx.buffer}#{cell_text}) else parser_ctx.buffer = %Q(#{parser_ctx.buffer}#{m.pre_match}) end line = m.post_match parser_ctx.close_cell else # no other delimiters to see here # suck up this line into the buffer and move on parser_ctx.buffer = %Q(#{parser_ctx.buffer}#{line}) # QUESTION make this an option? (unwrap-option?) if parser_ctx.format == 'csv' parser_ctx.buffer = %Q(#{parser_ctx.buffer.rstrip} ) end line = '' if parser_ctx.format == 'psv' || (parser_ctx.format == 'csv' && parser_ctx.buffer_has_unclosed_quotes?) parser_ctx.keep_cell_open else parser_ctx.close_cell true end end end table_reader.skip_blank_lines unless parser_ctx.cell_open? if !table_reader.has_more_lines? parser_ctx.close_cell true end end table.attributes['colcount'] ||= parser_ctx.col_count if !explicit_col_specs # TODO further encapsulate this logic (into table perhaps?) even_width = (100.0 / parser_ctx.col_count).floor table.columns.each {|c| c.assign_width(0, even_width) } end table.partition_header_footer attributes table end
Parse the next line if it contains metadata for the following block
This method handles lines with the following content:
* line or block comment* anchor* attribute list* block title
Any attributes found will be inserted into the attributes argument.If the line contains block metadata, the method returns true, otherwise false.
the source reader
the parent of the current line
a Hash of attributes in which any metadata found will be stored
a Hash of options to control processing: (default: {})* :text indicates that lexer is only looking for text contentand thus the block title should not be captured
returns true if the line contains metadata, otherwise false
# File lib/asciidoctor/lexer.rb, line 1638 def self.parse_block_metadata_line(reader, parent, attributes, options = {}) return false if !reader.has_more_lines? next_line = reader.peek_line if (commentish = next_line.start_with?('//')) && (match = next_line.match(REGEXP[:comment_blk])) terminator = match[0] reader.grab_lines_until(:skip_first_line => true, :preserve_last_line => true, :terminator => terminator, :preprocess => false) elsif commentish && next_line.match(REGEXP[:comment]) # do nothing, we'll skip it elsif !options[:text] && (match = next_line.match(REGEXP[:attr_entry])) process_attribute_entry(reader, parent, attributes, match) elsif match = next_line.match(REGEXP[:anchor]) id, reftext = match[1].split(',') attributes['id'] = id # AsciiDoc always use [id] as the reftext in HTML output, # but I'd like to do better in Asciidoctor #parent.document.register(:ids, id) if reftext attributes['reftext'] = reftext parent.document.register(:ids, [id, reftext]) end elsif match = next_line.match(REGEXP[:blk_attr_list]) parent.document.parse_attributes(match[1], [], :sub_input => true, :into => attributes) # NOTE title doesn't apply to section, but we need to stash it for the first block # TODO should issue an error if this is found above the document title elsif !options[:text] && (match = next_line.match(REGEXP[:blk_title])) attributes['title'] = match[1] else return false end true end
Parse lines of metadata until a line of metadata is not found.
This method processes sequential lines containing block metadata, ignoringblank lines and comments.
the source reader
the parent to which the lines belong
a Hash of attributes in which any metadata found will be stored (default: {})
a Hash of options to control processing: (default: {})* :text indicates that lexer is only looking for text contentand thus the block title should not be captured
returns the Hash of attributes including any metadata found
# File lib/asciidoctor/lexer.rb, line 1609 def self.parse_block_metadata_lines(reader, parent, attributes = {}, options = {}) while parse_block_metadata_line(reader, parent, attributes, options) # discard the line just processed reader.advance reader.skip_blank_lines end attributes end
Parse the cell specs for the current cell.
The cell specs dictate the cell’s alignments, styles or filters,colspan, rowspan and/or repeating content.
returns the Hash of attributes that indicate how to layoutand style this cell in the table.
# File lib/asciidoctor/lexer.rb, line 2023 def self.parse_cell_spec(line, pos = :start) # the default for the end pos it {} since we # know we're at a delimiter; when the pos # is start, we *may* be at a delimiter and # nil indicates we're not spec = (pos == :end ? {} : nil) rest = line if m = line.match(REGEXP[:table_cellspec][pos]) spec = {} return [spec, line] if m[0].chomp.empty? rest = (pos == :start ? m.post_match : m.pre_match) if m[1] colspec, rowspec = m[1].split '.' colspec = colspec.to_s.empty? ? 1 : colspec.to_i rowspec = rowspec.to_s.empty? ? 1 : rowspec.to_i if m[2] == '+' spec['colspan'] = colspec unless colspec == 1 spec['rowspan'] = rowspec unless rowspec == 1 elsif m[2] == '*' spec['repeatcol'] = colspec unless colspec == 1 end end if m[3] colspec, rowspec = m[3].split '.' if !colspec.to_s.empty? && Table::ALIGNMENTS[:h].has_key?(colspec) spec['halign'] = Table::ALIGNMENTS[:h][colspec] end if !rowspec.to_s.empty? && Table::ALIGNMENTS[:v].has_key?(rowspec) spec['valign'] = Table::ALIGNMENTS[:v][rowspec] end end if m[4] && Table::TEXT_STYLES.has_key?(m[4]) spec['style'] = Table::TEXT_STYLES[m[4]] end end [spec, rest] end
Parse the column specs for this table.
The column specs dictate the number of columns, relativewidth of columns, default alignments for cells in eachcolumn, and/or default styles or filters applied to the cells in the column.
Every column spec is guaranteed to have a width
returns a Hash of attributes that specify how to formatand layout the cells in the table.
# File lib/asciidoctor/lexer.rb, line 1972 def self.parse_col_specs(records) specs = [] # check for deprecated syntax if m = records.match(REGEXP[:digits]) 1.upto(m[0].to_i) { specs << {'width' => 1} } return specs end records.split(',').each {|record| # TODO might want to use scan rather than this mega-regexp if m = record.match(REGEXP[:table_colspec]) spec = {} if m[2] # make this an operation colspec, rowspec = m[2].split '.' if !colspec.to_s.empty? && Table::ALIGNMENTS[:h].has_key?(colspec) spec['halign'] = Table::ALIGNMENTS[:h][colspec] end if !rowspec.to_s.empty? && Table::ALIGNMENTS[:v].has_key?(rowspec) spec['valign'] = Table::ALIGNMENTS[:v][rowspec] end end # TODO support percentage width spec['width'] = !m[3].nil? ? m[3].to_i : 1 # make this an operation if m[4] && Table::TEXT_STYLES.has_key?(m[4]) spec['style'] = Table::TEXT_STYLES[m[4]] end repeat = !m[1].nil? ? m[1].to_i : 1 1.upto(repeat) { specs << spec.dup } end } specs end
Parse the section title from the current position of the reader
Parse a single or double-line section title. After this method is called,the Reader will be positioned at the line after the section title.
the source reader, positioned at a section titledocument- the current document
reader.lines # => ["Foo\n", "~~~\n"] title, level, id, single = parse_section_title(reader, document) title # => "Foo" level # => 2 id # => nil single # => false line1 # => "==== Foo\n" title, level, id, single = parse_section_title(reader, document) title # => "Foo" level # => 3 id # => nil single # => true
returns an Array of [String, Integer, String, Boolean], representing theid, title, level and line count of the Section, or nil.
# File lib/asciidoctor/lexer.rb, line 1372 def self.parse_section_title(reader, document) line1 = reader.get_line sect_id = nil sect_title = nil sect_level = -1 single_line = true if (line1.start_with?('=') || (COMPLIANCE[:markdown_syntax] && line1.start_with?('#'))) && (match = line1.match(REGEXP[:section_title])) sect_id = match[3] sect_title = match[2] sect_level = single_line_section_level match[1] else line2 = reader.peek_line if !line2.nil? && SECTION_LEVELS.has_key?(line2[0..0]) && line2.match(REGEXP[:section_underline]) && (name_match = line1.match(REGEXP[:section_name])) && # chomp so that a (non-visible) endline does not impact calculation (line1.chomp.size - line2.chomp.size).abs <= 1 if anchor_match = name_match[1].match(REGEXP[:anchor_embedded]) sect_id = anchor_match[2] sect_title = anchor_match[1] else sect_title = name_match[1] end sect_level = section_level line2 single_line = false reader.get_line end end if sect_level >= 0 sect_level += document.attr('leveloffset', 0).to_i end [sect_id, sect_title, sect_level, single_line] end
Resolve the 0-index marker for this list item
For ordered lists, match the marker used for this list item against theknown list markers and determine which marker is the first (0-index) markerin its number series.
For callout lists, return <1>.
For bulleted lists, return the marker as passed to this method.
The Symbol context of the list
The String marker for this list item
The position of this list item in the list
Whether to validate the value of the marker
Returns the String 0-index marker for this list item
# File lib/asciidoctor/lexer.rb, line 1750 def self.resolve_list_marker(list_type, marker, ordinal = 0, validate = false) if list_type == :olist && !marker.start_with?('.') resolve_ordered_list_marker(marker, ordinal, validate) elsif list_type == :colist '<1>' else marker end end
Resolve the 0-index marker for this ordered list item
Match the marker used for this ordered list item against theknown ordered list markers and determine which marker isthe first (0-index) marker in its number series.
The purpose of this method is to normalize the implicit numbered markersso that they can be compared against other list items.
The marker used for this list item
The 0-based index of the list item (default: 0)
Perform validation that the marker provided is the propermarker in the sequence (default: false)
marker = 'B.' Lexer::resolve_ordered_list_marker(marker, 1, true) # => 'A.'
Returns the String of the first marker in this number series
# File lib/asciidoctor/lexer.rb, line 1781 def self.resolve_ordered_list_marker(marker, ordinal = 0, validate = false) number_style = ORDERED_LIST_STYLES.detect {|s| marker.match(ORDERED_LIST_MARKER_PATTERNS[s]) } expected = actual = nil case number_style when :arabic if validate expected = ordinal + 1 actual = marker.to_i end marker = '1.' when :loweralpha if validate expected = ('a'[0].ord + ordinal).chr actual = marker.chomp('.') end marker = 'a.' when :upperalpha if validate expected = ('A'[0].ord + ordinal).chr actual = marker.chomp('.') end marker = 'A.' when :lowerroman if validate # TODO report this in roman numerals; see https://github.com/jamesshipton/roman-numeral/blob/master/lib/roman_numeral.rb expected = ordinal + 1 actual = roman_numeral_to_int(marker.chomp(')')) end marker = 'i)' when :upperroman if validate # TODO report this in roman numerals; see https://github.com/jamesshipton/roman-numeral/blob/master/lib/roman_numeral.rb expected = ordinal + 1 actual = roman_numeral_to_int(marker.chomp(')')) end marker = 'I)' end if validate && expected != actual # FIXME I need a reader reference or line number to report line number puts "asciidoctor: WARNING: list item index: expected #{expected}, got #{actual}" end marker end
Converts a Roman numeral to an integer value.
The String Roman numeral to convert
Returns the Integer for this Roman numeral
# File lib/asciidoctor/lexer.rb, line 2227 def self.roman_numeral_to_int(value) value = value.downcase digits = { 'i' => 1, 'v' => 5, 'x' => 10 } result = 0 (0..value.length - 1).each {|i| digit = digits[value[i..i]] if i + 1 < value.length && digits[value[i+1..i+1]] > digit result -= digit else result += digit end } result end


Thanks for your submission! I'll do my best looking into this - look out for your suggestion being implemented in the future!


Felipe Rodrigues - FJRM
Student of Front-End Web Development
Since 2019, when I got to know the world of programming and technology, I decided that this was what I wanted for my life. I entered the State University of Rio de Janeiro in Computer Science graduation and started taking extracurricular courses to improve and update myself more and more.
That's when I realized that my main area of interest is Front-End Development. I continue to study and build my portfolio to get a job at a large technology company or as a freelancer. In my free time, I try to do lessons and use interactive apps to learn some concepts from the Web in a more natural way.
I'm learning German and improving my English every day, I try to get involved in events and other online complements to stay more and more updated in the field of technology.
Featured Projects
View selected projects below. More information can be found at github.com/FFJRM.
Tribute Page
This repository is a tribute page project made as the first project of Responsive Web Design Course from freeCodeCamp.
View project / case studyWork Experience
Optional paragraph for work experience summary. Not a part of the job details. Delete if not being used.
Job title
Company Name
Date at job
Job summary goes here. Add as many paragraphs as you need.
Optional list:
- Delete this list if you don't need it.
- Created...
- Lead...
- Responsible for...
Education
Universidade do Estado do Rio de Janeiro - Rio de Janeiro
Designation received or program name, year attended
Summary or accomplishments.


Woz used it himself to write the first program to ever run on the machine, a game called Breakout. The eight expansion slots in Apple II made a difference, too. Woz decided to implement them against Steve Jobs’ will, and this proved a wise move, as they allowed for all kinds of new features and software to be added to the machine. One of those features was Disk II, a floppy disk drive Apple started shipping in early 1978. It made the sharing and installing of new software very easy — soon the supply of Apple II software was thriving.
But probably the most important push toward the


A cache that uses a Least Recently Used (LRU) heurstic for evicting items.
More...
|
|
| LRUCache (int memorySizeLimit) |
| |
|
| int | MemorySizeLimit [get] |
| | The estimated size limit in bytes of how much memory we want to use for the cache (readonly). More...
|
| |
| int | EstimatedMemorySize [get] |
| | The current estimated size the cache takes up in memory (readonly) More...
|
| |
| int | Count [get] |
| | Returns the number of entries in the cache. More...
|
| |
| int | MemorySizeLimit [get] |
| | The estimated size limit in bytes of how much memory we want to use for the cache (readonly). More...
|
| |
| int | EstimatedMemorySize [get] |
| | The current estimated size the cache takes up in memory (readonly). More...
|
| |
| int | Count [get] |
| | Returns the number of entries in the cache (readonly). More...
|
| |
A cache that uses a Least Recently Used (LRU) heurstic for evicting items.
◆ Clear()
◆ RemoveKey()
Removes the key and associated resource instance from the cache.
- Parameters
-
| key | Key to remove from the cache. |
Implements Shopify.UIToolkit.Cache< T >.
◆ ResourceForKey()
Returns the cached resource saved against the given url.
- Parameters
-
| key | Key mapping to a resource. |
- Returns
- The cached resource associated with the given key.
Implements Shopify.UIToolkit.Cache< T >.
◆ SetMemorySizeLimit()
Sets the size limit in bytes that we can store in the cache.
- Parameters
-
| newLimit | New size limit in bytes. |
Implements Shopify.UIToolkit.Cache< T >.
◆ SetResourceForKey()
Associates the given key with the given resource in the cache.
- Parameters
-
| key | Key to cache with. |
| resource | A resource to cache in memory. |
Implements Shopify.UIToolkit.Cache< T >.
◆ DEFAULT_MEMORY_SIZE_LIMIT
The default estimated memory size limit in bytes.
◆ Count
Returns the number of entries in the cache.
- Returns
- Number of entries in the cache.
◆ EstimatedMemorySize
The current estimated size the cache takes up in memory (readonly)
- Returns
◆ MemorySizeLimit
The estimated size limit in bytes of how much memory we want to use for the cache (readonly).
- Returns
The documentation for this class was generated from the following file:
- Assets/Shopify/UIToolkit/Internal/Components/LRUCache.cs


Account ID {{user.uid}}
Name:
Email:
Log Out
Old Password:
New Password:
Confirm New Password:
{{err}}
{{msg}}
New Email:
Password:


Welcome to my CSS tricks!
This is a list of CSS tricks that I use to build website.
Full bleed layout
Responsive Menu
Responsive Menu Center


I'm currently in pursuit of a Computer Science Degree. I'm a Computer Science tutor for my college. I chose to pursue a path in Computer Science because I love to teach myself new programming ideas and create applications that I find to be genuinely interesting. I've always been in love with video games which deepened my curiousity for computers. In the future, I see myself working on cool new applications that have a positive impact on people's lives.


Mason Mount recounts Jose Mourinho advice that will always stay with him
The Chelsea youngster has made a big impression on the pitch this season, but he used to be a regular on the sidelines at Stamford Bridge in Mourinho's days
by Mark Jones, https://www.mirror.co.uk/authors/mark-jones/Tottenham's ball boys could be in for a shock following the appointment of Jose Mourinho as manager, according to Chelsea's Mason Mount.
Mourinho signed a three-and-a-half year deal to become the new Spurs boss on Wednesday morning, replacing Mauricio Pochettino in the hotseat.
The Portuguese will begin what is his fourth different spell in English football with a trip to West Ham on Saturday lunchtime, and Mount was around for a close look at the third.
The 20-year-old used to act as a ball boy at Stamford Bridge for Blues home games when he was in the club's academy, and he told the Chelsea website about a piece of advice Mourinho - who was then in his second spell at the club - used to give him.
"The first thing I really remember was being a ball boy at the games," he told the Blues website .
"That was a big thing for me. I was so buzzing about that and you can’t really be any closer than that!
"One moment that stands out was under Jose Mourinho.
"If we were winning in Champions League games then he would tell us to keep hold of the ball and not to throw it back so quickly!"
Mourinho will return to the Champions League with Tottenham when the North Londoners host Olympiakos on Tuesday, but before that he'll make his bow at West Ham on Saturday lunchtime.
“I had a feeling I was going to get a club mid-season," he said at his press conference unveiling on Thursday.
"I knew I would be in a situation where I would get only one or two days before my first game. I cannot come here and think it is about myself. It is about the players and going from a base of stability.”


Provides interfaces and exceptions needed for loading HL7 HMD metadata into memory and querying it there.
Design


--- layout: tweet ---
OH: "Apologies if anyone has a Java allergy."
6/11/2014, 11:25:56 AM
Favs: 1
Retweets: 0


Hello Please login to continue!
Thanks for entering ,
Initiating roboLooper program...
Pushing all values between 0 and into an array...
Testing if any of those numbers contain 3
ERROR! I'm Sorry , I'm afraid I can't do that.
Testing if any numers contain 2
Boop.... Boop.....Boop.....
Testing if any numers contain 1
Beep, Beep, Beep!
Ok, , I am printing the results Below this Super-Computer
Here are those results you asked for:


pymerkle.utils module¶
Provides invoked across the library
-
pymerkle.utils.
decompose
(num)[source]¶ Additive decomposition in decreasing powers of 2
Given a positive integer uniquely decomposed as
2 ^ (p_m) + ... + 2 ^ (p_1), p_m > ... > p_1 >= 0
then the tuple
(p_m, ..., p_1)
is returnedExample: >>> num = 45 >>> num == 2**5 + 2**3 + 2**2 + 1 True >>> >>> decompose(num) (5, 3, 2, 0)
Parameters: num (int) – the number to be decomposed Returns: powers of 2 in decreasing order Return type: tuple of integers Note
Returns the nonsensical empty tuple for arguments equal to or smaller than zero
-
pymerkle.utils.
log_2
(num)[source]¶ Computes and returns the base 2 logarithm of the given number (i.e., the greatest power of 2 equal to or smaller than
num
)Note
Given any balanced binary tree, whose number of leaves equals the inserted one, this function returns the tree’s height (i.e., the depth of its left-most branch)
Parameters: num (int) – the number whose logarithm is to be computed Returns: the computed logarithm Return type: int Note
By convention, it returns 0 for zero argument
Raises: ValueError – for arguments smaller than zero
-
pymerkle.utils.
stringify_path
(signed_hashes, encoding)[source]¶ Returns a nicely stringified version of the inserted sequence of signed hashes.
The printed hashes are hexadecimals, occuring after decoding the given ones according to the inserted encoding type.
Note
The output of this function is to be passed into the
print
functionParameters: - signed_hashes (tuple of (+1/-1, bytes) pairs) – a sequence of signed hashes
- encoding (str) – type to be used for decoding
Return type: str


FILM TITLE: ANGELS & INSECTS DIRECTOR: PHILIP HAAS COUNTRY: ENGLAND 1996 CINEMATOGRAPHY: BERNARD ZITZERMANN MUSIC: ALEXANDER BALANESCU CAST: Mark Rylance, Kristin Scott Thomas, Patsy Kensit, Jeremy Kemp, Douglas Henshall, Annette Badland SUPER FEATURES: The ending, will just floor you...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
If someone wants to make a point, they will take you the length of something, anything, and then spring it on you. This film, is such an adventure.
However, this film just has one of those understated feelings, none of the acting stands out, probably because it might give the film away, and for the majority of the film, it has moments that are just trying to "break out" this rather monotonous film, into something else.
To his credit, and the actors, the director does not allow any of the film to fall into anything except his complete story. The insect is friendly, until the tide changes, and then it attacks. This film does the same. The story centers around a man that has just come back from the Amazon, in what has been found out to be a disastrous mission for a group of scientists. This one managed to survive, and has found his way back home to England. He ends up taking up a stay with a rather generous rich man, who has similar interests, and who decides to sponsor this scientist of insects.
All is fine, until the younger brother gets upset because this outsider, a commoner at that, has found his way into the family. As time continues, we find that the scientist has an interest in one of the family's daughters, one who apparently has suffered a rather unfortunate fate. She was married and her husband promptly dies, in what may be considered odd circumstances, which we never learn about. It's the upper class.... they get away with a lot of things. What these might be is another question. But a hint does show itself one time when the younger brother challenges the scientist to a duel, which is refused.
Eventually, this marriage takes place.  She is an astute observer. And with her help, a book gets published, and a successful working agreement starts. The marriage lasts.  In the form of a child that may have been some sort of revenge on the younger brother, by a previous maid.
And the film takes on the vicious attitude that ant colonies can take with each other. All of a sudden, the civilized are the real insects, and the film comes to a quick resolution and ending.
This is an acting showcase. The people in it have to maintain their space as well as they can, and never hint at anything. Of course, this was the way in the Victorian age anyway, where everything happened behind closed doors and the maids and everyone else in the house was not exactly not a part of it.
A very well directed film, although slow, the lines are delivered with the same deliberateness that the ant colonies work. It seems to be its main theme. And as such, the film ends up developing a statement about who is the real savage and the angel. The innocent whose live it is anyway, or those who ought to know better, and do nothing about it. Very few films will do this correctly without giving it away. There are hints, yes... looking back on it. But they are so subtle that we really make nothing of it... the film really makes no reason for us to pay attention to those moments. They seem so natural, a part of the natural evolution of things... until we find out what was really behind it all.
Excellent film, very well directed and beautifully thought out. But the ending may really shake one up. It is brutal in ways more than one.
4 GIBLOONS out of 5
Reviewed by Pedro Sena. Copyright (c) Pedro Sena 1997. All Rights Reserved.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


TODO List
-
Embed LeafletJS into the map page with OOB sample data
-
Change sample data to use fake data custom to NYC
-
Replace fake data and reference the backend API for data
-
Allow filtering by
-
Pickup points only
-
Dropoff points only
-
Trips shorter/longer than "x" distance
-
Trips shorter/longer than "x" minutes
-
Trips with fare amounts greater/less than "x"
-
Add an upload data page to load the CSV from the front-end


Happy Time Restaurant
1 Washington Sq | San Jose, CA 95192 |<PHONE_NUMBER>
Toggle navigation
Business Casual
Home
Menu
{{category}}
All
Shopping Cart
  Recently Added Items
{{hoveItem._id}}
$ {{hoveItem.dish_price}}
  >>View Details in Shopping Cart
Profile
Account
Address
Order
Logout
My Shopping Cart
Your Shopping Cart is Empty
$ {{totalPrice}}
Check Out
dish image
dish name
description
unit price
amount
total price
delete
{{item._id}}
{{item.description}}
${{item.dish_price}}
-
+
${{item.dish_price * item.dish_number}}


public class Kommandant
The default aggregation of a command registry, parser, and executor, which manages and executes commands.
| Modifier and Type | Class and Description |
|---|---|
static class |
Kommandant.Companion |
| Modifier and Type | Field and Description |
|---|---|
static Kommandant.Companion |
Companion |
static org.slf4j.Logger |
LOGGER
Universal logger for logging Kommandant events. For example, registering a command, executing a command, etc.
|
| Constructor and Description |
|---|
Kommandant(ICommandBank cmdBank,
ICommandExecutor cmdExecutor,
ICommandParser cmdParser)
Default constructor which uses default implementations of the registry, parser, and executor.
|
Kommandant()
Default constructor which uses default implementations of the registry, parser, and executor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotatedCommands(java.lang.Object instance)
Parses a provided object instance for annotated commands in its class and adds them all to the command registry.
|
void |
addAnnotatedCommands(java.lang.Class<?> clazz)
Parses a provided (Java) class for annotated commands and adds them all to the command registry.
|
void |
addAnnotatedCommands(kotlin.reflect.KClass<?> ktClazz)
Parses a provided (Kotlin) class for annotated commands and adds them all to the command registry.
|
boolean |
addCommand(ICommand<?> command)
Adds a command to the registry. Failure to add commands occur if an alias clashes with another command's alias
for the provided prefix, or if the command's identifier / name is not unique.
|
boolean |
changePrefix(ICommand<?> command,
java.lang.String newPrefix)
Changes a prefix of a command in the registry.
|
void |
clearAll()
Deletes all commands from the registry and clears the registry's internal store.
|
boolean |
deleteCommand(ICommand<?> command)
Deletes a command from the registry by removing it and unlinking all subcommand references.
|
java.util.Map<java.lang.String,com.github.kvnxiao.kommandant.command.ICommand> |
getAllCommands()
Gets all the 'prefix + aliases' to 'command' map from the registry.
|
ICommandBank |
getCmdBank()
The command registry,
|
ICommandExecutor |
getCmdExecutor()
The command executor,
|
ICommandParser |
getCmdParser()
The command parser,
|
ICommand<?> |
getCommand(java.lang.String prefixedAlias)
Gets a command by providing a single string representing the combination of the command's prefix and alias.
|
java.util.Map<java.lang.String,com.github.kvnxiao.kommandant.command.ICommand> |
getCommandsForPrefix(java.lang.String prefix)
Gets all the 'aliases' to 'command' map currently registered under the specified prefix.
|
java.util.List<com.github.kvnxiao.kommandant.command.ICommand> |
getCommandsUnique()
Gets an immutable list of all registered commands in the registry.
|
java.util.Set<java.lang.String> |
getPrefixes()
Gets all the prefixes currently registered.
|
java.util.List<com.github.kvnxiao.kommandant.command.ICommand> |
parseAnnotations(java.lang.Object instance)
Parse
interface CommandAnn annotations for a list of commands created from those annotations. |
<T> CommandResult<T> |
process(java.lang.String input,
java.lang.Object opt)
Processes a string input with any additional variables for command execution.
|
<T> CommandResult<T> |
processCommand(ICommand<?> command,
CommandContext context,
java.lang.Object opt)
Processes a provided command with a given command context and any additional variables for command execution.
|
java.lang.String[] |
splitString(java.lang.String input) |
public static org.slf4j.Logger LOGGER
Universal logger for logging Kommandant events. For example, registering a command, executing a command, etc.
public static Kommandant.Companion Companion
public Kommandant(ICommandBank cmdBank, ICommandExecutor cmdExecutor, ICommandParser cmdParser)
Default constructor which uses default implementations of the registry, parser, and executor.
cmdBank
- The command registry,an implementation ofinterface ICommandBank
.cmdExecutor
- The command executor,an implementation ofinterface ICommandExecutor
.cmdParser
- The command parser,an implementation ofinterface ICommandParser
.public Kommandant()
Default constructor which uses default implementations of the registry, parser, and executor.
public <T> CommandResult<T> process(java.lang.String input, java.lang.Object opt)
Processes a string input with any additional variables for command execution.
input
- The string input to parse into valid context and command.opt
- A nullable vararg of optional, extra input variables.class CommandResult
The result after attempting execution of the command. Will return false and null if there
was no command to execute.public java.lang.String[] splitString(java.lang.String input)
public <T> CommandResult<T> processCommand(ICommand<?> command, CommandContext context, java.lang.Object opt)
Processes a provided command with a given command context and any additional variables for command execution.
command
- The command to execute.context
- The context of the command, containing the calling alias and any args it may have.opt
- A nullable vararg of Any, which can be useful in specific implementations when a command requires
more than just context for execution.class CommandResult
The result after attempting execution of the command. Will return false and null if there
was no command to execute.public void clearAll()
Deletes all commands from the registry and clears the registry's internal store.
CommandBank.clearAll
public boolean addCommand(ICommand<?> command)
Adds a command to the registry. Failure to add commands occur if an alias clashes with another command's alias for the provided prefix, or if the command's identifier / name is not unique.
public ICommand<?> getCommand(java.lang.String prefixedAlias)
Gets a command by providing a single string representing the combination of the command's prefix and alias.
public boolean deleteCommand(ICommand<?> command)
Deletes a command from the registry by removing it and unlinking all subcommand references.
public boolean changePrefix(ICommand<?> command, java.lang.String newPrefix)
Changes a prefix of a command in the registry.
public java.util.Set<java.lang.String> getPrefixes()
Gets all the prefixes currently registered.
CommandBank.getPrefixes
public java.util.Map<java.lang.String,com.github.kvnxiao.kommandant.command.ICommand> getCommandsForPrefix(java.lang.String prefix)
Gets all the 'aliases' to 'command' map currently registered under the specified prefix.
public java.util.Map<java.lang.String,com.github.kvnxiao.kommandant.command.ICommand> getAllCommands()
Gets all the 'prefix + aliases' to 'command' map from the registry.
CommandBank.getCommands
public java.util.List<com.github.kvnxiao.kommandant.command.ICommand> getCommandsUnique()
Gets an immutable list of all registered commands in the registry.
CommandBank.getCommandsUnique
public java.util.List<com.github.kvnxiao.kommandant.command.ICommand> parseAnnotations(java.lang.Object instance)
Parse interface CommandAnn
annotations for a list of commands created from those annotations.
interface CommandAnn
public void addAnnotatedCommands(java.lang.Object instance)
Parses a provided object instance for annotated commands in its class and adds them all to the command registry.
public void addAnnotatedCommands(java.lang.Class<?> clazz)
Parses a provided (Java) class for annotated commands and adds them all to the command registry.
public void addAnnotatedCommands(kotlin.reflect.KClass<?> ktClazz)
Parses a provided (Kotlin) class for annotated commands and adds them all to the command registry.
public ICommandBank getCmdBank()
The command registry,
an implementation ofinterface ICommandBank
.
interface ICommandBank
public ICommandExecutor getCmdExecutor()
The command executor,
an implementation ofinterface ICommandExecutor
.
interface ICommandExecutor
public ICommandParser getCmdParser()
The command parser,
an implementation ofinterface ICommandParser
.
interface ICommandParser


Tel:<PHONE_NUMBER>2
Location: 6 Mount Close Woking
Home
About us
Daily routine
Meet our team
Fees
Standard fees
Menus
Admissions
Policies and procedures
Policy 1
Policy 2
Policy 3
Useful Links
Careers
Contact us
ADMISSIONS


RT @Horse_iOS: Here at Apple, we believe in spreading three things: great products, beautifully filmed shorts about people using apps, and …
7/19/2014, 12:30:23 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @Horse_iOS: Here at Apple, we believe in spreading three things: great products, beautifully filmed shorts about people using apps, and …
7/19/2014, 12:30:23 PM
Favs: 0
Retweets: 0
link


Polar Data Analysis
Pie Chart
Word Cloud
Bar Chart
Bubble Chart
Hierarchical Bar
Collapsible Tree
Mime types that are indexed


--- layout: default ---
The page you are looking for might have been removed had its name changed or is temporarily unavailable.


HELENA'S BLOG
My Team
Kate
CEO & Founder
Some text that describes me lorem ipsum ipsum lorem.
<EMAIL_ADDRESS>Jennie
Editor
Some text that describes me lorem ipsum ipsum lorem.
<EMAIL_ADDRESS>Lucy
Photographer
Some text that describes me lorem ipsum ipsum lorem.
<EMAIL_ADDRESS>All Rights Reserved. © 2021 Blog Designed By Helena


Learn More About Me
Hello
My skills
I enjoy writing front-end code with these technologies:
- HTML
- CSS
- PHP
I completed these codeschool courses:
Contact me
Send me an E-Mail to<EMAIL_ADDRESS>or visit my Github profile
Hello
I enjoy writing front-end code with these technologies:
Send me an E-Mail to<EMAIL_ADDRESS>or visit my Github profile


Here you will be able to view some photographs taken at our classes, as well as some updates on equipment or venue changes. Most of our news will be posted onto our Facebook page.
Here you will be able to view some photographs taken at our classes, as well as some updates on equipment or venue changes. Most of our news will be posted onto our Facebook page.
Our Facebook page is what is mainly used to keep you up to date on which courses are available and what the prices are like for each. These are subject to change, so to keep regularly updated, please follow our Facebook page.
To contact me directly, please email me by clicking the link below. I will try my best to respond as swiftly as possible but if I am unreachable, please try my Facebook account.


For this to work, you will have to define your own 'dragstart'
eventListener on each item in your list of items (make sure that any new item added to the list is attached to this eventListener 'dragstart' handler). This 'dragstart' handler must set dataTransfer
- notice you can set the item's information as you want this way.


Sweet As Beers
Welcome! Please select from our delicious selection and don't hesitate to let us know if we can answer any of your questions.
HBIB Ginger Fusion
A Ginger Beer from Hawkes Bay Independent Brewery
New Zealand
5% abv
Add to cart
Mangose & Melons
A Fruit Gose from Baylands Brewery
New Zealand
4% abv
Add to cart
North End Pilsner
A Pilsner from North End Brewing
New Zealand
5% abv
Add to cart


About Me
Hello my name is Landon Waddell I am originally from Austin, Texas. I am currently living in Denver Colorado and working as a Toyota Master Technician. My educational back ground is I graduated from Ponderosa High School in 2011. I went to San Juan college in Farmington, New Mexico and graduated with an Associates in Applied Science concentrated in Toyota Automotive systems. I have now been working for Groove Toyota for six and half years. I am currently eager to move into the software development industry and possibly further my education.


{% extends "admin_base.html" %} {% block colorscheme %}color-detail{% end %} {% block title %}Team × Puzzle detail{% end %} {% block content %}
| team | {{team.name}} |
|---|---|
| puzzle | {{puzzle.title}}
{{puzzle.land.symbol}}
▶ puzzle ▶ solution {% if puzzle.for_ops_url %} ▶ hunt ops {% else %} MISSING hunt ops info! {% end %} |
| state | |
| open time | |
| solve time |
| Submission | Submit time | Result |
|---|
All replies appear to teams as coming from "Hunt HQ", not you personally. Teams can't see which HQ staffer wrote any reply.


Login
Email address
Your email will be the identifier for you.
Password
Remember me
Forgotten Password?
Reset
Submit
Register here