text:
GitPitch 4.0 was released in September, 2020. The 4.0 release introduces a brand new layout system for GitPitch markdown presentations called [Grid Layouts](/grid-layouts/README.md). This new layout system is now the default layout system for GitPitch slide decks.

!> All new GitPitch slide decks should use the grid layouts system and 4.0 syntax per these docs.

The old snap layouts layout system is now *deprecated* and should no longer be used. Old snap layouts syntax is not supported within 4.0 slide decks. See the [Upgrading to 4.0 Guide](/upgrading-to-40.md) for further details.


text:
OrientDB supports fetching strategies by using the **Fetch Plans**. Fetch Plans are used to customize how OrientDB must load linked records.

Example:
```
Invoice
 3:100
   |
   | customer
   +---------> Customer
   |            5:233
   | address            city            country
   +---------> Address---------> City ---------> Country
   |            10:1             11:2             12:3
   |
   | orders
   +--------->* [OrderItem OrderItem OrderItem]
                [  8:12      8:19      8:23   ]
```

By default OrientDB loads all the linked records in lazy way. So in this example the linked `customer`, `city` and `orders` fields are not loaded until they are traversed. If you need the entire tree it could be slow the lazy loading of every single linked record. In this case it would need 7 different loads. If the database is open on a remote server they are 7 different network calls.

This is the reason why OrientDB supports custom fetching strategies using the **Fetch Plans**.  The aim of fetch plans is to pre-load connected records in one shot.

Where use fetch-plans?

- On record loading through the remote connection
- On JSON serializer to produce JSON with nested records

## Remote connection

When a client executes a query (or load directly one single record) setting a fetch plan with level different to `0`, then the server traverses all the records of the returning result set and sends them to the client in the same call.

The client avoid to connect directly them to the record by using always the lazy collections (i.e.: `OLazyRecordList`). Instead, loads all the connected records into the local client. In this ways the collections remain lazy but when you're accessing to the content, the record is early loaded from the local cache avoiding other connections.

## Format

The fetch plan comes in form of a String and can be used at run-time on:

- query
- record loading

The syntax is:

```
[[levels]]<fieldPath>:<depth-level>*
```

Where:
- `[[levels]]`, optional, tells at which levels the rules must apply. Levels starts from `0`. Since 2.1. Supported syntax is:
 - `level`, example `[0]` to apply only at first level
 - Ranges, example `[0-3]` from 0 to 3rd level. Ranges can be also partial, like `[-3]` means `0` to `3` and `[3-]` means form 3rd to infinite
 - Any, by using `*`. Example `[*]` to apply at any level
- `<fieldPath>`, is the field name path, expected in dot notation, starting from the root record or the wildcard `*` for "any" field. The wildcard `*` can be also at the end of the path to specify all the paths that starts for a name
- `<depth-level>`, is the deep level requested:
 - `0` = Load only current record,
 - `1-N` = load only the first-Nth connected record,
 - `-1` = unlimited,
 - `-2` = exclude it

To express multiple rules separate them by spaces.

Examples with the record tree above:
- `"*:-1"`: fetches the entire tree recursively
- `"*:-1 orders:0"`: fetches all the records recursively but the "orders" field in root class. Note that in `orders` field will be loaded only its direct content (only records `8:12`,`8:19`,`8:23`, none of other records inside them will be loaded).
- `"*:0 address.city.country:0"`: fetches only not-document fields in the root class and address.city.country field  (records `10:1`,`11:2`,`12:3`).
- `"[*]in_*:-2 out_*:-2"`: returns all the properties, but edges (at any level)

## Circular dependencies

OrientDB handles circular dependencies to avoid any loop while fetches linking records.

## Example using the Java APIs

### Execute a query with a custom fetch plan

```java
List<ODocument> resultset = database.query(new OSQLSynchQuery<ODocument>("select * from Profile").setFetchPlan("*:-1"));
```

### Export a document and its nested documents in JSON

Export an invoice and its customer:

```java
invoice.toJSON("fetchPlan:customer:1");
```

Export an invoice, its customer and orders:

```java
invoice.toJSON("fetchPlan:customer:1 orders:2");
```

Export an invoice and all the connected records up to 3rd level of depth:

```java
invoice.toJSON("fetchPlan:*:3");
```

From SQL:

```sql
SELECT @this.toJSON('fetchPlan:out_Friend:4') FROM #10:20
```

Export path in outgoing direction by removing all the incoming edges by using wildcards (Since 2.0):
```sql
SELECT @this.toJSON('fetchPlan:in_*:-2') FROM #10:20
```

>**NOTES:**:
>- To avoid looping, the record already traversed by fetching are exported only by their [RIDs](Concepts.md#recordid) (RecordID) form
>- "fetchPlan" setting is case sensitive

### Browse objects using a custom fetch plan

```java
for (Account a : database.browseClass(Account.class).setFetchPlan("*:0 addresses:-1")) {
  System.out.println( a.getName() );
}
```

>**NOTE:** Fetching Object will mean their presence inside your domain entities. So if you load an object using fetchplan `*:0` all LINK type references won't be loaded._

redpajama_set_name: RedPajamaGithub


text:
require('./board');
require('./piece');
require('./game');
require('./shape');

require('./game-pieces/j-shape');
require('./game-pieces/o-shape');
require('./game-pieces/L-shape');


text: export { default } from 'compound-components/components/cc-field';


text:
module ChinaRegionFu
  VERSION = '0.1.0'
end


text:
package com.aspose.ocr.model;

import com.aspose.ocr.model.PagesInfo;
import com.aspose.ocr.model.PartsInfo;
public class OCRResponse {
  private String Text = null;
  private PartsInfo PartsInfo = null;
  private PagesInfo PagesInfo = null;
  private String Code = null;
  private String Status = null;
  /**
	 * getText
	 * Gets String
	 * @return Text
	 */
  public String getText() {
    return Text;
  }

	/**
	 * setText
	 * Sets String
	 * @param Text String
	 */
  public void setText(String Text) {
    this.Text = Text;
  }

  /**
	 * getPartsInfo
	 * Gets PartsInfo
	 * @return PartsInfo
	 */
  public PartsInfo getPartsInfo() {
    return PartsInfo;
  }

	/**
	 * setPartsInfo
	 * Sets PartsInfo
	 * @param PartsInfo PartsInfo
	 */
  public void setPartsInfo(PartsInfo PartsInfo) {
    this.PartsInfo = PartsInfo;
  }

  /**
	 * getPagesInfo
	 * Gets PagesInfo
	 * @return PagesInfo
	 */
  public PagesInfo getPagesInfo() {
    return PagesInfo;
  }

	/**
	 * setPagesInfo
	 * Sets PagesInfo
	 * @param PagesInfo PagesInfo
	 */
  public void setPagesInfo(PagesInfo PagesInfo) {
    this.PagesInfo = PagesInfo;
  }

  /**
	 * getCode
	 * Gets String
	 * @return Code
	 */
  public String getCode() {
    return Code;
  }

	/**
	 * setCode
	 * Sets String
	 * @param Code String
	 */
  public void setCode(String Code) {
    this.Code = Code;
  }

  /**
	 * getStatus
	 * Gets String
	 * @return Status
	 */
  public String getStatus() {
    return Status;
  }

	/**
	 * setStatus
	 * Sets String
	 * @param Status String
	 */
  public void setStatus(String Status) {
    this.Status = Status;
  }

  @Override
  public String toString()  {
    StringBuilder sb = new StringBuilder();
    sb.append("class OCRResponse {\n");
    sb.append("  Text: ").append(Text).append("\n");
    sb.append("  PartsInfo: ").append(PartsInfo).append("\n");
    sb.append("  PagesInfo: ").append(PagesInfo).append("\n");
    sb.append("  Code: ").append(Code).append("\n");
    sb.append("  Status: ").append(Status).append("\n");
    sb.append("}\n");
    return sb.toString();
  }
}


text:
import { formatFileSize, isDefinedGlobally } from './utils';

const messages = {
  _default: (field) => `Le champ ${field} n'est pas valide.`,
  after: (field, [target]) => `Le champ ${field} doit être postérieur à ${target}.`,
  alpha_dash: (field) => `Le champ ${field} ne peut contenir que des caractères alpha-numériques, tirets ou soulignés.`,
  alpha_num: (field) => `Le champ ${field} ne peut contenir que des caractères alpha-numériques.`,
  alpha_spaces: (field) => `Le champ ${field} ne peut contenir que des lettres ou des espaces.`,
  alpha: (field) => `Le champ ${field} ne peut contenir que des lettres.`,
  before: (field, [target]) => `Le champ ${field} doit être antérieur à ${target}.`,
  between: (field, [min, max]) => `Le champ ${field} doit être compris entre ${min} et ${max}.`,
  confirmed: (field, [confirmedField]) => `Le champ ${field} ne correspond pas à ${confirmedField}.`,
  credit_card: (field) => `Le champ ${field} est invalide.`,
  date_between: (field, [min, max]) => `Le champ ${field} doit être situé entre ${min} et ${max}.`,
  date_format: (field, [format]) => `Le champ ${field} doit être au format ${format}.`,
  decimal: (field, [decimals = '*'] = []) => `Le champ ${field} doit être un nombre et peut contenir ${decimals === '*' ? '' : decimals} décimales.`,
  digits: (field, [length]) => `Le champ ${field} doit être un nombre entier de ${length} chiffres.`,
  dimensions: (field, [width, height]) => `Le champ ${field} doit avoir une taille de ${width} pixels par ${height} pixels.`,
  email: (field) => `Le champ ${field} doit être une adresse e-mail valide.`,
  ext: (field) => `Le champ ${field} doit être un fichier valide.`,
  image: (field) => `Le champ ${field} doit être une image.`,
  in: (field) => `Le champ ${field} doit être une valeur valide.`,
  ip: (field) => `Le champ ${field} doit être une adresse IP.`,
  max: (field, [length]) => `Le champ ${field} ne peut pas contenir plus de ${length} caractères.`,
  max_value: (field, [max]) => `Le champ ${field} doit avoir une valeur de ${max} ou moins.`,
  mimes: (field) => `Le champ ${field} doit avoir un type MIME valide.`,
  min: (field, [length]) => `Le champ ${field} doit contenir au minimum ${length} caractères.`,
  min_value: (field, [min]) => `Le champ ${field} doit avoir une valeur de ${min} ou plus.`,
  not_in: (field) => `Le champ ${field} doit être une valeur valide.`,
  numeric: (field) => `Le champ ${field} ne peut contenir que des chiffres.`,
  regex: (field) => `Le champ ${field} est invalide.`,
  required: (field) => `Le champ ${field} est obligatoire.`,
  size: (field, [size]) => `Le champ ${field} doit avoir un poids inférieur à ${formatFileSize(size)}.`,
  url: (field) => `Le champ ${field} n'est pas une URL valide.`
};

const locale = {
  name: 'fr',
  messages,
  attributes: {}
};

if (isDefinedGlobally()) {
  // eslint-disable-next-line
  VeeValidate.Validator.localize({ [locale.name]: locale });
}

export default locale;


text:
namespace ctre {

// helper functions
template <size_t Index, typename... Content> auto convert_to_capture(ctll::list<Content...>) -> capture<Index, Content...>;
template <size_t Index, typename Name, typename... Content> auto convert_to_named_capture(ctll::list<Content...>) -> capture_with_name<Index, Name, Content...>;
template <template <size_t, size_t, typename...> typename CycleType, size_t A, size_t B, typename... Content> auto convert_to_repeat(ctll::list<Content...>) -> CycleType<A, B, Content...>;
template <template <typename...> typename ListType, typename... Content> auto convert_to_basic_list(ctll::list<Content...>) -> ListType<Content...>;

template <auto V> struct rotate_value {
	template <auto... Vs> friend constexpr auto operator+(string<Vs...>, rotate_value<V>) noexcept -> string<V, Vs...> { return {}; }
};

struct rotate_for_lookbehind {

// from atoms_characters.hpp
template <auto V> static auto rotate(character<V>) -> character<V>;
template <typename... Content> static auto rotate(negative_set<Content...>) -> negative_set<Content...>;
template <typename... Content> static auto rotate(set<Content...>) -> set<Content...>;
template <auto... Cs> static auto rotate(enumeration<Cs...>) -> enumeration<Cs...>;
template <typename... Content> static auto rotate(negate<Content...>) -> negate<Content...>;
template <auto A, auto B> static auto rotate(char_range<A,B>) -> char_range<A,B>;

// from atoms_unicode.hpp
template <auto... Str> static auto rotate(property_name<Str...>) -> property_name<Str...>;
template <auto... Str> static auto rotate(property_value<Str...>) -> property_value<Str...>;
template <typename T, T Type> static auto rotate(binary_property<T, Type>) -> binary_property<T, Type>;
template <typename T, T Type, auto Value> static auto rotate(property<T, Type, Value>) -> property<T, Type, Value>;

// from atoms.hpp
static auto rotate(accept) -> accept;
static auto rotate(reject) -> reject;
static auto rotate(start_mark) -> start_mark;
static auto rotate(end_mark) -> end_mark;
static auto rotate(end_cycle_mark) -> end_cycle_mark;
static auto rotate(end_lookahead_mark) -> end_lookahead_mark;
static auto rotate(end_lookbehind_mark) -> end_lookbehind_mark;
template <size_t Id> static auto rotate(numeric_mark<Id>) -> numeric_mark<Id>;
static auto rotate(any) -> any;

template <typename... Content> static auto rotate(select<Content...>) -> select<Content...>;
static auto rotate(empty) -> empty;

template <size_t a, size_t b, typename... Content> static auto rotate(repeat<a,b,Content...>) -> decltype(ctre::convert_to_repeat<repeat, a, b>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{})));
template <size_t a, size_t b, typename... Content> static auto rotate(lazy_repeat<a,b,Content...>) -> decltype(ctre::convert_to_repeat<lazy_repeat, a, b>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{})));
template <size_t a, size_t b, typename... Content> static auto rotate(possessive_repeat<a,b,Content...>) -> decltype(ctre::convert_to_repeat<possessive_repeat, a, b>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{})));

