text:
namespace cc {
class Layer;
class SolidColorLayer;
}

namespace android {

class ContextualSearchLayer;

// A native-side, cc::Layer-based representation of how a Contextual Search
// scene should be drawn.
// This class delegates to the ContextualSearchLayer
// that does the actual rendering of the Contextual Search Bar and content.
class ContextualSearchSceneLayer : public SceneLayer,
                                   public BitmapFetcherDelegate {
 public:
  ContextualSearchSceneLayer(JNIEnv* env,
                             const base::android::JavaRef<jobject>& jobj);

  ContextualSearchSceneLayer(const ContextualSearchSceneLayer&) = delete;
  ContextualSearchSceneLayer& operator=(const ContextualSearchSceneLayer&) =
      delete;

  ~ContextualSearchSceneLayer() override;

  void CreateContextualSearchLayer(
      JNIEnv* env,
      const base::android::JavaParamRef<jobject>& object,
      const base::android::JavaParamRef<jobject>& jresource_manager);

  void UpdateContextualSearchLayer(
      JNIEnv* env,
      const base::android::JavaParamRef<jobject>& object,
      jint search_bar_background_resource_id,
      jint search_bar_background_color,
      jint search_context_resource_id,
      jint search_term_resource_id,
      jint search_caption_resource_id,
      jint search_bar_shadow_resource_id,
      jint search_provider_icon_resource_id,
      jint quick_action_icon_resource_id,
      jint drag_handlebar_resource_id,
      jint open_tab_icon_resource_id,
      jint close_icon_resource_id,
      jint progress_bar_background_resource_id,
      jint progress_bar_background_tint,
      jint progress_bar_resource_id,
      jint progress_bar_tint,
      jint search_promo_resource_id,
      jfloat dp_to_px,
      jfloat layout_width,
      jfloat layout_height,
      jfloat base_page_brightness,
      jfloat base_page_offset,
      const base::android::JavaParamRef<jobject>& jweb_contents,
      jboolean search_promo_visible,
      jfloat search_promo_height,
      jfloat search_promo_opacity,
      jint search_promo_background_color,
      // Related Searches
      jint related_searches_in_bar_resource_id,
      jboolean related_searches_in_bar_visible,
      jfloat related_searches_in_bar_height,
      jfloat related_searches_in_bar_redundant_padding,
      // Panel position etc
      jfloat search_panel_x,
      jfloat search_panel_y,
      jfloat search_panel_width,
      jfloat search_panel_height,
      jfloat search_bar_margin_side,
      jfloat search_bar_margin_top,
      jfloat search_bar_height,
      jfloat search_context_opacity,
      jfloat search_text_layer_min_height,
      jfloat search_term_opacity,
      jfloat search_term_caption_spacing,
      jfloat search_caption_animation_percentage,
      jboolean search_caption_visible,
      jboolean search_bar_border_visible,
      jfloat search_bar_border_height,
      jboolean quick_action_icon_visible,
      jboolean thumbnail_visible,
      jstring j_thumbnail_url,
      jfloat custom_image_visibility_percentage,
      jint bar_image_size,
      jint icon_color,
      jint drag_handlebar_color,
      jfloat close_icon_opacity,
      jboolean progress_bar_visible,
      jfloat progress_bar_height,
      jfloat progress_bar_opacity,
      jfloat progress_bar_completion,
      jboolean touch_highlight_visible,
      jfloat touch_highlight_x_offset,
      jfloat touch_highlight_width,
      const base::android::JavaRef<jobject>& j_profile,
      jint bar_background_resource_id,
      jint separator_line_color);

  // Inherited from BitmapFetcherDelegate
  void OnFetchComplete(
      const GURL& url,
      const SkBitmap* bitmap) override;

  void SetContentTree(
      JNIEnv* env,
      const base::android::JavaParamRef<jobject>& jobj,
      const base::android::JavaParamRef<jobject>& jcontent_tree);

  void HideTree(
      JNIEnv* env,
      const base::android::JavaParamRef<jobject>& jobj);

 private:
  void FetchThumbnail(const base::android::JavaRef<jobject>& j_profile);

  raw_ptr<JNIEnv> env_;
  base::android::ScopedJavaGlobalRef<jobject> object_;
  std::string thumbnail_url_;
  std::unique_ptr<BitmapFetcher> fetcher_;

  scoped_refptr<ContextualSearchLayer> contextual_search_layer_;
  // Responsible for fading the base page content.
  scoped_refptr<cc::SolidColorLayer> color_overlay_;
  scoped_refptr<cc::Layer> content_container_;
};

}  // namespace android

#endif  // CHROME_BROWSER_ANDROID_COMPOSITOR_SCENE_LAYER_CONTEXTUAL_SEARCH_SCENE_LAYER_H_


text:
/*
---------------------------------------------------------
                    Main and Module

---------------------------------------------------------
*/
Blockly.JavaScript['module'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var statements_input = Blockly.JavaScript.statementToCode(block, 'Input');
  // TODO: Assemble JavaScript into code variable.
  var code = 'module ' + text_id + ' {\n' + statements_input + '\n}\n';
  return code;
};

Blockly.JavaScript['main'] = function(block) {
  var statements_main_method = Blockly.JavaScript.statementToCode(block, 'main_method');
  // TODO: Assemble JavaScript into code variable.
  var code = 'main {\n' + statements_main_method + '\n}\n';
  return code;
};

/*
---------------------------------------------------------

                   Functions
---------------------------------------------------------
*/

Blockly.JavaScript['function_params'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_id = block.getFieldValue('ID');
  var value_params = Blockly.JavaScript.valueToCode(block, 'PARAMS', Blockly.JavaScript.ORDER_ATOMIC);
  var statements_name = Blockly.JavaScript.statementToCode(block, 'NAME');
  // TODO: Assemble JavaScript into code variable.
  value_params = value_params.replace(/[()]/g,'');
  var code = 'func '+ dropdown_type + ' ' + text_id + ' (' + value_params +')' + '{\n' + statements_name + '\n}\n';
  return code;
};

Blockly.JavaScript['function_without_params'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_id = block.getFieldValue('ID');
  var statements_name = Blockly.JavaScript.statementToCode(block, 'NAME');
  // TODO: Assemble JavaScript into code variable.
  var code = 'func '+ dropdown_type + ' ' + text_id +' (){\n' + statements_name + '\n}\n';
  return code;
};

Blockly.JavaScript['parameter_no_comma'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_name_param = block.getFieldValue('name_param');
  // TODO: Assemble JavaScript into code variable.
  var code = dropdown_type + ' ' + text_name_param;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_NONE];
};

Blockly.JavaScript['param_comma'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_name_param = block.getFieldValue('name_param');
  var value_params_with_comma = Blockly.JavaScript.valueToCode(block, 'params_with_comma', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = dropdown_type + ' ' + text_name_param + ', ' +  value_params_with_comma;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_ATOMIC];
};

Blockly.JavaScript['function_call_params'] = function(block) {
  var text_funcname = block.getFieldValue('FUNCNAME');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = text_funcname + '¿ ' + value_name + ' ?;\n';
  code = code.replace(/[()]/g,'');
  code = code.replace(/[¿]/g,'(');
  code = code.replace(/[?]/g,')');
  return code;
};

// func ();
Blockly.JavaScript['function_call_no_param'] = function(block) {
  var text_funcname = block.getFieldValue('FUNCNAME');
  // TODO: Assemble JavaScript into code variable.
  var code = text_funcname + '();';
  return code;
};

Blockly.JavaScript['function_return_params'] = function(block) {
  var text_func = block.getFieldValue('FUNC');
  var value_function = Blockly.JavaScript.valueToCode(block, 'function', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  value_function = value_function.replace(/[()]/g,'');
  var code = text_func +  '¿' + value_function + '?';
  return [code, Blockly.JavaScript.ORDER_ATOMIC];
};

//return value;
Blockly.JavaScript['return'] = function(block) {
  var value_return = Blockly.JavaScript.valueToCode(block, 'RETURN', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = 'return ' + value_return + ';\n';
  code = code.replace(/[()]/g,'');
  code = code.replace(/[¿]/g,'(');
  code = code.replace(/[?]/g,')');
  return code;
};

/*
---------------------------------------------------------
                    Variables

---------------------------------------------------------
*/

Blockly.JavaScript['variable_definition'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_id = block.getFieldValue('ID');
  var text_value = block.getFieldValue('VALUE');
  // TODO: Assemble JavaScript into code variable.
  var code = dropdown_type + ' ' + text_id + '=' + text_value +';\n';
  return code;
};

//type variable = n,
//REVISAR

Blockly.JavaScript['variable_with_comma'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_id = block.getFieldValue('ID');
  var text_value = block.getFieldValue('VALUE');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = dropdown_type + ' ' + text_id + '=' + text_value +',' + value_name;
  return code;
};

Blockly.JavaScript['variable_comma'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var text_value = block.getFieldValue('VALUE');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = text_id + '=' + text_value + ',' + value_name;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_ATOMIC];
};

Blockly.JavaScript['variable_comma_end'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var text_value = block.getFieldValue('VALUE');
  // TODO: Assemble JavaScript into code variable.
  var code = text_id + '=' + text_value + ';\n';
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_ATOMIC];
};

Blockly.JavaScript['variable_asignation'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = text_id + '=' + value_name + ';\n';
  code = code.replace(/[()]/g,'');
  code = code.replace(/[¿]/g,'(');
  code = code.replace(/[?]/g,')');
  return code;
};

Blockly.JavaScript['id_without_comma'] = function(block) {
  var text_id = block.getFieldValue('ID');
  // TODO: Assemble JavaScript into code variable.
  var code = text_id;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_ATOMIC];
};

Blockly.JavaScript['id_with_comma'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = text_id + ', ' + value_name;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_NONE];
};

/*
---------------------------------------------------------
                        Constants

---------------------------------------------------------
*/

Blockly.JavaScript['numerical_const_comma'] = function(block) {
  var number_name = block.getFieldValue('NAME');
  var value_consn = Blockly.JavaScript.valueToCode(block, 'CONSN', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = number_name + ', ' +  value_consn;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_NONE];
};

Blockly.JavaScript['numerical_const_no_comma'] = function(block) {
  var number_consn = block.getFieldValue('CONSN');
  // TODO: Assemble JavaScript into code variable.
  var code = number_consn ;
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_NONE];
};

/*
---------------------------------------------------------
                        Arrays

---------------------------------------------------------
*/

//type text_id [2] =
Blockly.JavaScript['array_definition'] = function(block) {
  var dropdown_type = block.getFieldValue('TYPE');
  var text_id = block.getFieldValue('ID');
  var number_size = block.getFieldValue('SIZE');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = dropdown_type +' ' + text_id + '[' + number_size + '] = '+'['+ value_name + '];\n';
  code = code.replace(/[()]/g,'');
  code = code.replace(/[¿]/g,'(');
  code = code.replace(/[?]/g,')');
  return code;
};

