text:
"""
Problem: There are three types of edits that can be performed on strings:
    insert a character, remove a character, or replace a character.
    Given two strings, write a function to check if they are one
    edit (or zero edits) away.
"""

# This implementation is O(n) in time, and O(1) in space
def check_one_away(str1, str2):
    """
    Returns a boolean which is True if the strings
    are within a single character edit away
    (Remove, Insert, Replace)

    >>> check_one_away('pale','ple')
    True
    >>> check_one_away('pales', 'pale')
    True
    >>> check_one_away('pale', 'bale')
    True
    >>> check_one_away('pale', 'bake')
    False
    """
    if abs(len(str1) - len(str2)) > 1:
        return False

    edit_required = False
    i = 0
    j = 0
    while i < len(str1) and j < len(str2):
        if str1[i] != str2[j]:
            if edit_required:
                return False
            edit_required = True

            # Find what kind of edit is required
            if (i+1) < len(str1) and str1[i+1] == str2[j]:
                i += 1
            elif (j+1) < len(str2) and str2[j+1] == str1[i]:
                j += 1
        i += 1
        j += 1
    return True


text:
import React from 'react';
import renderer from 'react-test-renderer';
import { theme} from "@looker/components"
import { ThemeProvider } from "styled-components"
import { FieldMetadata } from '../../components/FieldMetadata'

jest.mock("../../components/DetailDrawerRow", () => ({
  DetailDrawerRow: () => "DetailDrawerRow"
}))

jest.mock("../../components/QueryChart", () => ({
  QueryChart: () => "QueryChart"
}))

jest.mock("../../components/ExternalLink", () => ({
  ExternalLink: () => "ExternalLink"
}))

jest.mock("../../components/FieldCommentList", () => ({
  FieldCommentList: () => "FieldCommentList"
}))

it('renders correctly', () => {
  const tree = renderer
    .create(
      <ThemeProvider theme={theme}>
        <FieldMetadata
          field={{}}
          columns={[]}
          explore={{}}
          key={""}
          model={{}}
          tab={0}
          detailsPane={()=>{}}
          commentsPane={()=>{}}
          sortedComments={[]}
          addComment={()=>{}}
          editComment={()=>{}}
          deleteComment={()=>{}}
          fieldCommentLength={0}
          commentAuthors={[]}
          me={{}}
          permissions={{}}
          canViewComments={true}
        />
      </ThemeProvider>
    )
    .toJSON();
  expect(tree).toMatchSnapshot();
})

redpajama_set_name: RedPajamaGithub


text:
var models = require('../models/models.js');
var LocalStrategy =   require('passport-local').Strategy;

var userRoles = require('../../public/js/routingConfig').userRoles;

var users = [
    {
        id:         1,
        username:   "user",
        password:   "123",
        role:   userRoles.user
    },
    {
        id:         2,
        username:   "admin",
        password:   "123",
        role:   userRoles.admin
    }
];

module.exports = {

      findById: function(id) {

        models.Jugadores.find({
             where: {
                id: Number(id)
             }
        })
        .then(function(jugador) {
            if (jugador) {
                return jugador;
            }
            else{return null;}
        }
        ).catch(function(error){return null});

    },

    findByUsername: function(username) {

        models.Jugadores.find({
             where: {
                 usu: username
             }
        })
        .then(function(jugador) {
            if (jugador) {
                return jugador;
            }
            else{return null;}
        }
        ).catch(function(error){return null});

    },

    localStrategy: new LocalStrategy(
        function(username, password, done) {
            //return done(null, users[0]);

             models.Jugadores.find({ where: {usu: username }})
              .then(function (user) {
                if (user !== null) {
                  console.log('[AUTH] Success with username: ' + user.username + ' and password (md5-hash): ' + user.password);

                  if(user.role==="4")
                    user.role= userRoles.admin;
                    if(user.role==="2")
                    user.role= userRoles.user;

                  return done(null, user);
                }
                else {
                  console.log('[AUTH] Error with username: ' + username + ' and password:' + password);
                  return done(null, false);
                }
              })

/*
            var jugador = module.exports.findByUsername(username);

            if(!jugador) {
                done(null, false, { message: 'Incorrect username.' });
            }
            else if(jugador.password != username) { //PASSWORD!!!!!!!
                done(null, false, { message: 'Incorrect username.' });
            }
            else {
                return done(null, jugador);
            }*/

        }
    ),

    serializeUser: function(jugador, done) {
        done(null, jugador.id);
    },

    deserializeUser: function(id, done) {

          models.Jugadores.find({
             where: {
                id: Number(id)
             }
        })
        .then(function(jugador) {
            if (jugador) {
               done(null, jugador);
            }
            else{done(null, false);}
        }
        ).catch(function(error){done(null, false)});

       /*
        var jugador = module.exports.findById(id);

        if(jugador)    { done(null, jugador); }
        else        { done(null, false); }*/
    }

}


text:
var test = require('tape');
var newsflash = require('../');

/**
 * Tests the making of a niche object without setting the value
 */
test('dummy', function (t) {

    t.equals(1, 1);
    t.end();

});


text:
#include <analyzer/AnalyzerInternal.h>
#include <instantsearch/Indexer.h>
#include <instantsearch/QueryEvaluator.h>
#include <instantsearch/Query.h>
#include <instantsearch/Term.h>
#include <instantsearch/QueryResults.h>
#include "analyzer/StandardAnalyzer.h"
#include "UnitTestHelper.h"
#include "analyzer/AnalyzerContainers.h"

#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdlib>

#define MAX_QUERY_NUMBER 5000

using namespace std;

namespace srch2is = srch2::instantsearch;
using namespace srch2is;
IndexMetaData *indexMetaData;
Indexer *buildIndex(string data_file, string index_dir, string expression)
{
    /// Set up the Schema
    Schema *schema = Schema::create(srch2is::DefaultIndex, srch2::instantsearch::POSITION_INDEX_FIELDBIT);
    schema->setPrimaryKey("id");
    schema->setSearchableAttribute("name", 2);
    schema->setSearchableAttribute("category", 1);
    schema->setScoringExpression(expression);

    /// Create an Analyzer
    SynonymContainer *syn = SynonymContainer::getInstance(string(""), SYNONYM_DONOT_KEEP_ORIGIN);
    ProtectedWordsContainer *prot = ProtectedWordsContainer::getInstance("");
    AnalyzerInternal *simpleAnlyzer = new StandardAnalyzer(NULL, NULL, prot, syn, string(""));

    Analyzer *analyzer = new Analyzer(NULL, NULL, prot, syn, "", srch2is::STANDARD_ANALYZER);

    /// Create an index writer
    unsigned mergeEveryNSeconds = 3;
    unsigned mergeEveryMWrites = 5;
    unsigned updateHistogramEveryPMerges = 1;
    unsigned updateHistogramEveryQWrites = 5;
    IndexMetaData *indexMetaData = new IndexMetaData( new CacheManager(),
    		mergeEveryNSeconds, mergeEveryMWrites,
    		updateHistogramEveryPMerges, updateHistogramEveryQWrites,
    		index_dir);
    Indexer *indexer = Indexer::create(indexMetaData, analyzer, schema);

    Record *record = new Record(schema);

    unsigned docsCounter = 0;
    string line;

    ifstream data(data_file.c_str());

    /// Read records from file
    /// the file should have two fields, seperated by '^'
    /// the first field is the primary key, the second field is a searchable attribute
    while(getline(data,line))
    {
        unsigned cellCounter = 0;
        stringstream  lineStream(line);
        string cell;

        while(getline(lineStream,cell,'^') && cellCounter < 4 )
        {
            if (cellCounter == 0)
            {
                record->setPrimaryKey(cell.c_str());
            }
            else if (cellCounter == 1)
            {
                record->setSearchableAttributeValue(0, cell);
            }
            else if (cellCounter == 2)
            {
                record->setSearchableAttributeValue(1, cell);
            }
            else if (cellCounter == 3)
            {
                record->setRecordBoost(atof(cell.c_str()));
            }

            cellCounter++;
        }

        indexer->addRecord(record, analyzer);

        docsCounter++;

        record->clear();
    }

    cout << "#Docs Read:" << docsCounter << endl;

    indexer->commit();

    data.close();

    delete record;
    delete analyzer;
    delete schema;
    prot->free();
    syn->free();

    return indexer;
}

void fireSearch(QueryEvaluator * queryEvaluator, vector<unsigned> filter, ATTRIBUTES_OP attrOp, unsigned k, const vector<string> &searchKeywords,
                unsigned numOfResults, const vector<string> &resultIds, const vector<vector<vector<unsigned> > > &resultAttributeBitmap)
{

    Query *query = new Query(srch2::instantsearch::SearchTypeTopKQuery);
    QueryResultFactory * resultFactory = new QueryResultFactory();
    QueryResults * queryResults = new QueryResults(resultFactory,queryEvaluator, query);

    for (unsigned i = 0; i < searchKeywords.size(); ++i)
    {
        TermType termType = TERM_TYPE_PREFIX;
        Term *term = ExactTerm::create(searchKeywords[i], termType, 1, 0.5);
        term->addAttributesToFilter(filter, attrOp);
        query->setPrefixMatchPenalty(0.95);
        query->add(term);
    }

    LogicalPlan * logicalPlan = prepareLogicalPlanForUnitTests(query , NULL, 0, 10, false, srch2::instantsearch::SearchTypeTopKQuery);
    queryEvaluator->search(logicalPlan , queryResults);
//    QueryEvaluatorRuntimeParametersContainer runTimeParameters;
//    QueryEvaluator * queryEvaluator = new QueryEvaluator(indexer,&runTimeParameters );
    cout << "record found :" << queryResults->getNumberOfResults() << endl;
    ASSERT(queryResults->getNumberOfResults() == numOfResults);

    vector<vector<unsigned> > matchedAttributeBitmap;
    for (unsigned i = 0; i< numOfResults; ++i)
    {
        ASSERT(queryResults->getRecordId(i) == resultIds[i]);
        queryResults->getMatchedAttributes(i, matchedAttributeBitmap);
        for(int j = 0; j< matchedAttributeBitmap.size(); j++)
        	for(int k = 0; k< matchedAttributeBitmap[j].size(); k++)
        		ASSERT(matchedAttributeBitmap[j][k] == resultAttributeBitmap[i][j][k]);
    }

    delete queryResults;
    delete query;
    delete resultFactory;

}

