text:
const { resolve } = require('path');

module.exports = {
  // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
  // This option interrupts the configuration hierarchy at this file
  // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
  root: true,

  // https://eslint.vuejs.org/user-guide/#how-to-use-custom-parser
  // Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
  // `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
  parserOptions: {
    // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration
    // https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#eslint
    // Needed to make the parser take into account 'vue' files
    extraFileExtensions: ['.vue'],
    parser: '@typescript-eslint/parser',
    project: resolve(__dirname, './tsconfig.json'),
    tsconfigRootDir: __dirname,
    ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
    sourceType: 'module' // Allows for the use of imports
  },

  env: {
    browser: true
  },

  // Rules order is important, please avoid shuffling them
  extends: [
    // Base ESLint recommended rules
    // 'eslint:recommended',

    // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
    // ESLint typescript rules
    'plugin:@typescript-eslint/recommended',
    // consider disabling this class of rules if linting takes too long
    'plugin:@typescript-eslint/recommended-requiring-type-checking',

    // Uncomment any of the lines below to choose desired strictness,
    // but leave only one uncommented!
    // See https://eslint.vuejs.org/rules/#available-rules (look for Vuejs 2 ones)
    'plugin:vue/essential', // Priority A: Essential (Error Prevention)
    // 'plugin:vue/strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
    // 'plugin:vue/recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

    <% if (lintConfig === 'standard') { %>'standard'
    <% } else if (lintConfig === 'airbnb') { %>'airbnb-base'
    <% } else if (lintConfig === 'prettier') { %>// https://github.com/prettier/eslint-config-prettier#installation
    // usage with Prettier, provided by 'eslint-config-prettier'.
    'prettier'<% } %>
  ],

  plugins: [
    // required to apply rules which need type information
    '@typescript-eslint',

    // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
    // required to lint *.vue files
    'vue',

    <% if (lintConfig === 'prettier') { %>
    // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
    // Prettier has not been included as plugin to avoid performance impact
    // add it as an extension for your IDE
    <% } %>
  ],

  globals: {
    ga: 'readonly', // Google Analytics
    cordova: 'readonly',
    __statics: 'readonly',
    process: 'readonly',
    Capacitor: 'readonly',
    chrome: 'readonly'
  },

  // add your custom rules here
  rules: {
    <% if (lintConfig === 'standard') { %>
    // allow async-await
    'generator-star-spacing': 'off',
    // allow paren-less arrow functions
    'arrow-parens': 'off',
    'one-var': 'off',

    'import/first': 'off',
    'import/named': 'error',
    'import/namespace': 'error',
    'import/default': 'error',
    'import/export': 'error',
    'import/extensions': 'off',
    'import/no-unresolved': 'off',
    'import/no-extraneous-dependencies': 'off',<% } else if (lintConfig === 'airbnb') { %>
    'no-param-reassign': 'off',

    'import/first': 'off',
    'import/named': 'error',
    'import/namespace': 'error',
    'import/default': 'error',
    'import/export': 'error',
    'import/extensions': 'off',
    'import/no-unresolved': 'off',
    'import/no-extraneous-dependencies': 'off',
    'import/prefer-default-export': 'off',
    <% } %>
    'prefer-promise-reject-errors': 'off',
    'func-names': 'off',

    // TypeScript
    quotes: ['warn', 'single', { avoidEscape: true }],
    '@typescript-eslint/explicit-function-return-type': 'off',
    '@typescript-eslint/explicit-module-boundary-types': 'off',
    <% if (lintConfig === 'airbnb') { %>
    'no-shadow': 'off',
    '@typescript-eslint/no-shadow': 'error',
    <% } %>

    // allow debugger during development only
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
  }
}


text:
title: DevOps
localeTitle: DevOps
---
## DevOps

