text:
import React from 'react'
import PropTypes from 'prop-types'
import ProjectName from './ProjectName'
import ProjectImage from './ProjectImage'
import ProjectTagline from './ProjectTagline'

const ArticleContainer = ({ children }) => {
  const style = {
    border: '1px solid #333333',
    borderRadius: 5,
    minWidth: 300,
    marginBottom: 20
  }
  return (

        { children }

  )
}

const ProjectDisplay = ({ name, img, url, type, status }) => {
  return (
    <ArticleContainer>
      <ProjectImage name={name} img={img} url={url} />
      <ProjectName name={name} url={url} />
      <ProjectTagline type={type} status={status} />
    </ArticleContainer>
  )
}

ArticleContainer.propTypes = {
  children: PropTypes.node.isRequired
}
ProjectDisplay.propTypes = {
  name: PropTypes.string.isRequired,
  img: PropTypes.string.isRequired,
  url: PropTypes.string.isRequired,
  type: PropTypes.string.isRequired,
  status: PropTypes.string.isRequired
}

export default ProjectDisplay


text:
<?php

namespace Molajo\Fieldhandler\Constraint;

use CommonApi\Fieldhandler\ConstraintInterface;

/**
 * Lessthan Constraint
 *
 * Ensures the input value is less than (but not equal to) the value defined in `$options['less_than']` value.
 *
 * #### Validate
 *
 * Verifies value against constraint, returning a TRUE or FALSE result and error messages
 *
 * ```php
 * $options = array();
 * $options['less_than'] = 9999;
 * $response = $request->validate('employee_id', $employee_id, 'Lessthan', $options);
 *
 * if ($response->getValidateResponse() === true) {
 *     // all is well
 * } else {
 *     foreach ($response->getValidateMessages as $code => $message) {
 *         echo $code . ': ' . $message . '/n';
 *     }
 * }
 *
 * ```
 *
 * #### Sanitize
 *
 * Sets `$field_value` to null if the value is not less than (but not equal to) the value defined
 * in `$options['less_than']` value.
 *
 * ```php
 * $options = array();
 * $options['less_than'] = 9999;
 * $response = $request->validate('employee_id', $employee_id, 'Lessthan', $options);
 *
 * if ($response->getChangeIndicator() === true) {
 *     $field_value = $response->getFieldValue();
 * }
 *
 * ```
 *
 * #### Format
 *
 * For this constraint, the `format` method is not implemented. The value sent in is not evaluated or changed.
 *
 * @package    Molajo
 * @copyright  2014-2015 Amy Stephen. All rights reserved.
 * @license    http://www.opensource.org/licenses/mit-license.html MIT License
 * @since      1.0.0
 */
class Lessthan extends AbstractConstraintTests implements ConstraintInterface
{
    /**
     * Verify if the input value is less than comparison value
     *
     * @return  boolean
     * @since   1.0.0
     */
    protected function validation()
    {
        return $this->testLessthan();
    }
}

redpajama_set_name: RedPajamaGithub


text:
aliases:
- /layout/homepage/
lastmod: 2015-08-04
date: 2013-07-01
menu:
  main:
    parent: layout
next: /templates/terms
notoc: true
prev: /templates/list
title: Homepage
weight: 50
---

The home page of a website is often formatted differently than the other
pages. In Hugo you can define your own homepage template.

Homepage is of the type "node" and have all the [node
variables](/templates/variables/) and [site
variables](/templates/variables/) available to use in the templates.

*This is the only required template for building a site and useful when
bootstrapping a new site and template. It is also the only required
template when using a single page site.*

In addition to the standard node variables, the homepage has access to
all site content accessible from `.Data.Pages`. Details on how to use the
list of pages can be found in the [Lists Template](/templates/list/).

## Which Template will be rendered?
Hugo uses a set of rules to figure out which template to use when
rendering a specific page.

Hugo will use the following prioritized list. If a file isn't present,
then the next one in the list will be used. This enables you to craft
specific layouts when you want to without creating more templates
than necessary. For most sites, only the \_default file at the end of
the list will be needed.

* /layouts/index.html
* /layouts/\_default/list.html
* /layouts/\_default/single.html
* /themes/`THEME`/layouts/index.html
* /themes/`THEME`/layouts/\_default/list.html
* /themes/`THEME`/layouts/\_default/single.html

