text:
require File.expand_path(File.dirname(__FILE__) + "/../helper")

Story "Creating/Updating/Reading/Destroying a Project", %|
  As a user
  I want to be able to CRUD a project|,
  :steps_for => [:a_user_crudding_a_project_steps],
  :type => RailsStory do

  Scenario "a user creating a project" do
    Given "there are no projects in the system"
    And "a logged in user"
    When "they click the projects link"
    Then "they will see an empty projects list"

    When "they click on the new project link"
    And "they submit the new project form without any information"
    Then "they will see an error stating that the project name is required"

    When "they submit the new project form with the required information"
    Then "they will see a message telling them the project was successfully created"
    And "they will see the project"

    When "they click the projects link"
    Then "they will see the project in the project list"
  end

  Scenario "a user trying to view a project who doesn't have permission" do
    Given "a logged in user"
    When "they try to view a project they don't have permission to access"
    Then "they will see an error telling them they can't access the resource"
  end

  Scenario "Updating a project" do
    GivenScenario "a user creating a project"
    When "they click on the edit link for the newly created project"
    Then "they will see the edit project form"

    When "they submit the edit project form without any information"
    Then "they will see an error stating that the project name is required"

    When "they submit the project form with an updated name"
    Then "they will see the project"

    When "they click the projects link"
    Then "they will see the project in the project list"
  end

  Scenario "a user trying to edit a project who doesn't have permission" do
    Given "a logged in user"
    When "they try to edit a project they don't have permission to access"
    Then "they will see an error telling them they can't access the resource"
  end

  Scenario "a user trying to update a project who doesn't have permission" do
    Given "a logged in user"
    When "they try to update a project they don't have permission to access"
    Then "they will see an error telling them they can't access the resource"
  end

  Scenario "Accessing a project through the dashboard" do
    GivenScenario "a user creating a project"
    When "they click the dashboard link"
    Then "they will see a link to the project"

    When "they click on the link to the project"
    Then "they will see the project"
  end

  Scenario "Accessing a project through the projects list" do
    GivenScenario "a user creating a project"
    When "they click the projects link"
    Then "they will see a link to the project"

    When "they click on the link to the project"
    Then "they will see the project"
  end

  Scenario "Destroying a project" do
    GivenScenario "a user creating a project"
    When "they click the projects link"
    Then "they will see a link to destroy the project"

    When "they click on the link to destroy the project"
    Then "they will see the projects list"
    And "they will not see the destroyed project in the projects list"
  end

  Scenario "a user trying to destroy a project who doesn't have permission" do
    Given "a logged in user"
    When "they try to destroy a project they don't have permission to access"
    Then "they will see an error telling them they can't access the resource"
  end

  Scenario "a user trying to view a project's workspace who doesn't have permission" do
    Given "a logged in user"
    When "they try to view a project's workspace they don't have permission to access"
    Then "they will see an error telling them they can't access the resource"
  end

end


text:
using System.Web.UI;

namespace umbraco
{
	public class MacroCacheContent
	{
		private readonly Control _control;
		private readonly string _id;

		public MacroCacheContent(Control control, string ID)
		{
			_control = control;
			_id = ID;
		}

		public string ID
		{
			get { return _id; }
		}

		public Control Content
		{
			get { return _control; }
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
require 'cue_splitter/version'

module CueSplitter
  # Your code goes here...
end

require 'cue_splitter/cue'


text:
User API
========

.. automodule:: jenkinsapi.api
   :members:


text:
package uk.co.senab.actionbarpulltorefresh.samples.actionbarsherlock;

import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.SherlockFragment;
import com.actionbarsherlock.app.SherlockFragmentActivity;

import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import uk.co.senab.actionbarpulltorefresh.extras.actionbarsherlock.PullToRefreshLayout;
import uk.co.senab.actionbarpulltorefresh.library.ActionBarPullToRefresh;
import uk.co.senab.actionbarpulltorefresh.library.listeners.OnRefreshListener;

/**
 * A sample which show you how to use PullToRefreshLayout with Fragments in a ViewPager.
 */
public class FragmentTabsViewPagerActivity extends SherlockFragmentActivity {
    private static String EXTRA_TITLE = "extra_title";

    private FragmentTabPager mFragmentTabPager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_fragment_tabs_vp);
        ViewPager vp = (ViewPager) findViewById(R.id.ptr_viewpager);
        mFragmentTabPager = new FragmentTabPager(this, vp);

        // Add 3 tabs which will switch fragments
        ActionBar ab = getSupportActionBar();
        ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);

        Bundle b = new Bundle();
        b.putString(EXTRA_TITLE, "Tab 1");
        mFragmentTabPager.addTab(ab.newTab().setText("Tab 1"), SampleFragment.class, b);

        b = new Bundle();
        b.putString(EXTRA_TITLE, "Tab 2");
        mFragmentTabPager.addTab(ab.newTab().setText("Tab 2"), SampleFragment.class, b);

        b = new Bundle();
        b.putString(EXTRA_TITLE, "Tab 3");
        mFragmentTabPager.addTab(ab.newTab().setText("Tab 3"), SampleFragment.class, b);
    }

    /**
     * Fragment Class
     */
    public static class SampleFragment extends SherlockFragment implements
            OnRefreshListener {

        private PullToRefreshLayout mPullToRefreshLayout;

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            // Inflate the layout
            View view = inflater.inflate(R.layout.layout_fragment, container, false);

            // Now give the find the PullToRefreshLayout and set it up
            mPullToRefreshLayout = (PullToRefreshLayout) view.findViewById(R.id.ptr_layout);
            ActionBarPullToRefresh.from(getActivity())
                    .allChildrenArePullable()
                    .listener(this)
                    .setup(mPullToRefreshLayout);

            // Set title in Fragment for display purposes.
            TextView title = (TextView) view.findViewById(R.id.tv_title);
            Bundle b = getArguments();
            if (b != null) {
                title.setText(b.getString(EXTRA_TITLE));
            }

            return view;
        }

        @Override
        public void onRefreshStarted(View view) {
            /**
             * Simulate Refresh with 4 seconds sleep
             */
            new AsyncTask<Void, Void, Void>() {

                @Override
                protected Void doInBackground(Void... params) {
                    try {
                        Thread.sleep(Constants.SIMULATED_REFRESH_LENGTH);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    return null;
                }

                @Override
                protected void onPostExecute(Void result) {
                    super.onPostExecute(result);

                    // Notify PullToRefreshLayout that the refresh has finished
                    mPullToRefreshLayout.setRefreshComplete();
                }
            }.execute();
        }
    }
}


text:
A series of navigator operation apis like `push`, `pop`.

## API

### push(options, callback)

#### Arguments

* `options`*(object)*: some options.
  * `url`*(stirng)*: The navigation item URL to push on the stack.
  * `animated`*(string)*:  `true`if the navigation page should be animated; otherwise, `false`.
* `callback`*(object)*: the callback function when execute the push action.

##### Example

```js
var params = {
    'url': 'navigator-demo.js',
    'animated' : 'true',
}
var navigator = require('@weex-module/navigator');
navigator.push(params, function(e) {
	//callback
});
```

### pop(options, callback)

#### Arguments

* `options`*(object)*: some options.
  * `animated`*(string)*:  `true`if the navigation page should be animated; otherwise, `false`.
* `callback`*(object)*: the callback function when execute the pop action.
##### Example

```js
var params = {
    'animated' : 'true',
}
var navigator = require('@weex-module/navigator');
navigator.pop(params, function(e) {
	//callback
});
```


text:
/* Desc: A camera sensor using OpenGL
 * Author: Nate Koenig
 * Date: 15 July 2003
 */

#include <sstream>

#include "physics/World.hh"

#include "common/Events.hh"
#include "common/Exception.hh"

#include "transport/transport.h"

#include "rendering/DepthCamera.hh"
#include "rendering/Scene.hh"
#include "rendering/Rendering.hh"

#include "sensors/SensorFactory.hh"
#include "sensors/DepthCameraSensor.hh"

using namespace gazebo;
using namespace sensors;

GZ_REGISTER_STATIC_SENSOR("depth", DepthCameraSensor)

//////////////////////////////////////////////////
DepthCameraSensor::DepthCameraSensor()
    : Sensor()
{
}

//////////////////////////////////////////////////
DepthCameraSensor::~DepthCameraSensor()
{
}

//////////////////////////////////////////////////
void DepthCameraSensor::SetParent(const std::string &_name)
{
  Sensor::SetParent(_name);
}

//////////////////////////////////////////////////
void DepthCameraSensor::Load(const std::string &_worldName,
                                   sdf::ElementPtr &_sdf)
{
  Sensor::Load(_worldName, _sdf);
}

//////////////////////////////////////////////////
void DepthCameraSensor::Load(const std::string &_worldName)
{
  Sensor::Load(_worldName);
  this->poseSub = this->node->Subscribe("~/pose",
                                        &DepthCameraSensor::OnPose, this);
}

//////////////////////////////////////////////////
void DepthCameraSensor::Init()
{
  std::string worldName = this->world->GetName();

  if (!worldName.empty())
  {
    this->scene = rendering::get_scene(worldName);

    if (!this->scene)
      this->scene = rendering::create_scene(worldName, false);

    this->camera = this->scene->CreateDepthCamera(
        this->sdf->GetValueString("name"), false);

    if (!this->camera)
    {
      gzerr << "Unable to create depth camera sensor\n";
      return;
    }
    this->camera->SetCaptureData(true);

    sdf::ElementPtr cameraSdf = this->sdf->GetOrCreateElement("camera");
    this->camera->Load(cameraSdf);

    // Do some sanity checks
    if (this->camera->GetImageWidth() == 0 ||
        this->camera->GetImageHeight() == 0)
    {
      gzthrow("image has zero size");
    }

    this->camera->Init();
    this->camera->CreateRenderTexture(this->GetName() + "_RttTex_Image");
    this->camera->CreateDepthTexture(this->GetName() + "_RttTex_Depth");
    this->camera->SetWorldPose(this->pose);
    this->camera->AttachToVisual(this->parentName, true);
  }
  else
    gzerr << "No world name\n";

  Sensor::Init();
}

