text:
package logica;
// Generated 02-jun-2014 20:27:46 by Hibernate Tools 4.0.0

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * Cita generated by hbm2java
 * Representa una cita que una persona aparta en una registraduria, en una fecha validad  y en una hora que no estuviese reservada.
 */
@Entity
@Table(name="cita"
,catalog="registraduria"
, uniqueConstraints = @UniqueConstraint(columnNames={"fecha_cita", "id_hora", "id_registraduria"})
		)
public class Cita  implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 8128868385076720237L;
	private int idCita;
	private Persona persona;
	private Registraduria registraduria;
	private Hora hora;
	private Date fechaCita;

	public Cita(){}

	public Cita(Registraduria registraduria, Hora hora, Date fechaCita) {
		this.registraduria = registraduria;
		this.hora = hora;
		this.fechaCita = fechaCita;
	}

	public Cita(Persona persona, Registraduria registraduria, Hora hora, Date fechaCita) {
		this.persona = persona;
		this.registraduria = registraduria;
		this.hora = hora;
		this.fechaCita = fechaCita;
	}

	@Id @GeneratedValue(strategy=IDENTITY)
	@Column(name="id_cita", unique=true, nullable=false)
	public int getIdCita() {
		return this.idCita;
	}

	public void setIdCita(int idCita) {
		this.idCita = idCita;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="numero_documento")
	public Persona getPersona() {
		return this.persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id_registraduria", nullable=false)
	public Registraduria getRegistraduria() {
		return this.registraduria;
	}

	public void setRegistraduria(Registraduria registraduria) {
		this.registraduria = registraduria;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id_hora", nullable=false)
	public Hora getHora() {
		return this.hora;
	}

	public void setHora(Hora hora) {
		this.hora = hora;
	}

	@Temporal(TemporalType.DATE)
	@Column(name="fecha_cita", nullable=false, length=10)
	public Date getFechaCita() {
		return this.fechaCita;
	}

	public void setFechaCita(Date fechaCita) {
		this.fechaCita = fechaCita;
	}

	@Override
	public String toString() {
		return hora.getValorHora();
	}
}


text:
   <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet"></link>

	click for popover

	<button id="cambiarPopOver1" type="button">Cambiar Popover</button>

	<button id="cambiarPopOver2" type="button">Cambiar Popover</button>

redpajama_set_name: RedPajamaGithub


text:
module SuspendersTestHelpers
  APP_NAME = 'dummy_app'.freeze

  def remove_project_directory
    FileUtils.rm_rf(project_path)
  end

  def create_tmp_directory
    FileUtils.mkdir_p(tmp_path)
  end

  def run_suspenders(arguments = nil)
    Dir.chdir(tmp_path) do
      Bundler.with_clean_env do
        add_fakes_to_path
        `
          #{suspenders_bin} #{APP_NAME} #{arguments}
        `
      end
    end
  end

  def drop_dummy_database
    if File.exist?(project_path)
      Dir.chdir(project_path) do
        Bundler.with_clean_env do
          `rake db:drop`
        end
      end
    end
  end

  def add_fakes_to_path
    ENV['PATH'] = "#{support_bin}:#{ENV['PATH']}"
  end

  def project_path
    @project_path ||= Pathname.new("#{tmp_path}/#{APP_NAME}")
  end

  private

    def tmp_path
      @tmp_path ||= Pathname.new("#{root_path}/tmp")
    end

    def suspenders_bin
      File.join(root_path, 'bin', 'suspenders')
    end

    def support_bin
      File.join(root_path, 'spec', 'fakes', 'bin')
    end

    def root_path
      File.expand_path('../../../', __FILE__)
    end
end


text:
#include "blis.h"

#define FUNCPTR_T scalv_fp

typedef void (*FUNCPTR_T)(
                           conj_t conjbeta,
                           dim_t  n,
                           void*  beta,
                           void*  x, inc_t incx
                         );

// If some mixed datatype functions will not be compiled, we initialize
// the corresponding elements of the function array to NULL.
#ifdef BLIS_ENABLE_MIXED_PRECISION_SUPPORT
static FUNCPTR_T GENARRAY2_ALL(ftypes,scalv_kernel_void);
#else
#ifdef BLIS_ENABLE_MIXED_DOMAIN_SUPPORT
static FUNCPTR_T GENARRAY2_EXT(ftypes,scalv_kernel_void);
#else
static FUNCPTR_T GENARRAY2_MIN(ftypes,scalv_kernel_void);
#endif
#endif

void bli_scalv_kernel( obj_t*  beta,
                       obj_t*  x )
{
	num_t     dt_x      = bli_obj_datatype( *x );

	conj_t    conjbeta  = bli_obj_conj_status( *beta );

	dim_t     n         = bli_obj_vector_dim( *x );

	inc_t     inc_x     = bli_obj_vector_inc( *x );
	void*     buf_x     = bli_obj_buffer_at_off( *x );

	num_t     dt_beta;
	void*     buf_beta;

	FUNCPTR_T f;

	// If beta is a scalar constant, use dt_x to extract the address of the
	// corresponding constant value; otherwise, use the datatype encoded
	// within the beta object and extract the buffer at the beta offset.
	bli_set_scalar_dt_buffer( beta, dt_x, dt_beta, buf_beta );

	// Index into the type combination array to extract the correct
	// function pointer.
	f = ftypes[dt_beta][dt_x];

	// Invoke the function.
	f( conjbeta,
	   n,
	   buf_beta,
	   buf_x, inc_x );
}

#undef  GENTFUNC2
#define GENTFUNC2( ctype_b, ctype_x, chb, chx, varname, kername ) \
\
void PASTEMAC2(chb,chx,varname)( \
                                 conj_t conjbeta, \
                                 dim_t  n, \
                                 void*  beta, \
                                 void*  x, inc_t incx \
                               ) \
{ \
	PASTEMAC2(chb,chx,kername)( conjbeta, \
	                            n, \
	                            beta, \
	                            x, incx ); \
}

// Define the basic set of functions unconditionally, and then also some
// mixed datatype functions if requested.
INSERT_GENTFUNC2_BASIC( scalv_kernel_void, SCALV_KERNEL )

#ifdef BLIS_ENABLE_MIXED_DOMAIN_SUPPORT
INSERT_GENTFUNC2_MIX_D( scalv_kernel_void, SCALV_KERNEL )
#endif

#ifdef BLIS_ENABLE_MIXED_PRECISION_SUPPORT
INSERT_GENTFUNC2_MIX_P( scalv_kernel_void, SCALV_KERNEL )
#endif


text: Pesquisa Lucros Cessantes


text:
Adds scoped accessors to ruby. You can create writers, readers and
accessors in either private or protected scope. Does not affect the
scope of code that comes afterward. You can extend a single class (and
its subclasses) with scoped accessors, or you can extend ruby's entire
class hierarchy.

## Installation

Add this line to your application's Gemfile:

    gem 'scoped_attr_accessor'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install scoped_attr_accessor

## Usage

You can add scoped accessors to a single class (and its children) by
directly extending `ScopedAttrAccessor` in your class:

    require 'scoped_attr_accessor'

    class Primate
      extend ScopedAttrAccessor
      private_attr_accessor :some_weird_primate_only_counter
      protected_attr_reader :some_weird_counter
    end

    class Monkey < Primate
      # Monkey can define its own scoped accessors because Primate
      # extended the module.
      private_attr_reader :get_weird_monkey_only_stuff_here
      private_attr_writer :put_weird_monkey_only_stuff_here

      # use our inherited, protected reader
      def sufficiently_weird?
        some_weird_counter > 42
      end
    end

Alternately, if you require `scoped_attr_accessor/include`, ruby's
`Object` class will be extended with `ScopedAttrAccessor` making all
classes able to have protected and private accessors.

    require 'scoped_attr_accessor/include'

    class Primate
      private_attr_accessor :private_primate_counter
    end

## Avoid Dependency Infection

The '/include' form of this gem is a ruby-wide monkeypatch. Please
remember that it's perfectly fine to use it this way in your own
applications, but quite rude to use it this way in a library. People
who use your library would then be infected by this monkeypatch as
well. Not cool.

If you use scoped accessors in a gem or library of your own, please
consider using the non-include version, or, in Ruby 2.0, use
refinements to confine the include patch to your library.

## Ruby Versions

Tested to work on Ruby 1.9.3 and 2.0.

## Contributing

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Write tests for your feature or bug fix
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request

## Why Oh Why Does This Exist?!?

At the time of this writing (April 2013), the ruby community in
general is somewhat divided on the meaning of the concept of privacy
in ruby. For some, especially those who come from Java, C++, VB, or
some other language that enforces encapsulation with privacy, ruby's
ability to get around privacy means that encapsulation cannot be
enforced. Most of us (I have counted myself in this camp until now)
have discarded the use of privacy in ruby altogether, as if it were
nothing more than a half-hearted nod to other languages' encapsulation
practices. Make everything public, we say; since everything's
ultimately public anyway, using the private keyword is merely a
speedbump which adds no security but does add hassle and headache.

I am becoming more and more aware of a number of rubyists who consider
the use of private and protected methods in ruby to be a useful way to
communicate to the reader that the code is highly volatile, under
question, subject to change or outright removal, etc., and that for
these reasons the code should not be surfaced to the public API of the
class. They ALSO consider the private keyword to be merely a
speedbump, but one which communicates that maybe you should slow down
a bit before trying to access these portions of code. Furthermore,
making these methods private or protected makes them "exemplary" to
maintainers of the code, meaning that a maintainer will understand the
intent of the privacy, and be less likely to *accidentally* create an
external dependency on on a method that should have been kept private.

Another way of looking at this difference of opinion is that the old
way of thinking is that `private` is there to protect my code from
your prying eyes, which implies that I think I am smarter than every
programmer ever, even all the ones who come from the future. It also
means, at least in ruby, that I think hiding stuff inside a wet paper
bag is a pretty good way of securing such code from you future
programmers. This new way of thinking admits to the wet paper bag, but
more importantly it reverses the direction of the protection: it is
only a speedbump, but it is there to protect YOU, a smart future
programmer, from code that I, a programmer from the past who knows he
will never be as dumb as he is right now, wrote and got working but
it's volatile and dangerous to depend upon. You may figure out a way
to use that code safely, and if you do, then by all means cut through
that paper bag.

I have become swayed by this second way of thinking, but I find that
it falls short in one key area: accessors. It is easy to create a
private method in ruby, but creating a private accessor method is
actually a bit tortuous. As a result, I see programmers who strongly
believe in using privacy to communicate undependable interfaces
frequently making one of two bad tradeoffs: they either use instance
variables or public accessors for their private variables. These
variables are not dependable, at least from a "stable interface"
standpoint, so both solutions are suboptimal. While instance variables
communicate privacy, they force the class to depend on its own
undependable internals. Making an accessor allows the class to create
an internal interface to isolates itself from its own undependable
internals, but by making it public the communication to the maintainer
is that other classes can and should depend on that interface.

What is needed is a clean, easy, *elegant* way to create private and
protected accessors, so that classes can create internal interfaces
to their instance variables, reducing their exposure to their own
volatility WITHOUT communicating that interface publically.

We need a clean and easy way to create private and protected accessors
in ruby. My goal with this gem, then, is to create such a way, so that
those who wish to communicate "this variable is undependable and it
should be kept isolated for now" can do so easily.


text:
/* $Id$ */

/*!

\page pi_structure Structure of a module

A Network Identity Manager module is a dynamically loadable library
with a specific set of exported symbols.  Each export symbol and
general notes about writing a plug-in module are documented below.

\section pi_str_reg  Registration and Version Information

[TODO]

\section pi_str_init Initialization

Do not use DllMain or other system specific callback routines to
perform intilization tasks other than creating mutexes, initializing
thread local storage and other tasks that must be performed at that
stage.  Specifically, do not call any Network Identity Manager API functions from
within DllMain.

\section pi_str_cb Callbacks

The callbacks that must be implemented by a module are:

- init_module()
- exit_module()

 */


text:
#import "UIKey.h"
#import <AppKit/NSEvent.h>

@implementation UIKey {
    NSUInteger _modifierFlags;
}

- (id)initWithNSEvent:(NSEvent *)event
{
    if ((self=[super init])) {
        _keyCode = [event keyCode];
        _characters = [[event charactersIgnoringModifiers] copy];
        _charactersWithModifiers = [[event characters] copy];
        _repeat = [event isARepeat];
        _modifierFlags = [event modifierFlags];
    }
    return self;
}

- (UIKeyType)type
{
    if (_keyCode == 53) {
        return UIKeyTypeEscape;
    }

    if ([_characters length] > 0) {
        switch ([_characters characterAtIndex:0]) {
            case NSUpArrowFunctionKey:			return UIKeyTypeUpArrow;
            case NSDownArrowFunctionKey:		return UIKeyTypeDownArrow;
            case NSLeftArrowFunctionKey:		return UIKeyTypeLeftArrow;
            case NSRightArrowFunctionKey:		return UIKeyTypeRightArrow;
            case NSEndFunctionKey:				return UIKeyTypeEnd;
            case NSPageUpFunctionKey:			return UIKeyTypePageUp;
            case NSPageDownFunctionKey:			return UIKeyTypePageDown;
            case NSDeleteFunctionKey:			return UIKeyTypeDelete;
            case NSInsertFunctionKey:			return UIKeyTypeInsert;
            case NSHomeFunctionKey:				return UIKeyTypeHome;
            case 0x000D:						return UIKeyTypeReturn;
            case 0x0003:						return UIKeyTypeEnter;
        }
    }

    return UIKeyTypeCharacter;
}

- (BOOL)isCapslockEnabled
{
    return (_modifierFlags & NSAlphaShiftKeyMask) == NSAlphaShiftKeyMask;
}

- (BOOL)isShiftKeyPressed
{
    return (_modifierFlags & NSShiftKeyMask) == NSShiftKeyMask;
}

- (BOOL)isControlKeyPressed
{
    return (_modifierFlags & NSControlKeyMask) == NSControlKeyMask;
}

- (BOOL)isOptionKeyPressed
{
    return (_modifierFlags & NSAlternateKeyMask) == NSAlternateKeyMask;
}

- (BOOL)isCommandKeyPressed
{
    return (_modifierFlags & NSCommandKeyMask) == NSCommandKeyMask;
}

- (SEL)action
{
    if (self.type == UIKeyTypeEnter || (self.type == UIKeyTypeReturn && self.commandKeyPressed)) {
        return @selector(commitOperation:);
    }

    if (self.type == UIKeyTypeEscape || (self.commandKeyPressed && [self.characters isEqual:@"."])) {
        return @selector(cancelOperation:);
    }

    return NULL;
}

@end


text:
import Graphics.Rendering.OpenGL as GL
import Graphics.UI.GLFW as GLFW
import Control.Monad (when, unless, guard, void)
import Data.ByteString as B (readFile, ByteString)
import System.FilePath
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.Class
import Control.Monad.Trans.RWS
import Control.Monad.IO.Class
import Data.Word
import Data.Int
import GHC.Float
import Foreign.C.Types
import Control.Concurrent.STM
import Data.Functor
import Paths_hpong

import App
import Events
import Graphics.Shaders
import Graphics.Buffers
import Graphics.ArrayObjects
import Graphics.Object
import Graphics.Renderable
import Sound.Sounds
import Objects.Paddle
import Objects.Ball

toCInt :: Int -> CInt
toCInt int = let cint = (fromIntegral int) :: Int32 in CInt cint

sizeCallback :: Window -> Int -> Int -> IO ()
sizeCallback window x y
  | x > y =
    viewport $= (Position (toCInt ((x - y) `div` 2)) 0,
                 Size (toCInt y) (toCInt y))
  | y >= x =
    viewport $= (Position 0 (toCInt ((y - x) `div` 2)),
                 Size (toCInt x) (toCInt x))

makeRectangleObject :: Float -> Float -> IO Object
makeRectangleObject width height = do
  vertShaderPath <- getDataFileName ("shaders" </> "default.vert.shader")
  fragShaderPath <- getDataFileName ("shaders" </> "default.frag.shader")
  Just object <- runMaybeT $ makeObject [
     (VertexShader, vertShaderPath),
     (FragmentShader, fragShaderPath)
    ] vertexPositions indices
    [("position", VertexArrayDescriptor 4 Float 0 $ ptrOffset 0)]
    Triangles 6
  return object
  where
    vertexPositions = [
       width, height, 0.0, 1.0,
       width, -height, 0.0, 1.0,
       -width, height, 0.0, 1.0,
       -width, -height, 0.0, 1.0
      ]
    indices = [
       0, 1, 2,
       2, 1, 3
      ]

setup :: Window -> IO ()
setup win = do
  setupSound
  setWindowSizeCallback win (Just sizeCallback)

  queue <- newTQueueIO

  setupEvents win queue

  paddle <- makeRectangleObject 0.03 0.2
  ballObject <- makeRectangleObject 0.05 0.05

  ball <- makeBall

  let env = AppEnv
        { envWindow = win
        , envPaddle = paddle
        , envBall = ballObject
        , envQueue = queue
        }

  let state = AppState
        { stateLeftPaddle = makePaddle $ Vertex2 (-0.9) 0.0
        , stateRightPaddle = makePaddle $ Vertex2 0.9 0.0
        , stateBall = ball
        }

  runRWST run env state

  cleanupSound
  return ()

draw :: App
draw = do
  liftIO $ clearColor $= Color4 0.1 0.1 0.1 0.0
  liftIO $ clear [ColorBuffer]

  paddle <- asks envPaddle
  leftPosition <- paddlePosition <$> gets stateLeftPaddle

  liftIO $ renderWith paddle $ \program -> do
    offsetLoc <- GL.get $ uniformLocation program "offset"
    uniform offsetLoc $= leftPosition

  rightPosition <- paddlePosition <$> gets stateRightPaddle

  liftIO $ renderWith paddle $ \program -> do
    offsetLoc <- GL.get $ uniformLocation program "offset"
    uniform offsetLoc $= rightPosition

  ball <- asks envBall
  ballPos <- ballPosition <$> gets stateBall

  liftIO $ renderWith ball $ \program -> do
    offsetLoc <- GL.get $ uniformLocation program "offset"
    uniform offsetLoc $= ballPos

update :: App
update = do
  leftPaddle <- gets stateLeftPaddle
  rightPaddle <- gets stateRightPaddle
  ball <- gets stateBall
  let (newBall, hit) = ballUpdate ball leftPaddle rightPaddle
  when hit $ do
    soundPath <- liftIO $ getDataFileName ("sounds" </> "bonk.wav")
    liftIO $ void $ playFile soundPath
  modify $ \s -> s
    { stateLeftPaddle = paddleUpdate leftPaddle
    , stateRightPaddle = paddleUpdate rightPaddle
    , stateBall = newBall
    }

handleEvents :: App
handleEvents = do
  queue <- asks envQueue
  e <- liftIO $ atomically $ tryReadTQueue queue
  case e of
    Just (EventKeyPress key modifiers) -> do
      case key of
        Key'Up -> modify $ \s -> s {
          stateRightPaddle = paddlePressed (stateRightPaddle s) Up Pressed }
        Key'Down -> modify $ \s -> s {
          stateRightPaddle = paddlePressed (stateRightPaddle s) Down Pressed }
        Key'W -> modify $ \s -> s {
          stateLeftPaddle = paddlePressed (stateLeftPaddle s) Up Pressed }
        Key'S -> modify $ \s -> s {
          stateLeftPaddle = paddlePressed (stateLeftPaddle s) Down Pressed }
        _ -> return ()
      handleEvents
    Just (EventKeyRelease key modifiers) -> do
      case key of
        Key'Up -> modify $ \s -> s {
          stateRightPaddle = paddlePressed (stateRightPaddle s) Up Released }
        Key'Down -> modify $ \s -> s {
          stateRightPaddle = paddlePressed (stateRightPaddle s) Down Released }
        Key'W -> modify $ \s -> s {
          stateLeftPaddle = paddlePressed (stateLeftPaddle s) Up Released }
        Key'S -> modify $ \s -> s {
          stateLeftPaddle = paddlePressed (stateLeftPaddle s) Down Released }
        _ -> return ()
      handleEvents
    Nothing -> return ()

