text:
namespace test1 {
  struct A { ~A(); };
  A a; // expected-warning {{declaration requires an exit-time destructor}}
  A b[10]; // expected-warning {{declaration requires an exit-time destructor}}
  A c[10][10]; // expected-warning {{declaration requires an exit-time destructor}}

  A &d = a;
  A &e = b[5];
  A &f = c[5][7];
}

namespace test2 {
void f() {
  struct A { ~A() { } };

  static A a; // expected-warning {{declaration requires an exit-time destructor}}
  static A b[10]; // expected-warning {{declaration requires an exit-time destructor}}
  static A c[10][10]; // expected-warning {{declaration requires an exit-time destructor}}

  static A &d = a;
  static A &e = b[5];
  static A &f = c[5][7];
}
}

namespace test3 {
  struct A { ~A() = default; };
  A a;

  struct B { ~B(); };
  struct C : B { ~C() = default; };
  C c; // expected-warning {{exit-time destructor}}

  class D {
    friend struct E;
    ~D() = default;
  };
  struct E : D {
    D d;
    ~E() = default;
  };
  E e;
}

namespace test4 {
struct A { ~A(); };
[[clang::no_destroy]] A a; // no warning
}

redpajama_set_name: RedPajamaGithub


text:
define([
  'color',
  'world/layer',
  'world/circular-layer',
  'entities/polygon-entity'
], function( Color, Layer, CircularLayer, PolygonEntity ) {
  'use strict';

  return {
    createLayer: function( options ) {
      var type = options.type || Layer.Type.DEFAULT;

      var layer = null;
      switch ( type ) {
        case Layer.Type.DEFAULT:
          layer = new Layer();
          break;

        case Layer.Type.CIRCULAR:
          layer = new CircularLayer();
          break;
      }

      layer.setWidth( options.width || 0 );
      layer.setHeight( options.height || 0 );
      layer.setColor( options.color || new Color( 0, 0, 0, 1.0 ) );
      layer.setZIndex( options.zIndex || 0 );
      layer.setParallaxFactor( options.parallaxFactor || 1.0 );

      return layer;
    },

    createTerrainLayer: function( options ) {
      var layer = this.createLayer( options );

      var width  = layer.getWidth(),
          height = layer.getHeight(),
          color  = layer.getColor();

      var maxTerrainHeight = options.maxTerrainHeight || 0,
          segmentCount     = options.segmentCount     || 1,
          segmentWidth     = width / segmentCount;

      var points = [];
      // Loops back to the first point, so we don't need extra vertex at end.
      for ( var i = 0; i < segmentCount; i++ ) {
        points.push( Math.random() * maxTerrainHeight );
      }

      var tempPolygonEntity;
      for ( i = 0; i < segmentCount; i++ ) {
        tempPolygonEntity = new PolygonEntity();
        tempPolygonEntity.setX( i * segmentWidth );
        tempPolygonEntity.setColor( color );
        tempPolygonEntity.setVertices([
          0, height,
          0, height - points[i],
          // Extra pixel added to x-coordinate to connect segments.
          segmentWidth + 1, height - points[ ( i + 1 ) % segmentCount ],
          segmentWidth + 1, height
        ]);

        layer.addProp( tempPolygonEntity );
      }

      return layer;
    }
  };
});


text:
<!DOCTYPE html>

<TITLE>Manpage of PIVOT_ROOT</TITLE>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/main.css" type="text/css">

linux manpages

{"type":"documentation"}

PIVOT_ROOT

Section: Linux Programmer's Manual (2)
Updated: 2007-06-01
Index
Return to Main Contents

NAME

pivot_root - change the root file system

SYNOPSIS

int pivot_root(const char *new_root, const char *put_old);

DESCRIPTION

pivot_root()

moves the root file system of the calling process to the
directory put_old and makes new_root the new root file system
of the calling process.

The typical use of
pivot_root()

is during system startup, when the
system mounts a temporary root file system (e.g., an initrd), then
mounts the real root file system, and eventually turns the latter into
the current root of all relevant processes or threads.

pivot_root()

may or may not change the current root and the current
working directory of any processes or threads which use the old
root directory.
The caller of
pivot_root()

must ensure that processes with root or current working directory
at the old root operate correctly in either case.
An easy way to ensure this is to change their
root and current working directory to new_root before invoking
pivot_root().

The paragraph above is intentionally vague because the implementation
of
pivot_root()

may change in the future.
At the time of writing,
pivot_root()

changes root and current working directory of each process or
thread to new_root if they point to the old root directory.
This
is necessary in order to prevent kernel threads from keeping the old
root directory busy with their root and current working directory,
even if they never access
the file system in any way.
In the future, there may be a mechanism for
kernel threads to explicitly relinquish any access to the file system,
such that this fairly intrusive mechanism can be removed from
pivot_root().

Note that this also applies to the calling process:
pivot_root()

may
or may not affect its current working directory.
It is therefore recommended to call
chdir("/") immediately after
pivot_root().

The following restrictions apply to new_root and put_old:

-

They must be directories.

-

new_root and put_old must not be on the same file system as
the current root.

-

put_old must be underneath new_root, that is, adding a non-zero
number of /.. to the string pointed to by put_old must yield
the same directory as new_root.

-

No other file system may be mounted on put_old.

See also
pivot_root(8)

for additional usage examples.

If the current root is not a mount point (e.g., after
chroot(2)

or
pivot_root(),

see also below), not the old root directory, but the
mount point of that file system is mounted on put_old.

new_root does not have to be a mount point.
In this case,
/proc/mounts will show the mount point of the file system containing
new_root as root (/).

RETURN VALUE

On success, zero is returned.
On error, -1 is returned, and
errno is set appropriately.

ERRORS

pivot_root()

may return (in errno) any of the errors returned by
stat(2).

Additionally, it may return:

EBUSY

new_root or put_old are on the current root file system,
or a file system is already mounted on put_old.

EINVAL

put_old is not underneath new_root.

ENOTDIR

new_root or put_old is not a directory.

EPERM

The calling process does not have the
CAP_SYS_ADMIN

capability.

VERSIONS

pivot_root()

was introduced in Linux 2.3.41.

CONFORMING TO

pivot_root()

is Linux-specific and hence is not portable.

NOTES

Glibc does not provide a wrapper for this system call; call it using
syscall(2).

BUGS

pivot_root()

should not have to change root and current working directory of all other
processes in the system.

Some of the more obscure uses of
pivot_root()

may quickly lead to
insanity.

SEE ALSO

chdir(2),

chroot(2),

stat(2),

initrd(4),

pivot_root(8)

COLOPHON

This page is part of release 3.22 of the Linux
man-pages

project.
A description of the project,
and information about reporting bugs,
can be found at
http://www.kernel.org/doc/man-pages/.

Index

NAME

SYNOPSIS

DESCRIPTION

RETURN VALUE

ERRORS

VERSIONS

CONFORMING TO

NOTES

BUGS

SEE ALSO

COLOPHON

This document was created by
man2html,
using the manual pages.

Time: 05:33:04 GMT, December 24, 2015


text:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>R. Moore | Gregor von Laszewski</title>
    <link>/author/r.-moore/</link>
      <atom:link href="/author/r.-moore/index.xml" rel="self" type="application/rss+xml" />
    <description>R. Moore</description>
    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Wed, 01 Jun 2005 00:00:00 +0000</lastBuildDate>
    <image>
      <url>/images/icon_hufdd866d90d76849587aac6fbf27da1ac_464_512x512_fill_lanczos_center_3.png</url>
      <title>R. Moore</title>
      <link>/author/r.-moore/</link>
    </image>

    <item>
      <title>Grid Portal Architectures for Scientific Applications</title>
      <link>/publication/las-2005-scidac-poster-portal/</link>
      <pubDate>Wed, 01 Jun 2005 00:00:00 +0000</pubDate>
      <guid>/publication/las-2005-scidac-poster-portal/</guid>
      <description></description>
    </item>

    <item>
      <title>Grid Portal Architectures for scientific applications</title>
      <link>/publication/las-2005-portalarch/</link>
      <pubDate>Sat, 01 Jan 2005 00:00:00 +0000</pubDate>
      <guid>/publication/las-2005-portalarch/</guid>
      <description></description>
    </item>

  </channel>
</rss>