Blockly.JavaScript['array_asignation'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var number_place = block.getFieldValue('PLACE');
  var value_name = Blockly.JavaScript.valueToCode(block, 'NAME', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = text_id + '[' + number_place + '] = ' + value_name + ';\n';
  code = code.replace(/[()]/g,'');
  code = code.replace(/[¿]/g,'(');
  code = code.replace(/[?]/g,')');
  return code;
};

Blockly.JavaScript['array_access'] = function(block) {
  var text_id = block.getFieldValue('ID');
  var text_size = block.getFieldValue('SIZE');
  // TODO: Assemble JavaScript into code variable.
  var code = text_id + '[' + text_size + ']'
  code = code.replace(/[()]/g,'');
  code = code.replace(/[¿]/g,'(');
  code = code.replace(/[?]/g,')');
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_ATOMIC];
};

/*
---------------------------------------------------------
                        I/O

---------------------------------------------------------
*/

Blockly.JavaScript['read'] = function(block) {
  var text_id = block.getFieldValue('ID');
  // TODO: Assemble JavaScript into code variable.
  var code = 'read (' + (text_id) + ');\n';
  return code;
};

Blockly.JavaScript['print'] = function(block) {
  var value_value = Blockly.JavaScript.valueToCode(block, 'VALUE', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = 'print(' + value_value + ');\n';
  return code;
};

/*
---------------------------------------------------------
                        Operations

---------------------------------------------------------
*/

Blockly.JavaScript['parentesis'] = function(block) {
  var value_value = Blockly.JavaScript.valueToCode(block, 'VALUE', Blockly.JavaScript.ORDER_ATOMIC);
  // TODO: Assemble JavaScript into code variable.
  var code = '¿ ' +  value_value + ' ?';
  // TODO: Change ORDER_NONE to the correct strength.
  return [code, Blockly.JavaScript.ORDER_NONE];
};

redpajama_set_name: RedPajamaGithub


text:
using namespace lingo;

using Iter = std::istreambuf_iterator<char>;

int
main(int argc, char* argv[])
{
  if (argc != 2) {
    std::cerr << "usage: json-parser '<json-value>'\n";
    return -1;
  }

  // Parse the text.
  if (json::Value* value = json::parse(argv[1]))
    print(value);
}


text:
var noop = function(){};
var defaults = require('lodash.defaults');
var isEmpty = require('lodash.isempty');
var isFunction = require('lodash.isfunction');
var isArray = require('lodash.isarray');
var cloneDeep = require('lodash.clonedeep');
var BrowserWindow = require('electron').BrowserWindow;
var Menu = require('electron').Menu;

var DEFAULT_MAIN_TPL = [{
  label: 'Undo',
  role: 'undo'
}, {
  label: 'Redo',
  role: 'redo'
}, {
  type: 'separator'
}, {
  label: 'Cut',
  role: 'cut'
}, {
  label: 'Copy',
  role: 'copy'
}, {
  label: 'Paste',
  role: 'paste'
}, {
  label: 'Paste and Match Style',
  click: function() {
    BrowserWindow.getFocusedWindow().webContents.pasteAndMatchStyle();
  }
}, {
  label: 'Select All',
  role: 'selectall'
}];

var DEFAULT_SUGGESTIONS_TPL = [
  {
    label: 'No suggestions',
    click: noop
  }, {
    type: 'separator'
  }
];

/**
 * if passed a function, invoke it and pass a clone of the default (for safe mutations)
 * if passed an array, use as is
 * otherwise, just return a clone of the default
 * @param val {*}
 * @param defaultVal {Array}
 * @returns {Array}
 */
function getTemplate(val, defaultVal) {
  if(isFunction(val)) {
    return val(cloneDeep(defaultVal));
  }
  else if(isArray(val)) {
    return val;
  }
  else {
    return cloneDeep(defaultVal);
  }
}

/**
 * Builds a context menu suitable for showing in a text editor.
 *
 * @param {Object=} selection - An object describing the current text selection.
 *   @property {Boolean=false} isMisspelled - `true` if the selection is
 *     misspelled, `false` if it is spelled correctly or is not text.
 *   @property {Array<String>=[]} spellingSuggestions - An array of suggestions
 *     to show to correct the misspelling. Ignored if `isMisspelled` is `false`.
 * @param {Function|Array} mainTemplate - Optional. If it's an array, use as is.
 *    If it's a function, used to customize the template of always-present menu items.
 *    Receives the default template as a parameter. Should return a template.
 * @param {Function|Array} suggestionsTemplate - Optional. If it's an array, use as is.
 *    If it's a function, used to customize the template of spelling suggestion items.
 *    Receives the default suggestions template as a parameter. Should return a template.
 * @return {Menu}
 */
var buildEditorContextMenu = function(selection, mainTemplate, suggestionsTemplate) {

  selection = defaults({}, selection, {
    isMisspelled: false,
    spellingSuggestions: []
  });

  var template = getTemplate(mainTemplate, DEFAULT_MAIN_TPL);
  var suggestionsTpl = getTemplate(suggestionsTemplate, DEFAULT_SUGGESTIONS_TPL);

  if (selection.isMisspelled) {
    var suggestions = selection.spellingSuggestions;
    if (isEmpty(suggestions)) {
      template.unshift.apply(template, suggestionsTpl);
    } else {
      template.unshift.apply(template, suggestions.map(function(suggestion) {
        return {
          label: suggestion,
          click: function() {
            BrowserWindow.getFocusedWindow().webContents.replaceMisspelling(suggestion);
          }
        };
      }).concat({
        type: 'separator'
      }));
    }
  }

  return Menu.buildFromTemplate(template);
};

module.exports = buildEditorContextMenu;


text:
<?php
/***********************************
 * WatchBot
 *
 * Alexander Martin
 * MacEwan University
 * CMPT 395 - AS40
 * January 30th, 2014
 ***********************************/
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

Route::when('*', 'csrf', array('post'));
Route::get('/', 'HomeController@homePage');

/*
 * User & Authentication Routes
 */
Route::get('/users', 'UserController@index');
Route::get('/users/register', 'UserController@showRegister');
Route::post('/users/register', 'UserController@doRegister');
Route::get('/users/edit/','UserController@edit');
Route::get('/users/show/{username}','UserController@show');
Route::post('/users/update/','UserController@update');
Route::post('/login', 'UserController@login');
Route::get('/logout', 'UserController@logout');
Route::get('/users/destroy', 'UserController@showDestroy');
Route::post('/users/destroy', 'UserController@Destroy');

/*
 * Video Routes
 */
Route::get('/videos', 'VideoController@index');
Route::get('/videos/show/{id}', 'VideoController@show');
Route::get('/videos/from/{username}', 'VideoController@from');
Route::get('/videos/new/', 'VideoController@showCreate');
Route::post('/videos/create/', 'VideoController@doCreate');
Route::get('/videos/destroy/{id}', 'VideoController@destroy');
Route::get('/videos/edit/{id}', 'VideoController@edit');
Route::post('/videos/update/{id}', 'VideoController@update');


text:
namespace clover {
namespace util {
namespace detail {

struct BlockInfo {
	const char* funcName;
	uint32 line;
	/// Don't assume that labels with same string will point to
	/// the same memory - depends on compiler optimizations
	const char* label;
	uint64 exclusiveMemAllocs;
	uint64 inclusiveMemAllocs;
};

struct BlockProfiler {
	static BlockInfo createBlockInfo(	const char* func,
										uint32 line,
										const char* label);
	BlockProfiler(BlockInfo& info);
	~BlockProfiler();
};

struct StackJoiner {
	StackJoiner();
	~StackJoiner();
};

struct StackDetacher {
	StackDetacher();
	~StackDetacher();
};

void setSuperThread(std::thread::id super_id);

} // detail

/// Call in main() -- we don't want to see any impl defined pre-main stuff
void tryEnableProfiling();

#if PROFILING_ENABLED
/// Should be called on system memory allocation
void profileSystemMemAlloc();
#else
inline void profileSystemMemAlloc() {};
#endif

} // util
} // clover

#if PROFILING_ENABLED

/// Same as PROFILE but with a label
#define PROFILE_(label)\
	static util::detail::BlockInfo JOIN(profiler_block_info_, __LINE__)= \
		util::detail::BlockProfiler::createBlockInfo( \
				__PRETTY_FUNCTION__, \
				__LINE__, \
				label); \
	util::detail::BlockProfiler JOIN(profiler_, __LINE__)(JOIN(profiler_block_info_, __LINE__))

/// Marks current block to be profiled
#define PROFILE()\
	PROFILE_(nullptr)

/// Notifies profiler of a super thread
#define PROFILER_SUPER_THREAD(thread_id)\
	util::detail::setSuperThread(thread_id)

/// Joins callstacks of this and super thread in current scope
#define PROFILER_STACK_JOIN()\
	util::detail::StackJoiner JOIN(stack_joiner_, __LINE__)
/// Detaches callstacks of this and super thread in current scope
#define PROFILER_STACK_DETACH()\
	util::detail::StackDetacher JOIN(stack_detacher_, __LINE__)

#else

#define PROFILE_(label)
#define PROFILE()
#define PROFILER_SUPER_THREAD(thread_id)
#define PROFILER_STACK_JOIN()
#define PROFILER_STACK_DETACH()

#endif

#endif // CLOVER_UTIL_PROFILING_HPP


text:
package eu.bcvsolutions.idm.acc.dto.filter;

import java.util.UUID;

import eu.bcvsolutions.idm.core.api.dto.filter.BaseFilter;

/**
 * Filter for contract-slice - accounts
 *
 * @author Svanda
 *
 */
public class AccContractSliceAccountFilter implements BaseFilter, EntityAccountFilter {

	private UUID accountId;
	private UUID sliceId;
	private UUID systemId;
	private Boolean ownership;

	@Override
	public void setOwnership(Boolean ownership) {
		this.ownership = ownership;
	}

	@Override
	public UUID getAccountId() {
		return accountId;
	}

	@Override
	public void setAccountId(UUID accountId) {
		this.accountId = accountId;
	}

	@Override
	public void setSystemId(UUID systemId) {
		this.systemId = systemId;
	}

	public UUID getSystemId() {
		return systemId;
	}

	public UUID getSliceId() {
		return sliceId;
	}

	public void setSliceId(UUID sliceId) {
		this.sliceId = sliceId;
	}

	@Override
	public Boolean isOwnership() {
		return ownership;
	}

	@Override
	public void setEntityId(UUID entityId) {
		this.sliceId = entityId;
	}

}


text:
import java.util.List;

public class StreamExtract {
    void test(List<String> list) {
        list.stream().mapToInt(x -> x.length() + 10 * x.l<caret>ength()).forEach(System.out::println);
    }
}


text:
package uaa

import (
	"encoding/json"
	"fmt"
	"net/url"
)

type UsersGUIDsByScopeInterface interface {
	UsersGUIDsByScope(string) ([]string, error)
}

type userGUIDsByScopeResponse struct {
	Resources []struct {
		Members []struct {
			GUID string `json:"value"`
		} `json:"members"`
	} `json:"resources"`
}

func UsersGUIDsByScope(u UAA, scope string) ([]string, error) {
	var guids []string
	filterValue := url.QueryEscape("displayName eq \"" + scope + "\"")

	uri, err := url.Parse(fmt.Sprintf("%s/Groups?attributes=members&filter=%s", u.uaaURL, filterValue))
	if err != nil {
		return guids, err
	}

	host := uri.Scheme + "://" + uri.Host
	client := NewClient(host, u.VerifySSL).WithAuthorizationToken(u.AccessToken)
	code, body, err := client.MakeRequest("GET", uri.RequestURI(), nil)
	if err != nil {
		return guids, err
	}

	if code > 399 {
		return guids, NewFailure(code, body)
	}

	guids, err = guidsFromBody(body)
	if err != nil {
		return guids, err
	}

	return guids, nil
}

func guidsFromBody(body []byte) ([]string, error) {
	var response userGUIDsByScopeResponse
	guids := []string{}
	err := json.Unmarshal(body, &response)
	if err != nil {
		return guids, err
	}

	for _, member := range response.Resources[0].Members {
		guids = append(guids, member.GUID)
	}

	return guids, nil
}


text:
namespace LibrarySystem.App.Account
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;

    using Microsoft.AspNet.Identity;
    using Microsoft.AspNet.Identity.Owin;

    public partial class ManageLogins : Page
    {
        protected string SuccessMessage { get; private set; }

        protected bool CanRemoveExternalLogins { get; private set; }

        private bool HasPassword(ApplicationUserManager manager)
        {
            return manager.HasPassword(this.User.Identity.GetUserId());
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            var manager =
                this.Context.GetOwinContext()
                    .GetUserManager<ApplicationUserManager>();
            this.CanRemoveExternalLogins =
                manager.GetLogins(this.User.Identity.GetUserId()).Count() > 1;

            this.SuccessMessage = string.Empty;
            this.successMessage.Visible =
                !string.IsNullOrEmpty(this.SuccessMessage);
        }

        public IEnumerable<UserLoginInfo> GetLogins()
        {
            var manager =
                this.Context.GetOwinContext()
                    .GetUserManager<ApplicationUserManager>();
            var accounts = manager.GetLogins(this.User.Identity.GetUserId());
            this.CanRemoveExternalLogins = accounts.Count() > 1
                                           || this.HasPassword(manager);
            return accounts;
        }

        public void RemoveLogin(string loginProvider, string providerKey)
        {
            var manager =
                this.Context.GetOwinContext()
                    .GetUserManager<ApplicationUserManager>();
            var signInManager =
                this.Context.GetOwinContext().Get<ApplicationSignInManager>();
            var result = manager.RemoveLogin(
                this.User.Identity.GetUserId(),
                new UserLoginInfo(loginProvider, providerKey));
            var msg = string.Empty;
            if (result.Succeeded)
            {
                var user = manager.FindById(this.User.Identity.GetUserId());
                signInManager.SignIn(user, false, false);
                msg = "?m=RemoveLoginSuccess";
            }
            this.Response.Redirect("~/Account/ManageLogins" + msg);
        }
    }
}


