text:
import React, { Component } from 'react';
import { connect } from 'react-redux'; // glue between react and redux
import { LinkContainer } from 'react-router-bootstrap';
import { Nav, Navbar, NavDropdown, NavItem, MenuItem } from 'react-bootstrap';

class NavMenu extends Component {
	render() {
		return  (
			<nav className="NavBar">
				<Navbar default collapseOnSelect>
				    <Navbar.Header>
				      <Navbar.Brand>
				      	<LinkContainer className="menu-thumbnail" to= { this.props.siteConfig.menuElements.brand.link }>
				      		<img src= {this.props.siteConfig.imageCDN + this.props.siteConfig.menuElements.brand.imageSource }
				      		alt= { this.props.siteConfig.menuElements.brand.altText }/>
	  						</LinkContainer>
				      </Navbar.Brand>
				      <Navbar.Toggle />
				    </Navbar.Header>
				    <Navbar.Collapse>
				      <Nav>
				      	{this.renderNavMenu()}
				      </Nav>
				    </Navbar.Collapse>
				  </Navbar>
			</nav>
		);
	};
	renderNavMenu() {
		return this.props.siteConfig.menuElements.items.map((item) => {
			return (item.type === "submenu")
				? (this.renderNavSubMenu(item))
				: (
					<LinkContainer key={ item.eventKey } to={ item.link }>
			   		<NavItem eventKey={ item.eventKey }>{ item.title }</NavItem>
					</LinkContainer>
				);
		});
	};
	renderNavSubMenu(item) {
		return (
		  <NavDropdown key = { item.eventKey } eventKey={ item.key } title={ item.title } id = {item.submenu} >
 				{ this.renderSubMenuItems(item.submenu) }
    	</NavDropdown>
		);
	};
	renderSubMenuItems(submenuName) {
		return this.props.siteConfig.menuElements[submenuName].map((item) => {
			return (
				<LinkContainer key = { item.eventKey } to={ item.link }>
	  			<MenuItem
	   				onSelect={(e) => { document.getElementById(submenuName).click(); }}
	   				eventKey={ item.eventKey }>{ item.title }</MenuItem>
				</LinkContainer>
			);
		})
	};
};

const mapStateToProps = (state) => ({ siteConfig: state.siteConfig });
export default connect(mapStateToProps, null, null, {
  pure: false
}) (NavMenu);


text:
import os

from jax.experimental.compilation_cache.cache_interface import CacheInterface
from jax._src import path as pathlib

class GFileCache(CacheInterface):

  def __init__(self, path: str):
    """Sets up a cache at 'path'. Cached values may already be present."""
    self._path = pathlib.Path(path)
    self._path.mkdir(parents=True, exist_ok=True)

  def get(self, key: str):
    """Returns None if 'key' isn't present."""
    if not key:
      raise ValueError("key cannot be empty")
    path_to_key = self._path / key
    if path_to_key.exists():
      return path_to_key.read_bytes()
    else:
      return None

  def put(self, key: str, value: bytes):
    """Adds new cache entry."""
    if not key:
      raise ValueError("key cannot be empty")
    path_to_new_file = self._path / key
    if str(path_to_new_file).startswith('gs://'):
      # Writes to gcs are atomic.
      path_to_new_file.write_bytes(value)
    elif str(path_to_new_file).startswith('file://') or '://' not in str(path_to_new_file):
      tmp_path = self._path / f"_temp_{key}"
      with open(str(tmp_path), "wb") as f:
        f.write(value)
        f.flush()
        os.fsync(f.fileno())
      os.rename(tmp_path, path_to_new_file)
    else:
      tmp_path = self._path / f"_temp_{key}"
      tmp_path.write_bytes(value)
      tmp_path.rename(str(path_to_new_file))

redpajama_set_name: RedPajamaGithub


text:
..  Copyright (c) 2014-present PlatformIO <contact@platformio.org>
    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.

.. _cmd_upgrade:

pio upgrade
===========

.. contents::

Usage
-----

.. code-block:: bash

    pio upgrade

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

Check or upgrade PlatformIO Core to the latest version.

Options
-------

.. program:: pio upgrade

.. option::
    --dev

Use development branch.

Examples
--------

.. code::

    > pio upgrade

    You are up-to-date!
    PlatformIO x.x.x is currently the newest version available.


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

package nl.hmh.OldManOPA.strategy;

import java.util.Vector;
import nl.hmh.OldManOPA.model.INode;
import nl.hmh.OldManOPA.model.Strategy;

/**
 *
 * @author Steven
 */
public class XNOR extends Strategy {

	/*** Start of Singleton implementation ***/

	private static XNOR instance = new XNOR("XNOR");

	private static XNOR getInstance() {
		return instance;
	}

	/*** End of Singleton implementation ***/

	private XNOR(String ID) {
		super(ID);
	}

	@Override
	public boolean calculate(Vector<INode> inputNodes, int iter) {
		boolean result[] = new boolean[2];

		for (int i = 0; i < inputNodes.size(); i++) {
			if (inputNodes.get(i).calculate(iter)) {
				result[0] = true;
			}
			else {
				result[1] = true;
			}

			// Check if both values have already been seen
			if (result[0] && result[1]) return false;
		}

		return true;
	}

}


text:
namespace sync_sessions {

BrowserListRouterHelper::BrowserListRouterHelper(
    SyncSessionsWebContentsRouter* router,
    Profile* profile)
    : router_(router), profile_(profile) {
  BrowserList* browser_list = BrowserList::GetInstance();
  for (Browser* browser : *browser_list) {
    if (browser->profile() == profile_) {
      browser->tab_strip_model()->AddObserver(this);
    }
  }
  browser_list->AddObserver(this);
}

BrowserListRouterHelper::~BrowserListRouterHelper() {
  BrowserList::GetInstance()->RemoveObserver(this);
}

void BrowserListRouterHelper::OnBrowserAdded(Browser* browser) {
  if (browser->profile() == profile_) {
    browser->tab_strip_model()->AddObserver(this);
  }
}

void BrowserListRouterHelper::OnBrowserRemoved(Browser* browser) {
  if (browser->profile() == profile_) {
    browser->tab_strip_model()->RemoveObserver(this);
  }
}

void BrowserListRouterHelper::OnTabStripModelChanged(
    TabStripModel* tab_strip_model,
    const TabStripModelChange& change,
    const TabStripSelectionChange& selection) {
  std::vector<content::WebContents*> web_contents;
  if (change.type() == TabStripModelChange::kInserted) {
    for (const TabStripModelChange::ContentsWithIndex& contents :
         change.GetInsert()->contents) {
      web_contents.push_back(contents.contents);
    }
  } else if (change.type() == TabStripModelChange::kReplaced) {
    web_contents.push_back(change.GetReplace()->new_contents);
  } else {
    return;
  }

  for (content::WebContents* contents : web_contents) {
    if (Profile::FromBrowserContext(contents->GetBrowserContext()) ==
        profile_) {
      router_->NotifyTabModified(contents, false);
    }
  }
}

}  // namespace sync_sessions


text:
package com.microsoft.azure.management.compute.v2019_11_01.implementation;

import com.microsoft.azure.management.compute.v2019_11_01.RecoveryWalkResponse;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;

class RecoveryWalkResponseImpl extends WrapperImpl<RecoveryWalkResponseInner> implements RecoveryWalkResponse {
    private final ComputeManager manager;
    RecoveryWalkResponseImpl(RecoveryWalkResponseInner inner, ComputeManager manager) {
        super(inner);
        this.manager = manager;
    }

    @Override
    public ComputeManager manager() {
        return this.manager;
    }

    @Override
    public Integer nextPlatformUpdateDomain() {
        return this.inner().nextPlatformUpdateDomain();
    }

    @Override
    public Boolean walkPerformed() {
        return this.inner().walkPerformed();
    }

}


text:
package com.dumu.housego;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.widget.FrameLayout;

import com.dumu.housego.activity.BaseFragmentActivity;
import com.dumu.housego.framgent.AGChengJiaohouseFragment;
import com.dumu.housego.framgent.ATGouDiListFragment;
import com.dumu.housego.framgent.ATHistroyDataFragment;
import com.dumu.housego.framgent.ATQiuGouFragment;
import com.dumu.housego.framgent.ATQiuZuFragment;
import com.dumu.housego.framgent.ATYHQListFragment;
import com.dumu.housego.framgent.ATershouListFragment;
import com.dumu.housego.framgent.ATershouSubmitFragment;
import com.dumu.housego.framgent.ATrentingListFragment;
import com.dumu.housego.framgent.JiSuanQiFragment;
import com.dumu.housego.framgent.WeiTuoGuanLiFragment;
import com.dumu.housego.util.FontHelper;

public class AgentPersonalActivity extends BaseFragmentActivity {
	public static final int AGENT_ERSHOU_LIST = 0;// 经纪人二手房列表
	public static final int AGENT_ERSHOU_SUBMIT = 1;// 经纪人二手房发布
	public static final int AGENT_RENTING_LIST = 2;// 经纪人出租房列表
	public static final int AGENT_RENTING_SUBMIT = 3;// 经纪人出租房发布
	public static final int AGENT_CHENGJIAO = 4; // 经纪人成交房源
	public static final int AGENT_GOUDI = 5; // 经纪人成交房源
	public static final int AGENT_YHQ = 6; // 经纪人成交房源
	public static final int AGENT_QIUZU = 7; // 经纪人成交房源
	public static final int AGENT_QIUGOU = 8; // 经纪人成交房源
	public static final int AGENT_HISTROY = 9; // 经纪人成交房源
	public static final int GOUFANGJISUANQI = 10; // 经纪人成交房源
	public static final int AGENT_WEITUOGUANLI = 11; // 经纪人成交房源

