text:
from PySide import QtCore, QtGui

class Ui_qPreferences(object):
    def setupUi(self, qPreferences):
        qPreferences.setObjectName("qPreferences")
        qPreferences.resize(409, 265)
        self.horizontalLayout = QtGui.QHBoxLayout(qPreferences)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.prefWidget = QtGui.QTabWidget(qPreferences)
        self.prefWidget.setEnabled(True)
        self.prefWidget.setObjectName("prefWidget")
        self.aboutTab = QtGui.QWidget()
        self.aboutTab.setObjectName("aboutTab")
        self.verticalLayout = QtGui.QVBoxLayout(self.aboutTab)
        self.verticalLayout.setObjectName("verticalLayout")
        self.aboutLabel = QtGui.QLabel(self.aboutTab)
        self.aboutLabel.setWordWrap(True)
        self.aboutLabel.setOpenExternalLinks(True)
        self.aboutLabel.setObjectName("aboutLabel")
        self.verticalLayout.addWidget(self.aboutLabel)
        self.prefWidget.addTab(self.aboutTab, "")
        self.generlTab = QtGui.QWidget()
        self.generlTab.setAccessibleName("")
        self.generlTab.setObjectName("generlTab")
        self.verticalLayout_2 = QtGui.QVBoxLayout(self.generlTab)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.userFrame = QtGui.QFrame(self.generlTab)
        self.userFrame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.userFrame.setFrameShadow(QtGui.QFrame.Raised)
        self.userFrame.setObjectName("userFrame")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.userFrame)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.userLabel = QtGui.QLabel(self.userFrame)
        self.userLabel.setObjectName("userLabel")
        self.horizontalLayout_2.addWidget(self.userLabel)
        self.logoutButton = QtGui.QToolButton(self.userFrame)
        self.logoutButton.setObjectName("logoutButton")
        self.horizontalLayout_2.addWidget(self.logoutButton)
        self.verticalLayout_2.addWidget(self.userFrame)
        self.qualityFrame = QtGui.QFrame(self.generlTab)
        self.qualityFrame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.qualityFrame.setFrameShadow(QtGui.QFrame.Raised)
        self.qualityFrame.setObjectName("qualityFrame")
        self.horizontalLayout_3 = QtGui.QHBoxLayout(self.qualityFrame)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.qualityLabel = QtGui.QLabel(self.qualityFrame)
        self.qualityLabel.setObjectName("qualityLabel")
        self.horizontalLayout_3.addWidget(self.qualityLabel)
        self.qualityBox = QtGui.QComboBox(self.qualityFrame)
        self.qualityBox.setObjectName("qualityBox")
        self.horizontalLayout_3.addWidget(self.qualityBox)
        self.verticalLayout_2.addWidget(self.qualityFrame)
        self.notificationFrame = QtGui.QFrame(self.generlTab)
        self.notificationFrame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.notificationFrame.setFrameShadow(QtGui.QFrame.Raised)
        self.notificationFrame.setObjectName("notificationFrame")
        self.horizontalLayout_4 = QtGui.QHBoxLayout(self.notificationFrame)
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        self.notificationLabel = QtGui.QLabel(self.notificationFrame)
        self.notificationLabel.setObjectName("notificationLabel")
        self.horizontalLayout_4.addWidget(self.notificationLabel)
        self.notificationBox = QtGui.QComboBox(self.notificationFrame)
        self.notificationBox.setObjectName("notificationBox")
        self.horizontalLayout_4.addWidget(self.notificationBox)
        self.verticalLayout_2.addWidget(self.notificationFrame)
        self.prefWidget.addTab(self.generlTab, "")
        self.filterTab = QtGui.QWidget()
        self.filterTab.setObjectName("filterTab")
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.filterTab)
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.frame = QtGui.QFrame(self.filterTab)
        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtGui.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.horizontalLayout_5 = QtGui.QHBoxLayout(self.frame)
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.liveCheck = QtGui.QCheckBox(self.frame)
        self.liveCheck.setChecked(False)
        self.liveCheck.setObjectName("liveCheck")
        self.horizontalLayout_5.addWidget(self.liveCheck)
        self.editCheck = QtGui.QCheckBox(self.frame)
        self.editCheck.setObjectName("editCheck")
        self.horizontalLayout_5.addWidget(self.editCheck)
        self.verticalLayout_3.addWidget(self.frame)
        self.frame_2 = QtGui.QFrame(self.filterTab)
        self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
        self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
        self.frame_2.setObjectName("frame_2")
        self.horizontalLayout_6 = QtGui.QHBoxLayout(self.frame_2)
        self.horizontalLayout_6.setObjectName("horizontalLayout_6")
        self.remixCheck = QtGui.QCheckBox(self.frame_2)
        self.remixCheck.setObjectName("remixCheck")
        self.horizontalLayout_6.addWidget(self.remixCheck)
        self.rateCheck = QtGui.QCheckBox(self.frame_2)
        self.rateCheck.setObjectName("rateCheck")
        self.horizontalLayout_6.addWidget(self.rateCheck)
        self.verticalLayout_3.addWidget(self.frame_2)
        self.label = QtGui.QLabel(self.filterTab)
        self.label.setWordWrap(True)
        self.label.setObjectName("label")
        self.verticalLayout_3.addWidget(self.label)
        self.prefWidget.addTab(self.filterTab, "")
        self.horizontalLayout.addWidget(self.prefWidget)

        self.retranslateUi(qPreferences)
        self.prefWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(qPreferences)

    def retranslateUi(self, qPreferences):
        qPreferences.setWindowTitle(QtGui.QApplication.translate("qPreferences", "qAndora - Preferences", None, QtGui.QApplication.UnicodeUTF8))
        self.aboutLabel.setText(QtGui.QApplication.translate("qPreferences", "
qAndora is a cross platform, open source, Pandora Internet Radio client written in Python using Qt by Jeff Hoogland.

qAndora source on GitHub
", None, QtGui.QApplication.UnicodeUTF8))
        self.prefWidget.setTabText(self.prefWidget.indexOf(self.aboutTab), QtGui.QApplication.translate("qPreferences", "About", None, QtGui.QApplication.UnicodeUTF8))
        self.userLabel.setText(QtGui.QApplication.translate("qPreferences", "Change User:", None, QtGui.QApplication.UnicodeUTF8))
        self.logoutButton.setText(QtGui.QApplication.translate("qPreferences", "Logout", None, QtGui.QApplication.UnicodeUTF8))
        self.qualityLabel.setText(QtGui.QApplication.translate("qPreferences", "Audio Quality:", None, QtGui.QApplication.UnicodeUTF8))
        self.notificationLabel.setText(QtGui.QApplication.translate("qPreferences", "Desktop Notifications:", None, QtGui.QApplication.UnicodeUTF8))
        self.prefWidget.setTabText(self.prefWidget.indexOf(self.generlTab), QtGui.QApplication.translate("qPreferences", "General", None, QtGui.QApplication.UnicodeUTF8))
        self.liveCheck.setText(QtGui.QApplication.translate("qPreferences", "Filter live songs", None, QtGui.QApplication.UnicodeUTF8))
        self.editCheck.setText(QtGui.QApplication.translate("qPreferences", "Filter edit songs", None, QtGui.QApplication.UnicodeUTF8))
        self.remixCheck.setText(QtGui.QApplication.translate("qPreferences", "Filter remix songs", None, QtGui.QApplication.UnicodeUTF8))
        self.rateCheck.setText(QtGui.QApplication.translate("qPreferences", "Ban Filtered Songs", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("qPreferences", "
Remix are songs that have "mix" in () or []

Live are songs that have "live" in () or []

Edit are songs that contain "edit" in () or []
", None, QtGui.QApplication.UnicodeUTF8))
        self.prefWidget.setTabText(self.prefWidget.indexOf(self.filterTab), QtGui.QApplication.translate("qPreferences", "Filters", None, QtGui.QApplication.UnicodeUTF8))


text:
"""Loops for Bayesian quadrature."""

# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from .bayesian_monte_carlo_loop import BayesianMonteCarlo  # noqa: F401
from .vanilla_bq_loop import VanillaBayesianQuadratureLoop  # noqa: F401
from .wsabil_loop import WSABILLoop  # noqa: F401

__all__ = [
    "BayesianMonteCarlo",
    "VanillaBayesianQuadratureLoop",
    "WSABILLoop",
    "point_calculators",
]

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace TCG\Voyager\Tests\Unit;

use Illuminate\Support\Facades\Config;
use TCG\Voyager\Facades\Voyager;
use TCG\Voyager\Tests\TestCase;

class VoyagerTest extends TestCase
{
    /**
     * Dimmers returns collection of widgets.
     *
     * This test will make sure that the dimmers method will give us a
     * collection of the configured widgets.
     */
    public function testDimmersReturnsCollectionOfConfiguredWidgets()
    {
        Config::set('voyager.dashboard.widgets', [
            'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer',
            'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer',
        ]);

        $dimmers = Voyager::dimmers();

        $this->assertEquals(2, $dimmers->count());
    }

    /**
     * Dimmers returns collection of widgets which should be displayed.
     *
     * This test will make sure that the dimmers method will give us a
     * collection of the configured widgets which also should be displayed.
     */
    public function testDimmersReturnsCollectionOfConfiguredWidgetsWhichShouldBeDisplayed()
    {
        Config::set('voyager.dashboard.widgets', [
            'TCG\\Voyager\\Tests\\Stubs\\Widgets\\AccessibleDimmer',
            'TCG\\Voyager\\Tests\\Stubs\\Widgets\\InAccessibleDimmer',
            'TCG\\Voyager\\Tests\\Stubs\\Widgets\\InAccessibleDimmer',
        ]);

        $dimmers = Voyager::dimmers();

        $this->assertEquals(1, $dimmers->count());
    }
}


text:
using OnTheRoad.Logic.Contracts;
using System;

namespace OnTheRoad.Logic.Services
{
    public class ImageService : IImageService
    {
        private readonly IImageLoader imageLoader;
        private readonly IImagePathResolver imagePathResolver;

        public ImageService(IImageLoader imageLoader, IImagePathResolver imagePathResolver)
        {
            if (imageLoader == null)
            {
                throw new ArgumentNullException("imageLoader can not be null!");
            }

            if (imagePathResolver == null)
            {
                throw new ArgumentNullException("imagePathResolver can noe be null!");
            }

            this.imageLoader = imageLoader;
            this.imagePathResolver = imagePathResolver;
        }

        public byte[] LoadTripsImage()
        {
            var path = this.imagePathResolver.ResolveTripsImageFilePath();
            var image = this.imageLoader.LoadImage(path);

            return image;
        }
    }
}


text:
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { HeroesModule } from './heroes.module';

platformBrowserDynamic().bootstrapModule(HeroesModule);


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="io.snapback.camlauncher"
    android:versionCode="2"
    android:versionName="1.1" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="22" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-permission android:name="android.permission.VIBRATE" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >

        <!--
        	you need google play services library reference:
        	see http://developer.android.com/google/play-services/setup.html
        -->
        <meta-data
            android:name="com.google.android.gms.version"
        	android:value="@integer/google_play_services_version" />

        <activity
            android:name="io.snapback.camlauncher.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


text:
module AsposeWordsCloud
  #
  class SaveOptionsData < BaseObject
    attr_accessor :save_format, :file_name, :dml_rendering_mode, :dml_effects_rendering_mode, :zip_output
    # attribute mapping from ruby-style variable name to JSON key
    def self.attribute_map
      {

        #
        :'save_format' => :'SaveFormat',

        #
        :'file_name' => :'FileName',

        #
        :'dml_rendering_mode' => :'DmlRenderingMode',

        #
        :'dml_effects_rendering_mode' => :'DmlEffectsRenderingMode',

        #
        :'zip_output' => :'ZipOutput'

      }
    end

    # attribute type
    def self.swagger_types
      {
        :'save_format' => :'String',
        :'file_name' => :'String',
        :'dml_rendering_mode' => :'String',
        :'dml_effects_rendering_mode' => :'String',
        :'zip_output' => :'BOOLEAN'

      }
    end

    def initialize(attributes = {})
      return if !attributes.is_a?(Hash) || attributes.empty?

      # convert string to symbol for hash key
      attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

      if attributes[:'SaveFormat']
        self.save_format = attributes[:'SaveFormat']
      end

      if attributes[:'FileName']
        self.file_name = attributes[:'FileName']
      end

      if attributes[:'DmlRenderingMode']
        self.dml_rendering_mode = attributes[:'DmlRenderingMode']
      end

      if attributes[:'DmlEffectsRenderingMode']
        self.dml_effects_rendering_mode = attributes[:'DmlEffectsRenderingMode']
      end

      if attributes[:'ZipOutput']
        self.zip_output = attributes[:'ZipOutput']
      end

    end

  end
end


text:
var http = require("http");
var express = require("express");

var app = express();

app.enable("caching");
app.set("port", process.env.PORT || 8000);

if ("development" === app.get("env")) {
    // Gets called in the absence of NODE_ENV too!
    app.enable("debugging");
}
else if ("production" === app.get("env")) {
    app.enable("optimizing");
    app.disable("x-powered-by");
}

var server = http.createServer(app).listen(app.get("port"), function(){
 console.log("Express Server listening on port", server.address().port);
 console.log("Caching:" + app.get("caching"));
 console.log("Debugging:" + app.get("debugging"));
 console.log("Optimizing:" + app.get("optimizing"));
});


text:
package org.apache.ignite.internal.processors.cacheobject;

import java.nio.ByteBuffer;
import org.apache.ignite.IgniteBinary;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.GridComponent;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.processors.GridProcessor;
import org.apache.ignite.internal.processors.cache.CacheObject;
import org.apache.ignite.internal.processors.cache.CacheObjectContext;
import org.apache.ignite.internal.processors.cache.CacheObjectValueContext;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.IncompleteCacheObject;
import org.apache.ignite.internal.processors.cache.KeyCacheObject;
import org.jetbrains.annotations.Nullable;

/**
 * Cache objects processor.
 */
public interface IgniteCacheObjectProcessor extends GridProcessor {
    /**
     * @param ctx Context.
     * @throws IgniteCheckedException If failed.
     */
    public void onContinuousProcessorStarted(GridKernalContext ctx) throws IgniteCheckedException;

    /**
     * @see GridComponent#onKernalStart(boolean)
     * @throws IgniteCheckedException If failed.
     */
    public void onUtilityCacheStarted() throws IgniteCheckedException;

    /**
     * @param typeName Type name.
     * @return Type ID.
     */
    public int typeId(String typeName);

    /**
     * @param obj Object to get type ID for.
     * @return Type ID.
     */
    public int typeId(Object obj);

    /**
     * Converts temporary off-heap object to heap-based.
     *
     * @param ctx Context.
     * @param obj Object.
     * @return Heap-based object.
     * @throws IgniteException In case of error.
     */
    @Nullable public Object unwrapTemporary(GridCacheContext ctx, @Nullable Object obj) throws IgniteException;

    /**
     * Prepares cache object for cache (e.g. copies user-provided object if needed).
     *
     * @param obj Cache object.
     * @param cctx Cache context.
     * @return Object to be store in cache.
     */
    @Nullable public CacheObject prepareForCache(@Nullable CacheObject obj, GridCacheContext cctx);

    /**
     * Checks whether object is binary object.
     *
     * @param obj Object to check.
     * @return {@code True} if object is already a binary object, {@code false} otherwise.
     */
    public boolean isBinaryObject(Object obj);

    /**
     * Checks whether given class is binary.
     *
     * @return {@code true} If binary objects are enabled.
     */
    public boolean isBinaryEnabled(CacheConfiguration<?, ?> ccfg);

    /**
     * @param obj Binary object to get field from.
     * @param fieldName Field name.
     * @return Field value.
     */
    public Object field(Object obj, String fieldName);

    /**
     * Checks whether field is set in the object.
     *
     * @param obj Object.
     * @param fieldName Field name.
     * @return {@code true} if field is set.
     */
    public boolean hasField(Object obj, String fieldName);

    /**
     * @param ctx Cache object context.
     * @param val Value.
     * @return Value bytes.
     * @throws IgniteCheckedException If failed.
     */
    public byte[] marshal(CacheObjectValueContext ctx, Object val) throws IgniteCheckedException;

    /**
     * @param ctx Context.
     * @param bytes Bytes.
     * @param clsLdr Class loader.
     * @return Unmarshalled object.
     * @throws IgniteCheckedException If failed.
     */
    public Object unmarshal(CacheObjectValueContext ctx, byte[] bytes, ClassLoader clsLdr)
        throws IgniteCheckedException;

    /**
     * @param ccfg Cache configuration.
     * @return Cache object context.
     * @throws IgniteCheckedException If failed.
     */
    public CacheObjectContext contextForCache(CacheConfiguration ccfg) throws IgniteCheckedException;

    /**
     * @param ctx Cache objects context.
     * @param cctx Cache context if cache is available.
     * @param obj Key value.
     * @param userObj If {@code true} then given object is object provided by user and should be copied
     *        before stored in cache.
     * @return Cache key object.
     */
    public KeyCacheObject toCacheKeyObject(CacheObjectContext ctx,
        @Nullable GridCacheContext cctx,
        Object obj,
        boolean userObj);

    /**
     * @param ctx Cache context.
     * @param obj Object.
     * @param userObj If {@code true} then given object is object provided by user and should be copied
     *        before stored in cache.
     * @return Cache object.
     */
    @Nullable public CacheObject toCacheObject(CacheObjectContext ctx, @Nullable Object obj, boolean userObj);

    /**
     * @param ctx Cache context.
     * @param type Object type.
     * @param bytes Object bytes.
     * @return Cache object.
     */
    public CacheObject toCacheObject(CacheObjectContext ctx, byte type, byte[] bytes);

    /**
     * @param ctx Cache context.
     * @param type Object type.
     * @param bytes Object bytes.
     * @return Cache object.
     */
    public KeyCacheObject toKeyCacheObject(CacheObjectContext ctx, byte type, byte[] bytes) throws IgniteCheckedException;

    /**
     * @param ctx Cache context.
     * @param buf Buffer to read from.
     * @return Cache object.
     */
    public CacheObject toCacheObject(CacheObjectContext ctx, ByteBuffer buf);

    /**
     * @param ctx Cache object context.
     * @param buf Buffer.
     * @param incompleteObj Incomplete cache object or {@code null} if it's a first read.
     * @return Incomplete cache object.
     * @throws IgniteCheckedException If fail.
     */
    public IncompleteCacheObject toCacheObject(CacheObjectContext ctx, ByteBuffer buf,
        @Nullable IncompleteCacheObject incompleteObj) throws IgniteCheckedException;

    /**
     * @param ctx Cache object context.
     * @param buf Buffer.
     * @param incompleteObj Incomplete cache object or {@code null} if it's a first read.
     * @return Incomplete cache object.
     * @throws IgniteCheckedException If fail.
     */
    public IncompleteCacheObject toKeyCacheObject(CacheObjectContext ctx, ByteBuffer buf,
        @Nullable IncompleteCacheObject incompleteObj) throws IgniteCheckedException;

    /**
     * @param obj Value.
     * @return {@code True} if object is of known immutable type.
     */
    public boolean immutable(Object obj);

    /**
     * @return Ignite binary interface.
     */
    public IgniteBinary binary();

    /**
     * @param keyType Key type name.
     * @return Affinity filed name or {@code null}.
     */
    public String affinityField(String keyType);
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TravelAgent.Web.admin.visa
{
    public partial class EditAreaCountry : TravelAgent.Web.UI.BasePage
    {
        private static readonly TravelAgent.BLL.VisaCountry bll = new TravelAgent.BLL.VisaCountry();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                DataBindNav();
                if (Request.QueryString["id"] != null)
                {
                    int id=Convert.ToInt32(Request.QueryString["id"]);
                    TravelAgent.Model.VisaCountry model = bll.GetModel(id);
                    if (model != null)
                    {
                        this.hidId.Value = id.ToString();
                        this.ddlAreaCountry.SelectedValue = model.ParentId.ToString();
                        this.txtName.Text = model.Name;
                        this.txtTips.Value = model.Tips;
                        this.txtImgUrl.Text = model.PicUrl;
                        this.txtEnglishName.Text = model.EnglishName;
                        this.txtFristWord.Text = model.FirstWord;
                        this.txtSort.Text = model.Sort.ToString();
                        this.chkState.Checked = model.isLock == 1;
                    }
                }
                else
                {
                    this.txtSort.Text = (bll.GetMaxID("Sort") + 1).ToString();
                }
            }
        }
        /// <summary>
        /// 绑定导航归属
        /// </summary>
        private void DataBindNav()
        {
            DataTable dt = bll.GetList(0,"");

            this.ddlAreaCountry.Items.Clear();
            this.ddlAreaCountry.Items.Add(new ListItem("根目录", "0"));
            foreach (DataRow dr in dt.Rows)
            {
                int ClassLayer = Convert.ToInt32(dr["ClassLayer"]);
                string Id = dr["Id"].ToString().Trim();
                string Name = dr["Name"].ToString().Trim();

                if (ClassLayer == 1)
                {
                    Name = "├ " + Name;
                    this.ddlAreaCountry.Items.Add(new ListItem(Name, Id));

                }
                else
                {
                    Name = "├ " + Name;
                    Name = TravelAgent.Tool.StringPlus.StringOfChar(ClassLayer - 1, " ") + Name;

                    this.ddlAreaCountry.Items.Add(new ListItem(Name, Id));
                }
            }
        }
    }
}


text:
@interface GTAPIErrorHandler : GTErrorHandler

@end


text:
package com.amazonaws.services.inspector.model;

/**
 *
 */
public enum AssessmentRunNotificationSnsStatusCode {

    SUCCESS("SUCCESS"),
    TOPIC_DOES_NOT_EXIST("TOPIC_DOES_NOT_EXIST"),
    ACCESS_DENIED("ACCESS_DENIED"),
    INTERNAL_ERROR("INTERNAL_ERROR");

    private String value;

    private AssessmentRunNotificationSnsStatusCode(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * Use this in place of valueOf.
     *
     * @param value
     *        real value
     * @return AssessmentRunNotificationSnsStatusCode corresponding to the value
     */
    public static AssessmentRunNotificationSnsStatusCode fromValue(String value) {
        if (value == null || "".equals(value)) {
            throw new IllegalArgumentException("Value cannot be null or empty!");
        }

        for (AssessmentRunNotificationSnsStatusCode enumEntry : AssessmentRunNotificationSnsStatusCode
                .values()) {
            if (enumEntry.toString().equals(value)) {
                return enumEntry;
            }
        }

        throw new IllegalArgumentException("Cannot create enum from " + value
                + " value!");
    }
}


text: require 'capistrano/symfony/dsl/paths'


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.slc.sli</groupId>
    <artifactId>ingestion-tests</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <artifactId>edfi-0100</artifactId>

  <dependencies>
    <dependency>
      <groupId>javax.xml</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.1</version>
    </dependency>
  </dependencies>

</project>


text:
package com.example.chat.image;

import android.widget.ImageView;

import com.example.chat.ChatAdapter;

/**
 * Created by Administrator on 2017/9/10.
 */

public class Bean {

}


text:
package org.apache.hadoop.hbase.client;

import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.TreeSet;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionInfo;
import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.TableNotFoundException;
import org.apache.hadoop.hbase.client.HConnectionManager.HConnectable;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.PairOfSameType;

/**
 * Scanner class that contains the .META. table scanning logic
 * and uses a Retryable scanner. Provided visitors will be called
 * for each row.
 *
 * Although public visibility, this is not a public-facing API and may evolve in
 * minor releases.
 *
 *
 Note that during concurrent region splits, the scanner might not see
 * META changes across rows (for parent and daughter entries) consistently.
 * see HBASE-5986, and {@link BlockingMetaScannerVisitor} for details.

 */
@InterfaceAudience.Private
public class MetaScanner {
  private static final Log LOG = LogFactory.getLog(MetaScanner.class);
  /**
   * Scans the meta table and calls a visitor on each RowResult and uses a empty
   * start row value as table name.
   *
   * @param configuration conf
   * @param visitor A custom visitor
   * @throws IOException e
   */
  public static void metaScan(Configuration configuration,
      MetaScannerVisitor visitor)
  throws IOException {
    metaScan(configuration, visitor, null);
  }

  /**
   * Scans the meta table and calls a visitor on each RowResult. Uses a table
   * name to locate meta regions.
   *
   * @param configuration config
   * @param visitor visitor object
   * @param userTableName User table name in meta table to start scan at.  Pass
   * null if not interested in a particular table.
   * @throws IOException e
   */
  public static void metaScan(Configuration configuration,
      MetaScannerVisitor visitor, byte [] userTableName)
  throws IOException {
    metaScan(configuration, visitor, userTableName, null, Integer.MAX_VALUE);
  }

  /**
   * Scans the meta table and calls a visitor on each RowResult. Uses a table
   * name and a row name to locate meta regions. And it only scans at most
   * rowLimit of rows.
   *
   * @param configuration HBase configuration.
   * @param visitor Visitor object.
   * @param userTableName User table name in meta table to start scan at.  Pass
   * null if not interested in a particular table.
   * @param row Name of the row at the user table. The scan will start from
   * the region row where the row resides.
   * @param rowLimit Max of processed rows. If it is less than 0, it
   * will be set to default value Integer.MAX_VALUE.
   * @throws IOException e
   */
  public static void metaScan(Configuration configuration,
      MetaScannerVisitor visitor, byte [] userTableName, byte[] row,
      int rowLimit)
  throws IOException {
    metaScan(configuration, visitor, userTableName, row, rowLimit,
      HConstants.META_TABLE_NAME);
  }

  /**
   * Scans the meta table and calls a visitor on each RowResult. Uses a table
   * name and a row name to locate meta regions. And it only scans at most
   * rowLimit of rows.
   *
   * @param configuration HBase configuration.
   * @param visitor Visitor object. Closes the visitor before returning.
   * @param tableName User table name in meta table to start scan at.  Pass
   * null if not interested in a particular table.
   * @param row Name of the row at the user table. The scan will start from
   * the region row where the row resides.
   * @param rowLimit Max of processed rows. If it is less than 0, it
   * will be set to default value Integer.MAX_VALUE.
   * @param metaTableName Meta table to scan, root or meta.
   * @throws IOException e
   */
  public static void metaScan(Configuration configuration,
      final MetaScannerVisitor visitor, final byte[] tableName,
      final byte[] row, final int rowLimit, final byte[] metaTableName)
      throws IOException {
    try {
      HConnectionManager.execute(new HConnectable<Void>(configuration) {
        @Override
        public Void connect(HConnection connection) throws IOException {
          metaScan(conf, connection, visitor, tableName, row, rowLimit,
              metaTableName);
          return null;
        }
      });
    } finally {
      visitor.close();
    }
  }

  private static void metaScan(Configuration configuration, HConnection connection,
      MetaScannerVisitor visitor, byte [] tableName, byte[] row,
      int rowLimit, final byte [] metaTableName)
  throws IOException {
    int rowUpperLimit = rowLimit > 0 ? rowLimit: Integer.MAX_VALUE;

    // if row is not null, we want to use the startKey of the row's region as
    // the startRow for the meta scan.
    byte[] startRow;
    if (row != null) {
      // Scan starting at a particular row in a particular table
      assert tableName != null;
      byte[] searchRow =
        HRegionInfo.createRegionName(tableName, row, HConstants.NINES,
          false);
      HTable metaTable = null;
      try {
        metaTable = new HTable(configuration, HConstants.META_TABLE_NAME);
        Result startRowResult = metaTable.getRowOrBefore(searchRow,
            HConstants.CATALOG_FAMILY);
        if (startRowResult == null) {
          throw new TableNotFoundException("Cannot find row in .META. for table: "
              + Bytes.toString(tableName) + ", row=" + Bytes.toStringBinary(searchRow));
        }
        HRegionInfo regionInfo = getHRegionInfo(startRowResult);
        if (regionInfo == null) {
          throw new IOException("HRegionInfo was null or empty in Meta for " +
            Bytes.toString(tableName) + ", row=" + Bytes.toStringBinary(searchRow));
        }

        byte[] rowBefore = regionInfo.getStartKey();
        startRow = HRegionInfo.createRegionName(tableName, rowBefore,
            HConstants.ZEROES, false);
      } finally {
        if (metaTable != null) {
          metaTable.close();
        }
      }
    } else if (tableName == null || tableName.length == 0) {
      // Full META scan
      startRow = HConstants.EMPTY_START_ROW;
    } else {
      // Scan META for an entire table
      startRow = HRegionInfo.createRegionName(
          tableName, HConstants.EMPTY_START_ROW, HConstants.ZEROES, false);
    }

    // Scan over each meta region
    ScannerCallable callable;
    int rows = Math.min(rowLimit, configuration.getInt(
        HConstants.HBASE_META_SCANNER_CACHING,
        HConstants.DEFAULT_HBASE_META_SCANNER_CACHING));
    do {
      final Scan scan = new Scan(startRow).addFamily(HConstants.CATALOG_FAMILY);
      if (LOG.isDebugEnabled()) {
        LOG.debug("Scanning " + Bytes.toString(metaTableName) +
          " starting at row=" + Bytes.toStringBinary(startRow) + " for max=" +
          rowUpperLimit + " rows using " + connection.toString());
      }
      callable = new ScannerCallable(connection, metaTableName, scan, null);
      // Open scanner
      callable.withRetries();

      int processedRows = 0;
      try {
        callable.setCaching(rows);
        done: do {
          if (processedRows >= rowUpperLimit) {
            break;
          }
          //we have all the rows here
          Result [] rrs = callable.withRetries();
          if (rrs == null || rrs.length == 0 || rrs[0].size() == 0) {
            break; //exit completely
          }
          for (Result rr : rrs) {
            if (processedRows >= rowUpperLimit) {
              break done;
            }
            if (!visitor.processRow(rr))
              break done; //exit completely
            processedRows++;
          }
          //here, we didn't break anywhere. Check if we have more rows
        } while(true);
        // Advance the startRow to the end key of the current region
        startRow = callable.getHRegionInfo().getEndKey();
      } finally {
        // Close scanner
        callable.setClose();
        callable.withRetries();
      }
    } while (Bytes.compareTo(startRow, HConstants.LAST_ROW) != 0);
  }

  /**
   * Returns HRegionInfo object from the column
   * HConstants.CATALOG_FAMILY:HConstants.REGIONINFO_QUALIFIER of the catalog
   * table Result.
   * @param data a Result object from the catalog table scan
   * @return HRegionInfo or null
   */
  public static HRegionInfo getHRegionInfo(Result data) {
    byte [] bytes =
      data.getValue(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);
    if (bytes == null) return null;
    HRegionInfo info = HRegionInfo.parseFromOrNull(bytes);
    if (LOG.isDebugEnabled()) {
      LOG.debug("Current INFO from scan results = " + info);
    }
    return info;
  }

  /**
   * Lists all of the regions currently in META.
   * @param conf
   * @return List of all user-space regions.
   * @throws IOException
   */
  public static List<HRegionInfo> listAllRegions(Configuration conf)
  throws IOException {
    return listAllRegions(conf, true);
  }

  /**
   * Lists all of the regions currently in META.
   * @param conf
   * @param offlined True if we are to include offlined regions, false and we'll
   * leave out offlined regions from returned list.
   * @return List of all user-space regions.
   * @throws IOException
   */
  public static List<HRegionInfo> listAllRegions(Configuration conf, final boolean offlined)
  throws IOException {
    final List<HRegionInfo> regions = new ArrayList<HRegionInfo>();
    MetaScannerVisitor visitor = new BlockingMetaScannerVisitor(conf) {
        @Override
        public boolean processRowInternal(Result result) throws IOException {
          if (result == null || result.isEmpty()) {
            return true;
          }

          HRegionInfo regionInfo = getHRegionInfo(result);
          if (regionInfo == null) {
            LOG.warn("Null REGIONINFO_QUALIFIER: " + result);
            return true;
          }

          // If region offline AND we are not to include offlined regions, return.
          if (regionInfo.isOffline() && !offlined) return true;
          regions.add(regionInfo);
          return true;
        }
    };
    metaScan(conf, visitor);
    return regions;
  }

  /**
   * Lists all of the table regions currently in META.
   * @param conf
   * @param offlined True if we are to include offlined regions, false and we'll
   * leave out offlined regions from returned list.
   * @return Map of all user-space regions to servers
   * @throws IOException
   */
  public static NavigableMap<HRegionInfo, ServerName> allTableRegions(Configuration conf,
      final byte [] tablename, final boolean offlined) throws IOException {
    final NavigableMap<HRegionInfo, ServerName> regions =
      new TreeMap<HRegionInfo, ServerName>();
    MetaScannerVisitor visitor = new TableMetaScannerVisitor(conf, tablename) {
      @Override
      public boolean processRowInternal(Result rowResult) throws IOException {
        HRegionInfo info = getHRegionInfo(rowResult);
        ServerName serverName = HRegionInfo.getServerName(rowResult);

        if (!(info.isOffline() || info.isSplit())) {
          regions.put(new UnmodifyableHRegionInfo(info), serverName);
        }
        return true;
      }
    };
    metaScan(conf, visitor, tablename);
    return regions;
  }

  /**
   * Visitor class called to process each row of the .META. table
   */
  public interface MetaScannerVisitor extends Closeable {
    /**
     * Visitor method that accepts a RowResult and the meta region location.
     * Implementations can return false to stop the region's loop if it becomes
     * unnecessary for some reason.
     *
     * @param rowResult result
     * @return A boolean to know if it should continue to loop in the region
     * @throws IOException e
     */
    public boolean processRow(Result rowResult) throws IOException;
  }

  public static abstract class MetaScannerVisitorBase implements MetaScannerVisitor {
    @Override
    public void close() throws IOException {
    }
  }

  /**
   * A MetaScannerVisitor that provides a consistent view of the table's
   * META entries during concurrent splits (see HBASE-5986 for details). This class
   * does not guarantee ordered traversal of meta entries, and can block until the
   * META entries for daughters are available during splits.
   */
  public static abstract class BlockingMetaScannerVisitor
    extends MetaScannerVisitorBase {

    private static final int DEFAULT_BLOCKING_TIMEOUT = 10000;
    private Configuration conf;
    private TreeSet<byte[]> daughterRegions = new TreeSet<byte[]>(Bytes.BYTES_COMPARATOR);
    private int blockingTimeout;
    private HTable metaTable;

    public BlockingMetaScannerVisitor(Configuration conf) {
      this.conf = conf;
      this.blockingTimeout = conf.getInt(HConstants.HBASE_CLIENT_OPERATION_TIMEOUT,
          DEFAULT_BLOCKING_TIMEOUT);
    }

    public abstract boolean processRowInternal(Result rowResult) throws IOException;

    @Override
    public void close() throws IOException {
      super.close();
      if (metaTable != null) {
        metaTable.close();
        metaTable = null;
      }
    }

    public HTable getMetaTable() throws IOException {
      if (metaTable == null) {
        metaTable = new HTable(conf, HConstants.META_TABLE_NAME);
      }
      return metaTable;
    }

    @Override
    public boolean processRow(Result rowResult) throws IOException {
      HRegionInfo info = getHRegionInfo(rowResult);
      if (info == null) {
        return true;
      }

      if (daughterRegions.remove(info.getRegionName())) {
        return true; //we have already processed this row
      }

      if (info.isSplitParent()) {
        /* we have found a parent region which was split. We have to ensure that it's daughters are
         * seen by this scanner as well, so we block until they are added to the META table. Even
         * though we are waiting for META entries, ACID semantics in HBase indicates that this
         * scanner might not see the new rows. So we manually query the daughter rows */
        PairOfSameType<HRegionInfo> daughters = HRegionInfo.getDaughterRegions(rowResult);
        HRegionInfo splitA = daughters.getFirst();
        HRegionInfo splitB = daughters.getSecond();

        HTable metaTable = getMetaTable();
        long start = System.currentTimeMillis();
        Result resultA = getRegionResultBlocking(metaTable, blockingTimeout,
            splitA.getRegionName());
        if (resultA != null) {
          processRow(resultA);
          daughterRegions.add(splitA.getRegionName());
        } else {
          throw new RegionOfflineException("Split daughter region " +
              splitA.getRegionNameAsString() + " cannot be found in META.");
        }
        long rem = blockingTimeout - (System.currentTimeMillis() - start);

        Result resultB = getRegionResultBlocking(metaTable, rem,
            splitB.getRegionName());
        if (resultB != null) {
          processRow(resultB);
          daughterRegions.add(splitB.getRegionName());
        } else {
          throw new RegionOfflineException("Split daughter region " +
              splitB.getRegionNameAsString() + " cannot be found in META.");
        }
      }

      return processRowInternal(rowResult);
    }

    private Result getRegionResultBlocking(HTable metaTable, long timeout, byte[] regionName)
        throws IOException {
      if (LOG.isDebugEnabled()) {
        LOG.debug("blocking until region is in META: " + Bytes.toStringBinary(regionName));
      }
      long start = System.currentTimeMillis();
      while (System.currentTimeMillis() - start < timeout) {
        Get get = new Get(regionName);
        Result result = metaTable.get(get);
        HRegionInfo info = getHRegionInfo(result);
        if (info != null) {
          return result;
        }
        try {
          Thread.sleep(10);
        } catch (InterruptedException ex) {
          Thread.currentThread().interrupt();
          break;
        }
      }
      return null;
    }
  }

  /**
   * A MetaScannerVisitor for a table. Provides a consistent view of the table's
   * META entries during concurrent splits (see HBASE-5986 for details). This class
   * does not guarantee ordered traversal of meta entries, and can block until the
   * META entries for daughters are available during splits.
   */
  public static abstract class TableMetaScannerVisitor extends BlockingMetaScannerVisitor {
    private byte[] tableName;

    public TableMetaScannerVisitor(Configuration conf, byte[] tableName) {
      super(conf);
      this.tableName = tableName;
    }

    @Override
    public final boolean processRow(Result rowResult) throws IOException {
      HRegionInfo info = getHRegionInfo(rowResult);
      if (info == null) {
        return true;
      }
      if (!(Bytes.equals(info.getTableName(), tableName))) {
        return false;
      }
      return super.processRow(rowResult);
    }

  }
}


text:
#ifndef __WmeAdSpriteSet_H__
#define __WmeAdSpriteSet_H__

#include "BObject.h"
#include "BSprite.h"	// Added by ClassView

class CAdSpriteSet : public CBObject
{
public:
	bool ContainsSprite(CBSprite* Sprite);
	virtual HRESULT SaveAsText(CBDynBuffer* Buffer, int Indent=0);
	CBSprite* GetSprite(TDirection Direction);
	DECLARE_PERSISTENT(CAdSpriteSet, CBObject);
	CBObject* m_Owner;
	CAdSpriteSet(CBGame* inGame, CBObject* Owner=NULL);
	virtual ~CAdSpriteSet();
	HRESULT LoadFile(char* Filename, int LifeTime=-1, TSpriteCacheType CacheType=CACHE_ALL);
	HRESULT LoadBuffer(BYTE* Buffer, bool Complete=true, int LifeTime=-1, TSpriteCacheType CacheType=CACHE_ALL);
	CBSprite* m_Sprites[NUM_DIRECTIONS];
};

#endif


text:
"""Python BinField implementation"""

# Standard Library
import ast
import os.path
import sys

# External Dependencies
import setuptools
import typing

PACKAGE_NAME = "binfield"

with open(os.path.join(os.path.dirname(__file__), PACKAGE_NAME, "__init__.py")) as f:
    SOURCE = f.read()

with open("requirements.txt") as f:
    REQUIRED = f.read().splitlines()

with open("README.rst") as f:
    LONG_DESCRIPTION = f.read()

# noinspection PyUnresolvedReferences
def get_simple_vars_from_src(
    src: str
) -> "typing.Dict[str, typing.Union[str, bytes, int, float, complex, list, set, dict, tuple, None, bool, Ellipsis]]":
    """Get simple (string/number/boolean and None) assigned values from source.

    :param src: Source code
    :type src: str
    :return: OrderedDict with keys, values = variable names, values
    :rtype: typing.Dict[
                str,
                typing.Union[
                    str, bytes,
                    int, float, complex,
                    list, set, dict, tuple,
                    None, bool, Ellipsis
                ]
            ]

    Limitations: Only defined from scratch variables.
    Not supported by design:
        * Imports
        * Executable code, including string formatting and comprehensions.

    Examples:
    >>> string_sample = "a = '1'"
    >>> get_simple_vars_from_src(string_sample)
    {'a': '1'}

    >>> int_sample = "b = 1"
    >>> get_simple_vars_from_src(int_sample)
    {'b': 1}

    >>> list_sample = "c = [u'1', b'1', 1, 1.0, 1j, None]"
    >>> result = get_simple_vars_from_src(list_sample)
    >>> result == {'c': [u'1', b'1', 1, 1.0, 1j, None]}
    True

    >>> iterable_sample = "d = ([1], {1: 1}, {1})"
    >>> get_simple_vars_from_src(iterable_sample)
    {'d': ([1], {1: 1}, {1})}

    >>> multiple_assign = "e = f = g = 1"
    >>> get_simple_vars_from_src(multiple_assign)
    {'e': 1, 'f': 1, 'g': 1}
    """
    if sys.version_info[:2] < (3, 8):
        ast_data = (ast.Str, ast.Num, ast.List, ast.Set, ast.Dict, ast.Tuple, ast.Bytes, ast.NameConstant, ast.Ellipsis)
    else:
        ast_data = (ast.Constant, ast.List, ast.Set, ast.Dict, ast.Tuple)

    tree = ast.parse(src)

    result = {}

    for node in ast.iter_child_nodes(tree):
        if not isinstance(node, ast.Assign) or not isinstance(node.value, ast_data):  # We parse assigns only
            continue
        try:
            value = ast.literal_eval(node.value)
        except ValueError:
            continue
        for tgt in node.targets:
            if isinstance(tgt, ast.Name) and isinstance(tgt.ctx, ast.Store):
                result[tgt.id] = value
    return result

VARIABLES = get_simple_vars_from_src(SOURCE)

CLASSIFIERS = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
]

KEYWORDS = [
    "binary",
    "binfield",
    "development"
]

setuptools.setup(
    name="BinField",
    author=VARIABLES["__author__"],
    author_email=VARIABLES["__author_email__"],
    url=VARIABLES["__url__"],
    version=VARIABLES["__version__"],
    license=VARIABLES["__license__"],
    description=VARIABLES["__description__"],
    long_description=LONG_DESCRIPTION,
    long_description_content_type="text/x-rst",
    classifiers=CLASSIFIERS,
    keywords=KEYWORDS,
    python_requires=">=3.7.0",
    # While setuptools cannot deal with pre-installed incompatible versions,
    # setting a lower bound is not harmful - it makes error messages cleaner. DO
    # NOT set an upper bound on setuptools, as that will lead to uninstallable
    # situations as progressive releases of projects are done.
    # Blacklist setuptools 34.0.0-34.3.2 due to https://github.com/pypa/setuptools/issues/951
    # Blacklist setuptools 36.2.0 due to https://github.com/pypa/setuptools/issues/1086
    setup_requires="setuptools >= 21.0.0,!=24.0.0,"
    "!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,"
    "!=36.2.0",
    install_requires=REQUIRED,
    package_data={PACKAGE_NAME: ["py.typed"]},
)


text:
import { SirenEntityMixin } from '../siren-entity-mixin.js';
import { LitElement, html } from '@polymer/lit-element';
/* @mixes SirenEntityMixin */
class UserName extends SirenEntityMixin(LitElement) {
	_render({ entity }) {
		let name;
		if (entity) {
			const displayName = entity.getSubEntityByRel('https://api.brightspace.com/rels/display-name');
			name = displayName && displayName.properties.name;
		}
		return html`
        ${name}
`;
	}

	static get is() { return 'd2l-user-name'; }
}

window.customElements.define(UserName.is, UserName);


text:
<!DOCTYPE html>
<style>
body {
  margin: 0;
  padding: 0;
}
</style>
<p> https://bugs.webkit.org/show_bug.cgi?id=109020: An input element that grows to 100% width will create scrollbars, and these should go away when it loses focus. </p>
<textarea id="input" placeholder="placeholder"></textarea>
<textarea id="input2"></textarea>
<script>
    document.getElementById('input2').focus();
</script>


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model app\models\Members */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'first_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'last_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'uname')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'pass')->passwordInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'regdate')->textInput() ?>

    <?= $form->field($model, 'customerID')->textInput() ?>

        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

    <?php ActiveForm::end(); ?>


text:
@import url('https://fonts.googleapis.com/css?family=Lato');
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: url('./bg.png') no-repeat;
}
.infoBtn {
  margin-right: 0.5em;
}
.infoBtn > button > div > div > span{
  font-size: 0.8em !important;
  word-wrap: break-word;
}
#content
{
    position:absolute; left: 0; right: 0; bottom: 0; top: 0px;
}
.cool-btn {
  margin: 0 auto;
  display: inline-block;
  font-size: 1.5rem;
  padding: 0.55rem 1.5rem;
  background-color: #009ac9;
  border: 1px solid transparent;
  color: #ffffff;
  font-weight: 400;
  -webkit-border-radius: 3px;
  border-radius: 3px;
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
}

