text:
layout: post
title: Sjálfsskoðun
excerpt: Hvernig ég vil vera vs. hvernig ég er
tags: þunglyndi
comments: true
image:
  feature: i-badi.jpg
published: false
---

Í síðasta þætti af [D.O.N.G.](https://youtu.be/gFw-8PmrPwY) bentu þeir kútar á [sjálfspróf](http://richardstep.com/richardstep-strengths-weaknesses-aptitude-test/free-aptitude-test-find-your-strengths-weaknesses-online-version/) til að finna eigin styrkleika. Það er svolítið skrýtið að uppgötva í miðju prófi að ég veit ekki hvort ég sé að svara spurningunum sem óska-ég eða raun-ég. Ég ákvað að bíta í það súra epli og feisa heiminn og svaraði sem raun-ég. "You keep everyone on task and focused"... óska-ég segi nottla já! En raun-ég þarf að feisa það að það hefur ekkert alltaf gengið upp. Það er aðeins erfiðara að taka svona próf sem raun-ég.

## Niðurstöðurnar

> ### Optimism (94%):
* Look for positions where you can be as close to customers as possible.
* Actively help plan events - like new product launches and user groups.
* Do use your humor and good attitude to excite people.
* Being positive does not mean you'll be in good mood - be aware and let others know, as needed.
* Cynics quickly sap your energy and you dislike cheering negative people - minimize these instances.
* You enjoy celebrating and should actively find ways to recognize achievements.

Uuuu... ókei! Skal gert. Fíla allt sem stendur þarna og oftast eru þessir kostir taldir upp þegar verið er að auglýsa eftir verkefnastjórum eða mannauðsmanneskjum. Í byrjun sumars 2016 fannst mér svo sjálfsagt að ég myndi fljúga inn í næsta starf miðað við reynslu og umsagnir fyrrum samstarfsfólks. Bjartsýnin var mikil. Ég sótti um fá störf því ég var að leita að því eina rétta. Þegar ég fékk það ekki fór ég að efast... það er nefnilega ógeðslega erfitt að finnast maður ekki glataður þegar maður fær engin svör við atvinnuleit.

> ### Determination (94%):
* Constantly be on the lookout for new goals and improvements.
* You're good at initiating and organizing a project, start your own and help others.
* Get feedback from people as others' expectations will energize you.
* Actively participate in helping a bogged down team into action.
* When down, think of new improvements to do tomorrow - stay on track.
* Be careful of those who really want to project and analyze - they are a non-fit for your work style!

> ### Adaptability (88%):
* Your success depends on ability to accommodate the unforeseen.
* You find planning work very boring - find ways to minimize this chore while still achieving.
* Get on teams that need to make progress - you won't sit around and sulk.
* Focus on many quick jobs/tasks rather than long, drawn-out assignments.
* Foster others' desire to learn and experiment by giving them room and tools.
* Goal-setting meetings and career-counseling are boring to you - minimize it.

> ### Leadership (88%):
* You are good at getting projects moving again or persuading people to get stuff going - do it!
* Take opportunities to give evaluations of what is happening in company - your straight answers can help.
* You do not like to be supervised closely - make sure others are aware of this.
* You might empire-build, upset colleagues, get off-focus, ignore commitments - be aware and try to avoid.
* You may tend to intimidate others with up-front, aggressive style - let them know it is not personal.
* Your time may be better spent helping others understand you than trying to change you.

Your Remaining Results Are:

Resourcefulness (81%):
Curiosity (81%):
Integrity (81%):
Salesmanship (81%):
Purpose (81%):
Risk Taking (75%):
Visionary (69%):
Teamwork (69%):
Problem Solving (69%):
Communication (69%):
Ambition (63%):
Innovation (63%):
Focus (63%):
Strategic Thinking (56%):
Self Motivation (50%):

## Your Bottom 1 Weakness Is:

> ### Balance (50%):
* You bring structure to chaotic situations - you don't rest until order restored. Seek teams that need your help.
* Clutter will greatly annoy you - make every effort to enhance your organizational and planning systems.
* Always seek advance notice of deadlines, meetings, and project milestones.
* Surprises are distressing to you and can ruin your day - help others understand the way you operate.
* Actively take time out to prioritize your tasks and goals.
* Offer to help with time management and department processes.
* Continually work out possible outcome paths ahead of time to prepare for the unknowns.


text:
   Copyright 2014 Google Inc. All Rights Reserved.
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
         http://www.apache.org/licenses/LICENSE-2.0
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
]]--

--[[ Creates clones of the given network.
The clones share all weights and gradWeights with the original network.
Accumulating of the gradients sums the gradients properly.
The clone also allows parameters for which gradients are never computed
to be shared. Such parameters must be returns by the parametersNoGrad
method, which can be null.
--]]
function oxnn.cloneManyTimes(net, T)
   local clones = {}
   local params, gradParams = net:parameters()
   if params == nil then
      params = {}
   end
   local paramsNoGrad
   if net.parametersNoGrad then
      paramsNoGrad = net:parametersNoGrad()
   end
   local mem = torch.MemoryFile("w"):binary()
   mem:writeObject(net)
   for t = 1, T do
      -- We need to use a new reader for each clone.
      -- We don't want to use the pointers to already read objects.
      local reader = torch.MemoryFile(mem:storage(), "r"):binary()
      local clone = reader:readObject()
      reader:close()
      local cloneParams, cloneGradParams = clone:parameters()
      local cloneParamsNoGrad
      for i = 1, #params do
         cloneParams[i]:set(params[i])
         cloneGradParams[i]:set(gradParams[i])
      end
      if paramsNoGrad then
         cloneParamsNoGrad = clone:parametersNoGrad()
         for i =1,#paramsNoGrad do
            cloneParamsNoGrad[i]:set(paramsNoGrad[i])
         end
      end
      clones[t] = clone
      collectgarbage()
   end
   mem:close()
   return clones
end

-- Authors: Tomas Kocisky
-- (Modification of above.)
function oxnn.cloneManyTimesFast(net, T)
   local clones = {}
   local params, gradParams = net:parameters()
   if params == nil then
      params = {}
   end
   local paramsNoGrad
   if net.parametersNoGrad then
      paramsNoGrad = net:parametersNoGrad()
   end
   local mem = torch.MemoryFile("w"):binary()
   mem:writeObject(net)

   -- serialize an empty clone for faster cloning
   do
      local reader = torch.MemoryFile(mem:storage(), "r"):binary()
      local clone = reader:readObject()
      reader:close()
      local cloneParams, cloneGradParams = clone:parameters()
      local cloneParamsNoGrad
      for i = 1, #params do
         cloneParams[i]:set(torch.Tensor():typeAs(params[i]))
         cloneGradParams[i]:set(torch.Tensor():typeAs(gradParams[i]))
      end
      if paramsNoGrad then
         cloneParamsNoGrad = clone:parametersNoGrad()
         for i =1,#paramsNoGrad do
            cloneParamsNoGrad[i]:set(torch.Tensor():typeAs(paramsNoGrad[i]))
         end
      end

      mem:close()
      mem = torch.MemoryFile("w"):binary()
      mem:writeObject(clone)
   end
   collectgarbage()

   for t = 1, T do
      -- We need to use a new reader for each clone.
      -- We don't want to use the pointers to already read objects.
      local reader = torch.MemoryFile(mem:storage(), "r"):binary()
      local clone = reader:readObject()
      reader:close()
      local cloneParams, cloneGradParams = clone:parameters()
      local cloneParamsNoGrad
      for i = 1, #params do
         cloneParams[i]:set(params[i])
         cloneGradParams[i]:set(gradParams[i])
      end
      if paramsNoGrad then
         cloneParamsNoGrad = clone:parametersNoGrad()
         for i =1,#paramsNoGrad do
            cloneParamsNoGrad[i]:set(paramsNoGrad[i])
         end
      end
      clones[t] = clone
      collectgarbage()
   end
   mem:close()
   return clones
end

redpajama_set_name: RedPajamaGithub


text:
import React, { useState } from 'react';
import { Form, Link } from '@strapi/helper-plugin';
import EyeStriked from '@strapi/icons/EyeStriked';
import Eye from '@strapi/icons/Eye';
import { Box } from '@strapi/design-system/Box';
import { Stack } from '@strapi/design-system/Stack';
import { Main } from '@strapi/design-system/Main';
import { Flex } from '@strapi/design-system/Flex';
import { Button } from '@strapi/design-system/Button';
import { TextInput } from '@strapi/design-system/TextInput';
import { Checkbox } from '@strapi/design-system/Checkbox';
import { Typography } from '@strapi/design-system/Typography';
import PropTypes from 'prop-types';
import { useIntl } from 'react-intl';
import styled from 'styled-components';
import { Formik } from 'formik';
import { Column, LayoutContent } from '../../../../layouts/UnauthenticatedLayout';
import Logo from '../../../../components/UnauthenticatedLogo';
import FieldActionWrapper from '../FieldActionWrapper';

const PasswordInput = styled(TextInput)`
  ::-ms-reveal {
    display: none;
  }
`;

const Login = ({ onSubmit, schema, children }) => {
  const [passwordShown, setPasswordShown] = useState(false);
  const { formatMessage } = useIntl();

  return (
    <Main>
      <LayoutContent>
        <Formik
          enableReinitialize
          initialValues={{
            email: '',
            password: '',
            rememberMe: false,
          }}
          onSubmit={onSubmit}
          validationSchema={schema}
          validateOnChange={false}
        >
          {({ values, errors, handleChange }) => (
            <Form noValidate>
              <Column>
                <Logo />
                <Box paddingTop={6} paddingBottom={1}>
                  <Typography variant="alpha" as="h1">
                    {formatMessage({
                      id: 'Auth.form.welcome.title',
                      defaultMessage: 'Welcome!',
                    })}
                  </Typography>
                </Box>
                <Box paddingBottom={7}>
                  <Typography variant="epsilon" textColor="neutral600">
                    {formatMessage({
                      id: 'Auth.form.welcome.subtitle',
                      defaultMessage: 'Log in to your Strapi account',
                    })}
                  </Typography>
                </Box>
                {errors.errorMessage && (
                  <Typography
                    id="global-form-error"
                    role="alert"
                    tabIndex={-1}
                    textColor="danger600"
                  >
                    {errors.errorMessage}
                  </Typography>
                )}
              </Column>

              <Stack spacing={6}>
                <TextInput
                  error={
                    errors.email
                      ? formatMessage({
                          id: errors.email,
                          defaultMessage: 'This value is required.',
                        })
                      : ''
                  }
                  value={values.email}
                  onChange={handleChange}
                  label={formatMessage({ id: 'Auth.form.email.label', defaultMessage: 'Email' })}
                  placeholder={formatMessage({
                    id: 'Auth.form.email.placeholder',
                    defaultMessage: 'kai@doe.com',
                  })}
                  name="email"
                  required
                />
                <PasswordInput
                  error={
                    errors.password
                      ? formatMessage({
                          id: errors.password,
                          defaultMessage: 'This value is required.',
                        })
                      : ''
                  }
                  onChange={handleChange}
                  value={values.password}
                  label={formatMessage({
                    id: 'global.password',
                    defaultMessage: 'Password',
                  })}
                  name="password"
                  type={passwordShown ? 'text' : 'password'}
                  endAction={
                    <FieldActionWrapper
                      onClick={e => {
                        e.stopPropagation();
                        setPasswordShown(prev => !prev);
                      }}
                      label={formatMessage(
                        passwordShown
                          ? {
                              id: 'Auth.form.password.show-password',
                              defaultMessage: 'Show password',
                            }
                          : {
                              id: 'Auth.form.password.hide-password',
                              defaultMessage: 'Hide password',
                            }
                      )}
                    >
                      {passwordShown ? <Eye /> : <EyeStriked />}
                    </FieldActionWrapper>
                  }
                  required
                />
                <Checkbox
                  onValueChange={checked => {
                    handleChange({ target: { value: checked, name: 'rememberMe' } });
                  }}
                  value={values.rememberMe}
                  aria-label="rememberMe"
                  name="rememberMe"
                >
                  {formatMessage({
                    id: 'Auth.form.rememberMe.label',
                    defaultMessage: 'Remember me',
                  })}
                </Checkbox>
                <Button fullWidth type="submit">
                  {formatMessage({ id: 'Auth.form.button.login', defaultMessage: 'Login' })}
                </Button>
              </Stack>
            </Form>
          )}
        </Formik>
        {children}
      </LayoutContent>
      <Flex justifyContent="center">
        <Box paddingTop={4}>
          <Link to="/auth/forgot-password">
            {formatMessage({
              id: 'Auth.link.forgot-password',
              defaultMessage: 'Forgot your password?',
            })}
          </Link>
        </Box>
      </Flex>
    </Main>
  );
};