run :: App
run = do
  win <- asks envWindow

  handleEvents

  update

  draw
  liftIO $ GLFW.swapBuffers win

  liftIO $ GLFW.pollEvents
  q <- liftIO $ GLFW.windowShouldClose win
  unless q $ run

main :: IO ()
main = do
  r <- GLFW.init
  when r $ do
    withWindow 800 600 "hpong" setup
    GLFW.terminate

withWindow :: Int -> Int -> String -> (Window -> IO ()) -> IO ()
withWindow width height name run = do
  GLFW.windowHint $ WindowHint'ContextVersionMajor 3
  GLFW.windowHint $ WindowHint'ContextVersionMinor 1

  ww <- GLFW.createWindow width height name Nothing Nothing
  case ww of
    Just win -> do
      GLFW.makeContextCurrent ww
      run win
      GLFW.destroyWindow win
    Nothing -> return ()


text:
#define _POSIX_C_SOURCE 200809L

/**
 * verify.c
 *
 * the main() for ./verify, a standalone position verifier
 *
 */
#include <stdlib.h>
#include <string.h>

#include "positions.h"
#include "devices.h"
#include "utils.h"
#include "blockVerify.h"

int verbose = 1;
int keepRunning = 1;
size_t waitEvery = 0;
/**
 * main
 *
 */
int main(int argc, char *argv[]) {

  deviceDetails *devices = NULL;
  size_t numDevices = 0;

  positionType *positions = NULL;
  size_t numPositions = 0;

  // load in all the positions, generation from the -L filename option from aioRWTest
  size_t maxsize = 0;
  positions = loadPositions(stdin, &numPositions, &devices, &numDevices, &maxsize);
  if (!positions) {
    fprintf(stderr,"*warning* no valid positions\n");
    freeDeviceDetails(devices, numDevices);
    exit(-1);
  }
  for (size_t i = 0; i <numDevices; i++) {
    devices[i].shouldBeSize = maxsize;
  }

  // find block and seed
  long seed;
  size_t minbs, blocksize;
  findSeedMaxBlock(positions, numPositions, &seed, &minbs, &blocksize);

  // generate random buffer with the right seed, do this linearly to avoid random numbers running in parallel
  char *randomBuffer = NULL;
  CALLOC(randomBuffer, blocksize, 1);

  generateRandomBuffer(randomBuffer, blocksize, seed);

  const size_t qd = 256, contextCount = 1;
  io_context_t *ioc = createContexts(contextCount, qd);
  setupContexts(ioc, contextCount, qd);
  // after loading in the positions with the paths, open the files and populate BD sizes etc
  openDevices(devices, numDevices, 0, &maxsize, minbs, blocksize, minbs, 0, 0, qd, contextCount);
  // display
  infoDevices(devices, numDevices);

  int numOpen = numOpenDevices(devices, numDevices);

  if (numOpen <= 0) {
    fprintf(stderr,"*error* no devices can be opened\n");
    exit(-1);
  }

  fprintf(stderr,"*info* numPositions %zd\n", numPositions);
  // save to do a rough check
  //  savePositions("test.log", positions, numPositions, 0);

  size_t correct = 0, incorrect = 0, ioerrors = 0, lenerrors = 0;
  if (positions) {
    // lots of threads
    verifyPositions(positions, numPositions, randomBuffer, 256, seed, blocksize, &correct, &incorrect, &ioerrors, &lenerrors);
  }

  fprintf(stderr,"*info* total %zd, correct %zd, incorrect %zd, ioerrors %zd, lenerrors %zd\n", correct+incorrect+ioerrors+lenerrors, correct, incorrect, ioerrors, lenerrors);

  freeDeviceDetails(devices, numDevices);
  freeContexts(ioc, contextCount);
  free(positions);
  free(randomBuffer);

  size_t errors = incorrect + ioerrors + lenerrors;
  if (errors > 254) {
    errors = 254; // exit codes have a limit
  }
  exit(errors);
}


text:
package io.kubernetes.client.openapi.models;

import io.kubernetes.client.fluent.BaseFluent;
import io.kubernetes.client.fluent.Nested;