	private FrameLayout flAgentFragment;
	private Fragment fragment;
	int DisplayType;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_agent_personal);
		FontHelper.injectFont(findViewById(android.R.id.content));
		DisplayType = getIntent().getIntExtra("FRAGMENT_KEY", AGENT_ERSHOU_LIST);
		initView();
		initData();

	}

	private void initData() {

		switch (DisplayType) {
		case AGENT_ERSHOU_LIST:
			fragment = new ATershouListFragment();
			break;
		case AGENT_RENTING_LIST:
			fragment = new ATrentingListFragment();
			break;
		case AGENT_CHENGJIAO:
			fragment = new AGChengJiaohouseFragment();
			break;
		case AGENT_GOUDI:
			fragment = new ATGouDiListFragment();
			break;
		case AGENT_YHQ:
			fragment = new ATYHQListFragment();
			break;
		case AGENT_QIUZU:
			fragment = new ATQiuZuFragment();
			break;
		case AGENT_QIUGOU:
			fragment = new ATQiuGouFragment();
			break;
		case AGENT_HISTROY:
			fragment = new ATHistroyDataFragment();
			break;
		case GOUFANGJISUANQI:
			fragment = new JiSuanQiFragment();
			break;
		case AGENT_ERSHOU_SUBMIT:
			fragment = new ATershouSubmitFragment();
			break;
		case AGENT_WEITUOGUANLI:
			fragment = new WeiTuoGuanLiFragment();
			break;
		default:
			break;
		}

		FragmentTransaction trans = getSupportFragmentManager().beginTransaction();
		trans.replace(R.id.fl_agent_fragment, fragment);
		trans.commitAllowingStateLoss();

	}

	private void initView() {
		flAgentFragment = (FrameLayout) findViewById(R.id.fl_agent_fragment);

	}

}


text:
namespace opensles {

//
// Output Mix interface
//
class CSLOutputMixItf : public CSLInterface {
public:
    DECL_CSL_INTERFACE_OPERATORS(CSLOutputMixItf, SLOutputMixItf)

    static const SLInterfaceID sGetIID() noexcept { return SL_IID_OUTPUTMIX; }

    CSLOutputMixItf() : CSLInterface(sGetIID()) {}
    virtual ~CSLOutputMixItf() {}

    SLresult GetDestinationOutputDeviceIDs(SLint32 *pNumDevices, SLuint32 *pDeviceIDs) noexcept
    {
        if (!self())
            return SL_RESULT_RESOURCE_ERROR;
        return (*self())->GetDestinationOutputDeviceIDs(self(), pNumDevices, pDeviceIDs);
    }

    SLresult RegisterDeviceChangeCallback(slMixDeviceChangeCallback callback, void *pContext) noexcept
    {
        if (!self())
            return SL_RESULT_RESOURCE_ERROR;
        return (*self())->RegisterDeviceChangeCallback(self(), callback, pContext);
    }

    SLresult ReRoute(SLint32 numOutputDevices, SLuint32 *pOutputDeviceIDs) noexcept
    {
        if (!self())
            return SL_RESULT_RESOURCE_ERROR;
        return (*self())->ReRoute(self(), numOutputDevices, pOutputDeviceIDs);
    }
};

} // namespace opensles

#endif // OPENSLESCXX_CSL_OUTPUT_MIX_ITF_HPP_


text:
package org.jasig.portal.rendering;

import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLEventFactory;
import javax.xml.stream.events.Attribute;
import javax.xml.stream.events.StartElement;

import org.jasig.portal.layout.IStylesheetUserPreferencesService;
import org.jasig.portal.layout.IStylesheetUserPreferencesService.PreferencesScope;
import org.jasig.portal.layout.IUserLayoutManager;
import org.jasig.portal.layout.om.ILayoutAttributeDescriptor;
import org.jasig.portal.layout.om.IStylesheetDescriptor;
import org.jasig.portal.layout.om.IStylesheetUserPreferences;
import org.jasig.portal.utils.cache.CacheKey;
import org.jasig.portal.utils.cache.CacheKey.CacheKeyBuilder;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Base implementation of layout attribute source that feeds off of {@link IStylesheetDescriptor} and {@link IStylesheetUserPreferences} data
 *
 * @author Eric Dalquist
 */
public abstract class StylesheetAttributeSource implements AttributeSource, BeanNameAware {
    private final XMLEventFactory xmlEventFactory = XMLEventFactory.newFactory();
    private String name;
    protected IStylesheetUserPreferencesService stylesheetUserPreferencesService;

    @Autowired
    public void setStylesheetUserPreferencesService(IStylesheetUserPreferencesService stylesheetUserPreferencesService) {
        this.stylesheetUserPreferencesService = stylesheetUserPreferencesService;
    }

    @Override
    public void setBeanName(String name) {
        this.name = name;
    }

    @Override
    public final Iterator<Attribute> getAdditionalAttributes(HttpServletRequest request, HttpServletResponse response, StartElement event) {
        final IStylesheetDescriptor stylesheetDescriptor = this.getStylesheetDescriptor(request);

        final PreferencesScope stylesheetPreferencesScope = this.getStylesheetPreferencesScope(request);

        final Collection<Attribute> attributes = new LinkedList<Attribute>();

        for (final ILayoutAttributeDescriptor layoutAttributeDescriptor : stylesheetDescriptor.getLayoutAttributeDescriptors()) {
            final Set<String> targetElementNames = layoutAttributeDescriptor.getTargetElementNames();
            final QName eventName = event.getName();
            final String localEventName = eventName.getLocalPart();
            if (targetElementNames.contains(localEventName)) {
                final Attribute subscribeIdAttr = event.getAttributeByName(IUserLayoutManager.ID_ATTR_NAME);
                final String subscribeId = subscribeIdAttr.getValue();
                final String name = layoutAttributeDescriptor.getName();

                String value = this.stylesheetUserPreferencesService.getLayoutAttribute(request, stylesheetPreferencesScope, subscribeId, name);
                if (value == null) {
                    value = layoutAttributeDescriptor.getDefaultValue();
                }

                if (value != null) {
                    final Attribute attribute = xmlEventFactory.createAttribute(name, value);
                    attributes.add(attribute);
                }
            }
        }

        return attributes.iterator();
    }

    @Override
    public final CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) {
        final PreferencesScope stylesheetPreferencesScope = this.getStylesheetPreferencesScope(request);

        final CacheKeyBuilder<String, String> cacheKeyBuilder = CacheKey.builder(this.name);

        final Iterable<String> layoutAttributeNodeIds = this.stylesheetUserPreferencesService.getAllLayoutAttributeNodeIds(request, stylesheetPreferencesScope);
        for (final String nodeId : layoutAttributeNodeIds) {
            cacheKeyBuilder.add(nodeId);
            this.stylesheetUserPreferencesService.populateLayoutAttributes(request, stylesheetPreferencesScope, nodeId, cacheKeyBuilder);
        }

        return cacheKeyBuilder.build();
    }

    public IStylesheetDescriptor getStylesheetDescriptor(HttpServletRequest request) {
        final PreferencesScope stylesheetPreferencesScope = this.getStylesheetPreferencesScope(request);
        return this.stylesheetUserPreferencesService.getStylesheetDescriptor(request, stylesheetPreferencesScope);
    }

    public abstract PreferencesScope getStylesheetPreferencesScope(HttpServletRequest request);
}


text:
//////////////////////////////////////////////////////////////////////////////
//
//                    Copyright 2019, Cornutum Project
//                             www.cornutum.org
//
//////////////////////////////////////////////////////////////////////////////

package org.cornutum.tcases.generator.io;

import org.cornutum.tcases.generator.IGeneratorSet;
import org.cornutum.tcases.util.MapBuilder;

import org.apache.commons.io.IOUtils;

import java.io.Closeable;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;

import javax.json.Json;
import javax.json.JsonWriter;
import javax.json.JsonWriterFactory;
import static javax.json.stream.JsonGenerator.PRETTY_PRINTING;

/**
 * Writes an {@link IGeneratorSet} in the form of a JSON document.
 *
 */
public class GeneratorSetJsonWriter implements Closeable
  {
  /**
   * Creates a new GeneratorSetJsonWriter object that writes to standard output.
   */
  public GeneratorSetJsonWriter()
    {
    this( (Writer) null);
    }

  /**
   * Creates a new GeneratorSetJsonWriter object that writes to the given stream.
   */
  public GeneratorSetJsonWriter( OutputStream stream)
    {
    this( writerFor( stream));
    }

  /**
   * Creates a new GeneratorSetJsonWriter object that writes to the given stream.
   */
  public GeneratorSetJsonWriter( Writer writer)
    {
    setWriter( writer);
    }

  /**
   * Writes the given system test definition the form of a JSON document.
   */
  public void write( IGeneratorSet generatorSet)
    {
    JsonWriterFactory writerFactory = Json.createWriterFactory( MapBuilder.of( PRETTY_PRINTING, true).build());
    JsonWriter jsonWriter = writerFactory.createWriter( getWriter());

    jsonWriter.write( GeneratorSetJson.toJson( generatorSet));
    }

  /**
   * Flushes the writer.
   */
  public void flush()
    {
    try
      {
      getWriter().flush();
      }
    catch( IOException ignore)
      {
      }
    }

  /**
   * Closes the writer.
   */
  @Override
  public void close()
    {
    IOUtils.closeQuietly( getWriter(), null);
    }

  /**
   * Changes the output stream for this writer.
   */
  protected void setWriter( Writer writer)
    {
    writer_ =
      writer == null
      ? writerFor( System.out)
      : writer;
    }

  /**
   * Returns the output stream for this writer.
   */
  protected Writer getWriter()
    {
    return writer_;
    }

  /**
   * Returns a Writer for the given output stream;
   */
  private static Writer writerFor( OutputStream stream)
    {
    try
      {
      return
        stream == null
        ? null
        : new OutputStreamWriter( stream, "UTF-8");
      }
    catch( Exception e)
      {
      throw new RuntimeException( "Can't create writer", e);
      }
    }

  private Writer writer_;
  }


text:
#pragma once

#include <OmicronTK/Lua/LuaState.hpp>

namespace OmicronTK {

namespace OTKQT {
    class VolumeControl;
    class Slider;
}

}

class MusicStream;

class QObject;
class QWidget;
class QMenuBar;
class QAction;
class QLineEdit;
class QPushButton;
class QLabel;
class QProgressBar;
class QStandardItemModel;
class QSortFilterProxyModel;

class MusicWindow;
class MusicPlaylist;

class MusicButton;
class PlaylistButton;

class MusicUi
{
    MusicUi(MusicWindow *);

    bool init(MusicStream *);
    void createMenuBar();

    void changeRepeatStyle(int);
    void changeRandomStyle(bool);
    void changeTabStyle(int mode);

