text:
require 'spec_helper'
require 'markdown/parser'

describe Markdown::Parser do

  let(:parser) { Markdown::Parser.new }

  describe 'standard markdown links' do
    it 'should parse standard markdown links' do
      expect(parser.parse("Foo bar [title here](/link/here)")).to contain_parsed_output({
        standard_link: { open: '[', title: 'title here', link: '/link/here', close: ')' }
      })

      expect(parser.parse("[title here](/link/here)")).to contain_parsed_output({
        standard_link: { open: '[', title: 'title here', link: '/link/here', close: ')' }
      })

      expect(parser.parse("[title here](/link/here) Foo bar")).to contain_parsed_output({
        standard_link: { open: '[', title: 'title here', link: '/link/here', close: ')' }
      })
    end

    it 'should support title attributes' do
      expect(parser.parse("[title here](/link/here \"alt\")")).to contain_parsed_output({
        standard_link: { open: '[', title: 'title here', link: '/link/here', title_attr: 'alt', close: ')' }
      })

      expect(parser.parse("[title here](/link/here 'alt')")).to contain_parsed_output({
        standard_link: { open: '[', title: 'title here', link: '/link/here', title_attr: 'alt', close: ')' }
      })
    end

    it 'should support image links' do
      expect(parser.parse("[![img](/img/link)](/link/here 'alt')")).to contain_parsed_output({
        standard_link: {
          image_link: { image_open: '!', open: '[', title: 'img', link: '/img/link', close: ')' },
          open: '[',
          link: '/link/here',
          title_attr: 'alt',
          close: ')'
        }
      })

      expect(
        parser.parse("[![img][ref]](/link/here 'alt')\n[ref]: /img/link")
      ).to contain_parsed_output({
        standard_link: {
          footer_image: { open: '[',image_open: '!',  title: 'img', reference: 'ref', close: ']' },
          link: '/link/here',
          title_attr: 'alt',
          open: '[',
          close: ')'
        },
        footer_reference: { reference: 'ref', link: '/img/link' }
      })

      expect(
        parser.parse("[![imgref][]](/link/here 'alt')\n[imgref]: /img/link")
      ).to contain_parsed_output({
        standard_link: {
          footer_image: { open: '[', image_open: '!', title_and_reference: 'imgref', close: '][]' },
          link: '/link/here',
          title_attr: 'alt',
          open: '[',
          close: ')'
        },
        footer_reference: { reference: 'imgref', link: '/img/link' }
      })
    end
  end

  describe 'footer links' do
    it 'should parse standard links in footer reference format' do
      expect(
        parser.parse("[title here][ref] Foo bar \n\n[ref]: /link/here")
      ).to contain_parsed_output({
        footer_link: { open: '[', title: 'title here', reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref' }
      })

      expect(
        parser.parse("[title here]   [ref] Foo bar \n\n[ref]: /link/here")
      ).to contain_parsed_output({
        footer_link: { open: '[', title: 'title here', reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref' }
      })

      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: /link/here")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref' }
      })

      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: </link/here>")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref' }
      })

      expect(
        parser.parse("[ref][] Foo bar \n\n[ref]: /link/here")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: '][]' },
        footer_reference: { link: '/link/here', reference: 'ref' }
      })
    end

    it 'should support title attributes' do
      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: /link/here \"alt\"")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref', title_attr: 'alt' }
      })

      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: /link/here 'alt'")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref', title_attr: 'alt' }
      })

      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: /link/here (alt)")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref', title_attr: 'alt' }
      })

      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: /link/here\n   \"alt\"")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref', title_attr: 'alt' }
      })

      expect(
        parser.parse("[ref] Foo bar \n\n[ref]: </link/here>   \"alt\"")
      ).to contain_parsed_output({
        footer_link: { open: '[', title_and_reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref', title_attr: 'alt' }
      })
    end

    it 'should support image links' do
      expect(
        parser.parse("[![img]][ref] Foo bar \n\n[ref]: </link/here>   \"alt\"\n[img]: /img/link")
      ).to contain_parsed_output({
        footer_link: { open: '[', footer_image: { open: '[', image_open: '!', title_and_reference: 'img', close: ']' }, reference: 'ref', close: ']' },
        footer_reference: [
          { link: '/link/here', reference: 'ref', title_attr: 'alt' },
          { link: '/img/link', reference: 'img' }
        ]
      })

      expect(
        parser.parse("[![img](/img/link)][ref] Foo bar \n\n[ref]: </link/here>   \"alt\"")
      ).to contain_parsed_output({
        footer_link: { open: '[', image_link: { open: '[', image_open: '!', title: 'img', link: '/img/link', close: ')' }, reference: 'ref', close: ']' },
        footer_reference: { link: '/link/here', reference: 'ref', title_attr: 'alt' }
      })
    end
  end

  describe 'images' do
    it 'should support regular images' do
      expect(parser.parse("![img](/img/link)")).to contain_parsed_output({
        image_link: { open: '[', image_open: '!', title: 'img', link: '/img/link', close: ')' }
      })
    end

    it 'should support images with title attributes' do
      expect(parser.parse("![img](/img/link \"alt\")")).to contain_parsed_output({
        image_link: { open: '[', image_open: '!', title: 'img', link: '/img/link', title_attr: 'alt', close: ')' }
      })

      expect(parser.parse("![img](/img/link 'alt')")).to contain_parsed_output({
        image_link: { open: '[', image_open: '!', title: 'img', link: '/img/link', title_attr: 'alt', close: ')' }
      })
    end

    it 'should support images by reference' do
      expect(parser.parse("![img][ref]\n[ref]: /img/link 'alt'")).to contain_parsed_output({
        footer_image: { open: '[', image_open: '!', title: 'img', reference: 'ref', close: ']' },
        footer_reference: { link: '/img/link', title_attr: 'alt', reference: 'ref' }
      })
    end
  end

  describe 'inline links' do
    it 'should parse links in angle brackets' do
      expect(parser.parse('<http://example.com/foo/bar/baz>')).to contain_parsed_output({
        inline_link: { open: '<', close: '>', link: 'http://example.com/foo/bar/baz' }
      })
    end

    it 'should parse auto links' do
      expect(parser.parse('http://example.com/foo/bar/baz')).to contain_parsed_output({
        inline_link: { link: 'http://example.com/foo/bar/baz' }
      })

      expect(parser.parse('https://example.com/foo/bar/baz')).to contain_parsed_output({
        inline_link: { link: 'https://example.com/foo/bar/baz' }
      })

      expect(parser.parse('ftp://example.com/foo/bar/baz')).to contain_parsed_output({
        inline_link: { link: 'ftp://example.com/foo/bar/baz' }
      })

      expect(parser.parse('www.example.com:3000/foo/bar/baz')).to contain_parsed_output({
        inline_link: { link: 'www.example.com:3000/foo/bar/baz' }
      })
    end

    it 'should handle multiple links' do
      expect(parser.parse('www.example.com http://foo.com')).to contain_parsed_output({
        inline_link: [{ link: 'www.example.com' }, { link: ' http://foo.com' }]
      })
    end
  end

  describe 'code blocks' do
    it 'should recognise code blocks' do
      expect(parser.parse("```\nfoo\n```")).to contain_parsed_output({
        code_block: "```\nfoo\n```"
      })

      expect(parser.parse("```code_type\nfoo\n```")).to contain_parsed_output({
        code_block: "```code_type\nfoo\n```"
      })

      expect(parser.parse("~~~\nfoo\n~~~")).to contain_parsed_output({
        code_block: "~~~\nfoo\n~~~"
      })

      expect(parser.parse("~~~code_type\nfoo\n~~~")).to contain_parsed_output({
        code_block: "~~~code_type\nfoo\n~~~"
      })

      expect(parser.parse("```\nfoo")).to contain_parsed_output({
        code_block: "```\nfoo"
      })

      expect(parser.parse("~~~\nfoo")).to contain_parsed_output({
        code_block: "~~~\nfoo"
      })

      expect(parser.parse("    foo")).to contain_parsed_output({
        code_block: "    foo"
      })

      expect(parser.parse("\n    foo")).to contain_parsed_output({
        code_block: "\n    foo"
      })

      expect(parser.parse(" \n    foo")).to contain_parsed_output({
        code_block: " \n    foo"
      })

      expect(parser.parse("    foo\n    bar")).to contain_parsed_output({
        code_block: "    foo\n    bar"
      })

      expect(parser.parse("    foo\nbar")).to contain_parsed_output({
        code_block: "    foo\n"
      })

      expect(parser.parse("foo\nbar\n\n    foo\nbar")).to contain_parsed_output({
        code_block: "\n    foo\n"
      })
    end

    it 'should not recognise things that are not code blocks' do
      expect(parser.parse("bar\n    foo")).to contain_parsed_output({
        text: ["bar", "    foo"]
      })
    end

    it 'should recognise inline code blocks' do
      expect(parser.parse("`foo`")).to contain_parsed_output({
        inline_code: '`foo`'
      })

      expect(parser.parse("`foo\nbar`")).to contain_parsed_output({
        inline_code: "`foo\nbar`"
      })

      expect(parser.parse("``foo`bar``")).to contain_parsed_output({
        inline_code: "``foo`bar``"
      })

      expect(parser.parse("`````foo``bar`````")).to contain_parsed_output({
        inline_code: "`````foo``bar`````"
      })

      expect(parser.parse("`````foo``bar```")).to contain_parsed_output({
        inline_code: "```foo``bar```"
      })
    end

    it 'shouldn\'t recognise links inside code blocks' do
      expect(parser.parse("```foo\nbar [link](/link)\n```")).to contain_parsed_output({
        code_block: "```foo\nbar [link](/link)\n```"
      })
    end

    it 'shouldn\'t recognise links inside inline code blocks' do
      expect(parser.parse("`[foo](bar)`")).to contain_parsed_output({
        inline_code: "`[foo](bar)`"
      })
    end
  end

  describe 'tiddlylinks' do
    it 'should support basic tiddly links' do
      expect(parser.parse('[[foo link]]')).to contain_parsed_output({
        tiddler_link: { open: '[[', link: 'foo link', close: ']]' }
      })
    end

    it 'should support basic tiddly links with titles' do
      expect(parser.parse('[[the title|foo link]]')).to contain_parsed_output({
        tiddler_link: { open: '[[', link: 'foo link', title: 'the title', close: ']]' }
      })
    end

    it 'should support multiple links' do
      expect(parser.parse('[[the]] [[title|foo link]]')).to contain_parsed_output({
        tiddler_link: [
          { open: '[[', link: 'the', close: ']]' },
          { open: '[[', link: 'foo link', title: 'title', close: ']]' }
        ]
      })
    end

    it 'should support basic space links' do
      expect(parser.parse('@space-name')).to contain_parsed_output({
        space_link: { at: '@', link: 'space-name' }
      })
    end

    it 'should support complex space links' do
      expect(parser.parse('@[[space name]]')).to contain_parsed_output({
        space_link: { at: '@', open: '[[',  link: 'space name', close: ']]' }
      })

      expect(parser.parse('@[[title|space name]]')).to contain_parsed_output({
        space_link: { open: '[[', at: '@',  title: 'title', link: 'space name', close: ']]' }
      })
    end

    it 'should support multiple complex space links' do
      expect(parser.parse('@[[foo|bar]] @user:space  @[[title|user:name]]')).to contain_parsed_output({
        space_link: [
         { at: '@', open: '[[', close: ']]', title: 'foo', link: 'bar' },
         { at: '@', user: 'user', link: 'space' },
         { at: '@', open: '[[', user: 'user', title: 'title', link: 'name', close: ']]' }
        ]
      })

      expect(parser.parse('@[[title|space name]]')).to contain_parsed_output({
        space_link: { open: '[[', at: '@',  title: 'title', link: 'space name', close: ']]' }
      })
    end

    it 'should support basic space tiddler links' do
      expect(parser.parse('tiddler-name@space-name')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { link: 'tiddler-name' },
          space_link: { at: '@', link: 'space-name' }
        }
      })
    end

    it 'should support complex space tiddler links' do
      expect(parser.parse('[[tiddler name]]@space-name')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', link: 'tiddler name', close: ']]' },
          space_link: { at: '@', link: 'space-name' }
        }
      })

      expect(parser.parse('[[title|tiddler name]]@space-name')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', title: 'title', link: 'tiddler name', close: ']]' },
          space_link: { at: '@', link: 'space-name' }
        }
      })

      expect(parser.parse('tiddler-name@[[space name]]')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { link: 'tiddler-name' },
          space_link: { at: '@', open: '[[',  link: 'space name', close: ']]' }
        }
      })

      expect(parser.parse('[[tiddler name]]@[[space name]]')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', link: 'tiddler name', close: ']]' },
          space_link: { open: '[[', at: '@',  link: 'space name', close: ']]' }
        }
      })

      expect(parser.parse('[[title|tiddler name]]@[[space name]]')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', title: 'title', link: 'tiddler name', close: ']]' },
          space_link: { open: '[[', at: '@',  link: 'space name', close: ']]' }
        }
      })
    end

    it 'should support basic user space links' do
      expect(parser.parse('@user-name:space-name')).to contain_parsed_output({
        space_link: { at: '@', user: 'user-name', link: 'space-name' }
      })
    end

    it 'should support complex user space links' do
      expect(parser.parse('@[[user name:space name]]')).to contain_parsed_output({
        space_link: { at: '@', open: '[[',  user: 'user name', link: 'space name', close: ']]' }
      })

      expect(parser.parse('@[[title|user name:space name]]')).to contain_parsed_output({
        space_link: { at: '@', open: '[[',  title: 'title', user: 'user name', link: 'space name', close: ']]' }
      })
    end

    it 'should support basic user space tiddler links' do
      expect(parser.parse('tiddler-name@user-name:space-name')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { link: 'tiddler-name' },
          space_link: { at: '@', user: 'user-name', link: 'space-name' }
        }
      })
    end

    it 'should support complex user space tiddler links' do
      expect(parser.parse('[[tiddler name]]@user-name:space-name')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', link: 'tiddler name', close: ']]' },
          space_link: { at: '@', user: 'user-name', link: 'space-name' }
        }
      })

      expect(parser.parse('[[title|tiddler name]]@user-name:space-name')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', title: 'title', link: 'tiddler name', close: ']]' },
          space_link: { at: '@', user: 'user-name', link: 'space-name' }
        }
      })

      expect(parser.parse('[[title|tiddler name]]@[[user name:space name]]')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', title: 'title', link: 'tiddler name', close: ']]' },
          space_link: { open: '[[', at: '@',  user: 'user name', link: 'space name', close: ']]' }
        }
      })

      expect(parser.parse('[[tiddler name]]@[[user name:space name]]')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { open: '[[', link: 'tiddler name', close: ']]' },
          space_link: { open: '[[', at: '@',  user: 'user name', link: 'space name', close: ']]' }
        }
      })

      expect(parser.parse('tiddler-name@[[user name:space name]]')).to contain_parsed_output({
        tiddler_space_link: {
          tiddler_link: { link: 'tiddler-name' },
          space_link: { at: '@', open: '[[',  user: 'user name', link: 'space name', close: ']]' }
        }
      })
    end
  end

  describe 'tiddlyimages' do
    it 'should support tiddlyimages' do
      expect(parser.parse('![[foo]]')).to contain_parsed_output({
        tiddler_image: { image_open: '!', tiddler_link: { open: '[[', link: 'foo', close: ']]' } }
      })

      expect(parser.parse('![[foo|bar]]')).to contain_parsed_output({
        tiddler_image: {
          image_open: '!',
          tiddler_link: { open: '[[', title: 'foo', link: 'bar', close: ']]' }
        }
      })

      expect(parser.parse('!foo@bar')).to contain_parsed_output({
        tiddler_image: {
          image_open: '!',
          tiddler_space_link: {
            tiddler_link: { link: 'foo' },
            space_link: { link: 'bar', at: '@' }
          }
        }
      })
    end

    it 'should support embedding tiddlyimages inside tiddlylinks' do
      expect(parser.parse('[[![[foo]]|bar]]')).to contain_parsed_output({
        tiddler_link: {
          open: '[[',
          link: 'bar',
          close: ']]',
          tiddler_image: {
            image_open: '!',
            tiddler_link: { open: '[[', link: 'foo', close: ']]' }
          }
        }
      })

      expect(parser.parse('[[![[foo|bar]]|baz]]')).to contain_parsed_output({
        tiddler_link: {
          open: '[[',
          link: 'baz',
          close: ']]',
          tiddler_image: {
            image_open: '!',
            tiddler_link: { open: '[[', title: 'foo', link: 'bar', close: ']]' }
          }
        }
      })

      expect(parser.parse('[[!foo@bar|baz]]')).to contain_parsed_output({
        tiddler_link: {
          open: '[[',
          link: 'baz',
          close: ']]',
          tiddler_image: {
            image_open: '!',
            tiddler_space_link: {
              tiddler_link: { link: 'foo' },
              space_link: { link: 'bar', at: '@' }
            }
          }
        }
      })
    end
  end

  describe 'transclusions' do
    it 'should handle simple transclusions' do
      expect(parser.parse('{{tiddler title}}')).to contain_parsed_output({
        transclusion: { open: '{{', link: 'tiddler title', close: '}}' }
      })

      expect(parser.parse("foo\n{{tiddler title}}\nbar")).to contain_parsed_output({
        transclusion: { open: '{{', link: 'tiddler title', close: '}}' }
      })

      expect(parser.parse("\n{{tiddler title}}")).to contain_parsed_output({
        transclusion: { open: '{{', link: 'tiddler title', close: '}}' }
      })
    end

    it 'should not recognise transclusions that are not at the block level' do
      expect(parser.parse("foo {{tiddler title}}")).to contain_parsed_output({
        text: "foo {{tiddler title}}"
      })
    end

    it 'should handle transclusions using tiddly links' do
      expect(parser.parse('{{[[tiddler title]]}}')).to contain_parsed_output({
        transclusion: { open: '{{', tiddler_link: { open: '[[', link: 'tiddler title' , close: ']]'}, close: '}}' }
      })

      expect(parser.transclusion.parse('{{tiddler-title@space}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_space_link: {
            tiddler_link: { link: 'tiddler-title' },
            space_link: { at: '@', link: 'space' }
          },
         close: '}}'
        }
      })

      expect(parser.transclusion.parse('{{tiddler-title@user:space}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_space_link: {
            tiddler_link: { link: 'tiddler-title' },
            space_link: { at: '@', user: 'user', link: 'space' }
          },
          close: '}}'
        }
      })

      expect(parser.parse('{{[[tiddler title]]@[[user name:space name]]}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_space_link: {
            tiddler_link: { open: '[[', link: 'tiddler title', close: ']]' },
            space_link: { open: '[[', at: '@',  user: 'user name', link: 'space name', close: ']]' }
          },
          close: '}}'
        }
      })
    end

    it 'should handle transclusions using tiddly images' do
      expect(parser.parse('{{![[tiddler title]]}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_image: {
            image_open: '!',
            tiddler_link: {
              open: '[[',
              link: 'tiddler title',
              close: ']]'
            }
          },
          close: '}}'
        }
      })

      expect(parser.transclusion.parse('{{!tiddler-title@space}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_image: {
            image_open: '!',
            tiddler_space_link: {
              tiddler_link: { link: 'tiddler-title' },
              space_link: { at: '@', link: 'space' }
            }
          },
          close: '}}'
        }
      })

      expect(parser.transclusion.parse('{{!tiddler-title@user:space}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_image: {
            image_open: '!',
            tiddler_space_link: {
              tiddler_link: { link: 'tiddler-title' },
              space_link: { at: '@', user: 'user', link: 'space' }
            }
          },
          close: '}}'
        }
      })

      expect(parser.parse('{{![[tiddler title]]@[[user name:space name]]}}')).to contain_parsed_output({
        transclusion: {
          open: '{{',
          tiddler_image: {
            image_open: '!',
            tiddler_space_link: {
              tiddler_link: { open: '[[', link: 'tiddler title', close: ']]' },
              space_link: {
                open: '[[',
                at: '@',
                user: 'user name',
                link: 'space name',
                close: ']]'
              }
            }
          },
          close: '}}'
        }
      })
    end
  end