text:
<?php namespace Jhul\Core\Design\Entity;

abstract class _Assembler
{

	use \Jhul\Core\_AccessKey;

	protected $_object;

	public function __construct( $component, $configurations = [] )
	{
		$this->_object = $component;

		$this->_configurations = $configurations;
	}

	public static function I( $component, $configurations = [] )
	{
		return new static( $component, $configurations );
	}
	abstract protected function assemble();

	public function e()
	{
		return $this->_object;
	}

	public function c()
	{
		return $this->_configurations;
	}

}


text:
namespace {

const double kDefaultRefreshRate = 60.0;
const double kTestRefreshRate = 200.0;

}  // namespace

namespace ui {

CompositorLock::CompositorLock(Compositor* compositor)
    : compositor_(compositor) {
  if (compositor_->locks_will_time_out_) {
    compositor_->task_runner_->PostDelayedTask(
        FROM_HERE,
        base::Bind(&CompositorLock::CancelLock, AsWeakPtr()),
        base::TimeDelta::FromMilliseconds(kCompositorLockTimeoutMs));
  }
}

CompositorLock::~CompositorLock() {
  CancelLock();
}

void CompositorLock::CancelLock() {
  if (!compositor_)
    return;
  compositor_->UnlockCompositor();
  compositor_ = NULL;
}

Compositor::Compositor(gfx::AcceleratedWidget widget,
                       ui::ContextFactory* context_factory,
                       scoped_refptr<base::SingleThreadTaskRunner> task_runner)
    : context_factory_(context_factory),
      root_layer_(NULL),
      widget_(widget),
      surface_id_allocator_(context_factory->CreateSurfaceIdAllocator()),
      task_runner_(task_runner),
      vsync_manager_(new CompositorVSyncManager()),
      device_scale_factor_(0.0f),
      last_started_frame_(0),
      last_ended_frame_(0),
      locks_will_time_out_(true),
      compositor_lock_(NULL),
      layer_animator_collection_(this),
      weak_ptr_factory_(this) {
  root_web_layer_ = cc::Layer::Create();

  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();

  cc::LayerTreeSettings settings;
  // When impl-side painting is enabled, this will ensure PictureLayers always
  // can have LCD text, to match the previous behaviour with ContentLayers,
  // where LCD-not-allowed notifications were ignored.
  settings.layers_always_allowed_lcd_text = true;
  settings.renderer_settings.refresh_rate =
      context_factory_->DoesCreateTestContexts() ? kTestRefreshRate
                                                 : kDefaultRefreshRate;
  settings.main_frame_before_activation_enabled = false;
  settings.throttle_frame_production =
      !command_line->HasSwitch(switches::kDisableGpuVsync);
  settings.renderer_settings.partial_swap_enabled =
      !command_line->HasSwitch(cc::switches::kUIDisablePartialSwap);
#if defined(OS_CHROMEOS)
  settings.per_tile_painting_enabled = true;
#endif
#if defined(OS_WIN)
  settings.renderer_settings.finish_rendering_on_resize = true;
#endif

  // These flags should be mirrored by renderer versions in content/renderer/.
  settings.initial_debug_state.show_debug_borders =
      command_line->HasSwitch(cc::switches::kUIShowCompositedLayerBorders);
  settings.initial_debug_state.show_fps_counter =
      command_line->HasSwitch(cc::switches::kUIShowFPSCounter);
  settings.initial_debug_state.show_layer_animation_bounds_rects =
      command_line->HasSwitch(cc::switches::kUIShowLayerAnimationBounds);
  settings.initial_debug_state.show_paint_rects =
      command_line->HasSwitch(switches::kUIShowPaintRects);
  settings.initial_debug_state.show_property_changed_rects =
      command_line->HasSwitch(cc::switches::kUIShowPropertyChangedRects);
  settings.initial_debug_state.show_surface_damage_rects =
      command_line->HasSwitch(cc::switches::kUIShowSurfaceDamageRects);
  settings.initial_debug_state.show_screen_space_rects =
      command_line->HasSwitch(cc::switches::kUIShowScreenSpaceRects);
  settings.initial_debug_state.show_replica_screen_space_rects =
      command_line->HasSwitch(cc::switches::kUIShowReplicaScreenSpaceRects);

  settings.initial_debug_state.SetRecordRenderingStats(
      command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));

  settings.impl_side_painting = IsUIImplSidePaintingEnabled();
  settings.use_display_lists = IsUISlimmingPaintEnabled();
  settings.use_cached_picture_in_display_list = false;
  settings.use_zero_copy = IsUIZeroCopyEnabled();
  settings.use_one_copy = IsUIOneCopyEnabled();
  settings.use_image_texture_target = context_factory_->GetImageTextureTarget();
  // Note: gathering of pixel refs is only needed when using multiple
  // raster threads.
  settings.gather_pixel_refs = false;

  settings.use_compositor_animation_timelines =
      command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines);

  base::TimeTicks before_create = base::TimeTicks::Now();

  cc::LayerTreeHost::InitParams params;
  params.client = this;
  params.shared_bitmap_manager = context_factory_->GetSharedBitmapManager();
  params.gpu_memory_buffer_manager =
      context_factory_->GetGpuMemoryBufferManager();
  params.task_graph_runner = context_factory_->GetTaskGraphRunner();
  params.settings = &settings;
  params.main_task_runner = task_runner_;
  host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
  UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
                      base::TimeTicks::Now() - before_create);
  host_->SetRootLayer(root_web_layer_);
  host_->set_surface_id_namespace(surface_id_allocator_->id_namespace());
  host_->SetLayerTreeHostClientReady();
}

Compositor::~Compositor() {
  TRACE_EVENT0("shutdown", "Compositor::destructor");

  CancelCompositorLock();
  DCHECK(!compositor_lock_);

  FOR_EACH_OBSERVER(CompositorObserver, observer_list_,
                    OnCompositingShuttingDown(this));

  DCHECK(begin_frame_observer_list_.empty());

  if (root_layer_)
    root_layer_->SetCompositor(NULL);

  // Stop all outstanding draws before telling the ContextFactory to tear
  // down any contexts that the |host_| may rely upon.
  host_.reset();

  context_factory_->RemoveCompositor(this);
}

void Compositor::SetOutputSurface(
    scoped_ptr<cc::OutputSurface> output_surface) {
  host_->SetOutputSurface(output_surface.Pass());
}

void Compositor::ScheduleDraw() {
  host_->SetNeedsCommit();
}

void Compositor::SetRootLayer(Layer* root_layer) {
  if (root_layer_ == root_layer)
    return;
  if (root_layer_)
    root_layer_->SetCompositor(NULL);
  root_layer_ = root_layer;
  if (root_layer_ && !root_layer_->GetCompositor())
    root_layer_->SetCompositor(this);
  root_web_layer_->RemoveAllChildren();
  if (root_layer_)
    root_web_layer_->AddChild(root_layer_->cc_layer());
}

void Compositor::SetHostHasTransparentBackground(
    bool host_has_transparent_background) {
  host_->set_has_transparent_background(host_has_transparent_background);
}

void Compositor::ScheduleFullRedraw() {
  // TODO(enne): Some callers (mac) call this function expecting that it
  // will also commit.  This should probably just redraw the screen
  // from damage and not commit.  ScheduleDraw/ScheduleRedraw need
  // better names.
  host_->SetNeedsRedraw();
  host_->SetNeedsCommit();
}

