text:
package com.asi.service.product.list;

import java.io.UnsupportedEncodingException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.asi.core.repo.product.ProductRepo;
import com.asi.service.product.client.ProductClient;
import com.asi.service.product.client.vo.ProductDetail;
import com.asi.service.product.vo.Product;

@RestController
@RequestMapping("api")
public class ProductSearchService {
	@Autowired ProductDetail serviceResponse;
	@Autowired ProductRepo repository;
	private Logger _LOGGER = LoggerFactory.getLogger(getClass());

	@Autowired ProductClient client;

	@RequestMapping(value = "product/{xid}",method = RequestMethod.GET, headers="content-type=application/json, application/xml" ,produces={"application/xml", "application/json"} )
	public ResponseEntity<Product> handle(HttpEntity<byte[]> requestEntity,@PathVariable String xid) throws UnsupportedEncodingException {

		if(_LOGGER.isTraceEnabled()) _LOGGER.trace("calling service");

		Product productResponse = repository.getProductPrices(Integer.valueOf(xid).intValue());
		HttpHeaders responseHeaders = new HttpHeaders();
	    responseHeaders.set("MyResponseHeader", "MyValue");
	    return new ResponseEntity<Product>(productResponse, responseHeaders, HttpStatus.OK);
	}

}


text:
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { elementType } from 'prop-types-extra';

import { createBootstrapComponent } from './ThemeProvider';

class TabContent extends React.Component {
  static propTypes = {
    /**
     * @default 'tab-content'
     */
    bsPrefix: PropTypes.string,

    as: elementType,
  };

  static defaultProps = {
    as: 'div',
  };

  render() {
    const { bsPrefix, as: Component, className, ...props } = this.props;

    return <Component {...props} className={classNames(className, bsPrefix)} />;
  }
}

export default createBootstrapComponent(TabContent, 'tab-content');

redpajama_set_name: RedPajamaGithub


text:
import * as ethers from 'ethers';
import Compiler from '../src/compiler';
import Ganache from 'ganache-core';

export const provider = new ethers.providers.Web3Provider(Ganache.provider());
export const compiler = new Compiler();

let snapshotId;

beforeEach(async () => {
  snapshotId = await provider.send('evm_snapshot', undefined);
});

afterEach(async () => {
  if (snapshotId) await provider.send('evm_revert', snapshotId);
  snapshotId = null;
});


text:
package com.twitter.inject.app

import com.google.inject.Module
import com.google.inject.Stage
import com.twitter.app.Flag
import com.twitter.app.Flaggable
import com.twitter.app.lifecycle.Event.AfterPostWarmup
import com.twitter.app.lifecycle.Event.BeforePostWarmup
import com.twitter.app.lifecycle.Event.PostInjectorStartup
import com.twitter.app.lifecycle.Event.PostWarmup
import com.twitter.app.lifecycle.Event.Warmup
import com.twitter.inject.Injector
import com.twitter.inject.InjectorModule
import com.twitter.inject.annotations.Lifecycle
import com.twitter.inject.app.console.ConsoleWriter
import com.twitter.inject.app.internal.ConsoleWriterModule
import com.twitter.inject.app.internal.InstalledModules
import com.twitter.inject.app.internal.Modules
import com.twitter.util.logging.Logging
import com.twitter.util.logging.Slf4jBridge
import scala.collection.JavaConverters._
import scala.collection.mutable.ArrayBuffer

/** AbstractApp for usage from Java */
abstract class AbstractApp extends App {

  /**
   * A Java-friendly method for creating a named [[Flag]].
   *
   * @param name the name of the [[Flag]].
   * @param default a default value for the [[Flag]] when no value is given as an application
   *                argument.
   * @param help the help text explaining the purpose of the [[Flag]].
   * @return the created [[Flag]].
   */
  final def createFlag[T](
    name: String,
    default: T,
    help: String,
    flaggable: Flaggable[T]
  ): Flag[T] =
    flag.create(name, default, help, flaggable)

  /**
   * A Java-friendly way to create a "mandatory" [[Flag]]. "Mandatory" flags MUST have a value
   * provided as an application argument (as they have no default value to be used).
   *
   * @param name the name of the [[Flag]].
   * @param help the help text explaining the purpose of the [[Flag]].
   * @param usage a string describing the type of the [[Flag]], i.e.: Integer.
   * @return the created [[Flag]].
   */
  final def createMandatoryFlag[T](
    name: String,
    help: String,
    usage: String,
    flaggable: Flaggable[T]
  ): Flag[T] =
    flag.createMandatory(name, help, usage, flaggable)

  /**
   * Called prior to application initialization.
   */
  def onInit(): Unit = ()

  /**
   * Called before the `main` method.
   */
  def preMain(): Unit = ()

  /**
   * Called after the `main` method.
   */
  def postMain(): Unit = ()

  /**
   * Called prior to application exiting.
   */
  def onExit(): Unit = ()

  /**
   * Called prior to application exiting after `onExit`.
   */
  def onExitLast(): Unit = ()

  init(onInit())
  premain(preMain())
  postmain(postMain())
  onExit(onExit())
  onExitLast(onExitLast())
}

/**
 * A [[com.twitter.app.App]] that supports injection and [[com.twitter.inject.TwitterModule]] modules.
 *
 * It is not expected that you override @Lifecycle methods. If you do, take care to ensure that you
 * call the super implementation, otherwise critical lifecycle set-up may not occur causing your application
 * to either function improperly or outright fail.
 *
 * Typically, you will only need to interact with the following methods:
 *   run -- callback executed after the injector is created and all @Lifecycle methods have completed.
 */
trait App extends com.twitter.app.App with Slf4jBridge with Logging {

  /**
   * All modules composed within this application (including modules referenced only from
   * other modules).
   *
   * @note `required` modules appends "framework" modules first as they map to framework
   *       "defaults" which users can override.
   *       `override` modules appends "framework" modules last as they map to the BindDSL
   *       for testing.
   */
  private[this] lazy val appModules: Modules =
    new Modules(
      required =
        (frameworkModules ++ modules ++ javaModules.asScala).toSeq, // user modules should replace framework
      overrides =
        overrideModules ++ javaOverrideModules.asScala ++ frameworkOverrideModules // framework should replace user modules
    )

  /* Mutable State */

  private val frameworkModules: ArrayBuffer[Module] =
    ArrayBuffer(InjectorModule, ConsoleWriterModule)
  private val frameworkOverrideModules: ArrayBuffer[Module] = ArrayBuffer()

  private[inject] var stage: Stage = Stage.PRODUCTION
  private[this] var installedModules: InstalledModules = _

  /* Lifecycle */

  init {
    info("Process started")

    /* Register all flags from Modules */
    appModules.addFlags(flag)
  }

  /** DO NOT BLOCK */
  def main(): Unit = {
    observe(PostInjectorStartup) {
      installedModules = loadModules()
      installedModules.postInjectorStartup()
      postInjectorStartup()
    }

    observe(Warmup) {
      info("Warming up.")
      warmup()
    }

    observe(BeforePostWarmup) {
      beforePostWarmup()
    }
    observe(PostWarmup) {
      postWarmup()
    }
    observe(AfterPostWarmup) {
      afterPostWarmup()
      installedModules.postWarmupComplete()
    }

    /* Register close and shutdown of InstalledModules */
    registerInstalledModulesExits()

    info(s"$name started.")

    val consoleWriter = injector.instance[ConsoleWriter]
    consoleWriter.let { // use our installed output streams for this application
      /* Execute callback for further configuration or to start long-running background processes */
      startApplication()
    }
  }

  /* Public */

  def injector: Injector = {
    if (installedModules == null)
      throw new Exception("injector is not available before main() is called")
    else
      installedModules.injector
  }

  /* Protected */

  /**
   * @inheritdoc
   *
   * @note It is HIGHLY recommended that this value remains 'true'. This value SHOULD NOT be
   *       changed to 'false' without a very good reason.This method only remains overridable for
   *       legacy reasons.
   */
  override protected def failfastOnFlagsNotParsed: Boolean = true

  /**
   * Production modules.
   *
   * @note Java users should prefer [[javaModules]].
   */
  protected def modules: Seq[Module] = Seq()

  /** Production modules from Java. */
  protected def javaModules: java.util.Collection[Module] = new java.util.ArrayList[Module]()

  /**
   * ONLY INTENDED FOR USE IN TESTING.
   *
   * Override modules which redefine production bindings (only use overrideModules during testing)
   * If you think you need this in your main server you are most likely doing something incorrectly.
   */
  protected def overrideModules: Seq[Module] = Seq()

  /**
   * ONLY INTENDED FOR USE IN TESTING.
   *
   * Override modules from Java which redefine production bindings (only use overrideModules during testing)
   * If you think you need this in your main server you are most likely doing something incorrectly.
   */
  protected def javaOverrideModules: java.util.Collection[Module] =
    new java.util.ArrayList[Module]()

