text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.iq80</groupId>
    <artifactId>memcached</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>memcached</name>

    <description>Port of Memcached to Java</description>
    <url>http://github.com/dain/memcached</url>

    <inceptionYear>2009</inceptionYear>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>dain</id>
            <name>Dain Sundstrom</name>
            <email>dain@iq80.com</email>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <scm>
        <connection>scm:git:git://github.com/dain/memcached.git</connection>
        <developerConnection>scm:git:git@github.com:dain/memcached.git</developerConnection>
        <url>http://github.com/dain/memcached/tree/master</url>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>5.8</version>
            <classifier>jdk15</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.netty</groupId>
            <artifactId>netty</artifactId>
            <version>3.1.5.GA</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>create-source-jar</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.3.1</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.5</version>
            </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <version>1.9.0</version>
                <configuration>
                    <header>license-header.txt</header>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <excludes>
                        <exclude>**/README.md</exclude>
                        <exclude>**/memcached-notes.txt</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.2.1</version>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <arguments>-Psonatype-oss-release</arguments>
                    <useReleaseProfile>false</useReleaseProfile>
                    <pushChanges>false</pushChanges>
                    <localCheckout>true</localCheckout>
                    <preparationGoals>clean install</preparationGoals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <useAgent>true</useAgent>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


text:
module FluidSurveys
  module Structure
    class TestSourceObservationV1 < SourceObservationV1
      def self.survey_id
        68883
      end

      def self.survey_type
        :test_source_observation_v1
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
'use strict'
const crypto = require('crypto');
const winston = require("winston");
const path = require('path');
const db = require(path.resolve('./config/lib/sequelize')).models;
const response = require(path.resolve("./config/responses.js"));
const getClientIP = require(path.resolve('./custom_functions/getClientIP'));

const secure_key = process.env.SECURE_KEY; //server side only
const token_valid_time = 96000;         //time window for valid tokens

function generateSha256(data) {
  return crypto.createHash('sha256').update(data).digest('hex');
}

/**
 * @api {get} apiv2/generic/getinternalhashtoken Get hash token
 * @apiVersion 4.0.0
 *
 * @apiName Get hash token
 * @apiGroup Stream key delivery
 *
 * @apiHeader {String} auth Users Authentication token.
 * @apiDescription Implementimi i key delivery per internal encyrption includes the encryption of SHA 256 of:
 *  secure_key + ip + starttime + username (i.e 86c58d6a84d9294249e4f4ea847dcf1344e07402e78ca7de86c4eec7a837a760)
 * @param {string} [startTime] Start time of the request in miliseconds: 1602237403
 *
 * @apiSuccessExample Success-Response:
 *  HTTP/1.1 200 OK
 *     {
 *         "status_code": 200,
 *         "error_code": 1,
 *         "timestamp": 1602246507875,
 *         "error_description": "OK",
 *         "extra_data": "?coid=1&token=bd1ed939e9c47cd273d937f34e0a92e60e90418f981b0eab3e3f122476e6cc46~::1~1602237403~username",
 *         "response_object": []
 *     }
 *
 *
 * @apiErrorExample Error-Response:
 *  HTTP/1.1 500 Internal Server Error
 *   {
 *       "status_code": 888,
 *       "error_code": -1,
 *       "timestamp": 1,
 *       "response_object": []
 *   }
 *
 */
exports.generate_internal_hash_token = function (req, res) {
  try {
    let ip = getClientIP(req);
    let startTime = req.query.startTime || Date.now()
    let username = req.auth_obj.username;
    let data = secure_key + ip + startTime + username;
    const generatedToken = generateSha256(data);
    let token = `?coid=${req.thisuser.company_id}&token=` + generatedToken + "~" + ip + "~" + startTime + "~" + username;

    let response = {
      status_code: 200,
      error_code: 1,
      timestamp: Date.now(),
      error_description: "OK",
      extra_data: token,
      response_object: []
    };

    res.send(response);
  } catch (error) {
    response.send_res(req, res, [], 888, -1, 'ERROR_HASH_DESCRIPTION', 'ERROR_HASH_DESCRIPTION', 'no-store');
  }
};

exports.generate_internal_hash_token_v2 = function (req) {
  try {
    let ip = getClientIP(req);
    let startTime = req.query.startTime || Date.now()
    let username = req.auth_obj.username;
    let data = secure_key + ip + startTime + username;
    const generatedToken = generateSha256(data);

    return `?coid=${req.thisuser.company_id}&token=` + generatedToken + "~" + ip + "~" + startTime + "~" + username;

  } catch (error) {
    winston.error("There was an error with generating internal hash token", error)
    return null;
  }
};

//get request for decryption key test with keyStr: 31313131313131313131313131313131
exports.generate_internal_key_test = function (req, res) {
  const keyStr = "31313131313131313131313131313131";
  req.auth_obj = {};
  if (req.query.token) {
    let queryobject = req.query.token.split("~");

    //if token has more than three objects
    if (queryobject.length >= 3) {
      let timenow = req.query.starttime || Date.now() / 1000 | 0;

      //if time difference lower than limitatino
      if ((timenow - queryobject[2]) < token_valid_time) {
        let ip = req.query.ip || req.ip.replace('::ffff:', '');
        let username = queryobject[3];
        let thishashvalue = generateSha256(secure_key + ip + queryobject[2] + username);

        if (thishashvalue === queryobject[0]) {
          req.auth_obj.username = username;
          req.auth_obj.description = "success key request";

          let keyBuffer = [];
          //res.writeHead(200, { "Content-Type": "binary/octet-stream", "Pragma": "no-cache" });
          res.set({
            "Content-Type": "binary/octet-stream",
            "Pragma": "no-cache"
          })
          for (let i = 0; i < keyStr.length - 1; i += 2) {
            keyBuffer.push(parseInt(keyStr.substr(i, 2), 16));
          }

          const content = String.fromCharCode(...keyBuffer);

          res.send(content); //deliver decryption key
        } else {

          req.auth_obj.username = username;
          req.auth_obj.description = "invalid key request - hash mismatch";

          winston.error('invalid hash');
          res.send('invalid hash');
        }
      } else {
        req.auth_obj.description = "invalid key request - old token"
        res.send('old request');
      }
    } else {
      req.auth_obj.description = "invalid key request - bad token";
      res.send('bad token');
    }
  } else {
    req.auth_obj.description = "invalid key request - no token";
    res.send('no token');
  }
};

/**
 * @api {get} apiv2/generic/getinternalkey Get internal key
 * @apiVersion 4.0.0
 *
 * @apiName GetInternalKey
 * @apiGroup Stream key delivery
 *
 * @apiHeader {String} auth Users Authentication token.
 * @apiDescription Retrieve the encryption key to play streams
 * @param {string} [startTime] Start time of the request in miliseconds: 1602237403
 * @param {string} token Token retrieved from Get hash token (i.e: ?token=bd1ed939e9c47cd273d937f34e0a92e60e90418f981b0eab3e3f122476e6cc46~::1~1602237403~username)
 * @param {number} coid The id of company of logged user
 *
 * @apiSuccessExample Success-Response:
 *  HTTP/1.1 200 OK
 *     1111111111111111
 *
 * @apiErrorExample Error-Response:
 *  HTTP/1.1 200 Internal Server Error
 *    invalid key request - message
 *
 * @apiErrorExample Error-Response:
 *  HTTP/1.1 500 Internal Server Error
 *   Error retrieving key: error
 *
 */
//get request for decryption key from database
exports.generate_internal_key = async (req, res, next) => {
  try {
    const companyId = req.query.coid;
    if (!companyId) {
      return res.send('The company id is required!');
    }
    const advancedSettings = await db.advanced_settings.findOne({
      where: { company_id: companyId }
    });

    if (!advancedSettings || !advancedSettings.data.nimble_drm.key) {
      return res.send('Delivery key is not found on database!');
    }

    const keyStr = advancedSettings.data.nimble_drm.key;
    req.auth_obj = {};
    if (req.query.token) {
      let queryobject = req.query.token.split("~");

      //if token has more than three objects
      if (queryobject.length >= 3) {
        let timenow = req.query.starttime || Date.now() / 1000 | 0;

        //if time difference lower than limitatino
        if ((timenow - queryobject[2]) < token_valid_time) {
          let ip = getClientIP(req);
          let username = queryobject[3];
          let thishashvalue = generateSha256(secure_key + ip + queryobject[2] + username);

          if (thishashvalue === queryobject[0]) {
            req.auth_obj.username = username;
            req.auth_obj.description = "success key request";

            let keyBuffer = [];
            //res.writeHead(200, { "Content-Type": "application/octet-stream", "Pragma": "no-cache" });
            res.set({
              "Content-Type": "application/octet-stream",
              "Pragma": "no-cache"
            })
            for (let i = 0; i < keyStr.length - 1; i += 2) {
              keyBuffer.push(parseInt(keyStr.substr(i, 2), 16));
            }

            const content = String.fromCharCode.apply(String, keyBuffer);

            res.end(content); //deliver decryption key
          } else {

            req.auth_obj.username = username;
            req.auth_obj.description = "invalid key request - hash mismatch";

            res.send('invalid hash');
          }
        } else {
          req.auth_obj.description = "invalid key request - old token"
          res.send('old request');
        }
      } else {
        req.auth_obj.description = "invalid key request - bad token";
        res.send('bad token');
      }
    } else {
      req.auth_obj.description = "invalid key request - no token";
      res.send('no token');
    }
  } catch (error) {
    winston.error('invalid hash retrieving key', error);
    next(error)
  }
};