void Compositor::ScheduleRedrawRect(const gfx::Rect& damage_rect) {
  // TODO(enne): Make this not commit.  See ScheduleFullRedraw.
  host_->SetNeedsRedrawRect(damage_rect);
  host_->SetNeedsCommit();
}

void Compositor::FinishAllRendering() {
  host_->FinishAllRendering();
}

void Compositor::DisableSwapUntilResize() {
  host_->FinishAllRendering();
  context_factory_->ResizeDisplay(this, gfx::Size());
}

void Compositor::SetLatencyInfo(const ui::LatencyInfo& latency_info) {
  scoped_ptr<cc::SwapPromise> swap_promise(
      new cc::LatencyInfoSwapPromise(latency_info));
  host_->QueueSwapPromise(swap_promise.Pass());
}

void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
  DCHECK_GT(scale, 0);
  if (!size_in_pixel.IsEmpty()) {
    size_ = size_in_pixel;
    host_->SetViewportSize(size_in_pixel);
    root_web_layer_->SetBounds(size_in_pixel);
    context_factory_->ResizeDisplay(this, size_in_pixel);
  }
  if (device_scale_factor_ != scale) {
    device_scale_factor_ = scale;
    host_->SetDeviceScaleFactor(scale);
    if (root_layer_)
      root_layer_->OnDeviceScaleFactorChanged(scale);
  }
}

void Compositor::SetBackgroundColor(SkColor color) {
  host_->set_background_color(color);
  ScheduleDraw();
}

void Compositor::SetVisible(bool visible) {
  host_->SetVisible(visible);
}

bool Compositor::IsVisible() {
  return host_->visible();
}

scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
  return vsync_manager_;
}

void Compositor::AddObserver(CompositorObserver* observer) {
  observer_list_.AddObserver(observer);
}

void Compositor::RemoveObserver(CompositorObserver* observer) {
  observer_list_.RemoveObserver(observer);
}

bool Compositor::HasObserver(const CompositorObserver* observer) const {
  return observer_list_.HasObserver(observer);
}

void Compositor::AddAnimationObserver(CompositorAnimationObserver* observer) {
  animation_observer_list_.AddObserver(observer);
  host_->SetNeedsAnimate();
}

void Compositor::RemoveAnimationObserver(
    CompositorAnimationObserver* observer) {
  animation_observer_list_.RemoveObserver(observer);
}

bool Compositor::HasAnimationObserver(
    const CompositorAnimationObserver* observer) const {
  return animation_observer_list_.HasObserver(observer);
}

void Compositor::AddBeginFrameObserver(CompositorBeginFrameObserver* observer) {
  DCHECK(std::find(begin_frame_observer_list_.begin(),
                   begin_frame_observer_list_.end(), observer) ==
         begin_frame_observer_list_.end());

  if (begin_frame_observer_list_.empty())
    host_->SetChildrenNeedBeginFrames(true);

  if (missed_begin_frame_args_.IsValid())
    observer->OnSendBeginFrame(missed_begin_frame_args_);

  begin_frame_observer_list_.push_back(observer);
}

void Compositor::RemoveBeginFrameObserver(
    CompositorBeginFrameObserver* observer) {
  auto it = std::find(begin_frame_observer_list_.begin(),
                      begin_frame_observer_list_.end(), observer);
  DCHECK(it != begin_frame_observer_list_.end());
  begin_frame_observer_list_.erase(it);

  if (begin_frame_observer_list_.empty()) {
    host_->SetChildrenNeedBeginFrames(false);
    missed_begin_frame_args_ = cc::BeginFrameArgs();
  }
}

void Compositor::BeginMainFrame(const cc::BeginFrameArgs& args) {
  FOR_EACH_OBSERVER(CompositorAnimationObserver,
                    animation_observer_list_,
                    OnAnimationStep(args.frame_time));
  if (animation_observer_list_.might_have_observers())
    host_->SetNeedsAnimate();
}

void Compositor::BeginMainFrameNotExpectedSoon() {
}

static void SendDamagedRectsRecursive(ui::Layer* layer) {
  layer->SendDamagedRects();
  for (auto* child : layer->children())
    SendDamagedRectsRecursive(child);
}

void Compositor::Layout() {
  if (!root_layer())
    return;
  SendDamagedRectsRecursive(root_layer());
}

void Compositor::RequestNewOutputSurface() {
  // TODO(robliao): Remove ScopedTracker below once https://crbug.com/466870
  // is fixed.
  tracked_objects::ScopedTracker tracking_profile(
      FROM_HERE_WITH_EXPLICIT_FUNCTION(
          "466870 Compositor::RequestNewOutputSurface"));

  context_factory_->CreateOutputSurface(weak_ptr_factory_.GetWeakPtr());
}

void Compositor::DidInitializeOutputSurface() {
}

void Compositor::DidFailToInitializeOutputSurface() {
  // The OutputSurface should already be bound/initialized before being given to
  // the Compositor.
  NOTREACHED();
}

void Compositor::DidCommit() {
  DCHECK(!IsLocked());
  FOR_EACH_OBSERVER(CompositorObserver,
                    observer_list_,
                    OnCompositingDidCommit(this));
}

void Compositor::DidCommitAndDrawFrame() {
}

void Compositor::DidCompleteSwapBuffers() {
  FOR_EACH_OBSERVER(CompositorObserver, observer_list_,
                    OnCompositingEnded(this));
}

void Compositor::DidPostSwapBuffers() {
  base::TimeTicks start_time = gfx::FrameTime::Now();
  FOR_EACH_OBSERVER(CompositorObserver, observer_list_,
                    OnCompositingStarted(this, start_time));
}

void Compositor::DidAbortSwapBuffers() {
  FOR_EACH_OBSERVER(CompositorObserver,
                    observer_list_,
                    OnCompositingAborted(this));
}

void Compositor::SendBeginFramesToChildren(const cc::BeginFrameArgs& args) {
  for (auto observer : begin_frame_observer_list_)
    observer->OnSendBeginFrame(args);

  missed_begin_frame_args_ = args;
  missed_begin_frame_args_.type = cc::BeginFrameArgs::MISSED;
}

const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const {
  return host_->debug_state();
}

void Compositor::SetLayerTreeDebugState(
    const cc::LayerTreeDebugState& debug_state) {
  host_->SetDebugState(debug_state);
}

const cc::RendererSettings& Compositor::GetRendererSettings() const {
  return host_->settings().renderer_settings;
}

scoped_refptr<CompositorLock> Compositor::GetCompositorLock() {
  if (!compositor_lock_) {
    compositor_lock_ = new CompositorLock(this);
    host_->SetDeferCommits(true);
    FOR_EACH_OBSERVER(CompositorObserver,
                      observer_list_,
                      OnCompositingLockStateChanged(this));
  }
  return compositor_lock_;
}

void Compositor::UnlockCompositor() {
  DCHECK(compositor_lock_);
  compositor_lock_ = NULL;
  host_->SetDeferCommits(false);
  FOR_EACH_OBSERVER(CompositorObserver,
                    observer_list_,
                    OnCompositingLockStateChanged(this));
}

void Compositor::CancelCompositorLock() {
  if (compositor_lock_)
    compositor_lock_->CancelLock();
}

}  // namespace ui


text:
namespace LightBDD.Example.Services
{
	public class LoginRequest
	{
		public string Password { get; set; }
		public string UserName { get; set; }
	}
}


text:
This directory contains scripts and files which can be used to create
a Rocket image which will provide a mongodb service.

## Source Files

mktree.sh::
	A script to compose the image file tree
manifest::
	The rocket image description file

## Requirements

- actool
- rkt

## Image Structure

The image tree is composed under the current working directory in a
sub-directory named _image_.  It follows the AppContainer
specification for the location and format of the manifest file and the
location of the image contents.

    rootfs/
			/usr/bin/
				mongod
			/lib64/
			  lib*.so
			/data/db/
			/dev/

### iperf3 daemon

The first file is the iperf3.  It is placed by convention into
`/usr/local/bin`.

## Building the File Tree

The _mktree.sh_ script will create the model tree for the image as
noted above.

    sh mktree.sh

The result is a directory named _image_ containing the image source
files.

## Building the Image

The image can be created merely using _tar_ but the AppContainer
project provides _actool_ to improve the process.  _actool_ will
validate the manifest before composing the image _.aci_ file.

    actool build image iperf3.aci

If you are rebuilding the image add _--overwrite_ after the _build_
argument.

Not that the version in the manifest must be incremented for each
buid.  The _rkt_ binary examines the version number in the image
manifest, and if it finds that they are the same, it assumes that it
can use the cached copy of the image.

== Running the Image

Right now this is a bit of a toy.  It runs as a single process inside
a container attached to a user shell

    sudo rkt run -volume=dev,kind=host,source=/dev iperf3.aci

## References

- https://github.com/appc/spec/blob/master/SPEC.md#image-layout[AppContainer Image Layout]
- https://github.com/appc/spec/blob/master/SPEC.md#image-manifest-schema[AppContainer manifest schema]
- https://github.com/appc/spec#building-acis[Using _actool_]


text:
<!DOCTYPE html>

    <title>JavaScript & jQuery - Chapter 10: Error Handling & Debugging - console.assert()</title>
    <meta name="viewport" content="width=device-width, user-scalable=no">
    <link rel="stylesheet" href="css/c10.css" />

    <form action="#" id="calculator">

Find the area of a wall:

      <input type="text" name="width" id="width" placeholder="width" />
      <input type="text" name="height" id="height" placeholder="height" />
      <input type="submit" value="Calculate area" id="submit" />
    </form>


text:
import * as shell from 'shelljs';

type PackageJSON = {
    dependencies?: { [name: string ]: string };
    devDependencies?: { [name: string ]: string };
    peerDependencies?: { [name: string ]: string };
};

type TSConfig = {
    references?: { path: string }[];
};

const getReferencesFromDependencies = (packagePath: string): string[] => {
    const packageJSONPath = `${packagePath}/package.json`;
    const packageJSON: PackageJSON = require(`../../${packageJSONPath}`);

    const dependencies = Object.keys(packageJSON.dependencies || {});
    const devDependencies = Object.keys(packageJSON.devDependencies || {});
    const peerDependencies = Object.keys(packageJSON.peerDependencies || {});
    const allDependencies = [...dependencies, ...devDependencies, ...peerDependencies];
    const uniqueDependencies = Array.from(new Set(allDependencies));

    // Map `hint` and `@hint/*` dependencies from `package.json` to `tsconfig.json` reference names.
    return uniqueDependencies
        .filter((name) => {
            return name === 'hint' || name.startsWith('@hint/');
        })
        .map((name) => {
            return name.replace('@hint/', '');
        });
};