template <size_t Index, typename... Content> static auto rotate(capture<Index, Content...>) {
	return ctre::convert_to_capture<Index>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{}));
}

template <size_t Index, typename Name, typename... Content> static auto rotate(capture_with_name<Index, Name, Content...>) {
	return ctre::convert_to_named_capture<Index, Name>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{}));
}

template <size_t Index> static auto rotate(back_reference<Index>) -> back_reference<Index>;
template <typename Name> static auto rotate(back_reference_with_name<Name>) -> back_reference_with_name<Name>;

template <typename... Content> static auto rotate(look_start<Content...>) -> look_start<Content...>;

template <auto... Str> static auto rotate(string<Str...>) -> decltype((string<>{} + ... + rotate_value<Str>{}));

template <typename... Content> static auto rotate(sequence<Content...>) {
	return ctre::convert_to_basic_list<sequence>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{}));
}

// we don't rotate lookaheads
template <typename... Content> static auto rotate(lookahead_positive<Content...>) -> lookahead_positive<Content...>;
template <typename... Content> static auto rotate(lookahead_negative<Content...>) -> lookahead_negative<Content...>;
template <typename... Content> static auto rotate(lookbehind_positive<Content...>) -> lookbehind_positive<Content...>;
template <typename... Content> static auto rotate(lookbehind_negative<Content...>) -> lookbehind_negative<Content...>;

static auto rotate(atomic_start) -> atomic_start;

template <typename... Content> static auto rotate(atomic_group<Content...>) {
	return ctre::convert_to_basic_list<atomic_group>(ctll::rotate(ctll::list<decltype(rotate(Content{}))...>{}));
}

template <typename... Content> static auto rotate(boundary<Content...>) -> boundary<Content...>;
template <typename... Content> static auto rotate(not_boundary<Content...>) -> not_boundary<Content...>;

static auto rotate(assert_subject_begin) -> assert_subject_begin;
static auto rotate(assert_subject_end) -> assert_subject_end;
static auto rotate(assert_subject_end_line) -> assert_subject_end_line;
static auto rotate(assert_line_begin) -> assert_line_begin;
static auto rotate(assert_line_end) -> assert_line_end;

};

}

#endif


text:
<?php

namespace jubianchi\PhpSwitch\Event;

use Symfony\Component\EventDispatcher\GenericEvent;

class Event extends GenericEvent
{
    public function __construct($name, $subject = null, array $arguments = array())
    {
        parent::__construct($subject, $arguments);

        $this->setName($name);
    }
}


text:
**Note** this document describes the plan for automated testing and release of pltraining modules, some modules may not yet be fully automated.

Because these modules are used in live training, it's
important that any changes have been thoroughly tested
against all courses. This document outlines the release
process used by the Puppet Education team.

## Release process steps
1. Changes are proposed via pull request.
1. Automated tests are triggered on Travis-CI
1. The Puppet Education team reviews the pull requests and merges to the `master` branch
  * PRs should not be merged unless they pass the automated tests.
  * Major code changes should include appropriate automated test coverage.
  * Although `master` is a development branch care should be take to be sure no breaking changes are introduced.
1. Automated acceptance tests run nightly against the `master` branch.
1. Once all nightly tests pass, changes are merged into the `release` branch.
1. At the discretion of the Education team, releases are tagged in the `release` branch and published.
  * This should include a review of testing coverage and gaps should be fixed and tests rerun before publishing.
1. Tagged releases are tested a final time before being automatically pushed to the forge.
  * Because tagged releases are automatically built and uploaded, they should be considered the same as uploading a module to the forge.


text:
import mongoose from 'mongoose';
import appConfig from './config/env';
import logger from './lib/utils/logger';

export default init => {
  // connect to db
  mongoose.connect(appConfig.mongoUrl);
  const db = mongoose.connection;

  db.on('error', logger.error.bind(logger, 'DB connection error:'));
  db.once('open', () => {
    logger.info('DB connected.')
    init();
  });
}


text:
//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//----------------------------------------------------------------

namespace Traffiq.Lucy.ExternalRuleSetToolkit.Properties {

    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {

        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

        public static Settings Default {
            get {
                return defaultInstance;
            }
        }
    }
}


text:
ALTER TABLE [dbo].[RUNTIME_CONVERSION_HISTORY]
	ADD CONSTRAINT [FK_ConvHistory_to_SessionRun]
	FOREIGN KEY (SessionRunId)
	REFERENCES RUNTIME_SESSION_RUNS (Id)


text:
<?php
/**
 * Created by PhpStorm.
 * User: naffiq
 * Date: 5/25/17
 * Time: 17:23
 */

namespace naffiq\RocketTools\config;

/**
 * Class ConfigHelper
 *
 * Responsible for getting and setting global configs
 *
 * @package naffiq\RocketTools\config
 */
class ConfigHelper
{
    /**
     * Gets default config path, which can be overriden by `ROCKET_TOOLS_HOME` environment variable
     *
     * @return array|false|string
     */
    protected static function getConfigDir()
    {
        if (getenv('ROCKET_TOOLS_HOME')) {
            return getenv('ROCKET_TOOLS_HOME');
        }

        return getenv('HOME') . '/.rocket-tools';
    }

    /**
     * Gets default location of config file with full path, which can be overriden by `ROCKET_TOOLS_HOME` environment variable
     *
     * @return array|false|string
     */
    public static function getConfigFile()
    {
        return self::getConfigDir() . '/config.json';
    }

    /**
     * Parses config file and gets value
     *
     * @param string $configName
     * @param mixed $default
     *
     * @return mixed
     */
    public static function get($configName, $default = null)
    {
        $config = self::parseConfigFile();

        return !empty($config[$configName]) ? $config[$configName] : $default;
    }

