text:
package com.haibin.qiaqia.entity;

import com.google.gson.annotations.SerializedName;

/**
 * Created by invinjun on 2016/6/1.
 */

public class User {

    /**
     * message : 登录成功
     * data : {"i_user_login":{"id":3,"phone":"18101050625","password":"E10ADC3949BA59ABBE56E057F20F883E","status":1},"i_user_info":{"id":3,"login_id":3,"phone":"18101050625","name":"小恰","name_image":"http://7xlulo.com1.z0.glb.clouddn.com/moren.png","regedit_time":"2016-06-06 12:13:53","login_time":"2016-06-06 12:13:53"}}
     * code : 200
     */

    @SerializedName("message") private String message;
    /**
     * i_user_login : {"id":3,"phone":"18101050625","password":"E10ADC3949BA59ABBE56E057F20F883E","status":1}
     * i_user_info : {"id":3,"login_id":3,"phone":"18101050625","name":"小恰","name_image":"http://7xlulo.com1.z0.glb.clouddn.com/moren.png","regedit_time":"2016-06-06 12:13:53","login_time":"2016-06-06 12:13:53"}
     */

    @SerializedName("data") private DataEntity data;
    @SerializedName("code") private String code;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public DataEntity getData() {
        return data;
    }

    public void setData(DataEntity data) {
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public static class DataEntity {
        /**
         * id : 3
         * phone : 18101050625
         * password : E10ADC3949BA59ABBE56E057F20F883E
         * status : 1
         */

        @SerializedName("i_user_login") private IUserLoginEntity iUserLogin;
        /**
         * id : 3
         * login_id : 3
         * phone : 18101050625
         * name : 小恰
         * name_image : http://7xlulo.com1.z0.glb.clouddn.com/moren.png
         * regedit_time : 2016-06-06 12:13:53
         * login_time : 2016-06-06 12:13:53
         */

        @SerializedName("i_user_info") private IUserInfoEntity iUserInfo;

        public IUserLoginEntity getIUserLogin() {
            return iUserLogin;
        }

        public void setIUserLogin(IUserLoginEntity iUserLogin) {
            this.iUserLogin = iUserLogin;
        }

        public IUserInfoEntity getIUserInfo() {
            return iUserInfo;
        }

        public void setIUserInfo(IUserInfoEntity iUserInfo) {
            this.iUserInfo = iUserInfo;
        }

        public static class IUserLoginEntity {
            @SerializedName("id") private int id;
            @SerializedName("phone") private String phone;
            @SerializedName("password") private String password;
            @SerializedName("status") private int status;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getPhone() {
                return phone;
            }

            public void setPhone(String phone) {
                this.phone = phone;
            }

            public String getPassword() {
                return password;
            }

            public void setPassword(String password) {
                this.password = password;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }
        }

        public static class IUserInfoEntity {
            @SerializedName("id") private int id;
            @SerializedName("login_id") private int loginId;
            @SerializedName("phone") private String phone;
            @SerializedName("name") private String name;
            @SerializedName("name_image") private String nameImage;
            @SerializedName("regedit_time") private String regeditTime;
            @SerializedName("login_time") private String loginTime;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getLoginId() {
                return loginId;
            }

            public void setLoginId(int loginId) {
                this.loginId = loginId;
            }

            public String getPhone() {
                return phone;
            }

            public void setPhone(String phone) {
                this.phone = phone;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getNameImage() {
                return nameImage;
            }

            public void setNameImage(String nameImage) {
                this.nameImage = nameImage;
            }

            public String getRegeditTime() {
                return regeditTime;
            }

            public void setRegeditTime(String regeditTime) {
                this.regeditTime = regeditTime;
            }

            public String getLoginTime() {
                return loginTime;
            }

            public void setLoginTime(String loginTime) {
                this.loginTime = loginTime;
            }
        }
    }
}


text:
package net.nothinginteresting.vaadin.event.bus;

import com.vaadin.ui.HasComponents;

public interface EventBusOwner extends HasComponents
{
	EventBus getEventBus();
}

redpajama_set_name: RedPajamaGithub


text:
# Promises/A+ Compliance Test Suite

This suite tests compliance of a promise implementation with the [Promises/A+ specification][].

[Promises/A+ specification]: https://github.com/promises-aplus/promises-spec

## How To Run

The tests run in a Node.js environment; make sure you have that installed.

### Adapters

In order to test your promise library, you must expose a very minimal adapter interface. These are written as Node.js
modules with a few well-known exports:

- `fulfilled(value)`: creates a promise that is already fulfilled with `value`.
- `rejected(reason)`: creates a promise that is already rejected with `reason`.
- `pending()`: creates a tuple consisting of `{ promise, fulfill, reject }`:
  - `promise` is a promise object that is currently in the pending state.
  - `fulfill(value)` moves the promise from the pending state to a fulfilled state, with fulfillment value `value`.
  - `reject(reason)` moves the promise from the pending state to the rejected state, with rejection reason `reason`.

The `fulfilled` and `rejected` exports are actually optional, and will be automatically created by the test runner using
`pending` if they are not present. But, if your promise library has the capability to create already-fulfilled or
already-rejected promises, then you should include these exports, so that the test runner can provide you with better
code coverage and uncover any bugs in those methods.

### From the CLI

This package comes with a command-line interface that can be used either by installing it globally with
`npm install promises-aplus-tests -g` or by including it in your `package.json`'s `devDependencies` and using npm's
`scripts` feature. In the latter case, your setup might look something like

```json
{
    "devDependencies": {
        "promises-aplus-tests": "*"
    },
    "scripts": {
        "test": "run-my-own-tests && promises-aplus-tests test/my-adapter"
    }
}
```

The CLI takes as its single argument the filename of your adapter file, relative to the current working directory.

### Programmatically

The main export of this package is a function that allows you to run the tests against an adapter:

```js
var promisesAplusTests = require("promises-aplus-tests");

promisesAplusTests(adapter, function (err) {
    // All done; output is in the console. Or check `err` for number of failures.
});
```


text:
@extends('emails.master_layout')

@section('title')
    {!! $subject !!}
@endsection

@section('content')
    {!! $content !!}
@endsection


text:
layout: post
title: ONGC Gujarat Job posts last date 6th Nov-2015
date: 2015-10-21 14:32
comments: true
tags:  Assistant Engg.-Diploma Gujarat ITI-Apprentice ONGC Online Technical
archive: false
---

ONGC Western Offshore Basin, Vadodara invites online applications for recruitment of young and energetic candidates who registered with Employment Exchanges in the state of Gujarat for following 493 regular technical posts  :

-  A-II Level : 231 posts in the disciplines of Civil, Chemistry, Electronics, Electrical, Instrumentation, Mechanical, Drilling, Production, Boiler, Material Management, Nursing, Security, Pay Scale : Rs. 12000-27000/-
- A-I Level : 254 posts in the disciplines of Chemistry, Geology, Electronics, Electrical, Auto, Diesel, Drilling, Production, Cementing, Welding, Machining, Fitting, Boiler, Account, P&A, Steno, MM, Fire, MVD, Pay Scale : Rs. 11000-24000/-
- W-I : 08 posts in the disciplines of Fireman,  Health Care Attendant, Pay Scale : Rs. 10000 - 18000/-

**How to Apply** : Apply Online at ONGC website from on or before 06/11/2015 only.

Please visit <http://eapplicationonline.com/ongcvj/VIEW/index.aspx> for details and online application format.


text:
echo "Setting now ltb specific settings, getting the libraries (vendor) ready and populating our database"

# create LTB database and user
# echo "Creating LTB database and user..." &&
# LTB_DB_PASSWORD=`docker run --link mysql:mysql learninglayers/mysql-create -p$MYSQL_ROOT_PASSWORD --new-database $LTB_DB_NAME --new-user $LTB_DB_USER | grep "mysql" | awk '{split($0,a," "); print a[3]}' | cut -c3-` &&
# echo " -> done" &&
# echo "" &&

CURRENT_DIR="/home/ltb";
LTB_UNIX_LOG="${LTB_HOME_DIR}/data/ltb_io_debug.log";
echo "What will be the label for the learning toolbox?";
read LEARNINGTOOLBOX_LABEL
# Go to the installer directory
cd $LTB_HOME_DIR;
settings_file=config/autoload/instance.php
sudo chown :www-data data && \
sudo chmod g+w data && \
cp -f config/autoload/instance.php.dist $settings_file && \
sed -i "s#REPLACE:LTB_MYSQL_HOST#$LTB_MYSQL_HOST#g" $settings_file && \
sed -i "s#REPLACE:LTB_DB_NAME#$LTB_DB_NAME#g" $settings_file && \
sed -i "s#REPLACE:LTB_DB_USER#$LTB_DB_USER#g" $settings_file && \
sed -i "s#REPLACE:LTB_DB_PASSWORD#$LTB_DB_PASSWORD#g" $settings_file && \
sed -i "s#REPLACE:LTB_API_URI#$LTB_API_URI#g" $settings_file && \
sed -i "s#REPLACE:LTB_TS_URI#$LTB_TS_URI#g" $settings_file && \
sed -i "s#REPLACE:LTB_HOME_DIR#$LTB_HOME_DIR#g" $settings_file && \
sed -i "s#REPLACE:LTB_UNIX_LOG#$LTB_UNIX_LOG#g" $settings_file && \
sed -i "s#REPLACE:OIDC_URI#$OIDC_URI#g" $settings_file && \
sed -i "s#REPLACE:OIDC_CLIENT#$OIDC_CLIENT#g" $settings_file && \
sed -i "s#REPLACE:OIDC_SECRET#$OIDC_SECRET#g" $settings_file && \
sed -i "s#REPLACE:SSS_URI#http://test-ll.know-center.tugraz.at/ltb-v2/#g" $settings_file && \
sed -i "s#REPLACE:LTB_HOME_DIR#$LTB_API_HOME_DIR#g" /etc/apache2/apache2.conf && \
sed -i "s#REPLACE:LTB_DOC_ROOT#$LTB_API_HOME_DIR#g" /etc/apache2/apache2.conf && \

# ($LTB_VENDOR_AVAILABLE && mv /tmp/vendor /home/LTB-API) || (echo "Starting download of vendor software" && cd /home/LTB-API && php composer.phar install) && \
# Determine whether in this docker context a vendor directory is made available
 if [[ -d ${LTB_HOME_DIR}/vendor ]] && [[ -f "${LTB_HOME_DIR}/vendor.autoload.php" ]]; then
    echo "Vendor files are already there! Will be copied into container";
    LTB_VENDOR_AVAILABLE=1;
   #  cp -rp ${CURRENT_DIR}/vendor .;
else

    echo "Vendor files are not there yet...";

    if [ ! -d ~/.ssh ]; then
        mkdir ~/.ssh;
    fi
    if [ ! -f ~/.ssh/config ]; then
        touch ~/.ssh/config;
    fi
    echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config;
    echo "Starting download of vendor software";
    php composer.phar install;
    echo "Finished installing libraries";
    LTB_VENDOR_AVAILABLE=0;
fi &&
echo "Installing the tables now of the LTB-API" && \
mysql -u $3 --password=$4 -h $1 $2 < data/ltb-api-db.sql && \
echo "Finished installing the LTB-API";


text:
namespace graphene
{
    namespace module
    {
        namespace ctl = controller;

        // --------------------------------------------------------------------
        // Window implementation
        // --------------------------------------------------------------------
        Window::Window(SystemCore& syscore, const Application& app)
            : ctlLoad()
            , ctlShow()
            , ctlDraw()
            , m_impl(syscore.errors, app,
                state::variable<const char*>(syscore, "Window"),
                state::variable<tools::Rect>(syscore, tools::Rect{0, 0, 1024, 768}),
                state::variable<libos::Window::PixelFormat>(
                    syscore, libos::Window::PixelFormat())
            )
        {
            sTitle = m_impl.sTitle;
            sGeometry = m_impl.sGeometry;
            sPixelFormat = m_impl.sPixelFormat;

            ctlShow = ctl::proxy(syscore, m_impl.ctlShow);
            ctlDraw = ctl::proxy(syscore, m_impl.ctlDraw);
            ctlLoad = ctl::call(syscore, tools::func(m_impl.load, &m_impl));
        }

        // --------------------------------------------------------------------
        Window::~Window()
        {
        }

        // --------------------------------------------------------------------
        // WindowImpl implementation
        // --------------------------------------------------------------------
        WindowImpl::WindowImpl(tools::ErrorsStack& errors, const Application& app,
                IState<const char*>* title,
                IState<tools::Rect>* geometry,
                IState<libos::Window::PixelFormat>* pf)
            : sTitle(title)
            , sGeometry(geometry)
            , sPixelFormat(pf)
            , m_core(errors)
            , m_app(app)
        {
        }

        // --------------------------------------------------------------------
        WindowImpl::~WindowImpl()
        {
            WindowImpl::unload(this);
        }

        // --------------------------------------------------------------------
        void WindowImpl::load(WindowImpl* self)
        {
            self->m_window = libos::Window::create(self->m_core.errors,
                self->m_app.sHandle->get(), self->sTitle->get(),
                self->sGeometry->get(), self->sPixelFormat->get());

            printf("WindowImpl::load\n");
            self->m_core.load(tools::StaticStack::make, 128);

            //self->ctlShow = ctl::call(self->m_core, tools::func(WindowImpl::show_window, self));
            //self->ctlDraw = ctl::call(self->m_core, tools::func(WindowImpl::swap_buffers, self));

            self->ctlShow = ctl::call(self->m_core, [self]{ WindowImpl::show_window(self); });
            self->ctlDraw = ctl::call(self->m_core, [self]{ WindowImpl::swap_buffers(self); });
        }

        // --------------------------------------------------------------------
        void WindowImpl::unload(WindowImpl* self)
        {
            libos::Window::destroy(self->m_core.errors,
                    self->m_app.sHandle->get(), self->m_window);

            printf("WindowImpl::unload\n");
            self->m_core.unload();
        }

        // --------------------------------------------------------------------
        void WindowImpl::show_window(WindowImpl* self)
        {
            printf("WindowImpl::ctlShow\n");
            libos::Window::show(self->m_core.errors,
                    self->m_app.sHandle->get(), self->m_window);
        }

        // --------------------------------------------------------------------
        void WindowImpl::swap_buffers(WindowImpl* self)
        {
            libos::Window::swap_buffers(self->m_core.errors,
                    self->m_app.sHandle->get(), self->m_window);
        }

    } // namespace module

} // namespace graphene


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

<rootTag>
  <Award>
    <AwardTitle>Probability and Analysis</AwardTitle>
    <AwardEffectiveDate>12/01/2011</AwardEffectiveDate>
    <AwardExpirationDate>11/30/2013</AwardExpirationDate>
    <AwardAmount>25500</AwardAmount>
    <AwardInstrument>
      <Value>Standard Grant</Value>
    </AwardInstrument>
    <Organization>
      03040000
      <Directorate>
        <LongName>Direct For Mathematical & Physical Scien</LongName>
      </Directorate>
      <Division>
        <LongName>Division Of Mathematical Sciences</LongName>
      </Division>
    </Organization>
    <ProgramOfficer>
      <SignBlockName>Tomek Bartoszynski</SignBlockName>
    </ProgramOfficer>
    <AbstractNarration>This proposal is for support of the US participation in the meeting Probability and Analysis which will be held at the Stefan Banach Mathematical Research and Conference Center of the Institute of Mathematics of the Polish Academy of Sciences located in Bedlewo, Poland on June 10-16, 2012.<br/>The conference will center on a number of topics that lie on the interface of Functional Analysis, Probability, Harmonic Analysis, and applications. The organizers expect about 20-25 participants from USA, out of the anticipated total number of 80-110 participants. This proposal seeks funds to provide partial support for 15-20 US participants, with priority given to graduate students, junior researchers, and, once the needs of those groups are met, to other US participants without sufficient sources of support.</AbstractNarration>
    <MinAmdLetterDate>12/05/2011</MinAmdLetterDate>
    <MaxAmdLetterDate>12/05/2011</MaxAmdLetterDate>
    <ARRAAmount/>
    <AwardID>1140747</AwardID>
    <Investigator>
      <FirstName>Wlodzimierz</FirstName>
      <LastName>Bryc</LastName>
      <EmailAddress>brycw@math.uc.edu</EmailAddress>
      <StartDate>12/05/2011</StartDate>
      <EndDate/>
      <RoleCode>Co-Principal Investigator</RoleCode>
    </Investigator>
    <Investigator>
      <FirstName>Pawel</FirstName>
      <LastName>Hitczenko</LastName>
      <EmailAddress>pawel.hitczenko@drexel.edu</EmailAddress>
      <StartDate>12/05/2011</StartDate>
      <EndDate/>
      <RoleCode>Principal Investigator</RoleCode>
    </Investigator>
    <Institution>
      <Name>Drexel University</Name>
      <CityName>Philadelphia</CityName>
      <ZipCode>191021119</ZipCode>
      <PhoneNumber>2158955849</PhoneNumber>
      <StreetAddress>1505 Race St, 8th Floor</StreetAddress>
      <CountryName>United States</CountryName>
      <StateName>Pennsylvania</StateName>
      <StateCode>PA</StateCode>
    </Institution>
    <ProgramElement>
      1263
      <Text>PROBABILITY</Text>
    </ProgramElement>
    <ProgramElement>
      1281
      <Text>ANALYSIS PROGRAM</Text>
    </ProgramElement>
    <ProgramReference>
      7556
      <Text>CONFERENCE AND WORKSHOPS</Text>
    </ProgramReference>
  </Award>
</rootTag>


text:
import { BaseListener } from '../../types'

export type OnFrameDeletedRecorder = []

/**
 * Called when a frame is deleted
 */
export type Shape = BaseListener<OnFrameDeletedRecorder>


text:
from django.conf.urls import url, include
from django.contrib import admin
from django.core.urlresolvers import reverse
from django.shortcuts import redirect, render

from safety.models import PasswordChange

def home(request):
    return render(request, 'home.html')

def update_password(request):
    if request.user.is_authenticated():
        pr, created = PasswordChange.objects.get_or_create_for_user(request.user)
        pr.required = True
        pr.save()
    return redirect(reverse('home'))

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^account/', include('django.contrib.auth.urls')),
    url(r'^security/', include('safety.urls', namespace='safety')),
    url(r'^update-password/$', update_password, name='update-password'),
    url(r'^$', home, name='home'),
]


text:
package com.kehxstudios.insight.smartRockets;

import com.kehxstudios.insight.tools.Vector2;

/**
 *
 */

public class Barrier {

