text:
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: OKLab and OKLCH</title>
<link rel="author" title="Sam Weinig" href="mailto:weinig@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-oklab-oklch">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#oklab-lab-to-predefined">
<link rel="match" href="oklab-007-ref.html">
<meta name="assert" content="oklab() with no alpha, negative b axis">

Test passes if you see a single square, and not two rectangles of different colors.


text:
use ::json;

pub struct Config {
    pub log_label: String,
}

pub fn parse(json: &str) -> Result<Config, String> {
    let parsed = json::parse(json)?;
    if !parsed.is_object() {
        return Err("schema.config root is not a object.".to_string());
    }

    let obj = parsed.as_object().unwrap();

    let log_label = obj.get("log_label");
    if log_label.is_none() {
        return Err("log_label is not found in schema.config.".to_string());
    }
    if !log_label.unwrap().is_string() {
        return Err("log_label is not string in schema.config.".to_string());
    }
    let log_label = log_label.unwrap().as_str().unwrap();
    Ok(Config {
        log_label: log_label.to_string(),
    })
}

redpajama_set_name: RedPajamaGithub


text:
export ATSD_LOGIN=axibase
export ATSD_PASSWORD=axibase
export ATSD_CONTAINER_NAME=atsd_api_test
export ATSD_HOST=127.0.0.1
export atsd_http_port=50088
export atsd_tcp_port=50081

# Check url http code with passed credentials
function url_http_status {
    url=$1
    login=$2
    password=$3
    echo $(curl -u ${login}:${password} \
    -w "%{http_code}" \
    -s \
    -o /dev/null \
    ${url})
}

function start_container {
    atsd_login=$1
    atsd_password=$2
    atsd_http_port=$3
    atsd_host=localhost
    check_url=http://${atsd_host}:${atsd_http_port}/version
    name=atsd-api-tests
    default_timezone="Asia/Kathmandu"
    docker run -d --name=${name} \
           -p ${atsd_http_port}:8088 \
           -p ${atsd_tcp_port}:8081 \
           -e axiname=${atsd_login} \
           -e axipass=${atsd_password} \
           -e timezone=${default_timezone} \
           -e DEPLOYMENT_TYPE=java-client-test \
           axibase/atsd:api_test
    # Wait while container is not starting up
    printf "Waiting to start ${name} container ...";
    while [[ $(url_http_status ${check_url} ${ATSD_LOGIN} ${ATSD_PASSWORD}) != 200 ]]; do
        printf "."
        sleep 3;
    done
    echo "Container is started"
}

function run_atsd_container {
    start_container ${ATSD_LOGIN} ${ATSD_PASSWORD} ${atsd_http_port}
}

function show_atsd_version {
    curl --user ${ATSD_LOGIN}:${ATSD_PASSWORD} ${check_url}
}

function run_test {
    mvn clean test \
    -Dmaven.test.failure.ignore=false \
    -Daxibase.tsd.api.server.name=${ATSD_HOST} \
    -Daxibase.tsd.api.server.port=${atsd_http_port} \
    -Daxibase.tsd.api.server.tcp.port=${atsd_tcp_port} \
    -Daxibase.tsd.api.username=${ATSD_LOGIN} \
    -Daxibase.tsd.api.password=${ATSD_PASSWORD};
}

function coverage_report {
    mvn jacoco:report
    bash <(curl -s https://codecov.io/bash)
}


text:
namespace {

ABSL_CONST_INIT const absl::string_view kVideoSizeViewName =
    "my.org/views/video_size";
ABSL_CONST_INIT const absl::string_view kVideoSizeMeasureName =
    "my.org/measure/video_size";

// The resource owner defines and registers a measure. A function exposing a
// function-local static is the recommended style, ensuring that the measure is
// only registered once.
opencensus::stats::MeasureInt64 VideoSizeMeasure() {
  static const opencensus::stats::MeasureInt64 video_size =
      opencensus::stats::MeasureInt64::Register(
          kVideoSizeMeasureName, "size of processed videos", "By");
  return video_size;
}

opencensus::tags::TagKey FrontendKey() {
  static const auto frontend_key =
      opencensus::tags::TagKey::Register("my.org/keys/frontend");
  return frontend_key;
}

}  // namespace

// Simple program that collects data for video size.
int main(int argc, char **argv) {
  if (argc != 1) {
    std::cerr << "Usage: " << argv[0] << "\n";
    return 1;
  }
  srand(time(NULL));

  // Register stdout exporters.
  opencensus::exporters::stats::StdoutExporter::Register();
  opencensus::exporters::trace::StdoutExporter::Register();

  // Call measure so that it is initialized.
  VideoSizeMeasure();

  constexpr int64_t kMiB = 1 << 20;

  // Create view to see the processed video size distribution broken down by
  // frontend. The view has bucket boundaries (0, 16 * kMiB, 65536 * kMiB) that
  // will group measure values into histogram buckets.
  const opencensus::stats::ViewDescriptor video_size_view =
      opencensus::stats::ViewDescriptor()
          .set_name(kVideoSizeViewName)
          .set_description("processed video size over time")
          .set_measure(kVideoSizeMeasureName)
          .set_aggregation(opencensus::stats::Aggregation::Distribution(
              opencensus::stats::BucketBoundaries::Explicit(
                  {0, 16 * kMiB, 256 * kMiB})))
          .add_column(FrontendKey());
  opencensus::stats::View view(video_size_view);
  video_size_view.RegisterForExport();

  // Samplers are potentially expensive to construct. Use one long-lived sampler
  // instead of constructing one per Span.
  static opencensus::trace::AlwaysSampler sampler;

  // Done initializing. Video processing starts here:
  auto span = opencensus::trace::Span::StartSpan("my.org/ProcessVideo", nullptr,
                                                 {&sampler});
  span.AddAnnotation("Start processing video.");
  // Sleep for [1,10] milliseconds to fake work.
  absl::SleepFor(absl::Milliseconds(rand() % 10 + 1));
  // Record the processed video size.
  opencensus::stats::Record({{VideoSizeMeasure(), 25 * kMiB}},
                            {{FrontendKey(), "video size"}});
  span.AddAnnotation("Finished processing video.");
  span.End();

  std::cout << "video_size_view definitions:" << video_size_view.DebugString()
            << "\n\n";

  std::cout << "Waiting 10.1s for exporters to run...\n\n";
  absl::SleepFor(absl::Milliseconds(10100));

  std::cout << "View data:\n";
  const auto data = view.GetData();
  assert(data.type() == opencensus::stats::ViewData::Type::kDistribution);
  for (auto &it : data.distribution_data()) {
    std::cout << "  ";
    for (auto &name : it.first) std::cout << name << " : ";
    std::cout << it.second.DebugString() << "\n";
  }
}


text:
BASE="https://ci.appveyor.com/api"

if [ x"$1" == x ]; then
    # Get state of last job
    LAST_JOB=$(curl -s ${BASE}/projects/legrandin/pycryptodome | jq '.build')
else
    # Get state of last job for branch
    LAST_JOB=$(curl -s ${BASE}/projects/legrandin/pycryptodome/branch/$1 | jq '.build')
fi

BRANCH=$(echo ${LAST_JOB} | jq -r '.branch')
STATUS=$(echo ${LAST_JOB} | jq -r '.status')

echo "Last build done for branch '${BRANCH}' with status '${STATUS}'"
if [ ${STATUS} != "success" ]; then
	exit 1
fi

# Dowload one file per job
JOBS=$(echo ${LAST_JOB} | jq -r '.jobs[].jobId')
for job_id in ${JOBS}; do
	FILE=$(curl -s ${BASE}/buildjobs/${job_id}/artifacts | jq -r .[0].fileName)
	wget ${BASE}/buildjobs/${job_id}/artifacts/${FILE} -P wheels
done


text:
    <?php foreach ($name as $i => $nameSection): ?>
      <?php if ($i == count($name) - 1): ?>
        <?php echo $tpl->escape($nameSection) ?>
      <?php else: ?>
        <?php echo $tpl->escape($nameSection) . ' \\' ?>
      <?php endif ?>
    <?php endforeach ?>
    <?php if ($code): ?>
      (<?php echo $tpl->escape($code) ?>)
    <?php endif ?>

  <?php echo $tpl->escape($plain_exception) ?>
  <button id="copy-button" class="clipboard" data-clipboard-text="<?php echo $tpl->escape($plain_exception) ?>" title="Copy exception details to clipabord">
    COPY
  </button>

    <?php if (!empty($message)): ?>
      <?php echo $tpl->escape($message) ?>
    <?php else: ?>
      No message
    <?php endif ?>


text:
package org.escalate42.javaz.trym;

import org.escalate42.javaz.common.function.Function;
import org.escalate42.javaz.common.function.ThrowableFunction;

/**
 * Created by vdubs
 * on 8/22/14.
 */
public final class TryF<A, B> implements Function<A, TryM<B>> {

    public final ThrowableFunction<A, B> function;

    public static <AA, BB> TryF<AA, BB> tryF(ThrowableFunction<AA, BB> function) { return new TryF<>(function); }

    public TryF(ThrowableFunction<A, B> function) {
        if (function == null) { throw new IllegalArgumentException("Function for TryF<A, B> can not be null!"); }
        this.function = function;
    }

    @Override
    public TryM<B> apply(A a) { return TryMOps.tryM(this.function, a); }
}


text:
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, TemplateRef } from '@angular/core';
import { OffcanvasDismissReasons, NgbOffcanvas, NgbOffcanvasRef } from '@ng-bootstrap/ng-bootstrap';

@Component({ templateUrl: './offcanvas-autoclose.component.html', changeDetection: ChangeDetectionStrategy.OnPush })
export class OffcanvasAutoCloseComponent {
	private offcanvasRef: NgbOffcanvasRef | null = null;
	reason = '';
	options = {};

	constructor(private offcanvasService: NgbOffcanvas, private cd: ChangeDetectorRef) {}

	openOffcanvas(content?: TemplateRef<any>) {
		this.offcanvasRef = this.offcanvasService.open(content, this.options);
		this.offcanvasRef.result.then(
			() => {
				this.reason = `Closed`;
				this.cd.markForCheck();
			},
			(reason) => {
				if (reason === OffcanvasDismissReasons.BACKDROP_CLICK) {
					this.reason = 'Click';
				} else if (reason === OffcanvasDismissReasons.ESC) {
					this.reason = 'Escape';
				} else {
					this.reason = 'Other';
				}
				this.cd.markForCheck();
			},
		);
	}

	closeOffcanvas() {
		if (this.offcanvasRef) {
			this.offcanvasRef.close();
			this.offcanvasRef = null;
		}
	}

	reset() {
		this.closeOffcanvas();
		this.reason = '';
		this.options = {};
	}
}


text:
using namespace angle;

class BlendMinMaxTest : public ANGLETest
{
  protected:
    BlendMinMaxTest()
    {
        setWindowWidth(128);
        setWindowHeight(128);
        setConfigRedBits(8);
        setConfigGreenBits(8);
        setConfigBlueBits(8);
        setConfigAlphaBits(8);
        setConfigDepthBits(24);

        mProgram = 0;
        mColorLocation = -1;
    }

    struct Color
    {
        float values[4];
    };