Login.defaultProps = {
  children: null,
  onSubmit: () => {},
};

Login.propTypes = {
  children: PropTypes.node,
  onSubmit: PropTypes.func,
  schema: PropTypes.shape({
    type: PropTypes.string.isRequired,
  }).isRequired,
};

export default Login;


text:
<?php

namespace Web\MediaBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class WebMediaBundle extends Bundle
{

    public function getParent()
    {
        return 'AntMediaBundle';
    }
}


text:
package cd.syna.geotools.dao;
import cd.syna.geotools.bean.Restaurant;
import java.sql.Connection;
import java.util.ArrayList;
/**
 *
 * @author KeeG Ekamus pro
 */
public class RestaurantDAO extends AbstractDAO <Restaurant>  {

    public  RestaurantDAO(Connection  v){

    super(v);
}
    @Override
    public boolean add(Restaurant obj) {

        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public boolean update(Restaurant obj, String c) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public Restaurant findById(String c) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public Restaurant findByName(String c) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public ArrayList<Restaurant> readAll() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public ArrayList readNameOnly() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public boolean delete(String c) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public Restaurant findById(int c) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean delete(int c) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}


text:
package kg.apc.jmeter.threads;

import kg.apc.charting.AbstractGraphRow;
import kg.apc.charting.DateTimeRenderer;
import kg.apc.charting.GraphPanelChart;
import kg.apc.charting.rows.GraphRowSumValues;
import kg.apc.jmeter.JMeterPluginsUtils;
import kg.apc.jmeter.gui.GuiBuilderHelper;
import org.apache.jmeter.control.LoopController;
import org.apache.jmeter.control.gui.LoopControlPanel;
import org.apache.jmeter.engine.util.CompoundVariable;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.threads.AbstractThreadGroup;
import org.apache.jmeter.threads.JMeterThread;
import org.apache.jmeter.threads.gui.AbstractThreadGroupGui;
import org.apache.jorphan.collections.HashTree;

import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.util.concurrent.ConcurrentHashMap;

@Deprecated
public class SteppingThreadGroupGui
        extends AbstractThreadGroupGui {

    private class FieldChangesListener implements DocumentListener {

        private final JTextField tf;

        public FieldChangesListener(JTextField field) {
            tf = field;
        }

        private void update() {
            refreshPreview();
        }

        @Override
        public void insertUpdate(DocumentEvent e) {
            if (tf.hasFocus()) {
                update();
            }
        }

        @Override
        public void removeUpdate(DocumentEvent e) {
            if (tf.hasFocus()) {
                update();
            }
        }

        @Override
        public void changedUpdate(DocumentEvent e) {
            if (tf.hasFocus()) {
                update();
            }
        }
    }

    public static final String WIKIPAGE = "SteppingThreadGroup";

    protected ConcurrentHashMap<String, AbstractGraphRow> model;
    private GraphPanelChart chart;
    private JTextField initialDelay;
    private JTextField incUserCount;
    private JTextField incUserCountBurst;
    private JTextField incUserPeriod;
    private JTextField flightTime;
    private JTextField decUserCount;
    private JTextField decUserPeriod;
    private JTextField totalThreads;
    private LoopControlPanel loopPanel;
    private JTextField rampUp;

    public SteppingThreadGroupGui() {
        super();
        init();
        initGui();
    }

    protected final void init() {
        JMeterPluginsUtils.addHelpLinkToPanel(this, WIKIPAGE);
        JPanel containerPanel = new JPanel(new BorderLayout());

        containerPanel.add(createParamsPanel(), BorderLayout.NORTH);

        chart = new GraphPanelChart(false, true);
        model = new ConcurrentHashMap<>();
        chart.setRows(model);
        chart.getChartSettings().setDrawFinalZeroingLines(true);

        chart.setxAxisLabel("Elapsed time");
        chart.setYAxisLabel("Number of active threads");

        chart.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED));

        containerPanel.add(GuiBuilderHelper.getComponentWithMargin(chart, 2, 2, 0, 2), BorderLayout.CENTER);

        add(containerPanel, BorderLayout.CENTER);

        // this magic LoopPanel provides functionality for thread loops
        createControllerPanel();
    }

    @Override
    public void clearGui() {
        super.clearGui();
        initGui();
    }

    // Initialise the gui field values
    private void initGui() {
        totalThreads.setText("100");
        initialDelay.setText("0");
        incUserCount.setText("10");
        incUserCountBurst.setText("0");
        incUserPeriod.setText("30");
        flightTime.setText("60");
        decUserCount.setText("5");
        decUserPeriod.setText("1");
        rampUp.setText("5");
    }

    private JPanel createParamsPanel() {
        JPanel panel = new JPanel(new GridLayout(0, 5, 5, 5));
        panel.setBorder(BorderFactory.createTitledBorder("Threads Scheduling Parameters"));

        panel.add(new JLabel("This group will start", JLabel.RIGHT));
        totalThreads = new JTextField(5);
        panel.add(totalThreads);
        panel.add(new JLabel("threads:", JLabel.LEFT));
        panel.add(new JLabel());
        panel.add(new JLabel());

        panel.add(new JLabel("First, wait for", JLabel.RIGHT));
        initialDelay = new JTextField(5);
        panel.add(initialDelay);
        panel.add(new JLabel("seconds;", JLabel.LEFT));
        panel.add(new JLabel());
        panel.add(new JLabel());

        panel.add(new JLabel("Then start", JLabel.RIGHT));
        incUserCountBurst = new JTextField(5);
        panel.add(incUserCountBurst);
        panel.add(new JLabel("threads; ", JLabel.LEFT));
        panel.add(new JLabel(""));
        panel.add(new JLabel());

        panel.add(new JLabel("Next, add", JLabel.RIGHT));
        incUserCount = new JTextField(5);
        panel.add(incUserCount);
        panel.add(new JLabel("threads every", JLabel.CENTER));
        incUserPeriod = new JTextField(5);
        panel.add(incUserPeriod);
        panel.add(new JLabel("seconds, ", JLabel.LEFT));

        panel.add(new JLabel());
        panel.add(new JLabel());
        panel.add(new JLabel("using ramp-up", JLabel.RIGHT));
        rampUp = new JTextField(5);
        panel.add(rampUp);
        panel.add(new JLabel("seconds.", JLabel.LEFT));

        panel.add(new JLabel("Then hold load for", JLabel.RIGHT));
        flightTime = new JTextField(5);
        panel.add(flightTime);
        panel.add(new JLabel("seconds.", JLabel.LEFT));
        panel.add(new JLabel());
        panel.add(new JLabel());

        panel.add(new JLabel("Finally, stop", JLabel.RIGHT));
        decUserCount = new JTextField(5);
        panel.add(decUserCount);
        panel.add(new JLabel("threads every", JLabel.CENTER));
        decUserPeriod = new JTextField(5);
        panel.add(decUserPeriod);
        panel.add(new JLabel("seconds.", JLabel.LEFT));

        registerJTextfieldForGraphRefresh(totalThreads);
        registerJTextfieldForGraphRefresh(initialDelay);
        registerJTextfieldForGraphRefresh(incUserCount);
        registerJTextfieldForGraphRefresh(incUserCountBurst);
        registerJTextfieldForGraphRefresh(incUserPeriod);
        registerJTextfieldForGraphRefresh(flightTime);
        registerJTextfieldForGraphRefresh(decUserCount);
        registerJTextfieldForGraphRefresh(decUserPeriod);
        registerJTextfieldForGraphRefresh(rampUp);

        return panel;
    }

    @Override
    public String getLabelResource() {
        return this.getClass().getSimpleName();
    }

    @Override
    public String getStaticLabel() {
        return JMeterPluginsUtils.prefixLabel("Stepping Thread Group (deprecated)");
    }

    @Override
    public TestElement createTestElement() {
        SteppingThreadGroup tg = new SteppingThreadGroup();
        modifyTestElement(tg);
        tg.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE));
        return tg;
    }

    private void refreshPreview() {
        SteppingThreadGroup tgForPreview = new SteppingThreadGroup();
        tgForPreview.setNumThreads(new CompoundVariable(totalThreads.getText()).execute());
        tgForPreview.setThreadGroupDelay(new CompoundVariable(initialDelay.getText()).execute());
        tgForPreview.setInUserCount(new CompoundVariable(incUserCount.getText()).execute());
        tgForPreview.setInUserCountBurst(new CompoundVariable(incUserCountBurst.getText()).execute());
        tgForPreview.setInUserPeriod(new CompoundVariable(incUserPeriod.getText()).execute());
        tgForPreview.setOutUserCount(new CompoundVariable(decUserCount.getText()).execute());
        tgForPreview.setOutUserPeriod(new CompoundVariable(decUserPeriod.getText()).execute());
        tgForPreview.setFlightTime(new CompoundVariable(flightTime.getText()).execute());
        tgForPreview.setRampUp(new CompoundVariable(rampUp.getText()).execute());

        if (tgForPreview.getInUserCountAsInt() == 0) {
            tgForPreview.setInUserCount(new CompoundVariable(totalThreads.getText()).execute());
        }
        if (tgForPreview.getOutUserCountAsInt() == 0) {
            tgForPreview.setOutUserCount(new CompoundVariable(totalThreads.getText()).execute());
        }

        updateChart(tgForPreview);
    }

    @Override
    public void modifyTestElement(TestElement te) {
        super.configureTestElement(te);

        if (te instanceof SteppingThreadGroup) {
            SteppingThreadGroup tg = (SteppingThreadGroup) te;
            tg.setProperty(SteppingThreadGroup.NUM_THREADS, totalThreads.getText());
            tg.setThreadGroupDelay(initialDelay.getText());
            tg.setInUserCount(incUserCount.getText());
            tg.setInUserCountBurst(incUserCountBurst.getText());
            tg.setInUserPeriod(incUserPeriod.getText());
            tg.setOutUserCount(decUserCount.getText());
            tg.setOutUserPeriod(decUserPeriod.getText());
            tg.setFlightTime(flightTime.getText());
            tg.setRampUp(rampUp.getText());
            tg.setSamplerController((LoopController) loopPanel.createTestElement());

            refreshPreview();
        }
    }

    @Override
    public void configure(TestElement te) {
        super.configure(te);
        SteppingThreadGroup tg = (SteppingThreadGroup) te;
        totalThreads.setText(tg.getNumThreadsAsString());
        initialDelay.setText(tg.getThreadGroupDelay());
        incUserCount.setText(tg.getInUserCount());
        incUserCountBurst.setText(tg.getInUserCountBurst());
        incUserPeriod.setText(tg.getInUserPeriod());
        decUserCount.setText(tg.getOutUserCount());
        decUserPeriod.setText(tg.getOutUserPeriod());
        flightTime.setText(tg.getFlightTime());
        rampUp.setText(tg.getRampUp());

        TestElement controller = (TestElement) tg.getProperty(AbstractThreadGroup.MAIN_CONTROLLER).getObjectValue();
        if (controller != null) {
            loopPanel.configure(controller);
        }
    }

    private void updateChart(SteppingThreadGroup tg) {
        model.clear();

        GraphRowSumValues row = new GraphRowSumValues();
        row.setColor(Color.RED);
        row.setDrawLine(true);
        row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
        row.setDrawThickLines(true);

        final HashTree hashTree = new HashTree();
        hashTree.add(new LoopController());
        JMeterThread thread = new JMeterThread(hashTree, null, null);

        long now = System.currentTimeMillis();

        // test start
        chart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, now - 1)); //-1 because row.add(thread.getStartTime() - 1, 0)
        row.add(now, 0);
        row.add(now + tg.getThreadGroupDelayAsInt(), 0);

        int numThreads = tg.getNumThreads();

        // users in
        for (int n = 0; n < numThreads; n++) {
            thread.setThreadNum(n);
            tg.scheduleThread(thread, now);
            row.add(thread.getStartTime() - 1, 0);
            row.add(thread.getStartTime(), 1);
        }

        // users out
        for (int n = 0; n < numThreads; n++) {
            thread.setThreadNum(n);
            tg.scheduleThread(thread, now);
            row.add(thread.getEndTime() - 1, 0);
            row.add(thread.getEndTime(), -1);
        }

        model.put("Expected Active Users Count", row);
        chart.invalidateCache();
        chart.repaint();
    }

    private JPanel createControllerPanel() {
        loopPanel = new LoopControlPanel(false);
        LoopController looper = (LoopController) loopPanel.createTestElement();
        looper.setLoops(-1);
        looper.setContinueForever(true);
        loopPanel.configure(looper);
        return loopPanel;
    }

    private void registerJTextfieldForGraphRefresh(final JTextField tf) {
        tf.addActionListener(loopPanel);
        tf.getDocument().addDocumentListener(new FieldChangesListener(tf));
    }
}