    friend class MusicWindow;

    MusicWindow *m_musicWindow;
    MusicPlaylist *m_playlistView;
    QWidget *m_centralWidget;

    QMenuBar *m_menuBar;
    QAction *m_openCDAction,
        *m_openMusicAction,
        *m_addMusicAction,
        *m_openDirAction,
        *m_addDirAction,
        *m_openPlaylistAction,
        *m_clearPlaylistAction,
        *m_exitAction,
        *m_radioModeAction,
        *m_recorderModeAction,
        *m_playlistAction,
        *m_equalizerAction,
        *m_configAction,
        *m_checkUpdateAction,
        *m_websiteAction,
        *m_facebookAction,
        *m_aboutAction;

    QLabel *m_currentTrackLabel,
        *m_totalTracksLabel,
        *m_currentTagLabel,
        *m_totalTimeLabel,
        *m_fileTypeLabel,
        *m_timeLabel;

    QPushButton *m_playButton,
        *m_pauseButton,
        *m_stopButton,
        *m_prevButton,
        *m_nextButton,
        *m_changeFavoriteButton,
        *m_repeatButton,
        *m_randomButton,
        *m_playlistManagerButton;

    OmicronTK::OTKQT::Slider *m_timeSlider;
    OmicronTK::OTKQT::VolumeControl *m_volumeControl;
    QProgressBar *m_leftChProgressBar,
        *m_rightChProgressBar;

    QLineEdit *m_searchLineEdit;

    QPushButton *m_musicTabButton;
    QPushButton *m_playlistTabButton;
    QPushButton *m_favoritesTabButton;

    OmicronTK::OTKLUA::LuaState m_luaState;
};


text:
/*
 *  Written for the Pkcs11Interop project by:
 *  Jaroslav IMRICH <jimrich@jimrich.sk>
 */

using System;

// Note: Code in this file is maintained manually.

namespace Net.Pkcs11Interop.Common
{
    /// <summary>
    /// Bit flags
    /// </summary>
    public static class CKF
    {
        /// <summary>
        /// True if a token is present in the slot
        /// </summary>
        public const uint CKF_TOKEN_PRESENT = 0x00000001;

        /// <summary>
        /// True if the reader supports removable devices
        /// </summary>
        public const uint CKF_REMOVABLE_DEVICE = 0x00000002;

        /// <summary>
        /// True if the slot is a hardware slot, as opposed to a software slot implementing a "soft token"
        /// </summary>
        public const uint CKF_HW_SLOT = 0x00000004;

        /// <summary>
        /// True if the token has its own random number generator
        /// </summary>
        public const uint CKF_RNG = 0x00000001;

        /// <summary>
        /// True if the token is write-protected
        /// </summary>
        public const uint CKF_WRITE_PROTECTED = 0x00000002;

        /// <summary>
        /// True if there are some cryptographic functions that a user must be logged in to perform
        /// </summary>
        public const uint CKF_LOGIN_REQUIRED = 0x00000004;

        /// <summary>
        /// True if the normal user's PIN has been initialized
        /// </summary>
        public const uint CKF_USER_PIN_INITIALIZED = 0x00000008;

        /// <summary>
        /// True if a successful save of a session's cryptographic operations state always contains all keys needed to restore the state of the session
        /// </summary>
        public const uint CKF_RESTORE_KEY_NOT_NEEDED = 0x00000020;

        /// <summary>
        /// True if token has its own hardware clock
        /// </summary>
        public const uint CKF_CLOCK_ON_TOKEN = 0x00000040;

        /// <summary>
        /// True if token has a "protected authentication path", whereby a user can log into the token without passing a PIN through the Cryptoki library
        /// </summary>
        public const uint CKF_PROTECTED_AUTHENTICATION_PATH = 0x00000100;

        /// <summary>
        /// True if a single session with the token can perform dual cryptographic operations
        /// </summary>
        public const uint CKF_DUAL_CRYPTO_OPERATIONS = 0x00000200;

        /// <summary>
        /// True if the token has been initialized using C_InitializeToken or an equivalent mechanism outside the scope of this standard. Calling C_InitializeToken when this flag is set will cause the token to be reinitialized.
        /// </summary>
        public const uint CKF_TOKEN_INITIALIZED = 0x00000400;

        /// <summary>
        /// True if the token supports secondary authentication for private key objects.
        /// </summary>
        public const uint CKF_SECONDARY_AUTHENTICATION = 0x00000800;

        /// <summary>
        /// True if an incorrect user login PIN has been entered at least once since the last successful authentication.
        /// </summary>
        public const uint CKF_USER_PIN_COUNT_LOW = 0x00010000;

        /// <summary>
        /// True if supplying an incorrect user PIN will it to become locked.
        /// </summary>
        public const uint CKF_USER_PIN_FINAL_TRY = 0x00020000;

        /// <summary>
        /// True if the user PIN has been locked. User login to the token is not possible.
        /// </summary>
        public const uint CKF_USER_PIN_LOCKED = 0x00040000;

        /// <summary>
        /// True if the user PIN value is the default value set by token initialization or manufacturing, or the PIN has been expired by the card.
        /// </summary>
        public const uint CKF_USER_PIN_TO_BE_CHANGED = 0x00080000;

        /// <summary>
        /// True if an incorrect SO login PIN has been entered at least once since the last successful authentication.
        /// </summary>
        public const uint CKF_SO_PIN_COUNT_LOW = 0x00100000;

        /// <summary>
        /// True if supplying an incorrect SO PIN will it to become locked.
        /// </summary>
        public const uint CKF_SO_PIN_FINAL_TRY = 0x00200000;

        /// <summary>
        /// True if the SO PIN has been locked. User login to the token is not possible.
        /// </summary>
        public const uint CKF_SO_PIN_LOCKED = 0x00400000;

        /// <summary>
        /// True if the SO PIN value is the default value set by token initialization or manufacturing, or the PIN has been expired by the card.
        /// </summary>
        public const uint CKF_SO_PIN_TO_BE_CHANGED = 0x00800000;

        /// <summary>
        /// True if the token failed a FIPS 140-2 self-test and entered an error state.
        /// </summary>
        public const uint CKF_ERROR_STATE = 0x01000000;

        /// <summary>
        /// True if the session is read/write; false if the session is read-only
        /// </summary>
        public const uint CKF_RW_SESSION = 0x00000002;

        /// <summary>
        /// This flag is provided for backward compatibility, and should always be set to true
        /// </summary>
        public const uint CKF_SERIAL_SESSION = 0x00000004;

        /// <summary>
        /// Identifies attribute whose value is an array of attributes
        /// </summary>
        public const uint CKF_ARRAY_ATTRIBUTE = 0x40000000;

        /// <summary>
        /// True if the mechanism is performed by the device; false if the mechanism is performed in software
        /// </summary>
        public const uint CKF_HW = 0x00000001;

        /// <summary>
        /// True if the mechanism can be used with C_EncryptInit
        /// </summary>
        public const uint CKF_ENCRYPT = 0x00000100;

        /// <summary>
        /// True if the mechanism can be used with C_DecryptInit
        /// </summary>
        public const uint CKF_DECRYPT = 0x00000200;

        /// <summary>
        /// True if the mechanism can be used with C_DigestInit
        /// </summary>
        public const uint CKF_DIGEST = 0x00000400;

        /// <summary>
        /// True if the mechanism can be used with C_SignInit
        /// </summary>
        public const uint CKF_SIGN = 0x00000800;

        /// <summary>
        /// True if the mechanism can be used with C_SignRecoverInit
        /// </summary>
        public const uint CKF_SIGN_RECOVER = 0x00001000;

        /// <summary>
        /// True if the mechanism can be used with C_VerifyInit
        /// </summary>
        public const uint CKF_VERIFY = 0x00002000;

        /// <summary>
        /// True if the mechanism can be used with C_VerifyRecoverInit
        /// </summary>
        public const uint CKF_VERIFY_RECOVER = 0x00004000;

        /// <summary>
        /// True if the mechanism can be used with C_GenerateKey
        /// </summary>
        public const uint CKF_GENERATE = 0x00008000;

        /// <summary>
        /// True if the mechanism can be used with C_GenerateKeyPair
        /// </summary>
        public const uint CKF_GENERATE_KEY_PAIR = 0x00010000;

        /// <summary>
        /// True if the mechanism can be used with C_WrapKey
        /// </summary>
        public const uint CKF_WRAP = 0x00020000;

        /// <summary>
        /// True if the mechanism can be used with C_UnwrapKey
        /// </summary>
        public const uint CKF_UNWRAP = 0x00040000;

        /// <summary>
        /// True if the mechanism can be used with C_DeriveKey
        /// </summary>
        public const uint CKF_DERIVE = 0x00080000;

        /// <summary>
        /// True if the mechanism can be used with EC domain parameters over Fp
        /// </summary>
        public const uint CKF_EC_F_P = 0x00100000;

        /// <summary>
        /// True if the mechanism can be used with EC domain parameters over F2m
        /// </summary>
        public const uint CKF_EC_F_2M = 0x00200000;

        /// <summary>
        /// True if the mechanism can be used with EC domain parameters of the choice ecParameters
        /// </summary>
        public const uint CKF_EC_ECPARAMETERS = 0x00400000;

        /// <summary>
        /// True if the mechanism can be used with EC domain parameters of the choice namedCurve
        /// </summary>
        public const uint CKF_EC_NAMEDCURVE = 0x00800000;

        /// <summary>
        /// True if the mechanism can be used with elliptic curve point uncompressed
        /// </summary>
        public const uint CKF_EC_UNCOMPRESS = 0x01000000;

        /// <summary>
        /// True if the mechanism can be used with elliptic curve point compressed
        /// </summary>
        public const uint CKF_EC_COMPRESS = 0x02000000;

        /// <summary>
        /// True if there is an extension to the flags; false if no extensions
        /// </summary>
        public const uint CKF_EXTENSION = 0x80000000;

        /// <summary>
        /// True if application threads which are executing calls to the library may not use native operating system calls to spawn new threads; false if they may
        /// </summary>
        public const uint CKF_LIBRARY_CANT_CREATE_OS_THREADS = 0x00000001;