    /**
     * Parses and returns config file
     *
     * @return array|mixed
     */
    public static function getAll()
    {
        return static::parseConfigFile();
    }

    /**
     * Saves new config option to config file
     *
     * @param string $configName
     * @param mixed $value
     *
     * @return bool|int
     */
    public static function set($configName, $value)
    {
        $config = self::parseConfigFile();
        $config[$configName] = $value;

        if (!file_exists(self::getConfigDir())) {
            mkdir(self::getConfigDir());
        }

        return file_put_contents(self::getConfigFile(), json_encode($config));
    }

    /**
     * Parses config file json code to array, or returns empty array if config not found
     *
     * @return array|mixed
     */
    protected static function parseConfigFile()
    {
        if (file_exists(static::getConfigFile())) {
            $config = json_decode(file_get_contents(static::getConfigFile()), true);

            return !empty($config) ? $config : [];
        }

        return [];
    }
}


text:
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_zero_modulo_66b.c
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-66b.tmpl.c
*/
/*
 * @description
 * CWE: 369 Divide by Zero
 * BadSource: zero Fixed value of zero
 * GoodSource: Non-zero
 * Sinks: modulo
 *    GoodSink: Check for zero before modulo
 *    BadSink : Modulo a constant with data
 * Flow Variant: 66 Data flow: data passed in an array from one function to another in different source files
 *
 * */

#include "std_testcase.h"

#ifndef OMITBAD

void CWE369_Divide_by_Zero__int_zero_modulo_66b_badSink(int dataArray[])
{
    /* copy data out of dataArray */
    int data = dataArray[2];
    /* POTENTIAL FLAW: Possibly divide by zero */
    printIntLine(100 % data);
}

#endif /* OMITBAD */

#ifndef OMITGOOD

/* goodG2B uses the GoodSource with the BadSink */
void CWE369_Divide_by_Zero__int_zero_modulo_66b_goodG2BSink(int dataArray[])
{
    int data = dataArray[2];
    /* POTENTIAL FLAW: Possibly divide by zero */
    printIntLine(100 % data);
}

/* goodB2G uses the BadSource with the GoodSink */
void CWE369_Divide_by_Zero__int_zero_modulo_66b_goodB2GSink(int dataArray[])
{
    int data = dataArray[2];
    /* FIX: test for a zero denominator */
    if( data != 0 )
    {
        printIntLine(100 % data);
    }
    else
    {
        printLine("This would result in a divide by zero");
    }
}

#endif /* OMITGOOD */


text:
describe('Inverted index test', function() {

  var indexGen = new Index();

  describe('Read book data', function() {
    var jsonFile = indexGen.readJsonFile('books.json');
    it('should load json file', function() {

      expect(jsonFile).toBeDefined();
    });

    it('should expect title and text properties of json file objects to be strings', function() {

      expect(jsonFile[0].title).toEqual(jasmine.any(String));
      expect(jsonFile[0].text).toEqual(jasmine.any(String));
    });
  });

  describe('Populate Index', function() {

    indexGen.createIndex('books.json');
    var fileIndex = indexGen.getIndex();

    it('should create file index', function() {
      expect(fileIndex.uniqueTexts).toEqual(jasmine.any(Object));
    });

    it('should create file index', function() {
      expect(fileIndex.textIndex).toEqual(jasmine.any(Object));
    });

    var indexOfA = fileIndex.uniqueTexts.indexOf('a');

    it('should create file index', function() {
      expect(fileIndex.textIndex[indexOfA]).toEqual([0, 1]);
    });
  });

  describe('Search index', function() {

    indexGen.createIndex('books.json');

    it('should return correct index of search strings', function() {

      expect(indexGen.searchIndex('a')).toEqual([0, 1]);
      expect(indexGen.searchIndex('imagination')).toEqual([0]);
      expect(indexGen.searchIndex('imaggination')).toEqual(-1);
    });
  });
});


text:
namespace espoir{
	Console::Console(){
		AllocConsole();
	}
}


text:
package cloudcredentials

// The json/yaml config key for the aws cloud credential config
const AmazonEC2CredentialConfigurationFileKey = "awsCredentials"

// AmazonEC2CredentialConfig is configuration need to create an aws cloud credential
type AmazonEC2CredentialConfig struct {
	AccessKey     string `json:"accessKey" yaml:"accessKey"`
	SecretKey     string `json:"secretKey" yaml:"secretKey"`
	DefaultRegion string `json:"defaultRegion,omitempty" yaml:"defaultRegion"`
}


text:
package org.nd4j.bytebuddy.arrays.assign.relative.novalue;

import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.implementation.Implementation;
import net.bytebuddy.implementation.bytecode.ByteCodeAppender;
import net.bytebuddy.implementation.bytecode.StackManipulation;
import net.bytebuddy.implementation.bytecode.collection.ArrayAccess;
import net.bytebuddy.implementation.bytecode.constant.IntegerConstant;
import net.bytebuddy.jar.asm.MethodVisitor;
import net.bytebuddy.pool.TypePool;

/**
 * Handles loading the proper index
 * To assign an element to an array the byte code looks like the following:
 *   public static void main(java.lang.String[]);
 Code:
 0: invokestatic  #2                  // Method returnArr:()[I <- this is our reference
 3: astore_1 //store the variable in 1
 4: aload_1 //load the actual variable 1
 5: iconst_0 push a 0 on the stack (now we're here asking for the index of the array based on the given variable
 6: iconst_5 //push a 5 on to the stack (this is the value we want to assign in the array)
 7: iastore //do the actual store operation, we don't do this here
 8: return
 }

 * This is intended to be used with the following method signature:
 * void(int[] arr,int index,int value)
 *
 * @author Adam Gibson
 */
public class RelativeAssignNoValueArrayValueAppender implements ByteCodeAppender {
    private int index;
    private static TypePool typePool = TypePool.Default.ofClassPath();

    /**
     *
     * @param index the index to enqueue
     */
    public RelativeAssignNoValueArrayValueAppender(int index) {
        this.index = index;
    }

    @Override
    public Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext,
                    MethodDescription instrumentedMethod) {
        //initialize the stack with the array access with this as reference 0 and the array (first argument) as reference 1
        StackManipulation compound = assignOperation();
        StackManipulation.Size size = compound.apply(methodVisitor, implementationContext);
        //resolve the type to store in the array and retrieve the store command
        StackManipulation store = ArrayAccess.of(typePool.describe("int").resolve()).store();
        size = size.aggregate(store.apply(methodVisitor, implementationContext));
        return new Size(size.getMaximalSize(), instrumentedMethod.getStackSize());
    }

    public StackManipulation assignOperation() {
        //load the index
        StackManipulation indexToAssign = IntegerConstant.forValue(index);
        //set the return type
        StackManipulation.Compound compound = new StackManipulation.Compound(indexToAssign);
        return compound;
    }
}


text:
<!doctype html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>My AngularJS App</title>
  <link rel="stylesheet" href="css/app.css"/>
  <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
  <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

  <link rel="stylesheet" type="text/css" href="https://google-code-prettify.googlecode.com/svn/loader/prettify.css">

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
          Toggle navigation

        </button>
        Project WebRTC+AngularJs

Home

Login

Chat

Angular seed app: v


text:
package com.badlogic.gdx.graphics.g3d.utils;

import com.badlogic.gdx.graphics.g3d.ModelInstance;
import com.badlogic.gdx.graphics.g3d.model.Animation;
import com.badlogic.gdx.graphics.g3d.model.Node;
import com.badlogic.gdx.graphics.g3d.model.NodeAnimation;
import com.badlogic.gdx.graphics.g3d.model.NodeKeyframe;
import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.ObjectMap;
import com.badlogic.gdx.utils.ObjectMap.Entry;
import com.badlogic.gdx.utils.Pool;
import com.badlogic.gdx.utils.Pool.Poolable;

/** Base class for applying one or more {@link Animation}s to a {@link ModelInstance}. This class only applies the actual
 * {@link Node} transformations, it does not manage animations or keep track of animation states. See {@link AnimationController}
 * for an implementation of this class which does manage animations.
 *
 * @author Xoppa */
public class BaseAnimationController {
	public final static class Transform implements Poolable {
		public final Vector3 translation = new Vector3();
		public final Quaternion rotation = new Quaternion();
		public final Vector3 scale = new Vector3(1, 1, 1);

		public Transform () {
		}

		public Transform idt () {
			translation.set(0, 0, 0);
			rotation.idt();
			scale.set(1, 1, 1);
			return this;
		}

		public Transform set (final Vector3 t, final Quaternion r, final Vector3 s) {
			translation.set(t);
			rotation.set(r);
			scale.set(s);
			return this;
		}

		public Transform set (final Transform other) {
			return set(other.translation, other.rotation, other.scale);
		}

		public Transform lerp (final Transform target, final float alpha) {
			return lerp(target.translation, target.rotation, target.scale, alpha);
		}

		public Transform lerp (final Vector3 targetT, final Quaternion targetR, final Vector3 targetS, final float alpha) {
			translation.lerp(targetT, alpha);
			rotation.slerp(targetR, alpha);
			scale.lerp(targetS, alpha);
			return this;
		}

		public Matrix4 toMatrix4 (final Matrix4 out) {
			return out.set(translation, rotation, scale);
		}

		@Override
		public void reset () {
			idt();
		}

		@Override
		public String toString () {
			return translation.toString() + " - " + rotation.toString() + " - " + scale.toString();
		}
	}

	private final Pool<Transform> transformPool = new Pool<Transform>() {
		@Override
		protected Transform newObject () {
			return new Transform();
		}
	};
	private final static ObjectMap<Node, Transform> transforms = new ObjectMap<Node, Transform>();
	private boolean applying = false;
	/** The {@link ModelInstance} on which the animations are being performed. */
	public final ModelInstance target;