    static GLubyte getExpected(bool blendMin, float curColor, GLubyte prevColor)
    {
        GLubyte curAsUbyte = static_cast<GLubyte>((curColor * std::numeric_limits<GLubyte>::max()) + 0.5f);
        return blendMin ? std::min<GLubyte>(curAsUbyte, prevColor) : std::max<GLubyte>(curAsUbyte, prevColor);
    }

    void runTest(GLenum colorFormat)
    {
        if (getClientVersion() < 3 && !extensionEnabled("GL_EXT_blend_minmax"))
        {
            std::cout << "Test skipped because ES3 or GL_EXT_blend_minmax is not available." << std::endl;
            return;
        }

        // TODO(geofflang): figure out why this fails
        if (IsIntel() && GetParam() == ES2_OPENGL())
        {
            std::cout << "Test skipped on OpenGL Intel due to flakyness." << std::endl;
            return;
        }

        SetUpFramebuffer(colorFormat);

        const size_t colorCount = 1024;
        Color colors[colorCount];
        for (size_t i = 0; i < colorCount; i++)
        {
            for (size_t j = 0; j < 4; j++)
            {
                colors[i].values[j] = (rand() % 255) / 255.0f;
            }
        }

        GLubyte prevColor[4];
        for (size_t i = 0; i < colorCount; i++)
        {
            const Color &color = colors[i];
            glUseProgram(mProgram);
            glUniform4f(mColorLocation, color.values[0], color.values[1], color.values[2], color.values[3]);

            bool blendMin = (rand() % 2 == 0);
            glBlendEquation(blendMin ? GL_MIN : GL_MAX);

            drawQuad(mProgram, "aPosition", 0.5f);

            if (i > 0)
            {
                EXPECT_PIXEL_EQ(0, 0,
                                getExpected(blendMin, color.values[0], prevColor[0]),
                                getExpected(blendMin, color.values[1], prevColor[1]),
                                getExpected(blendMin, color.values[2], prevColor[2]),
                                getExpected(blendMin, color.values[3], prevColor[3]));
            }

            glReadPixels(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, prevColor);
        }
    }

    virtual void SetUp()
    {
        ANGLETest::SetUp();

        const std::string testVertexShaderSource = SHADER_SOURCE
        (
            attribute highp vec4 aPosition;

            void main(void)
            {
                gl_Position = aPosition;
            }
        );

        const std::string testFragmentShaderSource = SHADER_SOURCE
        (
            uniform highp vec4 color;
            void main(void)
            {
                gl_FragColor = color;
            }
        );

        mProgram = CompileProgram(testVertexShaderSource, testFragmentShaderSource);
        if (mProgram == 0)
        {
            FAIL() << "shader compilation failed.";
        }

        mColorLocation = glGetUniformLocation(mProgram, "color");

        glUseProgram(mProgram);

        glClearColor(0, 0, 0, 0);
        glClearDepthf(0.0);
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        glEnable(GL_BLEND);
        glDisable(GL_DEPTH_TEST);
    }

    void SetUpFramebuffer(GLenum colorFormat)
    {
        glGenFramebuffers(1, &mFramebuffer);
        glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mFramebuffer);
        glBindFramebuffer(GL_READ_FRAMEBUFFER, mFramebuffer);

        glGenRenderbuffers(1, &mColorRenderbuffer);
        glBindRenderbuffer(GL_RENDERBUFFER, mColorRenderbuffer);
        glRenderbufferStorage(GL_RENDERBUFFER, colorFormat, getWindowWidth(), getWindowHeight());
        glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mColorRenderbuffer);

        ASSERT_GL_NO_ERROR();
    }

    virtual void TearDown()
    {
        glDeleteProgram(mProgram);
        glDeleteFramebuffers(1, &mFramebuffer);
        glDeleteRenderbuffers(1, &mColorRenderbuffer);

        ANGLETest::TearDown();
    }

    GLuint mProgram;
    GLint mColorLocation;

    GLuint mFramebuffer;
    GLuint mColorRenderbuffer;
};

TEST_P(BlendMinMaxTest, RGBA8)
{
    runTest(GL_RGBA8);
}

TEST_P(BlendMinMaxTest, RGBA32f)
{
    if (getClientVersion() < 3 || !extensionEnabled("GL_EXT_color_buffer_float"))
    {
        std::cout << "Test skipped because ES3 and GL_EXT_color_buffer_float are not available."
                  << std::endl;
        return;
    }

    // TODO(jmadill): Figure out why this is broken on Intel
    if (IsIntel() && (GetParam() == ES2_D3D11() || GetParam() == ES2_D3D9()))
    {
        std::cout << "Test skipped on Intel OpenGL." << std::endl;
        return;
    }

    // TODO (bug 1284): Investigate RGBA32f D3D SDK Layers messages on D3D11_FL9_3
    if (IsD3D11_FL93())
    {
        std::cout << "Test skipped on Feature Level 9_3." << std::endl;
        return;
    }

    runTest(GL_RGBA32F);
}

TEST_P(BlendMinMaxTest, RGBA16F)
{
    if (getClientVersion() < 3 && !extensionEnabled("GL_EXT_color_buffer_half_float"))
    {
        std::cout << "Test skipped because ES3 or GL_EXT_color_buffer_half_float is not available."
                  << std::endl;
        return;
    }

    // TODO(jmadill): figure out why this fails
    if (IsIntel() && (GetParam() == ES2_D3D11() || GetParam() == ES2_D3D9()))
    {
        std::cout << "Test skipped on Intel due to failures." << std::endl;
        return;
    }

    // TODO(geofflang): This fails because readpixels with UNSIGNED_BYTE/RGBA does not work with
    // half float buffers (http://anglebug.com/1288)
    if (GetParam().getRenderer() == EGL_PLATFORM_ANGLE_TYPE_OPENGLES_ANGLE)
    {
        std::cout << "Test skipped on OpenGL ES targets." << std::endl;
        return;
    }

    runTest(GL_RGBA16F);
}

// Use this to select which configurations (e.g. which renderer, which GLES major version) these tests should be run against.
ANGLE_INSTANTIATE_TEST(BlendMinMaxTest,
                       ES2_D3D9(),
                       ES2_D3D11(),
                       ES2_D3D11_FL9_3(),
                       ES2_OPENGL(),
                       ES2_OPENGLES());


text:
import { forwardRef } from "react";

import { SVGIcon, SVGIconProps } from "@react-md/icon";

export const NetworkCellSVGIcon = forwardRef<SVGSVGElement, SVGIconProps>(
  function NetworkCellSVGIcon(props, ref) {
    return (
      <SVGIcon {...props} ref={ref}>
        <path fillOpacity=".3" d="M2 22h20V2z" />
        <path d="M17 7L2 22h15z" />
      </SVGIcon>
    );
  }
);


text:
#ifndef CloseEvent_h
#define CloseEvent_h

#include "bindings/core/v8/ScriptWrappable.h"
#include "core/EventTypeNames.h"
#include "core/events/Event.h"
#include "modules/EventModules.h"
#include "modules/websockets/CloseEventInit.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/text/WTFString.h"

namespace blink {

class CloseEvent final : public Event {
  DEFINE_WRAPPERTYPEINFO();

 public:
  static CloseEvent* create() { return new CloseEvent(); }

  static CloseEvent* create(bool wasClean,
                            unsigned short code,
                            const String& reason) {
    return new CloseEvent(wasClean, code, reason);
  }

  static CloseEvent* create(const AtomicString& type,
                            const CloseEventInit& initializer) {
    return new CloseEvent(type, initializer);
  }

  bool wasClean() const { return m_wasClean; }
  unsigned short code() const { return m_code; }
  String reason() const { return m_reason; }

  // Event function.
  const AtomicString& interfaceName() const override {
    return EventNames::CloseEvent;
  }

  DEFINE_INLINE_VIRTUAL_TRACE() { Event::trace(visitor); }

 private:
  CloseEvent()
      : Event(EventTypeNames::close, false, false),
        m_wasClean(false),
        m_code(0) {}

  CloseEvent(bool wasClean, int code, const String& reason)
      : Event(EventTypeNames::close, false, false),
        m_wasClean(wasClean),
        m_code(code),
        m_reason(reason) {}

  CloseEvent(const AtomicString& type, const CloseEventInit& initializer);

  bool m_wasClean;
  unsigned short m_code;
  String m_reason;
};

}  // namespace blink

#endif  // CloseEvent_h


text:
local socket = _G.do_input.socket
local host = _G.do_input.host
local path  = _G.do_input.path
local add_header = _G.do_input.add_header

local mrandom = math.random
local toBase64 = crypto.toBase64
local pack_bytes = string.char
local band = bit.band
local rshift = bit.rshift
local hash = crypto.hash

local guid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"

local write_int32 = function(v)
  return pack_bytes(
    band(rshift(v, 24), 0xFF),
    band(rshift(v, 16), 0xFF),
    band(rshift(v,  8), 0xFF),
    band(v, 0xFF)
  )
end

local generate_key = function()
  local r1 = mrandom(0,0xfffffff)
  local r2 = mrandom(0,0xfffffff)
  local r3 = mrandom(0,0xfffffff)
  local r4 = mrandom(0,0xfffffff)
  local key = write_int32(r1)..write_int32(r2)..write_int32(r3)..write_int32(r4)
  return toBase64(key)
end

local headers = ""

