text:
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Map;
import java.util.Random;

import pl.waw.pduda.graph.AMPLSaver;
import pl.waw.pduda.graph.AbstractGraphGenerator;
import pl.waw.pduda.graph.KeyPath;
import pl.waw.pduda.graph.Node;
import pl.waw.pduda.graph.NodesTranslator;
import pl.waw.pduda.graph.PSTKMGraphGenerator;
import pl.waw.pduda.graph.SimpleGraphGenerator;
import edu.asu.emit.qyan.alg.control.YenTopKShortestPathsAlg;
import edu.asu.emit.qyan.alg.model.Graph;
import edu.asu.emit.qyan.alg.model.Pair;
import edu.asu.emit.qyan.alg.model.VariableGraph;
import edu.asu.emit.qyan.test.KShortestPathPstkm;
import edu.asu.emit.qyan.test.ShortestPathAlgTest;
import edu.asu.emit.qyan.test.YenTopKShortestPathsAlgTest;
import scpsolver.constraints.LinearBiggerThanEqualsConstraint;
import scpsolver.constraints.LinearSmallerThanEqualsConstraint;
import scpsolver.lpsolver.LinearProgramSolver;
import scpsolver.lpsolver.SolverFactory;
import scpsolver.problems.LPWizard;
import scpsolver.problems.LinearProgram;

public class Main
{
    static int MAX_PATHS = Integer.MAX_VALUE;
    static PSTKMGraphGenerator genGraph = new PSTKMGraphGenerator();
    static AMPLSaver saver = new AMPLSaver();
    static Random randomizer = new Random();
    static NodesTranslator trans;

    static Map<String,Node> aps;
    static Node end;
    static ArrayList<KeyPath> paths = new ArrayList<KeyPath>();

    static Graph graph;
    static Map<String,Integer> demand_val = new Hashtable<String,Integer>();

    public static void genAmplFile(String file_path)
    {

	paths.clear();

    	int p=0;
    	for(Node ap: aps.values())
    	{
    	    YenTopKShortestPathsAlg yenAlg = new YenTopKShortestPathsAlg(
    			graph, graph.get_vertex(ap.number), graph.get_vertex(end.number));

    	    Pair<String,String> demand = new Pair<String,String>(ap.id,end.id);

    	    int i=0;
    	    while(yenAlg.has_next() && i<MAX_PATHS)
    	    {
    		KeyPath temp =new KeyPath("P"+p,yenAlg.next(),demand);
    		paths.add(temp);
    		System.out.println("Path "+i+" : "+temp.getNodesKeyRepresentation(trans));
    		System.out.println("Path "+i+" : "+temp.getEdgesKeyRepresentation(trans));
    		i++;
    		p++;
    	    }
    	    saver.demands.put(demand,demand_val.get(ap.id));
    	}

    	saver.paths = paths;
    	saver.nodes = genGraph.nodes;
    	saver.edges = genGraph.edges;
    	saver.trans = trans;

    	saver.saveToFile(file_path);

    }
    public static void main(String[] args)
    {

/*	LinearProgram lp = new LinearProgram(new double[]{5.0,10.0});
	lp.s
	lp.addConstraint(new LinearBiggerThanEqualsConstraint(new double[]{3.0,1.0}, 8.0, "c1"));
	lp.addConstraint(new LinearBiggerThanEqualsConstraint(new double[]{0.0,4.0}, 4.0, "c2"));
	lp.addConstraint(new LinearSmallerThanEqualsConstraint(new double[]{2.0,0.0}, 2.0, "c3"));
	lp.setMinProblem(true);
	LinearProgramSolver solver  = SolverFactory.newDefault();
	double[] sol = solver.solve(lp);*/

	/*LPWizard lpw = new LPWizard();
	lpw.plus("x1",5.0).plus("x2",10.0);
	lpw.addConstraint("c1",8,"<=").plus("x1",3.0).plus("x2",1.0);
	lpw.addConstraint("c2",4,"<=").plus("x2",4.0);
	lpw.addConstraint("c3", 2, ">=").plus("x1",2.0); */

	String [] files = {
		"ampl/obrona1",
		"ampl/obrona2"
		/*"ampl/genk1AP4C3L2e15",
		"ampl/genk3AP4C3L2e15"
		,"ampl/genk5AP4C3L2e15",
		"ampl/genk8AP4C3L2e15",
		"ampl/genk10AP4C3L2e15",
		"ampl/genk12AP4C3L2e15",
		"ampl/genk15AP4C3L2e15"*/
		};

	int [] max_paths = {1,3};
	int size =2;

	//sciezka ap_num c_num l_num e_num e_cost e_random node_cost node_random
	genGraph.generateGraph(files[0], 2, 2, 2, 5, 3, 1,10,5); MAX_PATHS = 3;
	//genGraph.generateGraph(path, 3, 3, 3, 15, 3, 0,10,0); MAX_PATHS = 5;
	//genGraph.generateGraph(path, 3, 3, 3, 15, 3, 0,10,0); MAX_PATHS = 10;

	trans = genGraph.getTranslator();

    	aps = genGraph.getAps();
    	end = genGraph.getEnd();

    	graph = new VariableGraph(files[0] + "_numbers");

    	for(Node ap: aps.values())
    	{
    	    demand_val.put(ap.id, randomizer.nextInt(10));
    	}
	for(int i=0;i<size;i++)
	{
	    MAX_PATHS=max_paths[i];
	    genAmplFile(files[i]);
	}

    }

}


text:
const isDeveloping = process.env.NODE_ENV !== 'production';
const isTesting = process.env.NODE_ENV === 'test';
const morgan = require('morgan');
const bodyParser = require('body-parser');
const path = require('path');
const passport = require('passport');
const webpack = require('webpack');
const routes = require('../routes.js');
const authRoutes = require('../auth/authRoutes');
const publicPath = path.resolve(__dirname, '/dist');
const passportConfig = require('./passport');
const webpackConfig = require('../../webpack.config.js');
const compiler = webpack(webpackConfig);
const webpackHotMiddleware = require('webpack-hot-middleware')(compiler);
const webpackDevMiddleware = require('webpack-dev-middleware')(compiler, {
  publicPath: webpackConfig.output.publicPath,
  noInfo: true,
  quiet: true,
});

module.exports = (app, express) => {
  app.use(bodyParser.urlencoded({ extended: true }));
  app.use(bodyParser.json());
  app.use(passport.initialize());
  passportConfig(passport);
  app.use('/auth', authRoutes);

  // Check environment and use appropriate middleware
  if (isTesting) {
    app.use('/api', routes);
  } else {
    app.use(morgan('dev'));
    app.use('/api', passport.authenticate('jwt', { session: false }), routes);
  }
  if (isDeveloping) {
    app.use(webpackDevMiddleware);
    app.use(webpackHotMiddleware);
  } else {
    app.use('/dist', express.static(publicPath));
  }

  app.get('*', (req, res) => {
    res.sendFile(path.join(__dirname, '../../dist/index.html'));
  });
};

redpajama_set_name: RedPajamaGithub


text:
import argparse
import BorgFactory
from ModelExport import *
from ARM import *

if __name__ == '__main__':
  try:
    parser = argparse.ArgumentParser(description='Computer Aided Integration of Requirements and Information Security - Model Export to Redmine')
    parser.add_argument('outputFile',help='output file name')
    parser.add_argument('--type',dest='modelFormat',help='model type to export.  One of requirements, scenarios, usecases, architecture, attackpatterns or GRL')
#    parser.add_argument('--persona',dest='personaName',help='Persona name (relevant for GRL export only)')
    parser.add_argument('--persona',nargs='+',help='Persona name (relevant for GRL export only)')
#    parser.add_argument('--task',dest='taskName',help='Task name (relevant for GRL export only)')
    parser.add_argument('--task',nargs='+',help='Task name (relevant for GRL export only)')
    parser.add_argument('--environment',dest='envName',help='Environment name (relevant for GRL export only)')
    args = parser.parse_args()
    BorgFactory.initialise()

    msgStr = ''
    if (args.modelFormat == 'scenarios'):
      msgStr += exportRedmineScenarios(args.outputFile)
    elif (args.modelFormat == 'requirements'):
      msgStr += exportRedmineRequirements(args.outputFile)
    elif (args.modelFormat == 'usecases'):
      msgStr += exportRedmineUseCases(args.outputFile)
    elif (args.modelFormat == 'architecture'):
      msgStr += exportArchitecture(args.outputFile)
    elif (args.modelFormat == 'attackpatterns'):
      msgStr += exportAttackPatterns(args.outputFile)
    elif (args.modelFormat == 'GRL'):
      personaNames = []
      personaNames.extend(args.persona)
      taskNames = []
      taskNames.extend(args.task)

      if len(personaNames) == 0:
        raise ARMException('Persona name not specified for GRL export')
      elif len(taskNames) == 0:
        raise ARMException('Task name not specified for GRL export')
      elif args.envName == None:
        raise ARMException('Environment name not specified for GRL export')
      else:
        msgStr += exportGRL(args.outputFile,personaNames,taskNames,args.envName)
    else:
      raise ARMException('Export model type ' + args.modelFormat + ' not recognised')
    print msgStr
  except ARMException, e:
    print 'cexport error: ',e
    exit(-1)


text:
package example.domain;

import org.joda.time.LocalDateTime;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static ch.lambdaj.Lambda.having;
import static ch.lambdaj.Lambda.on;
import static ch.lambdaj.Lambda.select;
import static org.hamcrest.Matchers.equalTo;

public class Document {

    private Identity identity;
    private Map<Field, Property> properties;

    private LocalDateTime createdDateTime;
    private LocalDateTime updatedDateTime;

    public Document() {
        this(new Identity());
    }

    public Document(Identity identity) {
        this.properties = new HashMap<Field, Property>();
        this.createdDateTime = new LocalDateTime();
        this.updatedDateTime = new LocalDateTime();
        this.identity = identity;
    }

    public Identity getIdentity() {
        return identity;
    }

    public LocalDateTime getCreatedDateTime() {
        return createdDateTime;
    }

    public LocalDateTime getUpdatedDateTime() {
        return updatedDateTime;
    }

    public Property get(Field field) {
        Property property = properties.get(field);
        return (property != null) ? property : new Property();
    }

    public void set(Field field, Property property) {
        updatedDateTime = new LocalDateTime();
        properties.put(field, property);
    }

    public List<Field> getFields() {
        return Arrays.asList(Field.values());
    }

    public boolean isValid() {
        return select(properties.values(), having(on(Property.class).isValid(), equalTo(false))).isEmpty();
    }
}


text:
package org.picocontainer.tck;

import junit.framework.TestCase;
import org.picocontainer.ComponentAdapter;
import org.picocontainer.PicoIntrospectionException;
import org.picocontainer.PicoRegistrationException;
import org.picocontainer.defaults.AssignabilityRegistrationException;
import org.picocontainer.defaults.ComponentAdapterFactory;
import org.picocontainer.defaults.DefaultPicoContainer;
import org.picocontainer.defaults.NotConcreteRegistrationException;
import org.picocontainer.testmodel.SimpleTouchable;
import org.picocontainer.testmodel.Touchable;