exports.testInternalKey = async (req, res, next) => {
  try {
    const advancedSettings = await db.advanced_settings.findOne({
      where: { company_id: 1 }
    });

    if (!advancedSettings || !advancedSettings.data.nimble_drm.key) {
      return res.send('Delivery key is not found on database!');
    }

    const keyStr = advancedSettings.data.nimble_drm.key || '31313131313131313131313131313131';
    var keyBuffer = [];
    res.writeHead(200, { "Content-Type": "binary/octet-stream", "Pragma": "no-cache" });
    for (var i = 0; i < keyStr.length - 1; i += 2)
      keyBuffer.push(parseInt(keyStr.substr(i, 2), 16));
    var content = String.fromCharCode.apply(String, keyBuffer);
    res.end(content);
  } catch (error) {
    winston.error('invalid hash retrieving key', error);
    next(error)
  }
};


text:
package com.rtg.bed;

import com.rtg.util.intervals.RangeMeta;

import junit.framework.TestCase;

/**
 */
public class SimpleBedRangeLoaderTest extends TestCase {

  public void testBedRecord() {
    BedRecord rec = new BedRecord("chr1", 2, 80, "anno1", "anno2");
    final BedRangeLoader<String> l = new SimpleBedRangeLoader();

    assertEquals("anno1", l.getMeta(rec));

    rec = new BedRecord("chr1", 2, 80);
    assertEquals("chr1:3-80", l.getMeta(rec));

    rec = new BedRecord("chr1", 2, 2); // End is exclusive, so this is an odd record, being "before" the start
    assertEquals("chr1:3-2", l.getMeta(rec));
    final RangeMeta<String> r = l.getRangeData(rec);
    assertEquals(2, r.getStart());
    assertEquals(3, r.getEnd());
    assertEquals("chr1:3-2", r.getMeta());
  }
}


text:
'use strict';

var express = require('express');
var router = express.Router();

var qs = require('querystring');
var jwt = require('jwt-simple');
var request = require('request');

var User = require('../models/user');

// AUTH

/*
 |--------------------------------------------------------------------------
 | Login with EMail and Password
 |--------------------------------------------------------------------------
*/

router.post('/signup', function(req, res){
  User.register(req.body, function(err, user){
    if(user){
      user.password = null;
      var token = jwt.encode(user, process.env.JWT_SECRET);
      console.log(token, "TOKEN")
      res.cookie('token', token).send(user._id)
    } else{
      res.status(400).send('Incorrect email or Password!')
    }
  })
})

router.post('/pwLogin', function(req, res){
  User.login(req.body, function(err, user){
    if(user){
      user.password = null;
      var token = jwt.encode(user, process.env.JWT_SECRET);
      console.log(token, "TOKEN")
      res.cookie('token', token).send(user._id)
    } else{
      res.status(400).send('Incorrect email or Password!')
    }
  })
})
   // if ( user.password !== password) return res.status(403).send("YOU ARE FORBIDDEN TO ENTER");

/*
 |--------------------------------------------------------------------------
 | Login with Github
 |--------------------------------------------------------------------------
 */

router.post('/github', function(req, res) {
  var accessTokenUrl = 'https://github.com/login/oauth/access_token';
  var userApiUrl = 'https://api.github.com/user';
  var params = {
    code: req.body.code,
    client_id: req.body.clientId,
    client_secret: process.env.DILDAILY_GITHUB,
    redirect_uri: req.body.redirectUri
  };

  // Step 1. Exchange authorization code for access token.
  request.get({ url: accessTokenUrl, qs: params }, function(err, response, accessToken) {
    accessToken = qs.parse(accessToken);
    var headers = { 'User-Agent': 'Satellizer' };

    // Step 2. Retrieve profile information about the current user.
    request.get({ url: userApiUrl, qs: accessToken, headers: headers, json: true }, function(err, response, profile) {
      console.log('github profile:', profile);

      // Step 3a. Link user accounts.
      if (req.headers.authorization) {
        User.findOne({ github: profile.id }, function(err, existingUser) {
          if (existingUser) {
            return res.status(409).send({ message: 'There is already a GitHub account that belongs to you' });
          }
          var token = req.headers.authorization.split(' ')[1];
          var payload = jwt.decode(token, process.env.JWT_SECRET);
          User.findById(payload.sub, function(err, user) {
            if (!user) {
              return res.status(400).send({ message: 'User not found' });
            }
            user.github = profile.id;
            user.picture = user.picture || profile.avatar_url;
            user.displayName = user.displayName || profile.name;
            user.save(function() {
              var token = user.createJWT();
              res.send({ token: token });
            });
          });
        });
      } else {
        // Step 3b. Create a new user account or return an existing one.
        User.findOne({ github: profile.id }, function(err, existingUser) {
          if (existingUser) {
            var token = existingUser.createJWT();
            return res.send({ token: token, user:existingUser._id });
          }
          var user = new User();
          user.github = profile.id;
          user.picture = profile.avatar_url;
          user.displayName = profile.name;
          user.save(function() {
            var token = user.createJWT();
            res.send({ token: token , user:user._id});
          });
        });
      }
    });
  });
});

/*
 |--------------------------------------------------------------------------
 | Login with Facebook
 |--------------------------------------------------------------------------
 */
router.post('/facebook', function(req, res) {
  var fields = ['id', 'email', 'first_name', 'last_name', 'link', 'name'];
  var accessTokenUrl = 'https://graph.facebook.com/v2.5/oauth/access_token';
  var graphApiUrl = 'https://graph.facebook.com/v2.5/me?fields=' + fields.join(',');
  var params = {
    code: req.body.code,
    client_id: req.body.clientId,
    client_secret: process.env.DILDAILY_FB,
    redirect_uri: req.body.redirectUri
  };

  // Step 1. Exchange authorization code for access token.
  request.get({ url: accessTokenUrl, qs: params, json: true }, function(err, response, accessToken) {
    if (response.statusCode !== 200) {
      return res.status(500).send({ message: accessToken.error.message });
    }

    // Step 2. Retrieve profile information about the current user.
    request.get({ url: graphApiUrl, qs: accessToken, json: true }, function(err, response, profile) {
      console.log('facebook profile:', profile);
      if (response.statusCode !== 200) {
        return res.status(500).send({ message: profile.error.message });
      }
      if (req.headers.authorization) {
        User.findOne({ facebook: profile.id }, function(err, existingUser) {
          if (existingUser) {
            return res.status(409).send({ message: 'There is already a Facebook account that belongs to you' });
          }
          var token = req.headers.authorization.split(' ')[1];
          var payload = jwt.decode(token, process.env.JWT_SECRET);
          User.findById(payload.sub, function(err, user) {
            if (!user) {
              return res.status(400).send({ message: 'User not found' });
            }
            user.facebook = profile.id;
            user.picture = user.picture || 'https://graph.facebook.com/v2.3/' + profile.id + '/picture?type=large';
            user.displayName = user.displayName || profile.name;
            user.save(function() {
              var token = user.createJWT();
              res.send({ token: token });
            });
          });
        });
      } else {
        // Step 3b. Create a new user account or return an existing one.
        User.findOne({ facebook: profile.id }, function(err, existingUser) {
          if (existingUser) {
            var token = existingUser.createJWT();
            return res.send({ token: token });
          }
          var user = new User();
          user.facebook = profile.id;
          user.picture = 'https://graph.facebook.com/' + profile.id + '/picture?type=large';
          user.displayName = profile.name;
          user.save(function() {
            var token = user.createJWT();
            res.send({ token: token });
          });
        });
      }
    });
  });
});

module.exports = router;


text:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Conference on Bits & Sundry</title>
    <link>https://blog.danielberkompas.com/tags/conference/</link>
    <description>Recent content in Conference on Bits & Sundry</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 22 Aug 2018 20:05:17 -0700</lastBuildDate>

	<atom:link href="https://blog.danielberkompas.com/tags/conference/index.xml" rel="self" type="application/rss+xml" />

    <item>
      <title>ElixirConf 2018 Talk Picks</title>
      <link>https://blog.danielberkompas.com/2018/08/22/elixirconf-2018-talk-picks/</link>
      <pubDate>Wed, 22 Aug 2018 20:05:17 -0700</pubDate>

      <guid>https://blog.danielberkompas.com/2018/08/22/elixirconf-2018-talk-picks/</guid>
      <description>ElixirConf 2018 is coming up fast, and they&rsquo;ve announced the schedule, so I thought I&rsquo;d put together a list of the talks I want to attend and why.
I have two goals for this conference:
 Find out what kinds of projects people are building in Elixir Learn what (if anything) makes Elixir uniquely good for those projects  My sense of the Elixir community is that we often use Elixir to build monolithic stateless apps backed by a single database.</description>
    </item>

  </channel>
</rss>


text:
package unversioned

import (
	"encoding/json"
	"fmt"
	"strings"
)

// ParseResourceArg takes the common style of string which may be either `resource.group.com` or `resource.version.group.com`
// and parses it out into both possibilities.  This code takes no responsibility for knowing which representation was intended
// but with a knowledge of all GroupVersions, calling code can take a very good guess.  If there are only two segments, then
// `*GroupVersionResource` is nil.
// `resource.group.com` -> `group=com, version=group, resource=resource` and `group=group.com, resource=resource`
func ParseResourceArg(arg string) (*GroupVersionResource, GroupResource) {
	var gvr *GroupVersionResource
	if strings.Count(arg, ".") >= 2 {
		s := strings.SplitN(arg, ".", 3)
		gvr = &GroupVersionResource{Group: s[2], Version: s[1], Resource: s[0]}
	}

	return gvr, ParseGroupResource(arg)
}

// GroupResource specifies a Group and a Resource, but does not force a version.  This is useful for identifying
// concepts during lookup stages without having partially valid types
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupResource struct {
	Group    string `protobuf:"bytes,1,opt,name=group"`
	Resource string `protobuf:"bytes,2,opt,name=resource"`
}