/** Generated */
@SuppressWarnings(value = "unchecked")
public class V1PreferredSchedulingTermFluentImpl<A extends V1PreferredSchedulingTermFluent<A>>
    extends BaseFluent<A> implements V1PreferredSchedulingTermFluent<A> {
  public V1PreferredSchedulingTermFluentImpl() {}

  public V1PreferredSchedulingTermFluentImpl(V1PreferredSchedulingTerm instance) {
    this.withPreference(instance.getPreference());

    this.withWeight(instance.getWeight());
  }

  private V1NodeSelectorTermBuilder preference;
  private Integer weight;

  /**
   * This method has been deprecated, please use method buildPreference instead.
   *
   * @return The buildable object.
   */
  @Deprecated
  public V1NodeSelectorTerm getPreference() {
    return this.preference != null ? this.preference.build() : null;
  }

  public V1NodeSelectorTerm buildPreference() {
    return this.preference != null ? this.preference.build() : null;
  }

  public A withPreference(V1NodeSelectorTerm preference) {
    _visitables.get("preference").remove(this.preference);
    if (preference != null) {
      this.preference = new V1NodeSelectorTermBuilder(preference);
      _visitables.get("preference").add(this.preference);
    } else {
      this.preference = null;
      _visitables.get("preference").remove(this.preference);
    }
    return (A) this;
  }

  public Boolean hasPreference() {
    return this.preference != null;
  }

  public V1PreferredSchedulingTermFluent.PreferenceNested<A> withNewPreference() {
    return new V1PreferredSchedulingTermFluentImpl.PreferenceNestedImpl();
  }

  public V1PreferredSchedulingTermFluent.PreferenceNested<A> withNewPreferenceLike(
      V1NodeSelectorTerm item) {
    return new V1PreferredSchedulingTermFluentImpl.PreferenceNestedImpl(item);
  }

  public V1PreferredSchedulingTermFluent.PreferenceNested<A> editPreference() {
    return withNewPreferenceLike(getPreference());
  }

  public V1PreferredSchedulingTermFluent.PreferenceNested<A> editOrNewPreference() {
    return withNewPreferenceLike(
        getPreference() != null ? getPreference() : new V1NodeSelectorTermBuilder().build());
  }

  public V1PreferredSchedulingTermFluent.PreferenceNested<A> editOrNewPreferenceLike(
      V1NodeSelectorTerm item) {
    return withNewPreferenceLike(getPreference() != null ? getPreference() : item);
  }

  public Integer getWeight() {
    return this.weight;
  }

  public A withWeight(Integer weight) {
    this.weight = weight;
    return (A) this;
  }

  public Boolean hasWeight() {
    return this.weight != null;
  }

  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    V1PreferredSchedulingTermFluentImpl that = (V1PreferredSchedulingTermFluentImpl) o;
    if (preference != null ? !preference.equals(that.preference) : that.preference != null)
      return false;
    if (weight != null ? !weight.equals(that.weight) : that.weight != null) return false;
    return true;
  }

  public int hashCode() {
    return java.util.Objects.hash(preference, weight, super.hashCode());
  }

  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (preference != null) {
      sb.append("preference:");
      sb.append(preference + ",");
    }
    if (weight != null) {
      sb.append("weight:");
      sb.append(weight);
    }
    sb.append("}");
    return sb.toString();
  }

  class PreferenceNestedImpl<N>
      extends V1NodeSelectorTermFluentImpl<V1PreferredSchedulingTermFluent.PreferenceNested<N>>
      implements V1PreferredSchedulingTermFluent.PreferenceNested<N>, Nested<N> {
    PreferenceNestedImpl(V1NodeSelectorTerm item) {
      this.builder = new V1NodeSelectorTermBuilder(this, item);
    }

    PreferenceNestedImpl() {
      this.builder = new V1NodeSelectorTermBuilder(this);
    }

    V1NodeSelectorTermBuilder builder;

    public N and() {
      return (N) V1PreferredSchedulingTermFluentImpl.this.withPreference(builder.build());
    }

    public N endPreference() {
      return and();
    }
  }
}


text:
using namespace boost::unit_test;
using namespace std;
using namespace scalaris;

BOOST_AUTO_TEST_SUITE(MasterSuite)

BOOST_AUTO_TEST_CASE( create_connection )
{
  Connection c = { "localhost" };

  BOOST_CHECK(c.isOpen());
}

BOOST_AUTO_TEST_CASE( close_connection )
{
  Connection c = { "localhost" };
  BOOST_CHECK(c.isOpen());
  c.close();
  BOOST_CHECK(!c.isOpen());
}

BOOST_AUTO_TEST_SUITE_END()


text:
@class GrupoUsuarios;

@interface Grupo : NSManagedObject

@property (nonatomic, retain) NSDate * fechaCreacion;
@property (nonatomic, retain) NSNumber * id;
@property (nonatomic, retain) NSString * nombre;
@property (nonatomic, retain) NSString * tipo;
@property (nonatomic, retain) NSSet *usuarios;
@end

@interface Grupo (CoreDataGeneratedAccessors)

- (void)addUsuariosObject:(GrupoUsuarios *)value;
- (void)removeUsuariosObject:(GrupoUsuarios *)value;
- (void)addUsuarios:(NSSet *)values;
- (void)removeUsuarios:(NSSet *)values;

@end


text:
'use strict';

import 'vs/css!./quickOutline';
import nls = require('vs/nls');
import Arrays = require('vs/base/common/arrays');
import {TPromise} from 'vs/base/common/winjs.base';
import Errors = require('vs/base/common/errors');
import Strings = require('vs/base/common/strings');
import EditorCommon = require('vs/editor/common/editorCommon');
import Modes = require('vs/editor/common/modes');
import Filters = require('vs/base/common/filters');
import QuickOpenModel = require('vs/base/parts/quickopen/browser/quickOpenModel');
import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen');
import EditorQuickOpen = require('./editorQuickOpen');
import {Behaviour} from 'vs/editor/common/editorAction';
import {INullService} from 'vs/platform/instantiation/common/instantiation';

let SCOPE_PREFIX = ':';

class SymbolEntry extends QuickOpenModel.QuickOpenEntryGroup {
	private name: string;
	private type: string;
	private description: string;
	private range: EditorCommon.IRange;
	private editor: EditorCommon.ICommonCodeEditor;
	private decorator: EditorQuickOpen.IDecorator;

	constructor(name: string, type: string, description: string, range: EditorCommon.IRange, highlights: QuickOpenModel.IHighlight[], editor: EditorCommon.ICommonCodeEditor, decorator: EditorQuickOpen.IDecorator) {
		super();

		this.name = name;
		this.type = type;
		this.description = description;
		this.range = range;
		this.setHighlights(highlights);
		this.editor = editor;
		this.decorator = decorator;
	}

	public getLabel(): string {
		return this.name;
	}

	public getAriaLabel(): string {
		return nls.localize('entryAriaLabel', "{0}, symbols", this.name);
	}

	public getIcon(): string {
		return this.type;
	}

	public getDescription(): string {
		return this.description;
	}

	public getType(): string {
		return this.type;
	}

	public getRange(): EditorCommon.IRange {
		return this.range;
	}

	public run(mode: QuickOpen.Mode, context: QuickOpenModel.IContext): boolean {
		if (mode === QuickOpen.Mode.OPEN) {
			return this.runOpen(context);
		}

		return this.runPreview();
	}

	private runOpen(context: QuickOpenModel.IContext): boolean {

		// Apply selection and focus
		let range = this.toSelection();
		this.editor.setSelection(range);
		this.editor.revealRangeInCenter(range);
		this.editor.focus();

		return true;
	}

	private runPreview(): boolean {

		// Select Outline Position
		let range = this.toSelection();
		this.editor.revealRangeInCenter(range);

		// Decorate if possible
		this.decorator.decorateLine(this.range, this.editor);

		return false;
	}

	private toSelection(): EditorCommon.IRange {
		return {
			startLineNumber: this.range.startLineNumber,
			startColumn: this.range.startColumn || 1,
			endLineNumber: this.range.startLineNumber,
			endColumn: this.range.startColumn || 1
		};
	}
}

interface OutlineNode {
	label: string;
	type: string;
	range: EditorCommon.IRange;
	children?: OutlineNode[];
	parentScope?: string[];
}

export class QuickOutlineAction extends EditorQuickOpen.BaseEditorQuickOpenAction {

	public static ID = 'editor.action.quickOutline';

	private cachedResult: Modes.IOutlineEntry[];

	constructor(descriptor: EditorCommon.IEditorActionDescriptorData, editor: EditorCommon.ICommonCodeEditor, @INullService ns) {
		super(descriptor, editor, nls.localize('QuickOutlineAction.label', "Go to Symbol..."), Behaviour.WidgetFocus | Behaviour.ShowInContextMenu);
	}

	public getGroupId(): string {
		return '1_goto/5_visitSymbol';
	}

	public isSupported(): boolean {
		let mode = this.editor.getModel().getMode();

		return !!mode && !!mode.outlineSupport && super.isSupported();
	}

	public run(): TPromise<boolean> {
		let model = this.editor.getModel();
		let mode = model.getMode();
		let outlineSupport = mode.outlineSupport;

		// Only works for models with outline support
		if (!outlineSupport) {
			return null;
		}

		// Resolve outline
		let promise = outlineSupport.getOutline(model.getAssociatedResource());
		return promise.then((result: Modes.IOutlineEntry[]) => {
			if (Array.isArray(result) && result.length > 0) {

				// Cache result
				this.cachedResult = result;

				return super.run();
			}

			return TPromise.as(true);
		}, (err) => {
			Errors.onUnexpectedError(err);
			return false;
		});
	}

	_getModel(value: string): QuickOpenModel.QuickOpenModel {
		return new QuickOpenModel.QuickOpenModel(this.toQuickOpenEntries(this.cachedResult, value));
	}

	_getAutoFocus(searchValue: string): QuickOpen.IAutoFocus {

		// Remove any type pattern (:) from search value as needed
		if (searchValue.indexOf(SCOPE_PREFIX) === 0) {
			searchValue = searchValue.substr(SCOPE_PREFIX.length);
		}

		return {
			autoFocusPrefixMatch: searchValue,
			autoFocusFirstEntry: !!searchValue
		};
	}

	_getInputAriaLabel(): string {
		return nls.localize('quickOutlineActionInput', "Type the name of an identifier you wish to navigate to");
	}

	private toQuickOpenEntries(outline: OutlineNode[], searchValue: string): SymbolEntry[] {
		let results: SymbolEntry[] = [];

		// Flatten
		let flattened: OutlineNode[] = [];
		if (outline) {
			this.flatten(outline, flattened);
		}

		// Convert to Entries
		let normalizedSearchValue = searchValue;
		if (searchValue.indexOf(SCOPE_PREFIX) === 0) {
			normalizedSearchValue = normalizedSearchValue.substr(SCOPE_PREFIX.length);
		}

		for (let i = 0; i < flattened.length; i++) {
			let element = flattened[i];
			let label = Strings.trim(element.label);

			// Check for meatch
			let highlights = Filters.matchesFuzzy(normalizedSearchValue, label);
			if (highlights) {

				// Show parent scope as description
				let description: string = null;
				if (element.parentScope) {
					description = Arrays.tail(element.parentScope);
				}

				// Add
				results.push(new SymbolEntry(label, element.type, description, element.range, highlights, this.editor, this));
			}
		}

		// Sort properly if actually searching
		if (searchValue) {
			if (searchValue.indexOf(SCOPE_PREFIX) === 0) {
				results = results.sort(this.sortScoped.bind(this, searchValue.toLowerCase()));
			} else {
				results = results.sort(this.sortNormal.bind(this, searchValue.toLowerCase()));
			}
		}

		// Mark all type groups
		if (results.length > 0 && searchValue.indexOf(SCOPE_PREFIX) === 0) {
			let currentType: string = null;
			let currentResult: SymbolEntry = null;
			let typeCounter = 0;

			for (let i = 0; i < results.length; i++) {
				let result = results[i];

				// Found new type
				if (currentType !== result.getType()) {

					// Update previous result with count
					if (currentResult) {
						currentResult.setGroupLabel(this.typeToLabel(currentType, typeCounter));
					}

					currentType = result.getType();
					currentResult = result;
					typeCounter = 1;

					result.setShowBorder(i > 0);
				}

				// Existing type, keep counting
				else {
					typeCounter++;
				}
			}

			// Update previous result with count
			if (currentResult) {
				currentResult.setGroupLabel(this.typeToLabel(currentType, typeCounter));
			}
		}

		// Mark first entry as outline
		else if (results.length > 0) {
			results[0].setGroupLabel(nls.localize('symbols', "symbols ({0})", results.length));
		}

		return results;
	}

