text:
using std::shared_ptr;
using std::wstring;
using std::wcout;
using std::endl;
using std::tuple;

void ChunkingProcessor::print(const vector<wstring>& tokens, const vector<wstring>& labels)
{
//	for(size_t i = 0; i < tokens.size(); i++)
//	{
//		wcout << labels[i] << L" ";
//	}
//	wcout << endl;
	ChunkFormattingBrackets format(true);

	for(size_t i = 0; i < tokens.size(); i++)
	{
		wcout << format.FormatWord(tokens[i], labels[i]) << L" ";
	}

	wcout << format.LastSymbol() << endl;
}

ChunkingProcessor::ChunkingProcessor(
    const std::string& modelFile
    , shared_ptr<IDisambiguator> _disambiguator)
{
	chunker = shared_ptr<SyntaxChunker>(new SyntaxChunker(modelFile));
	disambiguator = _disambiguator;
}

//void ChunkingProcessor::Process(
//	const wstring& sentence, vector<wstring>& lemmas,
//    vector<wstring>& tokens, vector<wstring>& stress,
//	vector<wstring>& tags)
//{
//	vector<vector<int>> groups;
//	disambiguator->Disambiguate(
//        sentence, lemmas, tokens,
//        stress, tags, true);
//	vector<wstring> labels = chunker->Parse(sentence, lemmas, tags);
//	labels.erase(labels.begin());
//	LinguisticTools toolbox;
//	print(tokens, labels);
//}

void ChunkingProcessor::Process(
	const wstring& sentence,
	const vector<DisambiguatedData>& disambiguatedData)
{
	vector<vector<int>> groups;
	vector<wstring> lemmas;
	vector<wstring> tags;

	for(size_t i = 0; i < disambiguatedData.size(); i++)
	{
		lemmas.push_back(disambiguatedData[i].lemma);
		tags.push_back(disambiguatedData[i].label);
	}

	vector<wstring> labels = chunker->Parse(sentence, lemmas, tags);
	labels.erase(labels.begin());
	LinguisticTools toolbox;
	vector<wstring> tokens = toolbox.tokenize(sentence);
	print(tokens, labels);
}

ChunkFormattingBrackets :: ChunkFormattingBrackets(bool _markHeads)
{
	prevBIO = PrivateTagset::CHUNK_O;
	markHeads = _markHeads;
}

wstring ChunkFormattingBrackets ::  FormatWord(const wstring& token, const wstring& label)
{
	wstring bio = label;
	wstring prev = prevBIO;
	prevBIO = bio;

	wstring res0;

	if(label == L"BH" || label == L"IH")
	{
		res0 = token;
		res0.append(L"[X]");
	}
	else
	{
		res0 = token;
	}

	if(bio == L"I" || bio == L"IH")
	{
		return res0;
	}

	if(bio == L"B" || bio == L"BH")
	{
		if(prev != L"O")
		{
			return wstring(L"] [").append(res0);
		}
		else
		{
			return wstring(L"[").append(res0);
		}
	}

	if(prev != L"O")
	{
		return wstring(L"] ").append(res0);
	}

	return res0;
}

wstring ChunkFormattingBrackets :: LastSymbol()
{
	wstring res0 = L"";
	if (prevBIO != L"O")
		res0 = L"]";
	prevBIO = L"O";
	return res0;
}


text:
<?xml version="1.0" encoding="utf-8"?>

Viewing Link Tracking Report

How to view tracking information for a tracked link within the TelerikEditorProvider for the RTE. In additional the tracking report displays data for the selected date range.

Select the linked text or object, and then click the  Hyperlink Manager (CTRL + K)  button - OR - Right-click on the linked item and select Properties... from the drop down list. This opens the Hyperlink Manager with the Hyperlink tab selected.

Select the Tracking tab.

In the Link Info section, the following information is displayed:

URL: The URL for this link. E.g. http://awesomecycles.biz/Store.aspx

Created: The date this link was created. 12/22/2010 8:42:27 AM

Tracking URL: The tracking URL for this link. E.g. http://awesomecycles.biz/LinkClick.aspx?link=63&tabid=41&mid=386

Clicks: The number of times this link has been clicked.

Last Click: The date and time when the link was last clicked.

In the Tracking Report section, complete the following to view the report:

At Start Date, click the Calendar button. This displays the current month with today's date highlighted. Select a new date if required. <MadCap:xref href="../../../Calendar/Working with the Calendar.html">See "Working with the Calendar"</MadCap:xref>

At End Date, click the Calendar button. This displays the current month with today's date highlighted. Select a new date if required.

Click the Display button. This displays the date and time when the link was clicked and the first and last name of authenticated users.

Click the Cancel button to close the Hyperlink Manager.

redpajama_set_name: RedPajamaGithub


text:
namespace Stripe.TestHelpers.Treasury
{
    public class OutboundTransferPostOptions : BaseOptions
    {
    }
}


text:
SimModel::SimModel(Sim *sim, QImage *image):
    Drawable(),
    sim(sim),
    image(image) {

    Drawer::getInstance()->addDrawable(this);
}

SimModel::~SimModel() {
    Drawer::getInstance()->delDrawable(this);

    delete image;
}

void SimModel::draw() {
    QPainter painter(paintDevice);
    Position *position = sim->getPosition();
    Direction *direction = sim->getDirection();

    QTransform transform;

    transform.rotate(direction->degrees());
    QImage temp(image->transformed(transform));
    painter.drawImage(position->getX() - (temp.width() / 2), position->getY() - (temp.height() / 2), temp);
}


text:
<?php

namespace PHPExiftool\Driver\Tag\H264;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class Focus extends AbstractTag
{

    protected $Id = 3;

    protected $Name = 'Focus';

    protected $FullName = 'H264::Camera1';

    protected $GroupName = 'H264';

    protected $g0 = 'H264';

    protected $g1 = 'H264';

    protected $g2 = 'Camera';

    protected $Type = 'int8u';

    protected $Writable = false;

    protected $Description = 'Focus';
}


text:
namespace OpenVanilla {
    using namespace std;

    // we encourage people to do the real initialization in initialize
    class OVOFHanConvertPackage : public OVModulePackage {
    public:
        virtual size_t numberOfModules(OVLoaderService*)
        {
            #ifdef OVOFHANCONVERT_USE_TC2SCONLY
            return 1;
            #else
            return 2;
            #endif
        }

        virtual OVModule* moduleAtIndex(size_t index, OVLoaderService*)
        {
            switch(index) {
            case 0:
                return new OVOFHanConvert(true);

            #ifndef OVOFHANCONVERT_USE_TC2SCONLY
            case 1:
                return new OVOFHanConvert(false);
            #endif
            }
            return 0;
        }
    };

};

#endif


text:
{% extends "admin/base.html" %}
{% load i18n %}

{% block title %}{{ title }} | {% trans 'Farnsworth Administration' %}{% endblock %}

{% block branding %}

{% trans 'Farnsworth Administration' %}

{% endblock %}

{% block nav-global %}{% endblock %}


text:
#pragma once

#include "caney/memory/buffer.hpp"
#include "caney/std/optional.hpp"

#include "file_size.hpp"
#include "internal.hpp"

#include <system_error>

__CANEY_STREAMSV1_BEGIN

class file_handle;

// TODO: this probably requires some log concept. use boost logging?

/**
 * @brief represents a chunk of a file on disk
 */
class file_chunk {
public:
	explicit file_chunk() = default;
	/** @brief construct @ref file_chunk from handle, offset and length */
	explicit file_chunk(std::shared_ptr<file_handle> handle, file_size offset, file_size length);

	/** @brief size of chunk in bytes */
	file_size bytes() const {
		return m_length;
	}

	/** @brief split chunk; return first "bytes" in new @ref file_chunk, remainder is kept in current chunk */
	file_chunk split(file_size bytes);
	/** @brief like split, but does not return anything; i.e. removes first "bytes" of data */
	void remove(file_size bytes);

	/** @brief direct buffer access is not available */
	caney::nullopt_t get_const_buffer() const {
		return caney::nullopt;
	}

	/** @brief get offset of start of the current chunk in file */
	file_size get_offset() const {
		return m_offset;
	}

	/** @brief get file handle */
	std::shared_ptr<file_handle> const& get_handle() const {
		return m_handle;
	}

	/** @brief (possibly asynchronous???) read some data from the chunk. TBD. */
	void read(std::size_t max_size, std::function<void(std::error_code ec, std::shared_ptr<memory::unique_buf> buffer)> callback);

private:
	std::shared_ptr<file_handle> m_handle;
	file_size m_offset;
	file_size m_length; // relative to offset
};

__CANEY_STREAMSV1_END


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:state_pressed="true" android:drawable="@drawable/btn_press"/>
    <item android:state_focused="true" android:drawable="@drawable/btn_active"/>
    <item android:state_selected="true" android:drawable="@drawable/btn_active"/>
    <item android:state_pressed="false" android:drawable="@drawable/btn_normal"/>
    <item android:state_focused="false" android:drawable="@drawable/btn_normal"/>
    <item android:state_selected="false" android:drawable="@drawable/btn_normal"/>
</selector>


text:
<?xml version="1.0" encoding="UTF-8"?>
    <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
            id="cordova-plugin-forcetouch" version="1.2.2">
        <name>Force Touch</name>
        <description>Apache Cordova @ Apple iOS Force Touch Plugin</description>
        <license>Apache 2.0</license>
        <keywords>cordova,apple,ios,force touch,3dtouch</keywords>
        <js-module src="ForceTouch.js" name="ForceTouch">
            <clobbers target="ForceTouch" />
        </js-module>
        <platform name="ios">
            <config-file target="config.xml" parent="/*">
                <feature name="ForceTouch">
                    <param name="ios-package" value="CDVForceTouch"/>
                </feature>
            </config-file>
            <header-file src="src/ios/CDVForceTouch.h" />
            <source-file src="src/ios/CDVForceTouch.m" />
        </platform>
    </plugin>


text:
@extends('layout')

@section('css')
<link rel="stylesheet" href="/css/jquery-ui-smoothness.css">
@stop

@section('javascript')

@stop

@section('content')

{{ $employee->name }}

Phone: {{ $employee->phone }}

Email: {{ $employee->email }}

Position: {{ $employee->position }}

Company: company->id }}">{{ $employee->company->name }}

	id }}/edit" class="btn btn-default">Edit