    public Vector2 position;
    public float width, height;

    public Barrier(float x, float y, float width, float height) {
        position = new Vector2(x,y);
        this.width = width;
        this.height = height;
    }

}


text:
package com.google.common.base;

import com.google.common.annotations.Beta;
import com.google.common.annotations.GwtCompatible;

/**
 * Exception thrown upon the failure of a
 * verification
 * check, including those performed by the convenience methods of the {@link Verify} class.
 *
 * @since 17.0
 */
@Beta
@GwtCompatible
public class VerifyException extends RuntimeException {
  /** Constructs a {@code VerifyException} with no message. */
  public VerifyException() {}

  /** Constructs a {@code VerifyException} with the message {@code message}. */
  public VerifyException(String message) {
    super(message);
  }
}


text:
<?php

namespace rakelley\jhframe\traits\controller;

/**
 * Trait for RouteControllers which have flat html views
 */
trait HasFlatViews
{

    /**
     * Returns namespace of using class, can be resolved with
     * \rakelley\jhframe\traits\GetCalledNamespace
     * @abstract
     */
    abstract protected function getCalledNamespace();

    /**
     * {@inheritdoc}
     * @see \rakelley\jhframe\classes\RouteController::standardView()
     * @abstract
     */
    abstract protected function standardView($name, array $parameters=null,
                                             $cacheable=true);

    /**
     * Default route for RouteControllers to map to for flat views
     *
     * @param  string $route View name, passed by Router
     * @return void
     */
    public function flatView($route)
    {
        $this->serveFlatView($route);
    }