.cool-btn:hover {
  background-color: #ffffff;
  color: #009ac9;
  border-color: #009ac9;
}
.column-wrapper {
  margin: 0 auto;
  text-align: center;
  width: 100%;
}
.sponsorimg {
  max-width: 250px;
  vertical-align: middle;
}
.sponsorpaper:hover {
  background: #f0f0f0 !important;
}
.sponsorpaper {
  padding: 0.5em;
  text-align: center;
  margin: 1.5em auto;
}
.container-paper {
  width: 80%;
  margin: 2.5em auto;
}
.left-column {
  width: 50%;
  float: left;
}
.right-column {
  width: 50%;
  float: left;
}
.clear {
  clear:both;
}

.footer {
  text-align: center;
}

.cell {
  padding-bottom: 0;
  padding-right: 0;
  white-space: normal;
  overflow: visible;
  display: inline-block;
  text-overflow: inherit;
  word-break:break-all;
  width: 33%;
}
.custom-heart {
  font-size: 1.05em !important;

  /*color: red !important;*/
}

@media only screen and (min-width: 500px) {
  body {
    background-attachment: fixed;
    background-position: center center;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
  }
}
@media only screen and (max-width: 500px) {
    .infoBtn {
      margin-right: 0;
    }
    .infoBtn > button > div > div > span{
      font-size: 0.6em !important;
      word-wrap: break-word;
    }
}
@media only screen and (max-width: 600px) {
  .container-paper {
    width: 99%;
    margin: 2.5em auto;
  }
  .left-column {
    width: 100%;
    max-width: 400px;
    display: block;
    float: none;
  }
  .right-column {
    width: 100%;
    max-width: 400px;
    display: block;
    float: none;
  }
}