	private typeToLabel(type: string, count: number): string {
		switch (type) {
			case 'module': return nls.localize('modules', "modules ({0})", count);
			case 'class': return nls.localize('class', "classes ({0})", count);
			case 'interface': return nls.localize('interface', "interfaces ({0})", count);
			case 'method': return nls.localize('method', "methods ({0})", count);
			case 'function': return nls.localize('function', "functions ({0})", count);
			case 'property': return nls.localize('property', "properties ({0})", count);
			case 'variable': return nls.localize('variable', "variables ({0})", count);
			case 'var': return nls.localize('variable2', "variables ({0})", count);
			case 'constructor': return nls.localize('_constructor', "constructors ({0})", count);
			case 'call': return nls.localize('call', "calls ({0})", count);
		}

		return type;
	}

	private flatten(outline: OutlineNode[], flattened: OutlineNode[], parentScope?: string[]): void {
		for (let i = 0; i < outline.length; i++) {
			let element = outline[i];
			flattened.push(element);

			if (parentScope) {
				element.parentScope = parentScope;
			}

			if (element.children) {
				let elementScope: string[] = [];
				if (parentScope) {
					elementScope = parentScope.slice(0);
				}
				elementScope.push(element.label);

				this.flatten(element.children, flattened, elementScope);
			}
		}
	}

	private sortNormal(searchValue: string, elementA: SymbolEntry, elementB: SymbolEntry): number {
		let elementAName = elementA.getLabel().toLowerCase();
		let elementBName = elementB.getLabel().toLowerCase();

		// Compare by name
		let r = Strings.localeCompare(elementAName, elementBName);
		if (r !== 0) {
			return r;
		}

		// If name identical sort by range instead
		let elementARange = elementA.getRange();
		let elementBRange = elementB.getRange();
		return elementARange.startLineNumber - elementBRange.startLineNumber;
	}

	private sortScoped(searchValue: string, elementA: SymbolEntry, elementB: SymbolEntry): number {

		// Remove scope char
		searchValue = searchValue.substr(SCOPE_PREFIX.length);

		// Sort by type first if scoped search
		let elementAType = elementA.getType();
		let elementBType = elementB.getType();
		let r = Strings.localeCompare(elementAType, elementBType);
		if (r !== 0) {
			return r;
		}

		// Special sort when searching in scoped mode
		if (searchValue) {
			let elementAName = elementA.getLabel().toLowerCase();
			let elementBName = elementB.getLabel().toLowerCase();

			// Compare by name
			let r = Strings.localeCompare(elementAName, elementBName);
			if (r !== 0) {
				return r;
			}
		}

		// Default to sort by range
		let elementARange = elementA.getRange();
		let elementBRange = elementB.getRange();
		return elementARange.startLineNumber - elementBRange.startLineNumber;
	}

	_onClose(canceled: boolean): void {
		super._onClose(canceled);

		// Clear Cache
		this.cachedResult = null;
	}

	public dispose(): void {
		super.dispose();

		// Clear Cache
		this.cachedResult = null;
	}
}


text:
/* System includes */
 /**
 * Support and FAQ: visit Atmel Support
 */
#include <stdio.h>
#include <string.h>

/* Application includes */
#include "app_emu_common.h"
#include "conf_app_emu.h"

#include "asf.h"

#define TIMETO_RECONNECT                        500L /* Time in 10 miliseconds **/
#define TIME_OUT_CONNECTION                     1000L /* Time in 10 miliseconds **/
#define TIME_OUT_TEST                           100000L /* Time in 10 miliseconds */

#define MLME_MACEUI48                           0x8100
#define MLME_MACSTATE                           0x0024

#define MACSTATE_DISCONNECTED                   0
#define MACSTATE_TERMINAL                       1
#define MACSTATE_SWITCH                         2

#define NUM_TEST                                11

/*  States of appemu_proccess */
enum {
	APPEMU_GET_SERIAL,
	APPEMU_WAIT_REGISTER,
	APPEMU_CONNECT_REQUEST,
	APPEMU_WAIT_RESPONSE_CONNECT,
	APPEMU_WAIT_MESSAGE,
	APPEMU_SEND_RESPONSE,
	APPEMU_TIMETO_RECONNECT
};

/*  States of _mlme_get_var */
enum {
	MLMEGET_SEND_REQUEST,
	MLMEGET_WAIT_ANSWER
};

/* Definition of the test */
typedef struct {
	uint8_t uc_test_number; /* Step of the test, to fill up the message **/
	uint16_t us_bytes_sent; /* Bytes sent by the Base Node */
	uint16_t us_bytes_expected; /* Bytes expected in the answer */
} test_info;

/* Test battery to execute */
static test_info conf_test [NUM_TEST + 1] = {
	{2, 24, 36},
	{3, 24, 31},
	{4, 75, 138},
	{4, 16, 52},
	{5, 17, 17},
	{5, 29, 29},
	{5, 65, 65},
	{5, 137, 137},
	{5, 209, 209},
	{5, 281, 281},
	{5, 353, 353},
	/* End of table */
	{0xff, 0, 0}
};

/* State of the machine state, appemu_Proccess */
static uint8_t uc_app_emu_st;
/* Pointer to the new command */
static MacSapCallBack *counter_new_cmd;
/* Temporal storage for the last command extracted */
static MacSapCallBack tmp_new_cmd;
/* us_handler of appEmu Connection */
static uint16_t us_meter_handler;
/* String to store the serial number */
static char pc_serial[SERIAL_SIZE + 1];
/* String to store a representation of the time in Hundreds of Milliseconds */
static char pc_timestamp[TIMESTAMP_SIZE + 1];
/* Var where the payload is built */
static uint8_t pc_request[MAX_COUNTER_DATA_SIZE + 1];
/* Status of the node, DISCONNECTED, CONNECTED */
static uint8_t uc_node_state;
/* State of mlmeGetVar proccess */
static uint8_t uc_mlme_get_var_st;

static uint8_t puc_buf_mlme_get[20];

extern uint32_t ul_time_app_emu;

const char *prime_get_app_identification_str(void);

/** @brief	Gets values through the MLME interface
 *
 *      @param us_var		   Number of the value read
 *      @param puc_result	 Pointer where the value of us_var is stored
 *
 *      @return	1	if OK
 *                                0	In other case
 **/

static int _mlme_get_var(uint16_t us_var, uint8_t *puc_result)
{
	uint16_t pibAttrib;
	int l_result = 0;

	switch (uc_mlme_get_var_st) {
	case MLMEGET_SEND_REQUEST:
		if (prime_MLME_GET_request(us_var) == 0) {
			uc_mlme_get_var_st = MLMEGET_WAIT_ANSWER;
		}

		break;

	case MLMEGET_WAIT_ANSWER:
		if (prime_MLME_callback(puc_result)) {
			/* Check cmd and result */
			if ((puc_result[0] == PRIME_MLME_GET_CONFIRM) && (puc_result[1] == PRIME_MLME_RESULT_SUCCESS)) {
				pibAttrib = (uint16_t)(puc_result[2] << 8) + (uint16_t)puc_result[3];
				if (pibAttrib == us_var) {
					l_result = 1;
				}
			}

			/* Next time we start again in MLMEGET_SEND_REQUEST or retry now */
			uc_mlme_get_var_st = MLMEGET_SEND_REQUEST;
		}

		break;
	}
	return l_result;
}

/** @brief	This function updates the Serial string
 *
 *      @param pc_sn    Pointer to the serial number
 *
 *      @return	1	if OK
 *                                0	In other case
 * This function updates the Serial string with the Serial of the Meter
 **/

static int _get_serial(char *pc_sn)
{
	uint8_t *p_get_array;

	int l_result = 0;

	if (_mlme_get_var(MLME_MACEUI48, puc_buf_mlme_get)) {
		p_get_array = &puc_buf_mlme_get[4]; /* address of buf[0] */
		app_emu_init_random(&p_get_array[0]);
		sprintf(pc_sn, "%s%02x%02x%02x", PROVIDER,
				(uint16_t)p_get_array[3],
				(uint16_t)p_get_array[4],
				(uint16_t)p_get_array[5]);
		l_result = 1;
#ifdef APPEMU_DEBUG
		printf("Serial: %s\n", pc_sn);
#endif
	}

	return l_result;
}

/** @brief	Return the last value of uc_node_state updated by
 * _service_node_registered
 *
 *      @return	uc_node_state
 **/

static int _node_connected(void)
{
	return uc_node_state;
}

/** @brief	It tells us when a node is already connected to a base node
 *
 *      @return	1	Node Connected
 *                                0 Non contected, pooling
 *
 * This function also updates uc_node_state
 **/

static int _service_node_registered(void)
{
	int l_result = 0;

	if (_mlme_get_var(MLME_MACSTATE, puc_buf_mlme_get)) {
		uc_node_state = puc_buf_mlme_get[7]; /* LSB of pibValue */
		if ((uc_node_state == MACSTATE_TERMINAL) || (uc_node_state  == MACSTATE_SWITCH)) {
			l_result = 1;
#ifdef APPEMU_DEBUG
			printf("Node Connected\n");
#endif
		}
	}

	return l_result;
}

/** @brief	Checks the received message to correspond with the programmed
 * test
 *
 *      @param p_cmd	    Pointer to the incomming message
 *      @param pus_rx_len	Pointer to return the length received
 *      @param puc_num_test Pointer to return the test number
 *
 *      @return	length to send
 **/

static uint16_t _get_len_answer_msg(MacSapCallBack *p_cmd, uint16_t *pus_rx_len,
		uint8_t *puc_num_test)
{
	uint16_t us_len_rcv, us_test;
	uint16_t us_len_tx = 0; /* Wrong message */

	uint16_t i = 0;

	us_len_rcv = p_cmd->bufLength;

	us_test = p_cmd->buf[5] - '0';

	if (us_test < 5) {
		for (i = 0; (conf_test[i].uc_test_number != 0xff); i++) {
			if ((conf_test[i].uc_test_number == us_test) && (conf_test[i].us_bytes_sent == us_len_rcv)) {
				us_len_tx = conf_test[i].us_bytes_expected;
				break;
			}
		}
	} else {
		us_len_tx = us_len_rcv;
	}

	*puc_num_test = us_test;
	*pus_rx_len = us_len_rcv;
	return us_len_tx;
}

/** @brief	Get App identification string
 *
 *      @return		Application identification
 *
 * Return string with:
 *      - Product name
 *      - Version
 *      - Copyright advice
 **/

const char *prime_get_app_identification_str(void)
{
	return (APP_ID " Rev." APP_VERSION_STR);
}

/** @brief	Start		application emulation
 *
 *      @param	bauds		Speed of transmission
 *
 * This function initializes variables for application
 **/

void app_emu_start(void)
{
#ifdef APPEMU_DEBUG
	printf("\n\n-- Service Node --\n\n");
	printf("%s\n", prime_get_app_identification_str());
#endif
	uc_app_emu_st = APPEMU_GET_SERIAL;
	uc_node_state = MACSTATE_DISCONNECTED;
	uc_mlme_get_var_st = MLMEGET_SEND_REQUEST;
}

/** @brief	This function implements the Meter
 *
 * This function implements the Meter for the simulated Counter application
 * as a CS sublayer of the Service Node.
 **************************************************************************/