func (gr GroupResource) WithVersion(version string) GroupVersionResource {
	return GroupVersionResource{Group: gr.Group, Version: version, Resource: gr.Resource}
}

func (gr GroupResource) Empty() bool {
	return len(gr.Group) == 0 && len(gr.Resource) == 0
}

func (gr *GroupResource) String() string {
	if len(gr.Group) == 0 {
		return gr.Resource
	}
	return gr.Resource + "." + gr.Group
}

// ParseGroupResource turns "resource.group" string into a GroupResource struct.  Empty strings are allowed
// for each field.
func ParseGroupResource(gr string) GroupResource {
	if i := strings.Index(gr, "."); i == -1 {
		return GroupResource{Resource: gr}
	} else {
		return GroupResource{Group: gr[i+1:], Resource: gr[:i]}
	}
}

// GroupVersionResource unambiguously identifies a resource.  It doesn't anonymously include GroupVersion
// to avoid automatic coersion.  It doesn't use a GroupVersion to avoid custom marshalling
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupVersionResource struct {
	Group    string `protobuf:"bytes,1,opt,name=group"`
	Version  string `protobuf:"bytes,2,opt,name=version"`
	Resource string `protobuf:"bytes,3,opt,name=resource"`
}

func (gvr GroupVersionResource) Empty() bool {
	return len(gvr.Group) == 0 && len(gvr.Version) == 0 && len(gvr.Resource) == 0
}

func (gvr GroupVersionResource) GroupResource() GroupResource {
	return GroupResource{Group: gvr.Group, Resource: gvr.Resource}
}

func (gvr GroupVersionResource) GroupVersion() GroupVersion {
	return GroupVersion{Group: gvr.Group, Version: gvr.Version}
}

func (gvr *GroupVersionResource) String() string {
	return strings.Join([]string{gvr.Group, "/", gvr.Version, ", Resource=", gvr.Resource}, "")
}

// GroupKind specifies a Group and a Kind, but does not force a version.  This is useful for identifying
// concepts during lookup stages without having partially valid types
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupKind struct {
	Group string `protobuf:"bytes,1,opt,name=group"`
	Kind  string `protobuf:"bytes,2,opt,name=kind"`
}

func (gk GroupKind) Empty() bool {
	return len(gk.Group) == 0 && len(gk.Kind) == 0
}

func (gk GroupKind) WithVersion(version string) GroupVersionKind {
	return GroupVersionKind{Group: gk.Group, Version: version, Kind: gk.Kind}
}

func (gk *GroupKind) String() string {
	if len(gk.Group) == 0 {
		return gk.Kind
	}
	return gk.Kind + "." + gk.Group
}

// GroupVersionKind unambiguously identifies a kind.  It doesn't anonymously include GroupVersion
// to avoid automatic coersion.  It doesn't use a GroupVersion to avoid custom marshalling
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupVersionKind struct {
	Group   string `protobuf:"bytes,1,opt,name=group"`
	Version string `protobuf:"bytes,2,opt,name=version"`
	Kind    string `protobuf:"bytes,3,opt,name=kind"`
}

// Empty returns true if group, version, and kind are empty
func (gvk GroupVersionKind) Empty() bool {
	return len(gvk.Group) == 0 && len(gvk.Version) == 0 && len(gvk.Kind) == 0
}

func (gvk GroupVersionKind) GroupKind() GroupKind {
	return GroupKind{Group: gvk.Group, Kind: gvk.Kind}
}

func (gvk GroupVersionKind) GroupVersion() GroupVersion {
	return GroupVersion{Group: gvk.Group, Version: gvk.Version}
}

func (gvk GroupVersionKind) String() string {
	return gvk.Group + "/" + gvk.Version + ", Kind=" + gvk.Kind
}

// GroupVersion contains the "group" and the "version", which uniquely identifies the API.
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
type GroupVersion struct {
	Group   string `protobuf:"bytes,1,opt,name=group"`
	Version string `protobuf:"bytes,2,opt,name=version"`
}

// Empty returns true if group and version are empty
func (gv GroupVersion) Empty() bool {
	return len(gv.Group) == 0 && len(gv.Version) == 0
}

// String puts "group" and "version" into a single "group/version" string. For the legacy v1
// it returns "v1".
func (gv GroupVersion) String() string {
	// special case the internal apiVersion for the legacy kube types
	if gv.Empty() {
		return ""
	}

	// special case of "v1" for backward compatibility
	if len(gv.Group) == 0 && gv.Version == "v1" {
		return gv.Version
	}
	if len(gv.Group) > 0 {
		return gv.Group + "/" + gv.Version
	}
	return gv.Version
}

// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
// if none of the options match the group. It prefers a match to group and version over just group.
// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme.
// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
//   in fewer places.
func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
	for _, gvk := range kinds {
		if gvk.Group == gv.Group && gvk.Version == gv.Version {
			return gvk, true
		}
	}
	for _, gvk := range kinds {
		if gvk.Group == gv.Group {
			return gv.WithKind(gvk.Kind), true
		}
	}
	return GroupVersionKind{}, false
}

// ParseGroupVersion turns "group/version" string into a GroupVersion struct. It reports error
// if it cannot parse the string.
func ParseGroupVersion(gv string) (GroupVersion, error) {
	// this can be the internal version for the legacy kube types
	// TODO once we've cleared the last uses as strings, this special case should be removed.
	if (len(gv) == 0) || (gv == "/") {
		return GroupVersion{}, nil
	}

	switch strings.Count(gv, "/") {
	case 0:
		return GroupVersion{"", gv}, nil
	case 1:
		i := strings.Index(gv, "/")
		return GroupVersion{gv[:i], gv[i+1:]}, nil
	default:
		return GroupVersion{}, fmt.Errorf("unexpected GroupVersion string: %v", gv)
	}
}

// WithKind creates a GroupVersionKind based on the method receiver's GroupVersion and the passed Kind.
func (gv GroupVersion) WithKind(kind string) GroupVersionKind {
	return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind}
}

// WithResource creates a GroupVersionResource based on the method receiver's GroupVersion and the passed Resource.
func (gv GroupVersion) WithResource(resource string) GroupVersionResource {
	return GroupVersionResource{Group: gv.Group, Version: gv.Version, Resource: resource}
}

// MarshalJSON implements the json.Marshaller interface.
func (gv GroupVersion) MarshalJSON() ([]byte, error) {
	s := gv.String()
	if strings.Count(s, "/") > 1 {
		return []byte{}, fmt.Errorf("illegal GroupVersion %v: contains more than one /", s)
	}
	return json.Marshal(s)
}

func (gv *GroupVersion) unmarshal(value []byte) error {
	var s string
	if err := json.Unmarshal(value, &s); err != nil {
		return err
	}
	parsed, err := ParseGroupVersion(s)
	if err != nil {
		return err
	}
	*gv = parsed
	return nil
}

// UnmarshalJSON implements the json.Unmarshaller interface.
func (gv *GroupVersion) UnmarshalJSON(value []byte) error {
	return gv.unmarshal(value)
}

// UnmarshalTEXT implements the Ugorji's encoding.TextUnmarshaler interface.
func (gv *GroupVersion) UnmarshalText(value []byte) error {
	return gv.unmarshal(value)
}

// GroupVersions can be used to represent a set of desired group versions.
// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme.
// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
//   in fewer places.
type GroupVersions []GroupVersion

// KindForGroupVersionKinds identifies the preferred GroupVersionKind out of a list. It returns ok false
// if none of the options match the group.
func (gvs GroupVersions) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
	for _, gv := range gvs {
		target, ok := gv.KindForGroupVersionKinds(kinds)
		if !ok {
			continue
		}
		return target, true
	}
	return GroupVersionKind{}, false
}

// ToAPIVersionAndKind is a convenience method for satisfying runtime.Object on types that
// do not use TypeMeta.
func (gvk *GroupVersionKind) ToAPIVersionAndKind() (string, string) {
	if gvk == nil {
		return "", ""
	}
	return gvk.GroupVersion().String(), gvk.Kind
}

// FromAPIVersionAndKind returns a GVK representing the provided fields for types that
// do not use TypeMeta. This method exists to support test types and legacy serializations
// that have a distinct group and kind.
// TODO: further reduce usage of this method.
func FromAPIVersionAndKind(apiVersion, kind string) GroupVersionKind {
	if gv, err := ParseGroupVersion(apiVersion); err == nil {
		return GroupVersionKind{Group: gv.Group, Version: gv.Version, Kind: kind}
	}
	return GroupVersionKind{Kind: kind}
}

// All objects that are serialized from a Scheme encode their type information. This interface is used
// by serialization to set type information from the Scheme onto the serialized version of an object.
// For objects that cannot be serialized or have unique requirements, this interface may be a no-op.
// TODO: this belongs in pkg/runtime, move unversioned.GVK into runtime.
type ObjectKind interface {
	// SetGroupVersionKind sets or clears the intended serialized kind of an object. Passing kind nil
	// should clear the current setting.
	SetGroupVersionKind(kind GroupVersionKind)
	// GroupVersionKind returns the stored group, version, and kind of an object, or nil if the object does
	// not expose or provide these fields.
	GroupVersionKind() GroupVersionKind
}

// EmptyObjectKind implements the ObjectKind interface as a noop
// TODO: this belongs in pkg/runtime, move unversioned.GVK into runtime.
var EmptyObjectKind = emptyObjectKind{}

type emptyObjectKind struct{}

// SetGroupVersionKind implements the ObjectKind interface
func (emptyObjectKind) SetGroupVersionKind(gvk GroupVersionKind) {}

// GroupVersionKind implements the ObjectKind interface
func (emptyObjectKind) GroupVersionKind() GroupVersionKind { return GroupVersionKind{} }


text:
@implementation TeaTimerAppDelegate