text:
{-# language DeriveFunctor #-}
{-# language ExplicitForAll #-}

module Parser where

import Text.CSV
import Control.Arrow
import Data.List (transpose)

newtype Consume c a = Consume {
    runConsume :: c -> Either String (a, c)
    } deriving Functor

instance Applicative (Consume c) where
    pure x = Consume $ \c -> Right (x,c)
    Consume f <*> Consume g = Consume $ \c ->  do
        (f', c')  <-  f c
        (x , c'') <- g c'
        return (f' x, c'')

instance Monad (Consume c) where
    Consume f >>= g = Consume $ \c -> do
        (x, c')  <-  f c
        let Consume g' = g x
        (x' , c'') <- g' c'
        return (x', c'')

data L = L CSV Record deriving Show

line :: Consume L ()
line = Consume f where
    f (L [] _) =  Left "not enough lines"
    f (L (l:ls) _) = Right ((), L ls l)

allLines :: Consume L a -> Consume L [a]
allLines c@(Consume p) = do
        push >> line
        r <- Consume $ \l -> case p l of
            Left _ -> Right (Nothing,l)
            Right (x,_) -> Right (Just x, l)
        case r of
            Nothing -> return []
            Just x -> (x:) <$> (line >> allLines c)

field :: forall a. (Field -> Either [Char] a) -> Consume L a
field p = Consume f where
    f (L _ []) = Left "not enough fields"
    f (L cs (r:rs)) = p r >>= \x -> return (x, L cs rs)

fields :: forall t. (Field -> Either String t) -> Consume L [t]
fields p = Consume f where
    f l@(L _ []) = return ([],l)
    f (L cs (r:rs)) = p r >>= \x -> first (x:) <$> f (L cs rs)

readE :: forall b. Read b => String -> Either [Char] b
readE x = case reads x of
    [(y,_)] -> Right y
    _ -> Left "failed parsing a field"

readD :: forall a b. Read b => b -> String -> Either a b
readD y = either (const $ Right y) Right . readE

textField :: Field -> Consume L ()
textField t = field $ \x ->
    if x == t then Right ()
        else Left "failed matching text field"

readField :: Read a => Consume L a
readField = field readE

transposeN :: Int -> Consume L ()
transposeN n = Consume f where
    f (L ls rs)
        | length ls < n = Left "not enough lines to transpose"
        | True = let
            (ts,ls') = splitAt n ls
            in Right ((), L (transpose ts ++ ls') rs)

dontParse :: forall b a. b -> Either a ()
dontParse = const $ Right ()

push :: Consume L ()
push = Consume $ \(L (l:ls) r) -> Right ((), L (l:l:ls) r)

count :: Consume L Int
count = do
    push
    line
    length <$> fields dontParse


text:
import series from 'async/series';

const layersStyles = require('../assets/styles');

const dataUtils = require('../utils/dataUtils');

const spatial = require('../utils/spatial');

/*
 * Asynchronous actions for retrieving data from the database
 * powered by redux-thunk
 * Action types:
 * 'REQUEST_X' - first action dispatched when request is executed
 * 'RECEIVED_X' - second action dispatched after an async request is finished and
 *                response is returned, here the payload is sent to teh reducer
 *
 */

export const receivedDataSources = (data, dataSourcesObject) => {
    /*
     * Deprecated
     */
    return {
        type: 'RECEIVED_DS',
        payload: {
            layers: data,
            container: dataSourcesObject
        }
    }
}

export const receivedTracks = (data, dataSourcesObject) => {
    /*
     * entities - track nodes from the database
     * container - viewer.dataSources object from the active Cesium viewer
     *
     * @param {array} data - an array of graph nodes
     * @param {object} dataSourcesObject - an active cesium viewer datasources
     */
    return {
        type: 'RECEIVED_TRACKS',
        payload: {
            entities: data,
            container: dataSourcesObject
        }
    }
}

export const receivedElements = (data, dataSourcesObject) => {
    /*
     * entities - track elements and ocs elements from the database, related to
     *            the given track
     * container - viewer.dataSources object from the active Cesium viewer
     *
     * @param {array} data - an array of graph nodes
     * @param {object} dataSourcesObject - an active cesium viewer datasources
     */
    return {
        type: 'RECEIVED_ELEMENTS',
        payload: {
            entities: data,
            container: dataSourcesObject
        }
    }
}

export const receivedNeighbourhood = (data, dataSourcesObject) => {
    /*
     * entities - Non RailML data from the database, ex. nodes extracted from
     *            CityGML; nodes in the database must have a spatial index;
     *            nodes are taken within a distance from the given track
     * container - viewer.dataSources object from the active Cesium viewer
     *
     * @param {array} data - an array of graph nodes
     * @param {object} dataSourcesObject - an active cesium viewer datasources
     */
    return {
        type: 'RECEIVED_NEIGHBOURHOOD',
        payload: {
            entities: data,
            container: dataSourcesObject
        }
    }
}

export const getDataRequested = () => {
    /*
     * Simple async handler
     */
    return {
        type: 'REQUEST_DS',
    };
}

export const getTracksRequested = () => {
    /*
     * Simple async handler
     */
    return {
        type: 'REQUEST_TRACKS',
    };
}

export const getElementsRequested = () => {
    /*
     * Simple async handler
     */
    return {
        type: 'REQUEST_ELEMENTS',
    };
}

export const getNeighbourhoodRequested = () => {
    /*
     * Simple async handler
     */
    return {
        type: 'REQUEST_NEIGHBOURHOOD',
    };
}

export const getBasicData = (dataSourcesObject) => {
  /*
   * Deprecated
   */
    return dispatch => {

        dispatch(getDataRequested());

        series([
                function(callback) {
                    dataUtils.getLayer('tracks', layersStyles.yellowSubmarine, function(err, data) {
                        callback(null, data);
                    })
                },
                function(callback) {
                    dataUtils.getLayer('signals', layersStyles.blueTrain, function(err, data) {
                        callback(null, data);
                    })
                }
            ],

            function(error, results) {
                dispatch(receivedDataSources(results, dataSourcesObject));
            }

        )
    }
}

export const getExtendedData = (dataSourcesObject) => {
  /*
   * Deprecated
   */
    return dispatch => {

        dispatch(getDataRequested());

        series([
                function(callback) {
                    dataUtils.getLayer('tracks', layersStyles.yellowSubmarine, function(err, data) {
                        callback(null, data);
                    })
                },
                function(callback) {
                    dataUtils.getLayer('platforms', layersStyles.redOctober, function(err, data) {
                        callback(null, data);
                    })
                },
                function(callback) {
                    dataUtils.getLayer('signals', layersStyles.blueTrain, function(err, data) {
                        callback(null, data);
                    })
                },
                function(callback) {
                    dataUtils.getLayer('counties', layersStyles.stPatrick, function(err, data) {
                        callback(null, data);
                    })
                },
            ],

            function(error, results) {
                dispatch(receivedDataSources(results, dataSourcesObject));
            }

        )
    }
}

export const railmlData = (file, dataSourcesObject) => {
    /*
     * To fix
     */
    return dispatch => {

        dispatch(getDataRequested());

        series([
                function(callback) {
                    dataUtils.convertRailml(file, 'api/v1/railml', layersStyles.redOctober, function(err, data) {
                        callback(null, data)
                    })
                }
            ],

            function(error, results) {
                dispatch(receivedDataSources(results, dataSourcesObject));
            }

        )
    }
}

export const tracksData = (dataSourcesObject) => {
    /*
     * Actions handler;
     * Dispatches request and after response is retrieved, sends it to the reducer
     *
     * @params {object} dataSourcesObject - an active cesium viewer object
     */
    return dispatch => {
        dispatch(getTracksRequested());
        dataUtils.getTracks('tracks', function(err, data) {
            dispatch(receivedTracks(data, dataSourcesObject));
        })
    }
}

export const elementsData = (id, dataSourcesObject) => {
    /*
     * Actions handler;
     * Dispatches request and after response is retrieved, sends it to the reducer
     *
     * @param {string} id - a railway network node ID
     * @params {object} dataSourcesObject - an active cesium viewer object
     */
    return dispatch => {
        dispatch(getElementsRequested());
        dataUtils.getElements({id: id}, function(err, data) {
            dispatch(receivedElements(data, dataSourcesObject));
        })
    }
}

export const neighbourhoodData = (trackGeom, dataSourcesObject) => {
    /*
     * Actions handler;
     * Dispatches request and after response is retrieved, sends it to the reducer
     *
     * @param {string} trackGeom - a valid WKT string (track geometry - LINESTRING)
     * @params {object} dataSourcesObject - an active cesium viewer object
     */
    return dispatch => {
        dispatch(getNeighbourhoodRequested());
        spatial.getNeighbourhood(trackGeom, function(err, data) {
            dispatch(receivedNeighbourhood(data, dataSourcesObject));
        })
    }
}


text:
Creating E-Commerce Web Sites with PHP and MySQL
================================================

PHP is an incredibly useful server side programming language that is almost as ubiquitous as JavaScript on the client side. PHP is also used for popular content management systems like Wordpress and Drupal, so even if you don't program, you can still end up using php. In this course, I would like to look at some things like Drupal and Wordpress plugins as well as go through building some e-commerce directly in PHP.

|Dates|material|exercises
|-----|--------|---------
|June 16-18, 23|Chapter 1-5, my notes|getting started with installation and basic building blocks of PHP, product catalog|
|June 19, 24-27|my notes|contrasting Wordpress with app in book, building a theme and plugin|
|June 27|My notes, less emphasis on book chapter 1-5|final
|July 11||Project Presentations

The project will be of your choosing, and can be done on wordpress or in php alone. You will need to pick something in which e-commerce is applicable, be it accepting donations or payments for products.


text:
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }

fn use_token(token: &Token) { unimplemented!() }

fn main() {
    use_token(&Token::Homura); //~ ERROR no associated item named
}


text:
=============================
Django Categories v |version|
=============================

Django Categories grew out of our need to provide a basic hierarchical taxonomy management system that multiple applications could use independently or in concert.

As a news site, our stories, photos, and other content get divided into "sections" and we wanted all the apps to use the same set of sections. As our needs grew, the Django Categories grew in the functionality it gave to category handling within web pages.

New in 1.1
==========

* Fixed a cosmetic bug in the Django 1.4 admin. Action checkboxes now only appear once.

* Template tags are refactored to allow easy use of any model derived from ``CategoryBase``.

* Improved test suite.

* Improved some of the documentation.

Contents
========

.. toctree::
   :maxdepth: 2
   :glob:

   installation
   getting_started
   usage
   registering_models
   adding_the_fields
   admin_settings
   custom_categories
   reference/index

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.micmiu.mvc.ferriswheel.examples.core.mybatis.mapper.BlogMapper" >
  <resultMap id="BaseResultMap" type="com.micmiu.mvc.ferriswheel.examples.core.mybatis.entity.Blog" >
    <id column="ID" property="id" javaType="Long" jdbcType="BIGINT" />
    <result column="TITLE" property="title" jdbcType="VARCHAR" />
    <result column="AUTHOR" property="author" jdbcType="VARCHAR" />
    <result column="CATEGORY" property="category" jdbcType="VARCHAR" />
    <result column="URL" property="url" jdbcType="VARCHAR" />
    <result column="PUBLISH_DATE" property="publishDate" jdbcType="DATE" />
  </resultMap>
  <sql id="Base_Column_List" >
    ID, TITLE, AUTHOR, CATEGORY, URL, PUBLISH_DATE
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from T_BLOG
    where ID = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from T_BLOG
    where ID = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.micmiu.mvc.ferriswheel.examples.core.mybatis.entity.Blog" useGeneratedKeys="true" keyProperty="id" >
    insert into T_BLOG (ID, TITLE, AUTHOR,
      CATEGORY, URL, PUBLISH_DATE
      )
    values (#{id,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR},
      #{category,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{publishDate,jdbcType=DATE}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.micmiu.mvc.ferriswheel.examples.core.mybatis.entity.Blog" >
    insert into T_BLOG
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        ID,
      </if>
      <if test="title != null" >
        TITLE,
      </if>
      <if test="author != null" >
        AUTHOR,
      </if>
      <if test="category != null" >
        CATEGORY,
      </if>
      <if test="url != null" >
        URL,
      </if>
      <if test="publishDate != null" >
        PUBLISH_DATE,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="title != null" >
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="author != null" >
        #{author,jdbcType=VARCHAR},
      </if>
      <if test="category != null" >
        #{category,jdbcType=VARCHAR},
      </if>
      <if test="url != null" >
        #{url,jdbcType=VARCHAR},
      </if>
      <if test="publishDate != null" >
        #{publishDate,jdbcType=DATE},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.micmiu.mvc.ferriswheel.examples.core.mybatis.entity.Blog" >
    update T_BLOG
    <set >
      <if test="title != null" >
        TITLE = #{title,jdbcType=VARCHAR},
      </if>
      <if test="author != null" >
        AUTHOR = #{author,jdbcType=VARCHAR},
      </if>
      <if test="category != null" >
        CATEGORY = #{category,jdbcType=VARCHAR},
      </if>
      <if test="url != null" >
        URL = #{url,jdbcType=VARCHAR},
      </if>
      <if test="publishDate != null" >
        PUBLISH_DATE = #{publishDate,jdbcType=DATE},
      </if>
    </set>
    where ID = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.micmiu.mvc.ferriswheel.examples.core.mybatis.entity.Blog" >
    update T_BLOG
    set TITLE = #{title,jdbcType=VARCHAR},
      AUTHOR = #{author,jdbcType=VARCHAR},
      CATEGORY = #{category,jdbcType=VARCHAR},
      URL = #{url,jdbcType=VARCHAR},
      PUBLISH_DATE = #{publishDate,jdbcType=DATE}
    where ID = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectCountAll" resultType="java.lang.Integer">
    select count(1) from T_BLOG
  </select>
  <select id="queryAll" resultMap="BaseResultMap">
    select * from t_blog
  </select>
</mapper>


text:
class ChangePublisherIdColumn < ActiveRecord::Migration
  def up
    change_column :articles, :publisher_id, :integer
  end

  def down
    change_column :articles, :publisher_id, :string
  end
end


text:
package nextStep.noSql.cassandra;

import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.Session;

public class Drop_Index {

   public static void main(String args[]){

      //Query
      String query = "DROP INDEX user_name;";

      //Creating cluster object
      Cluster cluster = Cluster.builder().addContactPoint(Constants.hostName).withCredentials(Constants.USER_NAME,Constants.PASSWORD).build();

      //Creating Session object
      Session session = cluster.connect(Constants.keySpaceName);

      //Executing the query
      session.execute(query);

      System.out.println("Index dropped");
   }
}


text:
package setting

import (
	"errors"
	"net/http"
	"time"

	"code.gitea.io/gitea/models"
	"code.gitea.io/gitea/modules/base"
	"code.gitea.io/gitea/modules/context"
	"code.gitea.io/gitea/modules/log"
	"code.gitea.io/gitea/modules/password"
	"code.gitea.io/gitea/modules/setting"
	"code.gitea.io/gitea/modules/timeutil"
	"code.gitea.io/gitea/modules/web"
	"code.gitea.io/gitea/services/forms"
	"code.gitea.io/gitea/services/mailer"
)

const (
	tplSettingsAccount base.TplName = "user/settings/account"
)

// Account renders change user's password, user's email and user suicide page
func Account(ctx *context.Context) {
	ctx.Data["Title"] = ctx.Tr("settings")
	ctx.Data["PageIsSettingsAccount"] = true
	ctx.Data["Email"] = ctx.User.Email

	loadAccountData(ctx)

	ctx.HTML(http.StatusOK, tplSettingsAccount)
}

// AccountPost response for change user's password
func AccountPost(ctx *context.Context) {
	form := web.GetForm(ctx).(*forms.ChangePasswordForm)
	ctx.Data["Title"] = ctx.Tr("settings")
	ctx.Data["PageIsSettingsAccount"] = true

	if ctx.HasError() {
		loadAccountData(ctx)

		ctx.HTML(http.StatusOK, tplSettingsAccount)
		return
	}

	if len(form.Password) < setting.MinPasswordLength {
		ctx.Flash.Error(ctx.Tr("auth.password_too_short", setting.MinPasswordLength))
	} else if ctx.User.IsPasswordSet() && !ctx.User.ValidatePassword(form.OldPassword) {
		ctx.Flash.Error(ctx.Tr("settings.password_incorrect"))
	} else if form.Password != form.Retype {
		ctx.Flash.Error(ctx.Tr("form.password_not_match"))
	} else if !password.IsComplexEnough(form.Password) {
		ctx.Flash.Error(password.BuildComplexityError(ctx))
	} else if pwned, err := password.IsPwned(ctx, form.Password); pwned || err != nil {
		errMsg := ctx.Tr("auth.password_pwned")
		if err != nil {
			log.Error(err.Error())
			errMsg = ctx.Tr("auth.password_pwned_err")
		}
		ctx.Flash.Error(errMsg)
	} else {
		var err error
		if err = ctx.User.SetPassword(form.Password); err != nil {
			ctx.ServerError("UpdateUser", err)
			return
		}
		if err := models.UpdateUserCols(ctx.User, "salt", "passwd_hash_algo", "passwd"); err != nil {
			ctx.ServerError("UpdateUser", err)
			return
		}
		log.Trace("User password updated: %s", ctx.User.Name)
		ctx.Flash.Success(ctx.Tr("settings.change_password_success"))
	}

	ctx.Redirect(setting.AppSubURL + "/user/settings/account")
}

// EmailPost response for change user's email
func EmailPost(ctx *context.Context) {
	form := web.GetForm(ctx).(*forms.AddEmailForm)
	ctx.Data["Title"] = ctx.Tr("settings")
	ctx.Data["PageIsSettingsAccount"] = true

	// Make emailaddress primary.
	if ctx.Query("_method") == "PRIMARY" {
		if err := models.MakeEmailPrimary(&models.EmailAddress{ID: ctx.QueryInt64("id")}); err != nil {
			ctx.ServerError("MakeEmailPrimary", err)
			return
		}

		log.Trace("Email made primary: %s", ctx.User.Name)
		ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		return
	}
	// Send activation Email
	if ctx.Query("_method") == "SENDACTIVATION" {
		var address string
		if ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) {
			log.Error("Send activation: activation still pending")
			ctx.Redirect(setting.AppSubURL + "/user/settings/account")
			return
		}
		if ctx.Query("id") == "PRIMARY" {
			if ctx.User.IsActive {
				log.Error("Send activation: email not set for activation")
				ctx.Redirect(setting.AppSubURL + "/user/settings/account")
				return
			}
			mailer.SendActivateAccountMail(ctx.Locale, ctx.User)
			address = ctx.User.Email
		} else {
			id := ctx.QueryInt64("id")
			email, err := models.GetEmailAddressByID(ctx.User.ID, id)
			if err != nil {
				log.Error("GetEmailAddressByID(%d,%d) error: %v", ctx.User.ID, id, err)
				ctx.Redirect(setting.AppSubURL + "/user/settings/account")
				return
			}
			if email == nil {
				log.Error("Send activation: EmailAddress not found; user:%d, id: %d", ctx.User.ID, id)
				ctx.Redirect(setting.AppSubURL + "/user/settings/account")
				return
			}
			if email.IsActivated {
				log.Error("Send activation: email not set for activation")
				ctx.Redirect(setting.AppSubURL + "/user/settings/account")
				return
			}
			mailer.SendActivateEmailMail(ctx.User, email)
			address = email.Email
		}

		if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil {
			log.Error("Set cache(MailResendLimit) fail: %v", err)
		}
		ctx.Flash.Info(ctx.Tr("settings.add_email_confirmation_sent", address, timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language())))
		ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		return
	}
	// Set Email Notification Preference
	if ctx.Query("_method") == "NOTIFICATION" {
		preference := ctx.Query("preference")
		if !(preference == models.EmailNotificationsEnabled ||
			preference == models.EmailNotificationsOnMention ||
			preference == models.EmailNotificationsDisabled) {
			log.Error("Email notifications preference change returned unrecognized option %s: %s", preference, ctx.User.Name)
			ctx.ServerError("SetEmailPreference", errors.New("option unrecognized"))
			return
		}
		if err := ctx.User.SetEmailNotifications(preference); err != nil {
			log.Error("Set Email Notifications failed: %v", err)
			ctx.ServerError("SetEmailNotifications", err)
			return
		}
		log.Trace("Email notifications preference made %s: %s", preference, ctx.User.Name)
		ctx.Flash.Success(ctx.Tr("settings.email_preference_set_success"))
		ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		return
	}

	if ctx.HasError() {
		loadAccountData(ctx)

		ctx.HTML(http.StatusOK, tplSettingsAccount)
		return
	}

	email := &models.EmailAddress{
		UID:         ctx.User.ID,
		Email:       form.Email,
		IsActivated: !setting.Service.RegisterEmailConfirm,
	}
	if err := models.AddEmailAddress(email); err != nil {
		if models.IsErrEmailAlreadyUsed(err) {
			loadAccountData(ctx)

			ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSettingsAccount, &form)
			return
		} else if models.IsErrEmailInvalid(err) {
			loadAccountData(ctx)

			ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSettingsAccount, &form)
			return
		}
		ctx.ServerError("AddEmailAddress", err)
		return
	}

	// Send confirmation email
	if setting.Service.RegisterEmailConfirm {
		mailer.SendActivateEmailMail(ctx.User, email)
		if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil {
			log.Error("Set cache(MailResendLimit) fail: %v", err)
		}
		ctx.Flash.Info(ctx.Tr("settings.add_email_confirmation_sent", email.Email, timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language())))
	} else {
		ctx.Flash.Success(ctx.Tr("settings.add_email_success"))
	}

	log.Trace("Email address added: %s", email.Email)
	ctx.Redirect(setting.AppSubURL + "/user/settings/account")
}

// DeleteEmail response for delete user's email
func DeleteEmail(ctx *context.Context) {
	if err := models.DeleteEmailAddress(&models.EmailAddress{ID: ctx.QueryInt64("id"), UID: ctx.User.ID}); err != nil {
		ctx.ServerError("DeleteEmail", err)
		return
	}
	log.Trace("Email address deleted: %s", ctx.User.Name)

	ctx.Flash.Success(ctx.Tr("settings.email_deletion_success"))
	ctx.JSON(http.StatusOK, map[string]interface{}{
		"redirect": setting.AppSubURL + "/user/settings/account",
	})
}

// DeleteAccount render user suicide page and response for delete user himself
func DeleteAccount(ctx *context.Context) {
	ctx.Data["Title"] = ctx.Tr("settings")
	ctx.Data["PageIsSettingsAccount"] = true

	if _, err := models.UserSignIn(ctx.User.Name, ctx.Query("password")); err != nil {
		if models.IsErrUserNotExist(err) {
			loadAccountData(ctx)

			ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), tplSettingsAccount, nil)
		} else {
			ctx.ServerError("UserSignIn", err)
		}
		return
	}

	if err := models.DeleteUser(ctx.User); err != nil {
		switch {
		case models.IsErrUserOwnRepos(err):
			ctx.Flash.Error(ctx.Tr("form.still_own_repo"))
			ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		case models.IsErrUserHasOrgs(err):
			ctx.Flash.Error(ctx.Tr("form.still_has_org"))
			ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		default:
			ctx.ServerError("DeleteUser", err)
		}
	} else {
		log.Trace("Account deleted: %s", ctx.User.Name)
		ctx.Redirect(setting.AppSubURL + "/")
	}
}

// UpdateUIThemePost is used to update users' specific theme
func UpdateUIThemePost(ctx *context.Context) {
	form := web.GetForm(ctx).(*forms.UpdateThemeForm)
	ctx.Data["Title"] = ctx.Tr("settings")
	ctx.Data["PageIsSettingsAccount"] = true

	if ctx.HasError() {
		ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		return
	}

	if !form.IsThemeExists() {
		ctx.Flash.Error(ctx.Tr("settings.theme_update_error"))
		ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		return
	}

	if err := ctx.User.UpdateTheme(form.Theme); err != nil {
		ctx.Flash.Error(ctx.Tr("settings.theme_update_error"))
		ctx.Redirect(setting.AppSubURL + "/user/settings/account")
		return
	}

	log.Trace("Update user theme: %s", ctx.User.Name)
	ctx.Flash.Success(ctx.Tr("settings.theme_update_success"))
	ctx.Redirect(setting.AppSubURL + "/user/settings/account")
}

func loadAccountData(ctx *context.Context) {
	emlist, err := models.GetEmailAddresses(ctx.User.ID)
	if err != nil {
		ctx.ServerError("GetEmailAddresses", err)
		return
	}
	type UserEmail struct {
		models.EmailAddress
		CanBePrimary bool
	}
	pendingActivation := ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName)
	emails := make([]*UserEmail, len(emlist))
	for i, em := range emlist {
		var email UserEmail
		email.EmailAddress = *em
		email.CanBePrimary = em.IsActivated
		emails[i] = &email
	}
	ctx.Data["Emails"] = emails
	ctx.Data["EmailNotificationsPreference"] = ctx.User.EmailNotifications()
	ctx.Data["ActivationsPending"] = pendingActivation
	ctx.Data["CanAddEmails"] = !pendingActivation || !setting.Service.RegisterEmailConfirm

	if setting.Service.UserDeleteWithCommentsMaxTime != 0 {
		ctx.Data["UserDeleteWithCommentsMaxTime"] = setting.Service.UserDeleteWithCommentsMaxTime.String()
		ctx.Data["UserDeleteWithComments"] = ctx.User.CreatedUnix.AsTime().Add(setting.Service.UserDeleteWithCommentsMaxTime).After(time.Now())
	}
}


text:
package cpp

import (
	"container/list"
	"fmt"
	"strconv"
)

/*
   Implements the expression parsing and evaluation for #if statements

   Note that "defined name" and "define(name)" are handled before this part of code.

   #if expression
       controlled text
   #endif

   expression may be:

   Integer constants.

   Character constants, which are interpreted as they would be in normal code.

   Arithmetic operators for most of C

   Identifiers that are not macros, which are all considered to be the number zero.
*/

type cppExprCtx struct {
	e         *list.Element
	isDefined func(string) bool
}

func (ctx *cppExprCtx) nextToken() *Token {
	if ctx.e == nil {
		return nil
	}
	tok := ctx.e.Value.(*Token)
	ctx.e = ctx.e.Next()
	return tok
}

func (ctx *cppExprCtx) peek() *Token {
	if ctx.e == nil {
		return nil
	}
	return ctx.e.Value.(*Token)
}

func parseCPPExprAtom(ctx *cppExprCtx) (int64, error) {
	toCheck := ctx.nextToken()
	if toCheck == nil {
		return 0, fmt.Errorf("expected integer, char, or defined but got nothing")
	}
	switch toCheck.Kind {
	case NOT:
		v, err := parseCPPExprAtom(ctx)
		if v == 0 {
			return 1, nil
		}
		return 0, err
	case BNOT:
		v, err := parseCPPExprAtom(ctx)
		if err != nil {
			return 0, err
		}
		return ^v, nil
	case SUB:
		v, err := parseCPPExprAtom(ctx)
		if err != nil {
			return 0, err
		}
		return -v, nil
	case ADD:
		v, err := parseCPPExprAtom(ctx)
		if err != nil {
			return 0, err
		}
		return v, nil
	case LPAREN:
		v, err := parseCPPExpr(ctx)
		if err != nil {
			return 0, err
		}
		rparen := ctx.nextToken()
		if rparen == nil || rparen.Kind != RPAREN {
			return 0, fmt.Errorf("unclosed parenthesis")
		}
		return v, nil
	case INT_CONSTANT:
		v, err := strconv.ParseInt(toCheck.Val, 0, 64)
		if err != nil {
			return 0, fmt.Errorf("internal error parsing int constant")
		}
		return v, nil
	case CHAR_CONSTANT:

		return 0, fmt.Errorf("unimplemented char literal in cpp expression")
	case IDENT:
		if toCheck.Val == "defined" {
			toCheck = ctx.nextToken()
			if toCheck == nil {
				return 0, fmt.Errorf("expected ( or an identifier but got nothing")
			}
			switch toCheck.Kind {
			case LPAREN:
				toCheck = ctx.nextToken()
				rparen := ctx.nextToken()
				if rparen == nil || rparen.Kind != RPAREN {
					return 0, fmt.Errorf("malformed defined check, missing )")
				}
			case IDENT:
				//calls isDefined as intended
			default:
				return 0, fmt.Errorf("malformed defined statement at %s", toCheck.Pos)
			}
		}
	default:
		return 0, fmt.Errorf("expected integer, char, or defined but got %s", toCheck.Val)
	}
	if toCheck == nil {
		return 0, fmt.Errorf("expected identifier but got nothing")
	}
	if ctx.isDefined(toCheck.Val) {
		return 1, nil
	}
	return 0, nil
}

func evalCPPBinop(ctx *cppExprCtx, k TokenKind, l int64, r int64) (int64, error) {
	switch k {
	case LOR:
		if l != 0 || r != 0 {
			return 1, nil
		}
		return 0, nil
	case LAND:
		if l != 0 && r != 0 {
			return 1, nil
		}
		return 0, nil
	case OR:
		return l | r, nil
	case XOR:
		return l ^ r, nil
	case AND:
		return l & r, nil
	case ADD:
		return l + r, nil
	case SUB:
		return l - r, nil
	case MUL:
		return l * r, nil
	case SHR:
		return l >> uint64(r), nil
	case SHL:
		return l << uint64(r), nil
	case QUO:
		if r == 0 {
			return 0, fmt.Errorf("divide by zero in expression")
		}
		return l / r, nil
	case REM:
		if r == 0 {
			return 0, fmt.Errorf("divide by zero in expression")
		}
		return l % r, nil
	case EQL:
		if l == r {
			return 1, nil
		}
		return 0, nil
	case LSS:
		if l < r {
			return 1, nil
		}
		return 0, nil
	case GTR:
		if l > r {
			return 1, nil
		}
		return 0, nil
	case LEQ:
		if l <= r {
			return 1, nil
		}
		return 0, nil
	case GEQ:
		if l >= r {
			return 1, nil
		}
		return 0, nil
	case NEQ:
		if l != r {
			return 1, nil
		}
		return 0, nil
	case COMMA:
		return r, nil
	default:
		return 0, fmt.Errorf("internal error %s", k)
	}
}

func parseCPPTernary(ctx *cppExprCtx) (int64, error) {
	cond, err := parseCPPBinop(ctx)
	if err != nil {
		return 0, err
	}
	t := ctx.peek()
	var a, b int64
	if t != nil && t.Kind == QUESTION {
		ctx.nextToken()
		a, err = parseCPPExpr(ctx)
		if err != nil {
			return 0, err
		}
		colon := ctx.nextToken()
		if colon == nil || colon.Kind != COLON {
			return 0, fmt.Errorf("ternary without :")
		}
		b, err = parseCPPExpr(ctx)
		if err != nil {
			return 0, err
		}
		if cond != 0 {
			return a, nil
		}
		return b, nil
	}
	return cond, nil
}

func parseCPPComma(ctx *cppExprCtx) (int64, error) {
	v, err := parseCPPTernary(ctx)
	if err != nil {
		return 0, err
	}
	for {
		t := ctx.peek()
		if t == nil || t.Kind != COMMA {
			break
		}
		ctx.nextToken()
		v, err = parseCPPTernary(ctx)
		if err != nil {
			return 0, err
		}
	}
	return v, nil
}

func getPrec(k TokenKind) int {
	switch k {
	case MUL, REM, QUO:
		return 10
	case ADD, SUB:
		return 9
	case SHR, SHL:
		return 8
	case LSS, GTR, GEQ, LEQ:
		return 7
	case EQL, NEQ:
		return 6
	case AND:
		return 5
	case XOR:
		return 4
	case OR:
		return 3
	case LAND:
		return 2
	case LOR:
		return 1
	}
	return -1
}

// This is the precedence climbing algorithm, simplified because
// all the operators are left associative. The CPP doesn't
// deal with assignment operators.
func parseCPPBinop_1(ctx *cppExprCtx, prec int) (int64, error) {
	l, err := parseCPPExprAtom(ctx)
	if err != nil {
		return 0, err
	}
	for {
		t := ctx.peek()
		if t == nil {
			break
		}
		p := getPrec(t.Kind)
		if p == -1 {
			break
		}
		if p < prec {
			break
		}
		ctx.nextToken()
		r, err := parseCPPBinop_1(ctx, p+1)
		if err != nil {
			return 0, err
		}
		l, err = evalCPPBinop(ctx, t.Kind, l, r)
		if err != nil {
			return 0, err
		}
	}
	return l, nil
}

func parseCPPBinop(ctx *cppExprCtx) (int64, error) {
	return parseCPPBinop_1(ctx, 0)
}

func parseCPPExpr(ctx *cppExprCtx) (int64, error) {
	return parseCPPComma(ctx)
}

func evalIfExpr(isDefined func(string) bool, tl *tokenList) (int64, error) {
	ctx := &cppExprCtx{isDefined: isDefined, e: tl.l.Front()}
	ret, err := parseCPPExpr(ctx)
	if err != nil {
		return 0, err
	}
	t := ctx.nextToken()
	if t != nil {
		return 0, fmt.Errorf("stray token %s", t.Val)
	}
	return ret, nil
}


text:
using namespace chrono;
using namespace chrono::collision;

#define MULTICORE_SYS
//#define MOTOR_SPEED

int main(int argc, char* argv[]) {
    double step_size = 1e-3;

#ifdef MULTICORE_SYS
    // Create multicore system
    ChSystemMulticoreNSC my_sys;
    my_sys.Set_G_acc(ChVector<double>(0, 0, -9.8));

    my_sys.GetSettings()->solver.tolerance = 1e-5;
    my_sys.GetSettings()->solver.solver_mode = SolverMode::SLIDING;
    my_sys.GetSettings()->solver.max_iteration_normal = 0;
    my_sys.GetSettings()->solver.max_iteration_sliding = 300;
    my_sys.GetSettings()->solver.max_iteration_spinning = 0;
    my_sys.GetSettings()->solver.max_iteration_bilateral = 100;
    my_sys.GetSettings()->solver.compute_N = false;
    my_sys.GetSettings()->solver.alpha = 0;
    my_sys.GetSettings()->solver.cache_step_length = true;
    my_sys.GetSettings()->solver.use_full_inertia_tensor = false;
    my_sys.GetSettings()->solver.contact_recovery_speed = 1000;
    my_sys.GetSettings()->solver.bilateral_clamp_speed = 1e8;

    my_sys.GetSettings()->collision.collision_envelope = 0.01;
    my_sys.GetSettings()->collision.narrowphase_algorithm = ChNarrowphase::Algorithm::HYBRID;

    my_sys.ChangeSolverType(SolverType::BB);

#else
    // Create sequential system
    ChSystemNSC my_sys;

    my_sys.SetSolverMaxIterations(200);
    my_sys.SetSolverType(ChSolver::Type::BARZILAIBORWEIN);

    my_sys.Set_G_acc(ChVector<double>(0, 0, -9.8));

#endif

    // Create ground body
    auto ground = std::shared_ptr<ChBody>(my_sys.NewBody());
    ground->SetBodyFixed(true);
    ground->SetCollide(false);
    my_sys.AddBody(ground);

    // Create rotating body
    auto body = std::shared_ptr<ChBody>(my_sys.NewBody());
    body->SetBodyFixed(false);
    body->SetCollide(false);
    body->SetMass(1);
    body->SetPos(ChVector<>(0, 0, 0));
    my_sys.AddBody(body);

    auto box_shape = chrono_types::make_shared<ChBoxShape>();
    box_shape->GetBoxGeometry().SetLengths(ChVector<>(1, 1, 0.2));
    body->AddVisualShape(box_shape);

    // Create rotational motor
#ifdef MOTOR_SPEED
    auto motor_fun = chrono_types::make_shared<ChFunction_Setpoint>();
    auto joint = chrono_types::make_shared<ChLinkMotorRotationSpeed>();
    joint->Initialize(ground, body, ChFrame<>(ChVector<>(0, 0, 0), QUNIT));
    joint->SetSpeedFunction(motor_fun);
#else
    auto motor_fun = chrono_types::make_shared<ChFunction_Setpoint>();
    auto joint = chrono_types::make_shared<ChLinkMotorRotationAngle>();
    joint->Initialize(ground, body, ChFrame<>(ChVector<>(0, 0, 0), QUNIT));
    joint->SetAngleFunction(motor_fun);
#endif
    my_sys.AddLink(joint);

    // Create the visualization window
    opengl::ChVisualSystemOpenGL vis;
    vis.AttachSystem(&my_sys);
    vis.SetWindowTitle("Test");
    vis.SetWindowSize(1280, 720);
    vis.SetRenderMode(opengl::WIREFRAME);
    vis.Initialize();
    vis.SetCameraPosition(ChVector<>(0, -4, 1), ChVector<>(0, 0, 0));
    vis.SetCameraVertical(CameraVerticalDir::Z);

    // Run simulation
    while (true) {
        if (!vis.Run())
            break;

#ifdef MOTOR_SPEED
        motor_fun->SetSetpoint(0.5, my_sys.GetChTime());
#else
        motor_fun->SetSetpoint(0.5 * my_sys.GetChTime(), my_sys.GetChTime());
#endif

        my_sys.DoStepDynamics(step_size);
        vis.Render();
    }

    return 0;
}


text:
cask "privatetunnel" do
  version "3.0.2,3242"
  sha256 "9d0710b152bc50314a09849eaa011166a87ef85a8b93e05d4f089251e978ca69"

  url "https://swupdate.openvpn.net/downloads/privatetunnel/private-tunnel-#{version.csv.first}.#{version.csv.second}_signed.dmg",
      verified: "swupdate.openvpn.net/downloads/privatetunnel/"
  name "Private Tunnel"
  desc "VPN client"
  homepage "https://www.privatetunnel.com/home/"

  livecheck do
    url "https://www.privatetunnel.com/apps/"
    strategy :page_match do |page|
      match = page.match(%r{href=.*?/private-tunnel-(\d+(?:\.\d+)*)\.(\d+)_signed\.dmg}i)
      next if match.blank?

      "#{match[1]},#{match[2]}"
    end
  end

  pkg "Private_Tunnel_#{version.csv.first.dots_to_underscores}(#{version.csv.second})_Installer_signed.pkg"

  uninstall pkgutil:   [
              "org.openvpn.privatetunnel.pkg",
              "org.openvpn.privatetunnel_framework.pkg",
              "org.openvpn.privatetunnel_launch.pkg",
              "org.openvpn.privatetunnel_uninstall.pkg",
            ],
            delete:    "/Applications/Private Tunnel.app",
            quit:      "org.openvpn.proivatetunnel.app",
            launchctl: "org.openvpn.privatetunnel"
end


text:
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
         version="3.0"
         metadata-complete="true">

    <!-- spring security configuration -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/security/applicationContext-security.xml</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <!-- REST configuration -->
    <servlet>
        <servlet-name>Jersey Web Application</servlet-name>
        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey Web Application</servlet-name>
        <url-pattern>/services/rest/*</url-pattern>
    </servlet-mapping>

<!-- Common configuration -->
    <error-page>
        <error-code>500</error-code>
        <location>/500.html</location>
    </error-page>

    <error-page>
        <error-code>404</error-code>
        <location>/404.html</location>
    </error-page>

</web-app>


text:
		<link rel="stylesheet" href="{{ url_for('static', filename='inc/skeleton/css/normalize.css') }}">
		<link rel="stylesheet" href="{{ url_for('static', filename='inc/skeleton/css/skeleton.css') }}">
		<link rel="stylesheet" href="{{ url_for('static', filename='css/local.css') }}">

Twitore

Home

Collections

		{% if msg %}

{{msg.msg_text}}

		{% endif %}


text:
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>BoardItemAssociation | connectwise-rest-api</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					connectwise-rest-api

						Options

								All

Public

Public/Protected

All

							<input type="checkbox" id="tsd-filter-inherited" checked />
							Inherited
							<input type="checkbox" id="tsd-filter-externals" checked />
							Externals
							<input type="checkbox" id="tsd-filter-only-exported" />
							Only exported

					Menu

					Globals

					"api/api"

					BoardItemAssociation

Interface BoardItemAssociation

Hierarchy

						BoardItemAssociation

Index

Properties

add<wbr>All<wbr>Sub<wbr>Types<wbr>Flag

board

id

info

item

remove<wbr>All<wbr>Sub<wbr>Types<wbr>Flag

sub<wbr>Type<wbr>Association<wbr>Ids

Properties

Optional add<wbr>All<wbr>Sub<wbr>Types<wbr>Flag

add<wbr>All<wbr>Sub<wbr>Types<wbr>Flag: boolean

Defined in api/api.ts:1143

Optional board

board: BoardReference

Defined in api/api.ts:1146

id

id: number

Defined in api/api.ts:1141

Optional info

info: Metadata

Defined in api/api.ts:1151

Metadata of the entity

Optional item

item: ServiceItemReference

Defined in api/api.ts:1145

Optional remove<wbr>All<wbr>Sub<wbr>Types<wbr>Flag

remove<wbr>All<wbr>Sub<wbr>Types<wbr>Flag: boolean

Defined in api/api.ts:1144

Optional sub<wbr>Type<wbr>Association<wbr>Ids

sub<wbr>Type<wbr>Association<wbr>Ids: Array<number>

Defined in api/api.ts:1142

						Globals

						"api/api"

						"api/assign"

						"connectwise"

						Board<wbr>Item<wbr>Association

								add<wbr>All<wbr>Sub<wbr>Types<wbr>Flag

								board

								id

								info

								item

								remove<wbr>All<wbr>Sub<wbr>Types<wbr>Flag

								sub<wbr>Type<wbr>Association<wbr>Ids

Legend

Module

Object literal

Variable

Function

Function with type parameter

Index signature

Type alias

Enumeration

Enumeration member

Property

Method

Interface

Interface with type parameter

Constructor

Property

Method

Index signature

Class

Class with type parameter

Constructor

Property

Method

Accessor

Index signature

Inherited constructor

Inherited property

Inherited method

Inherited accessor

Protected property

Protected method

Protected accessor

Private property

Private method

Private accessor

Static property

Static method

Generated using TypeDoc


text:
from setuptools import setup, find_packages

setup(
    # Application name:
    name="visci",

    # Version number (initial):
    version="1.0",

    # Application author details:
    author="Vanessa Sochat",
    author_email="vsochat@stanford.edu",

    # Packages
    packages=find_packages(),

    # Data
    package_data = {'visci':['templates/*']},

    # Details
    url="http://www.github.com/vsoch/visci",

    license="LICENSE.txt",
    description="visualization standard file structure for continuous integration",

)


text:
module Adminpanel
  class SectionsController < Adminpanel::ApplicationController
    def index
      @sections = Section.all
    end

    def edit
      @section = Section.find(params[:id])
    end

    def update
      @section = Section.find(params[:id])

      if @section.update(section_params)
        redirect_to section_path(@section), notice: 'La seccion se ha actualizado'
      else
        render 'edit'
      end
    end

    private
    def section_params
      params.require(:section).permit(
        :has_description,
        :description,
        :key,
        :page,
        :name,
        :max_files,
        :has_image,
        sectionfile_ids: []
      )
    end
  end
end


text:
module.exports = function a() {
	return "This is a";
};


text:
require 'puppet'
require 'puppet/type/neutron_plugin_cisco_credentials'

describe 'Puppet::Type.type(:neutron_plugin_cisco_credentials)' do

  before :each do
    @neutron_plugin_cisco_credentials = Puppet::Type.type(:neutron_plugin_cisco_credentials).new(:name => 'DEFAULT/foo', :value => 'bar')
  end

  it 'should autorequire the package that install the file' do
    catalog = Puppet::Resource::Catalog.new
    package = Puppet::Type.type(:package).new(:name => 'neutron-plugin-cisco')
    catalog.add_resource package, @neutron_plugin_cisco_credentials
    dependency = @neutron_plugin_cisco_credentials.autorequire
    expect(dependency.size).to eq(1)
    expect(dependency[0].target).to eq(@neutron_plugin_cisco_credentials)
    expect(dependency[0].source).to eq(package)
  end

end


text:
<?xml version="1.0"?>
<!--

$Id$

Copyright (c) 2008-2011, The University of Edinburgh
All Rights Reserved

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <name>SnuggleTeX JEuclid Extensions</name>
  <artifactId>snuggletex-jeuclid</artifactId>
  <packaging>jar</packaging>
  <parent>
    <groupId>uk.ac.ed.ph.snuggletex</groupId>
    <artifactId>snuggletex</artifactId>
    <version>1.3-SNAPSHOT</version>
  </parent>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>snuggletex-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.jeuclid</groupId>
      <artifactId>jeuclid-core</artifactId>
      <version>${jeuclid.version}</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>


text:
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace GuruComponents.Netrix.UserInterface.ColorPicker
{
	///
	/// A control that allows the user to select any color from the
	/// RGB color space.
	///
	/// <remarks>
	/// The control presents a 2 dimensional slice through the 3D color cube.  The user
	/// may select Red, Green or Blue to be the z-axis where the z-axis extends into the screen and the
	/// x and y-axes are the remaining pair of colors.
	/// The control displays a 256x256 color palette calculated over the x and y axes combined
	/// with the selected z-axis value.  This palette is varied continuously as the user changes the
	/// selected z-axis value.
	///

	/// The control is inpired from
	/// Peter McMahon's ColorPicker.NET.
	/// </remarks>
	[ToolboxItem(false)]
    [ToolboxBitmap(typeof(ResourceManager), "ToolBox.ColorEditor.ico")]
    [Designer(typeof(NetrixUIDesigner))]
    public class ColorSlider : UserControl
	{
		static readonly Color defaultColor = Color.FromArgb(127,127,127);
		const bool defaultContinuousScroll = true;

		private TrackBar trackBarRed;
		private IContainer components;
		private NumericUpDown numericUpDownRed;
		private Panel panel1;
		private RadioButton radioButtonBlue;
		private RadioButton radioButtonRed;
		private RadioButton radioButtonGreen;
		private PictureBox pictureBox;
		private TrackBar trackBarGreen;
		private TrackBar trackBarBlue;
		private NumericUpDown numericUpDownGreen;
		private NumericUpDown numericUpDownBlue;

		private Bitmap imgColors = new Bitmap(256, 256);

		private ZAxis zaxis = ZAxis.red;
		private bool bContinuousScrollZAxis = defaultContinuousScroll;

		private int x_val = 0;
		private int y_val = 0;
		private bool bMouseDown = false;
		private Label label1;
		private TrackBar trackBarBrightness;
		private Panel panel2;
		private Panel panel3;
		private ToolTip toolTip1;
        ///
		/// Creates a CustomColorPicker control.
		/// It defaults to the blue/green side of the color cube (z-axis=red).
		///
		public ColorSlider()
        {
            // This call is required by the Windows.Forms Form Designer.
			InitializeComponent();
			pictureBox.Image = imgColors;
			ResetColor();
		}

		///
		/// Clean up any resources being used.
		///
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Component Designer generated code
		///
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		///
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            this.pictureBox = new System.Windows.Forms.PictureBox();
            this.radioButtonBlue = new System.Windows.Forms.RadioButton();
            this.numericUpDownRed = new System.Windows.Forms.NumericUpDown();
            this.numericUpDownGreen = new System.Windows.Forms.NumericUpDown();
            this.radioButtonGreen = new System.Windows.Forms.RadioButton();
            this.trackBarRed = new System.Windows.Forms.TrackBar();
            this.trackBarBlue = new System.Windows.Forms.TrackBar();
            this.radioButtonRed = new System.Windows.Forms.RadioButton();
            this.panel1 = new System.Windows.Forms.Panel();
            this.trackBarGreen = new System.Windows.Forms.TrackBar();
            this.numericUpDownBlue = new System.Windows.Forms.NumericUpDown();
            this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
            this.label1 = new System.Windows.Forms.Label();
            this.trackBarBrightness = new System.Windows.Forms.TrackBar();
            this.panel2 = new System.Windows.Forms.Panel();
            this.panel3 = new System.Windows.Forms.Panel();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRed)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDownGreen)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarRed)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarBlue)).BeginInit();
            this.panel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarGreen)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDownBlue)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarBrightness)).BeginInit();
            this.SuspendLayout();
            //
            // pictureBox
            //
            this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.pictureBox.Location = new System.Drawing.Point(32, 0);
            this.pictureBox.Name = "pictureBox";
            this.pictureBox.Size = new System.Drawing.Size(256, 256);
            this.pictureBox.TabIndex = 11;
            this.pictureBox.TabStop = false;
            this.pictureBox.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox_Paint);
            this.pictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseUp);
            this.pictureBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseMove);
            this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox_MouseDown);
            //
            // radioButtonBlue
            //
            this.radioButtonBlue.Appearance = System.Windows.Forms.Appearance.Button;
            this.radioButtonBlue.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(192)));
            this.radioButtonBlue.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.radioButtonBlue.ForeColor = System.Drawing.SystemColors.ControlLightLight;
            this.radioButtonBlue.Location = new System.Drawing.Point(99, 0);
            this.radioButtonBlue.Name = "radioButtonBlue";
            this.radioButtonBlue.Size = new System.Drawing.Size(40, 24);
            this.radioButtonBlue.TabIndex = 3;
            this.radioButtonBlue.Text = "Fix";
            this.radioButtonBlue.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.toolTip1.SetToolTip(this.radioButtonBlue, "Set the Z axis to blue");
            this.radioButtonBlue.CheckedChanged += new System.EventHandler(this.radioButtonBlue_CheckedChanged);
            //
            // numericUpDownRed
            //
            this.numericUpDownRed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.numericUpDownRed.Hexadecimal = true;
            this.numericUpDownRed.Location = new System.Drawing.Point(288, 186);
            this.numericUpDownRed.Maximum = new System.Decimal(new int[] {
                                                                             255,
                                                                             0,
                                                                             0,
                                                                             0});
            this.numericUpDownRed.Name = "numericUpDownRed";
            this.numericUpDownRed.Size = new System.Drawing.Size(40, 20);
            this.numericUpDownRed.TabIndex = 7;
            this.numericUpDownRed.ValueChanged += new System.EventHandler(this.numericUpDownRed_ValueChanged);
            this.numericUpDownRed.Leave += new System.EventHandler(this.numericUpDownRed_Leave);
            //
            // numericUpDownGreen
            //
            this.numericUpDownGreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.numericUpDownGreen.Hexadecimal = true;
            this.numericUpDownGreen.Location = new System.Drawing.Point(336, 186);
            this.numericUpDownGreen.Maximum = new System.Decimal(new int[] {
                                                                               255,
                                                                               0,
                                                                               0,
                                                                               0});
            this.numericUpDownGreen.Name = "numericUpDownGreen";
            this.numericUpDownGreen.Size = new System.Drawing.Size(40, 20);
            this.numericUpDownGreen.TabIndex = 8;
            this.numericUpDownGreen.ValueChanged += new System.EventHandler(this.numericUpDownGreen_ValueChanged);
            //
            // radioButtonGreen
            //
            this.radioButtonGreen.Appearance = System.Windows.Forms.Appearance.Button;
            this.radioButtonGreen.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(192)), ((System.Byte)(0)));
            this.radioButtonGreen.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.radioButtonGreen.ForeColor = System.Drawing.SystemColors.ControlLightLight;
            this.radioButtonGreen.Location = new System.Drawing.Point(51, 0);
            this.radioButtonGreen.Name = "radioButtonGreen";
            this.radioButtonGreen.Size = new System.Drawing.Size(40, 24);
            this.radioButtonGreen.TabIndex = 2;
            this.radioButtonGreen.Text = "Fix";
            this.radioButtonGreen.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.toolTip1.SetToolTip(this.radioButtonGreen, "Set the Z axis to green");
            this.radioButtonGreen.CheckedChanged += new System.EventHandler(this.radioButtonGreen_CheckedChanged);
            //
            // trackBarRed
            //
            this.trackBarRed.LargeChange = 16;
            this.trackBarRed.Location = new System.Drawing.Point(288, 24);
            this.trackBarRed.Maximum = 255;
            this.trackBarRed.Name = "trackBarRed";
            this.trackBarRed.Orientation = System.Windows.Forms.Orientation.Vertical;
            this.trackBarRed.Size = new System.Drawing.Size(45, 160);
            this.trackBarRed.TabIndex = 4;
            this.trackBarRed.TickFrequency = 16;
            this.trackBarRed.TickStyle = System.Windows.Forms.TickStyle.Both;
            this.trackBarRed.KeyUp += new System.Windows.Forms.KeyEventHandler(this.trackBarRed_KeyUp);
            this.trackBarRed.Leave += new System.EventHandler(this.trackBarRed_Leave);
            this.trackBarRed.MouseUp += new System.Windows.Forms.MouseEventHandler(this.trackBarRed_MouseUp);
            this.trackBarRed.ValueChanged += new System.EventHandler(this.trackBarRed_ValueChanged);
            //
            // trackBarBlue
            //
            this.trackBarBlue.LargeChange = 16;
            this.trackBarBlue.Location = new System.Drawing.Point(384, 24);
            this.trackBarBlue.Maximum = 255;
            this.trackBarBlue.Name = "trackBarBlue";
            this.trackBarBlue.Orientation = System.Windows.Forms.Orientation.Vertical;
            this.trackBarBlue.Size = new System.Drawing.Size(45, 160);
            this.trackBarBlue.TabIndex = 6;
            this.trackBarBlue.TickFrequency = 16;
            this.trackBarBlue.TickStyle = System.Windows.Forms.TickStyle.Both;
            this.trackBarBlue.KeyUp += new System.Windows.Forms.KeyEventHandler(this.trackBarBlue_KeyUp);
            this.trackBarBlue.Leave += new System.EventHandler(this.trackBarBlue_Leave);
            this.trackBarBlue.MouseUp += new System.Windows.Forms.MouseEventHandler(this.trackBarBlue_MouseUp);
            this.trackBarBlue.ValueChanged += new System.EventHandler(this.trackBarBlue_ValueChanged);
            //
            // radioButtonRed
            //
            this.radioButtonRed.Appearance = System.Windows.Forms.Appearance.Button;
            this.radioButtonRed.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(0)), ((System.Byte)(0)));
            this.radioButtonRed.Checked = true;
            this.radioButtonRed.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.radioButtonRed.ForeColor = System.Drawing.SystemColors.ControlLightLight;
            this.radioButtonRed.Location = new System.Drawing.Point(3, 0);
            this.radioButtonRed.Name = "radioButtonRed";
            this.radioButtonRed.Size = new System.Drawing.Size(40, 24);
            this.radioButtonRed.TabIndex = 1;
            this.radioButtonRed.TabStop = true;
            this.radioButtonRed.Text = "Fix";
            this.radioButtonRed.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.toolTip1.SetToolTip(this.radioButtonRed, "Set the Z axis to red");
            this.radioButtonRed.CheckedChanged += new System.EventHandler(this.radioButtonRed_CheckedChanged);
            //
            // panel1
            //
            this.panel1.Controls.Add(this.radioButtonBlue);
            this.panel1.Controls.Add(this.radioButtonRed);
            this.panel1.Controls.Add(this.radioButtonGreen);
            this.panel1.Location = new System.Drawing.Point(288, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(144, 24);
            this.panel1.TabIndex = 10;
            //
            // trackBarGreen
            //
            this.trackBarGreen.LargeChange = 16;
            this.trackBarGreen.Location = new System.Drawing.Point(336, 24);
            this.trackBarGreen.Maximum = 255;
            this.trackBarGreen.Name = "trackBarGreen";
            this.trackBarGreen.Orientation = System.Windows.Forms.Orientation.Vertical;
            this.trackBarGreen.Size = new System.Drawing.Size(45, 160);
            this.trackBarGreen.TabIndex = 5;
            this.trackBarGreen.TickFrequency = 16;
            this.trackBarGreen.TickStyle = System.Windows.Forms.TickStyle.Both;
            this.trackBarGreen.KeyUp += new System.Windows.Forms.KeyEventHandler(this.trackBarGreen_KeyUp);
            this.trackBarGreen.Leave += new System.EventHandler(this.trackBarGreen_Leave);
            this.trackBarGreen.MouseUp += new System.Windows.Forms.MouseEventHandler(this.trackBarGreen_MouseUp);
            this.trackBarGreen.ValueChanged += new System.EventHandler(this.trackBarGreen_ValueChanged);
            //
            // numericUpDownBlue
            //
            this.numericUpDownBlue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.numericUpDownBlue.Hexadecimal = true;
            this.numericUpDownBlue.Location = new System.Drawing.Point(384, 186);
            this.numericUpDownBlue.Maximum = new System.Decimal(new int[] {
                                                                              255,
                                                                              0,
                                                                              0,
                                                                              0});
            this.numericUpDownBlue.Name = "numericUpDownBlue";
            this.numericUpDownBlue.Size = new System.Drawing.Size(40, 20);
            this.numericUpDownBlue.TabIndex = 9;
            this.numericUpDownBlue.ValueChanged += new System.EventHandler(this.numericUpDownBlue_ValueChanged);
            //
            // label1
            //
            this.label1.BackColor = System.Drawing.SystemColors.Info;
            this.label1.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.label1.Location = new System.Drawing.Point(296, 211);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(128, 16);
            this.label1.TabIndex = 12;
            this.label1.Text = "No HTML Color selected";
            //
            // trackBarBrightness
            //
            this.trackBarBrightness.LargeChange = 16;
            this.trackBarBrightness.Location = new System.Drawing.Point(0, 24);
            this.trackBarBrightness.Maximum = 255;
            this.trackBarBrightness.Name = "trackBarBrightness";
            this.trackBarBrightness.Orientation = System.Windows.Forms.Orientation.Vertical;
            this.trackBarBrightness.Size = new System.Drawing.Size(45, 208);
            this.trackBarBrightness.TabIndex = 13;
            this.trackBarBrightness.TickFrequency = 8;
            this.trackBarBrightness.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
            this.trackBarBrightness.ValueChanged += new System.EventHandler(this.trackBarBrightness_ValueChanged);
            //
            // panel2
            //
            this.panel2.BackColor = System.Drawing.Color.Black;
            this.panel2.Location = new System.Drawing.Point(0, 0);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(32, 24);
            this.panel2.TabIndex = 14;
            //
            // panel3
            //
            this.panel3.BackColor = System.Drawing.Color.White;
            this.panel3.Location = new System.Drawing.Point(0, 232);
            this.panel3.Name = "panel3";
            this.panel3.Size = new System.Drawing.Size(32, 24);
            this.panel3.TabIndex = 15;
            //
            // ColorSlider
            //
            this.Controls.Add(this.pictureBox);
            this.Controls.Add(this.trackBarBrightness);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.numericUpDownRed);
            this.Controls.Add(this.trackBarRed);
            this.Controls.Add(this.trackBarGreen);
            this.Controls.Add(this.trackBarBlue);
            this.Controls.Add(this.numericUpDownGreen);
            this.Controls.Add(this.numericUpDownBlue);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel3);
            this.Name = "ColorSlider";
            this.Size = new System.Drawing.Size(432, 256);
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDownRed)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDownGreen)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarRed)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarBlue)).EndInit();
            this.panel1.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.trackBarGreen)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDownBlue)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.trackBarBrightness)).EndInit();
            this.ResumeLayout(false);

        }
		#endregion

		private void MakePalette()
		{
			switch( zaxis )
			{
				case ZAxis.red:
					MakeRedPalette();
					break;
				case ZAxis.blue:
					MakeBluePalette();
					break;
				case ZAxis.green:
					MakeGreenPalette();
					break;
			}
		}

		private void MakeRedPalette()
		{
# if UNSAFE
			byte red_value = Convert.ToByte(trackBarRed.Value);
            BitmapUnsafe ub = new BitmapUnsafe(imgColors);
            ub.MakeRedPalette(red_value);
# else
			int red_value = trackBarRed.Value;
			for( int i=0; i<255; i++ )
			{
				for( int j=0; j<255; j++ )
				{
					imgColors.SetPixel(i, j, Color.FromArgb(i, j, red_value) );
				}
			}
#endif
		}

		private void MakeBluePalette()
		{
# if UNSAFE
			byte blue_value = Convert.ToByte(trackBarBlue.Value);
            BitmapUnsafe ub = new BitmapUnsafe(imgColors);
            ub.MakeBluePalette(blue_value);
# else
			int blue_value = trackBarBlue.Value;

			for( int i=0; i<255; i++ )
			{
				for( int j=0; j<255; j++ )
				{
					imgColors.SetPixel(i, j, Color.FromArgb(i, j, blue_value) );
				}
			}
#endif
      }

		private void MakeGreenPalette()
		{
# if UNSAFE
			byte green_value = Convert.ToByte(trackBarGreen.Value);
            BitmapUnsafe ub = new BitmapUnsafe(imgColors);
            ub.MakeGreenPalette(green_value);
# else

            int green_value = trackBarGreen.Value;

			for( int i=0; i<255; i++ )
			{
				for( int j=0; j<255; j++ )
				{
					imgColors.SetPixel(i, j, Color.FromArgb(i, green_value, j) );
				}
			}
#endif
        }

		private void trackBarRedReleased()
		{
			if( (zaxis == ZAxis.red) && !bContinuousScrollZAxis)
			{
				MakeRedPalette();
				pictureBox.Refresh();
			}
		}

		// Leave not receive for UpDown controls - beta2 bug?
		private void numericUpDownRed_Leave(object sender, EventArgs e)
		{
			trackBarRedReleased();
		}

		private void trackBarRed_Leave(object sender, EventArgs e)
		{
			trackBarRedReleased();
		}

		private void trackBarRed_KeyUp(object sender, KeyEventArgs e)
		{
			trackBarRedReleased();
		}

		private void trackBarRed_MouseUp(object sender, MouseEventArgs e)
		{
			trackBarRedReleased();
		}

		private void trackBarRed_ValueChanged(object sender, EventArgs e)
		{
			numericUpDownRed.Value = trackBarRed.Value;

			Application.DoEvents();

			if( (zaxis == ZAxis.red) && bContinuousScrollZAxis )
			{
				MakeRedPalette();
			}

			GetCoords();

			pictureBox.Refresh();

			FireColorChangedEvent();
		}

		private void numericUpDownRed_ValueChanged(object sender, EventArgs e)
		{
			trackBarRed.Value = (int)numericUpDownRed.Value;
		}

		private void trackBarBlueReleased()
		{
			if( zaxis == ZAxis.blue && !bContinuousScrollZAxis )
			{
				MakeBluePalette();
				pictureBox.Refresh();
			}
		}

		private void trackBarBlue_Leave(object sender, EventArgs e)
		{
			trackBarBlueReleased();
		}

		private void trackBarBlue_KeyUp(object sender, KeyEventArgs e)
		{
			trackBarBlueReleased();
		}

		private void trackBarBlue_MouseUp(object sender, MouseEventArgs e)
		{
			trackBarBlueReleased();
		}

		private void trackBarBlue_ValueChanged(object sender, EventArgs e)
		{
			numericUpDownBlue.Value = trackBarBlue.Value;
			Application.DoEvents();

			if( zaxis == ZAxis.blue && bContinuousScrollZAxis )
			{
				MakeBluePalette();
			}

			GetCoords();
			pictureBox.Refresh();

			FireColorChangedEvent();
		}

		private void numericUpDownBlue_ValueChanged(object sender, EventArgs e)
		{
			trackBarBlue.Value = (int)numericUpDownBlue.Value;
		}

		private void trackBarGreenReleased()
		{
			if( zaxis == ZAxis.green && !bContinuousScrollZAxis )
			{
				MakeGreenPalette();
				pictureBox.Refresh();
			}
		}

		private void trackBarGreen_Leave(object sender, EventArgs e)
		{
			trackBarGreenReleased();
		}

		private void trackBarGreen_KeyUp(object sender, KeyEventArgs e)
		{
			trackBarGreenReleased();
		}

		private void trackBarGreen_MouseUp(object sender, MouseEventArgs e)
		{
			trackBarGreenReleased();
		}

		private void trackBarGreen_ValueChanged(object sender, EventArgs e)
		{
			numericUpDownGreen.Value = trackBarGreen.Value;
			Application.DoEvents();

			if( zaxis == ZAxis.green && bContinuousScrollZAxis )
			{
				MakeGreenPalette();
			}

			GetCoords();
			pictureBox.Refresh();

			FireColorChangedEvent();
		}

		private void GetCoords()
		{
			switch( zaxis )
			{
				case ZAxis.green:
					x_val = trackBarRed.Value;
					y_val = trackBarBlue.Value;
					break;
				case ZAxis.red:
					x_val = trackBarGreen.Value;
					y_val = trackBarBlue.Value;
					break;
				case ZAxis.blue:
					x_val = trackBarRed.Value;
					y_val = trackBarGreen.Value;
					break;
			}
		}

		private static void SetCoordBound( ref int coord )
		{
			if( coord < 0 )
				coord = 0;
			if( coord > 255 )
				coord = 255;
		}

		private void SetCoords(int x, int y)
		{
			SetCoordBound( ref x );
			SetCoordBound( ref y );

			switch( zaxis )
			{
				case ZAxis.green:
					trackBarRed.Value   = x;
					trackBarBlue.Value  = y;
					break;
				case ZAxis.red:
					trackBarGreen.Value = x;
					trackBarBlue.Value  = y;
					break;
				case ZAxis.blue:
					trackBarRed.Value   = x;
					trackBarGreen.Value = y;
					break;
			}
		}

		private void numericUpDownGreen_ValueChanged(object sender, EventArgs e)
		{
			trackBarGreen.Value = (int)numericUpDownGreen.Value;
		}

		private void radioButtonRed_CheckedChanged(object sender, EventArgs e)
		{
			if(radioButtonRed.Checked)
			{
				zaxis = ZAxis.red;
				MakeRedPalette();
				GetCoords();
				pictureBox.Refresh();
			}
		}

		private void radioButtonGreen_CheckedChanged(object sender, EventArgs e)
		{
			if(radioButtonGreen.Checked)
			{
				zaxis = ZAxis.green;
				MakeGreenPalette();
				GetCoords();
				pictureBox.Refresh();
			}
		}

		private void radioButtonBlue_CheckedChanged(object sender, EventArgs e)
		{
			if(radioButtonBlue.Checked)
			{
				zaxis = ZAxis.blue;
				MakeBluePalette();
				GetCoords();
				pictureBox.Refresh();
			}
		}

		private void pictureBox_Paint(object sender, PaintEventArgs e)
		{
			if( Enabled )
			{
				Pen p = new Pen(Color.Gray);

				const int offset = 5;

				e.Graphics.DrawLine( p, x_val, 0, x_val, y_val-offset );
				e.Graphics.DrawLine( p, x_val, y_val+offset, x_val, 255 );

				e.Graphics.DrawLine( p, 0, y_val, x_val-offset, y_val );
				e.Graphics.DrawLine( p, x_val+offset, y_val, 255, y_val );

				e.Graphics.DrawRectangle( p, x_val-offset, y_val-offset, 2*offset, 2*offset );

				p.Dispose();
			}
		}

		private void pictureBox_MouseMove(object sender, MouseEventArgs e)
		{
			if( bMouseDown )
			{
				SetCoords(e.X,e.Y);
			}
		}

		private void pictureBox_MouseDown(object sender, MouseEventArgs e)
		{
			bMouseDown = true;
			SetCoords(e.X,e.Y);
		}

		private void pictureBox_MouseUp(object sender, MouseEventArgs e)
		{
			bMouseDown = false;
			this.label1.Text = ColorTranslator.ToHtml(this.Color);
		}

		///
		/// The ColorChangedEvent event handler.
		///
		[Browsable(true), Category("ColorPicker")]
		public event ColorChangedEventHandler     ColorChanged;

		private void FireColorChangedEvent()
		{
			if( null != ColorChanged )
			{
				Color color = Color.FromArgb(
					trackBarRed.Value,
					trackBarGreen.Value,
					trackBarBlue.Value );

				OnColorChanged(new ColorChangedEventArgs(color));
			}
		}

		///
		/// Raises the ColorChanged event.
		///
		/// <param name="e"></param>
		protected virtual void OnColorChanged(ColorChangedEventArgs e)
		{
			if( null != ColorChanged )
			{
			    ColorChanged(this, e);
			}
		}

		///
		/// Sets/gets the pick color.
		///
		[Browsable(true), Category("ColorPanel"), Description("Get/set the pick color.")]
		public Color Color
		{
			get
			{
				return Color.FromArgb(
					trackBarRed.Value,
					trackBarGreen.Value,
					trackBarBlue.Value );
			}
			set
			{
				if( value != Color.FromArgb(
					trackBarRed.Value,
					trackBarGreen.Value,
					trackBarBlue.Value ) )
				{
					trackBarRed.Value   = value.R;
					trackBarBlue.Value  = value.B;
					trackBarGreen.Value = value.G;

					FireColorChangedEvent();
				}
			}
		}

		///
		/// Design time support to reset the Color property to it's default value.
		///
		public void ResetColor()
		{
			Color = defaultColor;
		}

		///
		/// Design time support to indicate whether the Color property should be serialized.
		///
		/// <returns></returns>
		public bool ShouldSerializeColor()
		{
			return Color != defaultColor;
		}

		///
		/// Enable/disable smooth scrolling of the z-axis of the color cube.
		/// You may want to disable this on slower systems since continuously recomputing
		/// the color palette is fairly processor intensive.
		///
		[Browsable(true), Category("ColorPanel")]
		[Description("Enable/disable continuous z-axis color."), DefaultValue(defaultContinuousScroll)]
		public bool EnableContinuousScrollZ
		{
			get
			{
				return bContinuousScrollZAxis;
			}
			set
			{
				bContinuousScrollZAxis = value;
			}
		}

		///
		/// Overrides OnEnabledChanged so the control can redraw itself
		/// enabled/disabled.
		///
		/// <param name="e"></param>
		protected override void OnEnabledChanged(EventArgs e)
		{
			base.OnEnabledChanged(e);

			trackBarBlue.Enabled       = Enabled;
			trackBarRed.Enabled        = Enabled;
			trackBarGreen.Enabled      = Enabled;

			numericUpDownBlue.Enabled  = Enabled;
			numericUpDownRed.Enabled   = Enabled;
			numericUpDownGreen.Enabled = Enabled;

			radioButtonBlue.Enabled    = Enabled;
			radioButtonRed.Enabled     = Enabled;
			radioButtonGreen.Enabled   = Enabled;

			pictureBox.Enabled = Enabled;

			Refresh();
		}

		///
		/// Overrides OnLoad.
		///
		/// <param name="e"></param>
		protected override void OnLoad(EventArgs e)
		{
			MakePalette();
			Refresh();

			base.OnLoad(e);
		}

		private void trackBarBrightness_ValueChanged(object sender, EventArgs e)
		{
			/*
			double y = Convert.ToDouble(this.trackBarBrightness.Value)/255;
			int r = Convert.ToInt32((y*255.0)*.299);
			int g = Convert.ToInt32((y*255.0)*.587);
			int b = Convert.ToInt32((y*255.0)*.114);
			this.numericUpDownRed.Value = r;
			this.numericUpDownGreen.Value = g;
			this.numericUpDownBlue.Value = b;
			this.trackBarRed.Value = r;
			this.trackBarGreen.Value = g;
			this.trackBarBlue.Value = b;
			*/
		}
	}
}