	/** Construct a new BaseAnimationController.
	 * @param target The {@link ModelInstance} on which the animations are being performed. */
	public BaseAnimationController (final ModelInstance target) {
		this.target = target;
	}

	/** Begin applying multiple animations to the instance, must followed by one or more calls to {
	 * {@link #apply(Animation, float, float)} and finally {{@link #end()}. */
	protected void begin () {
		if (applying) throw new GdxRuntimeException("You must call end() after each call to being()");
		applying = true;
	}

	/** Apply an animation, must be called between {{@link #begin()} and {{@link #end()}.
	 * @param weight The blend weight of this animation relative to the previous applied animations. */
	protected void apply (final Animation animation, final float time, final float weight) {
		if (!applying) throw new GdxRuntimeException("You must call begin() before adding an animation");
		applyAnimation(transforms, transformPool, weight, animation, time);
	}

	/** End applying multiple animations to the instance and update it to reflect the changes. */
	protected void end () {
		if (!applying) throw new GdxRuntimeException("You must call begin() first");
		for (Entry<Node, Transform> entry : transforms.entries()) {
			entry.value.toMatrix4(entry.key.localTransform);
			transformPool.free(entry.value);
		}
		transforms.clear();
		target.calculateTransforms();
		applying = false;
	}

	/** Apply a single animation to the {@link ModelInstance} and update the it to reflect the changes. */
	protected void applyAnimation (final Animation animation, final float time) {
		if (applying) throw new GdxRuntimeException("Call end() first");
		applyAnimation(null, null, 1.f, animation, time);
		target.calculateTransforms();
	}

	/** Apply two animations, blending the second onto to first using weight. */
	protected void applyAnimations (final Animation anim1, final float time1, final Animation anim2, final float time2,
		final float weight) {
		if (anim2 == null || weight == 0.f)
			applyAnimation(anim1, time1);
		else if (anim1 == null || weight == 1.f)
			applyAnimation(anim2, time2);
		else if (applying)
			throw new GdxRuntimeException("Call end() first");
		else {
			begin();
			apply(anim1, time1, 1.f);
			apply(anim2, time2, weight);
			end();
		}
	}

	private final static Transform tmpT = new Transform();

	/** Find first key frame index just before a given time
	 * @param arr Key frames ordered by time ascending
	 * @param time Time to search
	 * @return key frame index, 0 if time is out of key frames time range */
	final static <T> int getFirstKeyframeIndexAtTime (final Array<NodeKeyframe<T>> arr, final float time) {
		final int lastIndex = arr.size - 1;

		// edges cases : time out of range always return first index
		if (lastIndex <= 0 || time < arr.get(0).keytime || time > arr.get(lastIndex).keytime) {
			return 0;
		}

		// binary search
		int minIndex = 0;
		int maxIndex = lastIndex;

		while (minIndex < maxIndex) {
			int i = (minIndex + maxIndex) / 2;
			if (time > arr.get(i + 1).keytime) {
				minIndex = i + 1;
			} else if (time < arr.get(i).keytime) {
				maxIndex = i - 1;
			} else {
				return i;
			}
		}
		return minIndex;
	}

	private final static Vector3 getTranslationAtTime (final NodeAnimation nodeAnim, final float time, final Vector3 out) {
		if (nodeAnim.translation == null) return out.set(nodeAnim.node.translation);
		if (nodeAnim.translation.size == 1) return out.set(nodeAnim.translation.get(0).value);

		int index = getFirstKeyframeIndexAtTime(nodeAnim.translation, time);
		final NodeKeyframe firstKeyframe = nodeAnim.translation.get(index);
		out.set((Vector3)firstKeyframe.value);

		if (++index < nodeAnim.translation.size) {
			final NodeKeyframe<Vector3> secondKeyframe = nodeAnim.translation.get(index);
			final float t = (time - firstKeyframe.keytime) / (secondKeyframe.keytime - firstKeyframe.keytime);
			out.lerp(secondKeyframe.value, t);
		}
		return out;
	}

	private final static Quaternion getRotationAtTime (final NodeAnimation nodeAnim, final float time, final Quaternion out) {
		if (nodeAnim.rotation == null) return out.set(nodeAnim.node.rotation);
		if (nodeAnim.rotation.size == 1) return out.set(nodeAnim.rotation.get(0).value);

		int index = getFirstKeyframeIndexAtTime(nodeAnim.rotation, time);
		final NodeKeyframe firstKeyframe = nodeAnim.rotation.get(index);
		out.set((Quaternion)firstKeyframe.value);

		if (++index < nodeAnim.rotation.size) {
			final NodeKeyframe<Quaternion> secondKeyframe = nodeAnim.rotation.get(index);
			final float t = (time - firstKeyframe.keytime) / (secondKeyframe.keytime - firstKeyframe.keytime);
			out.slerp(secondKeyframe.value, t);
		}
		return out;
	}

	private final static Vector3 getScalingAtTime (final NodeAnimation nodeAnim, final float time, final Vector3 out) {
		if (nodeAnim.scaling == null) return out.set(nodeAnim.node.scale);
		if (nodeAnim.scaling.size == 1) return out.set(nodeAnim.scaling.get(0).value);

		int index = getFirstKeyframeIndexAtTime(nodeAnim.scaling, time);
		final NodeKeyframe firstKeyframe = nodeAnim.scaling.get(index);
		out.set((Vector3)firstKeyframe.value);

		if (++index < nodeAnim.scaling.size) {
			final NodeKeyframe<Vector3> secondKeyframe = nodeAnim.scaling.get(index);
			final float t = (time - firstKeyframe.keytime) / (secondKeyframe.keytime - firstKeyframe.keytime);
			out.lerp(secondKeyframe.value, t);
		}
		return out;
	}

	private final static Transform getNodeAnimationTransform (final NodeAnimation nodeAnim, final float time) {
		final Transform transform = tmpT;
		getTranslationAtTime(nodeAnim, time, transform.translation);
		getRotationAtTime(nodeAnim, time, transform.rotation);
		getScalingAtTime(nodeAnim, time, transform.scale);
		return transform;
	}

	private final static void applyNodeAnimationDirectly (final NodeAnimation nodeAnim, final float time) {
		final Node node = nodeAnim.node;
		node.isAnimated = true;
		final Transform transform = getNodeAnimationTransform(nodeAnim, time);
		transform.toMatrix4(node.localTransform);
	}

	private final static void applyNodeAnimationBlending (final NodeAnimation nodeAnim, final ObjectMap<Node, Transform> out,
		final Pool<Transform> pool, final float alpha, final float time) {

		final Node node = nodeAnim.node;
		node.isAnimated = true;
		final Transform transform = getNodeAnimationTransform(nodeAnim, time);

		Transform t = out.get(node, null);
		if (t != null) {
			if (alpha > 0.999999f)
				t.set(transform);
			else
				t.lerp(transform, alpha);
		} else {
			if (alpha > 0.999999f)
				out.put(node, pool.obtain().set(transform));
			else
				out.put(node, pool.obtain().set(node.translation, node.rotation, node.scale).lerp(transform, alpha));
		}
	}

	/** Helper method to apply one animation to either an objectmap for blending or directly to the bones. */
	protected static void applyAnimation (final ObjectMap<Node, Transform> out, final Pool<Transform> pool, final float alpha,
		final Animation animation, final float time) {

		if (out == null) {
			for (final NodeAnimation nodeAnim : animation.nodeAnimations)
				applyNodeAnimationDirectly(nodeAnim, time);
		} else {
			for (final Node node : out.keys())
				node.isAnimated = false;
			for (final NodeAnimation nodeAnim : animation.nodeAnimations)
				applyNodeAnimationBlending(nodeAnim, out, pool, alpha, time);
			for (final ObjectMap.Entry<Node, Transform> e : out.entries()) {
				if (!e.key.isAnimated) {
					e.key.isAnimated = true;
					e.value.lerp(e.key.translation, e.key.rotation, e.key.scale, alpha);
				}
			}
		}
	}

	/** Remove the specified animation, by marking the affected nodes as not animated. When switching animation, this should be call
	 * prior to applyAnimation(s). */
	protected void removeAnimation (final Animation animation) {
		for (final NodeAnimation nodeAnim : animation.nodeAnimations) {
			nodeAnim.node.isAnimated = false;
		}
	}
}


text:
/*
 * Antonin Bas (antonin@barefootnetworks.com)
 *
 */

#include <iostream>
#include <mutex>
#include <unordered_map>
#include <cassert>

#include "pd/pd_learning.h"

#define NUM_DEVICES 256

namespace {

struct AgeingCb {
  p4_pd_notify_timeout_cb cb_fn;
  void *cb_cookie;
};

struct AgeingState {
  // maps table id to call back
  std::unordered_map<int, AgeingCb> cbs;
};

AgeingState *device_state[NUM_DEVICES];

typedef struct {
  char sub_topic[4];
  uint64_t switch_id;
  uint32_t cxt_id;
  uint64_t buffer_id;
  int table_id;
  unsigned int num_entries;
} __attribute__((packed)) ageing_hdr_t;

static_assert(sizeof(ageing_hdr_t) == 32u, "Invalid size for ageing header");

}  // namespace

extern "C" {

p4_pd_status_t ${pd_prefix}ageing_set_cb(int dev_id, int table_id,
					 p4_pd_notify_timeout_cb cb_fn,
					 void *cb_cookie) {
  AgeingState *state = device_state[dev_id];
  state->cbs[table_id] = {cb_fn, cb_cookie};
  return 0;
}

p4_pd_status_t ${pd_prefix}ageing_new_device(int dev_id) {
  device_state[dev_id] = new AgeingState();
  return 0;
}

p4_pd_status_t ${pd_prefix}ageing_remove_device(int dev_id) {
  assert(device_state[dev_id]);
  delete device_state[dev_id];
  return 0;
}

void ${pd_prefix}ageing_notification_cb(const char *hdr, const char *data) {
  const ageing_hdr_t *ageing_hdr = reinterpret_cast<const ageing_hdr_t *>(hdr);
  // std::cout << "I received " << ageing_hdr->num_entries << " expired handles "
  //           << "for table " << ageing_hdr->table_id << std::endl;
    const AgeingState *state = device_state[ageing_hdr->switch_id];
    const auto it = state->cbs.find(ageing_hdr->table_id);
    if (it != state->cbs.end()) {
      const AgeingCb &cb = it->second;
      const uint32_t *handles = reinterpret_cast<const uint32_t *>(data);
      for(unsigned int i = 0; i < ageing_hdr->num_entries; i++) {
        cb.cb_fn(handles[i], cb.cb_cookie);
      }
    }
}

}