@synthesize window;
@synthesize viewController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Override point for customization after app launch
    [window addSubview:viewController.view];
    [window makeKeyAndVisible];

	return YES;
}

- (void)dealloc {
    [viewController release];
    [window release];
    [super dealloc];
}

@end


text:
@font-face {
  font-family: 'Droid Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Droid Sans'), local('DroidSans'), url('../fonts/droid-sans.woff') format('woff');
}

.first {
  background-image: url(/images/ghost.png);
}

.first {
  background-image: url(/strip/images/ghost.png);
}

.second {
  background-image: url(/images/pumpkin.png);
}

.third {
  background-image: url(../images/pumpkin.png);
}


text:
import re
import time
import os
import datetime

import RPi.GPIO as GPIO

class TempController(object):
    # Configuration of temeprature controller

    tempOn = -16.0 # temperature where to switch on cooling unit
    tempOff = -18.0 # temperature limit where to switch of cooling unit

    #tempOutFile = "/sys/bus/w1/devices/28-000001357199/w1_slave" # w1_slave file of sensor in /sys/bus/w1/devices
    #tempInFile = "/sys/bus/w1/devices/10-000802b53a6e/w1_slave" # w1_slave file of sensor
    tempOutFile = "/sys/devices/w1_bus_master1/28-000001357199/w1_slave"
    tempInFile = "/sys/devices/w1_bus_master1/28-000001357199/w1_slave"

    waitTime = 180 # wait time in seconds where the temperature has to be
                   # higher than tempOn before switching on the cooling unit

    enableWatchdog = False # Enable bcm2708 watchdog module

    gpioPinRelais = 17

    ######## Configuration end ############

    tempOut = None # temperature outside of freezer
    tempOutLastUpdate = None # timestamp of last (successful) update
    tempIn = None # temeprature inside of freezer
    tempInLastUpdate = None # timestamp of last (successful) update

    tempWaitTimePeriod = None

    watchdogFileHandle = None

    ctrlMode = None

    MODE_TEMPERATURE_CTRL = 'temp'
    MODE_FAILSAFE = 'fail'

    lastSwitchAction = None
    lastSwitchStatus = None # on / off

    def run(self):
        if self.enableWatchdog:
            os.system('modprobe bcm2708_wdog heartbeat=15 nowayout=1')
            self.watchdogFileHandle = open("/dev/watchdog", "w")

        # setup gpio pin for relais
        GPIO.setmode(GPIO.BCM)
        GPIO.setup(self.gpioPinRelais, GPIO.OUT)

        while 1:
            if self.enableWatchdog:
                self.watchdogFileHandle.write("a")
            self.work()
            time.sleep(5)

    def temperatureValid(self, sensor):
        if sensor == 'out':
            if self.tempOutLastUpdate == None:
                return False
            diff = time.time() - self.tempOutLastUpdate
        else:
            if self.tempInLastUpdate == None:
                return False
            diff = time.time() - self.tempInLastUpdate
        if diff > 180:
            return False
        return True

    def writeTemperature(self, sensor):
        if sensor == 'out':
            self.writeFile("/run/shm/temp.outside", str(self.tempOut))
        else:
            self.writeFile("/run/shm/temp.inside", str(self.tempIn))

    def writeFile(self, fileName, fileContent):
        outFile = open(fileName, "w")
        outFile.truncate()
        outFile.write(fileContent)
        outFile.close()

    def work(self):
	self.updateTemperatures()
        self.writeTemperature('in')
        self.writeTemperature('out')

        tempWish = self.readFileIntoString("/run/shm/temp.wish")
        if tempWish:
            tempWish = float(tempWish)
            if tempWish < 10 and tempWish > -30:
                self.tempOn = tempWish
                self.tempOff = tempWish - 2

        if self.temperatureValid('in'):
            self.ctrlMode = self.MODE_TEMPERATURE_CTRL
        else:
            self.ctrlMode = self.MODE_FAILSAFE

        if self.ctrlMode == self.MODE_TEMPERATURE_CTRL:
            if self.tempIn > self.tempOn:
                self.switchRelais(True)
            if self.tempIn < self.tempOff:
                self.switchRelais(False)

        if self.ctrlMode == self.MODE_FAILSAFE:
            stat = (datetime.datetime.now().minute / 15) % 2
            if stat:
                self.switchRelais(True)
            else:
                self.switchRelais(False)

        self.writeFile("/run/shm/temp.set", str(self.tempOn))

    def switchRelais(self, on):
        if self.lastSwitchAction:
            if time.time() - self.lastSwitchAction < 180:
                return

        if self.lastSwitchStatus == None:
            if on == True:
                self.lastSwitchStatus = 'off'
            else:
                self.lastSwitchStatus = 'on'

        if on == True and self.lastSwitchStatus == 'off':
            self.lastSwitchAction = time.time()
            self.lastSwitchStatus = 'on'

        if on == False and self.lastSwitchStatus == 'on':
            self.lastSwitchAction = time.time()
            self.lastSwitchStatus = 'off'

        if on == True:
            GPIO.output(self.gpioPinRelais, 1)
            self.writeFile("/run/shm/relais.status", "on")

        if on == False:
            GPIO.output(self.gpioPinRelais, 0)
            self.writeFile("/run/shm/relais.status", "off")

    def updateTemperatures(self):
        tmpTempIn = self.parseTemp1Wire(self.readFileIntoString(self.tempInFile))
        if tmpTempIn:
            self.tempInLastUpdate = time.time()
            self.tempIn = tmpTempIn

        tmpTempOut = self.parseTemp1Wire(self.readFileIntoString(self.tempOutFile))
        if tmpTempOut:
            self.tempOutLastUpdate = time.time()
            self.tempOut = tmpTempOut

    def readFileIntoString(self, file):
        try:
            return open(file).read()
        except IOError:
            pass

    def parseTemp1Wire(self, str):
        if str == None:
            return
        m = re.search('t=([-\d]*)', str)
        if str.find("YES") == -1: # CRC check failed
            return None
        if not m: # Temperature string not found
            return None
        temp = float(m.group(1)) / 1000
        if temp > 80 or temp < -55:
            return None
        return temp

if __name__ == '__main__':
    ctrl = TempController()
    ctrl.run()

# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4


text:
require "faker"
require "factory_bot"

FactoryBot.define do
  factory :client do
    name { Faker::Company.name }
    address { Faker::Address.street_address }
    city { Faker::Address.city }
    state { Faker::Address.state }
    zip { Faker::Address.zip_code }
    country { Faker::Address.country }
    email { Faker::Internet.email }
    contact { Faker::Name.name }
    phone { Faker::PhoneNumber.phone_number }
  end

  factory :user do
    name { Faker::Name.name.gsub(/[^a-zA-Z]/, '') }
    email { Faker::Internet.email }
    password { "secret" }
    password_confirmation { "secret" }
    created_at { Time.now }
    updated_at { Time.now }
    rate { 50 }
    color { '123456' }

    factory :admin do
      admin { true }
    end
  end

  factory :work do
    client
    invoice
    user
    start { Time.now }
    finish { start + 1.hour }
    rate { 50 }
    notes { Faker::Lorem.sentence(word_count: rand(3)) }
  end

  factory :adjustment do
    client
    invoice
    rate { 0 }
    notes { "adjustment" }
  end

  factory :invoice do
    client
    date { Time.zone.now }
    project_name { Faker::Company.name }
  end

  factory :payment do
    invoice
    total { 0 }
  end
end


text:
/****************************************************/
/*                                                  */
/* This file is part of the Globus Componetns iOS   */
/* Copyright 2014-2016 Globus-Ltd.                  */
/* http://www.globus-ltd.com                        */
/* Created by Alexander Trifonov                    */
/*                                                  */
/* For the full copyright and license information,  */
/* please view the LICENSE file that contained      */
/* MIT License and was distributed with             */
/* this source code.                                */
/*                                                  */
/****************************************************/

#include "GLBTargetConditionals.h"

/*--------------------------------------------------*/

@interface NSObject (GLB_NS)

+ (nonnull NSString*)glb_className;
- (nonnull NSString*)glb_className;

- (BOOL)glb_isNull;
- (BOOL)glb_isNumber;
- (BOOL)glb_isDecimalNumber;
- (BOOL)glb_isString;
- (BOOL)glb_isUrl;

- (BOOL)glb_isArray;
- (BOOL)glb_isSet;
- (BOOL)glb_isOrderedSet;
- (BOOL)glb_isDictionary;

- (BOOL)glb_isMutableArray;
- (BOOL)glb_isMutableSet;
- (BOOL)glb_isMutableOrderedSet;
- (BOOL)glb_isMutableDictionary;

@end

/*--------------------------------------------------*/


text:
namespace apps {
class ExtensionAppShimHandler;
}

class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase {
 public:
  BrowserProcessPlatformPart();
  ~BrowserProcessPlatformPart() override;

  // Overridden from BrowserProcessPlatformPartBase:
  void StartTearDown() override;
  void AttemptExit() override;
  void PreMainMessageLoopRun() override;

  AppShimHostManager* app_shim_host_manager();

 private:
  // Hosts the IPC channel factory that App Shims connect to on Mac.
  scoped_refptr<AppShimHostManager> app_shim_host_manager_;

  DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart);
};

#endif  // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_MAC_H_


text:
	/////// //////////////////
	/////// PROJECT: MTA iLife - German Fun Reallife Gamemode
	/////// VERSION: 1.7.2
	/////// DEVELOPERS: See DEVELOPERS.md in the top folder
	/////// LICENSE: See LICENSE.md in the top folder
	/////// /////////////////
]]

CPayNSprayManager = inherit(cSingleton)