text:
export * from './sidebar.actions';
export * from './sidebar.module';
export * from './sidebar.store';


text: This project is learning tool to memorize Hiragana, Japanese Character. .


text:
function [ output_args ] = Pyramids( I )
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
[n,m] = size(I);
pI = zeros(n/2, m/2);

end


text:
<?php

class MageTest_Core_Model_Email extends Mage_Core_Model_Email
{
    public function send()
    {
        if (isset($_SERVER['MAGE_TEST'])) {
            $mail = new Zend_Mail();

            if (strtolower($this->getType()) == 'html') {
                $mail->setBodyHtml($this->getBody());
            }
            else {
                $mail->setBodyText($this->getBody());
            }

            $mail->setFrom($this->getFromEmail(), $this->getFromName())
                ->addTo($this->getToEmail(), $this->getToName())
                ->setSubject($this->getSubject());
            Mage::app()->setResponseEmail($mail);
        } else {
            parent::send();
        }
    }
}


text:
package com.blazebit.persistence.view.processor.model.sub;

@javax.annotation.Generated(value = "com.blazebit.persistence.view.processor.EntityViewAnnotationProcessor")
public abstract class BaseView_com_blazebit_persistence_view_processor_model_BView<ID extends java.io.Serializable, X extends java.io.Serializable> extends com.blazebit.persistence.view.processor.model.BView<X> {