Contacts

				Date
				Type
				Description

			@foreach($employee->contacts->sortByDesc('date') as $contact)

					{{ $contact->date }}
					{{ $contact->type }}
					{{ nl2br(e($contact->description)) }}
					id . '/edit') }}">Edit

			@endforeach

				{{ Form::open(array('url' => 'contacts', 'class' => 'form')) }}

					<input id="date" name="date" type="text" value="{{ Input::old('date') }}" class="form-control" />
					{{ Form::text('type', Input::old('type'), array('class' => 'form-control')) }}
					{{ Form::textarea('description', Input::old('description'), array('class' => 'form-control')) }}
					{{ Form::hidden('employee_id', $employee->id) }}{{ Form::submit('Add contact', array('class' => 'btn btn-primary')) }}

				{{ Form::token() . Form::close() }}

@stop


text:
package drone_slam.base.configuration;

import drone_slam.base.command.CommandManager;
import drone_slam.base.command.ControlCommand;
import drone_slam.base.command.ControlMode;
import drone_slam.base.exception.ConfigurationException;
import drone_slam.base.exception.IExceptionListener;
import drone_slam.base.manager.AbstractTCPManager;
import drone_slam.base.utils.ARDroneUtils;

import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.SocketTimeoutException;

// TODO consider to connect to the control port permanently
public class ConfigurationManager extends AbstractTCPManager {
    private IExceptionListener excListener;

    private CommandManager manager = null;

    public ConfigurationManager(InetAddress inetaddr, CommandManager manager, IExceptionListener excListener) {
        super(inetaddr);
        this.manager = manager;
        this.excListener = excListener;
    }

    public void run() {
        try {
            connect(ARDroneUtils.CONTROL_PORT);
        } catch (Exception exc) {
            exc.printStackTrace();
            excListener.exeptionOccurred(new ConfigurationException(exc));
        }
    }

    /**
     * Note: not thread-safe!
     */
    private String getControlCommandResult(ControlMode p1, int p2, final ConfigurationListener listener) {
        manager.setCommand(new ControlCommand(p1, p2));

        Thread t = new Thread() {

            public void run() {
                try {

                    InputStream inputStream = getInputStream();
                    // TODO better getInputStream throw IOException to fail
                    if (inputStream != null) {
                        byte[] buf = new byte[1024];
                        int n = 0;
                        StringBuilder builder = new StringBuilder();
                        try {
                            while ((n = inputStream.read(buf)) != -1) {
                                // output: multiple rows of "Parameter = value"
                                builder.append(new String(buf, 0, n, "ASCII"));
                            }
                        } catch (SocketTimeoutException e) {
                            // happens if the last byte happens to coincide with the end of the buffer
                        }
                        String s = builder.toString();
                        if (listener != null) {
                            listener.result(s);
                        }
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        };
        t.start();
        return "";

    }

    public String getCustomCofigurationIds(ConfigurationListener listener) {
        String s = getControlCommandResult(ControlMode.CUSTOM_CFG_GET, 0, listener);
        return s;
    }

    public String getPreviousRunLogs(ConfigurationListener listener) {
        String s = getControlCommandResult(ControlMode.LOGS_GET, 0, listener);
        return s;
    }

    public String getConfiguration(ConfigurationListener listener) {
        String s = getControlCommandResult(ControlMode.CFG_GET, 0, listener);
        return s;
    }

}


text:
package app.model;

import org.hibernate.validator.constraints.NotEmpty;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Pavel on 05.02.2018.
 */
@Entity
@Table(name = "genre")
public class Genre {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @NotEmpty
    @Column(name = "name_book", nullable = false)
    private String name;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "genre")
    private List<Book> books = new ArrayList<>();

    public Genre() {
    }

    public Genre(String name, List<Book> books) {
        this.name = name;
        this.books = books;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Genre genre = (Genre) o;

        if (name != null ? !name.equals(genre.name) : genre.name != null) return false;
        return books != null ? books.equals(genre.books) : genre.books == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (books != null ? books.hashCode() : 0);
        return result;
    }

    public Long getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }
}


text:
describe :struct_inspect, shared: true do
  it "returns a string representation without the class name for anonymous structs" do
    Struct.new(:a).new("").send(@method).should == '#<struct a="">'
  end
end


text:
package com.intellij.java.propertyBased;

import com.intellij.java.psi.formatter.java.AbstractJavaFormatterTest;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.projectRoots.impl.JavaAwareProjectJdkTableImpl;
import com.intellij.psi.PsiFile;
import com.intellij.testFramework.LightProjectDescriptor;
import com.intellij.testFramework.SkipSlowTestLocally;
import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase;
import com.intellij.testFramework.propertyBased.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jetCheck.Generator;
import org.jetbrains.jetCheck.ImperativeCommand;

import java.util.function.Function;
import java.util.function.Supplier;

/**
 * @author peter
 */
@SkipSlowTestLocally
public class JavaCodeInsightSanityTest extends LightCodeInsightFixtureTestCase {

  @Override
  protected void tearDown() throws Exception {
    // remove jdk if it was created during highlighting to avoid leaks
    try {
      JavaAwareProjectJdkTableImpl.removeInternalJdkInTests();
    }
    finally {
      super.tearDown();
    }
  }

  @NotNull
  @Override
  protected LightProjectDescriptor getProjectDescriptor() {
    return JAVA_9;
  }

  public void testRandomActivity() {
    MadTestingUtil.enableAllInspections(getProject(), getTestRootDisposable());
    Function<PsiFile, Generator<? extends MadTestingAction>> fileActions = file ->
      Generator.anyOf(InvokeIntention.randomIntentions(file, new JavaIntentionPolicy()),
                      InvokeCompletion.completions(file, new JavaCompletionPolicy()),
                      Generator.constant(new StripTestDataMarkup(file)),
                      DeleteRange.psiRangeDeletions(file));
    ImperativeCommand.checkScenarios(actionsOnJavaFiles(fileActions));
  }

  public void testPreserveComments() {
    boolean oldSettings = AbstractJavaFormatterTest.getJavaSettings().ENABLE_JAVADOC_FORMATTING;
    try {
      AbstractJavaFormatterTest.getJavaSettings().ENABLE_JAVADOC_FORMATTING = false;
      MadTestingUtil.enableAllInspections(getProject(), getTestRootDisposable());
      Function<PsiFile, Generator<? extends MadTestingAction>> fileActions = file ->
        Generator.anyOf(InvokeIntention.randomIntentions(file, new JavaCommentingStrategy()),
                        InsertLineComment.insertComment(file, "//simple end comment\n"));
      ImperativeCommand.checkScenarios(actionsOnJavaFiles(fileActions));
    }
    finally {
      AbstractJavaFormatterTest.getJavaSettings().ENABLE_JAVADOC_FORMATTING = oldSettings;
    }
  }

  @NotNull
  private Supplier<ImperativeCommand> actionsOnJavaFiles(Function<PsiFile, Generator<? extends MadTestingAction>> fileActions) {
    return MadTestingUtil.commandsOnFileContents(myFixture, PathManager.getHomePath(), f -> f.getName().endsWith(".java"), fileActions);
  }

  public void testReparse() {
    ImperativeCommand.checkScenarios(actionsOnJavaFiles(MadTestingUtil::randomEditsWithReparseChecks));
  }
}


text:
module Mastermind
	class Player
		attr_accessor :name, :side
		def initialize(input = {})
			@name = input.fetch(:name)
			@side = input.fetch(:side)
		end
	end
end


text:
package esme

import (
	"context"
	"fmt"

	"github.com/sacloud/libsacloud/v2/sacloud"
)

func (s *Service) Logs(req *LogsRequest) ([]*sacloud.ESMELogs, error) {
	return s.LogsWithContext(context.Background(), req)
}

func (s *Service) LogsWithContext(ctx context.Context, req *LogsRequest) ([]*sacloud.ESMELogs, error) {
	if err := req.Validate(); err != nil {
		return nil, err
	}
	client := sacloud.NewESMEOp(s.caller)
	_, err := client.Read(ctx, req.ID)
	if err != nil {
		return nil, fmt.Errorf("reading ESME[%s] failed: %s", req.ID, err)
	}

	return client.Logs(ctx, req.ID)
}


text:
package org.apache.flink.client;

import org.apache.flink.api.common.Plan;
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.io.DiscardingOutputFormat;
import org.apache.flink.client.program.ProgramInvocationException;
import org.apache.flink.configuration.Configuration;
import org.junit.BeforeClass;
import org.junit.Test;

import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.Collections;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;

public class RemoteExecutorHostnameResolutionTest {

	private static final String nonExistingHostname = "foo.bar.com.invalid";
	private static final int port = 14451;

	@BeforeClass
	public static void check() {
		checkPreconditions();
	}

	@Test
	public void testUnresolvableHostname1() {

		RemoteExecutor exec = new RemoteExecutor(nonExistingHostname, port);
		try {
			exec.executePlan(getProgram());
			fail("This should fail with an ProgramInvocationException");
		}
		catch (ProgramInvocationException e) {
			// that is what we want!
			assertTrue(e.getCause() instanceof UnknownHostException);
		}
		catch (Exception e) {
			System.err.println("Wrong exception!");
			e.printStackTrace();
			fail(e.getMessage());
		}
	}

	@Test
	public void testUnresolvableHostname2() {

		InetSocketAddress add = new InetSocketAddress(nonExistingHostname, port);
		RemoteExecutor exec = new RemoteExecutor(add, new Configuration(),
				Collections.<URL>emptyList(), Collections.<URL>emptyList());
		try {
			exec.executePlan(getProgram());
			fail("This should fail with an ProgramInvocationException");
		}
		catch (ProgramInvocationException e) {
			// that is what we want!
			assertTrue(e.getCause() instanceof UnknownHostException);
		}
		catch (Exception e) {
			System.err.println("Wrong exception!");
			e.printStackTrace();
			fail(e.getMessage());
		}
	}

	private static Plan getProgram() {
		ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
		env.fromElements(1, 2, 3).output(new DiscardingOutputFormat<Integer>());
		return env.createProgramPlan();
	}