text:
Configuration
=============

In the config directory there is an example configuration file for nginx with oauth2_proxy.
There is also a template configuration ``app.cfg`` for rubberband that you can copy into ``/etc/rubberband/`` and change it according to your needs.
You will find required and optional attributes indicated in that file.

Rubberband and Elasticsearch
----------------------------

Set a port and a production URL, as well as secret tokens and the elasticsearch URL.
You can also require elasticsearch to verify certificates.

optional Gitlab
---------------

Specify URL, private token and the project indices where you develop your LP-Solver.


text:
<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.github.dtsopensource</groupId>
		<artifactId>dts-parent</artifactId>
		<version>1.0.0-SNAPSHOT</version>
	</parent>

	<artifactId>dts-remote-example</artifactId>
	<packaging>war</packaging>

	<dependencies>
		<dependency>
			<groupId>org.github.dtsopensource</groupId>
			<artifactId>dts-core</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.github.dtsopensource</groupId>
			<artifactId>dts-schedule</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mybatis</groupId>
			<artifactId>mybatis-spring</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.logback-extensions</groupId>
			<artifactId>logback-ext-spring</artifactId>
		</dependency>
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
		</dependency>
		<!-- spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- spring3.x json转换 -->
		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-core-lgpl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-mapper-lgpl</artifactId>
		</dependency>
	</dependencies>
	<build>
		<finalName>dts-remote-example</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<configuration>
					<outputDirectory>../target</outputDirectory>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infodinamica.Framework.Repository.Tools
{
    /// <summary>
    /// Especifica el tipo de orden
    /// </summary>
    public enum OrderType
    {
        /// <summary>
        /// Orden Ascendiente (Por defecto)
        /// </summary>
        OrderBy,
        /// <summary>
        /// Orden Descendiente
        /// </summary>
        OrderByDescending
    }
}


text:
'use strict';

const assert = require('assert');
let userUtils = require('./../../dev-tools/users-utils');
let User = userUtils.User;

describe('Simulator abstraction layer features', function () {
	describe('Battle', function () {
		describe('player identifiers', function () {
			let p1, p2, room;
			afterEach(function () {
				if (p1) {
					p1.disconnectAll();
					p1.destroy();
				}
				if (p2) {
					p2.disconnectAll();
					p2.destroy();
				}
				if (room) room.destroy();
			});

			it('should not get players out of sync in rated battles on rename', function () {
				// Regression test for 47263c8749
				let packedTeam = 'Weavile||lifeorb||swordsdance,knockoff,iceshard,iciclecrash|Jolly|,252,,,4,252|||||';
				p1 = new User();
				p2 = new User();
				p1.forceRename("Missingno."); // Don't do this at home
				room = Rooms.global.startBattle(p1, p2, '', packedTeam, packedTeam, {rated: true});
				p1.resetName();
				for (let i = 0; i < room.battle.playerNames.length; i++) {
					let playerName = room.battle.playerNames[i];
					let playerData = room.battle['p' + (i + 1)];
					assert.strictEqual(playerData.name, playerName);
					assert.strictEqual(playerData, room.battle.players[toId(playerName)]);
				}
			});
		});
	});
});


text:
@implementation BrandModel

@end


text:
<os-head-bar [nav]="false">

{{ block.title }}

        <form [formGroup]="blockEditForm" (ngSubmit)="saveBlock()" (keydown)="onKeyDown($event)" *ngIf="editBlock">
            <mat-form-field>
                <input
                    type="text"
                    matInput
                    osAutofocus
                    required
                    formControlName="title"
                    placeholder="{{ 'Title' | translate }}"
                />
            </mat-form-field>
        </form>

        <button type="button" mat-icon-button [matMenuTriggerFor]="motionBlockMenu">
            <mat-icon>more_vert</mat-icon>
        </button>

        <button mat-button (click)="saveBlock()">Save</button>

</os-head-bar>

<mat-card>
    <button
        *osPerms="['motions.can_manage', 'motions.can_manage_metadata']"
        mat-raised-button
        color="primary"
        (click)="onFollowRecButton()"
        [disabled]="isFollowingProhibited()"
    >
        <mat-icon>done_all</mat-icon>
        Follow recommendations for all motions
    </button>

        <ng-container matColumnDef="title">
            <mat-header-cell *matHeaderCellDef mat-sort-header> Motion </mat-header-cell>
            <mat-cell *matCellDef="let motion" (click)="onClickMotionTitle(motion)">
                {{ motion.getTitle() }}
            </mat-cell>
        </ng-container>

        <ng-container matColumnDef="state">
            <mat-header-cell *matHeaderCellDef> State </mat-header-cell>
            <mat-cell class="chip-container" *matCellDef="let motion">
                <mat-basic-chip disableRipple [ngClass]="motion.stateCssColor">
                    {{ getStateLabel(motion) }}
                </mat-basic-chip>
            </mat-cell>
        </ng-container>

        <ng-container matColumnDef="recommendation">
            <mat-header-cell *matHeaderCellDef> Recommendation </mat-header-cell>
            <mat-cell class="chip-container" *matCellDef="let motion">
                <mat-basic-chip disableRipple class="bluegrey">
                    {{ getRecommendationLabel(motion) }}
                </mat-basic-chip>
            </mat-cell>
        </ng-container>

        <ng-container matColumnDef="remove">
            <mat-header-cell *matHeaderCellDef></mat-header-cell>
            <mat-cell *matCellDef="let motion">
                <button
                    type="button"
                    mat-icon-button
                    color="warn"
                    matTooltip="{{ 'Remove from motion block' | translate }}"
                    (click)="onRemoveMotionButton(motion)"
                >
                    <mat-icon>close</mat-icon>
                </button>
            </mat-cell>
        </ng-container>

        <mat-header-row *matHeaderRowDef="getColumnDefinition()"></mat-header-row>
        <mat-row *matRowDef="let row; columns: getColumnDefinition()"> </mat-row>

</mat-card>

<mat-menu #motionBlockMenu="matMenu">
    <button mat-menu-item [routerLink]="getSpeakerLink()">
        <mat-icon>mic</mat-icon>
        List of speakers
    </button>

    <os-projector-button *ngIf="block" [object]="block" [menuItem]="true"></os-projector-button>

        <button mat-menu-item (click)="toggleEditMode()">
            <mat-icon>edit</mat-icon>
            Edit title
        </button>
        <mat-divider></mat-divider>

        <button mat-menu-item class="red-warning-text" (click)="onDeleteBlockButton()">
            <mat-icon>delete</mat-icon>
            Delete
        </button>

</mat-menu>


text:
package com.hisun.util.Decoder;

import java.io.IOException;

public class CEFormatException extends IOException
{
	public CEFormatException(String s)
	{
		super(s);
	}
}


text:
require 'deep_merge'

Puppet::Type.type(:docker_stack).provide(:ruby) do
  desc 'Support for Puppet running Docker Stacks'

  mk_resource_methods

  has_command(:docker, 'docker')

  def exists?
    Puppet.info("Checking for stack #{name}")
    stack_services = {}
    stack_containers = []
    resource[:compose_files].each do |file|
      compose_file = YAML.safe_load(File.read(file), [], [], true)
      # rubocop:disable Style/StringLiterals
      containers = docker([
                            'ps',
                            '--format',
                            "{{.Label \"com.docker.swarm.service.name\"}}-{{.Image}}",
                            '--filter',
                            "label=com.docker.stack.namespace=#{name}",
                          ]).split("\n").each do |c|
                            c.slice!("#{name}_")
                          end
      stack_containers.push(*containers)
      stack_containers.uniq!
      # rubocop:enable Style/StringLiterals
      case compose_file['version']
      when %r{^3(\.[0-7])?$}
        stack_services.merge!(compose_file['services'])
      else
        raise(Puppet::Error, "Unsupported docker compose file syntax version \"#{compose_file['version']}\"!")
      end
    end

    if stack_services.count != stack_containers.count
      return false
    end
    counts = Hash[*stack_services.each.map { |key, array|
                    image = (array['image']) ? array['image'] : get_image(key, stack_services)
                    image = "#{image}:latest" unless image.include?(':')
                    Puppet.info("Checking for compose service #{key} #{image}")
                    ["#{key}-#{image}", stack_containers.count("#{key}-#{image}")]
                  }.flatten]
    # No containers found for the project
    if counts.empty? ||
       # Containers described in the compose file are not running
       counts.any? { |_k, v| v.zero? }
      false
    else
      true
    end
  end

  def get_image(service_name, stack_services)
    image = stack_services[service_name]['image']
    unless image
      if stack_services[service_name]['extends']
        image = get_image(stack_services[service_name]['extends'], stack_services)
      elsif stack_services[service_name]['build']
        image = "#{name}_#{service_name}"
      end
    end
    image
  end

  def create
    Puppet.info("Running stack #{name}")
    args = ['stack', 'deploy', compose_files, name].insert(1, bundle_file).insert(4, resource[:up_args]).compact
    docker(args)
  end

  def destroy
    Puppet.info("Removing docker stack #{name}")
    rm_args = ['stack', 'rm', name]
    docker(rm_args)
  end

  def bundle_file
    return resource[:bundle_file].map { |x| ['-c', x] }.flatten unless resource[:bundle_file].nil?
  end

  def compose_files
    resource[:compose_files].map { |x| ['-c', x] }.flatten
  end