end


text:
  {{isEmptyCheckedItems() ? ('msg.comm.ui.please.select' | translate) : selectedItemsNameString() }}

          <input type="checkbox" [checked]="isItemChecked( col.uuid )"  (click)="checkItem(col.uuid)">

          {{col.name}}

          {{'msg.dp.ui.search.no.rslt' | translate}}

<div *ngIf="!isMulti" class="ddp-type-selectbox ddp-type-search-select" tabindex="2"
     [ngClass]="{'ddp-selected':isShowOptions, 'ddp-result' : 0 < selectedItemKeys.length}"
     (click)="showOptions($event)" >
  <input #inputSearch
         [(ngModel)]="columnSearchText"
         placeholder="{{'msg.dp.ui.column.search.description' | translate}}"
         class="ddp-input-selectbox" >
   {{ 'msg.comm.ui.please.select' | translate }}
   {{  selectedItemsNameString() }}

       {{col.name}}

          {{'msg.dp.ui.search.no.rslt' | translate}}

redpajama_set_name: RedPajamaGithub


text:
package org.camunda.feel.syntaxtree

sealed trait RangeBoundary {
  def value: Val
  def isClosed: Boolean
}

case class OpenRangeBoundary(value: Val) extends RangeBoundary {
  override def isClosed: Boolean = false
}

case class ClosedRangeBoundary(value: Val) extends RangeBoundary {
  override def isClosed: Boolean = true
}


text:
using System;
using System.Drawing;