local sec_websocket_accept = function(sec_websocket_key)
  local a = sec_websocket_key..guid
  local sha1 = hash("sha1", a)
  assert((#sha1 % 2) == 0)
  return toBase64(sha1)
end

headers = headers.."GET "..path.." HTTP/1.1\r\n"
headers = headers.."Upgrade: WebSocket\r\n"
headers = headers.."Connection: Upgrade\r\n"
headers = headers.."Sec-WebSocket-Version: 7\r\n"
headers = headers.."Sec-Websocket-Key: "..sec_websocket_accept(generate_key()).."\r\n" --qRuMdykMYGEyIrjwimgOGL79D68=\r\n"
headers = headers.."Host: "..host.."\r\n"
headers = headers.."Origin: NodeMCUWebSocketClient\r\n"
headers = headers.."Nodeid: NodeMCU\r\n"

if #add_header > 0 then

end
headers = headers.."\r\n"

print("Handshaking headers: "..headers)

socket:send(headers)


text:
export { UpdownClient } from './client/UpdownClient';

// Ordered as they appear on Updown's API docs

export { getChecks } from './api/getChecks';
export { getCheck } from './api/getCheck';
export { getDowntimes } from './api/getDowntimes';
export { getMetrics } from './api/getMetrics';

export { addCheck } from './api/addCheck';
export { updateCheck } from './api/updateCheck';
export { deleteCheck } from './api/deleteCheck';

export { getNodes, getIpv4Nodes, getIpv6Nodes } from './api/getNodes';

export { getWebhooks } from './api/getWebhooks';
export { addWebhook } from './api/addWebhook';
export { deleteWebhook } from './api/deleteWebhook';


text:
/**
 */
package tosca.provider;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EStructuralFeature;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;

import tosca.TPlan;
import tosca.ToscaFactory;
import tosca.ToscaPackage;

/**
 * This is the item provider adapter for a {@link tosca.TPlan} object.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public class TPlanItemProvider extends TExtensibleElementsItemProvider {
	/**
	 * This constructs an instance from a factory and a notifier.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public TPlanItemProvider(AdapterFactory adapterFactory) {
		super(adapterFactory);
	}

	/**
	 * This returns the property descriptors for the adapted class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
		if (itemPropertyDescriptors == null) {
			super.getPropertyDescriptors(object);

			addIdPropertyDescriptor(object);
			addNamePropertyDescriptor(object);
			addPlanLanguagePropertyDescriptor(object);
			addPlanTypePropertyDescriptor(object);
		}
		return itemPropertyDescriptors;
	}

	/**
	 * This adds a property descriptor for the Id feature.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void addIdPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add
			(createItemPropertyDescriptor
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
				 getResourceLocator(),
				 getString("_UI_TPlan_id_feature"),
				 getString("_UI_PropertyDescriptor_description", "_UI_TPlan_id_feature", "_UI_TPlan_type"),
				 ToscaPackage.Literals.TPLAN__ID,
				 true,
				 false,
				 false,
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
				 null,
				 null));
	}

	/**
	 * This adds a property descriptor for the Name feature.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void addNamePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add
			(createItemPropertyDescriptor
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
				 getResourceLocator(),
				 getString("_UI_TPlan_name_feature"),
				 getString("_UI_PropertyDescriptor_description", "_UI_TPlan_name_feature", "_UI_TPlan_type"),
				 ToscaPackage.Literals.TPLAN__NAME,
				 true,
				 false,
				 false,
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
				 null,
				 null));
	}

	/**
	 * This adds a property descriptor for the Plan Language feature.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void addPlanLanguagePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add
			(createItemPropertyDescriptor
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
				 getResourceLocator(),
				 getString("_UI_TPlan_planLanguage_feature"),
				 getString("_UI_PropertyDescriptor_description", "_UI_TPlan_planLanguage_feature", "_UI_TPlan_type"),
				 ToscaPackage.Literals.TPLAN__PLAN_LANGUAGE,
				 true,
				 false,
				 false,
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
				 null,
				 null));
	}

	/**
	 * This adds a property descriptor for the Plan Type feature.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected void addPlanTypePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add
			(createItemPropertyDescriptor
				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
				 getResourceLocator(),
				 getString("_UI_TPlan_planType_feature"),
				 getString("_UI_PropertyDescriptor_description", "_UI_TPlan_planType_feature", "_UI_TPlan_type"),
				 ToscaPackage.Literals.TPLAN__PLAN_TYPE,
				 true,
				 false,
				 false,
				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
				 null,
				 null));
	}

	/**
	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
		if (childrenFeatures == null) {
			super.getChildrenFeatures(object);
			childrenFeatures.add(ToscaPackage.Literals.TPLAN__PRECONDITION);
			childrenFeatures.add(ToscaPackage.Literals.TPLAN__INPUT_PARAMETERS);
			childrenFeatures.add(ToscaPackage.Literals.TPLAN__OUTPUT_PARAMETERS);
			childrenFeatures.add(ToscaPackage.Literals.TPLAN__PLAN_MODEL);
			childrenFeatures.add(ToscaPackage.Literals.TPLAN__PLAN_MODEL_REFERENCE);
		}
		return childrenFeatures;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EStructuralFeature getChildFeature(Object object, Object child) {
		// Check the type of the specified child object and return the proper feature to use for
		// adding (see {@link AddCommand}) it as a child.

		return super.getChildFeature(object, child);
	}

	/**
	 * This returns TPlan.gif.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object getImage(Object object) {
		return overlayImage(object, getResourceLocator().getImage("full/obj16/TPlan"));
	}

	/**
	 * This returns the label text for the adapted class.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String getText(Object object) {
		String label = ((TPlan)object).getName();
		return label == null || label.length() == 0 ?
			getString("_UI_TPlan_type") :
			getString("_UI_TPlan_type") + " " + label;
	}

	/**
	 * This handles model notifications by calling {@link #updateChildren} to update any cached
	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void notifyChanged(Notification notification) {
		updateChildren(notification);

		switch (notification.getFeatureID(TPlan.class)) {
			case ToscaPackage.TPLAN__ID:
			case ToscaPackage.TPLAN__NAME:
			case ToscaPackage.TPLAN__PLAN_LANGUAGE:
			case ToscaPackage.TPLAN__PLAN_TYPE:
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
				return;
			case ToscaPackage.TPLAN__PRECONDITION:
			case ToscaPackage.TPLAN__INPUT_PARAMETERS:
			case ToscaPackage.TPLAN__OUTPUT_PARAMETERS:
			case ToscaPackage.TPLAN__PLAN_MODEL:
			case ToscaPackage.TPLAN__PLAN_MODEL_REFERENCE:
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
				return;
		}
		super.notifyChanged(notification);
	}

	/**
	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
	 * that can be created under this object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
		super.collectNewChildDescriptors(newChildDescriptors, object);

		newChildDescriptors.add
			(createChildParameter
				(ToscaPackage.Literals.TPLAN__PRECONDITION,
				 ToscaFactory.eINSTANCE.createTCondition()));

		newChildDescriptors.add
			(createChildParameter
				(ToscaPackage.Literals.TPLAN__INPUT_PARAMETERS,
				 ToscaFactory.eINSTANCE.createInputParametersType()));

		newChildDescriptors.add
			(createChildParameter
				(ToscaPackage.Literals.TPLAN__OUTPUT_PARAMETERS,
				 ToscaFactory.eINSTANCE.createOutputParametersType()));

		newChildDescriptors.add
			(createChildParameter
				(ToscaPackage.Literals.TPLAN__PLAN_MODEL,
				 ToscaFactory.eINSTANCE.createPlanModelType()));

		newChildDescriptors.add
			(createChildParameter
				(ToscaPackage.Literals.TPLAN__PLAN_MODEL_REFERENCE,
				 ToscaFactory.eINSTANCE.createPlanModelReferenceType()));
	}

}


text:
 **This chart is deprecated! You can find the new chart in:**
 - **Source:** https://github.com/keel-hq/keel/tree/master/chart/keel
 - **Charts repository:** https://charts.keel.sh

* Website [https://keel.sh](https://keel.sh)
* User Guide [https://keel.sh/user-guide/](https://keel.sh/user-guide/)

Keel is a tool for automating [Kubernetes](https://kubernetes.io/) deployment updates. Keel is stateless, robust and lightweight.

Keel provides several key features:

* __[Kubernetes](https://kubernetes.io/) and [Helm](https://helm.sh) providers__ - Keel has direct integrations with Kubernetes and Helm.

* __No CLI/API__ - tired of `***ctl` for everything? Keel doesn't have one. Gets job done through labels, annotations, charts.

* __Semver policies__ - specify update policy for each deployment/Helm release individually.

* __Automatic [Google Container Registry](https://cloud.google.com/container-registry/) configuration__ - Keel automatically sets up topic and subscriptions for your deployment images by periodically scanning your environment.

* __[Native, DockerHub and Quay webhooks](https://keel.sh/user-guide/triggers/#webhooks) support__ -  once webhook is received impacted deployments will be identified and updated.

*  __[Polling](https://keel.sh/user-guide/#polling-deployment-example)__ - when webhooks and pubsub aren't available - Keel can still be useful by checking Docker Registry for new tags (if current tag is semver) or same tag SHA digest change (ie: `latest`).

* __Notifications__ - out of the box Keel has Slack and standard webhook notifications, more info [here](https://keel.sh/user-guide/#notifications)

**Note**: For now Keel gets installed into `kube-system` _namespace_ by default as where Helm's `Tiller` is installed.

## Installing the Chart with Kubernetes provider support

Docker image _polling_ and _Kubernetes_ provider are set by default, then Kubernetes _deployments_ can be upgraded when new Docker image is available:

```console
helm upgrade --install keel stable/keel"
```

## Installing the Chart with Helm provider support

Docker image _polling_ is set by default, but we need to enable _Helm provider_ support, then Helm _releases_ can be upgraded when new Docker image is available:

```console
helm upgrade --install keel stable/keel --set helmProvider.enabled="true"
```

### Setting up Helm release to be automatically updated by Keel

Add the following to your app's `values.yaml` file and do `helm upgrade ...`:

```
keel:
  # keel policy (all/major/minor/patch/force)
  policy: all
  # trigger type, defaults to events such as pubsub, webhooks
  trigger: poll
  # polling schedule
  pollSchedule: "@every 3m"
  # images to track and update
  images:
    - repository: image.repository # it must be the same names as your app's values
      tag: image.tag # it must be the same names as your app's values
```

The same can be applied with `--set` flag without using `values.yaml` file:

```
helm upgrade --install whd webhookdemo --reuse-values \
  --set keel.policy="all",keel.trigger="poll",keel.pollSchedule="@every 3m" \
  --set keel.images[0].repository="image.repository" \
  --set keel.images[0].tag="image.tag"
```

You can read in more details about supported policies, triggers and etc in the [User Guide](https://keel.sh/user-guide/).

Also you should check the [Webhooh demo app](https://github.com/webhookrelay/webhook-demo) and it's chart to have more clear
idea how to set automatic updates.

## Uninstalling the Chart

To uninstall/delete the `keel` deployment:

```console
$ helm delete keel
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists has the main configurable parameters (polling, triggers, notifications, service) of the _Keel_ chart and they apply to both Kubernetes and Helm providers:

| Parameter                         | Description                            | Default                                                   |
| --------------------------------- | -------------------------------------- | --------------------------------------------------------- |
| `polling.enabled`                 | Docker registries polling              | `true`                                                    |
| `helmProvider.enabled`            | Enable/disable Helm provider           | `false`                                                   |
| `gcr.enabled`                     | Enable/disable GCR Registry            | `false`                                                   |
| `gcr.projectID`                   | GCP Project ID GCR belongs to          |                                                           |
| `gcr.pubsub.enabled`              | Enable/disable GCP Pub/Sub trigger     | `false`                                                   |
| `webhook.enabled`                 | Enable/disable Webhook Notification    | `false`                                                   |
| `webhook.endpoint`                | Remote webhook endpoint                |                                                           |
| `slack.enabled`                   | Enable/disable Slack Notification      | `false`                                                   |
| `slack.token`                     | Slack token                            |                                                           |
| `slack.channel`                   | Slack channel                          |                                                           |
| `slack.approvalChannel`           | Slack approval channel                 |                                                           |
| `slack.botName`                   | Slack Bot name                         |                                                           |
| `service.enable`                  | Enable/disable Keel service            | `false`                                                   |
| `service.type`                    | Keel service type                      | `LoadBalancer`                                            |
| `service.externalPort`            | Keel service port                      | `9300`                                                    |
| `webhookRelay.enabled`            | Enable/disable WebhookRelay integration| `false`                                                   |
| `webhookRelay.key`                | WebhookRelay key                       |                                                           |
| `webhookRelay.secret`             | WebhookRelay secret                    |                                                           |
| `webhookRelay.bucket`             | WebhookRelay bucket                    |                                                           |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

```console
$ helm install --name keel -f values.yaml stable/keel
```
> **Tip**: You can use the default [values.yaml](values.yaml)


text:
<?php

class LoginView{

	private $m_controllerName = "LoginController";

	private $m_cookieUsername = "Username";
	private $m_cookiePassword = "Password";

	private $m_postLogout = "logout";
	private $m_postPassword = "password";
	private $m_postUsername = "username";
	private $m_postLogin = "login";
	private $m_postRemember = "remember";

	private $m_username = "";
	private $m_password = "";

	// Static variable for cookie timer. (1800 = 30minutes.)
	private static $m_cookieTimer = 1800;

	/**
	 * Get username
	 */
	public function getUserName() {
		if(isset($_POST[$this->m_postUsername])) {
			return $_POST[$this->m_postUsername];
		}
		return NULL;
	}

	/**
	 * Get password
	 */
	public function getPassword() {
  		if(isset( $_POST[$this->m_postPassword])) {
			return $_POST[$this->m_postPassword];
  		}
  		return NULL;
	}

	/**
	 * Did a user try to login?
	 */
	public function triedToLogin() {
		return isset($_POST[$this->m_postLogin]);
	}

	/**
	 * User tried to logout?
	 */
	public function triedToLogout() {
  		return isset($_POST[$this->m_postLogout]);
	}

	/**
	 * Remember me checkbox checked?
	 */
	public function triedToRememberUser() {
		return isset($_POST[$this->m_postRemember]);
	}

	/**
	 * Set a cookie with the Username, Password.
	 */
	public function userToRemember($username, $password) {
		setcookie($this->m_cookieUsername, $username, time() + self::$m_cookieTimer);
		setcookie($this->m_cookiePassword, $password, time() + self::$m_cookieTimer);
	}

	/**
	 * Removes the cookie for Username, Password.
	 */
	public function forgetUser() {
		setcookie($this->m_cookieUsername, "", time() - self::$m_cookieTimer);
		setcookie($this->m_cookiePassword, "", time() - self::$m_cookieTimer);
	}

	/**
	 * Generate HTMLcode to a user who is logged in
	 *
	 * @return HTML CODE
	 */
	public function doLogoutPart() {

		// Returns a logout button.
	    return array(
	    		'header' => "

Christoffers Filuppladdning

	    		",
	    		'left' => "
			    <form method='post' action='index.php'>
			    	<input type='submit' name='$this->m_postLogout' class='btn btn-large' value='Logga Ut'>
		    	</form>
			    ",
			   'right' => "

		    		<button type=\"button\" id=\"loginFormClose\" data-dismiss=\"alert\" class=\"close\">×</button>

Du är inloggad.

	    ");
	}

  	/**
	 * Generate HTMLcode to a user who ain't logged in.
	 *
	 * @return HTML CODE
	 */
	public function doLoginPart() {

		// Check if there's a cookie if there's a cookie load the login form with data for Username, Password.
		$this->m_username = isset($_COOKIE[$this->m_cookieUsername]) ? $_COOKIE[$this->m_cookieUsername] : "";
		$this->m_password = isset($_COOKIE[$this->m_cookiePassword]) ? $_COOKIE[$this->m_cookiePassword] : "";

		// Returns a login box.
	    return array(
    				'header' => "

Christoffers Filuppladdning

	    			",
	    			'left' => "
	    			<button id=\"loginShowButton\" class=\"btn btn-large\">Logga in</button>

	    				<button type=\"button\" id=\"loginFormClose\" class=\"close\">×</button>
					    <form class=\"form-horizontal\" method=\"POST\" action=\"index.php\">
							m_postUsername\">Användarnamn
							<input type=\"text\" value=\"$this->m_username\" placeholder=\"Användarnamn\" name=\"$this->m_postUsername\" id=\"$this->m_postUsername\" />
							m_postPassword\">Lösenord
							<input type=\"password\" value=\"$this->m_password\" placeholder=\"Lösenord\" name=\"$this->m_postPassword\" id=\"$this->m_postPassword\" />

							m_postRemember\">Kom ihåg mig
							<input type=\"checkbox\" name=\"$this->m_postRemember\" id=\"$this->m_postRemember\">

							<input type=\"submit\" id=\"login\" name=\"$this->m_postLogin\" class=\"btn btn-small\" value=\"Logga In\"/>
						</form>

					",
					'right' => "

Du behöver logga in för att se mer information.

					");
	}

	/**
	 * Generate HTMLcode for a errorList.
	 * Takes a array of errors as param.
	 *
	 * @return $errorBox HTML CODE
	 */
	public function doErrorList($error) {
		if($error != ""){

			// Påbörja row, span4, alert alert-error.
			$errorBox = "

							" . $error . "

";
			return $errorBox;
		}
		return null;
	}
}


text:
using System.Collections.ObjectModel;
using Famoser.OfflineMedia.Business.Models.NewsModel.ContentModels.TextModels;
using Famoser.SqliteWrapper.Attributes;

namespace Famoser.OfflineMedia.Business.Models.NewsModel.ContentModels
{
    public class TextContentModel : BaseContentModel
    {
        [EntityMap]
        public string ContentJson { get; set; }
        public ObservableCollection<ParagraphModel> Content { get; set; }
    }
}


text:
#include "webrtc/media/base/cpuid.h"

#include <iostream>

#include "webrtc/base/basictypes.h"
#include "webrtc/base/gunit.h"
#include "webrtc/base/systeminfo.h"

TEST(CpuInfoTest, CpuId) {
  LOG(LS_INFO) << "ARM: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasARM);
  LOG(LS_INFO) << "NEON: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasNEON);
  LOG(LS_INFO) << "X86: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasX86);
  LOG(LS_INFO) << "SSE2: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSE2);
  LOG(LS_INFO) << "SSSE3: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSSE3);
  LOG(LS_INFO) << "SSE41: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSE41);
  LOG(LS_INFO) << "SSE42: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSE42);
  LOG(LS_INFO) << "AVX: "
      << cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasAVX);
  bool has_arm = cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasARM);
  bool has_x86 = cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasX86);
  EXPECT_FALSE(has_arm && has_x86);
}