end


text:
"""Wrapper script to use Pywikibot in 'directory' mode.

Run scripts using:

    python pwb.py <name_of_script> <options>

and it will use the package directory to store all user files, will fix up
search paths so the package does not need to be installed, etc.
"""
# (C) Pywikibot team, 2015
#
# Distributed under the terms of the MIT license.
#
from __future__ import print_function, unicode_literals
__version__ = '$Id: 0c31b260bd06f6fc1ca6c8a18e85e9bb761cb92e $'

# The following snippet was developed by Ned Batchelder (and others)
# for coverage [1], with python 3 support [2] added later,
# and is available under the BSD license (see [3])
# [1] https://bitbucket.org/ned/coveragepy/src/b5abcee50dbe/coverage/execfile.py
# [2] https://bitbucket.org/ned/coveragepy/src/fd5363090034/coverage/execfile.py
# [3] https://bitbucket.org/ned/coveragepy/src/2c5fb3a8b81c/setup.py?at=default#cl-31

import os
import sys
import types

from warnings import warn

PYTHON_VERSION = sys.version_info[:3]
PY2 = (PYTHON_VERSION[0] == 2)

versions_required_message = """
Pywikibot 2.0 is not available on:
%s

Pywikibot is only supported under Python 2.7.2+ or 3.3+
"""

def python_is_supported():
    """Check that Python is supported."""
    # Any change to this must be copied to setup.py
    return (PYTHON_VERSION >= (3, 3, 0) or
            (PY2 and PYTHON_VERSION >= (2, 7, 2)))

if not python_is_supported():
    raise RuntimeError(versions_required_message % sys.version)

pwb = None

def tryimport_pwb():
    """Try to import pywikibot.

    If so, we need to patch pwb.argvu, too.
    If pywikibot is not available, we create a mock object to remove the
    need for if statements further on.
    """
    global pwb
    try:
        import pywikibot  # noqa
        pwb = pywikibot
    except RuntimeError:  # no user-config.py provided
        os.environ['PYWIKIBOT2_NO_USER_CONFIG'] = '2'
        import pywikibot  # noqa
        pwb = pywikibot

def run_python_file(filename, argv, argvu, package=None):
    """Run a python file as if it were the main program on the command line.

    `filename` is the path to the file to execute, it need not be a .py file.
    `args` is the argument array to present as sys.argv, as unicode strings.

    """
    tryimport_pwb()

    # Create a module to serve as __main__
    old_main_mod = sys.modules['__main__']
    # it's explicitly using str() to bypass unicode_literals in Python 2
    main_mod = types.ModuleType(str('__main__'))
    sys.modules['__main__'] = main_mod
    main_mod.__file__ = filename
    if sys.version_info[0] > 2:
        main_mod.__builtins__ = sys.modules['builtins']
    else:
        main_mod.__builtins__ = sys.modules['__builtin__']
    if package:
        # it's explicitly using str() to bypass unicode_literals in Python 2
        main_mod.__package__ = str(package)

    # Set sys.argv and the first path element properly.
    old_argv = sys.argv
    old_argvu = pwb.argvu
    old_path0 = sys.path[0]

    sys.argv = argv
    pwb.argvu = argvu
    sys.path[0] = os.path.dirname(filename)

    try:
        with open(filename, 'rb') as f:
            source = f.read()
        exec(compile(source, filename, "exec", dont_inherit=True),
             main_mod.__dict__)
    finally:
        # Restore the old __main__
        sys.modules['__main__'] = old_main_mod

        # Restore the old argv and path
        sys.argv = old_argv
        sys.path[0] = old_path0
        pwb.argvu = old_argvu

# end of snippet from coverage

def abspath(path):
    """Convert path to absolute path, with uppercase drive letter on win32."""
    path = os.path.abspath(path)
    if path[0] != '/':
        # normalise Windows drive letter
        # TODO: use pywikibot.tools.first_upper
        path = path[0].upper() + path[1:]
    return path

if sys.version_info[0] not in (2, 3):
    raise RuntimeError("ERROR: Pywikibot only runs under Python 2 "
                       "or Python 3")
version = tuple(sys.version_info)[:3]
if version < (2, 6, 5):
    raise RuntimeError("ERROR: Pywikibot only runs under Python 2.6.5 "
                       "or higher")
if version >= (3, ) and version < (3, 3):
    raise RuntimeError("ERROR: Pywikibot only runs under Python 3.3 "
                       "or higher")

# Establish a normalised path for the directory containing pwb.py.
# Either it is '.' if the user's current working directory is the same,
# or it is the absolute path for the directory of pwb.py
absolute_path = abspath(os.path.dirname(sys.argv[0]))
rewrite_path = absolute_path

sys.path = [sys.path[0], rewrite_path,
            os.path.join(rewrite_path, 'pywikibot', 'compat'),
            os.path.join(rewrite_path, 'externals')
            ] + sys.path[1:]

# try importing the known externals, and raise an error if they are not found
try:
    import httplib2
    if not hasattr(httplib2, '__version__'):
        print("httplib2 import problem: httplib2.__version__ does not exist.")
        if sys.version_info > (3, 3):
            print("Python 3.4+ has probably loaded externals/httplib2 "
                  "although it doesnt have an __init__.py.")
        httplib2 = None
except ImportError as e:
    print("ImportError: %s" % e)
    httplib2 = None

if not httplib2:
    print("Python module httplib2 >= 0.6.0 is required.")
    print("Did you clone without --recursive?\n"
          "Try running 'git submodule update --init' "
          "or 'pip install httplib2'.")
    sys.exit(1)

# httplib2 0.6.0 was released with __version__ as '$Rev$'
#                and no module variable CA_CERTS.
if httplib2.__version__ == '$Rev$' and 'CA_CERTS' not in httplib2.__dict__:
    httplib2.__version__ = '0.6.0'
from distutils.version import StrictVersion
if StrictVersion(httplib2.__version__) < StrictVersion("0.6.0"):
    print("Python module httplib2 (%s) needs to be 0.6.0 or greater." %
          httplib2.__file__)
    print("Did you clone without --recursive?\n"
          "Try running 'git submodule update --init' "
          "or 'pip install --upgrade httplib2'.")
    sys.exit(1)

del httplib2

if len(sys.argv) > 1 and sys.argv[1][0] != '-':
    filename = sys.argv[1]
else:
    filename = None

# Skip the filename if one was given
args = sys.argv[(2 if filename else 1):]

# Search for user-config.py before creating one.
try:
    # If successful, user-config.py already exists in one of the candidate
    # directories. See config2.py for details on search order.
    # Use env var to communicate to config2.py pwb.py location (bug 72918).
    _pwb_dir = os.path.split(__file__)[0]
    if sys.platform == 'win32' and sys.version_info[0] < 3:
        _pwb_dir = str(_pwb_dir)
    os.environ[str('PYWIKIBOT2_DIR_PWB')] = _pwb_dir
    import pywikibot  # noqa
except RuntimeError as err:
    # user-config.py to be created
    print("NOTE: 'user-config.py' was not found!")
    if not filename.startswith('generate_'):
        print("Please follow the prompts to create it:")
        run_python_file('generate_user_files.py',
                        ['generate_user_files.py'],
                        [u'generate_user_files.py'])
        # because we have loaded pywikibot without user-config.py loaded, we need to re-start
        # the entire process. Ask the user to do so.
        sys.exit(1)

def main():
    """Command line entry point."""
    global filename
    if filename:
        file_package = None
        tryimport_pwb()
        argvu = pwb.argvu[1:]
        if not filename.endswith('.py'):
            filename += '.py'
        if not os.path.exists(filename):
            testpath = os.path.join(os.path.split(__file__)[0],
                                    'scripts',
                                    filename)
            file_package = 'scripts'
            if os.path.exists(testpath):
                filename = testpath
            else:
                raise OSError("%s not found!" % filename)

        # When both pwb.py and the filename to run are within the current
        # working directory:
        # a) set __package__ as if called using python -m scripts.blah.foo
        # b) set __file__ to be relative, so it can be relative in backtraces,
        #    and __file__ *appears* to be an unstable path to load data from.
        # This is a rough (and quick!) emulation of 'package name' detection.
        # a much more detailed implementation is in coverage's find_module.
        # https://bitbucket.org/ned/coveragepy/src/default/coverage/execfile.py
        cwd = abspath(os.getcwd())
        if absolute_path == cwd:
            absolute_filename = abspath(filename)[:len(cwd)]
            if absolute_filename == cwd:
                relative_filename = os.path.relpath(filename)
                # remove the filename, and use '.' instead of path separator.
                file_package = os.path.dirname(
                    relative_filename).replace(os.sep, '.')
                filename = os.path.join(os.curdir, relative_filename)

        if file_package and file_package not in sys.modules:
            try:
                __import__(file_package)
            except ImportError as e:
                warn('Parent module %s not found: %s'
                     % (file_package, e), ImportWarning)

        run_python_file(filename, [filename] + args, argvu, file_package)
        return True
    else:
        return False

if __name__ == '__main__':
    if not main():
        print(__doc__)


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Septoria dactylina Gonz. Frag.

### Remarks
null


text:
<!DOCTYPE html>

  <title>details.js</title>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" media="all" href="../../doc-style.css" />

      Files
      Headings

details.js

  ¶

catch simple errors

"use strict";

  ¶

declare aurora-app namespace if it doesn't already exist

var aurora =  aurora || {};

  ¶

note View-name (Details) matches name of template file Details.html