//////////////////////////////////////////////////
void DepthCameraSensor::Fini()
{
  Sensor::Fini();
  this->camera->Fini();
  this->camera.reset();
  this->scene.reset();
}

//////////////////////////////////////////////////
void DepthCameraSensor::SetActive(bool value)
{
  Sensor::SetActive(value);
}

//////////////////////////////////////////////////
void DepthCameraSensor::UpdateImpl(bool /*_force*/)
{
  // Sensor::Update(force);
  if (this->camera)
  {
    this->camera->Render();
    this->camera->PostRender();
    this->lastUpdateTime = this->world->GetSimTime();
  }
}

void DepthCameraSensor::OnPose(ConstPosePtr &/*_msg*/)
{
}

//////////////////////////////////////////////////
bool DepthCameraSensor::SaveFrame(const std::string &_filename)
{
  this->SetActive(true);
  return this->camera->SaveFrame(_filename);
}


text:
	« {L_BACK}

{L_TITLE}

{L_TITLE_EXPLAIN}

{L_WARNING}

{WARNING_MSG}

{L_NOTIFY}

{NOTIFY_MSG}

{L_UPLOADING_FILES}

		:: {upload.FILE_INFO}

		{upload.DENIED}{upload.ERROR_MSG}{L_SUCCESSFULLY_UPLOADED}

{L_NO_THUMBNAIL_SUPPORT}

	<form id="attachsettings" method="post" action="{U_ACTION}">

				</fieldset>

			<fieldset>
				<legend>{options.LEGEND}</legend>

{options.TITLE}:
{options.TITLE_EXPLAIN}

{options.CONTENT}

	</fieldset>

	<fieldset class="submit-buttons">
		<legend>{L_SUBMIT}</legend>
		<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
		<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
	</fieldset>

{L_SECURE_DOWNLOAD_NOTICE}

	<fieldset>
		<legend>{L_SECURE_TITLE}</legend>

{L_DOWNLOAD_ADD_IPS_EXPLAIN}

{L_IP_HOSTNAME}:

<textarea id="ip_hostname" cols="40" rows="3" name="ips"></textarea>

{L_IP_EXCLUDE}:
{L_EXCLUDE_ENTERED_IP}

<input type="radio" id="exclude" name="ipexclude" value="1" class="radio" /> {L_YES}
			<input type="radio" name="ipexclude" value="0" checked="checked" class="radio" /> {L_NO}

		<input class="button1" type="submit" id="securesubmit" name="securesubmit" value="{L_SUBMIT}" />

	</fieldset>

	<fieldset>
		<legend>{L_REMOVE_IPS}</legend>

{L_DOWNLOAD_REMOVE_IPS_EXPLAIN}

{L_IP_HOSTNAME}:

<select name="unip[]" id="remove_ip_hostname" multiple="multiple" size="10">{DEFINED_IPS}</select>

			<input class="button1" type="submit" id="unsecuresubmit" name="unsecuresubmit" value="{L_SUBMIT}" />

		</fieldset>

{L_NO_IPS_DEFINED}

	{S_FORM_TOKEN}
	</fieldset>
	</form>

		<form id="extgroups" method="post" action="{U_ACTION}">
		<fieldset>
			<input type="hidden" name="action" value="{ACTION}" />
			<input type="hidden" name="g" value="{GROUP_ID}" />

			<legend>{L_LEGEND}</legend>

{L_GROUP_NAME}:

<input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" />

{L_SPECIAL_CATEGORY}:
{L_SPECIAL_CATEGORY_EXPLAIN}

{S_CATEGORY_SELECT}

{L_ALLOWED}:

<input type="checkbox" class="radio" id="allowed" name="allow_group" value="1" checked="checked" />

{L_ALLOW_IN_PM}:

<input type="checkbox" class="radio" id="allow_in_pm" name="allow_in_pm" value="1" checked="checked" />

{L_UPLOAD_ICON}:

<select name="upload_icon" id="upload_icon" onchange="update_image(this.options[selectedIndex].value);">
					<option value="no_image" selected="selected">{L_NO_IMAGE}</option>{S_FILENAME_LIST}
			</select>

{L_MAX_EXTGROUP_FILESIZE}:

<input type="text" id="extgroup_filesize" size="3" maxlength="15" name="max_filesize" value="{EXTGROUP_FILESIZE}" /> <select name="size_select">{S_EXT_GROUP_SIZE_OPTIONS}</select>

{L_ASSIGNED_EXTENSIONS}:

{ASSIGNED_EXTENSIONS}
 [{L_GO_TO_EXTENSIONS} ]

<select name="extensions[]" id="assigned_extensions" class="narrow" onchange="show_extensions(this);" multiple="multiple" size="8">{S_EXTENSION_OPTIONS}</select>

{L_ALLOWED_FORUMS}:
{L_ALLOWED_FORUMS_EXPLAIN}

<input type="radio" id="allowed_forums" class="radio" name="forum_select" value="0" checked="checked" /> {L_ALLOW_ALL_FORUMS}
				<input type="radio" class="radio" name="forum_select" value="1" checked="checked" /> {L_ALLOW_SELECTED_FORUMS}

<select name="allowed_forums[]" multiple="multiple" size="8">{S_FORUM_ID_OPTIONS}</select>

			<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
			<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />

		{S_FORM_TOKEN}
		</fieldset>

		</form>

		<form id="extgroups" method="post" action="{U_ACTION}">
		<fieldset class="tabulated">
		<legend>{L_TITLE}</legend>

			<col class="row1" /><col class="row1" /><col class="row2" />

			{L_EXTENSION_GROUP}
			{L_SPECIAL_CATEGORY}
			{L_OPTIONS}

				{groups.GROUP_NAME}

» {L_NOT_ALLOWED_IN_PM}

» {L_ONLY_ALLOWED_IN_PM}

» {L_NOT_ALLOWED_IN_PM_POST}

» {L_ALLOWED_IN_PM_POST}

				{groups.CATEGORY}
				 {ICON_EDIT}  {ICON_DELETE}

				{L_CREATE_GROUP}: <input type="text" name="group_name" maxlength="30" />
				<input class="button2" name="add" type="submit" value="{L_SUBMIT}" />

		{S_FORM_TOKEN}
		</fieldset>
		</form>

	<form id="add_ext" method="post" action="{U_ACTION}">
	<fieldset>
		<legend>{L_ADD_EXTENSION}</legend>

{L_EXTENSION}

<input type="text" id="add_extension" size="20" maxlength="100" name="add_extension" value="{ADD_EXTENSION}" />

{L_EXTENSION_GROUP}