void app_emu_process(void)
{
	uint8_t uc_num_test;

	static uint16_t us_len_rcv;
	static uint16_t us_len_tx;

	Bool new_command = false;

	/* Reception of Mac primitives */
	if (_node_connected() && prime_MAC_callback(&tmp_new_cmd, us_meter_handler, CON_TYPE)) {
		counter_new_cmd = &tmp_new_cmd;
		new_command = true;
		switch (counter_new_cmd->command) {
		case PRIME_MACSAP_RELEASE_INDICATION:
			prime_MAC_RELEASE_response(us_meter_handler, PRIME_MACSAP_RESULT_ACCEPT);
			uc_app_emu_st = APPEMU_TIMETO_RECONNECT;
			ul_time_app_emu = TIMETO_RECONNECT + (uint32_t)app_emu_random();
#ifdef APPEMU_DEBUG
#ifdef __GNUC__
			printf("Connection closed with Concentrator. Reconnecting in %lu milliseconds\n",
					ul_time_app_emu);
#endif
#ifdef __ICCARM__
			printf("Connection closed with Concentrator. Reconnecting in %u milliseconds\n",
					ul_time_app_emu);
#endif
#endif
			break;

		/* Ensure that connection is closed (If connection is already
		 * closed, no packet will be sent to network) */
		case PRIME_MACSAP_RELEASE_CONFIRM:
			uc_app_emu_st = APPEMU_WAIT_REGISTER;
#ifdef APPEMU_DEBUG
			printf("Release Confirm\n");
#endif
			break;

		default:
			break;
		}
	}

	switch (uc_app_emu_st) {
	case APPEMU_GET_SERIAL:
		if (_get_serial(pc_serial)) {
			uc_app_emu_st = APPEMU_WAIT_REGISTER;
		}

		break;

	case APPEMU_WAIT_REGISTER:
		if (_service_node_registered()) {
			uc_app_emu_st = APPEMU_CONNECT_REQUEST;
			ul_time_app_emu = TIME_OUT_CONNECTION;
		}

		break;

	case APPEMU_CONNECT_REQUEST:
#ifdef APPEMU_DEBUG
		printf("Serial: %s\n", pc_serial);
#endif
		prime_MAC_ESTABLISH_request(NULL, CON_TYPE, (unsigned char *)pc_serial, SERIAL_SIZE, 0, 0);
		uc_app_emu_st = APPEMU_WAIT_RESPONSE_CONNECT;
		ul_time_app_emu = TIME_OUT_CONNECTION;
		break;

	case APPEMU_WAIT_RESPONSE_CONNECT:
		if (new_command) {
			new_command = false;
			if (counter_new_cmd->command ==	PRIME_MACSAP_ESTABLISH_CONFIRM) {
				if (counter_new_cmd->answer == PRIME_MACSAP_RESULT_SUCCESS) {
					us_meter_handler = counter_new_cmd->handler;
#ifdef APPEMU_DEBUG
					printf("Connection opened with Concentrator (handler: %i)\n",
							us_meter_handler);
#endif
					counter_new_cmd->buf[counter_new_cmd->bufLength] = '\0';
#ifdef APPEMU_DEBUG
					printf("Connection data : %s\n", &counter_new_cmd->buf[0]);
#endif
					/* Start Test */
					uc_app_emu_st = APPEMU_WAIT_MESSAGE;
				} else {
					uc_app_emu_st = APPEMU_TIMETO_RECONNECT;
#ifdef APPEMU_DEBUG
#ifdef __GNUC__
					printf("Connection rejected. Reconnecting in %lu milliseconds\n",
							ul_time_app_emu);
#endif
#ifdef __ICCARM__
					printf("Connection rejected. Reconnecting in %u milliseconds\n",
							ul_time_app_emu);
#endif
#endif
				}

				ul_time_app_emu = TIME_OUT_TEST + (uint32_t)app_emu_random();
			}
		}

		break;

	/* It will be always in this state waiting to receive message until */
	/* a PRIME_MACSAP_RELEASE_INDICATION is received */
	case APPEMU_WAIT_MESSAGE:
		if (new_command) {
			new_command = false;
			if (counter_new_cmd->command == PRIME_MACSAP_DATA_INDICATION) {
				us_len_tx = _get_len_answer_msg(counter_new_cmd, &us_len_rcv, &uc_num_test);

				if (us_len_tx) {
#ifdef APPEMU_DEBUG
					printf("Received %i bytes\t Test:%i\t\n", us_len_rcv, (uint16_t)uc_num_test);
#endif
					app_emu_copy_timestamp(pc_timestamp, counter_new_cmd->buf);
					app_emu_fill_string((char *)pc_request, us_len_tx, UP_MSG, uc_num_test, pc_timestamp);
					uc_app_emu_st = APPEMU_SEND_RESPONSE;
				} else {
#ifdef APPEMU_DEBUG
					printf("Wrong Message received\n");
#endif
				}
			}
		}

		break;

	case APPEMU_SEND_RESPONSE:
		prime_MAC_DATA_request(us_meter_handler, pc_request, us_len_tx, 1);
#ifdef APPEMU_DEBUG
		printf("Sent:%i\n", us_len_tx);
#endif
		uc_app_emu_st = APPEMU_WAIT_MESSAGE;
		break;

	case APPEMU_TIMETO_RECONNECT:
		break;
	}

	if ((uc_app_emu_st != APPEMU_GET_SERIAL) && (!ul_time_app_emu)) {
		/* Ensure that connection is closed (If connection is already
		 * closed, no packet will be sent to network) */
		prime_MAC_RELEASE_request(us_meter_handler);
		uc_app_emu_st = APPEMU_WAIT_REGISTER;
		ul_time_app_emu = TIMETO_RECONNECT + (uint32_t)app_emu_random();
#ifdef APPEMU_DEBUG
#ifdef __GNUC__
		printf("Connection timeout. Reconnecting in %lu milliseconds\n",
				ul_time_app_emu);
#endif
#ifdef __ICCARM__
		printf("Connection timeout. Reconnecting in %u milliseconds\n",
				ul_time_app_emu);
#endif
#endif
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" [
    <!ENTITY web-common SYSTEM "web-common.xml">
]>

<web-app>

    <!-- The servlets are defined in web-common.xml -->
    &web-common;

    <!-- Require SSL (HTTPS) for everything except callbacks -->
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Callback</web-resource-name>
            <url-pattern>/callback/*</url-pattern>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Oozie Resources</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

</web-app>


text:
All notable changes to this project will be documented in this file.
This project follows [Semantic Versioning](http://semver.org).

## 2.0.0 / 2015-09-12
 - change: update dependencies.
 - remove: node 0.10 support.
 - add: node 4.0 support.

## 1.0.0 / 2015-01-25
 - initial release.


text:
require 'polisher/git/pkg'
require 'awesome_spawn'

module Polisher
  describe Git::Pkg do
    describe "#update_metadata" do
      it "sets pkg version" do
        pkg = described_class.new
        pkg.update_metadata(Polisher::Gem.new(:version => '5.0'))
        pkg.version.should == '5.0'
      end
    end

    describe "#update_spec_to" do
      before do
        @pkg = described_class.new
        @pkg.should_receive(:in_repo).and_yield
        @pkg.instance_variable_set(:@spec, Polisher::RPM::Spec.new)

        @gem = Polisher::Gem.new
      end

      it "updates rpm spec" do
        @pkg.spec.should_receive(:update_to).with(@gem, {})
        @pkg.update_spec_to(@gem)
      end

      it "writes spec to file" do
        @pkg.spec.should_receive(:update_to)
        File.should_receive(:write).with(@pkg.spec_file, @pkg.spec.to_string)
        @pkg.update_spec_to(@gem)
      end

      it "sets dirty_spec bit" do
        @pkg.spec.should_receive(:update_to)
        @pkg.update_spec_to(@gem)
        @pkg.dirty_spec.should be_true
      end
    end

    describe "#gen_sources_for" do
      it "writes gem md5sum to sources file" do
        gem = ::Polisher::Gem.new :path => 'path'
        expected = "#{described_class.md5sum_cmd} #{gem.gem_path} > sources"
        AwesomeSpawn.should_receive(:run).with(expected)

        File.should_receive(:read).with('sources').and_return('md5sum')
        File.should_receive(:write)

        pkg = described_class.new
        pkg.should_receive(:in_repo).and_yield
        pkg.gen_sources_for(gem)
      end
    end

    describe "#ignore" do
      it "adds gem to .gitignore file" do
        gem = ::Polisher::Gem.new :name => 'polisher', :version => '4.2.0'
        f = Object.new
        File.should_receive('open').with('.gitignore', 'a').and_yield(f)
        f.should_receive(:write).with("\n#{gem.name}-#{gem.version}.gem")

        pkg = described_class.new
        pkg.should_receive(:in_repo).and_yield
        pkg.ignore(gem)
      end
    end

    describe "#update_to" do
      it "updates pkg" do
        gem = Polisher::Gem.new
        pkg = described_class.new
        pkg.should_receive(:update_metadata).with(gem)
        pkg.should_receive(:update_spec_to).with(gem, {})
        pkg.should_receive(:gen_sources_for).with(gem)
        pkg.should_receive(:ignore).with(gem)
        pkg.update_to(gem).should == pkg
      end
    end

  end # describe Git::Pkg
end # module Polisher


text:
SYNONYM

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

#### Published in
Revis. gen. pl. (Leipzig) 3(2): 519 (1898)

#### Original name
Polyporus palliseri Berk. ex Cooke, 1882

### Remarks
null


text:
use std::ops::Deref;

use pos::{BytePos, Spanned};
use symbol::Symbol;
use types::{self, Alias, AliasData, ArcType, Type, TypeEnv};

pub trait DisplayEnv {
    type Ident;

    fn string<'a>(&'a self, ident: &'a Self::Ident) -> &'a str;
}

pub trait IdentEnv: DisplayEnv {
    fn from_str(&mut self, s: &str) -> Self::Ident;
}

impl<'t, T: ?Sized + DisplayEnv> DisplayEnv for &'t mut T {
    type Ident = T::Ident;

    fn string<'a>(&'a self, ident: &'a Self::Ident) -> &'a str {
        (**self).string(ident)
    }
}

impl<'a, T: ?Sized + IdentEnv> IdentEnv for &'a mut T {
    fn from_str(&mut self, s: &str) -> Self::Ident {
        (**self).from_str(s)
    }
}

#[derive(Clone, Eq, PartialEq, Debug)]
pub struct TypedIdent<Id = Symbol> {
    pub typ: ArcType<Id>,
    pub name: Id,
}

impl<Id> TypedIdent<Id> {
    pub fn new(name: Id) -> TypedIdent<Id> {
        TypedIdent {
            typ: Type::hole(),
            name: name,
        }
    }
}

impl<Id> AsRef<str> for TypedIdent<Id>
    where Id: AsRef<str>,
{
    fn as_ref(&self) -> &str {
        self.name.as_ref()
    }
}

#[derive(Clone, PartialEq, Debug)]
pub enum Literal {
    Byte(u8),
    Int(i64),
    Float(f64),
    String(String),
    Char(char),
}

/// Pattern which contains a location
pub type SpannedPattern<Id> = Spanned<Pattern<Id>, BytePos>;

#[derive(Clone, PartialEq, Debug)]
pub enum Pattern<Id> {
    Constructor(TypedIdent<Id>, Vec<TypedIdent<Id>>),
    Record {
        typ: ArcType<Id>,
        types: Vec<(Id, Option<Id>)>,
        fields: Vec<(Id, Option<Id>)>,
    },
    Ident(TypedIdent<Id>),
}

#[derive(Clone, PartialEq, Debug)]
pub struct Alternative<Id> {
    pub pattern: SpannedPattern<Id>,
    pub expr: SpannedExpr<Id>,
}

#[derive(Clone, PartialEq, Debug)]
pub struct Array<Id> {
    pub typ: ArcType<Id>,
    pub exprs: Vec<SpannedExpr<Id>>,
}

#[derive(Clone, PartialEq, Debug)]
pub struct Lambda<Id> {
    pub id: TypedIdent<Id>,
    pub args: Vec<TypedIdent<Id>>,
    pub body: Box<SpannedExpr<Id>>,
}

/// Expression which contains a location
pub type SpannedExpr<Id> = Spanned<Expr<Id>, BytePos>;

/// The representation of gluon's expression syntax
#[derive(Clone, PartialEq, Debug)]
pub enum Expr<Id> {
    /// Identifiers
    Ident(TypedIdent<Id>),
    /// Literal values
    Literal(Literal),
    /// Function application, eg. `f x`
    App(Box<SpannedExpr<Id>>, Vec<SpannedExpr<Id>>),
    /// Lambda abstraction, eg. `\x y -> x * y`
    Lambda(Lambda<Id>),
    /// If-then-else conditional
    IfElse(Box<SpannedExpr<Id>>, Box<SpannedExpr<Id>>, Box<SpannedExpr<Id>>),
    /// Pattern match expression
    Match(Box<SpannedExpr<Id>>, Vec<Alternative<Id>>),
    /// Infix operator expression eg. `f >> g`
    Infix(Box<SpannedExpr<Id>>, TypedIdent<Id>, Box<SpannedExpr<Id>>),
    /// Record field projection, eg. `value.field`
    Projection(Box<SpannedExpr<Id>>, Id, ArcType<Id>),
    /// Array construction
    Array(Array<Id>),
    /// Record construction
    Record {
        typ: ArcType<Id>,
        types: Vec<(Id, Option<ArcType<Id>>)>,
        exprs: Vec<(Id, Option<SpannedExpr<Id>>)>,
    },
    /// Tuple construction
    Tuple(Vec<SpannedExpr<Id>>),
    /// Declare a series of value bindings
    LetBindings(Vec<ValueBinding<Id>>, Box<SpannedExpr<Id>>),
    /// Declare a series of type aliases
    TypeBindings(Vec<TypeBinding<Id>>, Box<SpannedExpr<Id>>),
    /// A group of sequenced expressions
    Block(Vec<SpannedExpr<Id>>),
}

#[derive(Clone, PartialEq, Debug)]
pub struct TypeBinding<Id> {
    pub comment: Option<String>,
    pub name: Id,
    pub alias: Alias<Id, ArcType<Id>>,
}

#[derive(Clone, PartialEq, Debug)]
pub struct ValueBinding<Id> {
    pub comment: Option<String>,
    pub name: SpannedPattern<Id>,
    pub typ: ArcType<Id>,
    pub args: Vec<TypedIdent<Id>>,
    pub expr: SpannedExpr<Id>,
}

/// Visitor trait which walks over expressions calling `visit_*` on all encountered elements. By
/// default the `visit_*` functions just walk the tree. If they are overriden the user will need to
/// call `walk_mut_*` to continue traversing the tree.
pub trait MutVisitor {
    type Ident;

    fn visit_expr(&mut self, e: &mut SpannedExpr<Self::Ident>) {
        walk_mut_expr(self, e);
    }

    fn visit_pattern(&mut self, e: &mut SpannedPattern<Self::Ident>) {
        walk_mut_pattern(self, &mut e.value);
    }

    fn visit_typ(&mut self, _: &mut ArcType<Self::Ident>) {}
}

pub fn walk_mut_expr<V: ?Sized + MutVisitor>(v: &mut V, e: &mut SpannedExpr<V::Ident>) {
    match e.value {
        Expr::IfElse(ref mut pred, ref mut if_true, ref mut if_false) => {
            v.visit_expr(&mut **pred);
            v.visit_expr(&mut **if_true);
            v.visit_expr(&mut **if_false);
        }
        Expr::Infix(ref mut lhs, ref mut id, ref mut rhs) => {
            v.visit_expr(&mut **lhs);
            v.visit_typ(&mut id.typ);
            v.visit_expr(&mut **rhs);
        }
        Expr::LetBindings(ref mut bindings, ref mut body) => {
            for bind in bindings {
                v.visit_pattern(&mut bind.name);
                v.visit_expr(&mut bind.expr);
                v.visit_typ(&mut bind.typ);
            }
            v.visit_expr(&mut **body);
        }
        Expr::App(ref mut func, ref mut args) => {
            v.visit_expr(&mut **func);
            for arg in args {
                v.visit_expr(arg);
            }
        }
        Expr::Projection(ref mut expr, _, ref mut typ) => {
            v.visit_expr(&mut **expr);
            v.visit_typ(typ);
        }
        Expr::Match(ref mut expr, ref mut alts) => {
            v.visit_expr(&mut **expr);
            for alt in alts.iter_mut() {
                v.visit_pattern(&mut alt.pattern);
                v.visit_expr(&mut alt.expr);
            }
        }
        Expr::Array(ref mut a) => {
            v.visit_typ(&mut a.typ);
            for expr in &mut a.exprs {
                v.visit_expr(expr);
            }
        }
        Expr::Record { ref mut typ, ref mut exprs, .. } => {
            v.visit_typ(typ);
            for field in exprs {
                if let Some(ref mut expr) = field.1 {
                    v.visit_expr(expr);
                }
            }
        }
        Expr::Tuple(ref mut exprs) => {
            for expr in exprs {
                v.visit_expr(expr);
            }
        }
        Expr::Lambda(ref mut lambda) => {
            v.visit_typ(&mut lambda.id.typ);
            v.visit_expr(&mut *lambda.body);
        }
        Expr::TypeBindings(_, ref mut expr) => v.visit_expr(&mut *expr),
        Expr::Ident(ref mut id) => v.visit_typ(&mut id.typ),
        Expr::Literal(..) => (),
        Expr::Block(ref mut exprs) => {
            for expr in exprs {
                v.visit_expr(expr);
            }
        }
    }
}

/// Walks a pattern, calling `visit_*` on all relevant elements
pub fn walk_mut_pattern<V: ?Sized + MutVisitor>(v: &mut V, p: &mut Pattern<V::Ident>) {
    match *p {
        Pattern::Constructor(ref mut id, ref mut args) => {
            v.visit_typ(&mut id.typ);
            for arg in args {
                v.visit_typ(&mut arg.typ);
            }
        }
        Pattern::Record { ref mut typ, .. } => {
            v.visit_typ(typ);
        }
        Pattern::Ident(ref mut id) => v.visit_typ(&mut id.typ),
    }
}

/// Trait which abstracts over things that have a type.
/// It is not guaranteed that the correct type is returned until after typechecking
pub trait Typed {
    type Ident;

    fn env_type_of(&self, env: &TypeEnv) -> ArcType<Self::Ident>;
}

impl<Id: Clone> Typed for TypedIdent<Id> {
    type Ident = Id;

    fn env_type_of(&self, _: &TypeEnv) -> ArcType<Id> {
        self.typ.clone()
    }
}

impl Typed for Expr<Symbol> {
    type Ident = Symbol;

    fn env_type_of(&self, env: &TypeEnv) -> ArcType {
        match *self {
            Expr::Ident(ref id) => id.typ.clone(),
            Expr::Projection(_, _, ref typ) => typ.clone(),
            Expr::Literal(ref lit) => {
                match *lit {
                    Literal::Int(_) => Type::int(),
                    Literal::Float(_) => Type::float(),
                    Literal::Byte(_) => Type::byte(),
                    Literal::String(_) => Type::string(),
                    Literal::Char(_) => Type::char(),
                }
            }
            Expr::IfElse(_, ref arm, _) => arm.env_type_of(env),
            Expr::Tuple(ref exprs) => {
                assert!(exprs.is_empty());
                Type::unit()
            }
            Expr::Infix(_, ref op, _) => {
                if let Type::App(_, ref args) = *op.typ.clone() {
                    if let Type::App(_, ref args) = *args[1] {
                        return args[1].clone();
                    }
                }
                panic!("Expected function type in binop");
            }
            Expr::LetBindings(_, ref expr) |
            Expr::TypeBindings(_, ref expr) => expr.env_type_of(env),
            Expr::App(ref func, ref args) => {
                get_return_type(env, &func.env_type_of(env), args.len())
            }
            Expr::Match(_, ref alts) => alts[0].expr.env_type_of(env),
            Expr::Array(ref array) => array.typ.clone(),
            Expr::Lambda(ref lambda) => lambda.id.typ.clone(),
            Expr::Record { ref typ, .. } => typ.clone(),
            Expr::Block(ref exprs) => exprs.last().expect("Expr in block").env_type_of(env),
        }
    }
}

impl<T: Typed> Typed for Spanned<T, BytePos> {
    type Ident = T::Ident;

    fn env_type_of(&self, env: &TypeEnv) -> ArcType<T::Ident> {
        self.value.env_type_of(env)
    }
}

impl Typed for Pattern<Symbol> {
    type Ident = Symbol;

    fn env_type_of(&self, env: &TypeEnv) -> ArcType {
        // Identifier patterns might be a function so use the identifier's type instead
        match *self {
            Pattern::Ident(ref id) => id.typ.clone(),
            Pattern::Record { ref typ, .. } => typ.clone(),
            Pattern::Constructor(ref id, ref args) => get_return_type(env, &id.typ, args.len()),
        }
    }
}

fn get_return_type(env: &TypeEnv, alias_type: &ArcType, arg_count: usize) -> ArcType {
    if arg_count == 0 {
        alias_type.clone()
    } else {
        match alias_type.as_function() {
            Some((_, ret)) => get_return_type(env, ret, arg_count - 1),
            None => {
                match alias_type.as_alias() {
                    Some((id, alias_args)) => {
                        let (args, typ) = match env.find_type_info(&id).map(Alias::deref) {
                            Some(&AliasData { ref args, typ: Some(ref typ), .. }) => (args, typ),
                            Some(&AliasData { .. }) => panic!("ICE: '{:?}' does not exist", id),
                            None => panic!("Unexpected type {:?} is not a function", alias_type),
                        };

                        let typ = types::instantiate(typ.clone(), |gen| {
                            // Replace the generic variable with the type from the list
                            // or if it is not found the make a fresh variable
                            args.iter()
                                .zip(alias_args)
                                .find(|&(arg, _)| arg.id == gen.id)
                                .map(|(_, typ)| typ.clone())
                        });

                        get_return_type(env, &typ, arg_count)
                    }
                    None => {
                        panic!("ICE: Expected function with {} more arguments, found {:?}",
                               arg_count,
                               alias_type)
                    }
                }
            }
        }
    }
}

pub fn is_operator_char(c: char) -> bool {
    "+-*/&|=<>".chars().any(|x| x == c)
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<!-- EN-Revision: 22821 -->
<sect2 id="zend.filter.set.stringtolower">
    <title>StringToLower</title>

    <para>
        Tこのフィルタは、入力を全て小文字に変換します。
    </para>

    <sect3 id="zend.filter.set.stringtolower.options">
        <title>Supported options for Zend_Filter_StringToLower</title>

        <para>
            The following options are supported for
            <classname>Zend_Filter_StringToLower</classname>:
        </para>

        <itemizedlist>
            <listitem>
                <para>
                    <emphasis><property>encoding</property></emphasis>: This option can be used to
                    set an encoding which has to be used.
                </para>
            </listitem>
        </itemizedlist>
    </sect3>

    <sect3 id="zend.filter.set.stringtolower.basic">
        <title>Basic usage</title>

        <para>
            This is a basic example:
        </para>

        <programlisting language="php"><![CDATA[
$filter = new Zend_Filter_StringToLower();

print $filter->filter('SAMPLE');
// "sample" を返します
]]></programlisting>
    </sect3>

    <sect3 id="zend.filter.set.stringtolower.encoding">
        <title>Different encoded strings</title>

        <para>
            デフォルトでは、それはサーバの現時点のロケールで、文字を取り扱うだけです。
            他のcharset由来の文字は、無視されます。
            さらに、mbstring拡張が環境で利用できるとき、
            それらを小文字にすることもできます。
            <classname>StringToLower</classname>フィルタを初期化するときは、
            希望のエンコーディングを設定するだけです。
            または、後でエンコーディングを変更するために、
            <methodname>setEncoding()</methodname>メソッドを使います。
        </para>

        <programlisting language="php"><![CDATA[
// UTF-8 を使用
$filter = new Zend_Filter_StringToLower('UTF-8');

//または、構成を使うときに、役に立つことがありえる配列を与えます
$filter = new Zend_Filter_StringToLower(array('encoding' => 'UTF-8'));

//または後でこのようにします
$filter->setEncoding('ISO-8859-1');
]]></programlisting>

        <note>
            <title>間違ったエンコーディングの設定</title>

            <para>
                あるエンコーディングを設定したくて、mbstring拡張が環境で利用できないとき、
                例外を得ることに注意してください。
            </para>

            <para>
                また、mbstring拡張でサポートされないエンコーディングを設定しようとしているとき、
                例外を得ます。
            </para>
        </note>
    </sect3>
</sect2>


text:
ACCEPTED

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

#### Published in
null

#### Original name
Arundinaria armata Gamble

### Remarks
null


text:
extern const NSInteger kMinWeek;
extern const NSInteger kMaxWeek;

extern NSString *const kAppGroupKeySharedDefaults;
extern NSString *const kUserDefaultsKeyClassList;
extern NSString *const kUserDefaultsKeyLastQuerySelection;
extern NSString *const kUserDefaultsKeyHideNotThisWeekClass;
extern NSString *const kUserDefaultsKeyPartOfSchoolCalendar;
extern NSString *const kUserDefaultsKeyProfileStudentNumber;
extern NSString *const kUserDefaultsKeyProfileName;
extern NSString *const kUserDefaultsKeyProfileGrade;
extern NSString *const kUserDefaultsKeyProfileMajor;
extern NSString *const kUserDefaultsKeyProfileClassName;

extern NSString *const kRLLogoutNotification;
extern NSString *const kRLReloginFailedNotification;
extern NSString *const kRLCurrentWeekProbablyChangedNotification;

extern const NSInteger kErrorCodeInvalidPassword;


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2021 berni3.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<project xmlns="http://maven.apache.org/DECORATION/1.8.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/DECORATION/1.8.0 http://maven.apache.org/xsd/decoration-1.8.0.xsd"
>
    <body>
        <menu name="Overview">
            <item name="Introduction" href="index.html"/>
        </menu>
        <menu ref="reports" />

    </body>
    <skin>
        <groupId>org.apache.maven.skins</groupId>
        <artifactId>maven-fluido-skin</artifactId>
        <version>1.9</version>
    </skin>

</project>


text: <script src="/www/js/doc_page_widgets.js"></script>


text:
/*jslint indent: 2 */
/*global $: false, togglbutton: false*/

(function () {
  'use strict';

  togglbutton.render('li.task.daily:not(.toggl), li.task.habit:not(.toggl), li.task.todo:not(.toggl)',
                     {observe: true}, function (elem) {
      var link,
        text = $('.task-text>markdown', elem).innerText.trim(),
        container = $('.task-meta-controls', elem);

      link = togglbutton.createTimerLink({
        className: 'habitrpg',
        description: text,
        buttonType: 'minimal'
      });

      container.appendChild(link);
    });
}());


text:
'use strict'
//first we import our dependencies…
var express = require('express');
var mongoose = require('mongoose');
var bodyParser = require('body-parser');
const path = require('path');
var Provider = require('../model/provider');
var config = require('../config/config');
//and create our instances
var app = express();

app.use(express.static(path.resolve(__dirname, '../react-ui/build')));

var router = express.Router();

var port = process.env.PORT || 3005;

var mongoDB = config.mongourl;
mongoose.connect(mongoDB, { useMongoClient: true })
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'MongoDB connection error:'));
db.once('open', function() {
  console.log('monogdb is connected and running');
});
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());
app.use(function(req, res, next) {
 res.setHeader('Access-Control-Allow-Origin', '*');
 res.setHeader('Access-Control-Allow-Credentials', 'true');
 res.setHeader('Access-Control-Allow-Methods', 'GET,HEAD,OPTIONS,POST,PUT,DELETE');
 res.setHeader('Access-Control-Allow-Headers', 'Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers');
 res.setHeader('Cache-Control', 'no-cache');
 next();
});
router.get('/', function(req, res) {
 res.json({ message: 'API Initialized!'});
});