aurora.Details = Backbone.View.extend({

    template: _.template(""),

    events: {
        "blur .input" : "blurHandler",
        "click #moviesave" : "saveHandler",
        "click #moviedel" : "deleteHandler",
    "dragover #drop-zone": "dragoverHandler",
    "drop #drop-zone": "dropHandler"
    },

    blurHandler: function(event) {
    aurora.utils.showNotice("info","Note! To make changes permanent, click \"Save Changes\" button").hideNotice();

    var key = event.target.name;
        var value = event.target.value;

    this.model.validateItem(event);
        this.model.set(key, value);
    },

  saveHandler: function(event) {

  ¶

run validation checks on all fields before proceeding

    var list = ['title', 'released', 'director', 'rating', 'starring', 'duration', 'genre', 'synopsis', 'trailer']
    var i = 0;
    var error = false;
    for (i=0; i<list.length; i++){
      var value = document.getElementsByName(list[i])[0].value;
      var bool = this.model.validators[list[i]](value)[0];
      var message = this.model.validators[list[i]](value)[1];
      if ( bool == false){
        error = true;
        var sel = "input[name="+list[i]+"]";
        $(sel).parent().addClass('has-error');
        $(sel).next().html(message);
      }
      else{
        var sel = "input[name="+list[i]+"]";
        $(sel).parent().removeClass('has-error');
        $(sel).next().html("");
      }
    }
    console.log();
    if (error == true){
      aurora.utils.showNotice("danger","Cannot save changes. Please fix the form errors first!").hideNotice();
    }
    else{

  ¶

ready to proceed

      this.collection.fetch();
      this.collection.add(this.model);
      this.model.save();

  ¶

var url = "movies/";

  ¶

aurora.app.navigate('#movies/', {replace:true});

      aurora.utils.showNotice("success", "Movie Saved!").hideNotice();

    }
  },

  deleteHandler: function(){
    this.model.destroy({
      wait: true,  // don't destroy client model until server responds
      success: function(model, response) {

  ¶

later, we'll navigate to the browse view upon success

        aurora.app.navigate('#', {replace:true, trigger:true});

  ¶

notification panel, defined in section 2.6

        aurora.utils.showNotice('Success', "Movie Deleted!", 'alert-success')
      },

    error: function(model, response) {

  ¶

display the error response from the server

      aurora.utils.requestFailed(response);
    }
    });
  },

  ¶

Handle drag-n-drop picture

  dragoverHandler: function(event) {

  ¶

don't let parent element catch event

    event.stopPropagation();

  ¶

prevent default to enable drop event

    event.preventDefault();

  ¶

jQuery event doesn't have dataTransfer
field - so use originalEvent

    event.originalEvent.dataTransfer.dropEffect =
    'copy';
  },

  dropHandler: function (event) {
    event.stopPropagation(); event.preventDefault();
    var ev = event.originalEvent;

  ¶

set object attribute for use by uploadPicture

    this.pictureFile = ev.dataTransfer.files[0];

  ¶

only process image files

    if (false) ) {

  ¶

Read image file and display in img tag

    this.imageRead(this.pictureFile, this.pictureFile.type);
    }
    else{
        aurora.utils.showNotice("danger","Invalid file! You can only drag image files!").hideNotice();
    }
  },

  ¶

render the View

    render: function () {
    this.$el.html(this.template(this.model.toJSON()));
      return this;    // support method chaining
    }

});


text:
package com.snowplowanalytics.snowplow.enrich
package common
package enrichments
package registry
package apirequest

// Scalaz
import scalaz._
import Scalaz._
import Validation.FlatMap._

// Scala
import scala.util.control.NonFatal

// Json4s
import org.json4s.{JNothing, JObject, JValue}
import org.json4s.JsonDSL._
import org.json4s.jackson.{compactJson, parseJson}

// This project
import utils.JsonPath.{query, wrapArray}

/**
  * Base trait for API output format
  * Primary intention of these classes is to perform transformation
  * of API raw output to self-describing JSON instance
  */
case class Output(schema: String, json: Option[JsonOutput]) {

  /**
    * Transforming raw API response (text) to JSON
    * (in future A => JSON) and extracting value by output's path
    *
    * @param apiResponse response taken from `ApiMethod`
    * @return parsed extracted JSON
    */
  def parse(apiResponse: String): Validation[Throwable, JValue] = json match {
    case Some(jsonOutput) => jsonOutput.parse(apiResponse)
    case output =>
      new InvalidStateException(s"Error: Unknown output [$output]").failure // Cannot happen now
  }

  /**
    * Extract value specified by output's path
    *
    * @param value parsed API response
    * @return extracted validated JSON
    */
  def extract(value: JValue): Validation[Throwable, JValue] = json match {
    case Some(jsonOutput) => jsonOutput.extract(value)
    case output =>
      new InvalidStateException(s"Error: Unknown output [$output]").failure // Cannot happen now
  }

  /**
    * Add `schema` (Iglu URI) to parsed instance
    *
    * @param json JValue parsed from API
    * @return self-describing JSON instance
    */
  def describeJson(json: JValue): JObject =
    ("schema" -> schema) ~ ("data" -> json)
}

/**
  * Common trait for all API output formats
  *
  * @tparam A type of API response (XML, JSON, etc)
  */
sealed trait ApiOutput[A] {

  val path: String

  /**
    * Parse raw response into validated Output format (XML, JSON)
    *
    * @param response API response assumed to be JSON
    * @return validated JSON
    */
  def parse(response: String): Validation[Throwable, A]

  /**
    * Extract value specified by [[path]] and
    * transform to context-ready JSON data
    *
    * @param response parsed API response
    * @return extracted by [[path]] value mapped to JSON
    */
  def extract(response: A): Validation[Throwable, JValue]

  /**
    * Try to parse string as JSON and extract value by JSON PAth
    *
    * @param response API response assumed to be JSON
    * @return validated extracted value
    */
  def get(response: String): Validation[Throwable, JValue] =
    for {
      validated <- parse(response)
      result    <- extract(validated)
    } yield result
}

/**
  * Preference for extracting JSON from API output
  *
  * @param jsonPath JSON Path to required value
  */
case class JsonOutput(jsonPath: String) extends ApiOutput[JValue] {

  val path = jsonPath

  /**
    * Proxy function for [[query]] which wrap missing value in error
    *
    * @param json JSON value to look in
    * @return validated found JSON, with absent value treated like failure
    */
  def extract(json: JValue): Validation[Throwable, JValue] =
    query(path, json).map(wrapArray) match {
      case Success(JNothing) =>
        ValueNotFoundException(
          s"Error: no values were found by JSON Path [$jsonPath] in [${compactJson(json)}]").failure
      case other => other.leftMap(JsonPathException.apply)
    }

  def parse(response: String): Validation[Throwable, JValue] =
    try {
      parseJson(response).success
    } catch {
      case NonFatal(e) => e.failure
    }
}


text:
/**************************************************
 * Source Code for the Original Compiler for the
 * Programming Language Wake
 *
 * EntryPointAnalyzer.h
 *
 * Licensed under the MIT license
 * See LICENSE.TXT for details
 *
 * Author: Michael Fairhurst
 * Revised By:
 *
 **************************************************/

#ifndef HEADER_ENTRY_POINT_ANALYZER
#define HEADER_ENTRY_POINT_ANALYZER

#include <string>
#include <vector>
#include "SpecializableVarDecl.h"

using namespace std;

class ClassSpaceSymbolTable;

class EntryPointAnalyzer {

	public:
		bool checkClassNeedsCanBeMain(vector<SpecializableVarDecl<wake::QUALIFIED>*>* needs);
		bool checkFQClassMethodCanBeMain(string methodname, PureType<wake::QUALIFIED>* method);
		bool checkFQClassMethodCanBeMain(string classname, string methodname, ClassSpaceSymbolTable* table);
		bool printClass(string classname);
		bool printMethod(string methodname);

};

#endif


text:
/**
 * Module dependencies
 */

module.exports = function() {
  return function errorHandler(err, req, res, next) {
    var code = err.code || 500
      , title = err.title || "Server Error"
      , message = (process.env.NODE_ENV !== "production") ? err.message : err.stack;

    // TODO merge into a default message
    var response = {
      _links: {
        self: {href: req.resolve(req.url)}
      },
      _error: {
        title: title,
        code: code,
        message: message
      }
    };
    res.status(code);
    res.send(response);
  }
};


text:
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8" />
	<title>Phaser - Creando tu primer juego, parte 7</title>
	<script type="text/javascript" src="js/phaser.min.js"></script>
    <style type="text/css">
        body {
            margin: 0;
        }
    </style>
</head>
<body>

<script type="text/javascript">

var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });

function preload() {

    game.load.image('sky', 'assets/sky.png');
    game.load.image('ground', 'assets/platform.png');
    game.load.image('star', 'assets/star.png');
    game.load.spritesheet('dude', 'assets/dude.png', 32, 48);

}

var player;
var platforms;
var cursors;

function create() {

      //  Un fondo simple para nuestro juego
    game.add.sprite(0, 0, 'sky');

    //  El grupo 'platforms' contiene el suelo y las dos plataformas sobre las que podemos saltar
    platforms = game.add.group();

    // Aquí creamos el suelo
    var ground = platforms.create(0, game.world.height - 64, 'ground');

    // Lo escalamos para que se ajuste al ancho del juego (el sprite original es 400x32)
    ground.scale.setTo(2, 2);

    //  Esto hace que el suelo no se caiga cuando saltas en él. Lo hace inmóvil
    ground.body.immovable = true;

    //  Creamos las dos plataformas
    var ledge = platforms.create(400, 400, 'ground');
    ledge.body.immovable = true;

    ledge = platforms.create(-150, 250, 'ground');
    ledge.body.immovable = true;

    // El jugador y su configuración
    player = game.add.sprite(32, game.world.height - 150, 'dude');

    //  Las propiedades físicas del jugador. Le damos al chaval un pequeño rebote al caer (bounce)
    player.body.bounce.y = 0.2;
    player.body.gravity.y = 6; //gravedad
    player.body.collideWorldBounds = true; //choque con los bordes del juego

    // Las dos animaciones del jugador, andar izquierda y derecha ('left' y 'right', resp.)
    player.animations.add('left', [0, 1, 2, 3], 10, true);
    player.animations.add('right', [5, 6, 7, 8], 10, true);

    //  Los controles del jugador con teclado
    cursors = game.input.keyboard.createCursorKeys();

}