TEST(CpuInfoTest, IsCoreIOrBetter) {
  bool core_i_or_better = cricket::IsCoreIOrBetter();
  // Tests the function is callable.  Run on known hardware to confirm.
  LOG(LS_INFO) << "IsCoreIOrBetter: " << core_i_or_better;

  // All Core I CPUs have SSE 4.1.
  if (core_i_or_better) {
    EXPECT_TRUE(cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSE41));
    EXPECT_TRUE(cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSSE3));
  }

  // All CPUs that lack SSE 4.1 are not Core I CPUs.
  if (!cricket::CpuInfo::TestCpuFlag(cricket::CpuInfo::kCpuHasSSE41)) {
    EXPECT_FALSE(core_i_or_better);
  }
}


text:
package com.citrix.netscaler.nitro.resource.config.wi;

import com.citrix.netscaler.nitro.resource.base.*;
import com.citrix.netscaler.nitro.service.nitro_service;
import com.citrix.netscaler.nitro.service.options;
import com.citrix.netscaler.nitro.util.*;
import com.citrix.netscaler.nitro.exception.nitro_exception;

class wipackage_response extends base_response
{
	public wipackage wipackage;
}
/**
* Configuration for Web Interface resource.
*/

public class wipackage extends base_resource
{
	private String jre;
	private String wi;
	private String maxsites;

	/**
	*

	* Complete path to the JRE tar file.
You can use the Diablo Latte JRE version 1.6.0-7 for 64-bit FreeBSD 6.x/amd64 platform available on the FreeBSD Foundation web site.
Alternatively, you can use OpenJDK6 package for FreeBSD 6.x/amd63.The Java package can be downloaded from http://ftp.riken.jp/pub/FreeBSD/ports/amd64/packages-6-stable/java/openjdk6-b17_2.tbz or http://www.freebsdfoundation.org/cgi-bin/download?download=diablo-jdk-freebsd6.amd64.1.6.0.07.02.tbz.
 Default value: "file://tmp/diablo-jdk-freebsd6.amd64.1.6.0.07.02.tbz"
 Minimum length =  1
 Maximum length =  255
	*

	*/
	public void set_jre(String jre) throws Exception{
		this.jre = jre;
	}

	/**
	*

	* Complete path to the JRE tar file.
You can use the Diablo Latte JRE version 1.6.0-7 for 64-bit FreeBSD 6.x/amd64 platform available on the FreeBSD Foundation web site.
Alternatively, you can use OpenJDK6 package for FreeBSD 6.x/amd63.The Java package can be downloaded from http://ftp.riken.jp/pub/FreeBSD/ports/amd64/packages-6-stable/java/openjdk6-b17_2.tbz or http://www.freebsdfoundation.org/cgi-bin/download?download=diablo-jdk-freebsd6.amd64.1.6.0.07.02.tbz.
 Default value: "file://tmp/diablo-jdk-freebsd6.amd64.1.6.0.07.02.tbz"
 Minimum length =  1
 Maximum length =  255
	*

	*/
	public String get_jre() throws Exception {
		return this.jre;
	}

	/**
	*

	* Complete path to the Web Interface tar file for installing the Web Interface on the NetScaler appliance. This file includes Apache Tomcat Web server. The file name has the following format: nswi-<version number>.tgz (for example, nswi-1.5.tgz).
 Default value: "http://citrix.com/downloads/nswi-1.7.tgz"
 Minimum length =  1
 Maximum length =  255
	*

	*/
	public void set_wi(String wi) throws Exception{
		this.wi = wi;
	}

	/**
	*

	* Complete path to the Web Interface tar file for installing the Web Interface on the NetScaler appliance. This file includes Apache Tomcat Web server. The file name has the following format: nswi-<version number>.tgz (for example, nswi-1.5.tgz).
 Default value: "http://citrix.com/downloads/nswi-1.7.tgz"
 Minimum length =  1
 Maximum length =  255
	*

	*/
	public String get_wi() throws Exception {
		return this.wi;
	}

	/**
	*

	* Maximum number of Web Interface sites that can be created on the NetScaler appliance; changes the amount of RAM reserved for Web Interface usage; changing its value results in restart of Tomcat server and invalidates any existing Web Interface sessions.
 Possible values = 3, 25, 50, 100, 200, 500
	*

	*/
	public void set_maxsites(String maxsites) throws Exception{
		this.maxsites = maxsites;
	}

	/**
	*

	* Maximum number of Web Interface sites that can be created on the NetScaler appliance; changes the amount of RAM reserved for Web Interface usage; changing its value results in restart of Tomcat server and invalidates any existing Web Interface sessions.
 Possible values = 3, 25, 50, 100, 200, 500
	*

	*/
	public String get_maxsites() throws Exception {
		return this.maxsites;
	}

	/**
	*

	* converts nitro response into object and returns the object array in case of get request.
	*

	*/
	protected base_resource[] get_nitro_response(nitro_service service, String response) throws Exception {
		wipackage[] resources = new wipackage[1];
		wipackage_response result = (wipackage_response) service.get_payload_formatter().string_to_resource(wipackage_response.class, response);
		if(result.errorcode != 0) {
			if (result.errorcode == 444) {
				service.clear_session();
			}
			if(result.severity != null)
			{
				if (result.severity.equals("ERROR"))
					throw new nitro_exception(result.message,result.errorcode);
			}
			else
			{
				throw new nitro_exception(result.message,result.errorcode);
			}
		}
		resources[0] = result.wipackage;
		return resources;
	}