        /// <summary>
        /// True if the library can use the native operation system threading model for locking; false otherwise
        /// </summary>
        public const uint CKF_OS_LOCKING_OK = 0x00000002;

        /// <summary>
        /// Flag indicating that C_WaitForSlotEvent should not block until an event occurs - it should return immediately instead
        /// </summary>
        public const uint CKF_DONT_BLOCK = 1;

        /// <summary>
        /// True if the OTP computation shall be for the next OTP, rather than the current one
        /// </summary>
        public const uint CKF_NEXT_OTP = 0x00000001;

        /// <summary>
        /// True if the OTP computation must not include a time value
        /// </summary>
        public const uint CKF_EXCLUDE_TIME = 0x00000002;

        /// <summary>
        /// True if the OTP computation must not include a counter value
        /// </summary>
        public const uint CKF_EXCLUDE_COUNTER = 0x00000004;

        /// <summary>
        /// True if the OTP computation must not include a challenge
        /// </summary>
        public const uint CKF_EXCLUDE_CHALLENGE = 0x00000008;

        /// <summary>
        /// True if the OTP computation must not include a PIN value
        /// </summary>
        public const uint CKF_EXCLUDE_PIN = 0x00000010;

        /// <summary>
        /// True if the OTP returned shall be in a form suitable for human consumption
        /// </summary>
        public const uint CKF_USER_FRIENDLY_OTP = 0x00000020;
    }
}


text:
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM e:/builds/moz2_slave/rel-2.0-xr-w32-bld/build/netwerk/dns/nsIIDNService.idl
 */

#ifndef __gen_nsIIDNService_h__
#define __gen_nsIIDNService_h__

#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    nsIIDNService */
#define NS_IIDNSERVICE_IID_STR "a592a60e-3621-4f19-a318-2bf233cfad3e"

#define NS_IIDNSERVICE_IID \
  {0xa592a60e, 0x3621, 0x4f19, \
    { 0xa3, 0x18, 0x2b, 0xf2, 0x33, 0xcf, 0xad, 0x3e }}