{GROUP_SELECT_OPTIONS}

		<input type="submit" id="add_extension_check" name="add_extension_check" class="button2" value="{L_SUBMIT}" />

	{S_FORM_TOKEN}
	</fieldset>
	</form>

	<form id="change_ext" method="post" action="{U_ACTION}">

	<fieldset class="tabulated">
	<legend>{L_TITLE}</legend>

		<col class="row1" /><col class="row1" /><col class="row2" />

		{L_EXTENSION}
		{L_EXTENSION_GROUP}
		{L_DELETE}

			{extensions.EXTENSION}
			{extensions.GROUP_OPTIONS}
			<input type="checkbox" class="radio" name="extension_id_list[]" value="{extensions.EXTENSION_ID}" /><input type="hidden" name="extension_change_list[]" value="{extensions.EXTENSION_ID}" />

		<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
		<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />

	{S_FORM_TOKEN}
	</fieldset>
	</form>

	<form id="orphan" method="post" action="{U_ACTION}">

	<fieldset class="tabulated">
	<legend>{L_TITLE}</legend>

		{L_FILENAME}
		{L_FILEDATE}
		{L_FILESIZE}
		{L_ATTACH_POST_ID}
		{L_ATTACH_TO_POST}
		{L_DELETE}

			{orphan.REAL_FILENAME}
			{orphan.FILETIME}
			{orphan.FILESIZE}
			{L_ATTACH_ID}: <input type="text" name="post_id[{orphan.ATTACH_ID}]" size="7" maxlength="10" value="{orphan.POST_ID}" />
			<input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" />
			<input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" />

		{L_MARK_ALL} :: {L_UNMARK_ALL}
		{L_MARK_ALL} :: {L_UNMARK_ALL}

		<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
		<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />

	{S_FORM_TOKEN}
	</fieldset>
	</form>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ArtifactsWorkspaceSettings">
    <artifacts-to-build>
      <artifact name="twloggly:jar" />
    </artifacts-to-build>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="41572d7d-bed5-49f0-94e1-d4cc354052e5" name="Default" comment="" />
    <ignored path="twloggly.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path="$PROJECT_DIR$/out/" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="twloggly" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="Main.java" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/com/thoughtwave/Main.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.17182131" vertical-offset="0" max-vertical-offset="873">
              <caret line="10" column="13" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" />
              <folding>
                <element signature="imports" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="LogglySyslogEntry.java" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/com/thoughtwave/LogglySyslogEntry.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="540">
              <caret line="10" column="13" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="602" />
    <option name="y" value="22" />
    <option name="width" value="1015" />
    <option name="height" value="970" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="twloggly" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="thoughtwave" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="PackagesPane" />
      <pane id="Scope" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="GoToClass.includeLibraries" value="false" />
    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
    <property name="GoToFile.includeJavaFiles" value="false" />
    <property name="MemberChooser.sorted" value="false" />
    <property name="MemberChooser.showClasses" value="true" />
    <property name="MemberChooser.copyJavadoc" value="false" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../lib/jackson-core-2.5.0.jar!/" />
    <property name="project.structure.last.edited" value="Artifacts" />
    <property name="project.structure.proportion" value="0.15" />
    <property name="project.structure.side.proportion" value="0.2" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
      <module name="" />
      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
      <option name="PROGRAM_PARAMETERS" />
      <method />
    </configuration>
    <configuration default="true" type="Remote" factoryName="Remote">
      <option name="USE_SOCKET_TRANSPORT" value="true" />
      <option name="SERVER_MODE" value="false" />
      <option name="SHMEM_ADDRESS" value="javadebug" />
      <option name="HOST" value="localhost" />
      <option name="PORT" value="5005" />
      <method />
    </configuration>
    <configuration default="true" type="Applet" factoryName="Applet">
      <module name="" />
      <option name="MAIN_CLASS_NAME" />
      <option name="HTML_FILE_NAME" />
      <option name="HTML_USED" value="false" />
      <option name="WIDTH" value="400" />
      <option name="HEIGHT" value="300" />
      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
      <option name="VM_PARAMETERS" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="singleModule" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <configuration default="true" type="Application" factoryName="Application">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JUnit" factoryName="JUnit">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="singleModule" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <list size="0" />
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="41572d7d-bed5-49f0-94e1-d4cc354052e5" name="Default" comment="" />
      <created>1426225734369</created>
      <option name="number" value="Default" />
      <updated>1426225734369</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="602" y="22" width="1015" height="970" extended-state="0" />
    <editor active="false" />
    <layout>
      <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24926108" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="myTodoPanelSettings">
      <TodoPanelSettings />
    </option>
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="antWorkspaceConfiguration">
    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
    <option name="FILTER_TARGETS" value="false" />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/com/thoughtwave/LogglySyslogEntry.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="540">
          <caret line="10" column="13" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/com/thoughtwave/Main.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.17182131" vertical-offset="0" max-vertical-offset="873">
          <caret line="10" column="13" selection-start-line="10" selection-start-column="13" selection-end-line="10" selection-end-column="13" />
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
  <component name="masterDetails">
    <states>
      <state key="ArtifactsStructureConfigurable.UI">
        <settings>
          <artifact-editor />
          <last-edited>twloggly:jar</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
                <option value="0.5" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="FacetStructureConfigurable.UI">
        <settings>
          <last-edited>No facets are configured</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="GlobalLibrariesConfigurable.UI">
        <settings>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="JdkListConfigurable.UI">
        <settings>
          <last-edited>1.8</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ModuleStructureConfigurable.UI">
        <settings>
          <last-edited>twloggly</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ProjectJDKs.UI">
        <settings>
          <last-edited>1.8</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ProjectLibrariesConfigurable.UI">
        <settings>
          <last-edited>jackson-core-2.5.0</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
    </states>
  </component>
</project>


text:
+++
title = "Note on Oct 10 EDT 2016 at 16:9"
publishdate = 2016-10-10T20:09:23+00:00
draft = false
syndicated = [ 'https://twitter.com/chrisjohndeluca/status/785572961545773000?s=20' ]
+++

RT @Khanoisseur: Trump humping an empty chair while Clinton gives a nuanced explanation is the perfect metaphor for their campaigns https:/…


text:
package com.ktvme.dto;

import com.alibaba.fastjson.JSON;
import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import com.google.common.primitives.Ints;
import com.ktvme.json.CustomPropertyPreFilter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 *

 * Created by zhezhiyong@163.com on 2017/4/26.
 */
@SuppressWarnings({"serial", "rawtypes", "unused"})
public class BaseDto extends LinkedHashMap<String, Object> implements Dto, Serializable {

    public static CustomPropertyPreFilter fastJsonFilter;

    static {
        fastJsonFilter = new CustomPropertyPreFilter(Lists.newArrayList("password", "apPassword", "OperPass"));
    }

    public BaseDto() {
    }

    public BaseDto(Map<? extends String, ?> m) {
        super(m);
    }

    @Override
    public Dto put(String key, Object value) {
        super.put(key, value);
        return this;
    }

    @Override
    public Integer getAsInteger(String pStr) {
        Integer result = Ints.tryParse((String) get(pStr));
        if (null == result) return 0;
        return result;
    }

    @Override
    public Long getAsLong(String pStr) {
        return null;
    }

    @Override
    public String getAsString(String pStr) {
        if ("null".equals(String.valueOf(get(pStr)))) return "";
        return String.valueOf(get(pStr));
    }

    @Override
    public BigDecimal getAsBigDecimal(String pStr) {
        return null;
    }

    @Override
    public Date getAsDate(String pStr) {
        return null;
    }

    @Override
    @SuppressWarnings("unchecked")
    public <T> List<T> getAsList(String key) {
        return (List<T>) get(key);
    }

    @Override
    public Timestamp getAsTimestamp(String pStr) {
        return null;
    }

    @Override
    public Boolean getAsBoolean(String key) {
        return null;
    }

    @Override
    public List getDefaultAList() {
        return null;
    }

    @Override
    public void setDefaultAList(List pList) {

    }

    @Override
    public List getDefaultBList() {
        return null;
    }

    @Override
    public void setDefaultBList(List pList) {

    }

    @Override
    public String getDefaultJson() {
        return null;
    }

    @Override
    public void setDefaultJson(String jsonString) {

    }

    @Override
    public String toXml(String pStyle) {
        return null;
    }

    @Override
    public String toXml() {
        return null;
    }

    @Override
    public String toJson() {
        return JSON.toJSONString(this);
    }

    @Override
    public String toJsonFilter() {
        return JSON.toJSONString(this, BaseDto.fastJsonFilter);
    }

    @Override
    public void println() {

    }

    @Override
    public String toJson(String pFormat) {
        return null;
    }

    @Override
    public Date getAsDate(String pStr, String format) {
        return null;
    }

    @Override
    public Byte getAsByte(String pStr) {
        return null;
    }

    @Override
    public Integer getAsInteger(String pStr, int defaultValue) {
        return "null".equals(getAsString(pStr)) || Strings.isNullOrEmpty(getAsString(pStr)) ? defaultValue : Integer.valueOf(getAsString(pStr));
    }

    @Override
    public String getAsString(String pStr, String defaultValue) {
        return "null".equals(getAsString(pStr)) || Strings.isNullOrEmpty(getAsString(pStr)) ? defaultValue : getAsString(pStr);
    }

    @Override
    public Byte getAsByte(String pStr, byte defaultValue) {
        return null;
    }

    @Override
    public Double getAsDouble(String pStr) {
        return null;
    }

    @Override
    public Double getAsDouble(String pStr, Double defaultValue) {
        return null;
    }

    @Override
    public Dto getAsDto(String pStr) {
        return null;
    }

    @Override
    public List<Dto> getAsDtoList(String string) {
        return null;
    }

    @Override
    public String toString() {
        return this.toJson();
    }
}


text:
<?php
namespace Wamania\Snowball\Tests;

use PHPUnit\Framework\TestCase;
use Wamania\Snowball\Stemmer\Finnish;

class FinnishTest extends TestCase
{
    /**
     * @dataProvider load
     */
    public function testStem($word, $stem)
    {
        $o = new Finnish();

        $snowballStem = $o->stem($word);

		$this->assertEquals($stem, $snowballStem);
    }

    public function load()
    {
        return new CsvFileIterator('test/files/fi.txt');
    }
}


text: BalloonBuffer is a repository for primitive data used by the BalloonEngine.


text:
package org.hawkular.inventory.rest;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import javax.annotation.PostConstruct;
import javax.enterprise.inject.Produces;
import javax.inject.Singleton;

/**
 * @author Jirka Kremser
 * @since 0.3.4
 */
@Singleton
public class PageToStreamThreadPool {

    private static PageToStreamThreadPool instance;
    private ExecutorService executor;

    @Produces
    @Singleton
    public static PageToStreamThreadPool getInstance() {
        if (instance == null) {
            instance = new PageToStreamThreadPool();
            instance.init();
        }
        return instance;
    }

    @PostConstruct
    public void init() {
        this.executor = Executors.newCachedThreadPool();
    }

    public void submit(Runnable work) {
        executor.execute(work);
    }
}


text:
package com.github.glitteride.syntext;

import com.github.glitteride.syntext.syntax.SyntaxDefinition;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

public class Syntext {
	private static Map<String, SyntaxDefinition> syntaxes = new HashMap<String, SyntaxDefinition>();

	public static SyntaxDefinition create(String name) {
		SyntaxDefinition syntax = new SyntaxDefinition(name);
		syntaxes.put(name, syntax);
		return syntax;
	}

	public static Collection<SyntaxDefinition> getAll() {
		return syntaxes.values();
	}

	public static Optional<SyntaxDefinition> get(String name) {
		return Optional.ofNullable(syntaxes.get(name));
	}

	public static Optional<SyntaxDefinition> delete(String name) {
		return Optional.ofNullable(syntaxes.remove(name));
	}

	public static Collection<SyntaxDefinition> clear() {
		Collection<SyntaxDefinition> syntaxes = Syntext.syntaxes.values();
		Syntext.syntaxes.clear();
		return syntaxes;
	}
}


text:
package org.datasays.wes.actions;

import okhttp3.HttpUrl;
import org.datasays.wes.core.RequestInfo;
import org.datasays.wes.types.*;
// documentation: https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html
public class Create extends RequestInfo{

	public Create(String baseUrl){
		super(baseUrl);
	}
	public Create(HttpUrl baseUrl){
		super(baseUrl);
	}