//create a hashmap for condition
const validqueryparams = [ 'max_discharges', 'min_discharges', 'max_average_covered_charges', 'min_average_covered_charges', 'min_average_medicare_payments', 'max_average_medicare_payments', 'state', 'selectedvalue' ];
function returnQuery(key, value){
	if(key === 'max_discharges' || key === 'min_discharges'){
		value = parseInt(value,10);
	}else if( key !== 'state'){
		value = parseFloat(value, 10);
	}
	var queryHashmap = {
		'max_discharges' : {
			'totaldischarges' : { "$lte" : value }
		},
		'min_discharges' : {
			'totaldischarges' : { "$gte" : value }
		},
		'max_average_covered_charges': {
			'avgcoveredcharges' : { "$lte" : value }
		},
		'min_average_covered_charges': {
			'avgcoveredcharges' : { "$gte" : value }
		},
		'max_average_medicare_payments': {
			'avgmedicarepayments' : { "$lte" : value }
		},
		'min_average_medicare_payments': {
			'avgmedicarepayments' : { "$gte" : value }
		},
		'state': {
			'providerstate' : value
		}
	}
	return queryHashmap[key] || {};
}
router.route('/providers')
.get(function(req, res) {
  const queryparams = req.query;
  const fieldstoshow = req.query.selectedvalue ? req.query.selectedvalue.split(',') : [];
	var validquery = true;
	var databasequery = {};
	var fieldstoshowquery = { '_id': 0 };
	for(var i=0;i<fieldstoshow.length;i++){
		let field = fieldstoshow[i];
		fieldstoshowquery[field] = 1;
	}
	var resData = {
		success: false,
		message: '',
		data: []
	}

	if(Object.keys(queryparams).length > 0 && queryparams.constructor === Object){
		for(var key in queryparams){
			if(validqueryparams.indexOf(key) === -1){
				validquery = false;
				break;
			}
		}
		if(validquery){
			databasequery["$and"]=[];
			for(var key in queryparams){
				databasequery["$and"].push(returnQuery(key, queryparams[key]));
			}
		}
	}
	if(validquery){
		Provider.find(databasequery, fieldstoshowquery, function(err, data) {
			if (err){
	    	console.log('there is error while executing mongo query', err);
	    	resData.success = false;
	    	resData.message = err;
	      res.send(resData);
	    }
	    resData.success = true;
	    resData.data = data;
	    if(data && data.length){
	    	resData.message = 'data recieved';
	    }else{
	    	resData.message = 'no data';
	    }
	    console.log(resData.data.length);
	    res.send(resData);
	  });
	}else{
		resData.message = 'the query is invalid';
		res.send(resData)
	}
})