![ciclo devops](http://blog.xebialabs.com/wp-content/uploads/2016/03/DevOps-cycle-PPT-COLOURS.png)

DevOps es la integración del trabajo entre las funciones de Desarrollo y Operaciones. Un enfoque para hacer esto es automatizar la forma en que el software se integra y despliega a medida que migra entre los entornos de desarrollo, pruebas y producción. Esto facilita los procesos de instalación del software, lo que reduce idealmente la posibilidad de error.

Alternativamente, el desarrollo de software se puede hacer dentro de silos. One silo es responsable de tomar solicitudes de funciones, luego convertirlas en componentes de software con cualquier lenguaje de programación, y las pruebas básicas se realizan en un entorno con datos ficticios. Cuando se completan las pruebas locales, los productos de trabajo se envían a un equipo de operaciones independiente que es responsable de luego reinstalar el software en un entorno de producción separado que admita el tráfico de usuarios reales. Una vez que el software está en este entorno, los equipos de operaciones mantienen la responsabilidad del código, incluida la identificación de cualquier defecto del producto. Si se encuentran estos defectos, se comparten con el equipo de desarrollo, que intenta resolverlos, luego entrega una nueva versión del software a los equipos de operaciones.

Esta sección contiene artículos que introducen las tecnologías utilizadas en DevOps.

### Más información

*   [Lea más sobre DevOps en Wikipedia](https://en.wikipedia.org/wiki/DevOps)
*   [Vea este video que explica Devops](https://youtu.be/_I94-tJlovg)

### Recursos

Esta sección contiene enlaces para aprender DevOps a través de una experiencia MOOC. Los cursos pueden ser de pago solamente.

*   [curso edX](https://www.edx.org/microsoft-professional-program-front-end-development)

### Laboratorio

[DevOps](https://github.com/Microsoft/TechnicalCommunityContent/tree/master/DevOps)

redpajama_set_name: RedPajamaGithub


text:
disnix-stafftracker-dotnet-example
==================================
This is an example case representing a system to manage staff of a university
department. The system uses data stored in several databases. For each database,
a web service interface is provided to retrieve and update records. Moreover, a
geo location service is provided using [GeoIP](http://www.maxmind.com/app/ip-location)
to determine the location of a staff member using an IP address. A web
application front-end is provided for end-users to retrieve and edit staff
members.

Architecture
============
![Stafftracker architecture](doc/architecture.png)

The above figure shows the architecture of this example, consisting of three
layers. The data layer contains various SQL server databases storing data sets. The
service layer provides web service interfaces to the databases (the
`GeolocationService` uses GeoIP to lookup location from an IP address). The
presentation layer contains a web application front-end which can be used by end
users to manage staff of a university. All the components in the figure are
*distributable* components (or *services*) which can deployed to various machines
in the network.

Usage
=====
The `deployment/DistributedDeployment` sub folder contains all neccessary Disnix
models, such as a services, infrastructure and distribution models required for
deployment.

Deployment using Disnix in a Windows network
--------------------------------------------
First, you must manually install a network of Windows machines of running the
Disnix service. Then you must adapt the infrastructure model to match to
properties of your network and the distribution model to map the services to the
right machines.

To deploy the databases you must install
[SQL server](http://www.microsoft.com/en-us/server-cloud/products/sql-server/).
To deploy the web services and web application services you must install
[Internet Information Services](http://www.iis.net). Check the instructions of
the corresponding software distributions how to install these system services.
Dysnomia detects the presence of these system services and configures the
corresponding modules to use them.

The system can be deployed by running the following command:

    $ disnix-env -s services.nix -i infrastructure.nix -d distribution.nix

Running the system
==================
After the system has been deployed, open a web browser and type the following URL:

    http://test1/StaffTracker

The `test1` hostname must be replaced by the real hostname of the machine to
which the web application front-end is deployed. Check the distribution model for
this. If the network expression is used included in this example, the third
machine in the network machine automatically boots into IceWM and includes the
Mozilla Firefox web browser for convenience.

License
=======
This package is released under the [MIT license](http://opensource.org/licenses/MIT).


text:
package org.apache.catalina.core;

import java.util.Locale;

import javax.servlet.ServletResponse;
import javax.servlet.ServletResponseWrapper;

import org.apache.catalina.util.StringManager;

/**
 * Wrapper around a javax.servlet.ServletResponse
 * that transforms an application response object (which might be the original
 * one passed to a servlet, or might be based on the 2.3
 * javax.servlet.ServletResponseWrapper class)
 * back into an internal org.apache.catalina.Response.
 *

 * WARNING:  Due to Java's lack of support for multiple
 * inheritance, all of the logic in ApplicationResponse is
 * duplicated in ApplicationHttpResponse.  Make sure that you
 * keep these two classes in synchronization when making changes!
 *
 * @author Craig R. McClanahan
 * @version $Revision: 302726 $ $Date: 2004-02-27 15:59:07 +0100 (ven., 27 févr. 2004) $
 */

class ApplicationResponse extends ServletResponseWrapper {

    // ----------------------------------------------------------- Constructors

    /**
     * Construct a new wrapped response around the specified servlet response.
     *
     * @param response The servlet response being wrapped
     */
    public ApplicationResponse(ServletResponse response) {

        this(response, false);

    }

    /**
     * Construct a new wrapped response around the specified servlet response.
     *
     * @param response The servlet response being wrapped
     * @param included true if this response is being processed
     *  by a RequestDispatcher.include() call
     */
    public ApplicationResponse(ServletResponse response, boolean included) {

        super(response);
        setIncluded(included);

    }

    // ----------------------------------------------------- Instance Variables

    /**
     * Is this wrapped response the subject of an include()
     * call?
     */
    protected boolean included = false;

    /**
     * The string manager for this package.
     */
    protected static StringManager sm =
        StringManager.getManager(Constants.Package);

    // ------------------------------------------------ ServletResponse Methods

    /**
     * Disallow reset() calls on a included response.
     *
     * @exception IllegalStateException if the response has already
     *  been committed
     */
    public void reset() {

        // If already committed, the wrapped response will throw ISE
        if (!included || getResponse().isCommitted())
            getResponse().reset();

    }

    /**
     * Disallow setContentLength() calls on an included response.
     *
     * @param len The new content length
     */
    public void setContentLength(int len) {

        if (!included)
            getResponse().setContentLength(len);

    }

    /**
     * Disallow setContentType() calls on an included response.
     *
     * @param type The new content type
     */
    public void setContentType(String type) {

        if (!included)
            getResponse().setContentType(type);

    }

    /**
     * Ignore setLocale() calls on an included response.
     *
     * @param loc The new locale
     */
    public void setLocale(Locale loc) {
        if (!included)
            getResponse().setLocale(loc);
    }

    /**
     * Ignore setBufferSize() calls on an included response.
     *
     * @param size The buffer size
     */
    public void setBufferSize(int size) {
        if (!included)
            getResponse().setBufferSize(size);
    }

    // ----------------------------------------- ServletResponseWrapper Methods

    /**
     * Set the response that we are wrapping.
     *
     * @param response The new wrapped response
     */
    public void setResponse(ServletResponse response) {

        super.setResponse(response);

    }

    // -------------------------------------------------------- Package Methods

    /**
     * Return the included flag for this response.
     */
    boolean isIncluded() {

        return (this.included);

    }

    /**
     * Set the included flag for this response.
     *
     * @param included The new included flag
     */
    void setIncluded(boolean included) {

        this.included = included;

    }

}


text:
#ifndef _M68KNOMMU_CACHEFLUSH_H
#define _M68KNOMMU_CACHEFLUSH_H

#include <linux/mm.h>
#include <asm/mcfsim.h>

#define flush_cache_all()			__flush_cache_all()
#define flush_cache_mm(mm)			do { } while (0)
#define flush_cache_dup_mm(mm)			do { } while (0)
#define flush_cache_range(vma, start, end)	do { } while (0)
#define flush_cache_page(vma, vmaddr)		do { } while (0)
#define flush_dcache_range(start, len)		__flush_dcache_all()
#define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
#define flush_dcache_page(page)			do { } while (0)
#define flush_dcache_mmap_lock(mapping)		do { } while (0)
#define flush_dcache_mmap_unlock(mapping)	do { } while (0)
#define flush_icache_range(start, len)		__flush_icache_all()
#define flush_icache_page(vma,pg)		do { } while (0)
#define flush_icache_user_range(vma,pg,adr,len)	do { } while (0)
#define flush_cache_vmap(start, end)		do { } while (0)
#define flush_cache_vunmap(start, end)		do { } while (0)

#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
	memcpy(dst, src, len)
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
	memcpy(dst, src, len)

void mcf_cache_push(void);

static inline void __flush_cache_all(void)
{
#ifdef CACHE_PUSH
	mcf_cache_push();
#endif
#ifdef CACHE_INVALIDATE
	__asm__ __volatile__ (
		"movel	%0, %%d0\n\t"
		"movec	%%d0, %%CACR\n\t"
		"nop\n\t"
		: : "i" (CACHE_INVALIDATE) : "d0" );
#endif
}

/*
 * Some ColdFire parts implement separate instruction and data caches,
 * on those we should just flush the appropriate cache. If we don't need
 * to do any specific flushing then this will be optimized away.
 */
static inline void __flush_icache_all(void)
{
#ifdef CACHE_INVALIDATEI
	__asm__ __volatile__ (
		"movel	%0, %%d0\n\t"
		"movec	%%d0, %%CACR\n\t"
		"nop\n\t"
		: : "i" (CACHE_INVALIDATEI) : "d0" );
#endif
}

static inline void __flush_dcache_all(void)
{
#ifdef CACHE_PUSH
	mcf_cache_push();
#endif
#ifdef CACHE_INVALIDATED
	__asm__ __volatile__ (
		"movel	%0, %%d0\n\t"
		"movec	%%d0, %%CACR\n\t"
		"nop\n\t"
		: : "i" (CACHE_INVALIDATED) : "d0" );
#else
	/* Flush the wrtite buffer */
	__asm__ __volatile__ ( "nop" );
#endif
}
#endif /* _M68KNOMMU_CACHEFLUSH_H */


text:
package net.violet.platform.datamodel.factories.mock;

import java.util.List;

import net.violet.platform.api.actions.AbstractTestBase;
import net.violet.platform.datamodel.Lang;
import net.violet.platform.datamodel.VObject;
import net.violet.platform.datamodel.Hardware.HARDWARE;
import net.violet.platform.datamodel.factories.Factories;
import net.violet.platform.datamodel.mock.UserMock;
import net.violet.platform.datamodel.mock.VObjectMock;
import net.violet.platform.util.CCalendar;

import org.junit.Assert;
import org.junit.Test;

public class VObjectFactoryMockTest extends AbstractTestBase {

	@Test
	public void searchUsersTest() {
		final Lang frLang = Factories.LANG.findByIsoCode("fr");
		final CCalendar theCal = new CCalendar(true);
		final UserMock myUser = new UserMock(1, "userski", "passmot", "email1@emails.eu", frLang, "FR", "firstName1", "lastName1", getParisTimezone(), "H", "Zip", "Paris", 1);
		theCal.set(1980, 05, 12);
		myUser.getAnnu().setDateBirth(new java.sql.Date(theCal.getTimeInMillis()));
		final VObject theObject = new VObjectMock(61009, "F00004000001", "ObjFacMoTe", myUser, HARDWARE.V2, Factories.TIMEZONE.findByJavaId("Europe/Paris"), frLang);

		theObject.getPreferences().setPreferences(true, true, null);
		final List<VObject> theObjects = Factories.VOBJECT.searchObjects(null, null, null, "FR", 0, 10);
		Assert.assertNotNull(theObjects);
		Assert.assertEquals(1, theObjects.size());
		Assert.assertEquals(theObject, theObjects.get(0));

		theObject.getPreferences().setPreferences(false, true, null);
		final List<VObject> theObjects1 = Factories.VOBJECT.searchObjects(null, null, null, "FR", 0, 10);
		Assert.assertNotNull(theObjects1);
		Assert.assertTrue(theObjects1.isEmpty());
	}
}


text:
package org.holoeverywhere.app;

import org.holoeverywhere.widget.ExpandableListView;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnCreateContextMenuListener;
import android.widget.ExpandableListAdapter;

import com.actionbarsherlock.R;

public abstract class ExpandableListActivity extends Activity implements
        OnCreateContextMenuListener, ExpandableListView.OnChildClickListener,
        ExpandableListView.OnGroupCollapseListener,
        ExpandableListView.OnGroupExpandListener {
    ExpandableListAdapter mAdapter;
    boolean mFinishedStart = false;
    ExpandableListView mList;

    private void ensureList() {
        if (mList != null) {
            return;
        }
        setContentView(R.layout.expandable_list_content);
    }

    public ExpandableListAdapter getExpandableListAdapter() {
        return mAdapter;
    }

    public ExpandableListView getExpandableListView() {
        ensureList();
        return mList;
    }

    public long getSelectedId() {
        return mList.getSelectedId();
    }

    public long getSelectedPosition() {
        return mList.getSelectedPosition();
    }

    @Override
    public boolean onChildClick(ExpandableListView parent, View v,
            int groupPosition, int childPosition, long id) {
        return false;
    }

    @Override
    public void onContentChanged() {
        super.onContentChanged();
        View emptyView = findViewById(R.id.empty);
        mList = (ExpandableListView) findViewById(android.R.id.list);
        if (mList == null) {
            throw new RuntimeException(
                    "Your content must have a ExpandableListView whose id attribute is "
                            + "'android.R.id.list'");
        }
        if (emptyView != null) {
            mList.setEmptyView(emptyView);
        }
        mList.setOnChildClickListener(this);
        mList.setOnGroupExpandListener(this);
        mList.setOnGroupCollapseListener(this);

        if (mFinishedStart) {
            setListAdapter(mAdapter);
        }
        mFinishedStart = true;
    }

    @Override
    public void onGroupCollapse(int groupPosition) {
    }

    @Override
    public void onGroupExpand(int groupPosition) {
    }

    @Override
    protected void onRestoreInstanceState(Bundle state) {
        ensureList();
        super.onRestoreInstanceState(state);
    }

    public void setListAdapter(ExpandableListAdapter adapter) {
        synchronized (this) {
            ensureList();
            mAdapter = adapter;
            mList.setAdapter(adapter);
        }
    }

    public boolean setSelectedChild(int groupPosition, int childPosition,
            boolean shouldExpandGroup) {
        return mList.setSelectedChild(groupPosition, childPosition,
                shouldExpandGroup);
    }

    public void setSelectedGroup(int groupPosition) {
        mList.setSelectedGroup(groupPosition);
    }
}


text:
var __extends = this.__extends || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    __.prototype = b.prototype;
    d.prototype = new __();
};
var types = require("utils/types");
var proxy = require("ui/core/proxy");
var style = require("ui/styling/style");
var styling = require("ui/styling");
var visualStateConstants = require("ui/styling/visual-state-constants");
var trace = require("trace");
var dependencyObservable = require("ui/core/dependency-observable");
var gestures = require("ui/gestures");
var bindable = require("ui/core/bindable");
var styleScope = require("ui/styling/style-scope");
var enums = require("ui/enums");
var utils = require("utils/utils");
function getViewById(view, id) {
    if (!view) {
        return undefined;
    }
    if (view.id === id) {
        return view;
    }
    var retVal;
    var descendantsCallback = function (child) {
        if (child.id === id) {
            retVal = child;
            return false;
        }
        return true;
    };
    eachDescendant(view, descendantsCallback);
    return retVal;
}
exports.getViewById = getViewById;
function eachDescendant(view, callback) {
    if (!callback || !view) {
        return;
    }
    var continueIteration;
    var localCallback = function (child) {
        continueIteration = callback(child);
        if (continueIteration) {
            child._eachChildView(localCallback);
        }
        return continueIteration;
    };
    view._eachChildView(localCallback);
}
exports.eachDescendant = eachDescendant;
function getAncestor(view, typeName) {
    var parent = view.parent;
    while (parent && parent.typeName !== typeName) {
        parent = parent.parent;
    }
    return parent;
}
exports.getAncestor = getAncestor;
var viewIdCounter = 0;
function onCssClassPropertyChanged(data) {
    var view = data.object;
    if (types.isString(data.newValue)) {
        view._cssClasses = data.newValue.split(" ");
    }
    else {
        view._cssClasses.length = 0;
    }
}
var idProperty = new dependencyObservable.Property("id", "View", new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.AffectsStyle));
var cssClassProperty = new dependencyObservable.Property("cssClass", "View", new proxy.PropertyMetadata(undefined, dependencyObservable.PropertyMetadataSettings.AffectsStyle, onCssClassPropertyChanged));
var isEnabledProperty = new dependencyObservable.Property("isEnabled", "View", new proxy.PropertyMetadata(true));
var isUserInteractionEnabledProperty = new dependencyObservable.Property("isUserInteractionEnabled", "View", new proxy.PropertyMetadata(true));
var View = (function (_super) {
    __extends(View, _super);
    function View(options) {
        _super.call(this);
        this._isVisibleCache = true;
        this._measuredWidth = Number.NaN;
        this._measuredHeight = Number.NaN;
        this._oldWidthMeasureSpec = Number.NaN;
        this._oldHeightMeasureSpec = Number.NaN;
        this._oldLeft = 0;
        this._oldTop = 0;
        this._oldRight = 0;
        this._oldBottom = 0;
        this._isLayoutValid = false;
        this._isAddedToNativeVisualTree = false;
        this._cssClasses = [];
        this._options = options;
        this._style = new style.Style(this);
        this._domId = viewIdCounter++;
        this._visualState = visualStateConstants.Normal;
    }
    View.prototype.observe = function (type, callback) {
        this._gesturesObserver = gestures.observe(this, type, callback);
        return this._gesturesObserver;
    };
    View.prototype.getViewById = function (id) {
        return getViewById(this, id);
    };
    Object.defineProperty(View.prototype, "color", {
        get: function () {
            return this.style.color;
        },
        set: function (value) {
            this.style.color = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "backgroundColor", {
        get: function () {
            return this.style.backgroundColor;
        },
        set: function (value) {
            this.style.backgroundColor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "minWidth", {
        get: function () {
            return this.style.minWidth;
        },
        set: function (value) {
            this.style.minWidth = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "minHeight", {
        get: function () {
            return this.style.minHeight;
        },
        set: function (value) {
            this.style.minHeight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "width", {
        get: function () {
            return this.style.width;
        },
        set: function (value) {
            this.style.width = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "height", {
        get: function () {
            return this.style.height;
        },
        set: function (value) {
            this.style.height = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "margin", {
        get: function () {
            return this.style.margin;
        },
        set: function (value) {
            this.style.margin = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "marginLeft", {
        get: function () {
            return this.style.marginLeft;
        },
        set: function (value) {
            this.style.marginLeft = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "marginTop", {
        get: function () {
            return this.style.marginTop;
        },
        set: function (value) {
            this.style.marginTop = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "marginRight", {
        get: function () {
            return this.style.marginRight;
        },
        set: function (value) {
            this.style.marginRight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "marginBottom", {
        get: function () {
            return this.style.marginBottom;
        },
        set: function (value) {
            this.style.marginBottom = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "padding", {
        get: function () {
            return this.style.padding;
        },
        set: function (value) {
            this.style.padding = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "paddingLeft", {
        get: function () {
            return this.style.paddingLeft;
        },
        set: function (value) {
            this.style.paddingLeft = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "paddingTop", {
        get: function () {
            return this.style.paddingTop;
        },
        set: function (value) {
            this.style.paddingTop = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "paddingRight", {
        get: function () {
            return this.style.paddingRight;
        },
        set: function (value) {
            this.style.paddingRight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "paddingBottom", {
        get: function () {
            return this.style.paddingBottom;
        },
        set: function (value) {
            this.style.paddingBottom = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "horizontalAlignment", {
        get: function () {
            return this.style.horizontalAlignment;
        },
        set: function (value) {
            this.style.horizontalAlignment = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "verticalAlignment", {
        get: function () {
            return this.style.verticalAlignment;
        },
        set: function (value) {
            this.style.verticalAlignment = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "visibility", {
        get: function () {
            return this.style.visibility;
        },
        set: function (value) {
            this.style.visibility = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "opacity", {
        get: function () {
            return this.style.opacity;
        },
        set: function (value) {
            this.style.opacity = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "isEnabled", {
        get: function () {
            return this._getValue(View.isEnabledProperty);
        },
        set: function (value) {
            this._setValue(View.isEnabledProperty, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "isUserInteractionEnabled", {
        get: function () {
            return this._getValue(View.isUserInteractionEnabledProperty);
        },
        set: function (value) {
            this._setValue(View.isUserInteractionEnabledProperty, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "id", {
        get: function () {
            return this._getValue(View.idProperty);
        },
        set: function (value) {
            this._setValue(View.idProperty, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "cssClass", {
        get: function () {
            return this._getValue(View.cssClassProperty);
        },
        set: function (value) {
            this._setValue(View.cssClassProperty, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "style", {
        get: function () {
            return this._style;
        },
        set: function (value) {
            this._applyInlineStyle(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "isLayoutValid", {
        get: function () {
            return this._isLayoutValid;
        },
        set: function (value) {
            throw new Error("isLayoutValid is read-only property.");
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "visualState", {
        get: function () {
            return this._visualState;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "cssType", {
        get: function () {
            return this.typeName.toLowerCase();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "parent", {
        get: function () {
            return this._parent;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "isLoaded", {
        get: function () {
            return this._isLoaded;
        },
        enumerable: true,
        configurable: true
    });
    View.prototype.onLoaded = function () {
        this._loadEachChildView();
        this._applyStyleFromScope();
        this._isLoaded = true;
        this._emit("loaded");
    };
    View.prototype._loadEachChildView = function () {
        if (this._childrenCount > 0) {
            var eachChild = function (child) {
                child.onLoaded();
                return true;
            };
            this._eachChildView(eachChild);
        }
    };
    View.prototype.onUnloaded = function () {
        this._unloadEachChildView();
        this._isLoaded = false;
        this._emit("unloaded");
    };
    View.prototype._unloadEachChildView = function () {
        if (this._childrenCount > 0) {
            var eachChild = function (child) {
                child.onUnloaded();
                return true;
            };
            this._eachChildView(eachChild);
        }
    };
    View.prototype._onPropertyChanged = function (property, oldValue, newValue) {
        _super.prototype._onPropertyChanged.call(this, property, oldValue, newValue);
        if (this._childrenCount > 0) {
            var shouldUpdateInheritableProps = ((property.metadata && property.metadata.inheritable) && property.name !== "bindingContext" && !(property instanceof styling.Property));
            if (shouldUpdateInheritableProps) {
                var notifyEachChild = function (child) {
                    child._setValue(property, newValue, dependencyObservable.ValueSource.Inherited);
                    return true;
                };
                this._eachChildView(notifyEachChild);
            }
        }
        this._checkMetadataOnPropertyChanged(property.metadata);
    };
    View.prototype._checkMetadataOnPropertyChanged = function (metadata) {
        if (metadata.affectsLayout) {
            this.requestLayout();
        }
        if (metadata.affectsStyle) {
            this.style._resetCssValues();
            this._applyStyleFromScope();
        }
    };
    View.prototype.measure = function (widthMeasureSpec, heightMeasureSpec) {
        this._setCurrentMeasureSpecs(widthMeasureSpec, heightMeasureSpec);
    };
    View.prototype.layout = function (left, top, right, bottom) {
        this._setCurrentLayoutBounds(left, top, right, bottom);
    };
    View.prototype.getMeasuredWidth = function () {
        return this._measuredWidth;
    };
    View.prototype.getMeasuredHeight = function () {
        return this._measuredHeight;
    };
    View.prototype.setMeasuredDimension = function (measuredWidth, measuredHeight) {
        this._measuredWidth = measuredWidth;
        this._measuredHeight = measuredHeight;
        trace.write(this + " :setMeasuredDimension: " + measuredWidth + ", " + measuredHeight, trace.categories.Layout);
    };
    View.prototype.requestLayout = function () {
        this._isLayoutValid = false;
    };
    View.prototype.onMeasure = function (widthMeasureSpec, heightMeasureSpec) {
    };
    View.prototype.onLayout = function (left, top, right, bottom) {
    };
    View.prototype.layoutNativeView = function (left, top, right, bottom) {
    };
    View.resolveSizeAndState = function (size, specSize, specMode, childMeasuredState) {
        var result = size;
        switch (specMode) {
            case utils.layout.UNSPECIFIED:
                result = size;
                break;
            case utils.layout.AT_MOST:
                if (specSize < size) {
                    result = Math.round(specSize + 0.499) | utils.layout.MEASURED_STATE_TOO_SMALL;
                }
                break;
            case utils.layout.EXACTLY:
                result = specSize;
                break;
        }
        return Math.round(result + 0.499) | (childMeasuredState & utils.layout.MEASURED_STATE_MASK);
    };
    View.layoutChild = function (parent, child, left, top, right, bottom) {
        if (!child || !child._isVisible) {
            return;
        }
        var density = utils.layout.getDisplayDensity();
        var childTop;
        var childLeft;
        var childWidth = child.getMeasuredWidth();
        var childHeight = child.getMeasuredHeight();
        var vAlignment;
        if (!isNaN(child.height) && child.verticalAlignment === enums.VerticalAlignment.stretch) {
            vAlignment = enums.VerticalAlignment.center;
        }
        else {
            vAlignment = child.verticalAlignment;
        }
        switch (vAlignment) {
            case enums.VerticalAlignment.top:
                childTop = top + child.marginTop * density;
                break;
            case enums.VerticalAlignment.center:
                childTop = top + (bottom - top - childHeight + (child.marginTop - child.marginBottom) * density) / 2;
                break;
            case enums.VerticalAlignment.bottom:
                childTop = bottom - childHeight - (child.marginBottom * density);
                break;
            case enums.VerticalAlignment.stretch:
            default:
                childTop = top + child.marginTop * density;
                childHeight = bottom - top - (child.marginTop + child.marginBottom) * density;
                break;
        }
        var hAlignment;
        if (!isNaN(child.width) && child.horizontalAlignment === enums.HorizontalAlignment.stretch) {
            hAlignment = enums.HorizontalAlignment.center;
        }
        else {
            hAlignment = child.horizontalAlignment;
        }
        switch (hAlignment) {
            case enums.HorizontalAlignment.left:
                childLeft = left + child.marginLeft * density;
                break;
            case enums.HorizontalAlignment.center:
                childLeft = left + (right - left - childWidth + (child.marginLeft - child.marginRight) * density) / 2;
                break;
            case enums.HorizontalAlignment.right:
                childLeft = right - childWidth - child.marginRight * density;
                break;
            case enums.HorizontalAlignment.stretch:
            default:
                childLeft = left + child.marginLeft * density;
                childWidth = right - left - (child.marginLeft + child.marginRight) * density;
                break;
        }
        var childRight = Math.round(childLeft + childWidth);
        var childBottom = Math.round(childTop + childHeight);
        childLeft = Math.round(childLeft);
        childTop = Math.round(childTop);
        trace.write(parent + " :layoutChild: " + child + " " + childLeft + ", " + childTop + ", " + childRight + ", " + childBottom, trace.categories.Layout);
        child.layout(childLeft, childTop, childRight, childBottom);
    };
    View.measureChild = function (parent, child, widthMeasureSpec, heightMeasureSpec) {
        var measureWidth = 0;
        var measureHeight = 0;
        if (child && child._isVisible) {
            var width = utils.layout.getMeasureSpecSize(widthMeasureSpec);
            var widthMode = utils.layout.getMeasureSpecMode(widthMeasureSpec);
            var height = utils.layout.getMeasureSpecSize(heightMeasureSpec);
            var heightMode = utils.layout.getMeasureSpecMode(heightMeasureSpec);
            trace.write(parent + " :measureChild: " + child + " " + utils.layout.getMode(widthMode) + " " + width + ", " + utils.layout.getMode(heightMode) + " " + height, trace.categories.Layout);
            var childWidthMeasureSpec = View.getMeasureSpec(child, width, widthMode, true);
            var childHeightMeasureSpec = View.getMeasureSpec(child, height, heightMode, false);
            child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
            measureWidth = child.getMeasuredWidth();
            measureHeight = child.getMeasuredHeight();
            var density = utils.layout.getDisplayDensity();
            measureWidth = Math.round(measureWidth + (child.marginLeft + child.marginRight) * density);
            measureHeight = Math.round(measureHeight + (child.marginTop + child.marginBottom) * density);
        }
        return { measuredWidth: measureWidth, measuredHeight: measureHeight };
    };
    View.getMeasureSpec = function (view, parentLength, parentSpecMode, horizontal) {
        var density = utils.layout.getDisplayDensity();
        var margins = horizontal ? view.marginLeft + view.marginRight : view.marginTop + view.marginBottom;
        margins = Math.floor(margins * density);
        var resultSize = 0;
        var resultMode = 0;
        var measureLength = Math.max(0, parentLength - margins);
        var childLength = Math.floor((horizontal ? view.width : view.height) * density);
        if (!isNaN(childLength)) {
            if (parentSpecMode !== utils.layout.UNSPECIFIED) {
                resultSize = Math.min(parentLength, childLength);
            }
            else {
                resultSize = childLength;
            }
            resultMode = utils.layout.EXACTLY;
        }
        else {
            switch (parentSpecMode) {
                case utils.layout.EXACTLY:
                    resultSize = measureLength;
                    var stretched = horizontal ? view.horizontalAlignment === enums.HorizontalAlignment.stretch : view.verticalAlignment === enums.VerticalAlignment.stretch;
                    resultMode = stretched ? utils.layout.EXACTLY : utils.layout.AT_MOST;
                    break;
                case utils.layout.AT_MOST:
                    resultSize = measureLength;
                    resultMode = utils.layout.AT_MOST;
                    break;
                case utils.layout.UNSPECIFIED:
                    resultSize = 0;
                    resultMode = utils.layout.UNSPECIFIED;
                    break;
            }
        }
        return utils.layout.makeMeasureSpec(resultSize, resultMode);
    };
    View.prototype._getCurrentMeasureSpecs = function () {
        return {
            widthMeasureSpec: this._oldWidthMeasureSpec,
            heightMeasureSpec: this._oldHeightMeasureSpec
        };
    };
    View.prototype._setCurrentMeasureSpecs = function (widthMeasureSpec, heightMeasureSpec) {
        var changed = this._oldWidthMeasureSpec !== widthMeasureSpec || this._oldHeightMeasureSpec !== heightMeasureSpec;
        this._oldWidthMeasureSpec = widthMeasureSpec;
        this._oldHeightMeasureSpec = heightMeasureSpec;
        return changed;
    };
    View.prototype._getCurrentLayoutBounds = function () {
        return { left: this._oldLeft, top: this._oldTop, right: this._oldRight, bottom: this._oldBottom };
    };
    View.prototype._setCurrentLayoutBounds = function (left, top, right, bottom) {
        this._isLayoutValid = true;
        var changed = this._oldLeft !== left || this._oldTop !== top || this._oldRight !== right || this._oldBottom !== bottom;
        this._oldLeft = left;
        this._oldTop = top;
        this._oldRight = right;
        this._oldBottom = bottom;
        return changed;
    };
    View.prototype._onBindingContextChanged = function (oldValue, newValue) {
        _super.prototype._onBindingContextChanged.call(this, oldValue, newValue);
        if (this._childrenCount === 0) {
            return;
        }
        var thatContext = this.bindingContext;
        var eachChild = function (child) {
            child._setValue(bindable.Bindable.bindingContextProperty, thatContext, dependencyObservable.ValueSource.Inherited);
            return true;
        };
        this._eachChildView(eachChild);
    };
    View.prototype._applyStyleFromScope = function () {
        var rootPage = getAncestor(this, "Page");
        if (!rootPage || !rootPage.isLoaded) {
            return;
        }
        var scope = rootPage._getStyleScope();
        scope.applySelectors(this);
    };
    View.prototype._applyInlineStyle = function (inlineStyle) {
        if (types.isString(inlineStyle)) {
            styleScope.applyInlineSyle(this, inlineStyle);
        }
    };
    View.prototype._onAttached = function (context) {
    };
    View.prototype._onDetached = function (force) {
    };
    View.prototype._createUI = function () {
    };
    View.prototype._onContextChanged = function () {
    };
    View.prototype._prepareNativeView = function (view) {
    };
    Object.defineProperty(View.prototype, "_childrenCount", {
        get: function () {
            return 0;
        },
        enumerable: true,
        configurable: true
    });
    View.prototype._eachChildView = function (callback) {
    };
    View.prototype._addView = function (view) {
        if (!view) {
            throw new Error("Expecting a valid View instance.");
        }
        if (view._parent) {
            throw new Error("View already has a parent.");
        }
        view._parent = this;
        this._addViewCore(view);
        trace.write("called _addView on view " + this._domId + " for a child " + view._domId, trace.categories.ViewHierarchy);
    };
    View.prototype._addViewCore = function (view) {
        view._setValue(bindable.Bindable.bindingContextProperty, this.bindingContext, dependencyObservable.ValueSource.Inherited);
        view._inheritProperties(this);
        view.style._inheritStyleProperties();
        if (!view._isAddedToNativeVisualTree) {
            view._isAddedToNativeVisualTree = this._addViewToNativeVisualTree(view);
        }
        if (this._isLoaded) {
            view.onLoaded();
        }
    };
    View.prototype._inheritProperties = function (parentView) {
        var that = this;
        var inheritablePropertySetCallback = function (property) {
            if (property instanceof styling.Property || property.name === "bindingContext") {
                return true;
            }
            if (property.metadata && property.metadata.inheritable) {
                var baseValue = parentView._getValue(property);
                if (baseValue) {
                    that._setValue(property, baseValue, dependencyObservable.ValueSource.Inherited);
                }
            }
            return true;
        };
        parentView._eachSetProperty(inheritablePropertySetCallback);
    };
    View.prototype._removeView = function (view) {
        if (view._parent !== this) {
            throw new Error("View not added to this instance.");
        }
        this._removeViewCore(view);
        view._parent = undefined;
        trace.write("called _removeView on view " + this._domId + " for a child " + view._domId, trace.categories.ViewHierarchy);
    };
    View.prototype._removeViewCore = function (view) {
        this._removeViewFromNativeVisualTree(view);
        if (view.isLoaded) {
            view.onUnloaded();
        }
        view._setValue(bindable.Bindable.bindingContextProperty, undefined, dependencyObservable.ValueSource.Inherited);
        var inheritablePropertiesSetCallback = function (property) {
            if (property instanceof styling.Property || property.name === "bindingContext") {
                return true;
            }
            if (property.metadata && property.metadata.inheritable) {
                view._resetValue(property, dependencyObservable.ValueSource.Inherited);
            }
            return true;
        };
        view._eachSetProperty(inheritablePropertiesSetCallback);
    };
    View.prototype._addViewToNativeVisualTree = function (view) {
        if (view._isAddedToNativeVisualTree) {
            throw new Error("Child already added to the native visual tree.");
        }
        return true;
    };
    View.prototype._removeViewFromNativeVisualTree = function (view) {
        view._isAddedToNativeVisualTree = false;
    };
    View.prototype._syncNativeProperties = function () {
        _super.prototype._syncNativeProperties.call(this);
        this.style._syncNativeProperties();
    };
    View.prototype._goToVisualState = function (state) {
        trace.write(this + " going to state: " + state, trace.categories.Style);
        if (state === this._visualState || this._requestedVisualState === state) {
            return;
        }
        var vsm = require("ui/styling/visual-state");
        this._visualState = vsm.goToState(this, state);
        this._requestedVisualState = state;
    };
    View.prototype._updateLayout = function () {
    };
    Object.defineProperty(View.prototype, "_nativeView", {
        get: function () {
            return undefined;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(View.prototype, "_isVisible", {
        get: function () {
            return this._isVisibleCache;
        },
        enumerable: true,
        configurable: true
    });
    View.prototype.focus = function () {
        return undefined;
    };
    View.loadedEvent = "loaded";
    View.unloadedEvent = "unloaded";
    View.idProperty = idProperty;
    View.cssClassProperty = cssClassProperty;
    View.isEnabledProperty = isEnabledProperty;
    View.isUserInteractionEnabledProperty = isUserInteractionEnabledProperty;
    return View;
})(proxy.ProxyObject);
exports.View = View;


text:
{
  "title": "Slides from @rudeboybert and I's https://t.co/M4KdfnBzx1 #bookdown @rstudio #uscots2017 workshop at https://t.co/ms3Jpb3lPR #rstats",
  "date": "2017-05-17"
}

# blogdown

> **Jan de Leeuw** (@deleeuw_jan; 3/0): https://t.co/ESdtYPpbsz
Fancy new blogdown/rbind/hugo/github/netlify website.
On publications: the manuscripts of the Gifi and BRAS books.  [↪](https://twitter.com/xieyihui/status/864969007211859970)

<!-- -->

> **M Edward/Ed Borasky** (@znmeb; 2/0): I've got two Blogdown blogs; I hope RStudio will consolidate Blogdown, Bookdown and Flexdashboard into a single pac… https://t.co/eC8yFZpgxI  [↪](https://twitter.com/xieyihui/status/864631876371177472)

<!-- -->

> **🌵 Tony Towry 🌵** (@anthonytowry; 2/0): Just gave blogdown a try.  So far, so good.  If you're greenfield just jump to the official docs (https://t.co/9lveJx1Y1Y).  #rstats  [↪](https://twitter.com/xieyihui/status/864630650535645184)

<!-- -->

# bookdown

> **Chester Ismay** (@old_man_chester; 5/2): Slides from @rudeboybert and I's https://t.co/M4KdfnBzx1 #bookdown @rstudio #uscots2017 workshop at https://t.co/ms3Jpb3lPR #rstats  [↪](https://twitter.com/xieyihui/status/864812517968760832)

<!-- -->

> **M Edward/Ed Borasky** (@znmeb; 2/0): I've got two Blogdown blogs; I hope RStudio will consolidate Blogdown, Bookdown and Flexdashboard into a single pac… https://t.co/eC8yFZpgxI  [↪](https://twitter.com/xieyihui/status/864631876371177472)

<!-- -->

> **🌵 Tony Towry 🌵** (@anthonytowry; 2/0): Just gave blogdown a try.  So far, so good.  If you're greenfield just jump to the official docs (https://t.co/9lveJx1Y1Y).  #rstats  [↪](https://twitter.com/xieyihui/status/864630650535645184)

<!-- -->

# knitr

> **Stats for bios** (@statsforbios; 2/0): Have to say I find the overlap between rmarkdown and knitr totally confusing. So much internet discussion assumes you're using rstudio...  [↪](https://twitter.com/xieyihui/status/864827615378640896)

<!-- -->

> **Stats for bios** (@statsforbios; 0/1): With knitr message=FALSE sends msgs to the console but results='hide' doesn't send results to console. How do I send results to cons?#rstats  [↪](https://twitter.com/xieyihui/status/864866493254774784)

<!-- -->

> **Daily Tech Issues** (@AdamSmitht1; 0/0): #knitr::kable - escape "+" in dataframe
#Tech #News #HowTo
https://t.co/NaJzpUcswt  [↪](https://twitter.com/xieyihui/status/864906519980253184)

<!-- -->

> **Paride Bertulio** (@paridebertulio; 0/0): Using checkpoint with knitr and RStudio | @scoopit https://t.co/3cGj3M1H56  [↪](https://twitter.com/xieyihui/status/864846000845934592)

<!-- -->


text:
package com.rodrigodev.xgen4j.test.generation_options.customOptionalClassIsUsedWhenCorrespondingOptionIsSet.e1;

import com.rodrigodev.xgen4j.test.generation_options.customOptionalClassIsUsedWhenCorrespondingOptionIsSet.RootError;

import com.rodrigodev.xgen4j.test.generation_options.customOptionalClassIsUsedWhenCorrespondingOptionIsSet.ErrorCode;

/**
 * Autogenerated by XGen4J on January 1, 0001.
 */
public abstract class E1Error extends RootError {

    public static final ErrorCode CODE = new ErrorCode("e-1");

}


text:
#pragma once

#include <string>
#include <functional>

namespace caffe2 {

class Blob;

constexpr int kDefaultChunkSize = -1;
constexpr int kNoChunking = 0;

/**
 * @brief BlobSerializerBase is an abstract class that serializes a blob to a
 * string.
 *
 * This class exists purely for the purpose of registering type-specific
 * serialization code. If you need to serialize a specific type, you should
 * write your own Serializer class, and then register it using
 * REGISTER_BLOB_SERIALIZER. For a detailed example, see TensorSerializer for
 * details.
 */
class BlobSerializerBase {
 public:
  virtual ~BlobSerializerBase() {}
  using SerializationAcceptor =
     std::function<void(const std::string& blobName, const std::string& data)>;
  /**
   * @brief The virtual function that returns a serialized string for the input
   * blob.
   * @param blob
   *     the input blob to be serialized.
   * @param name
   *     the blob name to be used in the serialization implementation. It is up
   *     to the implementation whether this name field is going to be used or
   *     not.
   * @param acceptor
   *     a lambda which accepts key value pairs to save them to storage.
   *     serailizer can use it to save blob in several chunks
   *     acceptor should be thread-safe
   */
  virtual void Serialize(const Blob& blob, const std::string& name,
                        SerializationAcceptor acceptor) = 0;

  virtual void SerializeWithChunkSize(
      const Blob& blob,
      const std::string& name,
      SerializationAcceptor acceptor,
      int /*chunk_size*/) {
    // Base implementation.
    Serialize(blob, name, acceptor);
  }
};

} // namespace caffe2


text:
module Certificator
  # Represents an attendee coming from the CSV
  # It responds to methods named after each column
  # of the CSV provided.
  class Attendee
    attr_reader :attributes

    def initialize(attributes)
      stringified_keys = attributes.map { |k, v| [k.to_s, v] }
      @attributes = Hash[stringified_keys]
    end

    def respond_to_missing?(method, _include_private = false)
      @attributes.key?(method.to_s)
    end

    def method_missing(method, *args, &block)
      if respond_to_missing?(method)
        @attributes[method.to_s]
      else
        super
      end
    end
  end
end


text:
require 'rubygems'
require 'sinatra/base'
require 'rack'
require 'yaml'
require 'erb'

class TestApp < Sinatra::Base
  set :root, File.dirname(__FILE__)
  set :static, true

  get '/:view' do |view|
    erb view.to_sym
  end
end

if __FILE__ == $0
  Rack::Handler::Mongrel.run TestApp, :Port => 8070
end


text:
// +build linux

package cgroupfs

import (
	"path/filepath"

	"github.com/intelsdi-x/snap-plugin-collector-docker/container"
)

// CpuSet implements StatGetter interface
type CpuSet struct{}

// GetStats reads cpuset metrics from Cpuset Group
func (cs *CpuSet) GetStats(stats *container.Statistics, opts container.GetStatOpt) error {
	path, err := opts.GetStringValue("cgroup_path")
	if err != nil {
		return err
	}

	cpus, err := parseStrValue(filepath.Join(path, "cpuset.cpus"))
	if err != nil {
		return err
	}

	mems, err := parseStrValue(filepath.Join(path, "cpuset.mems"))
	if err != nil {
		return err
	}

	memmig, err := parseIntValue(filepath.Join(path, "cpuset.memory_migrate"))
	if err != nil {
		return err
	}

	cpuexc, err := parseIntValue(filepath.Join(path, "cpuset.cpu_exclusive"))
	if err != nil {
		return err
	}

	memexc, err := parseIntValue(filepath.Join(path, "cpuset.mem_exclusive"))
	if err != nil {
		return err
	}

	stats.Cgroups.CpuSetStats.Cpus = cpus
	stats.Cgroups.CpuSetStats.Mems = mems
	stats.Cgroups.CpuSetStats.MemoryMigrate = memmig
	stats.Cgroups.CpuSetStats.CpuExclusive = cpuexc
	stats.Cgroups.CpuSetStats.MemoryExclusive = memexc

	return nil
}


text:
// 'softbinds' keys 1-4 for new players

local onedown 	= false
local twodown 	= false
local threedown = false
local fourdown 	= false

/*hook.Add("Think", "pk_scrub_keys", function()
	if input.IsKeyDown(KEY_1) && !onedown then
		onedown = true
		RunConsoleCommand("gm_spawn", "models/props/de_tides/gate_large.mdl")
	elseif !input.IsKeyDown(KEY_1) then
		onedown = false
	end
	if input.IsKeyDown(KEY_2) && !twodown then
		twodown = true
		RunConsoleCommand("gm_spawn", "models/props_canal/canal_bars004.mdl")
	elseif !input.IsKeyDown(KEY_2) then
		twodown = false
	end
	if input.IsKeyDown(KEY_3) && !threedown then
		threedown = true
		RunConsoleCommand("gm_spawn", "models/props_phx/wheels/moped_tire.mdl")
	elseif !input.IsKeyDown(KEY_3) then
		threedown = false
	end
	if input.IsKeyDown(KEY_4) && !fourdown then
		fourdown = true
		RunConsoleCommand("gm_spawn", "models/XQM/CoasterTrack/slope_225_3.mdl")
	elseif !input.IsKeyDown(KEY_4) then
		fourdown = false
	end
end)*/


text:
class CreateFckeditorExtensionSchema < ActiveRecord::Migration
  def self.up

  end

  def self.down

  end
end


text:
/* global SimpleSchema*/

import { ValidatedMethod } from 'meteor/mdg:validated-method';
import { LoggedInMixin } from 'meteor/tunifight:loggedin-mixin';
import { Book } from '../Book.js';
import { Folder } from '../../Folder/Folder.js';
import { Share } from '../../Share/Share.js';

export const createBook = new ValidatedMethod({
  name: 'createBook',
  mixins: [LoggedInMixin],
  checkLoggedInError: {
    error: 'notLogged',
    reason: 'Do not have permission',
  },
  validate: Book.simpleSchema().omit([
    'ownerId',
    'createdAt',
    'modifiedAt',
    'isDeleted',
  ]).validator(),
  run(data) {
    const userId = Meteor.userId();
    const now = new Date();

    const bookId = Book.insert({
      ...data,
      ownerId: userId,
      createdAt: now,
      modifiedAt: now,
    });

    Share.insert({
      userId,
      bookId,
      role: 'owner',
    });

    // XXX: should use bulk insert here

    Folder.insert({
      name: 'Draft',
      index: 0,
      bookId,
      folderType: 'root',
    });

    // Folder.insert({
    //   name: 'Research',
    //   index: 1,
    //   bookId,
    //   folderType: 'research',
    // });

    Folder.insert({
      name: 'Trash',
      index: 2,
      bookId,
      folderType: 'trash',
    });

    Folder.insert({
      name: 'Template',
      index: 3,
      bookId,
      folderType: 'template',
    });

    Folder.insert({
      name: 'Settings',
      index: 4,
      bookId,
      folderType: 'settings',
    });

    return bookId;
  },
});


text:
/**
 * @author Ben Lau
 */

#ifndef DQCLAUSE_H
#define DQCLAUSE_H

/** @file
  @brief Header file for DQClause

 */

#include <QList>
#include <QVariant>
#include <QVector>

/// The clause of a column definition
/** DQClause is a data structure to describe the clause of column definition for "create table".
  It is used in model declaration (The second argument in DQ_FIELD macro)

  Example:
  \code
class User : public DQModel
{
    DQ_MODEL
public:
    DQField<QString> userId;
    DQField<QString> name;

    DQField<QString> passwd;

    DQField<QDateTime> creationTime;
    DQField<QDateTime> lastLoginTime;

};

DQ_DECLARE_MODEL( User,
                  "user",
                  DQ_FIELD(userId, DQClause(DQClause::UNIQUE) | DQClause(DQClause::NOT_NULL) ), // Unique and Not null
                  DQ_FIELD(name),
                  DQ_FIELD(passwd , DQClause(DQClause::NOT_NULL)),
                  DQ_FIELD(creationTime,DQClause(DQClause::DEFAULT,"CURRENT_TIMESTAMP") ),
                  DQ_FIELD(lastLoginTime)
                  );

  \endcode

The declaration is equivalent to make this SQL table for SQLITE

  \code

    CREATE TABLE user  (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        userId TEXT NOT NULL UNIQUE,
        name TEXT ,
        passwd TEXT NOT NULL,
        creationTime DATETIME DEFAULT CURRENT_TIMESTAMP ,
        lastLoginTime DATETIME
    );
  \endcode

   @remarks Usually you won't use DQClause directly. There have wrapper macro for common clause available.

    @see DQNotNull
    @see DQDefault
    @see DQUnique

  */

class DQClause
{
public:
    /// Supported type of clause
    enum Type{
        UNIQUE = 0,
        DEFAULT,
        NOT_NULL,

        /* Extra */
        PRIMARY_KEY,
        FOREIGN_KEY,
        LAST
    };

    /// Constructs a null DQClause
    DQClause();

    /// Constructs a copy of other
    DQClause(const DQClause& other);

    /// Constructs a DQClause and set the clause type
    DQClause(DQClause::Type type);

    /// Constructs a DQClause and set the clause type and its value
    DQClause(Type type, QVariant value);

    /// TRUE if this type of clause flag is set
    bool testFlag(Type);

    /// Get the value of the clause type
    QVariant flag(Type);

    /// Set the clause type with its value
    void setFlag(Type type,QVariant val = true);

    /// | operation overloading
    /**
      @remarks If both of the flag is set in two clause object. It will use the value specified in second clause
     */
    DQClause operator|(const DQClause& other);

private:
    void init();
    QMap<Type,QVariant> m_flags;
};

/// "Unique" clause
/** The database field should be unique. No other record share the same value.

  e.g In a data model of user information , userId should be unique.
 */
#define DQUnique DQClause(DQClause::UNIQUE)

/// "NotNull" clause
/** This field must be set. Otherwise it will reject the write.
 */
#define DQNotNull DQClause(DQClause::NOT_NULL)

/// The "Default" clause
/** Assign the default value of the field. If it is not set,
  then it will use the assigned value automatically.
 */
#define DQDefault(value) DQClause(DQClause::DEFAULT,value)

/// Encode the string
QString dqEscape(QString val,bool trimStrings = false);

#endif // DQCLAUSE_H


text:
package evanq.game.helper;

import evanq.game.trace.LogLevel;
import evanq.game.trace.LogSystem;
import evanq.game.trace.Trace;
import evanq.game.trace.TraceConstant;

public class LogSystemTest {

	public static void main(String[] args) {

		//参数指定日志输出位置
		LogSystem logSystem = new LogSystem(TraceConstant.GAME_SYSTEM);
		logSystem.setLogLevel(LogLevel.DEBUG);

		Trace trace = logSystem.getTrace(LogSystemTest.class);
		trace.info("hello {}","slf4j");
	}

}


text:
import { Component } from '@angular/core';

/**
*	This class represents the lazy loaded DashboardComponent.
*/

@Component({
    moduleId: module.id,
    selector: 'dashboard-cmp',
    templateUrl: 'dashboard.component.html'
})

export class DashboardComponent { }


text:
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>19.0</apiVersion>
    <availableInTouch>false</availableInTouch>
    <confirmationTokenRequired>false</confirmationTokenRequired>
    <label>Milestone1_Import_Project</label>
</ApexPage>