  /**
   * ONLY INTENDED FOR USE BY THE FRAMEWORK.
   *
   * Default modules can be overridden in production by overriding methods in your App or Server.
   *
   * We take special care to make sure the module is not null, since a common bug
   * is overriding the default methods using a val instead of a def
   */
  protected[twitter] def addFrameworkModule(module: Module): Unit = {
    assert(
      module != null,
      "Module cannot be null. If you are overriding a default module, " +
        "override it with 'def' instead of 'val'"
    )
    frameworkModules += module
  }

  /** ONLY INTENDED FOR USE BY THE FRAMEWORK. */
  protected[twitter] def addFrameworkModules(modules: Module*): Unit = {
    modules.foreach(addFrameworkModule)
  }

  /** ONLY INTENDED FOR USE BY THE FRAMEWORK. */
  protected[inject] def addFrameworkOverrideModules(modules: Module*): Unit = {
    frameworkOverrideModules ++= modules
  }

  /** ONLY INTENDED FOR USE BY THE FRAMEWORK. */
  protected[inject] def loadModules(): InstalledModules = {
    appModules.install(
      flags = flag,
      stage = stage
    )
  }

  /** Method to be called after injector creation */
  @Lifecycle
  protected def postInjectorStartup(): Unit = {}

  /** Callback method run before postWarmup */
  protected def warmup(): Unit = {}

  /** Method to be called after successful warmup but before application initialization */
  @Lifecycle
  protected def beforePostWarmup(): Unit = {}

  /** Method to be called after successful warmup */
  @Lifecycle
  protected def postWarmup(): Unit = {}

  /** Method to be be called after port warmup */
  @Lifecycle
  protected def afterPostWarmup(): Unit = {}

  /**
   * Callback method executed after the injector is created and all
   * lifecycle methods have fully completed.
   *
   * The app is signaled as STARTED prior to the execution of this
   * callback as all lifecycle methods have successfully completed.
   *
   * This method can be used to start long-lived processes that run in
   * separate threads from the main() thread. It is expected that you manage
   * these threads manually, e.g., by using a [[com.twitter.util.FuturePool]].
   *
   * Any exceptions thrown in this method will result in the app exiting.
   */
  protected def run(): Unit = {}

  /* Private */

  // Closing will be performing in parallel
  private[this] def registerInstalledModulesExits(): Unit = {
    val funcs = installedModules.shutdown() ++ installedModules.close()
    funcs.foreach { fn =>
      onExit(fn.apply())
    }
  }

  private def startApplication(): Unit = {
    try {
      run()
    } catch {
      case t: Throwable =>
        // we make sure to log a useful error message when an exception is thrown
        error(s"Error in ${this.getClass.getName}#run. ${t.getMessage}", t)
        throw t
    }
  }
}


text:
//
//  YYFrameImage.h
//  YYImage <https://github.com/ibireme/YYImage>
//
//  Created by ibireme on 14/12/9.
//  Copyright (c) 2015 ibireme.
//
//  This source code is licensed under the MIT-style license found in the
//  LICENSE file in the root directory of this source tree.
//

#import <UIKit/UIKit.h>

#if __has_include(<YYImage/YYImage.h>)
#import <YYImage/YYAnimatedImageView.h>
#elif __has_include(<YYWebImage/YYImage.h>)
#import <YYWebImage/YYAnimatedImageView.h>
#else
#import "YYAnimatedImageView.h"
#endif

NS_ASSUME_NONNULL_BEGIN

/**
 An image to display frame-based animation.

 @discussion It is a fully compatible `UIImage` subclass.
 It only support system image format such as png and jpeg.
 The animation can be played by YYAnimatedImageView.

 Sample Code:

     NSArray *paths = @[@"/ani/frame1.png", @"/ani/frame2.png", @"/ani/frame3.png"];
     NSArray *times = @[@0.1, @0.2, @0.1];
     YYFrameImage *image = [YYFrameImage alloc] initWithImagePaths:paths frameDurations:times repeats:YES];
     YYAnimatedImageView *imageView = [YYAnimatedImageView alloc] initWithImage:image];
     [view addSubView:imageView];
 */
@interface YYFrameImage : UIImage <YYAnimatedImage>

/**
 Create a frame animated image from files.

 @param paths            An array of NSString objects, contains the full or
                         partial path to each image file.
                         e.g. @[@"/ani/1.png",@"/ani/2.png",@"/ani/3.png"]

 @param oneFrameDuration The duration (in seconds) per frame.

 @param loopCount        The animation loop count, 0 means infinite.

 @return An initialized YYFrameImage object, or nil when an error occurs.
 */
- (nullable instancetype)initWithImagePaths:(NSArray<NSString *> *)paths
                           oneFrameDuration:(NSTimeInterval)oneFrameDuration
                                  loopCount:(NSUInteger)loopCount;

/**
 Create a frame animated image from files.

 @param paths          An array of NSString objects, contains the full or
                       partial path to each image file.
                       e.g. @[@"/ani/frame1.png",@"/ani/frame2.png",@"/ani/frame3.png"]

 @param frameDurations An array of NSNumber objects, contains the duration (in seconds) per frame.
                       e.g. @[@0.1, @0.2, @0.3];

 @param loopCount      The animation loop count, 0 means infinite.

 @return An initialized YYFrameImage object, or nil when an error occurs.
 */
- (nullable instancetype)initWithImagePaths:(NSArray<NSString *> *)paths
                             frameDurations:(NSArray<NSNumber *> *)frameDurations
                                  loopCount:(NSUInteger)loopCount;

/**
 Create a frame animated image from an array of data.

 @param dataArray        An array of NSData objects.

 @param oneFrameDuration The duration (in seconds) per frame.

 @param loopCount        The animation loop count, 0 means infinite.

 @return An initialized YYFrameImage object, or nil when an error occurs.
 */
- (nullable instancetype)initWithImageDataArray:(NSArray<NSData *> *)dataArray
                               oneFrameDuration:(NSTimeInterval)oneFrameDuration
                                      loopCount:(NSUInteger)loopCount;

/**
 Create a frame animated image from an array of data.

 @param dataArray      An array of NSData objects.

 @param frameDurations An array of NSNumber objects, contains the duration (in seconds) per frame.
                       e.g. @[@0.1, @0.2, @0.3];

 @param loopCount      The animation loop count, 0 means infinite.

 @return An initialized YYFrameImage object, or nil when an error occurs.
 */
- (nullable instancetype)initWithImageDataArray:(NSArray<NSData *> *)dataArray
                                 frameDurations:(NSArray *)frameDurations
                                      loopCount:(NSUInteger)loopCount;

@end

NS_ASSUME_NONNULL_END


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

namespace Auxiliar.Movimentos
{
   //Estrutura com os status de identificação das poses e movimentos
    public enum EstadoRastreamento
    {
        NaoIdentificado,
        EmExecucao,
        Identificado
    }

}


text:
CKEDITOR.plugins.setLang("a11yhelp", "pt", {
    title: "Instruções de Acessibilidade",
    contents: "Conteúdos da Ajuda. Pressione em 'ESC' para fechar esta janela.",
    legend: [{
        name: "Geral",
        items: [{
            name: "Barra de Ferramentas do Editor",
            legend: "Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHIFT-TAB. Move to the next and previous toolbar button with RIGHT ARROW or LEFT ARROW. Press SPACE or ENTER to activate the toolbar button."
        }, {
            name: "Janela do Editor",
            legend: "Dentro de uma janela, pressione TAB para navigar para o campo da janela seguinte, pressione SHIFT + TAB para mover para o campo anterior, pressione ENTER para submeter a janela, pressione ESC para cancelar a janela. Para as janelas que têm múltiplos páginas com separadores, pressione ALT + F10 para navegar para a lista do separador. Depois mova para o seguinte separador com TAB ou SETA DIREITA. Mover para o separador anterior com SHIFT + TAB ou SETA ESQUERDA. Pressione ESPAÇO ou ENTER para selecionar o separador da página."
        },
            {
                name: "Menu de Contexto do Editor",
                legend: "Press ${contextMenu} or APPLICATION KEY to open context-menu. Then move to next menu option with TAB or DOWN ARROW. Move to previous option with SHIFT+TAB or UP ARROW. Press SPACE or ENTER to select the menu option. Open sub-menu of current option with SPACE or ENTER or RIGHT ARROW. Go back to parent menu item with ESC or LEFT ARROW. Close context menu with ESC."
            }, {
                name: "Caixa Lista Editor",
                legend: "Inside a list-box, move to next list item with TAB OR DOWN ARROW. Move to previous list item with SHIFT + TAB or UP ARROW. Press SPACE or ENTER to select the list option. Press ESC to close the list-box."
            },
            {
                name: "Caminho Barra Elemento Editor",
                legend: "Press ${elementsPathFocus} to navigate to the elements path bar. Move to next element button with TAB or RIGHT ARROW. Move to previous button with  SHIFT+TAB or LEFT ARROW. Press SPACE or ENTER to select the element in editor."
            }]
    }, {
        name: "Comandos",
        items: [{name: "Comando de Anular", legend: "Pressione ${undo}"}, {
            name: "Comando de Refazer",
            legend: "Pressione ${redo}"
        }, {name: "Comando de Negrito", legend: "Pressione ${bold}"}, {
            name: "Comando de Itálico",
            legend: "Pressione ${italic}"
        },
            {name: "Comando de Sublinhado", legend: "Pressione ${underline}"}, {
                name: "Comando de Hiperligação",
                legend: "Pressione ${link}"
            }, {
                name: "Comando de Ocultar Barra de Ferramentas",
                legend: "Pressione ${toolbarCollapse}"
            }, {
                name: "Acesso comando do espaço focus anterior",
                legend: "Press ${accessPreviousSpace} to access the closest unreachable focus space before the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."
            }, {
                name: "Acesso comando do espaço focus seguinte",
                legend: "Press ${accessNextSpace} to access the closest unreachable focus space after the caret, for example: two adjacent HR elements. Repeat the key combination to reach distant focus spaces."
            }, {name: "Ajuda de Acessibilidade", legend: "Pressione ${a11yHelp}"}]
    }]
});