	// param: string waitForActiveShards: Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
	public Create waitForActiveShards(String waitForActiveShards){
		addParams("waitForActiveShards", waitForActiveShards);
		return this;
	}
	// param: string parent: ID of the parent document
	public Create parent(String parent){
		addParams("parent", parent);
		return this;
	}
	// param: enum refresh: If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
	public Create refresh(EnumRefresh refresh){
		addParams("refresh", refresh);
		return this;
	}
	// param: string routing: Specific routing value
	public Create routing(String routing){
		addParams("routing", routing);
		return this;
	}
	// param: time timeout: Explicit operation timeout
	public Create timeout(long timeout){
		addParams("timeout", timeout);
		return this;
	}
	// param: time timestamp: Explicit timestamp for the document
	public Create timestamp(long timestamp){
		addParams("timestamp", timestamp);
		return this;
	}
	// param: time ttl: Expiration time for the document
	public Create ttl(long ttl){
		addParams("ttl", ttl);
		return this;
	}
	// param: number version: Explicit version number for concurrency control
	public Create version(Number version){
		addParams("version", version);
		return this;
	}
	// param: enum versionType: Specific version type
	public Create versionType(EnumVersionType versionType){
		addParams("versionType", versionType);
		return this;
	}
	// param: string pipeline: The pipeline id to preprocess incoming documents with
	public Create pipeline(String pipeline){
		addParams("pipeline", pipeline);
		return this;
	}
	// body*:The document
	@Override
	public void setBody(Object body) {
		super.setBody(body);
	}

	//Document ID
	private String id;
	//The name of the index
	private String index;
	//The type of the document
	private String type;
	public Create setParts(String index,String type,String id){
		this.id=id;
		this.index=index;
		this.type=type;

		return this;
	}

	@Override
	public String parseUrl(String method) {
		if(!"PUT".equalsIgnoreCase(method) && !"POST".equalsIgnoreCase(method)){
			throw new IllegalArgumentException("Unsupported method:"+method);
		}
		//=>/{index}/{type}/{id}/_create
		if(id != null && index != null && type != null ){
			setUrl(index, type, id, "_create");
			return super.parseUrl(method);
		}

		return null;
	}
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
org.apache.ivy.core.check
</TITLE>

<META NAME="date" CONTENT="2013-01-10">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

org.apache.ivy.core.check

Interfaces

CheckEngineSettings

Classes

CheckEngine


text:
<?php
defined('_JEXEC') or die;

class clubmanagerControllerattendance extends JControllerForm
{
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using DeviceHive.Core.Mapping;
using DeviceHive.Data;
using DeviceHive.Data.EF;
using NUnit.Framework;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace DeviceHive.Test.Mapping
{
    [TestFixture]
    public class JsonMapperTest
    {
        protected DataContext DataContext { get; private set; }
        protected JsonMapperManager JsonMapperManager { get; private set; }

        [TestFixtureSetUp]
        public void TestFixtureSetUp()
        {
            JsonMapperManager = new JsonMapperManager();

            // create and configure mappers
            JsonMapperManager.AddMapper(new JsonMapper<TestInnerClass>(
                new JsonMapperConfiguration<TestInnerClass>(JsonMapperManager)
                    .Property(e => e.Int, "int")
                ));

            JsonMapperManager.AddMapper(new JsonMapper<TestClass>(
                new JsonMapperConfiguration<TestClass>(JsonMapperManager)
                    .Property(e => e.Int, "int")
                    .Property(e => e.IntNullable, "intNullable")
                    .Property(e => e.IntNullable2, "intNullable2")
                    .Property(e => e.Bool, "bool")
                    .Property(e => e.BoolNullable, "boolNullable")
                    .Property(e => e.BoolNullable2, "boolNullable2")
                    .Property(e => e.DateTime, "datetime")
                    .Property(e => e.DateTimeNullable, "datetimeNullable")
                    .Property(e => e.DateTimeNullable2, "datetimeNullable2")
                    .Property(e => e.Guid, "guid")
                    .Property(e => e.GuidNullable, "guidNullable")
                    .Property(e => e.GuidNullable2, "guidNullable2")
                    .Property(e => e.Enum, "enum")
                    .Property(e => e.EnumNullable, "enumNullable")
                    .Property(e => e.EnumNullable2, "enumNullable2")
                    .Property(e => e.String, "string")
                    .Property(e => e.String2, "string2")
                    .Property(e => e.IntArray, "intArray")
                    .Property(e => e.StringArray, "stringArray")
                    .RawJsonProperty(e => e.RawJson, "rawJson")
                    .ReferenceProperty(e => e.InnerReference, "innerReference")
                    .CollectionProperty(e => e.InnerCollection, "innerCollection")
                ));
        }

        [Test]
        public void Property()
        {
            var mapper = JsonMapperManager.GetMapper<TestClass>();

            // map to JSON
            var entity = new TestClass
                {
                    Int = 5,
                    IntNullable = 5,
                    Bool = true,
                    BoolNullable = true,
                    DateTime = DateTime.UtcNow,
                    DateTimeNullable = DateTime.UtcNow,
                    Guid = Guid.NewGuid(),
                    GuidNullable = Guid.NewGuid(),
                    Enum = TestEnum.Value1,
                    EnumNullable = TestEnum.Value1,
                    String = "String",
                    IntArray = new[] { 1, 2, 3 },
                    StringArray = new[] { "a", "b", "c" },
                };
            var json = mapper.Map(entity);

            Assert.That(json.Property("int"), Is.Not.Null);
            Assert.That(json["int"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)json["int"], Is.EqualTo(entity.Int));

            Assert.That(json.Property("intNullable"), Is.Not.Null);
            Assert.That(json["intNullable"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)json["intNullable"], Is.EqualTo(entity.IntNullable));

            Assert.That(json.Property("intNullable2"), Is.Not.Null);
            Assert.That(json["intNullable2"].Type, Is.EqualTo(JTokenType.Null));

            Assert.That(json.Property("bool"), Is.Not.Null);
            Assert.That(json["bool"].Type, Is.EqualTo(JTokenType.Boolean));
            Assert.That((bool)json["bool"], Is.EqualTo(entity.Bool));

            Assert.That(json.Property("boolNullable"), Is.Not.Null);
            Assert.That(json["boolNullable"].Type, Is.EqualTo(JTokenType.Boolean));
            Assert.That((bool)json["boolNullable"], Is.EqualTo(entity.BoolNullable));

            Assert.That(json.Property("boolNullable2"), Is.Not.Null);
            Assert.That(json["boolNullable2"].Type, Is.EqualTo(JTokenType.Null));

            Assert.That(json.Property("datetime"), Is.Not.Null);
            Assert.That(json["datetime"].Type, Is.EqualTo(JTokenType.Date));
            Assert.That((DateTime)json["datetime"], Is.EqualTo(entity.DateTime));

            Assert.That(json.Property("datetimeNullable"), Is.Not.Null);
            Assert.That(json["datetimeNullable"].Type, Is.EqualTo(JTokenType.Date));
            Assert.That((DateTime)json["datetimeNullable"], Is.EqualTo(entity.DateTimeNullable.Value));

            Assert.That(json.Property("datetimeNullable2"), Is.Not.Null);
            Assert.That(json["datetimeNullable2"].Type, Is.EqualTo(JTokenType.Null));

            Assert.That(json.Property("guid"), Is.Not.Null);
            Assert.That(json["guid"].Type, Is.EqualTo(JTokenType.String));
            Assert.That((string)json["guid"], Is.EqualTo(entity.Guid.ToString()));

            Assert.That(json.Property("guidNullable"), Is.Not.Null);
            Assert.That(json["guidNullable"].Type, Is.EqualTo(JTokenType.String));
            Assert.That((string)json["guidNullable"], Is.EqualTo(entity.GuidNullable.Value.ToString()));

            Assert.That(json.Property("guidNullable2"), Is.Not.Null);
            Assert.That(json["guidNullable2"].Type, Is.EqualTo(JTokenType.Null));

            Assert.That(json.Property("enum"), Is.Not.Null);
            Assert.That(json["enum"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)json["enum"], Is.EqualTo((int)entity.Enum));

            Assert.That(json.Property("enumNullable"), Is.Not.Null);
            Assert.That(json["enumNullable"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)json["enumNullable"], Is.EqualTo((int)entity.EnumNullable));

            Assert.That(json.Property("enumNullable2"), Is.Not.Null);
            Assert.That(json["enumNullable2"].Type, Is.EqualTo(JTokenType.Null));

            Assert.That(json.Property("string"), Is.Not.Null);
            Assert.That(json["string"].Type, Is.EqualTo(JTokenType.String));
            Assert.That((string)json["string"], Is.EqualTo(entity.String));

            Assert.That(json.Property("string2"), Is.Not.Null);
            Assert.That(json["string2"].Type, Is.EqualTo(JTokenType.Null));

            Assert.That(json.Property("intArray"), Is.Not.Null);
            Assert.That(json["intArray"].Type, Is.EqualTo(JTokenType.Array));
            Assert.That(json["intArray"].Select(t => (int)t).ToArray(), Is.EqualTo(entity.IntArray));

            Assert.That(json.Property("stringArray"), Is.Not.Null);
            Assert.That(json["stringArray"].Type, Is.EqualTo(JTokenType.Array));
            Assert.That(json["stringArray"].Select(t => (string)t).ToArray(), Is.EqualTo(entity.StringArray));

            // map to entity
            var json2 = JObject.Parse(json.ToString());
            var entity2 = mapper.Map(json2);

            Assert.That(entity2.Int, Is.EqualTo(entity.Int));
            Assert.That(entity2.IntNullable, Is.EqualTo(entity.IntNullable));
            Assert.That(entity2.IntNullable2, Is.Null);
            Assert.That(entity2.Bool, Is.EqualTo(entity.Bool));
            Assert.That(entity2.BoolNullable, Is.EqualTo(entity.BoolNullable));
            Assert.That(entity2.BoolNullable2, Is.Null);
            Assert.That(entity2.DateTime, Is.EqualTo(entity.DateTime));
            Assert.That(entity2.DateTimeNullable, Is.EqualTo(entity.DateTimeNullable));
            Assert.That(entity2.DateTimeNullable2, Is.Null);
            Assert.That(entity2.Guid, Is.EqualTo(entity.Guid));
            Assert.That(entity2.GuidNullable, Is.EqualTo(entity.GuidNullable));
            Assert.That(entity2.GuidNullable2, Is.Null);
            Assert.That(entity2.Enum, Is.EqualTo(entity.Enum));
            Assert.That(entity2.EnumNullable, Is.EqualTo(entity.EnumNullable));
            Assert.That(entity2.EnumNullable2, Is.Null);
            Assert.That(entity2.String, Is.EqualTo(entity.String));
            Assert.That(entity2.String2, Is.Null);
            Assert.That(entity2.IntArray, Is.EqualTo(entity.IntArray));
            Assert.That(entity2.StringArray, Is.EqualTo(entity.StringArray));

            // map to entity - null values
            var entity3 = new TestClass
                {
                    IntNullable = 5,
                    IntNullable2 = 5,
                    BoolNullable = true,
                    BoolNullable2 = true,
                    DateTimeNullable = DateTime.UtcNow,
                    DateTimeNullable2 = DateTime.UtcNow,
                    GuidNullable = Guid.NewGuid(),
                    GuidNullable2 = Guid.NewGuid(),
                    EnumNullable = TestEnum.Value1,
                    EnumNullable2 = TestEnum.Value1,
                    String = "String",
                    String2 = "String",
                    IntArray = new int[] { 1, 2, 3 },
                    StringArray = new string[] { "a", "b", "c" },
                };
            var json3 = new JObject(
                new JProperty("intNullable2", null),
                new JProperty("boolNullable2", null),
                new JProperty("datetimeNullable2", null),
                new JProperty("guidNullable2", null),
                new JProperty("enumNullable2", null),
                new JProperty("string2", null),
                new JProperty("stringArray", null));
            mapper.Apply(entity3, json3);

            Assert.That(entity3.IntNullable, Is.Not.Null); // should not override
            Assert.That(entity3.IntNullable2, Is.Null);    // should override to null
            Assert.That(entity3.BoolNullable, Is.Not.Null);
            Assert.That(entity3.BoolNullable2, Is.Null);
            Assert.That(entity3.DateTimeNullable, Is.Not.Null);
            Assert.That(entity3.DateTimeNullable2, Is.Null);
            Assert.That(entity3.GuidNullable, Is.Not.Null);
            Assert.That(entity3.GuidNullable2, Is.Null);
            Assert.That(entity3.EnumNullable, Is.Not.Null);
            Assert.That(entity3.EnumNullable2, Is.Null);
            Assert.That(entity3.String, Is.Not.Null);
            Assert.That(entity3.String2, Is.Null);
            Assert.That(entity3.IntArray, Is.Not.Null);
            Assert.That(entity3.StringArray, Is.Null);
        }

        [Test]
        public void RawJsonProperty()
        {
            var mapper = JsonMapperManager.GetMapper<TestClass>();

            // map to JSON
            var entity = new TestClass { RawJson = null };
            var json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.Null));

            entity = new TestClass { RawJson = "null" };
            json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.Null));