function update() {

    //  Hacer que el jugador colisione con las plataformas
    game.physics.collide(player, platforms);

    //  Resetear la velocidad del jugador (movimiento)
    player.body.velocity.x = 0;

    if (cursors.left.isDown) //si se presiona la tecla izda..
    {
        //  Mover a la izquierda
        player.body.velocity.x = -150;

        player.animations.play('left');
    }
    else if (cursors.right.isDown) //si se presiona derecha..
    {
        //  Mover a la derecha
        player.body.velocity.x = 150;

        player.animations.play('right');
    }
    else
    {
        //  sino, quedarse quieto
        player.animations.stop();

        player.frame = 4;
    }

    //  Si se presiona la tecla arriba y el jugador está tocando el suelo, que salte
    if (cursors.up.isDown && player.body.touching.down)
    {
        player.body.velocity.y = -350;
    }

}
</script>

</body>
</html>


text:
<?php

namespace NNWelcome\NticBundle\Entity\Repository;

use Doctrine\ORM\EntityRepository;

class EntityTypeRepository extends EntityRepository
{

}


text: from .utils import is_active


text:
module.exports = function(app){

	app.get('/', function(request, response){
		response.redirect('/projects');
	});

	app.get('/about', function(request, response){
		response.send("I'll fill out this page when I get to it.");
	});

};


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

 	<com.baidu.mapapi.map.MapView
        android:id="@+id/bmapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:clickable="true" />

 	<TextView
 	    android:id="@+id/current_mark"
 	    android:layout_width="match_parent"
 	    android:layout_height="wrap_content"
 	    android:layout_marginLeft="30dp"
 	    android:layout_alignParentRight="true"
 	    android:layout_marginRight="30dp"
 	    android:layout_marginTop="10dp"
 	    android:padding="10dp"
 	    android:text="当前地标:"
 	    android:textSize="18sp"
 	    android:background="@color/white"
 	    />

    <Button
        android:id="@+id/locate"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="100dp"
        android:layout_marginLeft="20dp"
        android:background="@drawable/img_dingwei"
        android:textColor="#FF000000" />

     <LinearLayout
        android:id="@+id/op_layout"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="50dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:orientation="horizontal"
        android:visibility="gone"
        >
        <Button
            android:id="@+id/mark_create"
            android:layout_width="75dp"
            android:layout_height="wrap_content"
            android:padding="10dp"
            android:text="新增地标"
            android:textSize="22sp"/>
        <Button
            android:id="@+id/mark_modify"
            android:layout_width="75dp"
            android:layout_height="wrap_content"
            android:padding="10dp"
            android:text="更新地标"
            android:textSize="22sp"/>
    </LinearLayout>

</RelativeLayout>


text:
using System;
using System.Windows;
using System.Windows.Data;

namespace Sautom.Client.Comunication.Converters
{
    public class GuidToVisibilityConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter,
            System.Globalization.CultureInfo culture)
        {
            return (Guid)value == Guid.Empty ? Visibility.Visible : Visibility.Hidden;
        }

        public object ConvertBack(object value, Type targetType, object parameter,
            System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}


text:
<!DOCTYPE html>

	<title>Sewing Pattern Downloads: Download Sewing Patterns From Our Website!</title>
	<meta name="description" content="You Can Make This offers sewing pattern downloads for clothing, bags, quilts, aprons, boutique wear and more! Visit our website to download sewing patterns today!" />
	<meta name="keywords" content="sewing pattern downloads, download sewing patterns" />
	<meta name="robots" content="index, follow" />
	<meta name="googlebot" content="index, follow" />
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<base href="http://www.youcanmakethis.com/">

		<meta name="google-site-verification" content="EtV0pLiCA6VIinEhb4-1ZVZqAa2Ul93Fyh88v07yW0o" />
	<link rel="shortcut icon" type="image/x-icon" href="http://www.youcanmakethis.com/favicon.ico" />
	<link rel="icon" type="image/png" href="http://www.youcanmakethis.com/favicon.ico" />

    YouCanMakeThis.com

                            Sewing Patterns
                                Crochet
                                Jewelry
                                Crafts & Hobbies
                                Stitchery
                                Quilting
                                Free

                <form name="siteSearch" action="search.htm" method="GET">
                    <button type="submit">Find It!</button>

                        <input type="text" name="q" value="" />

                </form>

                Your source for downloadable, step-by-step sewing patterns and project instructions!

            Sign-in or Register for Free
                    My Cart:
            Empty

                        Star Student Lunch Box
                                Ethan Button-up Shirt
                                The Starling Romper
                                Swimwear Separates
                                Welcome to YCMT
                                Preschool Backpack
                                Laguna Summer Shirts
                                9 Spring Felt Animal
                                Mr. Hipster Bow Tie
                                Crazy for Carrots
                                Newsletters

                        Star Student Lunch Box
                                Ethan Button-up Shirt
                                The Starling Romper
                                Swimwear Separates
                                Welcome to YCMT
                                Preschool Backpack
                                Laguna Summer Shirts
                                9 Spring Felt Animal
                                Mr. Hipster Bow Tie
                                Crazy for Carrots
                                Newsletters

I Made This

                        Leotards 3

Most Popular

                        Microwave Bowl Potholder

What's New

                        Zipster Romper

Quick Links

                            What People Are Saying
                            Affiliate Program
                            Gift Certificates
                            Author Program
                            Free Pattern Club Widget
                            Shop By Author
                            Newsletter Sign-up
                            Submit to I Made This

YCMT Blog

                                                                    Denise Knapp of Whimsy Couture
                                                                                Get Sewing with Barbara Edmondson
                                                                                Lynn Jeffries of The Handmaiden's Cottage
                                                                                Elizabeth Singler of Mamma Can Do It!
                                                                                Gail Seymour of Gaila Designs

        YouCanMakeThis.com provides thousands of free and affordable printable sewing patterns and instructions for fun craft projects.
        It's quick and convenient to get started! We offer instant access to step-by-step patterns for clothing, accessories, bags, aprons,
        boutique wear, and more. Browse our selection of downloadable patterns for sewing, crochet, crafts, stitchery,
        quilting and jewelry projects from various pattern designers. Find all types of patterns and designs for children,
        babies, women and men for sewers at all skill levels.

    <form id="formSiteNL" name="formSiteNL" action="index.htm" method="POST" onsubmit="return false;">
        <input type="text" name="fld_site_newsletter" id="fld_site_newsletter" value="Enter Your Email" />
        <button type="submit" onclick="siteNlGo();">Go!</button>
    </form>
    Free Pattern Club
    Pinterest
    Facebook

        Copyright © 2017 - YouCanMakeThis.com - All Rights Reserved.

        Free Pattern Club
        Privacy
        FAQs
        About
        Articles
        Contact Us


text:
package com.intellij.structuralsearch;

import com.intellij.codeInsight.daemon.quickFix.LightQuickFixTestCase;
import com.intellij.openapi.roots.LanguageLevelProjectExtension;
import com.intellij.openapi.util.io.FileUtilRt;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.pom.java.LanguageLevel;
import com.intellij.structuralsearch.plugin.replace.ReplaceOptions;
import com.intellij.structuralsearch.plugin.replace.impl.Replacer;

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

public abstract class StructuralReplaceTestCase extends LightQuickFixTestCase {
  protected ReplaceOptions options;

  @Override
  protected void setUp() throws Exception {
    super.setUp();

    LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_4);

    options = new ReplaceOptions();
  }

  protected String loadFile(String fileName) throws IOException {
    return FileUtilRt.loadFile(new File(getTestDataPath() + FileUtilRt.getExtension(fileName) + "/" + fileName), CharsetToolkit.UTF8, true);
  }

  protected String replace(String in, String what, String by) {
    return replace(in, what, by, false);
  }

  protected String replace(String in, String what, String by, boolean sourceIsFile) {
    final MatchOptions matchOptions = this.options.getMatchOptions();
    matchOptions.fillSearchCriteria(what);
    final String message = StructuralSearchTestCase.checkApplicableConstraints(matchOptions);
    assertNull(message, message);
    return Replacer.testReplace(in, what, by, this.options, getProject(), sourceIsFile);
  }
}


text:
clear
echo "============================================================"
echo "Installing CodeIgniter"
echo "============================================================"

# Install CodeIgniter
cd /var/www
wget http://c303150.r50.cf1.rackcdn.com/CodeIgniter_2.2.0.zip
unzip CodeIgniter_2.2.0.zip
sudo mv /var/www/CodeIgniter_2.2.0 /var/www/codeigniter

# Set Web Root to /var/www/codeigniter
sudo sed -i 's|DocumentRoot /var/www|DocumentRoot /var/www/codeigniter|' /etc/apache2/sites-enabled/000-default.conf
sudo sed -i 's|DocumentRoot /var/www|DocumentRoot /var/www/codeigniter|' /etc/apache2/sites-available/000-default.conf

# Set up the database
mysql -u root -e "CREATE DATABASE IF NOT EXISTS codeigniter"
mysql -u root -e "GRANT ALL PRIVILEGES ON codeigniter.* TO 'vagrant'@'localhost' IDENTIFIED BY 'vagrant'"

# Restart Apache
sudo service apache2 restart


text:
package com.blinkboxbooks.android.api.model;

import java.io.Serializable;

/** A list of {@link BBBSuggestion} objects */
public class BBBSuggestionList implements Serializable {

	private static final long serialVersionUID = 1L;

	/** the data type of this object */
	public String type;

	/** the array of {@link BBBSuggestion} objects */
	public BBBSuggestion[] items;
}


text: Final project for Chris Washburne's S15 Jazz Class.