text:
package org.apache.stratos.cloud.controller.domain;

import org.apache.stratos.common.Properties;

import java.io.Serializable;

/**
 * Holds information about a container cluster to be started.
 */
public class ContainerClusterContext implements Serializable {

    private static final long serialVersionUID = -388327475844701869L;
    // cluster id this Pod belongs to
    private String clusterId;
    // partition this member is in.
    private Partition partition;
    // instance id - derived from nodeId
    private String instanceId;
    //network partition id
    private String networkPartitionId;
    // properties
    private Properties properties;

    public ContainerClusterContext() {
    }

    public ContainerClusterContext(String clusterId) {
        this.clusterId = clusterId;
    }

    public String getClusterId() {
        return clusterId;
    }

    public void setClusterId(String clusterId) {
        this.clusterId = clusterId;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public Partition getPartition() {
        return partition;
    }

    public void setPartition(Partition partition) {
        this.partition = partition;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public String getNetworkPartitionId() {
        return networkPartitionId;
    }

    public void setNetworkPartitionId(String networkPartitionId) {
        this.networkPartitionId = networkPartitionId;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((clusterId == null) ? 0 : clusterId.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        ContainerClusterContext other = (ContainerClusterContext) obj;
        if (clusterId == null) {
            if (other.clusterId != null)
                return false;
        } else if (!clusterId.equals(other.clusterId))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "ContainerClusterContext [clusterId=" + clusterId + ", properties=" + properties
                + "]";
    }

}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="author" content="Pablo Guzman, Dan Huddell, Christine Moses">
    <meta name="keywords" content="bucketlist, wishlist, planning, to-do list, travel, self-improvement">
    <meta name="description" content="WDI Project 3, Bucketlist Creation and Planning App">
    <title>Bucketlist Creation and Planning App</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
    <link rel="icon" type="image/x-icon" href="styles/images/bucket.ico">
    <link href="./styles/main.css" rel="stylesheet">
    <link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>

          Bucketlist Builder

Log Out(current)

Turn Your Dreams into Reality

Start planning now for a more fulfilling future!

        <button type="button" class="btn btn-primary btn-lg" id="landing-page-reg-button" data-toggle="modal" data-target="#reg-popup">Register</button>

        <button type="button" class="btn btn-primary btn-lg" id="landing-page-login-button" data-toggle="modal" data-target="#login-popup">Log In</button>

            <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Login with Your Email Address

                            <form role="form" method="post" id="login-form" autocomplete="off">

                                Email
                                <input type="email" name="username" id="log-email" class="form-control" placeholder="Email Address">

                                Password
                                <input type="password" name="password" id="log-pw" class="form-control" placeholder="Password">

                              <input type="submit" id="btn-login" class="btn btn-custom btn-lg btn-block" value="Log In">
                            </form>

            <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Create a New Account

                            <form role="form" method="post" id="reg-form" autocomplete="off">

                                Email
                                <input type="email" name="username" id="reg-email" class="form-control" placeholder="Email Address">

                                Password
                                <input type="password" name="password" id="reg-pw" class="form-control" placeholder="Password">

                                <input type="submit" id="btn-login" class="btn btn-custom btn-lg btn-block" value="Register">
                            </form>

Create Your List

Get Inspired

Share with Friends

    <button type="button" class="btn btn-primary" id="show-activity-list">View Your List</button>

Your Bucketlist Activities

        Activity Name
        City

    <button type="button" class="btn btn-primary" id="add-new-activity" data-toggle="modal" data-target="#add-new-activity-popup">Add a New Activity</button>

            <button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>

Add a New Activity

            <form class="form-horizontal" id="create-activity">

                  Activity Name

                    <input type="text" name='name' class="form-control" placeholder="Activity Name">

                  City

                    <input type="text" name='city' class="form-control" placeholder="City Name">

                  <button type="submit" class="btn btn-default submit">Submit</button>

            </form>

Edit an Activity

            <form class="form-horizontal" id='update-activity' class='login_form'>

                  Activity Name

                    <input type="text" name='name' class="form-control" id='update-name' placeholder="Activity Name" required>

                  City

                    <input type="text" name='city' class="form-control" id='update-city'placeholder="City Name" required>

                  <button type="submit" class="btn btn-default submit">Submit</button>

            </form>

redpajama_set_name: RedPajamaGithub


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

namespace LiveCharts.Viewers
{
    public class PieSerieColorConverter : IValueConverter
    {
		public static PieSerieColorConverter Instance { get; set; }

        static PieSerieColorConverter()
	    {
		    Instance = new PieSerieColorConverter();
	    }
		private PieSerieColorConverter() { }

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var v = value as int?;
            return v == null ? Colors.Transparent : Series.GetColorByIndex(v.Value);
        }

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

    public class PieSerieLabelConverter : IMultiValueConverter
    {
		public static PieSerieLabelConverter Instance { get; set; }

        static PieSerieLabelConverter()
		{
			Instance = new PieSerieLabelConverter();
		}
		private PieSerieLabelConverter() { }

		public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            if (values == null || values.Length < 2) return null;

            var index = values[0] as int?;
		    var pieSeriesViewer = values[1] as PieSeriesViewer;
		    if (pieSeriesViewer != null)
		    {
		        var pieSeries = (pieSeriesViewer.Series)[0] as PieSeries;
		        if (pieSeries != null)
		        {
		            var context = pieSeries.Labels;

		            if (index == null || context == null) return null;

		            return context.Count  > index ? context[index.Value] : null;
		        }
		    }
            return null;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class TestConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var v = value;
            return null;
        }

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


text:
diff between today and yesterday

#### python
* [LyleMi/Learn-Web-Hacking](https://github.com/LyleMi/Learn-Web-Hacking): Study Notes For Web Hacking
* [H4ckForJob/dirmap](https://github.com/H4ckForJob/dirmap): webDirBusterDirsearchcansina
* [hzwer/LearningToPaint](https://github.com/hzwer/LearningToPaint): A painting AI that can reproduce paintings stroke by stroke using deep reinforcement learning.
* [home-assistant/home-assistant](https://github.com/home-assistant/home-assistant):  Open source home automation that puts local control and privacy first
* [ageitgey/face_recognition](https://github.com/ageitgey/face_recognition): The world's simplest facial recognition api for Python and the command line
* [xingyizhou/CenterNet](https://github.com/xingyizhou/CenterNet): Object detection, 3D detection, and pose estimation using center point detection:
* [NVlabs/SPADE](https://github.com/NVlabs/SPADE): Semantic Image Synthesis with SPADE
* [TuSimple/simpledet](https://github.com/TuSimple/simpledet): A Simple and Versatile Framework for Object Detection and Instance Recognition

#### go
* [nhooyr/websocket](https://github.com/nhooyr/websocket): A minimal and idiomatic WebSocket library for Go
* [gmemstr/Platypus](https://github.com/gmemstr/Platypus): Large-scale server monitoring application written in Golang
* [docker-slim/docker-slim](https://github.com/docker-slim/docker-slim): DockerSlim (docker-slim): Don't change anything in your Docker container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
* [geohot/minikeyvalue](https://github.com/geohot/minikeyvalue): A distributed key value store in under 200 lines

#### cpp
* [horovod/horovod](https://github.com/horovod/horovod): Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.
* [Tiramisu-Compiler/tiramisu](https://github.com/Tiramisu-Compiler/tiramisu): A polyhedral compiler for expressing fast and portable data parallel algorithms
* [CMU-Perceptual-Computing-Lab/openpose](https://github.com/CMU-Perceptual-Computing-Lab/openpose): OpenPose: Real-time multi-person keypoint detection library for body, face, hands, and foot estimation
* [everitoken/evt](https://github.com/everitoken/evt): Boost Engine for Token Economy
* [swoole/swoole-src](https://github.com/swoole/swoole-src):  Coroutine-based concurrency library for PHP (like Golang)
* [apple/swift](https://github.com/apple/swift): The Swift Programming Language
* [vitaut/_._](https://github.com/vitaut/_._): A simple streaming library
* [Tencent/mars](https://github.com/Tencent/mars): Mars is a cross-platform network component developed by WeChat.

#### javascript
* [Binaryify/NeteaseCloudMusicApi](https://github.com/Binaryify/NeteaseCloudMusicApi):  Node.js API service
* [fyuanfen/note](https://github.com/fyuanfen/note): JSReactVue
* [airbnb/javascript](https://github.com/airbnb/javascript): JavaScript Style Guide
* [hite/AppHost](https://github.com/hite/AppHost):  native  h5
* [twbs/bootstrap](https://github.com/twbs/bootstrap): The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.

#### coffeescript


text:
<?php echo '<?php'; ?>

/**
 * Automatically generated model configuration list for Frozennode Administrator
 *
 */

return array(
    'menu' => array(
    <?php echo View::make('schemabuilder::helpers.php_array', array('arr' => $mainMenu, 'indent' => 2)); ?>
    <?php echo View::make('schemabuilder::helpers.php_array', array('arr' => $menu, 'indent' => 2)); ?>
    ),
);


text:
'''Generate truth data from a truth_data_file.

A truth_data_file may be produced by a human being, so sometimes
it should be considered truth data. This file provides
utilities for turning a truth_data_file of a certain format into
truth data the harness understands.
'''

from __future__ import absolute_import
import argparse
import json
from bs4 import BeautifulSoup
import logging
import sys

from dossier.label import Label, LabelStore, CorefValue
import kvlayer
import yakonfig

logger = logging.getLogger(__name__)

def parse_passage(p):
    '''Extract a line_data dict from a passage's XML data and context.
    '''
    line_data = {}
    domain = p.parent.parent.parent
    topic = p.parent.parent
    subtopic = p.parent
    line_data['domain_id'] = domain['id'].encode('utf-8')
    line_data['domain_name'] = domain['name'].encode('utf-8')
    line_data['userid'] = 'dropped'
    line_data['username'] = 'dropped'
    line_data['topic_id'] = topic['id'].encode('utf-8')
    line_data['topic_name'] = topic['name'].encode('utf-8')
    line_data['subtopic_id'] = subtopic['id'].encode('utf-8')
    line_data['subtopic_name'] = subtopic['name'].encode('utf-8')
    line_data['passage_id'] = p['id'].encode('utf-8')
    line_data['passage_name'] = p.find('text').text.encode('utf-8')
    line_data['docno'] = p.docno.text.encode('utf-8')
    line_data['grade'] = p.rating.text.encode('utf-8')
    return line_data

def make_full_doc_id(doc_id, offset_start, offset_end):
    '''A full doc_id is of the form: doc_id#offset_start,offset_end
    '''
    offset_string = ','.join([offset_start, offset_end])
    return '#'.join([doc_id, offset_string])

def make_offset_string(offset_start, offset_end):
    '''Create an offset string from a pair of offsets.

    :param offset_start: str
    :param offset_end: str
    '''
    return ','.join([offset_start, offset_end])

def label_from_truth_data_file_line(line_data):
    '''Create a label from a *parsed* truth_data_file line.

    :param line_data: dict
    '''
    # document data
    doc_id = line_data['docno']
    if not doc_id.strip():
        logger.warn('dropping invalid truth data line: '
                    'bad docno: %r: %r'
                    % (doc_id, line_data))
        return None

    if len(line_data['passage_name'].strip()) < 1:
        logger.warn('dropping empty passage: %r', line_data)
        return None

    # annotation data
    topic_id = line_data['topic_id']
    subtopic_id = line_data['subtopic_id']
    passage_id = line_data['passage_id']
    annotator = line_data['userid']

    # value data
    value = CorefValue.Positive
    try:
        rating = int(line_data['grade'])
    except ValueError:
        logger.warn('replacing bogus grade with zero = %r',
                    line_data['grade'])
        rating = 0

    if rating < 0:
        value = CorefValue.Negative
        rating = 0

    # meta data
    meta = {'domain_name': line_data['domain_name'],
            'domain_id': line_data['domain_id'],
            'username': line_data['username'],
            'topic_name': line_data['topic_name'],
            'topic_id': line_data['topic_id'],
            'subtopic_name': line_data['subtopic_name'],
            'passage_text': line_data['passage_name']}

    label = Label(topic_id, doc_id, annotator, value,
                  subtopic_id1=subtopic_id, subtopic_id2=passage_id,
                  rating=rating, meta=meta)
    return label

def parse_truth_data(label_store, truth_data_path, batch_size=10000):
    data_file = open(truth_data_path, 'r')
    data = BeautifulSoup(data_file, 'xml')

    labels_to_put = []
    num_labels = 0
    for psg in data.find_all('passage'):
        line_data = parse_passage(psg)
        label = label_from_truth_data_file_line(line_data)
        if label is not None:
            labels_to_put.append(label)
            num_labels += 1
            if num_labels % 1000 == 0:
                logger.debug('Converted %d labels.' % num_labels)
            if len(labels_to_put) >= batch_size:
                label_store.put(*labels_to_put)
                labels_to_put = []
    if len(labels_to_put) > 0:
        label_store.put(*labels_to_put)

def main():
    parser = argparse.ArgumentParser('test tool for checking that we can load '
                                     'the truth data as distributed by NIST for '
                                     'TREC 2015')
    parser.add_argument('truth_data_path', help='path to truth data file')
    modules = [yakonfig, kvlayer]
    args = yakonfig.parse_args(parser, modules)
    logging.basicConfig(level=logging.DEBUG)
    kvl = kvlayer.client()
    label_store = LabelStore(kvl)
    parse_truth_data(label_store, args.truth_data_path)
    logger.debug('Done!  The truth data was loaded into this kvlayer backend: %r',
                 json.dumps(yakonfig.get_global_config('kvlayer'), indent=4,
                            sort_keys=True))

if __name__ == '__main__':
    main()


text:
<?php	 defined('C5_EXECUTE') or die("Access Denied."); ?>

<?php	 Loader::element('block_footer', array('b' => $b))?>

</div>


text:
var WinReg = require('winreg');
var startOnBoot = {
    enableAutoStart: function(name, file, callback){
        var key = getKey();
        key.set(name, WinReg.REG_SZ, file, callback || noop);
    },
    disableAutoStart: function(name, callback){
        var key = getKey();
        key.remove(name, callback || noop);
    },
    getAutoStartValue: function(name, callback){
        var key = getKey();
        key.get(name, function(error, result){
            if(result){
                callback(result.value);
            }
            else{
                callback(null, error);
            }
        });
    }
};

var RUN_LOCATION = '\\Software\\Microsoft\\Windows\\CurrentVersion\\Run';
function getKey(){
    return new WinReg({
        hive: WinReg.HKCU, //CurrentUser,
        key: RUN_LOCATION
    });
}

function noop(){}

module.exports = startOnBoot;


text:
class CreatePartners < ActiveRecord::Migration[5.1]
  def change
    create_table :partners do |t|
      t.string :name
      t.string :link
      t.integer :order
      t.boolean :site
      t.references :event, index: true, foreign_key: true

      t.timestamps null: false
    end
  end
end


text:
<?php
class SlideDeckLens_Proto extends SlideDeckLens_Scaffold {
    var $options_model = array(
        'Appearance' => array(
            'titleFont' => array(
                'value' => 'bitter'
            ),
            'hideSpines' => array(
                'type' => 'hidden',
                'value' => true
            )
        )
    );

    function __construct(){
        parent::__construct();
        add_filter( "{$this->namespace}_get_slides", array( &$this, "slidedeck_get_slides" ), 11, 2 );
    }

    /**
     * Adding the accent-color class to the <a> tags if Twitter
     *
     * @param array $slides Array of Slides
     * @param array $slidedeck The SlideDeck object being rendered
     *
     * @uses SlideDeckLens_Scaffold::is_valid()
     *
     * @return array
     */
    function slidedeck_get_slides( $slides, $slidedeck ){
        if( $this->is_valid( $slidedeck['lens'] ) ){
            foreach( $slides as &$slide ){
                if( $slidedeck['source'] == 'twitter' ){
                    $slide['content'] = preg_replace( '/\<a /', '<a class="accent-color" ', $slide['content'] );
                }
            }
        }
        return $slides;
    }
}


text:
module Transactionable
  class RemoteTransaction < RemoteEntity
  end
end


text:
<?php

/**
 * The plugin bootstrap file
 *
 * This file is read by WordPress to generate the plugin information in the plugin
 * admin area. This file also includes all of the dependencies used by the plugin,
 * registers the activation and deactivation functions, and defines a function
 * that starts the plugin.
 *
 * @link              https://conrad.pics
 * @since             1.0.0
 * @package           Club
 *
 * @wordpress-plugin
 * Plugin Name:       Club
 * Plugin URI:        https://conrad.pics/project/wp-club
 * Description:       This is a short description of what the plugin does. It's displayed in the WordPress admin area.
 * Version:           1.0.0
 * Author:            Stephan Conrad
 * Author URI:        https://conrad.pics
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       club
 * Domain Path:       /languages
 */

require_once dirname(__FILE__).'/vendor/autoload.php';

defined( 'ABSPATH' ) or die( 'No script kiddies please!' );

if ( ! function_exists('write_log')) {
   function write_log ( $log )  {
      if ( is_array( $log ) || is_object( $log ) ) {
         error_log( print_r( $log, true ) );
      } else {
         error_log( $log );
      }
   }
}

register_activation_hook(__FILE__, array('Club\Club', 'install'));
register_deactivation_hook(__FILE__, array('Club\Club', 'uninstall'));

Club\Club::run(dirname(__FILE__));


text:
#region Copyright Simple Injector Contributors

#endregion

namespace SimpleInjector.Decorators
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Linq.Expressions;
    using SimpleInjector.Advanced;
    using SimpleInjector.Lifestyles;

    // A list of all decorators applied to a given service type.
    internal sealed class ServiceTypeDecoratorInfo
    {
        private readonly Type registeredServiceType;
        private readonly List<DecoratorInfo> appliedDecorators = new List<DecoratorInfo>();

        internal ServiceTypeDecoratorInfo(Type registeredServiceType, Type implementationType,
            InstanceProducer originalProducer)
        {
            this.registeredServiceType = registeredServiceType;
            this.ImplementationType = implementationType;
            this.OriginalProducer = originalProducer;
        }

        internal Type ImplementationType { get; }

        internal InstanceProducer OriginalProducer { get; }

        internal IEnumerable<DecoratorInfo> AppliedDecorators => this.appliedDecorators;

        internal InstanceProducer GetCurrentInstanceProducer() =>
            this.AppliedDecorators.Any() ? this.AppliedDecorators.Last().DecoratorProducer : this.OriginalProducer;

        internal void AddAppliedDecorator(Type decoratorType, Container container, Lifestyle lifestyle,
            Expression decoratedExpression, IEnumerable<KnownRelationship> decoratorRelationships = null)
        {
            var registration = new ExpressionRegistration(decoratedExpression, decoratorType,
                lifestyle, container);

            registration.ReplaceRelationships(decoratorRelationships ?? Enumerable.Empty<KnownRelationship>());

            var producer = new InstanceProducer(this.registeredServiceType, registration);

            this.appliedDecorators.Add(new DecoratorInfo(decoratorType, producer));
        }
    }
}


text:
namespace base {
class Pickle;
}

namespace ui {

// |ScopedClipboardWriter|:
// - is a wrapper for |Clipboard|.
// - simplifies writing data to the system clipboard.
// - handles packing data into a Clipboard::ObjectMap.
//
// Upon deletion, the class atomically writes all data to the clipboard,
// avoiding any potential race condition with other processes that are also
// writing to the system clipboard.
class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
 public:
  // Create an instance that is a simple wrapper around the clipboard of the
  // given buffer with an optional parameter indicating the source of the data.
  // TODO(crbug.com/1103193): change its references to use
  // DataTransferEndpoint, if possible.
  explicit ScopedClipboardWriter(
      ClipboardBuffer buffer,
      std::unique_ptr<DataTransferEndpoint> src = nullptr);
  ScopedClipboardWriter(const ScopedClipboardWriter&) = delete;
  ScopedClipboardWriter& operator=(const ScopedClipboardWriter&) = delete;
  ~ScopedClipboardWriter();

  // Converts |text| to UTF-8 and adds it to the clipboard.
  void WriteText(const std::u16string& text);

  // Adds HTML to the clipboard.  The url parameter is optional, but especially
  // useful if the HTML fragment contains relative links.
  void WriteHTML(const std::u16string& markup, const std::string& source_url);

  // Adds SVG to the clipboard.
  void WriteSvg(const std::u16string& text);

  // Adds RTF to the clipboard.
  void WriteRTF(const std::string& rtf_data);

  // Adds text/uri-list filenames to the clipboard.
  // Security Note: This function is expected to be called only by exo in
  // Chrome OS. It should not be called by renderers or any other untrusted
  // party since any paths written to the clipboard can be read by renderers.
  void WriteFilenames(const std::string& uri_list);

  // Adds a bookmark to the clipboard.
  void WriteBookmark(const std::u16string& bookmark_title,
                     const std::string& url);

  // Adds an html hyperlink (<a href>) to the clipboard. |anchor_text| and
  // |url| will be escaped as needed.
  void WriteHyperlink(const std::u16string& anchor_text,
                      const std::string& url);

  // Used by WebKit to determine whether WebKit wrote the clipboard last
  void WriteWebSmartPaste();

  // Adds arbitrary pickled data to clipboard.
  void WritePickledData(const base::Pickle& pickle,
                        const ClipboardFormatType& format);

  // Data is written to the system clipboard in the same order as WriteData
  // calls are received.
  // This is only used to write custom format data.
  void WriteData(const std::u16string& format, mojo_base::BigBuffer data);

  void WriteImage(const SkBitmap& bitmap);

  // Mark the data to be written as confidential.
  void MarkAsConfidential();

  // Removes all objects that would be written to the clipboard.
  void Reset();

 private:
  // We accumulate the data passed to the various targets in the |objects_|
  // vector, and pass it to Clipboard::WritePortableRepresentations() during
  // object destruction.
  Clipboard::ObjectMap objects_;

  std::vector<Clipboard::PlatformRepresentation> platform_representations_;
  // Keeps track of the unique custom formats registered in the clipboard.
  base::flat_map<std::string, std::string> registered_formats_;
  int counter_ = 0;

  // The type is set at construction, and can be changed before committing.
  const ClipboardBuffer buffer_;

  SkBitmap bitmap_;

  bool confidential_ = false;

  // The source of the data written in ScopedClipboardWriter, nullptr means it's
  // not set, or the source of the data can't be represented by
  // DataTransferEndpoint.
  std::unique_ptr<DataTransferEndpoint> data_src_;
};

}  // namespace ui

#endif  // UI_BASE_CLIPBOARD_SCOPED_CLIPBOARD_WRITER_H_


text:
 Comments

Please enable JavaScript to view the comments powered by Disqus.


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TextAdventures.Quest;
using Moq;

namespace WorldModelTests
{
    [TestClass]
    public class Walkthrough
    {
        [TestMethod]
        public void RunWalkthrough()
        {
            string folder = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).Substring(6).Replace("/", @"\");
            string templateFolder = System.IO.Path.Combine(folder, @"..\..\..\WorldModel\WorldModel\Core");
            WorldModel worldModel = new WorldModel(
                System.IO.Path.Combine(folder, @"..\..\walkthrough.aslx"),
                templateFolder,
                null);

            Mock<IPlayer> player = new Mock<IPlayer>();
            worldModel.Initialise(player.Object);
            worldModel.Begin();

            foreach (string cmd in worldModel.Walkthroughs.Walkthroughs["debug"].Steps)
            {
                if (cmd.StartsWith("assert:"))
                {
                    string expr = cmd.Substring(7);
                    Assert.AreEqual(true, worldModel.Assert(expr), expr);
                }
                else
                {
                    worldModel.SendCommand(cmd);
                }
            }
        }
    }
}


text:
%matplotlib inline

# <codecell>

import matplotlib.pyplot as plt

import cartopy.crs as ccrs
from cartopy.io import shapereader
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER

def make_map(projection=ccrs.PlateCarree()):
    fig, ax = plt.subplots(figsize=(9, 13),
                           subplot_kw=dict(projection=projection))
    gl = ax.gridlines(draw_labels=True)
    gl.xlabels_top = gl.ylabels_right = False
    gl.xformatter = LONGITUDE_FORMATTER
    gl.yformatter = LATITUDE_FORMATTER
    return fig, ax

# <codecell>

from cartopy.feature import NaturalEarthFeature

extent = [-39, -38.25, -13.25, -12.5]

coast = NaturalEarthFeature(category='physical', scale='10m',
                            facecolor='none', name='coastline')

fig, ax = make_map(projection=ccrs.PlateCarree())

ax.set_extent(extent)

feature = ax.add_feature(coast, edgecolor='gray')

# <codecell>

from cartopy.io import img_tiles

tiles = img_tiles.OSM()

ax = plt.subplot(111, projection=ccrs.Mercator())
ax.set_extent(extent)
ax.add_image(tiles, 9)
ax.coastlines("10m")

# <codecell>

import netCDF4

# <codecell>

# <codecell>

from owslib.wcs import WebCoverageService
import numpy as np
import numpy.ma as ma
endpoint='http://geoport.whoi.edu/thredds/wcs/bathy/gom03_v1_0?service=WCS&version=1.0.0&request=GetCapabilities'

# <codecell>

wcs = WebCoverageService(endpoint,version='1.0.0',timeout=60)

# <codecell>

wcs.contents

# <codecell>

for k,v in wcs.contents.iteritems():
    print v.title

# <codecell>

# try Boston Harbor
bbox = (-71.05592748611777, 42.256890708126605, -70.81446033774644, 42.43833963977496)
output = wcs.getCoverage(identifier="topo",bbox=bbox,format='GeoTIFF',
                         resx=0.0003, resy=0.0003)

# <codecell>

f=open('test.tif','wb')
f.write(output.read())
f.close()

# <codecell>

from osgeo import gdal
gdal.UseExceptions()
ds = gdal.Open('test.tif')

# <codecell>

band = ds.GetRasterBand(1)
elevation = band.ReadAsArray()
nrows, ncols = elevation.shape

# I'm making the assumption that the image isn't rotated/skewed/etc.
# This is not the correct method in general, but let's ignore that for now
# If dxdy or dydx aren't 0, then this will be incorrect
x0, dx, dxdy, y0, dydx, dy = ds.GetGeoTransform()

if dxdy == 0.0:
    x1 = x0 + dx * ncols
    y1 = y0 + dy * nrows

# <codecell>

elevation=ma.masked_less_equal(elevation,-1.e5)

# <codecell>

from cartopy.feature import NaturalEarthFeature
extent = [-71.5, -70.5, 42.0, 42.7]

coast = NaturalEarthFeature(category='physical', scale='10m',
                            facecolor='none', name='coastline')

fig, ax = make_map(projection=ccrs.PlateCarree())

ax.set_extent(extent)

feature = ax.add_feature(coast, edgecolor='gray')

# <codecell>

# <codecell>

plt.figure(figsize=(8,10))
ax = plt.axes(projection=ccrs.PlateCarree())
#tiler = MapQuestOpenAerial()
#ax.add_image(tiler, 14)
plt.imshow(elevation, cmap='jet', extent=[x0, x1, y1, y0],
           transform=ccrs.PlateCarree(),alpha=0.6,zorder=2);
ax.gridlines(draw_labels=True,zorder=3);

# <codecell>


text:
package ch.ffhs.students.speedbump.navigator;

import android.location.Location;
import ch.ffhs.students.speedbump.navigator.enums.NavigatorStatus;
import ch.ffhs.students.speedbump.navigator.models.Road;

/**
 * Implemented by Classes that need to be updated by a NavigationProviderService.
 */
public interface ifNavigationObserver {

    /**
     * Calls observers when the current user location changed. Provides new and last location and distance
     * in meters between the two.
     * @param newLocation New user location.
     * @param lastLocation Previous user location (null if N/A).
     * @param distance Distance in meters
     */
    void onLocationChanged(Location newLocation, Location lastLocation, float distance);

    /**
     * Called when Navigator detects a change in speed.
     * @param newSpeed New speed in meters per second.
     */
    void onSpeedChanged(float newSpeed);

    /**
     * Called when Navigator detects a change in speed limit.
     * @param newSpeedLimit New speed limit in ???
     */
    void onSpeedLimitChanged(float newSpeedLimit);

    /**
     * Called when the Road the user is driving on changes.
     * @param newRoad Road user is currently moving on.
     */
    void onRoadChanged(Road newRoad);

    /**
     * Called when the maps service status changes (e.g. due to connection loss, etc)
     * @param status New Status enum
     */
    void onServiceStatusChanged(NavigatorStatus status);
}


text:
def some_user
  User.find(:first) || FactoryGirl.create(:user)
end

# Factory definitions
FactoryGirl.define do
  sequence :name do |n|
    "name_#{n}"
  end

  sequence :user do |n|
    "user#{n}"
  end

  sequence :email do |n|
    "user#{n}@example.com"
  end

  sequence :guid do |n|
    "deadbeef#{n}"
  end

  sequence :label do |n|
    "lab_#{n}"
  end

  sequence :file_name do |f|
    "file_name_#{f}"
  end

  sequence :category do |n|
    "c_#{n}"
  end

  basetime = Time.now

  sequence :time do |n|
    basetime - n
  end

  factory :user do
    login { FactoryGirl.generate(:user) }
    email { generate(:email) }
    name 'Bond'
    notify_via_email false
    notify_on_new_articles false
    notify_on_comments false
    password 'top-secret'
    settings({})
    state 'active'
    profile
    association :text_filter, factory: :textile
  end

  factory :article do
    title 'A big article'
    body 'A content with several data'
    extended 'extended content for fun'
    guid
    permalink 'a-big-article'
    published_at DateTime.new(2005,1,1,2,0,0)
    user
    categories []
    tags []
    published_comments []
    published_trackbacks []
    allow_comments true
    published true
    allow_pings true
  end

  factory :unpublished_article, :parent => :article do |a|
    a.published_at nil
    a.published false
  end

  factory :content do
  end

  factory :post_type do |p|
    p.name 'foobar'
    p.description "Some description"
  end

  factory :markdown, :class => :text_filter do
    name "markdown"
    description "Markdown"
    markup 'markdown'
    filters '--- []'
    params '--- {}'

    after :stub do |filter|
      TextFilter.stub(:find_by_name).with(filter.name) { filter }
    end
  end

  factory :smartypants, :parent => :markdown do |m|
    m.name "smartypants"
    m.description "SmartyPants"
    m.markup 'none'
    m.filters %q{ [:smartypants].to_yaml.inspect }
  end

  factory 'markdown smartypants', :parent => :smartypants do |m|
    m.name "markdown smartypants"
    m.description "Markdown with SmartyPants"
    m.markup 'markdown'
    m.filters [:smartypants]
  end

  factory :textile, :parent => :markdown do |m|
    m.name "textile"
    m.description "Textile"
    m.markup 'textile'
  end

  factory :none, :parent => :markdown do |m|
    name "none"
    description "None"
    markup 'none'

    after :stub do |filter|
      TextFilter.stub(:find_by_name).with('') { nil }
    end
  end

  factory :utf8article, :parent => :article do |u|
    u.title 'ルビー'
    u.permalink 'ルビー'
  end

  factory :second_article, :parent => :article do |a|
    a.title 'Another big article'
  end

  factory :article_with_accent_in_html, :parent => :article do |a|
    a.title 'article with accent'
    a.body 'écoute The future is cool!'
    a.permalink 'article-with-accent'
  end

  factory :blog do
    base_url 'http://myblog.net'
    hide_extended_on_rss true
    blog_name 'test blog'
    limit_article_display 2
    sp_url_limit 3
    plugin_avatar ''
    blog_subtitle "test subtitles"
    limit_rss_display 10
    ping_urls "http://ping.example.com/ping
http://alsoping.example.com/rpc/ping"
    geourl_location ""
    default_allow_pings false
    send_outbound_pings false
    sp_global true
    default_allow_comments true
    email_from "scott@sigkill.org"
    theme "typographic"
    association :text_filter, factory: :textile
    sp_article_auto_close 0
    link_to_author false
    comment_text_filter "markdown" #FactoryGirl.create(:markdown).name
    permalink_format "/%year%/%month%/%day%/%title%"
    use_canonical_url true

    after :stub do |blog|
      Blog.stub(:default) { blog }
      [blog.text_filter, blog.comment_text_filter].uniq.each do |filter|
        build_stubbed filter
      end
    end
  end

  factory :profile, :class => :profile do |l|
    l.label {FactoryGirl.generate(:label)}
    l.nicename 'Typo contributor'
    l.modules [:dashboard, :profile]
  end

  factory :profile_admin, :parent => :profile do |l|
    l.label {FactoryGirl.generate(:label)}
    l.nicename 'Typo administrator'
    l.modules [:dashboard, :write, :articles, :pages, :feedback, :themes, :sidebar, :users, :seo, :media, :settings, :profile]
  end

  factory :profile_publisher, :parent => :profile do |l|
    l.label 'publisher'
    l.nicename 'Blog publisher'
    l.modules [:users, :dashboard, :write, :articles, :pages, :feedback, :media]
  end

  factory :profile_contributor, :parent => :profile do |l|
  end

  factory :category do |c|
    c.name {FactoryGirl.generate(:category)}
    c.permalink {FactoryGirl.generate(:category)}
    c.position 1
  end

  factory :tag do |tag|
    tag.name {FactoryGirl.generate(:name)}
    tag.display_name { |a| a.name }
  end

  factory :resource do |r|
    r.filename {FactoryGirl.generate(:file_name)}
    r.mime 'image/jpeg'
    r.size 110
  end

  factory :redirect do |r|
    r.from_path 'foo/bar'
    r.to_path '/someplace/else'
  end

  factory :comment do
    published true
    article
    text_filter {FactoryGirl.create(:textile)}
    author 'Bob Foo'
    url 'http://fakeurl.com'
    body 'Test body'
    created_at '2005-01-01 02:00:00'
    updated_at '2005-01-01 02:00:00'
    published_at '2005-01-01 02:00:00'
    guid
    state 'ham'
  end

  factory :spam_comment, :parent => :comment do |c|
    c.state 'spam'
    c.published false
  end

  factory :ham_comment, :parent => :comment do |c|
    c.state 'ham'
    c.published false
  end

  factory :page do |p|
    p.name 'page_one'
    p.title 'Page One Title'
    p.body 'ho ho ho'
    p.created_at '2005-05-05 01:00:01'
    p.published_at '2005-05-05 01:00:01'
    p.updated_at '2005-05-05 01:00:01'
    p.user { some_user }
    p.published true
    p.state 'published'
  end

  factory :trackback do |t|
    published true
    state 'ham'
    article
    status_confirmed true
    blog_name 'Trackback Blog'
    title 'Trackback Entry'
    url 'http://www.example.com'
    excerpt 'This is an excerpt'
    guid 'dsafsadffsdsf'
    created_at Time.now
    updated_at Time.now
  end
end


text:
#ifndef _SQLITE_VDBE_H_
#define _SQLITE_VDBE_H_
#include <stdio.h>

/*
** A single VDBE is an opaque structure named "Vdbe".  Only routines
** in the source file sqliteVdbe.c are allowed to see the insides
** of this structure.
*/
typedef struct Vdbe Vdbe;

/*
** The names of the following types declared in vdbeInt.h are required
** for the VdbeOp definition.
*/
typedef struct Mem Mem;
typedef struct SubProgram SubProgram;

/*
** A single instruction of the virtual machine has an opcode
** and as many as three operands.  The instruction is recorded
** as an instance of the following structure:
*/
struct VdbeOp {
    u8 opcode;          /* What operation to perform */
    signed char p4type; /* One of the P4_xxx constants for p4 */
    u8 opflags;         /* Mask of the OPFLG_* flags in opcodes.h */
    u8 p5;              /* Fifth parameter is an unsigned character */
    int p1;             /* First operand */
    int p2;             /* Second parameter (often the jump destination) */
    int p3;             /* The third parameter */
    union {             /* fourth parameter */
        int i;                 /* Integer value if p4type==P4_INT32 */
        void *p;               /* Generic pointer */
        char *z;               /* Pointer to data for string (char array) types */
        i64 *pI64;             /* Used when p4type is P4_INT64 */
        double *pReal;         /* Used when p4type is P4_REAL */
        FuncDef *pFunc;        /* Used when p4type is P4_FUNCDEF */
        CollSeq *pColl;        /* Used when p4type is P4_COLLSEQ */
        Mem *pMem;             /* Used when p4type is P4_MEM */
        VTable *pVtab;         /* Used when p4type is P4_VTAB */
        KeyInfo *pKeyInfo;     /* Used when p4type is P4_KEYINFO */
        int *ai;               /* Used when p4type is P4_INTARRAY */
        SubProgram *pProgram;  /* Used when p4type is P4_SUBPROGRAM */
        int(*xAdvance)(BtCursor *, int *);
    } p4;
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
    char *zComment;          /* Comment to improve readability */
#endif
#ifdef VDBE_PROFILE
    u32 cnt;                 /* Number of times this instruction was executed */
    u64 cycles;              /* Total time spent executing this instruction */
#endif
#ifdef SQLITE_VDBE_COVERAGE
    int iSrcLine;            /* Source-code line that generated this opcode */
#endif
};
typedef struct VdbeOp VdbeOp;

/*
** A sub-routine used to implement a trigger program.
*/
struct SubProgram {
    VdbeOp *aOp;                  /* Array of opcodes for sub-program */
    int nOp;                      /* Elements in aOp[] */
    int nMem;                     /* Number of memory cells required */
    int nCsr;                     /* Number of cursors required */
    int nOnce;                    /* Number of OP_Once instructions */
    void *token;                  /* id that may be used to recursive triggers */
    SubProgram *pNext;            /* Next sub-program already visited */
};

/*
** A smaller version of VdbeOp used for the VdbeAddOpList() function because
** it takes up less space.
*/
struct VdbeOpList {
    u8 opcode;          /* What operation to perform */
    signed char p1;     /* First operand */
    signed char p2;     /* Second parameter (often the jump destination) */
    signed char p3;     /* Third parameter */
};
typedef struct VdbeOpList VdbeOpList;

/*
** Allowed values of VdbeOp.p4type
*/
#define P4_NOTUSED    0   /* The P4 parameter is not used */
#define P4_DYNAMIC  (-1)  /* Pointer to a string obtained from sqliteMalloc() */
#define P4_STATIC   (-2)  /* Pointer to a static string */
#define P4_COLLSEQ  (-4)  /* P4 is a pointer to a CollSeq structure */
#define P4_FUNCDEF  (-5)  /* P4 is a pointer to a FuncDef structure */
#define P4_KEYINFO  (-6)  /* P4 is a pointer to a KeyInfo structure */
#define P4_MEM      (-8)  /* P4 is a pointer to a Mem*    structure */
#define P4_TRANSIENT  0   /* P4 is a pointer to a transient string */
#define P4_VTAB     (-10) /* P4 is a pointer to an sqlite3_vtab structure */
#define P4_MPRINTF  (-11) /* P4 is a string obtained from sqlite3_mprintf() */
#define P4_REAL     (-12) /* P4 is a 64-bit floating point value */
#define P4_INT64    (-13) /* P4 is a 64-bit signed integer */
#define P4_INT32    (-14) /* P4 is a 32-bit signed integer */
#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
#define P4_SUBPROGRAM  (-18) /* P4 is a pointer to a SubProgram structure */
#define P4_ADVANCE  (-19) /* P4 is a pointer to BtreeNext() or BtreePrev() */

/* Error message codes for OP_Halt */
#define P5_ConstraintNotNull 1
#define P5_ConstraintUnique  2
#define P5_ConstraintCheck   3
#define P5_ConstraintFK      4

/*
** The Vdbe.aColName array contains 5n Mem structures, where n is the
** number of columns of data returned by the statement.
*/
#define COLNAME_NAME     0
#define COLNAME_DECLTYPE 1
#define COLNAME_DATABASE 2
#define COLNAME_TABLE    3
#define COLNAME_COLUMN   4
#ifdef SQLITE_ENABLE_COLUMN_METADATA
# define COLNAME_N        5      /* Number of COLNAME_xxx symbols */
#else
# ifdef SQLITE_OMIT_DECLTYPE
#   define COLNAME_N      1      /* Store only the name */
# else
#   define COLNAME_N      2      /* Store the name and decltype */
# endif
#endif

/*
** The following macro converts a relative address in the p2 field
** of a VdbeOp structure into a negative number so that
** sqlite3VdbeAddOpList() knows that the address is relative.  Calling
** the macro again restores the address.
*/
#define ADDR(X)  (-1-(X))

/*
** The makefile scans the vdbe.c source file and creates the "opcodes.h"
** header file that defines a number for each opcode used by the VDBE.
*/
#include "opcodes.h"

/*
** Prototypes for the VDBE interface.  See comments on the implementation
** for a description of what each of these routines does.
*/
Vdbe *sqlite3VdbeCreate(Parse*);
int sqlite3VdbeAddOp0(Vdbe*, int);
int sqlite3VdbeAddOp1(Vdbe*, int, int);
int sqlite3VdbeAddOp2(Vdbe*, int, int, int);
int sqlite3VdbeAddOp3(Vdbe*, int, int, int, int);
int sqlite3VdbeAddOp4(Vdbe*, int, int, int, int, const char *zP4, int);
int sqlite3VdbeAddOp4Int(Vdbe*, int, int, int, int, int);
int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp, int iLineno);
void sqlite3VdbeAddParseSchemaOp(Vdbe*, int, char*);
void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1);
void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2);
void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3);
void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
void sqlite3VdbeJumpHere(Vdbe*, int addr);
void sqlite3VdbeChangeToNoop(Vdbe*, int addr);
int sqlite3VdbeDeletePriorOpcode(Vdbe*, u8 op);
void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
void sqlite3VdbeSetP4KeyInfo(Parse*, Index*);
void sqlite3VdbeUsesBtree(Vdbe*, int);
VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
int sqlite3VdbeMakeLabel(Vdbe*);
void sqlite3VdbeRunOnlyOnce(Vdbe*);
void sqlite3VdbeDelete(Vdbe*);
void sqlite3VdbeClearObject(sqlite3*, Vdbe*);
void sqlite3VdbeMakeReady(Vdbe*, Parse*);
int sqlite3VdbeFinalize(Vdbe*);
void sqlite3VdbeResolveLabel(Vdbe*, int);
int sqlite3VdbeCurrentAddr(Vdbe*);
#ifdef SQLITE_DEBUG
int sqlite3VdbeAssertMayAbort(Vdbe *, int);
#endif
void sqlite3VdbeResetStepResult(Vdbe*);
void sqlite3VdbeRewind(Vdbe*);
int sqlite3VdbeReset(Vdbe*);
void sqlite3VdbeSetNumCols(Vdbe*, int);
int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));
void sqlite3VdbeCountChanges(Vdbe*);
sqlite3 *sqlite3VdbeDb(Vdbe*);
void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);
void sqlite3VdbeSwap(Vdbe*, Vdbe*);
VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*);
sqlite3_value *sqlite3VdbeGetBoundValue(Vdbe*, int, u8);
void sqlite3VdbeSetVarmask(Vdbe*, int);
#ifndef SQLITE_OMIT_TRACE
char *sqlite3VdbeExpandSql(Vdbe*, const char*);
#endif

void sqlite3VdbeRecordUnpack(KeyInfo*, int, const void*, UnpackedRecord*);
int sqlite3VdbeRecordCompare(int, const void*, UnpackedRecord*, int);
UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo *, char *, int, char **);

typedef int(*RecordCompare)(int, const void*, UnpackedRecord*, int);
RecordCompare sqlite3VdbeFindCompare(UnpackedRecord*);

#ifndef SQLITE_OMIT_TRIGGER
void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *);
#endif

/* Use SQLITE_ENABLE_COMMENTS to enable generation of extra comments on
** each VDBE opcode.
**
** Use the SQLITE_ENABLE_MODULE_COMMENTS macro to see some extra no-op
** comments in VDBE programs that show key decision points in the code
** generator.
*/
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
void sqlite3VdbeComment(Vdbe*, const char*, ...);
# define VdbeComment(X)  sqlite3VdbeComment X
void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);
# define VdbeNoopComment(X)  sqlite3VdbeNoopComment X
# ifdef SQLITE_ENABLE_MODULE_COMMENTS
#   define VdbeModuleComment(X)  sqlite3VdbeNoopComment X
# else
#   define VdbeModuleComment(X)
# endif
#else
# define VdbeComment(X)
# define VdbeNoopComment(X)
# define VdbeModuleComment(X)
#endif

/*
** The VdbeCoverage macros are used to set a coverage testing point
** for VDBE branch instructions.  The coverage testing points are line
** numbers in the sqlite3.c source file.  VDBE branch coverage testing
** only works with an amalagmation build.  That's ok since a VDBE branch
** coverage build designed for testing the test suite only.  No application
** should ever ship with VDBE branch coverage measuring turned on.
**
**    VdbeCoverage(v)                  // Mark the previously coded instruction
**                                     // as a branch
**
**    VdbeCoverageIf(v, conditional)   // Mark previous if conditional true
**
**    VdbeCoverageAlwaysTaken(v)       // Previous branch is always taken
**
**    VdbeCoverageNeverTaken(v)        // Previous branch is never taken
**
** Every VDBE branch operation must be tagged with one of the macros above.
** If not, then when "make test" is run with -DSQLITE_VDBE_COVERAGE and
** -DSQLITE_DEBUG then an ALWAYS() will fail in the vdbeTakeBranch()
** routine in vdbe.c, alerting the developer to the missed tag.
*/
#ifdef SQLITE_VDBE_COVERAGE
void sqlite3VdbeSetLineNumber(Vdbe*,int);
# define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__)
# define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__)
# define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2);
# define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1);
# define VDBE_OFFSET_LINENO(x) (__LINE__+x)
#else
# define VdbeCoverage(v)
# define VdbeCoverageIf(v,x)
# define VdbeCoverageAlwaysTaken(v)
# define VdbeCoverageNeverTaken(v)
# define VDBE_OFFSET_LINENO(x) 0
#endif

#endif


text:
package main

import (
	"math/rand"
	"sort"
)

type Experiences struct {
	buffer      [][]float32
	buffer_size int
	i_counter   int
}

func (net *Experiences) Init(buffer_size int) {
	net.i_counter = 0
	net.buffer_size = buffer_size
	net.buffer = make([][]float32, 0)
}

func (exp *Experiences) Add(frame []float32) {
	if exp.i_counter < exp.buffer_size {
		exp.buffer = exp.buffer[1:]
	}
	exp.buffer = append(exp.buffer, frame)
	exp.i_counter += 1
}
func (exp *Experiences) Append(frames [][]float32) {
	if exp.i_counter+len(frames) < exp.buffer_size {
		drop := len(frames) - len(exp.buffer) - (exp.i_counter + 1)
		exp.buffer = exp.buffer[drop:]
	}
	exp.buffer = append(exp.buffer, frames...)
	exp.i_counter += len(frames)
}

func (exp *Experiences) Sample(size int) [][]float32 {
	buffer := make([][]float32, size)
	indices := make([]int, size)
	for i := 0; i < size; i++ {
		ind := rand.Int31n(int32(len(exp.buffer)))
		indices = append(indices, int(ind))
	}
	sort.Ints(indices)
	for i := 0; i < size; i++ {
		ind := indices[i]
		buffer = append(buffer, buffer[ind])
	}
	return buffer
}


text:
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

namespace NServiceKit.Html
{
    /// A select list item.
    public class SelectListItem
    {
        /// Gets or sets a value indicating whether the selected.
        ///
        /// <value>true if selected, false if not.</value>
        public bool Selected { get; set; }

        /// Gets or sets the text.
        ///
        /// <value>The text.</value>
        public string Text { get; set; }

        /// Gets or sets the value.
        ///
        /// <value>The value.</value>
        public string Value { get; set; }
    }
}


text:
require 'spec_helper'

describe Entrez do

  it 'should have default params for tool and email' do
    Entrez.default_params[:tool].should eq('ruby')
    Entrez.default_params[:email].should_not be_nil
  end

  it '#EFetch retrieves results' do
    response = Entrez.EFetch('taxonomy', id: 9606)
    response.body.should include('Homo sapiens')
  end

  it '#ESummary retrieves results' do
    response = Entrez.ESummary('genomeprj', id: 28911)
    response.body.should include('Hapmap')
  end

  it '#EInfo retrieves results' do
    response = Entrez.EInfo('snp')
    response.body.should include('<Name>RS</Name>')
  end

  context '#ESearch' do

    it 'retrieves results' do
      response = Entrez.ESearch('genomeprj', {WORD: 'hapmap', SEQS: 'inprogress'})
      response.body.should include('28911')
    end

    it 'accepts string as search_terms parameter' do
      response = Entrez.ESearch('genomeprj', 'hapmap[WORD]')
      response.ids.should include(60153)
    end

    it 'handles array of uids' do
      response = Entrez.ESearch('gene', {UID: [1, 2, 3]})
      response.ids.should =~ [1, 2, 3]
    end

  end

  it 'should convert search term hash into query string with AND operator by default' do
    query_string = {TITL: 'BRCA1', ORGN: 'human'}
    Entrez.convert_search_term_hash(query_string).should == 'BRCA1[TITL]+AND+human[ORGN]'
  end

  it 'should convert search term hash into query string with OR operator with parentheses' do
    query_string = {TITL: 'BRCA1', ORGN: 'human'}
    Entrez.convert_search_term_hash(query_string, 'OR').should == '(BRCA1[TITL]+OR+human[ORGN])'
  end

end


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

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Execution;
using Microsoft.VisualStudio.LanguageServices.Remote;
using Roslyn.Utilities;
using StreamJsonRpc;

namespace Microsoft.CodeAnalysis.Remote
{
    // TODO: all service hub service should be extract to interface so that it can support multiple hosts.
    //       right now, tightly coupled to service hub
    internal abstract class ServiceHubServiceBase : IDisposable
    {
        private static int s_instanceId;

        private readonly CancellationTokenSource _shutdownCancellationSource;
        private readonly JsonRpc _rpc;

        protected readonly int InstanceId;

        protected readonly TraceSource Logger;
        protected readonly AssetStorage AssetStorage;
        protected readonly CancellationToken ShutdownCancellationToken;

        [Obsolete("don't use RPC directly but use it through StartService and InvokeAsync", error: true)]
        protected readonly JsonRpc Rpc;

        /// <summary>
        /// PinnedSolutionInfo.ScopeId. scope id of the solution. caller and callee share this id which one
        /// can use to find matching caller and callee while exchanging data
        ///
        /// PinnedSolutionInfo.FromPrimaryBranch Marks whether the solution checksum it got is for primary branch or not
        ///
        /// this flag will be passed down to solution controller to help
        /// solution service's cache policy. for more detail, see <see cref="SolutionService"/>
        ///
        /// PinnedSolutionInfo.SolutionChecksum indicates solution this connection belong to
        /// </summary>
        private PinnedSolutionInfo _solutionInfo;

        private RoslynServices _lazyRoslynServices;

        private bool _disposed;

        protected ServiceHubServiceBase(IServiceProvider serviceProvider, Stream stream)
        {
            InstanceId = Interlocked.Add(ref s_instanceId, 1);
            _disposed = false;

            // in unit test, service provider will return asset storage, otherwise, use the default one
            AssetStorage = (AssetStorage)serviceProvider.GetService(typeof(AssetStorage)) ?? AssetStorage.Default;

            Logger = (TraceSource)serviceProvider.GetService(typeof(TraceSource));
            Logger.TraceInformation($"{DebugInstanceString} Service instance created");

            _shutdownCancellationSource = new CancellationTokenSource();
            ShutdownCancellationToken = _shutdownCancellationSource.Token;

            // due to this issue - https://github.com/dotnet/roslyn/issues/16900#issuecomment-277378950
            // all sub type must explicitly start JsonRpc once everything is
            // setup
            _rpc = new JsonRpc(new JsonRpcMessageHandler(stream, stream), this);
            _rpc.JsonSerializer.Converters.Add(AggregateJsonConverter.Instance);
            _rpc.Disconnected += OnRpcDisconnected;

            // we do this since we want to mark Rpc as obsolete but want to set its value for
            // partner teams until they move. we can't use Rpc directly since we will get
            // obsolete error and we can't suppress it since it is an error
            this.GetType().GetField("Rpc", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(this, _rpc);
        }

        protected string DebugInstanceString => $"{GetType()} ({InstanceId})";

        protected RoslynServices RoslynServices
        {
            get
            {
                if (_lazyRoslynServices == null)
                {
                    _lazyRoslynServices = new RoslynServices(_solutionInfo.ScopeId, AssetStorage, RoslynServices.HostServices);
                }

                return _lazyRoslynServices;
            }
        }

        protected bool IsDisposed => ((IDisposableObservable)_rpc).IsDisposed;

        protected void StartService()
        {
            _rpc.StartListening();
        }

        protected Task<TResult> InvokeAsync<TResult>(
            string targetName, IReadOnlyList<object> arguments, CancellationToken cancellationToken)
        {
            return _rpc.InvokeWithCancellationAsync<TResult>(targetName, arguments, cancellationToken);
        }

        protected Task<TResult> InvokeAsync<TResult>(
           string targetName, IReadOnlyList<object> arguments,
           Func<Stream, CancellationToken, TResult> funcWithDirectStream, CancellationToken cancellationToken)
        {
            return Extensions.InvokeAsync(_rpc, targetName, arguments, funcWithDirectStream, cancellationToken);
        }

        protected Task InvokeAsync(string targetName, CancellationToken cancellationToken)
        {
            return InvokeAsync(targetName, SpecializedCollections.EmptyReadOnlyList<object>(), cancellationToken);
        }

        protected Task InvokeAsync(
            string targetName, IReadOnlyList<object> arguments, CancellationToken cancellationToken)
        {
            return _rpc.InvokeWithCancellationAsync(targetName, arguments, cancellationToken);
        }

        protected Task<Solution> GetSolutionAsync(CancellationToken cancellationToken)
        {
            Contract.ThrowIfNull(_solutionInfo);

            return GetSolutionAsync(RoslynServices, _solutionInfo, cancellationToken);
        }

        protected Task<Solution> GetSolutionAsync(PinnedSolutionInfo solutionInfo, CancellationToken cancellationToken)
        {
            var localRoslynService = new RoslynServices(solutionInfo.ScopeId, AssetStorage, RoslynServices.HostServices);
            return GetSolutionAsync(localRoslynService, solutionInfo, cancellationToken);
        }

        protected virtual void Dispose(bool disposing)
        {
            // do nothing here
        }

        protected void LogError(string message)
        {
            Log(TraceEventType.Error, message);
        }

        public virtual void Initialize(PinnedSolutionInfo info)
        {
            // set pinned solution info
            _lazyRoslynServices = null;
            _solutionInfo = info;
        }

        public void Dispose()
        {
            if (_disposed)
            {
                // guard us from double disposing. this can happen in unit test
                // due to how we create test mock service hub stream that tied to
                // remote host service
                return;
            }

            _disposed = true;
            _rpc.Dispose();
            _shutdownCancellationSource.Dispose();

            Dispose(disposing: true);

            Logger.TraceInformation($"{DebugInstanceString} Service instance disposed");
        }

        protected virtual void OnDisconnected(JsonRpcDisconnectedEventArgs e)
        {
            // do nothing
        }

        protected void Log(TraceEventType errorType, string message)
        {
            Logger.TraceEvent(errorType, 0, $"{DebugInstanceString} : " + message);
        }

        private void OnRpcDisconnected(object sender, JsonRpcDisconnectedEventArgs e)
        {
            // raise cancellation
            _shutdownCancellationSource.Cancel();

            OnDisconnected(e);

            if (e.Reason != DisconnectedReason.Disposed)
            {
                // we no longer close connection forcefully. so connection shouldn't go away
                // in normal situation. if it happens, log why it did in more detail.
                LogError($@"Client stream disconnected unexpectedly:
{nameof(e.Description)}: {e.Description}
{nameof(e.Reason)}: {e.Reason}
{nameof(e.LastMessage)}: {e.LastMessage}
{nameof(e.Exception)}: {e.Exception?.ToString()}");
            }
        }

        private static Task<Solution> GetSolutionAsync(RoslynServices roslynService, PinnedSolutionInfo solutionInfo, CancellationToken cancellationToken)
        {
            var solutionController = (ISolutionController)roslynService.SolutionService;
            return solutionController.GetSolutionAsync(solutionInfo.SolutionChecksum, solutionInfo.FromPrimaryBranch, cancellationToken);
        }

        protected async Task<T> RunServiceAsync<T>(Func<CancellationToken, Task<T>> callAsync, CancellationToken cancellationToken)
        {
            AssetStorage.UpdateLastActivityTime();

            // merge given cancellation token with shutdown cancellation token. it looks like if cancellation and disconnection happens
            // almost same time, we might not get cancellation message back from stream json rpc and get disconnected
            // https://github.com/Microsoft/vs-streamjsonrpc/issues/64
            using (var mergedCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, ShutdownCancellationToken))
            {
                try
                {
                    return await callAsync(mergedCancellation.Token).ConfigureAwait(false);
                }
                catch (Exception ex) when (LogUnlessCanceled(ex, mergedCancellation.Token))
                {
                    // never reach
                    throw ExceptionUtilities.Unreachable;
                }
            }
        }

        protected async Task RunServiceAsync(Func<CancellationToken, Task> callAsync, CancellationToken cancellationToken)
        {
            AssetStorage.UpdateLastActivityTime();

            // merge given cancellation token with shutdown cancellation token. it looks like if cancellation and disconnection happens
            // almost same time, we might not get cancellation message back from stream json rpc and get disconnected
            // https://github.com/Microsoft/vs-streamjsonrpc/issues/64
            using (var mergedCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, ShutdownCancellationToken))
            {
                try
                {
                    await callAsync(mergedCancellation.Token).ConfigureAwait(false);
                }
                catch (Exception ex) when (LogUnlessCanceled(ex, mergedCancellation.Token))
                {
                    // never reach
                    return;
                }
            }
        }

        protected T RunService<T>(Func<CancellationToken, T> call, CancellationToken cancellationToken)
        {
            AssetStorage.UpdateLastActivityTime();

            // merge given cancellation token with shutdown cancellation token. it looks like if cancellation and disconnection happens
            // almost same time, we might not get cancellation message back from stream json rpc and get disconnected
            // https://github.com/Microsoft/vs-streamjsonrpc/issues/64
            using (var mergedCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, ShutdownCancellationToken))
            {
                try
                {
                    return call(mergedCancellation.Token);
                }
                catch (Exception ex) when (LogUnlessCanceled(ex, mergedCancellation.Token))
                {
                    // never reach
                    return default;
                }
            }
        }

        protected void RunService(Action<CancellationToken> call, CancellationToken cancellationToken)
        {
            AssetStorage.UpdateLastActivityTime();

            // merge given cancellation token with shutdown cancellation token. it looks like if cancellation and disconnection happens
            // almost same time, we might not get cancellation message back from stream json rpc and get disconnected
            // https://github.com/Microsoft/vs-streamjsonrpc/issues/64
            using (var mergedCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, ShutdownCancellationToken))
            {
                try
                {
                    call(mergedCancellation.Token);
                }
                catch (Exception ex) when (LogUnlessCanceled(ex, mergedCancellation.Token))
                {
                    // never reach
                }
            }
        }

        private bool LogUnlessCanceled(Exception ex, CancellationToken cancellationToken)
        {
            if (!cancellationToken.IsCancellationRequested)
            {
                LogException(ex);
            }

            return false;
        }

        protected void LogException(Exception ex)
        {
            LogError("Exception: " + ex.ToString());

            LogExtraInformation(ex);

            var callStack = new StackTrace().ToString();
            LogError("From: " + callStack);
        }

        private void LogExtraInformation(Exception ex)
        {
            if (ex == null)
            {
                return;
            }

            if (ex is ReflectionTypeLoadException reflection)
            {
                foreach (var loaderException in reflection.LoaderExceptions)
                {
                    LogError("LoaderException: " + loaderException.ToString());
                    LogExtraInformation(loaderException);
                }
            }

            if (ex is FileNotFoundException file)
            {
                LogError("FusionLog: " + file.FusionLog);
            }

            if (ex is AggregateException agg)
            {
                foreach (var innerException in agg.InnerExceptions)
                {
                    LogExtraInformation(innerException);
                }
            }
            else
            {
                LogExtraInformation(ex.InnerException);
            }
        }
    }
}


text:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Networking;
using UnityEngine.Networking.Match;

public class InternetManager : NetworkManager
{
    public bool CreateRoom = false;
    public string RoomName = "room1";

    public void Start () {

        StartMatchMaker();

        if (CreateRoom)
        {
            CreateMatch(RoomName);
        } else
        {
            matchMaker.ListMatches(0, 20, "", true, 0, 0, OnMatchList);
        }

    }

    void CreateMatch(string newMatchName)
    {
        matchName = newMatchName;
        matchMaker.CreateMatch(matchName, 2, true, "", "", "", 0, 0, OnMatchCreate);
    }

    void JoinMatch(MatchInfoSnapshot match)
    {
        matchName = match.name;
        matchSize = (uint)match.currentSize;
        matchMaker.JoinMatch(match.networkId, "", "","", 0, 0, OnMatchJoined);
    }

    override public void OnMatchList(bool success, string extendedInfo, List<MatchInfoSnapshot> matchList) {

        base.OnMatchList(success, extendedInfo, matchList);

        // auto join room if found
        foreach (MatchInfoSnapshot match in matchList)
        {
            if (match.name == RoomName)
            {
                JoinMatch(match);
                return;
            }
        }

    }

}


text:
from pbxproj.pbxextensions.ProjectFiles import *
from pbxproj.pbxextensions.ProjectFlags import *
from pbxproj.pbxextensions.ProjectGroups import *


text: mvn assembly:assembly


text:
project_root=$(dirname $0)
bin_dir=$project_root/bin
chmod 755 $bin_dir/*.sh
$bin_dir/apply_symbolic_links.sh

# command line tools
xcode-select --install

# package managers
$bin_dir/brew.sh
$bin_dir/mas.sh

# languages
$bin_dir/rbenv.sh
$bin_dir/pyenv.sh
$bin_dir/goenv.sh
$bin_dir/node.sh
curl https://sh.rustup.rs -sSf | sh # rust

$bin_dir/defaults.sh

# hyperkitのドライバ
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \
  && chmod +x docker-machine-driver-hyperkit \
  && sudo mv docker-machine-driver-hyperkit /usr/local/bin/ \
  && sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit \
  && sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit

# dotfiles
dotfiles_dir=$project_root/dotfiles
for dotfile in .config .bash_profile .gitignore_global; do
  ln -sfv $dotfiles_dir/$dotfile $HOME/$dotfile
done
source $HOME/.bash_profile

# configs
config_dir=$project_root/config

# vscode
rm -rf $HOME/Library/Application\ Support/Code/User
ln -sfv $config_dir/vscode/User $HOME/Library/Application\ Support/Code/User
for line in `cat $config_dir/vscode/extension_list`; do
  code --install-extension $line
done


text:
/**
 * Created by turui on 2/7/2017.
 */
import { applyMiddleware, createStore } from 'redux';
import { iotControllerApp } from '../reducers/reducers';
import { fetchDeviceList } from '../actions/actions';
import logger from 'redux-logger';
import thunk from 'redux-thunk';

const middleware = applyMiddleware(thunk, logger());
const store = createStore(iotControllerApp, middleware);

setTimeout( () => {
    store.dispatch((dispatch)=> {
        (fetchDeviceList())(dispatch);
    });
}, 2000);

export default store;


text:
require File.dirname(__FILE__) + '/../test_helper.rb'

class TestShape < Test::Unit::TestCase
  def setup
    get_db_conn(GTRON_ENV)
    Gigantron.migrate_dbs
  end

  #replace with real tests
  should "be true" do
    assert true
  end
end


text:
package Google::Ads::GoogleAds::V11::Services::GoogleAdsService::GoogleAdsRow;

use strict;
use warnings;
use base qw(Google::Ads::GoogleAds::BaseEntity);

use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;

sub new {
  my ($class, $args) = @_;
  my $self = {
    accessibleBiddingStrategy      => $args->{accessibleBiddingStrategy},
    accountBudget                  => $args->{accountBudget},
    accountBudgetProposal          => $args->{accountBudgetProposal},
    accountLink                    => $args->{accountLink},
    adGroup                        => $args->{adGroup},
    adGroupAd                      => $args->{adGroupAd},
    adGroupAdAssetCombinationView  => $args->{adGroupAdAssetCombinationView},
    adGroupAdAssetView             => $args->{adGroupAdAssetView},
    adGroupAdLabel                 => $args->{adGroupAdLabel},
    adGroupAsset                   => $args->{adGroupAsset},
    adGroupAudienceView            => $args->{adGroupAudienceView},
    adGroupBidModifier             => $args->{adGroupBidModifier},
    adGroupCriterion               => $args->{adGroupCriterion},
    adGroupCriterionCustomizer     => $args->{adGroupCriterionCustomizer},
    adGroupCriterionLabel          => $args->{adGroupCriterionLabel},
    adGroupCriterionSimulation     => $args->{adGroupCriterionSimulation},
    adGroupCustomizer              => $args->{adGroupCustomizer},
    adGroupExtensionSetting        => $args->{adGroupExtensionSetting},
    adGroupFeed                    => $args->{adGroupFeed},
    adGroupLabel                   => $args->{adGroupLabel},
    adGroupSimulation              => $args->{adGroupSimulation},
    adParameter                    => $args->{adParameter},
    adScheduleView                 => $args->{adScheduleView},
    ageRangeView                   => $args->{ageRangeView},
    asset                          => $args->{asset},
    assetFieldTypeView             => $args->{assetFieldTypeView},
    assetGroup                     => $args->{assetGroup},
    assetGroupAsset                => $args->{assetGroupAsset},
    assetGroupListingGroupFilter   => $args->{assetGroupListingGroupFilter},
    assetGroupProductGroupView     => $args->{assetGroupProductGroupView},
    assetGroupSignal               => $args->{assetGroupSignal},
    assetSet                       => $args->{assetSet},
    assetSetAsset                  => $args->{assetSetAsset},
    audience                       => $args->{audience},
    batchJob                       => $args->{batchJob},
    biddingDataExclusion           => $args->{biddingDataExclusion},
    biddingSeasonalityAdjustment   => $args->{biddingSeasonalityAdjustment},
    biddingStrategy                => $args->{biddingStrategy},
    biddingStrategySimulation      => $args->{biddingStrategySimulation},
    billingSetup                   => $args->{billingSetup},
    callView                       => $args->{callView},
    campaign                       => $args->{campaign},
    campaignAsset                  => $args->{campaignAsset},
    campaignAssetSet               => $args->{campaignAssetSet},
    campaignAudienceView           => $args->{campaignAudienceView},
    campaignBidModifier            => $args->{campaignBidModifier},
    campaignBudget                 => $args->{campaignBudget},
    campaignConversionGoal         => $args->{campaignConversionGoal},
    campaignCriterion              => $args->{campaignCriterion},
    campaignCriterionSimulation    => $args->{campaignCriterionSimulation},
    campaignCustomizer             => $args->{campaignCustomizer},
    campaignDraft                  => $args->{campaignDraft},
    campaignExperiment             => $args->{campaignExperiment},
    campaignExtensionSetting       => $args->{campaignExtensionSetting},
    campaignFeed                   => $args->{campaignFeed},
    campaignGroup                  => $args->{campaignGroup},
    campaignLabel                  => $args->{campaignLabel},
    campaignSharedSet              => $args->{campaignSharedSet},
    campaignSimulation             => $args->{campaignSimulation},
    carrierConstant                => $args->{carrierConstant},
    changeEvent                    => $args->{changeEvent},
    changeStatus                   => $args->{changeStatus},
    clickView                      => $args->{clickView},
    combinedAudience               => $args->{combinedAudience},
    conversionAction               => $args->{conversionAction},
    conversionCustomVariable       => $args->{conversionCustomVariable},
    conversionGoalCampaignConfig   => $args->{conversionGoalCampaignConfig},
    conversionValueRule            => $args->{conversionValueRule},
    conversionValueRuleSet         => $args->{conversionValueRuleSet},
    currencyConstant               => $args->{currencyConstant},
    customAudience                 => $args->{customAudience},
    customConversionGoal           => $args->{customConversionGoal},
    customInterest                 => $args->{customInterest},
    customer                       => $args->{customer},
    customerAsset                  => $args->{customerAsset},
    customerClient                 => $args->{customerClient},
    customerClientLink             => $args->{customerClientLink},
    customerConversionGoal         => $args->{customerConversionGoal},
    customerCustomizer             => $args->{customerCustomizer},
    customerExtensionSetting       => $args->{customerExtensionSetting},
    customerFeed                   => $args->{customerFeed},
    customerLabel                  => $args->{customerLabel},
    customerManagerLink            => $args->{customerManagerLink},
    customerNegativeCriterion      => $args->{customerNegativeCriterion},
    customerUserAccess             => $args->{customerUserAccess},
    customerUserAccessInvitation   => $args->{customerUserAccessInvitation},
    customizerAttribute            => $args->{customizerAttribute},
    detailPlacementView            => $args->{detailPlacementView},
    detailedDemographic            => $args->{detailedDemographic},
    displayKeywordView             => $args->{displayKeywordView},
    distanceView                   => $args->{distanceView},
    domainCategory                 => $args->{domainCategory},
    dynamicSearchAdsSearchTermView => $args->{dynamicSearchAdsSearchTermView},
    expandedLandingPageView        => $args->{expandedLandingPageView},
    experiment                     => $args->{experiment},
    experimentArm                  => $args->{experimentArm},
    extensionFeedItem              => $args->{extensionFeedItem},
    feed                           => $args->{feed},
    feedItem                       => $args->{feedItem},
    feedItemSet                    => $args->{feedItemSet},
    feedItemSetLink                => $args->{feedItemSetLink},
    feedItemTarget                 => $args->{feedItemTarget},
    feedMapping                    => $args->{feedMapping},
    feedPlaceholderView            => $args->{feedPlaceholderView},
    genderView                     => $args->{genderView},
    geoTargetConstant              => $args->{geoTargetConstant},
    geographicView                 => $args->{geographicView},
    groupPlacementView             => $args->{groupPlacementView},
    hotelGroupView                 => $args->{hotelGroupView},
    hotelPerformanceView           => $args->{hotelPerformanceView},
    hotelReconciliation            => $args->{hotelReconciliation},
    incomeRangeView                => $args->{incomeRangeView},
    keywordPlan                    => $args->{keywordPlan},
    keywordPlanAdGroup             => $args->{keywordPlanAdGroup},
    keywordPlanAdGroupKeyword      => $args->{keywordPlanAdGroupKeyword},
    keywordPlanCampaign            => $args->{keywordPlanCampaign},
    keywordPlanCampaignKeyword     => $args->{keywordPlanCampaignKeyword},
    keywordThemeConstant           => $args->{keywordThemeConstant},
    keywordView                    => $args->{keywordView},
    label                          => $args->{label},
    landingPageView                => $args->{landingPageView},
    languageConstant               => $args->{languageConstant},
    leadFormSubmissionData         => $args->{leadFormSubmissionData},
    lifeEvent                      => $args->{lifeEvent},
    locationView                   => $args->{locationView},
    managedPlacementView           => $args->{managedPlacementView},
    mediaFile                      => $args->{mediaFile},
    metrics                        => $args->{metrics},
    mobileAppCategoryConstant      => $args->{mobileAppCategoryConstant},
    mobileDeviceConstant           => $args->{mobileDeviceConstant},
    offlineUserDataJob             => $args->{offlineUserDataJob},
    operatingSystemVersionConstant => $args->{operatingSystemVersionConstant},
    paidOrganicSearchTermView      => $args->{paidOrganicSearchTermView},
    parentalStatusView             => $args->{parentalStatusView},
    productBiddingCategoryConstant => $args->{productBiddingCategoryConstant},
    productGroupView               => $args->{productGroupView},
    recommendation                 => $args->{recommendation},
    remarketingAction              => $args->{remarketingAction},
    searchTermView                 => $args->{searchTermView},
    segments                       => $args->{segments},
    sharedCriterion                => $args->{sharedCriterion},
    sharedSet                      => $args->{sharedSet},
    shoppingPerformanceView        => $args->{shoppingPerformanceView},
    smartCampaignSearchTermView    => $args->{smartCampaignSearchTermView},
    smartCampaignSetting           => $args->{smartCampaignSetting},
    thirdPartyAppAnalyticsLink     => $args->{thirdPartyAppAnalyticsLink},
    topicConstant                  => $args->{topicConstant},
    topicView                      => $args->{topicView},
    userInterest                   => $args->{userInterest},
    userList                       => $args->{userList},
    userLocationView               => $args->{userLocationView},
    video                          => $args->{video},
    webpageView                    => $args->{webpageView}};

  # Delete the unassigned fields in this object for a more concise JSON payload
  remove_unassigned_fields($self, $args);

  bless $self, $class;
  return $self;
}

1;


text:
package config

import (
	"errors"
	"fmt"

	"github.com/spf13/cobra"
	config "k8s.io/minikube/pkg/minikube/config"
	"k8s.io/minikube/pkg/minikube/out"
)

var configGetCmd = &cobra.Command{
	Use:   "get PROPERTY_NAME",
	Short: "Gets the value of PROPERTY_NAME from the minikube config file",
	Long:  "Returns the value of PROPERTY_NAME from the minikube config file.  Can be overwritten at runtime by flags or environmental variables.",
	RunE: func(cmd *cobra.Command, args []string) error {
		if len(args) == 0 {
			cmd.SilenceErrors = true
			return errors.New("not enough arguments.\nusage: minikube config get PROPERTY_NAME")
		}
		if len(args) > 1 {
			cmd.SilenceErrors = true
			return fmt.Errorf("too many arguments (%d)\nusage: minikube config get PROPERTY_NAME", len(args))
		}

		cmd.SilenceUsage = true
		val, err := Get(args[0])
		if err != nil {
			return err
		}
		if val == "" {
			return fmt.Errorf("no value for key '%s'", args[0])
		}

		out.Ln(val)
		return nil
	},
}

func init() {
	ConfigCmd.AddCommand(configGetCmd)
}

// Get gets a property
func Get(name string) (string, error) {
	return config.Get(name)
}


text:
package com.github.earchitecture.reuse.model.annotation;

import static java.lang.annotation.ElementType.METHOD;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 *
 * @author ccosta
 *
 */
@Target({METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface UseLikeForSearch {
  /**
   *
   * @return valor default true
   */
  boolean lowercase() default true;
  /**
   *
   * @return valor default true
   */
  boolean trim() default true;
}