/**
 * @author Aslak Hellesøy
 * @version $Revision$
 */
public abstract class AbstractComponentAdapterFactoryTestCase extends TestCase {
    protected DefaultPicoContainer picoContainer;

    protected abstract ComponentAdapterFactory createComponentAdapterFactory();

    protected void setUp() throws Exception {
        picoContainer = new DefaultPicoContainer();
    }

    public void testEquals() throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException {
        ComponentAdapter componentAdapter = createComponentAdapterFactory().createComponentAdapter(Touchable.class, SimpleTouchable.class, null);

        assertEquals(componentAdapter, componentAdapter);
        assertTrue(!componentAdapter.equals("blah"));
    }

    public void testRegisterComponent() throws PicoRegistrationException, AssignabilityRegistrationException {
        ComponentAdapter componentAdapter =
                createComponentAdapterFactory().createComponentAdapter(Touchable.class, SimpleTouchable.class, null);

        picoContainer.registerComponent(componentAdapter);

        assertTrue(picoContainer.getComponentAdapters().contains(componentAdapter));
    }

    public void testUnregisterComponent() throws PicoRegistrationException, AssignabilityRegistrationException {
        ComponentAdapter componentAdapter =
                createComponentAdapterFactory().createComponentAdapter(Touchable.class, SimpleTouchable.class, null);

        picoContainer.registerComponent(componentAdapter);
        picoContainer.unregisterComponent(Touchable.class);

        assertFalse(picoContainer.getComponentAdapters().contains(componentAdapter));
    }
}


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

/**
 * @fileoverview Service for fetching issues and playthroughs from the backend.
 */

import { downgradeInjectable } from '@angular/upgrade/static';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

import {
  PlaythroughIssueBackendDict,
  PlaythroughIssue,
  PlaythroughIssueObjectFactory
} from 'domain/statistics/PlaythroughIssueObjectFactory.ts';
import { ServicesConstants } from 'services/services.constants.ts';
import { UrlInterpolationService } from
  'domain/utilities/url-interpolation.service.ts';

@Injectable({ providedIn: 'root' })
export class PlaythroughIssuesBackendApiService {
  private cachedIssues = null;

  constructor(
      private httpClient: HttpClient,
      private playthroughIssueObjectFactory: PlaythroughIssueObjectFactory,
      private urlInterpolationService: UrlInterpolationService) {}

  fetchIssues(
      explorationId: string,
      explorationVersion: number): Promise<PlaythroughIssue[]> {
    if (this.cachedIssues !== null) {
      return Promise.resolve(this.cachedIssues);
    }

    return new Promise((resolve, reject) => {
      this.httpClient.get<PlaythroughIssueBackendDict[]>(
        this.getFetchIssuesUrl(explorationId), {
          params: { exp_version: explorationVersion.toString() }}).toPromise()
        .then(response => {
          resolve(this.cachedIssues = response.map(
            this.playthroughIssueObjectFactory.createFromBackendDict));
        }, errorResponse => {
          reject(errorResponse.error.error);
        });
    });
  }

  fetchPlaythrough(
      explorationId: string,
      playthroughId: string): Promise<PlaythroughIssue> {
    return new Promise((resolve, reject) => {
      this.httpClient.get<PlaythroughIssueBackendDict>(
        this.getFetchPlaythroughUrl(explorationId, playthroughId)).toPromise()
        .then(response => {
          resolve(this.playthroughIssueObjectFactory.createFromBackendDict(
            response));
        }, errorResponse => {
          reject(errorResponse.error.error);
        });
    });
  }

  resolveIssue(
      issueToResolve: PlaythroughIssue,
      explorationId: string, explorationVersion: number): Promise<void> {
    return new Promise((resolve, reject) => {
      this.httpClient.post(this.getResolveIssueUrl(explorationId), {
        exp_issue_dict: issueToResolve.toBackendDict(),
        exp_version: explorationVersion
      }).toPromise()
        .then(() => {
          if (this.cachedIssues !== null) {
            const issueIndex = this.cachedIssues.findIndex(
              issue => angular.equals(issue, issueToResolve));
            if (issueIndex !== -1) {
              this.cachedIssues.splice(issueIndex, 1);
              resolve();
            }
          }
          reject(
            'An issue which was not fetched from the backend ' +
            'has been resolved');
        }, errorResponse => {
          reject(errorResponse.error.error);
        });
    });
  }

  private getFetchIssuesUrl(explorationId: string): string {
    return this.urlInterpolationService.interpolateUrl(
      ServicesConstants.FETCH_ISSUES_URL, {
        exploration_id: explorationId
      });
  }

  private getFetchPlaythroughUrl(
      explorationId: string, playthroughId: string): string {
    return this.urlInterpolationService.interpolateUrl(
      ServicesConstants.FETCH_PLAYTHROUGH_URL, {
        exploration_id: explorationId,
        playthrough_id: playthroughId
      });
  }

  private getResolveIssueUrl(explorationId: string): string {
    return this.urlInterpolationService.interpolateUrl(
      ServicesConstants.RESOLVE_ISSUE_URL, {
        exploration_id: explorationId
      });
  }
}

angular.module('oppia').factory(
  'PlaythroughIssuesBackendApiService',
  downgradeInjectable(PlaythroughIssuesBackendApiService));


text:
use chromium;
select * from
(select t.comments, t.NoOfCommenters, t.approval, r.issue, r.created, r.modified,
datediff((cast(r.modified as date)),(cast(r.created as date))) no_of_days
 from review r left join (
	select issue, count(issue) comments, count(distinct sender) NoOfCommenters,
	count(case approval when 'true' then 1 else NULL end) approval
	from comment group by issue) t on t.issue=r.issue order by r.issue asc) r1
natural join
(select t.owners, r.issue from review r left join (
	select owner, count(owner)owners from review group by owner)t  on t.owner=r.owner order by r.issue asc) r2;


text:
// Copyright (c) 2006 - 2011, Markus Strauch.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
package net.sf.sdedit.multipage;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.io.IOException;
import java.io.OutputStream;

import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;

import net.sf.sdedit.config.Configuration;
import net.sf.sdedit.config.PrintConfiguration;
import net.sf.sdedit.diagram.Diagram;
import net.sf.sdedit.diagram.DiagramDataProvider;
import net.sf.sdedit.error.SemanticError;
import net.sf.sdedit.error.SyntaxError;
import net.sf.sdedit.ui.components.ZoomPane;

import org.freehep.graphicsio.PageConstants;

@SuppressWarnings("unchecked")
public class MultipageExporter extends JPanel {

	private static Class<? extends Graphics2D> ps;

	private static Class<? extends Graphics2D> pdf;

	static {

		try {
			ps = (Class<? extends Graphics2D>) Class
					.forName("org.freehep.graphicsio.ps.PSGraphics2D");
			pdf = (Class<? extends Graphics2D>) Class
					.forName("org.freehep.graphicsio.pdf.PDFGraphics2D");
		} catch (RuntimeException re) {
			throw re;
		} catch (ClassNotFoundException ignored) {
			/* empty */
		}
	}

	public static boolean isAvailable() {
		return pdf != null;
	}

	private DiagramDataProvider provider;

	private Configuration configuration;

	private Dimension size;

	private MultipagePaintDevice paintDevice;

	private double scale;

	private Dimension previewSize;

	private PrintConfiguration properties;

	public MultipageExporter(PrintConfiguration properties, DiagramDataProvider provider,
			Configuration configuration) {
		super();
		this.properties = properties;
		this.provider = provider;
		this.configuration = configuration;
		size = PageConstants.getSize(properties.getFormat(), properties
				.getOrientation());
		// 149 / 210
		// 223 / 315
		double wide = 315D;
		if (properties.getOrientation().equals(PageConstants.PORTRAIT)) {
			scale = wide / size.height;
			previewSize = new Dimension(223, 315);
		} else {
			scale = wide / size.width;
			previewSize = new Dimension(315, 223);
		}
	}

	public double getScale() {
		return paintDevice.getScale();
	}

	public void init() throws SyntaxError, SemanticError {
		paintDevice = new MultipagePaintDevice(properties, size);
		new Diagram(configuration, provider, paintDevice).generate();
		int n = paintDevice.getPanels().size();
		setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
		int i = 0;
		for (MultipagePaintDevice.MultipagePanel panel : paintDevice
				.getPanels()) {
			i++;
			JPanel wrap = new JPanel();
			wrap.setLayout(new BoxLayout(wrap, BoxLayout.Y_AXIS));
			wrap.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
			wrap.setAlignmentY(0.5F);

			ZoomPane zoomPane = new ZoomPane(false);
			zoomPane.setViewportView(panel);
			zoomPane.setScale(scale);
			zoomPane.setMinimumSize(previewSize);
			zoomPane.setMaximumSize(previewSize);
			zoomPane.setPreferredSize(previewSize);
			zoomPane.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
			wrap.add(zoomPane);

			JLabel label = new JLabel(i + "/" + n);
			label.setAlignmentX(0.5F);

			wrap.add(label);

			add(wrap);
		}
	}

	public void exportTo(OutputStream stream, String type) throws IOException {
		// OutputStream stream = new FileOutputStream(file);
		Class<? extends Graphics2D> gc = type.toLowerCase().equals("pdf") ? pdf
				: ps;
		ExportDocument export = new ExportDocument(gc, paintDevice, stream,
				properties.getFormat(), properties.getOrientation());
		export.export();
	}
}


text:
<!--
	@license
	Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
	This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
	The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
	The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
	Code distributed by Google as part of the polymer project is also
	subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<!doctype html>
<html lang="de">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="refresh" content="0; URL=https://guenztalwaschpark.de/">
		<link rel="canonical" href="https://guenztalwaschpark.de/">
		<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
		<base href="/">

		<title>Günztal Waschpark</title>
		<meta name="description" content="Günztal Waschpark">

		<link rel="icon" href="./images/favicon.ico">

		<!-- See https://goo.gl/OOhYW5 -->
		<link rel="manifest" href="./manifest.json">

		<!-- See https://goo.gl/qRE0vM -->
		<meta name="theme-color" content="#00796B">

		<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
		<meta name="mobile-web-app-capable" content="yes">
		<meta name="application-name" content="Günztal Waschpark">

		<!-- Add to homescreen for Safari on iOS -->
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
		<meta name="apple-mobile-web-app-title" content="Günztal Waschpark">

		<!-- Homescreen icons -->
		<link rel="apple-touch-icon" href="./images/manifest/icon-48x48.png">
		<link rel="apple-touch-icon" sizes="72x72" href="./images/manifest/icon-72x72.png">
		<link rel="apple-touch-icon" sizes="96x96" href="./images/manifest/icon-96x96.png">
		<link rel="apple-touch-icon" sizes="144x144" href="./images/manifest/icon-144x144.png">
		<link rel="apple-touch-icon" sizes="192x192" href="./images/manifest/icon-192x192.png">

		<!-- Tile icon for Windows 8 (144x144 + tile color) -->
		<meta name="msapplication-TileImage" content="./images/manifest/icon-144x144.png">
		<meta name="msapplication-TileColor" content="#3f51b5">
		<meta name="msapplication-tap-highlight" content="no">

		<script src="./bower_components/webcomponentsjs/webcomponents-loader.js"></script>
		<link rel="import" href="./src/guenztal-waschpark-app.html">
		<style>