## Example index.html
This content template is used for [spf13.com](http://spf13.com/).

It makes use of [partial templates](/templates/partials/) and uses a similar approach as a [List](/templates/list/).

    <!DOCTYPE html>

        <meta charset="utf-8">

        {{ partial "meta.html" . }}

        <base href="{{ .Site.BaseURL }}">
        <title>{{ .Site.Title }}</title>
        <link rel="canonical" href="{{ .Permalink }}">
        <link href="{{ .RSSlink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />

        {{ partial "head_includes.html" . }}

    {{ partial "subheader.html" . }}

        {{ range first 10 .Data.Pages }}
            {{ .Render "summary"}}
        {{ end }}

    {{ partial "footer.html" . }}


text:
import Component from '@ember/component';
import { next } from '@ember/runloop';
import { get, set, observer } from '@ember/object'
import layout from './template';
import { inject as service } from '@ember/service';
import C from 'shared/utils/constants';

export default Component.extend({
  settings: service(),

  layout,

  value: '',
  mode: 'automatic',

  init() {
    this._super(...arguments);

    const xip = get(this, `settings.${C.SETTING.INGRESS_IP_DOMAIN}`);
    const host = get(this, 'value');

    if ( host && host === xip ) {
      set(this, 'mode', 'automatic');
    } else if ( host ) {
      set(this, 'mode', 'manual');
    }

    next(() => {
      this.modeChanged();
    });
  },

  modeChanged: observer('mode', function() {
    const mode = get(this, 'mode');

    const xip = get(this, `settings.${C.SETTING.INGRESS_IP_DOMAIN}`);
    if ( mode === 'automatic' ) {
      set(this, 'value', xip);
    } else {
      if ( get(this, 'value') === xip ) {
        set(this, 'value', '');
      }
    }
  }),
});


text:
layout: page
title: Charm International Dinner
date: 2016-05-24
author: Zachary Roberson
tags: weekly links, java
status: published
summary: Donec bibendum elementum turpis, nec euismod justo placerat id. Quisque.
banner: images/banner/leisure-02.jpg
booking:
  startDate: 05/19/2017
  endDate: 05/21/2017
  ctyhocn: FYVSSHX
  groupCode: CID
published: true
---
Vivamus condimentum odio eget lorem cursus, ut feugiat ante sagittis. Praesent vitae arcu efficitur, egestas nisl et, pulvinar urna. Duis tortor est, vestibulum sit amet gravida sit amet, euismod sed mi. Donec tristique auctor libero. Aliquam erat tellus, congue et ligula eget, dignissim consequat neque. Curabitur sem eros, elementum vitae bibendum vitae, venenatis accumsan ligula. Sed varius magna non nisi dapibus, vitae sodales tellus elementum. Sed vitae felis fringilla, consectetur purus sit amet, auctor tortor.

* Aliquam et erat ac odio gravida congue in et ex
* Cras at metus vel justo hendrerit feugiat
* Suspendisse convallis nibh non mi placerat, sed maximus nunc bibendum.

Vivamus tristique commodo turpis vitae consectetur. Donec tempor rutrum tellus non tincidunt. Donec dapibus tempus ex, ac faucibus enim viverra at. In nec massa vitae arcu dapibus molestie. Phasellus ac dui faucibus, commodo risus a, dictum nunc. Ut at enim gravida, rutrum ligula nec, bibendum nisi. In tempus imperdiet magna sit amet dapibus. Mauris finibus interdum enim, eget interdum magna mattis nec. Suspendisse euismod massa varius diam vehicula, a venenatis nibh pretium. Morbi mi ante, egestas vel vulputate non, sollicitudin eu ante. Curabitur et nulla ut felis consectetur egestas at vitae lacus. Nam interdum mi sed nisi dapibus eleifend.


text:
// This file is automatically generated.

package adila.db;

/*
 * Wiko U FEEL
 *
 * DEVICE: P6601AE
 * MODEL: U FEEL
 */
final class p6601ae_u20feel {
    public static final String DATA = "Wiko|U FEEL|";
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package logica;

/**
 *
 * @author dark
 */
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Window;

import javax.swing.JDialog;
import javax.swing.SwingUtilities;

public class UtilJDialog {
	public static JDialog dameNuevoJDialog (Component padre)
	{
		JDialog dialogo;
    	// Obtenemos la ventana que contiene al botón que se ha
    	// pulsado.
    	// e.getSource() nos devuelve ese botón.
    	// SwingUtilities.getWindowAncestor() nos devuelve la ventana
    	// que contiene ese botón, es decir, en este caso el
    	// JFrame principal.
        Window ventanaPadre = SwingUtilities.getWindowAncestor(padre);

        // Codigo general para crear el JDialog en función del
        // tipo de ventana padre.
        if (ventanaPadre instanceof Frame)
        {
            dialogo = new JDialog((Frame) ventanaPadre);
        }
        else if (ventanaPadre instanceof Dialog)
        {
            dialogo = new JDialog((Dialog) ventanaPadre);
        }
        else
        {
            dialogo = new JDialog();
        }

        return dialogo;
	}
}


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

namespace CommonUtils
{
   /// <summary>
   /// This class provides equality comparer functionality for nullable types.
   /// </summary>
   /// <typeparam name="T">The nullable type.</typeparam>
   /// <remarks>
   /// The <see cref="Object.Equals(Object)"/> implementation for nullable types works fine, however there is small overhead as value is boxed, and the <see cref="Object.Equals(Object)"/> method is invoked, resulting in more checks and unboxing.
   /// </remarks>
   public sealed class NullableEqualityComparer<T> : IEqualityComparer<T?>
      where T : struct
   {
      private static IEqualityComparer<T?> INSTANCE = null;

      /// <summary>
      /// Returns the equality comparer for nullable type <typeparamref name="T"/> which uses the default equality comparer when comparing actual values.
      /// </summary>
      /// <value>The equality comparer for nullable type <typeparamref name="T"/> which uses the default equality comparer when comparing actual values.</value>
      public static IEqualityComparer<T?> DefaultComparer
      {
         get
         {
            var retVal = INSTANCE;
            if ( retVal == null )
            {
               retVal = new NullableEqualityComparer<T>( null, 0 );
               INSTANCE = retVal;
            }

            return retVal;
         }
      }

      private readonly IEqualityComparer<T> _itemComparer;
      private readonly Int32 _hashCodeForNoValue;

      private NullableEqualityComparer( IEqualityComparer<T> itemComparer, Int32 hashCodeForNoValue )
      {
         this._itemComparer = itemComparer ?? EqualityComparer<T>.Default;
         this._hashCodeForNoValue = hashCodeForNoValue;
      }

      Boolean IEqualityComparer<T?>.Equals( T? x, T? y )
      {
         return EqualsImpl( x, y, this._itemComparer );
      }

      Int32 IEqualityComparer<T?>.GetHashCode( T? obj )
      {
         return GetHashCodeImpl( obj, this._itemComparer, this._hashCodeForNoValue );
      }

      private static Boolean EqualsImpl( T? x, T? y, IEqualityComparer<T> comparer )
      {
         return x.HasValue == y.HasValue
            && ( !x.HasValue || comparer.Equals( x.Value, y.Value ) );
      }

      private static Int32 GetHashCodeImpl( T? obj, IEqualityComparer<T> comparer, Int32 hashCodeForNoValue )
      {
         return obj.HasValue ? comparer.GetHashCode( obj.Value ) : hashCodeForNoValue;
      }

      /// <summary>
      /// Tests equality for given nullables without creating an instance of this class.
      /// </summary>
      /// <param name="x">The first nullable.</param>
      /// <param name="y">The second nullable.</param>
      /// <param name="comparer">The optional comparer for non-null values.</param>
      /// <returns><c>true</c> if both are null, or if both are non-null and their values equal; <c>false</c> otherwise.</returns>
      public static Boolean Equals( T? x, T? y, IEqualityComparer<T> comparer = null )
      {
         return EqualsImpl( x, y, comparer ?? EqualityComparer<T>.Default );
      }

      /// <summary>
      /// Calculates hash code for given nullable without creating an instance of this class.
      /// </summary>
      /// <param name="obj">The nullable.</param>
      /// <param name="comparer">The optional comparer for non-null values.</param>
      /// <param name="hashCodeForNoValue">The hash code for null value.</param>
      /// <returns>The hash code returned by <paramref name="comparer"/> if <paramref name="obj"/> is not <c>null</c>, otherwise <paramref name="hashCodeForNoValue"/>.</returns>
      public static Int32 GetHashCode( T? obj, IEqualityComparer<T> comparer = null, Int32 hashCodeForNoValue = 0 )
      {
         return GetHashCodeImpl( obj, comparer ?? EqualityComparer<T>.Default, hashCodeForNoValue );
      }

      /// <summary>
      /// Returns a new equality comparer for nullable type <typeparamref name="T"/> which uses given equality comparer when comparing actual values, and returns given, optional, hash code for nullables with no value.
      /// </summary>
      /// <param name="itemComparer">The equality comparer to use when comparing non-null values.</param>
      /// <param name="noValueHashCode">The hash code to return for null values.</param>
      /// <returns>A new equality comparer for nullable type <typeparamref name="T"/>.</returns>
      public static IEqualityComparer<T?> NewComparer( IEqualityComparer<T> itemComparer, Int32 noValueHashCode = 0 )
      {
         return new NullableEqualityComparer<T>( itemComparer, noValueHashCode );
      }
   }

   /// <summary>
   /// This class provides comparer functionality for nullable types.
   /// </summary>
   /// <typeparam name="T">The nullable type</typeparam>
   public sealed class NullableComparer<T> : IComparer<T?>
      where T : struct, IComparable<T>
   {

      private static IComparer<T?> INSTANCE = null;

      /// <summary>
      /// Returns the comparer for nullable type <typeparamref name="T"/> which uses the default comparer when comparing actual values.
      /// </summary>
      /// <value>The comparer for nullable type <typeparamref name="T"/> which uses the equality comparer when comparing actual values.</value>
      /// <remarks>
      /// If nullable with no value is passed to this comparer, it sorts nulls first.
      /// </remarks>
      public static IComparer<T?> DefaultComparer
      {
         get
         {
            var retVal = INSTANCE;
            if ( retVal == null )
            {
               retVal = new NullableComparer<T>( null, true );
               INSTANCE = retVal;
            }

            return retVal;
         }
      }

      /// <summary>
      /// Returns a new comparer for nullable type <typeparamref name="T"/> which uses given comparer when comparing actual values, and sorts nulls first or last.
      /// </summary>
      /// <param name="itemComparer">The optional comparer to use when comparing actual values. Default will be used if no comparer is supplied.</param>
      /// <param name="nullsFirst">Whether to sort null values first.</param>
      /// <returns>A new comparer for nullable type <typeparamref name="T"/>.</returns>
      /// <remarks>
      /// In order for null-sorting to work, make sure your sorting algorithm passes also null values to the comparer returned by this method.
      /// </remarks>
      public static IComparer<T?> NewComparer( IComparer<T> itemComparer = null, Boolean nullsFirst = true )
      {
         return new NullableComparer<T>( itemComparer, nullsFirst );
      }

      /// <summary>
      /// Compares two values without creating an instance of this class.
      /// </summary>
      /// <param name="x">The first nullable value.</param>
      /// <param name="y">The second nullable value.</param>
      /// <param name="itemComparer">The optional comparer to use when comparing actual values. Default will be used if no comparer is supplied.</param>
      /// <param name="nullsFirst">Whether to sort null values first.</param>
      /// <returns>negative value if <paramref name="x"/> is considered to be less than <paramref name="y"/>, positive value if <paramref name="x"/> is considered to be greater than <paramref name="y"/>, or <c>0</c> if <paramref name="x"/> and <paramref name="y"/> are considered to be equal.</returns>
      public static Int32 Compare( T? x, T? y, IComparer<T> itemComparer = null, Boolean nullsFirst = true )
      {
         return CompareImpl( x, y, itemComparer ?? Comparer<T>.Default, nullsFirst );
      }

      private static Int32 CompareImpl( T? x, T? y, IComparer<T> itemComparer, Boolean nullsFirst )
      {
         Int32 retVal;
         if ( x.HasValue == y.HasValue )
         {
            retVal = x.HasValue ? itemComparer.Compare( x.Value, y.Value ) : 0;
         }
         else if ( x.HasValue ) // && !y.HasValue )
         {
            retVal = nullsFirst ? 1 : -1;
         }
         else // !x.HasValue && y.HasValue
         {
            retVal = nullsFirst ? -1 : 1;
         }

         return retVal;
      }

      private readonly Boolean _nullsFirst;
      private readonly IComparer<T> _itemComparer;

      private NullableComparer( IComparer<T> itemComparer, Boolean nullsFirst )
      {
         this._itemComparer = itemComparer ?? Comparer<T>.Default;
         this._nullsFirst = nullsFirst;
      }

      Int32 IComparer<T?>.Compare( T? x, T? y )
      {
         return CompareImpl( x, y, this._itemComparer, this._nullsFirst );
      }
   }
}


text:
pal95
=====

migration of pal95 into html5 game


text:
# GitHubCodingChallenge
Coding Challenge to View PR diffs in iOS

![Xcode 9.0+](https://img.shields.io/badge/Xcode-9.0%2B-blue.svg)
![iOS 11.0+](https://img.shields.io/badge/iOS-11.0%2B-green.svg)
![Swift 4.0+](https://img.shields.io/badge/Swift-4.0%2B-orange.svg)

## Requirements:
Xcode 9.0 or greater

## Notes:
If you see 'ibtool failed with exit code 255' errors, you'll need to clean the project and force clean the build folder to fix this issue by running the following in Xcode:
1. cmd + shift + k
2. cmd + option + shift + k


text:
'use strict';

exports = module.exports = function (app, mongoose) {
  var userSchema = new mongoose.Schema({
    username: { type: String },
    password: String,
    role: { type: String, default: 'normal' },
    isActive: String,
    timeCreated: { type: Date, default: Date.now },
    isDeleted: Boolean,
  });
  userSchema.methods.canPlayRoleOf = function(role) {
    return (role === this.role)
  }
  userSchema.methods.defaultReturnUrl = function() {
    var returnUrl = '/admin/dashboard';
    return returnUrl;
  };
  userSchema.methods.getVO = function() {
    return {
      id: this._id,
      username: this.username,
      role: this.role,
      isActive: this.isActive,
      timeCreated: this.timeCreated
    };
  };
  userSchema.statics.encryptPassword = function(password, done) {
    var bcrypt = require('bcryptjs');
    bcrypt.genSalt(10, function(err, salt) {
      if (err) {
        return done(err);
      }

      bcrypt.hash(password, salt, function(err, hash) {
        done(err, hash);
      });
    });
  };
  userSchema.statics.validatePassword = function(password, hash, done) {
    var bcrypt = require('bcryptjs');
    bcrypt.compare(password, hash, function(err, res) {
      done(err, res);
    });
  };
  userSchema.index({ username: 1 }, { unique: true });
  userSchema.index({ isDeleted: 1 });
  app.db.model('User', userSchema);

  // 检查是否有root用户
  app.db.models.User.findOne({ username: 'root' }, function(err, user) {
    if (!user) {
      app.db.models.User.encryptPassword('root', function(err, hash) {
        if (err) {
          console.log('[Error on Create Root User]', err);
          return;
        }

        var fieldsToSet = {
          isActive: 'yes',
          username: 'root',
          role    : 'admin',
          password: hash
        };
        app.db.models.User.create(fieldsToSet, function(err, user) {
          if (err) {
            console.log('[Error on Create Root User]', err);
            return;
          }
          console.log('Create Root User...OK')
        });
      });
    }
  });
};


text:
namespace MultipleStartNodes.Utilities
{
    public class Resources
    {
        public static string CacheKeyPrefix
        {
            get { return "UserStartNodes"; }
        }
    }
}


text:
package org.projectfloodlight.openflow.protocol;

import org.projectfloodlight.openflow.protocol.*;
import org.projectfloodlight.openflow.protocol.action.*;
import org.projectfloodlight.openflow.protocol.actionid.*;
import org.projectfloodlight.openflow.protocol.bsntlv.*;
import org.projectfloodlight.openflow.protocol.errormsg.*;
import org.projectfloodlight.openflow.protocol.meterband.*;
import org.projectfloodlight.openflow.protocol.instruction.*;
import org.projectfloodlight.openflow.protocol.instructionid.*;
import org.projectfloodlight.openflow.protocol.match.*;
import org.projectfloodlight.openflow.protocol.stat.*;
import org.projectfloodlight.openflow.protocol.oxm.*;
import org.projectfloodlight.openflow.protocol.oxs.*;
import org.projectfloodlight.openflow.protocol.queueprop.*;
import org.projectfloodlight.openflow.types.*;
import org.projectfloodlight.openflow.util.*;
import org.projectfloodlight.openflow.exceptions.*;
import io.netty.buffer.ByteBuf;

public interface OFBsnLacpConvergenceNotif extends OFObject, OFBsnHeader {
    OFVersion getVersion();
    OFType getType();
    long getXid();
    long getExperimenter();
    long getSubtype();
    short getConvergenceStatus();
    OFPort getPortNo();
    int getActorSysPriority();
    MacAddress getActorSysMac();
    int getActorPortPriority();
    int getActorPortNum();
    int getActorKey();
    int getPartnerSysPriority();
    MacAddress getPartnerSysMac();
    int getPartnerPortPriority();
    int getPartnerPortNum();
    int getPartnerKey();

    void writeTo(ByteBuf channelBuffer);

    Builder createBuilder();
    public interface Builder extends OFBsnHeader.Builder {
        OFBsnLacpConvergenceNotif build();
        OFVersion getVersion();
        OFType getType();
        long getXid();
        Builder setXid(long xid);
        long getExperimenter();
        long getSubtype();
        short getConvergenceStatus();
        Builder setConvergenceStatus(short convergenceStatus);
        OFPort getPortNo();
        Builder setPortNo(OFPort portNo);
        int getActorSysPriority();
        Builder setActorSysPriority(int actorSysPriority);
        MacAddress getActorSysMac();
        Builder setActorSysMac(MacAddress actorSysMac);
        int getActorPortPriority();
        Builder setActorPortPriority(int actorPortPriority);
        int getActorPortNum();
        Builder setActorPortNum(int actorPortNum);
        int getActorKey();
        Builder setActorKey(int actorKey);
        int getPartnerSysPriority();
        Builder setPartnerSysPriority(int partnerSysPriority);
        MacAddress getPartnerSysMac();
        Builder setPartnerSysMac(MacAddress partnerSysMac);
        int getPartnerPortPriority();
        Builder setPartnerPortPriority(int partnerPortPriority);
        int getPartnerPortNum();
        Builder setPartnerPortNum(int partnerPortNum);
        int getPartnerKey();
        Builder setPartnerKey(int partnerKey);
    }
}


text:
/**
 * @file
 * C++ structures for metric patch
 */

#ifndef FCLAW2D_METRIC_HPP
#define FCLAW2D_METRIC_HPP

#include <fclaw2d_farraybox.hpp>     /* Needed for FArray box used to store metric data */

/**
 * @brief Struct for patch metric data
 */
struct fclaw2d_metric_patch_t
{
    /** The number of cells in the x direction */
    int mx;
    /** The number of cells in the x direction */
    int my;
    /** The number of ghost cells */
    int mbc;
    /** The block number */
    int blockno;

    /** The spacing in the x direction */
    double dx;
    /** The spacing in the y direction */
    double dy;
    /** x value of bottom face */
    double xlower;
    /** y value of left face */
    double ylower;
    /** x value of upper face */
    double xupper;
    /** y value of right face */
    double yupper;

    /** x coordinates of cell centers */
    FArrayBox xp;
    /** y coordinates of cell centers */
    FArrayBox yp;
    /** z coordinates of cell centers */
    FArrayBox zp;

    /** x coordinates of nodes */
    FArrayBox xd;
    /** y coordinates of nodes */
    FArrayBox yd;
    /** z coordinates of nodes */
    FArrayBox zd;

    /** normals of the x faces */
    FArrayBox xface_normals;
    /** normals of the y faces */
    FArrayBox yface_normals;
    /** tangents of the x faces */
    FArrayBox xface_tangents;
    /** tangents of the y faces */
    FArrayBox yface_tangents;
    /** normals of cell surfaces */
    FArrayBox surf_normals;
    /** edge lengths for both x and y faces */
    FArrayBox edge_lengths;

    /** area of each cell */
    FArrayBox area;
    /** curvature of each cell */
    FArrayBox curvature;
};

/**
 * @brief Allocate a new metric patch
 *
 * @return fclaw2d_metric_patch_t* the new metric patch
 */
fclaw2d_metric_patch_t* fclaw2d_metric_patch_new();

/**
 * @brief Delete the metric patch
 *
 * @param patchmp the metric patch, null on return
 */
void fclaw2d_metric_patch_delete(fclaw2d_metric_patch_t **patchmp);

#endif /* !FCLAW2D_METRIC_HPP */


text:
-------------------------------------------------------------------------------
--  plm product
-------------------------------------------------------------------------------
CREATE TABLE PLM_PRODUCT(
    ID BIGINT NOT NULL,
    CODE VARCHAR(50),
    NAME VARCHAR(200),
    CATEGORY VARCHAR(50),
    SEVERITY VARCHAR(50),
    PRIORITY INT,
    TYPE VARCHAR(50),
    DEADLINE DATE,
    DESCRIPTION VARCHAR(200),
    TAG VARCHAR(200),
    STATUS VARCHAR(50),
    CREATE_TIME DATETIME,
    USER_ID VARCHAR(64),
    PARENT_ID BIGINT,
    ISSUE_ID BIGINT,
    VERSION_ID BIGINT,
    PROJECT_ID BIGINT,
    GROUP_NAME VARCHAR(200),
    ASSIGNEE VARCHAR(64),
    CONSTRAINT PK_PLM_PRODUCT PRIMARY KEY(ID)
);

COMMENT ON TABLE PLM_PRODUCT IS '需求';
COMMENT ON COLUMN PLM_PRODUCT.ID IS '主键';


text:
var csrftoken = $('meta[name=csrf-token]').attr('content');
$.ajaxSetup({
    beforeSend: function(xhr, settings) {
        if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type)) {
         xhr.setRequestHeader("X-CSRFToken", csrftoken);
      }
    }
});

$(document).ready(function(){
   // initial check to see if user is logged in or not
   updateAuthStatus();
});

// helpers
function updateAuthStatus() {
   verifyAuth()
      .done(function(response){
         showLoggedIn(response.data.user_name)
      }).fail(function(response){
         showLoggedout()
      });
}

function showLoggedIn(username) {
   // May do something
}

function showLoggedout() {
   // show logged out view
   document.body.innerHTML = '';
   var url = '/';
   alert("\t You are not autorized yet! Log In please! \t");
   window.location.href = url;
}

// API calls
function verifyAuth(callback) {
   var url = '/api/auth/verify_auth';
   return $.get(url);
}


text:
function productOfThreeNumbers(arr) {
    let negativeNumbersArr = arr.map(Number).filter(x => x < 0);
    let zeroesInArr = arr.map(Number).filter(x => x == 0);

    if(negativeNumbersArr.length % 2 == 1 && zeroesInArr.length == 0){
        return 'Negative';
    } else {
        return 'Positive';
    }
}


text:
<?xml version="1.0"?>
<folder name="Ribbon with tabbar"/>


text:
<?php
/**
 * @author @jenschude <jens.schulze@commercetools.de>
 * @created: 27.01.15, 18:22
 */

namespace Commercetools\Core\Model\Channel;

use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Model\Common\Reference;

/**
 * @package Commercetools\Core\Model\Channel
 * @ramlTestIgnoreFields('key')
 * @link https://docs.commercetools.com/http-api-types.html#reference-types
 * @link https://docs.commercetools.com/http-api-projects-channels.html#channel
 * @method string getTypeId()
 * @method ChannelReference setTypeId(string $typeId = null)
 * @method string getId()
 * @method ChannelReference setId(string $id = null)
 * @method Channel getObj()
 * @method ChannelReference setObj(Channel $obj = null)
 * @method string getKey()
 * @method ChannelReference setKey(string $key = null)
 */
class ChannelReference extends Reference
{
    const TYPE_CHANNEL = 'channel';
    const TYPE_CLASS = Channel::class;

    /**
     * @param $id
     * @param Context|callable $context
     * @return ChannelReference
     */
    public static function ofId($id, $context = null)
    {
        return static::ofTypeAndId(static::TYPE_CHANNEL, $id, $context);
    }

    /**
     * @param $key
     * @param Context|callable $context
     * @return ChannelReference
     */
    public static function ofKey($key, $context = null)
    {
        return static::ofTypeAndKey(static::TYPE_CHANNEL, $key, $context);
    }
}


text:
<tool id="scripture" name="Scripture" version="R4.4">
    <description> ab initio transcriptome reconstruction from RNA-Seq reads</description>
    <command>
    ##
    ## Scripture requires ".bam" extension for BAM files. Galaxy treat all files with .dat extension
    ## and adjusting the extenstion with a symlink
    ##
    ln -s $alformat ${alformat}.bam;
    samtools index ${alformat}.bam;

    ##
    ## Scripture starts here
    ##
    java -Xmx7500m -jar ${OQTANS_PATH}/Scripture/R4.4/src/scriptureR4.4.jar
    -alignment ${alformat}.bam
    -chrSequence $genomesq
    -maskFileDir $scripture_log.extra_files_path

    #if str($inputs.paired_or_single) == "paired":
        -pairedEnd
    #end if
    #if str($inputs.library_type) != "None":
        -strandSpecificReads
    #end if

    #if str($additional_params.use_additional) == "yes":
        -minSpliceFrequency $additional_params.minSpliceFrequency
        -minSpliceSupport $additional_params.minSpliceSupport
        -minMappingQuality $additional_params.minMappingQuality
        -chunkSize $additional_params.chunkSize
    #end if
    -trim

    -out $assembled_transcripts
    > $scripture_log 2>&1
    ;
    ##
    ## Clean the symlink
    ##
    rm ${alformat}.bam

    </command>

    <inputs>
        <!-- genome sequence -->
        <param format="fasta" name="genomesq" type="data" label="Genome sequence" help="Genome sequence in FASTA format."/>
        <!-- read alignment -->
        <param format="bam" name="alformat" type="data" label="Read alignment data" help="Alignment file in BAM format."/>
        <!-- Library type -->
        <conditional name="inputs">
		    <param name="paired_or_single" type="select" label="Paired or Single-end data?">
                <option value="paired">Paired</option>
                <option value="single">Single</option>
            </param>
            <when value="paired">
                <param name="library_type" type="select" label="Strand-specific Library Type" help="FR: RNA ligation sequencing method, RF: dUTP/UDG sequencing method.">
                    <option value="None">None</option>
                    <option value="FR">FR</option>
                    <option value="RF">RF</option>
                </param>
            </when>
            <when value="single">
                <param name="library_type" type="select" label="Strand-specific Library Type">
                    <option value="None">None</option>
                    <option value="F">F</option>
                    <option value="R">R</option>
                </param>
            </when>
        </conditional>
        <!-- Additional parameters -->
		<conditional name="additional_params">
            <param name="use_additional" type="select" label="Use Additional Params?">
                <option value="no">No</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no">
            </when>
            <when value="yes">
				<param name="minSpliceFrequency" type="float" value="0.25" label="Min Splice Frequency" help="When there are more than one splice junction, junctions that account for less than the specified portion of junctions are ignored." />
				<param name="minSpliceSupport" type="integer" value="1" label="Min Splice Support" help="Minimum count to support splice reads, default is 1." />
				<param name="minMappingQuality" type="integer" value="3" label="Min Mapping Quality" help="Minimum read alignment quality." />
				<param name="chunkSize" type="integer" value="400000" label="chunk size of reads" help="Chunk size of reads caching, default 400,000." />
            </when>
        </conditional>
    </inputs>

    <outputs>
        <data format="txt" name="scripture_log" label="${tool.name} on ${on_string}: Log" />
        <data format="bed" name="assembled_transcripts" label="${tool.name} on ${on_string}: Assembled Transcripts" />
    </outputs>

    <tests>
    <!-- TODO-->
    </tests>
    <help>
        Scripture_ is a de novo transcript assembler that uses RNA-seq data as input.

        .. _Scripture: http://www.broadinstitute.org/software/scripture/

    </help>
</tool>


text:
<sqx-modal-dialog [showHeader]="false">
    <ng-container content>
        Skip Tour

Welcome to Squidex CMS

                    You can start managing and distributing your content right away, but we we'd like to walk you through some basics first...

                    How's that?

                <button (click)="next()" class="btn btn-success">Let's take a look around</button>

Apps

                                An App is the repository for your project, e.g. (blog, web shop or mobile app). You can assign contributors to your app to work together.

                                You can create an unlimited number of Apps in Squidex to manage multiple projects at the same time.

                    <button (click)="next()" class="btn btn-success">Continue</button>

Schemas

                                Schemas define the structure of your content, the fields and the data types of a content item.

                                Before you can add content to your schema, make sure to hit the 'Publish' button at the top to make the schema available to your content editors.

                    <button (click)="next()" class="btn btn-success">Keep going!</button>

Contents

                                Content is the actual data in your app which is grouped by the schema.

                                Select a published schema first, then add content for this schema.

                    <button (click)="next()" class="btn btn-success">Almost there!</button>

Assets

                                The assets contains all files that can also be linked to your content. For example images, videos or documents.

                                You can upload the assets here and use them later or also upload them directly when you create a new content item with an asset field.

                    <button (click)="next()" class="btn btn-success">Got It!</button>

Awesome, now you know the basics!

                    But that's not all of the support we can provide.
You can go to https://docs.squidex.io/ to read more.

                    Do you want to join our community?

                        Join our Forum

                        Join us on Github

    </ng-container>
</sqx-modal-dialog>


text:
package org.rcsb.mmtf.decoder;

import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;

/**
 * Tests for the array decoders.
 * @author Anthony Bradley
 *
 */
public class TestArrayDecoders {

	/**
	 * Run length decode int test.
	 */
	@Test
	public final void runLengthDecodeTest() {
		// Allocate the byte array
		int[] inputData =  {15,3,100,2,111,4,10000,6};
		int[] outputDataTest = {15,15,15,100,100,111,111,111,111,10000,10000,10000,10000,10000,10000};
		int[] outputData = ArrayDecoders.runlengthDecode(inputData);
		assertArrayEquals(outputDataTest, outputData);
	}

	/**
	 * Check run length encoding on empty arrays
	 */
	@Test
	public final void emptyRunLengthDecodeTest() {
		// Allocate the byte array
		int[] inputData =  {};
		int[] outputDataTest = {};
		int[] outputData = ArrayDecoders.runlengthDecode(inputData);
		assertArrayEquals(outputDataTest, outputData);
	}

	/**
	 * Delta decode int test.
	 */
	@Test
	public final void deltaDecodeTest() {
		// Allocate the byte array
		int[] inputData =  {15,3,100,-1,11,4};
		int[] outputDataTest = {15,18,118,117,128,132};
		int[] outputData = ArrayDecoders.deltaDecode(inputData);
		assertArrayEquals(outputDataTest, outputData);
	}

	/**
	 * Check delta decoding on empty array
	 */
	@Test
	public final void emptyDeltaDecodeTest() {
		// Allocate the byte array
		int[] inputData =  {};
		int[] outputDataTest = {};
		int[] outputData = ArrayDecoders.deltaDecode(inputData);
		assertArrayEquals(outputDataTest, outputData);
	}
}


text:
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';

@Injectable()
export class AuthenService {
  apiUrl: string = 'https://time-attendance.herokuapp.com/';
  // apiUrl: string = 'https://time-attendance-test.herokuapp.com/';
  headers: any = new HttpHeaders({
    'Content-Type': 'application/json'
  });
  constructor(public http: HttpClient) {

  }

  private errHandler(err: any): Promise<any> {
    return Promise.reject(err.message);
  }

  getEmpDataApi(email): Promise<any> {
    return this.http.get(this.apiUrl + 'api/Employeeprofile/email/' + email, this.headers)
      .toPromise()
      .then(res => res)
      .catch(this.errHandler);
  }

  signUp(register): Promise<any> {
    return this.http.post(this.apiUrl + 'api/auth/signup', register, this.headers)
      .toPromise()
      .then(res => res)
      .catch(this.errHandler);
  }

  updateProfile(profile): Promise<any> {
    return this.http.put(this.apiUrl + 'api/employeeprofiles/' + profile._id, profile, this.headers)
      .toPromise()
      .then(res => res)
      .catch(this.errHandler);
  }

  signIn(signin): Promise<any> {
    return this.http.post(this.apiUrl + 'api/auth/signin', signin, this.headers)
      .toPromise()
      .then(res => res)
      .catch(this.errHandler);
  }

  // getEmpDataApi(email): Promise<any> {
  //   return new Promise((resolve, reject) => {
  //     this.http.get(this.apiUrl + 'api/Employeeprofile/email/' + email).map(res => {
  //       return res.json();
  //     }).subscribe(data => {
  //       resolve(data);
  //     }, (error) => {
  //       reject(error);
  //     });
  //   })
  // }

  // signUp(register): Promise<any> {
  //   return new Promise((resolve, reject) => {
  //     this.http.post(this.apiUrl + 'api/auth/signup', register, this.optionsURL).map(res => {
  //       return res.json();
  //     }).subscribe(data => {
  //       resolve(data);
  //     }, (error) => {
  //       reject(error);
  //     });
  //   })
  // };

  // updateProfile(profile): Promise<any> {
  //   return new Promise((resolve, reject) => {
  //     this.http.put(this.apiUrl + 'api/employeeprofiles/' + profile._id, profile, this.optionsURL).map(res => {
  //       return res.json();
  //     }).subscribe(data => {
  //       resolve(data);
  //     }, (error) => {
  //       reject(error);
  //     });
  //   })
  // };

  // signIn(signin): Promise<any> {
  //   return new Promise((resolve, reject) => {
  //     this.http.post(this.apiUrl + 'api/auth/signin', signin, this.optionsURL).map(res => {
  //       return res.json();
  //     }).subscribe(data => {
  //       resolve(data);
  //     }, (error) => {
  //       reject(error);
  //     });
  //   })
  // };
}


text:
/* @flow */
import IconBackspace from 'mineral-ui-icons/IconBackspace';
import { ThemeProvider } from '../../../../../../library/themes';
import TextInput from '../../../../../../library/TextInput';
import FormField from '../../../../../../library/Form/FormField';
import FormFieldset from '../../../../../../library/Form/FormFieldset';

// Note: The sample text used in the example is Arabic and translates to "Hello World"
// https://translate.google.com/#auto/ar/Hello%20World

export default {
  id: 'rtl',
  title: 'Bidirectionality',
  description: `FormFieldsets support right-to-left (RTL) languages.`,
  scope: { FormField, FormFieldset, IconBackspace, TextInput, ThemeProvider },
  source: `
    <div dir="rtl">
      <ThemeProvider theme={{ direction: 'rtl' }}>
        <FormFieldset legend="أسطورة">
          <FormField label="مرحبا بالعالم">
            <TextInput iconStart={<IconBackspace />} defaultValue="مرحبا بالعالم" />
          </FormField>
        </FormFieldset>
      </ThemeProvider>
    </div>`
};


text:
require File.join [Pluct.root, 'lib/pluct/extensions/json']

describe JSON do
  it 'returns false for invalid data' do
    ['', ' ', 'string'].each do |s|
      expect(JSON.is_json?(s)).to be_false
    end
  end

  it 'returns true for valid data' do
    expect(JSON.is_json?('{"name" : "foo"}')).to be_true
  end
end


text:
package org.apache.flink.runtime.operators.sort;

import org.apache.flink.api.common.operators.base.OuterJoinOperatorBase.OuterJoinType;
import org.apache.flink.api.common.typeutils.TypeComparator;
import org.apache.flink.api.common.typeutils.TypePairComparator;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.runtime.io.disk.iomanager.IOManager;
import org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable;
import org.apache.flink.runtime.memory.MemoryManager;
import org.apache.flink.util.MutableObjectIterator;
import org.junit.Test;

public class ReusingSortMergeOuterJoinIteratorITCase extends AbstractSortMergeOuterJoinIteratorITCase {

	@Override
	@SuppressWarnings({"unchecked", "rawtypes"})
	protected <T1, T2, T3> AbstractMergeOuterJoinIterator createOuterJoinIterator(OuterJoinType outerJoinType, MutableObjectIterator<T1> input1,
																			  MutableObjectIterator<T2> input2, TypeSerializer<T1> serializer1,
																			  TypeComparator<T1> comparator1, TypeSerializer<T2> serializer2, TypeComparator<T2> comparator2,
																			  TypePairComparator<T1, T2> pairComparator, MemoryManager memoryManager, IOManager ioManager,
																			  int numMemoryPages, AbstractInvokable parentTask) throws Exception {
		return new ReusingMergeOuterJoinIterator(outerJoinType, input1, input2, serializer1, comparator1,
				serializer2, comparator2, pairComparator, memoryManager, ioManager, numMemoryPages, parentTask);
	}

	@Test
	public void testFullOuterWithSample() throws Exception {
		super.testFullOuterWithSample();
	}

	@Test
	public void testLeftOuterWithSample() throws Exception {
		super.testLeftOuterWithSample();
	}

	@Test
	public void testRightOuterWithSample() throws Exception {
		super.testRightOuterWithSample();
	}

	@Test
	public void testRightSideEmpty() throws Exception {
		super.testRightSideEmpty();
	}

	@Test
	public void testLeftSideEmpty() throws Exception {
		super.testLeftSideEmpty();
	}

	@Test
	public void testFullOuterJoinWithHighNumberOfCommonKeys() {
		testOuterJoinWithHighNumberOfCommonKeys(OuterJoinType.FULL, 200, 500, 2048, 0.02f, 200, 500, 2048, 0.02f);
	}

	@Test
	public void testLeftOuterJoinWithHighNumberOfCommonKeys() {
		testOuterJoinWithHighNumberOfCommonKeys(OuterJoinType.LEFT, 200, 10, 4096, 0.02f, 100, 4000, 2048, 0.02f);
	}

	@Test
	public void testRightOuterJoinWithHighNumberOfCommonKeys() {
		testOuterJoinWithHighNumberOfCommonKeys(OuterJoinType.RIGHT, 100, 10, 2048, 0.02f, 200, 4000, 4096, 0.02f);
	}
}


text:
/**
 * @fileOverview Main router file
 */

/**
 * Router component Require module
 * @name RouterModule
 * @class
 * @param {Object} _ Underscore
 * @param {Object} Backbone Backbone
 * @return {Constructor} Router
 */
define(function(require) {
  'use strict';
  var Backbone = require('backbone')

  , WizardExample = require('apps/WizardExample/views/WizardExampleView')

  ;

  return Backbone.Router.extend({

    routes: {
      "": 'Wizard',
      "/": 'Wizard',
    },

    // sections

    Wizard: function(){
      $('#backbone').html( (new WizardExample()).render().el );
    },

  });

});


text:
layout: widget
title: Facebook Like
searchable: true
versions:
- version: Version 2.0
  url: /widgets/v2/facebook-like/
- version: Version 1.0
  url: /widgets/v1/facebook-like/
---

# Facebook Like

> **IMPORTANT:** This widget is only available as a 'zone-widget', it cannot be coded in to a custom template. As of **version 8.00 and above**.

#### HTML structure:

{% highlight html %}
{% raw %}

{% endraw %}
{% endhighlight %}

## Widget options

Widget options are only available via the Editor.


text:
#import "ENStoreClient.h"
#import "EDAM.h"

@interface ENUserStoreClient : ENStoreClient

// ! DO NOT INSTANTIATE THIS OBJECT DIRECTLY. GET ONE FROM AN AUTHENTICATED ENSESSION !

///---------------------------------------------------------------------------------------
/// @name UserStore methods
///---------------------------------------------------------------------------------------

/** This should be the first call made by a client to the EDAM service. It tells the service what protocol version is used by the client.

 The service will then return true if the client is capable of talking to the service, and false if the client's protocol version is incompatible with the service, so the client must upgrade. If a client receives a false value, it should report the incompatibility to the user and not continue with any more EDAM requests (UserStore or NoteStore).

 @param  clientName This string provides some information about the client for tracking/logging on the service. It should provide information about the client's software and platform. The structure should be: application/version; platform/version; [ device/version ] E.g. "Evernote Windows/3.0.1; Windows/XP SP3" or "Evernote Clipper/1.0.1; JME/2.0; Motorola RAZR/2.0;

 @param  edamVersionMajor This should be the major protocol version that was compiled by the client. This should be the current value of the EDAM_VERSION_MAJOR constant for the client.
 @param  edamVersionMinor This should be the major protocol version that was compiled by the client. This should be the current value of the EDAM_VERSION_MINOR constant for the client.
 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)checkVersionWithClientName:(NSString *)clientName
                  edamVersionMajor:(int16_t)edamVersionMajor
                  edamVersionMinor:(int16_t)edamVersionMinor
                           success:(void(^)(BOOL versionOK))success
                           failure:(void(^)(NSError *error))failure;

/** This provides bootstrap information to the client.

 Various bootstrap profiles and settings may be used by the client to configure itself.

 @param  locale The client's current locale, expressed in language[_country] format. E.g., "en_US". See ISO-639 and ISO-3166 for valid language and country codes.
 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)getBootstrapInfoWithLocale:(NSString *)locale
                           success:(void(^)(EDAMBootstrapInfo *info))success
                           failure:(void(^)(NSError *error))failure;

/** Returns the User corresponding to the provided authentication token, or throws an exception if this token is not valid.

 The level of detail provided in the returned User structure depends on the access level granted by the token, so a web service client may receive fewer fields than an integrated desktop client.

 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)getUserWithSuccess:(void(^)(EDAMUser *user))success
                   failure:(void(^)(NSError *error))failure;

/** Asks the UserStore about the publicly available location information for a particular username.

 @param username The username for the location information
 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)getPublicUserInfoWithUsername:(NSString *)username
                              success:(void(^)(EDAMPublicUserInfo *info))success
                              failure:(void(^)(NSError *error))failure;

/** Returns information regarding a user's Premium account corresponding to the provided authentication token, or throws an exception if this token is not valid.

 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)getPremiumInfoWithSuccess:(void(^)(EDAMPremiumInfo *info))success
                          failure:(void(^)(NSError *error))failure;

/** Returns the URL that should be used to talk to the NoteStore for the account represented by the provided authenticationToken.

 This method isn't needed by most clients, who can retrieve the correct NoteStore URL from the AuthenticationResult returned from the authenticate or refreshAuthentication calls. This method is typically only needed to look up the correct URL for a long-lived session token (e.g. for an OAuth web service).

 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)getNoteStoreUrlWithSuccess:(void(^)(NSString *noteStoreUrl))success
                           failure:(void(^)(NSError *error))failure;

/** This is used to take an existing authentication token that grants access to an individual user account (returned from 'authenticate', 'authenticateLongSession' or an OAuth authorization) and obtain an additional authentication token that may be used to access business notebooks if the user is a member of an Evernote Business account.

 The resulting authentication token may be used to make NoteStore API calls against the business using the NoteStore URL returned in the result.

 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)authenticateToBusinessWithSuccess:(void(^)(EDAMAuthenticationResult *authenticationResult))success
                                  failure:(void(^)(NSError *error))failure;

/** Revoke an existing long lived authentication token. This can be used to revoke OAuth tokens or tokens created by calling authenticateLongSession, and allows a user to effectively log out of Evernote from the perspective of the application that holds the token. The authentication token that is passed is immediately revoked and may not be used to call any authenticated EDAM function.

 @param authenticationToken the authentication token to revoke.
 @param success Success completion block.
 @param failure Failure completion block.
 */
- (void)revokeLongSessionWithAuthenticationToken:(NSString*)authenticationToken
                                         success:(void(^)())success
                                         failure:(void(^)(NSError *error))failure;
@end


text:
//================================================================
// RS_EmbossingButtonStyleEx.js
// ---------------------------------------------------------------
// The MIT License
// Copyright (c) 2015-2019 biud436
// ---------------------------------------------------------------
// Free for commercial and non commercial use.
//================================================================
/*:ko
 * @plugindesc 버튼 스타일을 엠보싱 스타일로 변경합니다 <RS_EmbossingButtonStyleEx>
 * @author biud436
 *
 * @param backColor1
 * @text 배경 색상 1
 * @desc Specify the background color
 * @default rgb(156, 161, 160)
 *
 * @param backColor2
 * @text 배경 색상 2
 * @desc Specify the background color
 * @default rgb(108, 124, 124)
 *
 * @param borderColor1
 * @text 테두리 색상 1
 * @desc Specify the border color
 * @default rgb(232, 231, 226)
 *
 * @param borderColor2
 * @text 테두리 색상 2
 * @desc Specify the border color
 * @default rgb(30, 33, 32)
 *
 * @param lineWidth
 * @type number
 * @text 테두리 굵기
 * @desc Specify the line width
 * @default 2
 *
 * @help
 * =============================================================================
 * 플러그인 동작 환경
 * =============================================================================
 * Windows 10, RMMV 1.6.0
 */
/*:
 * @plugindesc Embossing Button & Cursor Style <RS_EmbossingButtonStyleEx>
 * @author biud436
 *
 * @param backColor1
 * @text Background Color1
 * @desc Specify the background color
 * @default rgb(156, 161, 160)
 *
 * @param backColor2
 * @text Background Color2
 * @desc Specify the background color
 * @default rgb(108, 124, 124)
 *
 * @param borderColor1
 * @text Border Color1
 * @desc Specify the border color
 * @default rgb(232, 231, 226)
 *
 * @param borderColor2
 * @text Border Color2
 * @desc Specify the border color
 * @default rgb(30, 33, 32)
 *
 * @param lineWidth
 * @type number
 * @text Line Width
 * @desc Specify the line width
 * @default 2
 *
 * @help
 *
 */

var Imported = Imported || {};
Imported.RS_EmbossingButtonStyleEx = true;

(function () {

  var parameters = $plugins.filter(function (i) {
    return i.description.contains('<RS_EmbossingButtonStyleEx>');
  });

  parameters = (parameters.length > 0) && parameters[0].parameters;

  var param = {
    backColor1 : parameters['backColor1'] || 'rgb(156, 161, 160)',
    backColor2 :  parameters['backColor2'] || 'rgb(108, 124, 124)',
    borderColor1: parameters['borderColor1'] || "rgb(232, 231, 226)",
    borderColor2: parameters['borderColor2'] || "rgb(30, 33, 32)",
    lineWidth: parseInt(parameters['lineWidth']) || 2
  };

  //============================================================================
  // Bitmap
  //============================================================================

  Bitmap.prototype.gradientButtonFillRect = function(x, y, width, height, color1,
                                               color2, vertical) {
      var context = this._context;
      var grad, border;
      var lineWidth = param.lineWidth;
      if (vertical) {
          grad = context.createLinearGradient(x, y, x, y + height);
          border = context.createLinearGradient(x, y, x, y + height);
      } else {
          grad = context.createLinearGradient(x, y, x + width, y);
          border = context.createLinearGradient(x, y, x + width, y);
      }
      grad.addColorStop(0, color1);
      grad.addColorStop(1, color2);
      border.addColorStop(0, param.borderColor1);
      border.addColorStop(1, param.borderColor2);
      context.save();
      context.lineJoin = "round";
      context.lineWidth = lineWidth;
      context.fillStyle = grad;
      context.strokeStyle = border;
      context.strokeRect(x + lineWidth/2, y + lineWidth/2, width - lineWidth, height - lineWidth);
      context.fillRect(x + lineWidth/2, y + lineWidth/2, width - lineWidth, height - lineWidth);
      context.restore();
      this._setDirty();
  };

  //============================================================================
  // Window_Selectable
  //============================================================================

  Window_Selectable.prototype._refreshCursor = function() {
      var pad = this._padding;
      var x = this._cursorRect.x + pad - this.origin.x;
      var y = this._cursorRect.y + pad - this.origin.y;
      var w = this._cursorRect.width;
      var h = this._cursorRect.height;
      var m = 4;
      var x2 = Math.max(x, pad);
      var y2 = Math.max(y, pad);
      var ox = x - x2;
      var oy = y - y2;
      var w2 = Math.min(w, this._width - pad - x2);
      var h2 = Math.min(h, this._height - pad - y2);
      var bitmap = new Bitmap(w2, h2);
      var color1 = param.backColor1;
      var color2 = param.backColor2;
      var textPadding = Math.floor(this.textPadding() / 2);

      this._windowCursorSprite.bitmap = bitmap;
      this._windowCursorSprite.setFrame(0, 0, w2, h2);
      this._windowCursorSprite.move(x2, y2);

      if (w > 0 && h > 0 && this._windowskin) {
          var skin = this._windowskin;
          var p = 96;
          var q = 48;
          bitmap.gradientButtonFillRect(ox, oy, w2, h2 - textPadding, color1, color2, true);
      }
  };

  Window_Selectable.prototype.drawItemDefaultBackground = function(index) {
      var rect = this.itemRect(index);
      var color1 = param.backColor1;
      var color2 = param.backColor2;
      var textPadding = Math.floor(this.textPadding() / 2);
      this.changePaintOpacity(false);
      this.contents.gradientButtonFillRect(rect.x, rect.y, rect.width, rect.height - textPadding, color1, color2, true);
      this.changePaintOpacity(true);
  };

  Window_Selectable.prototype.drawAllItems = function() {
      var topIndex = this.topIndex();
      for (var i = 0; i < this.maxPageItems(); i++) {
          var index = topIndex + i;
          if (index < this.maxItems()) {
              this.drawItemDefaultBackground(index);
              this.drawItem(index);
          }
      }
  };

  Window_Selectable.prototype.redrawItem = function(index) {
      if (index >= 0) {
          this.clearItem(index);
          this.drawItemDefaultBackground(index);
          this.drawItem(index);
      }
  };

})();


text:
package six.com.crawler.schedule.cache;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import six.com.crawler.dao.RedisManager;
import six.com.crawler.entity.Job;
import six.com.crawler.entity.JobSnapshot;
import six.com.crawler.entity.WorkerSnapshot;
import six.com.crawler.node.ClusterManager;

/**
 * @author 作者
 * @E-mail: 359852326@qq.com
 * @date 创建时间:2017年4月14日 下午5:00:51
 */
@Component
public class RedisScheduleCache implements ScheduleCache, InitializingBean {

	@Autowired
	private RedisManager redisManager;

	@Autowired
	private ClusterManager clusterManager;

	private RedisCacheKeyHelper redisCacheKeyHelper;

	@Override
	public Job getJob(String jobName) {
		String jobskey = redisCacheKeyHelper.getJobsKey();
		Job job = getRedisManager().hget(jobskey, jobName, Job.class);
		return job;
	}

	@Override
	public void setJob(Job job) {
		String jobskey = redisCacheKeyHelper.getJobsKey();
		getRedisManager().hset(jobskey, job.getName(), job);
	}

	@Override
	public void delJob(String jobName) {
		String jobskey = redisCacheKeyHelper.getJobsKey();
		getRedisManager().hdel(jobskey, jobName);
	}

	@Override
	public JobSnapshot getJobSnapshot(String jobName) {
		String jobSnapshotskeyskey = redisCacheKeyHelper.getJobSnapshotsKey();
		JobSnapshot jobSnapshot = getRedisManager().hget(jobSnapshotskeyskey, jobName, JobSnapshot.class);
		return jobSnapshot;
	}

	@Override
	public List<JobSnapshot> getJobSnapshots() {
		String jobSnapshotskeyskey = redisCacheKeyHelper.getJobSnapshotsKey();
		Map<String, JobSnapshot> findMap = getRedisManager().hgetAll(jobSnapshotskeyskey, JobSnapshot.class);
		return new ArrayList<>(findMap.values());
	}

	@Override
	public void updateJobSnapshot(JobSnapshot jobSnapshot) {
		String jobSnapshotskey = redisCacheKeyHelper.getJobSnapshotsKey();
		getRedisManager().hset(jobSnapshotskey, jobSnapshot.getName(), jobSnapshot);
	}

	@Override
	public void delJobSnapshot(String jobName) {
		String jobSnapshotskey = redisCacheKeyHelper.getJobSnapshotsKey();
		getRedisManager().hdel(jobSnapshotskey, jobName);
	}

	@Override
	public List<WorkerSnapshot> getWorkerSnapshots(String jobName) {
		String workerSnapshotkey = redisCacheKeyHelper.getWorkerSnapshotsKey(jobName);
		List<WorkerSnapshot> workerSnapshots = new ArrayList<>();
		Map<String, WorkerSnapshot> workerInfosMap = getRedisManager().hgetAll(workerSnapshotkey, WorkerSnapshot.class);
		workerSnapshots.addAll(workerInfosMap.values());
		return workerSnapshots;
	}

	@Override
	public void setWorkerSnapshot(WorkerSnapshot workerSnapshot) {
		updateWorkerSnapshot(workerSnapshot);
	}

	@Override
	public void updateWorkerSnapshot(WorkerSnapshot workerSnapshot) {
		String workerSnapshotKey = redisCacheKeyHelper.getWorkerSnapshotsKey(workerSnapshot.getJobName());
		getRedisManager().hset(workerSnapshotKey, workerSnapshot.getName(), workerSnapshot);
	}

	@Override
	public void delWorkerSnapshots(String jobName) {
		String WorkerSnapshotkey = redisCacheKeyHelper.getWorkerSnapshotsKey(jobName);
		getRedisManager().del(WorkerSnapshotkey);
	}

	@Override
	public void clear() {
		String patternKey = redisCacheKeyHelper.getResetPreKey() + "*";
		Set<String> keys = getRedisManager().keys(patternKey);
		for (String key : keys) {
			getRedisManager().del(key);
		}
	}

	public RedisManager getRedisManager() {
		return redisManager;
	}

	public ClusterManager getClusterManager() {
		return clusterManager;
	}

	public void setClusterManager(ClusterManager clusterManager) {
		this.clusterManager = clusterManager;
	}

	public void setRedisManager(RedisManager redisManager) {
		this.redisManager = redisManager;
	}

	@Override
	public void afterPropertiesSet() throws Exception {
		String clusterName = clusterManager.getClusterName();
		String basePreKey = clusterName + "_scheduler_cache";
		redisCacheKeyHelper = new RedisCacheKeyHelper(basePreKey);
	}
}


text:
namespace System.Xml.Schema {

    using System.Collections;
    using System.Xml.Serialization;

    /// <include file='doc\XmlSchemaAnnotation.uex' path='docs/doc[@for="XmlSchemaAnnotation"]/*' />
    /// <devdoc>
    ///    <para>[To be supplied.]</para>
    /// </devdoc>
    public class XmlSchemaAnnotation : XmlSchemaObject {
        string id;
        XmlSchemaObjectCollection items = new XmlSchemaObjectCollection();
        XmlAttribute[] moreAttributes;

        /// <include file='doc\XmlSchemaAnnotation.uex' path='docs/doc[@for="XmlSchemaAnnotation.Id"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        [XmlAttribute("id", DataType = "ID")]
        public string Id {
            get { return id; }
            set { id = value; }
        }

        /// <include file='doc\XmlSchemaAnnotation.uex' path='docs/doc[@for="XmlSchemaAnnotation.Items"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        [XmlElement("documentation", typeof(XmlSchemaDocumentation)),
         XmlElement("appinfo", typeof(XmlSchemaAppInfo))]
        public XmlSchemaObjectCollection Items {
            get { return items; }
        }

        /// <include file='doc\XmlSchemaAnnotation.uex' path='docs/doc[@for="XmlSchemaAnnotation.UnhandledAttributes"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        [XmlAnyAttribute]
        public XmlAttribute[] UnhandledAttributes {
            get { return moreAttributes; }
            set { moreAttributes = value; }
        }

        [XmlIgnore]
        internal override string IdAttribute {
            get { return Id; }
            set { Id = value; }
        }

        internal override void SetUnhandledAttributes(XmlAttribute[] moreAttributes) {
            this.moreAttributes = moreAttributes;
        }
    }
}


text:
package webhooq

import com.hazelcast.config.Config
import com.hazelcast.core.{Hazelcast => Hz}
import webhooq.logging.WebhooqLogger

trait Hazelcast extends WebhooqLogger {

  val hazelcast = Hazelcast.hazelcast
}

object  Hazelcast extends WebhooqLogger {
  wqLog.info("Configuring Hazelcast.")
  val hazelcastConfig = new Config()
  wqLog.info("Telling Hazelcast to use Log4j for it's logging.")
  hazelcastConfig.setProperty("hazelcast.logging.type", "log4j")
  val hazelcast = Hz.newHazelcastInstance(hazelcastConfig)
  wqLog.info("Hazelcast initialized.")

  Runtime.getRuntime().addShutdownHook(new Thread("Webhooq Hazelcast Shutdown Thread") {
    override def run() : Unit = {
      wqLog.info("Shutting down Hazelcast")
      hazelcast.getLifecycleService.shutdown()
    }
  })
}


text:
.select-container-rdcl{

}

.select-container-rdcl-loading > .fa{
    visibility: visible !important;
}

.select-container-rdcl-loaded > .fa{
    visibility: hidden !important;
}

.select-container-rdcl-loading > .select-rdcl{
    pointer-events: none !important;
}

.select-container-rdcl-loaded > .select-rdcl{
    pointer-events: all !important;
}

.shellIframe {
    width: 100%;
    height: 450px;
}

/* layout.css Style */
.upload-drop-zone {
  height: 200px;
  border-width: 2px;
  margin-bottom: 20px;
}

/* skin.css Style*/
.upload-drop-zone {
  color: #ccc;
  border-style: dashed;
  border-color: #ccc;
  line-height: 200px;
  text-align: center
}
.upload-drop-zone.drop {
  color: #222;
  border-color: #222;
}


text:
from __future__ import absolute_import, division, print_function
__metaclass__ = type

ANSIBLE_METADATA = {'metadata_version': '1.1',
                    'status': ['preview'],
                    'supported_by': 'community'}

DOCUMENTATION = """
---
module: icx_facts
version_added: "2.9"
author: "Ruckus Wireless (@Commscope)"
short_description: Collect facts from remote Ruckus ICX 7000 series switches
description:
  - Collects a base set of device facts from a remote device that
    is running ICX.  This module prepends all of the
    base network fact keys with C(ansible_net_<fact>). The facts
    module will always collect a base set of facts from the device
    and can enable or disable collection of additional facts.
notes:
  - Tested against ICX 10.1.
  - For information on using ICX platform, see L(the ICX OS Platform Options guide,../network/user_guide/platform_icx.html).
options:
  gather_subset:
    description:
      - When supplied, this argument will restrict the facts collected
        to a given subset.  Possible values for this argument include
        all, hardware, config, and interfaces.  Can specify a list of
        values to include a larger subset.  Values can also be used
        with an initial C(M(!)) to specify that a specific subset should
        not be collected.
    required: false
    type: list
    default: '!config'
"""

EXAMPLES = """
# Collect all facts from the device
- icx_facts:
    gather_subset: all

# Collect only the config and default facts
- icx_facts:
    gather_subset:
      - config

# Do not collect hardware facts
- icx_facts:
    gather_subset:
      - "!hardware"
"""

RETURN = """
ansible_net_gather_subset:
  description: The list of fact subsets collected from the device
  returned: always
  type: list

# default
ansible_net_model:
  description: The model name returned from the device
  returned: always
  type: str
ansible_net_serialnum:
  description: The serial number of the remote device
  returned: always
  type: str
ansible_net_version:
  description: The operating system version running on the remote device
  returned: always
  type: str
ansible_net_hostname:
  description: The configured hostname of the device
  returned: always
  type: str
ansible_net_image:
  description: The image file the device is running
  returned: always
  type: str
ansible_net_stacked_models:
  description: The model names of each device in the stack
  returned: when multiple devices are configured in a stack
  type: list
ansible_net_stacked_serialnums:
  description: The serial numbers of each device in the stack
  returned: when multiple devices are configured in a stack
  type: list

# hardware
ansible_net_filesystems:
  description: All file system names available on the device
  returned: when hardware is configured
  type: list
ansible_net_filesystems_info:
  description: A hash of all file systems containing info about each file system (e.g. free and total space)
  returned: when hardware is configured
  type: dict
ansible_net_memfree_mb:
  description: The available free memory on the remote device in Mb
  returned: when hardware is configured
  type: int
ansible_net_memtotal_mb:
  description: The total memory on the remote device in Mb
  returned: when hardware is configured
  type: int

# config
ansible_net_config:
  description: The current active config from the device
  returned: when config is configured
  type: str

# interfaces
ansible_net_all_ipv4_addresses:
  description: All IPv4 addresses configured on the device
  returned: when interfaces is configured
  type: list
ansible_net_all_ipv6_addresses:
  description: All IPv6 addresses configured on the device
  returned: when interfaces is configured
  type: list
ansible_net_interfaces:
  description: A hash of all interfaces running on the system
  returned: when interfaces is configured
  type: dict
ansible_net_neighbors:
  description: The list of LLDP neighbors from the remote device
  returned: when interfaces is configured
  type: dict
"""

import re
from ansible.module_utils.network.icx.icx import run_commands
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import iteritems
from ansible.module_utils.six.moves import zip

class FactsBase(object):

    COMMANDS = list()

    def __init__(self, module):
        self.module = module
        self.facts = dict()
        self.responses = None

    def populate(self):
        self.responses = run_commands(self.module, commands=self.COMMANDS, check_rc=False)

    def run(self, cmd):
        return run_commands(self.module, commands=cmd, check_rc=False)

class Default(FactsBase):

    COMMANDS = ['show version', 'show running-config | include hostname']

    def populate(self):
        super(Default, self).run(['skip'])
        super(Default, self).populate()
        data = self.responses[0]
        if data:
            self.facts['version'] = self.parse_version(data)
            self.facts['serialnum'] = self.parse_serialnum(data)
            self.facts['model'] = self.parse_model(data)
            self.facts['image'] = self.parse_image(data)
            self.facts['hostname'] = self.parse_hostname(self.responses[1])
            self.parse_stacks(data)

    def parse_version(self, data):
        match = re.search(r'SW: Version ([0-9]+.[0-9]+.[0-9a-zA-Z]+)', data)
        if match:
            return match.group(1)

    def parse_hostname(self, data):
        match = re.search(r'^hostname (\S+)', data, re.M)
        if match:
            return match.group(1)

    def parse_model(self, data):
        match = re.search(r'HW: (\S+ \S+)', data, re.M)
        if match:
            return match.group(1)

    def parse_image(self, data):
        match = re.search(r'\([0-9]+ bytes\) from \S+ (\S+)', data)
        if match:
            return match.group(1)

    def parse_serialnum(self, data):
        match = re.search(r'Serial  #:(\S+)', data)
        if match:
            return match.group(1)

    def parse_stacks(self, data):
        match = re.findall(r'UNIT [1-9]+: SL [1-9]+: (\S+)', data, re.M)
        if match:
            self.facts['stacked_models'] = match

        match = re.findall(r'^System [Ss]erial [Nn]umber\s+: (\S+)', data, re.M)
        if match:
            self.facts['stacked_serialnums'] = match

class Hardware(FactsBase):

    COMMANDS = [
        'show memory',
        'show flash'
    ]

    def populate(self):
        super(Hardware, self).populate()
        data = self.responses[0]
        if data:
            self.facts['filesystems'] = self.parse_filesystems(data)
            self.facts['filesystems_info'] = self.parse_filesystems_info(self.responses[1])

        if data:
            if 'Invalid input detected' in data:
                warnings.append('Unable to gather memory statistics')
            else:
                match = re.search(r'Dynamic memory: ([0-9]+) bytes total, ([0-9]+) bytes free, ([0-9]+%) used', data)
                if match:
                    self.facts['memtotal_mb'] = int(match.group(1)) / 1024
                    self.facts['memfree_mb'] = int(match.group(2)) / 1024

    def parse_filesystems(self, data):
        return "flash"

    def parse_filesystems_info(self, data):
        facts = dict()
        fs = ''
        for line in data.split('\n'):
            match = re.match(r'^(Stack unit \S+):', line)
            if match:
                fs = match.group(1)
                facts[fs] = dict()
                continue
            match = re.match(r'\W+NAND Type: Micron NAND (\S+)', line)
            if match:
                facts[fs]['spacetotal'] = match.group(1)
            match = re.match(r'\W+Code Flash Free Space = (\S+)', line)
            if match:
                facts[fs]['spacefree'] = int(int(match.group(1)) / 1024)
                facts[fs]['spacefree'] = str(facts[fs]['spacefree']) + "Kb"
        return {"flash": facts}

class Config(FactsBase):

    COMMANDS = ['skip', 'show running-config']

    def populate(self):
        super(Config, self).populate()
        data = self.responses[1]
        if data:
            self.facts['config'] = data

class Interfaces(FactsBase):

    COMMANDS = [
        'skip',
        'show interfaces',
        'show running-config',
        'show lldp',
        'show media'
    ]

    def populate(self):
        super(Interfaces, self).populate()

        self.facts['all_ipv4_addresses'] = list()
        self.facts['all_ipv6_addresses'] = list()
        data = self.responses[1]
        if data:
            interfaces = self.parse_interfaces(data)
            self.facts['interfaces'] = self.populate_interfaces(interfaces)

        data = self.responses[1]
        if data:
            data = self.parse_interfaces(data)
            self.populate_ipv4_interfaces(data)

        data = self.responses[2]
        if data:
            self.populate_ipv6_interfaces(data)

        data = self.responses[3]
        lldp_errs = ['Invalid input', 'LLDP is not enabled']

        if data and not any(err in data for err in lldp_errs):
            neighbors = self.run(['show lldp neighbors detail'])
            if neighbors:
                self.facts['neighbors'] = self.parse_neighbors(neighbors[0])

        data = self.responses[4]
        self.populate_mediatype(data)

        interfaceList = {}
        for iface in self.facts['interfaces']:
            if 'type' in self.facts['interfaces'][iface]:
                newName = self.facts['interfaces'][iface]['type'] + iface
            else:
                newName = iface
            interfaceList[newName] = self.facts['interfaces'][iface]
        self.facts['interfaces'] = interfaceList

    def populate_mediatype(self, data):
        lines = data.split("\n")
        for line in lines:
            match = re.match(r'Port (\S+):\W+Type\W+:\W+(.*)', line)
            if match:
                self.facts['interfaces'][match.group(1)]["mediatype"] = match.group(2)

    def populate_interfaces(self, interfaces):
        facts = dict()
        for key, value in iteritems(interfaces):
            intf = dict()
            intf['description'] = self.parse_description(value)
            intf['macaddress'] = self.parse_macaddress(value)
            intf['mtu'] = self.parse_mtu(value)
            intf['bandwidth'] = self.parse_bandwidth(value)
            intf['duplex'] = self.parse_duplex(value)
            intf['lineprotocol'] = self.parse_lineprotocol(value)
            intf['operstatus'] = self.parse_operstatus(value)
            intf['type'] = self.parse_type(value)
            facts[key] = intf
        return facts

    def populate_ipv4_interfaces(self, data):
        for key, value in data.items():
            self.facts['interfaces'][key]['ipv4'] = dict()
            primary_address = addresses = []
            primary_address = re.findall(r'Internet address is (\S+/\S+), .*$', value, re.M)
            addresses = re.findall(r'Secondary address (.+)$', value, re.M)
            if len(primary_address) == 0:
                continue
            addresses.append(primary_address[0])
            for address in addresses:
                addr, subnet = address.split("/")
                ipv4 = dict(address=addr.strip(), subnet=subnet.strip())
                self.add_ip_address(addr.strip(), 'ipv4')
                self.facts['interfaces'][key]['ipv4'] = ipv4

    def populate_ipv6_interfaces(self, data):
        parts = data.split("\n")
        for line in parts:
            match = re.match(r'\W*interface \S+ (\S+)', line)
            if match:
                key = match.group(1)
                try:
                    self.facts['interfaces'][key]['ipv6'] = list()
                except KeyError:
                    self.facts['interfaces'][key] = dict()
                    self.facts['interfaces'][key]['ipv6'] = list()
                self.facts['interfaces'][key]['ipv6'] = {}
                continue
            match = re.match(r'\W+ipv6 address (\S+)/(\S+)', line)
            if match:
                self.add_ip_address(match.group(1), "ipv6")
                self.facts['interfaces'][key]['ipv6']["address"] = match.group(1)
                self.facts['interfaces'][key]['ipv6']["subnet"] = match.group(2)

    def add_ip_address(self, address, family):
        if family == 'ipv4':
            self.facts['all_ipv4_addresses'].append(address)
        else:
            self.facts['all_ipv6_addresses'].append(address)

    def parse_neighbors(self, neighbors):
        facts = dict()
        for entry in neighbors.split('------------------------------------------------'):
            if entry == '':
                continue
            intf = self.parse_lldp_intf(entry)
            if intf not in facts:
                facts[intf] = list()
            fact = dict()
            fact['host'] = self.parse_lldp_host(entry)
            fact['port'] = self.parse_lldp_port(entry)
            facts[intf].append(fact)
        return facts

    def parse_interfaces(self, data):
        parsed = dict()
        key = ''
        for line in data.split('\n'):
            if len(line) == 0:
                continue
            elif line[0] == ' ':
                parsed[key] += '\n%s' % line
            else:
                match = re.match(r'\S+Ethernet(\S+)', line)
                if match:
                    key = match.group(1)
                    parsed[key] = line
        return parsed

    def parse_description(self, data):
        match = re.search(r'Port name is ([ \S]+)', data, re.M)
        if match:
            return match.group(1)

    def parse_macaddress(self, data):
        match = re.search(r'Hardware is \S+, address is (\S+)', data)
        if match:
            return match.group(1)

    def parse_ipv4(self, data):
        match = re.search(r'Internet address is (\S+)', data)
        if match:
            addr, masklen = match.group(1).split('/')
            return dict(address=addr, masklen=int(masklen))

    def parse_mtu(self, data):
        match = re.search(r'MTU (\d+)', data)
        if match:
            return int(match.group(1))

    def parse_bandwidth(self, data):
        match = re.search(r'Configured speed (\S+), actual (\S+)', data)
        if match:
            return match.group(1)

    def parse_duplex(self, data):
        match = re.search(r'configured duplex (\S+), actual (\S+)', data, re.M)
        if match:
            return match.group(2)

    def parse_mediatype(self, data):
        match = re.search(r'media type is (.+)$', data, re.M)
        if match:
            return match.group(1)

    def parse_type(self, data):
        match = re.search(r'Hardware is (.+),', data, re.M)
        if match:
            return match.group(1)

    def parse_lineprotocol(self, data):
        match = re.search(r'line protocol is (.+)$', data, re.M)
        if match:
            return match.group(1)

    def parse_operstatus(self, data):
        match = re.search(r'^(?:.+) is (.+),', data, re.M)
        if match:
            return match.group(1)

    def parse_lldp_intf(self, data):
        match = re.search(r'^Local Intf: (.+)$', data, re.M)
        if match:
            return match.group(1)

    def parse_lldp_host(self, data):
        match = re.search(r'System Name: (.+)$', data, re.M)
        if match:
            return match.group(1)

    def parse_lldp_port(self, data):
        match = re.search(r'Port id: (.+)$', data, re.M)
        if match:
            return match.group(1)

FACT_SUBSETS = dict(
    default=Default,
    hardware=Hardware,
    interfaces=Interfaces,
    config=Config,
)

VALID_SUBSETS = frozenset(FACT_SUBSETS.keys())

warnings = list()

def main():
    """main entry point for module execution
    """
    argument_spec = dict(
        gather_subset=dict(default=['!config'], type='list')
    )

    module = AnsibleModule(argument_spec=argument_spec,
                           supports_check_mode=True)

    gather_subset = module.params['gather_subset']

    runable_subsets = set()
    exclude_subsets = set()

    for subset in gather_subset:
        if subset == 'all':
            runable_subsets.update(VALID_SUBSETS)
            continue

        if subset.startswith('!'):
            subset = subset[1:]
            if subset == 'all':
                exclude_subsets.update(VALID_SUBSETS)
                continue
            exclude = True
        else:
            exclude = False

        if subset not in VALID_SUBSETS:
            module.fail_json(msg='Bad subset')

        if exclude:
            exclude_subsets.add(subset)
        else:
            runable_subsets.add(subset)

    if not runable_subsets:
        runable_subsets.update(VALID_SUBSETS)

    runable_subsets.difference_update(exclude_subsets)
    runable_subsets.add('default')

    facts = dict()
    facts['gather_subset'] = list(runable_subsets)

    instances = list()
    for key in runable_subsets:
        instances.append(FACT_SUBSETS[key](module))

    for inst in instances:
        inst.populate()
        facts.update(inst.facts)

    ansible_facts = dict()
    for key, value in iteritems(facts):
        key = 'ansible_net_%s' % key
        ansible_facts[key] = value

    module.exit_json(ansible_facts=ansible_facts, warnings=warnings)

if __name__ == '__main__':
    main()


text:
class CreateHashTags < ActiveRecord::Migration
  def change
    create_table :hash_tags do |t|
      t.string :content

      t.timestamps null: false
    end
  end
end


text:
#include <_lua/lua.class.event.h>
#include <_lua/lua.class.gadget.h>
#include <_lua/lua.class.area.h>
#include <_lua/lua.func.h>
#include <_lua/lua.func.wrap.h>
using namespace _luafunc;

/*##################################
##         Lua-GadgetEvent        ##
##################################*/
// Ctor...
_lua_event::_lua_event( _event e ) :
	_event( move(e) )
{ }

// Lua-Ctor...
_lua_event::_lua_event( lua_State* L ) :
	_event( lightcheck<_eventType>( L , 1 , _eventType::_none_ ) )
{ }

//! setType
//int _lua_event::setType( lua_State* L ){ _event::setType( string2eventType[ check<string>( L , 1 ) ] ); return 0; }

//! getType
//int _lua_event::getType( lua_State* L ){ return push( L , eventType2string[_event::getType()] ); }

//! getGadget
//int _lua_event::getGadget( lua_State* L ){ return push( L , _event::getGadget() ); }

//! Get Damaged Rects(The Rects that have to be repainted by the parent)
//int _lua_event::getDamagedRects(lua_State* L){ return push( L , _event::getDamagedRects() ); }

//! Set Damaged Rects(The Rects that have to be repainted by the parent)
//int _lua_event::setDamagedRects(lua_State* L){ _event::setDamagedRects( check<_area>( L , 1 ) ); return 0; }

//! Lua-_event
const char _lua_event::className[] = "Event";
Lunar<_lua_event>::FunctionType _lua_event::methods[] = {
	{ "resetParams" , wrap( _lua_event , &_event::resetParams ) },
	{ "hasClippingRects" , wrap( _lua_event , &_event::hasClippingRects ) },
	LUA_CLASS_FUNC_END
};

using HelperType1 = _gadget* (_event::*)() const;
using HelperType2 = const _area& (_event::*)() const;

Lunar<_lua_event>::PropertyType _lua_event::properties[] = {
	{ "type"		, wrap( _lua_event , &_event::getType )							, wrap( _lua_event , &_event::setType ) },
	{ "gadget" 		, wrap( _lua_event , (HelperType1)&_event::getGadget )			, wrap( _lua_event , &_event::setGadget ) },
	{ "destination"	, wrap( _lua_event , &_event::getDestination )					, wrap( _lua_event , &_event::setDestination ) },
	{ "pressure"	, wrap( _lua_event , &_event::getPressure )						, wrap( _lua_event , &_event::setPressure ) },
	{ "posX"		, wrap( _lua_event , &_event::getPosX )							, wrap( _lua_event , &_event::setPosX ) },
	{ "posY"		, wrap( _lua_event , &_event::getPosY )							, wrap( _lua_event , &_event::setPosY ) },
	{ "deltaX"		, wrap( _lua_event , &_event::getDeltaX )						, wrap( _lua_event , &_event::setDeltaX ) },
	{ "deltaY"		, wrap( _lua_event , &_event::getDeltaY )						, wrap( _lua_event , &_event::setDeltaY ) },
	{ "keyCode"		, wrap( _lua_event , &_event::getKeyCode )						, wrap( _lua_event , &_event::setKeyCode ) },
	{ "heldTime"	, wrap( _lua_event , &_event::getHeldTime )						, wrap( _lua_event , &_event::setHeldTime ) },
	{ "currentKeys"	, wrap( _lua_event , &_event::getCurrentKeys )					, wrap( _lua_event , &_event::setCurrentKeys ) },
	{ "damagedRects", wrap( _lua_event , (HelperType2)&_event::getDamagedRects )	, wrap( _lua_event , &_event::setDamagedRects ) },
	LUA_CLASS_ATTR_END
};


text:
<!DOCTYPE HTML>

  <meta charset="utf-8">
  <title>querystring Tests</title>
  <link rel="stylesheet" href="../node_modules/mocha/mocha.css" />


text:
package com.ipartek.formacion.exceptions;

public class ConvocatoriaException extends Exception {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * {@code}int Código de la excepción.
	 */
	private transient int codigo;

	public ConvocatoriaException() {
		super();
	}

	public ConvocatoriaException(String mensaje, int pcodigo) {
		super(mensaje);
		this.codigo = pcodigo;
	}

	/**
	 * Código de error para código de la convocatoria no válido
	 */
	public static final int COD_CODIGO_NO_VALIDO = 10;

	/**
	 * Mensaje de texto de error para código de la convocatoria
	 */
	public static final String MSG_CODIGO_NO_VALIDO = "El código de la convocatoria introducido no es válido.";

	public ConvocatoriaException(String message, Throwable cause,
			boolean enableSuppression, boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
	}

	public ConvocatoriaException(String message, Throwable cause) {
		super(message, cause);
	}

	public ConvocatoriaException(String message) {
		super(message);
	}

	public ConvocatoriaException(Throwable cause) {
		super(cause);

	}

	@Override
	public String getMessage() {
		return super.getMessage();
	}

}


text:
package org.apereo.cas.pm.impl;

import org.apereo.cas.CipherExecutor;
import org.apereo.cas.authentication.Credential;
import org.apereo.cas.configuration.model.support.pm.PasswordManagementProperties;
import org.apereo.cas.pm.BasePasswordManagementService;
import org.apereo.cas.pm.PasswordChangeBean;
import org.apereo.cas.util.ScriptingUtils;

import lombok.Getter;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.io.Resource;

import java.io.Serializable;
import java.util.Map;

/**
 * This is {@link GroovyResourcePasswordManagementService}.
 *
 * @author Misagh Moayyed
 * @since 5.3.0
 */
@Slf4j
@Getter
public class GroovyResourcePasswordManagementService extends BasePasswordManagementService {

    private final Resource groovyResource;

    public GroovyResourcePasswordManagementService(final CipherExecutor<Serializable, String> cipherExecutor,
                                                   final String issuer,
                                                   final PasswordManagementProperties passwordManagementProperties,
                                                   final Resource jsonResource) {
        super(passwordManagementProperties, cipherExecutor, issuer);
        this.groovyResource = jsonResource;
    }

    @Override
    public boolean changeInternal(@NonNull final Credential credential, @NonNull final PasswordChangeBean bean) {
        return ScriptingUtils.executeGroovyScript(this.groovyResource, "change", new Object[]{credential, bean, LOGGER}, Boolean.class, true);
    }

    @Override
    public String findEmail(final String username) {
        return ScriptingUtils.executeGroovyScript(this.groovyResource, "findEmail", new Object[]{username, LOGGER}, String.class, true);
    }

    @Override
    public String findUsername(final String email) {
        return ScriptingUtils.executeGroovyScript(this.groovyResource, "findUsername", new Object[]{email, LOGGER}, String.class, true);
    }

    @Override
    public Map<String, String> getSecurityQuestions(final String username) {
        return ScriptingUtils.executeGroovyScript(this.groovyResource, "getSecurityQuestions", new Object[]{username, LOGGER}, Map.class, true);
    }
}


text:
package com.google.api.ads.dfp.jaxws.v201408;

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

/**
 *
 *             Represents the actions that can be performed on {@link ProposalLineItem} objects.
 *
 *
 *
Java class for ProposalLineItemAction complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="ProposalLineItemAction">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="ProposalLineItemAction.Type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ProposalLineItemAction", propOrder = {
    "proposalLineItemActionType"
})
@XmlSeeAlso({
    ArchiveProposalLineItems.class,
    UnarchiveProposalLineItems.class
})
public abstract class ProposalLineItemAction {

    @XmlElement(name = "ProposalLineItemAction.Type")
    protected String proposalLineItemActionType;

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

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

}


text:
//
//  GTLAnalyticsProfiles.h
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   Google Analytics API (analytics/v3)
// Description:
//   View and manage your Google Analytics data
// Documentation:
//   https://developers.google.com/analytics/
// Classes:
//   GTLAnalyticsProfiles (0 custom class methods, 8 custom properties)

#if GTL_BUILT_AS_FRAMEWORK
  #import "GTL/GTLObject.h"
#else
  #import "GTLObject.h"
#endif

@class GTLAnalyticsProfile;

// ----------------------------------------------------------------------------
//
//   GTLAnalyticsProfiles
//

// A view (profile) collection lists Analytics views (profiles) to which the
// user has access. Each resource in the collection corresponds to a single
// Analytics view (profile).

// This class supports NSFastEnumeration over its "items" property. It also
// supports -itemAtIndex: to retrieve individual objects from "items".

@interface GTLAnalyticsProfiles : GTLCollectionObject

// A list of views (profiles).
@property (nonatomic, retain) NSArray *items;  // of GTLAnalyticsProfile

// The maximum number of resources the response can contain, regardless of the
// actual number of resources returned. Its value ranges from 1 to 1000 with a
// value of 1000 by default, or otherwise specified by the max-results query
// parameter.
@property (nonatomic, retain) NSNumber *itemsPerPage;  // intValue

// Collection type.
@property (nonatomic, copy) NSString *kind;

// Link to next page for this view (profile) collection.
@property (nonatomic, copy) NSString *nextLink;

// Link to previous page for this view (profile) collection.
@property (nonatomic, copy) NSString *previousLink;

// The starting index of the resources, which is 1 by default or otherwise
// specified by the start-index query parameter.
@property (nonatomic, retain) NSNumber *startIndex;  // intValue

// The total number of results for the query, regardless of the number of
// results in the response.
@property (nonatomic, retain) NSNumber *totalResults;  // intValue

// Email ID of the authenticated user
@property (nonatomic, copy) NSString *username;

@end


text:
============
Installation
============

At the command line::

    $ easy_install django-interests-inspector

Or, if you have virtualenvwrapper installed::

    $ mkvirtualenv django-interests-inspector
    $ pip install django-interests-inspector