            entity = new TestClass { RawJson = "5" };
            json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)json["rawJson"], Is.EqualTo(5));

            entity = new TestClass { RawJson = "true" };
            json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.Boolean));
            Assert.That((bool)json["rawJson"], Is.EqualTo(true));

            entity = new TestClass { RawJson = "\"String\"" };
            json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.String));
            Assert.That((string)json["rawJson"], Is.EqualTo("String"));

            entity = new TestClass { RawJson = "[1, 2, 3]" };
            json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.Array));
            Assert.That(json["rawJson"].ToString(Formatting.None), Is.EqualTo("[1,2,3]"));

            entity = new TestClass { RawJson = "{\"a\": 5}" };
            json = mapper.Map(entity);
            Assert.That(json.Property("rawJson"), Is.Not.Null);
            Assert.That(json["rawJson"].Type, Is.EqualTo(JTokenType.Object));
            Assert.That(json["rawJson"].ToString(Formatting.None), Is.EqualTo("{\"a\":5}"));

            // map to entity
            entity = new TestClass { RawJson = "5" };
            json = new JObject();
            mapper.Apply(entity, json);
            Assert.That(entity.RawJson, Is.EqualTo("5"));

            entity = new TestClass { RawJson = "5" };
            json = new JObject(new JProperty("rawJson", null));
            mapper.Apply(entity, json);
            Assert.That(entity.RawJson, Is.Null);

            json = new JObject(new JProperty("rawJson", 5));
            entity = mapper.Map(json);
            Assert.That(entity.RawJson, Is.EqualTo("5"));

            json = new JObject(new JProperty("rawJson", true));
            entity = mapper.Map(json);
            Assert.That(entity.RawJson, Is.EqualTo("true"));

            json = new JObject(new JProperty("rawJson", "String"));
            entity = mapper.Map(json);
            Assert.That(entity.RawJson, Is.EqualTo("\"String\""));

            json = new JObject(new JProperty("rawJson", new JArray(1, 2, 3)));
            entity = mapper.Map(json);
            Assert.That(entity.RawJson, Is.EqualTo("[1,2,3]"));

            json = new JObject(new JProperty("rawJson", new JObject(new JProperty("a", 5))));
            entity = mapper.Map(json);
            Assert.That(entity.RawJson, Is.EqualTo("{\"a\":5}"));
        }

        [Test]
        public void ReferenceProperty()
        {
            var mapper = JsonMapperManager.GetMapper<TestClass>();

            // map to JSON
            var entity = new TestClass { InnerReference = null };
            var json = mapper.Map(entity);
            Assert.That(json.Property("innerReference"), Is.Not.Null);
            Assert.That(json["innerReference"].Type, Is.EqualTo(JTokenType.Null));

            entity = new TestClass { InnerReference = new TestInnerClass { Int = 5 } };
            json = mapper.Map(entity);
            Assert.That(json.Property("innerReference"), Is.Not.Null);
            Assert.That(json["innerReference"].Type, Is.EqualTo(JTokenType.Object));
            var jsonInner = (JObject)json["innerReference"];
            Assert.That(jsonInner["int"], Is.Not.Null);
            Assert.That(jsonInner["int"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)jsonInner["int"], Is.EqualTo(entity.InnerReference.Int));

            // map to entity
            entity = new TestClass { InnerReference = new TestInnerClass { Int = 5 } };
            json = new JObject();
            mapper.Apply(entity, json);
            Assert.That(entity.InnerReference, Is.Not.Null);
            Assert.That(entity.InnerReference.Int, Is.EqualTo(5));

            entity = new TestClass { InnerReference = new TestInnerClass { Int = 5 } };
            json = new JObject(new JProperty("innerReference", null));
            mapper.Apply(entity, json);
            Assert.That(entity.InnerReference, Is.Null);

            json = new JObject(new JProperty("innerReference", new JObject(new JProperty("int", 5))));
            entity = mapper.Map(json);
            Assert.That(entity.InnerReference, Is.Not.Null);
            Assert.That(entity.InnerReference.Int, Is.EqualTo(5));
        }

        [Test]
        public void CollectionProperty()
        {
            var mapper = JsonMapperManager.GetMapper<TestClass>();

            // map to JSON
            var entity = new TestClass { InnerCollection = null };
            var json = mapper.Map(entity);
            Assert.That(json.Property("innerCollection"), Is.Not.Null);
            Assert.That(json["innerCollection"].Type, Is.EqualTo(JTokenType.Null));

            entity = new TestClass { InnerCollection = new List<TestInnerClass> { new TestInnerClass { Int = 5 } } };
            json = mapper.Map(entity);
            Assert.That(json.Property("innerCollection"), Is.Not.Null);
            Assert.That(json["innerCollection"].Type, Is.EqualTo(JTokenType.Array));
            var jsonInner = (JArray)json["innerCollection"];
            Assert.That(jsonInner.Count, Is.EqualTo(1));
            Assert.That(jsonInner[0]["int"], Is.Not.Null);
            Assert.That(jsonInner[0]["int"].Type, Is.EqualTo(JTokenType.Integer));
            Assert.That((int)jsonInner[0]["int"], Is.EqualTo(entity.InnerCollection[0].Int));

            // map to entity
            entity = new TestClass { InnerCollection = new List<TestInnerClass> { new TestInnerClass { Int = 5 } } };
            json = new JObject();
            mapper.Apply(entity, json);
            Assert.That(entity.InnerCollection, Is.Not.Null);
            Assert.That(entity.InnerCollection.Count, Is.EqualTo(1));

            entity = new TestClass { InnerCollection = new List<TestInnerClass> { new TestInnerClass { Int = 5 } } };
            json = new JObject(new JProperty("innerCollection", null));
            mapper.Apply(entity, json);
            Assert.That(entity.InnerCollection, Is.Null);

            json = new JObject(new JProperty("innerCollection", new JArray(new JObject(new JProperty("int", 5)))));
            entity = mapper.Map(json);
            Assert.That(entity.InnerCollection, Is.Not.Null);
            Assert.That(entity.InnerCollection.Count, Is.EqualTo(1));
            Assert.That(entity.InnerCollection[0].Int, Is.EqualTo(5));
        }

        [Test]
        [Explicit]
        public void SpeedTest()
        {
            var mapper = JsonMapperManager.GetMapper<TestClass>();
            var entity = new TestClass
            {
                Int = 5,
                IntNullable = 5,
                Bool = true,
                BoolNullable = true,
                DateTime = DateTime.UtcNow,
                DateTimeNullable = DateTime.UtcNow,
                Guid = Guid.NewGuid(),
                GuidNullable = Guid.NewGuid(),
                Enum = TestEnum.Value1,
                EnumNullable = TestEnum.Value1,
                String = "String",
            };
            var json = new JObject(
                new JProperty("int", 5),
                new JProperty("intNullable", 5),
                new JProperty("bool", true),
                new JProperty("boolNullable", true),
                new JProperty("datetime", "2012-05-03T06:22:34.000000"),
                new JProperty("datetimeNullable", "2012-05-03T06:22:34.000000"),
                new JProperty("guid", Guid.NewGuid().ToString()),
                new JProperty("guidNullable", Guid.NewGuid().ToString()),
                new JProperty("enum", 1),
                new JProperty("enumNullable", 1),
                new JProperty("string", "String"));

            for (var iteration = 0; iteration < 10; iteration++)
            {
                var stopwatch = System.Diagnostics.Stopwatch.StartNew();
                for (var i = 0; i < 1000; i++)
                {
                    mapper.Map(entity);
                }
                stopwatch.Stop();
                var time1 = stopwatch.ElapsedMilliseconds;

                stopwatch = System.Diagnostics.Stopwatch.StartNew();
                for (var i = 0; i < 1000; i++)
                {
                    mapper.Map(json);
                }
                stopwatch.Stop();
                var time2 = stopwatch.ElapsedMilliseconds;

                Console.WriteLine(string.Format("{0} {1}", time1, time2));
            }
        }

        private enum TestEnum
        {
            Value1 = 1,
            Value2 = 2,
        }

        private class TestClass
        {
            public int Int { get; set; }
            public int? IntNullable { get; set; }
            public int? IntNullable2 { get; set; }
            public bool Bool { get; set; }
            public bool? BoolNullable { get; set; }
            public bool? BoolNullable2 { get; set; }
            public Guid Guid { get; set; }
            public Guid? GuidNullable { get; set; }
            public Guid? GuidNullable2 { get; set; }
            public DateTime DateTime { get; set; }
            public DateTime? DateTimeNullable { get; set; }
            public DateTime? DateTimeNullable2 { get; set; }
            public TestEnum Enum { get; set; }
            public TestEnum? EnumNullable { get; set; }
            public TestEnum? EnumNullable2 { get; set; }
            public string String { get; set; }
            public string String2 { get; set; }
            public int[] IntArray { get; set; }
            public string[] StringArray { get; set; }
            public string RawJson { get; set; }
            public TestInnerClass InnerReference { get; set; }
            public List<TestInnerClass> InnerCollection { get; set; }
        }

        private class TestInnerClass
        {
            public int Int { get; set; }
        }
    }
}


