text:
var parser = require('../lib/parser')
  , fs = require('fs')
  , path = require('path')
  , exec = require('child_process').exec
  , should = require('should')
  , async = require('async')
  , _ = require('underscore');

/*
 * tests the parser
 */
var fixturesDir = __dirname + '/fixtures/';
var workingDir = process.cwd();

describe('parser', function() {

  describe('for a procfile', function(done) {
    it('should return the procfile contents as an object', function(done) {
      var fileContent = "server1: node path/to/foo.js\nserver2: node path/to/bar.js";
      parser.parseProcfile(fileContent, function(procOpts) {
	procOpts.should.eql({
	  'server1': 'node path/to/foo.js',
	  'server2': 'node path/to/bar.js'
	});
	done();
      });
    });
  });

  describe('for concurrency cli options', function() {
    it('should return the options as an object', function(done) {
      var cmdOptions = {concurrency: 'server1=2,server2=5'};
      var parsedOpt = parser.parseConcurrencyOpts(cmdOptions);
      parsedOpt.should.eql({
	'server1': 2,
	'server2': 5
      });
      done();
    });
  });

  describe('for template cli options', function() {
    it('should return the options as an object', function(done) {
      var templateOpt = 'run=/path/to/run.mustache,log_run=another/path/to/alt.mustache';
      var parsedOpt = parser.parseTemplateOpts(templateOpt);
      parsedOpt.should.eql({
	run: '/path/to/run.mustache',
	log_run: 'another/path/to/alt.mustache'
      });
      done();
    });
  });

  describe('for environment cli options', function() {
    before(function(done) {
      var cmd = 'cp ' + fixturesDir + 'env ' + workingDir + '/.env';
      var cp = exec(cmd, function(err, stdout, stderr) {
	if (err) { console.log(err); }
	done();
      });
    });

    after(function(done) {
      var cmd = 'rm ' + workingDir + '/.env';
      var rm = exec(cmd, function(err, stdout, stderr) {
	if (err) { console.log(err); }
	done();
      });
    });

    it('should return the options as an object', function(done) {
      var parsedOpt = parser.parseEnvOpts({});
      parsedOpt.should.eql({
	'SERVER_MSG': 'I am the server. I listen to port:'
      });
      done();
    });
  });

  describe('for working directory cli options', function() {
    it('should return the normalized working directory', function(done) {
      var cmdOptions = {directory: 'scripts'};
      var parsedOpt = parser.cmdWorkingDir(cmdOptions);
      parsedOpt.should.eql('scripts');
      done();
    });

    it('should return the current working directory', function(done) {
      var parsedOpt = parser.cmdWorkingDir({});
      parsedOpt.should.eql(process.cwd());
      done();
    });

    it('should return the procfile working directory', function(done) {
      var cmdOptions = {procfile: fixturesDir + 'Procfile'};
      var parsedOpt = parser.cmdWorkingDir(cmdOptions);
      fixturesDir.should.eql(parsedOpt + '/');
      done();
    });
  });

  describe('for watch files cli options', function() {
    it('should return the options as an object', function(done) {
      var cmdOptions = {watch: 'server1=scripts/server.js,server2=scripts/server.js'};
      var parsedOpt = parser.parseWatchFileOpts(cmdOptions);
      parsedOpt.should.eql({
	'server1': process.cwd() + '/scripts/server.js',
	'server2': process.cwd() + '/scripts/server.js'
      });
      done();
    });
  });

  describe('for running child processes', function() {
    it('should return an array of running processes that matches the process name', function(done) {
      var processName = 'server1';
      var childProcs = {
	'server1-0': 'foo',
	'server1-1': 'bar',
	'server1-2': 'baz',
	'server2-0': 'boo',
	'server2-1': 'far',
	'server2-2': 'faz'
      };
      var parsedOpt = parser.matchingProcesses(processName, childProcs);
      parsedOpt.should.eql(['server1-0', 'server1-1', 'server1-2']);
      done();
    });
  });

  describe('for inline variables in a command', function() {
    it('should return the options as an object', function(done) {
      var command = 'FOO=1 bar=2 TAR=pink node BIN=5 foo.js HOO=har';
      var parsedOpt = parser.parseInlineVariables(command);
      parsedOpt.should.eql({
	bar: '2',
	TAR: 'pink',
	BIN: '5',
	FOO: '1',
	HOO: 'har'
      });
      done();
    });
  });

});


text:
package com.yammer.backups.healthchecks.file;

import com.yammer.backups.api.CompressionCodec;
import com.yammer.backups.api.Location;
import com.yammer.backups.api.metadata.BackupMetadata;
import com.yammer.backups.processor.ServiceRegistry;
import com.yammer.backups.storage.metadata.MetadataStorage;
import com.yammer.backups.storage.metadata.memory.InMemoryMetadataStorage;
import com.yammer.storage.file.FileStorage;
import org.junit.Before;
import org.junit.Test;

import java.io.IOException;
import java.util.UUID;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class MissingBackupsHealthCheckTest {

    private static BackupMetadata createBackup(String service, BackupMetadata.State state) {
        final BackupMetadata backup = new BackupMetadata(service, UUID.randomUUID().toString(), "localhost");

        // Give the backup a file
        backup.setState(BackupMetadata.State.RECEIVING, "test");
        backup.addChunk("test1", "test1-id-1", 1000, 800, "hash", "localhost", CompressionCodec.SNAPPY);

        backup.addLocation(Location.LOCAL);
        backup.addLocation(Location.OFFSITE);

        backup.setState(state, "test");
        return backup;
    }

    private MetadataStorage<BackupMetadata> metadataStorage;
    private FileStorage fileStorage;
    private MissingBackupsHealthCheck healthcheck;
    private final ServiceRegistry serviceRegistry = mock(ServiceRegistry.class);

    @Before
    public void setUp() {
        metadataStorage = new InMemoryMetadataStorage<>();

        fileStorage = mock(FileStorage.class);
        healthcheck = new MissingBackupsHealthCheck(metadataStorage, fileStorage, Location.LOCAL, "localhost", serviceRegistry);
    }

    @Test
    public void testNoBackups() throws Exception {
        assertTrue(healthcheck.check().isHealthy());
    }

    @Test
    public void testMissingPendingBackups() throws IOException {
        when(fileStorage.exists(anyString(), anyString())).thenReturn(false);

        metadataStorage.put(createBackup("feedie", BackupMetadata.State.WAITING));
        metadataStorage.put(createBackup("feedie", BackupMetadata.State.RECEIVING));
        metadataStorage.put(createBackup("feedie", BackupMetadata.State.QUEUED));
        metadataStorage.put(createBackup("feedie", BackupMetadata.State.UPLOADING));

        when(serviceRegistry.healthCheckDisabled(anyString())).thenReturn(false);

        assertTrue(healthcheck.check().isHealthy());
    }

    @Test
    public void testMissingFinishedBackupsTriggersHealthcheck() throws IOException {
        when(fileStorage.exists(anyString(), anyString())).thenReturn(false);

        metadataStorage.put(createBackup("feedie", BackupMetadata.State.FINISHED));

        when(serviceRegistry.healthCheckDisabled(anyString())).thenReturn(false);

        assertFalse(healthcheck.check().isHealthy());
    }

    @Test
    public void testExistingFinishedBackups() throws IOException {
        when(fileStorage.exists(anyString(), anyString())).thenReturn(true);

        metadataStorage.put(createBackup("feedie", BackupMetadata.State.FINISHED));

        when(serviceRegistry.healthCheckDisabled(anyString())).thenReturn(false);

        assertTrue(healthcheck.check().isHealthy());
    }

    @Test
    public void testServiceHealthcheckDisabled() throws IOException {
        when(fileStorage.exists(anyString(), anyString())).thenReturn(false);

        metadataStorage.put(createBackup("feedie", BackupMetadata.State.FINISHED));

        when(serviceRegistry.healthCheckDisabled(anyString())).thenReturn(true);

        assertTrue(healthcheck.check().isHealthy());
    }
}