void test(string index_dir, string data_file)
{
    Indexer *indexer = buildIndex(data_file, index_dir, "idf_score*doc_boost");

    QueryEvaluatorRuntimeParametersContainer runTimeParameters;
    QueryEvaluator * queryEvaluator = new QueryEvaluator(indexer,&runTimeParameters );

    vector<unsigned> filter;
    int k = 10;

    vector<string> searchKeywords;
    searchKeywords.push_back("jack");

    vector<string> resultIds;
    vector<vector<vector<unsigned> > > resultAttributeBitmap;
    unsigned numOfResults = 0;

    // case 1
    filter.push_back(1); // set the second bit to 1, meaning the keyword need to appear in the second searchable attribute

    resultIds.push_back("4");
    resultIds.push_back("2");
    resultIds.push_back("3");
    numOfResults = 3;
    resultAttributeBitmap.resize(3);
    resultAttributeBitmap[0].push_back(filter);
    resultAttributeBitmap[1].push_back(filter);
    resultAttributeBitmap[2].push_back(filter);
    // Do OR operation.
    fireSearch(queryEvaluator, filter, ATTRIBUTES_OP_OR, k, searchKeywords, numOfResults, resultIds, resultAttributeBitmap);

    resultIds.clear();
    resultAttributeBitmap.clear();

    cout << "case 1 passed." << endl;

    // case 2
    filter.clear();
    filter.push_back(0); // set the first bit to 1, meaning the keyword need to appear in the first searchable attribute

    resultIds.push_back("4");
    resultIds.push_back("1");
    numOfResults = 2;
    resultAttributeBitmap.resize(2);
    resultAttributeBitmap[0].push_back(filter);
    resultAttributeBitmap[1].push_back(filter);

    // Do OR operation.
    fireSearch(queryEvaluator, filter, ATTRIBUTES_OP_OR, k, searchKeywords, numOfResults, resultIds, resultAttributeBitmap);

    resultIds.clear();
    resultAttributeBitmap.clear();

    cout << "case 2 passed." << endl;

    // case 3
    filter.clear();
    filter.push_back(0);
    filter.push_back(1); // set both the first bit and second bit to 1, meaning the keyword need to appear either in the first searchable attribute or the second

    resultIds.push_back("4");
    resultIds.push_back("1");
    resultIds.push_back("2");
    resultIds.push_back("3");
    numOfResults = 4;
    resultAttributeBitmap.resize(4);
    resultAttributeBitmap[0].push_back(filter);
    vector<unsigned> result;
    result.push_back(0);
    resultAttributeBitmap[1].push_back(result);
    result.clear();
    result.push_back(1);
    resultAttributeBitmap[2].push_back(result);
    resultAttributeBitmap[3].push_back(result);

    // Do OR operation.
    fireSearch(queryEvaluator, filter, ATTRIBUTES_OP_OR, k, searchKeywords, numOfResults, resultIds, resultAttributeBitmap);

    resultIds.clear();
    resultAttributeBitmap.clear();

    cout << "case 3 passed." << endl;

    // case 4
    filter.clear();
    filter.push_back(0);
    filter.push_back(1); // set both the first bit and second bit to 1,

    resultIds.push_back("4");
    numOfResults = 1;
    resultAttributeBitmap.resize(1);
    resultAttributeBitmap[0].push_back(filter);
    // Do AND operation.
    fireSearch(queryEvaluator, filter, ATTRIBUTES_OP_AND, k, searchKeywords, numOfResults, resultIds, resultAttributeBitmap);

    resultIds.clear();
    resultAttributeBitmap.clear();

    cout << "case 4 passed." << endl;

    // case 5
    filter.clear(); // no filter

    resultIds.push_back("4");
    resultIds.push_back("1");
    resultIds.push_back("2");
    resultIds.push_back("3");
    numOfResults = 4;
    resultAttributeBitmap.resize(4);
    result.clear();
    result.push_back(0);
    result.push_back(1);
    resultAttributeBitmap[0].push_back(result);
    result.clear();
    result.push_back(0);
    resultAttributeBitmap[1].push_back(result);
    result.clear();
    result.push_back(1);
    resultAttributeBitmap[2].push_back(result);
    resultAttributeBitmap[3].push_back(result);

    fireSearch(queryEvaluator, filter, ATTRIBUTES_OP_OR, k, searchKeywords, numOfResults, resultIds, resultAttributeBitmap);

    resultIds.clear();

    cout << "case 5 passed." << endl;

    delete queryEvaluator;
    delete indexer;
    delete indexMetaData;

}

int main(int argc, char **argv)
{
    cout << "Test begins." << endl;
    cout << "-------------------------------------------------------" << endl;

    string index_dir = getenv("index_dir");
    string data_file = index_dir + "/data";

    test(index_dir, data_file);

    return 0;
}


text:
class Utils
{
public:
   // Utils();
    QImage cvMatToQImage( const cv::Mat &inMat );
    QPixmap cvMatToQPixmap( const cv::Mat &inMat );

};

#endif // UTILS_H


text:
<!DOCTYPE html>

  <title>Guanzhou's blog</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css">
  <link rel="stylesheet" href="../styles/main.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

Blogs

Products

Cohorts

About

Self confidence

cultural

self confidence

self awareness

week 5

          by:Guanzhou
          July 29 2016

            What is the relationship between mindfulness and self awareness?

          They are essentially the same.

          Self awareness is a neutral mode that maintains self-reflectiveness even in the midst of turbulent emotions. --Daniel Goleman

          Mindfulness means paying attention in a particular way: on purpose, in the present moment, and non-judgementally. --Jon Kabat-Zinn

          They are both about knowing what I am doing with meta-attention.

          Try at least one of the self awareness practices from the chapter (Body Scan, Journaling). What was your experience of it? How did you feel?

          I have been employing Body Scan technique to make me fall into sleep fast and also to relax myself. I should hear about this technique from somewhere else, but don't remember exactly where.

          I felt that it was a perfect technique for falling into sleep quickly. And now I understand that it is also leading to emotional awareness and to self-awareness.

          What did you take away from the "My Emotions are Not Me" section?

          In China, from movies and costumes I heard monks saying "sex is nothing, nothing is sex" to carm down themselves. "My Emotions are Not Me" is kind of "Emotions are nothing, nothing is emotions".

          After all, I learned that emotions are controlable.

About me

              I picked up some programming skills after working, depending on which I worked as a java developer for 7 months. World is big and I'd like to have a look, so I arrived NZ. I attended EDA to refine my programming skills.

Contact me

66 Woodbury St., Russley, Christchurch 8042

+64 210512877

benzhao2866@gmail.com


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>in3hrs.com· Bootstrap</title>

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

      <link href='http://fonts.googleapis.com/css?family=Roboto:400,300,700' rel='stylesheet' type='text/css'>
      <link rel="stylesheet" href="css/font-awesome.min.css">

      <link href="../css/bootplus.css" rel="stylesheet">
      <link href="../css/bootplus-responsive.css" rel="stylesheet">
      <link href="../css/custom.css" rel="stylesheet">

    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="ico/apple-touch-icon-114-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="ico/apple-touch-icon-72-precomposed.png">
                    <link rel="apple-touch-icon-precomposed" href="ico/apple-touch-icon-57-precomposed.png">
                                   <link rel="shortcut icon" href="ico/favicon.png">

    <?php include '../includes/header.inc.php'; ?>

Signup now to get all the goodness!

        <form class="form-horizontal"  role="form" action="." method="post">

            Name

            <input type="text" name="name"  id="exampleInputname1" placeholder="Your Name">

            Email Address

            <input type="email" name="email" id="exampleInputname1" placeholder="Email">

            Password

            <input type="password" name="password" class="form-control" id="exampleInputname1" placeholder="Password">

            <button type="submit" name="action" class="btn btn-success">Sign up</button>

         <?php if(isset($profileExist)){
              echo "Sorry, This Email is Registered!";
            } ?>

        </form>

Back to top

© 2013 Company, Inc. · Privacy · Terms


text:
package _02Blobs.factories;

import _02Blobs.interfaces.Attack;
import _02Blobs.interfaces.Behavior;
import _02Blobs.interfaces.Blob;
import _02Blobs.models.BlobImpl;

public final class BlobFactory {

    private BlobFactory() {
    }

    public static Blob createBlob(String name, int health, int damage, Behavior behavior, Attack attack){
        return  new BlobImpl(name,health,damage, behavior, attack);
    }
}


text:
<?php
namespace test\k\h;
class b { }


text:
void CrudeMemoryLeakDetection();
#endif // EXPERIMENT_DEBUG

#define ZERO_MEM( arg ) ZeroMemory( &arg, sizeof( arg ) );
#define ASSERT_DELETE( arg ) assert( arg ); delete arg; arg = nullptr;

template < class T >
T* MatrixAlloc( unsigned p_rows, unsigned p_cols ) {
	return (T*)calloc( p_rows * p_cols, sizeof( T ) );
}
template < class T >
void MatrixFree( T* p_matrix ) {
	free( p_matrix );
}

class Util {
public:
	static std::string toString( int p_int );
	static std::string toString( unsigned p_uint );

	static const char* toStringC( int p_int );
	static const char* toStringC( unsigned p_uint );

	static int toInt( std::string p_string );
};

#endif // DV2549_EXPERIMENT_UTIL_H


text:
{% load i18n %}
{% blocktrans trimmed %}
The main contention. It will be arguable with own premises.
The Premises can prove or rebuttal this contention.

Examples:

Real art is for society, not for profit

The meaning of life is 42

Ethics man did what had to be done

{% endblocktrans %}


text:
package io.tilt.minka.api;

import java.io.Serializable;
import java.util.Set;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Supplier;

import org.apache.commons.lang.Validate;

import io.tilt.minka.api.crud.Client;
import io.tilt.minka.core.leader.balancer.Balancer;
import io.tilt.minka.domain.AwaitingDelegate;
import io.tilt.minka.domain.ConsumerDelegate;
import io.tilt.minka.domain.ConsumerDelegate.MappingEvent;
import io.tilt.minka.model.Duty;
import io.tilt.minka.model.Pallet;
import io.tilt.minka.model.PartitionDelegate;
import io.tilt.minka.domain.DependencyPlaceholder;

/**
 * Mapper for Minka sharding events.

 * When all listening events are mapped call EventMapper::done to release bootstrap process.
 *

 * Some events are mandatory and others optional, strictly related to the usage of {@linkplain Client}.

 * Usually client will map capturing and releasing events for duties, and set server capacities for each pallet.
 *

 * Declaring shard capacities are required if client uses a balancer that depends on duty weights.

 */
public class EventMapper {

	private final Tenant tenant;

	protected EventMapper(final Tenant tenant)  {
		this.tenant = tenant;
	}

	private DependencyPlaceholder getDepPlaceholder() {
		return tenant.getContext().getBean(DependencyPlaceholder.class);
	}