text:
package com.vr.ticketapp.dao;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;

import com.vr.ticketapp.entity.BookingEntity;
import com.vr.ticketapp.entity.SeatHoldEntity;
import com.vr.ticketapp.entity.VenueLevelEntity;

@Repository
public class VenueLevelDAOImpl implements VenueLevelDAO {

	@PersistenceContext
	private EntityManager manager;

	private static final String BASE_SQL = "select v.venue_level_id, v.seats as vseats,"
			+ " b.booking_id, b.seats as bseats, v.venue_level,"
			+ " s.seat_hold_id, s.reservation_time, s.reserved"
			+ " from venue_levels v left outer join bookings b on"
			+ " v.venue_level_id = b.venue_level_id"
			+ " left outer join seat_hold_info s on"
			+ " b.seat_hold_id = s.seat_hold_id";

	@Override
	public boolean addVenueLevel(VenueLevelEntity venueLevel) {
		try{
			manager.persist(venueLevel);
		}catch(Exception e){
			e.printStackTrace();
			return false;
		}
		return true;
	}

	@Override
	public VenueLevelEntity getVenueLevelById(Integer id) {
		VenueLevelEntity v = manager.find(VenueLevelEntity.class, id);
		return v;
	}

	@Override
	public List<VenueLevelEntity> getAllVenueLevels() {
		List<Object[]> results = manager.createNativeQuery(BASE_SQL
 ).getResultList();
		List<VenueLevelEntity> levels = mapResults(results);
		return levels;
	}

	@Override
	public List<VenueLevelEntity> getVenueLevelByLevelId(Integer id) {

		List<Object[]> results = manager.createNativeQuery(
				BASE_SQL + " where v.venue_level =:id" )
						.setParameter("id", id)
						.getResultList();
		List<VenueLevelEntity> levels = mapResults(results);
		return levels;

	}

	@Override
	public List<VenueLevelEntity> getVenueLevelsLessThanMax(Integer max) {

		List<Object[]> results = manager.createNativeQuery(
				BASE_SQL + " where v.venue_level <= :max" )
						.setParameter("max", max)
						.getResultList();
		List<VenueLevelEntity> levels = mapResults(results);
		return levels;

	}

	@Override
	public List<VenueLevelEntity> getVenueLevelsGreaterThanMin(Integer min) {

		List<Object[]> results = manager.createNativeQuery(
				BASE_SQL + " where v.venue_level >= :min" )
						.setParameter("min", min)
						.getResultList();
		List<VenueLevelEntity> levels = mapResults(results);
		return levels;
	}

	@Override
	public List<VenueLevelEntity> getVenueLevelsInRange(Integer min, Integer max) {

		List<Object[]> results = manager.createNativeQuery(
				BASE_SQL + " where v.venue_level >= :min and v.venue_level <=:max" )
						.setParameter("min", min)
						.setParameter("max", max)
						.getResultList();
		List<VenueLevelEntity> levels = mapResults(results);
		return levels;
	}

	private List<VenueLevelEntity> mapResults(List<Object[]> results) {
		Map<Integer, VenueLevelEntity> m = new HashMap<>();
		if (results.size() > 0){
			int sid = 0, samid = 0;
			for (Object[] row : results) {
				//All these are not null columns. Still checking
				if (row[0] != null && row[1] != null && row[4] != null){
					int venueLevelId = (Integer) row[0];
					int level = (Integer) row[4];
					int vseats = (Integer) row[1];
					if (!m.containsKey(level)) {
						//If not in map add a new venue level entity
						VenueLevelEntity v = new VenueLevelEntity();
						v.setVenueLevelId(venueLevelId);
						v.setLevel(level);
						v.setSeats(vseats);
						m.put(level, v);
					}
					//Create Booking entities
					//Not null fields
					if (row[2] != null && row[3] != null){
						BookingEntity b = new BookingEntity();
						int bookingId= (Integer) row[2];
						b.setBookingId(bookingId);
						int bookingSeats= (Integer) row[3];
						b.setSeats(bookingSeats);
						//Create and add seat hold info
						if (row[5] != null && row [6] != null && row[7] != null){
							SeatHoldEntity s = new SeatHoldEntity();
							Integer seatHoldId = (Integer) row[5];
							Date reservationTime = (Date) row[6];
							Boolean reserved = (Boolean) row[7];
							s.setSeatHoldId(seatHoldId);
							s.setReserved(reserved);
							s.setReservationTime(reservationTime);
							b.setSeatHoldEntity(s);
						}
						//Create Booking entities
						if (m.get(level).getBookingEntities() == null){
							Set<BookingEntity> bs = new HashSet<BookingEntity>();
							bs.add(b);
							m.get(level).setBookingEntities(bs);
						}else{
							m.get(level).getBookingEntities().add(b);
						}
					}

				}

			}
		}
		return new ArrayList<VenueLevelEntity>(m.values());
	}
}


text:
namespace More.VisualStudio
{
    using System;

    /// <summary>
    /// Defines the behavior of a project item name validator.
    /// </summary>
    public interface IProjectItemNameValidator
    {
        /// <summary>
        /// Returns a value indicating whether the specified item name is unique.
        /// </summary>
        /// <param name="itemName">The item name to evaluate.</param>
        /// <returns>True if the item name is unique; otherwise, false.</returns>
        bool IsItemNameUnique( string itemName );

        /// <summary>
        /// Returns a value indicating whether the specified connection string name is unique.
        /// </summary>
        /// <param name="name">The connection string name to evaluate.</param>
        /// <returns>True if the connection string name is unique; otherwise, false.</returns>
        bool IsConnectionStringNameUnique( string name );
    }
}


text:
package com.beecavegames.slots.machines;

import java.util.Random;

import com.beecavegames.slots.SlotBankState;
import com.beecavegames.slots.SpinType;
import com.beecavegames.slots.data.MatchPhase;
import com.beecavegames.slots.data.SlotMachineSpec;
import com.beecavegames.slots.data.SlotsBetResponse;
import com.beecavegames.slots.data.Symbol;
import com.beecavegames.slots.models.Spin;
import com.google.common.collect.ImmutableList;

public class WildButterfly extends ExpandingWildsGame {

	private static final Iterable<MatchPhase> MATCH_ORDER = ImmutableList.of(
			MatchPhase.SCATTER,	MatchPhase.BONUS, MatchPhase.LINE);

	private Symbol WILD_1X, WILD_2X;

	public WildButterfly() {
		direction = Direction.RIGHT_CENTER_4X4;
	}

	@Override
	public void init(SlotMachineSpec spec) {
		super.init(spec);
		WILD_1X = spec.getSymbolByName("Wild");
		WILD_2X = spec.getSymbolByName("Wild_2X");
	}

	@Override
	public void preMatch(
			Random rng,
			SlotMachineSpec spec,
			SlotBankState state,
			Spin spin,
			SpinType spinType) {
		//Don't expand first
	}

	@Override
	public void preMatchPhase(
			Random rng,
			SlotMachineSpec spec,
			SlotBankState state,
			Spin spin,
			SpinType spinType,
			MatchPhase phase,
			SlotsBetResponse response) {
		if (phase==MatchPhase.LINE) {
			//Expand after scatter matching, but before line matching
			super.preMatch(rng, spec, state, spin, spinType);
		}
	}

	@Override
	protected Symbol getReplacementSymbol(Symbol expandingSymbol, Symbol symbolAtTarget) {
		if (symbolAtTarget.isWild()) {
			if (symbolAtTarget.equals(WILD_1X)) {
				return WILD_2X;
			}
		}
		return WILD_1X;
	}

	public Iterable<MatchPhase> getMatchOrder() {
		//We must be sure to do scatter and bonus matching before line matching
		return MATCH_ORDER;
	}
}


text:
PHP 7.0 Docker image
================