    public BaseView_com_blazebit_persistence_view_processor_model_BView() {
        super();
    }

    public BaseView_com_blazebit_persistence_view_processor_model_BView(com.blazebit.persistence.view.processor.model.BView self) {
        super(self);
    }

    public abstract java.lang.Integer getParent();

    public abstract void setParent(java.lang.Integer arg0);
    public abstract void setParent(ID arg0);
}


text:
package com.jetbrains.python.inspections;

import com.jetbrains.python.fixtures.PyTestCase;
import com.jetbrains.python.psi.LanguageLevel;

/**
 * @author vlan
 */
public class PyUnreachableCodeInspectionTest extends PyTestCase {
  private static final String TEST_DIRECTORY = "inspections/PyUnreachableCodeInspection/";

  // All previous unreachable tests, feel free to split them
  public void testUnreachable() {
    runWithLanguageLevel(LanguageLevel.PYTHON26, () -> doTest());
  }

  // PY-7420
  public void testWithSuppressedExceptions() {
    runWithLanguageLevel(LanguageLevel.PYTHON26, () -> doTest());
  }

  private void doTest() {
    myFixture.configureByFile(TEST_DIRECTORY + getTestName(false) + ".py");
    myFixture.enableInspections(PyUnreachableCodeInspection.class);
    myFixture.checkHighlighting(true, false, false);
  }
}