text:
Image Gallery[![Build Status](https://travis-ci.org/NeLk42/imageGallery.svg?branch=master)](https://travis-ci.org/NeLk42/imageGallery)
===========
A 'code for fun' SPA Taggable gallery using NodeJS, AngularJS and MongoDB, backed by Travis CI


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Biatora scotopholis Tuck.

### Remarks
null


text:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLBaseElementBinding;
use dom::bindings::codegen::Bindings::HTMLBaseElementBinding::HTMLBaseElementMethods;
use dom::bindings::inheritance::Castable;
use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
use dom::document::Document;
use dom::element::{AttributeMutation, Element};
use dom::htmlelement::HTMLElement;
use dom::node::{Node, UnbindContext, document_from_node};
use dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use servo_url::ServoUrl;
use style::attr::AttrValue;

#[dom_struct]
pub struct HTMLBaseElement {
    htmlelement: HTMLElement
}

impl HTMLBaseElement {
    fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLBaseElement {
        HTMLBaseElement {
            htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
        }
    }

    #[allow(unrooted_must_root)]
    pub fn new(local_name: LocalName,
               prefix: Option<Prefix>,
               document: &Document) -> DomRoot<HTMLBaseElement> {
        Node::reflect_node(box HTMLBaseElement::new_inherited(local_name, prefix, document),
                           document,
                           HTMLBaseElementBinding::Wrap)
    }

    /// https://html.spec.whatwg.org/multipage/#frozen-base-url
    pub fn frozen_base_url(&self) -> ServoUrl {
        let href = self.upcast::<Element>().get_attribute(&ns!(), &local_name!("href"))
            .expect("The frozen base url is only defined for base elements \
                     that have a base url.");
        let document = document_from_node(self);
        let base = document.fallback_base_url();
        let parsed = base.join(&href.value());
        parsed.unwrap_or(base)
    }

    /// Update the cached base element in response to binding or unbinding from
    /// a tree.
    pub fn bind_unbind(&self, tree_in_doc: bool) {
        if !tree_in_doc {
            return;
        }

        if self.upcast::<Element>().has_attribute(&local_name!("href")) {
            let document = document_from_node(self);
            document.refresh_base_element();
        }
    }
}

impl HTMLBaseElementMethods for HTMLBaseElement {
    // https://html.spec.whatwg.org/multipage/#dom-base-href
    fn Href(&self) -> DOMString {
        let document = document_from_node(self);

        // Step 1.
        if !self.upcast::<Element>().has_attribute(&local_name!("href")) {
            return DOMString::from(document.base_url().as_str());
        }

        // Step 2.
        let fallback_base_url = document.fallback_base_url();

        // Step 3.
        let url = self.upcast::<Element>().get_url_attribute(&local_name!("href"));

        // Step 4.
        let url_record = fallback_base_url.join(&*url);

        // Step 5, 6.
        DOMString::from(url_record.as_ref().map(|url| url.as_str()).unwrap_or(""))
    }

    // https://html.spec.whatwg.org/multipage/#dom-base-href
    make_url_setter!(SetHref, "href");
}

impl VirtualMethods for HTMLBaseElement {
    fn super_type(&self) -> Option<&VirtualMethods> {
        Some(self.upcast::<HTMLElement>() as &VirtualMethods)
    }

    fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
        self.super_type().unwrap().attribute_mutated(attr, mutation);
        if *attr.local_name() == local_name!("href") {
            document_from_node(self).refresh_base_element();
        }
    }

    fn bind_to_tree(&self, tree_in_doc: bool) {
        self.super_type().unwrap().bind_to_tree(tree_in_doc);
        self.bind_unbind(tree_in_doc);
    }

    fn unbind_from_tree(&self, context: &UnbindContext) {
        self.super_type().unwrap().unbind_from_tree(context);
        self.bind_unbind(context.tree_in_doc);
    }
}


text:
class QADevice : public QObject {
    Q_OBJECT
    Q_PROPERTY(qreal dp READ dp NOTIFY dpChanged)
    Q_PROPERTY(qreal dpi READ dpi NOTIFY dpiChanged)
    Q_PROPERTY(bool isTablet READ isTablet NOTIFY isTabletChanged)
    Q_PROPERTY(QString os READ os NOTIFY osChanged)

public:
    QADevice(QObject* parent = 0);

    qreal dp() const;

    qreal dpi() const;

    qreal isTablet() const;

    QString os() const;

    static qreal readDp();

signals:
    void dpChanged();
    void dpiChanged();
    void isTabletChanged();
    void osChanged();

private:

};

#endif // QADEVICE


text:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".text.DrawTextActivity">

    <com.chillingvan.canvasglsample.text.DrawTextTextureView
        android:id="@+id/media_player_texture_view"
        android:layout_width="match_parent"
        android:layout_height="250dp"/>

    <TextView
        android:id="@+id/frame_rate_txt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/media_player_texture_view"
        tools:text="rate"/>

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="24dp"
        android:text="Start"
        android:onClick="onClickStart"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>


text:
namespace media {

int SampleFormatToBytesPerChannel(SampleFormat sample_format) {
  switch (sample_format) {
    case kUnknownSampleFormat:
      return 0;
    case kSampleFormatU8:
      return 1;
    case kSampleFormatS16:
    case kSampleFormatPlanarS16:
      return 2;
    case kSampleFormatS24:
    case kSampleFormatS32:
    case kSampleFormatF32:
    case kSampleFormatPlanarF32:
    case kSampleFormatPlanarS32:
      return 4;
  }

  NOTREACHED() << "Invalid sample format provided: " << sample_format;
  return 0;
}

const char* SampleFormatToString(SampleFormat sample_format) {
  switch(sample_format) {
    case kUnknownSampleFormat:
      return "Unknown sample format";
    case kSampleFormatU8:
      return "Unsigned 8-bit with bias of 128";
    case kSampleFormatS16:
      return "Signed 16-bit";
    case kSampleFormatS24:
      return "Signed 24-bit";
    case kSampleFormatS32:
      return "Signed 32-bit";
    case kSampleFormatF32:
      return "Float 32-bit";
    case kSampleFormatPlanarS16:
      return "Signed 16-bit planar";
    case kSampleFormatPlanarF32:
      return "Float 32-bit planar";
    case kSampleFormatPlanarS32:
      return "Signed 32-bit planar";
  }
  NOTREACHED() << "Invalid sample format provided: " << sample_format;
  return "";
}

bool IsPlanar(SampleFormat sample_format) {
  switch (sample_format) {
    case kSampleFormatPlanarS16:
    case kSampleFormatPlanarF32:
    case kSampleFormatPlanarS32:
      return true;
    case kUnknownSampleFormat:
    case kSampleFormatU8:
    case kSampleFormatS16:
    case kSampleFormatS24:
    case kSampleFormatS32:
    case kSampleFormatF32:
      return false;
  }

  NOTREACHED() << "Invalid sample format provided: " << sample_format;
  return false;
}

bool IsInterleaved(SampleFormat sample_format) {
  switch (sample_format) {
    case kSampleFormatU8:
    case kSampleFormatS16:
    case kSampleFormatS24:
    case kSampleFormatS32:
    case kSampleFormatF32:
      return true;
    case kUnknownSampleFormat:
    case kSampleFormatPlanarS16:
    case kSampleFormatPlanarF32:
    case kSampleFormatPlanarS32:
      return false;
  }

  NOTREACHED() << "Invalid sample format provided: " << sample_format;
  return false;
}

}  // namespace media


text:
<?php

namespace Cloudtek\DynamoDM\Persister;

use Cloudtek\DynamoDM\DocumentManager;
use Cloudtek\DynamoDM\Exception\LockException;
use Cloudtek\DynamoDM\Expression\Operand\RootAttribute;
use Cloudtek\DynamoDM\Expression\Operand\RootPath;
use Cloudtek\DynamoDM\Mapping\PropertyMetadata;
use Cloudtek\DynamoDM\PersistentCollection\PersistentCollectionInterface;
use Cloudtek\DynamoDM\QueryBuilder;
use Cloudtek\DynamoDM\Type\Type;
use Cloudtek\DynamoDM\UnitOfWork;

/**
 * The CollectionPersister is responsible for persisting collections of embedded
 * or referenced documents. When a PersistentCollection is scheduledForDeletion
 * in the UnitOfWork by calling PersistentCollection::clear() or is
 * de-referenced in the domain application code, CollectionPersister::delete()
 * will be called. When documents within the PersistentCollection are added or
 * removed, CollectionPersister::update() will be called, which may set the
 * entire collection or delete/insert individual elements, depending on the
 * mapping strategy.
 */
class CollectionPersister
{
    /**
     * The AssociationPersister instance.
     *
     * @var AssociationPersister
     */
    private $ap;

    /**
     * The DocumentManager instance.
     *
     * @var DocumentManager
     */
    private $dm;

    /**
     * The PersistenceBuilder instance.
     *
     * @var PersistenceBuilder
     */
    private $pb;

    /**
     * The UnitOfWork instance.
     *
     * @var UnitOfWork
     */
    private $uow;

    /**
     * Constructs a new CollectionPersister instance.
     *
     * @param DocumentManager    $dm
     * @param PersistenceBuilder $pb
     * @param UnitOfWork         $uow
     */
    public function __construct(DocumentManager $dm, PersistenceBuilder $pb, UnitOfWork $uow)
    {
        $this->dm  = $dm;
        $this->pb  = $pb;
        $this->uow = $uow;
        $this->ap  = $uow->getAssociationPersister();
    }

    /**
     * Deletes a PersistentCollection instance completely from a document using REMOVE.
     *
     * @param PersistentCollectionInterface $coll
     */
    public function delete(PersistentCollectionInterface $coll)
    {
        $mapping = $coll->getMapping();
        if ($mapping->isInverseSide) {
            return; // ignore inverse side
        }
        if ($mapping->strategy === PropertyMetadata::STORAGE_STRATEGY_ATOMIC_SET) {
            throw new \UnexpectedValueException(sprintf('%s delete collection strategy should have been handled by DocumentPersister. Please report a bug in issue tracker', $mapping->strategy));
        }

        list($qb, $path, $parent) = $this->getQueryPathAndParent($coll);

        $path->remove();
        $this->executeQuery($qb, $parent);
    }

    /**
     * Deletes removed elements from a PersistentCollection instance.
     *
     * This method is intended to be used with the "listAppend" and "addToSet"
     * strategies.
     *
     * @param PersistentCollectionInterface $coll
     */
    private function deleteElements(PersistentCollectionInterface $coll)
    {
        $deleteDiff = $coll->getDeleteDiff();

        if (empty($deleteDiff)) {
            return;
        }

        $mapping = $coll->getMapping();

        /** @var RootPath $collPath */
        list($qb, $collPath, $parent) = $this->getQueryPathAndParent($coll);

        foreach ($deleteDiff as $key => $document) {
            switch ($mapping->strategy) {
                case PropertyMetadata::STORAGE_STRATEGY_LIST_APPEND:
                    $path = $mapping->type === Type::LIST_ ? $collPath->i($key) : $collPath->map($key);
                    $path->remove();
                    break;
                case PropertyMetadata::STORAGE_STRATEGY_ADD_TO_SET:
                    //mapping drivers / classmetadatafactory ensure this strategy is
                    //only assigned to top-level documents

                    /** @var RootAttribute $collPath */
                    $collPath->delete($document);
                    break;
                default:
                    throw new \LogicException(sprintf('Invalid strategy %s given for insertElements', $mapping->strategy));
            }
        }

        $this->executeQuery($qb, $parent);
    }

    /**
     * Wrap QueryBuilder execution to add identifier value(s) and versioning logic.
     *
     * @param QueryBuilder $qb
     * @param object       $document
     *
     * @throws LockException
     */
    private function executeQuery(QueryBuilder $qb, $document)
    {
        $identifier = $qb->class->createIdentifier($document);

        $qb->update();
        $qb->setIdentifier($identifier);

        if ($qb->class->isVersioned) {
            $versionMapping   = $qb->class->getPropertyMetadata($qb->class->versionAttribute);
            $versionAttribute = $qb->attr($versionMapping->name);
            $version          = $versionMapping->getValue($document);

            $versionAttribute->equals($version);
        }

        try {
            $qb->getQuery()->execute();
        } catch (\Aws\DynamoDb\Exception\DynamoDbException $e) {
            if ($qb->class->isVersioned && $e->getAwsErrorCode() === 'ConditionalCheckFailedException') {
                throw LockException::lockFailed($document);
            }

            throw $e;
        }
    }

    /**
     * Create and return a QueryBuilder and Path instance representing the provided
     * collection's document path, along with the top-level document.
     *
     * @param PersistentCollectionInterface $coll
     * @param QueryBuilder|null             $qb
     *
     * @return mixed[] list($qb, $path, $parent)
     */
    public function getQueryPathAndParent(PersistentCollectionInterface $coll, QueryBuilder $qb = null)
    {
        $collMapping = $coll->getMapping();
        $parent      = $coll->getOwner();
        $paths[]     = [$collMapping->name, null];

        while (($association = $this->uow->getParentAssociation($parent)) !== null) {
            list($mapping, $owner, $propertyName, $propertyKey) = $association;

            if ($mapping->reference) {
                break;
            }

            $parent  = $owner;
            $paths[] = [$propertyName, $propertyKey];
        }

        if ($qb === null) {
            $qb = $this->dm->createQueryBuilder(get_class($parent));
        }

        /** @var RootPath|null $path */
        $path = null;
        foreach (array_reverse($paths) as $pathValue) {
            list($pathName, $pathKey) = $pathValue;

            $path = $path === null ? $qb->attr($pathName) : $path->map($pathName);

            switch (gettype($pathKey)) {
                case 'string':
                    $path = $path->map($pathKey);
                    break;
                case 'integer':
                    $path = $path->i($pathKey);
                    break;
            }
        }

        return [$qb, $path, $parent];
    }

    /**
     * Inserts new elements for a PersistentCollection instance.
     *
     * This method is intended to be used with the "listAppend" and "addToSet"
     * strategies.
     *
     * @param PersistentCollectionInterface $coll
     */
    private function insertElements(PersistentCollectionInterface $coll)
    {
        $insertDiff = $coll->getInsertDiff();

        if (empty($insertDiff)) {
            return;
        }

        $mapping = $coll->getMapping();

        /** @var RootPath $path */
        list($qb, $path, $parent) = $this->getQueryPathAndParent($coll);

        switch ($mapping->strategy) {
            case PropertyMetadata::STORAGE_STRATEGY_LIST_APPEND:
                $list = $path->ifNotExists([]);
                $path->set($list->listAppend($insertDiff));
                break;

            case PropertyMetadata::STORAGE_STRATEGY_ADD_TO_SET:
                foreach ($insertDiff as $key => $document) {
                    //mapping drivers / classmetadatafactory ensure this strategy is
                    //only assigned to top-level documents

                    /** @var RootAttribute $path */
                    $path->add($document);
                }
                break;

            default:
                throw new \LogicException(sprintf('Invalid strategy %s given for insertElements', $mapping->strategy));
        }

        $this->executeQuery($qb, $parent);
    }

    /**
     * Sets a PersistentCollection instance.
     *
     * This method is intended to be used with the "set" strategy.
     *
     * @param PersistentCollectionInterface $coll
     */
    private function setCollection(PersistentCollectionInterface $coll)
    {
        list($qb, $path, $parent) = $this->getQueryPathAndParent($coll);

        $coll->initialize();

        $path->set($coll);
        $this->executeQuery($qb, $parent);
    }

    /**
     * Updates a PersistentCollection instance deleting removed rows and
     * inserting new rows.
     *
     * @param PersistentCollectionInterface $coll
     */
    public function update(PersistentCollectionInterface $coll)
    {
        $mapping = $coll->getMapping();

        if ($mapping->isInverseSide) {
            return; // ignore inverse side
        }

        switch ($mapping->strategy) {
            case PropertyMetadata::STORAGE_STRATEGY_ATOMIC_SET:
                throw new \UnexpectedValueException(sprintf('%s update collection strategy should have been handled by DocumentPersister. Please report a bug in issue tracker', $mapping->strategy));

            case PropertyMetadata::STORAGE_STRATEGY_SET:
                $this->setCollection($coll);
                break;

            case PropertyMetadata::STORAGE_STRATEGY_ADD_TO_SET:
            case PropertyMetadata::STORAGE_STRATEGY_LIST_APPEND:
                $coll->initialize();
                $this->deleteElements($coll);
                $this->insertElements($coll);
                break;

            default:
                throw new \UnexpectedValueException(sprintf('Unsupported collection strategy: %s', $mapping->strategy));
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.nsnjson</groupId>
  <artifactId>nsnjson-driver</artifactId>
  <version>0.0.5</version>
  <description>NSNJSON (Not So Normal JSON) Java Driver</description>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.6.1</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <testSource>1.8</testSource>
          <testTarget>1.8</testTarget>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>


text:
describe("E2E testing", function () {
    beforeEach(angular.mock.module('PayrollApp'));

    var $controller;

    beforeEach(angular.mock.inject(function (_$controller_) {
        $controller = _$controller_;
    }));

    describe("payroll controller", function () {
        var $scope = {};
        var controller;

        beforeEach(function () {
            controller = $controller('payrollController', { $scope: $scope });
        });

        it("payrollController must be defined", function () {
            expect(controller).toBeDefined();
        });

        it("showUserWorkLogs: must create modal window", function () {
            var modal = $scope.showUserWorkLogs('userid', 'Bob', 100);
            expect(modal).toBeDefined();
        });

        it("setCurrentMonth: must set month value to current", function () {
            var currentMonth = new Date().getMonth() + 1;
            $scope.logView.month = 0;

            $scope.setCurrentMonth();

            expect($scope.logView.month).toEqual(currentMonth);
        });

        it("setMonthArray: array must equals 12", function () {
            var months = 12;
            $scope.months = [];

            $scope.setMonthArray();

            expect($scope.months.length).toEqual(months);
        });
    });
});


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

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:layout_margin="10dp"
    >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center">

            <ImageButton
                android:id="@+id/ibtn_close"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"

                android:background="@drawable/close" />
        </LinearLayout>

        <TextView
            android:id="@+id/tv_water_name"
            android:layout_width="match_parent"
            android:layout_height="40dp"
            android:layout_marginRight="30dp"
            android:gravity="center"
            android:text="name"
            android:textSize="20sp"
            android:textStyle="bold" />
    </LinearLayout>

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/grey_shallow">

        <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/lila_water"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="2dp"
            android:background="@color/white"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_margin="16dp"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/tv_brand"
                        android:text="品牌" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/tv_category"
                        android:layout_marginLeft="80dp"
                        android:text="种类" />

                </LinearLayout>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:id="@+id/tv_grounding_date"
                    android:text="上架时间" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_marginTop="16dp"
                    android:layout_height="match_parent">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="描述:" />
                    <TextView
                        android:id="@+id/tv_description"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginLeft="2dp"
                        />

                    </LinearLayout>

            </LinearLayout>

        </LinearLayout>

        <include
            layout="@layout/layout_loading"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="16dp"></include>

        <include
            layout="@layout/layout_load_fail"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="16dp">
        </include>

    </FrameLayout>

</LinearLayout>


text:
class CreateSchoolTimes < ActiveRecord::Migration[5.2]
  def change
    create_table :school_times do |t|
      t.references  :school, foreign_key: true
      t.integer     :opening_time, default: 850
      t.integer     :closing_time, default: 1520
      t.integer     :day
    end
  end
end


text:
namespace Azure.ResourceManager.OperationalInsights.Models
{
    /// <summary> The sort parameters for search. </summary>
    internal partial class SearchSort
    {
        /// <summary> Initializes a new instance of SearchSort. </summary>
        internal SearchSort()
        {
        }

        /// <summary> Initializes a new instance of SearchSort. </summary>
        /// <param name="name"> The name of the field the search query is sorted on. </param>
        /// <param name="order"> The sort order of the search. </param>
        internal SearchSort(string name, SearchSortEnum? order)
        {
            Name = name;
            Order = order;
        }

        /// <summary> The name of the field the search query is sorted on. </summary>
        public string Name { get; }
        /// <summary> The sort order of the search. </summary>
        public SearchSortEnum? Order { get; }
    }
}


text:
package com.siimkinks.sqlitemagic.intellij.plugin.util;

import com.intellij.codeInsight.AnnotationUtil;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.impl.PsiImplUtil;
import com.intellij.psi.util.PsiTreeUtil;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.regex.Pattern;

public class PsiAnnotationUtil {
  @NotNull
  public static PsiAnnotation createPsiAnnotation(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull Class<? extends Annotation> annotationClass) {
    return createPsiAnnotation(psiModifierListOwner, annotationClass, "");
  }

  @NotNull
  public static PsiAnnotation createPsiAnnotation(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull Class<? extends Annotation> annotationClass, @Nullable String value) {
    final PsiElementFactory elementFactory = JavaPsiFacade.getInstance(psiModifierListOwner.getProject()).getElementFactory();
    final PsiClass psiClass = PsiTreeUtil.getParentOfType(psiModifierListOwner, PsiClass.class);
    final String valueString = StringUtil.isNotEmpty(value) ? "(" + value + ")" : "";
    return elementFactory.createAnnotationFromText("@" + annotationClass.getName() + valueString, psiClass);
  }

  @Nullable
  public static PsiAnnotation findAnnotation(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull final Class<? extends Annotation> annotationType) {
    return findAnnotation(psiModifierListOwner, annotationType.getName());
  }

  @Nullable
  public static PsiAnnotation findAnnotation(@NotNull final PsiModifierListOwner psiModifierListOwner, @NotNull final String qualifiedName) {
    return PsiImplUtil.findAnnotation(psiModifierListOwner.getModifierList(), qualifiedName);
  }

  public static boolean isAnnotatedWith(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull final Class<? extends Annotation> annotationType) {
    return isAnnotatedWith(psiModifierListOwner, annotationType.getName());
  }

  public static boolean isNotAnnotatedWith(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull final Class<? extends Annotation> annotationType) {
    return !isAnnotatedWith(psiModifierListOwner, annotationType);
  }

  public static boolean isAnnotatedWith(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull final Class<? extends Annotation>... annotationTypes) {
    for (Class<? extends Annotation> annotationType : annotationTypes) {
      if (isAnnotatedWith(psiModifierListOwner, annotationType)) {
        return true;
      }
    }
    return false;
  }

  public static boolean isNotAnnotatedWith(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull final Class<? extends Annotation>... annotationTypes) {
    return !isAnnotatedWith(psiModifierListOwner, annotationTypes);
  }

  public static boolean isAnnotatedWith(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull String qualifiedName) {
    return AnnotationUtil.isAnnotated(psiModifierListOwner, qualifiedName, false, true);
  }

  public static boolean isAnnotatedWith(@NotNull PsiModifierListOwner psiModifierListOwner, @NotNull final Pattern annotationPattern) {
    final PsiModifierList psiModifierList = psiModifierListOwner.getModifierList();
    if (psiModifierList != null) {
      for (PsiAnnotation psiAnnotation : psiModifierList.getAnnotations()) {
        final String suspect = getSimpleNameOf(psiAnnotation);
        if (annotationPattern.matcher(suspect).matches()) {
          return true;
        }
      }
    }
    return false;
  }

  @NotNull
  public static String getSimpleNameOf(@NotNull PsiAnnotation psiAnnotation) {
    PsiJavaCodeReferenceElement referenceElement = psiAnnotation.getNameReferenceElement();
    return StringUtil.notNullize(null == referenceElement ? null : referenceElement.getReferenceName());
  }

  @NotNull
  public static <T> Collection<T> getAnnotationValues(@NotNull PsiAnnotation psiAnnotation, @NotNull String parameter, @NotNull Class<T> asClass) {
    Collection<T> result = Collections.emptyList();
    PsiAnnotationMemberValue attributeValue = psiAnnotation.findAttributeValue(parameter);
    if (attributeValue instanceof PsiArrayInitializerMemberValue) {
      final PsiAnnotationMemberValue[] memberValues = ((PsiArrayInitializerMemberValue) attributeValue).getInitializers();
      result = new ArrayList<T>(memberValues.length);

      for (PsiAnnotationMemberValue memberValue : memberValues) {
        T value = resolveElementValue(memberValue, asClass);
        if (null != value) {
          result.add(value);
        }
      }
    } else if (null != attributeValue) {
      T value = resolveElementValue(attributeValue, asClass);
      if (null != value) {
        result = Collections.singletonList(value);
      }
    }
    return result;
  }

  public static boolean getBooleanAnnotationValue(@NotNull PsiAnnotation psiAnnotation, @NotNull String parameter, boolean defaultValue) {
    PsiAnnotationMemberValue attrValue = psiAnnotation.findAttributeValue(parameter);
    final Boolean result = null != attrValue ? resolveElementValue(attrValue, Boolean.class) : null;
    return result == null ? defaultValue : result;
  }

  public static String getStringAnnotationValue(@NotNull PsiAnnotation psiAnnotation, @NotNull String parameter) {
    PsiAnnotationMemberValue attrValue = psiAnnotation.findAttributeValue(parameter);
    return null != attrValue ? resolveElementValue(attrValue, String.class) : null;
  }

  @Nullable
  private static <T> T resolveElementValue(@NotNull PsiElement psiElement, @NotNull Class<T> asClass) {
    T value = null;
    if (psiElement instanceof PsiReferenceExpression) {
      final PsiElement resolved = ((PsiReferenceExpression) psiElement).resolve();

      if (resolved instanceof PsiEnumConstant) {
        final PsiEnumConstant psiEnumConstant = (PsiEnumConstant) resolved;
        //Enums are supported as VALUE-Strings only
        if (asClass.isAssignableFrom(String.class)) {
          value = (T) psiEnumConstant.getName();
        }
      } else if (resolved instanceof PsiVariable) {
        final PsiVariable psiVariable = (PsiVariable) resolved;
        Object elementValue = psiVariable.computeConstantValue();
        if (null != elementValue && asClass.isAssignableFrom(elementValue.getClass())) {
          value = (T) elementValue;
        }
      }
    } else if (psiElement instanceof PsiLiteralExpression) {
      Object elementValue = ((PsiLiteralExpression) psiElement).getValue();
      if (null != elementValue && asClass.isAssignableFrom(elementValue.getClass())) {
        value = (T) elementValue;
      }
    } else if (psiElement instanceof PsiClassObjectAccessExpression) {
      PsiTypeElement elementValue = ((PsiClassObjectAccessExpression) psiElement).getOperand();
      //Enums are supported as VALUE-Strings only
      if (asClass.isAssignableFrom(PsiType.class)) {
        value = (T) elementValue.getType();
      }
    } else if (psiElement instanceof PsiAnnotation) {
      if (asClass.isAssignableFrom(PsiAnnotation.class)) {
        value = (T) psiElement;
      }
    }
    return value;
  }

  @Nullable
  public static Boolean getDeclaredBooleanAnnotationValue(@NotNull PsiAnnotation psiAnnotation, @NotNull String parameter) {
    final JavaPsiFacade javaPsiFacade = JavaPsiFacade.getInstance(psiAnnotation.getProject());
    PsiAnnotationMemberValue attributeValue = psiAnnotation.findDeclaredAttributeValue(parameter);
    Object constValue = javaPsiFacade.getConstantEvaluationHelper().computeConstantExpression(attributeValue);
    return constValue instanceof Boolean ? (Boolean) constValue : null;
  }

  @NotNull
  public static Collection<String> collectAnnotationsToCopy(@NotNull PsiField psiField, final Pattern... patterns) {
    Collection<String> annotationsToCopy = new ArrayList<String>();
    PsiModifierList modifierList = psiField.getModifierList();
    if (null != modifierList) {
      for (PsiAnnotation psiAnnotation : modifierList.getAnnotations()) {
        final String annotationName = getSimpleNameOf(psiAnnotation);
        for (Pattern pattern : patterns) {
          if (pattern.matcher(annotationName).matches()) {
            annotationsToCopy.add(psiAnnotation.getQualifiedName());
          }
        }
      }
    }
    return annotationsToCopy;
  }

  public static boolean checkAnnotationsSimpleNameExistsIn(@NotNull PsiModifierListOwner modifierListOwner, @NotNull Collection<String> annotationNames) {
    final PsiModifierList modifierList = modifierListOwner.getModifierList();
    if (null != modifierList) {
      for (PsiAnnotation psiAnnotation : modifierList.getAnnotations()) {
        final String simpleName = getSimpleNameOf(psiAnnotation);
        if (annotationNames.contains(simpleName)) {
          return true;
        }
      }
    }
    return false;
  }
}


text:
.. _kudos:

Kudos
*****

Thank you to `SQLAlchemy <http://www.sqlalchemy.org/>`_ for providing such a great library to work with.


text:
CREATE TABLE tblComp_Stages (
  intCompStageID INT NOT NULL AUTO_INCREMENT,
  intCompID        INT DEFAULT 0,
  intStageNumber   INT DEFAULT 0,
  intStageType     TINYINT DEFAULT 0,
  strStageName     VARCHAR(50) DEFAULT '',
  intRecStatus     INT DEFAULT 0,
  tTimeStamp       TIMESTAMP,

  PRIMARY KEY (intCompStageID),
  KEY index_CompID (intCompID)
);