text:
import { Notification } from "@bitrise/bitkit";
import { WFEWindow } from "../../../typings/global";

const YmlNotFoundInRepositoryError = (): JSX.Element => (
	<Notification status="error">{(window as WFEWindow).strings["yml"]["store_in_repository"]["not_found"]}</Notification>
);

export default YmlNotFoundInRepositoryError;


text:
class ProjectsController < ApplicationController
  before_action :ensure_logged_in, except: [:index, :filter]
  before_action :set_project, only: [:edit, :update, :destroy, :reactivate]

  respond_to :html
  respond_to :json, only: :index
  respond_to :js, only: [:index, :filter]

  def index
    @labels = labels
    @languages = languages
    session[:filter_options] = search_params.slice(:languages, :labels)
    search = ProjectSearch.new(search_params)
    @projects = search.call.includes(:labels)
    @has_more_projects = search.more?
    respond_with @projects
  end

  def new
    @project = Project.new
    @project.main_language = language if language
  end

  def create
    @project = current_user.projects.build(project_params)
    @project.contributing_url = @project.contrib_url(current_user.nickname, current_user.token)
    if @project.save
      redirect_to projects_path
    else
      render :new
    end
  end

  def edit
    redirect_to root_path, notice: "You can't edit this project!" unless @project.present?
  end

  def destroy
    if @project.inactive?
      @project.destroy!
      flash[:notice] = "#{@project.name} has been deleted."
    else
      @project.deactivate!
      flash[:notice] = "#{@project.name} has been deactivated."
    end
    redirect_back(fallback_location: projects_path)
  end

  def update
    if @project.update(editable_project_params)
      redirect_to projects_path(user: current_user), notice: 'Project updated successfully!'
    else
      render :edit
    end
  end

  def reactivate
    @project.reactivate!
    flash[:notice] = "#{@project.name} has been reactivated."
    redirect_back(fallback_location: projects_path)
  end

  def claim
    project = Project.find_by_github_repo(github_url)

    if project.present? && project.submitted_by.nil?
      project.update_attribute(:user_id, current_user.id)
      message = "You have successfully claimed <b>#{github_url}</b>".html_safe
    else
      message = "This repository doesn't exist or belongs to someone else"
    end

    redirect_to my_suggestions_path, notice: message
  end

  def autofill
    url = params[:repo].gsub(/\/$/, '')
    request = repo_with_labels(url)
    render json: request[:data], status: request[:status]
  end

  protected

  def search_params
    { languages: languages, labels: labels, page: params[:page] }
  end

  def repo_with_labels(url)
    RepoWithLabels.new(current_user.github_client, url).call
  end

  def project_params
    params.require(:project).permit(:description, :github_url, :homepage, :name, :main_language, :contributing_url, label_ids: [])
  end

  def editable_project_params
    params.require(:project).permit(:description, :name, :main_language, label_ids: [])
  end

  def language
    params[:language]
  end

  def languages
    Array(params.fetch(:project, {}).fetch(:languages, session.fetch(:filter_options, {}).fetch(:languages, (current_user.try(:languages) || []))))
  end

  def labels
    params.fetch(:project, {}).fetch(:labels, [])
  end

  def github_url
    params[:project][:github_url]
  end

  def set_project
    @project = current_user.projects.find_by_id(params[:id])

    redirect_to user_path(current_user), notice: 'You can only edit projects you have suggested!' unless @project.present?
  end

  def objectname
    Project.find_by_id(params[:id]).try(:name)
  end
end


text:
package org.apache.river.api.lookup;

import java.io.IOException;
import net.jini.core.lookup.ServiceRegistrar;
import net.jini.core.lookup.ServiceTemplate;
import net.jini.core.lookup.ServiceItem;
import org.apache.river.api.util.ResultStream;

/**
 *

 * Defines an extension interface to the lookup service, for use on large or
 * global networks such as the internet or low bandwidth networks.
 * The interface is not a remote interface; each implementation of the
 * lookup service exports proxy objects that implement the
 * StreamServiceRegistrar interface local to the client, using an
 * implementation-specific protocol to communicate with the actual remote
 * server.  All of the proxy methods obey normal RMI remote interface
 * semantics except where explicitly noted.  Two proxy objects are equal if
 * they are proxies for the same lookup service.  Every method invocation
 * (on both StreamServiceRegistrar and ServiceRegistration) is atomic with
 * respect to other invocations.
 *

 * StreamServiceRegistrar is intended to perform the same function
 * as ServiceRegistrar, but with the ability to return results as a
 * stream, so memory consumption is minimised at the client and network
 * communication is minimised between the client and lookup service server.
 *

 * @see ServiceRegistrar
 * @see ServiceRegistration
 *
 * @since 2.2.1
 */
public interface StreamServiceRegistrar extends ServiceRegistrar{

    /**
     * Returns a ResultStream that provides access to ServiceClasspathSubItem
     * instances.  The ResultStream terminates with a null value.  The result
     * stream may be infinite, or limited by an integer limit value.
     *
     * A ServiceClasspathSubItem implementation instance is a ServiceItem that
     * contains only Objects that are resolvable on the local classpath,
     * this is useful for clients to perform filtering before requiring a
     * download of the actual ServiceItem.
     *
     * The ResultStream should be closed once the desired service has been
     * found, or services have been processed.
     *
     * @param tmpl template to match
     * specified template
     *
     * @param maxBatchSize held locally, larger batch sizes reduce network
     * traffic, but may delay processing locally depending on implementation.
     * @param limit - Zero for infinite, otherwise limits the number of matching
     * results.
     * @return ResultStream containing ServiceItem's
     * @throws java.io.IOException
     * @see ServiceItem
     * @see ServiceClasspathSubItem
     * @see ResultStream
     * @see ServiceResultStreamFilter
     * @see ResultStreamUnmarshaller
     * @since 2.2.0
     */
    ResultStream lookup(ServiceTemplate tmpl, Class[] entryClasses,
            int maxBatchSize, int limit)  throws IOException;
}


text:
layout: post
title:  "Who am I?"
subtitle: "This is the subtitle"
date:   2016-01-20 00:11:17 -0800
categories: Technology
---
This is my inagural post. I pose the question, 'Who am I?' Zoolander has taught us all that there is more to life than being really, really, ridiculously good-looking.

Continue blog post here....

Continue blog post here....

Continue blog post here....


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

namespace WorldBankBBS.WCF.Data.Models
{
    [DataContract]
    public partial class Publication
    {
        public Publication()
        {
            this.PublicationArticles = new HashSet<PublicationArticle>();
        }

        [DataMember]
        public System.Guid PublicationUID { get; set; }
        [DataMember]
        public string PublicationName { get; set; }
        [DataMember]
        public string PuplicationIssue { get; set; }
        [DataMember]
        public Nullable<System.DateTime> PublicationDate { get; set; }
        [DataMember]
        public string PublicationURL { get; set; }
        [DataMember]
        public string PublicationDescription { get; set; }

        [DataMember]
        public virtual ICollection<PublicationArticle> PublicationArticles { get; set; }
    }
}


text:
package com.ysheng.auth.sdk.api.resource;

import com.ysheng.auth.common.restful.BaseClient;
import com.ysheng.auth.model.api.ApiList;
import com.ysheng.auth.model.api.client.Client;
import com.ysheng.auth.model.api.client.ClientRegistrationSpec;
import com.ysheng.auth.model.api.client.ClientUnregistrationSpec;
import com.ysheng.auth.common.restful.RestClient;
import org.apache.http.HttpStatus;
import org.apache.http.concurrent.FutureCallback;

import javax.ws.rs.core.UriBuilder;

/**
 * Defines the APIs related to client operations.
 */
public class ClientApi extends BaseClient {

  private static final String CLIENTS_PATH = "/clients";

  private static final String CLIENT_PATH = CLIENTS_PATH + "/{id}";

  private static final String UNREGISTER_CLIENT_PATH = CLIENT_PATH + "/unregister";

  /**
   * Constructs a ClientApi object.
   *
   * @param restClient The client that performs RESTful operations.
   */
  public ClientApi(RestClient restClient) {
    super(restClient);
  }

  /**
   * Registers a client synchronously.
   *
   * @param spec The client registration spec.
   * @return The client object newly registered.
   * @throws Exception The error that contains detail information.
   */
  public Client register(final ClientRegistrationSpec spec) throws Exception {
    return post(
        CLIENTS_PATH,
        spec,
        HttpStatus.SC_CREATED);
  }

  /**
   * Registers a client asynchronously.
   *
   * @param spec The client registration spec.
   * @param responseHandler The handler that handles the newly registered client.
   * @throws Exception The error that contains detail information.
   */
  public void registerAsync(
      final ClientRegistrationSpec spec,
      final FutureCallback<Client> responseHandler) throws Exception {
    postAsync(
        CLIENTS_PATH,
        spec,
        HttpStatus.SC_CREATED,
        responseHandler);
  }

  /**
   * Lists the clients synchronously.
   *
   * @return A list of clients.
   * @throws Exception The error that contains detail information.
   */
  public ApiList<Client> list() throws Exception {
    return get(
        CLIENTS_PATH,
        HttpStatus.SC_OK);
  }

  /**
   * Lists the clients asynchronously.
   *
   * @param responseHandler The handler that handles the retrieved client list.
   * @throws Exception The error that contains detail information.
   */
  public void listAsync(
      final FutureCallback<ApiList<Client>> responseHandler) throws Exception {
    getAsync(
        CLIENTS_PATH,
        HttpStatus.SC_OK,
        responseHandler);
  }

  /**
   * Gets a client synchronously that matches the client identifier.
   *
   * @param clientId The client identifier to be matched.
   * @@return The client object.
   * @throws Exception The error that contains detail information.
   */
  public Client get(final String clientId) throws Exception {
    return get(
        UriBuilder.fromPath(CLIENT_PATH).build(clientId).toString(),
        HttpStatus.SC_OK);
  }