const compactReferences = (json: string): string => {
    // Condense JSON-serialized references to fit on a single line.
    return json.replace(/\{\r?\n\s*("path": "[^"]+")\r?\n\s*}/g, '{ $1 }');
};

const updateFile = (filePath: string, content: string) => {
    const writeContent = (shell as any)['ShellString']; // eslint-disable-line dot-notation

    writeContent(content).to(filePath);
};

const main = () => {

    // Include all sub-packages (except configurations which don't use TypeScript).
    const subPackages = shell.ls('-d', 'packages/!(configuration-*)');

    // For the root and every package in this repo.
    ['.', ...subPackages].forEach((packagePath: string) => {

        const tsconfigPath = `${packagePath}/tsconfig.json`;
        const tsconfigJSON: TSConfig = require(`../../${tsconfigPath}`);

        let prefix: string;
        let references: string[];

        if (packagePath === '.') {

            // Include all sub-packages as references in the root `tsconfig.json`.
            prefix = '';
            references = subPackages.filter((path) => {
                // Exclude `connector-edge` as it only builds on Windows (can be built separately as-needed).
                return path !== 'packages/connector-edge';
            });

        } else {

            // Only include explicit dependencies in sub-packages.
            prefix = '../';
            references = getReferencesFromDependencies(packagePath);

        }

        // Convert references to the expected `tsconfig.json` format.
        tsconfigJSON.references = references
            .sort()
            .map((reference) => {
                return { path: `${prefix}${reference}` };
            });

        // Omit the references section if none exist.
        if (!tsconfigJSON.references.length) {
            delete tsconfigJSON.references;
        }

        // Serialize the updated `tsconfig.json`, keeping references on one line each.
        const json = JSON.stringify(tsconfigJSON, null, 4);
        const compactedJSON = compactReferences(json);

        // Save the changes to `tsconfig.json`.
        updateFile(tsconfigPath, `${compactedJSON}\n`);
    });

};

main();


text:
  * Bug fix
    * Fix formatting of typespecs causing errors
    * Update jQuery
    * Properly remove underscore from typespec links

## v0.18.2

  * Enhancements
    * Improve documentation pages for printing
    * Autolink Kernel, Kernel.SpecialForms, and built-in types
    * Annotate opaque types
    * Add vertical-align:top to tables
    * Allow module-function-arity references in links, for example: [some code](`MyMod.fun/2`)
    * Remove underscore from view source link
    * Run code formatter on typespecs (if one is available)
    * Make night mode switch link more obvious

## v0.18.1

  * Bug fixes
    * Include missing formatter files

## v0.18.0

  * Enhancements
    * No longer strip empty parens from types
    * Provide more extension point for markdown processors
    * Remove assets from priv since they are now embedded at compile time

  * Backwards incompatible changes
    * Remove built-in support for hoedown markdown processor
    * No longer add favicon when logo option is present (this was added in 0.17.0 but it was reported the logo almost never fits as a favicon)

## v0.17.1

  * Bug fixes
    * Fix broken search caused by outdated JavaScript files

## v0.17.0

  * Enhancements
    * Allow modules to be grouped on the sidebar with the `:groups_for_modules` option
    * Allow extras to be grouped on the sidebar with the `:groups_for_extras` option

  * Backwards incompatible changes
    * The previous `:group` option that could be specified for each entry in `:extras` is no longer supported
    * No longer add a specific section for "Protocols". If you would like to segregate the protocols in your application, use the new `:groups_for_modules` functionality

## v0.16.4

  * Enhancements
    * Generate favicon link if a logo is available

  * Bug fixes
    * Do not version epub filename as the doc directory is likely already versioned

## v0.16.3

  * Enhancements
    * Make sure its own search.html page and provide history
    * Generate source maps only if the `--debug` flag is given
    * Users can now add custom HTML before the closing head tag and the closing body tag
    * Highlight the target function/macro/type/callback when clicked

  * Bug fixes
    * Remove extra `term()` argument at start of macro spec
    * Add unencoded link target for functions with special chars to cope with different behaviour in browsers

## v0.16.2

  * Enhancements
    * Link `<h3>` headers as well
    * Add border to code tag
  * Bug fixes
    * Fix sidebar on mobile devices

## v0.16.1

  * Bug fixes
    * Fix hover icons coloring

## v0.16.0

  * Enhancements
    * Separate tasks into "Mix Tasks" in sidebar
    * Add types to the search results
    * Improve accessibility

  * Bug fixes
    * Strip nesting HTML tags in h2 headers
    * Remove the old search results after every new search attempt

## v0.15.1

  * Bug fixes
    * Improve project name wrapping on HTML
    * Properly set link in types with parameter
    * Fix ExDoc.CLI.main/2 to keep --source-ref on Elixir v1.4
    * Do not fail if localStorage is not available

## v0.15.0

  * Enhancements
    * Closing the search takes you to where you were in the previous page
    * Handle `__struct__/0` by displaying the struct instead
    * Warn when redirecting to a non-existent file
    * List both functions and macros under "Functions"
    * Automatically detect GitLab source URL patterns

  * Bug fixes
    * Break long specs into lines
    * Fix the initial state of the sidebar hamburger
    * Do not error when abstract code is missing
    * Properly link to erlang lib dirs

  * Backwards incompatible changes
    * No longer support Pandoc
    * Require Earmark 1.1

## v0.14.5

  * Enhancements
    * Allow ExDoc to work as an escript

## v0.14.4

  * Enhancements
    * Point to Elixir docs on hexdocs.pm
    * Many improvements to layout and styling of EPUB formatter
    * Support multiple formatters to be configured on `mix.exs`
    * Also digest `sidebar_items.js`
    * Force parentheses on type signature to remove ambiguity
    * Generate top-level docs for an umbrella project
    * Searching on mobile closes menu when the Enter key is hit

## v0.14.3

  * Enhancements
    * Support the `:assets` option that automatically copies all entries in the given directory to `doc/assets`
    * Remove numbering on Extras subheaders from sidebar
    * Pass file and line information to markdown formatters for better warnings
    * Allow extra pages to be grouped together under a given heading
    * Generate ids for default name/arity pairs so they can be linked (both remotely and locally)

  * Bug fixes
    * Fix autolink for functions containing `%`, `{`, `}` or uppercase characters in the name

## v0.14.2

  * Enhancements
    * Automatically generate documentations links to any of your dependencies (by default links to hexdocs.pm but allows the URL to be configured)
    * Allow documentation to be generated to Erlang modules

  * Bug fixes
    * Make sure "Top" is not included twice on pages

## v0.14.1

  * Bug fixes
    * Include "Top" link in pages with no headings
    * Include "Top" link in modules with no docs

## v0.14.0

  * Enhancements
    * Add support for the epub formatter
    * Support extraction from `<h2>` headers out of the settext format

  * Layout changes
    * Indent documentation inside the function/macro/type/callback header
    * Style types the same way as function/macro/callback and include a link to the source
    * Increase font-sizes in the sidebar and code snippets
    * Move the specs definition inside the function/macro/type/callback header and make better use of vertical space
    * Use a gradient on the sidebar to avoid sudden cut-off when scrolling the modules list
    * Fix the use of the back-button in some browsers
    * Allow the whole sidebar to be navigated without moving away from the current page. Expand (+) and collapse (-) buttons have been added to aid exploration
    * Numerically order pages/guides headers

## v0.13.2

  * Bug fixes
    * Avoid scrollbar from appearing on all code snippets

## v0.13.1

  * Enhancements
    * Autolink Elixir's stdlib modules and functions
    * Show callbacks in search results
    * Reduce size taken by font-sizes
    * Increase size for headings in the moduledoc

  * Bug fixes
    * Fix opened sidebar on small screens
    * Allow horizontal scrolling for code snippets on small screens

## v0.13.0

  * Bug fixes
    * Fix issue where docs would fail when being built on Erlang 19
    * Store templates in `priv` rather than in `lib`

  * Backwards incompatible changes
    * Require Elixir ~> v1.2

## v0.12.0

  * Enhancements
    * Remove warnings when running on Elixir v1.3
    * Support for `@optional_callbacks`
    * Improve styling for nested lists
    * Include earmark as a default dependency

  * Bug fixes
    * Fix many styling and performance front-end related bugs

## v0.11.5

  * Enhancements
    * Support canonical URLs

  * Bug fixes
    * Autolink now allows digits in function names
    * Sort specs by line to preserve ordering
    * Focus on content element on document ready
    * Remove ligature fix on Firefox and Safari as Google Fonts have been updated

## v0.11.4

  * Bug fixes
    * Fix ligature issues in recent browsers
    * HTML escape headers
    * Avoid warning on Elixir master (v1.3)

## v0.11.3

  * Bug fixes
    * Fix a regression where the sidebar wouldn't stick on small screens

## v0.11.2

  * Enhancements
    * Include night mode for docs
    * Take advantage of extra space on large screens by widening sidebar

  * Bug fixes
    * Do not attempt to retrieve docs from Erlang modules

## v0.11.1

  * Bug fixes
    * Include callbacks even if a module defines a struct

## v0.11.0

  * Enhancements
    * From now on it's possible to set the title in the sidebar area for
      additional content, *default:* "Pages"
    * Set the path and title of each additional page in `mix.exs` file
    * Use the first `h1` as menu title if title is not configured
    * Include the project name as part of the header in small devices

  * Bug fixes
    * Increase the visual separation between functions
    * Remove the `extra-` prefix for the additional documentation files
    * Extra large images do not create an overflow in the content

## v0.10.0

  * Enhancements
    * Many improvements and bug fixes in new layout
    * Reduced build size
    * Overview has been renamed to API Reference
    * All extra content, including API Reference, has been moved to inside
      "Pages"
    * Extra files are now downcased and prefixed by `extra-`

## v0.9.0

  * Enhancements
    * Whole new clean, readable, usable, responsive layout
    * Support for adding logo to generated docs (must be 64x64 pixels)
    * Support for adding extra pages to generated docs
    * Improve formatting of typespecs and callbacks

  * Backwards incompatible changes
    * `--readme` option and `:readme` configuration have been removed. Use
      `:extras` in your `mix.exs` file or pass `--extra` / `-e` in the
      command-line (may be given multiple times)

## v0.8.4

  * Bug fixes
    * Generate `README.html` file instead of `readme.html` as in previous
      releases
    * Style fixes in the new layout

## v0.8.3

  * Bug fixes
    * Style fixes in the new layout

## v0.8.2

  * Enhancements
    * Uglify and minify JS and CSS code
    * Performance improvements when building sidebar
    * Redirect from index.html to proper page

  * Bug fixes
    * Style fixes in the new layout

## v0.8.1

  * Bug fixes
    * Style fixes in the new layout

## v0.8.0

  * Enhancements
    * New and responsive layout without frames

## v0.7.3

  * Bug fixes
    * Update [highlight.js][] with fixes some inlining issues
    * Require latest [Earmark][]

## v0.7.2

  * Bug fixes
    * Support Elixir master
    * Fix error reporting when modules are compiled without docs

## v0.7.1

  * Enhancements
    * Use `type=search` for search input
    * Update [highlight.js][] dependency
    * Properly tag code comments as coming from Elixir/IEx unless noted otherwise
    * Add support for hash redirection

## v0.7.0

  * Enhancements
    * Documentation is now generated at `doc` to follow OTP "standard"

## v0.6.2

  * Enhancements
    * Improvements to the document structure
    * Add syntax highlight

## v0.6.1

  * Enhancements
    * Autolink modules and functions in the README
    * Generate ids for callbacks starting with "c:"
    * Ensure group ordering is consistent: TYPES > FUNCTIONS > MACROS > CALLBACKS
    * Allow users to search by Module.function

## v0.6.0

  * Enhancements
    * Support Elixir v1.0.0-rc1

## v0.5.2

  * Bug fixes
    * Use proper ANSI escape sequence on Mix success messages

## v0.5.1

  * Enhancements
    * Support Elixir v0.15.0
    * Add support for [Earmark][] - no need for external processors

## v0.5.0

  * Enhancements
    * First public release
    * Support [pandoc][] and [devinus/markdown][markdown] as markdown processors

[pandoc]: http://pandoc.org/
[markdown]: https://github.com/devinus/markdown
[earmark]: https://github.com/pragdave/earmark
[highlight.js]: https://highlightjs.org/


text:
package io.primeval.saga.core.test.rules;

import java.util.List;

import org.junit.rules.ExternalResource;

import com.fasterxml.jackson.databind.ObjectMapper;

import io.primeval.common.test.rules.TestResource;
import net.codestory.http.WebServer;
import net.codestory.http.extensions.Extensions;
import net.codestory.http.misc.Env;
import net.codestory.http.payload.Payload;

public class WithFluentHttpServerSetup extends ExternalResource implements TestResource {

    private WebServer testHttpServer;
    private ObjectMapper mapper;

    @Override
    public void before() throws Throwable {
        mapper = new ObjectMapper();
        testHttpServer = new WebServer().configure(
                routes -> {
                    routes.setExtensions(new Extensions() {
                        @Override
                        public ObjectMapper configureOrReplaceObjectMapper(ObjectMapper defaultObjectMapper, Env env) {
                            return mapper;
                        }
                    });
                    routes.post("/uppercase", context -> {
                        String string = context.request().content();
                        return new Payload("application/json;charset=UTF-8", string.toUpperCase());
                    });
                    routes.get("/simpleGet", (context) -> {
                        return new Payload("application/json;charset=UTF-8",
                                mapper.writeValueAsString("Hello World"))
                                        .withHeader("X-Test", "Foobar");
                    });
                    routes.get("/checkExecutionContext", (context) -> {
                        List<String> headers = context.headers("X-ExecutionContext-Thingy");
                        if (headers != null && !headers.isEmpty()) {
                            return true;
                        }
                        return false;

                    });
                    routes.get("/plainText", context -> {
                        return new Payload("text/plain;charset=UTF-8", "HELLO!");
                    });
                    routes.get("/hello", context -> {
                        return new Payload("text/plain;charset=UTF-8", "Hello " + context.get("who"));
                    });
                }).startOnRandomPort();

    }

    @Override
    public void after() {
        testHttpServer.stop();
    }

    public int port() {
        return testHttpServer.port();
    }

}


text:
SELECT `id`, `_class` FROM `PipelineRunNodeedges` WHERE 1;

--
-- INSERT template for table `PipelineRunNodeedges`
--
INSERT INTO `PipelineRunNodeedges`(`id`, `_class`) VALUES (?, ?);

--
-- UPDATE template for table `PipelineRunNodeedges`
--
UPDATE `PipelineRunNodeedges` SET `id` = ?, `_class` = ? WHERE 1;

--
-- DELETE template for table `PipelineRunNodeedges`
--
DELETE FROM `PipelineRunNodeedges` WHERE 0;


text:
/* jslint node: true */
'use strict';

var publisher = require('../lib/publisher');
var config = require('../lib/config');
var auth = require('hatchet.io-auth-mongo');

auth.init(config);

publisher.create(config, auth);


text:
package eap;

import java.util.concurrent.CountDownLatch;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.framework.api.CuratorEvent;
import org.apache.curator.framework.api.CuratorListener;
import org.apache.curator.framework.api.UnhandledErrorListener;
import org.apache.curator.retry.RetryNTimes;
import org.apache.zookeeper.Watcher.Event.KeeperState;

public class UM_test {
	public static void main(String[] args) throws Exception {
		System.setProperty("app.name", "com.enci.open");
		System.setProperty("app.id", "1");
		System.setProperty("app.version", "1.0.0");
		System.setProperty("app.UMServer", "node1:2181,node1:2182,node1:2183");

		CuratorFramework client = null;
		String appUMServer = System.getProperty("app.UMServer"); // TODO , "localhost:2181"
		if (appUMServer != null && appUMServer.length() > 0) {
			Integer retryNum = Integer.getInteger("app.UMServer.retryNum", Integer.MAX_VALUE);
			Integer retryTimes = Integer.getInteger("app.UMServer.retryTimes", 3000);
			Integer connectionTimeoutMs = Integer.getInteger("app.UMServer.connectionTimeoutMs", 10000);

			final CountDownLatch connectedLatch = new CountDownLatch(1);

			client = CuratorFrameworkFactory.builder()
				.connectString(appUMServer)
				.retryPolicy(new RetryNTimes(retryNum, retryTimes))
				.connectionTimeoutMs(connectionTimeoutMs).build();
			client.getCuratorListenable().addListener(new CuratorListener() {
				public void eventReceived(CuratorFramework client, CuratorEvent event) throws Exception {
					if (connectedLatch.getCount() > 0 && event.getWatchedEvent() != null && event.getWatchedEvent().getState() == KeeperState.SyncConnected) {
						connectedLatch.countDown();
					}
				}
			});
			client.getUnhandledErrorListenable().addListener(new UnhandledErrorListener() {
				public void unhandledError(String message, Throwable e) {
					e.printStackTrace();
				}
			});
			client.start();
			connectedLatch.await();
		}

//		QueueBuilder.builder(client, consumer, serializer, "/queue");
//		DistributedQueue<String> cli =

//		Map<String, String> env = new HashMap<String, String>();
//		env.put("a", "123");

		client.setData().forPath("/UM_CONFIG/APP/com.enci.open/1.0.0/cli", "invoke com.enci.open.management.TransDetailsManager refresh".getBytes());

	}
}


text:
class CreateChannels < ActiveRecord::Migration
  def self.up
    create_table :channels do |t|
    	t.integer :company_id
    	t.string :channel
    	t.string :title
    	t.string :description
    	t.integer :status, :default => 0
  	 	t.timestamps
    end
  end

  def self.down
    drop_table :channels
  end
end


text:
@protocol StationListDelegate <NSObject>

- (void)receivedBikeData:(NSArray *)parsedArray;
- (void)bikeDataError;

@end

@protocol StationTrendDelegate <NSObject>

- (void)receivedTrendData:(NSArray *)parsedArray;
- (void)trendDataError;
- (void)trendUpdateRequired:(NSString *)message;

@end

@interface StationList : NSObject <DataDownloaderDelegate>

@property (nonatomic, strong) NSArray *stationList;
@property (nonatomic, strong) NSMutableDictionary *stationDictionary;
@property (nonatomic, strong) NSMutableArray *neighborhoodArray;
@property int generatedTimecode;
@property (nonatomic, strong) id <StationListDelegate> delegate;
@property (nonatomic, strong) id <StationTrendDelegate> trendDelegate;

- (void)loadBikeData: (UIView *)view;

- (void)loadTrendData: (UIView *)view;

@end


text:
@import url("../RollingList/RollingList.css");

.dojoxFileInfoPane *{
	white-space: normal;
}

.dojoxFileInfoLabel {
	font-weight: bold;
	white-space: nowrap;
}

.dojoxFileInfoPane {
	width: 20em;
}

.tundra .dojoxFilePickerItem .dijitMenuItemIcon {
	background-image: url("images/tundraFileIcons.gif");
	background-repeat: no-repeat;
}
.tundra .dojoxFilePickerItem .dojoxEmpty {
	background-image: none;
}
.tundra .dojoxFilePickerItem .dojoxDirectoryItemIcon {
	background-position: 0px;
}
.tundra .dojoxFilePickerItemSelected .dojoxDirectoryItemIcon {
	background-position: -16px;
}
.tundra .dojoxFilePickerItem .dojoxFileItemIcon {
	background-position: -32px;
}
.tundra .dojoxFilePickerItemSelected .dojoxFileItemIcon {
	background-position: -48px;
}

.soria .dojoxFilePickerItem .dijitMenuItemIcon {
	background-image: url("images/soriaFileIcons.gif");
	background-repeat: no-repeat;
}
.soria .dojoxFilePickerItem .dojoxEmpty {
	background-image: none;
}
.soria .dojoxFilePickerItem .dojoxDirectoryItemIcon {
	background-position: 0px;
}
.soria .dojoxFilePickerItemSelected .dojoxDirectoryItemIcon {
	background-position: -16px;
}
.soria .dojoxFilePickerItem .dojoxFileItemIcon {
	background-position: -32px;
}
.soria .dojoxFilePickerItemSelected .dojoxFileItemIcon {
	background-position: -48px;
}

.nihilo .dojoxFilePickerItem .dijitMenuItemIcon {
	background-image: url("images/nihiloFileIcons.gif");
	background-repeat: no-repeat;
}
.nihilo .dojoxFilePickerItem .dojoxEmpty {
	background-image: none;
}
.nihilo .dojoxFilePickerItem .dojoxDirectoryItemIcon {
	background-position: 0px;
}
.nihilo .dojoxFilePickerItemSelected .dojoxDirectoryItemIcon {
	background-position: -16px;
}
.nihilo .dojoxFilePickerItem .dojoxFileItemIcon {
	background-position: -32px;
}
.nihilo .dojoxFilePickerItemSelected .dojoxFileItemIcon {
	background-position: -48px;
}


text:
var routes = require('require-directory')(module);

module.exports = function(app) {
  Object.keys(routes).forEach(function(key) {
    if (key !== 'index') {
      app.use('/' + key, routes[key]);
    }
  });

   app.get('/', function(req, res) {
    res.render('index');
  });
};


text:
kafka-lab
=========
This directory contains AWS, Chef and Vagrant scripts/recipes/templates to spin up Kafka-broker nodes.

## Usage

```
usage: minotaur lab deploy kafka [-h] -e ENVIRONMENT -d DEPLOYMENT -r
                                 REGION -z AVAILABILITY_ZONE [-n NUM_NODES]
                                 [-i INSTANCE_TYPE] [-v ZK_VERSION]
                                 [-k KAFKA_URL]

optional arguments:
  -h, --help            show this help message and exit
  -e ENVIRONMENT, --environment ENVIRONMENT
                        CloudFormation environment to deploy to
  -d DEPLOYMENT, --deployment DEPLOYMENT
                        Unique name for the deployment
  -r REGION, --region REGION
                        Geographic area to deploy to
  -z AVAILABILITY_ZONE, --availability-zone AVAILABILITY_ZONE
                        Isolated location to deploy to
  -n NUM_NODES, --num-nodes NUM_NODES
                        Number of instances to deploy
  -i INSTANCE_TYPE, --instance-type INSTANCE_TYPE
                        AWS EC2 instance type to deploy
  -v ZK_VERSION, --zk-version ZK_VERSION
                        The Zookeeper version to deploy
  -k KAFKA_URL, --kafka-url KAFKA_URL
                        The Kafka URL
```

**Mandatory arguments:**

`<environment>` - name of the CloudFormation environment.

`<deployment>` - this term/option is used to logically separate groups of nodes within environment. Nodes that belong to different deployments won't interact with each other.

`<region>` - geographic area to deploy to.

`<availability zone>` - isolated location to deploy to.

**Optional arguments:**

`[number of instances]` defaults to 1

`[instances flavor]` defaults to m1.small

`[source url]` defaults to https://archive.apache.org/dist/kafka/0.8.2-beta/kafka_2.11-0.8.2-beta.tar.gz

**Example:**

`./minotaur lab deploy kafka -e bdoss-dev -d testing -r us-east-1 -z us-east-1a -k http://example.com/kafka.tar.gz -n 3 -i m1.small` - this will spin up 3 kafka-broker nodes in "testing" deployment.

*NOTICE:* If you're deploying a cluster - make sure that a separate Zookeeper node is running in the same environment and deployment.

During spin-up procedure, each Kafka node will try to reveal all Zookeeper nodes running in the same environment+deployment and will configure itself against them.

If no Zookeeper(s) found - each Kafka node will install Zookeeper locally and will rely on it.

If you want to remove your deployment - just delete a corresponding CloudFormation stack in AWS Web Console.


text:
using asio::ip::tcp;
using boost::lambda::bind;
using boost::lambda::var;
using boost::lambda::_1;
using boost::lambda::_2;

//----------------------------------------------------------------------

//
// This class manages socket timeouts by running the io_context using the timed
// io_context::run_for() member function. Each asynchronous operation is given
// a timeout within which it must complete. The socket operations themselves
// use boost::lambda function objects as completion handlers. For a given
// socket operation, the client object runs the io_context to block thread
// execution until the operation completes or the timeout is reached. If the
// io_context::run_for() function times out, the socket is closed and the
// outstanding asynchronous operation is cancelled.
//
class client
{
public:
  client()
    : socket_(io_context_)
  {
  }

  void connect(const std::string& host, const std::string& service,
      asio::chrono::steady_clock::duration timeout)
  {
    // Resolve the host name and service to a list of endpoints.
    tcp::resolver::results_type endpoints =
      tcp::resolver(io_context_).resolve(host, service);

    // Start the asynchronous operation itself. The boost::lambda function
    // object is used as a callback and will update the ec variable when the
    // operation completes. The blocking_udp_client.cpp example shows how you
    // can use boost::bind rather than boost::lambda.
    asio::error_code ec;
    asio::async_connect(socket_, endpoints, var(ec) = _1);

    // Run the operation until it completes, or until the timeout.
    run(timeout);

    // Determine whether a connection was successfully established.
    if (ec)
      throw asio::system_error(ec);
  }

  std::string read_line(asio::chrono::steady_clock::duration timeout)
  {
    // Start the asynchronous operation. The boost::lambda function object is
    // used as a callback and will update the ec variable when the operation
    // completes. The blocking_udp_client.cpp example shows how you can use
    // boost::bind rather than boost::lambda.
    asio::error_code ec;
    std::size_t n = 0;
    asio::async_read_until(socket_,
        asio::dynamic_buffer(input_buffer_),
        '\n', (var(ec) = _1, var(n) = _2));

    // Run the operation until it completes, or until the timeout.
    run(timeout);

    // Determine whether the read completed successfully.
    if (ec)
      throw asio::system_error(ec);

    std::string line(input_buffer_.substr(0, n - 1));
    input_buffer_.erase(0, n);
    return line;
  }

  void write_line(const std::string& line,
      asio::chrono::steady_clock::duration timeout)
  {
    std::string data = line + "\n";

    // Start the asynchronous operation. The boost::lambda function object is
    // used as a callback and will update the ec variable when the operation
    // completes. The blocking_udp_client.cpp example shows how you can use
    // boost::bind rather than boost::lambda.
    asio::error_code ec;
    asio::async_write(socket_, asio::buffer(data), var(ec) = _1);

    // Run the operation until it completes, or until the timeout.
    run(timeout);

    // Determine whether the read completed successfully.
    if (ec)
      throw asio::system_error(ec);
  }

private:
  void run(asio::chrono::steady_clock::duration timeout)
  {
    // Restart the io_context, as it may have been left in the "stopped" state
    // by a previous operation.
    io_context_.restart();

    // Block until the asynchronous operation has completed, or timed out. If
    // the pending asynchronous operation is a composed operation, the deadline
    // applies to the entire operation, rather than individual operations on
    // the socket.
    io_context_.run_for(timeout);

    // If the asynchronous operation completed successfully then the io_context
    // would have been stopped due to running out of work. If it was not
    // stopped, then the io_context::run_for call must have timed out.
    if (!io_context_.stopped())
    {
      // Close the socket to cancel the outstanding asynchronous operation.
      socket_.close();

      // Run the io_context again until the operation completes.
      io_context_.run();
    }
  }

  asio::io_context io_context_;
  tcp::socket socket_;
  std::string input_buffer_;
};

//----------------------------------------------------------------------

int main(int argc, char* argv[])
{
  try
  {
    if (argc != 4)
    {
      std::cerr << "Usage: blocking_tcp_client <host> <port> <message>\n";
      return 1;
    }

    client c;
    c.connect(argv[1], argv[2], asio::chrono::seconds(10));

    asio::chrono::steady_clock::time_point time_sent =
      asio::chrono::steady_clock::now();

    c.write_line(argv[3], asio::chrono::seconds(10));

    for (;;)
    {
      std::string line = c.read_line(asio::chrono::seconds(10));

      // Keep going until we get back the line that was sent.
      if (line == argv[3])
        break;
    }

    asio::chrono::steady_clock::time_point time_received =
      asio::chrono::steady_clock::now();

    std::cout << "Round trip time: ";
    std::cout << asio::chrono::duration_cast<
      asio::chrono::microseconds>(
        time_received - time_sent).count();
    std::cout << " microseconds\n";
  }
  catch (std::exception& e)
  {
    std::cerr << "Exception: " << e.what() << "\n";
  }

  return 0;
}


text: declare type UIRefreshControl = any;


text:
package cpup.lib.reflect

import scala.reflect.runtime.{universe => ru}

object ReflectUtil {
	def tpe[T](cla: Class[T]) = ru.runtimeMirror(cla.getClassLoader).staticClass(cla.getName).selfType
	def annotation(tree: ru.Tree) = (tree.tpe, tree.children.tail.map { a =>
		val a_ = a.asInstanceOf[ru.AssignOrNamedArg]
		(a_.lhs.asInstanceOf[ru.Ident].name.toString, a_.rhs match {
			case l: ru.Literal => l.value.value
		})
	}.toMap)
	def findAnnotation[A](sym: ru.Symbol)(implicit tt: ru.TypeTag[A]) = {
		sym.annotations.map(_.tree).find(_.tpe =:= tt.tpe).map(ReflectUtil.annotation(_)._2)
	}
}


text:
module Dynamoid
  module Criteria
    # @private
    class NonexistentFieldsDetector
      def initialize(conditions, source)
        @conditions = conditions
        @source = source
        @nonexistent_fields = nonexistent_fields
      end

      def found?
        @nonexistent_fields.present?
      end

      def warning_message
        return unless found?

        fields_list = @nonexistent_fields.map { |s| "`#{s}`" }.join(', ')
        count = @nonexistent_fields.size

        'where conditions contain nonexistent' \
          " field #{'name'.pluralize(count)} #{fields_list}"
      end

      private

      def nonexistent_fields
        fields_from_conditions - fields_existent
      end

      def fields_from_conditions
        @conditions.keys.map { |s| s.to_s.split('.')[0].to_sym }
      end

      def fields_existent
        @source.attributes.keys.map(&:to_sym)
      end
    end
  end
end


text:
from msrest.serialization import Model

class Provider(Model):
    """Resource provider information.

    Variables are only populated by the server, and will be ignored when
    sending a request.

    :ivar id: The provider ID.
    :vartype id: str
    :param namespace: The namespace of the resource provider.
    :type namespace: str
    :ivar registration_state: The registration state of the provider.
    :vartype registration_state: str
    :ivar resource_types: The collection of provider resource types.
    :vartype resource_types: list of :class:`ProviderResourceType
     <azure.mgmt.resource.resources.v2016_09_01.models.ProviderResourceType>`
    """

    _validation = {
        'id': {'readonly': True},
        'registration_state': {'readonly': True},
        'resource_types': {'readonly': True},
    }

    _attribute_map = {
        'id': {'key': 'id', 'type': 'str'},
        'namespace': {'key': 'namespace', 'type': 'str'},
        'registration_state': {'key': 'registrationState', 'type': 'str'},
        'resource_types': {'key': 'resourceTypes', 'type': '[ProviderResourceType]'},
    }

    def __init__(self, namespace=None):
        self.id = None
        self.namespace = namespace
        self.registration_state = None
        self.resource_types = None


text:
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace LibSVMSharp.Tests.Extensions
{
    [TestClass]
    public class TestSVMProblemExtensions
    {
        [TestMethod]
        public void TestMethod1()
        {
        }
    }
}


text:
Creates a taxonomy term group
##Syntax
```powershell
New-SPOTermGroup -GroupName <String> [-GroupId <Guid>] [-Description <String>] [-TermStoreName <String>]
```

##Parameters
Parameter|Type|Required|Description
---------|----|--------|-----------
|Description|String|False|Description to use for the term group.|
|GroupId|Guid|False|GUID to use for the term group; if not specified, or the empty GUID, a random GUID is generated and used.|
|GroupName|String|True|Name of the taxonomy term group to create.|
|TermStoreName|String|False|Term store to check; if not specified the default term store is used.|


text:
#ifndef SkTemplates_DEFINED
#define SkTemplates_DEFINED

#include "SkTypes.h"
#include <new>

/** \file SkTemplates.h

    This file contains light-weight template classes for type-safe and exception-safe
    resource management.
*/

/**
 *  SkTIsConst<T>::value is true if the type T is const.
 *  The type T is constrained not to be an array or reference type.
 */
template <typename T> struct SkTIsConst {
    static T* t;
    static uint16_t test(const volatile void*);
    static uint32_t test(volatile void *);
    static const bool value = (sizeof(uint16_t) == sizeof(test(t)));
};

///@{
/** SkTConstType<T, CONST>::type will be 'const T' if CONST is true, 'T' otherwise. */
template <typename T, bool CONST> struct SkTConstType {
    typedef T type;
};
template <typename T> struct SkTConstType<T, true> {
    typedef const T type;
};
///@}

/** \class SkAutoTCallVProc

    Call a function when this goes out of scope. The template uses two
    parameters, the object, and a function that is to be called in the destructor.
    If detach() is called, the object reference is set to null. If the object
    reference is null when the destructor is called, we do not call the
    function.
*/
template <typename T, void (*P)(T*)> class SkAutoTCallVProc : SkNoncopyable {
public:
    SkAutoTCallVProc(T* obj): fObj(obj) {}
    ~SkAutoTCallVProc() { if (fObj) P(fObj); }
    T* detach() { T* obj = fObj; fObj = NULL; return obj; }
private:
    T* fObj;
};

/** \class SkAutoTCallIProc

Call a function when this goes out of scope. The template uses two
parameters, the object, and a function that is to be called in the destructor.
If detach() is called, the object reference is set to null. If the object
reference is null when the destructor is called, we do not call the
function.
*/
template <typename T, int (*P)(T*)> class SkAutoTCallIProc : SkNoncopyable {
public:
    SkAutoTCallIProc(T* obj): fObj(obj) {}
    ~SkAutoTCallIProc() { if (fObj) P(fObj); }
    T* detach() { T* obj = fObj; fObj = NULL; return obj; }
private:
    T* fObj;
};

// See also SkTScopedPtr.
template <typename T> class SkAutoTDelete : SkNoncopyable {
public:
    SkAutoTDelete(T* obj) : fObj(obj) {}
    ~SkAutoTDelete() { delete fObj; }

    T* get() const { return fObj; }
    T& operator*() const { SkASSERT(fObj); return *fObj; }
    T* operator->() const { SkASSERT(fObj); return fObj; }

    /**
     *  Delete the owned object, setting the internal pointer to NULL.
     */
    void free() {
        delete fObj;
        fObj = NULL;
    }

    /**
     *  Transfer ownership of the object to the caller, setting the internal
     *  pointer to NULL. Note that this differs from get(), which also returns
     *  the pointer, but it does not transfer ownership.
     */
    T* detach() {
        T* obj = fObj;
        fObj = NULL;
        return obj;
    }

private:
    T*  fObj;
};

template <typename T> class SkAutoTDeleteArray : SkNoncopyable {
public:
    SkAutoTDeleteArray(T array[]) : fArray(array) {}
    ~SkAutoTDeleteArray() { SkDELETE_ARRAY(fArray); }

    T*      get() const { return fArray; }
    void    free() { SkDELETE_ARRAY(fArray); fArray = NULL; }
    T*      detach() { T* array = fArray; fArray = NULL; return array; }

private:
    T*  fArray;
};

/** Allocate an array of T elements, and free the array in the destructor
 */
template <typename T> class SkAutoTArray : SkNoncopyable {
public:
    SkAutoTArray() {
        fArray = NULL;
        SkDEBUGCODE(fCount = 0;)
    }
    /** Allocate count number of T elements
     */
    explicit SkAutoTArray(int count) {
        SkASSERT(count >= 0);
        fArray = NULL;
        if (count) {
            fArray = new T[count];
        }
        SkDEBUGCODE(fCount = count;)
    }

    /** Reallocates given a new count. Reallocation occurs even if new count equals old count.
     */
    void reset(int count) {
        delete[] fArray;
        SkASSERT(count >= 0);
        fArray = NULL;
        if (count) {
            fArray = new T[count];
        }
        SkDEBUGCODE(fCount = count;)
    }

    ~SkAutoTArray() {
        delete[] fArray;
    }

    /** Return the array of T elements. Will be NULL if count == 0
     */
    T* get() const { return fArray; }

    /** Return the nth element in the array
     */
    T&  operator[](int index) const {
        SkASSERT((unsigned)index < (unsigned)fCount);
        return fArray[index];
    }

private:
    T*  fArray;
    SkDEBUGCODE(int fCount;)
};

/** Wraps SkAutoTArray, with room for up to N elements preallocated
 */
template <size_t N, typename T> class SkAutoSTArray : SkNoncopyable {
public:
    /** Allocate count number of T elements
     */
    SkAutoSTArray(size_t count) {
        if (count > N) {
            fArray = new T[count];
        } else if (count) {
            fArray = new (fStorage) T[count];
        } else {
            fArray = NULL;
        }
        fCount = count;
    }

    ~SkAutoSTArray() {
        if (fCount > N) {
            delete[] fArray;
        } else {
            T* start = fArray;
            T* iter = start + fCount;
            while (iter > start) {
                (--iter)->~T();
            }
        }
    }

    /** Return the number of T elements in the array
     */
    size_t count() const { return fCount; }

    /** Return the array of T elements. Will be NULL if count == 0
     */
    T* get() const { return fArray; }

    /** Return the nth element in the array
     */
    T&  operator[](int index) const {
        SkASSERT((unsigned)index < fCount);
        return fArray[index];
    }

private:
    size_t  fCount;
    T*      fArray;
    // since we come right after fArray, fStorage should be properly aligned
    char    fStorage[N * sizeof(T)];
};

/** Allocate a temp array on the stack/heap.
    Does NOT call any constructors/destructors on T (i.e. T must be POD)
*/
template <typename T> class SkAutoTMalloc : SkNoncopyable {
public:
    SkAutoTMalloc(size_t count) {
        fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP);
    }

    ~SkAutoTMalloc() {
        sk_free(fPtr);
    }

    // doesn't preserve contents
    void reset (size_t count) {
        sk_free(fPtr);
        fPtr = fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP);
    }

    T* get() const { return fPtr; }

    operator T*() {
        return fPtr;
    }

    operator const T*() const {
        return fPtr;
    }

    T& operator[](int index) {
        return fPtr[index];
    }

    const T& operator[](int index) const {
        return fPtr[index];
    }

private:
    T*  fPtr;
};