body {
	margin: 0;
	font-family: 'Roboto', 'Noto', sans-serif;
	line-height: 1.5;
	background-color: #f5f5f5;
}

		</style>
	</head>
	<body>
		<guenztal-waschpark-app unresolved>
		</guenztal-waschpark-app>
		<!-- Built with love using Polymer Starter Kit -->
	</body>
</html>


text:
package com.jrestless.core.container.dpi;

import static java.util.Objects.requireNonNull;

import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Supplier;

import org.glassfish.jersey.internal.inject.AbstractBinder;
import org.glassfish.jersey.process.internal.RequestScoped;

/**
 * Simple instance binder.
 * <p>
 * Use the {@link Builder builder} to create an instance binder.
 *
 * @author Bjoern Bilger
 *
 */
public final class InstanceBinder extends AbstractBinder {

	private final Collection<InstanceFactoryDefinition<?>> factoryDefinitions;

	private InstanceBinder(Collection<InstanceFactoryDefinition<?>> factoryDefinitions) {
		this.factoryDefinitions = factoryDefinitions;
	}

	@Override
	protected void configure() {
		for (InstanceFactoryDefinition<?> factory : factoryDefinitions) {
			bindFactory(factory.getInstanceFactory()).to(factory.getType()).in(factory.getScope());
		}
	}
	/**
	 * Builder to create an {@link InstanceBinder}.
	 *
	 * @author Bjoern Bilger
	 *
	 */
	public static class Builder {

		private List<InstanceFactoryDefinition<?>> factoryDefinitions = new ArrayList<>();

		/**
		 * Add an instance for the given type and scope.
		 *
		 * @param instanceFactory
		 * @return
		 */
		public <T> Builder addInstance(InstanceFactoryDefinition<T> instanceFactory) {
			factoryDefinitions.add(instanceFactory);
			return this;
		}

		/**
		 * Add a request-scoped instance for the given type.
		 *
		 * @param instance
		 * @param type
		 * @return
		 */
		public <T> Builder addInstance(T instance, Class<T> type) {
			return addInstance(instance, type, RequestScoped.class);
		}

		/**
		 * Add an instance for the given type and scope.
		 *
		 * @param instance
		 * @param type
		 * @param scope
		 * @return
		 */
		public <T> Builder addInstance(T instance, Class<T> type, Class<? extends Annotation> scope) {
			return addInstance(new InstanceFactoryDefinition<T>(instance, type, scope));
		}

		/**
		 * Creates an {@link InstanceBinder} with all added instances.
		 *
		 * @return
		 */
		public InstanceBinder build() {
			return new InstanceBinder(new LinkedList<>(factoryDefinitions));
		}
	}

	static class InstanceFactoryDefinition<T> {

		private final Supplier<T> instanceFactory;
		private final Class<T> type;
		private final Class<? extends Annotation> scope;

		InstanceFactoryDefinition(T instance, Class<T> type, Class<? extends Annotation> scope) {
			this(wrap(instance), type, scope);
		}

		private static <T> Supplier<T> wrap(T instance) {
			requireNonNull(instance);
			return () -> instance;
		}

		InstanceFactoryDefinition(Supplier<T> instanceSupplier, Class<T> type, Class<? extends Annotation> scope) {
			this.instanceFactory = requireNonNull(instanceSupplier);
			this.type = requireNonNull(type);
			this.scope = requireNonNull(scope);
		}

		Class<? extends Annotation> getScope() {
			return scope;
		}

		Class<T> getType() {
			return type;
		}

		Supplier<T> getInstanceFactory() {
			return instanceFactory;
		}
	}
}


text:
import json
import urlparse
import urllib
from protocol.encoder import WriteEncoder, CreateEncoder, ReadEncoder
from protocol.query.builder import QueryBuilder
from response import *
from endpoint import media_type, media_types

def escape(s):
    return urllib.quote(s, safe='')

def make_fetcher(endpoint, url, headers={}):
    def fetcher(cursor):
        resp = endpoint.get(url, json.dumps(cursor), headers=headers)
        if resp.status_code != 200:
            #munge this so the ResponsException can work with it
            resp.status = resp.status_code
            raise ResponseException(resp)
        return json.loads(resp.text)
    return fetcher

class MonitoringClient(object):
    def __init__(self, endpoint):
        self.endpoint = endpoint

    def delete_rule(self, key):
        url = urlparse.urljoin(self.endpoint.base_url, 'monitors/' + key)
        resp = self.endpoint.delete(url)
        return Response(resp, self.endpoint)

    def get_alert(self, key, alert_id):
        url1 = urlparse.urljoin(self.endpoint.base_url,
                                'monitors/' + key + '/')
        url = urlparse.urljoin(url1, 'alerts/' + str(alert_id))
        resp = self.endpoint.get(url)
        return MonitoringResponse(resp, self.endpoint, 'decode_alert')

    def get_annotations(self, key):
        url = urlparse.urljoin(self.endpoint.base_url,
                               'monitors/annotations/' + key)
        resp = self.endpoint.get(url)
        return Response(resp, self.endpoint)

    def get_changelog(self, key):
        url = urlparse.urljoin(self.endpoint.base_url,
                               'monitors/%s/changes/' % key)
        resp = self.endpoint.get(url)
        return Response(resp, self.endpoint)

    def get_logs(self, key):
        url = urlparse.urljoin(self.endpoint.base_url,
                               'monitors/%s/logs/' % key)
        resp = self.endpoint.get(url)
        return MonitoringResponse(resp, self.endpoint, 'decode_rule_logs')

    def get_rule(self, key):
        url = urlparse.urljoin(self.endpoint.base_url, 'monitors/' + key)
        return MonitoringResponse(self.endpoint.get(url), self)

    def get_usage(self, key):
        url = urlparse.urljoin(self.endpoint.base_url,
                               'monitors/%s/usage/' % key)
        resp = self.endpoint.get(url)
        return MonitoringResponse(resp, self.endpoint, 'decode_rule_usage')

    def list_alerts(self, key):
        url1 = urlparse.urljoin(self.endpoint.base_url,
                                'monitors/' + key + '/')
        url = urlparse.urljoin(url1, 'alerts/')
        resp = self.endpoint.get(url)
        return AlertListResponse(resp, self.endpoint)

    def list_rules(self):
        url = urlparse.urljoin(self.endpoint.base_url, 'monitors/')
        return MonitoringResponse(self.endpoint.get(url), self,
                                  'decode_rule_list')

class Client(object):
    """Entry point for all TempoIQ API calls.

    :param endpoint: backend and credentials to connect to
    :type endpoint: tempoiq.endpoint.HTTPEndpoint
    """

    write_encoder = WriteEncoder()
    create_encoder = CreateEncoder()
    read_encoder = ReadEncoder()

    def __init__(self, endpoint, read_version='v2'):
        self.endpoint = endpoint
        self.monitoring_client = MonitoringClient(self.endpoint)
        self.DATAPOINT_ACCEPT_TYPE = media_type('datapoint-collection',
                                                read_version)
        self.ERROR_ACCEPT_TYPE = media_type('error', 'v1')
        self.DEVICE_ACCEPT_TYPE = media_type('device-collection', 'v2')
        self.QUERY_CONTENT_TYPE = media_type('query', 'v1')
        self.read_version = read_version

    def create_device(self, device):
        """Create a new device

        :param device:
        :type device: :class:`~tempoiq.protocol.device.Device`
        :rtype: :class:`tempoiq.response.Response` with a
                :class:`tempoiq.protocol.device.Device` data payload"""

        url = urlparse.urljoin(self.endpoint.base_url, 'devices/')
        j = json.dumps(device, default=self.create_encoder.default)
        resp = self.endpoint.post(url, j)
        return Response(resp, self.endpoint)

    def delete_device(self, query):
        """Delete devices that match the provided query.

        :param query:
        :type query: :class:`tempoiq.protocol.query.builder.QueryBuilder`
        :rtype: :class:`tempoiq.response.Response`"""

        url = urlparse.urljoin(self.endpoint.base_url, 'devices/')
        j = json.dumps(query, default=self.read_encoder.default)
        resp = self.endpoint.delete(url, j)
        return Response(resp, self.endpoint)

    def update_device(self, device):
        """Update the attributes of a device.

        :param device:
        :type device: :class:`~tempoiq.protocol.device.Device`
        :rtype: :class:`tempoiq.response.Response` with a
                :class:`tempoiq.protocol.device.Device` data payload"""

        path = '/'.join(['devices', escape(device.key)])
        url = urlparse.urljoin(self.endpoint.base_url, path)
        j = json.dumps(device, default=self.create_encoder.default)
        resp = self.endpoint.put(url, j)
        return Response(resp, self.endpoint)

    def delete_from_sensors(self, device_key, sensor_key, start, end):
        path = '/'.join(
            ['devices', escape(device_key), 'sensors',  escape(sensor_key),
             'datapoints'])
        url = urlparse.urljoin(self.endpoint.base_url, path)
        j = json.dumps({'start': start.isoformat(),
                        'stop': end.isoformat()})
        resp = self.endpoint.delete(url, j)
        return DeleteDatapointsResponse(resp, self.endpoint)

    def monitor(self, rule):
        url = urlparse.urljoin(self.endpoint.base_url, 'monitors/')
        rule_json = json.dumps(rule, default=self.write_encoder.default)
        resp = self.endpoint.post(url, rule_json)
        return MonitoringResponse(resp, self.endpoint)

    def query(self, object_type):
        """Begin to build a query on the given object type.

        :param object_type: Either :class:`~tempoiq.protocol.device.Device`
                            or :class:`~tempoiq.protocol.sensor.Sensor`
        :rtype: :class:`~tempoiq.protocol.query.builder.QueryBuilder`"""

        return QueryBuilder(self, object_type)

    def read(self, query):
        url = urlparse.urljoin(self.endpoint.base_url, 'read/')
        j = json.dumps(query, default=self.read_encoder.default)
        accept_headers = [self.ERROR_ACCEPT_TYPE, self.DATAPOINT_ACCEPT_TYPE]
        content_header = self.QUERY_CONTENT_TYPE
        headers = media_types(accept_headers, content_header)
        resp = self.endpoint.get(url, j, headers=headers)
        fetcher = make_fetcher(self.endpoint, url, headers)
        if self.read_version == 'v2':
            return SensorPointsResponse(resp, self.endpoint, fetcher)
        else:
            return StreamResponse(resp, self.endpoint, fetcher)

    def search_devices(self, query):
        #TODO - actually use the size param
        url = urlparse.urljoin(self.endpoint.base_url, 'devices/')
        j = json.dumps(query, default=self.read_encoder.default)
        accept_headers = [self.ERROR_ACCEPT_TYPE, self.DEVICE_ACCEPT_TYPE]
        content_header = self.QUERY_CONTENT_TYPE
        headers = media_types(accept_headers, content_header)
        fetcher = make_fetcher(self.endpoint, url, headers)
        return DeviceResponse(self.endpoint.get(url, j, headers=headers),
                              self.endpoint, fetcher)

    def single(self, query):
        url = urlparse.urljoin(self.endpoint.base_url, 'single/')
        j = json.dumps(query, default=self.read_encoder.default)
        fetcher = make_fetcher(self.endpoint, url)
        return SensorPointsResponse(self.endpoint.get(url, j), self.endpoint,
                                    fetcher)

    def update_rule(self, rule):
        route = 'monitors/%s' % rule.key
        url = urlparse.urljoin(self.endpoint.base_url, route)
        rule_json = json.dumps(rule, default=self.write_encoder.default)
        resp = self.endpoint.put(url, rule_json)
        return MonitoringResponse(resp, self.endpoint)

    def write(self, write_request):
        """Write data points to one or more devices and sensors.

        The write_request argument is a dict which maps device keys to device
        data.

        The device data is itself a dict mapping sensor key to a list of
        :class:`tempoiq.protocol.point.Point`

        :param dict write_request:"""

        url = urlparse.urljoin(self.endpoint.base_url, 'write/')
        default = self.write_encoder.default
        resp = self.endpoint.post(url, json.dumps(write_request,
                                                  default=default))
        return WriteResponse(resp, self.endpoint)