This container image includes PHP 7.0 as a [S2I](https://github.com/openshift/source-to-image) base image for your PHP 7.0 applications.
Users can choose between RHEL and CentOS based builder images.
The RHEL image is available in the [Red Hat Container Catalog](https://access.redhat.com/containers/#/registry.access.redhat.com/rhscl/php-70-rhel7)
as registry.access.redhat.com/rhscl/php-70-rhel7.
The CentOS image is then available on [Docker Hub](https://hub.docker.com/r/centos/php-70-centos7/)
as centos/php-70-centos7.
The resulting image can be run using [Docker](http://docker.io).

Description
-----------

PHP 7.0 available as container is a base platform for
building and running various PHP 7.0 applications and frameworks.
PHP is an HTML-embedded scripting language. PHP attempts to make it easy for developers
to write dynamically generated web pages. PHP also offers built-in database integration
for several commercial and non-commercial database management systems, so writing
a database-enabled webpage with PHP is fairly simple. The most common use of PHP coding
is probably as a replacement for CGI scripts.

This container image includes an npm utility, so users can use it to install JavaScript
modules for their web applications. There is no guarantee for any specific npm or nodejs
version, that is included in the image; those versions can be changed anytime and
the nodejs itself is included just to make the npm work.

Usage
---------------------
To build a simple [php-test-app](https://github.com/sclorg/s2i-php-container/tree/master/7.0/test/test-app) application
using standalone [S2I](https://github.com/openshift/source-to-image) and then run the
resulting image with [Docker](http://docker.io) execute:

*  **For RHEL based image**
    ```
    $ s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=7.0/test/test-app rhscl/php-70-rhel7 php-test-app
    $ docker run -p 8080:8080 php-test-app
    ```

*  **For CentOS based image**
    ```
    $ s2i build https://github.com/sclorg/s2i-php-container.git --context-dir=7.0/test/test-app centos/php-70-centos7 php-test-app
    $ docker run -p 8080:8080 php-test-app
    ```

**Accessing the application:**
```
$ curl 127.0.0.1:8080
```

Environment variables
---------------------

To set these environment variables, you can place them as a key value pair into a `.sti/environment`
file inside your source code repository.

The following environment variables set their equivalent property value in the php.ini file:
* **ERROR_REPORTING**
  * Informs PHP of which errors, warnings and notices you would like it to take action for
  * Default: E_ALL & ~E_NOTICE
* **DISPLAY_ERRORS**
  * Controls whether or not and where PHP will output errors, notices and warnings
  * Default: ON
* **DISPLAY_STARTUP_ERRORS**
  * Cause display errors which occur during PHP's startup sequence to be handled separately from display errors
  * Default: OFF
* **TRACK_ERRORS**
  * Store the last error/warning message in $php_errormsg (boolean)
  * Default: OFF
* **HTML_ERRORS**
  * Link errors to documentation related to the error
  * Default: ON
* **INCLUDE_PATH**
  * Path for PHP source files
  * Default: .:/opt/app-root/src:/opt/rh/rh-php70/root/usr/share/pear
* **PHP_MEMORY_LIMIT**
  * Memory Limit
  * Default: 128M
* **SESSION_NAME**
  * Name of the session
  * Default: PHPSESSID
* **SESSION_HANDLER**
  * Method for saving sessions
  * Default: files
* **SESSION_PATH**
  * Location for session data files
  * Default: /tmp/sessions
* **SESSION_COOKIE_DOMAIN**
  * The domain for which the cookie is valid.
  * Default:
* **SESSION_COOKIE_HTTPONLY**
  * Whether or not to add the httpOnly flag to the cookie
  * Default: 0
* **SESSION_COOKIE_SECURE**
  * Specifies whether cookies should only be sent over secure connections.
  * Default: Off
* **SHORT_OPEN_TAG**
  * Determines whether or not PHP will recognize code between <? and ?> tags
  * Default: OFF
* **DOCUMENTROOT**
  * Path that defines the DocumentRoot for your application (ie. /public)
  * Default: /

The following environment variables set their equivalent property value in the opcache.ini file:
* **OPCACHE_MEMORY_CONSUMPTION**
  * The OPcache shared memory storage size in megabytes
  * Default: 128
* **OPCACHE_REVALIDATE_FREQ**
  * How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.
  * Default: 2

You can also override the entire directory used to load the PHP configuration by setting:
* **PHPRC**
  * Sets the path to the php.ini file
* **PHP_INI_SCAN_DIR**
  * Path to scan for additional ini configuration files

You can override the Apache [MPM prefork](https://httpd.apache.org/docs/2.4/mod/mpm_common.html)
settings to increase the performance for of the PHP application. In case you set
the Cgroup limits in Docker, the image will attempt to automatically set the
optimal values. You can override this at any time by specifying the values
yourself:

* **HTTPD_START_SERVERS**
  * The [StartServers](https://httpd.apache.org/docs/2.4/mod/mpm_common.html#startservers)
    directive sets the number of child server processes created on startup.
  * Default: 8
* **HTTPD_MAX_REQUEST_WORKERS**
  * The [MaxRequestWorkers](https://httpd.apache.org/docs/2.4/mod/mpm_common.html#maxrequestworkers)
    directive sets the limit on the number of simultaneous requests that will be served.
  * `MaxRequestWorkers` was called `MaxClients` before version httpd 2.3.13.
  * Default: 256 (this is automatically tuned by setting Cgroup limits for the container using this formula:
    `TOTAL_MEMORY / 15MB`. The 15MB is average size of a single httpd process.

  You can use a custom composer repository mirror URL to download packages instead of the default 'packagist.org':

    * **COMPOSER_MIRROR**
      * Adds a custom composer repository mirror URL to composer configuration. Note: This only affects packages listed in composer.json.
    * **COMPOSER_INSTALLER**
      * Overrides the default URL for downloading Composer of https://getcomposer.org/installer. Useful in disconnected environments.
    * **COMPOSER_ARGS**
      * Adds extra arguments to the `composer install` command line (for example `--no-dev`).

Source repository layout
------------------------

You do not need to change anything in your existing PHP project's repository.
However, if these files exist they will affect the behavior of the build process:

* **composer.json**

  List of dependencies to be installed with `composer`. The format is documented
  [here](https://getcomposer.org/doc/04-schema.md).

* **.htaccess**

  In case the **DocumentRoot** of the application is nested within the source directory `/opt/app-root/src`,
  users can provide their own Apache **.htaccess** file.  This allows the overriding of Apache's behavior and
  specifies how application requests should be handled. The **.htaccess** file needs to be located at the root
  of the application source.

Hot deploy
---------------------

In order to immediately pick up changes made in your application source code, you need to run your built image with the `OPCACHE_REVALIDATE_FREQ=0` environment variable passed to the [Docker](http://docker.io) `-e` run flag:

```
$ docker run -e OPCACHE_REVALIDATE_FREQ=0 -p 8080:8080 php-app
```

To change your source code in running container, use Docker's [exec](http://docker.io) command:
```
docker exec -it <CONTAINER_ID> /bin/bash
```

After you [Docker exec](http://docker.io) into the running container, your current directory is set
to `/opt/app-root/src`, where the source code is located.

Extending image
---------------
Not only content, but also startup scripts and configuration of the image can
be extended using [source-to-image](https://github.com/openshift/source-to-image).

The structure of the application can look like this:

| Folder name       | Description                |
|-------------------|----------------------------|
| `./httpd-cfg`     | Can contain additional Apache configuration files (`*.conf`)|
| `./httpd-ssl`     | Can contain own SSL certificate (in `certs/` subdirectory) and key (in `private/` subdirectory)|
| `./php-pre-start`| Can contain shell scripts (`*.sh`) that are sourced before `httpd` is started|
| `./php-post-assemble`| Can contain shell scripts (`*.sh`) that are sourced at the end of `assemble` script|
| `./`              | Application source code |

See also
--------
Dockerfile and other sources are available on https://github.com/sclorg/s2i-php-container.
In that repository you also can find another versions of PHP environment Dockerfiles.
Dockerfile for CentOS is called Dockerfile, Dockerfile for RHEL is called Dockerfile.rhel7.

Security Implications
---------------------

-p 8080:8080

     Opens  container  port  8080  and  maps it to the same port on the Host.


text:
        <app-menu></app-menu>

            My files
            Settings

                My files :
                /{{item.label}}/
                Total: {{totalSize() | bytes}}


text:
[mozprocess](https://github.com/mozilla/mozbase/tree/master/mozprocess)
provides python process management via an operating system
and platform transparent interface to Mozilla platforms of interest.
Mozprocess aims to provide the ability
to robustly terminate a process (by timeout or otherwise), along with
any child processes, on Windows, OS X, and Linux. Mozprocess utilizes
and extends `subprocess.Popen` to these ends.

# API

[mozprocess.processhandler:ProcessHandler](https://github.com/mozilla/mozbase/blob/master/mozprocess/mozprocess/processhandler.py)
is the central exposed API for mozprocess.  `ProcessHandler` utilizes
a contained subclass of [subprocess.Popen](http://docs.python.org/library/subprocess.html),
`Process`, which does the brunt of the process management.

## Basic usage

    process = ProcessHandler(['command', '-line', 'arguments'],
                             cwd=None, # working directory for cmd; defaults to None
                             env={},   # environment to use for the process; defaults to os.environ
                             )
    process.run(timeout=60) # seconds
    process.wait()

`ProcessHandler` offers several other properties and methods as part of its API:

    def __init__(self,
                 cmd,
                 args=None,
                 cwd=None,
                 env=None,
                 ignore_children = False,
                 processOutputLine=(),
                 onTimeout=(),
                 onFinish=(),
                 **kwargs):
        """
        cmd = Command to run
        args = array of arguments (defaults to None)
        cwd = working directory for cmd (defaults to None)
        env = environment to use for the process (defaults to os.environ)
        ignore_children = when True, causes system to ignore child processes,
        defaults to False (which tracks child processes)
        processOutputLine = handlers to process the output line
        onTimeout = handlers for timeout event
        kwargs = keyword args to pass directly into Popen

        NOTE: Child processes will be tracked by default. If for any reason
        we are unable to track child processes and ignore_children is set to False,
        then we will fall back to only tracking the root process. The fallback
        will be logged.
        """

    @property
    def timedOut(self):
        """True if the process has timed out."""

    def run(self, timeout=None, outputTimeout=None):
        """
        Starts the process.

        If timeout is not None, the process will be allowed to continue for
        that number of seconds before being killed.

        If outputTimeout is not None, the process will be allowed to continue
        for that number of seconds without producing any output before
        being killed.
        """

    def kill(self):
        """
        Kills the managed process and if you created the process with
        'ignore_children=False' (the default) then it will also
        also kill all child processes spawned by it.
        If you specified 'ignore_children=True' when creating the process,
        only the root process will be killed.

        Note that this does not manage any state, save any output etc,
        it immediately kills the process.
        """

    def readWithTimeout(self, f, timeout):
        """
        Try to read a line of output from the file object |f|.
        |f| must be a pipe, like the |stdout| member of a subprocess.Popen
        object created with stdout=PIPE. If no output
        is received within |timeout| seconds, return a blank line.
        Returns a tuple (line, did_timeout), where |did_timeout| is True
        if the read timed out, and False otherwise.

        Calls a private member because this is a different function based on
        the OS
        """

    def processOutputLine(self, line):
        """Called for each line of output that a process sends to stdout/stderr."""
        for handler in self.processOutputLineHandlers:
            handler(line)

    def onTimeout(self):
        """Called when a process times out."""
        for handler in self.onTimeoutHandlers:
            handler()

    def onFinish(self):
        """Called when a process finishes without a timeout."""
        for handler in self.onFinishHandlers:
            handler()

    def wait(self, timeout=None):
        """
        Waits until all output has been read and the process is
        terminated.

        If timeout is not None, will return after timeout seconds.
        This timeout only causes the wait function to return and
        does not kill the process.
        """

See https://github.com/mozilla/mozbase/blob/master/mozprocess/mozprocess/processhandler.py
for the python implementation.

`ProcessHandler` extends `ProcessHandlerMixin` which by default prints the
output, logs to a file (if specified), and stores the output (if specified, by
default `True`).  `ProcessHandlerMixin`, by default, does none of these things
and has no handlers for `onTimeout`, `processOutput`, or `onFinish`.

`ProcessHandler` may be subclassed to handle process timeouts (by overriding
the `onTimeout()` method), process completion (by overriding
`onFinish()`), and to process the command output (by overriding
`processOutputLine()`).

## Examples

In the most common case, a process_handler is created, then run followed by wait are called:

    proc_handler = ProcessHandler([cmd, args])
    proc_handler.run(outputTimeout=60) # will time out after 60 seconds without output
    proc_handler.wait()

Often, the main thread will do other things:

    proc_handler = ProcessHandler([cmd, args])
    proc_handler.run(timeout=60) # will time out after 60 seconds regardless of output
    do_other_work()

    if proc_handler.proc.poll() is None:
        proc_handler.wait()

By default output is printed to stdout, but anything is possible:

    # this example writes output to both stderr and a file called 'output.log'
    def some_func(line):
        print >> sys.stderr, line

        with open('output.log', 'a') as log:
            log.write('%s\n' % line)

    proc_handler = ProcessHandler([cmd, args], processOutputLine=some_func)
    proc_handler.run()
    proc_handler.wait()

# TODO

- Document improvements over `subprocess.Popen.kill`
- Introduce test the show improvements over `subprocess.Popen.kill`


text:
namespace liquidpp {
namespace filters {

struct Truncate {
  Value operator()(Value &&val, Value&& maxCountVal, Value&& ellipsisVal) const {
    if (!val.isStringViewRepresentable())
      return std::move(val);

    auto sv = *val;

    auto maxCount = static_cast<size_t>(maxCountVal.integralValue());
    auto u8Len = utf8::characterCount(sv);
    if (u8Len <= maxCount)
      return std::move(val);

    std::string ellips = "...";
    if (ellipsisVal)
      ellips = ellipsisVal.toString();
    auto u8EllipsLen = utf8::characterCount(ellips);

    if (u8EllipsLen >= maxCount)
       return ellips;

    return to_string(utf8::substr(sv, 0, maxCount - ellips.size())) + ellips;
  }
};
}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<DexEntry>
  <General>
    <Name>Simipour</Name>
    <SpeciesName>Geyser</SpeciesName>
    <GrowthGroup>MediumFast</GrowthGroup>
    <EggGroup1>Field</EggGroup1>
    <EggGroup2>Undiscovered</EggGroup2>
  </General>
</DexEntry>


text:
namespace Finkit.ManicTime.Server.SampleClient
{
    public static class AuthenticationTypes
    {
        public static readonly string Ntlm = "ntlm";
        public static readonly string Bearer = "bearer";
    }
}


text:
from setuptools import setup
setup(
  name = 'lz_assoc_viewer',
  packages = ['lz_assoc_viewer'], # this must be the same as the name above
  version = '1.0.2',
  description = 'Locuszoom genome wide association viewer plots',
  author = 'Andrew Tomai',
  author_email = 'andrewtomai23@gmail.com',
  license = "MIT",
  include_package_data=True,
  install_requires=['Flask', 'Numpy', 'Scipy'],
  zip_safe=False,
  url = 'https://github.com/atomai/lz_viewer', # use the URL to the github repo
  download_url = 'https://github.com/atomai/lz_viewer/tarball/1.0', # I'll explain this in a second
  keywords = ['LocusZoom ', 'plot ', 'association ', 'genome '], # arbitrary keywords
  classifiers = [],

  entry_points={
        "console_scripts": [
            "lz_assoc_viewer=lz_assoc_viewer.__main__:main"
        ],
    },

)


text:
* Use doxygen style comments
* if, elseif, for, while, etc must have a space before the opening parenthesis
```
	if (myInteger == 2) ...
```
* function calls do not follow the previous rule
```
	int getHealth()
	{
		...
	}
	...
	... getHealth();

	void setHealth(int newHealth)
	{
		...
	}
```
* always place opening braces in a new line, as shown above in the setHealth() function

## File placement
* All class declarations should go into a **header file** named after the class
  * e.g. **Creature.h** for the __Creature__ class declaration
* All class definitions should go into a **.cpp implementation file**
  * e.g. Definitions for Creature class functions should go into **Creature.cpp**

### Other placements
* documentation: docs/
* development tools: tools/
* images: data/images/
* game maps: data/maps/


text:
<?php

class Bringit_RequestLineTest extends BringitTestCase
{
	public function testBasicUsage()
	{
		$string = "GET /test HTTP/1.1\r\n";

		$this->assertEqual(
			Bringit_Header_RequestLine::fromString($string)->__toString(),
			$string
		);
	}
}


text:
**Table of Contents**
- [SDNProbe: A Lightweight Tool for Securing SDN Data Plane with Active Probing](#SDNProbe)
  - [What is SDNProbe?](#what-is-sdnprobe?)
  - [SDNProbe Properties](#sdnprobe-properties)
  - [Prerequisites](#prerequisites)
  - [Installing SDNProbe](#installing-sdnprobe)
  - [Configuring SDNProbe](#configuring-sdnprobe)
    - [Topology File](#topology-file)
    - [Detection Threshold](#detection-threshold)
    - [Test Packet Rate](#test-packet-rate)
    - [Attack Simulation](#attack-simulation)
    - [Monitor Mode](#monitor-mode)
  - [Running SDNProbe](#running-sdnprobe)
    - [STEP 1. Show the configure file](#step-1-show-the-configure-file)
    - [STEP 2. Generate test packets from topology file](#step-2-generate-test-packets-from-topology-file)
    - [STEP 3. Generate topology graph for the controller as input](#step-3-generate-topology-graph-for-the-controller-as-input)
    - [STEP 4. Start probing](#step-4-start-probing)
    - [Mininet](#mininet)
  - [Contributors (will be updated later)](#contributors)

## What is SDNProbe?
**SDNProbe** is a lightweight SDN data-plane troubleshooting tool that sends probe packets to  efficiently and accurately pinpoint misbehaving or malfunctioning switches, despite strong adversaries that are aware of the troubleshooting operations and attempting to evade detection. The controller sends test packets to validate whether flow entries are correctly executed.

  + **Test packet generation:** This component generates a minimum set of test packets that guarantees to traverses all flow entries on the network.
  + **Fault localization:** This component requests the terminating switches to duplicate the flow table for appropriate handling of the test packets. Then the controller inserts to the test packet header an authentication code to ensure that malicious switches do not alter the packet while traveling. Hence, it can verify the correctness of the data plane using the returned test packets from switches.

## SDNProbe Properties
  + **Accurate fault localization** - successfully identify the faulty or malicious switches.
  + **Fast detection** - identify the faulty of malicious switches rapidly
  + **Low bandwidth overhead** - generating minimum set of test packets by applying a provable algorithm
  + **No additional overhead on forwarding packets** - requires no cryptographic operations on switches

## Prerequisites
For conducting SDNProbe which is implemented by Python and C++ on *Ryu* controller, the following environment or libraries are required:

  + SDN controller
    + [Ryu](https://osrg.github.io/ryu/) 3.25 with [OpenFlow](https://www.opennetworking.org/sdn-resources/openflow) 1.3
  + Python v2.7.6
    + [NumPy](http://www.numpy.org/)
    + [graph-tool](https://graph-tool.skewed.de/)
    + [blessings](https://github.com/erikrose/blessings)
  + C++
    + [boost](http://www.boost.org/)
    + [OpenMP](http://www.openmp.org/)
  + [Mininet](http://mininet.org/) (optional, can more easily test SDNProbe)

## Installing SDNProbe

SDNProbe can be easily installed and conducted, the following are the steps for the installation:

  + STEP 1. Get the source code of SDNProbe
```
$ git clone https://github.com/ymktw/SDNProbe.git
```

  + STEP 2. Install SDNProbe dependencies
```
cd <SDNProbe>/requirement
$ ./requirement.sh
```

## Configuring SDNProbe

This is the default setting of configure file:

```
$ cat <SDNProbe>/config/config
TOPOLOGY_FILE=topology/example_topology
DETECTION_THRESHOLD=3
TEST_PACKET_RATE(K/bytes)=250
SIMULATE_ATTACK=0
MONITOR=True
```

Following are the details of each setting parameters:

#### Topology File
We provide a topology file as example: `<SDNProbe>/topology/example_topology` which contains the topology and flow entries on the network.

```
$ head <SDNProbe>/topology/example_topology
5
0 1 18 73 78
1 0 18
18 0 1
73 0
78 0
0 32
1 0 178.248.146.0/24 1 1000 30000
4 0 178.248.147.0/24 18 1000 29999
330561 0 143.196.35.0/24 18 78 23302
```

 + First line is the number of switch **N**.
 + The next **N** lines are the neighbor of switches.
   +  First number is the ID of switch.
   +  Following are the IDs of neighbor's switch.
 + Then, descripts the flow entries of each switch.
   + First line is the ID of switch and the number of flow entries **R** on this switch.
   + The next **R** lines are the flow entries, and the format is (rule ID, switch ID, header fields, inport, outport, priority).

If you want to use SDNProbe on real SDN environment, you should provide the topology information.

#### Detection Threshold
We set a threshold to decide a switch is faulty or just packet drop by congesting. If the frequency of the faulty action is detected on a switch that exceed the threshold, then SDNProbe would consider the switch is faulty or malicious. Higher detection threshold can reduce false positive but the detection time may be longer, and vice versa.

#### Test Packet Rate
You can decide the sending rate of test packets from the controller according to the environment of the network.

#### Attack Simulation
We also implement the simple attack to test the fault localization of SDNProbe. The value can be set as the number of broken rules which means that the rule are not installed correctly on the switches from the topology file.

#### Monitor Mode
The value is *True* means that SDNProbe will continue to detect even it find faulty switches. Otherwise, SDNProbe will stop detecting when detecting a fault.

## Running SDNProbe

```
$ cd <SDNProbe>
$ ./SDNProbe.py
```

![](fig/SDNProbe_menu.png)

#### STEP 1. Show the configure file
Step 1 shows and checks the correctness of configure file.
![](fig/SDNProbe_config.png)

#### STEP 2. Generate test packets from topology file

Step 2 compiles the part of C++ implementation, conducts the test packet generation and shows the number of test packets

![](fig/SDNProbe_testpackets.png)

#### STEP 3. Generate topology graph for the controller as input

Step 3 generates the input of the controller according to the topology and the test packets

![](fig/SDNProbe_attach.png)

#### STEP 4. Start probing

Step 4 starts SDNProbe and waits for the OpenFlow switches to connect. After the switches connecting to the controller, SDNProbe would start to send test packets and detect the faulty or malicious switches.

![](fig/SDNProbe_start.png)

#### Mininet
For testing the functionalities of SDNProbe, we also provide a Python script which can run the mininet and the input topology is the same as the topology file.

```
$ cd <SDNProbe>
$ sudo ./mininet_topology.py
```

![](fig/mininet.png)

Then, we simulate that one rule is not installed correctly on the switch and following is the result of the detection of SDNProbe.

![](fig/SDNProbe_detect.png)


text:
FactoryGirl.define do
	factory :service_thema_v1_consulta_nfs_por_rps, class:  BrNfe::Service::Thema::V1::ConsultaNfsPorRps do
		rps       { FactoryGirl.build(:br_nfe_rps) }
		emitente  { FactoryGirl.build(:service_emitente) }
	end
end


text:
/*======================================================
************   App Init   ************
======================================================*/
app.init = function () {
    // Init Plugins
    if (app.initPlugins) app.initPlugins();

    // Init Device
    if (app.getDeviceInfo) app.getDeviceInfo();

    // Init Click events
    if (app.initFastClicks && app.params.fastClicks) app.initFastClicks();
    if (app.initClickEvents) app.initClickEvents();

    // Init each page callbacks
    $('.page').each(function () {
        var pageContainer = $(this);
        var viewContainer = pageContainer.parents('.' + app.params.viewClass);
        if (viewContainer.length === 0) return;
        var view = viewContainer[0].f7View || false;
        var url = view && view.url ? view.url : false;
        if (viewContainer) {
            viewContainer.attr('data-page', pageContainer.attr('data-page') || undefined);
        }
        app.pageInitCallback(view, this, url, 'center');
    });

    // Init resize events
    if (app.initResize) app.initResize();

    // Init push state
    if (app.initPushState && app.params.pushState) app.initPushState();

    // Init Live Swipeouts events
    if (app.initSwipeout && app.params.swipeout) app.initSwipeout();

    // Init Live Sortable events
    if (app.initSortable && app.params.sortable) app.initSortable();

    // Init Live Swipe Panels
    if (app.initSwipePanels && app.params.swipePanel) app.initSwipePanels();

    // App Init callback
    if (app.params.onAppInit) app.params.onAppInit();

    // Plugin app init hook
    app.pluginHook('appInit');
};
if (app.params.init) app.init();


text:
using System;
using System.Windows.Input;

namespace Mordo.Utils
{
    public class RelayCommand : ICommand
    {
        private readonly Action<object> _execute;
        private readonly Func<object, bool> _canExecute;

        public event EventHandler CanExecuteChanged
        {
            add { CommandManager.RequerySuggested += value; }
            remove { CommandManager.RequerySuggested -= value; }
        }

        public RelayCommand(Action<object> execute, Func<object, bool> canExecute = null)
        {
            this._execute = execute;
            this._canExecute = canExecute;
        }

        public bool CanExecute(object parameter)
        {
            return this._canExecute == null || this._canExecute(parameter);
        }

        public void Execute(object parameter)
        {
            this._execute(parameter);
        }
    }
}


text:
using System.Collections.Generic;
using System.Web.Mvc;
using ExpressiveAnnotations.Attributes;

namespace ExpressiveAnnotations.MvcUnobtrusive.Validators
{
    /// <summary>
    ///     Model validator for <see cref="RequiredIfAttribute" />.
    /// </summary>
    public class RequiredIfValidator : ExpressiveValidator<RequiredIfAttribute>
    {
        /// <summary>
        ///     Initializes a new instance of the <see cref="RequiredIfValidator" /> class.
        /// </summary>
        /// <param name="metadata">The model metadata instance.</param>
        /// <param name="context">The controller context instance.</param>
        /// <param name="attribute">The expressive requirement attribute instance.</param>
        /// <exception cref="System.ComponentModel.DataAnnotations.ValidationException"></exception>
        public RequiredIfValidator(ModelMetadata metadata, ControllerContext context, RequiredIfAttribute attribute)
            : base(metadata, context, attribute)
        {
            AllowEmpty = attribute.AllowEmptyStrings;
        }

        private bool AllowEmpty { get; set; }

        /// <summary>
        ///     Retrieves a collection of client validation rules (which are next sent to browsers).
        /// </summary>
        /// <returns>
        ///     A collection of client validation rules.
        /// </returns>
        public override IEnumerable<ModelClientValidationRule> GetClientValidationRules()
        {
            var rule = GetBasicRule("requiredif");
            rule.ValidationParameters.Add("allowempty", AllowEmpty.ToJson());
            yield return rule;
        }
    }
}


text:
/**
 * A server collection collection_set_view_historical_server handler.
 */
define([ 'framework/request/base_request_handler',
		 '../collection_set_view_historical_server_request',
		 'framework/core/deferred/deferred',
		 './collection_set_view_server_handler',
		 'underscore',
		 'moment' ],
function(BaseRequestHandler,
		 CollectionSetViewHistoricalServerRequest,
		 Deferred,
		 CollectionSetViewServerHandler,
		 _,
		 Moment)
{
	var CollectionSetViewHistoricalServerHandler = BaseRequestHandler.create(CollectionSetViewHistoricalServerRequest,
			[ 'setRepository', 'setUserRepository', 'setUserCardRepository', 'setCardPriceRepository' ]);

	// @override
	CollectionSetViewHistoricalServerHandler.prototype.execute = function(requestContext, request, response)
	{
		var _this = this;

		return this._remotePromise(requestContext, this._setUserRepository.getById(request.getId())).then(function(setUser)
		{
			// Check if the set exists and the user owns it.
			if (!setUser || requestContext.getUserId() != setUser.getUserId())
			{
				requestContext.setErrorMessage('Cannot find the selected set, stop trying to cheat the system.');
				return Deferred.rejectedPromise(requestContext);
			}

			response.setSetUser(setUser);

			var lastWeek = new Date();
			lastWeek.setHours(0, 0, 0, 0);
			lastWeek.setDate(lastWeek.getDate() - 7);

			var	setPromise = _this._remotePromise(requestContext, _this._setRepository.getById(setUser.getFocusSetId())),
				setUserCardPromise = _this._remotePromise(requestContext, _this._setUserCardRepository.getBySetUserId(setUser.getId())),
				setCardPricesPromise = _this._remotePromise(requestContext, _this._setCardPriceRepository.getAllBySetIdAndDateAcquiredStart(setUser.getFocusSetId(), lastWeek));

			return Deferred.when(setPromise, setUserCardPromise, setCardPricesPromise).then(function(set, setUserCards, setCardPrices)
			{
				response.setSet(set);
				response.setCards(setUserCards);

				// Copied and modified from collection_set_sync_prices_to_cards_module.
				var today = new Date(),
					cardMap = {}; // setCardId to setUserCard object.

				_.each(setUserCards, function(setUserCard)
				{
					cardMap['x' + setUserCard.setCardId] = setUserCard;
				});

				// Append the price data to the cards.
				today = Moment([ today.getFullYear(), today.getMonth(), today.getDate() ]);
				_.each(setCardPrices, function(setCardPrice)
				{
					var card = cardMap['x' + setCardPrice.setCardId];
					card.prices = card.prices || {};

					var daysBack = new Date(setCardPrice.priceDateAcquired),
						cardPrices = card.prices[setCardPrice.source.toLowerCase()] = card.prices[setCardPrice.source.toLowerCase()] || {};

					daysBack = Moment([ daysBack.getFullYear(), daysBack.getMonth(), daysBack.getDate() ]);
					daysBack = today.diff(daysBack, 'days');
					cardPrices['daysBack' + daysBack] = setCardPrice.price;
				});

				return Deferred.resolvedPromise(requestContext);
			});
		});
	};

	return CollectionSetViewHistoricalServerHandler;
});


text:
package org.xbib.elasticsearch.index.mapper.langdetect;

import org.junit.Assert;
import org.junit.Test;
import org.xbib.elasticsearch.common.langdetect.Language;

public class LanguageTest extends Assert {

    @Test
    public final void testLanguage() {
        Language lang = new Language(null, 0);
        assertEquals(lang.getLanguage(), null);
        assertEquals(lang.getProbability(), 0.0, 0.0001);
        assertEquals(lang.getLanguage(), null);

        Language lang2 = new Language("en", 1.0);
        assertEquals(lang2.getLanguage(), "en");
        assertEquals(lang2.getProbability(), 1.0, 0.0001);
    }
}


text:
{{ 'no_map_data' | transl8 }}

 0">

                        {{result.properties.names.prefName.name}}
                        {{result.properties.similarity.normalizedlevenshtein}}
                        {{result.properties['@id']}}


text:
var scan = require('./context/scan');
var curry = require('./lib/fn').curry;

exports.run = curry(scanDocument);
exports.runAt = curry(scan);

function scanDocument(builder, context) {
	return scan(builder, document.body, context);
}


text:
/*
 * Inserted Event.
 *
 * Uses efficient CSS3 Animation to fire insertion events otherwise falls back
 * to DOMNodeInserted.
 *
 * Based on technique described here:
 * http://www.backalleycoder.com/2012/04/25/i-want-a-damnodeinserted/
 */
var VENDOR = ['', 'WebKit', 'Moz', 'O', 'MS'].filter(function(prefix) {
        return Y.config.win[prefix + 'CSSKeyframesRule'];
    })[0],
    Inserted,
    DOMInserted;

// CSS3 Animation Support
Inserted = {
    NAME: 'InsertedNode', // Animation name
    PREFIX: VENDOR ? '-' + VENDOR.toLowerCase() + '-' : VENDOR,
    ANIMATION_START_VENDORS: {
        WebKit: 'webkitAnimationStart',
        O: 'oAnimationStart'
    },
    ANIMATION_START: 'animationstart',
    STYLESHEET: null,

    _init: function() {
        Inserted.ANIMATION_START = Inserted.ANIMATION_START_VENDORS[VENDOR] || Inserted.ANIMATION_START;
        Y.Node.DOM_EVENTS[Inserted.ANIMATION_START] = 1;
        Inserted.STYLESHEET = Y.Node.create('<style type="text/css">@' + Inserted.PREFIX + 'keyframes ' + Inserted.NAME + ' {' +
            'from {clip: rect(1px, auto, auto, auto);} to {clip: rect(0px, auto, auto, auto);}' +
        '}</style>');
        Y.one('head').append(Inserted.STYLESHEET);
    },

    processArgs: function (args, isDelegate) {
        return args.splice(2, 1)[0];
    },

    on: function(node, sub, notifier, filter) {
        var method = filter ? 'delegate' : 'on',
            rule = sub._extra + '{' + Inserted.PREFIX + 'animation-duration: 0.0001s; ' + Inserted.PREFIX + 'animation-name: ' + Inserted.NAME + ' !important;}';

        sub._handle = node[method](Inserted.ANIMATION_START, Y.bind(function(e) {
            if (e._event.animationName === Inserted.NAME) {
                notifier.fire({target: e.target, selector: sub._extra});
            }
        }, this), filter);

        Inserted.STYLESHEET.get('sheet').insertRule(rule, 0);
    },

    delegate: function() {
        this.on.apply(this, arguments);
    },

    detach: function(node, sub, notifier) {
        sub._handle.detach();
    },

    detachDelegate: function() {
        this.detach.apply(this, arguments);
    }
};

// DOMNodeInserted fallback
DOMInserted = {
    SELECTORS: {},

    _init: function() {
        Y.Node.DOM_EVENTS.DOMNodeInserted = 1;
    },

    processArgs: function (args, isDelegate) {
        return args.splice(2, 1)[0];
    },

    on: function(node, sub, notifier, filter) {
        var method = filter ? 'delegate' : 'on',
            doc_node = (node.get('document') || node); // Y.all window bug

        // Initialize existing elements on page only once
        if (!DOMInserted.SELECTORS[sub._extra]) {
            DOMInserted.SELECTORS[sub._extra] = true;
            setTimeout(function() {
                doc_node.all(sub._extra).each(function(n) {
                    notifier.fire({target: n});
                });
            }, 0);
        }

        // Delegates don't seem to work for DOMNodeInserted :(
        sub._handle = node[method]('DOMNodeInserted', Y.bind(function(e) {
            if (Y.Selector.test(e.target.getDOMNode(), sub._extra, doc_node.getDOMNode())) {
                notifier.fire({target: e.target, selector: sub._extra});
            }
        }, this), filter);
    },

    delegate: function() {
        this.on.apply(this, arguments);
    },

    detach: function(node, sub, notifier) {
        sub._handle.detach();
    },

    detachDelegate: function() {
        this.detach.apply(this, arguments);
    }
};

// Fallback if CSS3 Animation is not supported
Y.Event.define('inserted', VENDOR ? Inserted : DOMInserted);


text:
layout: post #
title: 316 Felicitat # Generat automàticament
date: 2019-04-08 # Data
description:  # Argument
keywords:  # Paraules clau
coments:  # Comentaris
---

La felicitat de la teua vida

depén de la calitat

dels teus pensamients

-- Marco Aurelio


text:
package com.vertigrated.fluent;

import javax.annotation.Nonnull;

public interface Coordinates<T>
{
    @Nonnull
    public T coordinates(@Nonnull com.vertigrated.sitd.representation.Coordinates coordinates);
}


text:
import steps from './steps';
import ENV from '../../../config/environment';

// step definitions that are shared between features should be moved to the
// tests/acceptance/steps/steps.js file

export default function(assert) {
  return steps(assert)
  .given('this scenario will not be run', function() {
    assert.ok(false, this.step);
  })
  .given('this scenario does not have an annotation', function() {
    assert.ok(true, this.step);
  })
  .given('this scenario has annotation @$annotation', function() {
    assert.ok(true, this.step);
  })
  .given('the config specifies the @acceptance annotation', function() {
    assert.ok(true, this.step);
  })
  .when('I look at the test results', function() {
    assert.ok(true, this.step);
  })
  .then('the assert in the given step should not be shown as a failure', function() {
    // if ENV.annotations has acceptance, this should fail
    assert.ok(!hasAnnotation('acceptance'), this.step);
  })
  .then('the assert in the given step should be shown as a success', function() {
    assert.ok(true, this.step);
  });
}

function hasAnnotation(annotation) {
  if (ENV.annotations && ENV.annotations.length >= 0) {
    return ENV.annotations.indexOf(annotation) >= 0;
  } else {
    return false;
  }
}


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 Exam;

import java.util.ArrayList;

/**
 *
 * @author kosta
 */
public class Member_Join extends javax.swing.JFrame {
    private boolean isSelceted;
    private ArrayList<Member> list;
    /**
     * Creates new form Member_Join
     */
    public Member_Join() {
        initComponents();
        list = new ArrayList<Member>();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        idv = new javax.swing.JTextField();
        pwdv = new javax.swing.JTextField();
        namev = new javax.swing.JTextField();
        arg1 = new javax.swing.JRadioButton();
        arg2 = new javax.swing.JRadioButton();
        btnJoin = new javax.swing.JButton();
        btnList = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        resultTextArea = new javax.swing.JTextArea();
        jLabel4 = new javax.swing.JLabel();
        agev = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setForeground(new java.awt.Color(204, 204, 255));

        jLabel1.setText("ID");

        jLabel2.setText("PWD");

        jLabel3.setText("NAME");

        idv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                idvActionPerformed(evt);
            }
        });

        pwdv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pwdvActionPerformed(evt);
            }
        });

        namev.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                namevActionPerformed(evt);
            }
        });

        buttonGroup1.add(arg1);
        arg1.setText("동의");
        arg1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                arg1ActionPerformed(evt);
            }
        });

        buttonGroup1.add(arg2);
        arg2.setText("비동의");
        arg2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                arg2ActionPerformed(evt);
            }
        });

        btnJoin.setText("JOIN");
        btnJoin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnJoinActionPerformed(evt);
            }
        });

        btnList.setText("LIST");
        btnList.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnListActionPerformed(evt);
            }
        });

        resultTextArea.setColumns(20);
        resultTextArea.setRows(5);
        jScrollPane1.setViewportView(resultTextArea);

        jLabel4.setText("AGE");

        agev.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                agevActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3)
                            .addComponent(jLabel2)
                            .addComponent(jLabel1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(4, 4, 4)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 307, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(arg2)
                                    .addComponent(arg1)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(agev, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE)
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(namev, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE)
                                        .addComponent(pwdv)
                                        .addComponent(idv)))
                                .addGap(104, 104, 104)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(btnJoin, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                                    .addComponent(btnList, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))))
                .addContainerGap(216, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(idv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(pwdv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(namev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(btnJoin, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnList, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(agev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(35, 35, 35)
                .addComponent(arg1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(arg2)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void namevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_namevActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_namevActionPerformed

    private void pwdvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pwdvActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_pwdvActionPerformed

    private void idvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_idvActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_idvActionPerformed

    private void arg2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_arg2ActionPerformed
        // TODO add your handling code here:
        isSelceted= false;
    }//GEN-LAST:event_arg2ActionPerformed

    private void arg1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_arg1ActionPerformed
        // TODO add your handling code here:
        isSelceted= true;
    }//GEN-LAST:event_arg1ActionPerformed

    private void btnJoinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnJoinActionPerformed
        // TODO add your handling code here:
        // 가입 처리
        Member m = new Member();
        String id=idv.getText();
        String pwd=pwdv.getText();
        String name=namev.getText();
        int age = Integer.parseInt(agev.getText());
        boolean arg;
        if (arg1.isSelected()) {
            arg = true;
            isSelceted =true;
        } else {
            arg = false;
            isSelceted =false;
        }
        // Vo 객체에 값 주입
        m.setId(id);
        m.setName(name);
        m.setAgree(arg);
        m.setPwd(pwd);
        m.setAge(age);
        // ArrayList 에 Member 저장
        if (isSelceted) {
        list.add(m);
        resultTextArea.setText("회원가입되었습니다!");
        } else {
        resultTextArea.setText("동의 버튼을 누루세요!");
        }
    }//GEN-LAST:event_btnJoinActionPerformed

    private void btnListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnListActionPerformed
        // TODO add your handling code here:
        String res = "";
        for (Member list1 : list) {
            res +="\nID : "+list1.getId()+"\n";
            res +="PWD :"+list1.getPwd()+"\n";
            res +="NAME : "+list1.getName()+"\n";
            res +="AGE : "+list1.getAge()+"\n";
            res +="AGREE : " +list1.isAgree()+"\n";
        }
        resultTextArea.append(res);
    }//GEN-LAST:event_btnListActionPerformed

    private void agevActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_agevActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_agevActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Member_Join.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Member_Join.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Member_Join.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Member_Join.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Member_Join().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField agev;
    private javax.swing.JRadioButton arg1;
    private javax.swing.JRadioButton arg2;
    private javax.swing.JButton btnJoin;
    private javax.swing.JButton btnList;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JTextField idv;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField namev;
    private javax.swing.JTextField pwdv;
    private javax.swing.JTextArea resultTextArea;
    // End of variables declaration//GEN-END:variables
}


text:
#include <tins/config.h>

#if !defined(TINS_RADIOTAP_PARSER_H) && defined(TINS_HAVE_DOT11)
#define TINS_RADIOTAP_PARSER_H

#include <stdint.h>
#include <tins/macros.h>
#include <tins/radiotap.h>
#include <tins/pdu_option.h>

namespace Tins {
namespace Utils {

struct RadioTapFlags;

/**
 * \brief Allows parsing RadioTap options
 *
 * RadioTap is a somehow tricky protocol to be parsed, as it has ordered flags,
 * alignment between options, etc. This class allows parsing options in a RadioTap
 * header without much trouble.
 */
class RadioTapParser {
public:
    /**
     * Represents the RadioTap namespace currently being parsed
     */
    enum NamespaceType {
        RADIOTAP_NS,
        VENDOR_NS,
        UNKNOWN_NS
    };

    /**
     * Represents the size and alignment of each RadioTap field
     */
    struct FieldMetadata {
        uint32_t size;
        uint32_t alignment;
    };

    /**
     * Contains metadata for each data field in RadioTap
     */
    static const FieldMetadata RADIOTAP_METADATA[];

    /**
     * Represents the maximum bit we have information for
     */
    static const uint32_t MAX_RADIOTAP_FIELD;

    /**
     * \brief Constructs a RadioTap parser around a payload
     *
     * Note that the payload is not copied, hence it must be kept in
     * scope while the parser is still being used.
     *
     * The buffer should contain an entire RadioTap header, with optionally
     * extra data at the end, which will be ignored.
     *
     * \param buffer The buffer to be parsed
     */
    RadioTapParser(const std::vector<uint8_t>& buffer);

    /**
     * Gets the current namespace being parsed
     */
    NamespaceType current_namespace() const;

    /**
     * \brief Gets a 0 index based namespace index.
     *
     * This index will be incremented every time a new namespace is found
     */
    uint32_t current_namespace_index() const;

    /**
     * Gets the current field being parsed
     */
    RadioTap::PresentFlags current_field() const;

    /**
     * Gets the option the parsed is currently pointing at
     */
    RadioTap::option current_option();

    /**
     * \brief Gets the pointer at which the current option is located
     *
     * A past-the-end pointer may be returned in case of malformed input or
     * end of data. Its validity must be checked (e.g. using
     * \ref RadioTapParser.has_fields) before dereference.
     */
    const uint8_t* current_option_ptr() const;

    /**
     * \brief Advances to the next option
     *
     * If there's a namespace change, this will handle that as well.
     *
     * \return true iff advancing was successfull (e.g. false if we reached
     * the end of the header)
     */
    bool advance_field();

    /**
     * \brief Advances to the next namespace
     *
     * \return true iff advancing was successfull (e.g. false if we're currently
     * in the last namespace)
     */
    bool advance_namespace();

    /**
     * Gets the current namespace's flags
     */
    RadioTap::PresentFlags namespace_flags() const;

    /**
     * \brief Skips all fields until the provided one is found
     *
     * This will effectively move the current option pointer until the field is
     * found or the end of the options list is reached
     *
     * \return true iff the field was foudn
     */
    bool skip_to_field(RadioTap::PresentFlags flag);

    /**
     * Indicates whether this RadioTap options buffer contains any fields set
     */
    bool has_fields() const;

    /**
     * \brief Indicates whether the provided field is set.
     *
     * This will look the field up in all flag sets and not just the current one
     */
    bool has_field(RadioTap::PresentFlags flag) const;
private:
    const uint8_t* find_options_start() const;
    bool advance_to_first_field();
    bool advance_to_next_field();
    bool skip_current_field();
    bool advance_to_next_namespace();
    const RadioTapFlags* get_flags_ptr() const;
    void load_current_flags();
    bool is_field_set(uint32_t bit, const RadioTapFlags* flags) const;

    const uint8_t* start_;
    const uint8_t* end_;
    const uint8_t* current_ptr_;
    uint64_t current_bit_;
    uint32_t current_flags_;
    uint32_t namespace_index_;
    NamespaceType current_namespace_;
};

} // Utils
} // Tins

#endif // TINS_RADIOTAP_PARSER_H