text:
namespace edb
{

class PackParticle3D : public ICommand
{
public:
	PackParticle3D() {}

	//
	// interface ICommand
	//
	virtual std::string Command() const override;
	virtual std::string Description() const override;
	virtual std::string Usage() const override;
	virtual int Run(int argc, char *argv[]) override;

	static ICommand* Create() { return new PackParticle3D(); }

private:
	void Trigger(const std::string& dir, const std::string& out);

}; // PackParticle3D

}

#endif // _EASYDB_PACK_PARTICLE3D_H_


text:
package ninja.test.db;

import javax.persistence.EntityTransaction;
import java.io.Closeable;
import java.io.IOException;

public class Transaction implements Closeable {

    private EntityTransaction entityTransaction;

    public Transaction(EntityTransaction entityTransaction) {
        this.entityTransaction = entityTransaction;
        this.entityTransaction.begin();
    }

    @Override
    public void close() throws IOException {
        this.entityTransaction.commit();
    }
}

redpajama_set_name: RedPajamaGithub


text:
import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException{

        Scanner s = new Scanner(System.in);

        int num1 = s.nextInt();
        int num2 = s.nextInt();
        int num3 = s.nextInt();
        int num4 = s.nextInt();

        int diferenca = num1 * num2 - num3 * num4;

        System.out.println("DIFERENCA = " + diferenca);

    }
}


text:
module SiteAnalyzer
  require 'robotstxt'
  require 'open-uri'
  require 'timeout'
  # Create site object with all scans
  class Site
    attr_reader :main_url, :pages, :pages_for_scan, :max_pages, :scanned_pages
    def initialize(url, max_pages = 10, use_robot_txt = false)
      Stringex::Localization.default_locale = :en
      @main_url = url
      @pages = []
      @use_robot_txt = use_robot_txt
      @scanned_pages = []
      @pages_for_scan = []
      @max_pages = max_pages - 1
      @pages << Page.new(convert_to_valid(@main_url))
      scan_site!
    end
    # check if page blocked by robot txt
    def robot_txt_allowed?(url)
      if @use_robot_txt
        Robotstxt.allowed?(url, '*') rescue nil
      else
        true
      end
    end
    # scan pages: add page to scan, if still can scan do it, add new pages for scan from it and optimize massive of links
    def scan_site!
      add_pages_for_scan!
      while @pages_for_scan.size > 0
        page = convert_to_valid @pages_for_scan.pop
        next unless page
        @max_pages -= 1
        add_page convert_to_valid(page)
        return if @max_pages <= 0
        add_pages_for_scan!
        optimize_scan!
      end
    end
    # add pages for scan array, also add bad pages to bad_pages array
    def add_pages_for_scan!
      @pages_for_scan = []
      @bad_pages = []
      @pages.each do |page|
        @bad_pages << page.page_url unless page.page_a_tags
        next unless page.page_a_tags
        page.home_a.each do |link|
          @pages_for_scan << link
        end
      end
    end
    # create Page and add to to site
    def add_page(url)
      unless robot_txt_allowed?(url)
        @scanned_pages << url
        return nil
      end
      page = Page.new(url)
      @pages << page
      @scanned_pages << url
    end
    # get all titles on site and return array of them
    def all_titles
      result = []
      @pages.each do |page|
        result << [page.page_url, page.all_titles] if page.page_a_tags
      end
      result
    end
    # get all meta description tags content and return it as array
    def all_descriptions
      result = []
      @pages.each do |page|
        result << [page.page_url, page.meta_desc_content] if page.page_a_tags
      end
      result
    end
    # get all h2 tags and return array of it
    def all_h2
      result = []
      @pages.each do |page|
        result << [page.page_url, page.h2_text] unless page.page_a_tags
      end
      result
    end
    # get all a tags and return array of it
    def all_a
      result = []
      @pages.each do |page|
        next unless page.page_a_tags
        page.page_a_tags.compact.each do |tag|
          tag[0] = '-' unless tag[0]
          tag[1] = '-' unless tag[1]
          tag[2] = '-' unless tag[2]
          result << [page.page_url, tag[0], tag[1], tag[2]]
        end
      end
      result.compact
    end
    # get all non HLU url and return array
    def bad_urls
      result = []
      @pages.each do |page|
        result << page.hlu
      end
      result.compact!
    end
    # get new array pages for scan and compact it
    def optimize_scan!
      @pages_for_scan = @pages_for_scan.compact.uniq
      @scanned_pages = @scanned_pages.compact.uniq
      @pages_for_scan -= @scanned_pages
    end
    # check url and try to convert it to valid, remove .jpg links, add scheme to url
    def convert_to_valid(url)
      return nil if url =~ /.jpg$/i
      url.insert(0, @main_url.first(5)) if url.start_with? '//'
      link = URI(url)
      main_page = URI(@main_url)
      if link && link.scheme && link.scheme.empty?
        link.scheme = main_page.scheme
      elsif link.nil?
        return nil
      end
      if link.scheme =~ /^http/
        request = link.to_s
      else
        request = nil
      end
      request
    rescue
      link
    end
  end
end