text:
module Gitlab
  module Config
    module Entry
      module Attributable
        extend ActiveSupport::Concern

        class_methods do
          def attributes(*attributes)
            attributes.flatten.each do |attribute|
              if method_defined?(attribute)
                raise ArgumentError, 'Method already defined!'
              end

              define_method(attribute) do
                return unless config.is_a?(Hash)

                config[attribute]
              end
            end
          end
        end
      end
    end
  end
end


text:
using System.Web.Http;
using System.Web.Mvc;
using Hooker.WebApi.Areas.HelpPage.App_Start;

namespace Hooker.WebApi.Areas.HelpPage
{
    public class HelpPageAreaRegistration : AreaRegistration
    {
        public override string AreaName => "HelpPage";

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "HelpPage_Default",
                "Help/{action}/{apiId}",
                new { controller = "Help", action = "Index", apiId = UrlParameter.Optional });

            HelpPageConfig.Register(GlobalConfiguration.Configuration);
        }
    }
}


text:
#pragma once
#include <aws/devops-guru/DevOpsGuru_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace DevOpsGuru
{
namespace Model
{
  enum class EventClass
  {
    NOT_SET,
    INFRASTRUCTURE,
    DEPLOYMENT,
    SECURITY_CHANGE,
    CONFIG_CHANGE,
    SCHEMA_CHANGE
  };

namespace EventClassMapper
{
AWS_DEVOPSGURU_API EventClass GetEventClassForName(const Aws::String& name);

AWS_DEVOPSGURU_API Aws::String GetNameForEventClass(EventClass value);
} // namespace EventClassMapper
} // namespace Model
} // namespace DevOpsGuru
} // namespace Aws


text:
var fluxex = require('../');

module.exports = fluxex.createApp({
    sampleStore: require('./testStore')
}, 'noneed_htmlJsx');


text:
package bridge

import (
	"github.com/sacloud/libsacloud/v2/helper/service"
	"github.com/sacloud/libsacloud/v2/helper/validate"
	"github.com/sacloud/libsacloud/v2/sacloud"
)

type CreateRequest struct {
	Zone string `request:"-" validate:"required"`

	Name        string `validate:"required"`
	Description string `validate:"min=0,max=512"`
}

func (req *CreateRequest) Validate() error {
	return validate.Struct(req)
}

func (req *CreateRequest) ToRequestParameter() (*sacloud.BridgeCreateRequest, error) {
	params := &sacloud.BridgeCreateRequest{}
	if err := service.RequestConvertTo(req, params); err != nil {
		return nil, err
	}
	return params, nil
}


text:
**All bug reports and problem issues require example code**. In addition please submit the following:

- Platform you are running on
- The version of mochawesome/mochawesome-report-generator you are using
- How you are using mochawesome-report-generator (via CLI, inside mochawesome, or some other means)

Providing a sample test is the best way to get your issue addressed and without it your issue may be closed.
You must provide a clear and simple way to reproduce the issue.

## Pull requests

**Contributions are welcome**! Pull requests will be reviewed and may be integrated into the codebase at my discretion.


text:
using System;
using System.Collections.Generic;
using System.Text;

namespace VideoRentalSystem.Models
{
    public class Film
    {
        public Film(string name, string summary, DateTime releaseDate, TimeSpan duration)
        {
            this.Name = name;
            this.Summary = summary;
            this.ReleaseDate = releaseDate;
            this.Duration = duration;

            this.IsDeleted = false;

            this.Categories = new HashSet<FilmRating>();
            this.Genres = new HashSet<FilmGenre>();
            this.FilmStaffs = new HashSet<FilmStaff>();
            this.Customers = new HashSet<Customer>();
        }

        public Film()
        {
            this.Categories = new HashSet<FilmRating>();
            this.Genres = new HashSet<FilmGenre>();
            this.FilmStaffs = new HashSet<FilmStaff>();
            this.Customers = new HashSet<Customer>();
        }

        public int Id { get; set; }

        public string Name { get; set; }

        public string Summary { get; set; }

        public DateTime ReleaseDate { get; set; }

        public TimeSpan Duration { get; set; }

        public virtual ICollection<FilmRating> Categories { get; set; }

        public virtual ICollection<FilmGenre> Genres { get; set; }

        public virtual ICollection<Customer> Customers { get; set; }

        public virtual ICollection<FilmStaff> FilmStaffs { get; set; }

        public bool IsDeleted { get; set; }

        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.Append("Film: ");
            sb.AppendLine(this.Name);
            sb.Append("Release date: ");
            sb.AppendLine(this.ReleaseDate.ToString());
            sb.Append("Duration: ");
            sb.AppendLine(this.Duration.TotalMinutes.ToString());
            sb.Append("Rating: ");
            sb.AppendLine(string.Join(",", this.Categories));
            sb.Append("Genres: ");
            sb.AppendLine(string.Join(",", this.Genres));
            sb.AppendLine("Directors/Writers/Actors: ");
            sb.AppendLine(string.Join(",", this.FilmStaffs));

            return sb.ToString();
        }
    }
}


text:
namespace lelantus {

class SigmaExtendedProof{
public:
    SigmaExtendedProof() = default;

    inline std::size_t memoryRequired() const {
        return B_.memoryRequired() * 4
               + ZA_.memoryRequired() * (f_.size() + 2)
               + B_.memoryRequired() * Gk_.size() * 2
               + zR_.memoryRequired() * 2;
    }

    inline std::size_t memoryRequired(int n, int m) const {
        return B_.memoryRequired() * 4
               + ZA_.memoryRequired() * (m*(n - 1) + 2)
               + B_.memoryRequired() * m * 2
               + zR_.memoryRequired() * 2;
    }

    ADD_SERIALIZE_METHODS;
    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action) {
        READWRITE(A_);
        READWRITE(B_);
        READWRITE(C_);
        READWRITE(D_);
        READWRITE(f_);
        READWRITE(ZA_);
        READWRITE(ZC_);
        READWRITE(Gk_);
        READWRITE(Qk);
        READWRITE(zV_);
        READWRITE(zR_);
    }

public:
    GroupElement A_;
    GroupElement B_;
    GroupElement C_;
    GroupElement D_;
    std::vector<Scalar> f_;
    Scalar ZA_;
    Scalar ZC_;
    std::vector<GroupElement> Gk_;
    std::vector<GroupElement> Qk;
    Scalar zV_;
    Scalar zR_;
};

} //namespace lelantus

#endif //FIRO_LIBLELANTUS_SIGMAEXTENDED_PROOF_H


text:
const { createApplicationConfigurationFromObject } = require('./jdl-application-configuration-factory');
const JDLApplicationEntities = require('./jdl-application-entities');
const JDLOptions = require('./jdl-options');

module.exports = class JDLApplication {
    constructor({ config = {}, entityNames = [] } = {}) {
        this.config = createApplicationConfigurationFromObject(config);
        this.entityNames = new JDLApplicationEntities(entityNames);
        this.options = new JDLOptions();
    }

    setConfigurationOption(option) {
        if (!option) {
            throw new Error('An option has to be passed to set an option.');
        }
        this.config.setOption(option);
    }

    hasConfigurationOption(optionName) {
        return this.config.hasOption(optionName);
    }

    getConfigurationOptionValue(optionName) {
        if (!optionName) {
            throw new Error('An option name has to be passed to get a value.');
        }
        if (!this.config.hasOption(optionName)) {
            return undefined;
        }
        const option = this.config.getOption(optionName);
        return option.getValue();
    }

    forEachConfigurationOption(passedFunction) {
        this.config.forEachOption(passedFunction);
    }

    addEntityName(entityName) {
        if (!entityName) {
            throw new Error('An entity name has to be passed so as to be added to the application.');
        }
        this.entityNames.add(entityName);
    }

    addEntityNames(entityNames = []) {
        this.entityNames.addEntityNames(entityNames);
    }

    getEntityNames() {
        return this.entityNames.toArray();
    }

    forEachEntityName(passedFunction) {
        this.entityNames.forEach(passedFunction);
    }

    addOption(jdlOption) {
        if (!jdlOption) {
            throw new Error("Can't add a nil option.");
        }
        this.options.addOption(jdlOption);
    }

    forEachOption(passedFunction) {
        if (!passedFunction) {
            return;
        }
        this.options.forEach(passedFunction);
    }

    getOptionQuantity() {
        return this.options.size();
    }

    toString() {
        let stringifiedApplication = `application {\n${this.config.toString(2)}\n`;
        if (this.entityNames.size() !== 0) {
            stringifiedApplication += `\n${this.entityNames.toString(2)}\n`;
        }
        if (this.options.size() !== 0) {
            stringifiedApplication += `\n${this.options.toString(2)}\n`;
        }
        stringifiedApplication += '}';
        return stringifiedApplication;
    }
};


text:
layout: post
status: publish
published: true
title: Weddings and Drinking
author: Jeff
author_login: admin
author_email: jeff@allthingsdork.com
author_url: http://www.allthingsdork.com
wordpress_id: 23
wordpress_url: http://www.allthingsdork.com/?p=23
date: '2006-10-08 14:51:17 -0500'
date_gmt: '2006-10-08 18:51:17 -0500'
categories:
- Random
tags: []
comments:
- id: 105958
  author: social networking software
  author_email: ''
  author_url: http://www.social-networking-software.org/
  date: '2010-08-31 18:17:11 -0500'
  date_gmt: '2010-09-01 00:17:11 -0500'
  content: |-
    social networking software...

    Great post! I really liked the content and disposition in your topic!...
---

So Greg's wedding was Saturday. (Plenty of photos to come, don't you worry) It was an interesting experience. Its unusualy that I'm at a wedding with sooo many people I know or am close to. Most weddings I've been at have been with people in a different age bracket or family from out of town.