namespace Seagate.WXHSAProcess.LCA
{
    public class SeriesGrid
    {
       public SeriesGrid(int SeriesIndex, String LabelText)
        {
            this._SeriesIndex = SeriesIndex;
            this.LabelText = LabelText;
        }
        private int _LabelWidth=60;
       public int LabelWidth
        {
            get { return _LabelWidth; }
            set { _LabelWidth = value; }
        }
        private int _SeriesIndex;
       public int SeriesIndex
        {
            get { return _SeriesIndex; }
            set { _SeriesIndex = value; }
        }
        private Font _LabelFont=new Font("Arial",10);
       public Font LabelFont
        {
            get { return _LabelFont; }
            set { _LabelFont = value; }
        }
        private String _LabelText;
       public String LabelText
        {
            get { return _LabelText; }
            set { _LabelText = value; }
        }
        private Color _LabelColor=Color.Black;
       public Color LabelColor
        {
            get { return _LabelColor; }
            set { _LabelColor = value; }
        }
   }
}


text:
package com.salesforce.dva.argus.service.tsdb;

import com.salesforce.dva.argus.AbstractTest;
import org.junit.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ConcurrentLinkedQueue;

import static org.junit.Assert.assertEquals;

public class AbstractTSDBServiceTest extends AbstractTest {
    static final int RUNS = 100;
    static final int THREADS = 20;

    @Test
    public void testCyclingIterator() {
        AbstractTSDBService service = new AbstractTSDBService(system.getConfiguration(), system.getServiceFactory().getMonitorService());
        String[][] endpointTrials = {
                {"1"},
                {"1", "2", "3", "4"},
                {"4", "6", "133", "200", "1133", "2244", "4466", "8989", "19200", "320"}
        };

        for (int j = 0; j < endpointTrials.length; j++) {
            String[] endpoints = endpointTrials[j];
            Iterator<String> iter = service.constructCyclingIterator(endpoints);
            List<Thread> threads = new ArrayList<>();
            ConcurrentLinkedQueue<String> queue = new ConcurrentLinkedQueue<>();
            System.out.println(String.format("Trying %d .next() calls with %d threads calling cycling iterator on endpoints %s", RUNS, THREADS, String.join(", ", endpoints)));
            for (int i = 0; i < THREADS; i++) {
                Thread thread = new Thread(new IterateTask(iter, queue));
                threads.add(thread);
                thread.start();
            }
            for (Thread t : threads) {
                try {
                    t.join();
                } catch (InterruptedException ex) {
                    return;
                }
            }
            Map<String, Integer> counts = new HashMap<>();
            String[] actuals = queue.toArray(new String[0]);
            for (String s: actuals) {
                Integer count = counts.get(s);
                if (count == null) {
                    counts.put(s, 1);
                } else {
                    counts.put(s, count + 1);
                }
            }
            /* The inserted items should each have been inserted ( #insertions / #element) times */
            for (int count: counts.values()) {
                assertEquals(RUNS * THREADS / endpoints.length, count);
            }
        }
    }

    class IterateTask implements Runnable {
        Random random = new Random();
        Iterator<String> iter;
        ConcurrentLinkedQueue<String> queue;

        IterateTask(Iterator<String> iterator, ConcurrentLinkedQueue<String> queue) {
            this.iter = iterator;
            this.queue = queue;
        }
        @Override
        public void run() {
            try {
                for (int i = 0; i < RUNS; i++) {
                    queue.add(iter.next());
                    Thread.sleep(3 + random.nextInt(5));
                }
            } catch (InterruptedException ex) {
                return;
            }
        }
    }
}


text:
"use strict";
var confirmation_component_1 = require('./confirmation.component');
exports.ConfirmationComponent = confirmation_component_1.ConfirmationComponent;
//# sourceMappingURL=index.js.map


text:
\documentclass[20pt,landscape,a4paper]{foils}
\usepackage{sec6slides}

\begin{document}

%AGENDA
%09.00 - 09.30 Registrering & morgenmad
%Hvordan ser dagens trusler fra Internettet ud ?
%Kom og hør den uafhængige IT-sikkerhedsekspert Henrik Lund Kramshøjs beretning om Internet sikker-
%hedstendenser i 2009. Henrik vil med udgangspunkt i sikkerhedstendenser på Internettet gennemgå de
%trusler, som forventes at få størst betydning i 2009. Emnerne spænder fra server-sikkerhed til klient-
%systemer og indeholder referencer til større hændelser i 2008.

\mytitlepage{Internet sikkerhedstendenser i 2009}
{Content Security Seminar}

\vskip 2cm
\centerline{\footnotesize Slides er tilgængelige som PDF}

\slide{Formål}

\begin{list1}
\item Give overblik over hvad internetsikkerhed betyder i år 2009
\item Hvad er almindeligt forekommende hændelser
\item Hvad kan vi forvente os af 2009
\end{list1}

\slide{Internet - Here be dragons}

\vskip 2cm
\hlkimage{24cm}{dragon-drawing-6.jpg}

\slide{Himlen falder ned}

\vskip 1cm
\hlkimage{18cm}{homer-end-is-near.jpg}

\centerline{... igen}

\slide{Rinse repeat}

Kendte sårbarheder udnyttes stadig

Kendte angrebsmetoder udvides - social engineering

Stadig misbrug af kreditkort, selv med Verified by VISA på plads osv.

\pause
\vskip 3cm
\centerline{\bf\LARGE\color{security6blue} Gider I høre de samme råd igen}

\slide{2008 hvad skete der}

\begin{list1}
\item Botnets fortsætter med at vokse - millionvis af computere
\item Botnets bliver sværere at udrydde
\item Sikkerhed for botnets er blevet populært
\item Botnets er blevet en hyldevare
\end{list1}

\pause
\vskip 3cm
\centerline{\bf\LARGE\color{security6blue}Botnets er grundlaget for mange nye angreb}

\slide{Moderne botnets}

\begin{list1}
\item Botnets spreder sig ved at inficere så mange systemer som muligt
\item Botnets idag vokser gerne langsommere - ingen ny Code Red hastighedsrekord
\item Spreder sig via SMTP, HTTP, SMB, ... alle protokoller der kan overføre data
\item Bannerkampagner og 3. parts kilder til elementer på din side?!
\item Når først der er kommet malware på systemet udvides med moduler
\end{list1}

\slide{Malware idag}

\begin{list1}
\item Malware idag er sofistikeret
\item Modulært opbygget
\item Benytter stærk kryptering til at sikre administrationen af inficerede computere
\item Benytter seneste sikkerhedshuller - 0 days til at sprede sig
\item Benytter de seneste rootkit metoder til at holde sig skjult
\item Muterer efter alle kendte metoder for at undgå opdagelse
\item Larmer mindre end tidligere
\end{list1}

\slide{Botnets og malware sælges med support}

\hlkimage{21cm}{dagens-tilbud-trojanere.pdf}

\begin{list1}
\item Malware programmører har lært kundepleje
\item "Køb denne version  og få gratis opdateringer"
\item Lej vores botnet med 100.000 computere
\end{list1}

\slide{milw0rm - dagens buffer overflow}

\hlkimage{20cm}{milw0rm.png}

