text:
package org.beiter.michael.eaudit4j.processors.jdbc.propsbuilder;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.beiter.michael.eaudit4j.processors.jdbc.JdbcProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * This class builds a set of {@link JdbcProperties} using the settings obtained from a Map.
 *

 * Use the keys from the various KEY_* fields to properly populate the Map before calling this class' methods.
 */
// CHECKSTYLE:OFF
// this is flagged in checkstyle with a missing whitespace before '}', which is a bug in checkstyle
// suppress warnings about the long variable names
@SuppressWarnings({"PMD.LongVariable"})
// CHECKSTYLE:ON
public final class MapBasedJdbcPropsBuilder {

    /**
     * The logger object for this class
     */
    private static final Logger LOG = LoggerFactory.getLogger(MapBasedJdbcPropsBuilder.class);

    // #################
    // # Default values
    // #################

    /**
     * @see JdbcProperties#setInsertEventSqlStmt(String)
     */
    public static final String DEFAULT_INSERT_EVENT_SQL_STMT = "TODO - CONFIGURE ME!";

    /**
     * @see JdbcProperties#setStringEncoding(String)
     */
    public static final String DEFAULT_STRING_ENCODING = "UTF-8";

    /**
     * @see JdbcProperties#setEventIdFieldName(String)
     */
    public static final String DEFAULT_EVENT_ID_FIELD_NAME = "TODO - CONFIGURE ME!";

    /**
     * @see JdbcProperties#setIndexedFields(String)
     */
    public static final String DEFAULT_INDEXED_FIELDS = null;

    /**
     * @see JdbcProperties#setIndexedFieldsMaxLength(int)
     */
    public static final int DEFAULT_INDEXED_FIELDS_MAX_LENGTH = 255;

    /**
     * @see JdbcProperties#setIndexedFieldsToLower(boolean)
     */
    public static final boolean DEFAULT_INDEXED_FIELDS_TO_LOWER = false;

    /**
     * @see JdbcProperties#setInsertIndexedFieldSqlStmt(String)
     */
    public static final String DEFAULT_INSERT_INDEXED_FIELD_SQL_STMT = "TODO - CONFIGURE ME!";

    /**
     * @see JdbcProperties#setIndexedFieldSeparator(String)
     */
    public static final String DEFAULT_INDEXED_FIELD_SEPARATOR = ",";

    /**
     * @see JdbcProperties#setIndexedFieldNameSeparator(String)
     */
    public static final String DEFAULT_INDEXED_FIELD_NAME_SEPARATOR = ":";

    /**
     * @see JdbcProperties#setJndiConnectionName(String)
     */
    public static final String DEFAULT_JNDI_CONNECTION_NAME = "TODO - CONFIGURE ME!";

    /**
     * @see JdbcProperties#setDataSourceName(String)
     */
    public static final String DEFAULT_DATA_SOURCE_NAME = "TODO - CONFIGURE ME!";

    // #####################
    // # Configuration Keys
    // #####################

    /**
     * @see JdbcProperties#setInsertEventSqlStmt(String)
     */
    public static final String KEY_INSERT_EVENT_SQL_STMT = "audit.processor.jdbc.insertEventSqlStmt";

    /**
     * @see JdbcProperties#setStringEncoding(String)
     */
    public static final String KEY_STRING_ENCODING = "audit.processor.jdbc.stringEncoding";

    /**
     * @see JdbcProperties#setEventIdFieldName(String)
     */
    public static final String KEY_EVENT_ID_FIELD_NAME = "audit.processor.jdbc.eventIdFieldName";

    /**
     * @see JdbcProperties#setIndexedFields(String)
     */
    public static final String KEY_INDEXED_FIELDS = "audit.processor.jdbc.indexedFields";

    /**
     * @see JdbcProperties#setIndexedFieldsMaxLength(int)
     */
    public static final String KEY_INDEXED_FIELDS_MAX_LENGTH = "audit.processor.jdbc.indexedFieldsMaxLength";

    /**
     * @see JdbcProperties#setIndexedFieldsToLower(boolean)
     */
    public static final String KEY_INDEXED_FIELDS_TO_LOWER = "audit.processor.jdbc.indexedFieldsToLower";

    /**
     * @see JdbcProperties#setInsertIndexedFieldSqlStmt(String)
     */
    public static final String KEY_INSERT_INDEXED_FIELD_SQL_STMT = "audit.processor.jdbc.insertIndexedFieldSqlStmt";

    /**
     * @see JdbcProperties#setIndexedFieldSeparator(String)
     */
    public static final String KEY_INDEXED_FIELD_SEPARATOR = "audit.processor.jdbc.indexedFieldSeparator";

    /**
     * @see JdbcProperties#setIndexedFieldNameSeparator(String)
     */
    public static final String KEY_INDEXED_FIELD_NAME_SEPARATOR = "audit.processor.jdbc.indexedFieldNameSeparator";

    /**
     * @see JdbcProperties#setJndiConnectionName(String)
     */
    public static final String KEY_JNDI_CONNECTION_NAME = "audit.processor.jdbc.jndi.connectionName";

    /**
     * @see JdbcProperties#setDataSourceName(String)
     */
    public static final String KEY_DATA_SOURCE_NAME = "audit.processor.jdbc.dataSource.Name";

    /**
     * A private constructor to prevent instantiation of this class
     */
    private MapBasedJdbcPropsBuilder() {
    }

    /**
     * Creates a set of JDBC properties that use the defaults as specified in this class.
     *
     * @return A set of JDBC properties with (reasonable) defaults
     * @see MapBasedJdbcPropsBuilder
     */
    public static JdbcProperties buildDefault() {

        return build(new ConcurrentHashMap<String, String>());
    }

    /**
     * Initialize a set of JDBC properties based on key / values in a HashMap.
     *
     * @param properties A HashMap with configuration properties, using the keys as specified in this class
     * @return A {@link JdbcProperties} object with default values, plus the provided parameters
     * @throws NullPointerException When {@code properties} is {@code null}
     */
    // CHECKSTYLE:OFF
    // this is flagged in checkstyle with a missing whitespace before '}', which is a bug in checkstyle
    // suppress warnings about this method being too long (not much point in splitting up this one!)
    // suppress warnings about this method being too complex (can't extract a generic subroutine to reduce exec paths)
    @SuppressWarnings({"PMD.ExcessiveMethodLength", "PMD.NPathComplexity", "PMD.CyclomaticComplexity", "PMD.StdCyclomaticComplexity", "PMD.ModifiedCyclomaticComplexity"})
    // CHECKSTYLE:ON
    public static JdbcProperties build(final Map<String, String> properties) {

        Validate.notNull(properties, "The validated object 'value' is null");

        final JdbcProperties jdbcProperties = new JdbcProperties();
        String tmp = properties.get(KEY_INSERT_EVENT_SQL_STMT);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setInsertEventSqlStmt(tmp);
            logValue(KEY_INSERT_EVENT_SQL_STMT, tmp);
        } else {
            jdbcProperties.setInsertEventSqlStmt(DEFAULT_INSERT_EVENT_SQL_STMT);
            logDefault(KEY_INSERT_EVENT_SQL_STMT, DEFAULT_INSERT_EVENT_SQL_STMT);
        }