	private synchronized void initConsumerDelegate() {
		DependencyPlaceholder holder = getDepPlaceholder();
		if (holder.getMaster() == null || holder.getMaster() instanceof AwaitingDelegate) {
			final ConsumerDelegate delegate = new ConsumerDelegate(tenant.getConfig());
			holder.setDelegate(delegate);
			holder.setMaster(delegate);
		} else {
			Validate.isTrue(holder.getDelegate() instanceof ConsumerDelegate,
					"You're trying event's consumer with an already implementation set");
		}
	}
	/**
	 * Mandatory. In case the current shard's elected as LeaderBootstrap.
	 * Remember the supplier's source of duties must be ACID with the Client methods used to CRUD duties.
	 * As long as Minka lacks of a CAP storage facility.
	 * Note duty instances should be created only once and then references returned.
	 * To avoid inconsistency their return must always include any additions made thru {@linkplain Client}
	 * @param supplier	to be called only at shard's election as LeaderBootstrap
	 * @return	the event mapper builder
	 */
	public EventMapper onLoad(final Supplier<Set<Duty>> supplier) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getMaster()).putSupplier(MappingEvent.loadduties, supplier);
		return this;
	}
	/**
	 * Mandatory. In case the current shard's elected as LeaderBootstrap.
	 * To avoid inconsistency their return must always include any additions made thru {@linkplain Client}
	 * @param supplier	to be called only at shard's election as LeaderBootstrap
	 * @return	the event mapper builder
	 */
	public EventMapper onPalletLoad(final Supplier<Set<Pallet>> supplier) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getMaster()).setPalletSupplier(supplier);
		return this;
	}
	/**
	 * Mandatory. Map duty distribution and delegation responsibilities to a consumer
	 * @see PartitionDelegate
	 * @param consumer	to be called anytime a distribution and balance runs in the leader shard
	 * @return	the event mapper builder
	 */
	public EventMapper onCapture(final Consumer<Set<Duty>> consumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putConsumer(consumer, MappingEvent.capture);
		return this;
	}
	/**
	 * Required optional. Map pallet assignation responsibilities to a consumer
	 * @see PartitionDelegate
	 * @param consumer	to be called anytime a distribution and balance runs in the leader shard
	 * @return	the event mapper builder
	 */
	public EventMapper onPalletCapture(final Consumer<Set<Pallet>> consumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putConsumerPallet(consumer, MappingEvent.capturePallet);
		return this;
	}
	/**
	 * Mandatory. Map duty release contract to a consumer
	 * @see PartitionDelegate
	 * @param consumer	to be called anytime a distribution and balance runs in the leader shard
	 * @return	the event mapper builder
	 */
	public EventMapper onRelease(final Consumer<Set<Duty>> consumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putConsumer(consumer, MappingEvent.release);
		return this;
	}
	/**
	 * Required optional. Map pallet release contract to a consumer
	 * @see PartitionDelegate
	 * @param consumer	to be called anytime a distribution and balance runs in the leader shard
	 * @return	the event mapper builder
	 */
	public EventMapper onPalletRelease(final Consumer<Set<Pallet>> consumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putConsumerPallet(consumer, MappingEvent.releasePallet);
		return this;
	}
	/**
	 * Optional. Map an update on the duty's payload to a consumer
	 * @param consumer	to be called only on client's call thru Client.update(..)
	 * @return	the event mapper builder
	 */
	public EventMapper onUpdate(final Consumer<Duty> consumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).setConsumerUpdate(consumer);
		return this;
	}
	/**
	 * Optional. Map an update on the pallet's payload to a consumer
	 * @param consumer	to be called only on client's call thru MinkaClient.update(..)
	 * @return	the event mapper builder
	 */
	public EventMapper onPalletUpdate(final Consumer<Pallet> consumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).setConsumerUpdatePallet(consumer);
		return this;
	}
	/**
	 * Optional. Map duty object's transfer responsibilities to a receptionist consumer
	 * @see PartitionDelegate
	 * @param biconsumer	to be called only on client's call thru MinkaClient.deliver(...)
	 * @return	the event mapper builder
	 */
	public EventMapper onTransfer(final BiConsumer<Duty, Serializable> biconsumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).setBiConsumerTransfer(biconsumer);
		return this;
	}
	public EventMapper onPalletTransfer(final BiConsumer<Pallet, Serializable> biconsumer) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).setBiConsumerTransferPallet(biconsumer);
		return this;
	}
	/**
	 * Optional. Adds a custom balancer
	 * @param balancer	to use at balancing phase
	 * @return	the event mapper builder
	 */
	public EventMapper onBalance(final Balancer balancer) {
		Validate.notNull(balancer);
		Balancer.Directory.addCustomBalancer(balancer);
		return this;
	}
	/**
	 * Optional. Map minka's service start to a consumer
	 * @param runnable callback to run at event dispatch
	 * @return	the event mapper builder
	 */
	public EventMapper onActivation(final Runnable runnable) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putRunnable(MappingEvent.activation, runnable);
		return this;
	}
	/**
	 * Optional. Map minka's service shutdown to a consumer.
	 * @param runnable	callback to run at event dispatch
	 * @return	the event mapper builder
	 */
	public EventMapper onDeactivation(final Runnable runnable) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putRunnable(MappingEvent.deactivation, runnable);
		return this;
	}
	/**
	 * Mandatory for pallets using a weighted-balancer to be actually distributed.

	 * Explicitly set current shard's capacity for a given Pallet.
	 * Weight value's measure is not validated by Minka against duty weight measure.
	 * @param weight 	must be in the same measure than duty weights grouped by this pallet
	 * @param pallet	the pallet to report capacity about
	 * @return	the event mapper builder
	 */
	public EventMapper setCapacity(final Pallet pallet, final double weight) {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).putCapacity(pallet, weight);
		return this;
	}

	/**
	 * Tells the Server to release the bootstrapping process that fires leader and follower agents.

	 * Mandatory when mapping only required events like: duties::capture/release.
	 * Not required when mapping all events, which will release the bootstrap by itself.
	 * @return	the event mapper builder
	 */
	public EventMapper done() {
		initConsumerDelegate();
		((ConsumerDelegate)getDepPlaceholder().getDelegate()).setExplicitlyReady();
		return this;
	}

}


text:
require 'pathname'

Puppet::Type.newtype(:dsc_xwebsite) do
  require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc'
  require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers'

    class PuppetX::Dsc::TypeHelpers
      def self.validate_MSFT_xWebBindingInformation(mof_type_map, name, value)
        required = []
        allowed = ['port','protocol','ipaddress','hostname','certificatethumbprint','certificatestorename','sslflags']
        lowkey_hash = Hash[value.map { |k, v| [k.to_s.downcase, v] }]

        missing = required - lowkey_hash.keys
        unless missing.empty?
          fail "#{name} is missing the following required keys: #{missing.join(',')}"
        end

        extraneous = lowkey_hash.keys - required - allowed
        unless extraneous.empty?
          fail "#{name} includes invalid keys: #{extraneous.join(',')}"
        end

        lowkey_hash.keys.each do |key|
          if lowkey_hash[key]
            validate_mof_type(mof_type_map[key], 'MSFT_xWebBindingInformation', key, lowkey_hash[key])
          end
        end
      end
    end

  @doc = %q{
    The DSC xWebsite resource type.
    Automatically generated from
    'xWebAdministration/DSCResources/MSFT_xWebsite/MSFT_xWebsite.schema.mof'

    To learn more about PowerShell Desired State Configuration, please
    visit https://technet.microsoft.com/en-us/library/dn249912.aspx.

    For more information about built-in DSC Resources, please visit
    https://technet.microsoft.com/en-us/library/dn249921.aspx.

    For more information about xDsc Resources, please visit
    https://github.com/PowerShell/DscResources.
  }

  validate do
      fail('dsc_name is a required attribute') if self[:dsc_name].nil?
    end

  def dscmeta_resource_friendly_name; 'xWebsite' end
  def dscmeta_resource_name; 'MSFT_xWebsite' end
  def dscmeta_module_name; 'xWebAdministration' end
  def dscmeta_module_version; '1.7.0.0' end

  newparam(:name, :namevar => true ) do
  end

  ensurable do
    newvalue(:exists?) { provider.exists? }
    newvalue(:present) { provider.create }
    newvalue(:absent)  { provider.destroy }
    defaultto { :present }
  end

  # Name:         Name
  # Type:         string
  # IsMandatory:  True
  # Values:       None
  newparam(:dsc_name) do
    def mof_type; 'string' end
    def mof_is_embedded?; false end
    desc "Name"
    isrequired
    validate do |value|
      unless value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string")
      end
    end
  end

  # Name:         PhysicalPath
  # Type:         string
  # IsMandatory:  False
  # Values:       None
  newparam(:dsc_physicalpath) do
    def mof_type; 'string' end
    def mof_is_embedded?; false end
    desc "PhysicalPath"
    validate do |value|
      unless value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string")
      end
    end
  end

  # Name:         Ensure
  # Type:         string
  # IsMandatory:  False
  # Values:       ["Present", "Absent"]
  newparam(:dsc_ensure) do
    def mof_type; 'string' end
    def mof_is_embedded?; false end
    desc "Ensure - Valid values are Present, Absent."
    validate do |value|
      resource[:ensure] = value.downcase
      unless value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string")
      end
      unless ['Present', 'present', 'Absent', 'absent'].include?(value)
        fail("Invalid value '#{value}'. Valid values are Present, Absent")
      end
    end
  end

  # Name:         State
  # Type:         string
  # IsMandatory:  False
  # Values:       ["Started", "Stopped"]
  newparam(:dsc_state) do
    def mof_type; 'string' end
    def mof_is_embedded?; false end
    desc "State - Valid values are Started, Stopped."
    validate do |value|
      unless value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string")
      end
      unless ['Started', 'started', 'Stopped', 'stopped'].include?(value)
        fail("Invalid value '#{value}'. Valid values are Started, Stopped")
      end
    end
  end

  # Name:         BindingInfo
  # Type:         MSFT_xWebBindingInformation[]
  # IsMandatory:  False
  # Values:       None
  newparam(:dsc_bindinginfo, :array_matching => :all) do
    def mof_type; 'MSFT_xWebBindingInformation[]' end
    def mof_is_embedded?; true end
    def mof_type_map
      {"port"=>{:type=>"uint16"}, "protocol"=>{:type=>"string", :values=>["http", "https"]}, "ipaddress"=>{:type=>"string"}, "hostname"=>{:type=>"string"}, "certificatethumbprint"=>{:type=>"string"}, "certificatestorename"=>{:type=>"string", :values=>["My", "WebHosting"]}, "sslflags"=>{:type=>"string", :values=>["0", "1", "2", "3"]}}
    end
    desc "BindingInfo - Hashtable containing binding information (Port, Protocol, IPAddress, HostName, CertificateThumbPrint, CertificateStore)"
    validate do |value|
      unless value.kind_of?(Array) || value.kind_of?(Hash)
        fail("Invalid value '#{value}'. Should be an array of hashes or a hash")
      end
      (value.kind_of?(Hash) ? [value] : value).each_with_index do |v, i|
        fail "BindingInfo value at index #{i} should be a Hash" unless v.is_a? Hash

        PuppetX::Dsc::TypeHelpers.validate_MSFT_xWebBindingInformation(mof_type_map, "BindingInfo", v)
      end
    end
    munge do |value|
      value.kind_of?(Hash) ?
        [PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, value)] :
        value.map { |v| PuppetX::Dsc::TypeHelpers.munge_embeddedinstance(mof_type_map, v) }
    end
  end

  # Name:         ApplicationPool
  # Type:         string
  # IsMandatory:  False
  # Values:       None
  newparam(:dsc_applicationpool) do
    def mof_type; 'string' end
    def mof_is_embedded?; false end
    desc "ApplicationPool"
    validate do |value|
      unless value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string")
      end
    end
  end

  # Name:         Id
  # Type:         string
  # IsMandatory:  False
  # Values:       None
  newparam(:dsc_id) do
    def mof_type; 'string' end
    def mof_is_embedded?; false end
    desc "Id"
    validate do |value|
      unless value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string")
      end
    end
  end

  # Name:         DefaultPage
  # Type:         string[]
  # IsMandatory:  False
  # Values:       None
  newparam(:dsc_defaultpage, :array_matching => :all) do
    def mof_type; 'string[]' end
    def mof_is_embedded?; false end
    desc "DefaultPage - The default pages for the website"
    validate do |value|
      unless value.kind_of?(Array) || value.kind_of?(String)
        fail("Invalid value '#{value}'. Should be a string or an array of strings")
      end
    end
    munge do |value|
      Array(value)
    end
  end

  def builddepends
    pending_relations = super()
    PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations)
  end
end

Puppet::Type.type(:dsc_xwebsite).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do
  confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10240.16384'))
  defaultfor :operatingsystem => :windows

  mk_resource_methods
end


text:
.class Landroid/support/v4/app/NotificationCompatJellybean;
.super Ljava/lang/Object;
.source "NotificationCompatJellybean.java"

# instance fields
.field private b:Landroid/app/Notification$Builder;

# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/app/Notification;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/widget/RemoteViews;ILandroid/app/PendingIntent;Landroid/app/PendingIntent;Landroid/graphics/Bitmap;IIZZILjava/lang/CharSequence;)V
    .locals 7
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "n"    # Landroid/app/Notification;
    .param p3, "contentTitle"    # Ljava/lang/CharSequence;
    .param p4, "contentText"    # Ljava/lang/CharSequence;
    .param p5, "contentInfo"    # Ljava/lang/CharSequence;
    .param p6, "tickerView"    # Landroid/widget/RemoteViews;
    .param p7, "number"    # I
    .param p8, "contentIntent"    # Landroid/app/PendingIntent;
    .param p9, "fullScreenIntent"    # Landroid/app/PendingIntent;
    .param p10, "largeIcon"    # Landroid/graphics/Bitmap;
    .param p11, "mProgressMax"    # I
    .param p12, "mProgress"    # I
    .param p13, "mProgressIndeterminate"    # Z
    .param p14, "useChronometer"    # Z
    .param p15, "priority"    # I
    .param p16, "subText"    # Ljava/lang/CharSequence;

    .prologue
    .line 33
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 34
    new-instance v3, Landroid/app/Notification$Builder;

    invoke-direct {v3, p1}, Landroid/app/Notification$Builder;-><init>(Landroid/content/Context;)V

    iget-wide v4, p2, Landroid/app/Notification;->when:J

    invoke-virtual {v3, v4, v5}, Landroid/app/Notification$Builder;->setWhen(J)Landroid/app/Notification$Builder;

    move-result-object v3

    iget v4, p2, Landroid/app/Notification;->icon:I

    iget v5, p2, Landroid/app/Notification;->iconLevel:I

    invoke-virtual {v3, v4, v5}, Landroid/app/Notification$Builder;->setSmallIcon(II)Landroid/app/Notification$Builder;

    move-result-object v3

    iget-object v4, p2, Landroid/app/Notification;->contentView:Landroid/widget/RemoteViews;

    invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setContent(Landroid/widget/RemoteViews;)Landroid/app/Notification$Builder;

    move-result-object v3

    iget-object v4, p2, Landroid/app/Notification;->tickerText:Ljava/lang/CharSequence;

    invoke-virtual {v3, v4, p6}, Landroid/app/Notification$Builder;->setTicker(Ljava/lang/CharSequence;Landroid/widget/RemoteViews;)Landroid/app/Notification$Builder;

    move-result-object v3

    iget-object v4, p2, Landroid/app/Notification;->sound:Landroid/net/Uri;

    iget v5, p2, Landroid/app/Notification;->audioStreamType:I

    invoke-virtual {v3, v4, v5}, Landroid/app/Notification$Builder;->setSound(Landroid/net/Uri;I)Landroid/app/Notification$Builder;

    move-result-object v3

    iget-object v4, p2, Landroid/app/Notification;->vibrate:[J

    invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setVibrate([J)Landroid/app/Notification$Builder;

    move-result-object v3

    iget v4, p2, Landroid/app/Notification;->ledARGB:I

    iget v5, p2, Landroid/app/Notification;->ledOnMS:I

    iget v6, p2, Landroid/app/Notification;->ledOffMS:I

    invoke-virtual {v3, v4, v5, v6}, Landroid/app/Notification$Builder;->setLights(III)Landroid/app/Notification$Builder;

    move-result-object v4

    iget v3, p2, Landroid/app/Notification;->flags:I

    and-int/lit8 v3, v3, 0x2

    if-eqz v3, :cond_0

    const/4 v3, 0x1

    :goto_0
    invoke-virtual {v4, v3}, Landroid/app/Notification$Builder;->setOngoing(Z)Landroid/app/Notification$Builder;

    move-result-object v4

    iget v3, p2, Landroid/app/Notification;->flags:I

    and-int/lit8 v3, v3, 0x8

    if-eqz v3, :cond_1

    const/4 v3, 0x1

    :goto_1
    invoke-virtual {v4, v3}, Landroid/app/Notification$Builder;->setOnlyAlertOnce(Z)Landroid/app/Notification$Builder;

    move-result-object v4

    iget v3, p2, Landroid/app/Notification;->flags:I

    and-int/lit8 v3, v3, 0x10

    if-eqz v3, :cond_2

    const/4 v3, 0x1

    :goto_2
    invoke-virtual {v4, v3}, Landroid/app/Notification$Builder;->setAutoCancel(Z)Landroid/app/Notification$Builder;

    move-result-object v3

    iget v4, p2, Landroid/app/Notification;->defaults:I

    invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setDefaults(I)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p3}, Landroid/app/Notification$Builder;->setContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p4}, Landroid/app/Notification$Builder;->setContentText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v3

    move-object/from16 v0, p16

    invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setSubText(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p5}, Landroid/app/Notification$Builder;->setContentInfo(Ljava/lang/CharSequence;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p8}, Landroid/app/Notification$Builder;->setContentIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

    move-result-object v3

    iget-object v4, p2, Landroid/app/Notification;->deleteIntent:Landroid/app/PendingIntent;

    invoke-virtual {v3, v4}, Landroid/app/Notification$Builder;->setDeleteIntent(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

    move-result-object v4

    iget v3, p2, Landroid/app/Notification;->flags:I

    and-int/lit16 v3, v3, 0x80

    if-eqz v3, :cond_3

    const/4 v3, 0x1

    :goto_3
    move-object/from16 v0, p9

    invoke-virtual {v4, v0, v3}, Landroid/app/Notification$Builder;->setFullScreenIntent(Landroid/app/PendingIntent;Z)Landroid/app/Notification$Builder;

    move-result-object v3

    move-object/from16 v0, p10

    invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$Builder;

    move-result-object v3

    invoke-virtual {v3, p7}, Landroid/app/Notification$Builder;->setNumber(I)Landroid/app/Notification$Builder;

    move-result-object v3

    move/from16 v0, p14

    invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setUsesChronometer(Z)Landroid/app/Notification$Builder;

    move-result-object v3

    move/from16 v0, p15

    invoke-virtual {v3, v0}, Landroid/app/Notification$Builder;->setPriority(I)Landroid/app/Notification$Builder;

    move-result-object v3

    move/from16 v0, p11

    move/from16 v1, p12

    move/from16 v2, p13

    invoke-virtual {v3, v0, v1, v2}, Landroid/app/Notification$Builder;->setProgress(IIZ)Landroid/app/Notification$Builder;

    move-result-object v3

    iput-object v3, p0, Landroid/support/v4/app/NotificationCompatJellybean;->b:Landroid/app/Notification$Builder;

    .line 59
    return-void

    .line 34
    :cond_0
    const/4 v3, 0x0

    goto :goto_0

    :cond_1
    const/4 v3, 0x0

    goto :goto_1

    :cond_2
    const/4 v3, 0x0

    goto :goto_2

    :cond_3
    const/4 v3, 0x0

    goto :goto_3
.end method

# virtual methods
.method public addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)V
    .locals 1
    .param p1, "icon"    # I
    .param p2, "title"    # Ljava/lang/CharSequence;
    .param p3, "intent"    # Landroid/app/PendingIntent;

    .prologue
    .line 62
    iget-object v0, p0, Landroid/support/v4/app/NotificationCompatJellybean;->b:Landroid/app/Notification$Builder;

    invoke-virtual {v0, p1, p2, p3}, Landroid/app/Notification$Builder;->addAction(ILjava/lang/CharSequence;Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;

    .line 63
    return-void
.end method

.method public addBigPictureStyle(Ljava/lang/CharSequence;ZLjava/lang/CharSequence;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;Z)V
    .locals 3
    .param p1, "bigContentTitle"    # Ljava/lang/CharSequence;
    .param p2, "useSummary"    # Z
    .param p3, "summaryText"    # Ljava/lang/CharSequence;
    .param p4, "bigPicture"    # Landroid/graphics/Bitmap;
    .param p5, "bigLargeIcon"    # Landroid/graphics/Bitmap;
    .param p6, "bigLargeIconSet"    # Z

    .prologue
    .line 78
    new-instance v1, Landroid/app/Notification$BigPictureStyle;

    iget-object v2, p0, Landroid/support/v4/app/NotificationCompatJellybean;->b:Landroid/app/Notification$Builder;

    invoke-direct {v1, v2}, Landroid/app/Notification$BigPictureStyle;-><init>(Landroid/app/Notification$Builder;)V

    invoke-virtual {v1, p1}, Landroid/app/Notification$BigPictureStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$BigPictureStyle;

    move-result-object v1

    invoke-virtual {v1, p4}, Landroid/app/Notification$BigPictureStyle;->bigPicture(Landroid/graphics/Bitmap;)Landroid/app/Notification$BigPictureStyle;

    move-result-object v0

    .line 81
    .local v0, "style":Landroid/app/Notification$BigPictureStyle;
    if-eqz p6, :cond_0

    .line 82
    invoke-virtual {v0, p5}, Landroid/app/Notification$BigPictureStyle;->bigLargeIcon(Landroid/graphics/Bitmap;)Landroid/app/Notification$BigPictureStyle;

    .line 84
    :cond_0
    if-eqz p2, :cond_1

    .line 85
    invoke-virtual {v0, p3}, Landroid/app/Notification$BigPictureStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroid/app/Notification$BigPictureStyle;

    .line 87
    :cond_1
    return-void
.end method

.method public addBigTextStyle(Ljava/lang/CharSequence;ZLjava/lang/CharSequence;Ljava/lang/CharSequence;)V
    .locals 3
    .param p1, "bigContentTitle"    # Ljava/lang/CharSequence;
    .param p2, "useSummary"    # Z
    .param p3, "summaryText"    # Ljava/lang/CharSequence;
    .param p4, "bigText"    # Ljava/lang/CharSequence;

    .prologue
    .line 67
    new-instance v1, Landroid/app/Notification$BigTextStyle;

    iget-object v2, p0, Landroid/support/v4/app/NotificationCompatJellybean;->b:Landroid/app/Notification$Builder;

    invoke-direct {v1, v2}, Landroid/app/Notification$BigTextStyle;-><init>(Landroid/app/Notification$Builder;)V

    invoke-virtual {v1, p1}, Landroid/app/Notification$BigTextStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$BigTextStyle;

    move-result-object v1

    invoke-virtual {v1, p4}, Landroid/app/Notification$BigTextStyle;->bigText(Ljava/lang/CharSequence;)Landroid/app/Notification$BigTextStyle;

    move-result-object v0

    .line 70
    .local v0, "style":Landroid/app/Notification$BigTextStyle;
    if-eqz p2, :cond_0

    .line 71
    invoke-virtual {v0, p3}, Landroid/app/Notification$BigTextStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroid/app/Notification$BigTextStyle;

    .line 73
    :cond_0
    return-void
.end method

.method public addInboxStyle(Ljava/lang/CharSequence;ZLjava/lang/CharSequence;Ljava/util/ArrayList;)V
    .locals 5
    .param p1, "bigContentTitle"    # Ljava/lang/CharSequence;
    .param p2, "useSummary"    # Z
    .param p3, "summaryText"    # Ljava/lang/CharSequence;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/CharSequence;",
            "Z",
            "Ljava/lang/CharSequence;",
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/CharSequence;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 91
    .local p4, "texts":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Ljava/lang/CharSequence;>;"
    new-instance v3, Landroid/app/Notification$InboxStyle;

    iget-object v4, p0, Landroid/support/v4/app/NotificationCompatJellybean;->b:Landroid/app/Notification$Builder;

    invoke-direct {v3, v4}, Landroid/app/Notification$InboxStyle;-><init>(Landroid/app/Notification$Builder;)V

    invoke-virtual {v3, p1}, Landroid/app/Notification$InboxStyle;->setBigContentTitle(Ljava/lang/CharSequence;)Landroid/app/Notification$InboxStyle;

    move-result-object v1

    .line 93
    .local v1, "style":Landroid/app/Notification$InboxStyle;
    if-eqz p2, :cond_0

    .line 94
    invoke-virtual {v1, p3}, Landroid/app/Notification$InboxStyle;->setSummaryText(Ljava/lang/CharSequence;)Landroid/app/Notification$InboxStyle;

    .line 96
    :cond_0
    invoke-virtual {p4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .local v0, "i$":Ljava/util/Iterator;
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/CharSequence;

    .line 97
    .local v2, "text":Ljava/lang/CharSequence;
    invoke-virtual {v1, v2}, Landroid/app/Notification$InboxStyle;->addLine(Ljava/lang/CharSequence;)Landroid/app/Notification$InboxStyle;

    goto :goto_0

    .line 99
    .end local v2    # "text":Ljava/lang/CharSequence;
    :cond_1
    return-void
.end method

.method public build()Landroid/app/Notification;
    .locals 1

    .prologue
    .line 102
    iget-object v0, p0, Landroid/support/v4/app/NotificationCompatJellybean;->b:Landroid/app/Notification$Builder;

    invoke-virtual {v0}, Landroid/app/Notification$Builder;->build()Landroid/app/Notification;

    move-result-object v0

    return-object v0
.end method


text:
package com.winger.utils;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.winger.log.HTMLLogger;
import com.winger.log.LogGroup;
import com.winger.struct.JSON;

import java.util.HashMap;
import java.util.Map;

/**
 * Will parse files with .json or .config extensions and put them into a simple JSON object
 *
 * Created by mwingfield on 8/4/15.
 */
public class Config {
    private final static HTMLLogger log = HTMLLogger.getLogger(Config.class, LogGroup.System, LogGroup.Framework, LogGroup.Util);

    private FileHandle fileHandle;
    private Map<String, Object> data;

    public Config(){

    }

    public Config(String fileLocation, boolean watch){
        this(Gdx.files.internal(fileLocation), watch);
    }

    public Config(FileHandle fileHandle, boolean watch){
        if (fileHandle == null){
            throw new RuntimeException("FileHandle cannot be null");
        } else if(! fileHandle.exists()){
            throw new RuntimeException("File does not exist: " + fileHandle.file().getAbsolutePath());
        } else if (fileHandle.isDirectory() || (!"json".equals(fileHandle.extension()) && !"config".equals(fileHandle.extension()))){
            throw new RuntimeException("Config file at " + fileHandle.path() + " must be either .config or .json");
        }
        this.fileHandle = fileHandle;
        parse();
        if (watch){
            watch();
        }
    }

    private void parse(){
        parse(fileHandle);
    }

    public void parse(FileHandle fileHandle){
        if (data == null){
            data = new HashMap<>();
        }
        if (fileHandle.exists() && !fileHandle.isDirectory()){
            if ("json".equals(fileHandle.extension())){
                JSON fileData = JSON.parse(fileHandle.readString());
                Map<String, Object> flat = fileData.flatten();
                data.putAll(flat);
            } else if ("config".equals(fileHandle.extension())){
                String fileData = fileHandle.readString();
                String[] lines = fileData.split("\n");
                for (String line : lines){
                    String[] pair = line.split("=");
                    String key = null;
                    String val = null;
                    if (pair.length > 1){
                        key = pair[0];
                        val = pair[1];
                    }
                    if (key != null && val != null){
                        key = key.trim();
                        val = val.trim();
                        try {
                            data.put(key, Double.parseDouble(val));
                        } catch (Exception e){
                            if ("true".equalsIgnoreCase(val) || "false".equalsIgnoreCase(val)){
                                data.put(key, Boolean.parseBoolean(val));
                            } else {
                                data.put(key, val);
                            }
                        }
                    }
                }
            }
        }

        log.debug("Config: " + data);
    }

    public <T> T get(String path){
        if (data.containsKey(path)){
            Object o = data.get(path);
            return (T) o;
        } else {
            throw new RuntimeException("Config value does not exist: " + path);
        }
    }

    public <T> T get(String path, Class<T> type){
        if (data.containsKey(path)){
            Object o = data.get(path);
            return type.cast(o);
        } else {
            throw new RuntimeException("Config value does not exist: " + path);
        }
    }

    private void watch(){
        WatchUtils.watchForModify(fileHandle, new WatchUtils.WatchFunc() {
            @Override
            public void trigger() {
                log.info("Parse Config File again");
                parse();
            }
        });
    }
}


text:
package com.sam_chordas.android.stockhawk;

/**
 * Created by sebastian on 11/24/16.
 */
public class NonExistingStockException extends Exception {

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


text:
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();
common.skipIf32Bits();
const { NodeInstance } = require('../common/inspector-helper.js');
const assert = require('assert');

common.skipIfWorker(); // Signal starts a server for a main thread inspector

const script = `
process._rawDebug('Waiting until a signal enables the inspector...');
let waiting = setInterval(waitUntilDebugged, 50);

function waitUntilDebugged() {
  const { internalBinding } = require('internal/test/binding');
  if (!internalBinding('inspector').isEnabled()) return;
  clearInterval(waiting);
  // At this point, even though the Inspector is enabled, the default async
  // call stack depth is 0. We need a chance to call
  // Debugger.setAsyncCallStackDepth *before* activating the actual timer for
  // async stack traces to work. Directly using a debugger statement would be
  // too brittle, and using a longer timeout would unnecessarily slow down the
  // test on most machines. Triggering a debugger break through an interval is
  // a faster and more reliable way.
  process._rawDebug('Signal received, waiting for debugger setup');
  waiting = setInterval(() => { debugger; }, 50);
}

// This function is called by the inspector client (session)
function setupTimeoutWithBreak() {
  clearInterval(waiting);
  process._rawDebug('Debugger ready, setting up timeout with a break');
  setTimeout(() => { debugger; }, 50);
}
`;

async function waitForInitialSetup(session) {
  console.error('[test]', 'Waiting for initial setup');
  await session.waitForBreakOnLine(16, '[eval]');
}

async function setupTimeoutForStackTrace(session) {
  console.error('[test]', 'Setting up timeout for async stack trace');
  await session.send([
    { 'method': 'Runtime.evaluate',
      'params': { expression: 'setupTimeoutWithBreak()' } },
    { 'method': 'Debugger.resume' }
  ]);
}

async function checkAsyncStackTrace(session) {
  console.error('[test]', 'Verify basic properties of asyncStackTrace');
  const paused = await session.waitForBreakOnLine(23, '[eval]');
  assert(paused.params.asyncStackTrace,
         `${Object.keys(paused.params)} contains "asyncStackTrace" property`);
  assert(paused.params.asyncStackTrace.description, 'Timeout');
  assert(paused.params.asyncStackTrace.callFrames
           .some((frame) => frame.functionName === 'setupTimeoutWithBreak'));
}

async function runTests() {
  const instance = await NodeInstance.startViaSignal(script);
  const session = await instance.connectInspectorSession();
  await session.send([
    { 'method': 'Runtime.enable' },
    { 'method': 'Debugger.enable' },
    { 'method': 'Debugger.setAsyncCallStackDepth',
      'params': { 'maxDepth': 10 } },
    { 'method': 'Debugger.setBlackboxPatterns',
      'params': { 'patterns': [] } },
    { 'method': 'Runtime.runIfWaitingForDebugger' }
  ]);

  await waitForInitialSetup(session);
  await setupTimeoutForStackTrace(session);
  await checkAsyncStackTrace(session);

  console.error('[test]', 'Stopping child instance');
  session.disconnect();
  instance.kill();
}

runTests().then(common.mustCall());


text:
using namespace llvm;

/// GetAllUndefinedSymbols - calculates the set of undefined symbols that still
/// exist in an LLVM module. This is a bit tricky because there may be two
/// symbols with the same name but different LLVM types that will be resolved to
/// each other but aren't currently (thus we need to treat it as resolved).
///
/// Inputs:
///  M - The module in which to find undefined symbols.
///
/// Outputs:
///  UndefinedSymbols - A set of C++ strings containing the name of all
///                     undefined symbols.
///
static void
GetAllUndefinedSymbols(Module *M, std::set<std::string> &UndefinedSymbols) {
  std::set<std::string> DefinedSymbols;
  UndefinedSymbols.clear();

  // If the program doesn't define a main, try pulling one in from a .a file.
  // This is needed for programs where the main function is defined in an
  // archive, such f2c'd programs.
  Function *Main = M->getFunction("main");
  if (Main == 0 || Main->isDeclaration())
    UndefinedSymbols.insert("main");

  for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
    if (I->hasName()) {
      if (I->isDeclaration())
        UndefinedSymbols.insert(I->getName());
      else if (!I->hasLocalLinkage()) {
        assert(!I->hasDLLImportLinkage()
               && "Found dllimported non-external symbol!");
        DefinedSymbols.insert(I->getName());
      }
    }

  for (Module::global_iterator I = M->global_begin(), E = M->global_end();
       I != E; ++I)
    if (I->hasName()) {
      if (I->isDeclaration())
        UndefinedSymbols.insert(I->getName());
      else if (!I->hasLocalLinkage()) {
        assert(!I->hasDLLImportLinkage()
               && "Found dllimported non-external symbol!");
        DefinedSymbols.insert(I->getName());
      }
    }

  for (Module::alias_iterator I = M->alias_begin(), E = M->alias_end();
       I != E; ++I)
    if (I->hasName())
      DefinedSymbols.insert(I->getName());

  // Prune out any defined symbols from the undefined symbols set...
  for (std::set<std::string>::iterator I = UndefinedSymbols.begin();
       I != UndefinedSymbols.end(); )
    if (DefinedSymbols.count(*I))
      UndefinedSymbols.erase(I++);  // This symbol really is defined!
    else
      ++I; // Keep this symbol in the undefined symbols list
}

/// LinkInArchive - opens an archive library and link in all objects which
/// provide symbols that are currently undefined.
///
/// Inputs:
///  Filename - The pathname of the archive.
///
/// Return Value:
///  TRUE  - An error occurred.
///  FALSE - No errors.
bool
Linker::LinkInArchive(const sys::Path &Filename, bool &is_native) {
  // Make sure this is an archive file we're dealing with
  if (!Filename.isArchive())
    return error("File '" + Filename.str() + "' is not an archive.");

  // Open the archive file
  verbose("Linking archive file '" + Filename.str() + "'");

  // Find all of the symbols currently undefined in the bitcode program.
  // If all the symbols are defined, the program is complete, and there is
  // no reason to link in any archive files.
  std::set<std::string> UndefinedSymbols;
  GetAllUndefinedSymbols(Composite, UndefinedSymbols);

  if (UndefinedSymbols.empty()) {
    verbose("No symbols undefined, skipping library '" + Filename.str() + "'");
    return false;  // No need to link anything in!
  }

  std::string ErrMsg;
  std::auto_ptr<Archive> AutoArch (
    Archive::OpenAndLoadSymbols(Filename, Context, &ErrMsg));

  Archive* arch = AutoArch.get();

  if (!arch)
    return error("Cannot read archive '" + Filename.str() +
                 "': " + ErrMsg);
  if (!arch->isBitcodeArchive()) {
    is_native = true;
    return false;
  }
  is_native = false;

  // Save a set of symbols that are not defined by the archive. Since we're
  // entering a loop, there's no point searching for these multiple times. This
  // variable is used to "set_subtract" from the set of undefined symbols.
  std::set<std::string> NotDefinedByArchive;

  // Save the current set of undefined symbols, because we may have to make
  // multiple passes over the archive:
  std::set<std::string> CurrentlyUndefinedSymbols;

  do {
    CurrentlyUndefinedSymbols = UndefinedSymbols;

    // Find the modules we need to link into the target module.  Note that arch
    // keeps ownership of these modules and may return the same Module* from a
    // subsequent call.
    SmallVector<Module*, 16> Modules;
    if (!arch->findModulesDefiningSymbols(UndefinedSymbols, Modules, &ErrMsg))
      return error("Cannot find symbols in '" + Filename.str() +
                   "': " + ErrMsg);

    // If we didn't find any more modules to link this time, we are done
    // searching this archive.
    if (Modules.empty())
      break;

    // Any symbols remaining in UndefinedSymbols after
    // findModulesDefiningSymbols are ones that the archive does not define. So
    // we add them to the NotDefinedByArchive variable now.
    NotDefinedByArchive.insert(UndefinedSymbols.begin(),
        UndefinedSymbols.end());

    // Loop over all the Modules that we got back from the archive
    for (SmallVectorImpl<Module*>::iterator I=Modules.begin(), E=Modules.end();
         I != E; ++I) {

      // Get the module we must link in.
      std::string moduleErrorMsg;
      Module* aModule = *I;
      if (aModule != NULL) {
        if (aModule->MaterializeAll(&moduleErrorMsg))
          return error("Could not load a module: " + moduleErrorMsg);

        verbose("  Linking in module: " + aModule->getModuleIdentifier());

        // Link it in
        if (LinkInModule(aModule, &moduleErrorMsg))
          return error("Cannot link in module '" +
                       aModule->getModuleIdentifier() + "': " + moduleErrorMsg);
      }
    }

    // Get the undefined symbols from the aggregate module. This recomputes the
    // symbols we still need after the new modules have been linked in.
    GetAllUndefinedSymbols(Composite, UndefinedSymbols);

    // At this point we have two sets of undefined symbols: UndefinedSymbols
    // which holds the undefined symbols from all the modules, and
    // NotDefinedByArchive which holds symbols we know the archive doesn't
    // define. There's no point searching for symbols that we won't find in the
    // archive so we subtract these sets.
    set_subtract(UndefinedSymbols, NotDefinedByArchive);

    // If there's no symbols left, no point in continuing to search the
    // archive.
    if (UndefinedSymbols.empty())
      break;
  } while (CurrentlyUndefinedSymbols != UndefinedSymbols);

  return false;
}


text:
require 'formula'

class Scrollkeeper < Formula
  desc "Transitional package for scrollkeeper"
  homepage 'http://scrollkeeper.sourceforge.net/'
  url 'https://downloads.sourceforge.net/project/scrollkeeper/scrollkeeper/0.3.14/scrollkeeper-0.3.14.tar.gz'
  sha1 '0462799a2d96f46dec76f2fd057e2dfe8d7cb94d'

  depends_on 'gettext'
  depends_on 'docbook'

  conflicts_with 'rarian',
    :because => "scrollkeeper and rarian install the same binaries."

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--mandir=#{man}",
                          "--with-xml-catalog=#{etc}/xml/catalog"
    system "make"
    system "make install"
  end
end


text:
// Settings handling
define(["sugar-web/datastore"], function (datastore) {
	var settings = {};

	// Default value
	settings.init = function() {
		this.name = "<No name>";
		this.color = 22;
		this.colorvalue = null;
		this.activities = [];
		this.view = 0;
		this.language = "en";
		var navigatorLanguage = navigator.language;
		if (navigatorLanguage) {
			if (navigatorLanguage.indexOf("fr") != -1)
				this.language = "fr";
			else if (navigatorLanguage.indexOf("es") != -1)
				this.language = "es";
			else if (navigatorLanguage.indexOf("de") != -1)
				this.language = "de";
			else if (navigatorLanguage.indexOf("ar") != -1)
				this.language = "ar";
			else if (navigatorLanguage.indexOf("ja") != -1)
				this.language = "ja";
		}
		this.connected = false;
		this.server = null;
		this.networkId = null;
		this.privateJournal = null;
		this.sharedJournal = null;
		this.genericActivity = {directory: "icons", icon: "application-x-generic.svg"};
	}
	settings.init();

	// Load settings from local storage
	settings.load = function(then) {
		// Load settings
		var that = this;
		datastore.localStorage.load(function() {
			var preferences = datastore.localStorage.getValue('sugar_settings');
			if (preferences == null || preferences.name === undefined) {
				if (then) then(false);
				return;
			}
			that.name = preferences.name;
			that.color = preferences.color;
			that.colorvalue = preferences.colorvalue;
			that.view = preferences.view;
			if (preferences.language !== undefined) that.language = preferences.language;
			if (preferences.connected !== undefined) that.connected = preferences.connected;
			if (preferences.server !== undefined) that.server = preferences.server;
			if (preferences.networkId !== undefined) that.networkId = preferences.networkId;

			// Set language
			l10n.language.code = that.language;

			// Load activities
			that.activities = preferences.activities;

			// Load datastore entries for each activity
			that.updateEntries();
			if (then) then(true);
		});
	};

	// Update entries for each activity
	settings.updateEntries = function() {
		for (var i = 0 ; i < this.activities.length ; i++) {
			var activity = this.activities[i];
			activity.instances = datastore.find(activity.id);
			activity.instances.sort(function(e0, e1) {
				return parseInt(e1.metadata.timestamp) - parseInt(e0.metadata.timestamp);
			});
		}
	};

	// Save settings to local storage
	settings.save = function() {
		datastore.localStorage.setValue('sugar_settings', {
			name: this.name,
			color: this.color,
			colorvalue: xoPalette.colors[this.color],
			activities: this.activities,
			view: app.getView(),
			language: this.language,
			connected: this.connected,
			server: this.server,
			networkId: this.networkId
		});
	}

	// Save settings to the server
	settings.saveToServer = function(remoteserver, then) {
		if (this.networkId != null) {
			var that = this;
			remoteserver.putUser(
				this.networkId,
				{
					name: that.name,
					color: xoPalette.colors[that.color],
					language: that.language,
					favorites: that.getFavoritesActivitiesName()
				},
				function(inSender, inResponse) {
					if (then) then();
				},
				function() {
					console.log("WARNING: Error updating network user");
					if (then) then();
				}
			);
		}
		else
			if (then) then();
	};

	// Merge current settings with the one in parameter
	settings.merge = function(preferences) {
		var changed = false;
		if (preferences.name !== undefined && preferences.name != this.name) { this.name = preferences.name; changed = true; }
		if (preferences.color !== undefined && (preferences.color.fill != this.colorvalue.fill || preferences.color.stroke != this.colorvalue.stroke)) {
			this.colorvalue = preferences.color;
			this.color = util.getColorIndex(this.colorvalue);
			changed = true;
		}
		if (preferences.language !== undefined && preferences.language != this.language) { this.language = preferences.language; changed = true; }
		if (preferences.favorites !== undefined) {
			var favoriteCount = 0;
			for(var i = 0 ; i < this.activities.length ; i++) {
				var wasfavorite = this.activities[i].favorite;
				this.activities[i].favorite = false;
				for (var j = 0 ; j < preferences.favorites.length ; j++) {
					if (preferences.favorites[j] == this.activities[i].id)
						this.activities[i].favorite = true;
				}
				changed = changed || (wasfavorite != this.activities[i].favorite);
			}
		}
		if (preferences.server !== undefined && preferences.server != this.server) { this.server = preferences.server; changed = true; }
		if (preferences.networkId !== undefined && preferences.networkId != this.networkId) { this.networkId = preferences.networkId; changed = true; }
		if (preferences.private_journal !== undefined && preferences.private_journal != this.privateJournal) { this.privateJournal = preferences.private_journal; }
		if (preferences.shared_journal !== undefined && preferences.shared_journal != this.sharedJournal) { this.sharedJournal = preferences.shared_journal; }
		return changed;
	};

	// Get properties
	settings.getName = function() {
		return this.name;
	};
	settings.getColor = function() {
		return xoPalette.colors[this.color];
	};
	settings.getView = function() {
		return this.view;
	};
	settings.getLanguage = function() {
		return this.language;
	};
	settings.getActivities = function() {
		return this.activities;
	};
	settings.getActivitiesByName = function(name) {
		if (name === undefined || name == null || name.length == 0)
			return this.activities;
		var activities = this.activities;
		var matching = [];
		for (var i = 0 ; i < activities.length ; i++) {
			if (activities[i].name.toLowerCase().indexOf(name) != -1)
				matching.push(activities[i]);
		}
		return matching;
	};
	settings.getActivity = function(id) {
		for(var i = 0 ; i < this.activities.length ; i++) {
			if (this.activities[i].id == id)
				return this.activities[i];
		}
		return this.genericActivity;
	};
	settings.getFavoritesActivities = function() {
		var favorites = [];
		for(var i = 0 ; i < this.activities.length ; i++) {
			if (this.activities[i].favorite) favorites.push(this.activities[i]);
		}
		return favorites;
	};
	settings.getFavoritesActivitiesName = function() {
		var favorites = this.getFavoritesActivities();
		var names = [];
		for(var i = 0 ; i < favorites.length ; i++) {
			names.push(favorites[i].id);
		}
		return names;
	};
	settings.isConnected = function() {
		return this.connected || util.getClientType() == constant.thinClientType;
	};
	settings.getServer = function() {
		return this.server;
	};
	settings.getNetworkId = function() {
		return this.networkId;
	};
	settings.getPrivateJournal = function() {
		return this.privateJournal;
	};
	settings.getSharedJournal = function() {
		return this.sharedJournal;
	};

	// Set properties
	settings.setName = function(newname) {
		this.name = newname;
	};
	settings.setColor = function(newcolor) {
		if (newcolor >= 0 && newcolor < xoPalette.colors.length)
			this.color = newcolor;
	};
	settings.setLanguage = function(newlanguage) {
		this.language = newlanguage;
	};
	settings.setActivities = function(list) {
		this.activities = list;
	};
	settings.setConnected = function(connected) {
		this.connected = connected;
	};
	settings.setServer = function(server) {
		this.server = server;
	};
	settings.setNetworkId = function(nid) {
		this.networkId = nid;
	};
	settings.setPrivateJournal = function(privateJournal) {
		this.privateJournal = privateJournal;
	};
	settings.setSharedJournal = function(sharedJournal) {
		this.sharedJournal = sharedJournal;
	};

	// Update activities
	settings.updateActivities = function(list) {
		var updated = false;
		for (var i = 0 ; i < list.length ; i++) {
			var found = false;
			for (var j = 0 ; !found && j < this.activities.length ; j++) {
				if (list[i].id == this.activities[j].id) {
					found = true;
					if (this.activities[j].version != list[i].version) {
						this.activities[j].name = list[i].name;
						this.activities[j].version = list[i].version;
						this.activities[j].directory = list[i].directory;
						this.activities[j].icon = list[i].icon;
						updated = true;
					}
				}
			}
			if (!found) {
				this.activities.push(list[i]);
				updated = true;
			}
		}
		return updated;
	};

	// Color playing
	settings.nextColor = function() {
		this.color = (this.color+1)%xoPalette.colors.length;
	};

	// Activity handling
	settings.runActivity = function(activity, objectId, name, sharedId) {
		if (activity.activityId == null) {
			activity.activityId = datastore.createUUID();
		}
		this.save();
		var location = activity.directory+"/index.html?aid="+activity.activityId
			+"&a="+activity.id;
		if (objectId === undefined) {
			if (activity.instances != null && activity.instances.length > 0) {
				location = location + "&o="+activity.instances[0].objectId + "&n="+activity.instances[0].metadata.title;
			} else
				location = location + "&n=" +activity.name;
		} else if (objectId != null) {
			location = location + "&o=" + objectId + "&n="+name;
		} else {
			location = location + "&n=" +activity.name;
		}
		if (sharedId) {
			location = location + "&s=" + sharedId;
		}
		window.location = location;
	};
	settings.switchFavoriteActivity = function(activity) {
		activity.favorite = !activity.favorite;
		return activity.favorite;
	};

	return settings;
});


text:
<?php

namespace JVMail\Service;

use Zend\ServiceManager\ServiceLocatorInterface;

interface MailInterface
{
    public function setSubject($subject);
    public function setTo($to);
    public function setData($data);
    public function setViewTemplate($viewTemplate);
    public function execute();
    public function send();
}


text:
"""
Packet holding data in Abstract Syntax Notation (ASN.1).
"""

from scapy.packet import *

class ASN1_Packet(Packet):
    ASN1_root = None
    ASN1_codec = None
    def init_fields(self):
        flist = self.ASN1_root.get_fields_list()
        self.do_init_fields(flist)
        self.fields_desc = flist
    def self_build(self):
        if self.raw_packet_cache is not None:
            return self.raw_packet_cache
        return self.ASN1_root.build(self)
    def do_dissect(self, x):
        return self.ASN1_root.dissect(self, x)


text:
 const MusicMaker = {
  queue_: [],
  player_: new Audio(),
  queueSound: function(soundUrl) {
    this.queue_.push(soundUrl);
  },
  play: function() {
    let next = this.queue_.shift();
    if (next) {
      this.player_.src = next;
      this.player_.play();
    }
  },
};

MusicMaker.player_.addEventListener(
    'ended', MusicMaker.play.bind(MusicMaker));


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.09.07 at 08:01:35 PM IST
//

package com.mozu.qbintegration.model.qbmodel.allgen;

import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for SpecialItemAddRsType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="SpecialItemAddRsType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <choice minOccurs="0">
 *           <element ref="{}ItemOtherChargeRet"/>
 *           <element ref="{}ItemSubtotalRet"/>
 *           <element ref="{}ItemGroupRet"/>
 *         </choice>
 *       </sequence>
 *       <attribute name="requestID" type="{}STRTYPE" />
 *       <attribute name="statusCode" use="required" type="{}INTTYPE" />
 *       <attribute name="statusSeverity" use="required" type="{}STRTYPE" />
 *       <attribute name="statusMessage" type="{}STRTYPE" />
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SpecialItemAddRsType", propOrder = {
    "itemOtherChargeRet",
    "itemSubtotalRet",
    "itemGroupRet"
})
public class SpecialItemAddRsType {

    @XmlElement(name = "ItemOtherChargeRet")
    protected ItemOtherChargeRet itemOtherChargeRet;
    @XmlElement(name = "ItemSubtotalRet")
    protected ItemSubtotalRet itemSubtotalRet;
    @XmlElement(name = "ItemGroupRet")
    protected ItemGroupRet itemGroupRet;
    @XmlAttribute(name = "requestID")
    protected String requestID;
    @XmlAttribute(name = "statusCode", required = true)
    protected BigInteger statusCode;
    @XmlAttribute(name = "statusSeverity", required = true)
    protected String statusSeverity;
    @XmlAttribute(name = "statusMessage")
    protected String statusMessage;

    /**
     * Gets the value of the itemOtherChargeRet property.
     *
     * @return
     *     possible object is
     *     {@link ItemOtherChargeRet }
     *
     */
    public ItemOtherChargeRet getItemOtherChargeRet() {
        return itemOtherChargeRet;
    }

    /**
     * Sets the value of the itemOtherChargeRet property.
     *
     * @param value
     *     allowed object is
     *     {@link ItemOtherChargeRet }
     *
     */
    public void setItemOtherChargeRet(ItemOtherChargeRet value) {
        this.itemOtherChargeRet = value;
    }

    /**
     * Gets the value of the itemSubtotalRet property.
     *
     * @return
     *     possible object is
     *     {@link ItemSubtotalRet }
     *
     */
    public ItemSubtotalRet getItemSubtotalRet() {
        return itemSubtotalRet;
    }

    /**
     * Sets the value of the itemSubtotalRet property.
     *
     * @param value
     *     allowed object is
     *     {@link ItemSubtotalRet }
     *
     */
    public void setItemSubtotalRet(ItemSubtotalRet value) {
        this.itemSubtotalRet = value;
    }

    /**
     * Gets the value of the itemGroupRet property.
     *
     * @return
     *     possible object is
     *     {@link ItemGroupRet }
     *
     */
    public ItemGroupRet getItemGroupRet() {
        return itemGroupRet;
    }

    /**
     * Sets the value of the itemGroupRet property.
     *
     * @param value
     *     allowed object is
     *     {@link ItemGroupRet }
     *
     */
    public void setItemGroupRet(ItemGroupRet value) {
        this.itemGroupRet = value;
    }

    /**
     * Gets the value of the requestID property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getRequestID() {
        return requestID;
    }

    /**
     * Sets the value of the requestID property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setRequestID(String value) {
        this.requestID = value;
    }

    /**
     * Gets the value of the statusCode property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getStatusCode() {
        return statusCode;
    }

    /**
     * Sets the value of the statusCode property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setStatusCode(BigInteger value) {
        this.statusCode = value;
    }

    /**
     * Gets the value of the statusSeverity property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getStatusSeverity() {
        return statusSeverity;
    }

    /**
     * Sets the value of the statusSeverity property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setStatusSeverity(String value) {
        this.statusSeverity = value;
    }

    /**
     * Gets the value of the statusMessage property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getStatusMessage() {
        return statusMessage;
    }

    /**
     * Sets the value of the statusMessage property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setStatusMessage(String value) {
        this.statusMessage = value;
    }

}


text:
package org.apache.karaf.specs.locator;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

public class OsgiLocatorTest extends Assert {

    @BeforeClass
    public static void setup() {
        OsgiLocator.register("Factory", new MockCallable());
        OsgiLocator.register("Factory", new MockCallable2());
    }

    @Test
    public void testLocatorWithSystemProperty() {
        System.setProperty(OsgiLocator.TIMEOUT, "0");
        System.setProperty("Factory", "org.apache.karaf.specs.locator.MockCallable");
        Class clazz = OsgiLocator.locate(Object.class, "Factory");
        assertNotNull("Expected to find a class", clazz);
        assertEquals("Got the wrong class", MockCallable.class.getName(), clazz.getName());

        System.setProperty("Factory", "org.apache.karaf.specs.locator");
        clazz = OsgiLocator.locate(Object.class, "Factory");
        assertNull("Did not expect to find a class", clazz);
    }

    @Test
    public void testLocatorWithoutSystemProperty() {
        System.setProperty(OsgiLocator.TIMEOUT, "0");
        System.clearProperty("Factory");
        Class clazz = OsgiLocator.locate(Object.class, "Factory");
        assertNotNull("Expected to find a class", clazz);
        assertEquals("Got the wrong class", MockCallable2.class.getName(), clazz.getName());
    }

    @Test
    public void testLocatorWithSystemPropertyAndTimeout() {
        long timeout = 1000;
        System.setProperty(OsgiLocator.TIMEOUT, Long.toString(timeout));
        System.setProperty("Factory", "org.apache.karaf.specs.locator.MockCallable");
        Class clazz = OsgiLocator.locate(Object.class, "Factory");
        assertNotNull("Expected to find a class", clazz);
        assertEquals("Got the wrong class.", MockCallable.class.getName(), clazz.getName());

        System.setProperty("Factory", "org.apache.karaf.specs.locator");
        long t0 = System.currentTimeMillis();
        clazz = OsgiLocator.locate(Object.class, "Factory");
        long t1 = System.currentTimeMillis();
        assertNull("Did not expect to find a class", clazz);
        assertTrue("Timeout issue", (t1 - t0) > timeout / 2);
    }

    @Test
    public void testLocatorWithoutSystemPropertyAndTimeout() {
        long timeout = 1000;
        System.setProperty(OsgiLocator.TIMEOUT, Long.toString(timeout));
        System.clearProperty("Factory");
        long t0 = System.currentTimeMillis();
        Class clazz = OsgiLocator.locate(Object.class, "Factory");
        long t1 = System.currentTimeMillis();
        assertNotNull("Expected to find a class", clazz);
        assertEquals("Got the wrong class", MockCallable2.class.getName(), clazz.getName());
        assertTrue("Timeout issue", (t1 - t0) < timeout / 2);
    }

}


text:
package com.taotaosou.data.himport.client.mq;

import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.StreamMessage;

import com.taotaosou.data.mq.proto.ProductLabelDataMessage.ProductLabelPBDataMessage;
import com.taotaosou.data.mq.subscriber.ActiveMQSubscriber;
import com.taotaosou.data.mq.util.PBDataParseUtil;

/**
 *
 * ProductLabel消息客户端
 *
 * @author lanxin.liao
 * @version 2013-9-16 下午2:11:26
 */
public class ProductLabelNotifyClient extends ActiveMQSubscriber {

	private MessageConsumer productConsumer;

	public void init() throws JMSException {
		if (productConsumer == null) {
			productConsumer = createConsumer();
		}
	}

	/**
	 * 收集(从库)有延迟的商品信息
	 *
	 * @return
	 * @throws Exception
	 */
	public ProductLabelPBDataMessage collectMessage() throws Exception {
		StreamMessage message = (StreamMessage) productConsumer.receive();
		return PBDataParseUtil.parseProductLabelMessage(message);
	}

}


text:
package org.axonframework.test.saga;

import org.hamcrest.Matcher;
import org.joda.time.DateTime;
import org.joda.time.Duration;

/**
 * Interface towards an object that contains the results of a Fixture execution. It provides methods to assert that
 * certain actions have taken place.
 *
 * @author Allard Buijze
 * @since 1.1
 */
public interface FixtureExecutionResult {

    /**
     * Expect the given number of Sagas to be active (i.e. ready to respond to incoming events.
     *
     * @param expected the expected number of active events in the repository
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectActiveSagas(int expected);

    /**
     * Asserts that at least one of the active sagas is associated with the given associationKey and
     * associationValue.
     *
     * @param associationKey   The key of the association to verify
     * @param associationValue The value of the association to verify
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectAssociationWith(String associationKey, Object associationValue);

    /**
     * Asserts that at none of the active sagas is associated with the given associationKey and
     * associationValue.
     *
     * @param associationKey   The key of the association to verify
     * @param associationValue The value of the association to verify
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectNoAssociationWith(String associationKey, Object associationValue);

    /**
     * Asserts that an event matching the given matcher has been scheduled to be published after the given
     * duration.
     *
     * @param duration The time to wait before the event should be published
     * @param matcher  A matcher defining the event expected to be published
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectScheduledEventMatching(Duration duration, Matcher<?> matcher);

    /**
     * Asserts that an event equal to the given ApplicationEvent has been scheduled for publication after the given
     * duration.
     *

     * Note that the source attribute of the application event is ignored when comparing events. Events are compared
     * using an "equals" check on all fields in the events.
     *
     * @param duration The time to wait before the event should be published
     * @param event    The expected event
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectScheduledEvent(Duration duration, Object event);

    /**
     * Asserts that an event of the given eventType has been scheduled for publication after the given
     * duration.
     *
     * @param duration  The time to wait before the event should be published
     * @param eventType The type of the expected event
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectScheduledEventOfType(Duration duration, Class<?> eventType);

    /**
     * Asserts that an event matching the given matcher has been scheduled to be published at the given
     * scheduledTime.
     *

     * If the scheduledTime is calculated based on the "current time", use the {@link
     * org.axonframework.test.saga.FixtureConfiguration#currentTime()} to get the time to use as "current time".
     *
     * @param scheduledTime The time at which the event should be published
     * @param matcher       A matcher defining the event expected to be published
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectScheduledEventMatching(DateTime scheduledTime, Matcher<?> matcher);

    /**
     * Asserts that an event equal to the given ApplicationEvent has been scheduled for publication at the given
     * scheduledTime.
     *

     * If the scheduledTime is calculated based on the "current time", use the {@link
     * org.axonframework.test.saga.FixtureConfiguration#currentTime()} to get the time to use as "current time".
     *

     * Note that the source attribute of the application event is ignored when comparing events. Events are compared
     * using an "equals" check on all fields in the events.
     *
     * @param scheduledTime The time at which the event should be published
     * @param event         The expected event
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectScheduledEvent(DateTime scheduledTime, Object event);

    /**
     * Asserts that an event of the given eventType has been scheduled for publication at the given
     * scheduledTime.
     *

     * If the scheduledTime is calculated based on the "current time", use the {@link
     * org.axonframework.test.saga.FixtureConfiguration#currentTime()} to get the time to use as "current time".
     *
     * @param scheduledTime The time at which the event should be published
     * @param eventType     The type of the expected event
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectScheduledEventOfType(DateTime scheduledTime, Class<?> eventType);

    /**
     * Asserts that the given commands have been dispatched in exactly the order given. The command objects are
     * compared
     * using the equals method. Only commands as a result of the event in the "when" stage of the fixture are compared.
     *
     * @param commands The expected commands
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectDispatchedCommandsEqualTo(Object... commands);

    /**
     * Asserts that the sagas dispatched commands as defined by the given matcher. Only commands as a
     * result of the event in the "when" stage of the fixture are matched.
     *
     * @param matcher The matcher that describes the expected list of commands
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectDispatchedCommandsMatching(Matcher<? extends Iterable<?>> matcher);

    /**
     * Asserts that the sagas did not dispatch any commands. Only commands as a result of the event in the "when" stage
     * of ths fixture are recorded.
     *
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectNoDispatchedCommands();

    /**
     * Assert that no events are scheduled for publication. This means that either no events were scheduled at all, all
     * schedules have been cancelled or all scheduled events have been published already.
     *
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectNoScheduledEvents();

    /**
     * Assert that the saga published events on the EventBus as defined by the given matcher. Only events
     * published in the "when" stage of the tests are matched.
     *
     * @param matcher The matcher that defines the expected list of published events.
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectPublishedEventsMatching(Matcher<? extends Iterable<?>> matcher);

    /**
     * Assert that the saga published events on the EventBus in the exact sequence of the given expected
     * events. Events are compared comparing their type and fields using equals. Sequence number, aggregate identifier
     * (for domain events) and source (for application events) are ignored in the comparison.
     *
     * @param expected The sequence of events expected to be published by the Saga
     * @return the FixtureExecutionResult for method chaining
     */
    FixtureExecutionResult expectPublishedEvents(Object... expected);
}


text:
import dispatcher from 'focus-core/dispatcher';
import configServices from '../../services/config';
import { builtInStore as UserStore } from 'focus-core/user';

import { once } from 'lodash';

/*
import user from 'focus-core/user';

export default () => {
    console.info('|--- USER');
    user.setRoles(['DEFAULT_ROLE']);
}*/

const initialize = (appInitialisation) => {
    console.info('|--- USER');
    configServices.loadUser().then(
        (data) => {
            UserStore.addProfileChangeListener(once(appInitialisation));
            dispatcher.handleServerAction({
                data: {
                    profile: data.profile,
                    roles: data.roles,
                    login: data.login
                },
                type: 'update'
            });
        }
    );
};

export {
    initialize
};


text:
<!DOCTYPE html>

      <meta name="Content-Type" content="UTF-8">
      <meta name="Keywords" content="resume, dhia, abbassi, software engineer, backend engineer, python developer, fullstack developer">
      <meta name="Author" content="Dhia Abbassi">
      <meta name="Category" content="engineering">

      <title>CV Dhia Abbassi</title>

      <link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon" />
      <link rel="stylesheet" type="text/css" href="assets/bower/bootstrap/dist/css/bootstrap.min.css">
      <link rel="stylesheet" type="text/css" href="assets/bower/font-awesome/css/font-awesome.min.css">
      <link rel="stylesheet" type="text/css" href="assets/css/main.css">


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Bothalia 17(1): 32 (1987)

#### Original name
Oidium dombeyae G.J.M. Gorter & Eicker

### Remarks
null


text:
/**
 * URLs to prefetch for a given ad type.
 *
 * This MUST be kept in sync with actual implementation.
 *
 * @const {!Object<string, (string|!Array<string>)>}
 */
export const adPrefetch = {
  doubleclick: [
    'https://www.googletagservices.com/tag/js/gpt.js',
    'https://securepubads.g.doubleclick.net/static/glade.js',
  ],
  a9: 'https://c.amazon-adsystem.com/aax2/assoc.js',
  adblade: 'https://web.adblade.com/js/ads/async/show.js',
  adsense: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js',
  aduptech: 'https://s.d.adup-tech.com/jsapi',
  criteo: 'https://static.criteo.net/js/ld/publishertag.js',
  dotandads: 'https://amp.ad.dotandad.com/dotandadsAmp.js',
  industrybrains: 'https://web.industrybrains.com/js/ads/async/show.js',
  mediaimpact: 'https://ec-ns.sascdn.com/diff/251/divscripte/amp.js',
  openx: 'https://www.googletagservices.com/tag/js/gpt.js',
  smartadserver: 'https://ec-ns.sascdn.com/diff/js/smart.js',
  'mantis-display': 'https://assets.mantisadnetwork.com/mantodea.min.js',
  'mantis-recommend': 'https://assets.mantisadnetwork.com/recommend.min.js',
  sovrn: 'https://ap.lijit.com/www/sovrn_amp/sovrn_ads.js',
  yieldmo: 'https://static.yieldmo.com/ym.amp1.js',
  revcontent: 'https://labs-cdn.revcontent.com/build/amphtml/revcontent.amp.min.js',
  teads: 'https://cdn.teads.tv/media/format/v3/teads-format.min.js',
  imobile: 'https://spamp.i-mobile.co.jp/script/amp.js',
  pubmatic: 'https://ads.pubmatic.com/AdServer/js/amp.js',
  sortable: 'https://www.googletagservices.com/tag/js/gpt.js',
  gmossp: 'https://cdn.gmossp-sp.jp/ads/amp.js',
  'weborama-display': [
    'https://cstatic.weborama.fr/js/advertiserv2/adperf_launch_1.0.0_scrambled.js',
    'https://cstatic.weborama.fr/js/advertiserv2/adperf_core_1.0.0_scrambled.js',
  ],
  yieldbot: 'https://cdn.yldbt.com/js/yieldbot.intent.js',
  adstir: 'https://js.ad-stir.com/js/adstir_async.js',
  colombia: 'https://static.clmbtech.com/ad/commons/js/colombia-amp.js',
  eplanning: 'https://us.img.e-planning.net/layers/epl-amp.js',
  appnexus: 'https://acdn.adnxs.com/ast/ast.js',
  microad: 'https://j.microad.net/js/camp.js',
};

/**
 * URLs to connect to for a given ad type.
 *
 * This MUST be kept in sync with actual implementation.
 *
 * @const {!Object<string, (string|!Array<string>)>}
 */
export const adPreconnect = {
  adblade: [
    'https://staticd.cdn.adblade.com',
    'https://static.adblade.com',
  ],
  industrybrains: [
    'https://staticd.cdn.industrybrains.com',
    'https://static.industrybrains.com',
  ],
  adition: 'https://imagesrv.adition.com',
  adform: 'https://track.adform.net',
  adreactor: 'https://adserver.adreactor.com',
  adsense: 'https://googleads.g.doubleclick.net',
  aduptech: 'https://s.d.adup-tech.com',
  taboola: [
    'https://cdn.taboola.com',
    'https://trc.taboola.com',
    'https://images.taboola.com',
  ],
  teads: [
    'https://cdn.teads.tv',
    'https://cdn2.teads.tv',
    'https://a.teads.tv',
    'https://t.teads.tv',
  ],
  criteo: [
    'https://cas.criteo.com',
  ],
  doubleclick: [
    'https://partner.googleadservices.com',
    'https://securepubads.g.doubleclick.net',
    'https://tpc.googlesyndication.com',
  ],
  'mantis-display': [
    'https://mantodea.mantisadnetwork.com',
    'https://res.cloudinary.com',
    'https://resize.mantisadnetwork.com',
  ],
  'mantis-recommend': [
    'https://mantodea.mantisadnetwork.com',
    'https://resize.mantisadnetwork.com',
  ],
  dotandads: 'https://bal.ad.dotandad.com',
  improvedigital: 'https://ad.360yield.com/',
  openx: [
    'https://partner.googleadservices.com',
    'https://securepubads.g.doubleclick.net',
    'https://tpc.googlesyndication.com',
  ],
  yieldmo: [
    'https://static.yieldmo.com',
    'https://s.yieldmo.com',
    'https://ads.yieldmo.com',
  ],
  triplelift: [
    'https://ib.3lift.com',
    'https://dynamic.3lift.com',
    'https://img.3lift.com',
    'https://eb2.3lift.com',
  ],
  revcontent: [
    'https://trends.revcontent.com',
    'https://cdn.revcontent.com',
    'https://img.revcontent.com',
  ],
  rubicon: [
    'https://ads.rubiconproject.com',
    'https://optimized-by.rubiconproject.com',
  ],
  sortable: [
    'https://tags-cdn.deployads.com',
    'https://partner.googleadservices.com',
    'https://securepubads.g.doubleclick.net',
    'https://tpc.googlesyndication.com',
  ],
  imobile: 'https://spad.i-mobile.co.jp',
  webediads: [
    'https://eu1.wbdds.com',
  ],
  gmossp: 'https://cdn.gmossp-sp.jp',
  yieldbot: 'https://i.yldbt.com',
  adstir: 'https://ad.ad-stir.com',
  appnexus: 'https://ib.adnxs.com',
  microad: [
    'https://s-rtb.send.microad.jp',
    'https://cache.send.microad.jp',
  ],
};

/**
 * The externalCidScope used to provide CIDs to ads of the given type.
 *
 * @const {!Object<string, string>}
 */
export const clientIdScope = {
  // Add a mapping like
  // adNetworkType: 'cidScope' here.
  adsense: 'AMP_ECID_GOOGLE',
  doubleclick: 'AMP_ECID_GOOGLE',
};