text:
var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res) {
  res.render('index', { title: 'Express' });
});

router.get('/trunk/list', function(req, res) {

  console.log(req.pbx.configurator.files['users.conf']);

  req.pbx.loadTrunks(function (result) {
    console.log(result);
    res.render('trunk', { title: 'Express' });
  });

});

module.exports = router;


text:
module Exlibris
  module Primo
    module WebService
      module Request
        module Call
          #
          # Returns an response Exlibris::Primo::WebService::Response that corresponds
          # to the request.
          #
          def call
            # Get the Response class that matches the Request class.
            response_klass = "Exlibris::Primo::WebService::Response::#{self.class.name.demodulize}".constantize
            response_klass.new(client.send(soap_action, to_xml), soap_action)
          end
        end
      end
    end
  end
end


text: model_data generateVoxelVBO(uint8_t x, uint8_t y);


text:
{{title}} Library

Select a fenestration:

  <button type="button" class="btn btn-primary" ng-click="ok()" ng-disabled="!selected">OK</button>
  <button type="button" class="btn btn-warning" ng-click="cancel()">Cancel</button>


text:
""" Cisco_IOS_XR_mpls_ldp_cfg_datatypes

This module contains a collection of YANG definitions
for Cisco IOS\-XR mpls\-ldp\-cfg\-datat package configuration.

Copyright (c) 2013\-2015 by Cisco Systems, Inc.
All rights reserved.

"""

import re
import collections

from enum import Enum

from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict

from ydk.errors import YPYError, YPYModelError

class MplsLdpDownstreamOnDemandEnum(Enum):
    """
    MplsLdpDownstreamOnDemandEnum

    Mpls ldp downstream on demand

    .. data:: PEER_ACL = 1

    	Downstream on Demand peers permitted by ACL

    """

    PEER_ACL = 1

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_mpls_ldp_cfg_datatypes as meta
        return meta._meta_table['MplsLdpDownstreamOnDemandEnum']

class MplsLdpNbrPasswordEnum(Enum):
    """
    MplsLdpNbrPasswordEnum

    Mpls ldp nbr password

    .. data:: DISABLE = 1

    	Disable the global default password for this

    	neighbor

    .. data:: SPECIFIED = 2

    	Specify a password for this neighbor

    """

    DISABLE = 1

    SPECIFIED = 2

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_mpls_ldp_cfg_datatypes as meta
        return meta._meta_table['MplsLdpNbrPasswordEnum']

class MplsLdpRouterIdEnum(Enum):
    """
    MplsLdpRouterIdEnum

    Mpls ldp router id

    .. data:: ADDRESS = 1

    	Use given IP address as LDP Router ID

    """

    ADDRESS = 1

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_mpls_ldp_cfg_datatypes as meta
        return meta._meta_table['MplsLdpRouterIdEnum']

class MplsLdpSessionProtectionEnum(Enum):
    """
    MplsLdpSessionProtectionEnum

    Mpls ldp session protection

    .. data:: ALL = 1

    	Protect all peer sessions

    .. data:: FOR = 2

    	Protect peer session(s) permitted by peer ACL

    .. data:: ALL_WITH_DURATION = 3

    	Protect all peer sessions and holdup protection

    	for given duration

    .. data:: FOR_WITH_DURATION = 4

    	Protect peer session(s) permitted by peer ACL

    	and holdup protection for given duration

    .. data:: ALL_WITH_FOREVER = 5

    	Protect all peer sessions and holdup protection

    	forever

    .. data:: FOR_WITH_FOREVER = 6

    	Protect peer session(s) permitted by peer ACL

    	and holdup protection forever

    """

    ALL = 1

    FOR = 2

    ALL_WITH_DURATION = 3

    FOR_WITH_DURATION = 4

    ALL_WITH_FOREVER = 5

    FOR_WITH_FOREVER = 6

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_mpls_ldp_cfg_datatypes as meta
        return meta._meta_table['MplsLdpSessionProtectionEnum']

class MplsLdpafNameEnum(Enum):
    """
    MplsLdpafNameEnum

    Mpls ldpaf name

    .. data:: IPV4 = 4

    	IPv4

    .. data:: IPV6 = 6

    	IPv6

    """

    IPV4 = 4

    IPV6 = 6

    @staticmethod
    def _meta_info():
        from ydk.models.cisco_ios_xr._meta import _Cisco_IOS_XR_mpls_ldp_cfg_datatypes as meta
        return meta._meta_table['MplsLdpafNameEnum']


text:
//
//  NSTimeZone+HLSExtensions.h
//  CoconutKit
//
//  Created by Samuel Défago on 05.09.11.
//  Copyright 2011 Samuel Défago. All rights reserved.
//

@interface NSTimeZone (HLSExtensions)

/**
 * Shortcuts to apply time zone calculation methods to [NSTimeZone systemTimeZone]. Refer to the instance method documentation
 * for more information
 */
+ (NSTimeInterval)offsetFromTimeZone:(NSTimeZone *)timeZone forDate:(NSDate *)date;
+ (NSDate *)dateWithSameComponentsAsDate:(NSDate *)date fromTimeZone:(NSTimeZone *)timeZone;
+ (NSDate *)dateByAddingTimeInterval:(NSTimeInterval)timeInterval toDate:(NSDate *)date;
+ (NSDate *)dateByAddingNumberOfDays:(NSInteger)numberOfDays toDate:(NSDate *)date;
+ (NSTimeInterval)timeIntervalBetweenDate:(NSDate *)date1 andDate:(NSDate *)date2;

/**
 * Return the offset (in seconds) between the receiver and another time zone for a given date. Take into account daylight
 * saving time issues. For example, if the receiver is at UTC+2 for the given date, while the other time zone is at
 * UTC-3, the method returns 1800 (5 * 60 * 60). If the receiver is UTC+1 for the given date, while the other time zone
 * is at UTC+5, the method returns -1440 (-4 * 60 * 60)
 */
- (NSTimeInterval)offsetFromTimeZone:(NSTimeZone *)timeZone forDate:(NSDate *)date;

/**
 * Return the date which, in the receiver time zone, has the same components as a given date in another time zone. For
 * example, if date corresponds to 2012-03-01 06:12:00 for some timeZone, the method returns the date object which
 * corresponds to 2012-03-01 06:12:00 for the receiver.
 * This method takes into account daylight saving time issues.
 */
- (NSDate *)dateWithSameComponentsAsDate:(NSDate *)date fromTimeZone:(NSTimeZone *)timeZone;