app.use('/', router);
//starts the server and listens for requests
app.get('*', function(request, response) {
  response.sendFile(path.resolve(__dirname, '../react-ui/build', 'index.html'));
});
app.listen(port, function() {
 console.log(`api running on port ${port}`);
});

module.exports = app; // for testing


text:
//------------------------------------------------------------------------------
// <copyright>
//     Copyright (c) Microsoft Corporation. All Rights Reserved.
// </copyright>
//------------------------------------------------------------------------------

using System;
using System.Globalization;
using System.Text;
using System.Threading;
using Microsoft.ServiceBus.Messaging;

namespace TollApp
{
    public class Program
    {
        private static Timer timer;

        public static void Main()
        {
            if (string.IsNullOrEmpty(Environment.EventHubConnectionString))
            {
                Console.WriteLine("Please specify Service Bus connection string in the App.config file");
                return;
            }

            SendData(Environment.EventHubConnectionString, Environment.EntryEventHubPath, Environment.ExitEventHubPath);

        }

        public static void SendData(string serviceBusConnectionString, string entryHubName, string exitHubName)
        {
            var entryEventHub = EventHubClient.CreateFromConnectionString(serviceBusConnectionString, entryHubName);
            var exitEventHub = EventHubClient.CreateFromConnectionString(serviceBusConnectionString, exitHubName);

            var timerInterval = TimeSpan.FromSeconds(1);
            var generator = TollDataGenerator.Generator();

            TimerCallback timerCallback = state =>
            {
                var startTime = DateTime.UtcNow;
                generator.Next(startTime, timerInterval, 5);

                foreach (var e in generator.GetEvents(startTime))
                {
                    if (e is EntryEvent)
                    {
                        entryEventHub.Send(
                           new EventData(Encoding.UTF8.GetBytes(e.Format()))
                                    {
                                        PartitionKey = e.TollId.ToString(CultureInfo.InvariantCulture)
                                    });
                    }
                    else
                    {
                        exitEventHub.Send(
                           new EventData(Encoding.UTF8.GetBytes(e.Format()))
                           {
                               PartitionKey = e.TollId.ToString(CultureInfo.InvariantCulture)
                           });
                    }
                }

                timer.Change((int)timerInterval.TotalMilliseconds, Timeout.Infinite);
            };

            timer = new Timer(timerCallback, null, Timeout.Infinite, Timeout.Infinite);
            timer.Change(0, Timeout.Infinite);

            Console.WriteLine("Sending event hub data... Press Ctrl+c to stop.");

            var exitEvent = new ManualResetEvent(false);
            Console.CancelKeyPress += (sender, eventArgs) =>
            {
                Console.WriteLine("Stopping...");
                eventArgs.Cancel = true;
                exitEvent.Set();
            };

            exitEvent.WaitOne();
            Console.WriteLine("Shutting down all resources...");
            timer.Change(Timeout.Infinite, Timeout.Infinite);
            Thread.Sleep(timerInterval);
            timer.Dispose();
            entryEventHub.Close();
            exitEventHub.Close();
            Console.WriteLine("Stopped.");
        }
    }
}


text:
namespace content_settings {

ContentSettingsInfo::ContentSettingsInfo(
    const WebsiteSettingsInfo* website_settings_info,
    const std::vector<std::string>& whitelisted_schemes)
    : website_settings_info_(website_settings_info),
      whitelisted_schemes_(whitelisted_schemes) {}

ContentSettingsInfo::~ContentSettingsInfo() {}

}  // namespace content_settings


text:
<?php

namespace Drupal\entity\Plugin\Derivative;

use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Provides local tasks for the revision overview.
 */
class RevisionsOverviewDeriver extends DeriverBase implements ContainerDeriverInterface {

  /**
   * The entity type manager.
   *
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;

  /**
   * Creates a new RevisionsOverviewDeriver instance.
   *
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
   *   The entity type manager.
   */
  public function __construct(EntityTypeManagerInterface $entityTypeManager) {
    $this->entityTypeManager = $entityTypeManager;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, $base_plugin_id) {
    return new static(
      $container->get('entity_type.manager')
    );
  }

  /**
   * {@inheritdoc}
   */
  public function getDerivativeDefinitions($base_plugin_definition) {
    $exclude = ['node'];

    $this->derivatives = [];
    foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) {
      if (in_array($entity_type_id, $exclude)) {
        continue;
      }

      if (!$entity_type->hasLinkTemplate('version-history')) {
        continue;
      }

      $this->derivatives[$entity_type_id] = [
        'route_name' => "entity.$entity_type_id.version_history",
        'title' => t('Revisions'),
        'base_route' => "entity.$entity_type_id.canonical",
        'weight' => 20,
      ] + $base_plugin_definition;
    }

    return parent::getDerivativeDefinitions($base_plugin_definition);
  }

}


text:
/* global redux_change, reduxSliders */
jQuery(document).ready(function() {
	jQuery('.redux_slider').each(function() {
		//slider init
		var slider = reduxSliders[jQuery(this).attr('rel')];

		jQuery(this).slider({
			value: parseInt(slider.val, null),
			min: parseInt(slider.min, null),
			max: parseInt(slider.max, null),
			step: parseInt(slider.step, null),
			range: "min",
			slide: function(event, ui) {
				var input = jQuery("#" + slider.id);
				input.val(ui.value);
				redux_change(input);
			}
		});

		// Limit input for negative
		var neg = false;
		if (parseInt(slider.min, null) < 0) {
			neg = true;
		}

		jQuery(".slider-input").numeric({
			negative: neg,
			min: slider.min,
			max: slider.max
		});

	});

	// Update the slider from the input and vice versa
	jQuery(".slider-input").keyup(function() {

		jQuery(this).addClass('sliderInputChange');

	});

	// Update the slider from the input and vice versa
	jQuery(".slider-input").focus(function() {

		if ( !jQuery(this).hasClass('sliderInputChange') ) {
			return;
		}
		jQuery(this).removeClass('sliderInputChange');

		var slider = reduxSliders[jQuery(this).attr('id')];
		var value = jQuery(this).val();
		if (value > slider.max) {
			value = slider.max;
		} else if (value < slider.min) {
			value = slider.min;
		}

		jQuery('#' + slider.id + '-slider').slider("value", value);
		jQuery("#" + slider.id).val(value);

	});

	jQuery('.slider-input').typeWatch({
		callback:function(value){

			if ( !jQuery(this).hasClass('sliderInputChange') ) {
				return;
			}
			jQuery(this).removeClass('sliderInputChange');

			var slider = reduxSliders[jQuery(this).attr('id')];
			if (value > slider.max) {
				value = slider.max;
			} else if (value < slider.min) {
				value = slider.min;
			}

			jQuery('#' + slider.id + '-slider').slider("value", value);
			jQuery("#" + slider.id).val(value);

		},
		wait:400,
		highlight:false,
		captureLength:1
	});

});


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="HandheldFriendly" content="true" />
  <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
  <meta name="MobileOptimized" content="width" />
  <meta http-equiv="cleartype" content="on" />
  <meta http-equiv="ImageToolbar" content="false" />
  <meta name="viewport" content="width=device-width" />
  <meta name="version" content="20161218" />

  <meta name="DC.description" content="" />
  <meta name="DC.title" content="" />
  <title>
  Risks to Northern Alaskan Inupiat: Assessing Potential Effects of Oil Contamination on Subsistence Lifestyles, Health, and Nutrition|

  Research Project Database | Grantee Research Project | ORD | US EPA</title>

  <meta name="keywords" content="" />
  <link rel="shortlink" href="" />
  <link rel="canonical" href="" />
  <meta name="DC.creator" content="" />
  <meta name="DC.language" content="en" />
  <meta name="DC.Subject.epachannel" content="" />
  <meta name="DC.type" content="" />
  <meta name="DC.date.created" content="" />
  <meta name="DC.date.modified" content="2003-12-11" />

  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" />
  <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" />

	<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" />
	<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" />
	<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />

Jump to main content

  <hgroup class="site-name-and-slogan">

US EPA

United States Environmental Protection Agency

  </hgroup>
  <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch">
    Search
    <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/>
    <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button>
    <input type="hidden" name="fld" value="" />
    <input type="hidden" name="areaname" value="" />
    <input type="hidden" name="areacontacts" value="" />
    <input type="hidden" name="areasearchurl" value="" />
    <input type="hidden" name="typeofsearch" value="epa" />
    <input type="hidden" name="result_template" value="2col.ftl" />
    <input type="hidden" name="filter" value="sample4filt.hts" />
  </form>

Contact Us

Project Research Results

Final Report

                      13 publications for this project

Related Information

Research Grants

P3: Student Design Competition

Research Fellowships

Small Business Innovation Research (SBIR)

Grantee Research Project Results Search

      Risks to Northern Alaskan Inupiat: Assessing Potential Effects of Oil Contamination on Subsistence Lifestyles, Health, and Nutrition

    EPA Grant Number: R831045

    Title: Risks to Northern Alaskan Inupiat: Assessing Potential Effects of Oil Contamination on Subsistence Lifestyles, Health, and Nutrition

    Investigators:
     Wetzel, Dana L.
        ,  Hepa, Taqulik
        ,  O'Hara, Todd M.
        ,  Reynolds, John E.
        ,  Willetto, Carla

    Institution:

      Mote Marine Laboratory

    	EPA Project Officer:

           Manty, Dale

      Project Period:
      August 1, 2003 through
        July 1, 2006

        Project Amount:

          $437,399

      RFA:
      Lifestyle and Cultural Practices of Tribal Populations and Risks from Toxic Substances in the Environment (2002)

        		RFA Text |
          Recipients Lists

      Research Category:

          Environmental Justice
          ,
          Global Climate Change
          ,
          Tribal Environmental Health Research
          ,
          Health
          ,
          Safer Chemicals

Description:

Scientists have focused on potential effects of toxic
    substances on Native populations with subsistence lifestyles in the Arctic.
    Risks from toxicant exposures range from direct health hazards to changes
  in lifestyle that may impair nutrition and health. Petroleum hydrocarbons may
    enter the Arctic environment in a variety of ways. Oil and gas production
  in
    the Arctic occurs at a high level and may increase. Petroleum can enter humans
    through species that form a major part of the Inupiat diet in northern Alaska.
    In Barrow, 75% of Inupiat households consume bowhead whale (Balaena mysticetus),
    and nearly 50% consume bearded seals (Erignathus barbatus). Marine mammals
    are exposed to petroleum directly or through their diet and may metabolically
    transform petroleum-related compounds. Based on toxicological properties,
  polycyclic aromatic hydrocarbons (PAHs) in the human diet should be investigated.
  Limited
    information is available on the extent to which: a) species eaten by the
  Inupiat are exposed to and contaminated by petroleum; b) contamination may
  cause Inupiat
    households to avoid eating traditional foods; and c) handling and preparation
  of foods affect levels of ingested PAHs.

Objective:

Our proposal involves Inupiat leaders and diverse
  scientists to: a) characterize levels of PAHs in a range of tissues from bowhead
  whales and
  bearded seals; b) characterize PAH levels in meat and other food items following
  their handling and preparation for consumption; c) document "traditional biomarkers"
  (e.g., odors) that Native hunters and field scientists use to accept or reject
  tissues for consumption following harvest; d) assess chemical or histological
  assays that could serve as low cost biomarkers of exposure; e) use published
  information and results of this study to develop a risk assessment model incorporating
  both health risks associated with ingestion of petroleum-related compounds
  and cultural and nutritional risks related to avoidance of certain foods; and
  f) develop outreach and public awareness programs to inform residents in northern
Alaska of issues, potential consequences, and options.

Approach:

We will acquire specimen materials from bowhead whales and bearded
      seals taken during the subsistence harvest. At harvest, traditional observations
      and traditional knowledge will be recorded regarding perceptions of the
  quality of the meat and organs. Samples will be analyzed using gas chromatography-mass
      spectrometry for various PAHs. In addition, samples of meat and blubber
  will
      be marked and re-analyzed following a six-month storage period and preparation
      in traditional ways. Biochemical, metabolic, and histological assays will
      assess exposure of free-ranging whales and seals. Once a risk assessment
      model is developed and evaluated, appropriate Native spokespersons will
  work with the scientists to develop and disseminate information to towns and
  villages
      about risks associated with oil-related pollution and consumption of whale
  and seal meat.

Expected Results:

The unusual combination of traditional knowledge,
  powerful scientific analyses, and integrative modeling, will permit our development
  of outreach tools and messages, delivered by appropriate Native spokespersons,
  to empower Alaskan Inupiats with insights and information that will allow them
  to choose options to reduce their risk from PAH exposure and to maintain good
  nutrition and health.

Publications and Presentations:

        Publications have been submitted on this project: View all 13 publications for this project

Supplemental Keywords:

      human health; indicators; community-based; environmental chemistry; zoology; toxicology; North Slope, AK; food processing., Health, Scientific Discipline, Geographic Area, HUMAN HEALTH, Health Risk Assessment, Exposure, State, Risk Assessments, PAH, Inupiat, human exposure, toxic environmental contaminants, Alaska (AK), dietary exposure, biomarker based exposure inference, human health risk

Progress and Final Reports:

                Final Report

Top of Page

 The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA.  Conclusions drawn by the principal investigators have not been reviewed by the Agency.

Main menu

Environmental Topics

Laws & Regulations

About EPA

Discover.

Accessibility

EPA Administrator

Budget & Performance

Contracting

Grants

No FEAR Act Data

Privacy and Security

Connect.

Data.gov

Inspector General

Jobs

Newsroom

Open Government

Regulations.gov

Subscribe

USA.gov

White House

Ask.

Contact Us

Hotlines

FOIA Requests

Frequent Questions

Follow.

Facebook

Twitter

YouTube

Flickr

Instagram

Last updated on Thursday, December 11, 2003


text:
package net.arpcentral.pizzadoh;
import android.app.Application;

import java.lang.reflect.Array;
import java.util.ArrayList;

/**
 * Created by jarp on 6/15/16.

 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
 switch (item.getItemId()) {
 case R.id.action_settings:
 // User chose the "Settings" item, show the app settings UI...
 return true;

 case R.id.action_favorite:
 // User chose the "Favorite" action, mark the current item
 // as a favorite...
 return true;

 default:
 // If we got here, the user's action was not recognized.
 // Invoke the superclass to handle it.
 return super.onOptionsItemSelected(item);

 }
 }
 */


text:
package org.sklsft.generator.skeletons.angular.commands.pages.modal;

import java.io.File;
import java.io.IOException;

import org.sklsft.generator.model.domain.business.OneToMany;
import org.sklsft.generator.skeletons.commands.impl.typed.ScssFileWriteCommand;

public class ScssOneToManyModalComponentFileWriteCommand extends ScssFileWriteCommand {

	private OneToMany oneToMany;
	/*
	 * constructor
	 */
	public ScssOneToManyModalComponentFileWriteCommand(OneToMany oneToMany) {

		super(oneToMany.referenceBean.myPackage.model.project.workspaceFolder + File.separator + oneToMany.parentBean.myPackage.model.tsUiArtefactName + File.separator + oneToMany.parentBean.myPackage.tsComponentsPath + File.separator + oneToMany.parentBean.urlPiece + File.separator + oneToMany.referenceBean.urlPiece + File.separator + "modal", oneToMany.referenceBean.urlPiece + "-modal.component");

		this.oneToMany = oneToMany;

	}

	@Override
	protected void writeContent() throws IOException {

        writeLine("/**");
        writeLine(" * auto generated one to many modal component scss file");
        writeLine(" *
write modifications between specific code marks");
        writeLine(" *
processed by skeleton-generator");
        writeLine(" */");

        writeNotOverridableContent();

	}
}


text:
namespace BookShop.WebApi.Models
{
    using BookShop.WebApi.Infrastructure.ModelsMapping;
    using Microsoft.AspNet.Identity.EntityFramework;

    public class RoleBindingModel : IMapFrom<IdentityRole>
    {
        public string Name { get; set; }
    }
}


text:
function load_secrets {
  local SHELL_SECRETS="$HOME/.shell_secrets.asc"
  if [ -r "$SHELL_SECRETS" ]; then
    eval `gpg -d "$SHELL_SECRETS"`
  fi
}

# I would much rather this be an alias. See https://github.com/NAR8789/shell-secrets/issues/12
function los { load_secrets "$@"; }

function with_secrets {
  (
    load_secrets
    "$@"
  )
}

# I would much rather this be an alias. See https://github.com/NAR8789/shell-secrets/issues/12
function ws { with_secrets "$@"; }


text:
package de.ahus1.lottery.adapter.dropwizard;

import de.ahus1.keycloak.dropwizard.KeycloakBundle;
import de.ahus1.keycloak.dropwizard.KeycloakConfiguration;
import de.ahus1.lottery.adapter.dropwizard.resource.DrawRessource;
import de.ahus1.lottery.adapter.dropwizard.resource.WhoamiRessource;
import io.dropwizard.Application;
import io.dropwizard.assets.AssetsBundle;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import io.dropwizard.views.ViewBundle;
import org.keycloak.enums.TokenStore;

public class LotteryApplication extends Application<LotteryConfiguration> {
    public static void main(String[] args) throws Exception {
        new LotteryApplication().run(args);
    }

    @Override
    public String getName() {
        return "lottery";
    }

    @Override
    public void initialize(Bootstrap<LotteryConfiguration> bootstrap) {

        // set up folders for static content
        bootstrap.addBundle(new AssetsBundle("/assets/ajax", "/ajax", null, "ajax"));

        // setup Freemarker views - this is only needed for the WhoamiResource when in non-bearer-only-mode
        bootstrap.addBundle(new ViewBundle());

        // tag::keycloak[]
        bootstrap.addBundle(new KeycloakBundle<LotteryConfiguration>() {
            @Override
            protected KeycloakConfiguration getKeycloakConfiguration(LotteryConfiguration configuration) {
                return configuration.getKeycloakConfiguration();
            }
            /* OPTIONAL: override getUserClass(), createAuthorizer() and createAuthenticator() if you want to use
             * a class other than de.ahus1.keycloak.dropwizard.User to be injected by @Auth */
        });
        // end::keycloak[]
    }

    @Override
    public void run(LotteryConfiguration configuration, Environment environment) {

        environment.jersey().register(new DrawRessource());

        boolean isUsingCookieStore = configuration.getKeycloakConfiguration().getTokenStore() != null
                && configuration.getKeycloakConfiguration()
                .getTokenStore().equalsIgnoreCase(TokenStore.COOKIE.toString());
        environment.jersey().register(new WhoamiRessource(isUsingCookieStore));

    }
}


text:
import unittest
from unittest import TestCase
from ..wiki_model import WikiModel
import numpy

class WikiModelTest(TestCase):
    def test_loads_training_data(self):
        wikimodel = WikiModel()
        self.assertIsNotNone(wikimodel.classifier)

    def test_classify_url(self):
        wikimodel = WikiModel()
        domain = "https://en.wikipedia.org"
        url = "/wiki/Q-learning"
        probs = wikimodel.classify_url(domain, url)
        self.assertEqual('/wiki/Category:Machine_learning_algorithms',
                         wikimodel.reverse_label_map[numpy.argmax(probs)])

if __name__ == '__main__':
    unittest.main()