  /**
   * Gets a client asynchronously that matches the client identifier.
   *
   * @param clientId The client identifier to be matched.
   * @param responseHandler The handler that handles the retrieved client.
   * @throws Exception The error that contains detail information.
   */
  public void getAsync(
      final String clientId,
      final FutureCallback<Client> responseHandler) throws Exception {
    getAsync(
        UriBuilder.fromPath(CLIENT_PATH).build(clientId).toString(),
        HttpStatus.SC_OK,
        responseHandler);
  }

  /**
   * Unregisters a client synchronously that matches the client identifier.
   *
   * @param clientId The client identifier to be matched.
   * @param spec The client unregistration spec.
   * @throws Exception The error that contains detail information.
   */
  public void unregister(
      final String clientId,
      final ClientUnregistrationSpec spec) throws Exception {
    post(
        UriBuilder.fromPath(UNREGISTER_CLIENT_PATH).build(clientId).toString(),
        spec,
        HttpStatus.SC_CREATED);
  }

  /**
   * Unregisters a client asynchronously that matches the client identifier.
   *
   * @param clientId The client identifier to be matched.
   * @param spec The client unregistration spec.
   * @param responseHandler The handler that handles the client unregistration.
   * @throws Exception The error that contains detail information.
   */
  public void unregisterAsync(
      final String clientId,
      final ClientUnregistrationSpec spec,
      final FutureCallback<Void> responseHandler) throws Exception {
    postAsync(
        UriBuilder.fromPath(UNREGISTER_CLIENT_PATH).build(clientId).toString(),
        spec,
        HttpStatus.SC_CREATED,
        responseHandler);
  }
}


text:
ruby_version = '2.0.0'
bash "install ruby because rvm cookbook freaks out" do
  #for some reason, rvm thinks src is already extracted but its not so configure or make will fail.  makes no sense
  #uninstall the whole thing in attempt to cleanse anything that could be misconstrued
  code "/var/lib/jenkins/.rvm/bin/rvm uninstall #{ruby_version} && /var/lib/jenkins/.rvm/bin/rvm install #{ruby_version} --verify-downloads 1"
  user 'jenkins'
  not_if "/var/lib/jenkins/.rvm/bin/rvm list strings | grep ruby-#{ruby_version}", :user => 'jenkins'
end


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

public class ResetGame : MonoBehaviour {
	public GameObject eventSystem;
	private FadeController fadeController;

	void Start(){
        fadeController = gameObject.GetComponent<FadeController>();
    }
	void Update(){
		if(Input.GetButtonUp("Submit") && !fadeController.isDone){
            fadeController.FadeOut();
        }
        if(fadeController.isDone){
            SceneManager.LoadScene("splashScreen.scene");
        }
	}
}


text:
UIColor+iOS9Colors

Here you will find a UIColor category with the 15 flat colors used by the Maps application on iOS 9 in the search categories feature. This makes a great set for using in your own app targeting the iOS 9 UI theme. I had tried previous flat color sets but nothing looked as good as Apple's own flat colors used in Maps, so I thought I would create the set and share them here. Here are examples of all the colors, note some are duplicated:

##Orange, Yellow, Pink, Blue##
![](https://cloud.githubusercontent.com/assets/916912/12306812/a7a338a2-ba33-11e5-83b1-16d8878b80af.png)

##Light Blue, Light Green, Yellow, Light Grey##
![](https://cloud.githubusercontent.com/assets/916912/12306943/58bc1d84-ba34-11e5-8712-9ea492869951.png)

##Purple, Yellow, Red, Grey##
![](https://cloud.githubusercontent.com/assets/916912/12307071/fcd504b2-ba34-11e5-8b5e-262f12627afc.png)

##Light Pink, Yellow, Light Pink, Light Pink##
![](https://cloud.githubusercontent.com/assets/916912/12307124/4e5c2bbc-ba35-11e5-82da-da082525e91e.png)

##Blue, Green, Blue##
![](https://cloud.githubusercontent.com/assets/916912/12307494/7485442a-ba37-11e5-9cad-ad6d5a2d8f94.png)

##Orange, Yellow, Brown, Yellow##
![](https://cloud.githubusercontent.com/assets/916912/12307217/cad38212-ba35-11e5-8acf-53944290121f.png)

##Light Brown##
![](https://cloud.githubusercontent.com/assets/916912/12306996/9fe5f360-ba34-11e5-9efc-e6c3e0729683.png)

##Aqua##
![](https://cloud.githubusercontent.com/assets/916912/12307045/dc3bf972-ba34-11e5-9da8-0724ea164b7b.png)


text:
'use strict';

// Setting up route
angular.module('users').config(['$stateProvider',
	function($stateProvider) {
		// Users state routing
		$stateProvider.
        state('editProfile', {
            url: '/settings/editProfile',
            templateUrl: 'modules/users/views/settings/edit-profile.client.view.html'
        }).
		state('forgot', {
			url: '/password/forgot',
			templateUrl: 'modules/users/views/password/forgot-password.client.view.html'
		}).
		state('reset-invlaid', {
			url: '/password/reset/invalid',
			templateUrl: 'modules/users/views/password/reset-password-invalid.client.view.html'
		}).
		state('reset-success', {
			url: '/password/reset/success',
			templateUrl: 'modules/users/views/password/reset-password-success.client.view.html'
		}).
		state('reset', {
			url: '/password/reset/:token',
			templateUrl: 'modules/users/views/password/reset-password.client.view.html'
		}).
        state('signIn', {
            url: '/authentication/signin',
            templateUrl: 'modules/users/views/authentication/signin.client.view.html'
        });
	}
]);


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.WindowsAzure.Storage;
using SerialLabs.Data.AzureTable.Queries;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace SerialLabs.Data.AzureTable.Tests
{
    [TestClass]
    public class TableStorageWriterTest
    {

        [TestMethod]
        [ExpectedException(typeof(StorageException))]
        public void TableStorageWriter_DuplicateInsertBatch_WithException()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            Assert.AreEqual(fakeStorage.PendingOperations, 0);
            fakeStorage.Insert<DynamicEntity>(entity);
            fakeStorage.Insert<DynamicEntity>(entity);
            Assert.AreEqual(fakeStorage.PendingOperations, 2);
            fakeStorage.Execute();
        }

        [TestMethod]
        public async Task TableStorageWriter_InsertAndExecute()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            Assert.AreEqual(fakeStorage.PendingOperations, 0);
            fakeStorage.Insert<DynamicEntity>(entity);
            Assert.AreEqual(fakeStorage.PendingOperations, 1);

            fakeStorage.Execute();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);
        }

        [TestMethod]
        public async Task TableStorageWriter_InsertAndDelete()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            fakeStorage.Insert<DynamicEntity>(entity);

            fakeStorage.Execute();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);

            fakeStorage.Delete<DynamicEntity>(entity);
            fakeStorage.Execute();

            actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(0, actual.Count);
        }

        [TestMethod]
        async public Task TableStorageWriter_InsertAndExecuteAsync()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            Assert.AreEqual(fakeStorage.PendingOperations, 0);
            fakeStorage.Insert<DynamicEntity>(entity);
            Assert.AreEqual(fakeStorage.PendingOperations, 1);

            await fakeStorage.ExecuteAsync();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);
        }

        [TestMethod]
        public async Task TableStorageWriter_InsertAndMerge()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            fakeStorage.Insert<DynamicEntity>(entity);
            fakeStorage.Execute();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);

            entity.Set("Extra", "Extra");
            fakeStorage.Merge<DynamicEntity>(entity);
            fakeStorage.Execute();

            actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);
        }

        [TestMethod]
        public async Task TableStorageWriter_InsertOrMerge()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            fakeStorage.Insert<DynamicEntity>(entity);
            fakeStorage.Execute();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);

            entity.Set("Extra", "Extra");
            fakeStorage.InsertOrMerge<DynamicEntity>(entity);
            fakeStorage.Execute();

            actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);
        }

        [TestMethod]
        public async Task TableStorageWriter_InsertAndReplace()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);
            fakeStorage.Insert<DynamicEntity>(entity);
            fakeStorage.Execute();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);

            entity.Set("Number", 987);
            fakeStorage.Replace<DynamicEntity>(entity);
            fakeStorage.Execute();

            actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);
        }

        [TestMethod]
        public async Task TableStorageWriter_InsertOrReplace()
        {
            string tableName = Helper.DailyTableName;
            string partitionKey = Helper.RandomPartitionKey;
            string rowKey = Helper.RandomRowKey;
            DynamicEntity entity = Helper.CreateFakeDynamicPerson(partitionKey, rowKey);

            FakeStorageWriter fakeStorage = new FakeStorageWriter(tableName, Helper.StorageConnectionString);

            fakeStorage.Insert<DynamicEntity>(entity);
            fakeStorage.Execute();

            TableStorageReader reader = new TableStorageReader(tableName, Helper.StorageConnectionString);
            List<DynamicEntity> actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);

            entity.Set("Number", 987);
            fakeStorage.InsertOrReplace<DynamicEntity>(entity);
            fakeStorage.Execute();

            actual = (List<DynamicEntity>)await reader.ExecuteAsync<DynamicEntity>(new EntriesForPartition<DynamicEntity>(entity.PartitionKey));

            Assert.AreEqual(1, actual.Count);
            Comparers.AssertCompare(entity, actual[0]);
        }

        class FakeStorageWriter : TableStorageWriter
        {
            public FakeStorageWriter(string tableName, string connectionStringSettingName)
                : base(tableName, connectionStringSettingName)
            {

            }
        }
    }
}


