text:
  "use strict";

  var express = require('express');
  var app = express();
  var fs = require("fs");

  var DDPClient = require('ddp');
  var connectionStatus ;

   var ddpclient = new DDPClient({
    // All properties optional, defaults shown
    autoReconnect : true,
    autoReconnectTimer : 500,
    maintainCollections : true,
    url: 'ws://test.kloojj.com/backend/websocket'
  });

  ddpclient.connect(function(err,wasReconnect) {
      //connection.subscribe('some_name');

  	if (err) {
      console.log("DDP connection error!");
  	connectionStatus = "DDP connection error!" ;
      return;
  	}

    else if (wasReconnect) {
      console.log("Reestablishment of a connection.");
  	connectionStatus = "Reestablishment of a connection.";
    }
   else {
  	console.log("connected!");
  	connectionStatus = "connected!";
   }

    //res.end( "Meteor connection is succesful by web serices " );
  });

  app.get('/connection', function (req, res) {

   res.end( connectionStatus );

  })

  app.get('/meteorservice', function (req, res) {

  	 var feedDataObj = {}; // input object for get kloojj feeds
      feedDataObj.userId = 'gTzsGsg9qnfpLZHBk';
      feedDataObj.limit = 15;
      feedDataObj.offset = 0;
  	 	  console.log("i m in check feedDataObj : "+feedDataObj.userId);
      ddpclient.call(
        "getKloojjFeed",             // name of Meteor Method being called
         [feedDataObj],            // parameters to send to Meteor Method
        function (err, result) {   // callback which returns the method call results
         // console.log("called function, result: " + result);
  		//console.log(JSON.stringify(result));
  		console.log(JSON.stringify(result, null, 4));

  		 //res.end( JSON.stringify(result) );
  		 res.end( JSON.stringify(result, null, 4) );
        }
      );

  })

  /* (function () {
      var x = "Hello!!";      // I will invoke myself
  })();

   */
  app.get('/meteorservicepara', function (req, res) {
  	//var useridmeteor=req.query.useridmeteor;

  	 var feedDataObj = {}; // input object for get kloojj feeds
      feedDataObj.userId = req.query.useridmeteor;
      feedDataObj.limit = 15;
      feedDataObj.offset = 0;
  	  console.log("i m in check feedDataObj : "+feedDataObj.userId);
      ddpclient.call(
       "getKloojjFeed",             // name of Meteor Method being called
         [feedDataObj],            // parameters to send to Meteor Method
        function (err, result) {   // callback which returns the method call results
         // console.log("called function, result: " + result);
  		//console.log(JSON.stringify(result));

  		console.log(JSON.stringify(result, null, 4));
  		//For Plain Text
  	    //res.end( JSON.stringify(result) );
  		//For Formatted text
  	 res.end( JSON.stringify(result, null, 4));

        }
      );

  })

 /*  var data = {};
       data.uid = '24RFLYgmR7DiFEwjp';
       data.fuid = 'iDvuhFodfGKWMgPD5';
       data.isFollow = 1;
       Meteor.call('followUser',data,function(err, response) {
        console.log(response);
      });
	   */

	app.get('/followuser', function (req, res) {
  	//var useridmeteor=req.query.useridmeteor;

      //feedDataObj.userId = req.query.useridmeteor;

	  var data = {};

	   //data.uid = '24RFLYgmR7DiFEwjp';
       //data.fuid = 'iDvuhFodfGKWMgPD5';

	   data.uid = req.query.useridmeteor;
       data.fuid = req.query.tofollowuser;

       data.isFollow = 1;

  	  console.log("i m in check feedDataObj : "+data.uid);
      ddpclient.call(
       "followUser",             // name of Meteor Method being called
         [data],            // parameters to send to Meteor Method
        function (err, result) {   // callback which returns the method call results
         // console.log("called function, result: " + result);
  		//console.log(JSON.stringify(result));

  		console.log(JSON.stringify(result, null, 4));
  		//For Plain Text
  	    //res.end( JSON.stringify(result) );
  		//For Formatted text
  	 res.end( JSON.stringify(result, null, 4));

        }
      );

  })

  //ADD VIDEO Kloojjed

   app.get('/addkloojj', function (req, res) {

		var videokloojj = {
                title:"From Node Js WebserviceScript",
                VUID: '8lU2c8ktIs0',
                desc: 'Crash Landing on Mars - Science Universe Documentary HD',
                comments: "Comment From Node Js WebserviceScript",
                starttime:143.840441,
                endtime: 160.956103,
                duration: 2543.501,
                acl: true,
                thumbnail: 'https://test.kloojj.com/commonImages/kloojjdefault.png',
                userId: 'gTzsGsg9qnfpLZHBk',
                sourceurl:'https://www.youtube.com/watch?v=8lU2c8ktIs0',
                origin: 'youtube',
                userFullName: 'yogesh salunke',
                userPhotoUrl: 'http://www.youth4work.com/Images/Users/133094.jpg'

            };

//userPhotoUrl: 'https://graph.facebook.com/109642672807335/picture'
//https://pbs.twimg.com/profile_images/471602601918595072/bPXR68cv.jpeg

            var video = {
                title: 'Title Node Js WebserviceScript',
                desc: 'Crash Landing on Mars - Science Universe Documentary HD',
                VUID: '8lU2c8ktIs0',
                sourceurl:'https://www.youtube.com/watch?v=8lU2c8ktIs0',
                origin: 'youtube',
                tags: '',
                thumbnail: ''
            };

            var data = {
                videokloojj: videokloojj,
                video: video,
                userId: 'gTzsGsg9qnfpLZHBk',
                subId: ''
            }

  	 	  console.log("i m in check feedDataObj : "+videokloojj.userId);
				ddpclient.call(
				"addVideoKloojj",             // name of Meteor Method being called
				 [data],            // parameters to send to Meteor Method
				function (err, result) {   // callback which returns the method call results
				 // console.log("called function, result: " + result);
				//console.log(JSON.stringify(result));
				console.log(JSON.stringify(result, null, 4));

				 //res.end( JSON.stringify(result) );
				 res.end( JSON.stringify(result, null, 4) );
        }
      );

  })

   app.get('/addkloojjpara', function (req, res) {

	   if (req.query.useridmeteor === 'gTzsGsg9qnfpLZHBk')
	   {
		 var  photourl = 'http://www.youth4work.com/Images/Users/133094.jpg'
	   }
	   else
	   {
		 var  photourl = 'https://graph.facebook.com/109642672807335/picture'
	   }

		var videokloojj = {
                title:"From Node Js WebserviceScript",
                VUID: '8lU2c8ktIs0',
                desc: 'Crash Landing on Mars - Science Universe Documentary HD',
                comments: "Comment From Node Js WebserviceScript",
                starttime:143.840441,
                endtime: 160.956103,
                duration: 2543.501,
                acl: true,
                thumbnail: 'https://test.kloojj.com/commonImages/kloojjdefault.png',
                userId: req.query.useridmeteor,
                sourceurl:'https://www.youtube.com/watch?v=8lU2c8ktIs0',
                origin: 'youtube',
                userFullName: req.query.username,
                userPhotoUrl: photourl

            };

//userPhotoUrl: 'https://graph.facebook.com/109642672807335/picture'
//https://pbs.twimg.com/profile_images/471602601918595072/bPXR68cv.jpeg

            var video = {
                title: 'Title Node Js WebserviceScript',
                desc: 'Crash Landing on Mars - Science Universe Documentary HD',
                VUID: '8lU2c8ktIs0',
                sourceurl:'https://www.youtube.com/watch?v=8lU2c8ktIs0',
                origin: 'youtube',
                tags: '',
                thumbnail: ''
            };

            var data = {
                videokloojj: videokloojj,
                video: video,
                userId: req.query.useridmeteor,
                subId: ''
            }

  	 	  console.log("i m in check feedDataObj : "+videokloojj.userId);
				ddpclient.call(
				"addVideoKloojj",             // name of Meteor Method being called
				 [data],            // parameters to send to Meteor Method
				function (err, result) {   // callback which returns the method call results
				 // console.log("called function, result: " + result);
				//console.log(JSON.stringify(result));
				console.log(JSON.stringify(result, null, 4));

				 //res.end( JSON.stringify(result) );
				 res.end( JSON.stringify(result, null, 4) );
        }
      );

  })

  app.get('/listUsers', function (req, res) {
     fs.readFile( __dirname + "/" + "users.json", 'utf8', function (err, data) {
         console.log( data );
         res.end( data );
     });
  })

  var server = app.listen(8081, function () {

    var host = server.address().address
    var port = server.address().port

    console.log("LOAD app listening at http://%s:%s", host, port)

  })

  // for analytics to capture
  /*  Meteor.call('captureAnalytics' , source , type , function (error, result) {
            if(error) {
                  callback();
            }else
            {
               callback();
               //console.log(result);
            }
           });
 */

 /*

 * @param {Object}  data { videoklojj {description, stime, etime, public, thumburl },
     video{sourceurl ,VUID,tittle,desc,origin,tags,thumbnail },
     userId,subId (optional - subscriptionId)}
Sent on:
12:29 pm
From:
Abhijit Shivathare
addVideoKloojj
From:
Abhijit Shivathare
// Push Kloojjed items in list and save data in database.
        $scope.saveClip = function (videoObj, videoCount) {
            var comments = '';
            if (videoObj.comments) {
                comments = videoObj.comments
            }

            var userProfilePhotoUrl = '' + kango.storage.getItem('kup');
            if (/^(chrome-extension)/.test(userProfilePhotoUrl)) {
                userProfilePhotoUrl = '';
            } else {
                userProfilePhotoUrl = decodeURIComponent(kango.storage.getItem('kup'));
            }

            var videokloojj = {
                title:"From Jmeter Script",
                VUID: '8lU2c8ktIs0',
                desc: 'Crash Landing on Mars - Science Universe Documentary HD',
                comments: "From Jemter Script",
                starttime: 0,
                endtime: 2,
                duration:  '42:23',
                acl: public,
                thumbnail: 'https://test.kloojj.com/commonImages/kloojjdefault.png',
                userId: 'gTzsGsg9qnfpLZHBk',
                sourceurl:'https://www.youtube.com/watch?v=8lU2c8ktIs0',
                origin: 'youtube',
                userFullName: 'yogesh salunke',
                userPhotoUrl: 'https://graph.facebook.com/109642672807335/picture'

            };

            var video = {
                title: 'Title from jmeter script',
                desc: 'Crash Landing on Mars - Science Universe Documentary HD',
                VUID: '8lU2c8ktIs0',
                sourceurl:'https://www.youtube.com/watch?v=8lU2c8ktIs0',
                origin: 'youtube',
                tags: '',
                thumbnail: ''
            };

            var data = {
                videokloojj: videokloojj,
                video: video,
                userId: 'gTzsGsg9qnfpLZHBk',
                subId: ''
            }

            $ionicAnalytics.track('click on save kloojj it');

            Meteor.call('addVideoKloojj', data, function (error, result) {
                if (result) {
                    // console.log(result);
                }
            });
        };

		 */

		 //http://stackoverflow.com/questions/30024810/jmeter-web-application-performance-testing-doubts