	private static void checkPreconditions() {
		// the test can only work if the invalid URL cannot be resolves
		// some internet providers resolve unresolvable URLs to navigational aid servers,
		// voiding this test.
		boolean throwsException;
		try {
			//noinspection ResultOfMethodCallIgnored
			InetAddress.getByName(nonExistingHostname);
			throwsException = false;
		}
		catch (UnknownHostException e) {
			throwsException = true;
		}
		assumeTrue(throwsException);
	}
}


text:
package ast

import (
	"fmt"
	"path/filepath"

	"github.com/elliotchance/c2go/util"
)

// Position is type of position in source code
type Position struct {
	File      string // The relative or absolute file path.
	Line      int    // Start line
	LineEnd   int    // End line
	Column    int    // Start column
	ColumnEnd int    // End column

	// This is the original string that was converted. This is used for
	// debugging. We could derive this value from the other properties to save
	// on a bit of memory, but let worry about that later.
	StringValue string
}

// GetSimpleLocation - return a string like : "file:line" in
// according to position
// Example : " /tmp/1.c:200 "
func (p Position) GetSimpleLocation() (loc string) {
	file := p.File
	if f, err := filepath.Abs(p.File); err != nil {
		file = f
	}
	return fmt.Sprintf(" %s:%d ", file, p.Line)
}

func NewPositionFromString(s string) Position {
	if s == "<invalid sloc>" || s == "" {
		return Position{}
	}

	re := util.GetRegex(`^col:(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Column:      util.Atoi(groups[1]),
		}
	}

	re = util.GetRegex(`^col:(\d+), col:(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Column:      util.Atoi(groups[1]),
			ColumnEnd:   util.Atoi(groups[2]),
		}
	}

	re = util.GetRegex(`^line:(\d+), line:(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Line:        util.Atoi(groups[1]),
			LineEnd:     util.Atoi(groups[2]),
		}
	}

	re = util.GetRegex(`^col:(\d+), line:(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Column:      util.Atoi(groups[1]),
			Line:        util.Atoi(groups[2]),
		}
	}

	re = util.GetRegex(`^line:(\d+):(\d+), line:(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Line:        util.Atoi(groups[1]),
			Column:      util.Atoi(groups[2]),
			LineEnd:     util.Atoi(groups[3]),
			ColumnEnd:   util.Atoi(groups[4]),
		}
	}

	re = util.GetRegex(`^col:(\d+), line:(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Column:      util.Atoi(groups[1]),
			LineEnd:     util.Atoi(groups[2]),
			ColumnEnd:   util.Atoi(groups[3]),
		}
	}

	re = util.GetRegex(`^line:(\d+):(\d+), col:(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Line:        util.Atoi(groups[1]),
			Column:      util.Atoi(groups[2]),
			ColumnEnd:   util.Atoi(groups[3]),
		}
	}

	re = util.GetRegex(`^line:(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Line:        util.Atoi(groups[1]),
			Column:      util.Atoi(groups[2]),
		}
	}

	// This must be below all of the others.
	re = util.GetRegex(`^((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+), col:(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			File:        groups[1],
			Line:        util.Atoi(groups[2]),
			Column:      util.Atoi(groups[3]),
			ColumnEnd:   util.Atoi(groups[4]),
		}
	}

	re = util.GetRegex(`^((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+), line:(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			File:        groups[1],
			Line:        util.Atoi(groups[2]),
			Column:      util.Atoi(groups[3]),
			LineEnd:     util.Atoi(groups[4]),
			ColumnEnd:   util.Atoi(groups[5]),
		}
	}

	re = util.GetRegex(`^((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			File:        groups[1],
			Line:        util.Atoi(groups[2]),
			Column:      util.Atoi(groups[3]),
		}
	}

	re = util.GetRegex(`^((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			File:        groups[1],
			Line:        util.Atoi(groups[2]),
			Column:      util.Atoi(groups[3]),
		}
	}

	re = util.GetRegex(`^col:(\d+), ((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			Column:      util.Atoi(groups[1]),
		}
	}

	re = util.GetRegex(`^((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+), ((?:[a-zA-Z]\:)?[^:]+):(\d+):(\d+)$`)
	if groups := re.FindStringSubmatch(s); len(groups) > 0 {
		return Position{
			StringValue: s,
			File:        groups[1],
			Line:        util.Atoi(groups[2]),
			Column:      util.Atoi(groups[3]),
			LineEnd:     util.Atoi(groups[5]),
			ColumnEnd:   util.Atoi(groups[6]),
		}
	}

	panic("unable to understand position '" + s + "'")
}

func mergePositions(p1, p2 Position) Position {
	if p2.File != "" {
		p1.File = p2.File
		p1.Line = 0
		p1.LineEnd = 0
		p1.Column = 0
		p1.ColumnEnd = 0
	}

	if p2.Line != 0 {
		p1.Line = p2.Line
		p1.LineEnd = 0
	}

	if p2.LineEnd != 0 {
		p1.LineEnd = p2.LineEnd
	}

	if p2.Column != 0 {
		p1.Column = p2.Column
		p1.ColumnEnd = 0
	}

	if p2.ColumnEnd != 0 {
		p1.ColumnEnd = p2.ColumnEnd
	}

	return p1
}

var pos Position

// PositionBuiltIn - default value for fix position
var PositionBuiltIn = "<built-in>"

func FixPositions(nodes []Node) {
	pos = Position{File: PositionBuiltIn}
	fixPositions(nodes)
}

func fixPositions(nodes []Node) {
	for _, node := range nodes {
		if node != nil {
			pos = mergePositions(pos, node.Position())
			setPosition(node, pos)
			fixPositions(node.Children())
		}
	}
}

func setPosition(node Node, position Position) {
	switch n := node.(type) {
	case *AlignedAttr:
		n.Pos = position
	case *AllocSizeAttr:
		n.Pos = position
	case *AlwaysInlineAttr:
		n.Pos = position
	case *ArraySubscriptExpr:
		n.Pos = position
	case *AsmLabelAttr:
		n.Pos = position
	case *AvailabilityAttr:
		n.Pos = position
	case *BinaryOperator:
		n.Pos = position
	case *BlockCommandComment:
		n.Pos = position
	case *BreakStmt:
		n.Pos = position
	case *C11NoReturnAttr:
		n.Pos = position
	case *CallExpr:
		n.Pos = position
	case *CaseStmt:
		n.Pos = position
	case *CharacterLiteral:
		n.Pos = position
	case *CompoundStmt:
		n.Pos = position
	case *ConditionalOperator:
		n.Pos = position
	case *ConstAttr:
		n.Pos = position
	case *ConstantExpr:
		n.Pos = position
	case *ContinueStmt:
		n.Pos = position
	case *CompoundAssignOperator:
		n.Pos = position
	case *CompoundLiteralExpr:
		n.Pos = position
	case *CStyleCastExpr:
		n.Pos = position
	case *DeclRefExpr:
		n.Pos = position
	case *DeclStmt:
		n.Pos = position
	case *DefaultStmt:
		n.Pos = position
	case *DeprecatedAttr:
		n.Pos = position
	case *DisableTailCallsAttr:
		n.Pos = position
	case *DoStmt:
		n.Pos = position
	case *EmptyDecl:
		n.Pos = position
	case *EnumConstantDecl:
		n.Pos = position
	case *EnumDecl:
		n.Pos = position
	case *FieldDecl:
		n.Pos = position
	case *FloatingLiteral:
		n.Pos = position
	case *FormatAttr:
		n.Pos = position
	case *FormatArgAttr:
		n.Pos = position
	case *FullComment:
		n.Pos = position
	case *FunctionDecl:
		n.Pos = position
	case *ForStmt:
		n.Pos = position
	case *GCCAsmStmt:
		n.Pos = position
	case *HTMLStartTagComment:
		n.Pos = position
	case *HTMLEndTagComment:
		n.Pos = position
	case *GotoStmt:
		n.Pos = position
	case *IfStmt:
		n.Pos = position
	case *ImplicitCastExpr:
		n.Pos = position
	case *ImplicitValueInitExpr:
		n.Pos = position
	case *IndirectFieldDecl:
		n.Pos = position
	case *InitListExpr:
		n.Pos = position
	case *InlineCommandComment:
		n.Pos = position
	case *IntegerLiteral:
		n.Pos = position
	case *LabelStmt:
		n.Pos = position
	case *MallocAttr:
		n.Pos = position
	case *MaxFieldAlignmentAttr:
		n.Pos = position
	case *MemberExpr:
		n.Pos = position
	case *ModeAttr:
		n.Pos = position
	case *NoAliasAttr:
		n.Pos = position
	case *NoInlineAttr:
		n.Pos = position
	case *NoThrowAttr:
		n.Pos = position
	case *NotTailCalledAttr:
		n.Pos = position
	case *NonNullAttr:
		n.Pos = position
	case *OffsetOfExpr:
		n.Pos = position
	case *PackedAttr:
		n.Pos = position
	case *ParagraphComment:
		n.Pos = position
	case *ParamCommandComment:
		n.Pos = position
	case *ParenExpr:
		n.Pos = position
	case *ParmVarDecl:
		n.Pos = position
	case *PredefinedExpr:
		n.Pos = position
	case *PureAttr:
		n.Pos = position
	case *RecordDecl:
		n.Pos = position
	case *RestrictAttr:
		n.Pos = position
	case *ReturnStmt:
		n.Pos = position
	case *ReturnsTwiceAttr:
		n.Pos = position
	case *SentinelAttr:
		n.Pos = position
	case *StmtExpr:
		n.Pos = position
	case *StringLiteral:
		n.Pos = position
	case *SwitchStmt:
		n.Pos = position
	case *TextComment:
		n.Pos = position
	case *TransparentUnionAttr:
		n.Pos = position
	case *TypedefDecl:
		n.Pos = position
	case *UnaryExprOrTypeTraitExpr:
		n.Pos = position
	case *UnaryOperator:
		n.Pos = position
	case *UnusedAttr:
		n.Pos = position
	case *VAArgExpr:
		n.Pos = position
	case *VarDecl:
		n.Pos = position
	case *VerbatimBlockComment:
		n.Pos = position
	case *VerbatimBlockLineComment:
		n.Pos = position
	case *VerbatimLineComment:
		n.Pos = position
	case *VisibilityAttr:
		n.Pos = position
	case *WarnUnusedResultAttr:
		n.Pos = position
	case *WeakAttr:
		n.Pos = position
	case *WhileStmt:
		n.Pos = position
	case *TypedefType, *Typedef, *TranslationUnitDecl, *RecordType, *Record,
		*QualType, *PointerType, *DecayedType, *ParenType,
		*IncompleteArrayType, *FunctionNoProtoType, *FunctionProtoType,
		*EnumType, *Enum, *ElaboratedType, *ConstantArrayType, *BuiltinType,
		*ArrayFiller, *Field, *AttributedType:

		// These do not have positions so they can be ignored.
	default:
		panic(fmt.Sprintf("unknown node type: %+#v", node))
	}
}


text:
package org.redisson;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.Test;
import org.redisson.api.BatchOptions;
import org.redisson.api.RBatch;
import org.redisson.api.RBatchReactive;
import org.redisson.api.RBucket;
import org.redisson.api.RBucketReactive;
import org.redisson.api.RMapCacheReactive;
import org.redisson.api.RSetReactive;
import org.redisson.api.RedissonClient;
import org.redisson.api.RedissonReactiveClient;
import org.redisson.codec.JsonJacksonCodec;
import org.redisson.config.Config;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 *
 * @author Rui Gu (https://github.com/jackygurui)
 */
public class RedissonReferenceReactiveTest extends BaseReactiveTest {

    @Test
    public void test() throws InterruptedException {
        RBucketReactive<Object> b1 = redisson.getBucket("b1");
        RBucketReactive<Object> b2 = redisson.getBucket("b2");
        RBucketReactive<Object> b3 = redisson.getBucket("b3");
        sync(b2.set(b3));
        sync(b1.set(redisson.getBucket("b2")));
        assertTrue(sync(b1.get()) instanceof RBucketReactive);
        assertEquals("b3", ((RBucketReactive) sync(((RBucketReactive) sync(b1.get())).get())).getName());
        RBucketReactive<Object> b4 = redisson.getBucket("b4");
        sync(b4.set(redisson.getMapCache("testCache")));
        assertTrue(sync(b4.get()) instanceof RMapCacheReactive);
        sync(((RMapCacheReactive) sync(b4.get())).fastPut(b1, b2));
        assertEquals("b2", ((RBucketReactive) sync(((RMapCacheReactive) sync(b4.get())).get(b1))).getName());
    }

    @Test
    public void testBatch() throws InterruptedException {
        RBatchReactive batch = redisson.createBatch(BatchOptions.defaults());
        RBucketReactive<Object> b1 = batch.getBucket("b1");
        RBucketReactive<Object> b2 = batch.getBucket("b2");
        RBucketReactive<Object> b3 = batch.getBucket("b3");
        b2.set(b3);
        b1.set(b2);
        b3.set(b1);
        sync(batch.execute());

        batch = redisson.createBatch(BatchOptions.defaults());
        batch.getBucket("b1").get();
        batch.getBucket("b2").get();
        batch.getBucket("b3").get();
        List<RBucketReactive> result = (List<RBucketReactive>) sync(batch.execute()).getResponses();
        assertEquals("b2", result.get(0).getName());
        assertEquals("b3", result.get(1).getName());
        assertEquals("b1", result.get(2).getName());
    }

    @Test
    public void testReactiveToNormal() throws InterruptedException {
        RBatchReactive batch = redisson.createBatch(BatchOptions.defaults());
        RBucketReactive<Object> b1 = batch.getBucket("b1");
        RBucketReactive<Object> b2 = batch.getBucket("b2");
        RBucketReactive<Object> b3 = batch.getBucket("b3");
        b2.set(b3);
        b1.set(b2);
        b3.set(b1);
        sync(batch.execute());

        RedissonClient lredisson = Redisson.create(redisson.getConfig());
        RBatch b = lredisson.createBatch(BatchOptions.defaults());
        b.getBucket("b1").getAsync();
        b.getBucket("b2").getAsync();
        b.getBucket("b3").getAsync();
        List<RBucket> result = (List<RBucket>)b.execute().getResponses();
        assertEquals("b2", result.get(0).getName());
        assertEquals("b3", result.get(1).getName());
        assertEquals("b1", result.get(2).getName());

        lredisson.shutdown();
    }

    @Test
    public void shouldUseDefaultCodec() throws Exception {
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
        objectMapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
        JsonJacksonCodec codec = new JsonJacksonCodec(objectMapper);

        Config config = new Config();
        config.setCodec(codec);
        config.useSingleServer()
                .setAddress(RedisRunner.getDefaultRedisServerBindAddressAndPort());

        RedissonReactiveClient reactive = Redisson.createReactive(config);
        RBucketReactive<Object> b1 = reactive.getBucket("b1");
        sync(b1.set(new MyObject()));
        RSetReactive<Object> s1 = reactive.getSet("s1");
        assertTrue(sync(s1.add(b1)));
        assertTrue(codec == b1.getCodec());

        Config config1 = new Config();
        config1.setCodec(codec);
        config1.useSingleServer()
                .setAddress(RedisRunner.getDefaultRedisServerBindAddressAndPort());
        RedissonReactiveClient reactive1 = Redisson.createReactive(config1);

        RSetReactive<RBucketReactive> s2 = reactive1.getSet("s1");
        RBucketReactive<MyObject> b2 = sync(s2.iterator(1));
        assertTrue(codec == b2.getCodec());
        assertTrue(sync(b2.get()) instanceof MyObject);
        reactive.shutdown();
        reactive1.shutdown();
    }

    public static class MyObject {

        private String name;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

    }
}


text:
using System.Collections.Generic;

namespace KeyPay.DomainModels.V2.PayRun
{
    public class PayRunTotalResponse
    {
        public int PayRunId { get; set; }
        public Dictionary<string, PayRunTotalModel> PayRunTotals { get; set; }
    }
}


text:
<?php
function SYNTAX_this($template) {
global $THIS__result_index;
$template=trim(Syntax($template));
return $THIS__result_index[$template];
}


text:
# frozen_string_literal: true
require File.dirname(__FILE__) + "/spec_helper"

RSpec.describe YARD::Handlers::C::ClassHandler do
  it "registers classes" do
    parse_init 'cFoo = rb_define_class("Foo", rb_cObject);'
    expect(Registry.at('Foo').type).to eq :class
  end

  it "registers classes under namespaces" do
    parse_init <<-EOF
      cBar = rb_define_class("Bar", rb_cObject);
      cFoo = rb_define_class_under( cBar, "Foo", rb_cBaz );
    EOF
    expect(Registry.at('Bar::Foo').type).to eq :class
    expect(Registry.at('Bar::Foo').superclass.path).to eq 'Baz'
  end

  it "remembers symbol defined with class" do
    parse_init(<<-eof)
      cXYZ = rb_define_class("Foo", rb_cObject);
      rb_define_method(cXYZ, "bar", bar, 0);
    eof
    expect(Registry.at('Foo').type).to eq :class
    expect(Registry.at('Foo#bar')).not_to be nil
  end

  it "looks up superclass symbol name" do
    parse_init(<<-eof)
      cXYZ = rb_define_class("Foo", rb_cObject);
      cBar = rb_define_class("Bar", cXYZ);
    eof
    expect(Registry.at('Bar').superclass).to eq Registry.at('Foo')
  end

  it "uses superclass symbol name as proxy if not found" do
    parse_init(<<-eof)
      // cXYZ = rb_define_class("Foo", rb_cObject);
      cBar = rb_define_class("Bar", cXYZ);
    eof
    expect(Registry.at('Bar').superclass).to eq P('XYZ')
  end

  it "does not associate declaration comments as class docstring" do
    parse_init(<<-eof)
      /* Docstring! */
      cFoo = rb_define_class("Foo", cObject);
    eof
    expect(Registry.at('Foo').docstring).to be_blank
  end

  it "associates a file with the declaration" do
    parse_init(<<-eof)
      cFoo = rb_define_class("Foo", cObject);
    eof
    expect(Registry.at('Foo').file).to eq '(stdin)'
    expect(Registry.at('Foo').line).to eq 2
  end

  it "properly handles Proxy superclasses" do
    parse_init <<-eof
      mFoo = rb_define_module("Foo");
      cBar = rb_define_class_under(mFoo, "Bar", rb_cBar);
    eof
    expect(Registry.at('Foo::Bar').type).to eq :class
    expect(Registry.at('Foo::Bar').superclass).to eq P('Bar')
    expect(Registry.at('Foo::Bar').superclass.type).to eq :class
  end

  it "resolves namespace variable names across multiple files" do
    parse_multi_file_init(
      'cBar = rb_define_class_under(cFoo, "Bar", rb_cObject);',
      'cFoo = rb_define_class("Foo", rb_cObject);'
    )

    expect(Registry.at('Foo::Bar').type).to eq :class
  end
end


text:
class PostsController < ApplicationController
  before_action :login_required, :no_locked_required, except: [:index, :show, :search]
  before_action :find_post, only: [:edit, :update, :trash]

  def index
    @posts = Post.includes(:user, :category).page(params[:page])

    if params[:category_id]
      @category = Category.where(:id => params[:category_id]).first!
      @posts = @posts.where(category: @category)
    end

    # Set default tab
    unless %w(hot newest).include? params[:tab]
      params[:tab] = 'hot'
    end

    case params[:tab]
    when 'hot'
      @posts = @posts.order(hot: :desc)
    when 'newest'
      @posts = @posts.order(id: :desc)
    end
  end

  def search
    @posts = Post.search(
      query: {
        multi_match: {
          query: params[:q].to_s,
          fields: ['title', 'body']
        }
      },
      filter: {
        term: {
          trashed: false
        }
      }
    ).page(params[:page]).records
  end

  def show
    @post = Post.find params[:id]

    if params[:comment_id] and comment = @post.comments.find_by(id: params.delete(:comment_id))
      params[:page] = comment.page
    end

    @comments = @post.comments.includes(:user).order(id: :asc).page(params[:page])

    respond_to do |format|
      format.html
    end
  end

  def new
    @category = Category.where('lower(slug) = ?', params[:category_id].downcase).first if params[:category_id].present?
    @post = Post.new category: @category
  end

  def create
    @post = current_user.posts.create post_params
  end

  def edit
  end

  def update
    @post.update_attributes post_params
  end

  def trash
    @post.trash
    redirect_via_turbolinks_to posts_path
  end

  private

    def post_params
      params.require(:post).permit(:title, :category_id, :body)
    end

    def find_post
      @post = current_user.posts.find params[:id]
    end
end


text:
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin

install:
	install -m755 vault $(BINDIR)/vault


text:
<?php

namespace Symfony\Component\Console\Event;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Allows to handle throwables thrown while running a command.
 *
 * @author Wouter de Jong <wouter@wouterj.nl>
 */
final class ConsoleErrorEvent extends ConsoleEvent
{
    private $error;
    private $exitCode;

    public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null)
    {
        parent::__construct($command, $input, $output);

        $this->error = $error;
    }

    public function getError(): \Throwable
    {
        return $this->error;
    }

    public function setError(\Throwable $error): void
    {
        $this->error = $error;
    }

    public function setExitCode(int $exitCode): void
    {
        $this->exitCode = $exitCode;

        $r = new \ReflectionProperty($this->error, 'code');
        $r->setAccessible(true);
        $r->setValue($this->error, $this->exitCode);
    }

    public function getExitCode(): int
    {
        return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1);
    }
}


text:
package cn.geekhalo.webtech.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.geekhalo.webtech.dao.UserRoleMapper;
import cn.geekhalo.webtech.pojo.UserRole;
import cn.geekhalo.webtech.service.IUserRoleService;
@Service
public class UserRoleServiceImpl implements IUserRoleService{
	@Autowired
	private UserRoleMapper roleMapper;
	public int deleteByPrimaryKey(String id) {
		return roleMapper.deleteByPrimaryKey(id);
	}

	public int insertSelective(UserRole record) {
		return roleMapper.insertSelective(record);
	}

	public UserRole selectByPrimaryKey(String id) {
		return roleMapper.selectByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(UserRole record) {
		return roleMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public List<UserRole> getAllRoles() {
		return roleMapper.getAllRoles();
	}

	@Override
	public List<String> getRolesByUserId(String id) {
		return roleMapper.getRolesByUserId(id);
	}

	@Override
	public void grantUserRoles(String id,List<UserRole> roles) {
		roleMapper.grantUserRoles(id,roles);
	}

}


text:
<?php
$link = mysqli_connect("localhost",
    "root",
    "lict@2",
    "ftfl");

$query="INSERT INTO `ftfl`.`ictskills` (
                                    `experience_category` ,
                                    `skill_description` ,
                                    `extra_activity`
)
VALUES (
                '".$_POST['experience_category']."', '".$_POST['skill_description']."', '".$_POST['extra_activity']."'
);";

mysqli_query($link, $query);

header('location:list_ict.php');


text:
package com.youlongnet.lulu.ui.frg;

import android.content.DialogInterface;
import android.content.DialogInterface.OnDismissListener;
import android.os.Environment;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.ProgressBar;
import android.widget.Toast;

import com.koushikdutta.async.future.FutureCallback;
import com.koushikdutta.ion.Ion;
import com.koushikdutta.ion.ProgressCallback;
import com.kyleduo.switchbutton.switchbutton.SwitchButton;
import com.software.shell.fab.ActionButton;
import com.youlongnet.lulu.R;
import com.youlongnet.lulu.ui.base.BaseFragment;
import com.youlongnet.lulu.ui.widget.ProgressDrawble;

import java.io.File;

import butterknife.InjectView;
import butterknife.OnClick;
import me.drakeet.materialdialog.MaterialDialog;

public class MyFragment extends BaseFragment {

    @InjectView(R.id.switchbutton)
    SwitchButton mSwitchBtn;
    @InjectView(R.id.dialog)
    Button mBtnDialog;
    @InjectView(R.id.fabbtn)
    ActionButton fab;
    @InjectView(R.id.upload)
    Button upload;
    @InjectView(R.id.pb)
    ProgressBar pb;

    @Override
    public int setLayout() {
        return R.layout.frg_my;
    }

    @Override
    public void initData(View view) {
        /*toogle开关*/
        mSwitchBtn.setOnCheckedChangeListener(new OnCheckedChangeListener() {
            @Override
            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                String res = isChecked ? "选中" : "未选中";
                Toast.makeText(mContext, res, Toast.LENGTH_SHORT).show();
            }
        });
    }

    @Override
    protected void initWidget() {

    }

    @OnClick({R.id.dialog, R.id.loadingProgess, R.id.fab, R.id.upload})
    public void dialog(View v) {
        switch (v.getId()) {
            case R.id.dialog:
                showDialog();
                break;
            case R.id.loadingProgess:
                showLoadProgress();
                break;
            case R.id.fab:
                showFab();
                break;
            case R.id.upload:
                /*先下载文件*/
                Ion.with(mContext)
                        .load("http://b.hiphotos.baidu.com/image/w%3D230/sign=f84406c4554e9258a63481edac83d1d1/fd039245d688d43f76f37f527e1ed21b0ef43b3c.jpg")
                        .write(new File(Environment.getExternalStorageDirectory(), "temp.jpg"))
                        .setCallback(new FutureCallback<File>() {
                            @Override
                            public void onCompleted(Exception e, File file) {
                                if (file != null) {
                                    uploadTest(file);
                                }
                            }
                        });

        }
    }

    private void uploadTest(File file) {
        Ion.with(mContext)
                .load("http://115.47.55.60/Upload.aspx")
                .uploadProgressBar(pb)
                .uploadProgressHandler(new ProgressCallback() {
                    @Override
                    public void onProgress(long downloaded, long total) {
                        upload.setText("" + downloaded + " / " + total);
                    }
                })
                .setMultipartFile("image", file)
                .asString()
                .setCallback(new FutureCallback<String>() {

                    @Override
                    public void onCompleted(Exception e, String arg1) {
                        if (e == null) {
                            upload.setText("上传完成");
                        }
                    }
                });
    }

    /*悬浮按钮*/
    private void showFab() {
        /*按钮动画
        fab.setShowAnimation(ActionButton.Animations.FADE_IN);
		fab.setHideAnimation(ActionButton.Animations.FADE_OUT);
		// 左右移动动画
		fab.setShowAnimation(ActionButton.Animations.JUMP_FROM_RIGHT);
		fab.setHideAnimation(ActionButton.Animations.JUMP_TO_RIGHT);*/
        // 上下移动动画
        fab.setShowAnimation(ActionButton.Animations.JUMP_FROM_DOWN);
        fab.setHideAnimation(ActionButton.Animations.JUMP_TO_DOWN);
        fab.show();
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                fab.hide();
            }
        }, 2000);

    }

    /*菊花进度圈圈*/
    private void showLoadProgress() {
        final ProgressDrawble myinstance = ProgressDrawble.getInstance(mContext);
        myinstance.setTitle("加载中");
        myinstance.setOnDialogDismiss(new ProgressDrawble.OnDialogDismiss() {
            @Override
            public void onDismiss() {
                Toast.makeText(mContext, "dialog已经关闭", Toast.LENGTH_SHORT).show();
            }
        });
        myinstance.show();
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                myinstance.dismiss();
            }
        }, 5000);

    }

    /*对话框*/
    private void showDialog() {
        final MaterialDialog materialDialog = new MaterialDialog(mContext);
        materialDialog.setCanceledOnTouchOutside(true);
        materialDialog.setMessage("这里是用来展示的文字信息的东西").setTitle("标题").setPositiveButton("确定", new OnClickListener() {
            @Override
            public void onClick(View v) {
                materialDialog.dismiss();
            }
        }).setNegativeButton("取消", null);
        materialDialog.setOnDismissListener(new OnDismissListener() {
            @Override
            public void onDismiss(DialogInterface dialog) {
                Toast.makeText(mContext, "运行到关闭了", Toast.LENGTH_SHORT).show();
            }
        });
        materialDialog.show();
    }
}


text:
COMMAND="vim"
COMMIT_TEMPLATE0="see #NNNNNN short description"
#COMMIT_TEMPLATE1="hours worked: 1"
COMMIT_TEMPLATE2="changes"

# set up the commit file
COMMIT_FILE=$COMMIT_MESSAGE_FILE
if [ ! -e $COMMIT_FILE ]
then
    echo $COMMIT_TEMPLATE0 >> $COMMIT_FILE
    echo "" >> $COMMIT_FILE
	#echo $COMMIT_TEMPLATE1 >> $COMMIT_FILE
    #echo "" >> $COMMIT_FILE
	echo $COMMIT_TEMPLATE2 >> $COMMIT_FILE
fi

SCRIPT=~/.vim/codingEnvironment.vim
$COMMAND -s $SCRIPT


text:
package com.cisco.axl.api._8;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for XLdapDirectory complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="XLdapDirectory">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence minOccurs="0">
 *         <element name="name" type="{http://www.cisco.com/AXL/API/8.0}String50"/>
 *         <element name="ldapDn" type="{http://www.cisco.com/AXL/API/8.0}String128"/>
 *         <element name="ldapPassword" type="{http://www.cisco.com/AXL/API/8.0}String128"/>
 *         <element name="userSearchBase" type="{http://www.cisco.com/AXL/API/8.0}String255"/>
 *         <element name="repeatable" type="{http://www.cisco.com/AXL/API/8.0}boolean" minOccurs="0"/>
 *         <element name="intervalValue" type="{http://www.cisco.com/AXL/API/8.0}XInteger"/>
 *         <element name="scheduleUnit" type="{http://www.cisco.com/AXL/API/8.0}XScheduleUnit" minOccurs="0"/>
 *         <element name="nextExecTime" type="{http://www.cisco.com/AXL/API/8.0}String32"/>
 *         <element name="servers">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence minOccurs="0">
 *                   <element name="server" maxOccurs="3">
 *                     <complexType>
 *                       <complexContent>
 *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                           <sequence minOccurs="0">
 *                             <element name="hostName" type="{http://www.cisco.com/AXL/API/8.0}String128"/>
 *                             <element name="ldapPortNumber" type="{http://www.cisco.com/AXL/API/8.0}XInteger"/>
 *                             <element name="sslEnabled" type="{http://www.cisco.com/AXL/API/8.0}boolean" minOccurs="0"/>
 *                           </sequence>
 *                         </restriction>
 *                       </complexContent>
 *                     </complexType>
 *                   </element>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="middleName" type="{http://www.cisco.com/AXL/API/8.0}String128" minOccurs="0"/>
 *         <element name="phoneNumber" type="{http://www.cisco.com/AXL/API/8.0}String128" minOccurs="0"/>
 *         <element name="mailId" type="{http://www.cisco.com/AXL/API/8.0}String128" minOccurs="0"/>
 *         <element name="ldapFilter" type="{http://www.cisco.com/AXL/API/8.0}XFkType" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "XLdapDirectory", propOrder = {
    "name",
    "ldapDn",
    "ldapPassword",
    "userSearchBase",
    "repeatable",
    "intervalValue",
    "scheduleUnit",
    "nextExecTime",
    "servers",
    "middleName",
    "phoneNumber",
    "mailId",
    "ldapFilter"
})
public class XLdapDirectory {

    protected String name;
    protected String ldapDn;
    protected String ldapPassword;
    protected String userSearchBase;
    protected String repeatable;
    @XmlElementRef(name = "intervalValue", type = JAXBElement.class)
    protected JAXBElement<String> intervalValue;
    @XmlElement(defaultValue = "DAY")
    protected String scheduleUnit;
    protected String nextExecTime;
    protected XLdapDirectory.Servers servers;
    protected String middleName;
    protected String phoneNumber;
    protected String mailId;
    @XmlElementRef(name = "ldapFilter", type = JAXBElement.class)
    protected JAXBElement<XFkType> ldapFilter;

    /**
     * Gets the value of the name property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the ldapDn property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getLdapDn() {
        return ldapDn;
    }

    /**
     * Sets the value of the ldapDn property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLdapDn(String value) {
        this.ldapDn = value;
    }

    /**
     * Gets the value of the ldapPassword property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getLdapPassword() {
        return ldapPassword;
    }

    /**
     * Sets the value of the ldapPassword property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setLdapPassword(String value) {
        this.ldapPassword = value;
    }

    /**
     * Gets the value of the userSearchBase property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getUserSearchBase() {
        return userSearchBase;
    }

    /**
     * Sets the value of the userSearchBase property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setUserSearchBase(String value) {
        this.userSearchBase = value;
    }

    /**
     * Gets the value of the repeatable property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getRepeatable() {
        return repeatable;
    }

    /**
     * Sets the value of the repeatable property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setRepeatable(String value) {
        this.repeatable = value;
    }

    /**
     * Gets the value of the intervalValue property.
     *
     * @return
     *     possible object is
     *     {@link JAXBElement }{@code <}{@link String }{@code >}
     *
     */
    public JAXBElement<String> getIntervalValue() {
        return intervalValue;
    }

    /**
     * Sets the value of the intervalValue property.
     *
     * @param value
     *     allowed object is
     *     {@link JAXBElement }{@code <}{@link String }{@code >}
     *
     */
    public void setIntervalValue(JAXBElement<String> value) {
        this.intervalValue = ((JAXBElement<String> ) value);
    }

    /**
     * Gets the value of the scheduleUnit property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getScheduleUnit() {
        return scheduleUnit;
    }

    /**
     * Sets the value of the scheduleUnit property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setScheduleUnit(String value) {
        this.scheduleUnit = value;
    }

    /**
     * Gets the value of the nextExecTime property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getNextExecTime() {
        return nextExecTime;
    }

    /**
     * Sets the value of the nextExecTime property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setNextExecTime(String value) {
        this.nextExecTime = value;
    }

    /**
     * Gets the value of the servers property.
     *
     * @return
     *     possible object is
     *     {@link XLdapDirectory.Servers }
     *
     */
    public XLdapDirectory.Servers getServers() {
        return servers;
    }

    /**
     * Sets the value of the servers property.
     *
     * @param value
     *     allowed object is
     *     {@link XLdapDirectory.Servers }
     *
     */
    public void setServers(XLdapDirectory.Servers value) {
        this.servers = value;
    }

    /**
     * Gets the value of the middleName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMiddleName() {
        return middleName;
    }

    /**
     * Sets the value of the middleName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMiddleName(String value) {
        this.middleName = value;
    }

    /**
     * Gets the value of the phoneNumber property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getPhoneNumber() {
        return phoneNumber;
    }

    /**
     * Sets the value of the phoneNumber property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setPhoneNumber(String value) {
        this.phoneNumber = value;
    }

    /**
     * Gets the value of the mailId property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMailId() {
        return mailId;
    }

    /**
     * Sets the value of the mailId property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMailId(String value) {
        this.mailId = value;
    }

    /**
     * Gets the value of the ldapFilter property.
     *
     * @return
     *     possible object is
     *     {@link JAXBElement }{@code <}{@link XFkType }{@code >}
     *
     */
    public JAXBElement<XFkType> getLdapFilter() {
        return ldapFilter;
    }

    /**
     * Sets the value of the ldapFilter property.
     *
     * @param value
     *     allowed object is
     *     {@link JAXBElement }{@code <}{@link XFkType }{@code >}
     *
     */
    public void setLdapFilter(JAXBElement<XFkType> value) {
        this.ldapFilter = ((JAXBElement<XFkType> ) value);
    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence minOccurs="0">
     *         <element name="server" maxOccurs="3">
     *           <complexType>
     *             <complexContent>
     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *                 <sequence minOccurs="0">
     *                   <element name="hostName" type="{http://www.cisco.com/AXL/API/8.0}String128"/>
     *                   <element name="ldapPortNumber" type="{http://www.cisco.com/AXL/API/8.0}XInteger"/>
     *                   <element name="sslEnabled" type="{http://www.cisco.com/AXL/API/8.0}boolean" minOccurs="0"/>
     *                 </sequence>
     *               </restriction>
     *             </complexContent>
     *           </complexType>
     *         </element>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "server"
    })
    public static class Servers {

        protected List<XLdapDirectory.Servers.Server> server;

        /**
         * Gets the value of the server property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the server property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getServer().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link XLdapDirectory.Servers.Server }
         *
         *
         */
        public List<XLdapDirectory.Servers.Server> getServer() {
            if (server == null) {
                server = new ArrayList<XLdapDirectory.Servers.Server>();
            }
            return this.server;
        }

        /**
         *
Java class for anonymous complex type.
         *
         *
The following schema fragment specifies the expected content contained within this class.
         *
         *

         * <complexType>
         *   <complexContent>
         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
         *       <sequence minOccurs="0">
         *         <element name="hostName" type="{http://www.cisco.com/AXL/API/8.0}String128"/>
         *         <element name="ldapPortNumber" type="{http://www.cisco.com/AXL/API/8.0}XInteger"/>
         *         <element name="sslEnabled" type="{http://www.cisco.com/AXL/API/8.0}boolean" minOccurs="0"/>
         *       </sequence>
         *     </restriction>
         *   </complexContent>
         * </complexType>
         *

         *
         *
         */
        @XmlAccessorType(XmlAccessType.FIELD)
        @XmlType(name = "", propOrder = {
            "hostName",
            "ldapPortNumber",
            "sslEnabled"
        })
        public static class Server {

            protected String hostName;
            protected String ldapPortNumber;
            protected String sslEnabled;

            /**
             * Gets the value of the hostName property.
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getHostName() {
                return hostName;
            }

            /**
             * Sets the value of the hostName property.
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setHostName(String value) {
                this.hostName = value;
            }

            /**
             * Gets the value of the ldapPortNumber property.
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getLdapPortNumber() {
                return ldapPortNumber;
            }

            /**
             * Sets the value of the ldapPortNumber property.
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setLdapPortNumber(String value) {
                this.ldapPortNumber = value;
            }

            /**
             * Gets the value of the sslEnabled property.
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getSslEnabled() {
                return sslEnabled;
            }

            /**
             * Sets the value of the sslEnabled property.
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setSslEnabled(String value) {
                this.sslEnabled = value;
            }

        }

    }

}


text:
// ***********************************************************************
// Assembly         : CoBuilder.Navisworks
// Author           : Alex Bradley
// Created          : 09-09-2016
//
// Last Modified By : Alex Bradley
// Last Modified On : 11-08-2016
// ***********************************************************************
// <copyright file="CoBuilderNavisworksCommandHandler.cs" company="AB Consulting">
//     Copyright (c) AB Consulting. All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Diagnostics;
using System.Linq;
using Autodesk.Navisworks.Api;
using Autodesk.Navisworks.Api.Plugins;
using CoBuilder.Service;
using CoBuilder.Service.Commands;
using CoBuilder.Service.Helpers;

namespace CoBuilder.Navisworks.Plugins
{
    /// <summary>
    /// Class CoBuilderNavisworksCommandHandler.
    /// </summary>
    /// <seealso cref="Autodesk.Navisworks.Api.Plugins.CommandHandlerPlugin" />
    [Plugin("CoBuilderNavisworksCommandHandler", "ABc", DisplayName = "CoBuilder Navisworks")]
    [RibbonLayout("CoBuilderRibbon.xaml")]
    [RibbonTab("CoBuilderStartTab", DisplayName = "CoBuilder")]
    [RibbonTab("CoBuilderMainTab", DisplayName = "CoBuilder Pro", LoadForCanExecute = true)]
    [Command("WebsiteCommand", DisplayName = "CoBuilder Website", LargeIcon = "Resources//CoBuilder_loginSmall.png")]
    [Command("WebsiteCommand2", DisplayName = "CoBuilder Website", LargeIcon = "Resources//CoBuilder_loginSmall.png")]
    [Command("WorkplaceCommand", DisplayName = "Set Workplace", LargeIcon = "Resources//Globe-icon_Small.png")]
    [Command("LoginCommand", DisplayName = "CoBuilder Login", LargeIcon = "Resources//logIn-icon-Small.png")]
    [Command("LogOutCommand", DisplayName = "CoBuilder Logout", LargeIcon = "Resources//logout-icon-Small.png")]
    [Command("ConnectCommand", DisplayName = "Link Product to Elements", LargeIcon = "Resources//Select_Arrow.bmp")]
    [Command("RemoveCommand", DisplayName = "Remove Products from Elements",
        LargeIcon = "Resources//Remove.png")]
    [Command("ConfigurationCommand", DisplayName = "CoBuilder Configuration", LargeIcon = "Resources//Setting-Small.png")]
    [Command("RefreshCommand", DisplayName = "Refresh Products", LargeIcon = "Resources//Globe-icon_Small.png")]
    public class CoBuilderNavisworksCommandHandler : CommandHandlerPlugin
    {
        /// <summary>
        /// The _co builder service
        /// </summary>
        private readonly CoBuilderService _coBuilderService;

        /// <summary>
        /// The _logged in
        /// </summary>
        private bool _loggedIn;

        /// <summary>
        /// Initializes a new instance of the <see cref="CoBuilderNavisworksCommandHandler"/> class.
        /// </summary>
        public CoBuilderNavisworksCommandHandler()
        {
            var serviceConfig = new ServiceConfiguration
            {
                AppConfig = new NavisworksAppConfig(),
                ContainerConfig = new NavisworksRegistry(),
                UseDefinedContainerConfig = true
            };

            _coBuilderService = CoBuilderService.Initiate(serviceConfig);
            Debug.WriteLine(_coBuilderService.whatDoIHave());
            if (_coBuilderService.Session != null) _loggedIn = _coBuilderService.Session.LoggedIn;
        }

        /// <summary>
        /// Called when a command is executed
        /// </summary>
        /// <param name="name">The name of the command</param>
        /// <param name="parameters">Paramaters to be passed to the command</param>
        /// <returns>System.Int32.</returns>
        public override int ExecuteCommand(string name, params string[] parameters)
        {
            try
            {
                switch (name)
                {
                    case "WebsiteCommand":
                    case "WebsiteCommand2":
                    {
                        Settings.CoBuilderSite();
                        break;
                    }
                    case "LoginCommand":
                    {
                        _loggedIn = new LoginCommand<ModelItem>().Execute();
                        break;
                    }
                    case "LogOutCommand":
                    {
                        new LogOutCommand().Execute();
                        _loggedIn = false;
                        break;
                    }
                    case "WorkplaceCommand":
                    {
                        var command = new ChangeWorkplaceCommand();
                        command.Execute();
                        break;
                    }
                    case "ConnectCommand":
                    {
                        var command = new ConnectCommand<ModelItem>();
                        command.Execute();
                        break;
                    }

                    case "RemoveCommand":
                    {
                        var command = new RemoveCommand<ModelItem>();
                        command.Execute();
                        var result = command.RemovalResult;
                        break;
                    }
                    case "ConfigurationCommand":
                    {
                        var command = new ConfigurationCommand();
                        command.Execute();
                        break;
                    }
                    case "RefreshCommand":
                    {
                        var command = new RefreshCommand<ModelItem>();
                        command.Execute();
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                Debug.WriteLine(e);
            }

            return 0;
        }

        /// <summary>
        /// Called to determine if a ribbon tab can be executed
        /// </summary>
        /// <param name="name">The name of the ribbon tab</param>
        /// <returns><c>true</c> if this instance [can execute ribbon tab] the specified name; otherwise, <c>false</c>.</returns>
        public override bool CanExecuteRibbonTab(string name)
        {
            if (!_loggedIn)
            {
                return name == "CoBuilderStartTab";
            }
            return name == "CoBuilderMainTab";
        }

        /// <summary>
        /// Called to determine if a command can be executed
        /// </summary>
        /// <param name="name">The name of the command</param>
        /// <returns>CommandState.</returns>
        public override CommandState CanExecuteCommand(string name)
        {
            switch (name)
            {
                case "LoginCommand":
                {
                    return new CommandState(!Application.ActiveDocument.IsClear);
                }
                case "ConnectCommand":
                case "RemoveCommand":
                {
                    return new CommandState(!Application.ActiveDocument.CurrentSelection.IsEmpty && _coBuilderService.Session.WorkplaceSet);
                }
                default:
                {
                    return base.CanExecuteCommand(name);
                }
            }
        }
    }
}


text:
Nouveau Contrat

        <form class="form-horizontal" data-ng-submit="create()" novalidate>
            <fieldset>

                  BU

                        <input type="text" data-ng-model="bu" id="bu" class="form-control" placeholder="bu" required >
                        <input type="radio" ng-model="bu" value= "EVL" />Evoliance
                        <input type="radio" ng-model="bu" value= "UBS" />Ubique systemes
                        <input type="radio" ng-model="bu" value= "HBO" />Hub One

                    Nom

                        <input type="text" data-ng-model="name" id="name" class="form-control"  placeholder="Nom contrat" value="nom" required >

                    numero contrat

                        <input type="number" min=1000 max=9999 data-ng-model="ctrtnum" id="ctrtnum" class="form-control" placeholder="Numero contrat" value=0 required>

                    locataire

                        <input type="text" data-ng-model="locataire" id="locataire" class="form-control" placeholder="locataire" required>

                    refinanceur

                        <input type="text" data-ng-model="refinanceur" id="refinanceur" class="form-control" placeholder="refinanceur" required>
                        <input type="radio" ng-model="refinanceur" value="Siemens" />Siemens
                        <input type="radio" ng-model="refinanceur" value="Ge Cap" />Ge capital
                        <input type="radio" ng-model="refinanceur" value="Leascom" />Leascom
                        <input type="radio" ng-model="refinanceur" value="LorEquip" />LorEquip

                    consultant

                        <input type="text" data-ng-model="consultant" id="consultant" class="form-control" placeholder="consultant" required >
                        <input type="radio" ng-model="consultant" value= "pake" />Pake
                        <input type="radio" ng-model="consultant" value= "mali" />Mali
                        <input type="radio" ng-model="consultant" value= "chde" />Chde

                    partenaire

                        <input type="text" data-ng-model="partenaire" id="partenaire" class="form-control" placeholder="partenaire" required>

                    duree

                        <input type="text" data-ng-model="duree" id="duree" class="form-control" placeholder="duree" required>
                        <input type="radio" ng-model="duree" value= 24 />24
                        <input type="radio" ng-model="duree" value= 30 />30
                        <input type="radio" ng-model="duree" value= 36 />36
                        <input type="radio" ng-model="duree" value= 42 />42
                        <input type="radio" ng-model="duree" value= 48 />48
                        <input type="radio" ng-model="duree" value= 60 />60
                        <input type="radio" ng-model="duree" value= 72 />72

                    periodicite

                        <input type="text" data-ng-model="periodicite" id="periodicite" class="form-control" placeholder="periodicite" required>
                        <input type="radio" ng-model="periodicite" value= "mens" />Mensuel
                        <input type="radio" ng-model="periodicite" value= "tri" />Trimestriel

                    nbperiode

                        <input type="text" data-ng-model="nbperiode" id="nbperiode" class="form-control" placeholder="nbperiode" required>

                    loyer

                        <input type="text" data-ng-model="loyer" id="loyer" class="form-control" placeholder="loyer" required>

                    drfnum

                        <input type="number" min=1000 max=9999 data-ng-model="drfnum" id="drfnum" class="form-control" placeholder="Numero drf" value=0 required>

                    <select ng-model="drfnum" ng-options="drfnum as refinancement.drfnum for refinancement in Refinancements">
                    <option value="">selection un num drfnum</option>
                    </select>

                    econum

                        <input type="number" min=1000 max=9999 data-ng-model="econum" id="econum" class="form-control" placeholder="Numero fieco" value=0 required>

                    <select name="seleconum" ng-model="seleconum" ng-options="ecomony.econum for ecomony in Ecomonies">
                     <option value="">Sélectionnez un num Econum</option>
                    </select>

                   etatrefinct

                        <input type="text" data-ng-model="etatrefinct" id="etatrefinct" class="form-control" placeholder="etatrefinct" required>
                        <input type="radio" ng-model="etatrefinct" value= 'non defini' />non defini
                        <input type="radio" ng-model="etatrefinct" value= "attente reponse" />encours
                        <input type="radio" ng-model="etatrefinct" value= "attente pieces" />attente pieces
                        <input type="radio" ng-model="etatrefinct" value= "accord partiel" />accord partiel
                        <input type="radio" ng-model="etatrefinct" value= "accord conditionnel" />accord conditionnel
                        <input type="radio" ng-model="etatrefinct" value= "accord complet"/>accord complet
                        <input type="radio" ng-model="etatrefinct" value= "refus 1er" />refus 1er
                        <input type="radio" ng-model="etatrefinct" value= "refus definitif" />refus definitif

                   etatcession

                        <input type="text" data-ng-model="etatcession" id="etatcession" class="form-control" placeholder="etatcession" required>
                        <input type="radio" ng-model="etatcession" value= 'non defini' />non defini
                        <input type="radio" ng-model="etatcession" value= 'autoporte' />autoporte
                        <input type="radio" ng-model="etatcession" value= 'prorata' />prorata
                        <input type="radio" ng-model="etatcession" value= 'cede' />cede
                        <input type="radio" ng-model="etatcession" value= 'rachete' />rachete

                   etatdenonc

                        <input type="text" data-ng-model="etatdenonc" id="etatdenonc" class="form-control" placeholder="etatdenonc" required>
                        <input type="radio" ng-model="etatdenonc" value= 'non defini' />non defini
                        <input type="radio" ng-model="etatdenonc" value= 'denonce valide' />denonce valide
                        <input type="radio" ng-model="etatdenonc" value= 'denonce tardive' />denonce tardive
                        <input type="radio" ng-model="etatdenonc" value= 'non denonce' />non denonce
                        <input type="radio" ng-model="etatdenonc" value= 'hors delais' />delais denonce depasse

                   etatvie

                        <input type="text" data-ng-model="etatvie" id="etatvie" class="form-control" placeholder="etatvie" required>
                        <input type="radio" ng-model="etatvie" value= 'non defini' />non defini
                        <input type="radio" ng-model="etatvie" value= 'montage' />montage
                        <input type="radio" ng-model="etatvie" value= 'creation' />creation
                        <input type="radio" ng-model="etatvie" value= 'cession' />cession
                        <input type="radio" ng-model="etatvie" value= 'normal' />normal
                        <input type="radio" ng-model="etatvie" value= 'evolution' />evolution
                        <input type="radio" ng-model="etatvie" value= 'fin de contrat' />fin de contrat
                        <input type="radio" ng-model="etatvie" value= 'prolong' />prolong
                        <input type="radio" ng-model="etatvie" value= 'cloture' />cloture
                        <input type="radio" ng-model="etatvie" value= 'remplace' />annu remplace

                    ctrtdsignature

                        <input type="date" data-ng-model="ctrtdsignature" id="ctrtdsignature" class="form-control" placeholder="Date sign pv contrat" required>

                    ctrtddebut

                        <input type="date" data-ng-model="ctrtddebut" id="ctrtddebut" class="form-control" placeholder="Date debut contrat piece complete" >

                    ctrtdcession

                        <input type="date" data-ng-model="ctrtdcession" id="ctrtdcession" class="form-control" placeholder="Date cession contrat" >

                    crtrtdlim

                        <input type="date" data-ng-model="crtrtdlim" id="crtrtdlim" class="form-control" placeholder="Date limite denonc contrat" >

                    ctrtdfin

                        <input type="date" data-ng-model="ctrtdfin" id="ctrtdfin" class="form-control" placeholder="Date fin nominale contrat" >

                    ctrtddenonc

                        <input type="date" data-ng-model="ctrtddenonc" id="ctrtddenonc" class="form-control" placeholder="Date denonc effective contrat" >

                    ctrtdcloture

                        <input type="date" data-ng-model="ctrtdcloture" id="ctrtdcloture" class="form-control" placeholder="Date cloture contrat" >

                    commentaire

                        <textarea name="ctrtcommentaire" data-ng-model="ctrtcommentaire" id="ctrtcommentaire" class="form-control" cols="30" rows="10" placeholder="Commentaire"></textarea>

                    <input type="submit" class="btn btn-default">

            </fieldset>

                        {{contrat.id.ctrtnum}}{{contrat.locataire}}

                        {{contrat.id.ctrtnum}}{{contrat.locataire}}

        </form>

                ctrtlght{{contrat.length}}
                ctrtslght{{contrats.length}}
                ctrtnum{{$scope.ctrtnum}}
                ctrtnum{{ctrtnum}}
                ctrtnum{{contrat.ctrtnum}}
                ctrtnum{{contrats.ctrtnum}}
                ctrtnum{{contrats(1).ctrtnum}}
                ctrtnum{{contrats(id).ctrtnum}}
                ctrtnum{{contrats[1].ctrtnum}}
                ctrtnum{{contrats[id].ctrtnum}}

                    {{contrat.ctrtnum}}{{contrat.id}}

                    {{refinancement.drfnum}}{{refinancement.id}}

                    {{economy.econum}}{{economy.id}}


text:
<!---

This README is automatically generated from the comments in these files:
iron-input.html

Edit those files, and our readme bot will duplicate them over here!
Edit this file, and the bot will squash your changes :)

The bot does some handling of markdown. Please file a bug if it does the wrong
thing! https://github.com/PolymerLabs/tedium/issues

-->

[![Build status](https://travis-ci.org/PolymerElements/iron-input.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-input)

_[Demo and API docs](https://elements.polymer-project.org/elements/iron-input)_

##<iron-input>

`<iron-input>` adds two-way binding and custom validators using `Polymer.IronValidatorBehavior`
to `<input>`.

### Two-way binding

By default you can only get notified of changes to an `input`'s `value` due to user input:

```html
<input value="{{myValue::input}}">
```

`iron-input` adds the `bind-value` property that mirrors the `value` property, and can be used
for two-way data binding. `bind-value` will notify if it is changed either by user input or by script.

```html
<input is="iron-input" bind-value="{{myValue}}">
```

### Custom validators

You can use custom validators that implement `Polymer.IronValidatorBehavior` with `<iron-input>`.

```html
<input is="iron-input" validator="my-custom-validator">
```

### Stopping invalid input

It may be desirable to only allow users to enter certain characters. You can use the
`prevent-invalid-input` and `allowed-pattern` attributes together to accomplish this. This feature
is separate from validation, and `allowed-pattern` does not affect how the input is validated.

```html
<!-- only allow characters that match [0-9] -->
<input is="iron-input" prevent-invalid-input allowed-pattern="[0-9]">
```


text:
from __future__ import absolute_import
from __future__ import division
from past.utils import old_div
from proteus import *
from proteus.default_n import *
try:
    from .adr_3d_p import *
except:
    from adr_3d_p import *

#steady-state so no time integration
timeIntegration = NoIntegration
#number of output timesteps
nDTout = 1

#finite element spaces
femSpaces = {0:C0_AffineLinearOnSimplexWithNodalBasis}
#numerical quadrature choices
elementQuadrature = SimplexGaussQuadrature(nd,3)
elementBoundaryQuadrature = SimplexGaussQuadrature(nd-1,3)

logEvent("""Mesh generated using: tetgen -%s %s"""  % (triangleOptions,domain.polyfile+".poly"))
triangleOptions="VApq1.35q12feena%e" % (old_div((he**3),6.0),)

#number of levels in mesh
nLevels = 1

subgridError      = ADR.SubgridError(coefficients=coefficients,nd=nd)
shockCapturing    = ADR.ShockCapturing(coefficients,nd,shockCapturingFactor=0.0,lag=False)

#nonlinear solver choices
multilevelNonlinearSolver  = Newton
levelNonlinearSolver = Newton
#linear problem so force 1 iteration allowed
maxNonlinearIts = 2
maxLineSearches = 1
fullNewtonFlag = True
#absolute nonlinear solver residual tolerance
nl_atol_res = 1.0e-8
#relative nonlinear solver convergence tolerance as a function of h
#(i.e., tighten relative convergence test as we refine)
tolFac = 0.0

#matrix type
matrix = SparseMatrix

#convenience flag
parallel = True

if parallel:
    multilevelLinearSolver = KSP_petsc4py
    #for petsc do things lie
    #"-ksp_type cg -pc_type asm -pc_asm_type basic -ksp_atol  1.0e-10 -ksp_rtol 1.0e-10 -ksp_monitor_draw" or
    #-pc_type lu -pc_factor_mat_solver_package
    #can also set -pc_asm_overlap 2 with default asm type (restrict)
    levelLinearSolver = KSP_petsc4py#
    #for petsc do things like
    #"-ksp_type cg -pc_type asm -pc_asm_type basic -ksp_atol  1.0e-10 -ksp_rtol 1.0e-10 -ksp_monitor_draw" or
    #-pc_type lu -pc_factor_mat_solver_package
    #can also set -pc_asm_overlap 2 with default asm type (restrict)
    #levelLinearSolver = PETSc#
    #pick number of layers to use in overlap
    nLayersOfOverlapForParallel = 0
    #type of partition
    parallelPartitioningType = MeshParallelPartitioningTypes.node
    #parallelPartitioningType = MeshParallelPartitioningTypes.element
    #have to have a numerical flux in parallel
    numericalFluxType = ADR.NumericalFlux
    #for true residual test
    linearSolverConvergenceTest = 'r-true'
    #to allow multiple models to set different ksp options
    #linear_solver_options_prefix = 'poisson_'
    linearSmoother = None
else:
    multilevelLinearSolver = LU
    levelLinearSolver = LU
    numericalFluxType = ADR.NumericalFlux

#linear solver relative convergence test
linTolFac = 0.0
#linear solver absolute convergence test
l_atol_res = 1.0e-10

#conservativeFlux =  {0:'pwl'}


text:
<?xml version="1.0" encoding="utf-8"?>
<ImageView android:layout_width="24dp" android:layout_height="24dp" android:scaleType="7" />


text:
//
//  BYBeautify.h
//  Beautify
//
//  Created by Adrian Conlin on 21/05/2013.
//  Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//

#import <Foundation/Foundation.h>

/*
 Beautify is a singleton class which is responsible for activating the beautify framework for the current application. On
 activation all the UI controls within your application will have their rendering capabilities be 'enhanced'.

 When beautify has been activated, every instance of an 'enhanced' control will have a renderer associated with it. You
 can use the renderer to alter the style of individual UI controls.

    // access the renderer for my button
    BYButtonRenderer* renderer = self.myButton.renderer;

    // apply a big fat red border to the normal state
    BYBorder* border = [[BYBorder alloc] initWithColor:[UIColor redColor] width:30.0f radius:15.0f];
    [renderer setBorder:border forState:UIControlStateNormal];

 When you application is ready for release, you can save your style as a JSON file, then activate and load the style
 with the following method:

    [[BYBeautify instance] activateWithStyle:@"StyleName"];

 */
@interface BYBeautify : NSObject

/*
 Accesses the beautify singleton instance.
 */
+(BYBeautify*)instance;

/*
 Activates beautify in order to 'enhance' the UI controls of your application.
 */
-(void)activate;

/*
 Activates beautify and loads a style from a JSON file with the given name.
 */
-(void)activateWithStyle:(NSString*)styleName;

#pragma mark -
#pragma mark Version Info

/** Returns a string describing the version of the Beautify framework being used. */
+(NSString*)getInfo;
-(NSString*)getInfo;

@end


text:
package view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.mobilesafe.R;

public class settingclickView extends RelativeLayout {
	private TextView tv_title;
	private TextView tv_desc;
	private String mtitle;
	public settingclickView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
		initView();
		// TODO Auto-generated constructor stub
	}
	public settingclickView(Context context, AttributeSet attrs) {
		super(context, attrs);
		initView();
		// TODO Auto-generated constructor stub
	}
	public settingclickView(Context context) {
		super(context);
		initView();
	}
	//³õ'»¯²¼¾Ö
	public void  initView(){
		//½«×Ô¶¨ÒåºÃµÄ²¼¾ÖÎļþÉèÖøøµ±Ç°µÄSettingItemView
		System.out.println("Ìî³äclickView");
		View.inflate(getContext(), R.layout.list_click_item, this);//root A view group that will be the parent.
		System.out.println("Ìî³äclickView³É¹¦");
		tv_title = (TextView) findViewById(R.id.tv_title);    //´«Èëthis,RelativeLayoutÒ²ÊÇviewgroup£¬±íʾ½« R.layout.list_item
		tv_desc = (TextView)findViewById(R.id.tv_desc);    //Èû¸øsettingItemView
		setTitle(mtitle);//ÉèÖñêÌâ
	}
	public void setDesc(String desc){
		tv_desc.setText(desc);
	}
	public void setTitle(String mtitle2) {
		tv_title.setText(mtitle2);
	}

}


text:
<assembly
	xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
	<id>iib-project</id>
	<formats>
		<format>zip</format>
	</formats>
	<baseDirectory>${project.name}</baseDirectory>
	<fileSets>
		<!-- make sure that specific text files are filtered -->
		<fileSet>
			<directory>${project.build.directory}/tmp</directory>
			<filtered>true</filtered>
			<outputDirectory>/</outputDirectory>
			<includes>
				<include>**/*.xsd</include>
				<include>**/*.wsdl</include>
				<include>**/*.wadl</include>
				<include>**/pom.xml</include>
				<include>**/.project</include>
			</includes>
		</fileSet>
	</fileSets>
</assembly>


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta property="og:image" content="https://jenniferdewalt.com/images/fb_icon.png"/>
  <title>Circle Invaders | Jennifer Dewalt</title>
  <link href="css/reset.css" rel="stylesheet">
  <link href="css/circle_invaders.css" rel="stylesheet">

      Home
      Blog

Game Over

      Try again?

x

Circle Invaders

Use left and right arrow keys to move the shooter

Use spacebar to shoot

    <canvas id="canvas"></canvas>


text:
<?php
/**
 * All Gzip plugin tests
 */
class AllGzipTest extends CakeTestCase {

/**
 * Suite define the tests for this suite
 *
 * @return void
 */
	public static function suite() {
		$suite = new CakeTestSuite('All Gzip test');

		$path = CakePlugin::path('Gzip') . 'Test' . DS . 'Case' . DS;
		$suite->addTestDirectoryRecursive($path);

		return $suite;
	}

}