template <size_t N, typename T> class SK_API SkAutoSTMalloc : SkNoncopyable {
public:
    SkAutoSTMalloc(size_t count) {
        if (count <= N) {
            fPtr = fTStorage;
        } else {
            fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP);
        }
    }

    ~SkAutoSTMalloc() {
        if (fPtr != fTStorage) {
            sk_free(fPtr);
        }
    }

    // doesn't preserve contents
    void reset(size_t count) {
        if (fPtr != fTStorage) {
            sk_free(fPtr);
        }
        if (count <= N) {
            fPtr = fTStorage;
        } else {
            fPtr = (T*)sk_malloc_flags(count * sizeof(T), SK_MALLOC_THROW | SK_MALLOC_TEMP);
        }
    }

    T* get() const { return fPtr; }

    operator T*() {
        return fPtr;
    }

    operator const T*() const {
        return fPtr;
    }

    T& operator[](int index) {
        return fPtr[index];
    }

    const T& operator[](int index) const {
        return fPtr[index];
    }

private:
    T*          fPtr;
    union {
        uint32_t    fStorage32[(N*sizeof(T) + 3) >> 2];
        T           fTStorage[1];   // do NOT want to invoke T::T()
    };
};

/**
 * Reserves memory that is aligned on double and pointer boundaries.
 * Hopefully this is sufficient for all practical purposes.
 */