    /**
     * Implementation of call to FlatView.
     * Namespace arg should only be provided if calling a view in a namespace
     * other than the one belonging to the using RouteController.
     *
     * @param  string      $view      View name
     * @param  string|null $namespace Optional override for default namespace
     * @return void
     */
    protected function serveFlatView($view, $namespace=null)
    {
        if (!$namespace) {
            $namespace = $this->getCalledNamespace() . '\views';
        }
        $parameters = ['view' => $view, 'namespace' => $namespace];

        $this->standardView('rakelley\jhframe\classes\FlatView', $parameters);
    }
}


text:
Nesta secção, não iremos lidar com as melhores convenções de nomenclatura para manutenção e escalabilidade; não só isso apenas vos diz respeito, como também está fora do âmbito de um guia de estilo de Sass. Eu sugiro os recomendados por [CSS Guidelines](https://cssguidelin.es/#naming-conventions).

Existem algumas coisas às quais podem dar nome em Sass, e é importante nomeá-las corretamente para que toda a base de código pareça consistente e fácil de ler:

* variáveis;
* funções;
* *mixins*.

*Placeholders* de Sass são deliberadamente omitidos desta lista visto que podem ser considerados selectores normais de CSS, seguindo assim o mesmo padrão de nomenclatura como classes.

Em relação às variáveis, funções e *mixins*, mantemos algo bastante semelhante a CSS: **minúsculas delimitadas por hífens**, e acima de tudo significativos.

{% include snippets/naming/01/index.html %}

### Constantes

Se por acaso são programadores de *frameworks* ou bibliotecas, poderão encontrar-se a lidar com variáveis que não é suposto serem alteradas em qualquer circunstância: constantes. Infelizmente (ou felizmente?), Sass não fornece nenhuma forma de definir tais entidades, por isso temos que ficar pelas rigorosas convenções de nomenclatura de forma a nos darmos a entender.

Tal como para várias linguagens, eu sugiro variáveis em maiúsculas e delimitadas por subtraços (_) quando são constantes. Não só é uma convenção muito antiga, mas também contrasta bem com as habituais variáveis em minúsculas e separadas por hífens.

{% include snippets/naming/02/index.html %}

Se você realmente quer brincar com essas ideias de constantes no Sass, deverias ler [esse artigo dedicado](https://www.sitepoint.com/dealing-constants-sass/).

### Namespace

Se tencionam distribuir o vosso código Sass, no caso de uma biblioteca, uma *framework*, um sistema de grelhas ou o que seja, talvez queiram considerar colocar todas as vossas variáveis, funções, *mixins* e *placeholders* no seu próprio *namespace*, para que não entrem em conflito com o código de alguém.

Por exemplo, se trabalharem num projecto chamado *Sassy Unicorn* que se destina a ser distribuído, poderiam considerar usar `su-` como *namespace*. É específico o suficiente para prevenir colisões de nomes e curto o suficiente para não ser maçador a escrever.

{% include snippets/naming/03/index.html %}

[Kaelig](https://kaelig.fr) tem [um artigo muito perpicaz sobre namespace CSS global](https://blog.kaelig.fr/post/44554267597/please-respect-the-global-css-namespace), no caso deste tópico seja de interesse para você.

De notar que *namespacing* automático é definitivamente um objectivo de design para a próxima reformulação do @import de Sass 4.0. À medida que tal se aproxima da sua concretização, será cada vez menos útil fazer *namespacing* manual; eventualmente, bibliotecas manualmente *namespaced* poderão realmente ser mais difíceis de usar.


text:
namespace ui {
namespace {

const char* kCrtcPropName = "CRTC_ID";
const char* kFbPropName = "FB_ID";
const char* kCrtcXPropName = "CRTC_X";
const char* kCrtcYPropName = "CRTC_Y";
const char* kCrtcWPropName = "CRTC_W";
const char* kCrtcHPropName = "CRTC_H";
const char* kSrcXPropName = "SRC_X";
const char* kSrcYPropName = "SRC_Y";
const char* kSrcWPropName = "SRC_W";
const char* kSrcHPropName = "SRC_H";

}  // namespace

HardwareDisplayPlaneAtomic::Property::Property() {
}

bool HardwareDisplayPlaneAtomic::Property::Initialize(
    DrmDevice* drm,
    const char* name,
    const ScopedDrmObjectPropertyPtr& plane_props) {
  for (uint32_t i = 0; i < plane_props->count_props; i++) {
    ScopedDrmPropertyPtr property(
        drmModeGetProperty(drm->get_fd(), plane_props->props[i]));
    if (property && !strcmp(property->name, name)) {
      id = property->prop_id;
      break;
    }
  }
  if (!id) {
    LOG(ERROR) << "Could not find property " << name;
    return false;
  }
  return true;
}

HardwareDisplayPlaneAtomic::HardwareDisplayPlaneAtomic(uint32_t plane_id,
                                                       uint32_t possible_crtcs)
    : HardwareDisplayPlane(plane_id, possible_crtcs) {
}
HardwareDisplayPlaneAtomic::~HardwareDisplayPlaneAtomic() {
}

bool HardwareDisplayPlaneAtomic::SetPlaneData(drmModePropertySet* property_set,
                                              uint32_t crtc_id,
                                              uint32_t framebuffer,
                                              const gfx::Rect& crtc_rect,
                                              const gfx::Rect& src_rect) {
  int plane_set_error =
      drmModePropertySetAdd(property_set, plane_id_, crtc_prop_.id, crtc_id) ||
      drmModePropertySetAdd(property_set, plane_id_, fb_prop_.id,
                            framebuffer) ||
      drmModePropertySetAdd(property_set, plane_id_, crtc_x_prop_.id,
                            crtc_rect.x()) ||
      drmModePropertySetAdd(property_set, plane_id_, crtc_y_prop_.id,
                            crtc_rect.y()) ||
      drmModePropertySetAdd(property_set, plane_id_, crtc_w_prop_.id,
                            crtc_rect.width()) ||
      drmModePropertySetAdd(property_set, plane_id_, crtc_h_prop_.id,
                            crtc_rect.height()) ||
      drmModePropertySetAdd(property_set, plane_id_, src_x_prop_.id,
                            src_rect.x()) ||
      drmModePropertySetAdd(property_set, plane_id_, src_y_prop_.id,
                            src_rect.x()) ||
      drmModePropertySetAdd(property_set, plane_id_, src_w_prop_.id,
                            src_rect.width()) ||
      drmModePropertySetAdd(property_set, plane_id_, src_h_prop_.id,
                            src_rect.height());
  if (plane_set_error) {
    PLOG(ERROR) << "Failed to set plane data";
    return false;
  }
  return true;
}

bool HardwareDisplayPlaneAtomic::Initialize(DrmDevice* drm) {
  ScopedDrmObjectPropertyPtr plane_props(drmModeObjectGetProperties(
      drm->get_fd(), plane_id_, DRM_MODE_OBJECT_PLANE));

  if (!plane_props) {
    PLOG(ERROR) << "Unable to get plane properties.";
    return false;
  }

  bool props_init = crtc_prop_.Initialize(drm, kCrtcPropName, plane_props) &&
                    fb_prop_.Initialize(drm, kFbPropName, plane_props) &&
                    crtc_x_prop_.Initialize(drm, kCrtcXPropName, plane_props) &&
                    crtc_y_prop_.Initialize(drm, kCrtcYPropName, plane_props) &&
                    crtc_w_prop_.Initialize(drm, kCrtcWPropName, plane_props) &&
                    crtc_h_prop_.Initialize(drm, kCrtcHPropName, plane_props) &&
                    src_x_prop_.Initialize(drm, kSrcXPropName, plane_props) &&
                    src_y_prop_.Initialize(drm, kSrcYPropName, plane_props) &&
                    src_w_prop_.Initialize(drm, kSrcWPropName, plane_props) &&
                    src_h_prop_.Initialize(drm, kSrcHPropName, plane_props);

  if (!props_init) {
    LOG(ERROR) << "Unable to get plane properties.";
    return false;
  }
  return true;
}

}  // namespace ui


text:
import React from 'react';
import { shallow } from 'enzyme';
import { Button } from 'ui/native';

describe('test/app/ui/Button/Native.test.js', () => {
  it('Render: props: { text }', () => {
    const props = {
      text: 'dummyText',
    };

    const wrapper = shallow(<Button {...props} />);
    expect(wrapper).toMatchSnapshot();
  });

  it('Render: props: { primary }', () => {
    const props = {
      text: 'dummyText',
      primary: true,
    };

    const wrapper = shallow(<Button {...props} />);
    expect(wrapper).toMatchSnapshot();
  });

  it('Render: props: { raised }', () => {
    const props = {
      text: 'dummyText',
      raised: true,
    };

    const wrapper = shallow(<Button {...props} />);
    expect(wrapper).toMatchSnapshot();
  });

  it('Render: props: { onPress }', () => {
    const props = {
      text: 'dummyText',
      onPress: jest.fn(() => {}),
    };

    const wrapper = shallow(<Button {...props} />);
    expect(wrapper).toMatchSnapshot();
  });
});


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace NetOffice.DeveloperToolbox.Controls.Text
{
	public partial class Scroller : UserControl
	{
		/// <summary>
		/// String list.
		/// </summary>
		string[] m_text = new string[0];

		/// <summary>
		/// Offset for animation.
		/// </summary>
		int m_scrollingOffset = 0;

		/// <summary>
		/// Top part size of text in percents.
		/// </summary>
		int m_topPartSizePercent = 50;

		/// <summary>
		/// Font, which is used to draw.
		/// </summary>
		Font m_font = new Font("Arial", 20, FontStyle.Bold, GraphicsUnit.Pixel);

		/// <summary>
		/// Constructor
		/// </summary>
		public Scroller()
		{
			InitializeComponent();

			// Enables double buffering (to remove flickering) and enables user paint.
			SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
		}

		/// <summary>
		/// Text to scroll.
		/// </summary>
		public string TextToScroll
		{
			get
			{
				return string.Join("\n", m_text);
			}
			set
			{
				string buffer = value;

				// Splits text by "\n" symbol.
				m_text = buffer.Split(new char[1] { '\n' });
			}
		}

		/// <summary>
		/// Timer interval.
		/// </summary>
		public int Interval
		{
			get
			{
				return m_timer.Interval;
			}
			set
			{
				m_timer.Interval = value;
			}
		}

		/// <summary>
		/// Font, which is used to draw.
		/// </summary>
		public Font TextFont
		{
			get
			{
				return m_font;
			}

			set
			{
				m_font = value;
			}
		}

		/// <summary>
		/// Top part size of text in percents (of control width).
		/// </summary>
		public int TopPartSizePercent
		{
			get
			{
				return m_topPartSizePercent;
			}
			set
			{
				if ((value >= 10) && (value <= 100))
				{
					m_topPartSizePercent = value;
				}
				else
					throw new InvalidEnumArgumentException("The value must be more than zero. and less than 100.");
			}
		}

		/// <summary>
		/// Paint handler.
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void OnPaint(object sender, PaintEventArgs e)
		{
			// Sets antialiasing mode for better quality.
			e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;

			// Prepares background.
			e.Graphics.FillRectangle(new SolidBrush(this.BackColor), this.ClientRectangle);

			// Creates GraphicsPath for text.
			GraphicsPath path = new GraphicsPath();

			// Visible lines counter;
			int visibleLines = 0;

			for (int i = m_text.Length - 1; i >= 0; i--)
			{

				Point pt = new Point((int)((this.ClientSize.Width - e.Graphics.MeasureString(m_text[i], m_font).Width) / 2),
					(int)(m_scrollingOffset + this.ClientSize.Height - (m_text.Length - i) * m_font.Size));

				// Adds visible lines to path.
				if ((pt.Y + this.Font.Size > 0) && (pt.Y < this.Height))
				{
					path.AddString(m_text[i], m_font.FontFamily, (int)m_font.Style, m_font.Size,
						pt, StringFormat.GenericTypographic);

					visibleLines++;
				}

			}

			// For repeat scrolling.
			if ((visibleLines == 0) && (m_scrollingOffset < 0))
			{
				m_scrollingOffset = (int)this.Font.SizeInPoints * m_text.Length;
			}

			int topSizeWidth = (int)(this.Width * m_topPartSizePercent / 100.0f);

			// Wraps Graphics path from rectangle to trapeze.
			path.Warp(
				new PointF[4]
				{
					new PointF((this.Width - topSizeWidth) / 2, 0),
					new PointF(this.Width - (this.Width - topSizeWidth) / 2, 0),
					new PointF(0, this.Height),
					new PointF(this.Width, this.Height)
				},
				new RectangleF(this.ClientRectangle.X, this.ClientRectangle.Y, this.ClientRectangle.Width, this.ClientRectangle.Height),
				null,
				WarpMode.Perspective
				);

			// Draws wrapped path.
			e.Graphics.FillPath(new SolidBrush(this.ForeColor), path);
			path.Dispose();

			// Draws fog effect with help of gradient brush with alpha colors.
			using (Brush br = new LinearGradientBrush(new Point(0, 0), new Point(0, this.Height),
				Color.FromArgb(255, this.BackColor), Color.FromArgb(0, this.BackColor)))
			{
				e.Graphics.FillRectangle(br, this.ClientRectangle);
			}
		}

		/// <summary>
		/// Starts the animation from the beginning.
		/// </summary>
		public void Start()
		{
			// Calculates scrolling offset.
			m_scrollingOffset = (int)this.Font.SizeInPoints * m_text.Length;
			m_timer.Start();
		}

		/// <summary>
		/// Stops the animation.
		/// </summary>
		public void Stop()
		{
			m_timer.Stop();
		}

		/// <summary>
		/// Timer handler.
		/// </summary>
		private void OnTimerTick(object sender, EventArgs e)
		{
			// Changes the offset.
			m_scrollingOffset--;

			// Repaints whole control area.
			Invalidate();
		}
	}
}


text:
import unittest

from tornadowebapi.renderers import JSONRenderer

class TestJSONRenderer(unittest.TestCase):
    def test_basic_rendering(self):
        renderer = JSONRenderer()
        self.assertEqual(renderer.render({}), "{}")
        self.assertEqual(renderer.render(None), None)


text:
'use strict';
angular.module('myApp', ['ngMaterial', 'ui.router', 'ui.utils.masks', 'chart.js']);


text:
package org.opensplice.config.data;

import org.w3c.dom.Attr;

import org.opensplice.config.meta.MetaAttribute;

public class DataAttribute extends DataNode {
    private DataValue value;

    public DataAttribute(MetaAttribute metadata, Attr node, Object value) throws DataException {
        super(metadata, node);

        if(!node.getNodeName().equals(metadata.getName())){
            throw new DataException("Metadata and data do not match.");
        }
        this.value = new DataValue(metadata.getValue(), node, value);
        this.value.setParent(this);
        this.value.setOwner(this.getOwner());
    }

    public DataAttribute(MetaAttribute metadata, Attr node) throws DataException {
        super(metadata, node);

        if(!node.getNodeName().equals(metadata.getName())){
            throw new DataException("Metadata and data do not match.");
        }
        Object defaultValue = metadata.getValue().getDefaultValue();
        this.value = new DataValue(metadata.getValue(), node, defaultValue);
        this.value.setParent(this);
        this.value.setOwner(this.getOwner());
    }

    @Override
    public void setOwner(DataConfiguration owner) {
        super.setOwner(owner);
        this.value.setOwner(owner);
    }

    public DataValue getDataValue(){
        return this.value;
    }

    public void testSetValue(Object value) throws DataException{
        this.value.testSetValue(value);
    }

    public void setValue(Object value) throws DataException{
        DataValue tmpValue = this.value;
        this.value.setValue(value);
        tmpValue.setParent(null);
        tmpValue.setOwner(null);
        this.value.setParent(this);
        this.value.setOwner(this.owner);
    }

    public Object getValue(){
        return this.value.getValue();
    }
}


text:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef MOZILLA_STREAMBUFFER_H_
#define MOZILLA_STREAMBUFFER_H_

#include "mozilla/Util.h"
#include "MediaSegment.h"
#include "nsAutoPtr.h"

namespace mozilla {

/**
 * Media time relative to the start of a StreamBuffer.
 */
typedef MediaTime StreamTime;
const StreamTime STREAM_TIME_MAX = MEDIA_TIME_MAX;

/**
 * Track rate in Hz. Maximum 1 << MEDIA_TIME_FRAC_BITS Hz. This ensures
 * calculations below don't overflow.
 */
typedef int32_t TrackRate;
const TrackRate TRACK_RATE_MAX = 1 << MEDIA_TIME_FRAC_BITS;

/**
 * Unique ID for track within a StreamBuffer. Tracks from different
 * StreamBuffers may have the same ID; this matters when appending StreamBuffers,
 * since tracks with the same ID are matched. Only IDs greater than 0 are allowed.
 */
typedef int32_t TrackID;
const TrackID TRACK_NONE = 0;

inline TrackTicks TimeToTicksRoundUp(TrackRate aRate, StreamTime aMicroseconds)
{
  NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
  NS_ASSERTION(0 <= aMicroseconds && aMicroseconds <= STREAM_TIME_MAX, "Bad microseconds");
  return (aMicroseconds*aRate + (1 << MEDIA_TIME_FRAC_BITS) - 1) >> MEDIA_TIME_FRAC_BITS;
}

inline TrackTicks TimeToTicksRoundDown(TrackRate aRate, StreamTime aMicroseconds)
{
  NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
  NS_ASSERTION(0 <= aMicroseconds && aMicroseconds <= STREAM_TIME_MAX, "Bad microseconds");
  return (aMicroseconds*aRate) >> MEDIA_TIME_FRAC_BITS;
}

inline StreamTime TicksToTimeRoundUp(TrackRate aRate, TrackTicks aTicks)
{
  NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
  NS_ASSERTION(0 <= aTicks && aTicks <= TRACK_TICKS_MAX, "Bad samples");
  return ((aTicks << MEDIA_TIME_FRAC_BITS) + aRate - 1)/aRate;
}

inline StreamTime TicksToTimeRound(TrackRate aRate, TrackTicks aTicks)
{
  NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
  NS_ASSERTION(0 <= aTicks && aTicks <= TRACK_TICKS_MAX, "Bad samples");
  return ((aTicks << MEDIA_TIME_FRAC_BITS) + aRate/2)/aRate;
}

inline StreamTime TicksToTimeRoundDown(TrackRate aRate, TrackTicks aTicks)
{
  NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Bad rate");
  NS_ASSERTION(0 <= aTicks && aTicks <= TRACK_TICKS_MAX, "Bad samples");
  return (aTicks << MEDIA_TIME_FRAC_BITS)/aRate;
}

/**
 * This object contains the decoded data for a stream's tracks.
 * A StreamBuffer can be appended to. Logically a StreamBuffer only gets longer,
 * but we also have the ability to "forget" data before a certain time that
 * we know won't be used again. (We prune a whole number of seconds internally.)
 *
 * StreamBuffers should only be used from one thread at a time.
 *
 * A StreamBuffer has a set of tracks that can be of arbitrary types ---
 * the data for each track is a MediaSegment. The set of tracks can vary
 * over the timeline of the StreamBuffer.
 */
class StreamBuffer {
public:
  /**
   * Every track has a start time --- when it started in the StreamBuffer.
   * It has an end flag; when false, no end point is known; when true,
   * the track ends when the data we have for the track runs out.
   * Tracks have a unique ID assigned at creation. This allows us to identify
   * the same track across StreamBuffers. A StreamBuffer should never have
   * two tracks with the same ID (even if they don't overlap in time).
   * TODO Tracks can also be enabled and disabled over time.
   * TODO Add TimeVarying<TrackTicks,bool> mEnabled.
   * Takes ownership of aSegment.
   */
  class Track {
  public:
    Track(TrackID aID, TrackRate aRate, TrackTicks aStart, MediaSegment* aSegment)
      : mStart(aStart),
        mSegment(aSegment),
        mRate(aRate),
        mID(aID),
        mEnded(false)
    {
      MOZ_COUNT_CTOR(Track);

      NS_ASSERTION(aID > TRACK_NONE, "Bad track ID");
      NS_ASSERTION(0 < aRate && aRate <= TRACK_RATE_MAX, "Invalid rate");
      NS_ASSERTION(0 <= aStart && aStart <= aSegment->GetDuration(), "Bad start position");
    }
    ~Track()
    {
      MOZ_COUNT_DTOR(Track);
    }
    template <class T> T* Get() const
    {
      if (mSegment->GetType() == T::StaticType()) {
        return static_cast<T*>(mSegment.get());
      }
      return nullptr;
    }
    MediaSegment* GetSegment() const { return mSegment; }
    TrackRate GetRate() const { return mRate; }
    TrackID GetID() const { return mID; }
    bool IsEnded() const { return mEnded; }
    TrackTicks GetStart() const { return mStart; }
    TrackTicks GetEnd() const { return mSegment->GetDuration(); }
    StreamTime GetEndTimeRoundDown() const
    {
      return mozilla::TicksToTimeRoundDown(mRate, mSegment->GetDuration());
    }
    StreamTime GetStartTimeRoundDown() const
    {
      return mozilla::TicksToTimeRoundDown(mRate, mStart);
    }
    TrackTicks TimeToTicksRoundDown(StreamTime aTime) const
    {
      return mozilla::TimeToTicksRoundDown(mRate, aTime);
    }
    StreamTime TicksToTimeRoundDown(TrackTicks aTicks) const
    {
      return mozilla::TicksToTimeRoundDown(mRate, aTicks);
    }
    MediaSegment::Type GetType() const { return mSegment->GetType(); }

    void SetEnded() { mEnded = true; }
    void AppendFrom(Track* aTrack)
    {
      NS_ASSERTION(!mEnded, "Can't append to ended track");
      NS_ASSERTION(aTrack->mID == mID, "IDs must match");
      NS_ASSERTION(aTrack->mStart == 0, "Source track must start at zero");
      NS_ASSERTION(aTrack->mSegment->GetType() == GetType(), "Track types must match");
      NS_ASSERTION(aTrack->mRate == mRate, "Track rates must match");

      mSegment->AppendFrom(aTrack->mSegment);
      mEnded = aTrack->mEnded;
    }
    MediaSegment* RemoveSegment()
    {
      return mSegment.forget();
    }
    void ForgetUpTo(TrackTicks aTime)
    {
      mSegment->ForgetUpTo(aTime);
#ifdef DEBUG
      mForgottenUpTo = NS_MAX<TrackTicks>(mForgottenUpTo, aTime);
#endif
    }
#ifdef DEBUG
    TrackTicks GetForgottenUpTo() { return mForgottenUpTo; }
#endif

  protected:
    friend class StreamBuffer;

    // Start offset is in ticks at rate mRate
    TrackTicks mStart;
    // The segment data starts at the start of the owning StreamBuffer, i.e.,
    // there's mStart silence/no video at the beginning.
    nsAutoPtr<MediaSegment> mSegment;
    TrackRate mRate; // rate in ticks per second
    // Unique ID
    TrackID mID;
    // True when the track ends with the data in mSegment
    bool mEnded;
    DebugOnly<TrackTicks> mForgottenUpTo;
  };

  class CompareTracksByID {
  public:
    bool Equals(Track* aA, Track* aB) const {
      return aA->GetID() == aB->GetID();
    }
    bool LessThan(Track* aA, Track* aB) const {
      return aA->GetID() < aB->GetID();
    }
  };

  StreamBuffer()
    : mTracksKnownTime(0), mForgottenTime(0)
  {
    MOZ_COUNT_CTOR(StreamBuffer);
  }
  ~StreamBuffer()
  {
    MOZ_COUNT_DTOR(StreamBuffer);
  }

  /**
   * Takes ownership of aSegment. Don't do this while iterating, or while
   * holding a Track reference.
   * aSegment must have aStart worth of null data.
   */
  Track& AddTrack(TrackID aID, TrackRate aRate, TrackTicks aStart, MediaSegment* aSegment)
  {
    NS_ASSERTION(TimeToTicksRoundDown(aRate, mTracksKnownTime) <= aStart,
                 "Start time too early");
    NS_ASSERTION(!FindTrack(aID), "Track with this ID already exists");

    return **mTracks.InsertElementSorted(new Track(aID, aRate, aStart, aSegment),
                                         CompareTracksByID());
  }
  void AdvanceKnownTracksTime(StreamTime aKnownTime)
  {
    NS_ASSERTION(aKnownTime >= mTracksKnownTime, "Can't move tracks-known time earlier");
    mTracksKnownTime = aKnownTime;
  }

  /**
   * The end time for the StreamBuffer is the latest time for which we have
   * data for all tracks that haven't ended by that time.
   */
  StreamTime GetEnd() const;

  Track* FindTrack(TrackID aID);

  class TrackIter {
  public:
    /**
     * Iterate through the tracks of aBuffer in order of ID.
     */
    TrackIter(const StreamBuffer& aBuffer) :
      mBuffer(&aBuffer.mTracks), mIndex(0), mMatchType(false) {}
    /**
     * Iterate through the tracks of aBuffer with type aType, in order of ID.
     */
    TrackIter(const StreamBuffer& aBuffer, MediaSegment::Type aType) :
      mBuffer(&aBuffer.mTracks), mIndex(0), mType(aType), mMatchType(true) { FindMatch(); }
    bool IsEnded() { return mIndex >= mBuffer->Length(); }
    void Next()
    {
      ++mIndex;
      FindMatch();
    }
    Track* get() { return mBuffer->ElementAt(mIndex); }
    Track& operator*() { return *mBuffer->ElementAt(mIndex); }
    Track* operator->() { return mBuffer->ElementAt(mIndex); }
  private:
    void FindMatch()
    {
      if (!mMatchType)
        return;
      while (mIndex < mBuffer->Length() &&
             mBuffer->ElementAt(mIndex)->GetType() != mType) {
        ++mIndex;
      }
    }

    const nsTArray<nsAutoPtr<Track> >* mBuffer;
    uint32_t mIndex;
    MediaSegment::Type mType;
    bool mMatchType;
  };
  friend class TrackIter;

  /**
   * Forget stream data before aTime; they will no longer be needed.
   * Also can forget entire tracks that have ended at or before aTime.
   * Can't be used to forget beyond GetEnd().
   */
  void ForgetUpTo(StreamTime aTime);
  /**
   * Returns the latest time passed to ForgetUpTo.
   */
  StreamTime GetForgottenDuration()
  {
    return mForgottenTime;
  }

protected:
  // Any new tracks added will start at or after this time. In other words, the track
  // list is complete and correct for all times less than this time.
  StreamTime mTracksKnownTime;
  StreamTime mForgottenTime;
  // All known tracks for this StreamBuffer
  nsTArray<nsAutoPtr<Track> > mTracks;
};

}

#endif /* MOZILLA_STREAMBUFFER_H_ */


text:
admin_users = User.where(admin: true).pluck(:email)

Instructable::TRACKS.keys.each do |track|
  users = User.for_track(track).pluck(:email)
  users = admin_users if users.empty?
  instructables = Instructable.where(track: track)

  users.each do |email|
    begin
      InstructablesMailer.track_status(email, track, instructables).deliver
    rescue Exception => e
      puts "While delivering to #{email}: #{e.to_s}"
    end
  end
end


text:
var _ = require("underscore");
var rand = Math.floor((Math.random()*100000)+1);
var req = {};
req.order = require("./order.js")(rand).order;

var for_sixworks = function(){
    var sixworks_line_items = _.filter(req.order.line_items, function(line_item){
        if(line_item.fulfillment_service.toLowerCase() == "sixworks") return true;
    });
    var for_sixworks = _.map(sixworks_line_items, function(line_item){
        var product = {};
        product.client_ref = line_item.sku;
        product.quantity = line_item.quantity;
        product.price = line_item.price;
        return product;
    });
    return for_sixworks;
}();

var id_array = function(){
    var line_items = req.order.line_items;
    var sixworks_line_items = _.filter(line_items, function(line_item){
        if(line_item.fulfillment_service.toLowerCase() == "sixworks") return true;
    });
    var ids = _.map(sixworks_line_items, function(line_item){
        var id = {};
        id.id = line_item.id;
        return id;
    });
    return ids;
}();

console.log(id_array);


text:
<?xml version="1.0"?>
<project name="modularity" default="dist">

  <property name="version" value="1.0"/>
  <dirname property="example.dir" file="${ant.file.modularity}"/>
  <import file="../build.xml"/>

  <target name="provider">
    <ant dir="${example.dir}/org.foo.hello" inheritAll="false"/>
  </target>

  <target name="consumer">
    <ant dir="${example.dir}/org.foo.hello.client" inheritAll="false"/>
  </target>

  <target name="main">
    <ant dir="${example.dir}/org.foo.hello.main" inheritAll="false"/>
  </target>

</project>


text:
package me.xiaoy.core.base;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.enums.ValuedEnum;

public class BaseEnum extends ValuedEnum {

	private static final long serialVersionUID = 1L;

	protected String label;

	protected BaseEnum(String name, int value) {
		super(name, value);
	}

	protected BaseEnum(String name, int value, String label) {
        super(name, value);
        this.label = label;
    }

	public String getLabel() {
        return this.label;
    }

    public String getLabelLocal() {
        //TODO: 返回国际化标签
    	return "";
    }

    protected static <T extends BaseEnum> Map<String, T> toMap(T[] enums) {
        Map<String, T> valueMap = new HashMap<String, T>();
        for (T ele : enums) {
            valueMap.put(ele.getName(), ele);
        }
        return valueMap;
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Trans. Mycol. Soc. Japan 20(4): 426 (1979)

#### Original name
Gloeosporium terminaliae P. Syd. & E.J. Butler

### Remarks
null


text:
"""This example updates teams by adding an ad unit to a team.

To determine which teams exist, run get_all_teams.py. To determine which ad
units exist, run get_all_ad_units.py

The LoadFromStorage method is pulling credentials and properties from a
"googleads.yaml" file. By default, it looks for this file in your home
directory. For more information, see the "Caching authentication information"
section of our README.

Tags: TeamService.getTeamsByStatement, TeamService.updateTeams
"""

__author__ = ('Nicholas Chen',
              'Joseph DiLallo')

# Import appropriate modules from the client library.
from googleads import dfp

AD_UNIT_ID = 'INSERT_AD_UNIT_ID_HERE'
TEAM_ID = 'INSERT_TEAM_ID_HERE'

def main(client, ad_unit_id, team_id):
  # Initialize appropriate service.
  team_service = client.GetService('TeamService', version='v201411')

  # Create a filter statement to select a single team by ID.
  values = [{
      'key': 'teamId',
      'value': {
          'xsi_type': 'NumberValue',
          'value': team_id
      }
  }]
  query = 'WHERE id = :teamId'
  statement = dfp.FilterStatement(query, values)

  # Get teams by statement.
  response = team_service.getTeamsByStatement(statement.ToStatement())

  if 'results' in response:
    updated_teams = []
    # Update each local team object by adding the ad unit to it.
    for team in response['results']:
      ad_unit_ids = []
      if 'adUnitIds' in team:
        ad_unit_ids = team['adUnitIds']
      # Don't add the ad unit if the team has all inventory already.
      if not team['hasAllInventory']:
        ad_unit_ids.append(ad_unit_id)
      team['adUnitIds'] = ad_unit_ids
      updated_teams.append(team)

    # Update teams on the server.
    teams = team_service.updateTeams(updated_teams)

    # Display results.
    for team in teams:
      print ('Team with id \'%s\' and name \'%s\' was updated.'
             % (team['id'], team['name']))
  else:
    print 'No teams found to update.'

if __name__ == '__main__':
  # Initialize client object.
  dfp_client = dfp.DfpClient.LoadFromStorage()
  main(dfp_client, AD_UNIT_ID, TEAM_ID)


text:
<?php
namespace HtUserSocialAuthModule\Manager;

use Hrevert\OauthClient\Manager\UserManagerInterface;
use ZfcUser\Mapper\UserInterface as UserMapper;

class UserManager implements UserManagerInterface
{
    /**
     * @var UserMapper
     */
    protected $userMapper;

    /**
     * Constructor
     *
     * @param UserMapper $userMapper
     */
    public function __construct(UserMapper $userMapper)
    {
        $this->userMapper = $userMapper;
    }

    /**
     * {@inheritdoc}
     */
    public function findById($id)
    {
        return $this->userMapper->findById($id);
    }
}


text:
namespace boost { namespace geometry
{

#ifndef DOXYGEN_NO_DISPATCH
namespace core_dispatch
{

template <>
struct top_dim<multi_point_tag> : boost::mpl::int_<0> {};

template <>
struct top_dim<multi_linestring_tag> : boost::mpl::int_<1> {};

template <>
struct top_dim<multi_polygon_tag> : boost::mpl::int_<2> {};

} // namespace core_dispatch
#endif

}} // namespace boost::geometry

#endif


text:
#ifndef TENSORFLOW_LITE_MICRO_RECORDING_MICRO_INTERPRETER_H_
#define TENSORFLOW_LITE_MICRO_RECORDING_MICRO_INTERPRETER_H_

#include "tensorflow/lite/micro/micro_interpreter.h"
#include "tensorflow/lite/micro/micro_profiler_interface.h"
#include "tensorflow/lite/micro/recording_micro_allocator.h"

namespace tflite {

// Utility subclass that enables internal recordings of the MicroInterpreter.
// This class should be used to audit and analyze memory arena usage for a given
// model and interpreter.
//
// After construction and the first Invoke() or AllocateTensors() call - the
// memory usage is recorded and available through the GetMicroAllocator()
// function. See RecordingMicroAlloctor for more details on what is currently
// recorded from arena allocations.
//
// It is recommended for users to increase the tensor arena size by at least 1kb
// to ensure enough additional memory is available for internal recordings.
class RecordingMicroInterpreter : public MicroInterpreter {
 public:
  RecordingMicroInterpreter(const Model* model,
                            const MicroOpResolver& op_resolver,
                            uint8_t* tensor_arena, size_t tensor_arena_size,
                            MicroResourceVariables* resource_variable = nullptr,
                            MicroProfilerInterface* profiler = nullptr)
      : MicroInterpreter(
            model, op_resolver,
            RecordingMicroAllocator::Create(tensor_arena, tensor_arena_size),
            resource_variable, profiler),
        recording_micro_allocator_(
            static_cast<const RecordingMicroAllocator&>(allocator())) {}

  RecordingMicroInterpreter(const Model* model,
                            const MicroOpResolver& op_resolver,
                            RecordingMicroAllocator* allocator,
                            MicroResourceVariables* resource_variable = nullptr,
                            MicroProfilerInterface* profiler = nullptr)
      : MicroInterpreter(model, op_resolver, allocator, resource_variable,
                         profiler),
        recording_micro_allocator_(*allocator) {}

  // TODO(b/246776144): Will be removed with http://b/246776144
  RecordingMicroInterpreter(const Model* model,
                            const MicroOpResolver& op_resolver,
                            uint8_t* tensor_arena, size_t tensor_arena_size,
                            ErrorReporter* error_reporter,
                            MicroResourceVariables* resource_variable = nullptr,
                            MicroProfilerInterface* profiler = nullptr)
      : MicroInterpreter(model, op_resolver,
                         RecordingMicroAllocator::Create(
                             tensor_arena, tensor_arena_size, error_reporter),
                         error_reporter, resource_variable, profiler),
        recording_micro_allocator_(
            static_cast<const RecordingMicroAllocator&>(allocator())) {}

  // TODO(b/246776144): Will be removed with http://b/246776144
  RecordingMicroInterpreter(const Model* model,
                            const MicroOpResolver& op_resolver,
                            RecordingMicroAllocator* allocator,
                            ErrorReporter* error_reporter,
                            MicroResourceVariables* resource_variable = nullptr,
                            MicroProfilerInterface* profiler = nullptr)
      : MicroInterpreter(model, op_resolver, allocator, error_reporter,
                         resource_variable, profiler),
        recording_micro_allocator_(*allocator) {}

  const RecordingMicroAllocator& GetMicroAllocator() const {
    return recording_micro_allocator_;
  }

 private:
  const RecordingMicroAllocator& recording_micro_allocator_;
};

}  // namespace tflite

#endif  // TENSORFLOW_LITE_MICRO_RECORDING_MICRO_INTERPRETER_H_


text:
The image is available in Docker registry at https://registry.hub.docker.com/u/sumitchawla/vertica/

Base OS is Debian 9.2.

## Usage:
You can either pull the image from Docker Registry using following command:

```bash
docker pull sumitchawla/vertica
```

Or, build your own image using following command. Download the Vertica DEB package from https://my.vertica.com and put it in this folder as "vertica9.deb".
Then run:
```bash
docker build -t sumitchawla/vertica .
```

### To run without a persistent datastore
```bash
docker run -p 5433:5433  sumitchawla/vertica
```

### To run with a persistent datastore
```bash
docker run -p 5433:5433 -d -v /path/to/vertica_data:/home/dbadmin/docker sumitchawla/vertica
```
### Connection Parameters
 Default DB Name - docker

 Default User - dbadmin

 Default Password (NO PASSWORD) -


text:
'''
  Author Alumet 2015
  https://github.com/Alumet/Codingame
'''

# game loop
while True:
    mountain_h=list()
    for i in range(8):
        mountain_h.append(int(input()))

    print(mountain_h.index(max(mountain_h)))


text:
package fine.vmj.fx.workspace;

import org.opencv.core.Core;

import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.SplitPane;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;

public class Workspace extends Application {

	@Override
	public void start(Stage primaryStage) {

		try
		{
			// load the FXML resource
			FXMLLoader loader = new FXMLLoader(getClass().getResource("workspace.fxml"));
			// store the root element so that the controllers can use it
			SplitPane rootElement = (SplitPane) loader.load();
			// create and style a scene
			Scene scene = new Scene(rootElement, 1280, 720);
			scene.getStylesheets().add(getClass().getResource("workspace.css").toExternalForm());
			// create the stage with the given title and the previously created
			// scene
			primaryStage.setTitle("VMJ-WORKSPACE");
			primaryStage.setScene(scene);
			// show the GUI
			primaryStage.show();

			// set the proper behavior on closing the application
			Workspace_Controller controller = loader.getController();
			controller.setStage(primaryStage);
			controller.init();
			primaryStage.setOnCloseRequest((new EventHandler<WindowEvent>() {
				public void handle(WindowEvent we)
				{
					controller.setClosed();
				}
			}));
		}
		catch (Exception e)
		{
			e.printStackTrace();
}

	}

	public static void main(String[] args) {
		// load the native OpenCV library
		System.loadLibrary(Core.NATIVE_LIBRARY_NAME);

		launch(args);
	}
}


text:
using System;
using System.Collections.Generic;

namespace AGO.Core.Config
{
	public class DictionaryKeyValueProvider : IKeyValueProvider
	{
		private readonly IDictionary<string, string> _Source;

		public DictionaryKeyValueProvider(IDictionary<string, string> source)
		{
			if (source == null)
				throw new ArgumentNullException("source");
			_Source = source;
		}

		public IEnumerable<string> Keys
		{
			get { return _Source.Keys; }
		}

		public string RealKey(string key)
		{
			return key;
		}

		public string Value(string key)
		{
			return _Source.ContainsKey(key) ? _Source[key] : null;
		}
	}
}


text:
"use strict"
var casper = global.casper;
var mobi = global.mobi;

var pack = "020";
var scenario = "040";
var desc = "scenario " + pack + "/" + scenario + ": Consignee Signup:";
var pathScreens = mobi.opts.path.screenshots;
var consignee = mobi.opts.auth.odoo.web.consignee;
var wait = 0;

/**
 * Function to wait while Odoo loading is in process
 */
var fnWaitWhileLoading = function () {
    casper.waitFor(function () {
        var result = !casper.visible("body > div.openerp.openerp_webclient_container.oe_webclient > div.oe_loading");
        return result;
    }, function () {
        mobi.capture("wait-" + (++wait), scenario, pack);
    });
}

var cssOdooTabAccounting = "div.oe_form_sheetbg > div > div.oe_clear > ul > li:nth-child(4) > a";

casper.test.begin(desc, function scene_020_040(test) {

    /** Start scenario and setup phantom/casper */
    casper.start().then(function () {
        mobi.setViewport();
    });

    // Odoo: register new Consignee

    // authenticate as "ERP Operator"
    casper.then(function () {
        mobi.sub.odoo.authenticate({pack: pack, scenario: scenario});
    });

    /** Goto "Customer/New" form */
    casper.then(function () {
        var url = mobi.sub.odoo.getUrlWeb("sales.customers.new");
        casper.open(url).then(function () {
            casper.waitForSelector("input[placeholder='Name']", function () {
                fnWaitWhileLoading();
                test.assert(true, "Goto 'Customer New' from.");
                mobi.capture("010", scenario, pack);
            });
        });
    });

    /** Fill Name field */
    casper.then(function () {
        fnWaitWhileLoading();
        casper.fillSelectors("div.oe_form", {"input[placeholder='Name']": consignee.name}, false);
        test.assert(true, "Fill Name field.");
        mobi.capture("020", scenario, pack);
    });

    /** Select value for Group field */
    casper.then(function () {
        fnWaitWhileLoading();
        casper.click("div.oe_title > div > span:nth-child(2) > div > span > img");
        fnWaitWhileLoading();
        casper.sendKeys("div.oe_title > div > span:nth-child(2) > div > input", "Cons", {keepFocus: true});
        fnWaitWhileLoading();
        casper.waitForSelector("#ui-id-2 > li:nth-child(2) > a", function () {
            casper.click("#ui-id-2 > li:nth-child(2)");
            fnWaitWhileLoading();
            test.assert(true, "Select value for Group field.");
            mobi.capture("030", scenario, pack);
        });
    });

    /** Click "Accounting" tab */
    casper.then(function () {
        fnWaitWhileLoading();
        casper.click(cssOdooTabAccounting);
        test.assert(true, 'Click "Accounting" tab.');
    });

    /** Select "Account Receivable" */
    casper.then(function () {
        // casper.click("button.oe_form_button_save.btn.btn-primary.btn-sm");
        fnWaitWhileLoading();
        casper.click("#notebook_page_23 td.oe_form_group_cell.oe_group_right > table > tbody > tr:nth-child(1) > td:nth-child(2) > span > div > span > img");
        casper.waitFor(function () {
            var result = !casper.visible("body > div.openerp.openerp_webclient_container.oe_webclient > div.oe_loading");
            return result;
        }, function () {
            casper.sendKeys("#oe-field-input-45", "2000 ", {keepFocus: true});
            casper.sendKeys('#oe-field-input-45', casper.page.event.key.Enter, {keepFocus: false});
            fnWaitWhileLoading();
            test.assert(true, 'Select "Account Receivable".');
            mobi.capture("040", scenario, pack);
        });
    });

    // Click "Accounting" tab
    casper.then(function () {
        fnWaitWhileLoading();
        casper.click(cssOdooTabAccounting);
    });

    /** Select "Account Payable" */
    var cssSelectPayable = "#notebook_page_23 > table > tbody > tr:nth-child(2) > td.oe_form_group_cell.oe_group_right > table > tbody > tr:nth-child(2) > td:nth-child(2) > span > div > span > img";
    casper.then(function () {
        fnWaitWhileLoading();
        casper.click(cssSelectPayable);
        fnWaitWhileLoading();
    });
    casper.then(function () {
        fnWaitWhileLoading();
        casper.sendKeys("#oe-field-input-45", "2000 ", {keepFocus: true});
        fnWaitWhileLoading();
        casper.sendKeys('#oe-field-input-45', casper.page.event.key.Enter, {keepFocus: false});
        test.assert(true, 'Select "Account Payable".');
        mobi.capture("050", scenario, pack);
    });

    // Click "Accounting" tab
    casper.then(function () {
        fnWaitWhileLoading();
        casper.click(cssOdooTabAccounting);
    });

    /** Save Consignee */
    casper.then(function () {
        fnWaitWhileLoading();
        casper.click("button.oe_form_button_save.btn.btn-primary.btn-sm");
        test.assert(true, "Save Consignee.");
        mobi.capture("060", scenario, pack);
    });

    /** Saving result */
    casper.then(function () {
        fnWaitWhileLoading();
        test.assert(true, "Saving result.");
        mobi.capture("070", scenario, pack);
    });

    /** Run scenario and finalize test. */
    casper.run(function () {
        mobi.capture("999", scenario, pack);
        test.done()
    })

});


text:
<!DOCTYPE html>

	<title>three.js webgl - instancing test (single triangle)</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<link type="text/css" rel="stylesheet" href="main.css">

		three.js - instancing demo (single triangle)

Sorry your graphics card + browser does not support hardware instancing


text:
<title>Surveys</title>

Surveys

Be cool and change your Surveys frequently. To add a new Poll
you need just to fill the form in this page.

Poll Title: Title for your new Poll.

Options: The poll options, please fill at least 2
options, you don't need to fill all of them.

Delete Polls: To delete one or more existing Poll,
click on Delete Poll link. After that you will see another page
with the list of all your site's polls. Check the poll you want to delete
and click on Remove button. Remember: there aren't confirmation
when you delete a poll, just click and the selected poll will go to the
hell!

NOTE: Please double check your title and your options,
because you will not be able to edit the poll after you click
on Create button. This is because is not funny to let the
administrators manipulate the surveys like other systems do. Is
not fair and not ethic, so... be carefully when you type here.


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.hornetq.jms.server.recovery (HornetQ JMS Server 2.4.0.Final API)</title>
<meta name="date" content="2013-12-16">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

org.hornetq.jms.server.recovery

Classes

HornetQRecoveryRegistry

HornetQRegistryBase

HornetQXAResourceRecovery

HornetQXAResourceRecovery.ConfigParser

HornetQXAResourceWrapper

RecoveryDiscovery

XARecoveryConfig


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        tools:context=".MainActivity" >

    <Button
            android:id="@+id/btn_signal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/btn_signal_txt"
        />

    <LinearLayout
            android:id="@+id/ll_brightness"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="20dip"
            >

        <TextView
                android:id="@+id/brightness_tv"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="@color/lightsteelblue"
                android:textStyle="bold"
                android:textSize="20dip"
                android:gravity="right"
                android:text="亮度设置"/>

        <SeekBar
                android:id="@+id/brightness_sb"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dip"
                android:layout_marginLeft="60dip"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:max="100"
                android:progress="50"
                android:indeterminate="false" />
    </LinearLayout>

    <LinearLayout
            android:id="@+id/ll_volume"
            android:orientation="horizontal"
            android:gravity="center"
            android:layout_marginTop="30dip"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            >

        <Button
                android:id="@+id/btn_volume_down"
                android:layout_width="100dip"
                android:layout_height="wrap_content"
                android:layout_marginRight="10dip"
                android:layout_marginBottom="10dip"
                android:textColor="@color/azure"
                android:textSize="20dip"
                android:text="音量-"
            />

        <Button
                android:id="@+id/btn_volume_up"
                android:layout_width="100dip"
                android:layout_height="wrap_content"
                android:layout_marginLeft="10dip"
                android:layout_marginBottom="10dip"
                android:textColor="@color/azure"
                android:textSize="20dip"
                android:text="音量+"
            />
    </LinearLayout>

</LinearLayout>


text:
class RESTError(Exception):
    """
    This Exception encapsulates all catastrophic (i.e. we can't continue)
    problems with communicating with the server.
    """
    def __init__(self, details, status_code=None):
        super()
        self.status_code = status_code
        self.details = details

    def print_reason(self):
        print("Problem communicating with remote server:")
        print(self.details)

        if self.status_code is not None:
            print("Status Code: " + self.status_code)


text:
Description
-----------

:Homepage:
    http://redmine.lighttpd.net/projects/fcgi-cgi/wiki

fcgi-cgi is a FastCGI application to run normal cgi applications. It doesn't
make CGI applications faster, but it allows you to run them on a different
host and with different user permissions (without the need for suexec).

lighttpd2 won't have a mod_cgi, so you need this FastCGI wrapper to be able
to execute standard cgi applications like mailman and cgit.

fcgi-cgi is released under the `MIT license <http://git.lighttpd.net/fcgi-cgi.git/tree/COPYING>`_

Usage
-----

Examples for spawning a fcgi-cgi instance with daemontools or runit::

  #!/bin/sh
  # run script

  exec spawn-fcgi -n -s /var/run/fastcgi-cgi.sock -u www-default -U www-data -- /usr/bin/fcgi-cgi

Build dependencies
------------------

* glib >= 2.16.0 (http://www.gtk.org/)
* libev (http://software.schmorp.de/pkg/libev.html)
* cmake or autotools (for snapshots/releases the autotool generated files are included)

Build
-----

* snapshot/release with autotools::

   ./configure
   make

* build from git: ``git clone git://git.lighttpd.net/fcgi-cgi.git``

 * with autotools::

    ./autogen.sh
    ./configure
    make

 * with cmake (should work with snapshots/releases too)::

    cmake .
    make


text:
import { connect } from 'react-redux';
import EditInvoice from '../../components/invoice/Edit_invoice_component';
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import * as Actions from '../../actions/actions';

function mapStateToProps(state) {
	return {
		props: state
	};
}

const mapDispatchToProps = (dispatch, ownProps) => {
	return {
		actions: bindActionCreators(Actions, dispatch)
	}
}

export default connect(mapStateToProps, mapDispatchToProps)(EditInvoice);


text:
/*
    -- clMAGMA (version 1.1.0) --
       Univ. of Tennessee, Knoxville
       Univ. of California, Berkeley
       Univ. of Colorado, Denver
       @date January 2014

       @precisions mixed zc -> ds
*/

#define PRECISION_z

#include <stdio.h>

#include "magmablas.h"
#include "CL_MAGMA_RT.h"
#include "common_magma.h"

extern "C" magma_err_t
magmablas_clag2z_64_64_16_4_v2( magma_int_t M, magma_int_t N,
                                magmaFloatComplex_ptr SA, size_t SA_offset, magma_int_t LDSA,
                                magmaDoubleComplex_ptr A, size_t A_offset, magma_int_t LDA,
                                magma_queue_t queue)
{
    if( M == 0 || N==0 ) {
        printf("One of the dimension is ZERO\n");
        exit(-1);
    }

    cl_int ciErrNum;                // Error code var
    cl_kernel ckKernel=NULL;

    // in clag2z.cl
    if(N>1){
        ckKernel = rt->KernelPool["clag2z_generic"];
    }else{
        ckKernel = rt->KernelPool["clag2z_special"];
    }
    if (!ckKernel)
    {
        printf ("Error: cannot locate kernel in line %d, file %s\n", __LINE__, __FILE__);
        return MAGMA_ERR_UNKNOWN;
    }
    //dim3 threads( 16, 4 );
    //dim3 grid(M/64+(M%64!=0),1);

    size_t GlobalWorkSize[2]={0,0}, LocalWorkSize[2]={0,0};
    LocalWorkSize[0] = 16;
    LocalWorkSize[1] = 4;

    GlobalWorkSize[0] = (M/64+(M%64!=0))*LocalWorkSize[0];
    GlobalWorkSize[1] = 1*LocalWorkSize[1];

    int nn = 0;
    ciErrNum  = clSetKernelArg( ckKernel, nn++, sizeof(int), (void*)&M   );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(int), (void*)&N );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(magmaFloatComplex_ptr), (void*)&SA     );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(int), (void*)&SA_offset   );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(int), (void*)&LDSA   );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(magmaDoubleComplex_ptr), (void*)&A );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(int), (void*)&A_offset     );
    ciErrNum |= clSetKernelArg( ckKernel, nn++, sizeof(int), (void*)&LDA     );
    if (ciErrNum != CL_SUCCESS)
    {
        printf("Error: clSetKernelArg at %d in file %s!\n", __LINE__, __FILE__);
        return MAGMA_ERR_UNKNOWN;
    }

    ciErrNum = clEnqueueNDRangeKernel(
        queue, ckKernel, 2, NULL, GlobalWorkSize, LocalWorkSize, 0, NULL, NULL);
    if (ciErrNum != CL_SUCCESS)
    {
        printf("Error: clEnqueueNDRangeKernel at %d in file %s \"%s\"\n",
            __LINE__, __FILE__, rt->GetErrorCode(ciErrNum));
        return MAGMA_ERR_UNKNOWN;
    }

    clFlush(queue);
    return MAGMA_SUCCESS;
}

extern "C" magma_err_t
magmablas_clag2z( magma_int_t m, magma_int_t n ,
                  magmaDoubleComplex_ptr SA, size_t SA_offset,
                  magma_int_t ldsa,
                  magmaFloatComplex_ptr A, size_t A_offset,
                  magma_int_t lda,
                  magma_int_t *info, magma_queue_t queue )
{
/*
    Purpose
    =======

    CLAG2Z converts a SINGLE PRECISION matrix, SA, to a DOUBLE
    PRECISION matrix, A.

    Note that while it is possible to overflow while converting
    from double to single, it is not possible to overflow when
    converting from single to double.

    Arguments
    =========

    M       (input) INTEGER
            The number of lines of the matrix A.  M >= 0.

    N       (input) INTEGER
            The number of columns of the matrix A.  N >= 0.

    SA      (input) REAL array, dimension (LDSA,N)
            On entry, the M-by-N coefficient matrix SA.

    LDSA    (input) INTEGER
            The leading dimension of the array SA.  LDSA >= max(1,M).

    A       (output) DOUBLE PRECISION array, dimension (LDA,N)
            On exit, the M-by-N coefficient matrix A.

    LDA     (input) INTEGER
            The leading dimension of the array A.  LDA >= max(1,M).

    INFO    (output) INTEGER
            = 0:  successful exit
            < 0:  if INFO = -i, the i-th argument had an illegal value
    =====================================================================    */

    *info = 0;
    if ( m < 0 )
        *info = -1;
    else if ( n < 0 )
        *info = -2;
    else if ( lda < max(1,m) )
        *info = -4;
    else if ( ldsa < max(1,m) )
        *info = -6;

    if (*info != 0) {
        magma_xerbla( __func__, -(*info) );
        //return *info;
    }

    return magmablas_clag2z_64_64_16_4_v2( m, n, SA, SA_offset, ldsa, A, A_offset, lda, queue);
}


text:
using Microsoft.PSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ProcessScheduler
{
    class RWant_Machine : Machine
    {
        #region events
        public class ValueReq : Event
        {
            public MachineId Target;

            public ValueReq(MachineId target)
            {
                this.Target = target;
            }
        }
        public class ValueResp : Event
        {
            public bool Value;

            public ValueResp(bool value)
            {
                this.Value = value;
            }
        }
        public class SetReq : Event
        {
            public MachineId Target;
            public bool Value;

            public SetReq(MachineId target, bool value)
            {
                this.Target = target;
                this.Value = value;
            }
        }
        public class SetResp : Event { }
        #endregion

        #region fields
        private bool r_want;
        #endregion

        #region states
        [Start]
        [OnEntry(nameof(OnInitialize))]
        [OnEventDoAction(typeof(SetReq), nameof(OnSetReq))]
        [OnEventDoAction(typeof(ValueReq), nameof(OnValueReq))]
        class Init : MachineState { }
        #endregion

        #region actions
        void OnInitialize()
        {
            this.r_want = false;
        }

        void OnSetReq()
        {
            var e = ReceivedEvent as SetReq;
            this.r_want = e.Value;
            Send(e.Target, new SetResp());
        }

        void OnValueReq()
        {
            var e = ReceivedEvent as ValueReq;
            Send(e.Target, new ValueResp(r_want));
        }
        #endregion
    }
}


text:
<!DOCTYPE HTML>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Blender</title>
    <link rel="stylesheet" href="/css/app.css">
    <link rel="shortcut icon" href="/favicon.ico">

    <link rel="manifest" href="/manifest.json">

    <meta name="theme-color" content="#C2185B">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-title" content="Blender">
    <meta name="apple-mobile-web-app-status-bar-style" content="#C2185B">
    <link rel="apple-touch-icon" href="img/icons/icon-152x152.png">

    <meta name="msapplication-TileImage" content="img/icons/icon-144x144.png">
    <meta name="msapplication-TileColor" content="#C2185B">


text:
package com.github.nikdon.telepooz.model

import com.github.nikdon.telepooz.model

/**
  * This object represents a sticker.
  *
  * @param file_id    Unique identifier for this file
  * @param width      Sticker width
  * @param height     Sticker height
  * @param thumb      Sticker thumbnail in .webp or .jpg format
  * @param emoji      Emoji associated with the sticker
  * @param file_size  File size
  */
case class Sticker(file_id: String,
                   width: Int,
                   height: Int,
                   thumb: Option[model.PhotoSize],
                   emoji: Option[String],
                   file_size: Option[Int])


text:
var urlParam = require('urlparam');
var JsonExplorer = require('./index.js');

if(!urlParam('json')) {
	window.location = window.location + '?json=data.json';
}

var jsonExplorer = new JsonExplorer({
	jsonPath: urlParam('json')
});


text:
package org.openspaces.core.space.mode;

/**
 * A generic interface allowing to refresh context loader.
 *
 * @author kimchy
 */
public interface RefreshableContextLoader {

    void refresh() throws Exception;
}


text:
@interface MWKImageListTests : XCTestCase
@property (nonatomic, strong) NSString* tempDataStoreDir;
@end

@implementation MWKImageListTests

- (void)setUp {
    [super setUp];
    _tempDataStoreDir = [NSTemporaryDirectory() stringByAppendingPathComponent:[[NSUUID UUID] UUIDString]];
}

- (void)tearDown {
    [super tearDown];
    [[NSFileManager defaultManager] removeItemAtPath:_tempDataStoreDir error:nil];
}

- (void)testUniqueLargestVariants {
    MWKDataStore* tmpDataStore = [[MWKDataStore alloc] initWithBasePath:self.tempDataStoreDir];

    // create article w/ mock section to prevent crashing due to image import side effects
    MWKTitle* title     = [[MWKSite siteWithCurrentLocale] titleWithString:@"foo"];
    MWKArticle* article = [[MWKArticle alloc] initWithTitle:title dataStore:tmpDataStore];
    [article.sections setSections:[NSMutableArray arrayWithObject:mock([MWKSection class])]];

    NSArray* dummySourceURLs = [@[@"10px-a.jpg", @"10px-b.jpg", @"100px-a.jpg", @"10px-c.jpg"] bk_map :^id (id obj) {
        return MWKCreateImageURLWithPath(obj);
    }];

    [dummySourceURLs bk_each:^(NSString* sourceURL) {
        [article importImageURL:sourceURL sectionId:0];
    }];

    assertThat([[article.images uniqueLargestVariants] valueForKeyPath:@"sourceURL.lastPathComponent"],
               is(equalTo(@[@"100px-a.jpg", @"10px-b.jpg", @"10px-c.jpg"])));
}

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<testsuites>
  <testsuite name="_/home/miki/Projects/goroot/src/xunit" tests="5" errors="0" failures="1" skip="1">
    <testcase classname="_/home/miki/Projects/goroot/src/xunit" name="TestAdd" time="0.00">

    </testcase>
    <testcase classname="_/home/miki/Projects/goroot/src/xunit" name="TestSub" time="0.00">

    </testcase>
    <testcase classname="_/home/miki/Projects/goroot/src/xunit" name="TestSubFail" time="0.00">

      <failure type="go.error" message="error">
        <![CDATA[	xunit_test.go:22: 3-1 != 3
		Some newline goes here]]>
      </failure>    </testcase>
    <testcase classname="_/home/miki/Projects/goroot/src/xunit" name="TestSubOK" time="0.00">

    </testcase>
    <testcase classname="_/home/miki/Projects/goroot/src/xunit" name="TestSubSkip" time="0.00">
      <skipped/>
    </testcase>
  </testsuite>
  <testsuite name="_/home/miki/Projects/goroot/src/anotherTest" tests="1" errors="0" failures="0" skip="0">
    <testcase classname="_/home/miki/Projects/goroot/src/anotherTest" name="TestAdd" time="0.00">

    </testcase>
  </testsuite>
</testsuites>


text:
<!DOCTYPE html>

<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<title>C4L Asset Management System</title>

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> Toggle navigation    </button>
        Project name

Home

About

Contact

 Dropdown

Action

Another action

Something else here

Nav header

Separated link

One more separated link

Default

Static top

Fixed top

Navbar example

        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        Success! 1 row added

      <form action="http://localhost/php/insert.php" method="post">
        Barcode:
        <input type="text" name="barcode" />

        Serial:
        <input type="text" name="serial" />

        <input type="submit" />
      </form>


text:
import sys

import av

container = av.open(sys.argv[1])
for i, frame in enumerate(container.decode(video=0)):
    frame.to_image().save('sandbox/%04d.jpg' % i)
    if i > 5:
        break


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="rustdoc">
    <meta name="description" content="API documentation for the Rust `OclPrm` trait in crate `ocl`.">
    <meta name="keywords" content="rust, rustlang, rust-lang, OclPrm">

    <title>ocl::traits::OclPrm - Rust</title>

    <link rel="stylesheet" type="text/css" href="../../normalize.css">
    <link rel="stylesheet" type="text/css" href="../../rustdoc.css">
    <link rel="stylesheet" type="text/css" href="../../main.css">

ocl::<wbr>traits

        <form class="search-form js-only">

                <input class="search-input" name="search"
                       autocomplete="off"
                       placeholder="Click or press 'S' to search, '?' for more options…"
                       type="search">

        </form>

Trait ocl::<wbr>traits::<wbr>OclPrm

                       [−]

               [src]

pub unsafe trait OclPrm: 'static + Copy + PartialEq<Self> + Clone + Default + Debug { }

A primitive type usable within OpenCL kernels.

Includes all of the signed, unsigned, and floating point 8 bit - 64 bit
scalar primitives (ex.: cl_char, cl_uint, cl_double) (exception: cl_half)
and their vector counterparts (ex.: cl_int4, cl_float3, cl_short16);

Can also be implemented for custom types as long as layout and
alignment are conserved between Rust and OpenCL (repr "C").

Implementors

impl OclPrm for u8

impl OclPrm for i8

impl OclPrm for u16

impl OclPrm for i16

impl OclPrm for u32

impl OclPrm for i32

impl OclPrm for u64

impl OclPrm for i64

impl OclPrm for usize

impl OclPrm for isize

impl OclPrm for f32

impl OclPrm for f64

impl OclPrm for Char

impl OclPrm for Char2

impl OclPrm for Char3

impl OclPrm for Char4

impl OclPrm for Char8

impl OclPrm for Char16

impl OclPrm for Uchar

impl OclPrm for Uchar2

impl OclPrm for Uchar3

impl OclPrm for Uchar4

impl OclPrm for Uchar8

impl OclPrm for Uchar16

impl OclPrm for Short

impl OclPrm for Short2

impl OclPrm for Short3

impl OclPrm for Short4

impl OclPrm for Short8

impl OclPrm for Short16

impl OclPrm for Ushort

impl OclPrm for Ushort2

impl OclPrm for Ushort3

impl OclPrm for Ushort4

impl OclPrm for Ushort8

impl OclPrm for Ushort16

impl OclPrm for Int

impl OclPrm for Int2

impl OclPrm for Int3

impl OclPrm for Int4

impl OclPrm for Int8

impl OclPrm for Int16

impl OclPrm for Uint

impl OclPrm for Uint2

impl OclPrm for Uint3

impl OclPrm for Uint4

impl OclPrm for Uint8

impl OclPrm for Uint16

impl OclPrm for Long

impl OclPrm for Long2

impl OclPrm for Long3

impl OclPrm for Long4

impl OclPrm for Long8

impl OclPrm for Long16

impl OclPrm for Ulong

impl OclPrm for Ulong2

impl OclPrm for Ulong3

impl OclPrm for Ulong4

impl OclPrm for Ulong8

impl OclPrm for Ulong16

impl OclPrm for Float

impl OclPrm for Float2

impl OclPrm for Float3

impl OclPrm for Float4

impl OclPrm for Float8

impl OclPrm for Float16

impl OclPrm for Double

impl OclPrm for Double2

impl OclPrm for Double3

impl OclPrm for Double4

impl OclPrm for Double8

impl OclPrm for Double16

Help

Keyboard Shortcuts

?

Show this help dialog

S

Focus the search field

⇤

Move up in search results

⇥

Move down in search results

⏎

Go to active search result

+

Collapse/expand all sections

Search Tricks

                    Prefix searches with a type followed by a colon (e.g.
                    fn:) to restrict the search to a given type.

                    Accepted types are: fn, mod,
                    struct, enum,
                    trait, type, macro,
                    and const.

                    Search functions by type signature (e.g.
                    vec -> usize or * -> vec)


text:
class ContentPartners::StatisticsController < ContentPartnersController

  # GET /content_partners/:content_partner_id/statistics
  def show
    @partner = ContentPartner.find(params[:content_partner_id],
                                   include: [ :user, :resources ],
                                   select: 'content_partners.*, users.id, resources.id')
    @page = params[:page] || 1
    last_month = Date.today - 1.month
    @year = (params[:date].blank? || params[:date][:year].blank?) ? last_month.year : params[:date][:year]
    @month = (params[:date].blank? || params[:date][:month].blank?) ? last_month.month : params[:date][:month]
    @partner_summary = @partner.user.google_analytics_partner_summaries.find_by_year_and_month(@year, @month)
    @site_summary = GoogleAnalyticsSummary.find_by_year_and_month(@year, @month)
    @pages = GoogleAnalyticsPageStat.page_summary(@partner.user.id, @year, @month, @page)
    GoogleAnalyticsPageStat.preload_associations(@pages, { taxon_concept: { published_hierarchy_entries: [ :name, :hierarchy ] } } )
    @month_name = Date::MONTHNAMES[@month.to_i]
    set_canonical_urls(for: @partner, paginated: @pages, url_method: :content_partner_statistics_url)
  end
end


text:
package commands

import (
	"cf/commands"
	"github.com/codegangsta/cli"
	testreq "testhelpers/requirements"
	testterm "testhelpers/terminal"
)

var CommandDidPassRequirements bool

func RunCommand(cmd commands.Command, ctxt *cli.Context, reqFactory *testreq.FakeReqFactory) {
	defer func() {
		errMsg := recover()

		if errMsg != nil && errMsg != testterm.FailedWasCalled {
			panic(errMsg)
		}
	}()

	CommandDidPassRequirements = false

	requirements, err := cmd.GetRequirements(reqFactory, ctxt)
	if err != nil {
		return
	}

	for _, requirement := range requirements {
		success := requirement.Execute()
		if !success {
			return
		}
	}

	CommandDidPassRequirements = true
	cmd.Run(ctxt)

	return
}


text:
package com.frameworkset.common.tag.export;

/**
 * 导出列表数据到Pdf文件
 * @author biaoping.yin
 * created on 2005-3-13
 * version 1.0
 */
public class ExportPDF  implements Export{

    /* (non-Javadoc)
     * @see com.frameworkset.common.tag.export.Export#export()
     */
    public Object export(Object out) {
        // TODO Auto-generated method stub
        return null;
    }

}