        tmp = properties.get(KEY_STRING_ENCODING);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setStringEncoding(tmp);
            logValue(KEY_STRING_ENCODING, tmp);
        } else {
            jdbcProperties.setStringEncoding(DEFAULT_STRING_ENCODING);
            logDefault(KEY_STRING_ENCODING, DEFAULT_STRING_ENCODING);
        }

        tmp = properties.get(KEY_EVENT_ID_FIELD_NAME);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setEventIdFieldName(tmp);
            logValue(KEY_EVENT_ID_FIELD_NAME, tmp);
        } else {
            jdbcProperties.setEventIdFieldName(DEFAULT_EVENT_ID_FIELD_NAME);
            logDefault(KEY_EVENT_ID_FIELD_NAME, DEFAULT_EVENT_ID_FIELD_NAME);
        }

        tmp = properties.get(KEY_INDEXED_FIELDS);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setIndexedFields(tmp);
            logValue(KEY_INDEXED_FIELDS, tmp);
        } else {
            jdbcProperties.setIndexedFields(DEFAULT_INDEXED_FIELDS);
            logDefault(KEY_INDEXED_FIELDS, DEFAULT_INDEXED_FIELDS);
        }

        tmp = properties.get(KEY_INDEXED_FIELDS_MAX_LENGTH);
        if (StringUtils.isNotEmpty(tmp)) {
            if (StringUtils.isNumeric(tmp)) {
                jdbcProperties.setIndexedFieldsMaxLength(Integer.decode(tmp));
                logValue(KEY_INDEXED_FIELDS_MAX_LENGTH, tmp);
            } else {
                jdbcProperties.setIndexedFieldsMaxLength(DEFAULT_INDEXED_FIELDS_MAX_LENGTH);
                logDefault(KEY_INDEXED_FIELDS_MAX_LENGTH, tmp, "not numeric",
                        String.valueOf(DEFAULT_INDEXED_FIELDS_MAX_LENGTH));
            }
        } else {
            jdbcProperties.setIndexedFieldsMaxLength(DEFAULT_INDEXED_FIELDS_MAX_LENGTH);
            logDefault(KEY_INDEXED_FIELDS_MAX_LENGTH, String.valueOf(DEFAULT_INDEXED_FIELDS_MAX_LENGTH));
        }

        tmp = properties.get(KEY_INDEXED_FIELDS_TO_LOWER);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setIndexedFieldsToLower(Boolean.parseBoolean(tmp));
            logValue(KEY_INDEXED_FIELDS_TO_LOWER, tmp);
        } else {
            jdbcProperties.setIndexedFieldsToLower(DEFAULT_INDEXED_FIELDS_TO_LOWER);
            logDefault(KEY_INDEXED_FIELDS_TO_LOWER, String.valueOf(DEFAULT_INDEXED_FIELDS_TO_LOWER));
        }

        tmp = properties.get(KEY_INSERT_INDEXED_FIELD_SQL_STMT);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setInsertIndexedFieldSqlStmt(tmp);
            logValue(KEY_INSERT_INDEXED_FIELD_SQL_STMT, tmp);
        } else {
            jdbcProperties.setInsertIndexedFieldSqlStmt(DEFAULT_INSERT_INDEXED_FIELD_SQL_STMT);
            logDefault(KEY_INSERT_INDEXED_FIELD_SQL_STMT, DEFAULT_INSERT_INDEXED_FIELD_SQL_STMT);
        }

        tmp = properties.get(KEY_INDEXED_FIELD_SEPARATOR);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setIndexedFieldSeparator(tmp);
            logValue(KEY_INDEXED_FIELD_SEPARATOR, tmp);
        } else {
            jdbcProperties.setIndexedFieldSeparator(DEFAULT_INDEXED_FIELD_SEPARATOR);
            logDefault(KEY_INDEXED_FIELD_SEPARATOR, DEFAULT_INDEXED_FIELD_SEPARATOR);
        }

        tmp = properties.get(KEY_INDEXED_FIELD_NAME_SEPARATOR);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setIndexedFieldNameSeparator(tmp);
            logValue(KEY_INDEXED_FIELD_NAME_SEPARATOR, tmp);
        } else {
            jdbcProperties.setIndexedFieldNameSeparator(DEFAULT_INDEXED_FIELD_NAME_SEPARATOR);
            logDefault(KEY_INDEXED_FIELD_NAME_SEPARATOR, DEFAULT_INDEXED_FIELD_NAME_SEPARATOR);
        }

        tmp = properties.get(KEY_JNDI_CONNECTION_NAME);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setJndiConnectionName(tmp);
            logValue(KEY_JNDI_CONNECTION_NAME, tmp);
        } else {
            jdbcProperties.setJndiConnectionName(DEFAULT_JNDI_CONNECTION_NAME);
            logDefault(KEY_JNDI_CONNECTION_NAME, DEFAULT_JNDI_CONNECTION_NAME);
        }

        tmp = properties.get(KEY_DATA_SOURCE_NAME);
        if (StringUtils.isNotEmpty(tmp)) {
            jdbcProperties.setDataSourceName(tmp);
            logValue(KEY_DATA_SOURCE_NAME, tmp);
        } else {
            jdbcProperties.setDataSourceName(DEFAULT_DATA_SOURCE_NAME);
            logDefault(KEY_DATA_SOURCE_NAME, DEFAULT_DATA_SOURCE_NAME);
        }

        // set the additional properties, preserving the originally provided properties
        // create a defensive copy of the map and all its properties
        // the code looks a little more complicated than a simple "putAll()", but it catches situations
        // where a Map is provided that supports null values (e.g. a HashMap) vs Map implementations
        // that do not (e.g. ConcurrentHashMap).
        final Map<String, String> tempMap = new ConcurrentHashMap<>();
        for (final Map.Entry<String, String> entry : properties.entrySet()) {
            final String key = entry.getKey();
            final String value = entry.getValue();

            if (value != null) {
                tempMap.put(key, value);
            }
        }
        jdbcProperties.setAdditionalProperties(tempMap);

        return jdbcProperties;
    }

    /**
     * Create a log entry when a value has been successfully configured.
     *
     * @param key   The configuration key
     * @param value The value that is being used
     */
    private static void logValue(final String key, final String value) {

        // Fortify will report a violation here because of disclosure of potentially confidential information.
        // However, the configuration keys are not confidential, which makes this a non-issue / false positive.
        if (LOG.isInfoEnabled()) {
            final StringBuilder msg = new StringBuilder("Key found in configuration ('")
                    .append(key)
                    .append("'), using configured value (not disclosed here for security reasons)");
            LOG.info(msg.toString());
        }

        // Fortify will report a violation here because of disclosure of potentially confidential information.
        // The configuration VALUES are confidential. DO NOT activate DEBUG logging in production.
        if (LOG.isDebugEnabled()) {
            final StringBuilder msg = new StringBuilder("Key found in configuration ('")
                    .append(key)
                    .append("'), using configured value ('");
            if (value == null) {
                msg.append("null')");
            } else {
                msg.append(value).append("')");
            }
            LOG.debug(msg.toString());
        }
    }

    /**
     * Create a log entry when a default value is being used in case the propsbuilder key has not been provided in the
     * configuration.
     *
     * @param key          The configuration key
     * @param defaultValue The default value that is being used
     */
    private static void logDefault(final String key, final String defaultValue) {

        // Fortify will report a violation here because of disclosure of potentially confidential information.
        // However, neither the configuration keys nor the default propsbuilder values are confidential, which makes
        // this a non-issue / false positive.
        if (LOG.isInfoEnabled()) {
            final StringBuilder msg = new StringBuilder("Key is not configured ('")
                    .append(key)
                    .append("'), using default value ('");
            if (defaultValue == null) {
                msg.append("null')");
            } else {
                msg.append(defaultValue).append("')");
            }
            LOG.info(msg.toString());
        }
    }

    /**
     * Create a log entry when a default value is being used in case that an invalid configuration value has been
     * provided in the configuration for the propsbuilder key.
     *
     * @param key             The configuration key
     * @param invalidValue    The invalid value that cannot be used
     * @param validationError The validation error that caused the invalid value to be refused
     * @param defaultValue    The default value that is being used
     */
    // suppress warnings about not using an object for the four strings in this PRIVATE method
    @SuppressWarnings("PMD.UseObjectForClearerAPI")
    private static void logDefault(final String key,
                                   final String invalidValue,
                                   final String validationError,
                                   final String defaultValue) {

        if (LOG.isWarnEnabled()) {
            final StringBuilder msg = new StringBuilder("Invalid value ('")
                    .append(invalidValue)
                    .append("', ")
                    .append(validationError)
                    .append(") for key '")
                    .append(key)
                    .append("', using default instead ('");
            if (defaultValue == null) {
                msg.append("null')");
            } else {
                msg.append(defaultValue).append("')");
            }
            LOG.warn(msg.toString());
        }
    }
}


text:
class NullArgumentException : public Exception
{
public:
NullArgumentException(string argument, string method);
};

#endif

redpajama_set_name: RedPajamaGithub


text:
package org.wso2.carbon.apimgt.hostobjects.util;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import org.wso2.carbon.apimgt.hostobjects.util.DeserializationModule;
/*This is a temporary solution to convert swagger object to json object. This class will be deleted
 once a fixed swagger parser version is released */
public class ObjectMapperFactory {

    protected static ObjectMapper createJson() {
        return createJson(true, true);
    }

    protected static ObjectMapper createJson(boolean includePathDeserializer, boolean includeResponseDeserializer) {
        return create(null, includePathDeserializer, includeResponseDeserializer);
    }

    protected static ObjectMapper createYaml() {
        return createYaml(true, true);
    }

    protected static ObjectMapper createYaml(boolean includePathDeserializer, boolean includeResponseDeserializer) {
        return create(new YAMLFactory(), includePathDeserializer, includeResponseDeserializer);
    }

    private static ObjectMapper create(JsonFactory jsonFactory, boolean includePathDeserializer,
            boolean includeResponseDeserializer) {
        ObjectMapper mapper = jsonFactory == null ? new ObjectMapper() : new ObjectMapper(jsonFactory);

        Module deserializerModule = new DeserializationModule(includePathDeserializer, includeResponseDeserializer);
        mapper.registerModule(deserializerModule);
        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
        mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
        mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

        return mapper;
    }
}


text:
Author: xiaotaw@qq.com (Any bug report is welcome)

Time Created: Aug 2016

Time Updated: Dec 2016

Addr: Shenzhen, China

Description: We attempt to explore ChEMBL's Inhibitors by deep neural network

Website: https://xiaotaw.github.io/chembl/

# Background
  (add background for using DNN and RF to build this qsar model)

# Problem
  (add one sentence abstract for current challenge)

# Solution
  (how we solve the problem)

# Method

## 1 get data
     1.1 positive dataset was downloaded from chembl database
     1.2 negtive dataset was selected from pubchem and chembl database(based on a reasonable assumption that almost the compound in pubchem was NOT the substrate of a protein kinase)

## 2 build the model
     2.1 deep neural network(based on tensorflow)
     2.2 random forest(based on scikit-learn)
     2.3 a 'Tree' comprises one 'Term' and several 'Branches', where the 'Term' extracts the mutual figures of all the protein kinase.

## 3 train and evaluation
     3.1 we train the model seperately and jointly, and then apply the model on pubchem dataset for virtual screening.


text:
import Component from '@ember/component';
import { tagName } from '@ember-decorators/component';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';

/**
 Component for a dropdown menu divider.

 See [Components.Dropdown](Components.Dropdown.html) for examples.

 @class DropdownMenuDivider
 @namespace Components
 @extends Ember.Component
 @public
 */
@tagName('')
@deprecateSubclassing
export default class DropdownMenuDivider extends Component {}