redpajama_set_name: RedPajamaGithub


text:
Here is an overview of the **cloud.iO architecture** and **components**:

Cloud.iO architecture

The **cloud.iO cluster** is composed of the **cloud.iO microservices** and well known open source components.

## Cloud.iO microservices

The **cloud.iO microservices** are written in [Kotlin](https://kotlinlang.org/), using the [Spring Framework](https://spring.io).

---

Write concise and expressive code while maintaining full compatibility and interoperability with Java.

*Source: https://kotlinlang.org*

---

---

	With its versatile set of features, Spring is the world's most popular Java framework. When it's paired with Kotlin, and its concise syntax,
	the two make the ultimate combo for application development.

*Source: https://kotlinlang.org/lp/server-side/*

---

## Message Broker

**Cloud.iO** uses [RabbitMQ](https://www.rabbitmq.com/) as **message broker**:

---

With tens of thousands of users, RabbitMQ is one of the most popular open source message brokers. From T-Mobile to Runtastic, RabbitMQ is used worldwide at small startups and large enterprises.

RabbitMQ is lightweight and easy to deploy on premises and in the cloud. It supports multiple messaging protocols. RabbitMQ can be deployed in distributed and federated configurations to meet high-scale, high-availability requirements.

RabbitMQ runs on many operating systems and cloud environments, and provides a wide range of developer tools for most popular languages.

*Source: https://www.rabbitmq.com/*

---
## Time Series Database *(TSDB)*

**Cloud.iO** uses [InfluxDB](https://www.influxdata.com/products/influxdb-overview/) as **time series database**:

---

InfluxDB is the open source time series database that is community supported. As a single-node, it is easy to deploy on the edge, locally on a laptop, or on a server for development.

*Source: https://www.influxdata.com/*

---

## Object-Relational Database *(ORDB)*

**Cloud.iO** uses [PostgreSQL](https://www.postgresql.org/) as **object-relational database**:

---

PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

*Source: https://www.postgresql.org/*

---


text:
'use strict';

const path        = require('path');
const fs          = require('fs');

const schema      = require('./schema.js');
const arn         = require('./arn.js');
const tryLoad     = require('./try-load.js');

const rootName = 'resource';

const resource = module.exports = {
  load: function() {
    let cwd = global.betty.utils.cwd;
    let jsVersion = path.join(cwd, `${rootName}.js`);
    let jsonVersion = path.join(cwd, `${rootName}.json`);
    let resources = path.join(cwd, `resources.json`);
    let resourceJs = tryLoad.js(jsVersion);
    let resourceJson = tryLoad.json(jsonVersion);
    if (resourceJs) {
      global.config = resourceJs;
      global.config_type = 'js';
    }
    else if (resourceJson) {
      global.config = resourceJson;
      global.config_type = 'json';
    }
    else {
      global.config = {};
      global.config_type = null;
    }
    config.resources = Object.assign({}, config.resources, tryLoad.json(resources));
    config.configuration = config.configuration || {};
    resource.validate(config);
  },

  writeResources: function() {
    let cwd = global.betty.utils.cwd;
    let target;
    let json;
    switch (global.config_type) {
      case 'js':
        target = path.join(cwd, `resources.json`);
        json = global.config.resources;
      break;
      case 'json':
        target = path.join(cwd, `resource.json`);
        json = global.config;
      break;
    }
    if (target && json) {
      fs.writeFileSync(target, JSON.stringify(json, null, 2));
    }
  },

  validate: function(data) {
    let valid = schema.validate('resource', data);
    if (!valid) {
      let err = new Error('validation failed');
      global.log.warn({ data }, 'data failing validation');
      global.log.error({ errors: schema.errors }, 'schema validation failed');
      err.validationErrors = schema.errors;
      throw err;
    }
    return valid;
  },
};


text:
package com.nucleus;

/**
 * Very simple logger that prints a message.
 *
 * @author Richard Sahlin
 *
 */
public class SimpleLogger {

    private static Logger logger;

    public interface Logger {
        /**
         * Logs a message for the specified class, the class name will be used as tag.
         *
         * @param clazz
         * @param message
         */
        public void d(Class clazz, String message);

        /**
         * Logs a message for the specified tag.
         *
         * @param tag
         * @param message
         */
        public void d(String tag, String message);

    }

    /**
     * Sets the logger implementation to use, must be called before any message is logged.
     *
     * @param logger
     */
    public static void setLogger(Logger logger) {
        SimpleLogger.logger = logger;
    }

    /**
     * Logs a message for the specified class.
     *
     * @param clazz
     * @param message
     * @throws NullPointerException If logger has not been set by calling {@link #setLogger(Logger)}
     */
    public static void d(Class clazz, String message) {
        logger.d(clazz, message);
    }

    /**
     * Logs a message for the tag
     *
     * @param tag
     * @param message
     */
    public static void d(String tag, String message) {
        logger.d(tag, message);
    }

}


text:
//
//  baseTableViewController.h
//  Pods
//
//  Created by yangshiyu on 16/5/14.
//
//

#import "baseViewController.h"

@class baseMutableDataSource;

@interface baseTableViewController : baseViewController<UITableViewDelegate>

/**
 *  是否采用layout计算cell高度
 */
@property (nonatomic, assign) BOOL isAutolayout;

/**
 *  tableview
 */
@property (nonatomic, strong) UITableView *tableView;

/**
 *  数据源
 */
@property (nonatomic, strong) baseMutableDataSource *dataSource;

/**
 *  空视图, 默认会有一个空视图
 */
@property (nonatomic, strong) UIView *emptyView;

/**
 *  重新加载列表界面
 *
 *  @param dataSource 数据源
 */
- (void)reloadPages:(baseMutableDataSource *)dataSource;
@end


text:
include("../src/MechaJulia.jl")

MechaJulia.check_pr_ok()


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycologia 4(4): 166 (1912)

#### Original name
Marasmius magnisporus Murrill

### Remarks
null


text:
export class ResponseBase {
  success: boolean;
  message: string;
  data: {} | any[];
}

export class Entity {
  id: any;
}


text:
MonoClass* mono_class_find(MonoImage *image, char *sig);
MonoMethod* mono_method_find(MonoClass *klass, char *method_name, MonoType
**argTypes, int nargs);

#endif


text:
module Geocoder

  class Error < StandardError
  end

  class ConfigurationError < Error
  end

  class OverQueryLimitError < Error

  end

  class RequestDenied < Error
  end

  class InvalidRequest < Error
  end

  class InvalidApiKey < Error
  end

end


text:
module.exports = function cleanWhitespace(node, item, list) {
    // remove when first or last item in sequence
    if (item.next === null || item.prev === null) {
        list.remove(item);
        return;
    }

    // remove when previous node is whitespace
    if (item.prev.data.type === 'WhiteSpace') {
        list.remove(item);
        return;
    }

    if ((this.stylesheet !== null && this.stylesheet.children === list) ||
        (this.block !== null && this.block.children === list)) {
        list.remove(item);
        return;
    }
};


text:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <PreferenceCategory
        android:title="Sensing"
        android:key="pref_key_calibration_settings">
        <com.test.devanshk.proximitytest.WaveTimePreference
            android:title="Calibrate Hand Wave"
            android:key="pref_key_wave_time"/>

        <com.test.devanshk.proximitytest.ShakePreference
            android:title="Calibrate Shake"
            android:key="pref_key_shake_dif"/>
    </PreferenceCategory>

    <PreferenceCategory
        android:title="Bonus"
        android:key="pref_key_bonus_settings">

        <CheckBoxPreference
            android:title="Vibrate"
            android:key="vibrate"
            android:summary="Every time an action is triggered"/>

        <EditTextPreference
            android:title="Vibration Duration"
            android:key="vibration_time"
            android:inputType="number"
            android:dependency="vibrate"/>

    </PreferenceCategory>
</PreferenceScreen>


text:
class CreateAnswersTable < ActiveRecord::Migration
  def change
    create_table :answers do |t|
      t.integer :completion_id, null: false
      t.integer :choice_id, null: false

      t.timestamps null: false
    end
  end
end


text:
package org.codehaus.groovy.grails.commons.metaclass;

import java.util.Date;

import junit.framework.TestCase;

public class DynamicMethodsTests extends TestCase {

    /*
     * Test method for 'org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicConstructor.isArgumentsMatch(Object[])'
     */
    public void testIsArgumentsMatch() {
        DynamicConstructor dc = new AbstractDynamicConstructor(new Class[]{String.class, Integer.class}) {
            @SuppressWarnings("rawtypes")
            public Object invoke(Class clazz, Object[] args) {
                return null;
            }
        };

        assertTrue(dc.isArgumentsMatch(new Object[]{"test", 1}));
        assertFalse(dc.isArgumentsMatch(new Object[]{"test"}));
        assertFalse(dc.isArgumentsMatch(new Object[]{"test", new Date()}));
        assertFalse(dc.isArgumentsMatch(new Object[]{"test", 1, "test"}));
    }

    public void testInvokeConstructor() {
        DynamicMethods dm = new AbstractDynamicMethods() {/*empty*/};
        dm.addDynamicConstructor(new AbstractDynamicConstructor(new Class[]{String.class, Integer.class}) {
            @SuppressWarnings("rawtypes")
            public Object invoke(Class clazz, Object[] args) {
                return args[0]+""+args[1];
            }
        });
        InvocationCallback callback = new InvocationCallback();
        Object result = dm.invokeConstructor(new Object[]{"test", 1},callback);

        assertTrue(callback.isInvoked());
        assertNotNull(result);
        assertEquals("test1",result);
    }
}


text:
from numpy.linalg import norm
from numpy import sign, Inf
from util import shrinkage
import cvxpy as cp

"""
Abstract reg class and canonical regularizer functions.
"""

# Abstract Reg class
class Reg(object):
    # shape indicates how quickly it grows: 0 [flat], 1 [linear], 2 [quadratic+]
    def reg(self, X): raise NotImplementedError("Override me!")
    def __init__(self, nu=1): self.nu = nu # XXX think of a better way to handle nu?
    def __str__(self): return "GLRM Reg: override me!"
    def __call__(self, X): return self.reg(X)

class ZeroReg(Reg):
    def reg(self, X): return 0
    def __str__(self): return "zero reg"

class LinearReg(Reg):
    def reg(self, X): return self.nu*cp.norm1(X)
    def __str__(self): return "linear reg"

class QuadraticReg(Reg):
    def reg(self, X): return self.nu*cp.sum_squares(X)
    def __str__(self): return "quadratic reg"

class NonnegativeReg(Reg):
    def reg(self, X): return 1e10*cp.sum_entries(cp.neg(X))
    def __str__(self): return "nonnegative reg"

# XXX
# - k-indicator reg


text:
package main

import (
	"math/rand"
	"runtime"
	"time"

	twodee "../libs/twodee"
	"github.com/go-gl/gl"
)

func init() {
	// See https://code.google.com/p/go/issues/detail?id=3527
	runtime.LockOSThread()
}

type Application struct {
	layers                *twodee.Layers
	Context               *twodee.Context
	AudioSystem           *AudioSystem
	WinBounds             twodee.Rectangle
	GameEventHandler      *twodee.GameEventHandler
	gameClosingObserverId int
	InitiateCloseGame     bool
}

func NewApplication() (app *Application, err error) {
	var (
		layers            *twodee.Layers
		context           *twodee.Context
		gameLayer         *GameLayer
		hudLayer          *HudLayer
		menuLayer         *MenuLayer
		overlayLayer      *OverlayLayer
		winbounds         = twodee.Rect(0, 0, 1024, 768)
		gameEventHandler  = twodee.NewGameEventHandler(NumGameEventTypes)
		initiateCloseGame = false
	)
	if context, err = twodee.NewContext(); err != nil {
		return
	}
	context.SetFullscreen(false)
	context.SetCursor(true)
	context.SetResizable(true)
	if err = context.CreateWindow(int(winbounds.Max.X), int(winbounds.Max.Y), "LD30"); err != nil {
		return
	}
	var width, height = context.Window.GetSize()
	winbounds.Max.X = float32(width)
	winbounds.Max.Y = float32(height)
	layers = twodee.NewLayers()
	app = &Application{
		layers:            layers,
		Context:           context,
		WinBounds:         winbounds,
		GameEventHandler:  gameEventHandler,
		InitiateCloseGame: initiateCloseGame,
	}
	if gameLayer, err = NewGameLayer(app); err != nil {
		return
	}
	if hudLayer, err = NewHudLayer(app, gameLayer); err != nil {
		return
	}
	if menuLayer, err = NewMenuLayer(app, twodee.Pt(256, 190)); err != nil {
		return
	}
	if overlayLayer, err = NewOverlayLayer(app, gameLayer); err != nil {
		return
	}
	if app.AudioSystem, err = NewAudioSystem(app); err != nil {
		return
	}

	layers.Push(gameLayer)
	layers.Push(hudLayer)
	layers.Push(menuLayer)
	layers.Push(overlayLayer)
	app.gameClosingObserverId = app.GameEventHandler.AddObserver(GameIsClosing, app.CloseGame)
	app.GameEventHandler.Enqueue(twodee.NewBasicGameEvent(PlayBackgroundMusic))
	return
}

func (a *Application) Draw() {
	gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
	a.layers.Render()
}

func (a *Application) Update(elapsed time.Duration) {
	a.layers.Update(elapsed)
}

func (a *Application) Delete() {
	a.GameEventHandler.RemoveObserver(GameIsClosing, a.gameClosingObserverId)
	a.layers.Delete()
	a.AudioSystem.Delete()
	a.Context.Delete()
}

func (a *Application) ProcessEvents() {
	var (
		evt  twodee.Event
		loop = true
	)
	for loop {
		select {
		case evt = <-a.Context.Events.Events:
			a.layers.HandleEvent(evt)
		default:
			// No more events
			loop = false
		}
	}
}

func (a *Application) CloseGame(e twodee.GETyper) {
	a.InitiateCloseGame = true
}

func main() {
	rand.Seed(int64(time.Now().Nanosecond()))

	var (
		app *Application
		err error
	)

	if app, err = NewApplication(); err != nil {
		panic(err)
	}
	defer app.Delete()

	var (
		last_render  = time.Now()
		current_time = time.Now()
		updated_to   = current_time
		step         = twodee.Step60Hz
		render_max   = step
	)
	for !app.Context.Window.ShouldClose() && !app.InitiateCloseGame {
		for !updated_to.After(current_time) {
			app.Update(step)
			updated_to = updated_to.Add(step)
		}
		if diff := current_time.Sub(last_render); diff < render_max {
			//time.Sleep(render_max - diff)
			time.Sleep(1)
		} else {
			app.Draw()
			app.Context.Window.SwapBuffers()
			last_render = current_time
			app.Context.Events.Poll()
			app.GameEventHandler.Poll()
			app.ProcessEvents()
		}
		current_time = time.Now()
	}
}


text:
<?php
$rawhtmlAWeber = file_get_contents( 'rawhtmlform_aweber.txt' );
$rawhtmlMailChimp = file_get_contents( 'rawhtmlform_mailchimp.txt' );
$rawhtmlGetResponse = file_get_contents( 'rawhtmlform_getresponse.txt' );
$rawhtmlActiveCampaign = file_get_contents( 'rawhtmlform_activecampaign.txt' );
$rawhtmlMadMimi = file_get_contents( 'rawhtmlform_madmimi.txt' );

$document = new DOMDocument();
libxml_use_internal_errors(true);
$document->loadHTML( $rawhtmlAWeber );
libxml_clear_errors();
$form = $document->getElementsByTagName( 'form' );
$input = $document->getElementsByTagName( 'input' );

$optinParams = array();

if ( $form->length > 0 ) {
  for ( $i=0; $i<$form->length; $i++ ) {
    $formTag = $form->item( $i );

    $action = $formTag->attributes->getNamedItem( 'action' )->value;
    $method = $formTag->attributes->getNamedItem( 'method' )->value;
    $optinParams['action'] = $action;
    $optinParams['method'] = $method;
  }
}

if ( $input->length > 0 ) {
  for ( $i=0; $i<$input->length; $i++ ) {
    $inputTag = $input->item( $i );

    $nameAttr = $inputTag->attributes->getNamedItem( 'name' );
    if ( !is_null( $nameAttr ) ) {
    	$name = $nameAttr->value;
    } else {
    	$name = '';
    }

    $type = $inputTag->attributes->getNamedItem( 'type' )->value;

    if ( $type == 'hidden' || $type == 'submit' ) {
    	$hiddenValue = $inputTag->attributes->getNamedItem( 'value' )->value;
    	$optinParams['hiddenfields'][] = array( 'name' => $name, 'value' => $hiddenValue );
    } else {
    	$optinParams['fields'][] = $name;
    }
  }
}

$optinFields = array();
foreach ( $optinParams['fields'] as $field ) {
	$lowerCaseField = strtolower( $field );

	if ( strpos( $lowerCaseField, 'email' ) !== false ) {
		$optinFields['fields']['email'][$field] = 'mtasuandi@outlook.com';
	}

	if ( $lowerCaseField != 'fullname' ) {
		if ( strpos( $lowerCaseField, 'fname' ) !== false || strpos( $lowerCaseField, 'firstname' ) !== false ) {
			$optinFields['fields']['name'][$field] = 'First Name';
		}

		if ( strpos( $lowerCaseField, 'lname' ) !== false || strpos( $lowerCaseField, 'lastname' ) !== false ) {
			$optinFields['fields']['name'][$field] = 'Last Name';
		}
	}

	if ( strpos( $lowerCaseField, 'name' ) !== false || strpos( $lowerCaseField, 'fullname' ) !== false ) {
		$optinFields['fields']['name'][$field] = 'Full Name';
	}

	if ( strpos( $lowerCaseField, 'phone' ) !== false ) {
		$optinFields['fields']['phone'][$field] = '+6281220504072';
	}

	if( preg_match( '([a-zA-Z].*[0-9]|[0-9].*[a-zA-Z])', $lowerCaseField ) ) {
		$optinFields['fields']['unique'][$field] = '';
	}
}

foreach ( $optinParams['hiddenfields'] as $hiddenfield ) {
	$optinFields['fields']['hidden'][$hiddenfield['name']] = $hiddenfield['value'];
}

$emailField = array();
if ( isset( $optinFields['fields']['email'] ) ) {
	$emailField = $optinFields['fields']['email'];
}
$nameField = array();
if ( isset( $optinFields['fields']['name'] ) ) {
	$nameField = $optinFields['fields']['name'];
}
$phoneField = array();
if ( isset( $optinFields['fields']['phone'] ) ) {
	$phoneField = $optinFields['fields']['phone'];
}
$uniqueField = array();
if ( isset( $optinFields['fields']['unique'] ) ) {
	$uniqueField = $optinFields['fields']['unique'];
}
$hiddenField = array();
if ( isset( $optinFields['fields']['hidden'] ) ) {
	$hiddenField = $optinFields['fields']['hidden'];
}

$optinSendParam = array_merge(
	$emailField,
	$nameField,
	$phoneField,
	$uniqueField,
	$hiddenField
);

// echo "<pre>"; print_r( $optinSendParam ); echo "</pre>"; exit();

$postData = '';
foreach ( $optinSendParam as $k => $v ) {
	$postData .= $k . '='.$v.'&';
}
$postData = rtrim( $postData, '&' );

$ch = curl_init();
$url = $optinParams['action'];

$urlPost = $url;
if ( strpos( $url, 'http:' ) === false && strpos( $url, 'https:' ) === false ) {
	$urlPost = 'https:' . $url;
}

curl_setopt( $ch, CURLOPT_URL, $urlPost );
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $postData );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );

$output = curl_exec( $ch );

curl_close( $ch );
var_dump( $output );


text:
ZSH_HIGHLIGHT_STYLES[command]=$unused_highlight
BUFFER='\sh'

expected_region_highlight=(
  "1 3 $ZSH_HIGHLIGHT_STYLES[command]" # \sh (runs 'sh', bypassing aliases)
)


text:
package test.gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable;

import gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Note;
import gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Currency;
import gov.nih.nci.system.applicationservice.ApplicationException;
import gov.nih.nci.system.query.cql.CQLAssociation;
import gov.nih.nci.system.query.cql.CQLAttribute;
import gov.nih.nci.system.query.cql.CQLObject;
import gov.nih.nci.system.query.cql.CQLPredicate;
import gov.nih.nci.system.query.cql.CQLQuery;
import gov.nih.nci.system.dao.orm.translator.CQL2HQL;
import gov.nih.nci.system.query.hibernate.HQLCriteria;

import java.util.Collection;
import java.util.Iterator;

import test.gov.nih.nci.cacoresdk.SDKTestBase;

public class OneChildSametableTest extends SDKTestBase
{
	public static String getTestCaseName()
	{
		return "One Child Same Table Test Case";
	}

	/**
	 * Uses Nested Search Criteria for search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testEntireObjectNestedSearch1() throws ApplicationException
	{
		Currency searchObject = new Currency();
		Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Currency",searchObject );

		assertNotNull(results);
		assertEquals(3,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Currency result = (Currency)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getCountry());
		}
	}

	/**
	 * Uses Nested Search Criteria for search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testEntireObjectNestedSearch2() throws ApplicationException
	{
		Note searchObject = new Note();
		Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Note",searchObject );

		assertNotNull(results);
		assertEquals(3,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Note result = (Note)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getCountry());
			assertNotNull(result.getValue());
		}
	}

	/**
	 * Uses CQL Criteria for search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testEntireObjectCQL1() throws ApplicationException
	{
		CQLQuery cqlQuery = new CQLQuery();
		CQLObject target = new CQLObject();

		target.setName("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Note");
		cqlQuery.setTarget(target);

		CQL2HQL converter = new CQL2HQL(getClassCache());
		HQLCriteria hqlCriteria = converter.translate(cqlQuery, false, false);

		Collection results = getApplicationService().query(hqlCriteria);

		assertNotNull(results);
		assertEquals(3,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Note result = (Note)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getValue());
		}
	}

	/**
	 * Uses CQL Criteria for search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testEntireObjectCQL2() throws ApplicationException
	{
		CQLQuery cqlQuery = new CQLQuery();
		CQLObject target = new CQLObject();

		target.setName("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Currency");
		cqlQuery.setTarget(target);

		CQL2HQL converter = new CQL2HQL(getClassCache());
		HQLCriteria hqlCriteria = converter.translate(cqlQuery, false, false);

		Collection results = getApplicationService().query(hqlCriteria);

		assertNotNull(results);
		assertEquals(3,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Currency result = (Currency)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getCountry());
		}
	}

	/**
	 * Uses Nested Search Criteria for inheritance as association in search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testAssociationNestedSearch1() throws ApplicationException
	{
		Currency searchObject = new Currency();
		searchObject.setCountry("USA");
		Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Note",searchObject );

		assertNotNull(results);
		assertEquals(1,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Note result = (Note)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getValue());
		}
	}

	/**
	 * Uses Nested Search Criteria for inheritance as association in search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testAssociationNestedSearch2() throws ApplicationException
	{
		Note searchObject = new Note();
		searchObject.setCountry("Germany");
		Collection results = getApplicationService().search("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Currency",searchObject );

		assertNotNull(results);
		assertEquals(1,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Currency result = (Currency)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getCountry());
		}
	}

	/**
	 * Uses CQL Criteria for inheritance as association in search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testAssociationCQL1() throws ApplicationException
	{
		CQLQuery cqlQuery = new CQLQuery();
		CQLObject target = new CQLObject();

		CQLAssociation association = new CQLAssociation();
		association.setName("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Note");
		association.setAttribute(new CQLAttribute("country", CQLPredicate.EQUAL_TO,"USA"));

		target.setName("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Currency");
		target.setAssociation(association);
		cqlQuery.setTarget(target);

		CQL2HQL converter = new CQL2HQL(getClassCache());
		HQLCriteria hqlCriteria = converter.translate(cqlQuery, false, false);

		Collection results = getApplicationService().query(hqlCriteria);

		assertNotNull(results);
		assertEquals(1,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Currency result = (Currency)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getCountry());
		}
	}

	/**
	 * Uses CQL Criteria for inheritance as association in search
	 * Verifies that the results are returned
	 * Verifies size of the result set
	 * Verifies that none of the attribute is null
	 *
	 * @throws ApplicationException
	 */
	public void testAssociationCQL2() throws ApplicationException
	{
		CQLQuery cqlQuery = new CQLQuery();
		CQLObject target = new CQLObject();

		CQLAssociation association = new CQLAssociation();
		association.setName("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Currency");
		association.setAttribute(new CQLAttribute("country", CQLPredicate.EQUAL_TO,"Germany"));

		target.setName("gov.nih.nci.cacoresdk.domain.inheritance.onechild.sametable.Note");
		target.setAssociation(association);
		cqlQuery.setTarget(target);

		CQL2HQL converter = new CQL2HQL(getClassCache());
		HQLCriteria hqlCriteria = converter.translate(cqlQuery, false, false);

		Collection results = getApplicationService().query(hqlCriteria);

		assertNotNull(results);
		assertEquals(1,results.size());

		for(Iterator i = results.iterator();i.hasNext();)
		{
			Note result = (Note)i.next();
			assertNotNull(result);
			assertNotNull(result.getId());
			assertNotNull(result.getCountry());
		}
	}
}


text:
(function ($) {
	jQuery(document).ready(function($) {

		$('body.post-type-billupdates div#pageparentdiv select option.level-1').each(function() {
			$(this).remove();
		});

		$('body.post-type-billupdates div#pageparentdiv select option.level-2').each(function() {
			$(this).remove();
		});

		$('body.post-type-billupdates div#pageparentdiv select option.level-3').each(function() {
			$(this).remove();
		});

	});
}(jQuery));


text:
export type TwisonT = {
  name:string,
  startnode:string,
  ifid:string,
  passages: [TwinePassageT]
};
export type TwinePassageT = {
  pid:string,
  name:string,
  text:string,
  links: [TwineLinkT],
  position: {
    x:string,
    y:string,
  }
};
export type TwineLinkT = {
  pid:string,
  name:string,
  link:string
};


text:
package com.sequenceiq.cloudbreak.structuredevent.event.legacy;

import java.io.Serializable;
import java.time.Instant;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.sequenceiq.cloudbreak.structuredevent.event.StructuredEventType;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class OperationDetails implements Serializable {

    private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss Z");

    private StructuredEventType eventType;

    private Long resourceId;

    private String resourceCrn;

    private String resourceName;

    private String resourceType;

    private Long timestamp;

    private String userId;

    private String cloudbreakId;

    private String cloudbreakVersion;

    private Long workspaceId;

    private String tenant;

    private String uuid;

    private String userCrn;

    private String environmentCrn;

    private String resourceEvent;

    public OperationDetails() {
    }

    public OperationDetails(Long timestamp, StructuredEventType eventType, String resourceType, Long resourceId, String resourceName, String cloudbreakId,
            String cloudbreakVersion, Long workspaceId, String userId, String userName, String tenant, String resourceCrn, String userCrn,
            String environmentCrn, String resourceEvent) {
        this.timestamp = timestamp;
        this.eventType = eventType;
        this.resourceId = resourceId;
        this.resourceName = resourceName;
        this.resourceType = resourceType;
        this.cloudbreakId = cloudbreakId;
        this.cloudbreakVersion = cloudbreakVersion;
        this.workspaceId = workspaceId;
        this.userId = userId;
        this.tenant = tenant;
        this.resourceCrn = resourceCrn;
        this.userCrn = userCrn;
        this.environmentCrn = environmentCrn;
        this.resourceEvent = resourceEvent;
        uuid = UUID.randomUUID().toString();
    }

    public StructuredEventType getEventType() {
        return eventType;
    }

    public void setEventType(StructuredEventType eventType) {
        this.eventType = eventType;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public Long getResourceId() {
        return resourceId;
    }

    public void setResourceId(Long resourceId) {
        this.resourceId = resourceId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public String getUTCDateTime() {
        if (timestamp != null) {
            return ZonedDateTime.ofInstant(Instant.ofEpochMilli(timestamp), ZoneOffset.UTC).format(DATE_TIME_FORMATTER);
        } else {
            return "";
        }
    }

    public String getCloudbreakId() {
        return cloudbreakId;
    }

    public void setCloudbreakId(String cloudbreakId) {
        this.cloudbreakId = cloudbreakId;
    }

    public String getCloudbreakVersion() {
        return cloudbreakVersion;
    }

    public void setCloudbreakVersion(String cloudbreakVersion) {
        this.cloudbreakVersion = cloudbreakVersion;
    }

    public Long getWorkspaceId() {
        return workspaceId;
    }

    public void setWorkspaceId(Long workspaceId) {
        this.workspaceId = workspaceId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTenant() {
        return tenant;
    }

    public void setTenant(String tenant) {
        this.tenant = tenant;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getResourceCrn() {
        return resourceCrn;
    }

    public void setResourceCrn(String resourceCrn) {
        this.resourceCrn = resourceCrn;
    }

    public String getUserCrn() {
        return userCrn;
    }

    public void setUserCrn(String userCrn) {
        this.userCrn = userCrn;
    }

    public String getEnvironmentCrn() {
        return environmentCrn;
    }

    public void setEnvironmentCrn(String environmentCrn) {
        this.environmentCrn = environmentCrn;
    }

    public String getResourceEvent() {
        return resourceEvent;
    }

    public void setResourceEvent(String resourceEvent) {
        this.resourceEvent = resourceEvent;
    }

    @Override
    public String toString() {
        return "OperationDetails{" +
                "eventType=" + eventType +
                ", resourceId=" + resourceId +
                ", resourceCrn='" + resourceCrn + '\'' +
                ", resourceName='" + resourceName + '\'' +
                ", resourceType='" + resourceType + '\'' +
                ", timestamp=" + timestamp +
                ", userId='" + userId + '\'' +
                ", cloudbreakId='" + cloudbreakId + '\'' +
                ", cloudbreakVersion='" + cloudbreakVersion + '\'' +
                ", workspaceId=" + workspaceId +
                ", tenant='" + tenant + '\'' +
                ", uuid='" + uuid + '\'' +
                ", userCrn='" + userCrn + '\'' +
                ", environmentCrn='" + environmentCrn + '\'' +
                ", resourceEvent='" + resourceEvent + '\'' +
                '}';
    }
}


text:
module PRgovCAPWebApp
  class App < Padrino::Application
    register Padrino::Helpers
    # register Pendragon::Padrino
    helpers Rack::Recaptcha::Helpers

    ##
    # Caching support.
    #
    # register Padrino::Cache
    # enable :caching
    #
    # You can customize caching store engines:
    #
    # set :cache, Padrino::Cache.new(:LRUHash) # Keeps cached values in memory
    # set :cache, Padrino::Cache.new(:Memcached) # Uses default server at localhost
    # set :cache, Padrino::Cache.new(:Memcached, '127.0.0.1:11211', :exception_retry_limit => 1)
    # set :cache, Padrino::Cache.new(:Memcached, :backend => memcached_or_dalli_instance)
    # set :cache, Padrino::Cache.new(:Redis) # Uses default server at localhost
    # set :cache, Padrino::Cache.new(:Redis, :host => '127.0.0.1', :port => 6379, :db => 0)
    # set :cache, Padrino::Cache.new(:Redis, :backend => redis_instance)
    # set :cache, Padrino::Cache.new(:Mongo) # Uses default server at localhost
    # set :cache, Padrino::Cache.new(:Mongo, :backend => mongo_client_instance)
    # set :cache, Padrino::Cache.new(:File, :dir => Padrino.root('tmp', app_name.to_s, 'cache')) # default choice
    #

    ##
    # Application configuration options.
    #
    # set :raise_errors, true       # Raise exceptions (will stop application) (default for test)
    # set :dump_errors, true        # Exception backtraces are written to STDERR (default for production/development)
    # set :show_exceptions, true    # Shows a stack trace in browser (default for development)
    # set :logging, true            # Logging in STDOUT for development and file for production (default only for development)
    # set :public_folder, 'foo/bar' # Location for static assets (default root/public)
    # set :reload, false            # Reload application files (default in development)
    # set :default_builder, 'foo'   # Set a custom form builder (default 'StandardFormBuilder')
    # set :locale_path, 'bar'       # Set path for I18n translations (default your_apps_root_path/locale)
    # disable :sessions             # Disabled sessions by default (enable if needed)
    # disable :flash                # Disables sinatra-flash (enabled by default if Sinatra::Flash is defined)
    # layout  :my_layout            # Layout can be in views/layouts/foo.ext or views/foo.ext (default :application)
    #

    ##
    # You can configure for a specified environment like:
    #
    #   configure :development do
    #     set :foo, :bar
    #     disable :asset_stamp # no asset timestamping for dev
    #   end
    #

    #
    # You can manage errors like:
    # set :environment, :production

    # error(::Exception) do
    #   boom = env['sinatra.error']
    #   logger.error ["#{boom.class} - #{boom.message}:", *boom.backtrace].join("\n ")
    #   response.status = 500
    #   # content_type 'text/html'
    #   render 'errors/error',  :locals => { :error => "#{boom.class}" }, :layout => :prgov
    #   # partial 'errors/error_partial', :locals => { :error => :bar }
    #   # "Error is #{boom.class} - #{boom.message}: #{boom.backtrace.join("</br>")}"
    # end
    #
    error 404 do
      render 'errors/400', :layout => :prgov
    end

    error 500 do
      # render 'errors/505.html'
      # "A 500 error ocurred."
      render 'errors/500'
    end

    not_found do
      # "oops"
      render 'errors/400'
    end
    #
    # error 505 do
    #   render 'errors/505.html'
    # end

  end
end


text:
/*
 * ProjectEuler/src/c/Problem311.c
 *
 * Biclinic Integral Quadrilaterals
 * ================================
 * Published on Saturday, 20th November 2010, 10:00 pm
 *
 * ABCD is a convex, integer sided quadrilateral with 1  AB  BC  CD  AD.  BD has
 * integer length. O is the midpoint of BD. AO has integer length.  We'll call
 * ABCD a biclinic integral quadrilateral if AO = CO  BO = DO.  For example, the
 * following quadrilateral is a biclinic integral quadrilateral:  AB = 19, BC =
 * 29, CD = 37, AD = 43, BD = 48 and AO = CO = 23.    Let B(N) be the number of
 * distinct biclinic integral quadrilaterals ABCD that satisfy AB2+BC2+CD2+AD2
 * N.  We can verify that B(10 000) = 49 and B(1 000 000) = 38239.   Find B(10
 * 000 000 000).
 */

#include <stdio.h>
#include "ProjectEuler/ProjectEuler.h"
#include "ProjectEuler/Problem311.h"

int main(int argc, char** argv) {

    return 0;
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.dropwizard</groupId>
        <artifactId>dropwizard-dependencies</artifactId>
        <version>2.1.0-SNAPSHOT</version>
        <relativePath>../dropwizard-dependencies</relativePath>
    </parent>

    <artifactId>dropwizard-parent</artifactId>
    <packaging>pom</packaging>

    <name>Dropwizard Parent</name>
    <description>
        Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web
        applications.
    </description>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
        <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
        <maven.compiler.optimize>false</maven.compiler.optimize>

        <pgpverify.keyserver>hkps://hkps.pool.sks-keyservers.net;hkps://keyserver.ubuntu.com</pgpverify.keyserver>

        <surefire.argLine>-Duser.language=en -Duser.region=US -Duser.timezone=UTC</surefire.argLine>
        <argLine>${surefire.argLine}</argLine>
    </properties>

    <profiles>
        <profile>
            <id>jdk9</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <properties>
                <argLine>${surefire.argLine} --illegal-access=deny --add-opens java.base/java.net=ALL-UNNAMED</argLine>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>${error_prone.version}</version>
                                </path>
                                <!-- enable extended nullability checks -->
                                <path>
                                    <groupId>com.uber.nullaway</groupId>
                                    <artifactId>nullaway</artifactId>
                                    <version>${nullaway.version}</version>
                                </path>
                            </annotationProcessorPaths>
                            <compilerArgs>
                                <arg>-XDcompilePolicy=simple</arg>
                                <!-- When run as plugin all args must be passed together -->
                                <arg>-Xplugin:ErrorProne
                                    -XepDisableWarningsInGeneratedCode
                                    -Xep:EqualsGetClass:OFF
                                    -Xep:NullAway:ERROR
                                    -XepOpt:NullAway:AnnotatedPackages=io.dropwizard
                                    -XepOpt:NullAway:ExcludedFieldAnnotations=org.mockito.Mock
                                    -XepOpt:NullAway:UnannotatedSubPackages=io.dropwizard.benchmarks</arg>
                            </compilerArgs>
                            <release>8</release>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <maven.compiler.optimize>true</maven.compiler.optimize>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <doclint>none</doclint>
                            <quiet>true</quiet>
                            <notimestamp>true</notimestamp>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>dev</id>
            <properties>
                <maven.javadoc.skip>true</maven.javadoc.skip>
                <maven.source.skip>true</maven.source.skip>
                <pgpverify.skip>true</pgpverify.skip>
                <jacoco.skip>true</jacoco.skip>
            </properties>
            <build>
                <plugins>
                    <!-- Run tests in parallel in the dev mode-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <parallel>classes</parallel>
                            <threadCount>2</threadCount>
                            <perCoreThreadCount>true</perCoreThreadCount>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>compile-eclipse</id>
            <activation>
                <jdk>1.8</jdk>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <debug>true</debug>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.eclipse.m2e</groupId>
                        <artifactId>lifecycle-mapping</artifactId>
                        <configuration>
                            <lifecycleMappingMetadata>
                                <pluginExecutions>
                                    <pluginExecution>
                                        <pluginExecutionFilter>
                                            <groupId>org.simplify4u.plugins</groupId>
                                            <artifactId>pgpverify-maven-plugin</artifactId>
                                            <version>${pgpverify-maven-plugin.version}</version>
                                            <goals>
                                                <goal>check</goal>
                                            </goals>
                                        </pluginExecutionFilter>
                                        <action>
                                            <ignore />
                                        </action>
                                    </pluginExecution>
                                </pluginExecutions>
                            </lifecycleMappingMetadata>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>compile-not-eclipse</id>
            <activation>
                <jdk>1.8</jdk>
                <property>
                    <name>!m2e.version</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <debug>true</debug>
                            <fork>true</fork>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>${error_prone.version}</version>
                                </path>
                                <!-- enable extended nullability checks -->
                                <path>
                                    <groupId>com.uber.nullaway</groupId>
                                    <artifactId>nullaway</artifactId>
                                    <version>${nullaway.version}</version>
                                </path>
                            </annotationProcessorPaths>
                            <compilerArgs>
                                <arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${error_prone.javac.version}/javac-${error_prone.javac.version}.jar</arg>
                                <arg>-XDcompilePolicy=simple</arg>
                                <arg>-Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -Xep:EqualsGetClass:OFF -Xep:NullAway:ERROR -XepOpt:NullAway:AnnotatedPackages=io.dropwizard -XepOpt:NullAway:ExcludedFieldAnnotations=org.mockito.Mock -XepOpt:NullAway:UnannotatedSubPackages=io.dropwizard.benchmarks</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.dropwizard</groupId>
                <artifactId>dropwizard-dependencies</artifactId>
                <version>2.1.0-SNAPSHOT</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <DependencyConvergence />
                                <bannedDependencies>
                                    <excludes>
                                        <!-- This should not exist as it will force SLF4J calls to be delegated to log4j -->
                                        <exclude>org.slf4j:slf4j-log4j12</exclude>
                                        <!-- This should not exist as it will force SLF4J calls to be delegated to jul -->
                                        <exclude>org.slf4j:slf4j-jdk14</exclude>
                                        <!-- Ensure only the slf4j binding for logback is on the classpath -->
                                        <exclude>log4j:log4j</exclude>
                                        <!-- As recommended from the slf4j guide, exclude commons-logging -->
                                        <exclude>commons-logging:commons-logging</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.simplify4u.plugins</groupId>
                <artifactId>pgpverify-maven-plugin</artifactId>
                <configuration>
                    <quiet>true</quiet>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doclint>none</doclint>
                    <quiet>true</quiet>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>html</id>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>


text:
#include "MultiFormatOneDReader.h"

#include <zxing/oned/MultiFormatUPCEANReader.h>
#include <zxing/oned/Code39Reader.h>
#include <zxing/oned/Code128Reader.h>
#include <zxing/oned/ITFReader.h>
#include <zxing/ReaderException.h>

namespace zxing {
	namespace oned {
		MultiFormatOneDReader::MultiFormatOneDReader(DecodeHints hints) : readers() {
      if (hints.containsFormat(BarcodeFormat_EAN_13) ||
          hints.containsFormat(BarcodeFormat_EAN_8) ||
          hints.containsFormat(BarcodeFormat_UPC_A) ||
          hints.containsFormat(BarcodeFormat_UPC_E)) {
        readers.push_back(Ref<OneDReader>(new MultiFormatUPCEANReader(hints)));
      }
      if (hints.containsFormat(BarcodeFormat_CODE_39)) {
        readers.push_back(Ref<OneDReader>(new Code39Reader()));
      }
      if (hints.containsFormat(BarcodeFormat_CODE_128)) {
        readers.push_back(Ref<OneDReader>(new Code128Reader()));
      }
      if (hints.containsFormat(BarcodeFormat_ITF)) {
        readers.push_back(Ref<OneDReader>(new ITFReader()));
      }
      if (readers.size() == 0) {
        readers.push_back(Ref<OneDReader>(new MultiFormatUPCEANReader(hints)));
        readers.push_back(Ref<OneDReader>(new Code39Reader()));
        readers.push_back(Ref<OneDReader>(new Code128Reader()));
        readers.push_back(Ref<OneDReader>(new ITFReader()));
      }
		}

		Ref<Result> MultiFormatOneDReader::decodeRow(int rowNumber, Ref<BitArray> row) {
			int size = readers.size();
			for (int i = 0; i < size; i++) {
				OneDReader* reader = readers[i];
				Ref<Result> result = reader->decodeRow(rowNumber, row);
				if (!result.empty()) {
				  return result;
				}
			}
			return Ref<Result>();
		}
	}
}


text:
<?php

namespace Tebru\Retrofit\Annotation;

/**
 * Defines an HTTP PATCH request type to a REST path relative to base URL.
 *
 * @author Nate Brunette <n@tebru.net>
 *
 * @Annotation
 * @Target({"CLASS", "METHOD"})
 */
class PATCH extends HttpRequest
{
    /**
     * @return string
     */
    public function getType()
    {
        return 'patch';
    }
}


text:
import _plotly_utils.basevalidators

class LineValidator(_plotly_utils.basevalidators.CompoundValidator):
    def __init__(
        self, plotly_name="line", parent_name="candlestick.decreasing", **kwargs
    ):
        super(LineValidator, self).__init__(
            plotly_name=plotly_name,
            parent_name=parent_name,
            data_class_str=kwargs.pop("data_class_str", "Line"),
            data_docs=kwargs.pop(
                "data_docs",
                """
            color
                Sets the color of line bounding the box(es).
            width
                Sets the width (in px) of line bounding the
                box(es).
""",
            ),
            **kwargs
        )


text:
[![Build Status](https://travis-ci.org/congma/base8x.svg?branch=master)](https://travis-ci.org/congma/base8x)

# base8x

## SYNOPSIS

`base8x` -- Base-(85 ~ 95) binary/ASCII conversion.

Encodes binary data 4 bytes a time into a string of maximal length 5, using
at least 85 of the 95 ASCII printable characters.  The alphabet can be
specified by the user.  The inverse operation (decoding) can also be performed.

## USAGE

See docstring for the `Base8xCodec` class.

## EXAMPLE

The example script `example_wpskg.py` generates random secret keys for
WordPress's `wp-config.php` file, just like WP's online key generation service
at https://api.wordpress.org/secret-key/1.1/salt/

Binary data from the random source `/dev/urandom` is converted into strings
suitable for use as PHP literal.  The output should look like the following:

```php
define('AUTH_KEY',         'TRb]|u{xmvW7,02tiDA@j|{iSMMqxbu~k #R|H-UmZJXeJSU:9');
define('SECURE_AUTH_KEY',  '5KYxKE`{|}QWdV6824j[eGf7sBh(S+72;Pdp@-kK1Dy:^PlsbT');
define('LOGGED_IN_KEY',    'a@L(:kQ<c(vGfQ4uN4dSF:K];5Zv.SFR+JKUj1T@J?qfJr@hz?');
define('NONCE_KEY',        'i@WA`bw=m[z#+N9FDW}1gVmv/Wb~3{S^T,2ctv7Tya]QPw_w>b');
define('AUTH_SALT',        'N>#Q&nYIBkn/?to0#N#/O|N:P0h;ycAWc`(1~twk4{P7bc@1,Z');
define('SECURE_AUTH_SALT', 'Nm0r2DC~vbhoBzx7uT{vwAr9lNd02}Rc~xVf968gC^S`#4acPF');
define('LOGGED_IN_SALT',   'Pp9sSh#%R)pTk<HS)qR@2qsy+dW]@fl!s@]9kq!byTrQQoij6y');
define('NONCE_SALT',       'qAIqsm4-&SU4-BP8CP=UI6YXeTn,c7Bx4NRl`Msib|4 qt:A]D');
```

*NOTE:*  Please don't copy the above example output into your `wp-config.php`
file.

## COPYRIGHT

Copyright © 2015 Cong Ma.  License BSD: See the COPYING file.

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

## AVAILABILITY

Available from [https://github.com/congma/base8x][githubrepo].

[githubrepo]: https://github.com/congma/base8x "GitHub repository page for base8x"