\centerline{\link{http://milw0rm.com/}}

\slide{Metasploit}

\hlkimage{20cm}{metasploit-about.png}

\begin{list1}
\item Idag findes der samlinger af exploits som milw0rm
\item Udviklingsværktøjerne til exploits er idag meget raffinerede!
\item Exploits sælges på både åbne og lukkede "exploitbørser"
\item \link{http://www.metasploit.com/}
\end{list1}

%\slide{GhostNet }

%\begin{list1}
%\item Tibetanske eksilregering blev inficeret og der blev iværksat undersøgelse
%\end{list1}

\slide{Spamming as a service}

\begin{list1}
\item BBC programmet Click undersøgte mulighederne for at købe sig adgang til et botnet
\item Lejede 22.000 computere og afprøvede skadevirkninger
\item Det virkede (desværre) som forventet
\end{list1}

Kilde: Marts 2009 BBC\\
\link{http://news.bbc.co.uk/1/hi/programmes/click_online/7932816.stm}

\slide{Hvad vil der ske på serverne i 2009}

\begin{list1}
\item Problemerne med sikkerhed bliver ikke løst endeligt
\item Mange angreb vil fortsætte - status quo
\item Organiseret kriminalitet vil fortsætte med at udnytte mulighederne
\item Målgruppen for angreb vokser - flere vil blive ramt
\item Serveroperativsystemerne er dog i mange tilfælde mere resistente idag
\end{list1}

\slide{Gode operativsystemer}

\begin{list1}
\item Nyere versioner af Microsoft Windows, Mac OS X og Linux distributionerne inkluderer:
\begin{list2}
\item Buffer overflow protection
\item Stack protection, non-executable stack
\item Heap protection, non-executable heap
\item \emph{Randomization of parameters} stack gap m.v.
\end{list2}
\item Windows 2008 er klart at foretrække fremfor Windows 2000 servere ;-)
\item OpenBSD er nok nået længst og et godt eksempel\\ \link{http://www.openbsd.org/papers/}
\item ... og husk alle de sædvanlige råd, opdateringer, firewalls, backup, UPS osv.
\end{list1}

\slide{Dør din infrastruktur i 2009}

\hlkimage{15cm}{ddos.pdf}

\begin{list1}
\item Selvom dine servere er iorden skal du være klar til at modtage angreb
\item Hvor mange ressourcer bruger du på din infrastruktur
\item Kan du stadig supportere den og køre din forretning?
\end{list1}

\pause
\centerline{\bf\LARGE\color{security6blue}Hvad er \emph{din} kerneforretning}

\slide{Nyeste botnets}

\begin{quote}
Det amerikanske sikkerhedsfirma Finjan har optrevlet et botnet
med 1,9 millioner inficerede computere.

Finjan har offentliggjort fundet på RSA-konferencen og betegner botnettet som et af de største, som er kontrolleret af en enkelt, kriminel bande, skriver CNet.

Botnettet har været aktivt siden februar og hostes i Ukraine, hvorfra det styres af seks personer. Den kriminelle bande styrer de indlemmede Windows XP-maskiner til at kopiere filer, registrere tastetryk, sende spam
og tage screenshots.

Ifølge det engelske it-medie Computer
Weekly har banden solgt kontrollen over de inficerede computere i bundter af 1.000 computere for omkring 250-600 kroner, og ifølge CNet har banden kunnet tjene op til 1,1 millioner kroner om dagen ved at udleje zombierne til andre.
\end{quote}

\begin{list1}
\item Hver uge har historier om botnets - denne artikel på version2.dk er fra 22. april
\item Kilde: \\
{\footnotesize\link{http://www.version2.dk/artikel/10679-sikkerhedsfirma-finder-botnet-med-19-mio-zombier}}
\end{list1}

\slide{Gode sikkerhedsforanstaltninger}

\hlkimage{15cm}{god-sikkerhed.pdf}

\begin{list1}
\item Du har begrænsede ressourcer - udnyt dem bedst muligt - det er din pligt
\end{list1}
\pause
\centerline{\bf\LARGE\color{security6blue}Din indsats skal stå mål med effektiviteten}

\slide{Hvad rammer dine brugere i 2009}

\begin{list1}
\item Drive by hacking, følg et link til en server
\item - sekundet efter er din maskine inficeret - *booom*
\end{list1}

%\slide{Browsersikkerhed - undskyld browser-U-sikkerhed}

%\begin{list1}
%\item
%\end{list1}

\slide{Phishing - Receipt for Your Payment to mark561@bt....com}
\hlkimage{21cm}{paypal-phish.png}

\pause
\centerline{\bf\LARGE\color{security6blue}Kan du selv genkende Phishing}
\pause
\centerline{\bf\LARGE\color{security6blue}kan dine brugere}

\slide{Fast flux}

\begin{list1}
\item Tidligere var malware sites på få hackede servere
\item Idag er malware sites placeret på mange computere
\item Med lav DNS Time to Live (TTL) "sikres oppetiden bedre"
\item Svært at finde alle IP-adresserne og rapportere dem
\item Fast flux netværk indgår idag i angreb mod danske firmaer
\item Know Your Enemy: Fast-Flux Service Networks\\
\link{http://www.honeynet.org/book/export/html/130}
\end{list1}

\slide{Hvordan bliver dine brugere mere sikre}

\begin{list1}
\item Lad være med at bruge computere \smiley
\item Lad være med at bruge een computer til alt
\item Firmacomputeren er ikke en privat bærbar, lås den - alle har råd til en privat netbook
\item Forskellige systemer til forskellige formål
\item Brug en sikker konfiguration, minimumskonfiguration alle steder
\item Opsætning af netværk, hvordan? Security Configuration Guides + paranoia
\begin{list2}
\item \link{http://csrc.nist.gov/publications/PubsSPs.html}
\item \link{http://www.nsa.gov/research/publications/index.shtml}
\item \link{http://www.nsa.gov/ia/guidance/security_configuration_guides/index.shtml}
\end{list2}
\end{list1}

\slide{Afbalanceret sikkerhed}

\hlkimage{21cm}{afbalanceret-sikkerhed.pdf}

\begin{list1}
\item Det er bedre at have et ensartet niveau
\item Hvor rammer angreb hvis du har Fort Knox et sted og kaos andre steder
\item Hackere vælger ikke med vilje den sværeste vej ind
\end{list1}

\slide{Forslag til aktiviteter}

\begin{list1}
\item Accepter at der ikke findes 100\% sikkerhed

\item Vælg dit sikkerhedsniveau

\item Vælg dine kampe med omhu\\
- lad andre kæmpe mod spam hvis det ikke er din kerneforretning
\end{list1}

\slide{For lidt samarbejde}

\hlkimage{18cm}{Shaking-hands_web.jpg}

\begin{list1}
\item Team up!
\item Snak med din sidemand/dame - I har sikkert mange af de samme udfordringer.
\end{list1}

\slide{Informationssikkerhed}

\hlkimage{12cm}{stupid-security.jpg}

\begin{list1}
\item Husk følgende: Sikkerhed kommer fra langsigtede intiativer
\end{list1}
\centerline{\hlkbig\color{titlecolor}
\bfseries Informationssikkerhed er en proces}

\slide{Spørgsmål?}

\vskip 4cm

\begin{center}
\hlkbig

\myname

\myweb
\vskip 2 cm

I er altid velkomne til at sende spørgsmål på e-mail
\end{center}

\slide{FreeScan.dk - gratis portscanning}

\hlkimage{26cm}{freescan-reklame.png}
\vskip 1cm
\centerline{\link{http://www.freescan.dk}}

\slide{Reklamer: kursusafholdelse}

\begin{list1}
\item Følgende kurser afholdes med mig som underviser
\begin{list2}
\item IPv6 workshop - 1 dag\\
 Introduktion til Internetprotokollerne og forberedelse til
  implementering i egne netværk.
\item Wireless teknologier og sikkerhed workshop - 2 dage\\
En dag med fokus på netværksdesign og fornuftig implementation af
trådløse netværk, samt integration med hjemmepc og
wirksomhedsnetværk.
\item Hacker workshop 2 dage\\
Workshop med detaljeret gennemgang af hackermetoderne angreb over
netværk, exploitprogrammer, portscanning, Nessus m.fl.
\item TCP/IP workshop 2 dage\\
Med fokus på almindelige protokoller i TCP/IP gennemgås grundlaget for
internet gennem 5 dage med teori og opgaver på en skalmodel af internet
\item Moderne Firewalls og Internetsikkerhed 2 dage\\
Informere om trusler og aktivitet på Internet, samt give et bud
på hvorledes en avanceret moderne firewall idag kunne konfigureres.
\end{list2}
\end{list1}

Se mere på \link{http://www.security6.net/courses.html}

\end{document}


text:
layout: default
title: Advent calendar 2018
breadcrumb: childrens-ya-books
---

Suffolk Libraries children's book advent calendar 2018

Read your way to Christmas! Every day until Christmas Eve, stock librarian Sophie recommends one of our brilliant new Christmas books for children.

{% assign advent_posts = site.posts | where: "tag", "childrens-advent-2018" | reverse %}

{% for post in advent_posts limit:24 %}

{{ post.date | date: "%B %e" }}

{{ post.title }}

{{ post.excerpt }}

{% endfor %}


text:
/**
 * SearchParameter.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
 */

package com.google.api.ads.adwords.axis.v201409.o;

/**
 * A set of {@link SearchParameter}s are supplied to the
 *             {@link com.google.ads.api.services.targetingideas.TargetingIdeaSelector}
 * to specify how the user wants to filter the set of all possible
 *             {@link com.google.ads.api.services.targetingideas.TargetingIdea}s.
 *
 *             There is a {@link SearchParameter} for all types of inputs.
 * {@link SearchParameter}s can conceptually be broken down into two
 * types.
 *

 *
Input {@link SearchParameter}s provide the seed information
 * from which
 *             ideas should be generated or statistic information is
 * desired
 *             (e.g. {@link RelatedToQuerySearchParameter},
 *             {@link RelatedToUrlSearchParameter}, etc).
 *             Such {@link SearchParameters} are required for valid requests.

 *
Filter {@link SearchParameter}s are used to trim down the results
 * based
 *             on {@link com.google.ads.api.services.targetingideas.attributes.Attribute}
 * related information (eg. {@link CompetitionSearchParameter}, etc.).

 *

 *
 *             A request should only contain one instance of each {@link
 * SearchParameter}.
 *
 *             NOTICE: Starting with version v201406, requests containing
 * multiple
 *             instances of the same search parameter will be rejected.
 *
One or more of the following {@link SearchParameter}s are required:

 *

{@link CategoryProductsAndServicesSearchParameter}

 *
{@link LocationSearchParameter}

 *
{@link RelatedToQuerySearchParameter}

 *
{@link RelatedToUrlSearchParameter}

 *
{@link SeedAdGroupIdSearchParameter}

 *

 *
{@link IdeaType} KEYWORD supports following {@link SearchParameter}s:

 *

 *
{@link CategoryProductsAndServicesSearchParameter}

 *
{@link CompetitionSearchParameter}

 *
{@link ExcludedKeywordSearchParameter}

 *
{@link IdeaTextFilterSearchParameter}

 *
{@link IncludeAdultContentSearchParameter}

 *
{@link LanguageSearchParameter}

 *
{@link LocationSearchParameter}

 *
{@link NetworkSearchParameter}

 *
{@link RelatedToQuerySearchParameter}

 *
{@link RelatedToUrlSearchParameter}

 *
{@link SearchVolumeSearchParameter}

 *
{@link SeedAdGroupIdSearchParameter}

 *

 *
{@link IdeaType} PLACEMENT supports following {@link SearchParameter}s:

 *

 *
{@link LanguageSearchParameter}

 *
{@link LocationSearchParameter}

 *
{@link RelatedToQuerySearchParameter}

 *
{@link RelatedToUrlSearchParameter}

 *

 */
public abstract class SearchParameter  implements java.io.Serializable {
    /* Indicates that this instance is a subtype of SearchParameter.
     * Although this field is returned in the response, it is ignored on
     * input
     *                 and cannot be selected. Specify xsi:type instead. */
    private java.lang.String searchParameterType;

    public SearchParameter() {
    }

    public SearchParameter(
           java.lang.String searchParameterType) {
           this.searchParameterType = searchParameterType;
    }

    /**
     * Gets the searchParameterType value for this SearchParameter.
     *
     * @return searchParameterType   * Indicates that this instance is a subtype of SearchParameter.
     * Although this field is returned in the response, it is ignored on
     * input
     *                 and cannot be selected. Specify xsi:type instead.
     */
    public java.lang.String getSearchParameterType() {
        return searchParameterType;
    }

    /**
     * Sets the searchParameterType value for this SearchParameter.
     *
     * @param searchParameterType   * Indicates that this instance is a subtype of SearchParameter.
     * Although this field is returned in the response, it is ignored on
     * input
     *                 and cannot be selected. Specify xsi:type instead.
     */
    public void setSearchParameterType(java.lang.String searchParameterType) {
        this.searchParameterType = searchParameterType;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof SearchParameter)) return false;
        SearchParameter other = (SearchParameter) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.searchParameterType==null && other.getSearchParameterType()==null) ||
             (this.searchParameterType!=null &&
              this.searchParameterType.equals(other.getSearchParameterType())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getSearchParameterType() != null) {
            _hashCode += getSearchParameterType().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(SearchParameter.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/o/v201409", "SearchParameter"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("searchParameterType");
        elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/o/v201409", "SearchParameter.Type"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
from __future__ import unicode_literals

# Source https://github.com/stopwords-iso/stopwords-fi/blob/master/stopwords-fi.txt
# Reformatted with some minor corrections

STOP_WORDS = set("""

aiemmin aika aikaa aikaan aikaisemmin aikaisin aikana aikoina aikoo aikovat
aina ainakaan ainakin ainoa ainoat aiomme aion aiotte aivan ajan alas alemmas
alkuisin alkuun alla alle aloitamme aloitan aloitat aloitatte aloitattivat
aloitettava aloitettavaksi aloitettu aloitimme aloitin aloitit aloititte
aloittaa aloittamatta aloitti aloittivat alta aluksi alussa alusta annettavaksi
annettava annettu ansiosta antaa antamatta antoi apu asia asiaa asian asiasta
asiat asioiden asioihin asioita asti avuksi avulla avun avutta

edelle edelleen edellä edeltä edemmäs edes edessä edestä ehkä ei eikä eilen
eivät eli ellei elleivät ellemme ellen ellet ellette emme en enemmän eniten
ennen ensi ensimmäinen ensimmäiseksi ensimmäisen ensimmäisenä ensimmäiset
ensimmäisiksi ensimmäisinä ensimmäisiä ensimmäistä ensin entinen entisen
entisiä entisten entistä enää eri erittäin erityisesti eräiden eräs eräät esi
esiin esillä esimerkiksi et eteen etenkin ette ettei että

halua haluaa haluamatta haluamme haluan haluat haluatte haluavat halunnut
halusi halusimme halusin halusit halusitte halusivat halutessa haluton he hei
heidän heidät heihin heille heillä heiltä heissä heistä heitä helposti heti
hetkellä hieman hitaasti huolimatta huomenna hyvien hyviin hyviksi hyville
hyviltä hyvin hyvinä hyvissä hyvistä hyviä hyvä hyvät hyvää hän häneen hänelle
hänellä häneltä hänen hänessä hänestä hänet häntä

ihan ilman ilmeisesti itse itsensä itseään

ja jo johon joiden joihin joiksi joilla joille joilta joina joissa joista joita
joka jokainen jokin joko joksi joku jolla jolle jolloin jolta jompikumpi jona
jonka jonkin jonne joo jopa jos joskus jossa josta jota jotain joten jotenkin
jotenkuten jotka jotta jouduimme jouduin jouduit jouduitte joudumme joudun
joudutte joukkoon joukossa joukosta joutua joutui joutuivat joutumaan joutuu
joutuvat juuri jälkeen jälleen jää

kahdeksan kahdeksannen kahdella kahdelle kahdelta kahden kahdessa kahdesta
kahta kahteen kai kaiken kaikille kaikilta kaikkea kaikki kaikkia kaikkiaan
kaikkialla kaikkialle kaikkialta kaikkien kaikkiin kaksi kannalta kannattaa
kanssa kanssaan kanssamme kanssani kanssanne kanssasi kauan kauemmas kaukana
kautta kehen keiden keihin keiksi keille keillä keiltä keinä keissä keistä
keitten keittä keitä keneen keneksi kenelle kenellä keneltä kenen kenenä
kenessä kenestä kenet kenettä kenties kerran kerta kertaa keskellä kesken
keskimäärin ketkä ketä kiitos kohti koko kokonaan kolmas kolme kolmen kolmesti
koska koskaan kovin kuin kuinka kuinkaan kuitenkaan kuitenkin kuka kukaan kukin
kumpainen kumpainenkaan kumpi kumpikaan kumpikin kun kuten kuuden kuusi kuutta
kylliksi kyllä kymmenen kyse

liian liki lisäksi lisää lla luo luona lähekkäin lähelle lähellä läheltä
lähemmäs lähes lähinnä lähtien läpi

mahdollisimman mahdollista me meidän meidät meihin meille meillä meiltä meissä
meistä meitä melkein melko menee menemme menen menet menette menevät meni
menimme menin menit menivät mennessä mennyt menossa mihin miksi mikä mikäli
mikään mille milloin milloinkan millä miltä minkä minne minua minulla minulle
minulta minun minussa minusta minut minuun minä missä mistä miten mitkä mitä
mitään moi molemmat mones monesti monet moni moniaalla moniaalle moniaalta
monta muassa muiden muita muka mukaan mukaansa mukana mutta muu muualla muualle
muualta muuanne muulloin muun muut muuta muutama muutaman muuten myöhemmin myös
myöskin myöskään myötä

ne neljä neljän neljää niiden niihin niiksi niille niillä niiltä niin niinä
niissä niistä niitä noiden noihin noiksi noilla noille noilta noin noina noissa
noista noita nopeammin nopeasti nopeiten nro nuo nyt näiden näihin näiksi
näille näillä näiltä näin näinä näissä näistä näitä nämä

ohi oikea oikealla oikein ole olemme olen olet olette oleva olevan olevat oli
olimme olin olisi olisimme olisin olisit olisitte olisivat olit olitte olivat
olla olleet ollut oma omaa omaan omaksi omalle omalta oman omassa omat omia
omien omiin omiksi omille omilta omissa omista on onkin onko ovat

paikoittain paitsi pakosti paljon paremmin parempi parhaillaan parhaiten
perusteella peräti pian pieneen pieneksi pienelle pienellä pieneltä pienempi
pienestä pieni pienin poikki puolesta puolestaan päälle

runsaasti

saakka sama samaa samaan samalla saman samat samoin sata sataa satojen se
seitsemän sekä sen seuraavat siellä sieltä siihen siinä siis siitä sijaan siksi
sille silloin sillä silti siltä sinne sinua sinulla sinulle sinulta sinun
sinussa sinusta sinut sinuun sinä sisäkkäin sisällä siten sitten sitä ssa sta
suoraan suuntaan suuren suuret suuri suuria suurin suurten

taa taas taemmas tahansa tai takaa takaisin takana takia tallä tapauksessa
tarpeeksi tavalla tavoitteena te teidän teidät teihin teille teillä teiltä
teissä teistä teitä tietysti todella toinen toisaalla toisaalle toisaalta
toiseen toiseksi toisella toiselle toiselta toisemme toisen toisensa toisessa
toisesta toista toistaiseksi toki tosin tuhannen tuhat tule tulee tulemme tulen
tulet tulette tulevat tulimme tulin tulisi tulisimme tulisin tulisit tulisitte
tulisivat tulit tulitte tulivat tulla tulleet tullut tuntuu tuo tuohon tuoksi
tuolla tuolle tuolloin tuolta tuon tuona tuonne tuossa tuosta tuota tuskin tykö
tähän täksi tälle tällä tällöin tältä tämä tämän tänne tänä tänään tässä tästä
täten tätä täysin täytyvät täytyy täällä täältä

ulkopuolella usea useasti useimmiten usein useita uudeksi uudelleen uuden uudet
uusi uusia uusien uusinta uuteen uutta

vaan vai vaiheessa vaikea vaikean vaikeat vaikeilla vaikeille vaikeilta
vaikeissa vaikeista vaikka vain varmasti varsin varsinkin varten vasen
vasemmalla vasta vastaan vastakkain vastan verran vielä vierekkäin vieressä
vieri viiden viime viimeinen viimeisen viimeksi viisi voi voidaan voimme voin
voisi voit voitte voivat vuoden vuoksi vuosi vuosien vuosina vuotta vähemmän
vähintään vähiten vähän välillä

yhdeksän yhden yhdessä yhteen yhteensä yhteydessä yhteyteen yhtä yhtäälle
yhtäällä yhtäältä yhtään yhä yksi yksin yksittäin yleensä ylemmäs yli ylös
ympäri

älköön älä

""".split())


text:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  <title>add_policy_uri (OpenID::PAPE::Request)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />

# File lib/openid/extensions/pape.rb, line 32
      def add_policy_uri(policy_uri)
        unless @preferred_auth_policies.member? policy_uri
          @preferred_auth_policies << policy_uri
        end
      end


text:
import base from './base';
import dark from './dark';
import { IThemes } from './utils';

/**
 * The default theme to load
 */
export const DEFAULT_THEME: string = 'base';

export const themes: IThemes = {
  base,
  dark,
};


text:
<?php
/**
 *
 */
class Session_helper
{

	public static function get($name){
		return isset($_SESSION[$name]) ? $_SESSION[$name] : false ;
	}

	public static function set($key, $val){
		$_SESSION[$key] = $val;
	}

	public static function destroy(){
		session_destroy();
	}
}


text:
package gov.niarl.hisAppraiser.util;

import gov.niarl.hisAppraiser.Constants;

import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Map.Entry;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

/**
 * This class is a central location for dealing with email functionality.
 * @author syelama
 * @version Crossbow
 *
 */
public class Emailer {
	/**
	 * Extracts properties for mail configuration.
	 * @param completeProperties
	 * @return A subset of properties containing mail configuration.
	 */
	public static Properties parseMailServerProperties(Properties completeProperties) {
		Properties mailServerProperties = new Properties();
		for (Entry<Object, Object> entry : completeProperties.entrySet()) {
			if (((String) entry.getKey()).trim().toLowerCase().startsWith("mail.")) {
				mailServerProperties.put(entry.getKey(), entry.getValue());
			}
		}
		return mailServerProperties;
	}

	/**
	 * Constructs an array of InternetAddress from a property containing a
	 * comma separated list.
	 * @param defaultAlertMessageTo Comma separated list of email "to" addresses.
	 * @return An array of InternetAddress to be used to send email.
	 */
	public static InternetAddress[] parseDefaultAlertMessageTo(String defaultAlertMessageTo) {
		InternetAddress[] internetAddresses;
		try {
			StringTokenizer stringTokenizer = new StringTokenizer(defaultAlertMessageTo, ",");
			internetAddresses = new InternetAddress[stringTokenizer.countTokens()];
			for (int i = 0; i < internetAddresses.length; i++) {
				if (stringTokenizer.hasMoreElements()){
					internetAddresses[i] = new InternetAddress((String) stringTokenizer.nextElement());
				}
			}
		} catch (AddressException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
		return internetAddresses;
	}

	/**
	 * Send a general purpose email set from text properties.
	 */
	public static void sendDefaultAlertEmail() {
		Session session = Session.getDefaultInstance(Constants.MAIL_SERVER_PROPERTIES, null);
		MimeMessage mimeMessage = new MimeMessage(session);
		try {
			//"mail.from" set in the properties
			//message.setFrom(new InternetAddress(fromEmailAddr));
			for (int i = 0; i < Constants.ALERT_MESSAGE_TO.length; i++) {
				mimeMessage.addRecipient(Message.RecipientType.TO, Constants.ALERT_MESSAGE_TO[i]);
			}
			mimeMessage.setSubject(Constants.ALERT_MESSAGE_SUBJECT);
			mimeMessage.setContent(Constants.ALERT_MESSAGE_BODY, "text/html; charset=ISO-8859-1");
			Transport.send(mimeMessage);
		} catch (MessagingException ex) {
			System.err.println("Cannot send email. " + ex);
			ex.printStackTrace();
		}
	}
}


text:
package com.github.flqw.ast.parsers.jaxen;

import java.util.Collections;
import java.util.Iterator;

import org.jaxen.DefaultNavigator;
import org.jaxen.XPath;
import org.jaxen.util.SingleObjectIterator;

import com.github.flqw.ast.parsers.AstNode;

@SuppressWarnings({ "serial", "unchecked" })
public class DocumentNavigator<N> extends DefaultNavigator {

	@Override
	public String getAttributeName(Object arg0) {
		return ((Attribute<N>) arg0).getName();
	}

	@Override
	public String getAttributeNamespaceUri(Object arg0) {
		return "";
	}

	@Override
	public String getAttributeQName(Object arg0) {
		return ((Attribute<N>) arg0).getName();
	}

	@Override
	public String getAttributeStringValue(Object arg0) {
		return ((Attribute<N>) arg0).getStringValue();
	}

	@Override
	public String getCommentStringValue(Object arg0) {
		return "";
	}

	@Override
	public String getElementName(Object node) {
		return ((AstNode<N>) node).getType();
	}

	@Override
	public String getElementNamespaceUri(Object arg0) {
		return "";
	}

	@Override
	public String getElementQName(Object arg0) {
		return getElementName(arg0);
	}

	@Override
	public String getElementStringValue(Object arg0) {
		return "";
	}

	@Override
	public String getNamespacePrefix(Object arg0) {
		return "";
	}

	@Override
	public String getNamespaceStringValue(Object arg0) {
		return "";
	}

	@Override
	public String getTextStringValue(Object arg0) {
		return "";
	}

	@Override
	public boolean isAttribute(Object arg0) {
		return arg0 instanceof Attribute;
	}

	@Override
	public boolean isComment(Object arg0) {
		return false;
	}

	@Override
	public boolean isDocument(Object arg0) {
		if (arg0 instanceof AstNode) {
			return ((AstNode<N>) arg0).isRoot();
		}
		return false;
	}

	@Override
	public boolean isElement(Object arg0) {
		return arg0 instanceof AstNode;
	}

	@Override
	public boolean isNamespace(Object arg0) {
		return false;
	}

	@Override
	public boolean isProcessingInstruction(Object arg0) {
		return false;
	}

	@Override
	public boolean isText(Object arg0) {
		return false;
	}

	@Override
	public XPath parseXPath(String arg0) {
		return null;
	}

	@Override
	public Object getParentNode(Object arg0) {
		if (arg0 instanceof AstNode) {
			return ((AstNode<N>) arg0).getParent();
		}
		if (arg0 instanceof Attribute) {
			return ((Attribute<N>) arg0).getParent();
		}
		// can't navigate to parent node...
		return null;
	}

	@Override
	public Iterator<Attribute<N>> getAttributeAxisIterator(Object arg0) {
//		if (arg0 instanceof AttributeNode) {
//			return ((AttributeNode) arg0).getAttributeIterator();
//		} else {
			return new AttributeAxisIterator<N>((AstNode<N>) arg0);
//		}
	}

	@Override
	public Object getDocumentNode(Object contextNode) {
		if (isDocument(contextNode)) {
			return contextNode;
		}
		if (null == contextNode) {
			throw new RuntimeException("contextNode may not be null");
		}
		return getDocumentNode(getParentNode(contextNode));
	}

	/**
	 * Get an iterator over all of this node's children.
	 *
	 * @param contextNode
	 *            The context node for the child axis.
	 * @return A possibly-empty iterator (not null).
	 */
	@Override
	public Iterator<AstNode<N>> getChildAxisIterator(Object contextNode) {
		return new NodeIterator<N>((AstNode<N>) contextNode) {
			@Override
			protected AstNode<N> getFirstNode(AstNode<N> node) {
				return getFirstChild(node);
			}

			@Override
			protected AstNode<N> getNextNode(AstNode<N> node) {
				return getNextSibling(node);
			}
		};
	}

	/**
	 * Get a (single-member) iterator over this node's parent.
	 *
	 * @param contextNode
	 *            the context node for the parent axis.
	 * @return A possibly-empty iterator (not null).
	 */
	@Override
	public Iterator<AstNode<N>> getParentAxisIterator(Object contextNode) {
		if (isAttribute(contextNode)) {
			return new SingleObjectIterator(((Attribute<N>) contextNode).getParent());
		}
		AstNode<N> parent = ((AstNode<N>) contextNode).getParent();
		if (parent != null) {
			return new SingleObjectIterator(parent);
		} else {
			return Collections.emptyIterator();
		}
	}

	/**
	 * Get an iterator over all following siblings.
	 *
	 * @param contextNode
	 *            the context node for the sibling iterator.
	 * @return A possibly-empty iterator (not null).
	 */
	@Override
	public Iterator<AstNode<N>> getFollowingSiblingAxisIterator(Object contextNode) {
		return new NodeIterator<N>((AstNode<N>) contextNode) {
			@Override
			protected AstNode<N> getFirstNode(AstNode<N> node) {
				return getNextNode(node);
			}

			@Override
			protected AstNode<N> getNextNode(AstNode<N> node) {
				return getNextSibling(node);
			}
		};
	}

	/**
	 * Get an iterator over all preceding siblings.
	 *
	 * @param contextNode
	 *            The context node for the preceding sibling axis.
	 * @return A possibly-empty iterator (not null).
	 */
	@Override
	public Iterator<AstNode<N>> getPrecedingSiblingAxisIterator(Object contextNode) {
		return new NodeIterator<N>((AstNode<N>) contextNode) {
			@Override
			protected AstNode<N> getFirstNode(AstNode<N> node) {
				return getNextNode(node);
			}

			@Override
			protected AstNode<N> getNextNode(AstNode<N> node) {
				return getPreviousSibling(node);
			}
		};
	}

	/**
	 * Get an iterator over all following nodes, depth-first.
	 *
	 * @param contextNode
	 *            The context node for the following axis.
	 * @return A possibly-empty iterator (not null).
	 */
	@Override
	public Iterator<AstNode<N>> getFollowingAxisIterator(Object contextNode) {
		return new NodeIterator<N>((AstNode<N>) contextNode) {
			@Override
			protected AstNode<N> getFirstNode(AstNode<N> node) {
				if (node == null) {
					return null;
				} else {
					AstNode<N> sibling = getNextSibling(node);
					if (sibling == null) {
						return getFirstNode(node.getParent());
					} else {
						return sibling;
					}
				}
			}

			@Override
			protected AstNode<N> getNextNode(AstNode<N> node) {
				if (node == null) {
					return null;
				} else {
					AstNode<N> n = getFirstChild(node);
					if (n == null) {
						n = getNextSibling(node);
					}
					if (n == null) {
						return getFirstNode(node.getParent());
					} else {
						return n;
					}
				}
			}
		};
	}

	/**
	 * Get an iterator over all preceding nodes, depth-first.
	 *
	 * @param contextNode
	 *            The context node for the preceding axis.
	 * @return A possibly-empty iterator (not null).
	 */
	@Override
	public Iterator<AstNode<N>> getPrecedingAxisIterator(Object contextNode) {
		return new NodeIterator<N>((AstNode<N>) contextNode) {
			@Override
			protected AstNode<N> getFirstNode(AstNode<N> node) {
				if (node == null) {
					return null;
				} else {
					AstNode<N> sibling = getPreviousSibling(node);
					if (sibling == null) {
						return getFirstNode(node.getParent());
					} else {
						return sibling;
					}
				}
			}

			@Override
			protected AstNode<N> getNextNode(AstNode<N> node) {
				if (node == null) {
					return null;
				} else {
					AstNode<N> n = getLastChild(node);
					if (n == null) {
						n = getPreviousSibling(node);
					}
					if (n == null) {
						return getFirstNode(node.getParent());
					} else {
						return n;
					}
				}
			}
		};
	}

}


text:
// Copyright 2017 The Nomulus Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package google.registry.flows;

import static com.google.common.truth.Truth.assertThat;
import static google.registry.model.EppResourceUtils.loadAtPointInTime;
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
import static google.registry.testing.DatabaseHelper.createTld;
import static google.registry.testing.DatabaseHelper.loadAllOf;
import static google.registry.testing.DatabaseHelper.loadByEntity;
import static google.registry.testing.DatabaseHelper.persistActiveContact;
import static google.registry.testing.DatabaseHelper.persistActiveHost;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.joda.time.DateTimeZone.UTC;
import static org.joda.time.Duration.standardDays;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import google.registry.flows.EppTestComponent.FakesAndMocksModule;
import google.registry.model.domain.Domain;
import google.registry.monitoring.whitebox.EppMetric;
import google.registry.testing.AppEngineExtension;
import google.registry.testing.EppLoader;
import google.registry.testing.FakeClock;
import google.registry.testing.FakeHttpSession;
import org.joda.time.DateTime;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

/** Test that we can reload EPP resources as they were in the past. */
class EppPointInTimeTest {

  private final FakeClock clock = new FakeClock(DateTime.now(UTC));

  @RegisterExtension
  final AppEngineExtension appEngine =
      AppEngineExtension.builder().withCloudSql().withClock(clock).withTaskQueue().build();

  private EppLoader eppLoader;

  @BeforeEach
  void beforeEach() {
    createTld("tld");
  }

  private void runFlow() throws Exception {
    SessionMetadata sessionMetadata = new HttpSessionMetadata(new FakeHttpSession());
    sessionMetadata.setRegistrarId("TheRegistrar");
    DaggerEppTestComponent.builder()
        .fakesAndMocksModule(FakesAndMocksModule.create(clock))
        .build()
        .startRequest()
        .flowComponentBuilder()
        .flowModule(
            new FlowModule.Builder()
                .setSessionMetadata(sessionMetadata)
                .setCredentials(new PasswordOnlyTransportCredentials())
                .setEppRequestSource(EppRequestSource.UNIT_TEST)
                .setIsDryRun(false)
                .setIsSuperuser(false)
                .setInputXmlBytes(eppLoader.getEppXml().getBytes(UTF_8))
                .setEppInput(eppLoader.getEpp())
                .build())
        .build()
        .flowRunner()
        .run(EppMetric.builder());
  }

  @Test
  void testLoadAtPointInTime() throws Exception {
    clock.setTo(DateTime.parse("1984-12-18T12:30Z")); // not midnight

    persistActiveHost("ns1.example.net");
    persistActiveHost("ns2.example.net");
    persistActiveContact("jd1234");
    persistActiveContact("sh8013");

    clock.advanceBy(standardDays(1));
    DateTime timeAtCreate = clock.nowUtc();
    clock.setTo(timeAtCreate);
    eppLoader = new EppLoader(this, "domain_create.xml", ImmutableMap.of("DOMAIN", "example.tld"));
    runFlow();
    Domain domainAfterCreate = Iterables.getOnlyElement(loadAllOf(Domain.class));
    assertThat(domainAfterCreate.getDomainName()).isEqualTo("example.tld");

    clock.advanceBy(standardDays(2));
    DateTime timeAtFirstUpdate = clock.nowUtc();
    eppLoader = new EppLoader(this, "domain_update_dsdata_add.xml");
    runFlow();

    Domain domainAfterFirstUpdate = loadByEntity(domainAfterCreate);
    assertThat(domainAfterCreate).isNotEqualTo(domainAfterFirstUpdate);

    clock.advanceOneMilli(); // same day as first update
    DateTime timeAtSecondUpdate = clock.nowUtc();
    eppLoader = new EppLoader(this, "domain_update_dsdata_rem.xml");
    runFlow();
    Domain domainAfterSecondUpdate = loadByEntity(domainAfterCreate);

    clock.advanceBy(standardDays(2));
    DateTime timeAtDelete = clock.nowUtc(); // before 'add' grace period ends
    eppLoader = new EppLoader(this, "domain_delete.xml", ImmutableMap.of("DOMAIN", "example.tld"));
    runFlow();

    assertThat(domainAfterFirstUpdate).isNotEqualTo(domainAfterSecondUpdate);

    // Point-in-time can only rewind an object from the current version, not roll forward.
    Domain latest = loadByEntity(domainAfterCreate);

    // Creation time has millisecond granularity due to isActive() check.
    assertThat(loadAtPointInTime(latest, timeAtCreate.minusMillis(1))).isNull();
    assertThat(loadAtPointInTime(latest, timeAtCreate)).isNotNull();
    assertThat(loadAtPointInTime(latest, timeAtCreate.plusMillis(1))).isNotNull();

    assertAboutImmutableObjects()
        .that(loadAtPointInTime(latest, timeAtCreate.plusDays(1)))
        .isEqualExceptFields(domainAfterCreate, "updateTimestamp");

    // In SQL, we are not limited by the day granularity, so when we request the object
    // at timeAtFirstUpdate we should receive the object at that first update, even though the
    // second update occurred one millisecond later.
    assertAboutImmutableObjects()
        .that(loadAtPointInTime(latest, timeAtFirstUpdate))
        .isEqualExceptFields(domainAfterFirstUpdate, "updateTimestamp");

    assertAboutImmutableObjects()
        .that(loadAtPointInTime(latest, timeAtSecondUpdate))
        .isEqualExceptFields(domainAfterSecondUpdate, "updateTimestamp");

    assertAboutImmutableObjects()
        .that(loadAtPointInTime(latest, timeAtSecondUpdate.plusDays(1)))
        .isEqualExceptFields(domainAfterSecondUpdate, "updateTimestamp");

    // Deletion time has millisecond granularity due to isActive() check.
    assertThat(loadAtPointInTime(latest, timeAtDelete.minusMillis(1))).isNotNull();
    assertThat(loadAtPointInTime(latest, timeAtDelete)).isNull();
    assertThat(loadAtPointInTime(latest, timeAtDelete.plusMillis(1))).isNull();
  }
}


text: Assyria implementation for Board Game Arena website


text:
"""
The sum of the squares of the first ten natural numbers is,

12 + 22 + ... + 102 = 385
The square of the sum of the first ten natural numbers is,

(1 + 2 + ... + 10)2 = 552 = 3025
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.

Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
"""x = xrange(1, 101)

a = sum(x)

print a*a - sum(i*i for i in x)


text:
<!DOCTYPE frameset SYSTEM "frameset.dtd">
<frameset>
    <predicate lemma="arouse">
        <note>
            Frames file for 'arouse' based on survey of sentences in the WSJ
            corpus.
        </note>

        <roleset id="arouse.01" name="to provoke, stir up" vncls="31.1">
            <roles>
                <role descr="causer" n="0">
                    <vnrole vncls="31.1" vntheta="Cause"/>
                </role>
                <role descr="entity aroused" n="1">
                    <vnrole vncls="31.1" vntheta="Experiencer"/>
                </role>
            </roles>

            <example name="transitive">
                <inflection aspect="ns" form="gerund" person="ns" tense="present" voice="active"/>
                <text>
                    When the hacker moved [*T*-1] , [Mr. Stoll]*-4 moved too , [*-2] calling up other systems managers [*-3] to alert them but keeping his own system open [*-3] to avoid [*-4] arousing suspicion .
                </text>
                <arg n="0">[*-4]</arg>
                <rel>arousing</rel>
                <arg n="1">suspicion</arg>
            </example>

            <example name="inanimate causer">
                <inflection aspect="ns" form="full" person="third" tense="present" voice="active"/>
                <text>
                    `` My impression is that there is n't anything which [*T*-1] arouses our interest at first glance , '' says [*T*-2] an official from Japan 's Ministry of International Trade and Industry .
                </text>
                <arg f="RCL" n="M">which ->  anything</arg>
                <arg n="0">[*T*-1]</arg>
                <rel>arouses</rel>
                <arg n="1">our interest</arg>
                <arg f="TMP" n="M">at first glance</arg>
            </example>

        </roleset>
    </predicate>

    <note>
        frames created by Olga
    </note>

</frameset>


text:
package mx.developerbus.foodbus;

import mx.developerbus.foodbus.gplus.UserGPlus;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class Login_Bus extends Activity{

	public static UserGPlus user;

	private ImageView imgButton;
	private ImageButton btnLogin;
	private TextView txtCuenta;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.splash);

		imgButton = (ImageView)findViewById(R.id.imgBackgroud);
		btnLogin = (ImageButton)findViewById(R.id.btnLogin);
		txtCuenta = (TextView)findViewById(R.id.txt_nocuenta);

		btnLogin.setOnClickListener(login);
		txtCuenta.setOnClickListener(noCuenta);
	}

	OnClickListener login = new OnClickListener() {

		@Override
		public void onClick(View v) {
//			Intent i = new Intent(Login_Bus.this, FoodBus_Main.class);
//			startActivity(i);
			user = new UserGPlus(Login_Bus.this);
			user.start(new Intent(Login_Bus.this, FoodBus_Main.class));
		}
	};

	OnClickListener noCuenta = new OnClickListener() {

		@Override
		public void onClick(View v) {
			Toast.makeText(Login_Bus.this, "Registrate", Toast.LENGTH_SHORT).show();
		}
	};

	@Override
	public void onBackPressed() {
	}

}


text:
as3-experiments
===============


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <TextView
        android:id="@+id/mlog_mid"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/mlog_time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/mlog_rtt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

</LinearLayout>


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

	angular
		.module('greyjays.evaluations')
		.directive('filtreSelect', filtreSelect);

	/**
	 * Affichage d'une liste d'éléments pour filtrer
	 * @desc <filtre-select></filtre-select>
	 * @param {service} PositionService -
	 * @param {module} _
	 */

	/** @ngInject */
	function filtreSelect($rootScope, _) {
		return {
			restrict: 'E',
			scope: {
				items: '=',
				defaultOption: '@',
				filterProperty: '@',
				total: '=',
				chargement: '='
			},
			templateUrl: 'app/components/filtreSelect/filtreSelect.tpl.html',
			link: function(scope) {

				scope.items = scope.items || [];
				scope.itemsOption = [];
				scope.selectedItemId = 0;
				scope.selectedItem = {};

				scope.$watch('items', function(newVals) {
					if (newVals.length > 0) {
						scope.itemsOption = [];
						_.each(newVals, function(item) {
							var myItem = setItem(item);
							scope.itemsOption.push(myItem);
							if (_.contains(scope.$parent.filterData[scope.filterProperty], item.id)) {
								scope.selectedItemId = item.id;
								scope.selectedItem = setItem(item);
							}
						});
					}
				});

				scope.$watch('selectedItemId', function(newVal) {
					if (newVal !== 0) {
						_.each(scope.items, function(item) {
							if (item.id === newVal) {
								scope.selectedItem = setItem(item);
							}
						});
						scope.$parent.filterData[scope.filterProperty].push(newVal);
						$rootScope.$broadcast('filtrerDatas');
					}
				});

				scope.deselectionnerItem = function() {
					scope.selectedItemId = 0;
					scope.selectedItem = {};
					scope.$parent.filterData[scope.filterProperty] = [];
					$rootScope.$broadcast('filtrerDatas');
				};

				var setItem = function(it) {
					if (it.type === 'joueur') {
						return {id: it.id, label: it.prenom + ' ' + it.nom + ' (' + it.date_naissance + ')', type: it.type};
					} else if (it.type === 'position') {
						return {id: it.id, label: it.libelle + ' - ' + it.description, type: it.type};
					} else if (it.type === 'action') {
						return {id: it.id, label: it.libelle, description: it.description, type: it.type};
					}
				};

			}
		};
	}
})();


text:
import { API } from '../../../../api/server';
import { findIntegrationSettings } from '../../../server/api/lib/integrations';

API.v1.addRoute('livechat/integrations.settings', { authRequired: true }, {
	get() {
		const settings = Promise.await(findIntegrationSettings({
			userId: this.userId,
		}));

		return API.v1.success(settings);
	},
});


text:
using System;
using System.ComponentModel;

namespace Nettiers.AdventureWorks.Entities
{
	/// <summary>
	///		The data structure representation of the 'WorkOrder' table via interface.
	/// </summary>
	/// <remarks>
	/// 	This struct is generated by a tool and should never be modified.
	/// </remarks>
	public interface IWorkOrder
	{
		/// <summary>
		/// WorkOrderID : Primary key for WorkOrder records.
		/// </summary>
		/// <remarks>Member of the primary key of the underlying table "WorkOrder"</remarks>
		System.Int32 WorkOrderId { get; set; }

		/// <summary>
		/// ProductID : Product identification number. Foreign key to Product.ProductID.
		/// </summary>
		System.Int32  ProductId  { get; set; }

		/// <summary>
		/// OrderQty : Product quantity to build.
		/// </summary>
		System.Int32  OrderQty  { get; set; }

		/// <summary>
		/// StockedQty : Quantity built and put in inventory.
		/// </summary>
		System.Int32  StockedQty  { get; set; }

		/// <summary>
		/// ScrappedQty : Quantity that failed inspection.
		/// </summary>
		System.Int16  ScrappedQty  { get; set; }

		/// <summary>
		/// StartDate : Work order start date.
		/// </summary>
		System.DateTime  StartDate  { get; set; }

		/// <summary>
		/// EndDate : Work order end date.
		/// </summary>
		System.DateTime?  EndDate  { get; set; }

		/// <summary>
		/// DueDate : Work order due date.
		/// </summary>
		System.DateTime  DueDate  { get; set; }

		/// <summary>
		/// ScrapReasonID : Reason for inspection failure.
		/// </summary>
		System.Int16?  ScrapReasonId  { get; set; }

		/// <summary>
		/// ModifiedDate : Date and time the record was last updated.
		/// </summary>
		System.DateTime  ModifiedDate  { get; set; }

		/// <summary>
		/// Creates a new object that is a copy of the current instance.
		/// </summary>
		/// <returns>A new object that is a copy of this instance.</returns>
		System.Object Clone();

		#region Data Properties

		/// <summary>
		///	Holds a collection of entity objects
		///	which are related to this object through the relation _workOrderRoutingWorkOrderId
		/// </summary>
		TList<WorkOrderRouting> WorkOrderRoutingCollection {  get;  set;}

		#endregion Data Properties

	}
}


text:
dynamicfitness
==============


text:
<?php

final class PhabricatorTaskmasterDaemonModule
  extends PhutilDaemonOverseerModule {

  public function shouldWakePool(PhutilDaemonPool $pool) {
    $class = $pool->getPoolDaemonClass();

    if ($class != 'PhabricatorTaskmasterDaemon') {
      return false;
    }

    if ($this->shouldThrottle($class, 1)) {
      return false;
    }

    $table = new PhabricatorWorkerActiveTask();
    $conn = $table->establishConnection('r');

    $row = queryfx_one(
      $conn,
      'SELECT id FROM %T WHERE leaseOwner IS NULL
        OR leaseExpires <= %d LIMIT 1',
      $table->getTableName(),
      PhabricatorTime::getNow());
    if (!$row) {
      return false;
    }

    return true;
  }

}


text:
Adds an AWS::Events::Rule.BatchParameters resource property to the template.
The custom parameters to be used when the target is an AWS Batch job.

## SYNTAX

```
Add-VSEventsRuleBatchParameters [[-ArrayProperties] <Object>] [-JobDefinition] <Object> [-JobName] <Object>
 [[-RetryStrategy] <Object>] [<CommonParameters>]
```

## DESCRIPTION
Adds an AWS::Events::Rule.BatchParameters resource property to the template.
The custom parameters to be used when the target is an AWS Batch job.

## PARAMETERS

### -ArrayProperties
The array properties for the submitted job, such as the size of the array.
The array size can be between 2 and 10,000.
If you specify array properties for a job, it becomes an array job.
This parameter is used only if the target is an AWS Batch job.

Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-arrayproperties
Type: BatchArrayProperties
UpdateType: Mutable

```yaml
Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -JobDefinition
The ARN or name of the job definition to use if the event target is an AWS Batch job.
This job definition must already exist.

Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-jobdefinition
PrimitiveType: String
UpdateType: Mutable

```yaml
Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -JobName
The name to use for this execution of the job, if the target is an AWS Batch job.

Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-jobname
PrimitiveType: String
UpdateType: Mutable

```yaml
Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -RetryStrategy
The retry strategy to use for failed jobs, if the target is an AWS Batch job.
The retry strategy is the number of times to retry the failed job execution.
Valid values are 1-10.
When you specify a retry strategy here, it overrides the retry strategy defined in the job definition.

Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html#cfn-events-rule-batchparameters-retrystrategy
Type: BatchRetryStrategy
UpdateType: Mutable

```yaml
Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### Vaporshell.Resource.Events.Rule.BatchParameters
## NOTES

## RELATED LINKS

[http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-batchparameters.html)


text:
package org.atf.core.api;

/**
 * The Class AtfRuntimeException.
 *
 * @author Michal Bocek
 * @since 1.0.0
 */
public class AtfRuntimeException extends RuntimeException {

	private static final long serialVersionUID = -6311767740813341981L;

	/**
	 * Instantiates a new atf runtime exception.
	 *
	 * @param message the message
	 */
	public AtfRuntimeException(String message) {
		super(message);
	}

	/**
	 * Instantiates a new atf runtime exception.
	 *
	 * @param message the message
	 * @param cause the cause
	 */
	public AtfRuntimeException(String message, Throwable cause) {
		super(message, cause);
	}
}


text:
<wicket:panel xmlns:wicket="http://wicket.apache.org">

<wicket:message key="importExport.confirmation.heading" />

<wicket:message key="importExport.confirmation.description" />

<wicket:message key="importExport.confirmation.update.heading" />

                <wicket:message key="importExport.confirmation.title" />
                <wicket:message key="importExport.confirmation.points" />

                    [assignment 1]
                    [50]

<wicket:message key="importExport.confirmation.create.heading" />

                <wicket:message key="importExport.confirmation.title" />
                <wicket:message key="importExport.confirmation.points" />

                    [assignment 1]
                    [50]

<wicket:message key="importExport.confirmation.modify.heading" />

                <wicket:message key="importExport.confirmation.title" />
                <wicket:message key="importExport.confirmation.points" />

                    [assignment 1]
                    [50]

    <form wicket:id="form">

            <input type="submit" wicket:id="backbutton" wicket:message="value:importExport.button.back"/>
            <input class="active" type="submit" wicket:id="finishbutton" wicket:message="value:importExport.button.finish"/>

    </form>

</wicket:panel>


text:
require 'common/retryable'
require_relative './artifact'

module Bosh::Dev
  class VerifyMultidigestManager

    REPO_ROOT = File.expand_path('../../../../', File.dirname(__FILE__))
    INSTALL_DIR = File.join('tmp', 'verify-multidigest')
    BUCKET_NAME = 'verify-multidigest'

    VERSION = '0.0.29'
    DARWIN_SHA256 = 'cb5c51d6912f829d482e0a52aeef0286c646f48c07bd2aecfe3969ddcb44c6dc'
    LINUX_SHA256 = '0a4f79232cf7752712c8825624ef78da6de5dbc56c809324c24d614fbb9e3990'

    INFO = Artifact::Info.new('verify-multidigest', VERSION, DARWIN_SHA256, LINUX_SHA256, BUCKET_NAME)
    INSTALLER = Artifact::Installer.new(INFO, INSTALL_DIR, 'verify-multidigest')

    def self.install
      INSTALLER.install
    end

    def self.executable_path
      INSTALLER.executable_path
    end
  end
end


text:
import { Jobs } from '../../../both/collections/jobs.collection';
import { Meteor } from 'meteor/meteor';

Meteor.publish('jobs', function() {
  return Jobs.find(buildQuery.call(this));
});

Meteor.publish('job', function(jobId: string) {
  return Jobs.find(buildQuery.call(this, jobId));
});

function buildQuery(jobId?: string): Object {
  const isAvailable = {
    $or: [{
      public: true
    }]
  };

  if (jobId) {
    return {
      // only single party
      $and: [{
          _id: jobId
        },
        isAvailable
      ]
    };
  }

  return isAvailable;
}


text: This project is used to solve binary search relative problem in column 4.


text:
// Flow has to ignore this file because of the recursion in builderOperationStringHelper()
import Nodes from './Nodes';
import FilterString from './FilterString';

class Helpers {
  /**
   * Gets all the fields from a table or join node
   *
   * @param node  Table or join node
   */
  static getFieldsFromNode(node) {
    const { type, table, name, nodes } = node;

    return nodes.filter(x => x.type === Nodes.FIELD).map(x => ({
      ...x,
      name: type === Nodes.JOIN ? `${table}.${x.name}` : `${name}.${x.name}`
    }));
  }

  /**
   * Returns anything that can be identified as a "field" in an operator tree
   * Careful – any text that doesn't conform to a set grammar can be identified as a field
   * Better to keep your selectors simple for now
   *
   * @param node          Base node of operator tree
   * @param variables     Variables passed to query
   * @param initial       Initial array to add values to
   * @returns {*}
   */
  static getFieldsFromOperationString(node, variables, initial) {
    if (node.type === Nodes.OPERATION) {
      const a = node.a;

      initial = [
        ...initial,
        ...this.getFieldsFromOperationString(a, variables, initial)
      ];

      return initial;
    } else if (node.type === Nodes.VARIABLE) {
      return [variables[node]];
    } else {
      return [node];
    }
  }

  /**
   * Gets the whole recursion thing for buildOperationStringHelper going
   * @param docroot
   * @param table
   * @param node
   * @param variables
   * @returns {{text, variables}}
   */
  static buildFilterString(docroot, table, node, variables, aliases, flavor) {
    return new FilterString(
      docroot,
      table,
      node,
      variables,
      aliases,
      flavor
    ).toString();
  }

  /**
   * Applies a WHERE statement to a QueryBuilder object
   *
   * @param node  Table node
   * @param qb
   */
  static applyWhereStatement(docroot, node, variables, qb) {
    // Get the name and parameters associated with the table
    const { params } = node;

    // From the parameters, create an operator tree and generate
    // an array of selector strings to use in the WHERE() call
    const selectors = params.map(x =>
      Helpers.buildFilterString(docroot, null, x, variables, [], qb.flavour)
    );

    // If the user has included selectors, add those too
    if (selectors.length > 0) {
      qb = qb.where(
        selectors.map(x => x.text).join(' AND '),
        ...selectors.map(x => x.variables).reduce((a, b) => a.concat(b))
      );
    }
  }
  /**
   * Interpolates variables into strings using '?' like Squel does
   *
   * @param string        String containing '?''s
   * @param variables     Array of variables
   * @returns {*}
   */
  static interpolateVariables(string, variables) {
    // Matches all standalone question marks (?) in a string
    const regex = /(\s+\?\s+)|(^\?\s+)|(\s+\?$)/g;

    // Define an iterator to know which match we're on
    let iterator = 0;

    // Index of the last matched question mark
    let last_index = 0;

    // Our final message
    let message = '';

    // Match the first question mark
    let match = regex.exec(string);

    // Recursively match all question marks in the string
    while (match !== null) {
      // Get the variable at that index
      let v = variables[iterator];

      // If there isn't a variable available, error
      if (typeof v === 'undefined')
        throw new Error('Missing variable. Cannot interpolate.');

      // Replace the question mark with the variable value
      message += `${string.substring(last_index, match.index)} ${v}`;

      // Increment the last index
      last_index = match.index + (match.index === 0 ? 1 : 2);

      // Increment the iterator
      iterator++;

      // Match the next question mark
      match = regex.exec(string);
    }

    // Append the rest of the string, whatever that may be
    message += string.substring(last_index, string.length);

    return message;
  }
}

export default Helpers;


text:
using NHibernateRepo.Migrations;
using NHibernateRepo.Repos;

namespace NHibernateRepo.Configuration
{
    public abstract class RepoMigrationConfigurationBaseNoneGeneric
    {
        public bool Enabled { get; protected set; }
        public MigrationToUse MigrationType { get; protected set; }
        public string RootMigrationFolder { get; protected set; }
    }

    public abstract class RepoMigrationConfigurationBase<T> : RepoMigrationConfigurationBaseNoneGeneric
        where T : BaseRepo
    {

    }

}


text:
#! /usr/bin/env node

import _ from 'lodash';
import Promise from 'bluebird';
import gulp from 'gulp';
import yargs from 'yargs';
import pragmatist from './..';

let argv,
    executeTaskNames,
    knownTaskNames;

argv = yargs
    .demand(1)
    .options({
        es5: {
            description: 'Uses es2015 Babel preset for the build.',
            type: 'boolean'
        },
        notifications: {
            description: 'Sends a notification to the OS if an error occurs.',
            type: 'boolean'
        },
        'type-assertions': {
            description: 'Inlines runtime type assertions for the type annotations.',
            type: 'boolean'
        }
    })
    .argv;

pragmatist(gulp, {
    es5: argv.es5,
    forceLogging: true,
    notifications: argv.notifications,
    prefix: 'pragmatist:',
    typeAssertions: argv.typeAssertions
});

knownTaskNames = _.keys(gulp.tasks);
executeTaskNames = argv._;

Promise
    .resolve(executeTaskNames)
    /* eslint-disable lodash3/prefer-lodash-method */
    .map((taskName) => {
    /* eslint-enable lodash3/prefer-lodash-method */
        let executeTaskName;

        executeTaskName = 'pragmatist:' + taskName;

        if (_.indexOf(knownTaskNames, executeTaskName) === -1) {
            throw new Error('"' + executeTaskName + '" task does not exist.');
        }

        return new Promise((resolve) => {
            gulp
                .start(executeTaskName)
                .on('task_stop', () => {
                    resolve();
                });
        });
    }, {
        concurrency: 1
    });


text:
FROM registry.aliyuncs.com/acs-sample/jenkins-slave-dind-java:0.1

ENV GRADLE_VERSION 2.6

WORKDIR /usr/bin
RUN curl -sLO https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip && \
  unzip gradle-${GRADLE_VERSION}-all.zip && \
  ln -s gradle-${GRADLE_VERSION} gradle && \
  rm gradle-${GRADLE_VERSION}-all.zip

ENV GRADLE_HOME /usr/bin/gradle
ENV PATH $PATH:$GRADLE_HOME/bin

CMD ["/usr/sbin/sshd", "-D"]