It wasÂ  a bit of a different experience. I've never been a big tear guy at weddings but I have to admit I was all waterworks at Greg's. (Like a little bitch) An enjoyable time for all involved. Open bar sure did help too. The big guy did better then I expected. I figured he'd pass out sometime during the ceremony, but he was cool and collected. I'm proud and happy for him.

Haven't paid much attention to technology the past few days. I've been super busy with work. The Council of Five Nations was missed this weekend due to the festivities, but we'll be sure to catch it next year when it comes back. Albacon was also this weekend and missed for the same reasons. Agan there is always next year.

Star Trek collectors got together over the weekend and auctioned a ton of Trek collectibles from the show. They spent some insane amount of money (7.1 million?) on different items from the Trek Universe. INSANE! And people say Trek is dead. I'm still working on the screenplay and hope to have a copy on the web in the next couple of weeks.

Gotta run. Football is back on.


text:
package vn.cm.mypresent.service;

import android.app.NotificationManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.media.RingtoneManager;
import android.net.Uri;
import android.support.v4.app.NotificationCompat;

import com.google.gson.Gson;

import vn.cm.mypresent.R;
import vn.cm.mypresent.database.DBObject;

public class NoteAlarmReceiver extends BroadcastReceiver{
	@Override
	public void onReceive(Context context, Intent intent) {
		DBObject.ItemNote item = new Gson().fromJson(intent.getStringExtra("event"), DBObject.ItemNote.class);
		Uri soundUri = RingtoneManager
				.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
		NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
				.setSmallIcon(R.drawable.ic_launcher)
				.setContentTitle(item.title)
				.setSound(soundUri)
				.setContentText(item.content)
				.setAutoCancel(true);
		NotificationManager mNotifyMgr = (NotificationManager) context
				.getSystemService(Context.NOTIFICATION_SERVICE);
		mNotifyMgr.notify(item.id, mBuilder.build());
	}
}


text:
import { updateHost, removeUnlistedHosts, updateVm, removeUnlistedVms,
  updateTemplate, removeUnlistedTemplates, updateCluster, removeUnlistedClusters, downloadIcons } from './actions';
import { callOncePerTimeperiod, logDebug, logError, ovirtApiGet } from './helpers';
import CONFIG from './config';
import { isOvirtApiCheckPassed } from './provider'

let lastOvirtPoll = -1; // timestamp
/**
 * Initiate polling of oVirt data.
 *
 * @param dispatch
 */
export function pollOvirt({dispatch}) {
  if (!isOvirtApiCheckPassed()) {
    logDebug(`Skipping oVirt poling due to failed/unfinished oVirt API check`);
    return ;
  }

  callOncePerTimeperiod({
    lastCall: lastOvirtPoll,
    delay: CONFIG.ovirt_polling_interval,
    call: () => {
      logDebug('Execution of oVirt polling');
      lastOvirtPoll = Infinity; // avoid parallel execution
      const promises = [];
      promises.push( doRefreshHosts(dispatch) );
      promises.push( doRefreshVms(dispatch) );
      promises.push( doRefreshTemplates(dispatch) );
      promises.push( doRefreshClusters(dispatch) );

      return Promise.all(promises).then( () => { // update the timestamp
        lastOvirtPoll = Date.now();
        logDebug(`pollOvirt(): setting lastOvirtPoll to: ${lastOvirtPoll}`);
      });
    }
  });
}

/**
 * Shortens the period for next oVirt polling, so it will be executed at next earliest opportunity.
 *
 * Useful to shorten polling delay after user action.
 */
export function forceNextOvirtPoll() {
  lastOvirtPoll = -1;
}

function doRefreshHosts(dispatch) {
  logDebug(`doRefreshHosts() called`);
  return ovirtApiGet('hosts').done(result => {
    if (result && result.host && (result.host instanceof Array)) {
      const allHostIds = [];
      result.host.forEach( host => {
        allHostIds.push(host.id);
        dispatch(updateHost({
          id: host.id,
          name: host.name,
          address: host.address,
          clusterId: host.cluster ? host.cluster.id : undefined,
          status: host.status,
          memory: host.memory,
          cpu: host.cpu ? {
            name: host.cpu.name,
            speed: host.cpu.speed,
            topology: host.cpu.topology ? {
              sockets: host.cpu.topology.sockets,
              cores: host.cpu.topology.cores,
              threads: host.cpu.topology.threads
            } : undefined
          } : undefined,
          // summary
          // vdsm version
          // libvirt_version
        }));
      });
      dispatch(removeUnlistedHosts({allHostIds}));
    } else {
      logError(`doRefreshHosts() failed, result: ${JSON.stringify(result)}`);
    }
  });
}

function doRefreshVms(dispatch) { // TODO: consider paging; there might be thousands of vms
  logDebug(`doRefreshVms() called`);
  return ovirtApiGet('vms').done(result => {
    if (result && result.vm && (result.vm instanceof Array)) {
      const allVmsIds = [];
      const allIconIds = {}; // used as a set
      result.vm.forEach( vm => {
        allVmsIds.push(vm.id);

        let largeIconId, smallIconId;
        if (vm.large_icon) {
          largeIconId = vm.large_icon.id;
          allIconIds[largeIconId] = true;
        }
        if (vm.small_icon) {
          smallIconId = vm.small_icon.id;
          allIconIds[smallIconId] = true;
        }

        dispatch(updateVm({ // TODO: consider batching
          id: vm.id,
          name: vm.name,
          state: mapOvirtStatusToLibvirtState(vm.status),
          description: vm.description,
          highAvailability: vm.high_availability,
          icons: {
            largeId: largeIconId,
            smallId: smallIconId,
          },
          memory: vm.memory,
          cpu: {
            architecture: vm.cpu.architecture,
            topology: {
              sockets: vm.cpu.topology.sockets,
              cores: vm.cpu.topology.cores,
              threads: vm.cpu.topology.threads
            }
          },
          origin: vm.origin,
          os: {
            type: vm.os.type
          },
          type: vm.type, // server, desktop
          stateless: vm.stateless,
          clusterId: vm.cluster.id,
          templateId: vm.template.id,
          hostId: vm.host ? vm.host.id : undefined,
        }));
      });
      dispatch(removeUnlistedVms({allVmsIds}));
      dispatch(downloadIcons({ iconIds: allIconIds, forceReload: false }));
    } else {
      logError(`doRefreshVms() failed, result: ${JSON.stringify(result)}`);
    }
  });
}

function mapOvirtStatusToLibvirtState(ovirtStatus) {
  switch (ovirtStatus) {// TODO: finish - add additional states
    case 'up': return 'running';
    case 'down': return 'shut off';
    default:
      return ovirtStatus
  }
}

function doRefreshTemplates(dispatch) { // TODO: consider paging; there might be thousands of templates
  logDebug(`doRefreshTemplates() called`);
  return ovirtApiGet('templates').done(result => {
    if (result && result.template && (result.template instanceof Array)) {
      const allTemplateIds = [];
      result.template.forEach( template => {
        allTemplateIds.push(template.id);
        dispatch(updateTemplate({ // TODO: consider batching
          id: template.id,
          name: template.name,
          description: template.description,
          cpu: {
            architecture: template.cpu.architecture,
            topology: {
              sockets: template.cpu.topology.sockets,
              cores: template.cpu.topology.cores,
              threads: template.cpu.topology.threads
            }
          },
          memory: template.memory,
          creationTime: template.creation_time,

          highAvailability: template.high_availability,
          icons: {
            largeId: template.large_icon ? template.large_icon.id : undefined,
            smallId: template.small_icon ? template.small_icon.id : undefined,
          },
          os: {
            type: template.os.type
          },
          stateless: template.stateless,
          type: template.type, // server, desktop
          version: {
            name: template.version ? template.version.name : undefined,
            number: template.version ? template.version.number : undefined,
            baseTemplateId: template.version && template.version.base_template ? template.version.base_template.id : undefined,
          },

          // bios
          // display
          // migration
          // memory_policy
          // os.boot
          // start_paused
          // usb
        }));
      });
      dispatch(removeUnlistedTemplates({allTemplateIds}));
    } else {
      logError(`doRefreshTemplates() failed, result: ${JSON.stringify(result)}`);
    }
  });
}

function doRefreshClusters(dispatch) {
  logDebug(`doRefreshClusters() called`);
  return ovirtApiGet('clusters').done(result => {
    if (result && result.cluster && (result.cluster instanceof Array)) {
      const allClusterIds  = [];
      result.cluster.forEach( cluster => {
        allClusterIds.push(cluster.id);
        dispatch(updateCluster({
          id: cluster.id,
          name: cluster.name,
          // TODO: add more, if needed
        }));
      });
      dispatch(removeUnlistedClusters({allClusterIds}));
    } else {
      logError(`doRefreshClusters() failed, result: ${JSON.stringify(result)}`);
    }
  });
}

export function oVirtIconToInternal(ovirtIcon) {
  return {
    id: ovirtIcon.id,
    type: ovirtIcon['media_type'],
    data: ovirtIcon.data,
  };
}


text:
import { toString } from "../../utils/native";
import { isNullOrUndefined } from "../../utils/checks";

import $toString from "./error.to-string";

const errorTypes = ["TypeError", "ReferenceError", "SyntaxError", "RangeError", "URIError", "EvalError"];

export default function errorApi (env) {
  const { global: globalObject, objectFactory } = env;

  let proto = objectFactory.createObject();
  proto.className = "Error";
  proto.define("name", objectFactory.createPrimitive("Error"));
  proto.define("message", objectFactory.createPrimitive(""));

  let errorClass = objectFactory.createFunction(function* (message) {
    let messageString;
    if (!isNullOrUndefined(message)) {
      messageString = yield toString(message);
    }

    return objectFactory.create("Error", new Error(messageString));
  }, proto, { configurable: false, enumerable: false, writable: false, name: "Error" });

  $toString(proto, env, objectFactory);
  globalObject.define("Error", errorClass);

  errorTypes.forEach(errorType => {
    let typeProto = objectFactory.createObject();
    typeProto.define("name", objectFactory.createPrimitive(errorType));

    // add to prototype chain to represent inheritance
    typeProto.setPrototype(proto);

    let errClass = objectFactory.createFunction(function* (message) {
      let messageString = yield toString(message);
      let nativeError = new global[errorType](messageString);
      return objectFactory.create(errorType, nativeError);
    }, typeProto, { configurable: false, enumerable: false, writable: false, name: errorType });

    globalObject.define(errorType, errClass);
  });
}


text:
class PartnerBookmarksShimTest : public testing::Test {
 public:
  PartnerBookmarksShimTest()
      : ui_thread_(content::BrowserThread::UI, &message_loop_),
        file_thread_(content::BrowserThread::FILE, &message_loop_),
        model_(NULL) {
  }

  TestingProfile* profile() const { return profile_.get(); }

  const BookmarkNode*  AddBookmark(const BookmarkNode* parent,
                                   const GURL& url,
                                   const string16& title) {
    if (!parent)
      parent = model_->bookmark_bar_node();
    return model_->AddURL(parent, parent->child_count(), title, url);
  }

  const BookmarkNode*  AddFolder(const BookmarkNode* parent,
                                 const string16& title) {
    if (!parent)
      parent = model_->bookmark_bar_node();
    return model_->AddFolder(parent, parent->child_count(), title);
  }