text:
/* Type Rendering Mix JS - (c) 2013 Tim Brown, Bram Stein. License: new BSD */(function(){// Input 0
var COMPILED = !0, goog = goog || {};
goog.global = window;
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.TRUSTED_SITE = !0;
goog.provide = function $goog$provide$($name$$) {
  if (!COMPILED) {
    if (goog.isProvided_($name$$)) {
      throw Error('Namespace "' + $name$$ + '" already declared.');
    }
    delete goog.implicitNamespaces_[$name$$];
    for (var $namespace$$ = $name$$;($namespace$$ = $namespace$$.substring(0, $namespace$$.lastIndexOf("."))) && !goog.getObjectByName($namespace$$);) {
      goog.implicitNamespaces_[$namespace$$] = !0;
    }
  }
  goog.exportPath_($name$$);
};
goog.setTestOnly = function $goog$setTestOnly$($opt_message$$) {
  if (COMPILED && !goog.DEBUG) {
    throw $opt_message$$ = $opt_message$$ || "", Error("Importing test-only code into non-debug environment" + $opt_message$$ ? ": " + $opt_message$$ : ".");
  }
};
COMPILED || (goog.isProvided_ = function $goog$isProvided_$($name$$) {
  return!goog.implicitNamespaces_[$name$$] && !!goog.getObjectByName($name$$);
}, goog.implicitNamespaces_ = {});
goog.exportPath_ = function $goog$exportPath_$($name$$, $opt_object$$, $cur_opt_objectToExportTo$$) {
  $name$$ = $name$$.split(".");
  $cur_opt_objectToExportTo$$ = $cur_opt_objectToExportTo$$ || goog.global;
  $name$$[0] in $cur_opt_objectToExportTo$$ || !$cur_opt_objectToExportTo$$.execScript || $cur_opt_objectToExportTo$$.execScript("var " + $name$$[0]);
  for (var $part$$;$name$$.length && ($part$$ = $name$$.shift());) {
    !$name$$.length && goog.isDef($opt_object$$) ? $cur_opt_objectToExportTo$$[$part$$] = $opt_object$$ : $cur_opt_objectToExportTo$$ = $cur_opt_objectToExportTo$$[$part$$] ? $cur_opt_objectToExportTo$$[$part$$] : $cur_opt_objectToExportTo$$[$part$$] = {};
  }
};
goog.getObjectByName = function $goog$getObjectByName$($name$$, $opt_obj$$) {
  for (var $parts$$ = $name$$.split("."), $cur$$ = $opt_obj$$ || goog.global, $part$$;$part$$ = $parts$$.shift();) {
    if (goog.isDefAndNotNull($cur$$[$part$$])) {
      $cur$$ = $cur$$[$part$$];
    } else {
      return null;
    }
  }
  return $cur$$;
};
goog.globalize = function $goog$globalize$($obj$$, $opt_global$$) {
  var $global$$ = $opt_global$$ || goog.global, $x$$;
  for ($x$$ in $obj$$) {
    $global$$[$x$$] = $obj$$[$x$$];
  }
};
goog.addDependency = function $goog$addDependency$($path$$, $provides_require$$, $requires$$) {
  if (!COMPILED) {
    var $j_provide$$;
    $path$$ = $path$$.replace(/\\/g, "/");
    for (var $deps$$ = goog.dependencies_, $i$$ = 0;$j_provide$$ = $provides_require$$[$i$$];$i$$++) {
      $deps$$.nameToPath[$j_provide$$] = $path$$, $path$$ in $deps$$.pathToNames || ($deps$$.pathToNames[$path$$] = {}), $deps$$.pathToNames[$path$$][$j_provide$$] = !0;
    }
    for ($j_provide$$ = 0;$provides_require$$ = $requires$$[$j_provide$$];$j_provide$$++) {
      $path$$ in $deps$$.requires || ($deps$$.requires[$path$$] = {}), $deps$$.requires[$path$$][$provides_require$$] = !0;
    }
  }
};
goog.ENABLE_DEBUG_LOADER = !0;
goog.require = function $goog$require$($errorMessage_name$$) {
  if (!COMPILED && !goog.isProvided_($errorMessage_name$$)) {
    if (goog.ENABLE_DEBUG_LOADER) {
      var $path$$ = goog.getPathFromDeps_($errorMessage_name$$);
      if ($path$$) {
        goog.included_[$path$$] = !0;
        goog.writeScripts_();
        return;
      }
    }
    $errorMessage_name$$ = "goog.require could not find: " + $errorMessage_name$$;
    goog.global.console && goog.global.console.error($errorMessage_name$$);
    throw Error($errorMessage_name$$);
  }
};
goog.basePath = "";
goog.nullFunction = function $goog$nullFunction$() {
};
goog.identityFunction = function $goog$identityFunction$($opt_returnValue$$, $var_args$$) {
  return $opt_returnValue$$;
};
goog.abstractMethod = function $goog$abstractMethod$() {
  throw Error("unimplemented abstract method");
};
goog.addSingletonGetter = function $goog$addSingletonGetter$($ctor$$) {
  $ctor$$.getInstance = function $$ctor$$$getInstance$() {
    if ($ctor$$.instance_) {
      return $ctor$$.instance_;
    }
    goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = $ctor$$);
    return $ctor$$.instance_ = new $ctor$$;
  };
};
goog.instantiatedSingletons_ = [];
!COMPILED && goog.ENABLE_DEBUG_LOADER && (goog.included_ = {}, goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}, goog.inHtmlDocument_ = function $goog$inHtmlDocument_$() {
  var $doc$$ = goog.global.document;
  return "undefined" != typeof $doc$$ && "write" in $doc$$;
}, goog.findBasePath_ = function $goog$findBasePath_$() {
  if (goog.global.CLOSURE_BASE_PATH) {
    goog.basePath = goog.global.CLOSURE_BASE_PATH;
  } else {
    if (goog.inHtmlDocument_()) {
      for (var $scripts$$ = goog.global.document.getElementsByTagName("script"), $i$$ = $scripts$$.length - 1;0 <= $i$$;--$i$$) {
        var $src$$ = $scripts$$[$i$$].src, $l_qmark$$ = $src$$.lastIndexOf("?"), $l_qmark$$ = -1 == $l_qmark$$ ? $src$$.length : $l_qmark$$;
        if ("base.js" == $src$$.substr($l_qmark$$ - 7, 7)) {
          goog.basePath = $src$$.substr(0, $l_qmark$$ - 7);
          break;
        }
      }
    }
  }
}, goog.importScript_ = function $goog$importScript_$($src$$) {
  var $importScript$$ = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
  !goog.dependencies_.written[$src$$] && $importScript$$($src$$) && (goog.dependencies_.written[$src$$] = !0);
}, goog.writeScriptTag_ = function $goog$writeScriptTag_$($src$$) {
  if (goog.inHtmlDocument_()) {
    var $doc$$ = goog.global.document;
    if ("complete" == $doc$$.readyState) {
      if (/\bdeps.js$/.test($src$$)) {
        return!1;
      }
      throw Error('Cannot write "' + $src$$ + '" after document load');
    }
    $doc$$.write('<script type="text/javascript" src="' + $src$$ + '">\x3c/script>');
    return!0;
  }
  return!1;
}, goog.writeScripts_ = function $goog$writeScripts_$() {
  function $visitNode$$($path$$) {
    if (!($path$$ in $deps$$.written)) {
      if (!($path$$ in $deps$$.visited) && ($deps$$.visited[$path$$] = !0, $path$$ in $deps$$.requires)) {
        for (var $requireName$$ in $deps$$.requires[$path$$]) {
          if (!goog.isProvided_($requireName$$)) {
            if ($requireName$$ in $deps$$.nameToPath) {
              $visitNode$$($deps$$.nameToPath[$requireName$$]);
            } else {
              throw Error("Undefined nameToPath for " + $requireName$$);
            }
          }
        }
      }
      $path$$ in $seenScript$$ || ($seenScript$$[$path$$] = !0, $scripts$$.push($path$$));
    }
  }
  var $scripts$$ = [], $seenScript$$ = {}, $deps$$ = goog.dependencies_, $i$$5_path$$;
  for ($i$$5_path$$ in goog.included_) {
    $deps$$.written[$i$$5_path$$] || $visitNode$$($i$$5_path$$);
  }
  for ($i$$5_path$$ = 0;$i$$5_path$$ < $scripts$$.length;$i$$5_path$$++) {
    if ($scripts$$[$i$$5_path$$]) {
      goog.importScript_(goog.basePath + $scripts$$[$i$$5_path$$]);
    } else {
      throw Error("Undefined script input");
    }
  }
}, goog.getPathFromDeps_ = function $goog$getPathFromDeps_$($rule$$) {
  return $rule$$ in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[$rule$$] : null;
}, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js"));
goog.typeOf = function $goog$typeOf$($value$$) {
  var $s$$ = typeof $value$$;
  if ("object" == $s$$) {
    if ($value$$) {
      if ($value$$ instanceof Array) {
        return "array";
      }
      if ($value$$ instanceof Object) {
        return $s$$;
      }
      var $className$$ = Object.prototype.toString.call($value$$);
      if ("[object Window]" == $className$$) {
        return "object";
      }
      if ("[object Array]" == $className$$ || "number" == typeof $value$$.length && "undefined" != typeof $value$$.splice && "undefined" != typeof $value$$.propertyIsEnumerable && !$value$$.propertyIsEnumerable("splice")) {
        return "array";
      }
      if ("[object Function]" == $className$$ || "undefined" != typeof $value$$.call && "undefined" != typeof $value$$.propertyIsEnumerable && !$value$$.propertyIsEnumerable("call")) {
        return "function";
      }
    } else {
      return "null";
    }
  } else {
    if ("function" == $s$$ && "undefined" == typeof $value$$.call) {
      return "object";
    }
  }
  return $s$$;
};
goog.isDef = function $goog$isDef$($val$$) {
  return void 0 !== $val$$;
};
goog.isNull = function $goog$isNull$($val$$) {
  return null === $val$$;
};
goog.isDefAndNotNull = function $goog$isDefAndNotNull$($val$$) {
  return null != $val$$;
};
goog.isArray = function $goog$isArray$($val$$) {
  return "array" == goog.typeOf($val$$);
};
goog.isArrayLike = function $goog$isArrayLike$($val$$) {
  var $type$$ = goog.typeOf($val$$);
  return "array" == $type$$ || "object" == $type$$ && "number" == typeof $val$$.length;
};
goog.isDateLike = function $goog$isDateLike$($val$$) {
  return goog.isObject($val$$) && "function" == typeof $val$$.getFullYear;
};
goog.isString = function $goog$isString$($val$$) {
  return "string" == typeof $val$$;
};
goog.isBoolean = function $goog$isBoolean$($val$$) {
  return "boolean" == typeof $val$$;
};
goog.isNumber = function $goog$isNumber$($val$$) {
  return "number" == typeof $val$$;
};
goog.isFunction = function $goog$isFunction$($val$$) {
  return "function" == goog.typeOf($val$$);
};
goog.isObject = function $goog$isObject$($val$$) {
  var $type$$ = typeof $val$$;
  return "object" == $type$$ && null != $val$$ || "function" == $type$$;
};
goog.getUid = function $goog$getUid$($obj$$) {
  return $obj$$[goog.UID_PROPERTY_] || ($obj$$[goog.UID_PROPERTY_] = ++goog.uidCounter_);
};
goog.removeUid = function $goog$removeUid$($obj$$) {
  "removeAttribute" in $obj$$ && $obj$$.removeAttribute(goog.UID_PROPERTY_);
  try {
    delete $obj$$[goog.UID_PROPERTY_];
  } catch ($ex$$) {
  }
};
goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
goog.uidCounter_ = 0;
goog.getHashCode = goog.getUid;
goog.removeHashCode = goog.removeUid;
goog.cloneObject = function $goog$cloneObject$($obj$$) {
  var $clone_type$$ = goog.typeOf($obj$$);
  if ("object" == $clone_type$$ || "array" == $clone_type$$) {
    if ($obj$$.clone) {
      return $obj$$.clone();
    }
    var $clone_type$$ = "array" == $clone_type$$ ? [] : {}, $key$$;
    for ($key$$ in $obj$$) {
      $clone_type$$[$key$$] = goog.cloneObject($obj$$[$key$$]);
    }
    return $clone_type$$;
  }
  return $obj$$;
};
goog.bindNative_ = function $goog$bindNative_$($fn$$, $selfObj$$, $var_args$$) {
  return $fn$$.call.apply($fn$$.bind, arguments);
};
goog.bindJs_ = function $goog$bindJs_$($fn$$, $selfObj$$, $var_args$$) {
  if (!$fn$$) {
    throw Error();
  }
  if (2 < arguments.length) {
    var $boundArgs$$ = Array.prototype.slice.call(arguments, 2);
    return function() {
      var $newArgs$$ = Array.prototype.slice.call(arguments);
      Array.prototype.unshift.apply($newArgs$$, $boundArgs$$);
      return $fn$$.apply($selfObj$$, $newArgs$$);
    };
  }
  return function() {
    return $fn$$.apply($selfObj$$, arguments);
  };
};
goog.bind = function $goog$bind$($fn$$, $selfObj$$, $var_args$$) {
  Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_;
  return goog.bind.apply(null, arguments);
};
goog.partial = function $goog$partial$($fn$$, $var_args$$) {
  var $args$$ = Array.prototype.slice.call(arguments, 1);
  return function() {
    var $newArgs$$ = Array.prototype.slice.call(arguments);
    $newArgs$$.unshift.apply($newArgs$$, $args$$);
    return $fn$$.apply(this, $newArgs$$);
  };
};
goog.mixin = function $goog$mixin$($target$$, $source$$) {
  for (var $x$$ in $source$$) {
    $target$$[$x$$] = $source$$[$x$$];
  }
};
goog.now = goog.TRUSTED_SITE && Date.now || function() {
  return+new Date;
};
goog.globalEval = function $goog$globalEval$($script$$) {
  if (goog.global.execScript) {
    goog.global.execScript($script$$, "JavaScript");
  } else {
    if (goog.global.eval) {
      if (null == goog.evalWorksForGlobals_ && (goog.global.eval("var _et_ = 1;"), "undefined" != typeof goog.global._et_ ? (delete goog.global._et_, goog.evalWorksForGlobals_ = !0) : goog.evalWorksForGlobals_ = !1), goog.evalWorksForGlobals_) {
        goog.global.eval($script$$);
      } else {
        var $doc$$ = goog.global.document, $scriptElt$$ = $doc$$.createElement("script");
        $scriptElt$$.type = "text/javascript";
        $scriptElt$$.defer = !1;
        $scriptElt$$.appendChild($doc$$.createTextNode($script$$));
        $doc$$.body.appendChild($scriptElt$$);
        $doc$$.body.removeChild($scriptElt$$);
      }
    } else {
      throw Error("goog.globalEval not available");
    }
  }
};
goog.evalWorksForGlobals_ = null;
goog.getCssName = function $goog$getCssName$($className$$, $opt_modifier$$) {
  var $getMapping$$ = function $$getMapping$$$($cssName$$) {
    return goog.cssNameMapping_[$cssName$$] || $cssName$$;
  }, $rename_renameByParts$$ = function $$rename_renameByParts$$$($cssName$$1_parts$$) {
    $cssName$$1_parts$$ = $cssName$$1_parts$$.split("-");
    for (var $mapped$$ = [], $i$$ = 0;$i$$ < $cssName$$1_parts$$.length;$i$$++) {
      $mapped$$.push($getMapping$$($cssName$$1_parts$$[$i$$]));
    }
    return $mapped$$.join("-");
  }, $rename_renameByParts$$ = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? $getMapping$$ : $rename_renameByParts$$ : function($a$$) {
    return $a$$;
  };
  return $opt_modifier$$ ? $className$$ + "-" + $rename_renameByParts$$($opt_modifier$$) : $rename_renameByParts$$($className$$);
};
goog.setCssNameMapping = function $goog$setCssNameMapping$($mapping$$, $opt_style$$) {
  goog.cssNameMapping_ = $mapping$$;
  goog.cssNameMappingStyle_ = $opt_style$$;
};
!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING);
goog.getMsg = function $goog$getMsg$($str$$, $opt_values$$) {
  var $values$$ = $opt_values$$ || {}, $key$$;
  for ($key$$ in $values$$) {
    var $value$$ = ("" + $values$$[$key$$]).replace(/\$/g, "$$$$");
    $str$$ = $str$$.replace(RegExp("\\{\\$" + $key$$ + "\\}", "gi"), $value$$);
  }
  return $str$$;
};
goog.getMsgWithFallback = function $goog$getMsgWithFallback$($a$$, $b$$) {
  return $a$$;
};
goog.exportSymbol = function $goog$exportSymbol$($publicPath$$, $object$$, $opt_objectToExportTo$$) {
  goog.exportPath_($publicPath$$, $object$$, $opt_objectToExportTo$$);
};
goog.exportProperty = function $goog$exportProperty$($object$$, $publicName$$, $symbol$$) {
  $object$$[$publicName$$] = $symbol$$;
};
goog.inherits = function $goog$inherits$($childCtor$$, $parentCtor$$) {
  function $tempCtor$$() {
  }
  $tempCtor$$.prototype = $parentCtor$$.prototype;
  $childCtor$$.superClass_ = $parentCtor$$.prototype;
  $childCtor$$.prototype = new $tempCtor$$;
  $childCtor$$.prototype.constructor = $childCtor$$;
};
goog.base = function $goog$base$($me$$, $opt_methodName$$, $var_args$$) {
  var $caller$$ = arguments.callee.caller;
  if ($caller$$.superClass_) {
    return $caller$$.superClass_.constructor.apply($me$$, Array.prototype.slice.call(arguments, 1));
  }
  for (var $args$$ = Array.prototype.slice.call(arguments, 2), $foundCaller$$ = !1, $ctor$$ = $me$$.constructor;$ctor$$;$ctor$$ = $ctor$$.superClass_ && $ctor$$.superClass_.constructor) {
    if ($ctor$$.prototype[$opt_methodName$$] === $caller$$) {
      $foundCaller$$ = !0;
    } else {
      if ($foundCaller$$) {
        return $ctor$$.prototype[$opt_methodName$$].apply($me$$, $args$$);
      }
    }
  }
  if ($me$$[$opt_methodName$$] === $caller$$) {
    return $me$$.constructor.prototype[$opt_methodName$$].apply($me$$, $args$$);
  }
  throw Error("goog.base called from a method of one name to a method of a different name");
};
goog.scope = function $goog$scope$($fn$$) {
  $fn$$.call(goog.global);
};
// Input 1
var tr = {Browser:{UNKNOWN:0, INTERNET_EXPLORER:1, CHROME:2, FIREFOX:3, OPERA:4, SAFARI:5, BUILTIN:6, SILK:7}};
// Input 2
tr.dom = {};
tr.dom.addClass = function $tr$dom$addClass$($element$$, $name$$) {
  tr.dom.hasClass($element$$, $name$$) || ($element$$.className += ("" === $element$$.className ? "" : " ") + $name$$);
};
tr.dom.removeClass = function $tr$dom$removeClass$($element$$, $name$$) {
  for (var $classes$$ = $element$$.className.split(/\s+/), $result$$ = [], $i$$ = 0, $len$$ = $classes$$.length;$i$$ < $len$$;$i$$ += 1) {
    $classes$$[$i$$] !== $name$$ && $result$$.push($classes$$[$i$$]);
  }
  $element$$.className = $result$$.join(" ");
};
tr.dom.hasClass = function $tr$dom$hasClass$($element$$, $name$$) {
  for (var $classes$$ = $element$$.className.split(/\s+/), $i$$ = 0, $len$$ = $classes$$.length;$i$$ < $len$$;$i$$ += 1) {
    if ($classes$$[$i$$] === $name$$) {
      return!0;
    }
  }
  return!1;
};
tr.dom.setAttribute = function $tr$dom$setAttribute$($element$$, $name$$, $value$$) {
  $element$$.setAttribute($name$$, $value$$);
};
tr.dom.createElement = function $tr$dom$createElement$($name$$, $attributes$$) {
  var $element$$ = goog.global.document.createElement($name$$);
  if ($attributes$$) {
    for (var $attributeName$$ in $attributes$$) {
      $attributes$$.hasOwnProperty($attributeName$$) && tr.dom.setAttribute($element$$, $attributeName$$, $attributes$$[$attributeName$$]);
    }
  }
  return $element$$;
};
// Input 3
tr.Platform = {UNKNOWN:0, WINDOWS:1, OSX:2, IOS:3, LINUX:4, ANDROID:5, CHROME_OS:6, FIREFOX_OS:7, WINDOWS_PHONE:8, BLACKBERRY:9};
// Input 4
tr.Version = function $tr$Version$($opt_major$$, $opt_minor$$, $opt_patch$$, $opt_build$$) {
  this.major_ = goog.isDefAndNotNull($opt_major$$) ? $opt_major$$ : null;
  this.minor_ = goog.isDefAndNotNull($opt_minor$$) ? $opt_minor$$ : null;
  this.patch_ = goog.isDefAndNotNull($opt_patch$$) ? $opt_patch$$ : null;
  this.build_ = goog.isDefAndNotNull($opt_build$$) ? $opt_build$$ : null;
};
tr.Version.TOKENIZER = /^([0-9]+)(?:[\._-]([0-9]+))?(?:[\._-]([0-9]+))?(?:[\._+-]?(.*))?$/;
tr.Version.prototype.isValid = function $tr$Version$$isValid$() {
  return!goog.isNull(this.major_);
};
tr.Version.prototype.compare = function $tr$Version$$compare$($version$$) {
  return this.major_ > $version$$.major_ || this.major_ === $version$$.major_ && this.minor_ > $version$$.minor_ || this.major_ === $version$$.major_ && this.minor_ === $version$$.minor_ && this.patch_ > $version$$.patch_ ? 1 : this.major_ < $version$$.major_ || this.major_ === $version$$.major_ && this.minor_ < $version$$.minor_ || this.major_ === $version$$.major_ && this.minor_ === $version$$.minor_ && this.patch_ < $version$$.patch_ ? -1 : 0;
};
tr.Version.prototype.gt = function $tr$Version$$gt$($version$$) {
  return 1 === this.compare($version$$);
};
tr.Version.prototype.lt = function $tr$Version$$lt$($version$$) {
  return-1 === this.compare($version$$);
};
tr.Version.prototype.ge = function $tr$Version$$ge$($version$$) {
  return 0 === this.compare($version$$) || 1 === this.compare($version$$);
};
tr.Version.prototype.le = function $tr$Version$$le$($version$$) {
  return 0 === this.compare($version$$) || -1 === this.compare($version$$);
};
tr.Version.prototype.eq = function $tr$Version$$eq$($version$$) {
  return 0 === this.compare($version$$);
};
tr.Version.prototype.ne = function $tr$Version$$ne$($version$$) {
  return 0 !== this.compare($version$$);
};
tr.Version.parse = function $tr$Version$parse$($match_str$$) {
  $match_str$$ = tr.Version.TOKENIZER.exec($match_str$$);
  var $major$$ = null, $minor$$ = null, $patch$$ = null, $build$$ = null;
  $match_str$$ && (!goog.isNull($match_str$$[1]) && $match_str$$[1] && ($major$$ = parseInt($match_str$$[1], 10)), !goog.isNull($match_str$$[2]) && $match_str$$[2] && ($minor$$ = parseInt($match_str$$[2], 10)), !goog.isNull($match_str$$[3]) && $match_str$$[3] && ($patch$$ = parseInt($match_str$$[3], 10)), !goog.isNull($match_str$$[4]) && $match_str$$[4] && ($build$$ = /^[0-9]+$/.test($match_str$$[4]) ? parseInt($match_str$$[4], 10) : $match_str$$[4]));
  return new tr.Version($major$$, $minor$$, $patch$$, $build$$);
};
// Input 5
tr.Antialiasing = {UNKNOWN:"unknown", NONE:"none", GRAYSCALE:"grayscale", SUBPIXEL:"subpixel"};
tr.Antialiasing.get = function $tr$Antialiasing$get$($userAgent$$) {
  return $userAgent$$.getPlatform() === tr.Platform.IOS || $userAgent$$.getPlatform() === tr.Platform.FIREFOX_OS || $userAgent$$.getPlatform() === tr.Platform.CHROME_OS || $userAgent$$.getPlatform() === tr.Platform.BLACKBERRY || $userAgent$$.getPlatform() === tr.Platform.WINDOWS_PHONE || $userAgent$$.getPlatform() === tr.Platform.ANDROID ? tr.Antialiasing.GRAYSCALE : $userAgent$$.getPlatform() === tr.Platform.WINDOWS && $userAgent$$.getPlatformVersion().ge(new tr.Version(6, 2)) && $userAgent$$.getBrowser() ===
  tr.Browser.INTERNET_EXPLORER ? tr.Antialiasing.GRAYSCALE : tr.Antialiasing.UNKNOWN;
};
tr.Antialiasing.guess = function $tr$Antialiasing$guess$($userAgent$$) {
  var $antialiasing$$ = tr.Antialiasing.get($userAgent$$);
  return $antialiasing$$ !== tr.Antialiasing.UNKNOWN ? $antialiasing$$ : $userAgent$$.getPlatform() === tr.Platform.OSX || $userAgent$$.getPlatform() === tr.Platform.LINUX ? tr.Antialiasing.SUBPIXEL : $userAgent$$.getPlatform() === tr.Platform.WINDOWS ? $userAgent$$.getPlatformVersion().ge(new tr.Version(6, 0)) ? tr.Antialiasing.SUBPIXEL : $userAgent$$.getBrowser() === tr.Browser.INTERNET_EXPLORER ? $userAgent$$.getBrowserVersion().ge(new tr.Version(7, 0)) ? tr.Antialiasing.SUBPIXEL : tr.Antialiasing.GRAYSCALE :
  tr.Antialiasing.SUBPIXEL : tr.Antialiasing.UNKNOWN;
};
// Input 6
tr.Rasterizer = {UNKNOWN:"unknown", GDI:"gdi", DIRECTWRITE:"directwrite", CORETEXT:"coretext", FREETYPE:"freetype"};
tr.Rasterizer.get = function $tr$Rasterizer$get$($userAgent$$) {
  return $userAgent$$.getPlatform() === tr.Platform.WINDOWS ? $userAgent$$.getBrowser() === tr.Browser.CHROME || $userAgent$$.getBrowser() === tr.Browser.OPERA || $userAgent$$.getPlatformVersion().lt(new tr.Version(6, 0)) ? tr.Rasterizer.GDI : $userAgent$$.getPlatformVersion().ge(new tr.Version(6, 0)) ? $userAgent$$.getBrowser() === tr.Browser.INTERNET_EXPLORER && $userAgent$$.getBrowserVersion().le(new tr.Version(8, 0)) ? tr.Rasterizer.GDI : tr.Rasterizer.DIRECTWRITE : tr.Rasterizer.UNKNOWN : $userAgent$$.getPlatform() ===
  tr.Platform.WINDOWS_PHONE ? tr.Rasterizer.DIRECTWRITE : $userAgent$$.getPlatform() === tr.Platform.OSX || $userAgent$$.getPlatform() === tr.Platform.IOS ? tr.Rasterizer.CORETEXT : $userAgent$$.getPlatform() === tr.Platform.ANDROID || $userAgent$$.getPlatform() === tr.Platform.LINUX || $userAgent$$.getPlatform() === tr.Platform.CHROME_OS || $userAgent$$.getPlatform() === tr.Platform.FIREFOX_OS || $userAgent$$.getPlatform() === tr.Platform.BLACKBERRY ? tr.Rasterizer.FREETYPE : tr.Rasterizer.UNKNOWN;
};
// Input 7
tr.UserAgent = function $tr$UserAgent$($browser$$, $browserVersion$$, $platform$$, $platformVersion$$) {
  this.browser_ = $browser$$;
  this.browserVersion_ = $browserVersion$$;
  this.platform_ = $platform$$;
  this.platformVersion_ = $platformVersion$$;
};
tr.UserAgent.prototype.getBrowser = function $tr$UserAgent$$getBrowser$() {
  return this.browser_;
};
tr.UserAgent.prototype.getBrowserVersion = function $tr$UserAgent$$getBrowserVersion$() {
  return this.browserVersion_;
};
tr.UserAgent.prototype.getPlatform = function $tr$UserAgent$$getPlatform$() {
  return this.platform_;
};
tr.UserAgent.prototype.getPlatformVersion = function $tr$UserAgent$$getPlatformVersion$() {
  return this.platformVersion_;
};
tr.UserAgent.parse = function $tr$UserAgent$parse$($userAgent$$) {
  var $browser$$ = tr.Browser.UNKNOWN, $browserVersion$$ = new tr.Version, $platform$$ = tr.Platform.UNKNOWN, $platformVersion$$ = new tr.Version, $match$$ = null;
  if ($match$$ = /(?:iPod|iPad|iPhone).*? OS ([\d_]+)/.exec($userAgent$$)) {
    $platform$$ = tr.Platform.IOS, $platformVersion$$ = tr.Version.parse($match$$[1]);
  } else {
    if ($match$$ = /(?:BB\d{2}|BlackBerry).*?Version\/([^\s]*)/.exec($userAgent$$)) {
      $platform$$ = tr.Platform.BLACKBERRY, $platformVersion$$ = tr.Version.parse($match$$[1]);
    } else {
      if ($match$$ = /Android ([^;)]+)|Android/.exec($userAgent$$)) {
        $platform$$ = tr.Platform.ANDROID, $platformVersion$$ = tr.Version.parse($match$$[1]);
      } else {
        if ($match$$ = /Windows Phone(?: OS)? ([^;)]+)/.exec($userAgent$$)) {
          $platform$$ = tr.Platform.WINDOWS_PHONE, $platformVersion$$ = tr.Version.parse($match$$[1]);
        } else {
          if ($match$$ = /Linux ([^;)]+)|Linux/.exec($userAgent$$)) {
            $platform$$ = tr.Platform.LINUX, $platformVersion$$ = tr.Version.parse($match$$[1]);
          } else {
            if ($match$$ = /OS X ([^;)]+)/.exec($userAgent$$)) {
              $platform$$ = tr.Platform.OSX, $platformVersion$$ = tr.Version.parse($match$$[1]);
            } else {
              if ($match$$ = /Windows NT ([^;)]+)/.exec($userAgent$$)) {
                $platform$$ = tr.Platform.WINDOWS, $platformVersion$$ = tr.Version.parse($match$$[1]);
              } else {
                if ($match$$ = /CrOS ([^;)]+)/.exec($userAgent$$)) {
                  $platform$$ = tr.Platform.CHROME_OS, $platformVersion$$ = tr.Version.parse($match$$[1]);
                }
              }
            }
          }
        }
      }
    }
  }
  if ($match$$ = /MSIE ([\d\w\.]+)/.exec($userAgent$$)) {
    $browser$$ = tr.Browser.INTERNET_EXPLORER, $browserVersion$$ = tr.Version.parse($match$$[1]);
  } else {
    if ($match$$ = /Trident.*rv:([\d\w\.]+)/.exec($userAgent$$)) {
      $browser$$ = tr.Browser.INTERNET_EXPLORER, $browserVersion$$ = tr.Version.parse($match$$[1]);
    } else {
      if ($match$$ = /OPR\/([\d.]+)/.exec($userAgent$$)) {
        $browser$$ = tr.Browser.OPERA, $browserVersion$$ = tr.Version.parse($match$$[1]);
      } else {
        if ($match$$ = /Opera Mini.*Version\/([\d\.]+)/.exec($userAgent$$)) {
          $browser$$ = tr.Browser.OPERA, $browserVersion$$ = tr.Version.parse($match$$[1]);
        } else {
          if ($match$$ = /Opera(?: |.*Version\/|\/)([\d\.]+)/.exec($userAgent$$)) {
            $browser$$ = tr.Browser.OPERA, $browserVersion$$ = tr.Version.parse($match$$[1]);
          } else {
            if ($match$$ = /Firefox\/([\d\w\.]+)|Firefox/.exec($userAgent$$)) {
              $browser$$ = tr.Browser.FIREFOX, $browserVersion$$ = tr.Version.parse($match$$[1]);
            } else {
              if ($match$$ = /(?:Chrome|CrMo|CriOS)\/([\d\.]+)/.exec($userAgent$$)) {
                $browser$$ = tr.Browser.CHROME, $browserVersion$$ = tr.Version.parse($match$$[1]);
              } else {
                if ($match$$ = /Silk\/([\d\._]+)/.exec($userAgent$$)) {
                  $browser$$ = tr.Browser.SILK, $browserVersion$$ = tr.Version.parse($match$$[1]);
                } else {
                  if ($platform$$ === tr.Platform.ANDROID || $platform$$ === tr.Platform.BLACKBERRY) {
                    $browser$$ = tr.Browser.BUILTIN;
                  } else {
                    if ($match$$ = /Version\/([\d\.\w]+).*Safari/.exec($userAgent$$)) {
                      $browser$$ = tr.Browser.SAFARI, $browserVersion$$ = tr.Version.parse($match$$[1]);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  return new tr.UserAgent($browser$$, $browserVersion$$, $platform$$, $platformVersion$$);
};
// Input 8
var userAgent = tr.UserAgent.parse(goog.global.navigator.userAgent), rasterizer = tr.Rasterizer.get(userAgent), antialiasing = tr.Antialiasing.get(userAgent), antialiasingGuess = tr.Antialiasing.guess(userAgent), documentElement = goog.global.document.documentElement;
tr.dom.addClass(documentElement, "tr-" + rasterizer);
antialiasing === tr.Antialiasing.UNKNOWN && antialiasingGuess !== tr.Antialiasing.UNKNOWN && (antialiasing += "-" + antialiasingGuess);
tr.dom.addClass(documentElement, "tr-aa-" + antialiasing);
}());


text:
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="experimentconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="experimentconfig experimentconfig.xsd">
 <loader name="MynbouFolderLoader" datalocation="testdata/mynbou" relative="false" classtype="numeric" />
 <setwisepreprocessor name="MakeClassBinary" param="" />
 <versionfilter name="MinInstanceNumberFilter" param="100" />
 <trainversionfilter name="UnbalancedFilter" param="0.05" />
 <versionfilter name="MinClassNumberFilter" param="5" />
 <resultspath path="benchmark/results-csv"/>
 <testawaretrainer name="WekaTestAwareTraining" param="SBS de.ugoe.cs.cpdp.wekaclassifier.SearchBasedSelectionClassifier" />
 <eval name="NormalWekaEvaluation" param="" />
 <repetitions number="10" />
 <storage name="MySQLResultStorage" param="" />
</config>


text:
user = User.find_or_create_by(email: 'admin@gmail.com')
user.update({
  password: '1234',
  password_confirmation: '1234',
  name: 'Paliukh Mykhailo'
})

user.picture = Rails.root.join('db/uploads/users/picture.jpg').open
user.save

file = Rails.root.join('db/data/catalog.json').read
data = ::JSON.parse(file)
data.each do |node|
  category = Category.find_or_create_by(name: node['name'])

  node['goods'].each do |node|
    unless Good.where(name: node['name']).exists?
      good = Good.new(name: node['name'])
      good.price = node['price']
      good.picture = Rails.root.join("db/uploads/goods/#{node['picture']}").open
      good.category = category
      good.save!
    end
  end
end

admin_setting = Setting.find_or_create_by(name: 'Admin Settings')
site_setting = Setting.find_or_create_by(name: 'Site Settings')


text:
package org.minimalj.example.erp.model;

public enum Salutation {
	Male, Female;
}


text:
{# expects have form and fieldset (iterating over form) in context #}
<fieldset class="module aligned {{ fieldset.classes }}">
    {% if fieldset.name %}
{{ fieldset.name|title }}
{% endif %}
    {% if fieldset.description %}

{{ fieldset.description|safe }}

    {% endif %}
    {% for fieldline in fieldset %}
      {% include 'fragments/stacked/fieldline.html' %}
    {% endfor %}
</fieldset>


text:
namespace blink {

CompositorAnimationPlayer::CompositorAnimationPlayer()
    : m_animationPlayer(cc::AnimationPlayer::Create(cc::AnimationIdProvider::NextPlayerId()))
    , m_delegate()
{
}

CompositorAnimationPlayer::~CompositorAnimationPlayer()
{
    setAnimationDelegate(nullptr);
    // Detach player from timeline, otherwise it stays there (leaks) until
    // compositor shutdown.
    if (m_animationPlayer->animation_timeline())
        m_animationPlayer->animation_timeline()->DetachPlayer(m_animationPlayer);
}

cc::AnimationPlayer* CompositorAnimationPlayer::animationPlayer() const
{
    return m_animationPlayer.get();
}

void CompositorAnimationPlayer::setAnimationDelegate(CompositorAnimationDelegate* delegate)
{
    m_delegate = delegate;
    m_animationPlayer->set_animation_delegate(delegate ? this : nullptr);
}

void CompositorAnimationPlayer::attachElement(const CompositorElementId& id)
{
    m_animationPlayer->AttachElement(id);
}

void CompositorAnimationPlayer::detachElement()
{
    m_animationPlayer->DetachElement();
}

bool CompositorAnimationPlayer::isElementAttached() const
{
    return !!m_animationPlayer->element_id();
}

void CompositorAnimationPlayer::addAnimation(CompositorAnimation* animation)
{
    m_animationPlayer->AddAnimation(animation->passAnimation());
    delete animation;
}

void CompositorAnimationPlayer::removeAnimation(uint64_t animationId)
{
    m_animationPlayer->RemoveAnimation(animationId);
}

void CompositorAnimationPlayer::pauseAnimation(uint64_t animationId, double timeOffset)
{
    m_animationPlayer->PauseAnimation(animationId, timeOffset);
}

void CompositorAnimationPlayer::abortAnimation(uint64_t animationId)
{
    m_animationPlayer->AbortAnimation(animationId);
}

void CompositorAnimationPlayer::NotifyAnimationStarted(
    base::TimeTicks monotonicTime,
    cc::TargetProperty::Type targetProperty,
    int group)
{
    if (m_delegate)
        m_delegate->notifyAnimationStarted((monotonicTime - base::TimeTicks()).InSecondsF(), group);
}

void CompositorAnimationPlayer::NotifyAnimationFinished(
    base::TimeTicks monotonicTime,
    cc::TargetProperty::Type targetProperty,
    int group)
{
    if (m_delegate)
        m_delegate->notifyAnimationFinished((monotonicTime - base::TimeTicks()).InSecondsF(), group);
}

void CompositorAnimationPlayer::NotifyAnimationAborted(
    base::TimeTicks monotonicTime,
    cc::TargetProperty::Type targetProperty,
    int group)
{
    if (m_delegate)
        m_delegate->notifyAnimationAborted((monotonicTime - base::TimeTicks()).InSecondsF(), group);
}

void CompositorAnimationPlayer::NotifyAnimationTakeover(
    base::TimeTicks monotonicTime,
    cc::TargetProperty::Type,
    double animationStartTime,
    std::unique_ptr<cc::AnimationCurve> curve)
{
    if (m_delegate) {
        m_delegate->notifyAnimationTakeover(
            (monotonicTime - base::TimeTicks()).InSecondsF(),
            animationStartTime,
            std::move(curve));
    }
}

} // namespace blink


text:
<?php
namespace Audith\Providers\Nexway\Data\Request\OrderApi\calculateVAT;

use Audith\Providers\Nexway\Data\Request\OrderApi\calculateVAT;

/**
 * @author Shahriyar Imanov <shehi@imanov.me>
 */
class calculateVATCart_LineType extends \Audith\Providers\Nexway\Data\Request\OrderApi
{
    /**
     * @var integer
     */
    public $product_ref;

    /**
     * @var integer
     */
    public $quantity;

    /**
     * @var float
     */
    public $priceWithVAT;

    /**
     * @var float
     */
    public $priceWithoutVAT;
}


text:
class ADVehicle:
    def __init__(self):
        self._chassis_pb = None
        self._localization_pb = None
        self.front_edge_to_center = 3.89
        self.back_edge_to_center = 1.043
        self.left_edge_to_center = 1.055
        self.right_edge_to_center = 1.055
        self.speed_mps = None
        self.x = None
        self.y = None
        self.heading = None

    def update_chassis(self, chassis_pb):
        self._chassis_pb = chassis_pb
        self.speed_mps = self._chassis_pb.speed_mps

    def update_localization(self, localization_pb):
        self._localization_pb = localization_pb
        self.x = self._localization_pb.pose.position.x
        self.y = self._localization_pb.pose.position.y
        self.heading = self._localization_pb.pose.heading

    def is_ready(self):
        if self._chassis_pb is None or self._localization_pb is None:
            return False
        return True


text:
require 'minitest'
require 'minitest/autorun'

require 'rdoc/generator/theme_loader'

require_relative 'themes'

class TestThemeLoader < MiniTest::Test
  class Options
    attr_accessor :sf_themes
    attr_accessor :sf_prefix
  end

  def subset?(outer, inner)
    if outer.is_a?(Hash)
      inner.each do |k, v|
        return false unless subset? outer[k], v
      end
    elsif outer.is_a?(Array)
      inner.each do |i|
        return false unless outer.any? do |o|
          subset? o, i
        end
      end
    else
      return false unless outer == inner
    end
    return true
  end

  def load_themes(themes, prefix)
    options = Options.new
    options.sf_themes = []
    options.sf_prefix = prefix

    themes.each do |t|
      options.sf_themes << t.theme_path
    end

    theme_loader = ThemeLoader.new(options)
    theme_loader.load
  end

  def check_themes_with_prefix(themes: [], in_prefix: '', out_prefix: '')
    theme, files = load_themes themes, in_prefix

    themes.each do |t|
      assert subset? theme, t.expected_hash(out_prefix)
      assert subset? files, t.expected_files
    end
  end

  def check_themes(themes)
    check_themes_with_prefix(
      themes:     themes,
      in_prefix:  '',
      out_prefix: '',
    )
    check_themes_with_prefix(
      themes:     themes,
      in_prefix:  '/test_prefix',
      out_prefix: '/test_prefix/',
    )
    check_themes_with_prefix(
      themes:     themes,
      in_prefix:  '/test_prefix/',
      out_prefix: '/test_prefix/',
    )
  end

  def test_theme1
    check_themes([
      Theme1.new,
    ])
  end

  def test_theme2
    check_themes([
      Theme2.new,
    ])
  end

  def test_theme1_theme2
    check_themes([
      Theme1.new,
      Theme2.new,
    ])
  end
end


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

var _ErrorHandler = require('../utils/ErrorHandler');

var getOrientation = function getOrientation() {
    if (!this.isMobile) {
        throw new _ErrorHandler.CommandError('getOrientation command is not supported on non mobile platforms');
    }

    return this.unify(this.orientation(), {
        lowercase: true,
        extractValue: true
    });
}; /**
    *
    * Get the current browser orientation. This command only works for mobile environments like Android Emulator,
    * iOS Simulator or on real devices.
    *
    * <example>
       :getOrientation.js
       it('should get the orientation of my mobile device', function () {
           var orientation = browser.getOrientation();
           console.log(orientation); // outputs: "landscape"
       });
    * </example>
    *
    * @alias browser.getOrientation
    * @returns {String} device orientation (`landscape/portrait`)
    * @uses protocol/orientation
    * @for android, ios
    * @type mobile
    *
    */

exports.default = getOrientation;
module.exports = exports['default'];


text:
<?php
use PHPUnit\Framework\TestCase;

class TestClass extends TestCase
{
	public function testPushAndPop()
    {
        $stack = [];
        $this->assertEquals(0, count($stack));

        array_push($stack, 'foo');
        $this->assertEquals('foo', $stack[count($stack)-1]);
        $this->assertEquals(1, count($stack));

        $this->assertEquals('foo', array_pop($stack));
        $this->assertEquals(0, count($stack));
    }
}
?>


text:
<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="Profile report generated by YData! Visit us at https://ydata.ai">
    <meta name="author" content="YData and the open source community.">
    <meta name="generator" content="Pandas Profiling v{{ version }}" />
    <meta name="url" content="https://github.com/ydataai/pandas-profiling">
    <meta name="date" content="{{ date }}">

    <title>{{ title }}</title>

    {% include 'wrapper/style.html' %}
</head>

<body>
    {% if nav == True %}
        {% include 'wrapper/navigation.html' %}
    {% endif %}
    <div class="content">
    {{ body.render() }}
    </div>
    {% include 'wrapper/footer.html' %}
    {% include 'wrapper/javascript.html' %}
</body>
</html>


text:
namespace spvtools {
namespace fuzz {

class TransformationMoveBlockDown : public Transformation {
 public:
  explicit TransformationMoveBlockDown(
      const protobufs::TransformationMoveBlockDown& message);

  explicit TransformationMoveBlockDown(uint32_t id);

  // - |message_.block_id| must be the id of a block b in the given module.
  // - b must not be the first nor last block appearing, in program order,
  //   in a function.
  // - b must not dominate the block that follows it in program order.
  // - b must be reachable.
  bool IsApplicable(opt::IRContext* context,
                    const FactManager& fact_manager) const override;

  // The block with id |message_.block_id| is moved down; i.e. the program order
  // between it and the block that follows it is swapped.
  void Apply(opt::IRContext* context, FactManager* fact_manager) const override;

  protobufs::Transformation ToMessage() const override;

 private:
  protobufs::TransformationMoveBlockDown message_;
};

}  // namespace fuzz
}  // namespace spvtools

#endif  // SOURCE_FUZZ_TRANSFORMATION_MOVE_BLOCK_DOWN_H_


text:
package com.startapp.startappinterstitialexample;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.startapp.android.publish.Ad;
import com.startapp.android.publish.AdDisplayListener;
import com.startapp.android.publish.StartAppAd;
import com.startapp.android.publish.splash.SplashConfig;
import com.startapp.android.publish.splash.SplashConfig.Theme;

public class MainActivity extends Activity {

	/** StartAppAd object deceleration */
	private StartAppAd startAppAd = new StartAppAd(this);

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		StartAppAd.init(this, "DeveloperID", "ApplicationID"); //TODO: Replace with your IDs

		/** Create Splash Ad **/
		StartAppAd.showSplash(this, savedInstanceState,
				new SplashConfig()
					.setTheme(Theme.SKY)
					.setLogo(R.drawable.logo360x360)
					.setAppName("StartApp Example")
		);
		setContentView(R.layout.activity_main);
	}

	/**
	 * Method to run when next activity button clicks.
	 * @param view
	 */
	public void btnNextActivityClick(View view) {

		// Show an Ad
		startAppAd.showAd(new AdDisplayListener() {

			/**
			 * Callback when Ad had been hide
			 * @param ad
			 */
			@Override
			public void adHidden(Ad ad) {
				// Run Second activity right after the ad had been hidden
				Intent nextActivity = new Intent(MainActivity.this,
						SecondActivity.class);
				startActivity(nextActivity);
			}

			/**
			 * Callback when Ad had been displayed
			 * @param ad
			 */
			@Override
			public void adDisplayed(Ad ad) {

			}
		});
	}

	/**
	 * part of Activity life cycle Need as part of the StartAppAd
	 * object life cycle
	 */
	@Override
	public void onResume() {
		super.onResume();
		startAppAd.onResume();
	}

	/**
	 * part of Activity life cycle Need as part of the StartAppAd
	 * object life cycle
	 */
	@Override
	public void onPause() {
		super.onPause();
		startAppAd.onPause();
	}

	/**
	 * part of Activity life cycle For Back button implementation
	 */
	@Override
	public void onBackPressed() {
		startAppAd.onBackPressed();
		super.onBackPressed();
	}
}


text:
You can use CocoaPods or Swift Package Manager.

**Reminder:** Please see the
[CONTRIBUTING.md](https://github.com/google/google-api-objectivec-client-for-rest/blob/main/CONTRIBUTING.md)
file for how to contribute to this project.

## Swift Package Manager

* `open Package.swift` or double click `Package.swift` in Finder.
* Xcode will open the project
  * The _GoogleAPIClientForREST-Package_ scheme seems generally the simplest to
    build everything and run tests.
  * Choose a target platform by selecting the run destination along with the scheme

## CocoaPods

Install
  * CocoaPods 1.10.0 (or later)
  * [CocoaPods generate](https://github.com/square/cocoapods-generate) - This is
    not part of the _core_ cocoapods install.

Generate an Xcode project from the podspec:

```
pod gen GoogleAPIClientForREST.podspec --local-sources=./ --auto-open --platforms=ios
```

Note: Set the `--platforms` option to `macos`, `tvos`, or `watchos` to
develop/test for those platforms.


text:
"""
Settings overrided for test time
"""
from django.conf import settings

INSTALLED_APPS = tuple(settings.INSTALLED_APPS) + (
    'modeltranslation.tests',
)
# IMO this is unimportant
#if django.VERSION[0] >= 1 and django.VERSION[1] >= 3:
    #INSTALLED_APPS += ('django.contrib.staticfiles',)

#STATIC_URL = '/static/'

LANGUAGES = (('de', 'Deutsch'),
             ('en', 'English'))
LANGUAGE_CODE = 'de'
MODELTRANSLATION_DEFAULT_LANGUAGE = 'de'

USE_I18N = True
USE_TZ = False

MODELTRANSLATION_AUTO_POPULATE = False
MODELTRANSLATION_FALLBACK_LANGUAGES = ()