text:
window.COLORS = [
    {"name": "aqua", "category": "teal"},
    {"name": "aquamarine", "category": "teal"},
    {"name": "azure", "category": "light blue"},
    {"name": "beige", "category": "light orange"},
    {"name": "bisque", "category": "light orange"},
    {"name": "black", "category": "dark green"},
    {"name": "almond", "category": "light orange"},
    {"name": "blue", "category": "blue"},
    {"name": "brown", "category": "dark orange"},
    {"name": "bronze", "category": "dark orange"},
    {"name": "wood", "category": "dark orange"},
    {"name": "chartreuse", "category": "green"},
    {"name": "chocolate", "category": "dark orange"},
    {"name": "coral", "category": "light orange"},
    {"name": "silk", "category": "light orange"},
    {"name": "crimson", "category": "red"},
    {"name": "cyan", "category": "teal"},
    {"name": "brick", "category": "red"},
    {"name": "floral", "category": "violet"},
    {"name": "forest", "category": "green"},
    {"name": "fuchsia", "category": "violet"},
    {"name": "gainsboro", "category": "light blue"},
    {"name": "ghost", "category": "light blue"},
    {"name": "gold", "category": "yellow"},
    {"name": "goldenrod", "category": "yellow"},
    {"name": "gray", "category": "light blue"},
    {"name": "green", "category": "green"},
    {"name": "honeydew", "category": "light blue"},
    {"name": "indigo", "category": "purple"},
    {"name": "ivory", "category": "light blue"},
    {"name": "khaki", "category": "yellow"},
    {"name": "lavender", "category": "purple"},
    {"name": "lawn", "category": "green"},
    {"name": "lemon", "category": "yellow"},
    {"name": "lime", "category": "green"},
    {"name": "linen", "category": "yellow"},
    {"name": "magenta", "category": "violet"},
    {"name": "maroon", "category": "red"},
    {"name": "midnight", "category": "dark green"},
    {"name": "mint", "category": "green"},
    {"name": "misty", "category": "light blue"},
    {"name": "moccasin", "category": "light orange"},
    {"name": "navy", "category": "blue"},
    {"name": "oldlace", "category": "light blue"},
    {"name": "olive", "category": "green"},
    {"name": "orange", "category": "dark orange"},
    {"name": "orchid", "category": "purple"},
    {"name": "papaya", "category": "orange"},
    {"name": "peach", "category": "light orange"},
    {"name": "peru", "category": "dark orange"},
    {"name": "pink", "category": "purple"},
    {"name": "plum", "category": "purple"},
    {"name": "purple", "category": "purple"},
    {"name": "red", "category": "red"},
    {"name": "rose", "category": "violet"},
    {"name": "rosy", "category": "violet"},
    {"name": "royal", "category": "blue"},
    {"name": "saddle", "category": "dark orange"},
    {"name": "salmon", "category": "light orange"},
    {"name": "sandy", "category": "light orange"},
    {"name": "sea", "category": "blue"},
    {"name": "seashell", "category": "yellow"},
    {"name": "sienna", "category": "dark orange"},
    {"name": "silver", "category": "light blue"},
    {"name": "sky", "category": "light blue"},
    {"name": "slate", "category": "light blue"},
    {"name": "snow", "category": "light blue"},
    {"name": "spring", "category": "green"},
    {"name": "steel", "category": "light blue"},
    {"name": "tan", "category": "light orange"},
    {"name": "teal", "category": "teal"},
    {"name": "thistle", "category": "violet"},
    {"name": "tomato", "category": "red"},
    {"name": "turquoise", "category": "teal"},
    {"name": "violet", "category": "violet"},
    {"name": "wheat", "category": "light orange"},
    {"name": "white", "category": "light blue"},
    {"name": "smoke", "category": "light blue"},
    {"name": "yellow", "category": "yellow"}
  ];

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Cetraria sepincola var. chlorophylla Willd.

### Remarks
null


text:
from unittest.mock import MagicMock

from libfb.py.asyncio.unittest import TestCase
from thrift.server.TAsyncioServer import ThriftAsyncServerFactory
from thrift.Thrift import TProcessor

class TestAsyncioServer(TestCase):
    async def test_factory(self):
        async def wrap(value):
            return value

        protocol_factory = MagicMock()
        loop = MagicMock()
        processor = MagicMock(spec=TProcessor)
        event_handler = MagicMock()
        server = MagicMock()
        sock = MagicMock()
        sock.getsockname.return_value = "foosock"
        server.sockets = [sock]
        loop.create_server.return_value = wrap(server)

        await ThriftAsyncServerFactory(
            processor,
            loop=loop,
            event_handler=event_handler,
            protocol_factory=protocol_factory,
        )

        event_handler.preServe.assert_called_with("foosock")


text:
namespace switches {

// Product version string.
const char kProductVersion[]          = "product-version";

// Log file path.
const char kLogFile[]                 = "log-file";

// Severity of messages to log.
const char kLogSeverity[]             = "log-severity";
const char kLogSeverity_Verbose[]     = "verbose";
const char kLogSeverity_Info[]        = "info";
const char kLogSeverity_Warning[]     = "warning";
const char kLogSeverity_Error[]       = "error";
const char kLogSeverity_ErrorReport[] = "error-report";
const char kLogSeverity_Disable[]     = "disable";

// Enable DCHECK for release mode.
const char kReleaseDcheckEnabled[]    = "release-dcheck-enabled";

// Path to resources directory.
const char kResourcesDirPath[]        = "resources-dir-path";

// Path to locales directory.
const char kLocalesDirPath[]          = "locales-dir-path";

// Path to locales directory.
const char kPackLoadingDisabled[]     = "pack-loading-disabled";

// Stack size for uncaught exceptions.
const char kUncaughtExceptionStackSize[]  = "uncaught-exception-stack-size";

// Context safety implementation type.
const char kContextSafetyImplementation[] = "context-safety-implementation";

}  // namespace switches


text:
import { Observable } from '../Observable';
import { innerFrom } from '../observable/innerFrom';
import { Subject } from '../Subject';
import { ObservableInput, Observer, OperatorFunction, SubjectLike } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber, OperatorSubscriber } from './OperatorSubscriber';

export interface BasicGroupByOptions<K, T> {
  element?: undefined;
  duration?: (grouped: GroupedObservable<K, T>) => ObservableInput<any>;
  connector?: () => SubjectLike<T>;
}

export interface GroupByOptionsWithElement<K, E, T> {
  element: (value: T) => E;
  duration?: (grouped: GroupedObservable<K, E>) => ObservableInput<any>;
  connector?: () => SubjectLike<E>;
}

export function groupBy<T, K>(key: (value: T) => K, options: BasicGroupByOptions<K, T>): OperatorFunction<T, GroupedObservable<K, T>>;

export function groupBy<T, K, E>(
  key: (value: T) => K,
  options: GroupByOptionsWithElement<K, E, T>
): OperatorFunction<T, GroupedObservable<K, E>>;

export function groupBy<T, K extends T>(
  key: (value: T) => value is K
): OperatorFunction<T, GroupedObservable<true, K> | GroupedObservable<false, Exclude<T, K>>>;