 protected:
  // testing::Test
  virtual void SetUp() OVERRIDE {
    profile_.reset(new TestingProfile());
    profile_->CreateBookmarkModel(true);

    model_ = BookmarkModelFactory::GetForProfile(profile_.get());
    test::WaitForBookmarkModelToLoad(model_);
  }

  virtual void TearDown() OVERRIDE {
    profile_.reset(NULL);
    PartnerBookmarksShim::GetInstance()->Reset();
  }

  scoped_ptr<TestingProfile> profile_;

  base::MessageLoopForUI message_loop_;
  content::TestBrowserThread ui_thread_;
  content::TestBrowserThread file_thread_;

  BookmarkModel* model_;

  DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShimTest);
};

class TestObserver : public PartnerBookmarksShim::Observer {
 public:
  TestObserver()
      : notified_of_load_(false) {
  }

  // Called when everything is loaded and attached
  virtual void PartnerShimLoaded(PartnerBookmarksShim*) OVERRIDE {
    notified_of_load_ = true;
  }

  bool IsNotifiedOfLoad() { return notified_of_load_; }

 private:
  bool notified_of_load_;

  DISALLOW_COPY_AND_ASSIGN(TestObserver);
};

TEST_F(PartnerBookmarksShimTest, GetNodeByID) {
  // Add a bookmark.
  GURL bookmark_url("http://www.google.com/");
  AddBookmark(
        NULL,
        bookmark_url,
        ASCIIToUTF16("bar"));
  const BookmarkNode* test_folder1 = AddFolder(NULL,
                                               ASCIIToUTF16("test_folder1"));
  const BookmarkNode* test_folder2 = AddFolder(test_folder1,
                                               ASCIIToUTF16("test_folder2"));
  const BookmarkNode* model_bookmark1 = AddBookmark(test_folder2,
                                                    GURL("http://www.test.com"),
                                                    ASCIIToUTF16("bar"));
  const BookmarkNode* model_bookmark2 = AddBookmark(test_folder2,
                                                    GURL("http://www.foo.com"),
                                                    ASCIIToUTF16("baz"));

  BookmarkNode* root_partner_node = new BookmarkPermanentNode(0);
  BookmarkNode* partner_folder1 = new BookmarkNode(1, GURL());
  partner_folder1->set_type(BookmarkNode::FOLDER);
  root_partner_node->Add(partner_folder1, root_partner_node->child_count());

  BookmarkNode* partner_folder2 = new BookmarkNode(2, GURL());
  partner_folder2->set_type(BookmarkNode::FOLDER);
  partner_folder1->Add(partner_folder2, partner_folder1->child_count());

  BookmarkNode* partner_bookmark1 = new BookmarkNode(3,
                                                     GURL("http://www.a.com"));
  partner_bookmark1->set_type(BookmarkNode::URL);
  partner_folder1->Add(partner_bookmark1, partner_folder1->child_count());

  BookmarkNode* partner_bookmark2 = new BookmarkNode(4,
                                                     GURL("http://www.b.com"));
  partner_bookmark2->set_type(BookmarkNode::URL);
  partner_folder2->Add(partner_bookmark2, partner_folder2->child_count());

  PartnerBookmarksShim* shim = PartnerBookmarksShim::GetInstance();
  ASSERT_FALSE(shim->IsLoaded());
  shim->AttachTo(model_, model_->mobile_node());
  shim->SetPartnerBookmarksRoot(root_partner_node);
  ASSERT_TRUE(shim->IsLoaded());

  ASSERT_EQ(shim->GetNodeByID(model_bookmark1->id(), false), model_bookmark1);
  ASSERT_EQ(shim->GetNodeByID(model_bookmark2->id(), false), model_bookmark2);
  ASSERT_EQ(shim->GetNodeByID(test_folder2->id(), false), test_folder2);
  ASSERT_EQ(shim->GetNodeByID(0, true), root_partner_node);
  ASSERT_EQ(shim->GetNodeByID(1, true), partner_folder1);
  ASSERT_EQ(shim->GetNodeByID(4, true), partner_bookmark2);
}

TEST_F(PartnerBookmarksShimTest, ObserverNotifiedOfLoadNoPartnerBookmarks) {
  TestObserver* observer = new TestObserver();
  PartnerBookmarksShim* shim = PartnerBookmarksShim::GetInstance();
  shim->AddObserver(observer);
  ASSERT_FALSE(observer->IsNotifiedOfLoad());
  shim->SetPartnerBookmarksRoot(NULL);
  ASSERT_TRUE(observer->IsNotifiedOfLoad());
}

TEST_F(PartnerBookmarksShimTest, ObserverNotifiedOfLoadWithPartnerBookmarks) {
  int64 id = 5;
  BookmarkNode* root_partner_node = new BookmarkPermanentNode(id++);
  BookmarkNode* partner_bookmark1 = new BookmarkNode(id++,
                                                     GURL("http://www.a.com"));
  partner_bookmark1->set_type(BookmarkNode::URL);
  root_partner_node->Add(partner_bookmark1, root_partner_node->child_count());

  TestObserver* observer = new TestObserver();
  PartnerBookmarksShim* shim = PartnerBookmarksShim::GetInstance();
  shim->AddObserver(observer);
  shim->AttachTo(model_, model_->bookmark_bar_node());
  ASSERT_FALSE(observer->IsNotifiedOfLoad());
  shim->SetPartnerBookmarksRoot(root_partner_node);
  ASSERT_TRUE(observer->IsNotifiedOfLoad());
}


text:
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import questionsComponent from './questions.component';

import loanQuestions from './loan_questions/loan_questions';
import personalInfo from './personal_info/personal_info';
import residentialInfo from './residential_info/residential_info';
import employmentInfo from './employment_info/employment_info';
import assets from './assets/assets';
import declaration from './declaration/declaration';

let questionsModule = angular.module('questions', [
  uiRouter,
  loanQuestions,
  personalInfo,
  residentialInfo,
  employmentInfo,
  assets,
  declaration
])
.config(($stateProvider) => {
  'ngInject';

  $stateProvider
  .state ('register.questions', {
    template : '<questions class="page-full absolute"></questions>',
    authenticated : true
  });
})
.component('questions', questionsComponent);

export default questionsModule.name;


text:
/*
 * server/views/_helpers/extend.js
 *
 * Sometimes it is useful to have custom scripts or stylesheets
 * on your pages. Handlebars does not provide a way to import
 * or extend a template, but through the use of helpers you can
 * create a similar result.
 *
 * We can take advantage of the fact that our body template is
 * processed before the layout template. Knowing this, we can
 * create two helpers "block" and "extend" which can be used to
 * inject custom stylesheets or scripts into the layout template.
 * The block helper will act as a placeholder for values
 * specified in earlier extend helpers.
 */

'use strict';

var _blocks = {};

exports = module.exports = function (context, options) {
  _blocks[context] = _blocks[context] || [];
  _blocks[context].push(options.fn());
};

exports._blocks = _blocks;


text:
namespace blink {

bool PaymentsValidators::isValidCurrencyCodeFormat(const String& code, String* optionalErrorMessage)
{
    if (ScriptRegexp("^[A-Z]{3}$", TextCaseSensitive).match(code) == 0)
        return true;

    if (optionalErrorMessage)
        *optionalErrorMessage = "'" + code + "' is not a valid ISO 4217 currency code, should be 3 upper case letters [A-Z]";

    return false;
}

bool PaymentsValidators::isValidAmountFormat(const String& amount, String* optionalErrorMessage)
{
    if (ScriptRegexp("^-?[0-9]+(\\.[0-9]+)?$", TextCaseSensitive).match(amount) == 0)
        return true;

    if (optionalErrorMessage)
        *optionalErrorMessage = "'" + amount + "' is not a valid ISO 20022 CurrencyAnd30Amount";

    return false;
}

bool PaymentsValidators::isValidRegionCodeFormat(const String& code, String* optionalErrorMessage)
{
    if (ScriptRegexp("^[A-Z]{2}$", TextCaseSensitive).match(code) == 0)
        return true;

    if (optionalErrorMessage)
        *optionalErrorMessage = "'" + code + "' is not a valid ISO 3166 country code, should be 2 upper case letters [A-Z]";

    return false;
}

bool PaymentsValidators::isValidLanguageCodeFormat(const String& code, String* optionalErrorMessage)
{
    if (ScriptRegexp("^([a-z]{2,3})?$", TextCaseSensitive).match(code) == 0)
        return true;

    if (optionalErrorMessage)
        *optionalErrorMessage = "'" + code + "' is not a valid ISO 639 language code, should be 2-3 lower case letters [a-z]";

    return false;
}

bool PaymentsValidators::isValidScriptCodeFormat(const String& code, String* optionalErrorMessage)
{
    if (ScriptRegexp("^([A-Z][a-z]{3})?$", TextCaseSensitive).match(code) == 0)
        return true;

    if (optionalErrorMessage)
        *optionalErrorMessage = "'" + code + "' is not a valid ISO 15924 script code, should be an upper case letter [A-Z] followed by 3 lower case letters [a-z]";

    return false;
}

bool PaymentsValidators::isValidShippingAddress(const mojom::blink::ShippingAddressPtr& address, String* optionalErrorMessage)
{
    if (!isValidRegionCodeFormat(address->region_code, optionalErrorMessage))
        return false;

    if (!isValidLanguageCodeFormat(address->language_code, optionalErrorMessage))
        return false;

    if (!isValidScriptCodeFormat(address->script_code, optionalErrorMessage))
        return false;

    if (address->language_code.isEmpty() && !address->script_code.isEmpty()) {
        if (optionalErrorMessage)
            *optionalErrorMessage = "If language code is empty, then script code should also be empty";

        return false;
    }

    return true;
}

} // namespace blink


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

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/**
 A view used to provide a non-gradient multicolored animation for MDCProgressView's progress bar.
 */
__attribute__((objc_subclassing_restricted))
@interface MDCProgressLayerView : UIView

/**
 Determines the colors displayed in the progress view, and the order in which they will be
 displayed. Defaults to nil. If this property is nil, no animations will occur.
 */
@property(nonatomic, nullable, copy) NSArray<UIColor *> *colors;

/**
 Starts the progress bar's indeterminate animations.
 */
- (void)startAnimating;

/**
 Stops the progress bar's indeterminate animations.
 */
- (void)stopAnimating;

NS_ASSUME_NONNULL_END

@end


text:
import feedparser
import simplejson as json
import dateutil.parser
import sys
import re