template <size_t N> class SkAlignedSStorage : SkNoncopyable {
public:
    void* get() { return fData; }
private:
    union {
        void*   fPtr;
        double  fDouble;
        char    fData[N];
    };
};

/**
 * Reserves memory that is aligned on double and pointer boundaries.
 * Hopefully this is sufficient for all practical purposes. Otherwise,
 * we have to do some arcane trickery to determine alignment of non-POD
 * types. Lifetime of the memory is the lifetime of the object.
 */
template <int N, typename T> class SkAlignedSTStorage : SkNoncopyable {
public:
    /**
     * Returns void* because this object does not initialize the
     * memory. Use placement new for types that require a cons.
     */
    void* get() { return fStorage.get(); }
private:
    SkAlignedSStorage<sizeof(T)*N> fStorage;
};

#endif


text:
import Ember from 'ember';
import StoreInitializer from 'junia/initializers/store';
import { module, test } from 'qunit';

let application;

module('Unit | Initializer | store', {
  beforeEach() {
    Ember.run(function() {
      application = Ember.Application.create();
      application.deferReadiness();
    });
  }
});

// Replace this with your real tests.
test('it works', function(assert) {
  StoreInitializer.initialize(application);

  // you would normally confirm the results of the initializer here
  assert.ok(true);
});