function CPayNSprayManager:constructor()
	local start = getTickCount()
	local result = CDatabase:getInstance():query("SELECT * FROM shop_paynspray")
	if(#result > 0) then
		for key, value in pairs(result) do
			local PNP = createMarker(gettok(value["Pos"], 1 , "|"), gettok(value["Pos"], 2 , "|"), gettok(value["Pos"], 3 , "|"), "corona", 3, 255, 255, 255, 0, getRootElement())
			enew (PNP, CPayNSpray, value["ID"], value["GaragenID"], value["Pos"] ,value["BPos"] , value["Chain"], value["iOwner"], value["Filliale"])
		end
	end
	outputServerLog("Es wurden "..tostring(#result).." PayNSprays gefunden! (" .. getTickCount() - start .. "ms)")
end

function CPayNSprayManager:destructor()

end


text:
"""
Definition of TreeNode:
class TreeNode:
    def __init__(self, val):
        self.val = val
        self.left, self.right = None, None
"""

class Solution:
    """
    @param root: The root of binary tree.
    @return: Postorder in ArrayList which contains node values.
    """
    def postorderTraversal(self, root):
        # write your code here
        postorder, stack = [], [root]

        while stack != [] and stack[0] is not None:
            node = stack.pop()
            while node is not None:
                stack.append(node)
                node = node.left

            node = stack[-1].right

            if node is None:
                while stack != [] and stack[-1].right == node:
                    node = stack.pop()
                    postorder.append(node.val)

            if stack != []:
                node = stack[-1].right
                stack.append(node)

        return postorder


text:
UNDB Network

Actors

					<li data-text="With 196 Parties, the Convention on Biological Diversity has near universal participation among countries.">Parties to the CBD

Biodiversity Champions

Case Studies

Specific Projects

						Actions
						<select name="action_year" class="form-control">
							<option value="">2011</option>
							<option value="">2012</option>
							<option value="">2014</option>
							<option value="" selected>2015</option>
							<option value="">2016</option>
							<option value="">2017</option>
							<option value="">2018</option>
							<option value="">2019</option>
							<option value="">2020</option>
							<option value="">All</option>
						</select>

The UNDB Network comprises all Actors contributing to the implementation of the 2011-2020 Strategic Plan for Biodiversity.

				<button type="button" class="closeButton"></button>


text:
namespace PhysBAM{

template<class T> class TRIANGULATED_SURFACE;

template<class T>
class TRIANGULATED_SURFACE_LIST:public DYNAMIC_LIST<TRIANGULATED_SURFACE<T>*>
{
private:
    using DYNAMIC_LIST<TRIANGULATED_SURFACE<T>*>::array;using DYNAMIC_LIST<TRIANGULATED_SURFACE<T>*>::id_to_index_map;
    using DYNAMIC_LIST<TRIANGULATED_SURFACE<T>*>::last_unique_id;using DYNAMIC_LIST<TRIANGULATED_SURFACE<T>*>::needs_write;

public:
//#####################################################################
    template<class RW> void Read(const std::string& prefix,const int frame);
    template<class RW> void Write(const std::string& prefix,const int frame) const;
    virtual void Destroy_Element(TRIANGULATED_SURFACE<T>*& triangulated_surface,const int id);
//#####################################################################
};
}
#endif


text:
/
    // Read CPACR (located at address 0xE000ED88)
    // Set bits 20-23 to enable CP10 and CP11 coprocessors
    // Write back the modified value to the CPACR
    asm volatile ("LDR.W R0, =0xE000ED88\n\t"
                  "LDR R1, [R0]\n\t"
                  "ORR R1, R1, #(0xF << 20)\n\t"
                  "STR R1, [R0]");
#endif // (__VFP_FP__) && !(__SOFTFP__)

    // Check to see if we are running the code from a non-zero
    // address (eg RAM, external flash), in which case we need
    // to modify the VTOR register to tell the CPU that the
    // vector table is located at a non-0x0 address.

    // Note that we do not use the CMSIS register access mechanism,
    // as there is no guarantee that the project has been configured
    // to use CMSIS.
    unsigned int * pSCB_VTOR = (unsigned int *) 0xE000ED08;
    if ((unsigned int *)g_pfnVectors!=(unsigned int *) 0x00000000) {
        // CMSIS : SCB->VTOR = <address of vector table>
        *pSCB_VTOR = (unsigned int)g_pfnVectors;
    }

#if defined (__USE_CMSIS) || defined (__USE_LPCOPEN)
    SystemInit();
#endif

#if defined (__cplusplus)
    //
    // Call C++ library initialisation
    //
    __libc_init_array();
#endif

#if defined (__REDLIB__)
    // Call the Redlib library, which in turn calls main()
    __main() ;
#else
    main();
#endif

    //
    // main() shouldn't return, but if it does, we'll just enter an infinite loop
    //
    while (1) {
        ;
    }
}

//*****************************************************************************
// Default exception handlers. Override the ones here by defining your own
// handler routines in your application code.
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void NMI_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void HardFault_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void MemManage_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void BusFault_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void UsageFault_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void SVC_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void DebugMon_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void PendSV_Handler(void)
{ while(1) {}
}

__attribute__ ((section(".after_vectors")))
void SysTick_Handler(void)
{ while(1) {}
}

//*****************************************************************************
//
// Processor ends up here if an unexpected interrupt occurs or a specific
// handler is not present in the application code.
//
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void IntDefaultHandler(void)
{ while(1) {}
}


text:
/* 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 org.flowable.ui.admin.rest.client;

import org.flowable.ui.admin.domain.EndpointType;
import org.flowable.ui.admin.domain.ServerConfig;
import org.flowable.ui.admin.service.engine.AppDefinitionService;
import org.flowable.ui.admin.service.engine.exception.FlowableServiceException;
import org.flowable.ui.common.service.exception.BadRequestException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.databind.JsonNode;

@RestController
@RequestMapping("/app")
public class AppDefinitionClientResource extends AbstractClientResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(AppDefinitionClientResource.class);

    @Autowired
    protected AppDefinitionService clientService;

    @RequestMapping(value = "/rest/admin/app-definitions/{definitionId}", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getCaseDefinition(@PathVariable String definitionId) {
        ServerConfig serverConfig = retrieveServerConfig(EndpointType.APP);
        try {
            return clientService.getAppDefinition(serverConfig, definitionId);
        } catch (FlowableServiceException e) {
            LOGGER.error("Error getting app definition {}", definitionId, e);
            throw new BadRequestException(e.getMessage());
        }
    }

    @RequestMapping(value = "/rest/admin/app-definitions/{definitionId}/process-definitions", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getProcessDefinitions(@PathVariable String definitionId, @RequestParam(name="deploymentId", required=true) String deploymentId) {
        ServerConfig serverConfig = retrieveServerConfig(EndpointType.PROCESS);
        try {
            return clientService.getAppDefinitionProcessDefinitions(serverConfig, deploymentId);

        } catch (FlowableServiceException e) {
            LOGGER.error("Error getting process definitions for app definition {}", definitionId, e);
            throw new BadRequestException(e.getMessage());
        }
    }

    @RequestMapping(value = "/rest/admin/app-definitions/{definitionId}/case-definitions", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getCaseDefinitions(@PathVariable String definitionId, @RequestParam(name="deploymentId", required=true) String deploymentId) {
        ServerConfig serverConfig = retrieveServerConfig(EndpointType.CMMN);
        try {
            return clientService.getAppDefinitionCaseDefinitions(serverConfig, deploymentId);

        } catch (FlowableServiceException e) {
            LOGGER.error("Error getting case definitions for app definition {}", definitionId, e);
            throw new BadRequestException(e.getMessage());
        }
    }

    @RequestMapping(value = "/rest/admin/app-definitions/{definitionId}/decision-tables", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getDecisionTables(@PathVariable String definitionId, @RequestParam(name="deploymentId", required=true) String deploymentId) {
        ServerConfig serverConfig = retrieveServerConfig(EndpointType.DMN);
        try {
            return clientService.getAppDefinitionDecisionTables(serverConfig, deploymentId);

        } catch (FlowableServiceException e) {
            LOGGER.error("Error getting decision tables for app definition {}", definitionId, e);
            throw new BadRequestException(e.getMessage());
        }
    }

    @RequestMapping(value = "/rest/admin/app-definitions/{definitionId}/form-definitions", method = RequestMethod.GET, produces = "application/json")
    public JsonNode getFormDefinitions(@PathVariable String definitionId, @RequestParam(name="deploymentId", required=true) String deploymentId) {
        ServerConfig serverConfig = retrieveServerConfig(EndpointType.FORM);
        try {
            return clientService.getAppDefinitionFormDefinitions(serverConfig, deploymentId);

        } catch (FlowableServiceException e) {
            LOGGER.error("Error getting form definitions for app definition {}", definitionId, e);
            throw new BadRequestException(e.getMessage());
        }
    }

}


text:
namespace display_compositor {

BufferQueue::BufferQueue(gpu::gles2::GLES2Interface* gl,
                         uint32_t texture_target,
                         uint32_t internal_format,
                         gfx::BufferFormat format,
                         GLHelper* gl_helper,
                         gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
                         gpu::SurfaceHandle surface_handle)
    : gl_(gl),
      fbo_(0),
      allocated_count_(0),
      texture_target_(texture_target),
      internal_format_(internal_format),
      format_(format),
      gl_helper_(gl_helper),
      gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
      surface_handle_(surface_handle) {
  DCHECK(gpu::IsImageFormatCompatibleWithGpuMemoryBufferFormat(internal_format,
                                                               format_));
}

BufferQueue::~BufferQueue() {
  FreeAllSurfaces();

  if (fbo_)
    gl_->DeleteFramebuffers(1, &fbo_);
}

void BufferQueue::Initialize() {
  gl_->GenFramebuffers(1, &fbo_);
}

void BufferQueue::BindFramebuffer() {
  gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);

  if (!current_surface_)
    current_surface_ = GetNextSurface();

  if (current_surface_) {
    gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                              texture_target_, current_surface_->texture, 0);
  }
}

void BufferQueue::CopyBufferDamage(int texture,
                                   int source_texture,
                                   const gfx::Rect& new_damage,
                                   const gfx::Rect& old_damage) {
  gl_helper_->CopySubBufferDamage(texture_target_, texture, source_texture,
                                  SkRegion(gfx::RectToSkIRect(new_damage)),
                                  SkRegion(gfx::RectToSkIRect(old_damage)));
}

void BufferQueue::UpdateBufferDamage(const gfx::Rect& damage) {
  if (displayed_surface_)
    displayed_surface_->damage.Union(damage);
  for (auto& surface : available_surfaces_)
    surface->damage.Union(damage);
  for (auto& surface : in_flight_surfaces_) {
    if (surface)
      surface->damage.Union(damage);
  }
}

void BufferQueue::SwapBuffers(const gfx::Rect& damage) {
  if (current_surface_) {
    if (damage != gfx::Rect(size_)) {
      // Copy damage from the most recently swapped buffer. In the event that
      // the buffer was destroyed and failed to recreate, pick from the most
      // recently available buffer.
      uint32_t texture_id = 0;
      for (auto& surface : base::Reversed(in_flight_surfaces_)) {
        if (surface) {
          texture_id = surface->texture;
          break;
        }
      }
      if (!texture_id && displayed_surface_)
        texture_id = displayed_surface_->texture;

      if (texture_id) {
        CopyBufferDamage(current_surface_->texture, texture_id, damage,
                         current_surface_->damage);
      }
    }
    current_surface_->damage = gfx::Rect();
  }
  UpdateBufferDamage(damage);
  in_flight_surfaces_.push_back(std::move(current_surface_));
  // Some things reset the framebuffer (CopySubBufferDamage, some GLRenderer
  // paths), so ensure we restore it here.
  gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
}

void BufferQueue::Reshape(const gfx::Size& size,
                          float scale_factor,
                          const gfx::ColorSpace& color_space) {
  if (size == size_ && color_space == color_space_)
    return;
#if !defined(OS_MACOSX)
  // TODO(ccameron): This assert is being hit on Mac try jobs. Determine if that
  // is cause for concern or if it is benign.
  // http://crbug.com/524624
  DCHECK(!current_surface_);
#endif
  size_ = size;
  color_space_ = color_space;

  // TODO: add stencil buffer when needed.
  gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
  gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                            texture_target_, 0, 0);

  FreeAllSurfaces();
}

void BufferQueue::RecreateBuffers() {
  // We need to recreate the buffers, for whatever reason the old ones are not
  // presentable on the device anymore.
  // Unused buffers can be freed directly, they will be re-allocated as needed.
  // Any in flight, current or displayed surface must be replaced.
  available_surfaces_.clear();

  // Recreate all in-flight surfaces and put the recreated copies in the queue.
  for (auto& surface : in_flight_surfaces_)
    surface = RecreateBuffer(std::move(surface));

  current_surface_ = RecreateBuffer(std::move(current_surface_));
  displayed_surface_ = RecreateBuffer(std::move(displayed_surface_));

  if (current_surface_) {
    // If we have a texture bound, we will need to re-bind it.
    gl_->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
    gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                              texture_target_, current_surface_->texture, 0);
  }
}

std::unique_ptr<BufferQueue::AllocatedSurface> BufferQueue::RecreateBuffer(
    std::unique_ptr<AllocatedSurface> surface) {
  if (!surface)
    return nullptr;

  std::unique_ptr<AllocatedSurface> new_surface(GetNextSurface());
  if (!new_surface)
    return nullptr;

  new_surface->damage = surface->damage;

  // Copy the entire texture.
  CopyBufferDamage(new_surface->texture, surface->texture, gfx::Rect(),
                   gfx::Rect(size_));
  return new_surface;
}

void BufferQueue::PageFlipComplete() {
  DCHECK(!in_flight_surfaces_.empty());
  if (displayed_surface_)
    available_surfaces_.push_back(std::move(displayed_surface_));
  displayed_surface_ = std::move(in_flight_surfaces_.front());
  in_flight_surfaces_.pop_front();
}

void BufferQueue::FreeAllSurfaces() {
  displayed_surface_.reset();
  current_surface_.reset();
  // This is intentionally not emptied since the swap buffers acks are still
  // expected to arrive.
  for (auto& surface : in_flight_surfaces_)
    surface = nullptr;
  available_surfaces_.clear();
}

void BufferQueue::FreeSurfaceResources(AllocatedSurface* surface) {
  if (!surface->texture)
    return;

  gl_->BindTexture(texture_target_, surface->texture);
  gl_->ReleaseTexImage2DCHROMIUM(texture_target_, surface->image);
  gl_->DeleteTextures(1, &surface->texture);
  gl_->DestroyImageCHROMIUM(surface->image);
  surface->buffer.reset();
  allocated_count_--;
}

std::unique_ptr<BufferQueue::AllocatedSurface> BufferQueue::GetNextSurface() {
  if (!available_surfaces_.empty()) {
    std::unique_ptr<AllocatedSurface> surface =
        std::move(available_surfaces_.back());
    available_surfaces_.pop_back();
    return surface;
  }

  GLuint texture;
  gl_->GenTextures(1, &texture);

  // We don't want to allow anything more than triple buffering.
  DCHECK_LT(allocated_count_, 4U);
  std::unique_ptr<gfx::GpuMemoryBuffer> buffer(
      gpu_memory_buffer_manager_->AllocateGpuMemoryBuffer(
          size_, format_, gfx::BufferUsage::SCANOUT, surface_handle_));
  if (!buffer.get()) {
    gl_->DeleteTextures(1, &texture);
    DLOG(ERROR) << "Failed to allocate GPU memory buffer";
    return nullptr;
  }
  buffer->SetColorSpaceForScanout(color_space_);

  uint32_t id =
      gl_->CreateImageCHROMIUM(buffer->AsClientBuffer(), size_.width(),
                               size_.height(), internal_format_);
  if (!id) {
    LOG(ERROR) << "Failed to allocate backing image surface";
    gl_->DeleteTextures(1, &texture);
    return nullptr;
  }

  allocated_count_++;
  gl_->BindTexture(texture_target_, texture);
  gl_->BindTexImage2DCHROMIUM(texture_target_, id);
  return base::WrapUnique(new AllocatedSurface(this, std::move(buffer), texture,
                                               id, gfx::Rect(size_)));
}

BufferQueue::AllocatedSurface::AllocatedSurface(
    BufferQueue* buffer_queue,
    std::unique_ptr<gfx::GpuMemoryBuffer> buffer,
    uint32_t texture,
    uint32_t image,
    const gfx::Rect& rect)
    : buffer_queue(buffer_queue),
      buffer(buffer.release()),
      texture(texture),
      image(image),
      damage(rect) {}

BufferQueue::AllocatedSurface::~AllocatedSurface() {
  buffer_queue->FreeSurfaceResources(this);
}

}  // namespace display_compositor


text:
namespace thinkyoung {
    namespace blockchain {
        const OperationTypeEnum WithdrawOperation::type = withdraw_op_type;
        const OperationTypeEnum DepositOperation::type = deposit_op_type;
        const OperationTypeEnum RegisterAccountOperation::type = register_account_op_type;
        const OperationTypeEnum UpdateAccountOperation::type = update_account_op_type;
        const OperationTypeEnum WithdrawPayOperation::type = withdraw_pay_op_type;
        const OperationTypeEnum CreateAssetOperation::type = create_asset_op_type;
        const OperationTypeEnum UpdateAssetOperation::type = update_asset_op_type;
        const OperationTypeEnum IssueAssetOperation::type = issue_asset_op_type;
        const OperationTypeEnum DefineSlateOperation::type = define_slate_op_type;
        const OperationTypeEnum UpdateSigningKeyOperation::type = update_signing_key_op_type;
        const OperationTypeEnum UpdateBalanceVoteOperation::type = update_balance_vote_op_type;
        const OperationTypeEnum UpdateAssetExtOperation::type = update_asset_ext_op_type;
        const OperationTypeEnum ImessageMemoOperation::type = imessage_memo_op_type;
        const OperationTypeEnum ContractInfoOperation::type = contract_info_op_type;
        const OperationTypeEnum RegisterContractOperation::type = register_contract_op_type;
        const OperationTypeEnum UpgradeContractOperation::type = upgrade_contract_op_type;
        const OperationTypeEnum DestroyContractOperation::type = destroy_contract_op_type;
        const OperationTypeEnum WithdrawContractOperation::type = withdraw_contract_op_type;
        const OperationTypeEnum TransferContractOperation::type = transfer_contract_op_type;
        const OperationTypeEnum BalancesWithdrawOperation::type = balances_withdraw_op_type;
        const OperationTypeEnum TransactionOperation::type = transaction_op_type;
        const OperationTypeEnum StorageOperation::type = storage_op_type;
        const OperationTypeEnum CallContractOperation::type = call_contract_op_type;
        const OperationTypeEnum EventOperation::type = event_op_type;
        const OperationTypeEnum DepositContractOperation::type = deposit_contract_op_type;
        const OperationTypeEnum OnDestroyOperation::type = on_destroy_op_type;
        const OperationTypeEnum OnUpgradeOperation::type = on_upgrade_op_type;
        const OperationTypeEnum OnCallSuccessOperation::type = on_call_success_op_type;
        static bool first_chain = []()->bool{
            thinkyoung::blockchain::OperationFactory::instance().register_operation<WithdrawOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<DepositOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<RegisterAccountOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<UpdateAccountOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<WithdrawPayOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<CreateAssetOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<UpdateAssetOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<IssueAssetOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<DefineSlateOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<UpdateSigningKeyOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<UpdateBalanceVoteOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<UpdateAssetExtOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<ImessageMemoOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<ContractInfoOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<RegisterContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<UpgradeContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<DestroyContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<WithdrawContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<TransferContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<BalancesWithdrawOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<TransactionOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<StorageOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<CallContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<EventOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<DepositContractOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<OnDestroyOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<OnUpgradeOperation>();
            thinkyoung::blockchain::OperationFactory::instance().register_operation<OnCallSuccessOperation>();

            return true;
        }();

        OperationFactory& OperationFactory::instance() {
            static std::unique_ptr<OperationFactory> inst(new OperationFactory());
            return *inst;
        }

        void OperationFactory::to_variant(const thinkyoung::blockchain::Operation& in, fc::variant& output) {
            try {
                auto converter_itr = _converters.find(in.type.value);
                FC_ASSERT(converter_itr != _converters.end(), "No such converter!");
                converter_itr->second->to_variant(in, output);
            }

            FC_RETHROW_EXCEPTIONS(warn, "")
        }

        void OperationFactory::from_variant(const fc::variant& in, thinkyoung::blockchain::Operation& output) {
            try {
                auto obj = in.get_object();

                if (obj["type"].as_string() == "define_delegate_slate_op_type") {
                    output.type = define_slate_op_type;
                    return;
                }

                output.type = obj["type"].as<OperationTypeEnum>();
                auto converter_itr = _converters.find(output.type.value);
                FC_ASSERT(converter_itr != _converters.end());
                converter_itr->second->from_variant(in, output);
            }

            FC_RETHROW_EXCEPTIONS(warn, "", ("in", in))
        }

    }
} // thinkyoung::blockchain

namespace fc {
    void to_variant(const thinkyoung::blockchain::Operation& var, variant& vo) {
        thinkyoung::blockchain::OperationFactory::instance().to_variant(var, vo);
    }

    void from_variant(const variant& var, thinkyoung::blockchain::Operation& vo) {
        thinkyoung::blockchain::OperationFactory::instance().from_variant(var, vo);
    }
}


text:
module Stitch
  class CoffeeScriptCompiler < Compiler
    extensions :cs, :coffee

    enabled begin
      require "coffee-script"
      true
    rescue LoadError
      false
    end

    source true

    def compile(path)
      source = File.read(path)
      CoffeeScript.compile(source, :filename => path.to_s)
    end
  end
end


text:
package com.intellij.diagnostic;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.diagnostic.Attachment;
import consulo.logging.Logger;
import com.intellij.openapi.project.DumbAwareAction;

import java.awt.event.InputEvent;

@SuppressWarnings({"HardCodedStringLiteral"})
public class DropAnErrorWithAttachmentsAction extends DumbAwareAction {
  public DropAnErrorWithAttachmentsAction() {
    super("Drop an error with attachments", "Hold down SHIFT for multiple attachments", null);
  }

  public void actionPerformed(AnActionEvent e) {
    final boolean multipleAttachments = (e.getModifiers() & InputEvent.SHIFT_MASK) != 0;
    Attachment[] attachments;
    if (multipleAttachments) {
      attachments = new Attachment[]{new Attachment("first.txt", "first content"), new Attachment("second.txt", "second content")};
    }
    else {
      attachments = new Attachment[]{new Attachment("attachment.txt", "content")};
    }
    Logger.getInstance("test (with attachments)").error(LogMessageEx.createEvent("test", "test details", attachments));
  }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
	<!--
	<security-domain>java:/jaas/JazzOMRAutRealm</security-domain>
	 -->
</jboss-web>


text:
layout: model
title: Chunk Entity Resolver RxNorm-scdc
author: John Snow Labs
name: chunkresolve_rxnorm_in_clinical
date: 2021-04-16
tags: [entity_resolution, clinical, licensed, en]
task: Entity Resolution
language: en
edition: Healthcare NLP 3.0.0
spark_version: 3.0
deprecated: true
annotator: ChunkEntityResolverModel
article_header:
  type: cover
use_language_switcher: "Python-Scala-Java"
---

## Description

This model maps extracted medical entities to RxNorm codes using chunk embeddings (augmented with synonyms, four times richer than previous resolver).

## Predicted Entities

RxNorm codes

{:.btn-box}
[Live Demo](https://demo.johnsnowlabs.com/healthcare/ER_RXNORM/){:.button.button-orange}
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/3.Clinical_Entity_Resolvers.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/chunkresolve_rxnorm_in_clinical_en_3.0.0_3.0_1618605233213.zip){:.button.button-orange.button-orange-trans.arr.button-icon}

## How to use

<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python

...
resolver = ChunkEntityResolverModel.pretrained("chunkresolve_rxnorm_in_clinical","en","clinical/models")    .setInputCols("token","chunk_embeddings")    .setOutputCol("entity")

pipeline = Pipeline(stages = [documentAssembler, sentenceDetector, tokenizer, word_embeddings, clinical_ner, ner_converter, chunk_embeddings, resolver])

data = spark.createDataFrame([["A 28-year-old female with a history of gestational diabetes mellitus diagnosed eight years prior to presentation and subsequent type two diabetes mellitus (T2DM), one prior episode of HTG-induced pancreatitis three years prior to presentation, associated with an acute hepatitis, and obesity with a body mass index (BMI) of 33.5 kg/m2, presented with a one-week history of polyuria, polydipsia, poor appetite, and vomiting. Two weeks prior to presentation, she was treated with a five-day course of amoxicillin for a respiratory tract infection. She was on metformin, glipizide, and dapagliflozin for T2DM and atorvastatin and gemfibrozil for HTG. She had been on dapagliflozin for six months at the time of presentation."]]).toDF("text")
model = pipeline.fit(data)
results = model.transform(data)
...

```
```scala

...
val resolver = ChunkEntityResolverModel.pretrained("chunkresolve_rxnorm_in_clinical","en","clinical/models")    .setInputCols("token","chunk_embeddings")    .setOutputCol("entity")

val pipeline = new Pipeline().setStages(Array(document_assembler, sbert_embedder, resolver))

val data = Seq("A 28-year-old female with a history of gestational diabetes mellitus diagnosed eight years prior to presentation and subsequent type two diabetes mellitus (T2DM), one prior episode of HTG-induced pancreatitis three years prior to presentation, associated with an acute hepatitis, and obesity with a body mass index (BMI) of 33.5 kg/m2, presented with a one-week history of polyuria, polydipsia, poor appetite, and vomiting. Two weeks prior to presentation, she was treated with a five-day course of amoxicillin for a respiratory tract infection. She was on metformin, glipizide, and dapagliflozin for T2DM and atorvastatin and gemfibrozil for HTG. She had been on dapagliflozin for six months at the time of presentation.").toDF("text")

val result = pipeline.fit(data).transform(data)

```
</div>

## Results

```bash

+---------------------------------------------------------------+---------+----------------------------------------------------------------------------------------------------+-------+----------+
|                                                          chunk|   entity|                                                                                target_text|   code|confidence|
+---------------------------------------------------------------+---------+----------------------------------------------------------------------------------------------------+-------+----------+
|                                                      metformin|TREATMENT|metFORMIN compounding powder:::Metformin Hydrochloride Powder:::metFORMIN 500 mg oral tablet:::me...| 601021|    0.2364|
|                                                      glipizide|TREATMENT|Glipizide Powder:::Glipizide Crystal:::Glipizide Tablets:::glipiZIDE 5 mg oral tablet:::glipiZIDE...| 241604|    0.3647|
|dapagliflozin for T2DM and atorvastatin and gemfibrozil for HTG|TREATMENT|Ezetimibe and Atorvastatin Tablets:::Amlodipine and Atorvastatin Tablets:::Atorvastatin Calcium T...|1422084|    0.3407|
|                                                  dapagliflozin|TREATMENT|Dapagliflozin Tablets:::dapagliflozin 5 mg oral tablet:::dapagliflozin 10 mg oral tablet:::Dapagl...|1488568|    0.7070|
+---------------------------------------------------------------+---------+----------------------------------------------------------------------------------------------------+-------+----------+

```

{:.model-param}
## Model Information

{:.table-model}
|---|---|
|Model Name:|chunkresolve_rxnorm_in_clinical|
|Compatibility:|Healthcare NLP 3.0.0+|
|License:|Licensed|
|Edition:|Official|
|Input Labels:|[token, chunk_embeddings]|
|Output Labels:|[rxnorm_code]|
|Language:|en|


text:
package demo;

//@EnableWebSecurity(debug = true)
//class SecurityConfig extends WebSecurityConfigurerAdapter {
//	BasicAuthenticationFilter fd;
//	HttpSessionSecurityContextRepository f;
//	SecurityContextPersistenceFilter g;
////	OrderedRequestContextFilter
////	HttpSessionRequestCache
//	@Override
//	protected void configure(HttpSecurity http) throws Exception {
//		http
//				.authorizeRequests()
//				.anyRequest().authenticated()
//				.and()
//				.httpBasic()
//				.authenticationEntryPoint(dRFAuthenticationEntryPoint())
//				.and()
//				.requestCache()
//				.requestCache(httpSessionRequestCache())
//				.and()
//				.anonymous().disable();}
//
//
//	@Bean
//	public HttpSessionRequestCache httpSessionRequestCache() {
//		HttpSessionRequestCache httpSessionRequestCache = new HttpSessionRequestCache();
//		httpSessionRequestCache.setCreateSessionAllowed(false);
//		return httpSessionRequestCache;
//	}
//
//	@Bean
//	public DRFAuthenticationEntryPoint dRFAuthenticationEntryPoint() {
//		return new DRFAuthenticationEntryPoint();
//
//	}
//
//	@Autowired
//	public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
//
//		auth
//				.inMemoryAuthentication()
//				.withUser("user").password("password").roles("USER");
//	}
//}

import com.drf.betsservice.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by jweng on 7/12/2016.
 */
//
//@EnableWebSecurity
//public class SecurityConfig extends WebSecurityConfigurerAdapter {
//
////	@Bean(name="myAuthenticationManager")
////	@Override
////	public AuthenticationManager authenticationManagerBean() throws Exception {
////		return super.authenticationManagerBean();
////	}
//
//    @Bean
//    public MyUsernamePasswordAuthenticationFilter authenticationFilteriiiii() {
//        MyUsernamePasswordAuthenticationFilter authFilter = new MyUsernamePasswordAuthenticationFilter();
//        authFilter.setRequiresAuthenticationRequestMatcher(new AntPathRequestMatcher("/login","POST"));
////		authFilter.setAuthenticationManager(myAuthenticationManager);
////		authFilter.setAuthenticationSuccessHandler(new MySuccessHandler("/app"));
////		authFilter.setAuthenticationFailureHandler(new MyFailureHandler("/login?error=1"));
////		authFilter.setUsernameParameter("username");
////		authFilter.setPasswordParameter("password");
//        return authFilter;
//    }
//
//    @Autowired
//    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
//        auth.authenticationProvider(new DRFAuthenticationProvider());
///*		auth
//				.inMemoryAuthentication()
//				.withUser("user").password("password").roles("USER");*/
//    }
//
//    protected void configure(HttpSecurity http) throws Exception {
//        http.csrf().disable()
//                .authorizeRequests()
//                .anyRequest().authenticated()
//                .and()
//                .addFilterBefore(new UsernamePasswordAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class);
//    }
//
//
//}

@Configuration
@EnableWebSecurity(debug = true)
//@EnableGlobalMethodSecurity(prePostEnabled = true)
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Value("${betsService-server-host}")
    private String betsServiceHost;

    @Bean
    public DRFCustomSuccessHandler drfCustomSuccessHandler() {
        DRFCustomSuccessHandler drfCustomSuccessHandler = new DRFCustomSuccessHandler();
        return drfCustomSuccessHandler;
    }

    @Bean
    public HttpInvokerProxyFactoryBean httpInvokerProxy() {
        HttpInvokerProxyFactoryBean proxy = new HttpInvokerProxyFactoryBean();
        proxy.setServiceInterface(UserService.class);
        proxy.setServiceUrl(betsServiceHost);
        proxy.afterPropertiesSet();
        UserService userService = (UserService) proxy.getObject();
        try {
            String result = userService.test();

            System.out.println(result);

        } catch (Exception e) {
            e.printStackTrace();
        }

        return proxy;
    }

    @Bean
    @Override
    public AuthenticationManager authenticationManagerBean() throws Exception {
        List<AuthenticationProvider> authenticationProviderList = new ArrayList<AuthenticationProvider>();
        authenticationProviderList.add(drfAuthenticationProvider);
        AuthenticationManager authenticationManager = new ProviderManager(
                authenticationProviderList);
        return authenticationManager;
    }

    @Bean
    DRFAuthenticationFilter drfAuthenticationFilter() throws Exception {
        System.out.print("dffffffffffffff");
        DRFAuthenticationFilter drfAuthenticationFilter = new DRFAuthenticationFilter();
        drfAuthenticationFilter.setAuthenticationManager(authenticationManagerBean());
        drfAuthenticationFilter.setAuthenticationSuccessHandler(drfCustomSuccessHandler());
        return drfAuthenticationFilter;
    }

    @Autowired
    private DRFAuthenticationProvider drfAuthenticationProvider;

    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().disable()
                .authorizeRequests()
                .anyRequest().authenticated()
                .and()
                .addFilterBefore(drfAuthenticationFilter(), BasicAuthenticationFilter.class)
                .exceptionHandling()
                .authenticationEntryPoint(dRFAuthenticationEntryPoint())
                .and()
                .requestCache()
                .requestCache(httpSessionRequestCache())
                .and()
                .anonymous().disable()
        ;
        /*.addFilterBefore(customUsernamePasswordAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)*/

    }

    @Bean
    public HttpSessionRequestCache httpSessionRequestCache() {
        HttpSessionRequestCache httpSessionRequestCache = new HttpSessionRequestCache();
        httpSessionRequestCache.setCreateSessionAllowed(false);
        return httpSessionRequestCache;
    }

    @Bean
    public DRFAuthenticationEntryPoint dRFAuthenticationEntryPoint() {
        return new DRFAuthenticationEntryPoint();

    }

//    public void configure(AuthenticationManagerBuilder auth)  throws Exception {
//
//        auth.authenticationProvider(drfAuthenticationProvider);
//    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.commerce.models;

import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of RateCards. */
public interface RateCards {
    /**
     * Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID,
     * Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to
     * service names, types, resources, units of measure, and regions, is subject to change at any time and without
     * notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to
     * uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing
     * model, you will be notified in advance of the change.
     *
     * @param filter The filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical operators at this
     *     time. All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part
     *     of the $filter.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return price and Metadata information for resources.
     */
    ResourceRateCardInfo get(String filter);

    /**
     * Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID,
     * Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to
     * service names, types, resources, units of measure, and regions, is subject to change at any time and without
     * notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to
     * uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing
     * model, you will be notified in advance of the change.
     *
     * @param filter The filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical operators at this
     *     time. All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part
     *     of the $filter.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return price and Metadata information for resources.
     */
    Response<ResourceRateCardInfo> getWithResponse(String filter, Context context);
}


text:
package traefikConsul

import "testing"

func TestDefaultIPAddress(t *testing.T) {
	addr, err := DefaultIPAddress()

	if err != nil {
		t.Logf("DefaultIPAddress() error(%s)", err.Error())
	}

	if len(addr) == 0 {
		t.Error("the length of the address is 0")
		t.FailNow()
	}

	t.Log("Address:", addr)
}

func TestIPAddressFromIface(t *testing.T) {
	addr, err := IPAddressFromIface("enp3s0")

	if err != nil {
		t.Errorf("IPAddressFromIface() error(%s)", err.Error())
	}

	if len(addr) == 0 {
		t.Error("the length of the address is 0")
		t.FailNow()
	}

	t.Log("Address: ", addr)
}


text:
var helpers = require('./server/helpers');

console.log('=============> Test Starts <=============');
helpers.talksDataStructured();
console.log('==============> Test Ends <==============');


text:
<?xml version="1.0" encoding="utf-8"?>

<title>Zend_Navigation_Page_Uri</title>

    <para>
        Pages of type <classname>Zend_Navigation_Page_Uri</classname> can be
        used to link to pages on other domains or sites, or to implement
        custom logic for the page. <acronym>URI</acronym> pages are simple; in addition
        to the common page options, a <acronym>URI</acronym> page takes only one option —
        uri. The uri will be returned when
        calling $page->getHref(), and may be a
        <type>String</type> or <constant>NULL</constant>.
    </para>

    <note>
        <para>
            <classname>Zend_Navigation_Page_Uri</classname> will not try to determine
            whether it should be active when calling $page->isActive().
            It merely returns what currently is set, so to make a <acronym>URI</acronym> page active
            you have to manually call $page->setActive() or
            specifying active as a page option when constructing.
        </para>
    </note>

<title>URI page options</title>

        <tgroup cols="4">

                <row>
                    <entry>Key</entry>
                    <entry>Type</entry>
                    <entry>Default</entry>
                    <entry>Description</entry>
                </row>

                <row>
                    <entry>uri</entry>
                    <entry><type>String</type></entry>
                    <entry><constant>NULL</constant></entry>

                    <entry>
                        <acronym>URI</acronym> to page. This can be any string or
                        <constant>NULL</constant>.
                    </entry>
                </row>

        </tgroup>


text:
declare function run(a: number): void;
run(1);

//// [isolatedModulesPlainFile-System.js]
System.register([], function(exports_1) {
    "use strict";
    return {
        setters:[],
        execute: function() {
            run(1);
        }
    }
});


text:
<?php
require dirname(__FILE__) . "/example.inc.php";
require dirname(__FILE__) . "/CdTxManager.class.php";

$container = S2ContainerFactory::create("./resource/example.dicon");
$manager = $container->getComponent("CdTxManager");

echo "requiredInsert start" . PHP_EOL;
try {
    $manager->requiredInsert();
} catch(Exception $e) {
    var_dump($e->getMessage());
}
echo "requiredInsert end" . PHP_EOL;

echo "requiresNewInsert start" . PHP_EOL;
try {
    $manager->requiresNewInsert();
} catch(Exception $e) {
    var_dump($e->getMessage());
}
echo "requiresNewInsert end" . PHP_EOL;

echo "mandatoryInsert start" . PHP_EOL;
try {
    $manager->mandatoryInsert();
} catch(Exception $e) {
    var_dump($e->getMessage());
}
echo "mandatoryInsert end" . PHP_EOL;

echo "getAll start" . PHP_EOL;
try {
    var_dump($manager->getAll());
} catch(Exception $e) {
    var_dump($e->getMessage());
}
echo "getAll end" . PHP_EOL;

try {
    $manager->delete();
} catch(Exception $e) {
    var_dump($e->getMessage());
}

?>


text:
from . object import Object

class Region(object):
	__slots__ = 'context', 'objects'

	def __init__(self, context):
		self.context = context
		self.objects = {}

	def object(self, obj):
		if obj not in self.objects:
			result = Object(self.context, obj)
			self.objects[obj] = result
		else:
			result = self.objects[obj]

		return result


text: [[Non existing page]]


text:
source "${STAGEFILE}"

STAGES=(1)

execute_stages