text:
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("CoApp.Mg")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyVersion("1.0.0.7")]
[assembly: AssemblyFileVersion("1.0.0.7")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: ComVisible(false)]


text:
exports.userView = {
    name:                   'book',
    description:            'Return book info from MongoDB',
    outputExample:          {},

    run: function(api, data, next){
        api.models.Book.findById("56301824138cd73058d42382").then(function(book){
            if(!book) return next(new Error('book not found'));
            data.response.book = book.year;
            next();
        }).catch(next);
    }
};


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SCSM.AzureAutomation.WPF.ConfigItem
{
    /// <summary>
    /// Interaction logic for Runbook.xaml
    /// </summary>
    public partial class Runbook : UserControl
    {
        public Runbook()
        {
            InitializeComponent();
        }
    }
}


text:
namespace CampusSystem.Data.Models
{
    using CampusSystem.Data.Common.Models;

    public class ConsumptionPrice : BaseModel<int>
    {
        public decimal ElectricityPrice { get; set; }

        public decimal ColdWaterPrice { get; set; }

        public decimal HotWaterPrice { get; set; }

        public decimal HeatingPrice { get; set; }
    }
}


text:
#ifndef LIGHTGBM_PREDICTOR_HPP_
#define LIGHTGBM_PREDICTOR_HPP_

