text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-2.0-xr-w32-bld/build/toolkit/components/places/public/nsPIPlacesDatabase.idl
 */

#ifndef __gen_nsPIPlacesDatabase_h__
#define __gen_nsPIPlacesDatabase_h__

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class mozIStorageConnection; /* forward declaration */

class nsINavHistoryQuery; /* forward declaration */

class nsINavHistoryQueryOptions; /* forward declaration */

class mozIStorageStatementCallback; /* forward declaration */

class mozIStoragePendingStatement; /* forward declaration */

/* starting interface:    nsPIPlacesDatabase */
#define NS_PIPLACESDATABASE_IID_STR "6eb7ed3d-13ca-450b-b370-15c75e2f3dab"

#define NS_PIPLACESDATABASE_IID \
  {0x6eb7ed3d, 0x13ca, 0x450b, \
    { 0xb3, 0x70, 0x15, 0xc7, 0x5e, 0x2f, 0x3d, 0xab }}

/**
 * This is a private interface used by Places components to get access to the
 * database.  If outside consumers wish to use this, they should only read from
 * the database so they do not break any internal invariants.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsPIPlacesDatabase : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_PIPLACESDATABASE_IID)

  /**
   * The database connection used by Places.
   */
  /* readonly attribute mozIStorageConnection DBConnection; */
  NS_SCRIPTABLE NS_IMETHOD GetDBConnection(mozIStorageConnection **aDBConnection) = 0;

  /**
   * Asynchronously executes the statement created from queries.
   *
   * @see nsINavHistoryService::executeQueries
   * @note THIS IS A TEMPORARY API.  Don't rely on it, since it will be replaced
   *       in future versions by a real async querying API.
   * @note Results obtained from this method differ from results obtained from
   *       executeQueries, because there is additional filtering and sorting
   *       done by the latter.  Thus you should use executeQueries, unless you
   *       are absolutely sure that the returned results are fine for
   *       your use-case.
   */
  /* mozIStoragePendingStatement asyncExecuteLegacyQueries ([array, size_is (aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions aOptions, in mozIStorageStatementCallback aCallback); */
  NS_SCRIPTABLE NS_IMETHOD AsyncExecuteLegacyQueries(nsINavHistoryQuery **aQueries, PRUint32 aQueryCount, nsINavHistoryQueryOptions *aOptions, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement **_retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsPIPlacesDatabase, NS_PIPLACESDATABASE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSPIPLACESDATABASE \
  NS_SCRIPTABLE NS_IMETHOD GetDBConnection(mozIStorageConnection **aDBConnection); \
  NS_SCRIPTABLE NS_IMETHOD AsyncExecuteLegacyQueries(nsINavHistoryQuery **aQueries, PRUint32 aQueryCount, nsINavHistoryQueryOptions *aOptions, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement **_retval NS_OUTPARAM);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSPIPLACESDATABASE(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetDBConnection(mozIStorageConnection **aDBConnection) { return _to GetDBConnection(aDBConnection); } \
  NS_SCRIPTABLE NS_IMETHOD AsyncExecuteLegacyQueries(nsINavHistoryQuery **aQueries, PRUint32 aQueryCount, nsINavHistoryQueryOptions *aOptions, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement **_retval NS_OUTPARAM) { return _to AsyncExecuteLegacyQueries(aQueries, aQueryCount, aOptions, aCallback, _retval); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSPIPLACESDATABASE(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetDBConnection(mozIStorageConnection **aDBConnection) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDBConnection(aDBConnection); } \
  NS_SCRIPTABLE NS_IMETHOD AsyncExecuteLegacyQueries(nsINavHistoryQuery **aQueries, PRUint32 aQueryCount, nsINavHistoryQueryOptions *aOptions, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement **_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncExecuteLegacyQueries(aQueries, aQueryCount, aOptions, aCallback, _retval); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public nsPIPlacesDatabase
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSPIPLACESDATABASE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, nsPIPlacesDatabase)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* readonly attribute mozIStorageConnection DBConnection; */
NS_IMETHODIMP _MYCLASS_::GetDBConnection(mozIStorageConnection **aDBConnection)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* mozIStoragePendingStatement asyncExecuteLegacyQueries ([array, size_is (aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions aOptions, in mozIStorageStatementCallback aCallback); */
NS_IMETHODIMP _MYCLASS_::AsyncExecuteLegacyQueries(nsINavHistoryQuery **aQueries, PRUint32 aQueryCount, nsINavHistoryQueryOptions *aOptions, mozIStorageStatementCallback *aCallback, mozIStoragePendingStatement **_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsPIPlacesDatabase_h__ */

redpajama_set_name: RedPajamaGithub


text:
from __future__ import print_function

import dolo
import sys
from collections import OrderedDict

from PyQt4.uic import loadUiType
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import QSettings
from PyQt4.QtCore import pyqtSignal as Signal
from PyQt4.QtCore import pyqtSlot as Slot
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QTextBlockFormat, QTextCursor
from PyQt4.QtCore import QFile

QTextBlockFormat
from PyQt4 import uic
engine = 'pyqt'

app = QtGui.QApplication(sys.argv)
app.setOrganizationName('DynGUI')
app.setOrganizationName('Pablo')

def readWidget(filename):
    f = QFile(filename)
    f.open(QFile.ReadOnly)

    if engine == 'pyside':
        loader = QUiLoader()
        myWidget = loader.load(f, self)
    else:
        myWidget = uic.loadUi(f)
    f.close()

    return myWidget

def highlight_line(textedit, line_number, color=None):

    # format.clearBackGround(Qt.yellow)
    cursor = QTextCursor(textedit.document().findBlockByNumber(line_number))
    fmt = QTextBlockFormat()

    if color is None:
        fmt.clearBackground()
        return
    if color == 'blue':
        fmt.setBackground(Qt.blue)
    elif color == 'red':
        fmt.setBackground(Qt.red)
    elif color == 'green':
        fmt.setBackground(Qt.green)
    if color == 'yellow':
        fmt.setBackground(Qt.yellow)
    elif color == 'magenta':
        fmt.setBackground(Qt.magenta)
    elif color == 'cyan':
        fmt.setBackground(Qt.cyan)

    cursor.setBlockFormat(fmt)

class MainWindow(QtGui.QMainWindow):
#    def accept(self):h
#        print 'hello'
#        self.eql.add_equation()
    current_file = None

    def __init__(self):

        QtGui.QMainWindow.__init__(self)

        self.ui = readWidget("modfile_editor.ui")

        self.make_connections()
        self.ui.show()

        self.open_file( 'rbc_dynare.yaml'  )

    def make_connections(self):
        self.ui.pushButton_2.clicked.connect(lambda : self.check())
        self.ui.pushButton.clicked.connect(lambda : self.solve())
        self.ui.pushButton.setEnabled(True)
        self.ui.actionOpen.triggered.connect(lambda : self.open_file())
        self.ui.actionSave.triggered.connect(lambda : self.save_file())

    def check(self):

        try:
            self.read_model()
            self.ui.pushButton.setEnabled(True)

        except Exception as e:
            print("Error found when trying to check the model:")
            print(e.__class__)
            print(e)
            self.ui.pushButton.setEnabled(False)

    def read_model(self):

        # construct model from the fields in the GUI
        equations = self.read_equations()
        [variables, parameters, shocks] = self.read_symbols()
        calibration = self.read_calibration()
        covs = self.read_covariances()

        from dolo.compiler.model_symbolic import SymbolicModel
        from dolo.compiler.model_dynare import DynareModel

        symbols = OrderedDict(
            variables = variables,
            shocks = shocks,
            parameters = parameters
        )
        name = 'anonymous'
        infos = dict(name=name, type='dynare')
        smodel = SymbolicModel( name, 'dynare', symbols, equations, calibration,
                     symbolic_covariances=covs, symbolic_markov_chain=None,
                      options=None, definitions=None)

        dmodel = DynareModel(smodel, infos=infos)

        import numpy
        # highlight lines with non-zero residuals
        y = dmodel.calibration['variables']
        e = dmodel.calibration['shocks']
        p = dmodel.calibration['parameters']
        res = dmodel.functions['f_static'](y,p)

        # quickly get a list of non-empty lines
        eqlines = str(self.ui.textEdit_equations.toPlainText()).split('\n')
        nonempty = [ (True if len(e.split('#')[0].strip())>0 else False)  for e in eqlines]
        ln = -1
        for i in range(len(res)):
            ln = nonempty.index(True, ln+1) # line number corresponding to equation
            if abs(res[i])>1e-6:
                highlight_line(self.ui.textEdit_equations, ln, 'cyan')
            else:
                highlight_line(self.ui.textEdit_equations, ln)

        from dolo.algos.dynare.perturbations import solve_decision_rule
        try:
            dr = solve_decision_rule(dmodel, order=1)
        except:
            raise Exception("Model incorrectly specified")

        return dmodel

    def solve(self):

        from dolo.algos.dynare.perturbations import solve_decision_rule

        order = self.ui.comboBox_order.currentIndex() + 1
        horizon = self.ui.spinBox_horizon.value()
        dmodel = self.read_model()

        dr = solve_decision_rule(dmodel, order=order)

        from dolo.algos.dynare.simulations import stoch_simul
        stoch_simul(dr, horizon=horizon, plot=True)

    def read_equations(self):

        textedit = self.ui.textEdit_equations
        # construct model from the fields in the GUI
        txt = textedit.toPlainText()

        import ast

        lines = txt.split('\n')
        equations = []
        errors = []
        for i,l in enumerate(lines):
            # we skip blank lines
            l = str(l)
            l = str.split(l, '#')[0] # remove commen"ts"
            l = l.replace("^", "**")
            if len(l.strip()) > 0:
                equations.append(l)
                # parse error
                try:

                    expr = ast.parse(l.replace("=",'==')).body[0].value
                except Exception:
                    highlight_line(textedit,i,'yellow')
                    # let's highlight line i
        return equations

    def read_symbols(self):

        text_variables = self.ui.lineEdit_variables.text()
        text_parameters = self.ui.lineEdit_parameters.text()
        text_shocks = self.ui.lineEdit_shocks.text()

        try:
            variables = str(text_variables).split(',')
            variables = [e.strip() for e in variables]
        except:
            return None
        try:
            parameters = str(text_parameters).split(',')
            parameters = [e.strip() for e in parameters]
        except:
            return None
        try:
            shocks = str(text_shocks).split(',')
            shocks = [e.strip() for e in shocks]
        except:
            return None

        return [variables, parameters, shocks]

    def read_calibration(self):

        import ast

        [variables, parameters, shocks] = self.read_symbols()

        calib_text = self.ui.textEdit_calibration.toPlainText()
        lines = calib_text.split('\n')
        d = OrderedDict()
        errors = []
        for i,l in enumerate(lines):
            # we skip blank lines
            l = str(l)
            l = str.split(l, '#')[0] # remove comments
            if len(l.strip()) > 0:
                try:
                    lhs, rhs = l.split('=')
                    key = lhs.strip()
                    rhs = rhs.strip()
                    d[key] = rhs.replace('^','**').strip()
                    ast.parse(rhs) # try to parse lhs just in case
                except Exception as err:
                    highlight_line(self.ui.textEdit_calibration, i, 'yellow')
                    errors.append([i, err])
        for s in shocks:
            d[s] = 0
        return d

    def read_covariances(self):

        table = self.ui.tableWidget_covariances
        n = table.columnCount()
        it = table.item(0,0)
        vals = []  #numpy.zeros(n,n, dtype=object)
        for i in range(n):
            line = []
            for j in range(n):
                v = (table.item(i,j))
                if v is None:
                    v = 0
                else:
                    v = str(v.text())
                line.append(v)
            vals.append(line)
        return vals

    def write_covariances(self,covs):

        import numpy
        covs = numpy.array(covs,dtype=object)
        table = self.ui.tableWidget_covariances

        n = len(covs)
        # change size of table
        for i in range(n):
            for j in range(n):
                v = covs[i,j]
                cell = QtGui.QTableWidgetItem()
                cell.setText(str(covs[i,j]))
                table.setItem(i,j,cell)

    def open_file(self, filename=None):

        if filename==None:
            filename = QtGui.QFileDialog.getOpenFileName()
            filename = str(filename)

        import yaml
        with open(filename) as f:
            txt = f.read()

        d = yaml.load(txt)
        self.ui.lineEdit_variables.setText(str.join(', ', d['symbols']['variables']))
        self.ui.lineEdit_shocks.setText(str.join(', ', d['symbols']['shocks']))
        self.ui.lineEdit_parameters.setText(str.join(', ', d['symbols']['parameters']))

        self.ui.textEdit_equations.setPlainText ( str.join('\n\n', d['equations']) )

        calib_text = ""
        for k,v in d['calibration'].iteritems():
            calib_text += '{} = {}\n'.format(k,v)

        self.ui.textEdit_calibration.setPlainText(calib_text)

        covs = d['covariances']
        self.write_covariances(covs)

    #
    # def save_file(self,filename):
    #
    #     filename = QtGui.QFileDialog.getSaveFileName()

window = MainWindow()
sys.exit(app.exec_())


text:
Migration tool for non-RDBMS datastores. Support for different datastores
will be offered via plugin capability.

## Goals

To provide a way to:

* declaratively define schema *migrations*
* define *plan* which can be per environment
* detect *status* of *plan* for a *target*
* run *plan* of *migrations* against a *target*

## Terminology

* *Schema:* construct in a datastore providing structure for data, e.g. index
  with mappings in a search engine like ElasticSearch, table with columns and/or
  column families in HBase, etc.
* *Migration:* atomic unit of change
* *Plan:* sequence of migrations
* *Status:* report identifying what migrations have been applied and what are pending
* *Target:* specific datastore typically represented by a URL

## Motivations

Here are some of the reasons not to build the same kind of thing over and
over again for the main different datastores, search engines, message
brokers, etc that require some kind of "schema" (used loosely here).

First of all I think the activities for each of these different types of
stores is overwhelmingly similar from an infrastructure management
perspective.

Secondly separating out the plan from the migrations themselves provides
a way to solve the issue of having different needs in different environments.
Where *environment* might be customer installs for single tenant applications
or different sets of nodes for staging, profiling, preproduction, and
production in multi-tenant configurations.

At the time I started this project I wasn't aware of a tool that provided
such a model to help solve the problems I was seeing at work where we had
HBase, ElasticSearch, Redis, Kafka, etc. which all needed to have their
"schemas" managed upon deployment of new application code (sometimes). This
leaves the application not needing to handle the setup of, say, topics on
message brokers (e.g. Kafka, RabbitMQ, etc.) and keep their focus on the
application logic.

## Roadmap

This is a project basically at it's inception so there is a lot to do before
we get the first working version shipped. Namely:

Version 0.1 should have the ability to do the following:

* Provide Scala API to declaratively define migrations
* Provide Scala API to declaratively define plans
* Report status of a plan for the given target
* Run plan of migrations against a target
* Implement migration runner for HBase

Version 0.2 should have the following capabilities in addition to 0.1:

* Implement migration runner for ElasticSearch 0.9.x/1.x
* Provide Java-compatible API to define migrations
* Provide Java-compatible API to defined plans

TODO define next version milestones.

## Code Structure

I use a less common structure to my code than many Scala projects so here is
the code structure outline and explanation:

* **Types:** I use a _more_ functional style of coding in Scala and as a
  result start coding from _*closed*_ algebraic data types (usually sum,
  product, and recursive types), which define the basic elements of the
  domain. These traits (types) and corresponding case classes/objects (value
  constructors) can be found in the `Types` trait for namespacing. See below
  for description of namespace organization.
* **"Classes":**  this does not refer to OO classes but rather typeclass
  definitions. I have a trait named `Classes` which contains typeclass
  definitions used to extend our basic sum, product, and recursive data
  types. One such type I am using to extend my core `Action[A]` type is
  [`Group[A]`](https://github.com/mbbx6spp/dsmigrator/blob/master/src/main/scala/dsmigrator/classes.scala#L21-L36)
* **"Instances":** again this does not refer to "instances" of OO classes,
  rather this refers to implementations of typeclasses for specific types.
  In the trait named `Instances` you will find a number of implicits that
  can be mixed in to different contexts later the allows Scala to find
  the correct instance definition for a specific type of a typeclass based
  on the scope it is introduced. More specific scopes have higher precedence
  which means the default `dsmigrator` package instance definitions can be
  overridden in applicaation/client code at a higher level if necessary.
* **Functions:** I have a trait named `Functions`, which along side the
  interface to our core types and typeclasses provides the public API for
  the `dsmigrator` library/toolkit.
* **Namespacing:** You will note I am using traits for namespacing primitives
  that I then use to mixin to objects used for external package namespacing.
  View the code in [src/main/scala/dsmigrator/package.scala](https://github.com/mbbx6spp/dsmigrator/blob/master/src/main/scala/dsmigrator/package.scala)
  to see how the `dsmigrator.core` package is constructed from traits. You
  might also notice the following inline comments in the `Types` trait
  that hints at a minor issue with scalac supported my preferred `final case`
  style in [src/main/scala/dsmigrator/types.scala](https://github.com/mbbx6spp/dsmigrator/blob/master/src/main/scala/dsmigrator/types.scala#L5)

## FAQ

* **So the building blocks of my code are *closed*, how can we extend them?**
  Great question. Essentially the are only closed on construction, however,
  using ad-hoc polymorphism via Scala's powerful implicits feature we can
  extend these types _interfaces_. The benefit here is twofold. Firstly we
  have the ability to control how values of our basic types are constructed,
  which allows us to ensure they are constructed in valid forms only.
  Secondly we can still extend the effective interface of the types so
  we can use them in well-defined ways later without coupling the definition
  of the type with all the possible ways it can be used. This is contrary
  to mainstream OO techniques using interfaces that need to be "implemented"
  at time of type definition as opposed to later. Note: not all OO languages
  are this limited just the most used ones :(

## License

This software is licensed under the BSD 3-clause license. See LICENSE file
for more information.

## Author(s) / Maintainer(s)

So far just me, [Susan Potter](https://github.com/mbbx6spp).

## Contributor(s)

Coming soon. Submit a single patch and see your name in flashing lights here.
Or something.


text:
var express = require('express');
var Questions = require('../models/questions.js');
var bodyParser = require('body-parser');
var router = express.Router();

module.exports = router;

router.get('*', function (req, res) {
  Questions.getUnanswered(req.query.guest)
    .then(function (questions) {
      res.status(200).send(questions);
    });
});

router.post('/answer', function (req, res) {
  Questions.answer(req.body)
    .then(function (status) {
      res.status(201).send(status);
    });
});


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

    <title>Quote machine</title>

		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
		<link rel="stylesheet" href="css/styles.css">

Quote machine

<button id="quote-button" class="btn btn-primary btn-lg">Get a quote</button>


text:
package com.intellij.find.usages.api;

import com.intellij.util.Query;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import static org.jetbrains.annotations.Nls.Capitalization.Title;

final class NonConfigurableUsageHandler implements UsageHandler<@Nullable Void> {

  private final @NotNull UsageHandler.NonConfigurable myHandler;

  NonConfigurableUsageHandler(@NotNull UsageHandler.NonConfigurable handler) {
    myHandler = handler;
  }

  @Override
  public @Nullable Void getCustomOptions(@NotNull UsageAction action) {
    return null;
  }

  @Override
  public boolean hasAnythingToSearch(@Nullable Void customOptions) {
    return false;
  }

  @Override
  public @Nls(capitalization = Title) @NotNull String getSearchString(@NotNull UsageOptions options, @Nullable Void customOptions) {
    return myHandler.getSearchString(options);
  }

  @Override
  public @NotNull Query<? extends @NotNull Usage> buildSearchQuery(@NotNull UsageOptions options, @Nullable Void customOptions) {
    return myHandler.buildSearchQuery(options);
  }
}


text:
package com.google.common.eventbus;

/**
 * Handler for exceptions thrown by event subscribers.
 *
 * @since 16.0
 */
public interface SubscriberExceptionHandler {
  /**
   * Handles exceptions thrown by subscribers.
   */
  void handleException(Throwable exception, SubscriberExceptionContext context);
}


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

{% block title %} | Map{% end %}

{% block head %}
<meta http-equiv="Cache-control" content="no-cache">

{% end %}

{% block script %}

var USER = {
    {% if user %}
        id: {{ user['_id'] }},
        eid: {{ user['eid'] }},
        is_admin: {{ 'true' if user['admin'] else 'false' }},
        username: "{{ user['username'] }}"
    {% end %}
}

function start() {
    init_map();
    //get_entities();
    get_markers();
    init_ws();
}

function onkey(e, down) {
//    e.preventDefault();
    if (e.target.id == 'chat-input') {
        if (e.keyCode == 13 && down) {
            send();
        }
    } else {
        console.log('onKey', e, down);
    }
}

{% end %}

{% block body %}
{% if login_errors %}

  <button type="button" class="close" data-dismiss="alert">×</button>
  Error Logging in! Please, check your username and password and try again.
  Password is provided in the welcome message upon logging in to the server.

{% end %}

<input type="text" id="chat-input" onkeydown="onkey(event, true);" placeholder="Type here to send a message (Note: Prefix a message with a '*' to make a perminent post [logged in users only])">
<select id="userlist"></select>

{% end %}


text:
package org.elasticsearch.plugin.repository.gcs;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Collections;
import java.util.Map;

import com.google.api.client.auth.oauth2.TokenRequest;
import com.google.api.client.auth.oauth2.TokenResponse;
import com.google.api.client.googleapis.json.GoogleJsonError;
import com.google.api.client.http.GenericUrl;
import com.google.api.client.http.HttpHeaders;
import com.google.api.client.json.GenericJson;
import com.google.api.client.json.webtoken.JsonWebSignature;
import com.google.api.client.json.webtoken.JsonWebToken;
import com.google.api.client.util.ClassInfo;
import com.google.api.client.util.Data;
import com.google.api.services.storage.Storage;
import com.google.api.services.storage.model.Bucket;
import com.google.api.services.storage.model.Objects;
import com.google.api.services.storage.model.StorageObject;
import org.elasticsearch.SpecialPermission;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.env.Environment;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.plugins.RepositoryPlugin;
import org.elasticsearch.repositories.Repository;
import org.elasticsearch.repositories.gcs.GoogleCloudStorageRepository;
import org.elasticsearch.repositories.gcs.GoogleCloudStorageService;

public class GoogleCloudStoragePlugin extends Plugin implements RepositoryPlugin {

    public static final String NAME = "repository-gcs";

    static {
        /*
         * Google HTTP client changes access levels because its silly and we
         * can't allow that on any old stack stack so we pull it here, up front,
         * so we can cleanly check the permissions for it. Without this changing
         * the permission can fail if any part of core is on the stack because
         * our plugin permissions don't allow core to "reach through" plugins to
         * change the permission. Because that'd be silly.
         */
        SpecialPermission.check();
        AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
            // ClassInfo put in cache all the fields of a given class
            // that are annoted with @Key; at the same time it changes
            // the field access level using setAccessible(). Calling
            // them here put the ClassInfo in cache (they are never evicted)
            // before the SecurityManager is installed.
            ClassInfo.of(HttpHeaders.class, true);

            ClassInfo.of(JsonWebSignature.Header.class, false);
            ClassInfo.of(JsonWebToken.Payload.class, false);

            ClassInfo.of(TokenRequest.class, false);
            ClassInfo.of(TokenResponse.class, false);

            ClassInfo.of(GenericJson.class, false);
            ClassInfo.of(GenericUrl.class, false);

            Data.nullOf(GoogleJsonError.ErrorInfo.class);
            ClassInfo.of(GoogleJsonError.class, false);

            Data.nullOf(Bucket.Cors.class);
            ClassInfo.of(Bucket.class, false);
            ClassInfo.of(Bucket.Cors.class, false);
            ClassInfo.of(Bucket.Lifecycle.class, false);
            ClassInfo.of(Bucket.Logging.class, false);
            ClassInfo.of(Bucket.Owner.class, false);
            ClassInfo.of(Bucket.Versioning.class, false);
            ClassInfo.of(Bucket.Website.class, false);

            ClassInfo.of(StorageObject.class, false);
            ClassInfo.of(StorageObject.Owner.class, false);

            ClassInfo.of(Objects.class, false);

            ClassInfo.of(Storage.Buckets.Get.class, false);
            ClassInfo.of(Storage.Buckets.Insert.class, false);

            ClassInfo.of(Storage.Objects.Get.class, false);
            ClassInfo.of(Storage.Objects.Insert.class, false);
            ClassInfo.of(Storage.Objects.Delete.class, false);
            ClassInfo.of(Storage.Objects.Copy.class, false);
            ClassInfo.of(Storage.Objects.List.class, false);

            return null;
        });
    }

    // overridable for tests
    protected GoogleCloudStorageService createStorageService(Environment environment) {
        return new GoogleCloudStorageService.InternalGoogleCloudStorageService(environment);
    }

    @Override
    public Map<String, Repository.Factory> getRepositories(Environment env, NamedXContentRegistry namedXContentRegistry) {
        return Collections.singletonMap(GoogleCloudStorageRepository.TYPE,
            (metadata) -> new GoogleCloudStorageRepository(metadata, env, namedXContentRegistry, createStorageService(env)));
    }
}


text:
module.exports = function(router) {

	// ROUTES FOR OUR course API
	// =============================================================================

	var billing = require('../controllers/billing.controller');

	// on routes that end in /billing/:userID
	// ----------------------------------------------------
	router.route('/billing/get/:userID')

	 	// get the course with that id
		.get(billing.get);

	// on routes that end in /billing/:userID
	// ----------------------------------------------------
	router.route('/billing/pay')

	 	// get the course with that id
		.post(billing.pay);

};


text:
NAME=workshop
USERNAME=garyhai

RUNNING:=$(shell docker ps | grep $(NAME) | cut -f 1 -d ' ')
ALL:=$(shell docker ps -a | grep $(NAME) | cut -f 1 -d ' ')

all: build

build:
	docker build -t $(USERNAME)/$(NAME) .

run: clean
	docker run -itd --name $(NAME) $(USERNAME)/$(NAME)

# Removes existing containers.
clean:
ifneq ($(strip $(RUNNING)),)
	docker stop $(RUNNING)
endif
ifneq ($(strip $(ALL)),)
	docker rm $(ALL)
endif


text:
{{{
  "title": "Restore Server",
  "date": "02-27-2015",
  "author": "Bryan Friedman",
  "attachments": []
}}}

Restores a given archived server to a specified group. Calls to this operation must include a token acquired from the authentication endpoint. See the [Login API](../Authentication/login.md) for information on acquiring this token.

### When to Use It

Use this API operation when you want to restore a server that has been archived.

## URL

### Structure

    POST https://api.ctl.io/v2/servers/{accountAlias}/{serverId}/restore

### Example

    POST https://api.ctl.io/v2/servers/ACCT/WA1ACCTSERV0101/restore

## Request

### URI Parameters

| Name | Type | Description | Req. |
| --- | --- | --- | --- |
| AccountAlias | string | Short code for a particular account | Yes |
| ServerId | string | ID of the archived server to restore. Retrieved from query to containing group, or by looking at the URL when viewing a server in the Control Portal. | Yes |

### Content Properties

| Name | Type | Description | Req. |
| --- | --- | --- | --- |
| targetGroupId | string | The unique identifier of the target group to restore the server to. | Yes |

### Examples

#### JSON

    {
      "targetGroupId": "2a5c0b9662cf4fc8bf6180f139facdc0"
    }

## Response

The response is a link to the [Get Status](../Queue/get-status.md) operation so the asynchronous job can be tracked. Once successfully completed, the server will be restored as specified.

### Entity Definition

| Name |Type | Value | Description |
| --- | --- | --- | --- |
| rel | string | status | The link type |
| href | string | /v2/operations/[ALIAS]/status/[ID] | Address of the job in the queue |
| id | string | [ID] | The identifier of the job in queue. Can be passed to [Get Status](../Queue/get-status.md) call to retrieve status of job. |

### Examples

#### JSON

    {
      "rel":"status",
      "href":"/v2/operations/alias/status/wa1-12345",
      "id":"wa1-12345"
    }


text:
DROP VIEW IF EXISTS view_beban_barang4_awayan;

CREATE VIEW view_beban_barang4_awayan AS

SELECT
*,
beban * harga AS jumlah_harga

FROM
view_beban_barang3_awayan

WHERE
1 = 1  AND
beban > 0 AND
id_skpd = 34;

GRANT ALL PRIVILEGES ON view_beban_barang4_awayan TO lap_awayan;
REVOKE INSERT, UPDATE, DELETE ON view_beban_barang4_awayan FROM lap_awayan;


text:
namespace _10.Create_Custom_Class_Attribute
{
    public abstract class Gem
    {
        protected Gem(Clarity clarity, int strenght, int agility, int vitality)
        {
            this.clarity = clarity;
            this.Strength = strenght;
            this.Agility = agility;
            this.Vitality = vitality;
            this.SetClarity();
        }

        public Clarity clarity;

        public int Strength { get; set; }

        public int Agility { get; set; }

        public int Vitality { get; set; }

        private void SetClarity()
        {
            var statClarity = (int)clarity;
            this.Strength += statClarity;
            this.Agility += statClarity;
            this.Vitality += statClarity;
        }
    }
}


text:
//
//  SDLHapticRect.h
//  SmartDeviceLink-iOS
//
//  Created by Nicole on 8/3/17.
//  Copyright © 2017 smartdevicelink. All rights reserved.
//

#import <UIKit/UIKit.h>

#import "SDLRPCStruct.h"

@class SDLRectangle;

NS_ASSUME_NONNULL_BEGIN

/**
 Defines spatial for each user control object for video streaming application
 */
@interface SDLHapticRect : SDLRPCStruct

- (instancetype)initWithId:(UInt32)id rect:(SDLRectangle *)rect;

/**
 A user control spatial identifier

 Required, Integer, 0 - 2,000,000,000
 */
@property (strong, nonatomic) NSNumber<SDLUInt> *id;

/**
 The position of the haptic rectangle to be highlighted. The center of this rectangle will be "touched" when a press occurs.

 Required
 */
@property (strong, nonatomic) SDLRectangle *rect;

@end

NS_ASSUME_NONNULL_END


text:
using System;
using System.Collections;
using Assets.Plugins.Examples._2.Chat.Scripts.MessageTypes;
using UnityEngine;
using UnityEngine.UI;
using Wake;
using Wake.Protocol.Proxy;

public class ChatClient : MonoBehaviour
{
    [Header("Settings")]
    [SerializeField] private string _serverHost = "127.0.0.1";
    [SerializeField] private int _serverPort = 9999;

    [Header("View")]
    public Text ClientLabel;
    public Transform MessagesRoot;
    public GameObject MessagePrefab;
    public InputField Input;
    public Button SendButton;

    private WakeClient _client;
    private Proxy<ChatMessagePacket, ChatMessagePacket> _proxy;
    private ProxyReceiver<ServerIdentityPacket> _identity;

    private int _clientId;

	IEnumerator Start ()
	{
	    while (!WakeNet.Initialized)
	    {
	        yield return new WaitForEndOfFrame();
	    }

	    SendButton.interactable = false;

	    _client = WakeNet.CreateClient();
	    _proxy = _client.AddProxy<ChatMessagePacket, ChatMessagePacket>("msg", 0, true);
	    _identity = _client.AddProxyReceiver<ServerIdentityPacket>("sid", 0, false);

	    _identity.Received += OnIdentityReceived;
	    _proxy.Received += OnMessageReceived;

        _client.Connect(_serverHost, _serverPort);
	    _client.Connected += OnClientConnected;
	}

    private void OnClientConnected()
    {
        SendButton.interactable = true;
        SendButton.onClick.AddListener(() =>
        {
            if (!string.IsNullOrEmpty(Input.text))
            {
                _proxy.Send(new ChatMessagePacket($"User №{_clientId}", Input.text));
            }
        });
    }

    private void OnIdentityReceived(ServerIdentityPacket message, int connectionid)
    {
        _clientId = message.Data;
        ClientLabel.text = "Wake Chat Client №" + _clientId;
    }

    private void OnMessageReceived(ChatMessagePacket message, int connectionid)
    {
        var messageGO = Instantiate(MessagePrefab, MessagesRoot, false);
        messageGO.GetComponent<Text>().text = $"[{DateTime.Now:t}] ({message.Sender}) : {message.Data}";
        messageGO.SetActive(true);
    }
}


text:
drop table if exists account;
drop table if exists preference;
drop table if exists bib;
drop table if exists revision;
drop table if exists exlibris;
drop table if exists publicity;
drop table if exists review;
drop table if exists quotation;
drop table if exists occurrence;
drop table if exists correction;
drop table if exists report;
drop table if exists report_history;
drop table if exists acknowledgement;
drop table if exists agreement;
drop table if exists draft;
drop table if exists notification;

create table account (
  id int not null auto_increment,
  nick varchar(32) not null unique,
  name varchar(256) not null,
  password varchar(256) not null,
  mail_address varchar(256) not null,
  url varchar(1024) not null,
  hash_algorithm varchar(8) not null,
  hash_key varchar(64) not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table preference (
  id int not null auto_increment,
  account_id int not null,
  gravatar tinyint not null,
  report_format varchar(8) not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table bib (
  id int not null auto_increment,
  uuid varchar(256) not null unique,
  title text not null,
  isbn13 varchar(13),
  isbn10 varchar(10),
  image varchar(256),
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table revision (
  id int not null auto_increment,
  bib_id int not null,
  name varchar(256) not null,
  revised_at datetime,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table exlibris (
  id int not null auto_increment,
  account_id int not null,
  revision_id int not null,
  position int not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table publicity (
  id int not null auto_increment,
  exlibris_id int not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table review (
  id int not null auto_increment,
  exlibris_id int not null,
  body text not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table quotation (
  id int not null auto_increment,
  revision_id int not null,
  body text not null,
  font_face varchar(32) not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table occurrence (
  id int not null auto_increment,
  quotation_id int not null,
  page varchar(256),
  position varchar(256),
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table correction (
  id int not null auto_increment,
  quotation_id int not null,
  body text not null,
  font_face varchar(32) not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table report (
  id int not null auto_increment,
  uuid varchar(256) not null unique,
  account_id int not null,
  revision_id int not null,
  subject varchar(256) not null,
  quotation_id int not null,
  occurrence_id int not null,
  correction_id int,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table report_history (
  id int not null auto_increment,
  uuid varchar(256) not null,
  account_id int not null,
  revision_id int not null,
  subject varchar(256) not null,
  quotation_id int not null,
  occurrence_id int not null,
  correction_id int,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table acknowledgement (
  id int not null auto_increment,
  account_id int not null,
  quotation_id int,
  sign varchar(8) not null,
  comment text not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table agreement (
  id int not null auto_increment,
  account_id int not null,
  correction_id int not null,
  comment text not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table draft (
  id int not null auto_increment,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;
create table notification (
  id int not null auto_increment,
  account_id int not null,
  category varchar(64) not null,
  subject varchar(256) not null,
  body varchar(256) not null,
  path varchar(256) not null,
  fragment varchar(256) not null,
  created_at datetime,
  updated_at datetime,
  primary key (id)
) default charset=utf8;


text:
<?php

use Arnovr\OwncloudProvisioning\ApiConnection;
use Arnovr\OwncloudProvisioning\ProvisioningClient;
use Arnovr\OwncloudProvisioning\ResponseParser\XMLResponseParser;
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;

class ProvisioningClientCreator
{
    public static function createProvisioningClient(HandlerStack $handler)
    {
        $guzzleClient = new Client(['handler' => $handler]);

        return new ProvisioningClient(
            new ApiConnection(
                $guzzleClient,
                'http://owncloud.url'
            ),
            new XMLResponseParser()
        );
    }
}


text:
// Copyright 2012 Google Inc.
//
// 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.

goog.require('axs.AuditResults');
goog.require('axs.AuditRules');
goog.require('axs.utils');

goog.provide('axs.Audit');
goog.provide('axs.AuditConfiguration');

/**
 * Object to hold configuration for an Audit run.
 * @constructor
 */
axs.AuditConfiguration = function() {
    /**
     * Dictionary of { audit rule name : { rules } } where rules is a dictionary
     * of { rule type : value }.
     * Possible rule types:
     * - ignore: value is a list of CSS selectors representing parts of the page
     *           which can be ignored for this audit rule.
     * - config: value is an object containing configuration for this audit
     *           rule. It will be passed to the test() method.
     * @type {Object}
     * @private
     */
    this.rules_ = {};

    /**
     * The "start point" for the audit: the element which contains the portion of
     * the page which should be audited.
     * If null, the document will be used as the scope.
     * @type {?Element}
     */
    this.scope = null;

    /**
     * A list of rule names representing the audit rules to be run. If this is
     * empty or |null|, all audit rules will be run.
     * @type {Array.<String>}
     */
    this.auditRulesToRun = null;

    /**
     * A list of rule names representing the audit rules which should not be run.
     * If this is empty or |null|, all audit rules will be run.
     * @type {Array.<String>}
     */
    this.auditRulesToIgnore = null;

    /**
     * The maximum number of results to collect for each audit rule. If more
     * than this number of results is found, 'resultsTruncated' is set to true
     * in the result object. If this is null, all results will be returned.
     */
    this.maxResults = null;

    /**
     * Whether this audit run can use the console API.
     * @type {boolean}
     */
    this.withConsoleApi = false;

    /**
     * Do we want to show a warning that there are audit rules which are not supported in this configuration?
     * @type {boolean}
     */
    this.showUnsupportedRulesWarning = true;

    goog.exportProperty(this, 'scope', this.scope);
    goog.exportProperty(this, 'auditRulesToRun', this.auditRulesToRun);
    goog.exportProperty(this, 'auditRulesToIgnore', this.auditRulesToIgnore);
    goog.exportProperty(this, 'withConsoleApi', this.withConsoleApi);
    goog.exportProperty(this, 'showUnsupportedRulesWarning', this.showUnsupportedRulesWarning );
};
goog.exportSymbol('axs.AuditConfiguration', axs.AuditConfiguration);

axs.AuditConfiguration.prototype = {
    /**
     * Add the given selectors to the ignore list for the given audit rule.
     * @param {string} auditRuleName The name of the audit rule
     * @param {Array.<string>} selectors Query selectors to match nodes to
     *     ignore
     */
    ignoreSelectors: function(auditRuleName, selectors) {
        if (!(auditRuleName in this.rules_))
            this.rules_[auditRuleName] = {};
        if (!('ignore' in this.rules_[auditRuleName]))
            this.rules_[auditRuleName].ignore = [];
        Array.prototype.push.call(this.rules_[auditRuleName].ignore, selectors);
    },

    /**
     * Gets the selectors which have been added to the ignore list for the given
     * audit rule.
     * @param {string} auditRuleName The name of the audit rule
     * @return {Array.<string>} A list of query selector strings which match nodes
     * to be ignored for the given rule.
     */
    getIgnoreSelectors: function(auditRuleName) {
        if ((auditRuleName in this.rules_) &&
            ('ignore' in this.rules_[auditRuleName])) {
            return this.rules_[auditRuleName].ignore;
        }
        return [];
    },

    /**
     * Sets the user-specified severity for the given audit rule. This will
     * replace the default severity for that audit rule in the audit results.
     * @param {string} auditRuleName
     * @param {axs.constants.Severity} severity
     */
    setSeverity: function(auditRuleName, severity) {
        if (!(auditRuleName in this.rules_))
            this.rules_[auditRuleName] = {};
        this.rules_[auditRuleName].severity = severity;
    },

    getSeverity: function(auditRuleName) {
        if (!(auditRuleName in this.rules_))
            return null;
        if (!('severity' in this.rules_[auditRuleName]))
            return null
        return this.rules_[auditRuleName].severity;
    },

    /**
     * Sets the user-specified configuration for the given audit rule. This will
     * vary in structure from rule to rule; see individual rules for
     * configuration options.
     * @param {string} auditRuleName
     * @param {Object} config
     */
    setRuleConfig: function(auditRuleName, config) {
        if (!(auditRuleName in this.rules_))
            this.rules_[auditRuleName] = {};
        this.rules_[auditRuleName].config = config;
    },

    /**
     * Gets the user-specified configuration for the given audit rule.
     * @param {string} auditRuleName
     * @return {Object?} The configuration object for the given audit rule.
     */
    getRuleConfig: function(auditRuleName) {
        if (!(auditRuleName in this.rules_))
            return null;
        if (!('config' in this.rules_[auditRuleName]))
            return null;
        return this.rules_[auditRuleName].config;
    }
};
goog.exportProperty(axs.AuditConfiguration.prototype, 'ignoreSelectors',
                    axs.AuditConfiguration.prototype.ignoreSelectors);
goog.exportProperty(axs.AuditConfiguration.prototype, 'getIgnoreSelectors',
                    axs.AuditConfiguration.prototype.getIgnoreSelectors);

axs.Audit.unsupportedRulesWarningShown = false;

/**
 * Returns the rules that cannot run.
 * For example, if the current configuration requires the console API, these
 * consist of the rules that require it.
 * @param {axs.AuditConfiguration=} opt_configuration
 * @return {Array.<String>}  A list of rules that cannot be run
 */
axs.Audit.getRulesCannotRun = function(opt_configuration) {
    if(opt_configuration.withConsoleApi) {
        return [];
    }
    return Object.keys(axs.AuditRule.specs)
        .filter(function(key) {
            return axs.AuditRules.getRule(key).requiresConsoleAPI;
        })
        .map(function(key) {
            return axs.AuditRules.getRule(key).code;
        });
}

/**
 * Runs an audit with all of the audit rules.
 * @param {axs.AuditConfiguration=} opt_configuration
 * @return {Array.<Object>} Array of Object:
 *     {
 *       result,    // @type {axs.constants.AuditResult}
 *       elements,  // @type {Array.<Element>}
 *       rule       // @type {axs.AuditRule} - data only (name, severity, code)
 *     }
 */
axs.Audit.run = function(opt_configuration) {
    var configuration = opt_configuration || new axs.AuditConfiguration();
    var withConsoleApi = configuration.withConsoleApi;
    var results = [];

    var auditRules;
    if (configuration.auditRulesToRun &&
        configuration.auditRulesToRun.length > 0) {
        auditRules = configuration.auditRulesToRun;
    } else
        auditRules = Object.keys(axs.AuditRule.specs);

    if (configuration.auditRulesToIgnore) {
        for (var i = 0; i < configuration.auditRulesToIgnore.length; i++) {
            var auditRuleToIgnore = configuration.auditRulesToIgnore[i];
            if (auditRules.indexOf(auditRuleToIgnore) < 0)
                continue;
            auditRules.splice(auditRules.indexOf(auditRuleToIgnore), 1);
        }
    }

    if(!axs.Audit.unsupportedRulesWarningShown && configuration.showUnsupportedRulesWarning) {
        var unsupportedRules = axs.Audit.getRulesCannotRun(configuration);
        if(unsupportedRules.length > 0) {
            console.warn("Some rules cannot be checked using the axs.Audit.run() method call. Use the Chrome plugin to check these rules: " + unsupportedRules.join(", "));
            console.warn("To remove this message, pass an AuditConfiguration object to axs.Audit.run() and set configuration.showUnsupportedRulesWarning = false.");
        }

        axs.Audit.unsupportedRulesWarningShown = true;
    }

    for (var i = 0; i < auditRules.length; i++) {
        var auditRuleName = auditRules[i];
        var auditRule = axs.AuditRules.getRule(auditRuleName);
        if (!auditRule)
            continue; // Shouldn't happen, but fail silently if it does.
        if (auditRule.disabled)
            continue;
        if (!withConsoleApi && auditRule.requiresConsoleAPI)
            continue;

        var options = {};
        var ignoreSelectors = configuration.getIgnoreSelectors(auditRule.name);
        if (ignoreSelectors.length > 0 || configuration.scope)
            options['ignoreSelectors'] = ignoreSelectors;
        var ruleConfig = configuration.getRuleConfig(auditRule.name);
        if (ruleConfig != null)
            options['config' ] = ruleConfig;
        if (configuration.scope)
            options['scope'] = configuration.scope;
        if (configuration.maxResults)
            options['maxResults'] = configuration.maxResults;
        var result = auditRule.run.call(auditRule, options);
        var ruleValues = axs.utils.namedValues(auditRule);
        ruleValues.severity = configuration.getSeverity(auditRuleName) ||
                              ruleValues.severity;
        result.rule = ruleValues;
        results.push(result);
    }

    return results;
};
goog.exportSymbol('axs.Audit.run', axs.Audit.run);

/**
 * Create an AuditResults object citing failures and warnings, for use in
 * continuous builds.
 * @param {Array.<Object>} results The results returned from the audit run.
 * @return  {axs.AuditResults} a report of the audit results.
 */
axs.Audit.auditResults = function(results) {
    var auditResults = new axs.AuditResults();
    for (var i = 0; i < results.length; i++) {
        var result = results[i];
        if (result.result != axs.constants.AuditResult.FAIL)
            continue;

        if (result.rule.severity == axs.constants.Severity.SEVERE) {
            auditResults.addError(
                axs.Audit.accessibilityErrorMessage(result));
        } else {
            auditResults.addWarning(
                axs.Audit.accessibilityErrorMessage(result));
        }
    }
    return auditResults;
};
goog.exportSymbol('axs.Audit.auditResults', axs.Audit.auditResults);

/**
 * Create a report based on the results of an Audit.
 * @param {Array.<Object>} results The results returned from axs.Audit.run();
 * @param {?string} opt_url A URL to visit for more information.
 * @return {string} A report of the audit results.
 */
axs.Audit.createReport = function(results, opt_url) {
    var message = '*** Begin accessibility audit results ***';
    message += '\nAn accessibility audit found ';

    message += axs.Audit.auditResults(results).toString();

    if (opt_url) {
        message += '\nFor more information, please see ' ;
        message += opt_url;
    }

    message += '\n*** End accessibility audit results ***';
    return message;
};
goog.exportSymbol('axs.Audit.createReport', axs.Audit.createReport);

/**
 * Creates an error message for a given accessibility audit result object.
 * @param {Object.<string, (string|Array.<Element>)>} result The result
 *     object returned from the audit.
 * @return {string} An error message describing the failure and listing the
 *     query selectors for up to five elements which failed the audit rule.
 */
axs.Audit.accessibilityErrorMessage = function(result) {
    if (result.rule.severity == axs.constants.Severity.SEVERE)
        var message = 'Error: '
    else
        var message = 'Warning: '
    message += result.rule.code + ' (' + result.rule.heading +
        ') failed on the following ' +
        (result.elements.length == 1 ? 'element' : 'elements');

    if (result.elements.length == 1)
        message += ':'
    else {
        message += ' (1 - ' + Math.min(5, result.elements.length) +
                   ' of ' + result.elements.length + '):';
    }

    var maxElements = Math.min(result.elements.length, 5);
    for (var i = 0; i < maxElements; i++) {
        var element = result.elements[i];
        message += '\n';
        // Get query selector not browser independent. catch any errors and
        // default to simple tagName.
        try {
            message += axs.utils.getQuerySelectorText(element);
        } catch (err) {
            message += ' tagName:' + element.tagName;
            message += ' id:' + element.id;
        }
    }
    if (result.rule.url != '')
        message += '\nSee ' + result.rule.url + ' for more information.';
    return message;
};
goog.exportSymbol('axs.Audit.accessibilityErrorMessage', axs.Audit.accessibilityErrorMessage);


text:
To load the sample data, open the app once so that the config.json file is created. Then close the app. Copy the SampleData.xml file to the data folder. Change the file path in the config.json file to data/SampleData.xml. Start up the app again and the sample data will be loaded.

**result:** The task list is loaded.

## Help command

1. Type `help`

**result:** A new window appears with a cheatsheet for the commands, FAQ and shortcuts. Please exit after opening by clicking the X at the top.

## Add command

### Add floating task

1. Type `add buy milk`

**results:** Floating task with name "buy milk" is added and the main list goes to the new task added.

### Add a start time task

1. Type `add meeting with Jim from tmr 8pm`

**results:** Start time task with name "meeting with Jim" is added for the next day at 8pm and jumps to the task added.

2. Type `add buy apples at 7aaam`

**results:** Error message "Invalid Time!"

### Add a deadline task

1. Type `add submit essay by 2359`

**results:** Deadline with name "submit essay" is added by 11:59pm today.

2. Type `add dinner date with bob by 7pm 30/2/17`

**results:** Error message: "The date provided is invalid."

3. Type `add finish assignment by 2359`

**results:** WARNING! This task clashes with one of the tasks in ForgetMeNot. Type undo if you want to undo the previous add.
However, the task is added in ForgetMeNot with name "finish assignment" by 11:59pm today

### Add an event task

1. Type `add movie with Jane \\at Vivo from sunday 1pm to sunday 3pm`

**results:** Event with name "movie with Jane at Vivo" is added on the next Sunday 1pm to 3pm and jumps to the task added.

2. Type `add movie with John from 4:30pm to 3pm`

**results:** Error message: "Sorry! Your start time cannot be after your end time" is displayed

### Add a recurring task

1. Type `add play basketball with Jim at tuesday 2pm every week`

**results:** Task with name "play basketball with Jim" is added 10 times for 10 tuesdays, with the recurrence displayed on the task card.

2. Type `add Japanese lesson at saturday night 7pm every 2 weeks x4`

**results:** Task with name "Japanese lesson" is added 4 times for saturday at 7pm every 2 weeks.

3. Type `add Chinese lesson at sunday 3pm every two days`

**results:** Error message: "Sorry! Your recurrence format was invalid! Please try again.

## Edit Command

### Edit Name

1. Type `edit 3 collect new iPhone 7 plus`

**results:** Success message shown for edited task. Name of task index 3 changed to "collect new iPhone 7 plus"

2. Type `edit 100 by tmr`

**results:** Error message: "Sorry! The task index provided is invalid."

### Edit Start Time

1. Type `edit 2 at tmr 6pm`

**results:** Success message shown for edited task. Task indexed 2 start timing changed to 6pm tomorrow (depending on the current day, it may vary).

### Edit End Time

1. Type `edit 14 by 2359 three days later`

 **results:** Success message shown for edited task. Task indexed 14 end timing changed to 11:59pm three days from current day.

### Edit both start and end time

1. Type `edit 29 from 8pm 15/11/16 to 9pm 15/11/16`

**results:** Success message shown for edited task. Task indexed 29 has its start timing and end timing changed to the Nov 15, 2016, 08:00 PM and Nov 15, 2016, 09:00 PM respectively.

2. Type `edit 25 from 7pm to 6pm`

**results:** Error message: "Sorry! Your start time cannot be after the end time"

### Edit name, start time and end time

1. Type `edit 1 Buy milk from 5pm 15/01/17 to 6pm 15/01/17`

**results:** Success message shown for edited task. Task indexed 3o has its name, start timing and end timing changed to Jan 15, 2017, 05:00 PM and Jan 15, 2016, 06:00 PM respectively.

## Done task

1. Type `done 3`

**results:** Task that was indexed 3 is removed from the current list. Feedback shows the task that has been done.

2. Type `done 400`

**results:** Error message: "Sorry! The task index provided is invalid."

## Show

### Show done

1. Type `show done`

**results:** All done tasks are shown.

### Show undone

1. Type `show`

**results:**  All undone tasks are shown.

### Show floating

1. Type `show floating`

**results:** All floating tasks are shown.

### Show overdue

1. Type `show overdue`

**results:** All overdue tasks are shown.

### Show date

1. Type `show 7 dec`

**results:** Task "gym with Jim" will be shown.

### Show special days

1. Type `show 5 days later`

**results:** Tasks that are happening five days later will be shown.

1. Type `show xmas eve`

**results:** Tasks on Dec 24 2016 will be shown.

## Undone task

1. Type `show done`

**results:** Tasks that are done will be shown.

2. Type `undone 1`

**result:** Tasks that was indexed 1 will be removed from the currently list. Feedback shows that task has been undone.

## Find tasks

1. Type `find jim`

**results:** Tasks with the task name `jim` will appear on the list. Feedback shows the number of tasks listed.

2. Type `find jim pokemon`

**results:** Tasks with either the name `jim` or `pokemon` will show

## Delete tasks

1. Type `show`

**results:**  All undone tasks are shown.

1. Type `delete 4`

**results:** Task that was indexed 4 will be deleted and removed from the current list.

## Undo tasks

1. Type `delete 2`
2. Type `undo`

**results:** Task that was previously deleted will be undone and reappear on the list.

## Redo tasks

1. Type `delete 1`
2. Type `undo`
3. Type `redo`

**results:** Task that was brought back by the undo will be deleted away again after redo command.

## Command history

1. Press up key

**results:** `redo` will appear in the command line.

## Auto-complete

1. Type `f`
2. Press spacebar

**results:** Find command will be auto-completed and appear in the command line.

## Clear done tasks

1. Type `show done`

**results:** Tasks that are done will be shown.

2. Type `clear done`

**results:** All tasks that were marked as done will be deleted and removed from the list.

## Clear tasks

1. Type `Clear`

**results:** All tasks will be deleted and removed from ForgetMeNot.

## Set storage

1. Type `setstorage data\newfile.xml\`

**results:** Feedback shows user that storage location is changed to the new location and prompt user to make a change to ForgetMeNot to save the data.

2. Type `add watch cartoon`

**results:** Floating task with name "watch cartoon" is added and the main list goes to the new task added.

##

1. Type `exit`

**results:** Exits ForgetMeNot


text:
#pragma once
#include <aws/frauddetector/FraudDetector_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace FraudDetector
{
namespace Model
{

  /**
   *
Data about the stored events.

See Also:
   AWS
   * API Reference

   */
  class AWS_FRAUDDETECTOR_API IngestedEventStatistics
  {
  public:
    IngestedEventStatistics();
    IngestedEventStatistics(Aws::Utils::Json::JsonView jsonValue);
    IngestedEventStatistics& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The number of stored events.

     */
    inline long long GetNumberOfEvents() const{ return m_numberOfEvents; }

    /**
     *
The number of stored events.

     */
    inline bool NumberOfEventsHasBeenSet() const { return m_numberOfEventsHasBeenSet; }

    /**
     *
The number of stored events.

     */
    inline void SetNumberOfEvents(long long value) { m_numberOfEventsHasBeenSet = true; m_numberOfEvents = value; }

    /**
     *
The number of stored events.

     */
    inline IngestedEventStatistics& WithNumberOfEvents(long long value) { SetNumberOfEvents(value); return *this;}

    /**
     *
The total size of the stored events.

     */
    inline long long GetEventDataSizeInBytes() const{ return m_eventDataSizeInBytes; }

    /**
     *
The total size of the stored events.

     */
    inline bool EventDataSizeInBytesHasBeenSet() const { return m_eventDataSizeInBytesHasBeenSet; }

    /**
     *
The total size of the stored events.

     */
    inline void SetEventDataSizeInBytes(long long value) { m_eventDataSizeInBytesHasBeenSet = true; m_eventDataSizeInBytes = value; }

    /**
     *
The total size of the stored events.

     */
    inline IngestedEventStatistics& WithEventDataSizeInBytes(long long value) { SetEventDataSizeInBytes(value); return *this;}

    /**
     *
The oldest stored event.

     */
    inline const Aws::String& GetLeastRecentEvent() const{ return m_leastRecentEvent; }

    /**
     *
The oldest stored event.

     */
    inline bool LeastRecentEventHasBeenSet() const { return m_leastRecentEventHasBeenSet; }

    /**
     *
The oldest stored event.

     */
    inline void SetLeastRecentEvent(const Aws::String& value) { m_leastRecentEventHasBeenSet = true; m_leastRecentEvent = value; }

    /**
     *
The oldest stored event.

     */
    inline void SetLeastRecentEvent(Aws::String&& value) { m_leastRecentEventHasBeenSet = true; m_leastRecentEvent = std::move(value); }

    /**
     *
The oldest stored event.

     */
    inline void SetLeastRecentEvent(const char* value) { m_leastRecentEventHasBeenSet = true; m_leastRecentEvent.assign(value); }

    /**
     *
The oldest stored event.

     */
    inline IngestedEventStatistics& WithLeastRecentEvent(const Aws::String& value) { SetLeastRecentEvent(value); return *this;}

    /**
     *
The oldest stored event.

     */
    inline IngestedEventStatistics& WithLeastRecentEvent(Aws::String&& value) { SetLeastRecentEvent(std::move(value)); return *this;}

    /**
     *
The oldest stored event.

     */
    inline IngestedEventStatistics& WithLeastRecentEvent(const char* value) { SetLeastRecentEvent(value); return *this;}

    /**
     *
The newest stored event.

     */
    inline const Aws::String& GetMostRecentEvent() const{ return m_mostRecentEvent; }

    /**
     *
The newest stored event.

     */
    inline bool MostRecentEventHasBeenSet() const { return m_mostRecentEventHasBeenSet; }

    /**
     *
The newest stored event.

     */
    inline void SetMostRecentEvent(const Aws::String& value) { m_mostRecentEventHasBeenSet = true; m_mostRecentEvent = value; }

    /**
     *
The newest stored event.

     */
    inline void SetMostRecentEvent(Aws::String&& value) { m_mostRecentEventHasBeenSet = true; m_mostRecentEvent = std::move(value); }

    /**
     *
The newest stored event.

     */
    inline void SetMostRecentEvent(const char* value) { m_mostRecentEventHasBeenSet = true; m_mostRecentEvent.assign(value); }

    /**
     *
The newest stored event.

     */
    inline IngestedEventStatistics& WithMostRecentEvent(const Aws::String& value) { SetMostRecentEvent(value); return *this;}

    /**
     *
The newest stored event.

     */
    inline IngestedEventStatistics& WithMostRecentEvent(Aws::String&& value) { SetMostRecentEvent(std::move(value)); return *this;}

    /**
     *
The newest stored event.

     */
    inline IngestedEventStatistics& WithMostRecentEvent(const char* value) { SetMostRecentEvent(value); return *this;}

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline const Aws::String& GetLastUpdatedTime() const{ return m_lastUpdatedTime; }

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline void SetLastUpdatedTime(const Aws::String& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; }

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline void SetLastUpdatedTime(Aws::String&& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = std::move(value); }

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline void SetLastUpdatedTime(const char* value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime.assign(value); }

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline IngestedEventStatistics& WithLastUpdatedTime(const Aws::String& value) { SetLastUpdatedTime(value); return *this;}

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline IngestedEventStatistics& WithLastUpdatedTime(Aws::String&& value) { SetLastUpdatedTime(std::move(value)); return *this;}

    /**
     *
Timestamp of when the stored event was last updated.

     */
    inline IngestedEventStatistics& WithLastUpdatedTime(const char* value) { SetLastUpdatedTime(value); return *this;}

  private:

    long long m_numberOfEvents;
    bool m_numberOfEventsHasBeenSet;

    long long m_eventDataSizeInBytes;
    bool m_eventDataSizeInBytesHasBeenSet;

    Aws::String m_leastRecentEvent;
    bool m_leastRecentEventHasBeenSet;

    Aws::String m_mostRecentEvent;
    bool m_mostRecentEventHasBeenSet;

    Aws::String m_lastUpdatedTime;
    bool m_lastUpdatedTimeHasBeenSet;
  };

} // namespace Model
} // namespace FraudDetector
} // namespace Aws


text:
This JavaScript tribute to the demoscene is also an exemple of the [kuzzle.io](http://kuzzle.io) project, as a Open Source BAAS (Backend-as-a-sevice) to syncronize users & store schema-less datas

![](https://raw.github.com/gandbox/gandbox.github.io/master/medias/KUZZLE_LOGO.png)

# How to use

Open [gandbox.github.io](http://gandbox.github.io) and share with a maximum of other users. A new coming user will generate a new 3D effect (with more triangles), will play a new chiptune, and will push the display to all other users

# How to run locally

You need to run this code behind HTTP to make the music work (XHR limitation), so can use docker from the local folder, and open [http://localhost:8080/](http://localhost:8080/)

```bash
docker run --name some-nginx -p 8080:80 -v $(pwd):/usr/share/nginx/html -d nginx
```

You can purge the user collection as this : [http://localhost:8080/purge.html](http://localhost:8080/purge.html)

# Credits & Greetings

* Main code by [gandbox](http://github.com/gandbox), inspired by the [Triangle mesh for 3D objects code](http://www.script-tutorials.com/demos/319/index2.html) (MIT License)
* Music by [gandbox](http://amp.dascene.net/detail.php?detail=modules&view=2949), selection of old amiga chiptunes
* Amiga JS protracker player is [Webaudio mod player](https://github.com/jhalme/webaudio-mod-player)
* Bandend-as-a-service is powered by [Kuzzle.io](http://kuzzle.io)


text:
namespace YouTubePlaylist.Private
{
    using Ninject;
    using System;
    using System.Linq;
    using Microsoft.AspNet.Identity;
    using YouTubePlaylist.Models;
    using YouTubePlaylist.Services.Contracts;

    public partial class CreatePlaylist : System.Web.UI.Page
    {

        [Inject]
        public ICategoryServices CategoryServices { get; set; }

        [Inject]
        public IPlayListServices PlaylistServices { get; set; }

        protected void btnCreatePlaylist_Click(object sender, EventArgs e)
        {
            var userId = this.User.Identity.GetUserId();
            var playlist = new Playlist()
            {
                UserId = this.User.Identity.GetUserId(),
                Title = this.tbTitle.Text,
                Description = this.tbDescription.Text,
                CategoryId = int.Parse(this.ddlCategories.SelectedValue),
                CreatedOn = DateTime.UtcNow,
            };

            if (!string.IsNullOrEmpty(tbVideo.Text))
            {
                var video = new Video()
                {
                    Url = tbVideo.Text
                };

                playlist.Videos.Add(video);
            }

           var newPlaylist =  this.PlaylistServices.Create(playlist);

            this.Response.Redirect("~/PlayListDetatils?Id=" + newPlaylist.Id);
        }

        public IQueryable<Category> ddlCategories_GetData()
        {
            return this.CategoryServices.GetAll();
        }
    }
}


text:
<link href="../../../../polymer-elements/polymer-selector/polymer-selector.html" rel="import">
<link href="../../../../polymer-ui-elements/polymer-ui-pages/polymer-ui-pages.html" rel="import">
<link href="gs-import-selector.html" rel="import">
<polymer-element name="gs-app" attributes="page imports selectedImportsIndex projectName projectPath">
	<template>

		<polymer-ui-pages selected="{{page}}">

Getting Started with Polymer

What's the name of your project?

				<input value="{{projectName}}">

Create at:

				<input value="{{projectPath}}">/{{projectName}}
				<button on-click="{{nextAction}}">Next!</button>

				<gs-import-selector imports="{{imports}}"></gs-import-selector>
				<button on-click="{{nextAction}}">Next!</button>

					Project: {{projectName}} at {{projectPath}}/{{projectName}}

					Imports:

					<template repeat="{{projectImports}}">
						{{}}

					</template>

				<button on-click="{{generateAction}}">Generate!</button>

		</polymer-ui-pages>
	</template>

</polymer-element>


text:
<?php

declare(strict_types=1);

namespace Prooph\ProophessorDo\App\Action;

use Prooph\ProophessorDo\Model\Todo\Query\GetTodosByAssigneeId;
use Prooph\ProophessorDo\Model\User\Query\GetUserById;
use Prooph\ServiceBus\QueryBus;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Webimpress\HttpMiddlewareCompatibility\HandlerInterface;
use Webimpress\HttpMiddlewareCompatibility\MiddlewareInterface;
use Zend\Diactoros\Response\HtmlResponse;
use Zend\Expressive\Template\TemplateRendererInterface;

class UserTodoList implements MiddlewareInterface
{
    /**
     * @var TemplateRendererInterface
     */
    private $templates;

    /**
     * @var QueryBus
     */
    private $queryBus;

    public function __construct(TemplateRendererInterface $templates, QueryBus $queryBus)
    {
        $this->templates = $templates;
        $this->queryBus = $queryBus;
    }

    public function process(ServerRequestInterface $request, HandlerInterface $handler): ResponseInterface
    {
        $userId = $request->getAttribute('user_id');

        $user = null;
        $this->queryBus->dispatch(new GetUserById($userId))
            ->then(
                function ($result) use (&$user) {
                    $user = $result;
                }
            );
        $todos = null;
        $this->queryBus->dispatch(new GetTodosByAssigneeId($userId))
            ->then(
                function ($result) use (&$todos) {
                    $todos = $result;
                }
            );

        return new HtmlResponse(
            $this->templates->render('page::user-todo-list', [
                'user' => $user,
                'todos' => $todos,
            ])
        );
    }
}


text:
SDN/NFV enabled Centralized WiFi and Cellular Networking.

FUN5G is a wireless network solution that can be configured using home PCs and Raspberry PI and open source that is easy to use and not expensive network equipment.

## Features
fun5g can build a centralized network-based SDN / NFV leverage open source software. Fun5g is a package that utilizes or modifies major open source software and includes newly developed software. The open source software used is HostAP, OpenWrt, OpenVPN, ONOS, OVS, Android, OPNFV / OpenStack, FreeRADIUS, OpenSSL, OpenBTS, OpenAirinterface and OpenEPC.
![alt tag](https://github.com/OpenWinCon/Fun5G/blob/master/img/features.png)
## Overall structure
![alt tag](https://github.com/OpenWinCon/Fun5G/blob/master/img/Fun5G.png)

## Related Projects.
[Host AP Daemon Agent & Controller](https://github.com/OpenWinCon/Fun5G/tree/master/agent)

[pi-switch](https://github.com/OpenWinCon/pi-switch)

[TrafficOffloadingAndroidApp](https://github.com/OpenWinCon/TrafficOffloadingAndroidApp)

[TrafficOffloadingONOS](https://github.com/OpenWinCon/TrafficOffloadingONOS)

[ACconnector](https://github.com/OpenWinCon/ACconnector)

[PiSTA_SKKU_NTL](https://github.com/OpenWinCon/PiSTA_SKKU_NTL)

[IPv6-host-mobility-management](https://github.com/OpenWinCon/IPv6-host-mobility-management)

[ONOS-DASH-Controller](https://github.com/OpenWinCon/ONOS-DASH-Controller)

[mobilitymgmt](https://github.com/OpenWinCon/mobilitymgmt)

[PiAPPowerControl](https://github.com/OpenWinCon/PiAPPowerControl)

## More..
If you want to get more information, Please visit our [Homepage](http://openwincon.khu.ac.kr/fun5g/)


text:
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;

$login = new \app\models\LoginForm();
$form = ActiveForm::begin([
    'id' => 'login-form',
    'options' => ['class' => 'login-form'],
    'action' => yii\helpers\Url::toRoute('site/login'),
    'fieldConfig' => [
        'template' => "{label}{input}{error}",
        'labelOptions' => ['class' => 'col-lg-1 control-label'],
    ],
]); ?>

<?= $form->field($login, 'email')
    ->textInput(['class' => 'input-field clearfix'])
    ->label('Email',['class' =>'clearfix']) ?>

<?= $form->field($login, 'password')
    ->passwordInput(['class' => 'input-field clearfix'])
    ->label('Пароль',['class' =>'clearfix']) ?>

<?= $form->field($login, 'rememberMe', [
    'template' => "
{input}
\n
{error}
",
])->checkbox() ?>

<?= Html::submitButton('Войти', ['class' => 'clearfix', 'name' => 'login-button']) ?>

<?php ActiveForm::end(); ?>


text:
<?php

namespace CmsShoppingCartTest;

class SampleTest extends Framework\TestCase
{

    public function testSample()
    {
        $this->assertInstanceOf('Zend\Di\LocatorInterface', $this->getLocator());
    }
}


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="jolene" default="build">

    <property file="build.properties"/>

    <property name="compiler.debug" value="on"/>
    <property name="compiler.generate.no.warnings" value="off"/>
    <property name="compiler.args" value=""/>
    <property name="compiler.max.memory" value="128m"/>
    <patternset id="ignored.files">
        <exclude name="**/CVS/**"/>
        <exclude name="**/SCCS/**"/>
        <exclude name="**/RCS/**"/>
        <exclude name="**/rcs/**"/>
        <exclude name="**/.DS_Store/**"/>
        <exclude name="**/.svn/**"/>
        <exclude name="**/vssver.scc/**"/>
        <exclude name="**/vssver2.scc/**"/>
        <exclude name="**/.sbas/**"/>
        <exclude name="**/.IJI.*/**"/>
    </patternset>

    <patternset id="compiler.resources">
        <include name="**/?*.properties"/>
        <include name="**/?*.xml"/>
        <include name="**/?*.html"/>
        <include name="**/?*.dtd"/>
        <include name="**/?*.tld"/>
        <include name="**/?*.gif"/>
        <include name="**/?*.png"/>
        <include name="**/?*.jpeg"/>
        <include name="**/?*.jpg"/>
    </patternset>

    <property name="jdk.bin.1.5" value="${jdk.home.1.5}/bin"/>
    <path id="jdk.classpath.1.5">
        <fileset dir="${jdk.home.1.5}">
            <include name="jre/lib/charsets.jar"/>
            <include name="jre/lib/deploy.jar"/>
            <include name="jre/lib/javaws.jar"/>
            <include name="jre/lib/jce.jar"/>
            <include name="jre/lib/jsse.jar"/>
            <include name="jre/lib/plugin.jar"/>
            <include name="jre/lib/rt.jar"/>
            <include name="jre/lib/ext/dnsns.jar"/>
            <include name="jre/lib/ext/localedata.jar"/>
            <include name="jre/lib/ext/sunjce_provider.jar"/>
            <include name="jre/lib/ext/sunpkcs11.jar"/>
        </fileset>
    </path>

    <property name="project.jdk.home" value="${jdk.home.1.5}"/>
    <property name="project.jdk.bin" value="${jdk.bin.1.5}"/>
    <property name="project.jdk.classpath" value="jdk.classpath.1.5"/>

    <path id="cobertura.classpath">
        <fileset dir="${cobertura.lib.home}">
            <include name="*.jar"/>
        </fileset>
        <fileset file="${log4j.lib.home}"/>
    </path>

    <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>

    <path id="library.log4j.classpath">
        <pathelement location="${log4j.lib.home}"/>
    </path>

    <path id="library.junit.classpath">
        <pathelement location="${junit.lib.home}"/>
    </path>

    <path id="library.commons.classpath">
        <pathelement location="${commons.beanutils.lib.home}"/>
        <pathelement location="${commons.logging.lib.home}"/>
    </path>

    <path id="library.servlet.classpath">
        <pathelement location="${servlet.lib.home}"/>
    </path>

    <path id="library.struts.classpath">
        <fileset dir="${struts.lib.home}" includes="*.jar"/>
    </path>

    <path id="library.servlet-struts.classpath">
        <pathelement location="${servlet.lib.home}"/>
    </path>

    <path id="library.log4j-struts.classpath">
        <pathelement location="${log4j.lib.home}"/>
    </path>

    <path id="library.cobertura.classpath">
        <fileset dir="${cobertura.lib.home}" includes="*.jar"/>
    </path>

    <dirname property="module.jolene.basedir" file="${ant.file}"/>

    <property name="module.jdk.home.jolene" value="${project.jdk.home}"/>
    <property name="module.jdk.bin.jolene" value="${project.jdk.bin}"/>
    <property name="module.jdk.classpath.jolene" value="${project.jdk.classpath}"/>

    <property name="compiler.args.jolene" value="${compiler.args}"/>

    <property name="jolene.output.dir" value="${module.jolene.basedir}/dist"/>
    <property name="jolene.testoutput.dir" value="${module.jolene.basedir}/testdist"/>
    <property name="jolene.doc.dir" value="${module.jolene.basedir}/doc"/>

    <path id="jolene.module.bootclasspath">

    </path>

    <path id="jolene.module.classpath">
        <path refid="${module.jdk.classpath.jolene}"/>
        <path refid="library.log4j.classpath"/>
        <path refid="library.junit.classpath"/>
        <path refid="library.commons.classpath"/>
        <path refid="library.servlet.classpath"/>
        <path refid="library.log4j-struts.classpath"/>
    </path>

    <patternset id="excluded.from.module.jolene">
        <patternset refid="ignored.files"/>
    </patternset>

    <patternset id="excluded.from.compilation.jolene">
        <patternset refid="excluded.from.module.jolene"/>
    </patternset>

    <path id="jolene.module.sourcepath">
        <dirset dir="${module.jolene.basedir}">
            <include name="src"/>
        </dirset>
    </path>

    <path id="jolene.module.test.sourcepath">
        <dirset dir="${module.jolene.basedir}">
            <include name="test"/>
        </dirset>
    </path>

    <target name="compile.module.jolene" depends="compile.module.jolene.production,compile.module.jolene.tests"
            description="Compile module jolene"/>

    <target name="compile.module.jolene.production" description="Compile module jolene; production classes">
        <mkdir dir="${jolene.output.dir}"/>
        <javac destdir="${jolene.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
               memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.jolene}/javac">
            <compilerarg line="${compiler.args.jolene}"/>
            <bootclasspath refid="jolene.module.bootclasspath"/>
            <classpath refid="jolene.module.classpath"/>
            <src refid="jolene.module.sourcepath"/>
            <patternset refid="excluded.from.compilation.jolene"/>
        </javac>

        <copy todir="${jolene.output.dir}">
            <fileset dir="${module.jolene.basedir}/src">
                <patternset refid="compiler.resources"/>
                <type type="file"/>
            </fileset>
        </copy>
    </target>

    <target name="compile.module.jolene.tests" depends="compile.module.jolene.production"
            description="compile module jolene; test classes" unless="skip.tests">
        <mkdir dir="${jolene.testoutput.dir}"/>
        <javac destdir="${jolene.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
               memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.jolene}/javac">
            <compilerarg line="${compiler.args.jolene}"/>
            <classpath refid="jolene.module.classpath"/>
            <classpath location="${jolene.output.dir}"/>
            <src refid="jolene.module.test.sourcepath"/>
            <patternset refid="excluded.from.compilation.jolene"/>
        </javac>

        <copy todir="${jolene.testoutput.dir}">
            <fileset dir="${module.jolene.basedir}/test">
                <patternset refid="compiler.resources"/>
                <type type="file"/>
            </fileset>
        </copy>
    </target>

    <target name="clean.module.jolene" description="cleanup module">
        <delete dir="${jolene.output.dir}"/>
        <delete dir="${jolene.testoutput.dir}"/>
    </target>

    <dirname property="module.struts.basedir" file="${ant.file}"/>

    <property name="module.jdk.home.struts" value="${project.jdk.home}"/>
    <property name="module.jdk.bin.struts" value="${project.jdk.bin}"/>
    <property name="module.jdk.classpath.struts" value="${project.jdk.classpath}"/>

    <property name="compiler.args.struts" value="${compiler.args}"/>

    <property name="struts.output.dir" value="${jolene.output.dir}"/>
    <property name="struts.testoutput.dir" value="${jolene.testoutput.dir}"/>

    <path id="struts.module.bootclasspath">

    </path>

    <path id="struts.module.classpath">
        <path refid="${module.jdk.classpath.struts}"/>
        <path refid="library.struts.classpath"/>
        <path refid="library.servlet-struts.classpath"/>
        <path refid="library.log4j-struts.classpath"/>
        <pathelement location="${jolene.output.dir}"/>
    </path>

    <patternset id="excluded.from.module.struts">
        <patternset refid="ignored.files"/>
    </patternset>

    <patternset id="excluded.from.compilation.struts">
        <patternset refid="excluded.from.module.struts"/>
    </patternset>

    <path id="struts.module.sourcepath">
        <dirset dir="${module.jolene.basedir}/struts">
            <include name="src"/>
        </dirset>
    </path>

    <target name="compile.module.struts" depends="compile.module.struts.production,compile.module.struts.tests"
            description="Compile module struts"/>

    <target name="compile.module.struts.production" depends="compile.module.jolene"
            description="Compile module struts; production classes">
        <mkdir dir="${struts.output.dir}"/>
        <javac destdir="${struts.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
               memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.struts}/javac">
            <compilerarg line="${compiler.args.struts}"/>
            <bootclasspath refid="struts.module.bootclasspath"/>
            <classpath refid="struts.module.classpath"/>
            <src refid="struts.module.sourcepath"/>
            <patternset refid="excluded.from.compilation.struts"/>
        </javac>

        <copy todir="${struts.output.dir}">
            <fileset dir="${module.struts.basedir}/struts/src">
                <patternset refid="compiler.resources"/>
                <type type="file"/>
            </fileset>
        </copy>
    </target>

    <target name="compile.module.struts.tests" depends="compile.module.struts.production"
            description="compile module struts; test classes" unless="skip.tests"/>

    <target name="clean.module.struts" description="cleanup module">
        <delete dir="${struts.output.dir}"/>
        <delete dir="${struts.testoutput.dir}"/>
    </target>

    <target name="init" description="Build initialization">

    </target>

    <target name="clean" depends="clean.module.jolene, clean.module.struts" description="cleanup all">
        <delete dir="${release.dir}"/>
        <mkdir dir="${release.dir}"/>
    </target>

    <target name="build" depends="init, clean, compile.module.jolene, compile.module.struts" description="Build jars">

        <tstamp/>

        <jar destfile="${release.dir}/jolene-core-${release.version}.jar">
            <manifest id="${release.version}">
                <attribute name="Built-By" value="Dan Howard"/>

                    <attribute name="Specification-Title" value="Jolene"/>
                    <attribute name="Specification-Version" value="${release.version}"/>
                    <attribute name="Implementation-Title" value="Jolene"/>
                    <attribute name="Implementation-Vendor" value="http://jolene.sourceforge.net/"/>
                    <attribute name="Implementation-Version" value="${release.version} ${TODAY}"/>

            </manifest>

            <fileset dir="${jolene.output.dir}">
                <exclude name="**/net/sf/jolene/struts/*.*"/>
            </fileset>
        </jar>

        <jar destfile="${release.dir}/jolene-plugin-struts-${release.version}.jar">
            <manifest id="${release.version}">
                <attribute name="Built-By" value="Dan Howard"/>

                    <attribute name="Specification-Title" value="Jolene Struts plugin"/>
                    <attribute name="Specification-Version" value="${release.version}"/>
                    <attribute name="Implementation-Title" value="Jolene Struts plugin"/>
                    <attribute name="Implementation-Vendor" value="http://jolene.sourceforge.net/"/>
                    <attribute name="Implementation-Version" value="${release.version} ${TODAY}"/>

            </manifest>

            <fileset dir="${jolene.output.dir}">
                <include name="**/net/sf/jolene/struts/*.*"/>
            </fileset>

            <fileset dir="${module.jolene.basedir}">
                <include name="license-bsd.txt"/>
            </fileset>
        </jar>

    </target>

    <target name="doc" description="Generate javadocs">

        <javadoc destdir="${jolene.doc.dir}"
                 stylesheetfile="${basedir}/stylesheet.css"
                 linksource="true" public="true">
            <sourcepath>
                <path refid="jolene.module.sourcepath"/>
                <path refid="struts.module.sourcepath"/>
            </sourcepath>
            <classpath>
                <path refid="jolene.module.classpath"/>
                <path refid="struts.module.classpath"/>
            </classpath>
        </javadoc>

    </target>

    <target name="release" depends="clean, build, doc, instrument" description="Release jars">

        <delete file="${release.dir}/jolene-build-src-${release.version}.zip" failonerror="false"/>
        <zip destfile="${release.dir}/jolene-build-src-${release.version}.zip">

            <fileset dir="${module.jolene.basedir}">
                <exclude name="**/dist/**"/>
                <exclude name="**/reports/**"/>
                <exclude name="**/instrumented-classes/**"/>
                <exclude name="**/testdist/**"/>
                <exclude name="**/doc/**"/>
                <exclude name="**/*.iws"/>
                <exclude name="**/*.ser"/>
            </fileset>
        </zip>

        <jar destfile="${release.dir}/jolene-src-${release.version}.jar">

            <manifest id="${release.version}">
                <attribute name="Built-By" value="Dan Howard"/>

                    <attribute name="Specification-Title" value="Jolene source"/>
                    <attribute name="Specification-Version" value="${release.version}"/>
                    <attribute name="Implementation-Title" value="Jolene source"/>
                    <attribute name="Implementation-Vendor" value="http://jolene.sourceforge.net/"/>
                    <attribute name="Implementation-Version" value="${release.version} ${TODAY}"/>

            </manifest>

            <fileset dir="${module.jolene.basedir}/src"/>
            <fileset dir="${module.jolene.basedir}/struts/src"/>

        </jar>

        <jar destfile="${release.dir}/jolene-doc-${release.version}.jar">

            <manifest id="${release.version}">
                <attribute name="Built-By" value="Dan Howard"/>

                    <attribute name="Specification-Title" value="Jolene Javadoc"/>
                    <attribute name="Specification-Version" value="${release.version}"/>
                    <attribute name="Implementation-Title" value="Jolene Javadoc"/>
                    <attribute name="Implementation-Vendor" value="http://jolene.sourceforge.net/"/>
                    <attribute name="Implementation-Version" value="${release.version} ${TODAY}"/>

            </manifest>

            <fileset dir="${jolene.doc.dir}"/>

        </jar>

        <mkdir dir="${release.dir}/bin"/>
        <jar destfile="${release.dir}/bin/rb.jar">
            <manifest id="${release.version}">
                <attribute name="Built-By" value="Dan Howard"/>
                <attribute name="Main-Class" value="net.sf.jolene.util.ResourceBuilder"/>
                <attribute name="Class-Path" value="log4j.jar"/>

                    <attribute name="Specification-Title" value="Jolene ResourceBuilder"/>
                    <attribute name="Specification-Version" value="${release.version}"/>
                    <attribute name="Implementation-Title" value="Jolene ResourceBuilder"/>
                    <attribute name="Implementation-Vendor" value="http://jolene.sourceforge.net/"/>
                    <attribute name="Implementation-Version" value="${release.version} ${TODAY}"/>

            </manifest>

            <fileset dir="${jolene.output.dir}">
                <exclude name="**/net/sf/jolene/struts/*.*"/>
            </fileset>
        </jar>
        <copy file="${log4j.lib.home}" tofile="${release.dir}/bin/log4j.jar" preservelastmodified="true"/>

        <copy todir="${release.dir}/samples">
            <fileset dir="${samples.dir}">
                <include name="**/*"/>
            </fileset>
        </copy>

        <delete file="${release.dir}/jolene-full-${release.version}.zip" failonerror="false"/>
        <mkdir dir="${release.dir}/lib"/>
        <copy file="${log4j.lib.home}" todir="${release.dir}/lib" preservelastmodified="true"/>
        <copy file="${commons.beanutils.lib.home}" todir="${release.dir}/lib" preservelastmodified="true"/>
        <copy file="${commons.logging.lib.home}" todir="${release.dir}/lib" preservelastmodified="true"/>

        <zip basedir="${release.dir}" destfile="${release.dir}/jolene-full-${release.version}.zip" update="false"/>

        <copy todir="${web.root.dir}/coverage">
            <fileset dir="${coveragereport.dir}" includes="**/*"/>
        </copy>
    </target>

    <target name="instrument" depends="build" description="Instrumentation for JUNIT">

        <delete file="${basedir}/cobertura.ser" failonerror="false"/>

        <cobertura-instrument todir="${module.jolene.basedir}/instrumented-classes">
            <fileset dir="${module.jolene.basedir}/dist">
                <include name="**/*.class"/>
            </fileset>
        </cobertura-instrument>

        <junit fork="yes" dir="${basedir}" failureProperty="test.failed">

            <sysproperty key="net.sourceforge.cobertura.datafile"
                         file="${basedir}/cobertura.ser"/>

            <classpath refid="library.junit.classpath"/>

            <classpath refid="cobertura.classpath"/>

            <classpath location="${module.jolene.basedir}/instrumented-classes"/>
            <classpath location="${module.jolene.basedir}/testdist"/>
            <classpath location="${module.jolene.basedir}/dist"/>
            <classpath refid="jolene.module.classpath"/>
            <classpath refid="struts.module.classpath"/>

            <formatter type="brief" usefile="false"/>
            <test name="net.sf.jolene.AllTests"/>
        </junit>

        <cobertura-report format="html" destdir="${coveragereport.dir}">
            <fileset dir="${module.jolene.basedir}/src"/>
            <fileset dir="${module.jolene.basedir}/struts/src"/>
        </cobertura-report>

    </target>

</project>


text:
namespace ray {

/// \class ObjectStoreClientPool
///
/// Encapsulates notification handling from the object store.
class ObjectStoreNotificationManager {
 public:
  /// Constructor.
  ///
  /// \param io_service The asio service to be used.
  /// \param store_socket_name The store socket to connect to.
  ObjectStoreNotificationManager(boost::asio::io_service &io_service,
                                 const std::string &store_socket_name);

  ~ObjectStoreNotificationManager();

  /// Subscribe to notifications of objects added to local store.
  /// Upon subscribing, the callback will be invoked for all objects that
  /// already exist in the local store
  ///
  /// \param callback A callback expecting an ObjectID.
  void SubscribeObjAdded(
      std::function<void(const object_manager::protocol::ObjectInfoT &)> callback);

  /// Subscribe to notifications of objects deleted from local store.
  ///
  /// \param callback A callback expecting an ObjectID.
  void SubscribeObjDeleted(std::function<void(const ray::ObjectID &)> callback);

  /// Returns debug string for class.
  ///
  /// \return string.
  std::string DebugString() const;

 private:
  /// Async loop for handling object store notifications.
  void NotificationWait();
  void ProcessStoreLength(const boost::system::error_code &error);
  void ProcessStoreNotification(const boost::system::error_code &error);

  /// Support for rebroadcasting object add/rem events.
  void ProcessStoreAdd(const object_manager::protocol::ObjectInfoT &object_info);
  void ProcessStoreRemove(const ObjectID &object_id);

  std::vector<std::function<void(const object_manager::protocol::ObjectInfoT &)>>
      add_handlers_;
  std::vector<std::function<void(const ray::ObjectID &)>> rem_handlers_;

  plasma::PlasmaClient store_client_;
  int c_socket_;
  int64_t length_;
  int64_t num_adds_processed_;
  int64_t num_removes_processed_;
  std::vector<uint8_t> notification_;
  boost::asio::local::stream_protocol::socket socket_;
};

}  // namespace ray

#endif  // RAY_OBJECT_MANAGER_OBJECT_STORE_CLIENT_H


text:
package com.eatnumber1.util.collections.concurrent;

import java.util.Queue;
import net.jcip.annotations.ThreadSafe;

/**
 * @author Russell Harmon
 * @since Jul 13, 2007
 */
@ThreadSafe
public interface SynchronizedQueue<T, D extends Queue<T>> extends SynchronizedCollection<T, D>, Queue<T> {
}


text:
			1990

			Mandelas Befreiung

			Die Freilassung Nelson Mandelas, nach 27 Jahren Haft, schürt weltweit die Hoffnung auf eine friedliche Abkehr von der Rassentrennungspolitik in Südafrika.

Seitenanfang

			Berufliche Ausbildung

			Nach erfolgreichem Abitur am humanistischen Gymnasium bei St. Stephan beginne ich meine kaufmännische Ausbildung zum Finanz-/Versicherungskaufmann.


text:
class EnjuEvent::SetupGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def copy_setup_files
    directory("db/fixtures", "db/fixtures/enju_event")
    inject_into_file 'app/controllers/application_controller.rb',
      "  include EnjuEvent::Controller\n", after: "include EnjuLibrary::Controller\n"
    inject_into_file 'app/assets/stylesheets/application.css',
      " *= require enju_event/application\n", after: " *= require enju_leaf/application\n"
    inject_into_file 'app/assets/javascripts/application.js',
      "//= require enju_event/application\n", after: "//= require enju_leaf/application\n"
  end
end