	/**
	*

	* Returns the value of object identifier argument
	*

	*/

	protected String get_object_name() {
		return null;
	}

	/**
	* Use this API to Install wipackage.
	*/
	public static base_response Install(nitro_service client, wipackage resource) throws Exception {
		wipackage Installresource = new wipackage();
		Installresource.jre = resource.jre;
		Installresource.wi = resource.wi;
		Installresource.maxsites = resource.maxsites;
		return Installresource.perform_operation(client);
	}

	public static class maxsitesEnum {
		public static final String _3 = "3";
		public static final String _25 = "25";
		public static final String _50 = "50";
		public static final String _100 = "100";
		public static final String _200 = "200";
		public static final String _500 = "500";
	}
}


text:
<?php

namespace Kendo\KendoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    public function indexAction()
    {
        $name = 'Maurice';
        return $this->render('KendoBundle:Default:index.html.twig', array('name' => $name));
    }
}


text:
package com.liuhe.utils;

import android.os.Handler;
import android.os.Message;

import java.lang.ref.WeakReference;

/**
 * hanlder操作工具类
 * <p>
 * 使用说明:
 * 在Activity或者Activity内部持有类中实现该接口,不要使用匿名类,可能会被GC,即:
 * HandlerHolder handlerHolder = new HandlerUtils.HandlerHolder(this);
 * </p>
 *
 * @author liuhea
 * @date 2016/12/30
 *
 */
public class HandlerUtils {

    private HandlerUtils() {
        throw new UnsupportedOperationException("you can't instantiate me.");
    }

    public static class HandlerHolder extends Handler {
        WeakReference<OnReceiveMessageListener> mListenerWeakReference;

        /**
         * @param listener 收到消息回调接口
         */
        public HandlerHolder(OnReceiveMessageListener listener) {
            mListenerWeakReference = new WeakReference<>(listener);
        }

        @Override
        public void handleMessage(Message msg) {
            if (mListenerWeakReference != null && mListenerWeakReference.get() != null) {
                mListenerWeakReference.get().handlerMessage(msg);
            }
        }
    }

    /**
     * 收到消息回调接口
     */
    public interface OnReceiveMessageListener {
        void handlerMessage(Message msg);
    }
}


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#ifndef SCHEMASERIALIZER_H
#define SCHEMASERIALIZER_H

#include "schema.h"
#include "azure_c_shared_utility/strings.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SCHEMA_SERIALIZER_RESULT_VALUES    \
    SCHEMA_SERIALIZER_OK,            \
    SCHEMA_SERIALIZER_INVALID_ARG,  \
    SCHEMA_SERIALIZER_ERROR

MU_DEFINE_ENUM_WITHOUT_INVALID(SCHEMA_SERIALIZER_RESULT, SCHEMA_SERIALIZER_RESULT_VALUES)

extern SCHEMA_SERIALIZER_RESULT SchemaSerializer_SerializeCommandMetadata(SCHEMA_MODEL_TYPE_HANDLE modelHandle, STRING_HANDLE schemaText);

#ifdef __cplusplus
}
#endif

#endif /* SCHEMASERIALIZER_H */


text:
use anyhow::Result;
use log::debug;

use crate::{
    arch::Arch,
    aspace::AddressSpace,
    loader::{pe, pe::PE},
    module::Permissions,
    VA,
};

pub fn find_pe_safeseh_handlers(pe: &PE) -> Result<Vec<VA>> {
    let mut ret = vec![];

    if let Ok(Some(load_config_directory)) = pe.get_data_directory(pe::IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG) {
        debug!("load config directory: {:#x}", load_config_directory.address);

        // offsets defined here:
        // https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#load-configuration-directory

        // according to IDA, the first DWORD is `Size` not `Characteristics` (unused).
        let size = pe.module.address_space.read_u32(load_config_directory.address)?;

        // max offset into the config directory that we'll read.
        let max_config_directory_offset = match pe.module.arch {
            // CFG flags
            Arch::X32 => 0x48,
            Arch::X64 => 0x70,
        };

        if max_config_directory_offset > size {
            debug!("no SafeSEH table: load config directory too small");
            return Ok(ret);
        }

        let sehandler_table_va: VA = match pe.module.arch {
            Arch::X32 => pe.module.read_va_at_va(load_config_directory.address + 0x40)?,
            Arch::X64 => pe.module.read_va_at_va(load_config_directory.address + 0x60)?,
        };
        if sehandler_table_va == 0 {
            debug!("SafeSEH table empty");
            return Ok(ret);
        };
        debug!("SafeSEH table: {:#x}", sehandler_table_va);

        let sehandler_table_count = match pe.module.arch {
            Arch::X32 => pe.module.address_space.read_u32(load_config_directory.address + 0x44)? as u64,
            Arch::X64 => pe.module.address_space.read_u64(load_config_directory.address + 0x68)? as u64,
        };
        debug!("SafeSEH table count: {:#x}", sehandler_table_count);

        let mut offset = sehandler_table_va;
        for _ in 0..sehandler_table_count {
            let target = pe.module.read_rva_at_va(offset)?;
            let target = target as u64 + pe.module.address_space.base_address;

            if pe.module.probe_va(target, Permissions::X) {
                ret.push(target);
            } else {
                debug!("unexpected non-executable SafeSEH target: {:#x}", target);
                break;
            }
            offset += pe.module.arch.pointer_size() as u64
        }
    }

    Ok(ret)
}

#[cfg(test)]
mod tests {
    use crate::rsrc::*;
    use anyhow::Result;

    #[test]
    fn k32() -> Result<()> {
        let buf = get_buf(Rsrc::K32);
        let pe = crate::loader::pe::PE::from_bytes(&buf)?;

        let fns = crate::analysis::pe::safeseh::find_pe_safeseh_handlers(&pe)?;
        assert_eq!(0, fns.len());

        Ok(())
    }

    #[test]
    fn tiny() -> Result<()> {
        let buf = get_buf(Rsrc::TINY);
        let pe = crate::loader::pe::PE::from_bytes(&buf)?;

        let fns = crate::analysis::pe::safeseh::find_pe_safeseh_handlers(&pe)?;
        assert_eq!(0, fns.len());

        Ok(())
    }

    #[test]
    fn nop() -> Result<()> {
        let buf = get_buf(Rsrc::NOP);
        let pe = crate::loader::pe::PE::from_bytes(&buf)?;

        let fns = crate::analysis::pe::safeseh::find_pe_safeseh_handlers(&pe)?;
        assert_eq!(2, fns.len());

        Ok(())
    }

    #[test]
    fn mimi() -> Result<()> {
        let buf = get_buf(Rsrc::MIMI);
        let pe = crate::loader::pe::PE::from_bytes(&buf)?;

        let fns = crate::analysis::pe::safeseh::find_pe_safeseh_handlers(&pe)?;
        assert_eq!(0, fns.len());

        Ok(())
    }
}


text:
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys

version = __import__('timberwyck').__version__

install_requires = [
    'setuptools',
    'south==0.8.2',
    'Django==1.6.4',
    'django-configurations==0.8',
    'dj-database-url==0.3.0',
    'pylibmc==1.3.0',
    'boto==2.9.5',
    'django-storages==1.1.8',
    'Pillow==2.0.0',
    'django-cache-url==0.8.0',
    'werkzeug==0.9.4',
    'gunicorn==0.17.4',
    'easy-thumbnails==1.2',
    'django-debug-toolbar==1.1',
    'django-extensions==1.3.4',
    'django-braces==1.4.0',
    'django-allauth==0.16.1',
    'django-floppyforms==1.1.1',
    'django-zurb-foundation==5.1.1',
    'django-custom-user==0.4',
]

class Tox(TestCommand):
    def finalize_options(self):
        TestCommand.finalize_options(self)
        self.test_args = []
        self.test_suite = True

    def run_tests(self):
        #import here, cause outside the eggs aren't loaded
        import tox
        errno = tox.cmdline(self.test_args)
        sys.exit(errno)

setup(
    name="timberwyck",
    version=version,
    url='http://github.com/powellc/timberwyck',
    license='BSD',
    platforms=['OS Independent'],
    description="The code that powers timberwyckfarm.com",
    author="Colin Powell",
    author_email='colin.powell@gmail.com',
    packages=find_packages(),
    install_requires=install_requires,
    include_package_data=True,
    zip_safe=False,
    tests_require=['tox'],
    cmdclass={'test': Tox},
    classifiers=[
        'Development Status :: 4 - Beta',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Topic :: Internet :: WWW/HTTP',
        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    ],
    package_dir={
        'timberwyck': 'timberwyck',
        'timberwyck/templates': 'timberwyck/templates',
    },
    entry_points={
        'console_scripts': [
            'timberwyck = timberwyck.manage_timberwyck:main',
        ],
    },
)


text:
title: Telerik.Web.UI.RadMaskedTextBox
description: Telerik.Web.UI.RadMaskedTextBox
slug: Telerik.Web.UI.RadMaskedTextBox
---

# Telerik.Web.UI.RadMaskedTextBox : Telerik.Web.UI.RadInputControl

## Inheritance Hierarchy

* [Telerik.Web.UI.RadInputControl]({%slug Telerik.Web.UI.RadInputControl%})
* *[Telerik.Web.UI.RadMaskedTextBox]({%slug Telerik.Web.UI.RadMaskedTextBox%})*

## Methods

###  blur

Indicating whether RadInputControl loses focus

#### Parameters

#### Returns

`None`

### clear

Clears the client instance of RadInputControl

#### Parameters

#### Returns

`None`

### disable

Disables the client instance of RadInputControl

#### Parameters

#### Returns

`None`

### enable

Enables the client instance of RadInputControl

#### Parameters

#### Returns

`None`

### focus

Indicating whether RadInputControl enter focus

#### Parameters

#### Returns

`None`

### get_allowEmptyEnumerations

Returns true if enumerated mask parts can be set to an empty string

#### Parameters

#### Returns

`Boolean`

### get_autoPostBack

Returns the value of the AutoPostBack property

#### Parameters

#### Returns

`Boolean`

### get_caretPosition

Returns the current position of the caret.

#### Parameters

#### Returns

`Number`

### get_displayFormatPosition

Gets the display format position of the RadMaskedTextBox control

#### Parameters

#### Returns

`Telerik.Web.UI.DisplayFormatPosition`

### get_displayPromptChar

Returns the prompt character that is used when the text box does not have focus

#### Parameters

#### Returns

`String`

### get_displayValue

Gets the value of RadInputControl as it is formatted when the input does not have focus

#### Parameters

#### Returns

`String`

### get_editValue

Gets the value of RadInputControl as it is formatted when the input has focus

#### Parameters

#### Returns

`String`

### get_emptyMessage

Returns the message that appears when the input value is an empty string

#### Parameters

#### Returns

`String`

### get_enabled

Returns true if the input is enabled

#### Parameters

#### Returns

`Boolean`

### get_hideOnBlur

Returns true if the prompt characters and literals are not displayed when the text box is empty and does not have focus

#### Parameters

#### Returns

`Boolean`

### get_invalid

Returns true if the input in error state (riError class is applied)

#### Parameters