#include <LightGBM/meta.h>
#include <LightGBM/boosting.h>
#include <LightGBM/utils/text_reader.h>
#include <LightGBM/dataset.h>

#include <LightGBM/utils/openmp_wrapper.h>

#include <cstring>
#include <cstdio>
#include <vector>
#include <utility>
#include <functional>
#include <string>
#include <memory>

namespace LightGBM {

/*!
* \brief Used to predict data with input model
*/
class Predictor {
public:
  /*!
  * \brief Constructor
  * \param boosting Input boosting model
  * \param is_raw_score True if need to predict result with raw score
  * \param is_predict_leaf_index True if output leaf index instead of prediction score
  */
  Predictor(const Boosting* boosting, bool is_raw_score, bool is_predict_leaf_index) {
    boosting_ = boosting;
    num_features_ = boosting_->MaxFeatureIdx() + 1;
#pragma omp parallel
#pragma omp master
    {
      num_threads_ = omp_get_num_threads();
    }
    for (int i = 0; i < num_threads_; ++i) {
      features_.push_back(std::vector<double>(num_features_));
    }
    features_.shrink_to_fit();
    if (is_predict_leaf_index) {
      predict_fun_ = [this](const std::vector<std::pair<int, double>>& features) {
        const int tid = PutFeatureValuesToBuffer(features);
        // get result for leaf index
        auto result = boosting_->PredictLeafIndex(features_[tid].data());
        return std::vector<double>(result.begin(), result.end());
      };
    } else {
      if (is_raw_score) {
        predict_fun_ = [this](const std::vector<std::pair<int, double>>& features) {
          const int tid = PutFeatureValuesToBuffer(features);
          // get result without sigmoid transformation
          return boosting_->PredictRaw(features_[tid].data());
        };
      } else {
        predict_fun_ = [this](const std::vector<std::pair<int, double>>& features) {
          const int tid = PutFeatureValuesToBuffer(features);
          return boosting_->Predict(features_[tid].data());
        };
      }
    }
  }
  /*!
  * \brief Destructor
  */
  ~Predictor() {
  }