/**
 * Add some number of seconds to a date, taking daylight saving time issues into account. If a DST transition is crossed,
 * a correction is applied so that the date we get is the one we would have expected if no transition had existed. This is
 * in striking contrast with -[NSDate dateByAddingTimeInterval:] which simply works with date objects (i.e. abstract
 * points in time) without time zone consideration issues
 *
 * Example:
 * In 2012, the CET -> CEST transition occurs at 2012-03-25 03:00:00 (CEST, UTC+2) for the Europe/Zurich time zone. If you
 * want to add a time interval corresponding to 1 day (86400 seconds) to 2012-03-24 06:00:00 (CET, UTC+1), you now have two
 * options depending on which behavior you require:
 *   - if you use -[NSDate dateByAddingTimeInterval:toDate:], an hour is lost during the transition, and you obtain
 *     2012-03-25 07:00:00 (CEST, UTC+2)
 *   - if you use -dateByAddingTimeInterval:toDate:, a one-hour correction is applied to "negate" the transition.
 *     In the end you obtain 2012-03-25 06:00:00 (CEST, UTC+2)
 */
- (NSDate *)dateByAddingTimeInterval:(NSTimeInterval)timeInterval toDate:(NSDate *)date;

/**
 * Same as -dateByAddingTimeInterval:toDate:, but using day increments
 */
- (NSDate *)dateByAddingNumberOfDays:(NSInteger)numberOfDays toDate:(NSDate *)date;

/**
 * Return the number of seconds between two given dates (= date1 - date2), taking daylight saving time issues into account.
 * If date1 and date2 are not on the same side of the DST switch date, a correction will be applied. This correction is
 * such that the time difference between date1 and date2 is the one which would have existed if no DST transition had occurred.
 * This is in striking contrast with -[NSDate timeIntervalSinceDate:] which simply works with date objects (i.e. abstract
 * points in time) without time zone consideration issues
 *
 * Example:
 * In 2012, the CET -> CEST transition occurs at 2012-03-25 03:00:00 (CEST, UTC+2) for the Europe/Zurich time zone. If you
 * want to calculate the time interval between 2012-03-25 03:00:00 (CEST, UTC+2) and 2012-03-25 01:00:00 (CET, UTC+1), you
 * now have two options depending on which behavior you require:
 *   - if you use -[NSDate timeIntervalSinceDate:], you get 3600, i.e. 1 hour (because 02:00:00 UTC+1 does not exist and
 *     waas replaced by 03:00:00 UTC+2)
 *   - if you use -timeIntervalBetweenDate:andDate:, you get 7200, i.e. 2 hours (this is the difference between 03:00:00
 *     and 01:00:00, where the CET -> CEST jump has been negated)
 */
- (NSTimeInterval)timeIntervalBetweenDate:(NSDate *)date1 andDate:(NSDate *)date2;

@end


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Collections.Generic;
using Microsoft.CodeAnalysis.Text;

namespace Microsoft.CodeAnalysis
{
    internal class SyntaxNodeLocationComparer : IComparer<SyntaxNode>
    {
        private readonly Compilation _compilation;

        public SyntaxNodeLocationComparer(Compilation compilation)
        {
            _compilation = compilation;
        }

        public int Compare(SyntaxNode x, SyntaxNode y)
        {
            return _compilation.CompareSourceLocations(x.GetLocation(), y.GetLocation());
        }
    }
}


text:
namespace AH.ModuleController.UI.INVMS.Forms
{
    partial class frmPORecord
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.txtItemID = new AtiqsControlLibrary.SmartTextBox();
            this.dgvPORecord = new System.Windows.Forms.DataGridView();
            this.cboItemName = new AtiqsControlLibrary.SmartComboBox();
            this.btnShow = new System.Windows.Forms.Button();
            this.pnlMain.SuspendLayout();
            this.pnlTop.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgvPORecord)).BeginInit();
            this.SuspendLayout();
            //
            // frmLabel
            //
            this.frmLabel.Location = new System.Drawing.Point(154, 9);
            this.frmLabel.Size = new System.Drawing.Size(421, 33);
            this.frmLabel.Text = "Purchase Order History(ItemWise)";
            //
            // pnlMain
            //
            this.pnlMain.Controls.Add(this.dgvPORecord);
            this.pnlMain.Size = new System.Drawing.Size(746, 636);
            //
            // pnlTop
            //
            this.pnlTop.Size = new System.Drawing.Size(746, 58);
            //
            // btnEdit
            //
            this.btnEdit.Location = new System.Drawing.Point(206, 550);
            this.btnEdit.Visible = false;
            //
            // btnSave
            //
            this.btnSave.Location = new System.Drawing.Point(138, 555);
            this.btnSave.Visible = false;
            //
            // btnDelete
            //
            this.btnDelete.Location = new System.Drawing.Point(275, 555);
            this.btnDelete.Visible = false;
            //
            // btnNew
            //
            this.btnNew.Location = new System.Drawing.Point(109, 555);
            this.btnNew.Visible = false;
            //
            // btnClose
            //
            this.btnClose.Location = new System.Drawing.Point(625, 555);
            //
            // btnPrint
            //
            this.btnPrint.Location = new System.Drawing.Point(370, 554);
            this.btnPrint.Visible = false;
            //
            // groupBox1
            //
            this.groupBox1.Size = new System.Drawing.Size(746, 25);
            //
            // txtItemID
            //
            this.txtItemID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.txtItemID.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtItemID.Location = new System.Drawing.Point(14, 555);
            this.txtItemID.Name = "txtItemID";
            this.txtItemID.Size = new System.Drawing.Size(39, 24);
            this.txtItemID.TabIndex = 0;
            this.txtItemID.Visible = false;
            //
            // dgvPORecord
            //
            this.dgvPORecord.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.dgvPORecord.Location = new System.Drawing.Point(-1, 140);
            this.dgvPORecord.Name = "dgvPORecord";
            this.dgvPORecord.Size = new System.Drawing.Size(744, 495);
            this.dgvPORecord.TabIndex = 1;
            //
            // cboItemName
            //
            this.cboItemName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboItemName.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboItemName.ForeColor = System.Drawing.Color.Blue;
            this.cboItemName.FormattingEnabled = true;
            this.cboItemName.Location = new System.Drawing.Point(13, 563);
            this.cboItemName.Name = "cboItemName";
            this.cboItemName.Size = new System.Drawing.Size(40, 26);
            this.cboItemName.TabIndex = 2;
            this.cboItemName.Visible = false;
            //
            // btnShow
            //
            this.btnShow.BackColor = System.Drawing.Color.DarkGreen;
            this.btnShow.Cursor = System.Windows.Forms.Cursors.Hand;
            this.btnShow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
            this.btnShow.Font = new System.Drawing.Font("Georgia", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnShow.ForeColor = System.Drawing.Color.White;
            this.btnShow.Location = new System.Drawing.Point(39, 554);
            this.btnShow.Name = "btnShow";
            this.btnShow.Size = new System.Drawing.Size(53, 25);
            this.btnShow.TabIndex = 171;
            this.btnShow.Text = "Show";
            this.btnShow.UseVisualStyleBackColor = false;
            this.btnShow.Visible = false;
            this.btnShow.Click += new System.EventHandler(this.btnShow_Click);
            //
            // frmPORecord
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.ClientSize = new System.Drawing.Size(746, 623);
            this.Controls.Add(this.btnShow);
            this.Controls.Add(this.cboItemName);
            this.Controls.Add(this.txtItemID);
            this.isEnterTabAllow = true;
            this.Name = "frmPORecord";
            this.Load += new System.EventHandler(this.frmPORecord_Load);
            this.Controls.SetChildIndex(this.groupBox1, 0);
            this.Controls.SetChildIndex(this.pnlMain, 0);
            this.Controls.SetChildIndex(this.pnlTop, 0);
            this.Controls.SetChildIndex(this.btnSave, 0);
            this.Controls.SetChildIndex(this.btnEdit, 0);
            this.Controls.SetChildIndex(this.btnDelete, 0);
            this.Controls.SetChildIndex(this.btnNew, 0);
            this.Controls.SetChildIndex(this.btnClose, 0);
            this.Controls.SetChildIndex(this.txtItemID, 0);
            this.Controls.SetChildIndex(this.cboItemName, 0);
            this.Controls.SetChildIndex(this.btnPrint, 0);
            this.Controls.SetChildIndex(this.btnShow, 0);
            this.pnlMain.ResumeLayout(false);
            this.pnlTop.ResumeLayout(false);
            this.pnlTop.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgvPORecord)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.DataGridView dgvPORecord;
        private AtiqsControlLibrary.SmartTextBox txtItemID;
        private AtiqsControlLibrary.SmartComboBox cboItemName;
        private System.Windows.Forms.Button btnShow;
    }
}


text:
/**
 * @file security-api.c
 */

#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include <shell/tash.h>
#include <unistd.h>

#include <artik_module.h>
#include <artik_security.h>

#include <tls/x509_crt.h>
#include <tls/pk.h>
#include <tls/pem.h>
#include <tls/oid.h>

#include "command.h"

static int security_cert(int argc, char *argv[]);
static int security_pk(int argc, char *argv[]);
static int security_chain(int argc, char *argv[]);
static int security_rand(int argc, char *argv[]);
static int security_serial(int argc, char *argv[]);

const struct command security_commands[] = {
	{ "cert", "cert <der|pem> - Display certificate stored in SE (default: pem format)", security_cert },
	{ "pk",
	  "pk <der|pem> - Display public key extracted from the certificate stored in SE (default: pem format)",
	  security_pk },
	{ "chain", " Display root CA extracted and intermediate certificates from the certificate stored in SE", security_chain },
	{ "rand", "rand <num> - Generate <num> random bytes from the SE", security_rand },
	{ "serial", "Return the Serial Number contained in the certificate stored in SE", security_serial },
	{ "", "", NULL }
};