re_rem = []
rem = ["", "","", "", "", "", "",
       "", "", "</size>", "</bgcolor>", "
", "
"]
def removeTags(s):
    if s:
        s = u"" + s
        for r in re_rem:
            s = re.sub(r, "", s)
        for r in rem:
            s = s.replace(r,"")
    return s

class NewsItem():
	def __init__(self, title, time, content, link):
		self.time = dateutil.parser.parse(time).strftime('%d %h')
		self.title = removeTags(title)
		self.content = removeTags(content)
		self.link = link

try:
    feedfile = sys.argv[1]
    keyword = sys.argv[2]
except:
	print "wrong usage. try ./thisfile <feed.rss> <keyword>"
	sys.exit(0)

feed = feedparser.parse(feedfile)

num_items = len(feed.entries)

our_items = []
print num_items
for i in range(num_items):
	try:
		n = NewsItem(feed.entries[i].title,
				feed.entries[i].published,
				feed.entries[i].summary_detail['value'],
				feed.entries[i].link,
				)
		our_items.append(n)
	except:
		continue

print len(our_items)
l = []
for n in our_items:
	if keyword == "all" or (keyword in  n.title):
		j = {
			"title" : n.title,
			"time" : n.time,
			"link" : n.link,
			"content" : n.content
		}
		l.append(j)

name = feedfile.split(".")[0]
print name + "_items=" + json.dumps(l, indent = 2) + ";"


text:
Bug #35437 (Segfault or Invalid Opcode 137/1/4)
--FILE--
<?php
function err2exception($errno, $errstr)
{
	throw new Exception("Error occuried: " . $errstr);
}

set_error_handler('err2exception');

class TestClass
{
	function testMethod()
	{
		$GLOBALS['t'] = new stdClass;
	}
}

try {
	TestClass::testMethod();
} catch (Exception $e) {
	echo "Catched: ".$e->getMessage()."\n";
}
?>
--EXPECT--
Catched: Error occuried: Non-static method TestClass::testMethod() should not be called statically


text:
//********************************************************************
//*
//* Warning: This file was generated by ecore4CPP Generator
//*
//********************************************************************

#ifndef UML_DEPLOYMENTTARGET_HPP
#define UML_DEPLOYMENTTARGET_HPP

#include <memory>
#include <string>
// forward declarations
template<class T> class Bag;
template<class T, class ... U> class Subset;

//*********************************
// generated Includes
#include <map> // used for Persistence
#include <vector> // used for Persistence
namespace persistence
{
	namespace interfaces
	{
		class XLoadHandler; // used for Persistence
		class XSaveHandler; // used for Persistence
	}
}

namespace uml
{
	class umlFactory;
}

//Forward Declaration for used types
namespace uml
{
	class Comment;
	class Dependency;
	class Deployment;
	class Namespace;
	class PackageableElement;
	class StringExpression;
}

// namespace macro header include
#include "uml/uml.hpp"

// base class includes
#include "uml/NamedElement.hpp"

// enum includes
#include "uml/VisibilityKind.hpp"

//*********************************
namespace uml
{
	/*!
	A deployment target is the location for a deployed artifact.

From package UML::Deployments.

	*/

	class UML_API DeploymentTarget: virtual public NamedElement
	{
		public:
 			DeploymentTarget(const DeploymentTarget &) {}

		protected:
			DeploymentTarget(){}

		public:
			virtual std::shared_ptr<ecore::EObject> copy() const = 0;

			//destructor
			virtual ~DeploymentTarget() {}

			//*********************************
			// Operations
			//*********************************
			/*!
			Derivation for DeploymentTarget::/deployedElement
			result = (deployment.deployedArtifact->select(oclIsKindOf(Artifact))->collect(oclAsType(Artifact).manifestation)->collect(utilizedElement)->asSet())

From package UML::Deployments.

			*/

			virtual std::shared_ptr<Bag<uml::PackageableElement> > getDeployedElements() = 0;

			//*********************************
			// Attribute Getters & Setters
			//*********************************

			//*********************************
			// Reference Getters & Setters
			//*********************************
			/*!
			The set of elements that are manifested in an Artifact that is involved in Deployment to a DeploymentTarget.

From package UML::Deployments.

			*/

			virtual std::shared_ptr<Bag<uml::PackageableElement>> getDeployedElement() const = 0;
			/*!
			The set of Deployments for a DeploymentTarget.

From package UML::Deployments.

			*/

			virtual std::shared_ptr<Subset<uml::Deployment, uml::Element>> getDeployment() const = 0;

			//*********************************
			// Union Reference Getters
			//*********************************
			/*!
			The Elements owned by this Element.

From package UML::CommonStructure.

			*/

			virtual std::shared_ptr<Union<uml::Element>> getOwnedElement() const = 0;
			/*!
			The Element that owns this Element.

From package UML::CommonStructure.

			*/

			virtual std::weak_ptr<uml::Element> getOwner() const = 0;

			//*********************************
			// Container Getter
			//*********************************
			virtual std::shared_ptr<ecore::EObject> eContainer() const = 0;

			//*********************************
			// Persistence Functions
			//*********************************
			virtual void load(std::shared_ptr<persistence::interfaces::XLoadHandler> loadHandler) = 0;
			virtual void resolveReferences(const int featureID, std::vector<std::shared_ptr<ecore::EObject> > references) = 0;
			virtual void save(std::shared_ptr<persistence::interfaces::XSaveHandler> saveHandler) const = 0;

		protected:
			//*********************************
			// Attribute Members
			//*********************************

			//*********************************
			// Reference Members
			//*********************************
			/*!
			The set of elements that are manifested in an Artifact that is involved in Deployment to a DeploymentTarget.

From package UML::Deployments.

			*/

			mutable std::shared_ptr<Bag<uml::PackageableElement>> m_deployedElement;
			/*!
			The set of Deployments for a DeploymentTarget.

From package UML::Deployments.

			*/

			mutable std::shared_ptr<Subset<uml::Deployment, uml::Element>> m_deployment;
	};
}
#endif /* end of include guard: UML_DEPLOYMENTTARGET_HPP */


text:
<component name="libraryTable">
  <library name="supertoasts-1.3.4">
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.github.johnpersano/supertoasts/1.3.4/jars/classes.jar!/" />
      <root url="file://$PROJECT_DIR$/app/build/intermediates/exploded-aar/com.github.johnpersano/supertoasts/1.3.4/res" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>


text:
function allowDrop(holder) {
  holder.ondragover = function () {
    return false;
  };

  holder.ondragend = function () {
    return false;
  };

  var jstypes = {
    'javascript': 1,
    'coffeescript': 1,
    'coffee': 1,
    'js' :1
  },
  csstypes = {
    'css': 1,
    'less': 1,
    'sass': 1
  };

  holder.ondrop = function (e) {
    e.preventDefault();

    var file = e.dataTransfer.files[0],
        reader = new FileReader();
    reader.onload = function (event) {
      // put JS in the JavaScript panel
      var type = file.type ? file.type.toLowerCase().replace(/^(text|application)\//, '') : file.name.toLowerCase().replace(/.*\./g, ''),
          panelId = 'html',
          panel = editors[panelId],
          syncCode = event.target.result,
          scroller = null;

      if (jstypes[type]) {
        panelId = 'javascript';
      } else if (csstypes[type]) {
        panelId = 'css';
      }

      panel = editors[panelId];
      scroller = panel.editor.scroller;

      panel.setCode(event.target.result);
      panel.show();

      try {
        // now kick off - basically just doing a copy and paste job from @wookiehangover - thanks man! :)
        var worker = new Worker(jsbin.root + '/js/editors/sync-worker.js');

        // pass the worker the file object
        worker.postMessage(file);

        panel.$el.find('> .label').append('<small> (live: edit & save in your fav editor)</small>');

        // bind onmessage handler
        worker.onmessage = function (event) {
          var top = scroller.scrollTop;
          panel.setCode(event.data.body);
          scroller.scrollTop = top;
          syncCode = event.data.body;
        };

        /* FIXME for now, there's a bug in CodeMirror 2 whereby binding the
          onKeyEvent causes all cursor keys to be ate :( */
        // panel.editor.setOption('onKeyEvent', function (event) {
        //   if (syncCode !== panel.editor.getCode()) {
        //     worker.terminate();
        //     console.log('terminate');
        //     panel.$el.find('> .label small').remove();
        //     panel.editor.setOption('onKeyEvent', function () { return true });
        //   }
        //   return event;
        // });
      } catch (e) {
        // fail on the awesomeness...oh well
      }
    };

    reader.readAsText(file);

    return false;
  };
}

// test for dnd and file api first
if (!!(window.File && window.FileList && window.FileReader)) allowDrop(document.body);


text:
{% extends "ui/base.html" %}

{% block content %}

{% endblock %}


text:
'use strict';

import express from 'express';
import configure from './lib/configure';
import routes from './controllers';

let app = express();

configure(app);

app.use(routes);

app.listen(app.set('port'), function () {
    console.log('server started!');
});


text:
require 'rails_helper'

RSpec.describe AddressPolicy do
  subject { AddressPolicy.new(user, address) }
  let(:address) { FactoryBot.create(:address) }

  it_behaves_like "address_policy"
end


text:
var index = require('../src/index');

describe('index', function() {
  it('should provide the Hyperdeck class', function() {
    index.Hyperdeck.should.be.ok();
  });

  it('should provide the HyperdeckCore class', function() {
    index.HyperdeckCore.should.be.ok();
  });

  it('should provide the Logger class', function() {
    index.Logger.should.be.ok();
  });
});


text:
using System.Linq;
using Content.Server.GameObjects.Components.NodeContainer;
using Content.Server.GameObjects.Components.NodeContainer.NodeGroups;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;

namespace Content.Server.GameObjects.Components.Power
{
    public abstract class BaseNetConnectorComponent<TNetType> : Component
    {
        [ViewVariables(VVAccess.ReadWrite)]
        public Voltage Voltage { get => _voltage; set => SetVoltage(value); }
        private Voltage _voltage;

        [ViewVariables]
        public TNetType Net { get => _net; set => SetNet(value); }
        private TNetType _net;

        protected abstract TNetType NullNet { get; }

        [ViewVariables]
        private bool _needsNet = true;

        public override void OnAdd()
        {
            base.OnAdd();
            _net = NullNet;
        }

        public override void ExposeData(ObjectSerializer serializer)
        {
            base.ExposeData(serializer);
            serializer.DataField(ref _voltage, "voltage", Voltage.High);
        }

        public override void Initialize()
        {
            base.Initialize();
            if (_needsNet)
            {
                TryFindAndSetNet();
            }
        }

        public override void OnRemove()
        {
            ClearNet();
            base.OnRemove();
        }

        public void TryFindAndSetNet()
        {
            if (TryFindNet(out var net))
            {
                Net = net;
            }
        }

        public void ClearNet()
        {
            RemoveSelfFromNet(_net);
            _net = NullNet;
            _needsNet = true;
        }

        protected abstract void AddSelfToNet(TNetType net);

        protected abstract void RemoveSelfFromNet(TNetType net);

        private bool TryFindNet(out TNetType foundNet)
        {
            if (Owner.TryGetComponent<NodeContainerComponent>(out var container))
            {
                var compatibleNet = container.Nodes
                    .Where(node => node.NodeGroupID == (NodeGroupID) Voltage)
                    .Select(node => node.NodeGroup)
                    .OfType<TNetType>()
                    .FirstOrDefault();

                if (compatibleNet != null)
                {
                    foundNet = compatibleNet;
                    return true;
                }
            }
            foundNet = default;
            return false;
        }

        private void SetNet(TNetType newNet)
        {
            RemoveSelfFromNet(_net);
            AddSelfToNet(newNet);
            _net = newNet;
            _needsNet = false;
        }

        private void SetVoltage(Voltage newVoltage)
        {
            ClearNet();
            _voltage = newVoltage;
            TryFindAndSetNet();
        }
    }

    public enum Voltage
    {
        High = NodeGroupID.HVPower,
        Medium = NodeGroupID.MVPower,
        Apc = NodeGroupID.Apc,
    }
}


text:
package net

import (
	"errors"
	"os/exec"
	"strconv"
	"strings"

	"github.com/shirou/gopsutil/internal/common"
)

func IOCounters(pernic bool) ([]IOCountersStat, error) {
	netstat, err := exec.LookPath("/usr/bin/netstat")
	if err != nil {
		return nil, err
	}
	out, err := exec.Command(netstat, "-ibdnW").Output()
	if err != nil {
		return nil, err
	}

	lines := strings.Split(string(out), "\n")
	ret := make([]IOCountersStat, 0, len(lines)-1)
	exists := make([]string, 0, len(ret))

	for _, line := range lines {
		values := strings.Fields(line)
		if len(values) < 1 || values[0] == "Name" {
			continue
		}
		if common.StringsHas(exists, values[0]) {
			// skip if already get
			continue
		}
		exists = append(exists, values[0])

		if len(values) < 12 {
			continue
		}
		base := 1
		// sometimes Address is ommitted
		if len(values) < 13 {
			base = 0
		}

		parsed := make([]uint64, 0, 8)
		vv := []string{
			values[base+3],  // PacketsRecv
			values[base+4],  // Errin
			values[base+5],  // Dropin
			values[base+6],  // BytesRecvn
			values[base+7],  // PacketSent
			values[base+8],  // Errout
			values[base+9],  // BytesSent
			values[base+11], // Dropout
		}
		for _, target := range vv {
			if target == "-" {
				parsed = append(parsed, 0)
				continue
			}

			t, err := strconv.ParseUint(target, 10, 64)
			if err != nil {
				return nil, err
			}
			parsed = append(parsed, t)
		}

		n := IOCountersStat{
			Name:        values[0],
			PacketsRecv: parsed[0],
			Errin:       parsed[1],
			Dropin:      parsed[2],
			BytesRecv:   parsed[3],
			PacketsSent: parsed[4],
			Errout:      parsed[5],
			BytesSent:   parsed[6],
			Dropout:     parsed[7],
		}
		ret = append(ret, n)
	}

	if pernic == false {
		return getIOCountersAll(ret)
	}

	return ret, nil
}

// NetIOCountersByFile is an method which is added just a compatibility for linux.
func IOCountersByFile(pernic bool, filename string) ([]IOCountersStat, error) {
	return IOCounters(pernic)
}

func FilterCounters() ([]FilterStat, error) {
	return nil, errors.New("NetFilterCounters not implemented for freebsd")
}

// NetProtoCounters returns network statistics for the entire system
// If protocols is empty then all protocols are returned, otherwise
// just the protocols in the list are returned.
// Not Implemented for FreeBSD
func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) {
	return nil, errors.New("NetProtoCounters not implemented for freebsd")
}


text:
package netcaty.tcp.server

import java.net.InetSocketAddress
import io.netty.bootstrap.ServerBootstrap
import io.netty.channel.Channel
import io.netty.channel.nio.NioEventLoopGroup
import io.netty.channel.socket.nio.NioServerSocketChannel
import io.netty.handler.codec.http.{FullHttpRequest, FullHttpResponse}

import netcaty.tcp

/**
 * @param port 0 means random open port; call realPort after starting to get the real port
 */
class Server(ssl: Boolean, port: Int, responseLength: Int, handler: tcp.RequestHandler) {
  private var bossGroup:     NioEventLoopGroup = _
  private var workerGroup:   NioEventLoopGroup = _
  private var serverChannel: Channel           = _
  private var realPort:      Int               = _

  /** @return Port number */
  def start(stopAfterOneResponse: Boolean) = {
    bossGroup     = new NioEventLoopGroup(1)
    workerGroup   = new NioEventLoopGroup
    serverChannel = (new ServerBootstrap)
      .group(bossGroup, workerGroup)
      .channel(classOf[NioServerSocketChannel])
      .childHandler(new PipelineInitializer(ssl, this, responseLength, handler, stopAfterOneResponse))
      .bind(port)
      .sync()  // Wait for the port to be bound
      .channel
    realPort      = serverChannel.localAddress.asInstanceOf[InetSocketAddress].getPort
  }

  def getPort = realPort

  def stop() {
    serverChannel.close().sync()
    bossGroup.shutdownGracefully().sync()
    workerGroup.shutdownGracefully().sync()
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ambergleam.simplygps"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="15" />

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/GlassTheme" >
        <activity
            android:name="com.ambergleam.simplygps.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
	            <action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
	        </intent-filter>
	        <meta-data android:name="com.google.android.glass.VoiceTrigger"
	                   android:resource="@xml/voice_trigger" />
        </activity>
    </application>

</manifest>


text:
import {Injectable} from "@angular/core";
import {Column, HeaderColumnGroup} from "../common/shared";

@Injectable()
export class NumericFilterColumnHelper {

    public static MAX_INT_VALUE = 2147483647;

    isNumericFilterNotValid(filterValue: any, column: Column) {
        if(column.filterType === 'number' && filterValue != "") {
            if (isNaN(Number(filterValue))) {
                return true;
            }

            if(!column.filterAllowDecimals) {
                let valueParts = (filterValue + "").split(".");
                if (valueParts[1] && valueParts[1] != "") {
                    return true;
                }
            }

            if((column.filterNumericMaxValue != undefined ? filterValue > column.filterNumericMaxValue : false ) || filterValue > NumericFilterColumnHelper.MAX_INT_VALUE) {
                return true;
            }

            if((column.filterNumericMinValue != undefined ? filterValue < column.filterNumericMinValue : false) || filterValue < 0) {
                return true;
            }
        }
        return false;
    }

    changeColumnSortSetting(columnsDictionary, sortInitialSettings, globalSortingEnabled: boolean) {
        for(let prop in columnsDictionary) {
            if(!columnsDictionary.hasOwnProperty(prop)) {
                continue;
            }
            columnsDictionary[prop].sortable = globalSortingEnabled && sortInitialSettings[prop];
        }
    }

    changeHeaderColumnGroupSortSetting(headerColumnGroup: HeaderColumnGroup, sortInitialSettings, globalSortingEnabled: boolean) {
        headerColumnGroup.rows.forEach(row => {
            row.columns.forEach(column => {
                column.sortable = globalSortingEnabled && sortInitialSettings[column.field];
            });
        });
    }

    setFilterInputInHeaderColumnGroup(headerColumnGroup: HeaderColumnGroup, prop: string, filterInputNotValid: boolean) {
        headerColumnGroup.rows.forEach(row => {
            let columnFound = row.columns.find(column => column.field == prop);
            if(columnFound) {
                columnFound.isFilterInputNotValid = filterInputNotValid;
            }
        });
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.puremvc.as3.multicore.interfaces - API Documentation</title>
<base target="classFrame">
<link rel="stylesheet" href="../../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../../print.css" type="text/css" media="print">

Package org.puremvc.as3.multicore.interfaces

Interfaces

IAsyncCommand


text:
package aimax.osm.data;

import java.util.List;

import aimax.osm.data.entities.MapNode;
import aimax.osm.data.entities.MapWay;

/**
 * Provides different abstractions of a way for rendering.
 * @author Ruediger Lunde
 */
public interface WayNodeProvider {
	/**
	 * Returns a list of nodes describing the specified way which
	 * is suitable for the specified scale. Number of nodes will
	 * typically decrease with decreasing scale
	 * (e.g. 1/10 000 -> 80 nodes; 1/100 000 -> 10 nodes).
	 */
	public List<MapNode> getWayNodes(MapWay way, float scale);
}


text:
from distutils.core import setup

setup(name="ehp",
      version="2.0.1",
      py_modules=["ehp"],
      author="Iury O. G. Figueiredo",
      author_email="ioliveira@id.uff.br",
      url="",
      description="Parsing html/xml documents in a faster and easier way")


text:
const Discount = require('./discount-model.js');

// arguments = {
//   value,
//   growthRate,
//   discountRate,
//   terminalRate,
//   years
// }

const getIntrinsicValue = (arguments) => {
  return Discount.getIntrinsicValue(arguments);
};

module.exports = {
  getIntrinsicValue,
}


text:
/**
 * array_keys for phpjs
 */
function array_keys (input, searchValue, argStrict) { // eslint-disable-line camelcase
  //  discuss at: http://locutus.io/php/array_keys/
  // original by: Kevin van Zonneveld (http://kvz.io)
  //    input by: Brett Zamir (http://brett-zamir.me)
  //    input by: P
  // bugfixed by: Kevin van Zonneveld (http://kvz.io)
  // bugfixed by: Brett Zamir (http://brett-zamir.me)
  // improved by: jd
  // improved by: Brett Zamir (http://brett-zamir.me)
  //   example 1: array_keys( {firstname: 'Kevin', surname: 'van Zonneveld'} )
  //   returns 1: [ 'firstname', 'surname' ]
  var search = typeof searchValue !== 'undefined'
  var tmpArr = []
  var strict = !!argStrict
  var include = true
  var key = ''
  for (key in input) {
    if (input.hasOwnProperty(key)) {
      include = true
      if (search) {
        if (strict && input[key] !== searchValue) {
          include = false
        } else if (input[key] !== searchValue) {
          include = false
        }
      }
      if (include) {
        tmpArr[tmpArr.length] = key
      }
    }
  }
  return tmpArr
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
liquibase (Liquibase Core 3.5.3 API)
</TITLE>

<META NAME="date" CONTENT="2016-10-13">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

liquibase

Classes

CatalogAndSchema

ContextExpression

Contexts

LabelExpression

Labels

Liquibase

RuntimeEnvironment


text:
/* Include helper
 * This file will call a helper.
 * To call a helper, define the HELPER variable with the base name of the header to include, then include this file immediatly after.
 * For example, to use the helper scriptable_object_cpp.ih on renderable.xh :
 *
 *  #define HEADER renderable // Requirement of scriptable_object_cpp
 *  #define HELPER scriptable_object_cpp
 *  #include "include_helper.h"
 *
 */

#include "macros/macro_expansion.h"

#include "macros/def_variables.h"

#define HELPER_FILE HELPER_TO_FILENAME(HELPER)
#include HELPER_FILE
#undef HELPER_FILE
#undef HELPER

#include "macros/undef_variables.h"


text:
<?xml version="1.0" encoding="utf-8" ?>
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
     Name="CoreOnPremS2SWindowsCertStore"
     ProductID="{5dead01e-a91a-402d-aa03-35cf4251b5a8}"
     Version="1.0.0.0"
     SharePointMinVersion="15.0.0.0"
>
  <Properties>
    <Title>Core.OnPrem.S2S.WindowsCertStore</Title>
    <StartPage>~remoteAppUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
  </Properties>

  <AppPrincipal>
    <RemoteWebApplication ClientId="*" />
  </AppPrincipal>
</App>