#### Returns

`Boolean`

### get_invalidStyleDuration

Gets the invalid style duration of RadInputControl

#### Parameters

#### Returns

`Number`

### get_prompt

Returns the prompt of the RadMaskTextBox control

#### Parameters

#### Returns

`String`

### get_promptChar

Returns the prompt character

#### Parameters

#### Returns

`String`

### get_readOnly

Returns true if the text box is read-only

#### Parameters

#### Returns

`Boolean`

### get_resetCaretOnFocus

Returns a Boolean value indicating if the caret position on the RadMaskedTextBox control should be reset on focus

#### Parameters

#### Returns

`Boolean`

### get_roundNumericRanges

Returns a Boolean value indicating if the numeric ranges of the RadMaskedTextBox control should be rounded

#### Parameters

#### Returns

`Boolean`

### get_selectionOnFocus

Returns the value of the SelectionOnFocus property

#### Parameters

#### Returns

`Telerik.Web.UI.SelectionOnFocus`

### get_showButton

Returns true if the input has an associated image button

#### Parameters

#### Returns

`Boolean`

### get_styles

Returns the InputStyles Client object, which can be used to change the appearance of the input when it is first loaded

#### Parameters

#### Returns

`Array`

### get_textBoxValue

Gets the string that the user typed into the input

#### Parameters

#### Returns

`String`

### get_value

Returns the value of the text box

#### Parameters

#### Returns

`String`

### get_valueWithLiterals

Returns the value of the text box, including the literal characters from the mask

#### Parameters

#### Returns

`String`

### get_valueWithPromptAndLiterals

Returns the value of the text box, including the prompt characters and literal characters from the mask

#### Parameters

#### Returns

`String`

### get_visible

Returns whether the input element is rendered as hidden or not. Does not apply if the control is inside another hidden html element

#### Parameters

#### Returns

`Boolean`

### get_wrapperElement

Gets the DOM element for the DIV wrapper element

#### Parameters

#### Returns

`Element`

### inSelection

Returns true if the value of the text box is selected

#### Parameters

##### e `Object`

#### Returns

`None`

### isEmpty

Returns true if the value of the RadInputControl is empty

#### Parameters

#### Returns

`None`

### isMultiLine

Returns true if the value of the RadInputControl is multi line

#### Parameters

#### Returns

`None`

### isNegative

Returns true if the value of the RadInputControl is a negative number

#### Parameters

#### Returns

`None`

### isReadOnly

Returns true if the value of the RadInputControl is read only

#### Parameters

#### Returns

`None`

### raise_blur

Raises the blur event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_buttonClick

Raises the buttonClick event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_disable

Raises the handler for the mouseOver event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_enable

Raises the enable event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_enumerationChanged

Raises the enumerationChanged event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_error

Raises the error event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_focus

Raises the focus event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_keyPress

Raises the keyPress event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_load

Raises the load event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_mouseOut

Raises the mouseOut event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_mouseOver

Raises the mouseOver event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_moveDown

Raises the moveDown event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_moveUp

Raises the moveUp event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raise_valueChanged

Raises the valueChanged event

#### Parameters

##### newValue `Object`

##### oldValue `Object`

#### Returns

`None`

### raise_valueChanging

Raises the valueChanging event

#### Parameters

##### args `Sys.EventArgs`

#### Returns

`None`

### raisePostBackEvent

Raises the postback event of RadInputControl

#### Parameters

#### Returns

`None`

### repaint

Redraws the client side object on the client

#### Parameters

#### Returns

`None`

### resetCursor

Resets the cursor position

#### Parameters

#### Returns

`None`

### saveClientState

Saves the client state of the RadMaskedTextBox control

#### Parameters

#### Returns

`None`

### selectAllText

Selects all text in the RadInputControl

#### Parameters

#### Returns

`None`

### selectText

Selects the text in the specified range of positions. The first parameter is the start of the range and the second is the end of the range

#### Parameters

##### start `Number`

##### end `Number`

#### Returns

`None`

### set_allowEmptyEnumerations

Sets true if enumerated mask parts can be set to an empty string

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_autoPostBack

Enables or disables postbacks when the user changes the text in the input

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_caretPosition

Sets the position of the caret

#### Parameters

##### position `Number`

#### Returns

`None`

### set_cursorPosition

Sets the cursor position of the RadMaskedTextBox control

#### Parameters

##### position `Number`

#### Returns

`None`

### set_displayFormatPosition

Sets the display format position of the RadMaskedTextBox control

#### Parameters

##### value `Telerik.Web.UI.DisplayFormatPosition`

Possible values are Telerik.Web.UI.DisplayFormatPosition.Left and Telerik.Web.UI.DisplayFormatPosition.Right

#### Returns

`None`

### set_displayPromptChar

Sets the prompt character that is used when the text box does not have focus.

#### Parameters

##### value `String`

#### Returns

`None`

### set_emptyMessage

Sets the message that appears when the input value is an empty string

#### Parameters

##### value `String`

#### Returns

`None`

### set_enabled

Sets true if the input is enabled

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_hideOnBlur

Sets true if the prompt characters and literals are not displayed when the text box is empty and does not have focus

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_invalid

Sets if the input should be in error state (riError class to be applied)

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_invalidStyleDuration

Sets the invalid style duration of RadInputControl

#### Parameters

##### value `Number`

#### Returns

`None`

### set_promptChar

Sets the prompt character

#### Parameters

##### value `String`

#### Returns

`None`

### set_readOnly

Sets true if the text box is read-only

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_resetCaretOnFocus

Accepts a Boolean value indicating if the caret position on the RadMaskedTextBox control should be reset on focus

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_roundNumericRanges

Accepts a Boolean value indicating if the numeric ranges of the RadMaskedTextBox control should be rounded

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_selectionOnFocus

Sets the SelectionOnFocus property

#### Parameters

##### value `Telerik.Web.UI.SelectionOnFocus`

#### Returns

`None`

### set_showButton

Accepts true if the input has an associated image button

#### Parameters

##### value `Boolean`

#### Returns

`None`

### set_styles

Sets the InputStyles Client object, which can be used to change the appearance of the input when it is first loaded

#### Parameters

##### value `Array`

#### Returns

`None`

### set_textBoxValue

Sets the string that the user typed into the input

#### Parameters

##### value `String`

#### Returns

`None`

### set_value

Sets the value of the text box

#### Parameters

##### newValue `String`

#### Returns

`None`

### set_visible

Sets the input element as hidden on the client

#### Parameters

##### value `Boolean`

#### Returns

`None`

### updateCssClass

Updates the css class of RadInputControl

#### Parameters

#### Returns

`None`

### updateCssText

Updates the css text of RadInputControl

#### Parameters

##### styleCssText `String`

#### Returns

`None`

### updateDisplayValue

Updates the display value of RadInputControl

#### Parameters

#### Returns

`None`

### updateHiddenValue

Updates the value of the hidden input field

#### Parameters

#### Returns

`None`

## Events

### valueChanging

Raised after the control loses focus just before a new value has been assigned.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.InputValueChangingEventArgs`
### valueChanged

Raised after the control loses focus when a new value has been assigned.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.InputValueChangedEventArgs`

### disable

Raised when the control is disabled

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### enable

Raised when the control is enabled

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### focus

Raised when the control is focused

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### load

Raised when the control is loaded on the client.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### mouseOver

Raised when the mouse enters the input area.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### mouseOut

Raised when the mouse leaves the input area.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### blur

Raised when the RadInputControl loses focus

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Sys.EventArgs`

### buttonClick

Raised when the user clicks on the button that is associated with the input control

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.InputButtonClickEventArgs`

### moveDown

Raised when the user decreases the value of an enumeration or numeric range mask part.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.MaskedTextBoxEventArgs`

### error

Raised when the user enters an invalid value

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.InputErrorEventArgs`

### moveUp