text:
[![Build Status](https://api.travis-ci.org/kpj/SDEMotif.svg?branch=master)](https://api.travis-ci.org/kpj/SDEMotif)
[![Coverage Status](https://coveralls.io/repos/github/kpj/SDEMotif/badge.svg?branch=master)](https://coveralls.io/github/kpj/SDEMotif?branch=master)

Infer metabolite correlation patterns from network motifs.

`run.sh` shows an exemplary usage of the pipeline.


text:
{-# LANGUAGE OverloadedStrings #-}

-- | This Module define the main contants for sending Push Notifications through Microsoft Push Notification Service.
module Network.PushNotify.Mpns.Constants where

import Network.HTTP.Types
import Data.ByteString
import Data.Text

cWindowsPhoneTarget :: HeaderName
cWindowsPhoneTarget = "X-WindowsPhone-Target"

cNotificationClass :: HeaderName
cNotificationClass = "X-NotificationClass"

cToken :: ByteString
cToken = "token"

cToast :: ByteString
cToast = "toast"

-- Fields for a Header response to a successful request.

cNotificationStatus :: HeaderName
cNotificationStatus = "X-NotificationStatus"

cSubscriptionStatus :: HeaderName
cSubscriptionStatus = "X-SubscriptionStatus"

cDeviceConnectionStatus :: HeaderName
cDeviceConnectionStatus = "X-DeviceConnectionStatus"

cNotifReceived :: Text
cNotifReceived = "Received"

cNotifDropped :: Text
cNotifDropped = "Dropped"

cNotifQueuefull :: Text
cNotifQueuefull ="QueueFull"

cNotifSuppressed :: Text
cNotifSuppressed = "Suppressed"

cSubActive :: Text
cSubActive = "Active"

cSubExpired :: Text
cSubExpired = "Expired"

cConnConnected :: Text
cConnConnected = "Connected"

cConnInactive :: Text
cConnInactive = "InActive"

cConnDisconnected :: Text
cConnDisconnected = "Disconnected"

cConnTempDisconn :: Text
cConnTempDisconn = "TempDisconnected"