  inline const PredictFunction& GetPredictFunction() const {
    return predict_fun_;
  }

  /*!
  * \brief predicting on data, then saving result to disk
  * \param data_filename Filename of data
  * \param result_filename Filename of output result
  */
  void Predict(const char* data_filename, const char* result_filename, bool has_header) {
    FILE* result_file;

#ifdef _MSC_VER
    fopen_s(&result_file, result_filename, "w");
#else
    result_file = fopen(result_filename, "w");
#endif

    if (result_file == NULL) {
      Log::Fatal("Prediction results file %s doesn't exist", data_filename);
    }
    auto parser = std::unique_ptr<Parser>(Parser::CreateParser(data_filename, has_header, num_features_, boosting_->LabelIdx()));

    if (parser == nullptr) {
      Log::Fatal("Could not recognize the data format of data file %s", data_filename);
    }

    // function for parse data
    std::function<void(const char*, std::vector<std::pair<int, double>>*)> parser_fun;
    double tmp_label;
    parser_fun = [this, &parser, &tmp_label]
    (const char* buffer, std::vector<std::pair<int, double>>* feature) {
      parser->ParseOneLine(buffer, feature, &tmp_label);
    };

    std::function<void(data_size_t, const std::vector<std::string>&)> process_fun =
      [this, &parser_fun, &result_file]
    (data_size_t, const std::vector<std::string>& lines) {
      std::vector<std::pair<int, double>> oneline_features;
      std::vector<std::string> pred_result(lines.size(), "");
#pragma omp parallel for schedule(static) private(oneline_features)
      for (data_size_t i = 0; i < static_cast<data_size_t>(lines.size()); ++i) {
        oneline_features.clear();
        // parser
        parser_fun(lines[i].c_str(), &oneline_features);
        // predict
        pred_result[i] = Common::Join<double>(predict_fun_(oneline_features), "\t");
      }

      for (size_t i = 0; i < pred_result.size(); ++i) {
        fprintf(result_file, "%s\n", pred_result[i].c_str());
      }
    };
    TextReader<data_size_t> predict_data_reader(data_filename, has_header);
    predict_data_reader.ReadAllAndProcessParallel(process_fun);

    fclose(result_file);
  }

private:
  int PutFeatureValuesToBuffer(const std::vector<std::pair<int, double>>& features) {
    int tid = omp_get_thread_num();
    // init feature value
    std::memset(features_[tid].data(), 0, sizeof(double)*num_features_);
    // put feature value
    for (const auto& p : features) {
      if (p.first < num_features_) {
        features_[tid][p.first] = p.second;
      }
    }
    return tid;
  }
  /*! \brief Boosting model */
  const Boosting* boosting_;
  /*! \brief Buffer for feature values */
  std::vector<std::vector<double>> features_;
  /*! \brief Number of features */
  int num_features_;
  /*! \brief Number of threads */
  int num_threads_;
  /*! \brief function for prediction */
  PredictFunction predict_fun_;
};

}  // namespace LightGBM