export function groupBy<T, K>(key: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;

/**
 * @deprecated use the options parameter instead.
 */
export function groupBy<T, K>(
  key: (value: T) => K,
  element: void,
  duration: (grouped: GroupedObservable<K, T>) => Observable<any>
): OperatorFunction<T, GroupedObservable<K, T>>;

/**
 * @deprecated use the options parameter instead.
 */
export function groupBy<T, K, R>(
  key: (value: T) => K,
  element?: (value: T) => R,
  duration?: (grouped: GroupedObservable<K, R>) => Observable<any>
): OperatorFunction<T, GroupedObservable<K, R>>;

/**
 * Groups the items emitted by an Observable according to a specified criterion,
 * and emits these grouped items as `GroupedObservables`, one
 * {@link GroupedObservable} per group.
 *
 * ![](groupBy.png)
 *
 * When the Observable emits an item, a key is computed for this item with the key function.
 *
 * If a {@link GroupedObservable} for this key exists, this {@link GroupedObservable} emits. Otherwise, a new
 * {@link GroupedObservable} for this key is created and emits.
 *
 * A {@link GroupedObservable} represents values belonging to the same group represented by a common key. The common
 * key is available as the `key` field of a {@link GroupedObservable} instance.
 *
 * The elements emitted by {@link GroupedObservable}s are by default the items emitted by the Observable, or elements
 * returned by the element function.
 *
 * ## Examples
 *
 * Group objects by `id` and return as array
 *
 * ```ts
 * import { of, groupBy, mergeMap, reduce } from 'rxjs';
 *
 * of(
 *   { id: 1, name: 'JavaScript' },
 *   { id: 2, name: 'Parcel' },
 *   { id: 2, name: 'webpack' },
 *   { id: 1, name: 'TypeScript' },
 *   { id: 3, name: 'TSLint' }
 * ).pipe(
 *   groupBy(p => p.id),
 *   mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [])))
 * )
 * .subscribe(p => console.log(p));
 *
 * // displays:
 * // [{ id: 1, name: 'JavaScript' }, { id: 1, name: 'TypeScript'}]
 * // [{ id: 2, name: 'Parcel' }, { id: 2, name: 'webpack'}]
 * // [{ id: 3, name: 'TSLint' }]
 * ```
 *
 * Pivot data on the `id` field
 *
 * ```ts
 * import { of, groupBy, mergeMap, reduce, map } from 'rxjs';
 *
 * of(
 *   { id: 1, name: 'JavaScript' },
 *   { id: 2, name: 'Parcel' },
 *   { id: 2, name: 'webpack' },
 *   { id: 1, name: 'TypeScript' },
 *   { id: 3, name: 'TSLint' }
 * ).pipe(
 *   groupBy(p => p.id, { element: p => p.name }),
 *   mergeMap(group$ => group$.pipe(reduce((acc, cur) => [...acc, cur], [`${ group$.key }`]))),
 *   map(arr => ({ id: parseInt(arr[0], 10), values: arr.slice(1) }))
 * )
 * .subscribe(p => console.log(p));
 *
 * // displays:
 * // { id: 1, values: [ 'JavaScript', 'TypeScript' ] }
 * // { id: 2, values: [ 'Parcel', 'webpack' ] }
 * // { id: 3, values: [ 'TSLint' ] }
 * ```
 *
 * @param key A function that extracts the key
 * for each item.
 * @param element A function that extracts the
 * return element for each item.
 * @param duration
 * A function that returns an Observable to determine how long each group should
 * exist.
 * @param connector Factory function to create an
 * intermediate Subject through which grouped elements are emitted.
 * @return A function that returns an Observable that emits GroupedObservables,
 * each of which corresponds to a unique key value and each of which emits
 * those items from the source Observable that share that key value.
 *
 * @deprecated Use the options parameter instead.
 */
export function groupBy<T, K, R>(
  key: (value: T) => K,
  element?: (value: T) => R,
  duration?: (grouped: GroupedObservable<K, R>) => Observable<any>,
  connector?: () => Subject<R>
): OperatorFunction<T, GroupedObservable<K, R>>;

// Impl
export function groupBy<T, K, R>(
  keySelector: (value: T) => K,
  elementOrOptions?: ((value: any) => any) | void | BasicGroupByOptions<K, T> | GroupByOptionsWithElement<K, R, T>,
  duration?: (grouped: GroupedObservable<any, any>) => ObservableInput<any>,
  connector?: () => SubjectLike<any>
): OperatorFunction<T, GroupedObservable<K, R>> {
  return operate((source, subscriber) => {
    let element: ((value: any) => any) | void;
    if (!elementOrOptions || typeof elementOrOptions === 'function') {
      element = elementOrOptions as ((value: any) => any);
    } else {
      ({ duration, element, connector } = elementOrOptions);
    }

    // A lookup for the groups that we have so far.
    const groups = new Map<K, SubjectLike<any>>();

    // Used for notifying all groups and the subscriber in the same way.
    const notify = (cb: (group: Observer<any>) => void) => {
      groups.forEach(cb);
      cb(subscriber);
    };

    // Used to handle errors from the source, AND errors that occur during the
    // next call from the source.
    const handleError = (err: any) => notify((consumer) => consumer.error(err));

    // The number of actively subscribed groups
    let activeGroups = 0;

    // Whether or not teardown was attempted on this subscription.
    let teardownAttempted = false;

    // Capturing a reference to this, because we need a handle to it
    // in `createGroupedObservable` below. This is what we use to
    // subscribe to our source observable. This sometimes needs to be unsubscribed
    // out-of-band with our `subscriber` which is the downstream subscriber, or destination,
    // in cases where a user unsubscribes from the main resulting subscription, but
    // still has groups from this subscription subscribed and would expect values from it
    // Consider:  `source.pipe(groupBy(fn), take(2))`.
    const groupBySourceSubscriber = new OperatorSubscriber(
      subscriber,
      (value: T) => {
        // Because we have to notify all groups of any errors that occur in here,
        // we have to add our own try/catch to ensure that those errors are propagated.
        // OperatorSubscriber will only send the error to the main subscriber.
        try {
          const key = keySelector(value);

          let group = groups.get(key);
          if (!group) {
            // Create our group subject
            groups.set(key, (group = connector ? connector() : new Subject<any>()));

            // Emit the grouped observable. Note that we can't do a simple `asObservable()` here,
            // because the grouped observable has special semantics around reference counting
            // to ensure we don't sever our connection to the source prematurely.
            const grouped = createGroupedObservable(key, group);
            subscriber.next(grouped);

            if (duration) {
              const durationSubscriber = createOperatorSubscriber(
                // Providing the group here ensures that it is disposed of -- via `unsubscribe` --
                // when the duration subscription is torn down. That is important, because then
                // if someone holds a handle to the grouped observable and tries to subscribe to it
                // after the connection to the source has been severed, they will get an
                // `ObjectUnsubscribedError` and know they can't possibly get any notifications.
                group as any,
                () => {
                  // Our duration notified! We can complete the group.
                  // The group will be removed from the map in the finalization phase.
                  group!.complete();
                  durationSubscriber?.unsubscribe();
                },
                // Completions are also sent to the group, but just the group.
                undefined,
                // Errors on the duration subscriber are sent to the group
                // but only the group. They are not sent to the main subscription.
                undefined,
                // Finalization: Remove this group from our map.
                () => groups.delete(key)
              );

              // Start our duration notifier.
              groupBySourceSubscriber.add(innerFrom(duration(grouped)).subscribe(durationSubscriber));
            }
          }

          // Send the value to our group.
          group.next(element ? element(value) : value);
        } catch (err) {
          handleError(err);
        }
      },
      // Source completes.
      () => notify((consumer) => consumer.complete()),
      // Error from the source.
      handleError,
      // Free up memory.
      // When the source subscription is _finally_ torn down, release the subjects and keys
      // in our groups Map, they may be quite large and we don't want to keep them around if we
      // don't have to.
      () => groups.clear(),
      () => {
        teardownAttempted = true;
        // We only kill our subscription to the source if we have
        // no active groups. As stated above, consider this scenario:
        // source$.pipe(groupBy(fn), take(2)).
        return activeGroups === 0;
      }
    );

    // Subscribe to the source
    source.subscribe(groupBySourceSubscriber);

    /**
     * Creates the actual grouped observable returned.
     * @param key The key of the group
     * @param groupSubject The subject that fuels the group
     */
    function createGroupedObservable(key: K, groupSubject: SubjectLike<any>) {
      const result: any = new Observable<T>((groupSubscriber) => {
        activeGroups++;
        const innerSub = groupSubject.subscribe(groupSubscriber);
        return () => {
          innerSub.unsubscribe();
          // We can kill the subscription to our source if we now have no more
          // active groups subscribed, and a finalization was already attempted on
          // the source.
          --activeGroups === 0 && teardownAttempted && groupBySourceSubscriber.unsubscribe();
        };
      });
      result.key = key;
      return result;
    }
  });
}

/**
 * An observable of values that is the emitted by the result of a {@link groupBy} operator,
 * contains a `key` property for the grouping.
 */
export interface GroupedObservable<K, T> extends Observable<T> {
  /**
   * The key value for the grouped notifications.
   */
  readonly key: K;
}


text:
<?php
namespace common\components;
use Yii;
include_once '/../config/constants.php';

class MyGlobalClass extends \yii\base\Component{
    public function init() {
		parent::init();
		//echo '<pre>'; print_r(Yii::$app); exit;
		// if (Yii::$app->user->can('backend:User:Index')) {
			// echo 'hi';
		// }else{
			// echo 'hello';
		// }
    }
}
?>


text:
local ffi     = require 'lua/q_ffi'
local qc      = require 'lua/q_core'

local chunk_size = 64 * 1024
local Vector = {}
Vector.__index = Vector

setmetatable(Vector, {
        __call = function (cls, ...)
            return cls.new(...)
        end,
    })

function Vector.new(arg)
  local vec = setmetatable({}, Vector)
  vec._vec = ffi.malloc(ffi.sizeof("VEC_REC_TYPE"), qc.vec_free)
  vec._vec = ffi.cast("VEC_REC_TYPE *", vec._vec)
  qc.vec_new(vec._vec, arg.field_size, chunk_size)
  print("Created vec")
  return vec
end

function Vector:set(addr, len)
  addr = ffi.cast("char *", addr)
  qc.vec_set(self._vec, addr, len)
end

return Vector


text:
from django.test import TestCase
from django.urls import reverse
from taggit.models import Tag
from wagtail.core.models import Page
from wagtail.tests.utils import WagtailTestUtils

from tests.app.models import NewsIndex, NewsItem

class TestNewsItemWithTags(TestCase, WagtailTestUtils):

    def setUp(self):
        super(TestNewsItemWithTags, self).setUp()
        root_page = Page.objects.get(pk=2)
        self.index = NewsIndex(
            title='News', slug='news')
        root_page.add_child(instance=self.index)

    def test_create_item_with_tags(self):
        item = NewsItem.objects.create(
            newsindex=self.index,
            title='News post!')
        item.tags = ['hello', 'world']

        # Get a fresh one from the DB
        item = NewsItem.objects.get()
        self.assertQuerysetEqual(item.tags.order_by('name'),
                                 Tag.objects.order_by('name'))

    def test_create_item_admin(self):
        create_url = reverse('wagtailnews:create', kwargs={'pk': self.index.pk})
        self.login()
        tags = ['hello', 'world']

        self.client.post(create_url, {
            'title': 'Test post',
            'tags': ', '.join(tags),
            'date': '2015-08-20 00:48',
            'initial-date': '2015-08-20 00:48:31.123456'})

        item = NewsItem.objects.get()
        self.assertQuerysetEqual(
            item.tags.order_by('name'),
            tags, transform=lambda t: t.name)


text:
// Copyright 2022 Google LLC
//
// 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
//
//     https://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.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

'use strict';

function main(firewallPolicy, firewallPolicyRuleResource, project) {
  // [START compute_v1_generated_NetworkFirewallPolicies_AddRule_async]
  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Name of the firewall policy to update.
   */
  // const firewallPolicy = 'abc123'
  /**
   *  The body resource for this request
   */
  // const firewallPolicyRuleResource = {}
  /**
   *  When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority.
   */
  // const maxPriority = 1234
  /**
   *  When rule.priority is not specified, auto choose a unused priority between minPriority and maxPriority>. This field is exclusive with rule.priority.
   */
  // const minPriority = 1234
  /**
   *  Project ID for this request.
   */
  // const project = 'my-project'
  /**
   *  An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000).
   */
  // const requestId = 'abc123'

  // Imports the Compute library
  const {NetworkFirewallPoliciesClient} = require('@google-cloud/compute').v1;

  // Instantiates a client
  const computeClient = new NetworkFirewallPoliciesClient();

  async function callAddRule() {
    // Construct request
    const request = {
      firewallPolicy,
      firewallPolicyRuleResource,
      project,
    };

    // Run request
    const response = await computeClient.addRule(request);
    console.log(response);
  }

  callAddRule();
  // [END compute_v1_generated_NetworkFirewallPolicies_AddRule_async]
}

process.on('unhandledRejection', err => {
  console.error(err.message);
  process.exitCode = 1;
});
main(...process.argv.slice(2));


text:
import logging
import logging.handlers
import sys

import mock
import pkg_resources
import unittest2

from bark import handlers
from bark import middleware

class TestException(Exception):
    pass

class SimpleFormatterTest(unittest2.TestCase):
    def test_format(self):
        fmt = handlers.SimpleFormatter()
        record = logging.LogRecord('bark', logging.INFO, __file__, 27,
                                   'a test message', (), None, 'test_format')

        result = fmt.format(record)

        self.assertEqual(result, 'a test message')

class WrapLogHandlerTest(unittest2.TestCase):
    @mock.patch.object(handlers, 'SimpleFormatter', return_value='simple')
    @mock.patch('inspect.getsourcefile', return_value='bark/handlers.py')
    @mock.patch('inspect.getsourcelines', return_value=([], 127))
    def test_wrap_log_handler(self, mock_getsourcelines, mock_getsourcefile,
                              mock_SimpleFormatter):
        handler = mock.Mock(**{'emit.__name__': 'emit'})
        emit = handlers.wrap_log_handler(handler)

        mock_SimpleFormatter.assert_called_once_with()
        handler.setFormatter.assert_called_once_with('simple')
        self.assertFalse(handler.emit.called)

        emit("test message")

        self.assertEqual(handler.emit.call_count, 1)

        record = handler.emit.call_args[0][0]
        self.assertEqual(record.name, 'bark')
        self.assertEqual(record.levelno, logging.INFO)
        self.assertEqual(record.filename, 'handlers.py')
        self.assertEqual(record.module, 'handlers')
        self.assertEqual(record.lineno, 127)
        self.assertEqual(record.msg, 'test message')
        self.assertEqual(record.args, ())
        self.assertEqual(record.exc_info, None)
        self.assertEqual(record.funcName, 'wrap_log_handler')

class ArgTypesTest(unittest2.TestCase):
    def test_arg_types(self):
        @handlers.arg_types(foo=1, bar=2)
        @handlers.arg_types(bar=3, baz=4)
        def test():
            pass

        self.assertEqual(test._bark_types, dict(foo=1, bar=2, baz=4))

class BooleanTest(unittest2.TestCase):
    def test_boolean_true(self):
        for text in ['1', '1000', 't', 'T', 'TrUe', 'oN', 'yEs']:
            self.assertEqual(handlers.boolean(text), True)

    def test_boolean_false(self):
        for text in ['0', '0000', 'f', 'F', 'FaLsE', 'oFf', 'No']:
            self.assertEqual(handlers.boolean(text), False)

    def test_boolean_invalid(self):
        for text in ['tT', 'fF', 'tRu', 'FaL', 'o', 'yEs/nO']:
            self.assertRaises(ValueError, handlers.boolean, text)

class CommaTest(unittest2.TestCase):
    def test_comma_singular(self):
        self.assertEqual(handlers.comma('test'), ['test'])

    def test_comma_multiple(self):
        self.assertEqual(handlers.comma('test1,test2,test3'),
                         ['test1', 'test2', 'test3'])

    def test_comma_strip(self):
        self.assertEqual(handlers.comma('test1   ,   test2'),
                         ['test1', 'test2'])

class AddressTest(unittest2.TestCase):
    def test_address_noport(self):
        self.assertEqual(handlers.address('/dev/log'), '/dev/log')

    def test_address_withport(self):
        self.assertEqual(handlers.address('1:2:3'), ('1:2', 3))

    def test_address_badport(self):
        self.assertRaises(ValueError, handlers.address, '1:2:port')

class ChoiceTest(unittest2.TestCase):
    def test_init(self):
        ch = handlers.choice('foo', 'bar', 'baz')

        self.assertEqual(ch.choices, set(['foo', 'bar', 'baz']))

    def test_call_accept(self):
        ch = handlers.choice('foo', 'bar', 'baz')

        self.assertEqual(ch('foo'), 'foo')
        self.assertEqual(ch('bar'), 'bar')
        self.assertEqual(ch('baz'), 'baz')

    def test_call_reject(self):
        ch = handlers.choice('foo', 'bar', 'baz')

        self.assertRaises(ValueError, ch, 'spam')

class ArgMapTest(unittest2.TestCase):
    def test_init(self):
        am = handlers.argmap(dict(foo=1, bar=2, baz=3))

        self.assertEqual(am.argmap, dict(foo=1, bar=2, baz=3))

    def test_call_accept(self):
        am = handlers.argmap(dict(foo=1, bar=2, baz=3))

        self.assertEqual(am('foo'), 1)
        self.assertEqual(am('bar'), 2)
        self.assertEqual(am('baz'), 3)

    def test_call_reject(self):
        am = handlers.argmap(dict(foo=1, bar=2, baz=3))

        self.assertRaises(ValueError, am, 'spam')

class CredentialsTest(unittest2.TestCase):
    def test_credentials_nocolon(self):
        self.assertEqual(handlers.credentials('user'), ('user', ''))

    def test_credentials_emptypass(self):
        self.assertEqual(handlers.credentials('user:'), ('user', ''))

    def test_credentials_emptyuser(self):
        self.assertEqual(handlers.credentials(':pass'), ('', 'pass'))

    def test_credentials_full(self):
        self.assertEqual(handlers.credentials('user:pass'), ('user', 'pass'))

class NullHandlerTest(unittest2.TestCase):
    def test_handler(self):
        emit = handlers.null_handler('null', 'test')

        self.assertTrue(callable(emit))

        # Make sure it doesn't raise any failures
        emit('this is a test')

class StdOutHandlerTest(unittest2.TestCase):
    @mock.patch('logging.StreamHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_StreamHandler):
        emit = handlers.stdout_handler('stdout', 'test')

        self.assertTrue(callable(emit))
        mock_StreamHandler.assert_called_once_with(sys.stdout)

class StdErrHandlerTest(unittest2.TestCase):
    @mock.patch('logging.StreamHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_StreamHandler):
        emit = handlers.stderr_handler('stderr', 'test')

        self.assertTrue(callable(emit))
        mock_StreamHandler.assert_called_once_with(sys.stderr)

class FileHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.file_handler._bark_types,
                         dict(delay=handlers.boolean))

    @mock.patch('logging.FileHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_FileHandler):
        args = dict(filename='filename', mode='b', encoding='encoding',
                    delay=True)
        emit = handlers.file_handler('file', 'test', **args)

        self.assertTrue(callable(emit))
        mock_FileHandler.assert_called_once_with(
            'filename', mode='b', encoding='encoding', delay=True)

class WatchedFileHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.watched_file_handler._bark_types,
                         dict(delay=handlers.boolean))

    @mock.patch('logging.handlers.WatchedFileHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_WatchedFileHandler):
        args = dict(filename='filename', mode='b', encoding='encoding',
                    delay=True)
        emit = handlers.watched_file_handler('watched_file', 'test', **args)

        self.assertTrue(callable(emit))
        mock_WatchedFileHandler.assert_called_once_with(
            'filename', mode='b', encoding='encoding', delay=True)

class RotatingFileHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.rotating_file_handler._bark_types,
                         dict(maxBytes=int, backupCount=int,
                              delay=handlers.boolean))

    @mock.patch('logging.handlers.RotatingFileHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_RotatingFileHandler):
        args = dict(filename='filename', mode='b', maxBytes=23,
                    backupCount=14, encoding='encoding', delay=True)
        emit = handlers.rotating_file_handler('rotating_file', 'test', **args)

        self.assertTrue(callable(emit))
        mock_RotatingFileHandler.assert_called_once_with(
            'filename', mode='b', maxBytes=23, backupCount=14,
            encoding='encoding', delay=True)

class TimedRotatingFileHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.timed_rotating_file_handler._bark_types,
                         dict(interval=int, backupCount=int,
                              delay=handlers.boolean, utc=handlers.boolean))

    @mock.patch('logging.handlers.TimedRotatingFileHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_TimedRotatingFileHandler):
        args = dict(filename='filename', when='b', interval=23,
                    backupCount=14, encoding='encoding', delay=True, utc=True)
        emit = handlers.timed_rotating_file_handler('timed_rotating_file',
                                                    'test', **args)

        self.assertTrue(callable(emit))
        mock_TimedRotatingFileHandler.assert_called_once_with(
            'filename', when='b', interval=23, backupCount=14,
            encoding='encoding', delay=True, utc=True)

class SocketHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.socket_handler._bark_types,
                         dict(port=int))

    @mock.patch('logging.handlers.SocketHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_SocketHandler):
        args = dict(host='host', port=4005)
        emit = handlers.socket_handler('socket', 'test', **args)

        self.assertTrue(callable(emit))
        mock_SocketHandler.assert_called_once_with(
            'host', 4005)

class DatagramHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.datagram_handler._bark_types,
                         dict(port=int))

    @mock.patch('logging.handlers.DatagramHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_DatagramHandler):
        args = dict(host='host', port=4005)
        emit = handlers.datagram_handler('datagram', 'test', **args)

        self.assertTrue(callable(emit))
        mock_DatagramHandler.assert_called_once_with('host', 4005)

class SysLogHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        types = handlers.syslog_handler._bark_types
        self.assertEqual(types.keys(), ['address', 'facility'])
        self.assertEqual(types['address'], handlers.address)
        self.assertIsInstance(types['facility'], handlers.argmap)
        self.assertEqual(types['facility'].argmap,
                         logging.handlers.SysLogHandler.facility_names)

    @mock.patch('logging.handlers.SysLogHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_SysLogHandler):
        args = dict(address='address', facility='facility')
        emit = handlers.syslog_handler('syslog', 'test', **args)

        self.assertTrue(callable(emit))
        mock_SysLogHandler.assert_called_once_with(
            address='address', facility='facility')

class NTEventLogHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        types = handlers.nt_event_log_handler._bark_types
        self.assertEqual(types.keys(), ['logtype'])
        self.assertIsInstance(types['logtype'], handlers.choice)
        self.assertEqual(types['logtype'].choices,
                         set(['Application', 'System', 'Security']))

    @mock.patch('logging.handlers.NTEventLogHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_NTEventLogHandler):
        args = dict(appname='appname', dllname='dllname', logtype='logtype')
        emit = handlers.nt_event_log_handler('nt_event_log', 'test', **args)

        self.assertTrue(callable(emit))
        mock_NTEventLogHandler.assert_called_once_with(
            'appname', dllname='dllname', logtype='logtype')

class SMTPHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        self.assertEqual(handlers.smtp_handler._bark_types,
                         dict(mailhost=handlers.address,
                              toaddrs=handlers.comma,
                              credentials=handlers.credentials))

    @mock.patch('logging.handlers.SMTPHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_SMTPHandler):
        args = dict(mailhost='mailhost', fromaddr='fromaddr',
                    toaddrs='toaddrs', subject='subject',
                    credentials='credentials')
        emit = handlers.smtp_handler('smtp', 'test', **args)

        self.assertTrue(callable(emit))
        mock_SMTPHandler.assert_called_once_with(
            'mailhost', 'fromaddr', 'toaddrs', 'subject',
            credentials='credentials')

class HTTPHandlerTest(unittest2.TestCase):
    def test_arg_types(self):
        types = handlers.http_handler._bark_types
        self.assertEqual(types.keys(), ['method'])
        self.assertIsInstance(types['method'], handlers.choice)
        self.assertEqual(types['method'].choices, set(['GET', 'POST']))

    @mock.patch('logging.handlers.HTTPHandler',
                return_value=mock.Mock(**{'emit.__name__': 'emit'}))
    def test_handler(self, mock_HTTPHandler):
        args = dict(host='host', url='url', method='method')
        emit = handlers.http_handler('http', 'test', **args)

        self.assertTrue(callable(emit))
        mock_HTTPHandler.assert_called_once_with(
            'host', 'url', method='method')

class LookupHandlerTest(unittest2.TestCase):
    @mock.patch('pkg_resources.iter_entry_points',
                return_value=[
                    mock.Mock(**{'load.side_effect': ImportError}),
                    mock.Mock(**{'load.side_effect': ImportError}),
                ])
    def test_error(self, mock_iter_entry_points):
        self.assertRaises(ImportError, handlers._lookup_handler, 'handler')

        mock_iter_entry_points.assert_called_once_with('bark.handler',
                                                       'handler')
        mock_iter_entry_points.return_value[0].load.assert_called_once_with()
        mock_iter_entry_points.return_value[1].load.assert_called_once_with()

    @mock.patch('pkg_resources.iter_entry_points',
                return_value=[
                    mock.Mock(**{
                        'load.side_effect': pkg_resources.UnknownExtra,
                    }),
                    mock.Mock(**{
                        'load.side_effect': pkg_resources.UnknownExtra,
                    }),
                ])
    def test_unknown_extra(self, mock_iter_entry_points):
        self.assertRaises(ImportError, handlers._lookup_handler, 'handler')

        mock_iter_entry_points.assert_called_once_with('bark.handler',
                                                       'handler')
        mock_iter_entry_points.return_value[0].load.assert_called_once_with()
        mock_iter_entry_points.return_value[1].load.assert_called_once_with()

    @mock.patch('pkg_resources.iter_entry_points',
                return_value=[
                    mock.Mock(**{'load.side_effect': TestException}),
                    mock.Mock(**{'load.side_effect': TestException}),
                ])
    def test_other_exception(self, mock_iter_entry_points):
        self.assertRaises(TestException, handlers._lookup_handler, 'handler')

        mock_iter_entry_points.assert_called_once_with('bark.handler',
                                                       'handler')
        mock_iter_entry_points.return_value[0].load.assert_called_once_with()
        self.assertFalse(mock_iter_entry_points.return_value[1].load.called)

    @mock.patch('pkg_resources.iter_entry_points',
                return_value=[mock.Mock(**{'load.return_value': 'fake_hand'})])
    def test_load(self, mock_iter_entry_points):
        result = handlers._lookup_handler('handler')

        mock_iter_entry_points.assert_called_once_with('bark.handler',
                                                       'handler')
        mock_iter_entry_points.return_value[0].load.assert_called_once_with()
        self.assertEqual(result, 'fake_hand')

class GetHandlerTest(unittest2.TestCase):
    @mock.patch.object(handlers.LOG, 'warn')
    def test_func_no_args(self, mock_warn):
        def test(name, logname):
            self.assertEqual(name, 'test_name')
            self.assertEqual(logname, 'test_logname')
            return 'handler'

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname', {})

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_func_required_args_missing(self, mock_warn):
        def test(name, logname, arg1, arg2, arg3):
            self.fail("factory called unexpectedly")

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            self.assertRaises(TypeError, handlers.get_handler,
                              'test_name', 'test_logname',
                              dict(arg2='value2'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_func_optional_args_missing(self, mock_warn):
        def test(name, logname, arg1, arg2=None, arg3=None):
            self.assertEqual(name, 'test_name')
            self.assertEqual(logname, 'test_logname')
            self.assertEqual(arg1, 'value1')
            self.assertEqual(arg2, None)
            self.assertEqual(arg3, 'value3')
            return 'handler'

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='value1', arg3='value3'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_func_additional_args(self, mock_warn):
        def test(name, logname):
            self.assertEqual(name, 'test_name')
            self.assertEqual(logname, 'test_logname')
            return 'handler'

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='value1', arg2='value1'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        mock_warn.assert_called_once_with(
            "Unused arguments for handler of type 'test_name' for log "
            "'test_logname': 'arg1', 'arg2'")

    @mock.patch.object(handlers.LOG, 'warn')
    def test_class_no_args(self, mock_warn):
        class Test(object):
            def __init__(inst, name, logname):
                self.assertEqual(name, 'test_name')
                self.assertEqual(logname, 'test_logname')

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=Test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname', {})

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertIsInstance(result, Test)
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_class_required_args_missing(self, mock_warn):
        class Test(object):
            def __init__(inst, name, logname, arg1, arg2, arg3):
                self.fail("factory called unexpectedly")

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=Test) as mock_lookup_handler:
            self.assertRaises(TypeError, handlers.get_handler,
                              'test_name', 'test_logname',
                              dict(arg2='value2'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_class_optional_args_missing(self, mock_warn):
        class Test(object):
            def __init__(inst, name, logname, arg1, arg2=None, arg3=None):
                self.assertEqual(name, 'test_name')
                self.assertEqual(logname, 'test_logname')
                self.assertEqual(arg1, 'value1')
                self.assertEqual(arg2, None)
                self.assertEqual(arg3, 'value3')

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=Test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='value1', arg3='value3'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertIsInstance(result, Test)
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_class_additional_args(self, mock_warn):
        class Test(object):
            def __init__(inst, name, logname):
                self.assertEqual(name, 'test_name')
                self.assertEqual(logname, 'test_logname')

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=Test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='value1', arg2='value1'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertIsInstance(result, Test)
        mock_warn.assert_called_once_with(
            "Unused arguments for handler of type 'test_name' for log "
            "'test_logname': 'arg1', 'arg2'")

    @mock.patch.object(handlers.LOG, 'warn')
    def test_meth_no_args(self, mock_warn):
        class Test(object):
            def meth(inst, name, logname):
                self.assertEqual(name, 'test_name')
                self.assertEqual(logname, 'test_logname')
                return 'handler'

        test = Test()

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test.meth) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname', {})

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_meth_required_args_missing(self, mock_warn):
        class Test(object):
            def meth(inst, name, logname, arg1, arg2, arg3):
                self.fail("factory called unexpectedly")

        test = Test()

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test.meth) as mock_lookup_handler:
            self.assertRaises(TypeError, handlers.get_handler,
                              'test_name', 'test_logname',
                              dict(arg2='value2'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_meth_optional_args_missing(self, mock_warn):
        class Test(object):
            def meth(inst, name, logname, arg1, arg2=None, arg3=None):
                self.assertEqual(name, 'test_name')
                self.assertEqual(logname, 'test_logname')
                self.assertEqual(arg1, 'value1')
                self.assertEqual(arg2, None)
                self.assertEqual(arg3, 'value3')
                return 'handler'

        test = Test()

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test.meth) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='value1', arg3='value3'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        self.assertFalse(mock_warn.called)

    @mock.patch.object(handlers.LOG, 'warn')
    def test_meth_additional_args(self, mock_warn):
        class Test(object):
            def meth(inst, name, logname):
                self.assertEqual(name, 'test_name')
                self.assertEqual(logname, 'test_logname')
                return 'handler'

        test = Test()

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test.meth) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='value1', arg2='value1'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        mock_warn.assert_called_once_with(
            "Unused arguments for handler of type 'test_name' for log "
            "'test_logname': 'arg1', 'arg2'")

    @mock.patch.object(handlers.LOG, 'warn')
    @mock.patch.object(handlers, 'boolean', return_value='boolean')
    def test_arg_boolean(self, mock_boolean, mock_warn):
        @handlers.arg_types(arg1=bool)
        def test(name, logname, arg1):
            self.assertEqual(name, 'test_name')
            self.assertEqual(logname, 'test_logname')
            self.assertEqual(arg1, 'boolean')
            return 'handler'

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='spam'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        self.assertFalse(mock_warn.called)
        mock_boolean.assert_called_once_with('spam')

    @mock.patch.object(handlers.LOG, 'warn')
    def test_arg_othertype(self, mock_warn):
        other = mock.Mock(return_value='other')

        @handlers.arg_types(arg1=other)
        def test(name, logname, arg1):
            self.assertEqual(name, 'test_name')
            self.assertEqual(logname, 'test_logname')
            self.assertEqual(arg1, 'other')
            return 'handler'

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            result = handlers.get_handler('test_name', 'test_logname',
                                          dict(arg1='spam'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertEqual(result, 'handler')
        self.assertFalse(mock_warn.called)
        other.assert_called_once_with('spam')

    @mock.patch.object(handlers.LOG, 'warn')
    def test_arg_valueerror(self, mock_warn):
        other = mock.Mock(side_effect=ValueError, __name__='other')

        @handlers.arg_types(arg1=other)
        def test(name, logname, arg1):
            self.fail("factory called unexpectedly")

        with mock.patch.object(handlers, '_lookup_handler',
                               return_value=test) as mock_lookup_handler:
            self.assertRaises(ValueError, handlers.get_handler,
                              'test_name', 'test_logname', dict(arg1='spam'))

        mock_lookup_handler.assert_called_once_with('test_name')
        self.assertFalse(mock_warn.called)
        other.assert_called_once_with('spam')


text:
    <meta charset="utf-8">
    <title>Parsleyjs AMD Compatibility test</title>
    <link rel="stylesheet" href="../../node_modules/mocha/mocha.css" />


text:
var expect = require('chai').expect;

var Drac = require('../');

describe('match rules', function () {
  var testFunc = Drac.define({
    params: {
      name: { match: /^abc[0-9]+/ }
    }
  }, function(name) { return 'hello ' + name; });

  it('should give correct result', function() {
    var result = testFunc('abc1230987');
    expect(result).to.equal('hello abc1230987');
  });

  it('should throw error on non-string parameters', function () {
    expect(function() {
      testFunc(3);
    }).to.throw(Error);
  });

  it('should throw error on invalid parameters', function () {
    expect(function() {
      testFunc('bbc1230987');
    }).to.throw(Error);
  });
});


text: export { Grid } from './Grid';


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>highlight.js test</title>

for x in [1, 2, 3]:
  count(x)

for x in [1, 2, 3]:
  count(x)

for x in [1, 2, 3]:
  count(x)

@import "compass/reset";
$colorGreenDark: darken($colorGreen, 10);

@import "compass/reset";
$colorGreenDark: darken($colorGreen, 10);

for x in [1, 2, 3]:
	count(x)

<div id="contents">
  <p>Hello, World!Goodbye, cruel world!
</div>

for x in [1, 2, 3]:
	count(x)
	if x == 3:
		count(x + 1)

>> '\x41\x42\x43'
'ABC'

>> '\x61\x62\x63'
'abc'

var x = '<p>this should <b>not</b> be highlighted as <em>HTML</em>';

<div id="contents">
  <p>Hello, World!
</div>

<div id="contents">
  <p>Hello, World!
</div>

<div id="contents">
  <p>Hello, World!
</div>

<div id="contents">
  <p>Hello, World!
</div>

<samp>Computer output</samp>

for x in [1, 2, 3]: count(x)

for x in [1, 2, 3]: count(x)

for x in [1, 2, 3]: count(x)

var x = 'foo';

var x = 'foo';

<? echo 'php'; /* ?> */ ?>
<body>
<script>document.write('Legacy code');</script>
</body>

<?xml version="1.0"?>
    <response value="ok" xml:lang="en"></response>

<?xml version="1.0"?>
    <response value="ok" xml:lang="en"></response>

<?xml version="1.0"?>
    <response value="ok" xml:lang="en"></response>

<?xml version="1.0"?>
    <response value="ok" xml:lang="en"></response>

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

<head>

  <meta charset="utf-8">

  <title></title>

</head>

<head>

  <meta charset="utf-8">

  <title></title>

</head>

( [ ( ) ] )


text:
<?php
namespace Attack\View\Content\Factories;

use Attack\View\Content\Operations;

class JoinGameFactory extends Interfaces\ContentFactory {

    public function getName() {
        return 'joingame';
    }

    public function getOperation() {
        $this->checkAuth(CHECK_SESSION_USER);
        $return = new Operations\ContentJoinGame();
        return $return;
    }

}


text:
package com.renren.mobile.chat.ui.contact;

import com.common.network.DomainUrl;

public class ContactModelFactory {

	public ContactModelFactory() {
		// TODO Auto-generated constructor stub
	}

	public static ContactBaseModel createContactModel(String domain){
		ContactBaseModel contactBaseModel ;
		if(domain.equals(DomainUrl.SIXIN_DOMAIN)||domain.equals(DomainUrl.SIXIN_OLD_DOMAIN)||domain.equals(DomainUrl.SIXIN_RECOMMENDATION_DOMAIN)||domain.endsWith(DomainUrl.SIXIN_DOMAIN)){
			contactBaseModel  = new ContactModel();
		}else{
			contactBaseModel = new ThirdContactModel();
		}
		contactBaseModel.mDomain = domain;
		return contactBaseModel;
	}

}


text:
package foo

object TestApp extends App with Base{
  println("OK")
}


text:
package org.apache.airavata.grouper;

import org.apache.airavata.grouper.group.Group;
import org.apache.airavata.grouper.permission.PermissionAction;
import org.apache.airavata.grouper.resource.Resource;
import org.apache.airavata.grouper.resource.ResourceType;

import java.util.List;
import java.util.Set;

public interface GroupManagerCPI {
    void createResource(Resource projectResource);

    boolean isResourceRegistered(String resourceId, org.apache.airavata.grouper.resource.ResourceType resourceType);

    void grantPermission(String userId, SubjectType subjectType, String resourceId, ResourceType resourceType,
                         PermissionAction permissionAction);

    void revokePermission(String userId, SubjectType subjectType, String resourceId, ResourceType resourceType,
                          PermissionAction action);

    Set<String> getAllAccessibleUsers(String resourceId, ResourceType resourceType, PermissionAction permissionType);

    List<String> getAccessibleResourcesForUser(String userId, ResourceType resourceType, PermissionAction permissionAction);

    void createGroup(Group group);

    void updateGroup(Group group);

    void deleteGroup(String groupId, String s);

    Group getGroup(String groupId);

    List<Group> getAllGroupsUserBelongs(String userId);
}


text:
package com.jeecg.qywx.api.message.vo;

public class NewsEntity {
	private NewsArticle[] articles;// 定义数组图文消息,一个图文消息支持1到8条图文

	public NewsArticle[] getArticles() {
		return articles;
	}

	public void setArticles(NewsArticle[] articles) {
		this.articles = articles;
	}

}


text:
<?php
namespace Chamilo\Application\Weblcms\Tool\Implementation\User\Component\Unsubscribed;

use Chamilo\Application\Weblcms\Tool\Implementation\User\Manager;
use Chamilo\Libraries\Format\Table\Extension\DataClassTable\DataClassTable;
use Chamilo\Libraries\Format\Table\FormAction\TableFormAction;
use Chamilo\Libraries\Format\Table\FormAction\TableFormActions;
use Chamilo\Libraries\Format\Table\Interfaces\TableFormActionsSupport;
use Chamilo\Libraries\Platform\Session\Request;
use Chamilo\Libraries\Translation\Translation;

/**
 * * *************************************************************************** Table to display a list of users not in
 * a course.
 *
 * @author Stijn Van Hoecke ****************************************************************************
 */
class UnsubscribedUserTable extends DataClassTable implements TableFormActionsSupport
{
    const TABLE_IDENTIFIER = Manager::PARAM_OBJECTS;

    public function get_implemented_form_actions()
    {
        $translator = Translation::getInstance();
        if (! Request::get(\Chamilo\Application\Weblcms\Manager::PARAM_GROUP))
        {
            // add subscribe options
            $actions = new TableFormActions(__NAMESPACE__, self::TABLE_IDENTIFIER);

            // Allowed to subscribe an user
            $actions->add_form_action(
                new TableFormAction(
                    $this->get_component()->get_url(
                        array(\Chamilo\Application\Weblcms\Tool\Manager::PARAM_ACTION => Manager::ACTION_SUBSCRIBE)),
                    $translator->getTranslation('SubscribeSelectedAsStudent', null, Manager::context()),
                    false));

            $actions->add_form_action(
                new TableFormAction(
                    $this->get_component()->get_url(
                        array(
                            \Chamilo\Application\Weblcms\Tool\Manager::PARAM_ACTION => Manager::ACTION_SUBSCRIBE_AS_ADMIN)),
                    $translator->getTranslation('SubscribeSelectedAsAdmin', null, Manager::context()),
                    false));

            // Allowed to request to subscribe an user
            $actions->add_form_action(
                new TableFormAction(
                    $this->get_component()->get_url(
                        array(
                            \Chamilo\Application\Weblcms\Tool\Manager::PARAM_ACTION => Manager::ACTION_REQUEST_SUBSCRIBE_USERS)),
                    $translator->getTranslation('RequestUsers', null, Manager::context()),
                    false));

            return $actions;
        }
    }
}


text:
echo "Checking for the presence of required third-party software installers ..."

declare -a files=(
"linuxamd64_12102_database_1of2.zip"
"linuxamd64_12102_database_2of2.zip"
)

for file in "${files[@]}"
do
	echo "Checking for the presence of $file in the software directory ..."
	if [ ! -f /vagrant/software/$file ]; then
		echo "ERROR! Missing third-party software: $file."
		exit 1
	else
		echo "$file found"
	fi

	echo "Checking md5 sum of $file ..."
	if [ ! `cat /vagrant/software/$file.md5` = `md5sum /vagrant/software/$file | cut -d ' ' -f 1` ]; then
		echo "ERROR! md5sum for $file does not match.  File is corrupt."
		exit 1
	else
		echo "checksum matches"
	fi
done

echo "All required third-party software found."


text:
namespace UOS
{
    public abstract class ServerConnection
    {
        public NetworkDevice networkDevice { get; protected set; }

        public abstract ClientConnection Accept();

        public abstract void Close();

        public ServerConnection(NetworkDevice networkDevice)
        {
            this.networkDevice = networkDevice;
        }
    }
}


text:
class LIBVIDEOTOOLSSHARED_EXPORT CFilterNMS : public IGenericPostFilter {
protected:
    double mOverlapThresh;
public:
    CFilterNMS(double _overlapThresh);

    void process(tVecDetections& _candidates) const;
};

#endif // FILTERNMS_H


text:
import { promises as fs } from 'fs'

export type ConfigAvailable = {
  exists: boolean
  emptyEslintrc?: boolean
  emptyPkgJsonConfig?: boolean
  firstTimeSetup?: true
}

export async function hasEslintConfiguration(
  eslintrcFile: string | null,
  packageJsonConfig: { eslintConfig: any } | null
): Promise<ConfigAvailable> {
  const configObject = {
    exists: false,
    emptyEslintrc: false,
    emptyPkgJsonConfig: false,
  }

  if (eslintrcFile) {
    const content = await fs.readFile(eslintrcFile, { encoding: 'utf8' }).then(
      (txt) => txt.trim().replace(/\n/g, ''),
      () => null
    )

    if (
      content === '' ||
      content === '{}' ||
      content === '---' ||
      content === 'module.exports = {}'
    ) {
      return { ...configObject, emptyEslintrc: true }
    }
  } else if (packageJsonConfig?.eslintConfig) {
    if (Object.entries(packageJsonConfig?.eslintConfig).length === 0) {
      return {
        ...configObject,
        emptyPkgJsonConfig: true,
      }
    }
  } else {
    return configObject
  }

  return { ...configObject, exists: true }
}


text:
<?php
/**
 * Archivo en español
 *
 * @licencia    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 * @autor       Esther Brunner <wikidesign@gmail.com>
 */

// frases personalizadas en español para el plugin
$lang['readmore']   = 'Leer más...';

//Setup VIM: ex: et ts=2 :


text:
<?php

namespace Kanboard\Plugin\AutomaticAction\Action;

use Kanboard\Model\TaskModel;
use Kanboard\Action\Base;

/**
 * Rename Task Title
 *
 * @package action
 * @author  Frederic Guillot
 */
class TaskRename extends Base
{
    /**
     * Get automatic action description
     *
     * @access public
     * @return string
     */
    public function getDescription()
    {
        return t('Change the task title when the task is moved to another column');
    }

    /**
     * Get the list of compatible events
     *
     * @access public
     * @return array
     */
    public function getCompatibleEvents()
    {
        return array(
            TaskModel::EVENT_MOVE_COLUMN,
        );
    }

    /**
     * Get the required parameter for the action (defined by the user)
     *
     * @access public
     * @return array
     */
    public function getActionRequiredParameters()
    {
        return array(
            'title' => t('Title'),
        );
    }

    /**
     * Get the required parameter for the event
     *
     * @access public
     * @return string[]
     */
    public function getEventRequiredParameters()
    {
        return array(
            'task_id',
        );
    }

    /**
     * Execute the action
     *
     * @access public
     * @param  array   $data   Event data dictionary
     * @return bool            True if the action was executed or false when not executed
     */
    public function doAction(array $data)
    {
        return $this->taskModificationModel->update(array('id' => $data['task_id'], 'title' => $this->getParam('title')));
    }

    /**
     * Check if the event data meet the action condition
     *
     * @access public
     * @param  array   $data   Event data dictionary
     * @return bool
     */
    public function hasRequiredCondition(array $data)
    {
        return true;
    }
}


text:
package com.jcdesimp.canvaskits.commands;

import com.jcdesimp.canvaskits.CanvasKits;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

/**
 * File created by jcdesimp on 5/17/14.
 */
public class KitsCommandExecutor implements CommandExecutor {
    CanvasKits plugin;

    public KitsCommandExecutor(CanvasKits plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

        return showKitsView(sender, label);
        //return false;
    }

    private boolean showKitsView(CommandSender sender, String label) {
        if(sender instanceof Player){
            plugin.getViewManager().addView((Player)sender);
        }
        return true;
    }

}


text:
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { SkyVerticalTabsetModule } from '@skyux/tabs';

import { SkyVerticalTabsDemoComponent } from './vertical-tabs-demo.component';

@NgModule({
  imports: [CommonModule, SkyVerticalTabsetModule],
  declarations: [SkyVerticalTabsDemoComponent],
  exports: [SkyVerticalTabsDemoComponent],
})
export class SkyVerticalTabDemoModule {}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/ChangeSigns.iml" filepath="$PROJECT_DIR$/ChangeSigns.iml" />
      <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
    </modules>
  </component>
</project>


text:
package graphTheory.graphDrawer.symbols;

/**
 *
 * Define the graphical node representation: a circle of radius {@link #radius}.
 *
 * @author Watel Dimitri
 *
 */
public class NodeCircleSymbol extends NodeSymbol {

	public static final int DEFAULT_RADIUS = 25;

	int radius;

	public NodeCircleSymbol() {
		radius = DEFAULT_RADIUS;
	}

	public int getRadius() {
		return radius;
	}

	public void setRadius(int radius) {
		this.radius = radius;
	}

	@Override
	public boolean isCircle() {
		return true;
	}

}


text:
require "test_helper"

class UidTest < Minitest::Test
  let(:app) { ->(env) { } }

  let(:strategy) do
    OmniAuth::Strategies::Citrix.new(app, "consumer_id", "consumer_secret")
  end

  test "returns uuid" do
    access_token = mock("access_token", {params: {
                          "account_key" => "ACCOUNT_KEY"
                        }})

    strategy.stubs(:access_token).returns(access_token)

    assert_equal "ACCOUNT_KEY", strategy.uid
  end
end


text:
FROM biocontainers/biocontainers:debian-stretch-backports
MAINTAINER biocontainers <biodocker@gmail.com>
LABEL    software="freecontact" \
    container="freecontact" \
    about.summary="fast protein contact predictor" \
    about.home="http://rostlab.org/" \
    software.version="1.0.21-5-deb" \
    version="1" \
    about.copyright="2013 Laszlo Kajan <lkajan@rostlab.org>, Technical University of Munich, Germany" \
    about.license="GPL-3+" \
    about.license_file="/usr/share/doc/freecontact/copyright" \
    extra.binaries="/usr/bin/freecontact" \
    about.tags=""

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y freecontact && apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/*
USER biodocker


text: module.exports = require('../../full/instance/at');


text:
/**
 * generated by Xtext 2.11.0
 */
package edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.util;

import edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.*;

import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;

import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;

import org.eclipse.emf.ecore.EObject;

/**
 *
 * The Adapter Factory for the model.
 * It provides an adapter createXXX method for each class of the model.
 *
 * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraintPackage
 * @generated
 */
public class InputConstraintAdapterFactory extends AdapterFactoryImpl
{
  /**
   * The cached model package.
   *
   *
   * @generated
   */
  protected static InputConstraintPackage modelPackage;

  /**
   * Creates an instance of the adapter factory.
   *
   *
   * @generated
   */
  public InputConstraintAdapterFactory()
  {
    if (modelPackage == null)
    {
      modelPackage = InputConstraintPackage.eINSTANCE;
    }
  }

  /**
   * Returns whether this factory is applicable for the type of the object.
   *
   * This implementation returns true if the object is either the model's package or is an instance object of the model.
   *
   * @return whether this factory is applicable for the type of the object.
   * @generated
   */
  @Override
  public boolean isFactoryForType(Object object)
  {
    if (object == modelPackage)
    {
      return true;
    }
    if (object instanceof EObject)
    {
      return ((EObject)object).eClass().getEPackage() == modelPackage;
    }
    return false;
  }

  /**
   * The switch that delegates to the createXXX methods.
   *
   *
   * @generated
   */
  protected InputConstraintSwitch<Adapter> modelSwitch =
    new InputConstraintSwitch<Adapter>()
    {
      @Override
      public Adapter caseInputConstraint(InputConstraint object)
      {
        return createInputConstraintAdapter();
      }
      @Override
      public Adapter caseExpression(Expression object)
      {
        return createExpressionAdapter();
      }
      @Override
      public Adapter caseScalarExpression(ScalarExpression object)
      {
        return createScalarExpressionAdapter();
      }
      @Override
      public Adapter caseRandomExpression(RandomExpression object)
      {
        return createRandomExpressionAdapter();
      }
      @Override
      public Adapter caseRefExpression(RefExpression object)
      {
        return createRefExpressionAdapter();
      }
      @Override
      public Adapter caseElementRefExpression(ElementRefExpression object)
      {
        return createElementRefExpressionAdapter();
      }
      @Override
      public Adapter caseIntervalExpression(IntervalExpression object)
      {
        return createIntervalExpressionAdapter();
      }
      @Override
      public Adapter caseSetExpression(SetExpression object)
      {
        return createSetExpressionAdapter();
      }
      @Override
      public Adapter caseIntegerLiteral(IntegerLiteral object)
      {
        return createIntegerLiteralAdapter();
      }
      @Override
      public Adapter caseRealLiteral(RealLiteral object)
      {
        return createRealLiteralAdapter();
      }
      @Override
      public Adapter caseBooleanLiteral(BooleanLiteral object)
      {
        return createBooleanLiteralAdapter();
      }
      @Override
      public Adapter caseBinaryExpression(BinaryExpression object)
      {
        return createBinaryExpressionAdapter();
      }
      @Override
      public Adapter casePreExpression(PreExpression object)
      {
        return createPreExpressionAdapter();
      }
      @Override
      public Adapter caseRandomIntegerExpression(RandomIntegerExpression object)
      {
        return createRandomIntegerExpressionAdapter();
      }
      @Override
      public Adapter caseRandomRealExpression(RandomRealExpression object)
      {
        return createRandomRealExpressionAdapter();
      }
      @Override
      public Adapter caseRandomElementExpression(RandomElementExpression object)
      {
        return createRandomElementExpressionAdapter();
      }
      @Override
      public Adapter caseConstRefExpression(ConstRefExpression object)
      {
        return createConstRefExpressionAdapter();
      }
      @Override
      public Adapter caseNegativeExpression(NegativeExpression object)
      {
        return createNegativeExpressionAdapter();
      }
      @Override
      public Adapter defaultCase(EObject object)
      {
        return createEObjectAdapter();
      }
    };

  /**
   * Creates an adapter for the target.
   *
   *
   * @param target the object to adapt.
   * @return the adapter for the target.
   * @generated
   */
  @Override
  public Adapter createAdapter(Notifier target)
  {
    return modelSwitch.doSwitch((EObject)target);
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraint Input Constraint}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.InputConstraint
   * @generated
   */
  public Adapter createInputConstraintAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.Expression Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.Expression
   * @generated
   */
  public Adapter createExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ScalarExpression Scalar Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ScalarExpression
   * @generated
   */
  public Adapter createScalarExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomExpression Random Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomExpression
   * @generated
   */
  public Adapter createRandomExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RefExpression Ref Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RefExpression
   * @generated
   */
  public Adapter createRefExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ElementRefExpression Element Ref Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ElementRefExpression
   * @generated
   */
  public Adapter createElementRefExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntervalExpression Interval Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntervalExpression
   * @generated
   */
  public Adapter createIntervalExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.SetExpression Set Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.SetExpression
   * @generated
   */
  public Adapter createSetExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntegerLiteral Integer Literal}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.IntegerLiteral
   * @generated
   */
  public Adapter createIntegerLiteralAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RealLiteral Real Literal}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RealLiteral
   * @generated
   */
  public Adapter createRealLiteralAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BooleanLiteral Boolean Literal}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BooleanLiteral
   * @generated
   */
  public Adapter createBooleanLiteralAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BinaryExpression Binary Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.BinaryExpression
   * @generated
   */
  public Adapter createBinaryExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.PreExpression Pre Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.PreExpression
   * @generated
   */
  public Adapter createPreExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomIntegerExpression Random Integer Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomIntegerExpression
   * @generated
   */
  public Adapter createRandomIntegerExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomRealExpression Random Real Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomRealExpression
   * @generated
   */
  public Adapter createRandomRealExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomElementExpression Random Element Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.RandomElementExpression
   * @generated
   */
  public Adapter createRandomElementExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ConstRefExpression Const Ref Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.ConstRefExpression
   * @generated
   */
  public Adapter createConstRefExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for an object of class '{@link edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.NegativeExpression Negative Expression}'.
   *
   * This default implementation returns null so that we can easily ignore cases;
   * it's useful to ignore a case when inheritance will catch all the cases anyway.
   *
   * @return the new adapter.
   * @see edu.uah.rsesc.aadlsimulator.xtext.inputConstraint.NegativeExpression
   * @generated
   */
  public Adapter createNegativeExpressionAdapter()
  {
    return null;
  }

  /**
   * Creates a new adapter for the default case.
   *
   * This default implementation returns null.
   *
   * @return the new adapter.
   * @generated
   */
  public Adapter createEObjectAdapter()
  {
    return null;
  }

} //InputConstraintAdapterFactory


text:
@implementation UAEC2CreateVPNGatewayResponse

@synthesize vpnGateway=_vpnGateway;

+ (NSString *)XPathPrefix
{
    return @"./ec2:CreateVpnGatewayResponse/";
}

+ (NSDictionary *)XMLKeyPathsByPropertyKey
{
    // Start with super's key paths (if there are any)
    NSMutableDictionary *keyPaths = [[UAEC2Response XMLKeyPathsByPropertyKey] mutableCopy];

    [keyPaths addEntriesFromDictionary:
    @{
        @"vpnGateway": @"ec2:vpnGateway"
    }];
    return [keyPaths copy];
}

+ (NSValueTransformer *)vpnGatewayXMLTransformer
{
  return [NSValueTransformer UAMTL_XMLTransformerWithModelClass:[UAEC2VPNGateway class]];
}

@end

#pragma clang diagnostic pop


text:
package org.graylog2.alarmcallbacks.plivo;

import org.graylog2.plugin.PluginMetaData;
import org.graylog2.plugin.ServerStatus;
import org.graylog2.plugin.Version;

import java.net.URI;
import java.util.Collections;
import java.util.Set;

/**
 * Implement the PluginMetaData interface here.
 */
public class PlivoSmsAlarmCallBackMetaData implements PluginMetaData {
    @Override
    public String getUniqueId() {
        return PlivoSmsAlarmCallback.class.getCanonicalName();
    }

    @Override
    public String getName() {
        return "Plivo SMS AlarmCallBack Plugin";
    }

    @Override
    public String getAuthor() {
        return "Abdullah EKE <abdheke@gmail.com>";
    }

    @Override
    public URI getURL() {
        return URI.create("https://github.com/aeke/graylog-plugin-plivo");
    }

    @Override
    public Version getVersion() {
        return new Version(1, 0, 0);
    }

    @Override
    public String getDescription() {
        return "Sends all stream alerts as SMS to a defined source phone number over Plivo";
    }

    @Override
    public Version getRequiredVersion() {
        return new Version(1, 0, 0);
    }

    @Override
    public Set<ServerStatus.Capability> getRequiredCapabilities() {
        return Collections.emptySet();
    }
}


text:
package	org.apache.derby.impl.sql.compile;

import org.apache.derby.iapi.types.BitDataValue;
import org.apache.derby.iapi.types.TypeId;
import org.apache.derby.iapi.types.DataValueFactory;

import org.apache.derby.iapi.error.StandardException;

import org.apache.derby.impl.sql.compile.ExpressionClassBuilder;

import org.apache.derby.iapi.services.io.FormatableBitSet;
import org.apache.derby.iapi.util.ReuseFactory;

import java.sql.Types;

public final class VarbitConstantNode extends BitConstantNode
{
	/**
	 * Initializer for a VarbitConstantNode.
	 *
	 * @param arg1  The TypeId for the type of the node OR A Bit containing the value of the constant
	 *
	 * @exception StandardException
	 */

	public void init(
						Object arg1)
		throws StandardException
	{
		init(
					arg1,
					Boolean.TRUE,
					ReuseFactory.getInteger(0));

	}
}