text:
![status: inactive](https://img.shields.io/badge/status-inactive-red.svg)

This project is no longer actively maintained, and remains here as an archive of this work.

# Friendly Ping

Friendly Ping demonstrates using GCM, Analytics, Sign In and AdMob together in a single application.

You can use this as a reference for how to implement your own basic application.

## Getting started

Clone the code of the project:

    git clone https://github.com/googlesamples/friendlyPing.git

To get started, you need to enable Google services for your app for at least one of the two
available clients.

### Android

Get a configuration file for your android app opening the following link in a new tab:
[https://developers.google.com/mobile/add](https://developers.google.com/mobile/add)

Use `com.google.samples.apps.friendlyping` as package name when creating your project, and enable
the following APIs:

- Google Sign-In
- Cloud Messaging
- Analytics
- AdMob

Download the google-services.json file into `friendlyPing/android/app/`
If you want to check out the code, open Android Studio, select **File > Open**, browse to where you
cloned the friendlyPing repository, and open friendlyPing/android (if you are in the Android Studio
start screen, you can select **Open an existing Android Studio project** and use this same path).
Don't build and run the client until you have one of the server running.

Note: if Android Studio cannot resolve `@string/test_banner_ad_unit_id`, it should not be a problem
and you should still be able to build and run the app.

### iOS

Make sure you have [CocoaPods](https://developers.google.com/ios/cocoapods).

Open a terminal window and navigate to `friendlyPing/ios`, then run:

    pod install

This creates a `FriendlyPing.xcworkspace` file in the folder. Run the following command to open the
project in xcode:

    open FriendlyPing.xcworkspace

Get a configuration file for your iOS app opening the following link in a new tab:
[https://developers.google.com/mobile/add](https://developers.google.com/mobile/add)

To configure the project, you need to provide a valid APNs certificate and some additional information
to get a configuration file and finish setting up your project. If you don't already have an APNs certificate
see [Provisioning APNs SSL Certificates](https://developers.google.com/cloud-messaging/ios/certs).
When prompted, provide the Bundle ID associated with your APNs certificate, and enable the following
APIs:

- Google Sign-In
- Cloud Messaging
- Analytics
- AdMob

Download the `GoogleService-Info.plist` file to your mac, then add it to the `FriendlyPingSwift` target
in the xcode project.
To configure Google Sign-In:

- In the **Project > Target > Info > URL Types** panel, create a new item and paste your
`REVERSED_CLIENT_ID` into the URL Schemes field. You can find your `REVERSED_CLIENT_ID` in the `GoogleService-Info.plist` file.
- Also in the **Project > Target > Info > URL Types** panel, create a new item and type your bundle identifier
in the **URL Schemes** field.

Don't build and run the client until you have one of the servers running. Don't run 2 servers though :).

### Go server

Read the [Go server instructions](server/Go/README.md) to start up the Go server locally on your machine.

### Java server

Read the [Java server instructions](server/Java/README.md) to start up the Java server locally on your machine.

## How to make contributions?
Please read and follow the steps in the [CONTRIBUTING.md](CONTRIBUTING.md)

## License
See [LICENSE](LICENSE)


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../nitro/enum.OptionLoaned.html">

Redirecting to ../../nitro/enum.OptionLoaned.html...


text:
/**
 * Builds a dom environment.
 *
 *     Dom = require('./support/domenv')
 *     Dom.scripts = {
 *       'jq-2.0': fs.readFileSync('vendor/jquery-2.0.js')
 *       'spine':  fs.readFileSync('vendor/spinejs-1.2.0.js')
 *     }
 *
 *     before(Dom(['jq-2.0', 'spine']));
 */

var domEnv = module.exports = function (scripts) {
  return function (done) {
    return require('jsdom').env({
      html: domEnv.html,
      src: scripts.map(function (n) {
        return domEnv.scripts[n];
      }),
      done: function (errors, window) {
        window.console = {
          log: function () {},
          error: console.error
        };
        global.window = window;
        domEnv.export.forEach(function (name) {
          global[name] = window[name];
        });
        if (errors) errors.forEach(console.log);
        return done(errors);
      }
    });
  };
};

/**
 * HTML to load
 */

domEnv.html = '<!doctype html>';

/**
 * Export these to global
 */

domEnv.export = ['jQuery', '$'];

/**
 * Script sources
 */

domEnv.scripts = {};


text:
class SessionsController < ApplicationController
  skip_before_action :check_login
  skip_load_and_authorize_resource

  def create
    user = User.from_omniauth(env["omniauth.auth"])
  rescue => error
    flash[:error] = "You don't have access to the system."
  else
    session[:user_id] = user.id
  ensure
    redirect_to root_url
  end

  def destroy
    session[:user_id] = nil
    redirect_to root_url
  end
end


text:
package net.atoom.android.l2.feed;

public class L2FeedEntryComment {

	private String m_author;
	private String m_body;
	private String m_date;

	public L2FeedEntryComment() {
	}

	public String getAuthor() {
		return m_author;
	}

	public void setAuthor(String author) {
		m_author = author;
	}

	public String getBody() {
		return m_body;
	}

	public void setBody(String body) {
		m_body = body;
	}

	public String getDate() {
		return m_date;
	}

	public void setDate(String date) {
		m_date = date;
	}
}


text:
// This file is automatically generated.

package adila.db;

/*
 * LG G4
 *
 * DEVICE: p1
 * MODEL: LG-AS991
 */
final class p1_lg2das991 {
    public static final String DATA = "LG|G4|";
}


text:
<!DOCTYPE html>

    <title>Dashboard - Canvas Admin</title>
	<meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="">
	<meta name="author" content="" />
	 <link rel="stylesheet" type="text/css" href="<?=base_url('assets\css\bootstrap.min.css')?>">
      <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,800italic,400,600,800" type="text/css">
    <link rel="stylesheet" href="<?=base_url('assets/admin/canvas/css/font-awesome.min.css');?>" type="text/css" />
    <link rel="stylesheet" href="<?=base_url('assets/admin/canvas/css/bootstrap.min.css')?>" type="text/css" />
    <link rel="stylesheet" href="<?=base_url('assets/grocery_crud/css/jquery_plugins/fancybox/jquery.fancybox.css')?>" type="text/css" />
    <link rel="stylesheet" href="<?=base_url('assets/admin/canvas/css/App.css')?>" type="text/css" />
    <link rel="stylesheet" href="<?=base_url('assets/admin/canvas/css/custom.css')?>" type="text/css" />

    <?php $this->load->view('admin/partials/nav'); ?>
    <?php $this->load->view('admin/partials/sidebar'); ?>
    <?php if(isset($template)): ?>

    	<?php $this->load->view("admin/{$template}"); ?>

    <?php endif; ?>


text:
"""
Created on Mon Mar 28 13:38:04 2016

@author: juanpablo
"""

import pandas as pd
import geopandas as gpd
import shapely.geometry as geom
import mplleaflet
import pylab as pl
import numpy as np

foursquare = pd.read_csv('NY_all.csv')
food = foursquare[(foursquare.genCategory == "Food") & (foursquare.rating !=-1)]
food[['lon']] = food[['lon']].astype(float)
longlat = food[['lon', 'lat']]
points = map(geom.Point, longlat.as_matrix().tolist())
gpos = gpd.GeoSeries(points)
epsg4326 = {'init': 'epsg:4326'}
gpos.crs = epsg4326
projectedPos = gpos.to_crs(epsg=2263)
shapefile = gpd.read_file('nybb_16a/nybb1.shp')
intersect = projectedPos.intersects(shapefile.unary_union)# define the intersection of
#all polygon with each geopolypoints.
np.sum(intersect) # find out the number of true values in the array
intersectdf = pd.DataFrame(intersect, columns = ['boolean'])
food = food.reset_index()
del food['index']
food = pd.concat([food, intersectdf], axis=1)
food.boolean = food.boolean.astype(str)
food = food[(food.boolean == "True")]
food[['lon']] = food[['lon']].astype(float)
longlat = food[['lon', 'lat']]
points = map(geom.Point, longlat.as_matrix().tolist())
gpos = gpd.GeoSeries(points)
epsg4326 = {'init': 'epsg:4326'}
gpos.crs = epsg4326
projectedPos = gpos.to_crs(epsg=2263)
#projectedPos.buffer(1000, resolution=1).plot(figsize=(8,8))
#mplleaflet.display(crs=projectedPos.crs)
pl.figure()
projectedPos.plot(k=100, alpha=1.0, figsize=(8,8))
pl.grid()
pl.show()


text:
namespace Klampt {

class GLUTGUI : public GenericGUIBase, public GLUTProgramBase
{
 public:
  GLUTGUI(GenericBackendBase* backend=NULL,int w=800,int h=600);
  virtual ~GLUTGUI() {}
  //if you want to set up the window title, it must be called before Run()
  void SetWindowTitle(const char* title) { window_title = title; }
  //if you want to set up the display mode, it must be called before Run()
  void SetDisplayMode(int mode) { displayMode = mode; }

  ///Subclasses: put GL initialization code here
  virtual bool Initialize();
  virtual void Handle_Display();
  virtual void Handle_Reshape(int w,int h);
  virtual void Handle_Keypress(unsigned char key,int x,int y);
  virtual void Handle_KeypressUp(unsigned char key,int x,int y);
  virtual void Handle_Special(int key,int x,int y);
  virtual void Handle_SpecialUp(int key,int x,int y);
  virtual void Handle_Click(int button,int state,int x,int y);
  virtual void Handle_Drag(int x,int y);
  virtual void Handle_Motion(int x,int y);
  virtual void Handle_Idle();

  virtual void Run();
  virtual bool OnQuit();
  virtual bool OnNotify(const string& text,const string& msglevel);
  virtual bool OnPauseIdle(double secs);
  virtual bool OnRefresh();
  virtual bool OnDrawText(double x, double y, double z, const std::string &text, int height);
  virtual bool OnDrawText(int x, int y, const std::string &text, int height);

  string window_title;
  unsigned int displayMode;
};

} //namespace Klampt

#endif


text:
using content::PasswordForm;

class TestPasswordManagerDelegate : public PasswordManagerDelegate {
 public:
  explicit TestPasswordManagerDelegate(Profile* profile) : profile_(profile) {}

  virtual void FillPasswordForm(
      const PasswordFormFillData& form_data) OVERRIDE {}
  virtual void AddSavePasswordInfoBarIfPermitted(
      PasswordFormManager* form_to_save) OVERRIDE {}
  virtual Profile* GetProfile() OVERRIDE { return profile_; }
  virtual bool DidLastPageLoadEncounterSSLErrors() OVERRIDE { return false; }

 private:
  Profile* profile_;
};

class TestPasswordManager : public PasswordManager {
 public:
  explicit TestPasswordManager(PasswordManagerDelegate* delegate)
    : PasswordManager(NULL, delegate) {}

  virtual void Autofill(
      const content::PasswordForm& form_for_autofill,
      const content::PasswordFormMap& best_matches,
      const content::PasswordForm& preferred_match,
      bool wait_for_username) const OVERRIDE {}
};

class TestPasswordFormManager : public PasswordFormManager {
 public:
  TestPasswordFormManager(Profile* profile,
                          PasswordManager* manager,
                          const content::PasswordForm& observed_form,
                          bool ssl_valid)
    : PasswordFormManager(profile, manager, NULL, observed_form, ssl_valid),
      num_sent_messages_(0) {}

  virtual void SendNotBlacklistedToRenderer() OVERRIDE {
    ++num_sent_messages_;
  }

  size_t num_sent_messages() {
    return num_sent_messages_;
  }

 private:
  size_t num_sent_messages_;
};

class PasswordFormManagerTest : public testing::Test {
 public:
  PasswordFormManagerTest() {
  }
  virtual void SetUp() {
    observed_form_.origin = GURL("http://www.google.com/a/LoginAuth");
    observed_form_.action = GURL("http://www.google.com/a/Login");
    observed_form_.username_element = ASCIIToUTF16("Email");
    observed_form_.password_element = ASCIIToUTF16("Passwd");
    observed_form_.submit_element = ASCIIToUTF16("signIn");
    observed_form_.signon_realm = "http://www.google.com";

    saved_match_ = observed_form_;
    saved_match_.origin = GURL("http://www.google.com/a/ServiceLoginAuth");
    saved_match_.action = GURL("http://www.google.com/a/ServiceLogin");
    saved_match_.preferred = true;
    saved_match_.username_value = ASCIIToUTF16("test@gmail.com");
    saved_match_.password_value = ASCIIToUTF16("test1");
    profile_ = new TestingProfile();
  }

  virtual void TearDown() {
    delete profile_;
  }

  PasswordForm* GetPendingCredentials(PasswordFormManager* p) {
    return &p->pending_credentials_;
  }

  void SimulateMatchingPhase(PasswordFormManager* p, bool find_match) {
    // Roll up the state to mock out the matching phase.
    p->state_ = PasswordFormManager::POST_MATCHING_PHASE;
    if (!find_match)
      return;

    PasswordForm* match = new PasswordForm(saved_match_);
    // Heap-allocated form is owned by p.
    p->best_matches_[match->username_value] = match;
    p->preferred_match_ = match;
  }

  void SimulateFetchMatchingLoginsFromPasswordStore(
      PasswordFormManager* manager) {
    // Just need to update the internal states.
    manager->state_ = PasswordFormManager::MATCHING_PHASE;
  }

  void SimulateResponseFromPasswordStore(
      PasswordFormManager* manager,
      const std::vector<PasswordForm*>& result) {
    // Simply call the callback method when request done. This will transfer
    // the ownership of the objects in |result| to the |manager|.
    manager->OnGetPasswordStoreResults(result);
  }

  bool IgnoredResult(PasswordFormManager* p, PasswordForm* form) {
    return p->IgnoreResult(*form);
  }

  Profile* profile() { return profile_; }

  PasswordForm* observed_form() { return &observed_form_; }
  PasswordForm* saved_match() { return &saved_match_; }
  PasswordForm* CreateSavedMatch(bool blacklisted) {
    // Owned by the caller of this method.
    PasswordForm* match = new PasswordForm(saved_match_);
    match->blacklisted_by_user = blacklisted;
    return match;
  }

 private:
  PasswordForm observed_form_;
  PasswordForm saved_match_;
  Profile* profile_;
};

TEST_F(PasswordFormManagerTest, TestNewLogin) {
  PasswordFormManager* manager = new PasswordFormManager(
      profile(), NULL, NULL, *observed_form(), false);
  SimulateMatchingPhase(manager, false);
  // User submits credentials for the observed form.
  PasswordForm credentials = *observed_form();
  credentials.username_value = saved_match()->username_value;
  credentials.password_value = saved_match()->password_value;
  credentials.preferred = true;
  manager->ProvisionallySave(credentials);

  // Successful login. The PasswordManager would instruct PasswordFormManager
  // to save, which should know this is a new login.
  EXPECT_TRUE(manager->IsNewLogin());
  // Make sure the credentials that would be submitted on successful login
  // are going to match the stored entry in the db.
  EXPECT_EQ(observed_form()->origin.spec(),
            GetPendingCredentials(manager)->origin.spec());
  EXPECT_EQ(observed_form()->signon_realm,
            GetPendingCredentials(manager)->signon_realm);
  EXPECT_EQ(observed_form()->action,
              GetPendingCredentials(manager)->action);
  EXPECT_TRUE(GetPendingCredentials(manager)->preferred);
  EXPECT_EQ(saved_match()->password_value,
            GetPendingCredentials(manager)->password_value);
  EXPECT_EQ(saved_match()->username_value,
            GetPendingCredentials(manager)->username_value);

  // Now, suppose the user re-visits the site and wants to save an additional
  // login for the site with a new username. In this case, the matching phase
  // will yield the previously saved login.
  SimulateMatchingPhase(manager, true);
  // Set up the new login.
  string16 new_user = ASCIIToUTF16("newuser");
  string16 new_pass = ASCIIToUTF16("newpass");
  credentials.username_value = new_user;
  credentials.password_value = new_pass;
  manager->ProvisionallySave(credentials);

  // Again, the PasswordFormManager should know this is still a new login.
  EXPECT_TRUE(manager->IsNewLogin());
  // And make sure everything squares up again.
  EXPECT_EQ(observed_form()->origin.spec(),
            GetPendingCredentials(manager)->origin.spec());
  EXPECT_EQ(observed_form()->signon_realm,
            GetPendingCredentials(manager)->signon_realm);
  EXPECT_TRUE(GetPendingCredentials(manager)->preferred);
  EXPECT_EQ(new_pass,
            GetPendingCredentials(manager)->password_value);
  EXPECT_EQ(new_user,
            GetPendingCredentials(manager)->username_value);
  // Done.
  delete manager;
}

TEST_F(PasswordFormManagerTest, TestUpdatePassword) {
  // Create a PasswordFormManager with observed_form, as if we just
  // saw this form and need to find matching logins.
  PasswordFormManager* manager = new PasswordFormManager(
      profile(), NULL, NULL, *observed_form(), false);
  SimulateMatchingPhase(manager, true);

  // User submits credentials for the observed form using a username previously
  // stored, but a new password. Note that the observed form may have different
  // origin URL (as it does in this case) than the saved_match, but we want to
  // make sure the updated password is reflected in saved_match, because that is
  // what we autofilled.
  string16 new_pass = ASCIIToUTF16("newpassword");
  PasswordForm credentials = *observed_form();
  credentials.username_value = saved_match()->username_value;
  credentials.password_value = new_pass;
  credentials.preferred = true;
  manager->ProvisionallySave(credentials);

  // Successful login. The PasswordManager would instruct PasswordFormManager
  // to save, and since this is an update, it should know not to save as a new
  // login.
  EXPECT_FALSE(manager->IsNewLogin());

  // Make sure the credentials that would be submitted on successful login
  // are going to match the stored entry in the db. (This verifies correct
  // behaviour for bug 1074420).
  EXPECT_EQ(GetPendingCredentials(manager)->origin.spec(),
            saved_match()->origin.spec());
  EXPECT_EQ(GetPendingCredentials(manager)->signon_realm,
            saved_match()->signon_realm);
  EXPECT_TRUE(GetPendingCredentials(manager)->preferred);
  EXPECT_EQ(new_pass,
            GetPendingCredentials(manager)->password_value);
  // Done.
  delete manager;
}

TEST_F(PasswordFormManagerTest, TestIgnoreResult) {
  PasswordFormManager* manager = new PasswordFormManager(
      profile(), NULL, NULL, *observed_form(), false);
  // Make sure we don't match a PasswordForm if it was originally saved on
  // an SSL-valid page and we are now on a page with invalid certificate.
  saved_match()->ssl_valid = true;
  EXPECT_TRUE(IgnoredResult(manager, saved_match()));

  saved_match()->ssl_valid = false;
  // Different paths for action / origin are okay.
  saved_match()->action = GURL("http://www.google.com/b/Login");
  saved_match()->origin = GURL("http://www.google.com/foo");
  EXPECT_FALSE(IgnoredResult(manager, saved_match()));

  // Done.
  delete manager;
}

TEST_F(PasswordFormManagerTest, TestEmptyAction) {
  scoped_ptr<PasswordFormManager> manager(new PasswordFormManager(
      profile(), NULL, NULL, *observed_form(), false));

  saved_match()->action = GURL();
  SimulateMatchingPhase(manager.get(), true);
  // User logs in with the autofilled username / password from saved_match.
  PasswordForm login = *observed_form();
  login.username_value = saved_match()->username_value;
  login.password_value = saved_match()->password_value;
  manager->ProvisionallySave(login);
  EXPECT_FALSE(manager->IsNewLogin());
  // We bless our saved PasswordForm entry with the action URL of the
  // observed form.
  EXPECT_EQ(observed_form()->action,
            GetPendingCredentials(manager.get())->action);
}

TEST_F(PasswordFormManagerTest, TestUpdateAction) {
  scoped_ptr<PasswordFormManager> manager(new PasswordFormManager(
      profile(), NULL, NULL, *observed_form(), false));

  SimulateMatchingPhase(manager.get(), true);
  // User logs in with the autofilled username / password from saved_match.
  PasswordForm login = *observed_form();
  login.username_value = saved_match()->username_value;
  login.password_value = saved_match()->password_value;

  manager->ProvisionallySave(login);
  EXPECT_FALSE(manager->IsNewLogin());
  // The observed action URL is different from the previously saved one, and
  // is the same as the one that would be submitted on successful login.
  EXPECT_NE(observed_form()->action, saved_match()->action);
  EXPECT_EQ(observed_form()->action,
            GetPendingCredentials(manager.get())->action);
}

TEST_F(PasswordFormManagerTest, TestDynamicAction) {
  scoped_ptr<PasswordFormManager> manager(new PasswordFormManager(
      profile(), NULL, NULL, *observed_form(), false));

  SimulateMatchingPhase(manager.get(), false);
  PasswordForm login(*observed_form());
  // The submitted action URL is different from the one observed on page load.
  GURL new_action = GURL("http://www.google.com/new_action");
  login.action = new_action;

  manager->ProvisionallySave(login);
  EXPECT_TRUE(manager->IsNewLogin());
  // Check that the provisionally saved action URL is the same as the submitted
  // action URL, not the one observed on page load.
  EXPECT_EQ(new_action,
            GetPendingCredentials(manager.get())->action);
}

TEST_F(PasswordFormManagerTest, TestValidForms) {
  // User submits credentials for the observed form.
  PasswordForm credentials = *observed_form();
  credentials.scheme = PasswordForm::SCHEME_HTML;
  credentials.username_value = saved_match()->username_value;
  credentials.password_value = saved_match()->password_value;

  // Form with both username_element and password_element.
  PasswordFormManager manager1(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager1, false);
  EXPECT_TRUE(manager1.HasValidPasswordForm());

  // Form without a username_element but with a password_element.
  credentials.username_element.clear();
  PasswordFormManager manager2(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager2, false);
  EXPECT_FALSE(manager2.HasValidPasswordForm());

  // Form without a password_element but with a username_element.
  credentials.username_element = saved_match()->username_element;
  credentials.password_element.clear();
  PasswordFormManager manager3(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager3, false);
  EXPECT_FALSE(manager3.HasValidPasswordForm());

  // Form with neither a password_element nor a username_element.
  credentials.username_element.clear();
  credentials.password_element.clear();
  PasswordFormManager manager4(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager4, false);
  EXPECT_FALSE(manager4.HasValidPasswordForm());
}

TEST_F(PasswordFormManagerTest, TestValidFormsBasic) {
  // User submits credentials for the observed form.
  PasswordForm credentials = *observed_form();
  credentials.scheme = PasswordForm::SCHEME_BASIC;
  credentials.username_value = saved_match()->username_value;
  credentials.password_value = saved_match()->password_value;

  // Form with both username_element and password_element.
  PasswordFormManager manager1(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager1, false);
  EXPECT_TRUE(manager1.HasValidPasswordForm());

  // Form without a username_element but with a password_element.
  credentials.username_element.clear();
  PasswordFormManager manager2(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager2, false);
  EXPECT_TRUE(manager2.HasValidPasswordForm());

  // Form without a password_element but with a username_element.
  credentials.username_element = saved_match()->username_element;
  credentials.password_element.clear();
  PasswordFormManager manager3(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager3, false);
  EXPECT_TRUE(manager3.HasValidPasswordForm());

  // Form with neither a password_element nor a username_element.
  credentials.username_element.clear();
  credentials.password_element.clear();
  PasswordFormManager manager4(profile(), NULL, NULL, credentials, false);
  SimulateMatchingPhase(&manager4, false);
  EXPECT_TRUE(manager4.HasValidPasswordForm());
}

TEST_F(PasswordFormManagerTest, TestSendNotBlacklistedMessage) {
  // A dumb password manager.
  TestPasswordManagerDelegate delegate(profile());
  TestPasswordManager password_manager(&delegate);

  // First time sign up attempt; No login result is found from password store;
  // We should send the not blacklisted message.
  scoped_ptr<TestPasswordFormManager> manager(new TestPasswordFormManager(
      profile(), &password_manager, *observed_form(), false));
  SimulateFetchMatchingLoginsFromPasswordStore(manager.get());
  std::vector<PasswordForm*> result;
  SimulateResponseFromPasswordStore(manager.get(), result);
  EXPECT_EQ(1u, manager->num_sent_messages());

  // Sign up attempt to previously visited sites; Login result is found from
  // password store, and is not blacklisted; We should send the not blacklisted
  // message.
  manager.reset(new TestPasswordFormManager(
      profile(), &password_manager, *observed_form(), false));
  SimulateFetchMatchingLoginsFromPasswordStore(manager.get());
  // We need add heap allocated objects to result.
  result.push_back(CreateSavedMatch(false));
  SimulateResponseFromPasswordStore(manager.get(), result);
  EXPECT_EQ(1u, manager->num_sent_messages());

  // Sign up attempt to previously visited sites; Login result is found from
  // password store, but is blacklisted; We should not send the not blacklisted
  // message.
  manager.reset(new TestPasswordFormManager(
      profile(), &password_manager, *observed_form(), false));
  SimulateFetchMatchingLoginsFromPasswordStore(manager.get());
  result.clear();
  result.push_back(CreateSavedMatch(true));
  SimulateResponseFromPasswordStore(manager.get(), result);
  EXPECT_EQ(0u, manager->num_sent_messages());
}


text:
import React from 'react'
import { Navbar } from 'react-bootstrap';

export default (props) => {
	return (
		<Navbar.Header>
        	<Navbar.Brand className="animated slideInRight">
        		{props.title}
          </Navbar.Brand>
    </Navbar.Header>
		)
}


text:
<?php
/**
 * UserController
 *
 * @author Anthony Umpad
 */

namespace App\Http\Controllers\SuperAdmin;

use App\Http\Controllers\Controller;
use Cartalyst\Sentinel\Laravel\Facades\Sentinel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Redirect;
use App\Exceptions\ValidationException;
use App\Services\UserValidator;
use App\Repositories\UserRepository;
use App\Models\User;
use App\Models\Category;
use View;
use Log;
use Illuminate\Support\Facades\Session;
use Webpatser\Uuid\Uuid;

/**
 * Class UserController
 * @package App\Http\Controllers\Admin
 *
 * This handles all User requests
 */
class UserController extends Controller
{

    /**
     * constructor
     *
     * Inject some dependency
     */
    public function __construct(UserValidator $userValidator, UserRepository $userRepository)
    {
        $this->userValidator  = $userValidator;
        $this->userRepository = $userRepository;
    }

    /**
     * all
     *
     * This renders the users index page
     *
     * @return \Illuminate\View\View
     */
    public function all(Request $request)
    {
        $users = $this->userRepository->paginatedList($request);

        //frontend data
        $data = [
            'users'  => $users,
            'limit'  => (! empty($request->get('limit')))   ? $request->get('limit') : '10',
            'sortBy' => (! empty($request->get('sortBy')))  ? $request->get('sortBy') : 'sortByDateDesc',
        ];

        if (Session::has('flash_message')) {
           $data['flash_message'] = Session::get('flash_message');
        }
        return View::make('superadmin.user.list')
            ->with($data);
    }

    /**
     * createAction
     *
     * This renders the user create page
     *
     * @return \Illuminate\View\View
     */
    public function createAction()
    {
        return View::make('superadmin.user.create-update')
            ->with('action', 'Create');
    }

    /**
     * editAction
     *
     * This renders the user edit page
     *
     * @return \Illuminate\View\View
     */
    public function editAction($userUid)
    {
        $editUser = User::with('roles')
            ->where('uid', $userUid)
            ->first();

        if (empty($editUser)) {
            return View::make('superadmin.user.create-update')
                ->with('action', 'Create');
        }

        return View::make('superadmin.user.create-update')
            ->with([
                'blogUser' => $editUser,
                'action'   =>'Edit'
            ]);
    }

    /**
     * create
     *
     * This creates a new user for the site
     *
     * @param Request $request
     */
    public function create(Request $request)
    {
        try {
            $this->userValidator->validate($request->all());
        } catch (ValidationException $e) {
            $errors      = $e->getErrorList();
            $error_array = [];
            foreach ($errors as $field => $errormessage) {
                $error_array[] =  $field .":" .$errormessage[0];
            }
            return Redirect::back()
                ->withInput($request->except(['_token', '_url']))
                ->withErrors($error_array);
        } catch (\Exception $e) {
            Log::error(__CLASS__ . ':' . __TRAIT__ . ':' . __FILE__ . ':' . __LINE__ . ':' . __FUNCTION__ . ':' .
                'Create post  exception.', ['exception', $e->getMessage()]);
            return Redirect::back()
                ->withInput($request->except(['_token', '_url']))
                ->withErrors([$e->getMessage()]);
        }

        try {
          $newUser = $this->userRepository->createUpdate($request);
        } catch (\Exception $e) {
            Log::error(__CLASS__ . ':' . __TRAIT__ . ':' . __FILE__ . ':' . __LINE__ . ':' . __FUNCTION__ . ':' .
                'Create post  exception.', ['exception', $e->getMessage()]);
            return Redirect::back()
                ->withInput($request->except(['_token', '_url']))
                ->withErrors([$e->getMessage()]);
        }

        return Redirect::route('superadmin.user.get.list')
            ->with('flash_message', [
            'status'  => 'success',
            'message' => 'User '. $request->get('username') .' was successfully added/updated.'
         ]);
    }
}


text:
package com.oracle.truffle.llvm.types.floating.test;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import com.oracle.truffle.llvm.types.floating.LLVM80BitFloat;

public class LLVM80BitFromStringTest extends LLVM80BitTest {

    @Test
    public void testPositiveInt() {
        String test = "40099A40000000000000";
        assertEquals(val(1234), LLVM80BitFloat.fromString(test));
    }

    @Test
    public void testNegativeInt() {
        String test = "C0099A40000000000000";
        assertEquals(val(-1234), LLVM80BitFloat.fromString(test));
    }

    @Test
    public void testZero() {
        String test = "00000000000000000000";
        assertEquals(zero(), LLVM80BitFloat.fromString(test));
    }

    @Test
    public void testMinusZero() {
        String test = "BFFF8000000000000000";
        assertEquals(minusOne(), LLVM80BitFloat.fromString(test));
    }

    @Test
    public void testPi() {
        String test = "4000C90FDAA22168C235";
        assertEquals(LLVM80BitFloat.fromRawValues(false, 0x4000, 0xc90fdaa22168c235L), LLVM80BitFloat.fromString(test));
    }

    @Test
    public void testMinusOne() {
        String test = "BFFF8000000000000000";
        assertEquals(LLVM80BitFloat.fromRawValues(true, 0x3fff, 0x8000000000000000L), LLVM80BitFloat.fromString(test));
    }

}


text:
/// <reference path="ControlElement.ts"/>
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
// namespace
var cf;
(function (cf) {
    // interface
    // class
    var Button = (function (_super) {
        __extends(Button, _super);
        function Button(options) {
            var _this = _super.call(this, options) || this;
            _this.clickCallback = _this.onClick.bind(_this);
            _this.el.addEventListener("click", _this.clickCallback, false);
            _this.mouseDownCallback = _this.onMouseDown.bind(_this);
            _this.el.addEventListener("mousedown", _this.mouseDownCallback, false);
            //image
            _this.checkForImage();
            return _this;
        }
        Object.defineProperty(Button.prototype, "type", {
            get: function () {
                return "Button";
            },
            enumerable: true,
            configurable: true
        });
        Button.prototype.hasImage = function () {
            return this.referenceTag.hasImage;
        };
        /**
        * @name checkForImage
        * checks if element has cf-image, if it has then change UI
        */
        Button.prototype.checkForImage = function () {
            var hasImage = this.hasImage();
            if (hasImage) {
                this.el.classList.add("has-image");
                this.imgEl = document.createElement("img");
                this.imageLoadedCallback = this.onImageLoaded.bind(this);
                this.imgEl.classList.add("cf-image");
                this.imgEl.addEventListener("load", this.imageLoadedCallback, false);
                this.imgEl.src = this.referenceTag.domElement.getAttribute("cf-image");
                this.el.insertBefore(this.imgEl, this.el.children[0]);
            }
        };
        Button.prototype.onImageLoaded = function () {
            this.imgEl.classList.add("loaded");
            this.eventTarget.dispatchEvent(new CustomEvent(cf.ControlElementEvents.ON_LOADED, {}));
        };
        Button.prototype.onMouseDown = function (event) {
            event.preventDefault();
        };
        Button.prototype.onClick = function (event) {
            this.onChoose();
        };
        Button.prototype.dealloc = function () {
            this.el.removeEventListener("click", this.clickCallback, false);
            this.clickCallback = null;
            if (this.imageLoadedCallback) {
                this.imgEl.removeEventListener("load", this.imageLoadedCallback, false);
                this.imageLoadedCallback = null;
            }
            this.el.removeEventListener("mousedown", this.mouseDownCallback, false);
            this.mouseDownCallback = null;
            _super.prototype.dealloc.call(this);
        };
        // override
        Button.prototype.getTemplate = function () {
            return "<cf-button class=\"cf-button\">\n\t\t\t\t" + this.referenceTag.label + "\n\t\t\t</cf-button>\n\t\t\t";
        };
        return Button;
    }(cf.ControlElement));
    cf.Button = Button;
})(cf || (cf = {}));


text:
{% extends 'base.html' %}
{% block content %}

Home
› Consultant Forms
› Service & Meeting Forms

DUE DILIGENCE FORMS

<button class="accordion">  FINALIZED FORMS: {{dueforms.count}}</button>
{% if dueforms.count > 0 %}

{% for dueform in dueforms %}

    {{dueform.form_name}}

{% endfor %}

{% else %}

    None

{% endif %}

SCRIPT AND CONTROL FORMS

<button class="accordion">  FINALIZED FORMS: {{scriptforms.count}}</button>
{% if scriptforms.count > 0 %}

{% for scriptform in scriptforms %}

    {{scriptform.form_name}}

{% endfor %}

{% else %}

    None

{% endif %}

STRATEGY FORMS

<button class="accordion">  FINALIZED FORMS: {{strategies.count}}</button>
{% if strategies.count > 0 %}

{% for strategy in strategies %}

    {{strategy.form_name}}

{% endfor %}

{% else %}

    None

{% endif %}

PROBLEM SOLVING FORMS

<button class="accordion">  FINALIZED FORMS: {{psforms.count}}</button>
{% if psforms.count > 0 %}

{% for psform in psforms %}

    {{psform.form_name}}

{% endfor %}

{% else %}

    None

{% endif %}

DIGITALIZATION FORMS

<button class="accordion">  FINALIZED FORMS: {{digiforms.count}}</button>
{% if digiforms.count > 0 %}

{% for digiform in digiforms %}

    {{digiform.form_name}}

{% endfor %}

{% else %}

    None

{% endif %}

MINUTE OF MEETING FORMS

<button class="accordion">  FINALIZED FORMS: {{miomforms.count}}</button>
{% if miomforms.count > 0 %}

{% for miomform in miomforms %}

    {{miomform.form_name}}

{% endfor %}

{% else %}

    None

{% endif %}

{% endblock %}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Nat. Arr. Brit. Pl. (London) 1: 619 (1821)

#### Original name
Agaricus epipterygius Scop., 1772

### Remarks
null


text:
namespace Poco {
namespace Net {

class HTTPRequest;
class HTTPResponse;

class Net_API HTTPAuthenticationParams: public NameValueCollection
	/// Collection of name-value pairs of HTTP authentication header (i.e.
	/// "realm", "qop", "nonce" in case of digest authentication header).
{
public:
	HTTPAuthenticationParams();
		/// Creates an empty authentication parameters collection.

	explicit HTTPAuthenticationParams(const std::string& authInfo);
		/// See fromAuthInfo() documentation.

	explicit HTTPAuthenticationParams(const HTTPRequest& request);
		/// See fromRequest() documentation.

	HTTPAuthenticationParams(const HTTPResponse& response, const std::string& header = WWW_AUTHENTICATE);
		/// See fromResponse() documentation.

	virtual ~HTTPAuthenticationParams();
		/// Destroys the HTTPAuthenticationParams.

	HTTPAuthenticationParams& operator = (const HTTPAuthenticationParams& authParams);
		/// Assigns the content of another HTTPAuthenticationParams.

	void fromAuthInfo(const std::string& authInfo);
		/// Creates an HTTPAuthenticationParams by parsing authentication
		/// information.

	void fromRequest(const HTTPRequest& request);
		/// Extracts authentication information from the request and creates
		/// HTTPAuthenticationParams by parsing it.
		///
		/// Throws a NotAuthenticatedException if no authentication
		/// information is contained in request.
		/// Throws a InvalidArgumentException if authentication scheme is
		/// unknown or invalid.

	void fromResponse(const HTTPResponse& response, const std::string& header = WWW_AUTHENTICATE);
		/// Extracts authentication information from the response and creates
		/// HTTPAuthenticationParams by parsing it.
		///
		/// Throws a NotAuthenticatedException if no authentication
		/// information is contained in response.
		/// Throws a InvalidArgumentException if authentication scheme is
		/// unknown or invalid.

	void setRealm(const std::string& realm);
		/// Sets the "realm" parameter to the provided string.

	const std::string& getRealm() const;
		/// Returns value of the "realm" parameter.
		///
		/// Throws NotFoundException is there is no "realm" set in the
		/// HTTPAuthenticationParams.

	std::string toString() const;
		/// Formats the HTTPAuthenticationParams for inclusion in HTTP
		/// request or response authentication header.

	static const std::string REALM;
	static const std::string WWW_AUTHENTICATE;
	static const std::string PROXY_AUTHENTICATE;

private:
	void parse(std::string::const_iterator first, std::string::const_iterator last);
};

} } // namespace Poco::Net

#endif // Net_HTTPAuthenticationParams_INCLUDED


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NaturalSortingExample.xaml.cs" company="PropertyTools">
//   Copyright (c) 2014 PropertyTools contributors
// </copyright>
// <summary>
//   Interaction logic for NaturalSortingExample.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DataGridDemo
{
    using System.Collections.ObjectModel;
    using System.Windows;
    using System.Windows.Data;

    using PropertyTools;

    /// <summary>
    /// Interaction logic for NaturalSortingExample.
    /// </summary>
    public partial class NaturalSortingExample
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NaturalSortingExample" /> class.
        /// </summary>
        public NaturalSortingExample()
        {
            this.InitializeComponent();
            this.DataContext = new ViewModel();
            this.Loaded += (s, e) => this.ShowDebugWindow();
        }

        private void ShowDebugWindow()
        {
            var w = new Window { Title = this.Title + " (DataGrid)", Width = 400, Height = 300, DataContext = this.DataContext };
            var dg = new System.Windows.Controls.DataGrid();
            dg.SetBinding(System.Windows.Controls.ItemsControl.ItemsSourceProperty, new Binding("ItemsSource"));
            w.Content = dg;
            w.WindowStartupLocation = WindowStartupLocation.Manual;
            w.Left = this.Left + this.ActualWidth;
            w.Top = this.Top;
            w.Show();
        }

        public class ViewModel
        {
            public static ObservableCollection<Item> items = new ObservableCollection<Item>();

            static ViewModel()
            {
                items.Add(new Item { Integer = 1, String = "Number 1" });
                items.Add(new Item { Integer = 10, String = "Number 10" });
                items.Add(new Item { Integer = 2, String = "Number 2" });
                items.Add(new Item { Integer = 100, String = "Number 100" });
            }
            public ObservableCollection<Item> ItemsSource => items;

            public class Item : Observable
            {
                private int integer;

                private string @string;

                public int Integer
                {
                    get
                    {
                        return this.integer;
                    }

                    set
                    {
                        this.SetValue(ref this.integer, value);
                    }
                }

                public string String
                {
                    get
                    {
                        return this.@string;
                    }

                    set
                    {
                        this.SetValue(ref @string, value);
                    }
                }
            }
        }
    }
}


text:
#include <aws/wellarchitected/model/ListTagsForResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::WellArchitected::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

ListTagsForResourceResult::ListTagsForResourceResult()
{
}

ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("Tags"))
  {
    Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("Tags").GetAllObjects();
    for(auto& tagsItem : tagsJsonMap)
    {
      m_tags[tagsItem.first] = tagsItem.second.AsString();
    }
  }

  return *this;
}


text:
package com.intellij.ide.scratch;

import com.intellij.icons.AllIcons;
import com.intellij.lang.Language;
import com.intellij.openapi.application.Result;
import com.intellij.openapi.application.RunResult;
import com.intellij.openapi.command.UndoConfirmationPolicy;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.LayeredIcon;
import com.intellij.ui.UIBundle;
import com.intellij.util.ObjectUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

/**
 * @author gregsh
 */
public final class ScratchRootType extends RootType {
  @NotNull
  public static ScratchRootType getInstance() {
    return findByClass(ScratchRootType.class);
  }

  ScratchRootType() {
    super("scratches", "Scratches");
  }

  public boolean isScratchFile(@Nullable VirtualFile file) {
    if (file == null) return false;
    ScratchFileService service = ScratchFileService.getInstance();
    return service != null && service.getRootType(file) == this;
  }

  @Override
  public Language substituteLanguage(@NotNull Project project, @NotNull VirtualFile file) {
    Language language = ScratchFileService.getInstance().getScratchesMapping().getMapping(file);
    return substituteLanguageImpl(language, file, project);
  }

  @Nullable
  @Override
  public Icon substituteIcon(@NotNull Project project, @NotNull VirtualFile file) {
    Icon icon = ObjectUtils.chooseNotNull(super.substituteIcon(project, file), ScratchFileType.INSTANCE.getIcon());
    return LayeredIcon.create(icon, AllIcons.Actions.Scratch);
  }

  @Nullable
  public VirtualFile createScratchFile(Project project, final String fileName, final Language language, final String text) {
    return createScratchFile(project, fileName, language, text, ScratchFileService.Option.create_new_always);
  }

  @Nullable
  public VirtualFile createScratchFile(Project project,
                                       final String fileName,
                                       final Language language,
                                       final String text,
                                       final ScratchFileService.Option option) {
    RunResult<VirtualFile> result =
      new WriteCommandAction<VirtualFile>(project, UIBundle.message("file.chooser.create.new.file.command.name")) {
        @Override
        protected boolean isGlobalUndoAction() {
          return true;
        }

        @Override
        protected UndoConfirmationPolicy getUndoConfirmationPolicy() {
          return UndoConfirmationPolicy.REQUEST_CONFIRMATION;
        }

        @Override
        protected void run(@NotNull Result<VirtualFile> result) throws Throwable {
          ScratchFileService fileService = ScratchFileService.getInstance();
          VirtualFile file = fileService.findFile(ScratchRootType.this, fileName, option);
          fileService.getScratchesMapping().setMapping(file, language);
          VfsUtil.saveText(file, text);
          result.setResult(file);
        }
      }.execute();
    if (result.hasException()) {
      Messages.showMessageDialog(UIBundle.message("create.new.file.could.not.create.file.error.message", fileName),
                                 UIBundle.message("error.dialog.title"), Messages.getErrorIcon());
      return null;
    }
    return result.getResultObject();
  }
}


text:
class Response:
    """Responding to being mentioned"""

    def __init__(self, bot):
        self.bot = bot

    async def on_message(self, message):
        if message.author.id != self.bot.user.id:
            contents = message.content.lower()
            if "thanks foambot" in contents or "thank you foambot" in contents:
                await self.bot.send_message(message.channel, "You're very welcome, my foamy friend!!! ^-^")
            elif "foambot" in contents:
                await self.bot.send_message(message.channel,
                                            "Did someone say foambot?? Dat's my name! I'm foambot, and I'm here to help!! WeEee~~~ :grimacing:")

def setup(bot):
    bot.add_cog(Response(bot))


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <meta name="author" content="API Addicts">
    <meta name="description" content="Tu evento de APIs con un enfoque 360">
    <meta name="keywords" content="evento, api, apiaddicts, cloudappi, REST, node, .NET, meetup, developers, Madrid">
    <meta name="google-site-verification" content="8syDqXyPBXLeDN4OObptLtn2xyRCTBo-W9lLWhkoW_A" />
    <link rel="canonical" href="http://apidaysmad.apiaddicts.org">

    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@apiaddicts">
    <meta name="twitter:title" content="Call for Papers cerrado">
    <meta name="twitter:description" content="Tu evento de APIs con un enfoque 360">
    <meta name="twitter:image:src" content="http://apidaysmad.apiaddicts.org/img/seo/sharing-twitter.png">

    <meta property="og:title" content="Call for Papers cerrado" />
    <meta property="og:site_name" content="API Days Madrid 2017" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="http://apidaysmad.apiaddicts.org" />
    <meta property="og:image" content="http://apidaysmad.apiaddicts.org/img/seo/sharing-facebook.png" />
    <meta property="og:description" content="Tu evento de APIs con un enfoque 360" />

    <title>Call for Papers cerrado • API Days Madrid 2019</title>
    <link rel="shortcut icon" href="http://apidaysmad.apiaddicts.org/img/favicons/favicon.ico">
    <link rel="apple-touch-icon" sizes="152x152" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="144x144" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="120x120" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="114x114" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="76x76" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="72x72" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="60x60" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="57x57" href="http://apidaysmad.apiaddicts.org/img/favicons/apple-touch-icon-57x57.png">
    <link rel="icon" type="image/png" href="http://apidaysmad.apiaddicts.org/img/favicons/favicon-196x196.png">
    <link rel="icon" type="image/png" href="http://apidaysmad.apiaddicts.org/img/favicons/favicon-160x160.png">
    <link rel="icon" type="image/png" href="http://apidaysmad.apiaddicts.org/img/favicons/favicon-96x96.png">
    <link rel="icon" type="image/png" href="http://apidaysmad.apiaddicts.org/img/favicons/favicon-32x32.png">
    <link rel="icon" type="image/png" href="http://apidaysmad.apiaddicts.org/img/favicons/favicon-16x16.png">
    <meta name="msapplication-TileColor" content="#2b5797">
    <meta name="msapplication-TileImage" content="http://apidaysmad.apiaddicts.org/img/favicons/mstile-144x144.png">
    <meta name="msapplication-config" content="http://apidaysmad.apiaddicts.org/img/favicons/browserconfig.xml">

    <meta name="theme-color" content="#2b5797">

    <link href="http://apidaysmad.apiaddicts.org/css/main.css" rel="stylesheet">

    <svg id="menu-trigger" class="menu-trigger icon icon-menu visible-xs" viewBox="0 0 32 32">
        <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-menu"></use>
    </svg>

                Home

                Blog

                Agenda

                Ponentes

                Equipo

Call for Papers cerrado

              Publicado:

                10 Sep 2017

                  • API Addicts

                    <svg class="icon icon-google-plus" viewBox="0 0 30 32">
                      <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-google-plus"></use>
                    </svg>

                    <svg class="icon icon-twitter" viewBox="0 0 30 32">
                      <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-twitter"></use>
                    </svg>

                    <svg class="icon icon-facebook" viewBox="0 0 30 32">
                      <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-facebook"></use>
                    </svg>

El mayor evento de APIs, API Addicts Day, se celebra el día *26 de Abril de 2019 en Campus Madrid, en la ciudad de Madrid.
Hoy, día de Abril, dejamos de aceptar propuestas (CFP) y vamos a confirmar la lista de ponentes y la agenda.

Conferencias y talleres. ¿Qué temas se van a tratar?

Hemos creado una selección de charlas / talleres de lo más divertido. Estos son algunos de los temas que vamos a tratar:

Microservicios

APi Managers

Gobierno de APIs

Definición de APIs

AsyncAPI

Open Banking

Istio

Karate DSL

¡Muchas cosas más!

Conferencias

Las conferencias o charlas, tendrán una duración aproximada de 45 min, y son parte. Tenemos que ser puntuales para que nos de tiempo a todas,
y no se nos vaya de hora. Tendremos turno de ruegos y preguntas al final de cada sesión.

Talleres

Los talleres tienen un aforo máximo de 50 personas. Tienes que traer tu portátil y muchas ganas de aprender y lo más importante.. ¡de picar código!
Tendrá una duración aproximada, de 45 minutos y habrá plazas limitadas. Pronto publicaremos más detalles acerca de los talleres y de las entradas.

Has dicho twitter?

¡Queremos que nos vean en todo el mundo! Vamos a compartir toda nuestra info en las redes sociales bajo el hashtag #apidaysmad17.
¡Ayúdanos a conseguir nuestra meta y comparte en tus redes usando #apidaysmad19

¿Alguna pregunta?

¡Déjanos tus comentarios y te responderemos con mucho gusto! 😊

              «
                Entradas vendidas

              {response: 'Hello... »

    Please enable JavaScript to view the comments powered by Disqus.
</script>

Subscríbete vía
            RSS

Links

API Addicts

Grupo de Meetup

Contacto

contacta@apiaddicts.org

FAQ

Código de conducta

            <svg class="icon icon-twitter" viewBox="0 0 30 32">
              <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-twitter"></use>
            </svg>

            <svg class="icon icon-youtube" viewBox="0 0 30 32">
              <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-youtube"></use>
            </svg>

            <svg class="icon icon-facebook" viewBox="0 0 30 32">
              <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-facebook"></use>
            </svg>

            <svg class="icon icon-rss" viewBox="0 0 30 32">
              <use xlink:href="http://apidaysmad.apiaddicts.org/img/sprites/sprites.svg#icon-rss"></use>
            </svg>

        © 2014 Based on Project Zeppelin. Designed
        and created by Oleh Zasadnyy ·
        GDG Lviv

 Readapted by Marco Antonio Sanz (API Addicts team)


text:
<title>libogg - function - ogg_stream_packetin</title>
<link rel=stylesheet href="style.css" type="text/css">

libogg documentation

libogg release 1.0 - 20000615

ogg_stream_packetin

declared in "ogg/ogg.h";

This function takes a packet and submits it to the bitstream.  After this is called, we can continue submitting packets, or we can write out pages.

In a typical decoding situation, this should be used after filling a packet with data

int ogg_stream_packetin(ogg_stream_state *os,ogg_packet *op);

Parameters

os

Pointer to a previously declared ogg_stream_state struct.

op

Pointer to the packet we are putting into the bitstream.

Return Values

0 is always returned.

copyright © 2000 xiph.org

Ogg Vorbis
team@xiph.org

libogg documentation

libogg release 1.0 - 20000615


text:
<?php

namespace Magento\Theme\Test\Unit\Console\Command;

use Magento\Theme\Console\Command\ThemeUninstallCommand;
use Magento\Theme\Model\Theme\themePackageInfo;
use Magento\Theme\Model\Theme\ThemeUninstaller;
use Magento\Theme\Model\Theme\ThemeDependencyChecker;
use Symfony\Component\Console\Tester\CommandTester;
use Magento\Framework\Setup\BackupRollbackFactory;

/**
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class ThemeUninstallCommandTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Magento\Framework\App\MaintenanceMode|\PHPUnit_Framework_MockObject_MockObject
     */
    private $maintenanceMode;

    /**
     * @var \Magento\Framework\Composer\DependencyChecker|\PHPUnit_Framework_MockObject_MockObject
     */
    private $dependencyChecker;

    /**
     * @var \Magento\Theme\Model\Theme\Data\Collection|\PHPUnit_Framework_MockObject_MockObject
     */
    private $collection;

    /**
     * @var \Magento\Framework\App\Cache|\PHPUnit_Framework_MockObject_MockObject
     */
    private $cache;

    /**
     * @var \Magento\Framework\App\State\CleanupFiles|\PHPUnit_Framework_MockObject_MockObject
     */
    private $cleanupFiles;

    /**
     * @var ThemeUninstallCommand
     */
    private $command;

    /**
     * @var BackupRollbackFactory|\PHPUnit_Framework_MockObject_MockObject
     */
    private $backupRollbackFactory;

    /**
     * Theme Validator
     *
     * @var ThemeValidator|\PHPUnit_Framework_MockObject_MockObject
     */
    private $themeValidator;

    /**
     * @var ThemeUninstaller|\PHPUnit_Framework_MockObject_MockObject
     */
    private $themeUninstaller;

    /**
     * @var ThemeDependencyChecker|\PHPUnit_Framework_MockObject_MockObject
     */
    private $themeDependencyChecker;

    /**
     * @var ThemePackageInfo|\PHPUnit_Framework_MockObject_MockObject
     */
    private $themePackageInfo;

    /**
     * @var CommandTester
     */
    private $tester;

    public function setUp()
    {
        $this->maintenanceMode = $this->getMock('Magento\Framework\App\MaintenanceMode', [], [], '', false);
        $composerInformation = $this->getMock('Magento\Framework\Composer\ComposerInformation', [], [], '', false);
        $composerInformation->expects($this->any())
            ->method('getRootRequiredPackages')
            ->willReturn(['magento/theme-a', 'magento/theme-b', 'magento/theme-c']);
        $this->dependencyChecker = $this->getMock(
            'Magento\Framework\Composer\DependencyChecker',
            [],
            [],
            '',
            false
        );
        $this->collection = $this->getMock('Magento\Theme\Model\Theme\Data\Collection', [], [], '', false);
        $this->cache = $this->getMock('Magento\Framework\App\Cache', [], [], '', false);
        $this->cleanupFiles = $this->getMock('Magento\Framework\App\State\CleanupFiles', [], [], '', false);
        $this->backupRollbackFactory = $this->getMock(
            'Magento\Framework\Setup\BackupRollbackFactory',
            [],
            [],
            '',
            false
        );
        $this->themeValidator = $this->getMock('Magento\Theme\Model\ThemeValidator', [], [], '', false);
        $this->themeUninstaller = $this->getMock('Magento\Theme\Model\Theme\ThemeUninstaller', [], [], '', false);
        $this->themeDependencyChecker = $this->getMock(
            'Magento\Theme\Model\Theme\ThemeDependencyChecker',
            [],
            [],
            '',
            false
        );
        $this->themePackageInfo = $this->getMock('Magento\Theme\Model\Theme\ThemePackageInfo', [], [], '', false);
        $this->command = new ThemeUninstallCommand(
            $this->cache,
            $this->cleanupFiles,
            $composerInformation,
            $this->maintenanceMode,
            $this->dependencyChecker,
            $this->collection,
            $this->backupRollbackFactory,
            $this->themeValidator,
            $this->themePackageInfo,
            $this->themeUninstaller,
            $this->themeDependencyChecker
        );
        $this->tester = new CommandTester($this->command);
    }

    public function testExecuteFailedValidationNotPackage()
    {
        $this->themePackageInfo->expects($this->at(0))->method('getPackageName')->willReturn('dummy');
        $this->themePackageInfo->expects($this->at(1))->method('getPackageName')->willReturn('magento/theme-a');
        $this->collection->expects($this->any())
            ->method('getThemeByFullPath')
            ->willReturn($this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface', [], '', false));
        $this->collection->expects($this->any())->method('hasTheme')->willReturn(true);
        $this->tester->execute(['theme' => ['test1', 'test2']]);
        $this->assertContains(
            'test1 is not an installed Composer package',
            $this->tester->getDisplay()
        );
        $this->assertNotContains(
            'test2 is not an installed Composer package',
            $this->tester->getDisplay()
        );
    }

    public function testExecuteFailedValidationNotTheme()
    {
        $this->themePackageInfo->expects($this->exactly(2))->method('getPackageName')->willReturn('');
        $this->collection->expects($this->any())
            ->method('getThemeByFullPath')
            ->willReturn($this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface', [], '', false));
        $this->collection->expects($this->any())->method('hasTheme')->willReturn(false);
        $this->tester->execute(['theme' => ['test1', 'test2']]);
        $this->assertContains(
            'Unknown theme(s): test1, test2' . PHP_EOL,
            $this->tester->getDisplay()
        );
    }

    public function testExecuteFailedValidationMixed()
    {
        $this->themePackageInfo->expects($this->exactly(4))
            ->method('getPackageName')
            ->will($this->returnValueMap([
                ['test1', 'dummy1'], ['test2', 'magento/theme-b'], ['test3', ''], ['test4', 'dummy2']
            ]));
        $this->collection->expects($this->any())
            ->method('getThemeByFullPath')
            ->willReturn($this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface', [], '', false));
        $this->collection->expects($this->at(1))->method('hasTheme')->willReturn(true);
        $this->collection->expects($this->at(3))->method('hasTheme')->willReturn(true);
        $this->collection->expects($this->at(5))->method('hasTheme')->willReturn(false);
        $this->collection->expects($this->at(7))->method('hasTheme')->willReturn(true);
        $this->tester->execute(['theme' => ['test1', 'test2', 'test3', 'test4']]);
        $this->assertContains(
            'test1, test4 are not installed Composer packages',
            $this->tester->getDisplay()
        );
        $this->assertNotContains(
            'test2 is not an installed Composer package',
            $this->tester->getDisplay()
        );
        $this->assertContains(
            'Unknown theme(s): test3' . PHP_EOL,
            $this->tester->getDisplay()
        );
    }

    public function setUpPassValidation()
    {
        $this->themePackageInfo->expects($this->any())->method('getPackageName')->willReturn('magento/theme-a');
        $this->collection->expects($this->any())
            ->method('getThemeByFullPath')
            ->willReturn($this->getMockForAbstractClass('Magento\Framework\View\Design\ThemeInterface', [], '', false));
        $this->themeDependencyChecker->expects($this->any())->method('checkChildTheme')->willReturn([]);
        $this->collection->expects($this->any())->method('hasTheme')->willReturn(true);
    }

    public function setupPassChildThemeCheck()
    {
        $theme = $this->getMock('Magento\Theme\Model\Theme', [], [], '', false);
        $theme->expects($this->any())->method('hasChildThemes')->willReturn(false);
        $this->collection->expects($this->any())->method('getIterator')->willReturn(new \ArrayIterator([]));
    }

    public function setupPassThemeInUseCheck()
    {
        $this->themeValidator->expects($this->once())->method('validateIsThemeInUse')->willReturn([]);
    }

    public function setupPassDependencyCheck()
    {
        $this->dependencyChecker->expects($this->once())->method('checkDependencies')->willReturn([]);
    }

    public function testExecuteFailedThemeInUseCheck()
    {
        $this->setUpPassValidation();
        $this->setupPassChildThemeCheck();
        $this->setupPassDependencyCheck();
        $this->themeValidator
            ->expects($this->once())
            ->method('validateIsThemeInUse')
            ->willReturn(['frontend/Magento/a is in use in default config']);
        $this->tester->execute(['theme' => ['frontend/Magento/a']]);
        $this->assertEquals(
            'Unable to uninstall. Please resolve the following issues:' . PHP_EOL
            . 'frontend/Magento/a is in use in default config' . PHP_EOL,
            $this->tester->getDisplay()
        );
    }

    public function testExecuteFailedDependencyCheck()
    {
        $this->setUpPassValidation();
        $this->setupPassThemeInUseCheck();
        $this->setupPassChildThemeCheck();
        $this->dependencyChecker->expects($this->once())
            ->method('checkDependencies')
            ->willReturn(['magento/theme-a' => ['magento/theme-b', 'magento/theme-c']]);
        $this->tester->execute(['theme' => ['frontend/Magento/a']]);
        $this->assertContains(
            'Unable to uninstall. Please resolve the following issues:' . PHP_EOL .
            'frontend/Magento/a has the following dependent package(s):'
            . PHP_EOL . "\tmagento/theme-b" . PHP_EOL . "\tmagento/theme-c",
            $this->tester->getDisplay()
        );
    }

    public function setUpExecute()
    {
        $this->setUpPassValidation();
        $this->setupPassThemeInUseCheck();
        $this->setupPassChildThemeCheck();
        $this->setupPassDependencyCheck();
        $this->cache->expects($this->once())->method('clean');

        $this->themeUninstaller->expects($this->once())
            ->method('uninstallRegistry')
            ->with($this->isInstanceOf('Symfony\Component\Console\Output\OutputInterface'), $this->anything());
        $this->themeUninstaller->expects($this->once())
            ->method('uninstallCode')
            ->with($this->isInstanceOf('Symfony\Component\Console\Output\OutputInterface'), $this->anything());
    }

    public function testExecuteWithBackupCode()
    {
        $this->setUpExecute();
        $backupRollback = $this->getMock('Magento\Framework\Setup\BackupRollback', [], [], '', false);
        $this->backupRollbackFactory->expects($this->once())
            ->method('create')
            ->willReturn($backupRollback);
        $this->tester->execute(['theme' => ['test'], '--backup-code' => true]);
        $this->tester->getDisplay();
    }

    public function testExecute()
    {
        $this->setUpExecute();
        $this->cleanupFiles->expects($this->never())->method('clearMaterializedViewFiles');
        $this->tester->execute(['theme' => ['test']]);
        $this->assertContains('Enabling maintenance mode', $this->tester->getDisplay());
        $this->assertContains('Disabling maintenance mode', $this->tester->getDisplay());
        $this->assertContains('Alert: Generated static view files were not cleared.', $this->tester->getDisplay());
        $this->assertNotContains('Generated static view files cleared successfully', $this->tester->getDisplay());
    }

    public function testExecuteCleanStaticFiles()
    {
        $this->setUpExecute();
        $this->cleanupFiles->expects($this->once())->method('clearMaterializedViewFiles');
        $this->tester->execute(['theme' => ['test'], '-c' => true]);
        $this->assertContains('Enabling maintenance mode', $this->tester->getDisplay());
        $this->assertContains('Disabling maintenance mode', $this->tester->getDisplay());
        $this->assertNotContains('Alert: Generated static view files were not cleared.', $this->tester->getDisplay());
        $this->assertContains('Generated static view files cleared successfully', $this->tester->getDisplay());
    }
}


text:
package fr.vidal.webservices.productservice;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

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

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="commonNameGroupId" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "commonNameGroupId"
})
@XmlRootElement(name = "searchByCommonNameGroupId")
public class SearchByCommonNameGroupId {

    @XmlElement(required = true, type = Integer.class, nillable = true)
    protected Integer commonNameGroupId;

    /**
     * Gets the value of the commonNameGroupId property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getCommonNameGroupId() {
        return commonNameGroupId;
    }

    /**
     * Sets the value of the commonNameGroupId property.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setCommonNameGroupId(Integer value) {
        this.commonNameGroupId = value;
    }

}