#endif   // LightGBM_PREDICTOR_HPP_


text:
using Microsoft.EntityFrameworkCore;
using SimplCommerce.Infrastructure.Data;
using SimplCommerce.Module.Payments.Models;

namespace SimplCommerce.Module.PaymentPaypalExpress.Data
{
    public class PaymentPaypalExpressCustomModelBuilder : ICustomModelBuilder
    {
        public void Build(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<PaymentProvider>().HasData(
                new PaymentProvider("PaypalExpress") { Name = "Paypal Express", LandingViewComponentName = "PaypalExpressLanding", ConfigureUrl = "payments-paypalExpress-config", IsEnabled = true, AdditionalSettings = "{ \"IsSandbox\":true, \"ClientId\":\"\", \"ClientSecret\":\"\" }" }
            );
        }
    }
}


text:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>bin</id>
    <formats>
        <format>tar.gz</format>
        <format>zip</format>
        <format>dir</format>
    </formats>
    <baseDirectory>${project.artifactId}-${project.version}-bin</baseDirectory>
    <includeSiteDirectory>false</includeSiteDirectory>
    <dependencySets>
        <dependencySet>
            <includes>
                <include>biz.paluch.redis:spinach:jar:${project.version}</include>
            </includes>
            <outputDirectory></outputDirectory>
            <unpack>false</unpack>
            <useProjectArtifact>true</useProjectArtifact>
            <useProjectAttachments>true</useProjectAttachments>
        </dependencySet>
        <dependencySet>
            <includes>
                <include>io.netty:*</include>
            </includes>
            <scope>provided</scope>
            <outputDirectory>dependencies</outputDirectory>
            <unpack>false</unpack>
        </dependencySet>
        <dependencySet>
            <includes>
                <include>io.netty:*</include>
                <include>io.reactivex:*</include>
                <include>com.google.guava:*</include>
                <include>org.apache.commons:*</include>
                <include>biz.paluch.redis:lettuce:*</include>
            </includes>
            <outputDirectory>dependencies</outputDirectory>
            <unpack>false</unpack>
        </dependencySet>
        <dependencySet>
            <includes>
                <include>biz.paluch.redis:spinach:*:javadoc</include>
            </includes>
            <outputDirectory>apidocs</outputDirectory>
            <unpack>true</unpack>
            <useProjectArtifact>false</useProjectArtifact>
            <useProjectAttachments>true</useProjectAttachments>
        </dependencySet>
    </dependencySets>

    <fileSets>
        <fileSet>
            <includes>
                <include>LICENSE</include>
                <include>README.md</include>
                <include>RELEASE-NOTES.md</include>
            </includes>
        </fileSet>
    </fileSets>
</assembly>


text:
import React from 'react';
import * as Helper from '../../../util/helper';

export default class LeafletMapSingle extends React.Component{
  constructor(props) {
    super(props)

    this.elemId = 'map-single';
    this.marker = null;
    this.map = null;
    this.previewTimeout = null;
  }

  componentDidMount() {
    this.makeMap();
  }

  setView() {
    // Remove old marker if new one selected
    if (this.marker)
      this.map.removeLayer(this.marker);

    // Marker styles
    const css = { 'background-color': "#00bcd4", "font-size": "30px" };
    const iconHTML = 'add_location';
    const icon = this.markerIcon("map-marker", css, {}, iconHTML);

    this.marker = L.marker(this.props.previewCoords, { icon: icon, opacity: 1 });
    this.marker.addTo(this.map);

    this.map.setView(this.props.previewCoords, this.props.previewZoom, { animate: true, duration: 1 });
  }

  makeMap() {
    let initialCoords = Meteor.settings.public.MapBox.initialCoords,
        initialZoom = Meteor.settings.public.MapBox.initialZoom,
        mapID = Meteor.settings.public.MapBox.mapID,
        accessToken = Meteor.settings.public.MapBox.accessToken;

    Helper.errorIf(!accessToken, "Error: Mapbox access token not defined.");

    this.map = L.map(this.elemId, { zoomControl: false }).setView(initialCoords, initialZoom);
    this.map.keyboard.disable();
    this.map.scrollWheelZoom.disable();

    // Map icon, tile
    L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
      attribution: 'Imagery from MapBox — Map data © OpenStreetMap',
      id: mapID,
      accessToken: accessToken,
      detectRetina: true,
    }).addTo(this.map);

    // Set coordinates
    this.setView();
  }

  markerIcon(className, css, attr, content) {
    const $icon = $('
').addClass(className).css(css).attr(attr).html(content);
    return L.divIcon({
      iconSize: [40, 54],
      iconAnchor: [20, 54],
      html: Helper.jquery2html($icon),
    });
  }

  render(){
    return (

    );
  }
}