text:
describe("ux-runner", function () {

    var events, scenario, doc, logged;

    function charPac(char, len) {
        var str = '';
        while (str.length < len) { str += char; }
        return str;
    }

    function logEvents(events) {
        var depth = 0, e, i = 0, len = events.length, str = '';
        while(i < len) {
            e = events[i];
            if (e.event.match(/start/i)) {
                depth += 1;
            }
            str += charPac("-", depth) + e.event + ":" + e.type + "\n";
            if (e.event.match(/end/i) || e.event.match(/done/i)) {
                depth -= 1;
            }
            i += 1;
        }
        return str;
    }

    function compareStrings(str1, str2) {
        var s1 = str1.split("\n"), s2 = str2.split("\n"), i = 0, len = s1.length;
        while (i < len) {
            if (s1[i] !== s2[i]) {
                s1[i] = '*' + s1[i];
                s2[i] = '*' + s2[i];
            }
            i += 1;
        }
        return {s1:s1.join("\n"), s2:s2.join("\n")};
    }

    beforeEach(function () {
        ux.runner.clearScenarios();
        logged = false;
        window.tmp = {
            log: function () {
                logged = true;
            }
        };
        doc = $('
' +
            'Test 1' +
            'Test 2' +
            '<input type="text" ng-model="testNgValue">' +
            '
'
        );
        ux.runner.config({
            async: false,
            window: {
                $: $,
                jQuery: jQuery,
                angular: angular,
                document: doc
            },
            rootElement: doc// rootElement determines runner's scope.
        });
        ux.runner.onStart = null, // this keeps the renderer from starting.
        ux.runner.dispatcher = {
            events: [],
            dispatch: function (event, step) {
                this.events.push({event: event, type: step && step.type || undefined});
            }
        };
        events = ux.runner.events;
        scenario = ux.runner.addScenario('test1', function (scene, find) {
            scene("test1 scenario", function () {
                find("a:eq(0)").click();
            });
        });
    });

    it("scenario should create a scene", function () {
        ux.runner.run();
        expect(ux.runner.dispatcher.events.length).toBe(17);
    });

    it("runner should fire events in the correct sequence", function () {
        ux.runner.run();
        var str = logEvents(ux.runner.dispatcher.events),
            strings = compareStrings(str,
                "-runner:start:undefined\n" +
                "--runner:stepStart:root\n" +
                "--runner:stepUpdate:root\n" +
                "---runner:stepStart:scenario\n" +
                "---runner:stepUpdate:scenario\n" +
                "----runner:stepStart:scene\n" +
                "----runner:stepUpdate:scene\n" +
                "-----runner:stepStart:step\n" +
                "-----runner:stepUpdate:step\n" +
                "------runner:stepStart:step\n" +
                "------runner:stepUpdate:step\n" +
                "------runner:stepEnd:step\n" +
                "-----runner:stepEnd:step\n" +
                "----runner:stepEnd:scene\n" +
                "---runner:stepEnd:scenario\n" +
                "--runner:stepEnd:root\n" +
                "-runner:done:undefined\n");
        expect(strings.s1).toEqual(strings.s2);
    });

    it("should execute tests against the dom.", function () {
        logged = false;
        ux.runner.run();
        // logged is set when the html element is clicked on.
        expect(logged).toBe(true);
    });

    it("should exit if scenario does not have at least one scene.", function () {
        ux.runner.clearScenarios();
        scenario = ux.runner.addScenario('test1', function (scene, find) {
            // Note this is missing scene on purpose.
            find("a:eq(0)").click();
        });
        ux.runner.run();
        expect(ux.runner.exit).toBe(true);
    });

    describe("sendKeys", function () {
        it("should fire the following sequence of events", function () {
            ux.runner.clearScenarios();
            scenario = ux.runner.addScenario("test 1", function (scene, find) {
                scene("scene 1", function () {
                    find("input").sendKeys("'abc' enter");
                });
            });
            ux.runner.run();
            var str = logEvents(ux.runner.dispatcher.events),
                strings = compareStrings(str,
                    "-runner:start:undefined\n" +
                    "--runner:stepStart:root\n" +
                    "--runner:stepUpdate:root\n" +
                    "---runner:stepStart:scenario\n" +
                    "---runner:stepUpdate:scenario\n" +
                    "----runner:stepStart:scene\n" +
                    "----runner:stepUpdate:scene\n" +
                    "-----runner:stepStart:step\n" +
                    "-----runner:stepUpdate:step\n" +
                    "------runner:stepStart:step\n" +
                    "------runner:stepUpdate:step\n" +
                    "------runner:stepEnd:step\n" +
                    "-----runner:stepEnd:step\n" +
                    "----runner:stepEnd:scene\n" +
                    "---runner:stepEnd:scenario\n" +
                    "--runner:stepEnd:root\n" +
                    "-runner:done:undefined\n");
            expect(strings.s1).toEqual(strings.s2);
        });
    });

    describe("sendMouse", function () {

        it("should fire the correct sequence of events", function () {
            ux.runner.clearScenarios();
            scenario = ux.runner.addScenario("test 1", function (scene, find) {
                scene("scene 1", function () {
                    find("a:eq(1)").sendMouse();
                });
            });
            ux.runner.run();
            var str = logEvents(ux.runner.dispatcher.events),
                strings = compareStrings(str,
                    "-runner:start:undefined\n" +
                    "--runner:stepStart:root\n" +
                    "--runner:stepUpdate:root\n" +
                    "---runner:stepStart:scenario\n" +
                    "---runner:stepUpdate:scenario\n" +
                    "----runner:stepStart:scene\n" +
                    "----runner:stepUpdate:scene\n" +
                    "-----runner:stepStart:step\n" +//find
                    "-----runner:stepUpdate:step\n" +
                    "------runner:stepStart:step\n" +//sendMouse
                    "------runner:stepUpdate:step\n" +
                    "-------runner:stepStart:step\n" +//mouseDown
                    "-------runner:stepUpdate:step\n" +
                    "--------runner:stepStart:step\n" +//mouseUp
                    "--------runner:stepUpdate:step\n" +
                    "---------runner:stepStart:step\n" +//click
                    "---------runner:stepUpdate:step\n" +
                    "---------runner:stepEnd:step\n" +
                    "--------runner:stepEnd:step\n" +
                    "-------runner:stepEnd:step\n" +
                    "------runner:stepEnd:step\n" +
                    "-----runner:stepEnd:step\n" +
                    "----runner:stepEnd:scene\n" +
                    "---runner:stepEnd:scenario\n" +
                    "--runner:stepEnd:root\n" +
                    "-runner:done:undefined\n");
            expect(strings.s1).toEqual(strings.s2);
        });

        it("should fire the correct sequence of events if focus is passed", function () {
            ux.runner.clearScenarios();
            scenario = ux.runner.addScenario("test 1", function (scene, find) {
                scene("scene 1", function () {
                    find("a:eq(1)").sendMouse(true);
                });
            });
            ux.runner.run();

            var str = logEvents(ux.runner.dispatcher.events),
                strings = compareStrings(str,
                    "-runner:start:undefined\n" +
                    "--runner:stepStart:root\n" +
                    "--runner:stepUpdate:root\n" +
                    "---runner:stepStart:scenario\n" +
                    "---runner:stepUpdate:scenario\n" +
                    "----runner:stepStart:scene\n" +
                    "----runner:stepUpdate:scene\n" +
                    "-----runner:stepStart:step\n" +//find
                    "-----runner:stepUpdate:step\n" +
                    "------runner:stepStart:step\n" +//sendMouse
                    "------runner:stepUpdate:step\n" +
                    "-------runner:stepStart:step\n" +//mouseDown
                    "-------runner:stepUpdate:step\n" +
                    "--------runner:stepStart:step\n" +//focus
                    "--------runner:stepUpdate:step\n" +
                    "---------runner:stepStart:step\n" +//mouseUp
                    "---------runner:stepUpdate:step\n" +
                    "----------runner:stepStart:step\n" +//click
                    "----------runner:stepUpdate:step\n" +
                    "----------runner:stepEnd:step\n" +
                    "---------runner:stepEnd:step\n" +
                    "--------runner:stepEnd:step\n" +
                    "-------runner:stepEnd:step\n" +
                    "------runner:stepEnd:step\n" +
                    "-----runner:stepEnd:step\n" +
                    "----runner:stepEnd:scene\n" +
                    "---runner:stepEnd:scenario\n" +
                    "--runner:stepEnd:root\n" +
                    "-runner:done:undefined\n");
            expect(strings.s1).toEqual(strings.s2);
        });
    });

    describe("sendTap", function () {

        it("should fire the correct sequence of events", function () {
            ux.runner.clearScenarios();
            scenario = ux.runner.addScenario("test 1", function (scene, find) {
                scene("scene 1", function () {
                    find("a:eq(1)").sendTap();
                });
            });
            ux.runner.run();
            var str = logEvents(ux.runner.dispatcher.events),
                strings = compareStrings(str,
                    "-runner:start:undefined\n" +
                    "--runner:stepStart:root\n" +
                    "--runner:stepUpdate:root\n" +
                    "---runner:stepStart:scenario\n" +
                    "---runner:stepUpdate:scenario\n" +
                    "----runner:stepStart:scene\n" +
                    "----runner:stepUpdate:scene\n" +
                    "-----runner:stepStart:step\n" +//find
                    "-----runner:stepUpdate:step\n" +
                    "------runner:stepStart:step\n" +//touchStart
                    "------runner:stepUpdate:step\n" +
                    "-------runner:stepStart:step\n" +//touchEnd
                    "-------runner:stepUpdate:step\n" +
                    "--------runner:stepStart:step\n" +//touchCancel
                    "--------runner:stepUpdate:step\n" +
                    "---------runner:stepStart:step\n" +//click
                    "---------runner:stepUpdate:step\n" +
                    "----------runner:stepStart:step\n" +//?
                    "----------runner:stepUpdate:step\n" +
                    "----------runner:stepEnd:step\n" +
                    "---------runner:stepEnd:step\n" +
                    "--------runner:stepEnd:step\n" +
                    "-------runner:stepEnd:step\n" +
                    "------runner:stepEnd:step\n" +
                    "-----runner:stepEnd:step\n" +
                    "----runner:stepEnd:scene\n" +
                    "---runner:stepEnd:scenario\n" +
                    "--runner:stepEnd:root\n" +
                    "-runner:done:undefined\n");
            expect(strings.s1).toEqual(strings.s2);
        });

        it("should fire the correct sequence of events if focus is passed", function () {
            ux.runner.clearScenarios();
            scenario = ux.runner.addScenario("test 1", function (scene, find) {
                scene("scene 1", function () {
                    find("a:eq(1)").sendTap(true);
                });
            });
            ux.runner.run();
            var str = logEvents(ux.runner.dispatcher.events),
                strings = compareStrings(str,
                    "-runner:start:undefined\n" +
                    "--runner:stepStart:root\n" +
                    "--runner:stepUpdate:root\n" +
                    "---runner:stepStart:scenario\n" +
                    "---runner:stepUpdate:scenario\n" +
                    "----runner:stepStart:scene\n" +
                    "----runner:stepUpdate:scene\n" +
                    "-----runner:stepStart:step\n" +//find
                    "-----runner:stepUpdate:step\n" +
                    "------runner:stepStart:step\n" +//touchStart
                    "------runner:stepUpdate:step\n" +
                    "-------runner:stepStart:step\n" +//focus
                    "-------runner:stepUpdate:step\n" +
                    "--------runner:stepStart:step\n" +//touchEnd
                    "--------runner:stepUpdate:step\n" +
                    "---------runner:stepStart:step\n" +//touchCancel
                    "---------runner:stepUpdate:step\n" +
                    "----------runner:stepStart:step\n" +//click
                    "----------runner:stepUpdate:step\n" +
                    "-----------runner:stepStart:step\n" +//?
                    "-----------runner:stepUpdate:step\n" +
                    "-----------runner:stepEnd:step\n" +
                    "----------runner:stepEnd:step\n" +
                    "---------runner:stepEnd:step\n" +
                    "--------runner:stepEnd:step\n" +
                    "-------runner:stepEnd:step\n" +
                    "------runner:stepEnd:step\n" +
                    "-----runner:stepEnd:step\n" +
                    "----runner:stepEnd:scene\n" +
                    "---runner:stepEnd:scenario\n" +
                    "--runner:stepEnd:root\n" +
                    "-runner:done:undefined\n");
            expect(strings.s1).toEqual(strings.s2);
        });
    });
});