static void output_buffer(uint8_t *buffer, int length)
{
	int i = 0;

	printf("\n");

	while (i < length) {
		uint8_t array[16] = {0};
		int j;
		size_t size = 16;

		if (size > length - i) {
			size = length - i;
		}

		memcpy(array, buffer+i, size);
		for (j = 0 ; j < 16 && i+j < length; j++) {
			printf("%02X ", array[j]);
			if (j%4 == 3) {
				printf(" ");
			}
		}
		if (length > 16) {
			while (j < 16) {
				printf("   ");
				if (j%4 == 3) {
					printf(" ");
				}
				j++;
			}
		}
		printf(" ");
		for (j = 0 ; j < 16 && i+j < length; j++) {
			if (isprint(array[j])) {
				printf("%c", array[j]);
			} else {
				printf(".");
			}
		}
		printf("\n");
		i += 16;
	}
}

static int security_cert(int argc, char *argv[])
{
	artik_security_module *security = NULL;
	int ret = 0;
	artik_error err = S_OK;
	artik_security_handle handle = NULL;
	unsigned char *se_cert = NULL;
	unsigned int se_cert_size = 0;
	char *se_cert_pem = NULL;
	artik_security_cert_type_t fmt = ARTIK_SECURITY_CERT_TYPE_PEM;

	if (argc > 3) {
		if (strcmp(argv[3], "der") == 0) {
			fmt = ARTIK_SECURITY_CERT_TYPE_DER;
		} else if (strcmp(argv[3], "pem") == 0) {
			fmt = ARTIK_SECURITY_CERT_TYPE_PEM;
		} else {
			fprintf(stderr, "Unknown certificate format %s\n", argv[3]);
			return -1;
		}
	}

	security = (artik_security_module *)artik_request_api_module("security");
	if (!security) {
		fprintf(stderr, "Security module is not available\n");
		return -1;
	}

	err = security->request(&handle);
	if (err != S_OK) {
		fprintf(stderr, "Failed to request security instance (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	err = security->get_certificate(handle, ARTIK_DEVICE_CERT_ID, fmt, &se_cert,
			&se_cert_size);
	if (err != S_OK || !se_cert || !se_cert_size) {
		fprintf(stderr, "Failed to get certificate (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	switch (fmt) {
	case ARTIK_SECURITY_CERT_TYPE_DER:
		output_buffer(se_cert, se_cert_size);
		break;
	default:
		se_cert_pem = strndup((char *)se_cert, se_cert_size);
		if (!se_cert_pem) {
			fprintf(stderr, "Failed to duplicate certificate\n");
			goto exit;
		}
		fprintf(stdout, se_cert_pem);
		free(se_cert_pem);
		break;
	}

exit:
	if (se_cert)
		free(se_cert);
	if (handle)
		security->release(handle);
	artik_release_api_module(security);

	return ret;
}

static int security_pk(int argc, char *argv[])
{
	artik_security_module *security = NULL;
	int ret = 0;
	artik_security_handle handle = NULL;
	artik_error err = S_OK;
	unsigned char *se_cert = NULL;
	unsigned int se_cert_size = 0;
	char *se_cert_pem = NULL;
	char *se_pk_pem = NULL;
	unsigned char *se_pk_der = NULL;
	unsigned int se_pk_der_size = 0;
	artik_security_cert_type_t fmt = ARTIK_SECURITY_CERT_TYPE_PEM;

	security = (artik_security_module *)artik_request_api_module("security");
	if (!security) {
		fprintf(stderr, "Security module is not available\n");
		return -1;
	}

	if (argc > 3) {
		if (strcmp(argv[3], "der") == 0) {
			fmt = ARTIK_SECURITY_CERT_TYPE_DER;
		} else if (strcmp(argv[3], "pem") == 0) {
			fmt = ARTIK_SECURITY_CERT_TYPE_PEM;
		} else {
			fprintf(stderr, "Unknown certificate format %s\n", argv[3]);
			return -1;
		}
	}

	err = security->request(&handle);
	if (err != S_OK) {
		fprintf(stderr, "Failed to request security instance (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	err = security->get_certificate(handle, ARTIK_DEVICE_CERT_ID,
			ARTIK_SECURITY_CERT_TYPE_PEM,  &se_cert, &se_cert_size);
	if (err != S_OK || !se_cert || !se_cert_size) {
		fprintf(stderr, "Failed to get certificate (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	se_cert_pem = strndup((char *)se_cert, se_cert_size);
	free(se_cert);
	if (!se_cert_pem) {
		fprintf(stderr, "Failed to duplicate certificate\n");
		goto exit;
	}

	err = security->get_ec_pubkey_from_cert(se_cert_pem, &se_pk_pem);
	if (err != S_OK || !se_pk_pem) {
		fprintf(stderr, "Failed to get public key (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	switch (fmt) {
	case ARTIK_SECURITY_CERT_TYPE_DER:
		err = security->convert_pem_to_der(se_pk_pem, &se_pk_der,
				&se_pk_der_size);
		if ((err != S_OK) || !se_pk_der || !se_pk_der_size) {
			fprintf(stderr, "Failed to convert PEM public key to DER (err=%d)\n", err);
			ret = -1;
			goto exit;
		}
		output_buffer(se_pk_der, se_pk_der_size);
		free(se_pk_der);
		break;
	default:
		fprintf(stdout, se_pk_pem);
		break;
	}

exit:
	if (handle)
		security->release(handle);
	if (se_pk_pem)
		free(se_pk_pem);
	if (se_cert_pem)
		free(se_cert_pem);
	artik_release_api_module(security);

	return ret;
}

static int security_chain(int argc, char *argv[])
{
	artik_security_module *security = NULL;
	artik_security_handle handle = NULL;
	artik_error err = S_OK;
	artik_list *chain = NULL;
	int i = 0;
	int ret = 0;
	char cert_name[16] = "ARTIK";

	if (argc > 3)
		strncpy(cert_name, argv[3], sizeof(cert_name));

	security = (artik_security_module *)artik_request_api_module("security");
	if (!security) {
		fprintf(stderr, "Security module is not available\n");
		return -1;
	}

	err = security->request(&handle);
	if (err != S_OK) {
		fprintf(stderr, "Failed to request security instance (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	err = security->get_certificate_pem_chain(handle, cert_name, &chain);
	if (err != S_OK || !chain || !artik_list_size(chain)) {
		fprintf(stderr, "Failed to get CA chain (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	for (i = 0; i < artik_list_size(chain); i++)
		fprintf(stdout, "%s\n", (char *)artik_list_get_by_pos(chain, i)->data);

	artik_list_delete_all(&chain);

exit:
	if (handle)
		security->release(handle);
	artik_release_api_module(security);

	return ret;
}

static int security_rand(int argc, char *argv[])
{
	artik_security_module *security = NULL;
	int ret = 0;
	artik_security_handle handle = NULL;
	artik_error err = S_OK;
	unsigned char *rand_bytes = NULL;
	int num_bytes = 0;
	int i = 0;

	if (argc < 4) {
		fprintf(stderr, "Wrong number of arguments\n");
		usage(argv[1], security_commands);
		return -1;
	}

	security = (artik_security_module *)artik_request_api_module("security");
	if (!security) {
		fprintf(stderr, "Security module is not available\n");
		return -1;
	}

	err = security->request(&handle);
	if (err != S_OK) {
		fprintf(stderr, "Failed to request security instance (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	num_bytes = atoi(argv[3]);
	if (num_bytes > 64) {
		fprintf(stderr, "Num size should be less than or equal to 64\n");
		ret = -1;
		goto exit;
	}

	if (num_bytes < 0) {
		fprintf(stderr, "Uncountable number\n");
		ret = -1;
		goto exit;
	}

	err = security->get_random_bytes(handle, num_bytes, &rand_bytes);
	if (err != S_OK) {
		fprintf(stderr, "Failed to get random bytes (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	for (i = 0; i < num_bytes; i++)
		fprintf(stdout, "%02x ", rand_bytes[i]);

	fprintf(stdout, "\n");

exit:
	if (rand_bytes) {
		free(rand_bytes);
	}

	if (handle)
		security->release(handle);
	artik_release_api_module(security);

	return ret;
}

static int security_serial(int argc, char *argv[])
{
	artik_security_handle handle = NULL;
	int ret = 0;
	artik_error err = S_OK;
	unsigned char *se_cert = NULL;
	unsigned int se_cert_size = 0;
	char *se_cert_pem = NULL;
	unsigned char serial_number[ARTIK_CERT_SN_MAXLEN] = "";
	unsigned int len = ARTIK_CERT_SN_MAXLEN;
	int i = 0;
	artik_security_module *security = NULL;

	security = (artik_security_module *)artik_request_api_module("security");
	if (!security) {
		fprintf(stderr, "Security module is not available\n");
		return -1;
	}

	err = security->request(&handle);
	if (err != S_OK) {
		fprintf(stderr, "Failed to request security instance (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	err = security->get_certificate(handle, ARTIK_DEVICE_CERT_ID,
			ARTIK_SECURITY_CERT_TYPE_PEM,  &se_cert, &se_cert_size);
	if (err != S_OK || !se_cert || !se_cert_size) {
		fprintf(stderr, "Failed to get certificate (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	se_cert_pem = strndup((char *)se_cert, se_cert_size);
	free(se_cert);
	err = security->get_certificate_sn(se_cert_pem, serial_number, &len);
	if (err != S_OK) {
		fprintf(stderr, "Failed to get serial number (err=%d)\n", err);
		ret = -1;
		goto exit;
	}

	for (i = 0; i < (len-1); i++)
		fprintf(stdout, "%02x:", serial_number[i]);

	fprintf(stdout, "%02x\n", serial_number[len-1]);

exit:
	if (handle)
		security->release(handle);
	if (se_cert_pem)
		free(se_cert_pem);
	artik_release_api_module(security);

	return ret;
}

#ifdef CONFIG_BUILD_KERNEL
int main(int argc, FAR char *argv[])
#else
int see_main(int argc, char *argv[])
#endif
{
	return commands_parser(argc, argv, security_commands);
}