Raised when the user increases the value of an enumeration or numeric range mask part.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.MaskedTextBoxEventArgs`

### keyPress

Raised when the user presses a key to enter a value.

#### Event Data

##### sender `Telerik.Web.UI.RadMaskedTextBox`

The RadInputControl that raised the event

##### args `Telerik.Web.UI.InputKeyPressEventArgs`


text:
package com.PTGen;

/**
 * This class contains all the settings related to the GL section of the program
 * @author Kolijn Wolfaardt
 * @version 0.1
 * @since 2013-11-29
 */
public class GLSettings
{
	private int windowWidth = 800;
	private int windowHeight = 600;

	public int getWindowWidth() {
		return windowWidth;
	}
	public void setWindowWidth(int windowWidth) {
		this.windowWidth = windowWidth;
	}
	public int getWindowHeight() {
		return windowHeight;
	}
	public void setWindowHeight(int windowHeight) {
		this.windowHeight = windowHeight;
	}

}


text:
class Schoolroom < ApplicationRecord
  validates :maximum_capacity, :amount_resources, :name, :initials, presence: true
  validates :maximum_capacity, :numericality => { :greater_than_or_equal_to => 0 }
  validates :amount_resources, :numericality => { :greater_than_or_equal_to => 0 }
  validate :exist_other_with_this_initials
  validate :exist_other_with_this_name
  has_many :lessons
  belongs_to :campus

  def exist_other_with_this_initials
    @schoolrooms = Schoolroom.all
    unless initials.nil?
    @schoolrooms.each { |s|
      unless s.id == id
        errors.add(:initials, 'Outra sala já possui sigla informada') if s.initials.casecmp(initials) == 0
      end
    }
    end
  end

  def exist_other_with_this_name
    @schoolrooms = Schoolroom.all
    unless name.nil?
    @schoolrooms.each { |s|
      unless s.id == id
        errors.add(:initials, 'Outra sala já possui nome informado') if s.name.casecmp(name) == 0
      end
    }
    end
  end
end


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Opredelitel' gribov roda Mycosphaerella Johans 285 (1979)

#### Original name
Sphaerella tamaricis Hollós

### Remarks
null


text:
<?php

namespace Barryvdh\LaravelIdeHelper;

use phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Context;
use phpDocumentor\Reflection\DocBlock\Tag;
use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag;
use phpDocumentor\Reflection\DocBlock\Tag\ParamTag;
use phpDocumentor\Reflection\DocBlock\Serializer as DocBlockSerializer;

class Method
{
    /** @var \phpDocumentor\Reflection\DocBlock  */
    protected $phpdoc;

    /** @var \ReflectionMethod  */
    protected $method;

    protected $output = '';
    protected $name;
    protected $namespace;
    protected $params = array();
    protected $params_with_default = array();
    protected $interfaces = array();
    protected $return = null;

    /**
     * @param \ReflectionMethod $method
     * @param string $alias
     * @param string $class
     * @param string|null $methodName
     * @param array $interfaces
     */
    public function __construct(\ReflectionMethod $method, $alias, $class, $methodName = null, $interfaces = array())
    {
        $this->method = $method;
        $this->interfaces = $interfaces;
        $this->name = $methodName ?: $method->name;
        $this->namespace = $method->getDeclaringClass()->getNamespaceName();

        //Create a DocBlock and serializer instance
        $this->phpdoc = new DocBlock($method, new Context($this->namespace));

        //Normalize the description and inherit the docs from parents/interfaces
        try {
            $this->normalizeParams($this->phpdoc);
            $this->normalizeReturn($this->phpdoc);
            $this->normalizeDescription($this->phpdoc);
        } catch (\Exception $e) {}

        //Get the parameters, including formatted default values
        $this->getParameters($method);

        //Make the method static
        $this->phpdoc->appendTag(Tag::createInstance('@static', $this->phpdoc));

        //Reference the 'real' function in the declaringclass
        $declaringClass = $method->getDeclaringClass();
        $this->declaringClassName = '\\' . ltrim($declaringClass->name, '\\');
        $this->root = '\\' . ltrim($class->getName(), '\\');
    }

    /**
     * Get the class wherein the function resides
     *
     * @return string
     */
    public function getDeclaringClass()
    {
        return $this->declaringClassName;
    }

    /**
     * Return the class from which this function would be called
     *
     * @return string
     */
    public function getRoot()
    {
        return $this->root;
    }

    /**
     * Get the docblock for this method
     *
     * @param string $prefix
     * @return mixed
     */
    public function getDocComment($prefix = "\t\t")
    {
        $serializer = new DocBlockSerializer(1, $prefix);
        return $serializer->getDocComment($this->phpdoc);
    }

    /**
     * Get the method name
     *
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Get the parameters for this method
     *
     * @param bool $implode Wether to implode the array or not
     * @return string
     */
    public function getParams($implode = true)
    {
        return $implode ? implode(', ', $this->params) : $this->params;
    }

    /**
     * Get the parameters for this method including default values
     *
     * @param bool $implode Wether to implode the array or not
     * @return string
     */
    public function getParamsWithDefault($implode = true)
    {
        return $implode ? implode(', ', $this->params_with_default) : $this->params_with_default;
    }

    /**
     * Get the description and get the inherited docs.
     *
     * @param DocBlock $phpdoc
     */
    protected function normalizeDescription(DocBlock $phpdoc)
    {
        //Get the short + long description from the DocBlock
        $description = $phpdoc->getText();

        //Loop through parents/interfaces, to fill in {@inheritdoc}
        if (strpos($description, '{@inheritdoc}') !== false) {
            $inheritdoc = $this->getInheritDoc($this->method);
            $inheritDescription = $inheritdoc->getText();

            $description = str_replace('{@inheritdoc}', $inheritDescription, $description);
            $phpdoc->setText($description);

            $this->normalizeParams($inheritdoc);
            $this->normalizeReturn($inheritdoc);

            //Add the tags that are inherited
            $inheritTags = $inheritdoc->getTags();
            if ($inheritTags) {
                /** @var Tag $tag */
                foreach ($inheritTags as $tag) {
                    $tag->setDocBlock();
                    $phpdoc->appendTag($tag);
                }
            }
        }
    }

    /**
     * Normalize the parameters
     *
     * @param DocBlock $phpdoc
     */
    protected function normalizeParams(DocBlock $phpdoc)
    {
        //Get the return type and adjust them for beter autocomplete
        $paramTags = $phpdoc->getTagsByName('param');
        if ($paramTags) {
            /** @var ParamTag $tag */
            foreach($paramTags as $tag){
                // Convert the keywords
                $content = $this->convertKeywords($tag->getContent());
                $tag->setContent($content);

                // Get the expanded type and re-set the content
                $content = $tag->getType() . ' ' . $tag->getVariableName() . ' ' . $tag->getDescription();
                $tag->setContent(trim($content));
            }
        }
    }

    /**
     * Normalize the return tag (make full namespace, replace interfaces)
     *
     * @param DocBlock $phpdoc
     */
    protected function normalizeReturn(DocBlock $phpdoc)
    {
        //Get the return type and adjust them for beter autocomplete
        $returnTags = $phpdoc->getTagsByName('return');
        if ($returnTags) {
            /** @var ReturnTag $tag */
            $tag = reset($returnTags);
            // Get the expanded type
            $returnValue = $tag->getType();

            // Replace the interfaces
            foreach($this->interfaces as $interface => $real){
                $returnValue = str_replace($interface, $real, $returnValue);
            }

            // Set the changed content
            $tag->setContent($returnValue . ' ' . $tag->getDescription());
            $this->return = $returnValue;
        }else{
            $this->return = null;
        }
    }

    /**
     * Convert keywwords that are incorrect.
     *
     * @param  string $string
     * @return string
     */
    protected function convertKeywords($string)
    {
        $string = str_replace('\Closure', 'Closure', $string);
        $string = str_replace('Closure', '\Closure', $string);
        $string = str_replace('dynamic', 'mixed', $string);

        return $string;
    }

    /**
     * Should the function return a value?
     *
     * @return bool
     */
    public function shouldReturn()
    {
        if($this->return !== "void" && $this->method->name !== "__construct"){
            return true;
        }

        return false;
    }

    /**
     * Get the parameters and format them correctly
     *
     * @param $method
     * @return array
     */
    public function getParameters($method)
    {
        //Loop through the default values for paremeters, and make the correct output string
        $params = array();
        $paramsWithDefault = array();
        foreach ($method->getParameters() as $param) {
            $paramStr = '$' . $param->getName();
            $params[] = $paramStr;
            if ($param->isOptional()) {
                $default = $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null;
                if (is_bool($default)) {
                    $default = $default ? 'true' : 'false';
                } elseif (is_array($default)) {
                    $default = 'array()';
                } elseif (is_null($default)) {
                    $default = 'null';
                } elseif (is_int($default)) {
                    //$default = $default;
                } elseif (is_resource($default)) {
                    //skip to not fail
                } else {
                    $default = "'" . trim($default) . "'";
                }
                $paramStr .= " = $default";
            }
            $paramsWithDefault[] = $paramStr;
        }

        $this->params = $params;
        $this->params_with_default = $paramsWithDefault;
    }

    /**
     * @param \ReflectionMethod $reflectionMethod
     * @return DocBlock
     */
    protected function getInheritDoc($reflectionMethod)
    {
        $parentClass = $reflectionMethod->getDeclaringClass()->getParentClass();

        //Get either a parent or the interface
        if ($parentClass) {
            $method = $parentClass->getMethod($reflectionMethod->getName());
        } else {
            $method = $reflectionMethod->getPrototype();
        }
        if ($method) {
            $namespace = $method->getDeclaringClass()->getNamespaceName();
            $phpdoc = new DocBlock($method, new Context($namespace));

            if (strpos($phpdoc->getText(), '{@inheritdoc}') !== false) {
                //Not at the end yet, try another parent/interface..
                return $this->getInheritDoc($method);
            } else {
                return $phpdoc;
            }
        }
    }
}


text:
#include "l1_cache_cntlr.h"
#include "l2_cache_cntlr.h"
#include "memory_manager.h"
#include "event.h"

namespace PrL1PrL2DramDirectoryMOSI
{

L1CacheCntlr::L1CacheCntlr(core_id_t core_id,
      MemoryManager* memory_manager,
      UInt32 cache_block_size,
      UInt32 l1_icache_size, UInt32 l1_icache_associativity,
      std::string l1_icache_replacement_policy,
      UInt32 l1_dcache_size, UInt32 l1_dcache_associativity,
      std::string l1_dcache_replacement_policy,
      ShmemPerfModel* shmem_perf_model) :
   m_memory_manager(memory_manager),
   m_l2_cache_cntlr(NULL),
   m_core_id(core_id),
   m_cache_block_size(cache_block_size),
   m_shmem_perf_model(shmem_perf_model)
{
   m_l1_icache = new Cache("L1-I",
         l1_icache_size,
         l1_icache_associativity,
         m_cache_block_size,
         l1_icache_replacement_policy,
         CacheBase::PR_L1_CACHE);
   m_l1_dcache = new Cache("L1-D",
         l1_dcache_size,
         l1_dcache_associativity,
         m_cache_block_size,
         l1_dcache_replacement_policy,
         CacheBase::PR_L1_CACHE);

   initializeMissStatusMaps();
}

L1CacheCntlr::~L1CacheCntlr()
{
   deinitializeMissStatusMaps();
   delete m_l1_icache;
   delete m_l1_dcache;
}

void
L1CacheCntlr::setL2CacheCntlr(L2CacheCntlr* l2_cache_cntlr)
{
   m_l2_cache_cntlr = l2_cache_cntlr;
}

void
L1CacheCntlr::initializeMissStatusMaps()
{
   m_miss_status_maps.insert(make_pair<MemComponent::component_t, MissStatusMap>
                            (MemComponent::L1_ICACHE, MissStatusMap()));
   m_miss_status_maps.insert(make_pair<MemComponent::component_t, MissStatusMap>
                            (MemComponent::L1_DCACHE, MissStatusMap()));
}

void
L1CacheCntlr::deinitializeMissStatusMaps()
{
   assert(m_miss_status_maps[MemComponent::L1_ICACHE].empty());
   assert(m_miss_status_maps[MemComponent::L1_DCACHE].empty());
}

void
L1CacheCntlr::processMemOpFromCore(
      UInt32 memory_access_id,
      MemComponent::component_t mem_component,
      Core::lock_signal_t lock_signal,
      Core::mem_op_t mem_op_type,
      IntPtr ca_address, UInt32 offset,
      Byte* data_buf, UInt32 data_length,
      bool modeled)
{
   LOG_PRINT("processMemOpFromCore(), lock_signal(%u), mem_op_type(%u), ca_address(0x%x)",
         lock_signal, mem_op_type, ca_address);

   if (lock_signal != Core::UNLOCK)
      acquireLock(mem_component);

   if (operationPermissibleinL1Cache(mem_component,
                                     ca_address, mem_op_type,
                                     modeled, true /* update_cache_counters */))
   {
      // Increment Shared Mem Perf model cycle counts
      // L1 Cache
      getMemoryManager()->incrCycleCount(mem_component, CachePerfModel::ACCESS_CACHE_DATA_AND_TAGS);
      if (mem_op_type == Core::WRITE)
         getMemoryManager()->incrCycleCount(MemComponent::L2_CACHE, CachePerfModel::ACCESS_CACHE_DATA_AND_TAGS);

      accessCache(mem_component, mem_op_type, ca_address, offset, data_buf, data_length);

      if (lock_signal != Core::LOCK)
         releaseLock(mem_component);

      // Complete Cache Operation
      completeMemOpFromCore(memory_access_id);
      return;
   }

   getMemoryManager()->incrCycleCount(mem_component, CachePerfModel::ACCESS_CACHE_TAGS);

   LOG_ASSERT_ERROR(lock_signal != Core::UNLOCK, "Expected to find address(0x%x) in L1 Cache", ca_address);

   m_l2_cache_cntlr->acquireLock();

   ShmemMsg::msg_t shmem_msg_type = getShmemMsgType(mem_op_type);

   if (m_l2_cache_cntlr->processShmemReqFromL1Cache(mem_component, shmem_msg_type, ca_address, modeled))
   {
      m_l2_cache_cntlr->releaseLock();

      // Increment Shared Mem Perf model cycle counts
      // L2 Cache
      getMemoryManager()->incrCycleCount(MemComponent::L2_CACHE, CachePerfModel::ACCESS_CACHE_DATA_AND_TAGS);
      // L1 Cache
      getMemoryManager()->incrCycleCount(mem_component, CachePerfModel::ACCESS_CACHE_DATA_AND_TAGS);

      accessCache(mem_component, mem_op_type, ca_address, offset, data_buf, data_length);

      if (lock_signal != Core::LOCK)
         releaseLock(mem_component);

      // Complete Cache Operation
      completeMemOpFromCore(memory_access_id);
      return;
   }

   // Increment shared mem perf model cycle counts
   getMemoryManager()->incrCycleCount(MemComponent::L2_CACHE, CachePerfModel::ACCESS_CACHE_TAGS);

   m_l2_cache_cntlr->releaseLock();
   releaseLock(mem_component);

   L1MissStatus* l1_miss_status = new L1MissStatus(ca_address,
                                                   memory_access_id,
                                                   lock_signal, mem_op_type,
                                                   offset,
                                                   data_buf, data_length,
                                                   modeled);
   m_miss_status_maps[mem_component].insert(l1_miss_status);

   // Send out a request to the network thread for the cache data
   ShmemMsg shmem_msg(shmem_msg_type, mem_component, MemComponent::L2_CACHE,
         m_core_id, INVALID_CORE_ID, false, ca_address);
   getMemoryManager()->sendMsg(m_core_id, shmem_msg);

   if (Config::getSingleton()->getAccuracyMode() != Config::CYCLE_LEVEL)
   {
      waitForSimThread();
      reprocessMemOpFromCore(mem_component, l1_miss_status);
   }
}

void
L1CacheCntlr::reprocessMemOpFromCore(
      MemComponent::component_t mem_component,
      L1MissStatus* l1_miss_status)
{
   LOG_PRINT("reprocessMemOpFromCore() start");

   if (l1_miss_status->_lock_signal != Core::UNLOCK)
      acquireLock(mem_component);

   if (Config::getSingleton()->getAccuracyMode() != Config::CYCLE_LEVEL)
   {
      // Wake up the sim thread after acquiring the lock
      wakeUpSimThread();
   }

   assert(operationPermissibleinL1Cache(mem_component,
          l1_miss_status->_address, l1_miss_status->_mem_op_type,
          l1_miss_status->_modeled, false /* update_cache_counters */));

   accessCache(mem_component,
               l1_miss_status->_mem_op_type,
               l1_miss_status->_address, l1_miss_status->_offset,
               l1_miss_status->_data_buf, l1_miss_status->_data_length);

   if (l1_miss_status->_lock_signal != Core::LOCK)
      releaseLock(mem_component);

   SInt32 memory_access_id = l1_miss_status->_memory_access_id;
   // Remove the MissStatus structure
   m_miss_status_maps[mem_component].erase(l1_miss_status);
   delete l1_miss_status;

   LOG_PRINT("reprocessMemOpFromCore() end");

   // Complete Cache Operation
   completeMemOpFromCore(memory_access_id);
}

void
L1CacheCntlr::completeMemOpFromCore(UInt32 memory_access_id)
{
   UnstructuredBuffer* event_args = new UnstructuredBuffer();
   (*event_args) << getMemoryManager()->getCore() << memory_access_id;
   EventCompleteCacheAccess* event = new EventCompleteCacheAccess(getShmemPerfModel()->getCycleCount(),
                                                                  event_args);
   Event::processInOrder(event, getMemoryManager()->getCore()->getId(), EventQueue::ORDERED);
}

void
L1CacheCntlr::accessCache(MemComponent::component_t mem_component,
      Core::mem_op_t mem_op_type, IntPtr ca_address, UInt32 offset,
      Byte* data_buf, UInt32 data_length)
{
   Cache* l1_cache = getL1Cache(mem_component);
   switch (mem_op_type)
   {
      case Core::READ:
      case Core::READ_EX:
         l1_cache->accessSingleLine(ca_address + offset, Cache::LOAD, data_buf, data_length);
         break;

      case Core::WRITE:
         l1_cache->accessSingleLine(ca_address + offset, Cache::STORE, data_buf, data_length);
         // Write-through cache - Write the L2 Cache also
         m_l2_cache_cntlr->acquireLock();
         m_l2_cache_cntlr->writeCacheBlock(ca_address, offset, data_buf, data_length);
         m_l2_cache_cntlr->releaseLock();
         break;

      default:
         LOG_PRINT_ERROR("Unsupported Mem Op Type: %u", mem_op_type);
         break;
   }
}

bool
L1CacheCntlr::operationPermissibleinL1Cache(
      MemComponent::component_t mem_component,
      IntPtr address, Core::mem_op_t mem_op_type,
      bool modeled, bool update_cache_counters)
{
   // TODO: Verify why this works
   bool cache_hit = false;
   CacheState::cstate_t cstate = getCacheState(mem_component, address);

   switch (mem_op_type)
   {
      case Core::READ:
         cache_hit = CacheState(cstate).readable();
         break;

      case Core::READ_EX:
      case Core::WRITE:
         cache_hit = CacheState(cstate).writable();
         break;

      default:
         LOG_PRINT_ERROR("Unsupported mem_op_type: %u", mem_op_type);
         break;
   }

   if (modeled && update_cache_counters)
   {
      // Update the Cache Counters
      getL1Cache(mem_component)->updateCounters(cache_hit);
   }

   return cache_hit;
}

void
L1CacheCntlr::insertCacheBlock(MemComponent::component_t mem_component,
      IntPtr address, CacheState::cstate_t cstate, Byte* data_buf,
      bool* eviction_ptr, IntPtr* evict_address_ptr)
{
   __attribute(__unused__) PrL1CacheBlockInfo evict_block_info;
   __attribute(__unused__) Byte evict_buf[getCacheBlockSize()];

   Cache* l1_cache = getL1Cache(mem_component);
   l1_cache->insertSingleLine(address, data_buf,
         eviction_ptr, evict_address_ptr, &evict_block_info, evict_buf);
   setCacheState(mem_component, address, cstate);
}

CacheState::cstate_t
L1CacheCntlr::getCacheState(MemComponent::component_t mem_component, IntPtr address)
{
   Cache* l1_cache = getL1Cache(mem_component);

   PrL1CacheBlockInfo* l1_cache_block_info = (PrL1CacheBlockInfo*) l1_cache->peekSingleLine(address);
   return (l1_cache_block_info == NULL) ? CacheState::INVALID : l1_cache_block_info->getCState();
}

void
L1CacheCntlr::setCacheState(MemComponent::component_t mem_component, IntPtr address, CacheState::cstate_t cstate)
{
   Cache* l1_cache = getL1Cache(mem_component);

   PrL1CacheBlockInfo* l1_cache_block_info = (PrL1CacheBlockInfo*) l1_cache->peekSingleLine(address);
   assert(l1_cache_block_info);

   l1_cache_block_info->setCState(cstate);
}

void
L1CacheCntlr::invalidateCacheBlock(MemComponent::component_t mem_component, IntPtr address)
{
   Cache* l1_cache = getL1Cache(mem_component);

   l1_cache->invalidateSingleLine(address);
}

ShmemMsg::msg_t
L1CacheCntlr::getShmemMsgType(Core::mem_op_t mem_op_type)
{
   switch(mem_op_type)
   {
      case Core::READ:
         return ShmemMsg::SH_REQ;

      case Core::READ_EX:
      case Core::WRITE:
         return ShmemMsg::EX_REQ;

      default:
         LOG_PRINT_ERROR("Unsupported Mem Op Type(%u)", mem_op_type);
         return ShmemMsg::INVALID_MSG_TYPE;
   }
}

Cache*
L1CacheCntlr::getL1Cache(MemComponent::component_t mem_component)
{
   switch(mem_component)
   {
      case MemComponent::L1_ICACHE:
         return m_l1_icache;

      case MemComponent::L1_DCACHE:
         return m_l1_dcache;

      default:
         LOG_PRINT_ERROR("Unrecognized Memory Component(%u)", mem_component);
         return NULL;
   }
}

void
L1CacheCntlr::acquireLock(MemComponent::component_t mem_component)
{
   switch(mem_component)
   {
      case MemComponent::L1_ICACHE:
         m_l1_icache_lock.acquire();
         break;
      case MemComponent::L1_DCACHE:
         m_l1_dcache_lock.acquire();
         break;
      default:
         LOG_PRINT_ERROR("Unrecognized mem_component(%u)", mem_component);
         break;
   }

}

void
L1CacheCntlr::releaseLock(MemComponent::component_t mem_component)
{
   switch(mem_component)
   {
      case MemComponent::L1_ICACHE:
         m_l1_icache_lock.release();
         break;
      case MemComponent::L1_DCACHE:
         m_l1_dcache_lock.release();
         break;
      default:
         LOG_PRINT_ERROR("Unrecognized mem_component(%u)", mem_component);
         break;
   }
}

void
L1CacheCntlr::signalDataReady(MemComponent::component_t mem_component, IntPtr address)
{
   if (Config::getSingleton()->getAccuracyMode() != Config::CYCLE_LEVEL)
   {
      getShmemPerfModel()->setCycleCount(ShmemPerfModel::_APP_THREAD,
            getShmemPerfModel()->getCycleCount());
      wakeUpAppThread();
      waitForAppThread();
   }
   else // (mode == CYCLE_LEVEL)
   {
      L1MissStatus* l1_miss_status = (L1MissStatus*) m_miss_status_maps[mem_component].get(address);
      assert(l1_miss_status);
      reprocessMemOpFromCore(mem_component, l1_miss_status);
   }
}

}


text:
using System;
using System.Globalization;
using System.Threading;

class Expression
{
    static void Main()
    {
        Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
        double n = double.Parse(Console.ReadLine());
        double m = double.Parse(Console.ReadLine());
        double p = double.Parse(Console.ReadLine());
        Console.WriteLine("{0:F6}", ((n * n + 1 / (m * p) + 1337) / (n - 128.523123123 * p)) + Math.Sin(m % 180));
    }
}


text:
const char KDaliNodeName[] = "Name";
const char KDaliNodeId[] = "id";
const char KDaliNodeVisible[] = "visible";
const char KDaliNodePropertiesName[] = "properties";
const char KDaliNodeChildrenName[] = "children";
const char KDaliCameraNodeName[] = "DefaultCamera";
const char KDaliCameraNodeProjectionMatrixNameOld[] = "projection-matrix";
const char KDaliCameraNodeProjectionMatrixName[] = "projectionMatrix";
const char KDaliCameraNodeViewMatrixNameOld[] = "view-matrix";
const char KDaliCameraNodeViewMatrixName[] = "viewMatrix";
const char KDaliCameraNodeAspectRatioNameOld[] = "aspect-ratio";
const char KDaliCameraNodeAspectRatioName[] = "aspectRatio";
const char KDaliNodeWorldMatrixNameOld[] = "world-matrix";
const char KDaliNodeWorldMatrixName[] = "worldMatrix";
const char KDaliNodeSizeName[] = "size";
const char KDaliCmdDumpScene[] = "dump_scene\n";
const char KDaliCmdSetProperties[] = "set_properties";
const char KDaliCmdAnimProperties[] = "anim_properties";
const char KDaliCmdPerformanceMarkersOn[] = "set_marker 127\n";
const char KDaliCmdPerformanceMarkersOff[] = "set_marker 0\n";

#endif // CONSTS_H