text:
- [#1](https://github.com/LaxarJS/ax-slider-control/issues/1): updated LaxarJS dependency and added contribution information

## v1.0.0-alpha.0


text:
package io.gatling.recorder.http

import java.net.InetSocketAddress
import java.util.concurrent.TimeUnit

import io.gatling.recorder.config.RecorderConfiguration
import io.gatling.recorder.controller.RecorderController
import io.gatling.recorder.http.channel.BootstrapFactory._
import io.gatling.recorder.http.ssl.SslServerContext

import com.typesafe.scalalogging.StrictLogging
import io.netty.channel.nio.NioEventLoopGroup
import io.netty.channel.group.DefaultChannelGroup
import io.netty.util.concurrent.GlobalEventExecutor

private[recorder] case class HttpProxy(controller: RecorderController)(implicit config: RecorderConfiguration) extends StrictLogging {

  def outgoingProxy =
    for {
      host <- config.proxy.outgoing.host
      port <- config.proxy.outgoing.port
    } yield (host, port)

  def outgoingUsername = config.proxy.outgoing.username
  def outgoingPassword = config.proxy.outgoing.password

  private val clientGroup = new NioEventLoopGroup
  private val serverBossGroup = new NioEventLoopGroup(1)
  private val serverWorkerGroup = new NioEventLoopGroup
  private val group = new DefaultChannelGroup("Gatling_Recorder", GlobalEventExecutor.INSTANCE)

  val userBootstrap = newUserBootstrap(serverBossGroup, serverWorkerGroup, this, config) // covers both http and https
  group.add(userBootstrap.bind(new InetSocketAddress(config.proxy.port)).sync.channel)

  val remoteBootstrap = newRemoteBootstrap(clientGroup, ssl = false, config)
  val secureRemoteBootstrap = newRemoteBootstrap(clientGroup, ssl = true, config)
  val sslServerContext = SslServerContext(config)

  def shutdown(): Unit = {
    group.close.awaitUninterruptibly
    clientGroup.shutdownGracefully(0, 2, TimeUnit.SECONDS)
    serverBossGroup.shutdownGracefully(0, 2, TimeUnit.SECONDS)
    serverWorkerGroup.shutdownGracefully(0, 2, TimeUnit.SECONDS)
  }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Hostel Leave</title>

   <link href="../../static/student/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <link href="../../static/student/bower_components/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <link href="../../static/student/dist/css/sb-admin-2.css" rel="stylesheet">

    <link href="../../static/student/bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    Toggle navigation

                </button>
                {{ msg }}

 My Profile

 Change Password

 Logout

                            Search

                            View Complain

                            Lodge Complain

                             Rate Secretary

                             Hostel Leaving Info

                                    Previous Forms

                                    Fill New Form

                              Mess Poll

                                    Polling

                                    Poll Result

Hostel Leave

                            Fill Out This Form

                             <form name="input" method="POST" action="/submitHostelPage/">

Default Information

                                        <fieldset disabled="">

                                                Name
                                                <input  id="disabledInput" class="form-control" type="text" value="{{list.name}}" placeholder="{{name}}">

                                                    Hostel
                                                    <input class="form-control" name="hostel"
                                                    value=  "{% if item.hostel == 1 %} Ashoka
                                                             {% elif item.hostel == 2 %} Aryabhatta
                                                             {% elif item.hostel == 3 %} Chanakya 1
                                                             {% elif item.hostel == 4 %} Chanakya 2
                                                             {% endif %}">

                                                    Room
                                                    <input class="form-control" name="room" value="{{list.room}}">

                                                Default Mobile Number
                                                <input class="form-control" name="mnum" value="{{list.mobile}}">

                                        </fieldset>

Editable Information

                                                Start Date  (MM/DD/YYYY)
                                                <input type="date" class="form-control" required value="" id="start_date" name="start_date" placeholder="Select Start date">

                                                End Date  (MM/DD/YYYY)
                                                <input type="date" class="form-control" id="end_date" required value="" name="end_date" placeholder="Select End date">

                                                Leaving Time
                                                <input type="time" class="form-control" required value="" name="time" >

                                                Residing Address during Leave
                                                <textarea class="form-control" name="destination" required value="" placeholder="Place"></textarea>

                                                Reason For Leave
                                                <input class="form-control" name="reason" required value="">

                                                Mobile Number During Absence
                                                <input class="form-control" name="mobile" id="mobile" required value="">

                        			<button type="submit" name="submit" value="Submit" onclick="DateValidate()" class="btn btn-success" style="float: right" >Submit</button>

                        			<button type="reset" value="Cancel" class="btn  btn-danger" style="float: right">Reset</button>

                                </form>


text:
from setuptools import setup, find_packages
import nipapwww

setup(
    name='nipap-www',
    version=nipapwww.__version__,
    description='web frontend for NIPAP',
    author=nipapwww.__author__,
    author_email=nipapwww.__author_email__,
    url=nipapwww.__url__,
    install_requires=[
        "Pylons>=1.0",
        "Jinja2",
        "pynipap",
        "nipap"
    ],
    license=nipapwww.__license__,
#    setup_requires=["PasteScript>=1.6.3"],
    packages=find_packages(exclude=['ez_setup']),
    include_package_data=True,
    test_suite='nose.collector',
    package_data={'nipapwww': ['i18n/*/LC_MESSAGES/*.mo']},
    data_files = [
        ( '/etc/nipap/', [ 'nipap-www.ini', ] ),
        ( '/etc/nipap/www', [ 'nipap-www.wsgi', ] ),
        ( '/var/cache/nipap-www/', [] )
    ],
    #message_extractors={'nipapwww': [
    #        ('**.py', 'python', None),
    #        ('public/**', 'ignore', None)]},
    zip_safe=False,
#    paster_plugins=['PasteScript', 'Pylons'],
    entry_points="""
    [paste.app_factory]
    main = nipapwww.config.middleware:make_app

    [paste.app_install]
    main = pylons.util:PylonsInstaller
    """,
)


text:
- Added support for class names with wildcards in `allowedClasses`. Thanks to [zhangbenber](https://github.com/zhangbenber) for the contribution.

## 2.3.3 (2021-03-19):
- Security fix: `allowedSchemes` and related options did not properly block schemes containing a hyphen, plus sign, period or digit, such as `ms-calculator:`. Thanks to Lukas Euler for pointing out the issue.
- Added a security note about the known risks associated with using the `parser` option, especially `decodeEntities: false`. See the documentation.

## 2.3.2 (2021-01-26):

- Additional fixes for iframe validation exploits. Prevent exploits based on browsers' tolerance of the use of "\" rather than "/" and the presence of whitespace at this point in the URL. Thanks to Ron Masas of [Checkmarx](https://www.checkmarx.com/) for pointing out the issue and writing unit tests.
- Updates README `yarn add` syntax. Thanks to [Tagir Khadshiev](https://github.com/Aspedm) for the contribution.

## 2.3.1 (2021-01-22):
- Uses the standard WHATWG URL parser to stop IDNA (Internationalized Domain Name) attacks on the iframe hostname validator. Thanks to Ron Masas of [Checkmarx](https://www.checkmarx.com/) for pointing out the issue and suggesting the use of the WHATWG parser.

## 2.3.0 (2020-12-16):
- Upgrades `htmlparser2` to new major version `^6.0.0`. Thanks to [Bogdan Chadkin](https://github.com/TrySound) for the contribution.

## 2.2.0 (2020-12-02):
- Adds a note to the README about Typescript support (or the lack-thereof).
- Adds `tel` to the default `allowedSchemes`. Thanks to [Arne Herbots](https://github.com/aHerbots) for this contribution.

## 2.1.2 (2020-11-04):
- Fixes typos and inconsistencies in the README. Thanks to [Eric Lefevre-Ardant](https://github.com/elefevre) for this contribution.

## 2.1.1 (2020-10-21):
- Fixes a bug when using `allowedClasses` with an `'*'` wildcard selector. Thanks to [Clemens Damke](https://github.com/Cortys) for this contribution.
- Updates mocha to 7.x to resolve security warnings.

## 2.1.0 (2020-10-07):
- `sup` added to the default allowed tags list. Thanks to [Julian Lam](https://github.com/julianlam) for the contribution.
- Updates default `allowedTags` README documentation. Thanks to [Marco Arduini](https://github.com/nerfologist) for the contribution.

## 2.0.0 (2020-09-23):
- `nestingLimit` option added.
- Updates ESLint config package and fixes warnings.
- Upgrade `is-plain-object` package with named export. Thanks to [Bogdan Chadkin](https://github.com/TrySound) for the contribution.
- Upgrade `postcss` package and drop Node 11 and Node 13 support (enforced by postcss).

### Backwards compatibility breaks:
- There is no build. You should no longer directly link to a sanitize-html file directly in the browser as it is using modern Javascript that is not fully supported by all major browsers (depending on your definition). You should now include sanitize-html in your project build for this purpose if you have one.
- On the server side, Node.js 10 or higher is required.
- The default `allowedTags` array was updated significantly. This mostly added HTML tags to be more comprehensive by default. You should review your projects and consider the `allowedTags` defaults if you are not already overriding them.

## 2.0.0-rc.2 (2020-09-09):
- Always use existing `has` function rather than duplicating it.

## 2.0.0-rc.1 (2020-08-26):
- Upgrade `klona` package. Thanks to [Bogdan Chadkin](https://github.com/TrySound) for the contribution.

## 2.0.0-beta.2:
- Add `files` to `package.json` to prevent publishing unnecessary files to npm #392. Thanks to [styfle](https://github.com/styfle) for the contribution.
- Removes `iframe` and `nl` from default allowed tags. Adds most innocuous tags to the default `allowedTags` array.
- Fixes a bug when using `transformTags` with out `textFilter`. Thanks to [Andrzej Porebski](https://github.com/andpor) for the help with a failing test.

## 2.0.0-beta:
- Moves the `index.js` file to the project root and removes all build steps within the package. Going forward, it is up to the developer to include sanitize-html in their project builds as-needed. This removes major points of conflict with project code and frees this module to not worry about myriad build-related questions.
- Replaces lodash with utility packages: klona, is-plain-object, deepmerge, escape-string-regexp.
- Makes custom tag transformations less error-prone by escaping frame `innerText`. Thanks to [Mike Samuel](https://github.com/mikesamuel) for the contribution. Prior to this patch, tag transformations which turned an attribute
value into a text node could be vulnerable to code execution.
- Updates code to use modern features including `const`/`let` variable assignment.
- ESLint clean up.
- Updates `is-plain-object` to the 4.x major version.
- Updates `srcset` to the 3.x major version.

Thanks to [Bogdan Chadkin](https://github.com/TrySound) for contributions to this major version update.

## 1.27.5 (2020-09-23):
- Updates README to include ES modules syntax.

## 1.27.4 (2020-08-26):
- Fixes an IE11 regression from using `Array.prototype.includes`, replacing it with `Array.prototype.indexOf`.

## 1.27.3 (2020-08-12):
- Fixes a bug when using `transformTags` with out `textFilter`. Thanks to [Andrzej Porebski](https://github.com/andpor) for the help with a failing test.

## 1.27.2 (2020-07-29):
- Fixes CHANGELOG links. Thanks to [Alex Mayer](https://github.com/amayer5125) for the contribution.
- Replaces `srcset` with `parse-srcset`. Thanks to [Massimiliano Mirra](https://github.com/bard) for the contribution.

## 1.27.1 (2020-07-15):
- Removes the unused chalk dependency.
- Adds configuration for a Github stale bot.
- Replace `xtend` package with native `Object.assign`.

## 1.27.0:
- Adds the `allowedIframeDomains` option. This works similar to `allowedIframeHostnames`, where you would set it to an array of web domains. It would then permit any hostname on those domains to be used in iframe `src` attributes. Thanks to [Stanislav Kravchenko](https://github.com/StanisLove) for the contribution.

## 1.26.0:
- Adds the `option` element to the default `nonTextTagsArray` of tags with contents that aren't meant to be displayed visually as text. This can be overridden with the `nonTextTags` option.

## 1.25.0:
- Adds `enforceHtmlBoundary` option to process code bounded by the `html` tag, discarding any code outside of those tags.
- Migrates to the main lodash package from the per method packages since they are deprecated and cause code duplication. Thanks to [Merceyz](https://github.com/merceyz) for the contribution.
- Adds a warning when `style` and `script` tags are allowed, as they are inherently vulnerable to being used in XSS attacks. That warning can be disabled by including the option `allowVulnerableTags: true` so this choice is knowing and explicit.

## 1.24.0:
- Fixes a bug where self-closing tags resulted in deletion with `disallowedTagsMode: 'escape'` set. Thanks to [Thiago Negri](https://github.com/thiago-negri) for the contribution.
- Adds `abbr` to the default `allowedTags` for better accessibility support. Thanks to [Will Farrell](https://github.com/willfarrell) for the contribution.
- Adds a `mediaChildren` property to the `frame` object in custom filters. This allows you to check for links or other parent tags that contain self-contained media to prevent collapse, regardless of whether there is also text inside. Thanks to [axdg](https://github.com/axdg) for the initial implementation and [Marco Arduini](https://github.com/nerfologist) for a failing test contribution.

## 1.23.0:
- Adds eslint configuration and adds eslint to test script.
- Sets `sideEffects: false` on package.json to allow module bundlers like webpack tree-shake this module and all the dependencies from client build. Thanks to [Egor Voronov](https://github.com/egorvoronov) for the contribution.
- Adds the `tagName` (HTML element name) as a second parameter passed to `textFilter`. Thanks to [Slava](https://github.com/slavaGanzin) for the contribution.

## 1.22.1:
ncreases the patch version of `lodash.mergewith` to enforce an audit fix.

## 1.22.0:
bumped `htmlparser2` dependency to the 4.x series. This fixes longstanding bugs and should cause no bc breaks for this module, since the only bc breaks upstream are in regard to features we don't expose in this module.

## 1.21.1:
fixed issue with bad `main` setting in package.json that broke 1.21.0.

## 1.21.0:
new `disallowedTagsMode` option can be set to `escape` to escape disallowed tags rather than discarding them. Any subtags are handled as usual. If you want to recursively escape them too, you can set `disallowedTagsMode` to `recursiveEscape`. Thanks to Yehonatan Zecharia for this contribution.

## 1.20.1:
Fix failing tests, add CircleCI config

## 1.20.0:
reduced size of npm package via the `files` key; we only need to publish what's in `dist`. Thanks to Steven. There should be zero impact on behavior, minor version bump is precautionary.

## 1.19.3:
reverted to `postcss` due to a [reported issue with `css-tree` that might or might not have XSS implications](https://github.com/punkave/sanitize-html/issues/269).

## 1.19.2:

* Switched out the heavy `postcss` dependency for the lightweight `css-tree` module. No API changes. Thanks to Justin Braithwaite.
* Various doc updates. Thanks to Pulkit Aggarwal and Cody Robertson.

## 1.19.1:

* `"` characters are now entity-escaped only when they appear in attribute values, reducing the verbosity of the resulting markup.

* Fixed a regression introduced in version 1.18.5 in the handling of markup that looks similar to a valid entity, but isn't. The bogus entity was passed through intact, i.e. `&0;` did not become `&0;` as it should have. This fix has been made for the default parser settings only. There is no fix yet for those who wish to enable `decodeEntities: false`. That will require improving the alternative encoder in the `escapeHtml` function to only pass 100% valid entities.

**For those using the default `parser` settings this bug is fixed.** Read on if you are using alternative `parser` settings.

When `decodeEntities: true` is in effect (the default), this is not a problem because we only have to encode `& < > "` and we always encode those things.

There is currently a commented-out test which verifies one example of the problem when `decodeEntities` is false. However a correct implementation would need to not only pass that simple example but correctly escape all invalid entities, and not escape those that are valid.

## 1.19.0:

* New `allowIframeRelativeUrls` option. It defaults to `true` unless `allowedIframeHostnames` is present, in which case it defaults to false, for backwards compatibility with existing behavior in both cases; however you can now set the option explicitly to allow both certain hostnames and relative URLs. Thanks to Rick Martin.

## 1.18.5:

* Stop double encoding ampersands on HTML entities. Thanks to Will Gibson.

## 1.18.4:

* Removed incorrect `browser` key, restoring frontend build. Thanks to Felix Becker.

## 1.18.3:

* `iframe` is an allowed tag by default, to better facilitate typical use cases and the use of the `allowedIframeHostnames` option.
* Documentation improvements.
* More browser packaging improvements.
* Protocol-relative URLs are properly supported for iframe tags.

## 1.18.2:

* Travis tests passing.
* Fixed another case issue — and instituted Travis CI testing so this doesn't happen again. Sorry for the hassle.

## 1.18.1:

* A file was required with incorrect case, breaking the library on case sensitive filesystems such as Linux. Fixed.

## 1.18.0:

* The new `allowedSchemesAppliedToAttributes` option. This determines which attributes are validated as URLs, replacing the old hardcoded list of `src` and `href` only. The default list now includes `cite`. Thanks to ml-dublin for this contribution.
* It is now easy to configure a specific list of allowed values for an attribute. When configuring `allowedAttributes`, rather than listing an attribute name, simply list an object with an attribute `name` property and an allowed `values` array property. You can also add `multiple: true` to allow multiple space-separated allowed values in the attribute, otherwise the attribute must match one and only one of the allowed values. Thanks again to ml-dublin for this contribution.
* Fixed a bug in the npm test procedure.

## 1.17.0:
The new `allowedIframeHostnames` option. If present, this must be an array, and only iframe `src` URLs hostnames (complete hostnames; domain name matches are not enough) that appear on this list are allowed. You must also configure `hostname` as an allowed attribute for `iframe`. Thanks to Ryan Verys for this contribution.

## 1.16.3:
Don't throw away the browserified versions before publishing them. `prepare` is not a good place to `make clean`, it runs after `prepublish`.

## 1.16.2:
`sanitize-html` is now compiled with `babel`. An npm `prepublish` script takes care of this at `npm publish` time, so the latest code should always be compiled to operate all the way back to ES5 browsers and earlier versions of Node. Thanks to Ayushya Jaiswal.

Please note that running `sanitize-html` in the browser is usually a security hole. Are you trusting the browser? Anyone could bypass that using the network panel. Sanitization is almost always best done on servers and that is the primary use case for this module.

## 1.16.1:
changelog formatting only.

## 1.16.0:
support for sanitizing inline CSS styles, by specifying the allowed attributes and a regular expression for each. Thanks to Cameron Will and Michael Loschiavo.

## 1.15.0:
if configured as an allowed attribute (not the default), check for naughty URLs in `srcset` attributes. Thanks to Mike Samuel for the nudge to do this and to Sindre Sorhus for the `srcset` module.

## 1.14.3:
inadvertent removal of lodash regexp quote dependency in 1.14.2 has been corrected.

## 1.14.2:
protocol-relative URL detection must spot URLs starting with `\\` rather than `//` due to ages-old tolerance features of web browsers, intended for sleepy Windows developers. Thanks to Martin Bajanik.

## 1.14.1:
documented `allowProtocolRelative` option. No code changes from 1.14.0, released a few moments ago.

## 1.14.0:
the new `allowProtocolRelative` option, which is set to `true` by default, allows you to decline to accept URLs that start with `//` and thus point to a different host using the current protocol. If you do **not** want to permit this, set this option to `false`. This is fully backwards compatible because the default behavior is to allow them. Thanks to Luke Bernard.

## 1.13.0:
`transformTags` can now add text to an element that initially had none. Thanks to Dushyant Singh.

## 1.12.0:
option to build for browser-side use. Thanks to Michael Blum.

## 1.11.4:
fixed crash when `__proto__` is a tag name. Now using a safe check for the existence of properties in all cases. Thanks to Andrew Krasichkov.

Fixed XSS attack vector via `textarea` tags (when explicitly allowed). Decided that `script` (obviously) and `style` (due to its own XSS vectors) cannot realistically be afforded any XSS protection if allowed, unless we add a full CSS parser. Thanks again to Andrew Krasichkov.

## 1.11.3:
bumped `htmlparser2` version to address crashing bug in older version. Thanks to e-jigsaw.

## 1.11.2:
fixed README typo that interfered with readability due to markdown issues. No code changes. Thanks to Mikael Korpela. Also improved code block highlighting in README. Thanks to Alex Siman.

## 1.11.1:
fixed a regression introduced in 1.11.0 which caused the closing tag of the parent of a `textarea` tag to be lost. Thanks to Stefano Sala, who contributed the missing test.

## 1.11.0:
added the `nonTextTags` option, with tests.

## 1.10.1:
documentation cleanup. No code changes. Thanks to Rex Schrader.

## 1.10.0:
`allowedAttributes` now allows you to allow attributes for all tags by specifying `*` as the tag name. Thanks to Zdravko Georgiev.

## 1.9.0:
`parser` option allows options to be passed directly to `htmlparser`. Thanks to Danny Scott.

## 1.8.0:

* `transformTags` now accepts the `*` wildcard to transform all tags. Thanks to Jamy Timmermans.

* Text that has been modified by `transformTags` is then passed through `textFilter`. Thanks to Pavlo Yurichuk.

* Content inside `textarea` is discarded if `textarea` is not allowed. I don't know why it took me this long to see that this is just common sense. Thanks to David Frank.

## 1.7.2:
removed `array-includes` dependency in favor of `indexOf`, which is a little more verbose but slightly faster and doesn't require a shim. Thanks again to Joseph Dykstra.

## 1.7.1:
removed lodash dependency, adding lighter dependencies and polyfills in its place. Thanks to Joseph Dykstra.

## 1.7.0:
introduced `allowedSchemesByTag` option. Thanks to Cameron Will.

## 1.6.1:
the string `'undefined'` (as opposed to `undefined`) is perfectly valid text and shouldn't be expressly converted to the empty string.

## 1.6.0:
added `textFilter` option. Thanks to Csaba Palfi.

## 1.5.3:
do not escape special characters inside a script or style element, if they are allowed. This is consistent with the way browsers parse them; nothing closes them except the appropriate closing tag for the entire element. Of course, this only comes into play if you actually choose to allow those tags. Thanks to aletorrado.

## 1.5.2:
guard checks for allowed attributes correctly to avoid an undefined property error. Thanks to Zeke.

## 1.5.1:
updated to htmlparser2 1.8.x. Started using the `decodeEntities` option, which allows us to pass our filter evasion tests without the need to recursively invoke the filter.

## 1.5.0:
support for `*` wildcards in allowedAttributes. With tests. Thanks to Calvin Montgomery.

## 1.4.3:
invokes itself recursively until the markup stops changing to guard against [this issue](https://github.com/fb55/htmlparser2/issues/105). Bump to htmlparser2 version 3.7.x.

## 1.4.1, 1.4.2:
more tests.

## 1.4.0:
ability to  allow all attributes or tags through by setting `allowedAttributes` and/or `allowedTags` to false. Thanks to Anand Thakker.

## 1.3.0:
`attribs` now available on frames passed to exclusive filter.

## 1.2.3:
fixed another possible XSS attack vector; no definitive exploit was found but it looks possible. [See this issue.](https://github.com/punkave/sanitize-html/pull/20) Thanks to Jim O'Brien.

## 1.2.2:
reject `javascript:` URLs when disguised with an internal comment. This is probably not respected by browsers anyway except when inside an XML data island element, which you almost certainly are not allowing in your `allowedTags`, but we aim to be thorough. Thanks to Jim O'Brien.

## 1.2.1:
fixed crashing bug when presented with bad markup. The bug was in the `exclusiveFilter` mechanism. Unit test added. Thanks to Ilya Kantor for catching it.

## 1.2.0:
* The `allowedClasses` option now allows you to permit CSS classes in a fine-grained way.

* Text passed to your `exclusiveFilter` function now includes the text of child elements, making it more useful for identifying elements that truly lack any inner text.

## 1.1.7:
use `he` for entity decoding, because it is more actively maintained.

## 1.1.6:
`allowedSchemes` option for those who want to permit `data` URLs and such.

## 1.1.5:
just a packaging thing.

## 1.1.4:
custom exclusion filter.

## 1.1.3:
moved to lodash. 1.1.2 pointed to the wrong version of lodash.

## 1.1.0:
the `transformTags` option was added. Thanks to [kl3ryk](https://github.com/kl3ryk).

## 1.0.3:
fixed several more javascript URL attack vectors after [studying the XSS filter evasion cheat sheet](https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet) to better understand my enemy. Whitespace characters (codes from 0 to 32), which browsers ignore in URLs in certain cases allowing the "javascript" scheme to be snuck in, are now stripped out when checking for naughty URLs. Thanks again to [pinpickle](https://github.com/pinpickle).

## 1.0.2:
fixed a javascript URL attack vector. naughtyHref must entity-decode URLs and also check for mixed-case scheme names. Thanks to [pinpickle](https://github.com/pinpickle).

## 1.0.1:
Doc tweaks.

## 1.0.0:
If the style tag is disallowed, then its content should be dumped, so that it doesn't appear as text. We were already doing this for script tags, however in both cases the content is now preserved if the tag is explicitly allowed.

We're rocking our tests and have been working great in production for months, so: declared 1.0.0 stable.

## 0.1.3:
do not double-escape entities in attributes or text. Turns out the "text" provided by htmlparser2 is already escaped.

## 0.1.2:
packaging error meant it wouldn't install properly.

## 0.1.1:
discard the text of script tags.

## 0.1.0:
initial release.


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="symbol_apostrophe">Απόστροφος</string>
  <string name="symbol_ampersand">Συμπλεκτικό σύμβολο</string>
  <string name="symbol_angle_bracket_left">Σύμβολο \"μικρότερο από\"</string>
  <string name="symbol_angle_bracket_right">Σύμβολο \"μεγαλύτερο από\"</string>
  <string name="symbol_asterisk">Αστερίσκος</string>
  <string name="symbol_at_sign">Παπάκι</string>
  <string name="symbol_backslash">Ανάστροφη κάθετος</string>
  <string name="symbol_bullet">Κουκκίδα</string>
  <string name="symbol_caret">Σύμβολο εκθέτη</string>
  <string name="symbol_cent">Σύμβολο σεντ</string>
  <string name="symbol_colon">Άνω και κάτω τελεία</string>
  <string name="symbol_comma">Κόμμα</string>
  <string name="symbol_copyright">Πνευματικά δικαιώματα</string>
  <string name="symbol_curly_bracket_left">Αριστερό άγκιστρο</string>
  <string name="symbol_curly_bracket_right">Δεξιό άγκιστρο</string>
  <string name="symbol_degree">Σύμβολο μοίρας</string>
  <string name="symbol_division">Σύμβολο διαίρεσης</string>
  <string name="symbol_dollar_sign">Σύμβολο δολαρίου</string>
  <string name="symbol_ellipsis">Αποσιωπητικά</string>
  <string name="symbol_em_dash">Μεγάλη παύλα</string>
  <string name="symbol_en_dash">Παύλα</string>
  <string name="symbol_euro">Σύμβολο ευρώ</string>
  <string name="symbol_exclamation_mark">Θαυμαστικό</string>
  <string name="symbol_grave_accent">Βαρεία</string>
  <string name="symbol_hyphen_minus">Παύλα</string>
  <string name="symbol_low_double_quote">Χαμηλά διπλά εισαγωγικά</string>
  <string name="symbol_multiplication">Σύμβολο πολλαπλασιασμού</string>
  <string name="symbol_new_line">Νέα γραμμή</string>
  <string name="symbol_paragraph_mark">Σημάδι παραγράφου</string>
  <string name="symbol_parenthesis_left">Αριστερή παρένθεση</string>
  <string name="symbol_parenthesis_right">Δεξιά παρένθεση</string>
  <string name="symbol_percent">Σύμβολο ποσοστού</string>
  <string name="symbol_period">Τελεία</string>
  <string name="symbol_pi">πι</string>
  <string name="symbol_pound">Δίεση</string>
  <string name="symbol_pound_sterling">Σύμβολο λίρας στερλίνας</string>
  <string name="symbol_question_mark">Ερωτηματικό</string>
  <string name="symbol_quotation_mark">Εισαγωγικά</string>
  <string name="symbol_registered_trademark">Σήμα κατατεθέν</string>
  <string name="symbol_semicolon">Άνω τελεία</string>
  <string name="symbol_slash">Κάθετος</string>
  <string name="symbol_space">Πλήκτρο διαστήματος</string>
  <string name="symbol_square_bracket_left">Αριστερή αγκύλη</string>
  <string name="symbol_square_bracket_right">Δεξιά αγκύλη</string>
  <string name="symbol_square_root">Τετραγωνική ρίζα</string>
  <string name="symbol_trademark">Εμπορικό σήμα</string>
  <string name="symbol_underscore">Σύμβολο υπογράμμισης</string>
  <string name="symbol_vertical_bar">Κάθετη γραμμή</string>
  <string name="symbol_yen">Σύμβολο γιέν</string>
  <string name="symbol_not_sign">Σύμβολο Not</string>
  <string name="symbol_broken_bar">Διακεκομμένη κάθετο</string>
  <string name="symbol_micro_sign">Σύμβολο Micro</string>
  <string name="symbol_almost_equals">Σχεδόν ίσον με</string>
  <string name="symbol_not_equals">Δεν ισούται με</string>
  <string name="symbol_currency_sign">Σύμβολο νομίσματος</string>
  <string name="symbol_section_sign">Σύμβολο παραγράφου</string>
  <string name="symbol_upwards_arrow">Βέλος προς τα επάνω</string>
  <string name="symbol_leftwards_arrow">Βέλος προς τα αριστερά</string>
  <string name="symbol_rupee">Σύμβολο ρουπίας</string>
  <string name="symbol_black_heart">Μαύρη καρδιά</string>
  <string name="symbol_tilde">Περισπωμένη</string>
  <string name="symbol_equal">Σύμβολο ίσον</string>
  <string name="symbol_won">Σύμβολο νομίσματος ουόν</string>
  <string name="symbol_reference">Σημείο παραπομπής</string>
  <string name="symbol_white_star">Λευκό αστέρι</string>
  <string name="symbol_black_star">Μαύρο αστέρι</string>
  <string name="symbol_white_heart">Λευκή καρδιά</string>
  <string name="symbol_white_circle">Λευκός κύκλος</string>
  <string name="symbol_black_circle">Μαύρος κύκλος</string>
  <string name="symbol_solar">Ηλιακό σύμβολο</string>
  <string name="symbol_bullseye">Γεωμετρικό σύμβολο</string>
  <string name="symbol_white_club_suit">Λευκά χαρτιά σπαθιά</string>
  <string name="symbol_white_spade_suit">Λευκά χαρτιά σπαθιά</string>
  <string name="symbol_white_left_pointing_index">Λευκός δείκτης προς τα αριστερά</string>
  <string name="symbol_white_right_pointing_index">Λευκός δείκτης προς τα δεξιά</string>
  <string name="symbol_circle_left_half_black">Κύκλος με μαύρο αριστερό μισό</string>
  <string name="symbol_circle_right_half_black">Κύκλος με μαύρο δεξιό μισό</string>
  <string name="symbol_white_square">Λευκό τετράγωνο</string>
  <string name="symbol_black_square">Μαύρο τετράγωνο</string>
  <string name="symbol_white_up_pointing_triangle">Λευκό τρίγωνο με κορυφή προς τα επάνω</string>
  <string name="symbol_white_down_pointing_triangle">Λευκό τρίγωνο προς τα κάτω</string>
  <string name="symbol_white_left_pointing_triangle">Λευκό τρίγωνο προς τα αριστερά</string>
  <string name="symbol_white_right_pointing_triangle">Λευκό τρίγωνο με κορυφή δεξιά</string>
  <string name="symbol_white_diamond">Λευκό διαμάντι</string>
  <string name="symbol_quarter_note">Τέταρτο νότας</string>
  <string name="symbol_eighth_note">Οκτέτο νότας</string>
  <string name="symbol_beamed_sixteenth_note">Δέσμη δεκαέξι νότων</string>
  <string name="symbol_female">Θηλυκό σύμβολο</string>
  <string name="symbol_male">Αρσενικό σύμβολο</string>
  <string name="symbol_left_black_lenticular_bracket">Αριστερή μαύρη φακοειδής παρένθεση</string>
  <string name="symbol_right_black_lenticular_bracket">Δεξιά μαύρη φακοειδής παρένθεση</string>
  <string name="symbol_left_corner_bracket">Αριστερή γωνιακή αγκύλη</string>
  <string name="symbol_right_corner_bracket">Δεξιά γωνιακή αγκύλη</string>
  <string name="symbol_rightwards_arrow">Βέλος προς τα δεξιά</string>
  <string name="symbol_downwards_arrow">Βέλος προς τα κάτω</string>
  <string name="symbol_plus_minus_sign">Σύμβολο συν-πλην</string>
  <string name="symbol_liter">Λίτρο</string>
  <string name="symbol_celsius_degree">Βαθμός Κελσίου</string>
  <string name="symbol_fahrenheit_degree">Βαθμός Φαρενάιτ</string>
  <string name="symbol_approximately_equals">Περίπου ίσον</string>
  <string name="symbol_integral">Ολοκλήρωμα</string>
  <string name="symbol_mathematical_left_angle_bracket">Μαθηματική αριστερή αγκύλη με γωνία</string>
  <string name="symbol_mathematical_right_angle_bracket">Μαθηματική δεξιά αγκύλη με γωνία</string>
  <string name="symbol_postal_mark">Ταχυδρομικό σήμα</string>
  <string name="symbol_black_triangle_pointing_up">Μαύρο τρίγωνο που δείχνει προς τα επάνω</string>
  <string name="symbol_black_triangle_pointing_down">Μαύρο τρίγωνο που δείχνει προς τα κάτω</string>
  <string name="symbol_black_suit_of_diamonds">Μαύρο καρό</string>
  <string name="symbol_halfwidth_katakana_middle_dot">Κατακάνα μισογεμάτη μεσαία γραμμή</string>
  <string name="symbol_black_smallsquare">Μικρός μαύρος κύβος</string>
  <string name="symbol_left_angle_bracket">Αριστερή διπλή αγκύλη</string>
  <string name="symbol_right_angle_bracket">Δεξιά διπλή αγκύλη</string>
  <string name="symbol_inverted_exclamation_mark">Αντίστροφο θαυμαστικό</string>
  <string name="symbol_inverted_question_mark">Αντίστροφο ερωτηματικό</string>
  <string name="symbol_won_sign">Σύμβολο νομίσματος ουόν</string>
  <string name="symbol_full_width_comma">Κόμμα πλήρους πλάτους</string>
  <string name="symbol_full_width_exclamation_mark">Θαυμαστικό πλήρους πλάτους</string>
  <string name="symbol_full_width_ideographic_full_stop">Ιδεογραφική τελεία</string>
  <string name="symbol_full_width_question_mark">Ερωτηματικό πλήρους πλάτους</string>
  <string name="symbol_middle_dot">Άνω τελεία</string>
  <string name="symbol_right_double_quotation_mark">Δεξιά διπλά εισαγωγικά</string>
  <string name="symbol_ideographic_comma">Ιδεογραφικό κόμμα</string>
  <string name="symbol_full_width_colon">Άνω και κάτω τελεία πλήρους πλάτους</string>
  <string name="symbol_full_width_semicolon">Άνω τελεία πλήρους πλάτους</string>
  <string name="symbol_full_width_ampersand">Συμπλεκτικό σύμβολο πλήρους πλάτους</string>
  <string name="symbol_full_width_circumflex">Σιρκουμφλέξ πλήρους πλάτους</string>
  <string name="symbol_full_width_tilde">Περισπωμένη πλήρους πλάτους</string>
  <string name="symbol_left_double_quotation_mark">Αριστερά διπλά εισαγωγικά</string>
  <string name="symbol_full_width_left_parenthesis">Αριστερή παρένθεση πλήρους πλάτους</string>
  <string name="symbol_full_width_right_parenthesis">Δεξιά παρένθεση πλήρους πλάτους</string>
  <string name="symbol_full_width_asterisk">Αστερίσκος πλήρους πλάτους</string>
  <string name="symbol_full_width_underscore">Σύμβολο υπογράμμισης πλήρους πλάτους</string>
  <string name="symbol_right_single_quotation_mark">Δεξιά μονά εισαγωγικά</string>
  <string name="symbol_full_width_left_curly_bracket">Αριστερή αγκύλη πλήρους πλάτους</string>
  <string name="symbol_full_width_right_curly_bracket">Δεξιά αγκύλη πλήρους πλάτους</string>
  <string name="symbol_full_width_less_than_sign">Σύμβολο \"μικρότερο από\" πλήρους πλάτους</string>
  <string name="symbol_full_width_greater_than_sign">Σύμβολο \"μεγαλύτερο από\" πλήρους πλάτους</string>
  <string name="symbol_left_single_quotation_mark">Αριστερά μονά εισαγωγικά</string>
</resources>


text:
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ObservationViewMultiselectdropdownComponent } from './observation-view-multiselectdropdown.component';

describe('ObservationViewMultiselectdropdownComponent', () => {
  let component: ObservationViewMultiselectdropdownComponent;
  let fixture: ComponentFixture<ObservationViewMultiselectdropdownComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ObservationViewMultiselectdropdownComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(ObservationViewMultiselectdropdownComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});


text:
'use strict';

// Queries routes use queries controller
var queries = require('../controllers/queries');
var authorization = require('./middlewares/authorization');

// Queries authorization helpers
var hasAuthorization = function(req, res, next) {
	if (req.query.user.id !== req.user.id) {
        return res.send(401, 'User is not authorized');
    }
    next();
};

module.exports = function(app) {

    app.get('/queries', queries.all);
    app.post('/queries', authorization.requiresLogin, queries.create);
    app.get('/queries/:queryId', queries.show);
    app.put('/queries/:queryId', authorization.requiresLogin, hasAuthorization, queries.update);
    app.del('/queries/:queryId', authorization.requiresLogin, hasAuthorization, queries.destroy);

    // Finish with setting up the queryId param
    app.param('queryId', queries.query);
};


text: 表单形式编辑


text:
{{#hasAnnotations}}
{{#annotations}}
- {{{linkedNameWithParameters}}}
{{/annotations}}
{{/hasAnnotations}}

{{>name_summary}}{{{genericParameters}}} = {{{modelType.linkedName}}}


text:
'
' News Articles for DotNetNuke -  http://www.dotnetnuke.com
' Copyright (c) 2002-2007
' by Ventrian ( sales@ventrian.com ) ( http://www.ventrian.com )
'

Imports System.Collections.Specialized

Namespace Ventrian.NewsArticles.Tracking

    Public Class NotificationJob

        Public Article As ArticleInfo
        Public ArticleLink As String
        Public PortalTitle As String

        Public Sub NotifyLinkedSites()

            Try

                Dim links As New StringCollection
                TrackHelper.BuildLinks(Article.Summary, links)
                TrackHelper.BuildLinks(Article.Body, links)

                For Each link As String In links

                    Try

                        Dim pageText As String = TrackHelper.GetPageText(link)

                        If Not (pageText Is Nothing) Then
                            Dim success As Boolean = False

                            Dim objTrackBackProxy As New TrackBackProxy
                            success = objTrackBackProxy.TrackBackPing(pageText, link, Article.Title, ArticleLink, PortalTitle, "")

                            If (success = False) Then
                                ' objEventLog.AddLog("Ping Exception", "Trackback failed ->" & link, DotNetNuke.Common.Globals.GetPortalSettings(), -1, DotNetNuke.Services.Log.EventLog.EventLogController.EventLogType.ADMIN_ALERT)

                                Dim objPingBackProxy As New PingBackProxy
                                objPingBackProxy.Ping(pageText, ArticleLink, link)
                            End If

                        End If

                    Catch
                    End Try

                Next

            Catch
            End Try

        End Sub

    End Class

End Namespace


text:
package sangria.macros.derive

import sangria.execution.FieldTag
import sangria.schema.{Args, Field, PossibleInterface}

sealed trait DeriveObjectSetting[Ctx, Val]

case class ObjectTypeName[Ctx, Val](name: String) extends DeriveObjectSetting[Ctx, Val]
case class ObjectTypeDescription[Ctx, Val](description: String)
    extends DeriveObjectSetting[Ctx, Val]
case class Interfaces[Ctx, Val](interfaces: PossibleInterface[Ctx, Val]*)
    extends DeriveObjectSetting[Ctx, Val]

case class DocumentField[Ctx, Val](
    fieldName: String,
    description: String,
    deprecationReason: Option[String] = None)
    extends DeriveObjectSetting[Ctx, Val]
case class DeprecateField[Ctx, Val](fieldName: String, deprecationReason: String)
    extends DeriveObjectSetting[Ctx, Val]
case class RenameField[Ctx, Val](fieldName: String, graphqlName: String)
    extends DeriveObjectSetting[Ctx, Val]
case class FieldTags[Ctx, Val](fieldName: String, tags: FieldTag*)
    extends DeriveObjectSetting[Ctx, Val]
case class FieldComplexity[Ctx, Val](fieldName: String, complexity: (Ctx, Args, Double) => Double)
    extends DeriveObjectSetting[Ctx, Val]

case class IncludeFields[Ctx, Val](fieldNames: String*) extends DeriveObjectSetting[Ctx, Val]
case class IncludeMethods[Ctx, Val](methodNames: String*) extends DeriveObjectSetting[Ctx, Val]
case class ExcludeFields[Ctx, Val](fieldNames: String*) extends DeriveObjectSetting[Ctx, Val]
case class ReplaceField[Ctx, Val](fieldName: String, field: Field[Ctx, Val])
    extends DeriveObjectSetting[Ctx, Val]
case class AddFields[Ctx, Val](fields: Field[Ctx, Val]*) extends DeriveObjectSetting[Ctx, Val]

case class TransformFieldNames[Ctx, Val](transformer: String => String)
    extends DeriveObjectSetting[Ctx, Val]

case class MethodArgumentRename[Ctx, Val](methodName: String, argName: String, newName: String)
    extends DeriveObjectSetting[Ctx, Val]
case class MethodArgumentDescription[Ctx, Val](
    methodName: String,
    argName: String,
    description: String)
    extends DeriveObjectSetting[Ctx, Val]
case class MethodArgumentsDescription[Ctx, Val](methodName: String, descriptions: (String, String)*)
    extends DeriveObjectSetting[Ctx, Val]
case class MethodArgumentDefault[Ctx, Val, Arg](methodName: String, argName: String, default: Arg)
    extends DeriveObjectSetting[Ctx, Val]
case class MethodArgument[Ctx, Val, Arg](
    methodName: String,
    argName: String,
    description: String,
    default: Arg)
    extends DeriveObjectSetting[Ctx, Val]


text:
The [DataStreamToMongoDB](src/main/java/com/google/cloud/teleport/v2/templates/DataStreamToMongoDB.java) pipeline
ingests data supplied by DataStream, optionally applies a Javascript or Python UDF if supplied
and writes the data to MongoDB collections.

## Getting Started

### Requirements
* Java 11
* Maven
* DataStream stream is created and sending data to storage
* PubSub Subscription exists or GCS Bucket contains data
* MongoDB On premise or Atlas cluster is created and you should have the URI.

### Building Template
This is a Flex Template meaning that the pipeline code will be containerized and the container will be
used to launch the Dataflow pipeline.

#### Building Container Image
* Set environment variables.

```sh
export PROJECT=<my-project>
export IMAGE_NAME=datastream-to-mongodb
export BUCKET_NAME=gs://<bucket-name>
export TARGET_GCR_IMAGE=gcr.io/${PROJECT}/${IMAGE_NAME}
export BASE_CONTAINER_IMAGE=gcr.io/dataflow-templates-base/java11-template-launcher-base
export BASE_CONTAINER_IMAGE_VERSION=latest
export APP_ROOT=/template/${IMAGE_NAME}
export DATAFLOW_JAVA_COMMAND_SPEC=${APP_ROOT}/resources/${IMAGE_NAME}-command-spec.json
export TEMPLATE_IMAGE_SPEC=${BUCKET_NAME}/images/${IMAGE_NAME}-image-spec.json

export TOPIC=projects/${PROJECT}/topics/<topic-name>
export SUBSCRIPTION=projects/${PROJECT}/subscriptions/<subscription-name>

gcloud config set project ${PROJECT}
```

* Build and push image to Google Container Repository

```sh
mvn clean package \
-Dimage=${TARGET_GCR_IMAGE} \
-Dbase-container-image=${BASE_CONTAINER_IMAGE} \
-Dbase-container-image.version=${BASE_CONTAINER_IMAGE_VERSION} \
-Dapp-root=${APP_ROOT} \
-Dcommand-spec=${DATAFLOW_JAVA_COMMAND_SPEC} \
-am -pl ${IMAGE_NAME}
```

#### Creating Image Spec

* Create file in Cloud Storage with path to container image in Google Container Repository.
```sh
echo '{
    "image":"'${TARGET_GCR_IMAGE}'",
    "metadata":{"name":"PubSub CDC to MongoDB",
    "description":"Replicate Pub/Sub Data into MongoDB Collections",
    "parameters":[
        {
            "name":"inputFilePattern",
            "label":"GCS Stream location",
            "helpText":"GCS Stream location",
            "paramType":"TEXT"
        },
        {
            "name":"inputFileFormat",
            "label":"GCS Stream format",
            "helpText":"GCS Stream format",
            "paramType":"TEXT"
        },
        {
            "name":"streamName",
            "label":"Datastream Name",
            "helpText":"Datastream Name",
            "paramType":"TEXT"
        },
        {
            "name":"inputSubscription",
            "label":"PubSub Subscription Name",
            "helpText":"Full subscription reference",
            "paramType":"TEXT"
        },
        {
            "name":"mongoDBUri",
            "label":"MongoDB Connection String",
            "helpText":"MongoDB Connection String",
            "paramType":"TEXT"
        },
        {
            "name":"database",
            "label":"MongoDB Database Name",
            "helpText":"MongoDB Database Name",
            "paramType":"TEXT"
        },
        {
            "name":"collection",
            "label":"MongoDB Collection Name",
            "helpText":"MongoDB Collection Name",
            "paramType":"TEXT"
        },

        {
            "name":"autoscalingAlgorithm","label":"Autoscaling algorithm to use",
            "helpText":"Autoscaling algorithm to use: THROUGHPUT_BASED",
            "paramType":"TEXT",
            "isOptional":true
        },
        {
            "name":"numWorkers","label":"Number of workers Dataflow will start with",
            "helpText":"Number of workers Dataflow will start with",
            "paramType":"TEXT",
            "isOptional":true
        },

        {
            "name":"maxNumWorkers","label":"Maximum number of workers Dataflow job will use",
            "helpText":"Maximum number of workers Dataflow job will use",
            "paramType":"TEXT",
            "isOptional":true
        },
        {
            "name":"workerMachineType","label":"Worker Machine Type to use in Dataflow Job",
            "helpText":"Machine Type to Use: n1-standard-4",
            "paramType":"TEXT",
            "isOptional":true
        }
    ]},
    "sdk_info":{"language":"JAVA"}
}' > image_spec.json
gsutil cp image_spec.json ${TEMPLATE_IMAGE_SPEC}
rm image_spec.json
```

### Testing Template

The template unit tests can be run using:
```sh
mvn test
```

### Executing Template

The template requires the following parameters:
* inputSubscription: PubSub subscription to read from (ie. projects/<project-id>/subscriptions/<subscription-name>)
* outputDatasetTemplate: The name of the dataset or templated logic to extract it (ie. 'prefix_{schema_name}')
* outputTableNameTemplate: The name of the table or templated logic to extract it (ie. 'prefix_{table_name}')
* outputDeadletterTable: Deadletter table for failed inserts in form: project-id:dataset.table

The template has the following optional parameters:
* javascriptTextTransformGcsPath: Gcs path to javascript udf source. Udf will be preferred option for transformation if supplied. Default: null
* javascriptTextTransformFunctionName: UDF Javascript Function Name. Default: null

* maxRetryAttempts: Max retry attempts, must be > 0. Default: no retries
* maxRetryDuration: Max retry duration in milliseconds, must be > 0. Default: no retries

Template can be executed using the following API call:
```sh
export JOB_NAME="${IMAGE_NAME}-`date +%Y%m%d-%H%M%S-%N`"
gcloud beta dataflow flex-template run ${JOB_NAME} \
        --project=${PROJECT} --region=us-central1 \
        --template-file-gcs-location=${TEMPLATE_IMAGE_SPEC} \
        --parameters inputSubscription=${SUBSCRIPTION},outputDeadletterTable=${DEADLETTER_TABLE}
```


text:
package com.furkanbayraktar.databinding.exception;

/**
 * Created by Furkan Bayraktar.
 * Created at 8/16/14.
 *
 */
public class ResolverException extends RuntimeException{

    public ResolverException() {
        super("Resolver cannot resolve tag from given object!");
    }

    public ResolverException(String detailMessage) {
        super(detailMessage);
    }

    public ResolverException(String detailMessage, Throwable throwable) {
        super(detailMessage, throwable);
    }

    public ResolverException(Throwable throwable) {
        super("Resolver cannot resolve tag from given object!", throwable);
    }

}