/**
 * nsIIDNService interface.
 *
 * IDN (Internationalized Domain Name) support. Provides facilities
 * for manipulating IDN hostnames according to the specification set
 * forth by the IETF.
 *
 * IDN effort:
 * http://www.ietf.org/html.characters/idn-charter.html
 * http://www.i-dns.net
 *
 * IDNA specification:
 * http://search.ietf.org/internet-drafts/draft-ietf-idn-idna-06.txt
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIIDNService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIDNSERVICE_IID)

  /**
     * Prepares the input hostname according to IDNA ToASCII operation,
     * the input hostname is assumed to be UTF8-encoded.
     */
  /* ACString convertUTF8toACE (in AUTF8String input); */
  NS_SCRIPTABLE NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval NS_OUTPARAM) = 0;

  /**
     * This is the ToUnicode operation as specified in the IDNA proposal,
     * with an additional step to encode the result in UTF-8.
     * It takes an ACE-encoded hostname and performs ToUnicode to it, then
     * encodes the resulting string into UTF8.
     */
  /* AUTF8String convertACEtoUTF8 (in ACString input); */
  NS_SCRIPTABLE NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval NS_OUTPARAM) = 0;

  /**
     * Checks if the input string is ACE encoded or not.
     */
  /* boolean isACE (in ACString input); */
  NS_SCRIPTABLE NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval NS_OUTPARAM) = 0;

  /**
     * Performs the unicode normalization needed for hostnames in IDN,
     * for callers that want early normalization.
     */
  /* AUTF8String normalize (in AUTF8String input); */
  NS_SCRIPTABLE NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval NS_OUTPARAM) = 0;

  /**
     * Normalizes and converts a host to UTF-8 if the host is in the IDN
     * whitelist, otherwise converts it to ACE. This is useful for display
     * purposes and to ensure an encoding consistent with nsIURI::GetHost().
     * If the result is ASCII or ACE encoded, |isASCII| will be true.
     */
  /* AUTF8String convertToDisplayIDN (in AUTF8String input, out boolean isASCII); */
  NS_SCRIPTABLE NS_IMETHOD ConvertToDisplayIDN(const nsACString & input, PRBool *isASCII NS_OUTPARAM, nsACString & _retval NS_OUTPARAM) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIIDNService, NS_IIDNSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIIDNSERVICE \
  NS_SCRIPTABLE NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD ConvertToDisplayIDN(const nsACString & input, PRBool *isASCII NS_OUTPARAM, nsACString & _retval NS_OUTPARAM);

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIIDNSERVICE(_to) \
  NS_SCRIPTABLE NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval NS_OUTPARAM) { return _to ConvertUTF8toACE(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval NS_OUTPARAM) { return _to ConvertACEtoUTF8(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval NS_OUTPARAM) { return _to IsACE(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval NS_OUTPARAM) { return _to Normalize(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD ConvertToDisplayIDN(const nsACString & input, PRBool *isASCII NS_OUTPARAM, nsACString & _retval NS_OUTPARAM) { return _to ConvertToDisplayIDN(input, isASCII, _retval); }

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIIDNSERVICE(_to) \
  NS_SCRIPTABLE NS_IMETHOD ConvertUTF8toACE(const nsACString & input, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertUTF8toACE(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD ConvertACEtoUTF8(const nsACString & input, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertACEtoUTF8(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD IsACE(const nsACString & input, PRBool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsACE(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD Normalize(const nsACString & input, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Normalize(input, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD ConvertToDisplayIDN(const nsACString & input, PRBool *isASCII NS_OUTPARAM, nsACString & _retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->ConvertToDisplayIDN(input, isASCII, _retval); }

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class nsIDNService : public nsIIDNService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIIDNSERVICE

  nsIDNService();

private:
  ~nsIDNService();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsIDNService, nsIIDNService)

nsIDNService::nsIDNService()
{
  /* member initializers and constructor code */
}

nsIDNService::~nsIDNService()
{
  /* destructor code */
}

/* ACString convertUTF8toACE (in AUTF8String input); */
NS_IMETHODIMP nsIDNService::ConvertUTF8toACE(const nsACString & input, nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String convertACEtoUTF8 (in ACString input); */
NS_IMETHODIMP nsIDNService::ConvertACEtoUTF8(const nsACString & input, nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean isACE (in ACString input); */
NS_IMETHODIMP nsIDNService::IsACE(const nsACString & input, PRBool *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String normalize (in AUTF8String input); */
NS_IMETHODIMP nsIDNService::Normalize(const nsACString & input, nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String convertToDisplayIDN (in AUTF8String input, out boolean isASCII); */
NS_IMETHODIMP nsIDNService::ConvertToDisplayIDN(const nsACString & input, PRBool *isASCII NS_OUTPARAM, nsACString & _retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

#endif /* __gen_nsIIDNService_h__ */


text:
/* jshint globalstrict:false, strict:false, maxlen : 4000 */
/* global assertEqual */

// //////////////////////////////////////////////////////////////////////////////
// / @brief tests for dump/reload
// /
// / @file
// /
// / DISCLAIMER
// /
// / Copyright 2010-2012 triagens GmbH, Cologne, Germany
// /
// / 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.
// /
// / Copyright holder is triAGENS GmbH, Cologne, Germany
// /
// / @author Wilfried Goesgens
// / @author Copyright 2012, triAGENS GmbH, Cologne, Germany
// //////////////////////////////////////////////////////////////////////////////

var internal = require('internal');
var jsunity = require('jsunity');

// //////////////////////////////////////////////////////////////////////////////
// / @brief test suite
// //////////////////////////////////////////////////////////////////////////////

function dumpTestSuite () {
  'use strict';
  var db = internal.db;

  return {

// //////////////////////////////////////////////////////////////////////////////
// / @brief set up
// //////////////////////////////////////////////////////////////////////////////

    setUp: function () {
    },

// //////////////////////////////////////////////////////////////////////////////
// / @brief tear down
// //////////////////////////////////////////////////////////////////////////////

    tearDown: function () {
    },

// //////////////////////////////////////////////////////////////////////////////
// / @brief test the empty collection
// //////////////////////////////////////////////////////////////////////////////

    testKnowsGraph: function () {
      var g = db._collection('_graphs');
      var e = db._collection('knows');
      var v = db._collection('persons');

      assertEqual(1, g.count());

      assertEqual(3, e.type()); // edge
      assertEqual(2, e.getIndexes().length);
      assertEqual('edge', e.getIndexes()[1].type);
      assertEqual(5, e.count());

      assertEqual(2, v.type()); // document
      assertEqual(1, v.getIndexes().length); // just primary index
      assertEqual('primary', v.getIndexes()[0].type);
      assertEqual(5, v.count());
    }
  };
}

// //////////////////////////////////////////////////////////////////////////////
// / @brief executes the test suite
// //////////////////////////////////////////////////////////////////////////////

jsunity.run(dumpTestSuite);

return jsunity.done();


text:
package com.untamedears.JukeAlert.command.commands;

import static com.untamedears.JukeAlert.util.Utility.findTargetedOwnedSnitch;

import java.util.Set;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import com.untamedears.JukeAlert.command.PlayerCommand;
import com.untamedears.JukeAlert.model.Snitch;
import com.untamedears.JukeAlert.tasks.GetSnitchInfoPlayerTask;

public class NameCommand extends PlayerCommand {

    public NameCommand() {
        super("Name");
        setDescription("Set snitch name");
        setUsage("/janame <name>");
        setArgumentRange(1, 1);
        setIdentifier("janame");
    }

    @Override
    public boolean execute(CommandSender sender, String[] args) {
        if (sender instanceof Player) {
            Player player = (Player) sender;
            World world = player.getWorld();

            String name = "";
            if (args[0].length() > 40) {
                name = args[0].substring(0, 39);
            } else {
            	name = args[0];
            }
            Snitch snitch = findTargetedOwnedSnitch(player);
            if (snitch != null) {
            	plugin.getJaLogger().updateSnitchName(snitch, name);
            	Snitch newSnitch = snitch;
            	newSnitch.setName(name);
            	plugin.getSnitchManager().removeSnitch(snitch);
            	plugin.getSnitchManager().addSnitch(newSnitch);
            	sender.sendMessage(ChatColor.AQUA + " Changed snitch name to " + name);
            }
            return true;
        } else {
            sender.sendMessage(ChatColor.RED + "You do not own any snitches nearby!");
            return false;
        }
    }
}


text:
using NUnit.Framework;
using System;

namespace libmapgen
{
	[TestFixture()]
	public class RandomGeneratorTest
	{
		[Test()]
		public void GenerationTest ()
		{
			for (var i=0; i<5; i++) {
				Assert.GreaterOrEqual(RandomGenerator.generate (0, 1), 0);
				Assert.Less (RandomGenerator.generate (0, 1), 1);

				Assert.GreaterOrEqual (RandomGenerator.generate (45, 60), 45);
				Assert.Less (RandomGenerator.generate (0, 60), 60);
			}
		}
	}
}


text:
Thank you for being interested in contributing to this project!
Feel free to ask questions on the [issue tracker](https://github.com/styx-static/styx/issues).

## Setting up a development environment

Setting up a development environment requires [`nix`](https://nixos.org/nix/).

### Preparation

#### Getting the repository

Clone this repository:

```
$ git clone https://github.com/styx-static/styx.git
```

### Devshell

Enter the devshell:

```
$ direnv allow || nix develop -c "$SHELL"
```

### Styx

Running styx dev version:

```
$ nix run . -- --version
```

Styx is just a shell script wrapping `nix-build`, the `--DEBUG` flag can be passed to see executed commands (`set -x`).

### Themes

Previewing the dev version showcase theme example site:

```
$ nix run . -- preview-theme showcase
```

Loading the showcase example site in `nix repl`:

```
$ nix repl ./repl.nix
> themes = out.data.styxthemes

nix-repl> site = import "${themes.showcase}"/example/site.nix {}

nix-repl> site.conf
{ siteUrl = "https://styx-static.github.io/styx-theme-showcase"; theme = { ... }; }
```

## Commit policy

Please run the tests before any commit:

```
$ nix run .#run-tests
```


text:
<?php namespace Tamtamchik\NameCase\Test;

use PHPUnit\Framework\TestCase;
use Tamtamchik\NameCase\Formatter;

final class NameCaseTest extends TestCase
{
    private $names = [
        // General
        "Keith", "Yuri's", "Leigh-Williams", "McCarthy",
        "O'Callaghan", "St. John", "von Streit",
        "van Dyke", "Van", "ap Llwyd Dafydd",
        "al Fahd", "Al",
        "el Grecco",
        "ben Gurion", "Ben",
        "da Vinci",
        "di Caprio", "du Pont", "de Legate",
        "del Crond", "der Sind", "van der Post", "van den Thillart",
        "ter Zanden", "ten Brink",
        "von Trapp", "la Poisson", "le Figaro",
        "Mack Knife", "Dougal MacDonald",
        "Yusof bin Ishak",
    ];

    private $macNames = [
        // Mac exceptions
        "Machin", "Machlin", "Machar",
        "Mackle", "Macklin", "Mackie",
        "Macquarie", "Machado", "Macevicius",
        "Maciulis", "Macias", "MacMurdo",
    ];

    private $romanNames = [
        // Roman numerals
        "Henry VIII", "Louis III", "Louis XIV",
        "Charles II", "Fred XLIX",
    ];

    private $initialNames = [
        // Two letter initials names should remain capital with and without periods
        "JJ Abrams", "JD Salinger", "AJ Michalka",
        "J. F. Kennedy", "J.F. Kennedy",
        // Except for some specifics
        "Mr Smith",
        "Ms Smith",
        "Dr Martin Luther King Jr",
        "St Patrick",
        "Martin Luther King Sr",
        "Lt Worf",
    ];

    /** Test numbers. */
    public function testNumbersAreUnaffected(): void
    {
        $properCased = '42';
        $this->assertEquals($properCased, Formatter::nameCase(mb_strtolower($properCased)));
    }

    /** Test dates. */
    public function testDatesAreUnaffected(): void
    {
        $properCased = (new \DateTime('now'))->format('Y-m-d H:i:s');
        $this->assertEquals($properCased, Formatter::nameCase(mb_strtolower($properCased)));
    }

    /** Test nulls. */
    public function testNullsAreUnaffected(): void
    {
        $properCased = null;
        $this->assertEquals($properCased, Formatter::nameCase(mb_strtolower($properCased)));
    }

    /** Test base UTF-8 support. */
    public function testInternationalization(): void
    {
        $properCased = 'Iñtërnâtiônàlizætiøn';
        $this->assertEquals($properCased, Formatter::nameCase(mb_strtolower($properCased)));
    }

    /** Test static call. */
    public function testStatic(): void
    {
        foreach ($this->names as $name) {
            $this->assertEquals($name, Formatter::nameCase(mb_strtolower($name)));
        }
    }

    /** Test instantiation. */
    public function testInstantiation(): void
    {
        $formatter = new Formatter();

        foreach ($this->names as $name) {
            $this->assertEquals($name, $formatter->nameCase(mb_strtolower($name)));
        }
    }

    /** Test empty string. */
    public function testEmptyString(): void
    {
        $this->assertEquals("", Formatter::nameCase(""));
    }

    /** Test irish exceptions. */
    public function testIrishExceptions(): void
    {
        foreach ($this->macNames as $name) {
            $this->assertEquals($name, Formatter::nameCase(mb_strtolower($name)));
        }
    }

    /** Test roman numerals. */
    public function testRomanNumerals(): void
    {
        foreach ($this->romanNames as $name) {
            $this->assertEquals($name, Formatter::nameCase(mb_strtolower($name)));
        }
    }

    /** Test initials */
    public function testInitials(): void
    {
        foreach ($this->initialNames as $name) {
            $this->assertEquals($name, Formatter::nameCase(mb_strtolower($name)));
        }
    }

    private $programmers = [
        "Michael Abrash", "Scott Adams", "Leonard Adleman", "Alfred Aho", "J.J. Allaire",
        "Andrei Alexandrescu", "Paul Allen", "Eric Allman", "Marc Andreessen",
        "Bill Atkinson", "John Backus", "Richard Bartle", "Brian Behlendorf",
        "Kent Beck", "Donald Becker", "Doug Bell", "Fabrice Bellard",
        "Tim Berners-Lee", "Daniel J. Bernstein", "Sabeer Bhatia", "Eric Bina",
        "Marc Blank", "Joshua Bloch", "Grady Booch", "Bert Bos",
        "Stephen Richard Bourne", "David Bradley", "Andrew Braybrook", "Lawrence M. Breed",
        "Jack E. Bresenham", "Dan Bricklin", "Walter Bright", "Richard Brodie",
        "Andries Brouwer", "Danielle Bunten Berry", "Dries Buytaert", "Steve Capps",
        "John D. Carmack", "Vinton Cerf", "Ward Christensen", "Edgar F. Codd",
        "Bram Cohen", "Alain Colmerauer", "Alan Cooper", "Alan Cox",
        "Brad Cox", "Mike Cowlishaw", "Mark Crispin", "Ward Cunningham",
        "William Crowther", "Dave Cutler", "Ole-Johan Dahl", "James Duncan Davidson",
        "L. Peter Deutsch", "Edsger Dijkstra", "Matt Dillon", "Jack Dorsey",
        "Martin Dougiamas", "Adam Dunkels", "Les Earnest", "Brendan Eich",
        "Larry Ellison", "Marc Ewing", "Dan Farmer", "Stuart Feldman",
        "David Filo", "Brad Fitzpatrick", "Andrew Fluegelman", "Brian Fox",
        "Martin Fowler", "Jim Fruchterman", "Elon Gasper", "Bill Gates",
        "Steve Gibson", "John Gilmore", "Adele Goldberg", "Ryan C. Gordon",
        "James Gosling", "Bill Gosper", "Andrew Gower", "Paul Gower",
        "Paul Graham", "John Graham-Cumming", "Ralph Griswold", "Richard Greenblatt",
        "Scott Guthrie", "Andi Gutmans", "Jim Hall", "David Heinemeier Hansson",
        "David Albert Huffman", "Rebecca Heineman", "Anders Hejlsberg", "Ted Henter",
        "Andy Hertzfeld", "Rich Hickey", "D. Richard Hipp", "C. A. R. Hoare",
        "James Holmes", "Grace Hopper", "Dave Hyatt", "Miguel de Icaza",
        "Roberto Ierusalimschy", "Dan Ingalls", "Geir Ivarsøy",
        "Kenneth E. Iverson", "Toru Iwatani", "Bo Jangeborg", "Paul Jardetzky",
        "Lynne Jolitz", "William Jolitz", "Stephen C. Johnson", "Bill Joy",
        "Robert K. Jung", "Poul-Henning Kamp", "Mitch Kapor", "Phil Katz",
        "Alan Kay", "Mel Kaye", "John George Kemeny", "Stan Kelly-Bootle",
        "Brian Kernighan", "Gary Kildall", "Tom Knight", "Jim Knopf",
        "Donald E. Knuth", "Andrew Koenig",
        /* "Andre LaMothe", Combined La names are an issue */
        "Tom Lane", "Leslie Lamport", "Butler Lampson", "Sam Lantinga",
        "Richard H. Lathwell", "Chris Lattner", "Samuel J Leffler", "Rasmus Lerdorf",
        "Michael Lesk", "Gordon Letwin", "Rockford Lhotka", "Håkon Wium Lie", "Robert Love", "Ada Lovelace",
        /* "Al Lowe", Al is an issue */
        "Raphael Manfredi", "Khaled Mardam-Bey", "Yukihiro Matsumoto", "John McCarthy", "Craig McClanahan",
        "Daniel D. McCracken", "Douglas McIlroy", "Shawn McKenzie", "Marshall Kirk McKusick",
        "Bertrand Meyer", "Scott Meyers", "Bob Miner", "Jeff Minter",
        "Lou Montulli", "Bram Moolenaar", "David Moon", "Charles H. Moore",
        "Roger Moore", "Mike Muuss", "Patrick Naughton", "Peter Naur",
        "Fredrik Neij", "Graham Nelson", "Peter Norton", "Kristen Nygaard",
        /* "Ed Oates", Ed is an issue */
        "Martin Odersky", "Jarkko Oikarinen", "Oliver Twins",
        "John Ousterhout", "Onel de Guzman", "Larry Page", "Alexey Pajitnov",
        "Seymour Papert", "Tim Paterson", "Markus Persson", "Jeffrey Peterson",
        "Charles Petzold", "Rob Pike", "Kent Pitman", "Theo de Raadt",
        "Jef Raskin", "Eric S. Raymond", "Hans Reiser", "John Resig",
        "Craig Reynolds", "Dennis Ritchie", "Ron Rivest", "John Romero",
        "Blake Ross", "Guido van Rossum", "Jeff Rulifson", "Rusty Russell",
        "Steve Russell", "Mark Russinovich", "Bob Sabiston", "Muni Sakya",
        "Carl Sassenrath", "Chris Sawyer", "Bill Schelter", "Randal L. Schwartz",
        "Adi Shamir", "Mike Shaver", "Cliff Shaw", "Zed Shaw",
        "Emily Short", "Jacek Sieka", "Ken Silverman", "Charles Simonyi",
        "Colin Simpson", "Rich Skrenta", "Matthew Smith", "Henry Spencer",
        "Joel Spolsky", "Quentin Stafford-Fraser", "Richard Stallman", "Guy Steele",
        "Alexander Stepanov", "Ludvig Strigeus", "Bjarne Stroustrup", "Zeev Suraski",
        "Gerald Jay Sussman", "Herb Sutter", "Gottfrid Svartholm", "Tim Sweeney",
        "Andrew S. Tanenbaum", "Audrey Tang", "Simon Tatham", "Larry Tesler",
        "Jon Stephenson von Tetzchner", "Avie Tevanian", "Ken Thompson",
        "Michael Tiemann", "Linus Torvalds", "Andrew Tridgell", "Roy Trubshaw",
        "Bob Truel", "Wietse Venema", "Pat Villani", "Paul Vixie",
        "Patrick Volkerding", "Larry Wall", "Bob Wallace", "John Walker",
        "John Warnock", "Joseph Weizenbaum", "Robert Watson", "Pei-Yuan Wei",
        "Peter J. Weinberger", "Andrew Welch", "David Wheeler", "Arthur Whitney",
        "Bruce Wilcox", "Evan Williams", "Roberta Williams", "Sophie Wilson",
        "Dave Winer", "Niklaus Wirth", "Stephen Wolfram", "Don Woods",
        "Steve Wozniak", "Will Wright", "Jerry Yang", "Victor Yngve",
        "Jamie Zawinski", "Philip Zimmermann", "Mark Zuckerberg"
    ];

    /** Test http://en.wikipedia.org/wiki/List_of_programmers . */
    public function testListOfProgrammers(): void
    {
        foreach ($this->programmers as $name) {
            $this->assertEquals($name, Formatter::nameCase(mb_strtolower($name)));
        }
    }

    public function testLowerCaseWords(): void
    {
        $properCased = "Prince Philip, Duke of Edinburgh";
        $this->assertEquals($properCased, Formatter::nameCase(mb_strtolower($properCased)));
    }
}


text:
<!DOCTYPE html>

    <title>submergence.Authentication#setActive(rememberMe documentation</title>
    <link rel="stylesheet" type="text/css" href="../../../../../../../../index.css" />
    <link rel="stylesheet" type="text/css" href="../../../../../../../../highlight.css" />

            argument

                Boolean

                |

                :submergence:Authentication#setActive(rememberMe

        This document was generated with
        doczar
        at 3:03pm on 8/11/2015


text:
<?php

class SAML2_Certificate_FingerprintTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var SAML2_Certificate_Fingerprint
     */
    private $fingerprint;

    /**
     * @group certificate
     * @test
     *
     * @expectedException SAML2_Exception_InvalidArgumentException
     */
    public function fails_on_invalid_fingerprint_data()
    {
        $this->fingerprint = new SAML2_Certificate_Fingerprint(NULL);
    }
}


text:
import * as React from 'react';
/**
 * @ignore - internal component.
 */

var RadioGroupContext = React.createContext();

if (process.env.NODE_ENV !== 'production') {
  RadioGroupContext.displayName = 'RadioGroupContext';
}

export default RadioGroupContext;


text:
namespace views {

ViewsTestBase::ViewsTestBase()
    : setup_called_(false),
      teardown_called_(false) {
}

ViewsTestBase::~ViewsTestBase() {
  CHECK(setup_called_)
      << "You have overridden SetUp but never called super class's SetUp";
  CHECK(teardown_called_)
      << "You have overrideen TearDown but never called super class's TearDown";
}

void ViewsTestBase::SetUp() {
  testing::Test::SetUp();
  setup_called_ = true;
  if (!views_delegate_.get())
    views_delegate_.reset(new TestViewsDelegate());
#if defined(USE_AURA)
  aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
  aura_test_helper_->SetUp();
#endif  // USE_AURA
}

void ViewsTestBase::TearDown() {
  ui::Clipboard::DestroyClipboardForCurrentThread();

  // Flush the message loop because we have pending release tasks
  // and these tasks if un-executed would upset Valgrind.
  RunPendingMessages();
  teardown_called_ = true;
  views_delegate_.reset();
  testing::Test::TearDown();
#if defined(USE_AURA)
  aura_test_helper_->TearDown();
#endif
}

void ViewsTestBase::RunPendingMessages() {
  base::RunLoop run_loop;
#if defined(USE_AURA)
  run_loop.set_dispatcher(aura::Env::GetInstance()->GetDispatcher());
#endif
  run_loop.RunUntilIdle();
}

Widget::InitParams ViewsTestBase::CreateParams(
    Widget::InitParams::Type type) {
  Widget::InitParams params(type);
#if defined(USE_AURA)
  params.context = aura_test_helper_->root_window();
#endif
  return params;
}

gfx::NativeView ViewsTestBase::GetContext() {
#if defined(USE_AURA)
  return aura_test_helper_->root_window();
#else
  return NULL;
#endif
}

}  // namespace views


text:
package com.intellij.psi.filters.types;

import com.intellij.psi.JavaPsiFacade;
import com.intellij.psi.PsiClass;
import com.intellij.psi.PsiSubstitutor;
import com.intellij.psi.PsiType;
import com.intellij.psi.filters.FalseFilter;
import com.intellij.psi.filters.InitializableFilter;
import com.intellij.psi.filters.OrFilter;

/**
 * Created by IntelliJ IDEA.
 * User: ik
 * Date: 20.03.2003
 * Time: 21:27:25
 * To change this template use Options | File Templates.
 */
public class AssignableGroupFilter extends OrFilter implements InitializableFilter{

  @Override
  public void init(Object[] classes){
    for (Object aClass : classes) {
      if (aClass instanceof PsiClass) {
        final PsiClass psiClass = (PsiClass)aClass;
        PsiType type = JavaPsiFacade.getInstance(psiClass.getProject()).getElementFactory().createType(psiClass, PsiSubstitutor.EMPTY);
        addFilter(new AssignableFromFilter(type));
      }
      if (aClass instanceof PsiType) {
        addFilter(new AssignableFromFilter((PsiType)aClass));
      }
    }
    addFilter(new FalseFilter());
  }
}


text:
package io

import (
	"fmt"
	"io/ioutil"
	"os"

	"k8s.io/kubernetes/pkg/api"
	"k8s.io/kubernetes/pkg/api/v1"
	"k8s.io/kubernetes/pkg/apimachinery/registered"
	"k8s.io/kubernetes/pkg/runtime"
)

// LoadPodFromFile will read, decode, and return a Pod from a file.
func LoadPodFromFile(filePath string) (*v1.Pod, error) {
	if filePath == "" {
		return nil, fmt.Errorf("file path not specified")
	}
	podDef, err := ioutil.ReadFile(filePath)
	if err != nil {
		return nil, fmt.Errorf("failed to read file path %s: %+v", filePath, err)
	}
	if len(podDef) == 0 {
		return nil, fmt.Errorf("file was empty: %s", filePath)
	}
	pod := &v1.Pod{}

	codec := api.Codecs.LegacyCodec(registered.GroupOrDie(v1.GroupName).GroupVersion)
	if err := runtime.DecodeInto(codec, podDef, pod); err != nil {
		return nil, fmt.Errorf("failed decoding file: %v", err)
	}
	return pod, nil
}

// SavePodToFile will encode and save a pod to a given path & permissions
func SavePodToFile(pod *v1.Pod, filePath string, perm os.FileMode) error {
	if filePath == "" {
		return fmt.Errorf("file path not specified")
	}
	codec := api.Codecs.LegacyCodec(registered.GroupOrDie(v1.GroupName).GroupVersion)
	data, err := runtime.Encode(codec, pod)
	if err != nil {
		return fmt.Errorf("failed encoding pod: %v", err)
	}
	return ioutil.WriteFile(filePath, data, perm)
}


text:
package co.cask.cdap.data2.util.hbase;

import co.cask.cdap.common.conf.CConfiguration;
import co.cask.cdap.common.namespace.NamespaceQueryAdmin;
import com.google.inject.Inject;

/**
 * Factory for HBase version-specific {@link HBaseTableUtil} instances.
 */
public class HBaseTableUtilFactory extends HBaseVersionSpecificFactory<HBaseTableUtil> {

  private final CConfiguration cConf;
  private final NamespaceQueryAdmin namespaceQueryAdmin;

  public HBaseTableUtilFactory(CConfiguration cConf) {
    this.cConf = cConf;
    this.namespaceQueryAdmin = null;
  }

  @Inject
  public HBaseTableUtilFactory(CConfiguration cConf, NamespaceQueryAdmin namespaceQueryAdmin) {
    this.cConf = cConf;
    this.namespaceQueryAdmin = namespaceQueryAdmin;
  }

  @Override
  protected HBaseTableUtil createInstance(String className) throws ClassNotFoundException {
    HBaseTableUtil hBaseTableUtil = super.createInstance(className);
    hBaseTableUtil.setCConf(cConf);
    hBaseTableUtil.setNamespaceQueryAdmin(namespaceQueryAdmin);
    return hBaseTableUtil;
  }

  public static Class<? extends HBaseTableUtil> getHBaseTableUtilClass() {
    // Since we only need the class name, it is fine to have a null CConfiguration and null namespaceQueryAdmin,
    // since we do not use the tableUtil instance
    return new HBaseTableUtilFactory(null).get().getClass();
  }

  @Override
  protected String getHBase96Classname() {
    return "co.cask.cdap.data2.util.hbase.HBase96TableUtil";
  }

  @Override
  protected String getHBase98Classname() {
    return "co.cask.cdap.data2.util.hbase.HBase98TableUtil";
  }

  @Override
  protected String getHBase10Classname() {
    return "co.cask.cdap.data2.util.hbase.HBase10TableUtil";
  }

  @Override
  protected String getHBase10CDHClassname() {
    return "co.cask.cdap.data2.util.hbase.HBase10CDHTableUtil";
  }

  @Override
  protected String getHBase11Classname() {
    return "co.cask.cdap.data2.util.hbase.HBase11TableUtil";
  }

  @Override
  protected String getHBase10CHD550ClassName() {
    return "co.cask.cdap.data2.util.hbase.HBase10CDH550TableUtil";
  }

  @Override
  protected String getHBase12CHD570ClassName() {
    return "co.cask.cdap.data2.util.hbase.HBase12CDH570TableUtil";
  }
}


text:
package com.gj.administrator.gjerp.domain;

import java.util.List;
import com.gj.administrator.gjerp.dao.DaoSession;
import de.greenrobot.dao.DaoException;

import com.gj.administrator.gjerp.dao.DialogDao;
import com.gj.administrator.gjerp.dao.PartnerDao;
import com.gj.administrator.gjerp.dao.StaffDao;
import com.gj.administrator.gjerp.dao.SupplierDao;
import com.gj.administrator.gjerp.dao.TaskDao;

// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS

// KEEP INCLUDES - put your custom includes here
// KEEP INCLUDES END
/**
 * Entity mapped to table "TASK".
 */
public class Task {

    private Long id;
    /** Not-null value. */
    private String title;
    /** Not-null value. */
    private String content;
    private Long leader_id;
    private int period;
    /** Not-null value. */
    private String state;
    /** Not-null value. */
    private java.util.Date start_time;
    /** Not-null value. */
    private java.util.Date finish_time;
    private Long parenter_id;
    private Long supplier_id;
    private Long task_id;
    private Long dialog_id;

    /** Used to resolve relations */
    private transient DaoSession daoSession;

    /** Used for active entity operations. */
    private transient TaskDao myDao;

    private Staff leader;
    private Long leader__resolvedKey;

    private Partner parenter;
    private Long parenter__resolvedKey;

    private Supplier supplier;
    private Long supplier__resolvedKey;

    private Task parent;
    private Long parent__resolvedKey;

    private Dialog dialog;
    private Long dialog__resolvedKey;

    private List<Task> children;

    // KEEP FIELDS - put your custom fields here
    public final static int INSTANT = 0x0000000;
    public final static int MON = 0x0000001;
    public final static int TUES = 0x0000010;
    public final static int WED = 0x0000100;
    public final static int TUARS = 0x0001000;
    public final static int FRI = 0x0010000;
    public final static int SAT = 0x0100000;
    public final static int SUN = 0x1000000;
    public final static int[] PERIODS = {MON,TUES,WED,TUARS,FRI,SAT,SUN};
    // KEEP FIELDS END

    public Task() {
    }

    public Task(Long id) {
        this.id = id;
    }

    public Task(Long id, String title, String content, Long leader_id, int period, String state, java.util.Date start_time, java.util.Date finish_time, Long parenter_id, Long supplier_id, Long task_id, Long dialog_id) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.leader_id = leader_id;
        this.period = period;
        this.state = state;
        this.start_time = start_time;
        this.finish_time = finish_time;
        this.parenter_id = parenter_id;
        this.supplier_id = supplier_id;
        this.task_id = task_id;
        this.dialog_id = dialog_id;
    }

    /** called by internal mechanisms, do not call yourself. */
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getTaskDao() : null;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    /** Not-null value. */
    public String getTitle() {
        return title;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setTitle(String title) {
        this.title = title;
    }

    /** Not-null value. */
    public String getContent() {
        return content;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setContent(String content) {
        this.content = content;
    }

    public Long getLeader_id() {
        return leader_id;
    }

    public void setLeader_id(Long leader_id) {
        this.leader_id = leader_id;
    }

    public int getPeriod() {
        return period;
    }

    public void setPeriod(int period) {
        this.period = period;
    }

    /** Not-null value. */
    public String getState() {
        return state;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setState(String state) {
        this.state = state;
    }

    /** Not-null value. */
    public java.util.Date getStart_time() {
        return start_time;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setStart_time(java.util.Date start_time) {
        this.start_time = start_time;
    }

    /** Not-null value. */
    public java.util.Date getFinish_time() {
        return finish_time;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setFinish_time(java.util.Date finish_time) {
        this.finish_time = finish_time;
    }

    public Long getParenter_id() {
        return parenter_id;
    }

    public void setParenter_id(Long parenter_id) {
        this.parenter_id = parenter_id;
    }

    public Long getSupplier_id() {
        return supplier_id;
    }

    public void setSupplier_id(Long supplier_id) {
        this.supplier_id = supplier_id;
    }

    public Long getTask_id() {
        return task_id;
    }

    public void setTask_id(Long task_id) {
        this.task_id = task_id;
    }

    public Long getDialog_id() {
        return dialog_id;
    }

    public void setDialog_id(Long dialog_id) {
        this.dialog_id = dialog_id;
    }

    /** To-one relationship, resolved on first access. */
    public Staff getLeader() {
        Long __key = this.leader_id;
        if (leader__resolvedKey == null || !leader__resolvedKey.equals(__key)) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            StaffDao targetDao = daoSession.getStaffDao();
            Staff leaderNew = targetDao.load(__key);
            synchronized (this) {
                leader = leaderNew;
            	leader__resolvedKey = __key;
            }
        }
        return leader;
    }

    public void setLeader(Staff leader) {
        synchronized (this) {
            this.leader = leader;
            leader_id = leader == null ? null : leader.getId();
            leader__resolvedKey = leader_id;
        }
    }

    /** To-one relationship, resolved on first access. */
    public Partner getParenter() {
        Long __key = this.parenter_id;
        if (parenter__resolvedKey == null || !parenter__resolvedKey.equals(__key)) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            PartnerDao targetDao = daoSession.getPartnerDao();
            Partner parenterNew = targetDao.load(__key);
            synchronized (this) {
                parenter = parenterNew;
            	parenter__resolvedKey = __key;
            }
        }
        return parenter;
    }

    public void setParenter(Partner parenter) {
        synchronized (this) {
            this.parenter = parenter;
            parenter_id = parenter == null ? null : parenter.getId();
            parenter__resolvedKey = parenter_id;
        }
    }

    /** To-one relationship, resolved on first access. */
    public Supplier getSupplier() {
        Long __key = this.supplier_id;
        if (supplier__resolvedKey == null || !supplier__resolvedKey.equals(__key)) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            SupplierDao targetDao = daoSession.getSupplierDao();
            Supplier supplierNew = targetDao.load(__key);
            synchronized (this) {
                supplier = supplierNew;
            	supplier__resolvedKey = __key;
            }
        }
        return supplier;
    }

    public void setSupplier(Supplier supplier) {
        synchronized (this) {
            this.supplier = supplier;
            supplier_id = supplier == null ? null : supplier.getId();
            supplier__resolvedKey = supplier_id;
        }
    }

    /** To-one relationship, resolved on first access. */
    public Task getParent() {
        Long __key = this.task_id;
        if (parent__resolvedKey == null || !parent__resolvedKey.equals(__key)) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            TaskDao targetDao = daoSession.getTaskDao();
            Task parentNew = targetDao.load(__key);
            synchronized (this) {
                parent = parentNew;
            	parent__resolvedKey = __key;
            }
        }
        return parent;
    }

    public void setParent(Task parent) {
        synchronized (this) {
            this.parent = parent;
            task_id = parent == null ? null : parent.getId();
            parent__resolvedKey = task_id;
        }
    }

    /** To-one relationship, resolved on first access. */
    public Dialog getDialog() {
        Long __key = this.dialog_id;
        if (dialog__resolvedKey == null || !dialog__resolvedKey.equals(__key)) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            DialogDao targetDao = daoSession.getDialogDao();
            Dialog dialogNew = targetDao.load(__key);
            synchronized (this) {
                dialog = dialogNew;
            	dialog__resolvedKey = __key;
            }
        }
        return dialog;
    }

    public void setDialog(Dialog dialog) {
        synchronized (this) {
            this.dialog = dialog;
            dialog_id = dialog == null ? null : dialog.getId();
            dialog__resolvedKey = dialog_id;
        }
    }

    /** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */
    public List<Task> getChildren() {
        if (children == null) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            TaskDao targetDao = daoSession.getTaskDao();
            List<Task> childrenNew = targetDao._queryTask_Children(id);
            synchronized (this) {
                if(children == null) {
                    children = childrenNew;
                }
            }
        }
        return children;
    }

    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    public synchronized void resetChildren() {
        children = null;
    }

    /** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }

    /** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }

    /** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }

    // KEEP METHODS - put your custom methods here
    public static String getPeriodString(int periodInt){
        if(periodInt == 0)
            return "Instant Task";
        else{
            String result = "";
            if((periodInt & MON ) !=0){
                result += 1+" ";
            }
            if((periodInt & TUES ) !=0){
                result += 2+" ";
            }
            if((periodInt & WED ) !=0){
                result += 3+" ";
            }
            if((periodInt & TUARS ) !=0){
                result += 4+" ";
            }
            if((periodInt & FRI ) !=0){
                result += 5+" ";
            }
            if((periodInt & SAT ) !=0){
                result += 6+" ";
            }
            if((periodInt & SUN ) !=0){
                result += 7+" ";
            }
            return "Period Task:"+ result;
        }

    }
    // KEEP METHODS END

}


text:
module EApiClient
  module ActiveClient
    module JSON

      module Middleware

        module Requestable

          #Override if you want to manage requests in another way
          def request_member(url, parameters, request_method, format)
            raise NotImplementedError
          end

          #Override if you want to manage requests in another way
          def request_collection(url, parameters, request_method, format)
            raise NotImplementedError
          end

        end

      end

    end
  end
end


text:
var requirejs = require('requirejs');
var fs = require('fs');
var path = require('path');
var assert = require('chai').assert;

var COMPILED_DIR = __dirname + '/amd-compiled';
var INPUT_DIR = __dirname + '/amd';

function onlyJsFiles(path) {
  return /\.js$/.test(path);
}

function moduleFromSource(src) {
  if (!src || (src + '') === 'undefined')
    throw new Error('The test/' + COMPILED_DIR + ' FAILED');
  var module;
  var define = function(deps, factory) {
    var output = factory();
    module = output.__esModule ? output : {default: output};
  }
  Function('define', src).call(global, define);
  return module;
}

var inputFiles = fs.readdirSync(INPUT_DIR).filter(onlyJsFiles);
var testFiles = fs.readdirSync(COMPILED_DIR).filter(onlyJsFiles);

// Verify that all the inputs resulted in outputs.
assert.equal(inputFiles.length, testFiles.length);

requirejs.config({
  baseUrl: COMPILED_DIR
});

suite('amd', function() {
  // Verify that the testFiles are all valid AMD
  testFiles.forEach(function(testFile) {
    test(testFile, function(done) {
      requirejs(['./' + testFile.replace(/\.js$/, '')], function() {
        done();
      });
    });
  });

  test('Transpiled module export', function(done) {
    var module = moduleFromSource(
        fs.readFileSync(path.resolve(COMPILED_DIR, 'NamedExports.js')));
    assert.equal(module.someExport, 'val');
    done();
  })
});


text:
@interface Pea : Plant

@end


text: magick mogrify *.png


text:
extern zend_class_entry *zendframework_file_exception_exceptioninterface_ce;

ZEPHIR_INIT_CLASS(ZendFramework_File_Exception_ExceptionInterface);


text:
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Core;
using System.Net;
using System.IO;
using System.Linq;
using RemoteZip;

namespace wiquotes
{
    public partial class UpdaterForm : Form
    {
        //public ProgressBar Bar = new ProgressBar();

        public void ReturnProgress()
        {
            progressBar1.PerformStep();
        }

        public UpdaterForm()
        {
            InitializeComponent();
        }

        CreateZipFile NewFile;

        public void add_list_button_Click(object sender, EventArgs e)
        {
            NewFile = new CreateZipFile();
            list_http.Items.Clear();
            url_bar.Text = "http://bossa.pl/pub/futures/omega/omegafut.zip";

            if (url_bar.Text == String.Empty)
                MessageBox.Show("PODAJ ADRES");
            else
            {

                foreach (var Zip in NewFile.LoadFile(returnURL()))
                {
                    list_http.Items.Add(Zip);
                }
            }
        }

        public string returnURL()
        {
            return url_bar.Text;
        }

        private void add_item_Click(object sender, EventArgs e)
        {
            string select = list_http.SelectedItem.ToString();
            added_list.Items.Add(select);
        }

        private void delete_item_Click(object sender, EventArgs e)
        {
            var selected = added_list.SelectedItem;
            added_list.Items.Remove(selected);
        }

        private void extract_button_Click(object sender, EventArgs e)
        {
            List<int> Indexy = new List<int>();
            foreach (string File in added_list.Items)
            {
                if (NewFile.zipedFileList.Contains(File))
                {
                    NewFile.TotalLinesAllFile(NewFile.zipedFileList.IndexOf(File));
                    Indexy.Add(NewFile.zipedFileList.IndexOf(File));
                }
            }
            progressBar1.Maximum = NewFile.TotalCount;

            foreach (var Licznik in Indexy)
            {
                NewFile.SaveFile(Licznik);
            }
        }

    }

    public class InfoAboutZip
    {
        public string Name;
        public long Index;
        public string ZipFileName;

        public InfoAboutZip()
        {
        }
    }

    public class CreateZipFile : UpdaterForm
    {
        public int TotalCount = 0;
        public CreateZipFile()
        {

        }

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            public RemoteZipFile zip = new RemoteZipFile();
            public List<string> zipedFileList = new List<string>();

    public List<string> LoadFile(string Url)
        {
            if (zip.Load(Url))
            {

                foreach (ZipEntry zipe in zip)
                {
                    zipedFileList.Add(zipe.Name);
                    InfoAboutZip ZipInfo = new InfoAboutZip();
                    ZipInfo.Name = zipe.Name;
                    ZipInfo.ZipFileName = Url;
                    ZipInfo.Index = zipe.ZipFileIndex;
                }
            }
            return zipedFileList;
        }
        public List<string> ReturnListFile()
        {
            return zipedFileList;
        }
        public void SaveFile(int IndexInZip)
        {

            ZipEntry zipe = zip[IndexInZip];
            string txtTmp = "";
            string key = "";
            string filePath = System.Windows.Forms.Application.StartupPath + "../../../data/";
            int i = 1;
            if(!Directory.Exists(filePath))
            {
                Directory.CreateDirectory(filePath);
            }
            filePath = filePath + zipe.Name;
            List<decimal> columnValues = new List<decimal>();
            FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite);
            Stream s = zip.GetInputStream(zipe);
            if (s != null)
            {

                StreamReader sr = new StreamReader(s);
                StreamWriter sw = new StreamWriter(fs);

                sw.AutoFlush = true;
                string txt;
                while ((txt = sr.ReadLine()) != null)
                {
                    txtTmp = txtTmp + txt + "\r\n";
                    sb.AppendLine(txt);
                    ReturnProgress();

                }
                sw.Write(txtTmp);
                sw.Close();
                s.Close();
            }

        }

    public int TotalLines(StreamReader r)
        {
            int i = 0;
            while (r.ReadLine() != null) { i++; }
            return i;
        }

    public void TotalLinesAllFile(int Index)
        {
                ZipEntry zipe = zip[Index];
                Stream s = zip.GetInputStream(zipe);
                StreamReader sr = new StreamReader(s);
                TotalCount += TotalLines(sr);
        }

     }
}


text:
module Web.Hatena.Auth
  ( HatenaAuth(authenticate)
  , module Web.Hatena.Auth.OAuth
  , module Web.Hatena.Auth.WSSE
  ) where

import Control.Monad.Trans (MonadTrans(..))

import Control.Monad.Trans.Resource (ResourceIO)
import Network.HTTP.Conduit (Request)
import Web.Authenticate.OAuth (signOAuth)

import Web.Hatena.Auth.OAuth
import Web.Hatena.Auth.WSSE
import Web.Hatena.Auth.NoAuth
import Web.Hatena.Monad

class HatenaAuth auth where
  authenticate :: ResourceIO m => Request m -> HatenaT auth m (Request m)

instance HatenaAuth (OAuth scope) where
  authenticate req = do
    auth <- getAuth
    lift $ signOAuth (oAuthConsumer auth)
                     (oAuthCredentials auth)
                     req

instance HatenaAuth WSSE where
  authenticate = undefined

instance HatenaAuth NoAuth where
  authenticate = return

instance (HatenaAuth a, HatenaAuth b) => HatenaAuth (Either a b) where
  authenticate req = do
    auth'e <- getAuth
    case auth'e of
      Left  auth -> withAuth (const auth) $ authenticate req
      Right auth -> withAuth (const auth) $ authenticate req


text:
static void* my_thread_entry(void * param){
  unsigned* ret = (unsigned*)malloc(sizeof(unsigned));
  *ret = 1;
  if (param == NULL) return ret;
  IRunnable* r = (IRunnable*)param;
  try{
    *ret = (unsigned)r->svc();
  } catch (std::exception& ex){
    MYERROR("thread exited,%s", ex.what());
  } catch (const char* msg){
    MYERROR("thread exited,%s", msg);
  } catch (...){
    MYERROR("thread exited with unknown error");
  }
  return ret;
}

PosixThread::PosixThread(std::shared_ptr<IRunnable> r):runnable_(r),state(INIT){
  pthread_attr_init(&attr);
}

PosixThread::~PosixThread()
{
}

void PosixThread::run(){
  if(state!=INIT) return;

  int err=pthread_create(&threadID, &attr, my_thread_entry, runnable_.get());
  if(err)
    return;
  state=RUNNING;
}

unsigned PosixThread::wait(){
  if(state!=RUNNING) return 1;
  void *res;
  int joinret = pthread_join(threadID, &res);
  if (joinret)
    throw std::runtime_error("pthread_join error");
  unsigned int ret = *(unsigned*)res;
  free(res);
  state=DEAD;
  return ret;
}


text:
import { isEmpty as empty_QMARK_ } from "lfjs-runtime/coll";
empty_QMARK_([]);


text:
package br.com.caelum.vraptor.converter;

import static com.google.common.base.Strings.isNullOrEmpty;

import javax.annotation.Priority;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Alternative;
import javax.interceptor.Interceptor;

import br.com.caelum.vraptor.Convert;

/**
 * Accepts either the ordinal value or name. Null and empty strings are treated
 * as null.
 *
 * @author Guilherme Silveira
 */
@Convert(Enum.class)
@ApplicationScoped
@Alternative
@Priority(Interceptor.Priority.LIBRARY_BEFORE)
public class EnumConverter implements Converter {

	public static final String INVALID_MESSAGE_KEY = "is_not_a_valid_enum_value";

	/**
	 * Enums are always final, so I can suppress this warning safely
	 */
	@Override
	public Object convert(String value, Class type) {
		if (isNullOrEmpty(value)) {
			return null;
		}

		if (Character.isDigit(value.charAt(0))) {
			return resolveByOrdinal(value, type);
		} else {
			return resolveByName(value, type);
		}
	}

	private Object resolveByName(String value, Class enumType) {
		try {
			return Enum.valueOf(enumType, value);
		} catch (IllegalArgumentException e) {
			throw new ConversionException(new ConversionMessage(INVALID_MESSAGE_KEY, value));
		}
	}

	private Object resolveByOrdinal(String value, Class enumType) {
		try {
			int ordinal = Integer.parseInt(value);
			if (ordinal >= enumType.getEnumConstants().length) {
				throw new ConversionException(new ConversionMessage(INVALID_MESSAGE_KEY, value));
			}
			return enumType.getEnumConstants()[ordinal];
		} catch (NumberFormatException e) {
			throw new ConversionException(new ConversionMessage(INVALID_MESSAGE_KEY, value));
		}
	}

}