text:
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;

namespace SharpE.MvvmTools.Converters
{
  public class StringValueConveter : MarkupExtension, IValueConverter
  {
    public override object ProvideValue(IServiceProvider serviceProvider)
    {
      return this;
    }

    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
      return value == null ? null : value.ToString();
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
      if (value.GetType() != typeof (string))
        return null;
      if (targetType == typeof (string))
        return value;
      if (targetType == typeof (int) || targetType == typeof(int?))
      {
        int result;
        if (int.TryParse((string) value, out result))
          return result;
        return null;
      }
      if (targetType == typeof(double) || targetType == typeof(double?))
      {
        double result;
        if (double.TryParse((string)value, out result))
          return result;
        return null;
      }
      return null;
    }
  }
}


text:
export type ElChildren =
  | ElChildren.Void
  | ElChildren.Text;
export namespace ElChildren {
  export type Void = undefined;
  export type Text = string;
}

type Relax<C extends ElChildren> = C extends ElChildren.Text ? ElChildren.Text : C;

export class Elem<
  C extends ElChildren,
  > {
  constructor(
    private children_: Relax<C>,
  ) {
  }
}

new Elem(undefined as ElChildren.Void);
new Elem('' as ElChildren.Text);
new Elem('' as ElChildren.Void | ElChildren.Text); // error
new Elem('' as ElChildren); // error

// Repro from #31766

interface I { a: string }

type DeepPartial<T> =
    T extends object ? {[K in keyof T]?: DeepPartial<T[K]>} : T;

declare function f<T>(t: T, partial: DeepPartial<T>): T;

function g(p1: I, p2: Partial<I>): I {
  return f(p1, p2);
}

redpajama_set_name: RedPajamaGithub


text:
module ActionEve

  class User < Base

    def initialize(*args)
      super(parse_args!(args))
      raise(Exceptions::InputException, "Key ID is missing") unless @options[:id]
      raise(Exceptions::InputException, "Verification Code is missing") unless @options[:vcode]
    end

    def characters
      characters = []
      @api.characters.each do |character_id, character|
        characters << Character.new(character, @api)
      end
      characters
    end

    def api_key_info
      @api.api_key_info
    end

    def find_character(id)
      ret = nil
      self.characters.each do |character|
        ret = character if character.id.eql?(id)
      end
      ret
    end

  end

end


text:
layout: page
title: Valenzuela Family Reunion
date: 2016-05-24
author: Paul Fox
tags: weekly links, java
status: published
summary: Vestibulum dapibus velit vitae luctus condimentum. Proin laoreet.
banner: images/banner/leisure-05.jpg
booking:
  startDate: 06/13/2017
  endDate: 06/18/2017
  ctyhocn: LBBHSHX
  groupCode: VFR
published: true
---
Pellentesque vitae odio sit amet risus consectetur faucibus. Curabitur eget nibh quis orci hendrerit congue ut et velit. Interdum et malesuada fames ac ante ipsum primis in faucibus. Fusce pulvinar, lacus hendrerit faucibus efficitur, nibh quam sollicitudin nunc, vitae auctor massa ligula in sapien. Integer euismod eu leo eu maximus. Etiam vehicula purus at leo dictum, in fringilla enim cursus. Donec dui felis, rhoncus id risus eu, venenatis ullamcorper lectus. Nunc ullamcorper sem at tempus scelerisque. Mauris convallis lectus ut velit ultricies, at elementum nisl rhoncus. Sed ante risus, pretium eu arcu a, facilisis pretium nisl. Suspendisse at erat id risus finibus vehicula.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus faucibus porttitor magna, at porta orci efficitur ac. Phasellus turpis dolor, vestibulum id tempor vel, lobortis ut elit. Fusce metus ligula, tempus non justo eu, efficitur egestas lorem. Nulla mattis elementum quam et condimentum. Nullam orci justo, tempus et vulputate eu, fringilla sit amet metus. Sed velit magna, aliquet ac ex sit amet, rutrum tristique nibh.

* Quisque efficitur risus vel justo feugiat euismod
* Integer sed lorem feugiat risus eleifend ornare et vel nisi
* Nunc dignissim ligula nec enim lobortis, eget laoreet odio vestibulum
* Proin pulvinar metus sit amet ligula congue ultrices.

Nunc bibendum enim at massa pulvinar commodo. Integer ac consequat lacus. Morbi nec pharetra magna, ac vestibulum eros. Nulla ut quam euismod, euismod nibh eget, lobortis est. Pellentesque pretium ex purus, eget semper nisl sagittis at. Mauris dignissim eros et nunc porta lobortis. Nunc sed tellus elementum, suscipit erat vel, dapibus tortor. Nam fringilla tortor sed sapien bibendum, eget efficitur libero viverra. Nam sollicitudin massa magna. Duis in odio sit amet risus elementum convallis. Curabitur dapibus sagittis quam, sit amet suscipit metus ultrices in.


text:
package org.javaosc.galaxy.web;

import httl.web.WebEngine;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.javaosc.galaxy.constant.Constant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ActionHandler {

	private static final Logger log = LoggerFactory.getLogger(ActionHandler.class);

	private String path;

	public ActionHandler() {}

	public ActionHandler(String path) {
		this.path = path;
	}

	public void rendering(String prefix, String suffix, boolean enableTemplate){
		if(path.startsWith(Constant.COLON) || path.startsWith(Constant.COLON_EXTEND)){
			this.redirect(path.substring(1));
		}else{
			String viewPath = prefix + Constant.LINE + path + suffix;
			if(enableTemplate){ //httl
				this.httlView(viewPath);
			}else{
				this.forward(viewPath);
			}
		}
	}

	public void sendError(int code, String message){
		try {
			ActionContext.getContext().getResponse().sendError(code, message);
		} catch (IOException e) {
			log.error(Constant.GALAXY_EXCEPTION, e);
		}
	}

	protected void forward(String viewPath) {
		RequestDispatcher dispatcher = ActionContext.getContext().getRequest().getRequestDispatcher(viewPath);
		try {
			dispatcher.forward(ActionContext.getContext().getRequest(), ActionContext.getContext().getResponse());
		} catch (ServletException e) {
			log.error(Constant.GALAXY_EXCEPTION, e);
		} catch (IOException e) {
			log.error(Constant.GALAXY_EXCEPTION, e);
		}
	}

	protected void redirect(String servicePath) {
		 try {
			 ActionContext.getContext().getResponse().sendRedirect(servicePath);
		} catch (IOException e) {
			log.error(Constant.GALAXY_EXCEPTION, e);
		}
	}

	protected void httlView(String viewPath) {
		HttpServletRequest request = ActionContext.getContext().getRequest();
		HttpServletResponse response = ActionContext.getContext().getResponse();
		try {
			WebEngine.setRequestAndResponse(request, response);
			WebEngine.getEngine().getTemplate(viewPath, request.getLocale()).render(response);
		} catch (Exception e) {
			log.error(Constant.GALAXY_EXCEPTION, e);
		}
	}

}


text:
var Note = React.createClass({
    getInitialState: function() {
        return {editing: false}
    },
    edit: function() {
        this.setState({editing: true});
    },
    save: function() {

        var val = this.refs.newText.getDOMNode().value;

        alert("TODO: Save note value" + val);

        this.setState({editing: false});
    },
    remove: function() {
        alert('removing note');
    },
    renderDisplay: function() {
        return (

{this.props.children}

                    <button onClick={this.edit}
                            className="btn btn-primary glyphicon glyphicon-pencil"/>
                    <button onClick={this.remove}
                            className="btn btn-danger glyphicon glyphicon-trash"/>

            );
    },
    renderForm: function() {
        return (

            <textarea ref="newtext" defaultValue={this.props.children}
            className="form-control"></textarea>
            <button onClick={this.save} className="btn btn-success btn-sm glyphicon glyphicon-floppy-disk" />

            )
    },
    render: function() {
        if (this.state.editing) {
            return this.renderForm();
        }
        else {
            return this.renderDisplay();
        }
    }
});

React.render(<Note>Hello World</Note>,
    document.getElementById('react-container'));


text:
#ifndef GDX_CPP_BACKENDS_LINUX_LINUXAPPLICATION_HPP
#define GDX_CPP_BACKENDS_LINUX_LINUXAPPLICATION_HPP

#include <gdx-cpp/Application.hpp>
#include <list>
#include <gdx-cpp/ApplicationListener.hpp>
#include "LinuxGraphics.hpp"
#include <gdx-cpp/implementation/Thread.hpp>
#include <gdx-cpp/implementation/Mutex.hpp>
#include <gdx-cpp/utils/Synchronized.hpp>
#include "LinuxInput.hpp"
#include "LinuxFiles.hpp"
#include "LinuxOpenALAudio.hpp"

namespace gdx {

namespace nix {

class LinuxApplication : public Application, public Runnable, public Synchronizable
{
public:
    LinuxApplication(gdx::ApplicationListener* listener, std::string  title,
                     int width, int height, bool useGL20IfAvailable);

    void error(const std::string& tag, const char* format, ...);
    void exit() override;
    Audio* getAudio() override;
    Files* getFiles() override;
    Graphics* getGraphics() override;
    Input* getInput() override;
    Preferences* getPreferences(std::string& name) override;
    ApplicationType getType() override;
    int getVersion() override;
    void postRunnable(Runnable::ptr runnable) override;
    virtual void postRunnable(std::function< void() > runnable) override;

    void onRunnableStop() override;
    virtual void initialize();

    virtual void pause() override;
    virtual void update() override;

    virtual ~LinuxApplication();

protected:
    virtual void run() override;
    virtual bool processEvents();

    bool useGL20iFAvailable;
    std::string title;
    int height;
    int width;
    ApplicationListener* listener;
    LinuxGraphics* graphics;
    LinuxInput* input;
    LinuxFiles* files;
    LinuxOpenALAudio* audio;

    std::list< Runnable::ptr > runnables;

    gdx::Thread::ptr mainLoopThread;

    int logLevel;
};

}

}

#endif // GDX_CPP_BACKENDS_LINUX_LINUXAPPLICATION_HPP


text:
package org.elasticsearch.xpack.core.security.authz.privilege;

import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.util.set.Sets;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.EqualsHashCodeTestUtils;
import org.elasticsearch.xcontent.NamedXContentRegistry;
import org.elasticsearch.xcontent.ToXContent;
import org.elasticsearch.xcontent.XContent;
import org.elasticsearch.xcontent.XContentBuilder;
import org.elasticsearch.xcontent.XContentParser;
import org.elasticsearch.xcontent.XContentType;
import org.hamcrest.Matchers;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

import static org.elasticsearch.xcontent.DeprecationHandler.THROW_UNSUPPORTED_OPERATION;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.iterableWithSize;

public class ApplicationPrivilegeDescriptorTests extends ESTestCase {

    public void testEqualsAndHashCode() {
        final ApplicationPrivilegeDescriptor privilege = randomPrivilege();
        final EqualsHashCodeTestUtils.MutateFunction<ApplicationPrivilegeDescriptor> mutate = randomFrom(
            orig -> new ApplicationPrivilegeDescriptor("x" + orig.getApplication(), orig.getName(), orig.getActions(), orig.getMetadata()),
            orig -> new ApplicationPrivilegeDescriptor(orig.getApplication(), "x" + orig.getName(), orig.getActions(), orig.getMetadata()),
            orig -> new ApplicationPrivilegeDescriptor(
                orig.getApplication(),
                orig.getName(),
                Collections.singleton("*"),
                orig.getMetadata()
            ),
            orig -> new ApplicationPrivilegeDescriptor(
                orig.getApplication(),
                orig.getName(),
                orig.getActions(),
                Collections.singletonMap("mutate", -1L)
            )
        );
        EqualsHashCodeTestUtils.checkEqualsAndHashCode(
            privilege,
            original -> new ApplicationPrivilegeDescriptor(
                original.getApplication(),
                original.getName(),
                original.getActions(),
                original.getMetadata()
            ),
            mutate
        );
    }

    public void testSerialization() throws IOException {
        try (BytesStreamOutput out = new BytesStreamOutput()) {
            final ApplicationPrivilegeDescriptor original = randomPrivilege();
            original.writeTo(out);
            final ApplicationPrivilegeDescriptor clone = new ApplicationPrivilegeDescriptor(out.bytes().streamInput());
            assertThat(clone, Matchers.equalTo(original));
            assertThat(original, Matchers.equalTo(clone));
        }
    }

    public void testXContentGenerationAndParsing() throws IOException {
        final boolean includeTypeField = randomBoolean();

        final XContent xContent = randomFrom(XContentType.values()).xContent();
        try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
            final XContentBuilder builder = new XContentBuilder(xContent, out);

            final ApplicationPrivilegeDescriptor original = randomPrivilege();
            if (includeTypeField) {
                original.toXContent(builder, true);
            } else if (randomBoolean()) {
                original.toXContent(builder, false);
            } else {
                original.toXContent(builder, ToXContent.EMPTY_PARAMS);
            }
            builder.flush();

            final byte[] bytes = out.toByteArray();
            try (XContentParser parser = xContent.createParser(NamedXContentRegistry.EMPTY, THROW_UNSUPPORTED_OPERATION, bytes)) {
                final ApplicationPrivilegeDescriptor clone = ApplicationPrivilegeDescriptor.parse(
                    parser,
                    randomBoolean() ? randomAlphaOfLength(3) : null,
                    randomBoolean() ? randomAlphaOfLength(3) : null,
                    includeTypeField
                );
                assertThat(clone, Matchers.equalTo(original));
                assertThat(original, Matchers.equalTo(clone));
            }
        }
    }

    public void testParseXContentWithDefaultNames() throws IOException {
        final String json = "{ \"actions\": [ \"data:read\" ], \"metadata\" : { \"num\": 1, \"bool\":false } }";
        final XContent xContent = XContentType.JSON.xContent();
        try (XContentParser parser = xContent.createParser(NamedXContentRegistry.EMPTY, THROW_UNSUPPORTED_OPERATION, json)) {
            final ApplicationPrivilegeDescriptor privilege = ApplicationPrivilegeDescriptor.parse(parser, "my_app", "read", false);
            assertThat(privilege.getApplication(), equalTo("my_app"));
            assertThat(privilege.getName(), equalTo("read"));
            assertThat(privilege.getActions(), contains("data:read"));
            assertThat(privilege.getMetadata().entrySet(), iterableWithSize(2));
            assertThat(privilege.getMetadata().get("num"), equalTo(1));
            assertThat(privilege.getMetadata().get("bool"), equalTo(false));
        }
    }

    public void testParseXContentWithoutUsingDefaultNames() throws IOException {
        final String json = """
            {  "application": "your_app",  "name": "write",  "actions": [ "data:write" ]}""";
        final XContent xContent = XContentType.JSON.xContent();
        try (XContentParser parser = xContent.createParser(NamedXContentRegistry.EMPTY, THROW_UNSUPPORTED_OPERATION, json)) {
            final ApplicationPrivilegeDescriptor privilege = ApplicationPrivilegeDescriptor.parse(parser, "my_app", "read", false);
            assertThat(privilege.getApplication(), equalTo("your_app"));
            assertThat(privilege.getName(), equalTo("write"));
            assertThat(privilege.getActions(), contains("data:write"));
            assertThat(privilege.getMetadata().entrySet(), iterableWithSize(0));
        }
    }

    private ApplicationPrivilegeDescriptor randomPrivilege() {
        final String applicationName;
        if (randomBoolean()) {
            applicationName = "*";
        } else {
            applicationName = randomAlphaOfLength(1).toLowerCase(Locale.ROOT) + randomAlphaOfLengthBetween(2, 10);
        }
        final String privilegeName = randomAlphaOfLength(1).toLowerCase(Locale.ROOT) + randomAlphaOfLengthBetween(2, 8);
        final String[] patterns = new String[randomIntBetween(0, 5)];
        for (int i = 0; i < patterns.length; i++) {
            final String suffix = randomBoolean() ? "*" : randomAlphaOfLengthBetween(4, 9);
            patterns[i] = randomAlphaOfLengthBetween(2, 5) + "/" + suffix;
        }

        final Map<String, Object> metadata = new HashMap<>();
        for (int i = randomInt(3); i > 0; i--) {
            metadata.put(randomAlphaOfLengthBetween(2, 5), randomFrom(randomBoolean(), randomInt(10), randomAlphaOfLength(5)));
        }
        return new ApplicationPrivilegeDescriptor(applicationName, privilegeName, Sets.newHashSet(patterns), metadata);
    }

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <title>FindQuickTime — CMake 3.8.2 Documentation</title>

    <link rel="stylesheet" href="../_static/cmake.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

    <link rel="shortcut icon" href="../_static/cmake-favicon.ico"/>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="FindRTI" href="FindRTI.html" />
    <link rel="prev" title="FindQt" href="FindQt.html" />

Navigation

          index

          next |

          previous |

    CMake »

    3.8.2 Documentation »

cmake-modules(7) »

FindQuickTime¶

Locate QuickTime This module defines QUICKTIME_LIBRARY
QUICKTIME_FOUND, if false, do not try to link to gdal
QUICKTIME_INCLUDE_DIR, where to find the headers

$QUICKTIME_DIR is an environment variable that would correspond to the
./configure –prefix=$QUICKTIME_DIR

Created by Eric Wing.

Previous topic

FindQt

Next topic

FindRTI

This Page

Show Source

Quick search

    <form class="search" action="../search.html" method="get">

<input type="text" name="q" />

<input type="submit" value="Go" />

      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>

Navigation

          index

          next |

          previous |

    CMake »

    3.8.2 Documentation »

cmake-modules(7) »

        © Copyright 2000-2017 Kitware, Inc. and Contributors.
      Created using Sphinx 1.5.2.


text:
package org.usfirst.frc4947.robot2015.commands;

import org.usfirst.frc4947.robot2015.Robot;

import edu.wpi.first.wpilibj.command.Command;

/**
 *
 */
public class DriveAutoAlign extends Command {
	private double speed;;

    public DriveAutoAlign(double speed) {
        requires(Robot.driveTrain);

        this.speed = speed;
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
    	double leftValue = speed;
    	double rightValue = speed;

    	if(Robot.driveTrain.getAntennaLeft()){
    		leftValue = -speed;
    		rightValue = 1.0;
    	}

    	if(Robot.driveTrain.getAntennaRight()){
    		leftValue = 1.0;
    		rightValue = -speed;
    	}

    	Robot.driveTrain.tankdrive(leftValue, rightValue);
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return Robot.driveTrain.getAntennaLeft() && Robot.driveTrain.getAntennaRight();
    }

    // Called once after isFinished returns true
    protected void end() {
    	// Stop the robot when interrupted
    	Robot.driveTrain.tankdrive(0, 0);
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    	end();
    }
}


text:
/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* $Source: src/usr/diag/prdf/common/util/CcSynch.h $                     */
/*                                                                        */
/* OpenPOWER HostBoot Project                                             */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 1995,2014              */
/*                                                                        */
/* 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.                         */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef CcSynch_h
#define CcSynch_h

// Class Specification *************************************************
//
// Class name:   CcSynch
// Parent class: None.
//
// Summary: This class is used as a synchronization mechanism.  A
//          static step counter is maintained and incremented via the
//          static member function Advance().  An internal step counter
//          is also maintained.  The member function IsCurrent()
//          compares the two values to indicate if this instance is
//          "in synch".  Calling the IsCurrent() functiona also updates
//          the internal counter to the static counter.
//
//          The primary use is to ensure that an operation is performed
//          only once over a given time interval.  The time interval
//          is controlled by successive calls to Advance().  If an
//          instance is not current, then the operation is performed
//          and the instance will then be current.
//
//          The parameterized type STEP_TYPE is used for the type of
//          the counters.  This type should be selected according to
//          the necessary granularity.  For example, an 8 bit integer
//          value allows for 256 unique counter values.
//
//          The parameterized type ID is used to diferentiate an
//          instantiation of this tmeplate from other instantiations.
//          This class relies on a unique static data member which is
//          generated for each unique instantiation.
//
// Cardinality: N
//
// Performance/Implementation:
//   Space Complexity: Constant
//   Time Complexity:  Constant
//
// Usage Examples:
//
// struct mytype {};
//
// void foo(CcSynch<int, mytpe> & synch)
//   {
//   synch.Advance();
//
//   if(synch.IsCurrent())
//     {
//     // Operation is performed
//     }
//
//   if(synch.IsCurrent())
//     {
//     // Operation is not performed
//     }
//   }
//
//
// End Class Specification *********************************************

// Includes

namespace PRDF
{

template <class STEP_TYPE, class ID>
class CcSynch
  {
  public:    // public member functions

     typedef STEP_TYPE StepType;

     enum
       {
       STATIC_INITIAL_VALUE = 1,
       INSTANCE_INITIAL_VALUE = 0
       };

     static void Advance(void);
  // Function Specification ********************************************
  //
  // Purpose:      Advances the static data member step.
  // Parameters:   None.
  // Returns:      No value returned.
  // Requirements: None.
  // Promises:     Static data member step will be incremented.
  // Exceptions:   None.
  // Concurrency:  Reentrant.
  //
  // End Function Specification ****************************************

   CcSynch(void);
  // Function Specification ********************************************
  //
  // Purpose:      Initialization
  // Parameters:   No parameters
  // Returns:      No value returned
  // Requirements: None.
  // Promises:     All data members are initialized.
  // Exceptions:   None.
  // Concurrency:  N/A
  //
  // End Function Specification ****************************************

  //  CcSynch(const CcSynch & e);
  // Function Specification ********************************************
  //
  // Purpose:      Copy
  // Parameters:   e: Reference to instance to copy
  // Returns:      No value returned.
  // Requirements: None.
  // Promises:     All data members are initialized.
  // Exceptions:   None.
  // Concurrency:  N/A.
  // Notes:  The compiler generated copy constructor is sufficient.
  //
  // End Function Specification ****************************************

  //  ~CcSynch(void);
  // Function Specification ********************************************
  //
  // Purpose:      Destruction
  // Parameters:   None.
  // Returns:      No value returned
  // Requirements: None.
  // Promises:     None.
  // Exceptions:   None.
  // Concurrency:  N/A
  // Notes:  The compiler generated default destructor is sufficient.
  //
  // End Function Specification ****************************************

  //  CcSynch & operator=(const CcSynch & e);
  // Function Specification ********************************************
  //
  // Purpose:      Assigment
  // Parameters:   e: Reference to instance to assign from
  // Returns:      Reference to this instance
  // Requirements: None.
  // Promises:     All data members will be assigned.
  // Exceptions:   N/A.
  // Concurrency:  N/A.
  // Notes:  The compiler generated default assignment operator is
  //         sufficient.
  //
  // End Function Specification ****************************************

    bool IsCurrent(void);
  // Function Specification ********************************************
  //
  // Purpose:      Determines if myStep is current with step.
  // Parameters:   None.
  // Returns:      TRUE if myStep is current with step. Otherewise,
  //               FALSE.
  // Requirements: None.
  // Promises:     myStep will be current with step.
  // Exceptions:   None..
  // Concurrency:  Reenetrant.
  //
  // End Function Specification ****************************************

  private:

    static StepType                step;

    StepType                       myStep;
  };

} // end namespace PRDF

#include "CcSynch.inl"

#endif


text:
<?php

require $_SERVER['DOCUMENT_ROOT']. '/lib/globals/define.php';

require ROOT . '/vendor/autoload.php';
require ROOT . '/lib/system/class-preload.php';

?>


text:
<?php

namespace Magento\Framework\Api;

class ExtensionAttributesFactoryTest extends \PHPUnit_Framework_TestCase
{
    /** @var \Magento\Framework\Api\ExtensionAttributesFactory */
    private $factory;

    protected function setUp()
    {
        $autoloadWrapper = \Magento\Framework\Autoload\AutoloaderRegistry::getAutoloader();
        $autoloadWrapper->addPsr4('Magento\\Wonderland\\', realpath(__DIR__ . '/_files/Magento/Wonderland'));
        /** @var \Magento\Framework\ObjectManagerInterface */
        $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();

        $this->factory = $objectManager->create(
            'Magento\Framework\Api\ExtensionAttributesFactory',
            ['objectManager' => $objectManager]
        );
    }

    /**
     * @expectedException \LogicException
     */
    public function testCreateThrowExceptionIfInterfaceNotImplemented()
    {
        $this->factory->create('Magento\Framework\Api\ExtensionAttributesFactoryTest');
    }

    /**
     * @expectedException \LogicException
     */
    public function testCreateThrowExceptionIfInterfaceNotOverridden()
    {
        $this->factory->create('\Magento\Wonderland\Model\Data\FakeExtensibleOne');
    }

    /**
     * @expectedException \LogicException
     */
    public function testCreateThrowExceptionIfReturnIsIncorrect()
    {
        $this->factory->create('\Magento\Wonderland\Model\Data\FakeExtensibleTwo');
    }

    public function testCreate()
    {
        $this->assertInstanceOf(
            'Magento\Wonderland\Api\Data\FakeRegionExtension',
            $this->factory->create('Magento\Wonderland\Model\Data\FakeRegion')
        );
    }

    public function testCreateWithLogicException()
    {
        $this->setExpectedException(
            'LogicException',
            "Class 'Magento\\Framework\\Api\\ExtensionAttributesFactoryTest' must implement an interface, "
            . "which extends from 'Magento\\Framework\\Api\\ExtensibleDataInterface'"
        );
        $this->factory->create(get_class($this));
    }
}


text:
  /**
    Implements `shadyRoot` compatible dom scoping using native ShadowDOM.
  */

  // Transform styles if not using ShadowDOM or if flag is set.

  if (Polymer.Settings.useShadow) {

    Polymer.Base._addFeature({

      // no-op's when ShadowDOM is in use
      _poolContent: function() {},
      _beginDistribute: function() {},
      distributeContent: function() {},
      _distributeContent: function() {},
      _finishDistribute: function() {},

      // create a shadowRoot
      _createLocalRoot: function() {
        this.createShadowRoot();
        this.shadowRoot.appendChild(this.root);
        this.root = this.shadowRoot;
      }

    });

  }


text: export { default as PresenceLabel } from './PresenceLabel';


text:
DROP TABLE IF EXISTS `0075_some_guy_test_table`;
CREATE TABLE `0075_some_guy_test_table` (
	`item_id` int(9) NOT NULL AUTO_INCREMENT,
	`name` varchar(255) NOT NULL,
	PRIMARY KEY (`item_id`)
) CHARSET=utf8;


text:
FROM golang:1.18 as build

RUN git clone --single-branch --branch main https://github.com/cloudfoundry-incubator/cloud-service-broker.git /csb-src
WORKDIR /csb-src
RUN git checkout 1f4b0b8d51409ff040786949ef407a235c3120c5
RUN CGO_ENABLED=0 GOOS=linux go build -o cloud-service-broker

# Step 2: Build the brokerpak
WORKDIR /
RUN git clone --single-branch --branch main https://github.com/cloudfoundry-incubator/csb-brokerpak-gcp.git /brokerpak-src
WORKDIR /brokerpak-src
RUN git checkout 3a52bb28c7144b4eeda49aa024ac3fa839e1e30c
WORKDIR /
RUN /csb-src/cloud-service-broker pak build /brokerpak-src

# Step 3: Build the final container
FROM gcr.io/distroless/static:latest

COPY --from=build /csb-src/cloud-service-broker /bin/cloud-service-broker
COPY --from=build /gcp-services-*.brokerpak /bin

ENV PORT 8080
EXPOSE 8080/tcp

WORKDIR /bin
ENTRYPOINT ["/bin/cloud-service-broker"]
CMD ["help"]


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading;
using ClickHouse.Ado;
using NUnit.Framework;

namespace ClickHouse.Test {
    [TestFixture]
    public class TestGuidSupport {
        [OneTimeSetUp]
        public void CreateDatabase() {
            using (var cnn = ConnectionHandler.GetConnection()) {
                cnn.CreateCommand("DROP TABLE IF EXISTS guid_test").ExecuteNonQuery();
                cnn.CreateCommand(
                    @"  CREATE TABLE guid_test (
                        guid UUID,
                        dt DateTime)
                        ENGINE=MergeTree()
                        PARTITION BY toYYYYMM(dt)
                        ORDER BY (dt, guid)"
                ).ExecuteNonQuery();
            }

            Thread.Sleep(1000);
        }

        public class TestEntity : IEnumerable {
            public TestEntity(IDataReader reader) {
                Guid = reader.GetGuid(reader.GetOrdinal("guid"));
                Dt = reader.GetDateTime(reader.GetOrdinal("dt"));
            }

            public TestEntity(Guid guid, DateTime dt) {
                Guid = guid;
                Dt = dt;
            }

            public Guid Guid { get; set; }

            public DateTime Dt { get; set; }

            public IEnumerator GetEnumerator() {
                yield return Guid;
                yield return Dt;
            }
        }

        [Test]
        public void TestSelect() {
            // Arrange
            var entities = new List<TestEntity> {
                new TestEntity(Guid.NewGuid(), DateTime.Now),
                new TestEntity(Guid.NewGuid(), DateTime.Now),
                new TestEntity(Guid.NewGuid(), DateTime.Now),
                new TestEntity(Guid.NewGuid(), DateTime.Now)
            };
            using (var cnn = ConnectionHandler.GetConnection()) {
                cnn.CreateCommand("TRUNCATE TABLE guid_test").ExecuteNonQuery();
                cnn.CreateCommand("INSERT INTO guid_test (guid, dt) VALUES @bulk").AddParameter("bulk", DbType.Object, entities).ExecuteNonQuery();
            }

            //Act
            var result = new List<TestEntity>();
            using (var cnn = ConnectionHandler.GetConnection()) {
                using (var reader = cnn.CreateCommand("SELECT guid, dt FROM guid_test;").ExecuteReader()) {
                    do {
                        while (reader.Read())
                            result.Add(new TestEntity(reader));
                    } while (reader.NextResult());
                }
            }

            //Assert
            Assert.AreEqual(entities.Count, result.Count);
            foreach (var item in entities)
                Assert.AreEqual(1, result.Count(r => r.Guid == item.Guid));
        }

        [Test]
        public void TestParameter() {
            // Arrange
            var entity = new TestEntity(Guid.NewGuid(), DateTime.Now);
            using (var cnn = ConnectionHandler.GetConnection()) {
                cnn.CreateCommand("INSERT INTO guid_test (guid, dt) VALUES @bulk").AddParameter("bulk", DbType.Object, new object[] {entity}).ExecuteNonQuery();
            }

            //Act
            var result = new List<TestEntity>();
            using (var cnn = ConnectionHandler.GetConnection()) {
                using (var reader = cnn.CreateCommand("SELECT guid, dt FROM guid_test WHERE guid = @guid;").AddParameter("guid", DbType.Guid, entity.Guid).ExecuteReader()) {
                    do {
                        while (reader.Read())
                            result.Add(new TestEntity(reader));
                    } while (reader.NextResult());
                }
            }

            //Assert
            Assert.AreEqual(1, result.Count);
            Assert.AreEqual(1, result.Count(r => r.Guid == entity.Guid));
        }
    }
}


text:
package com.sample.packplan.util;

/**
 * Constant values for pack planner application
 */
public final class Constant {

    private Constant() {
        // To restrict creating instances of the class
    }

    public static final String EMPTY_STRING = "";
    public static final String COMMA = ",";
    public static final String NEW_LINE = "\n";
    public static final String INPUT_FORMAT = "#Please enter your data in following format:\n" +
            "[Sort order] [max pieces per pack] [max weight per pack]\n" +
            "[item id],[item length],[item quantity],[piece weight]\n" +
            "[item id],[item length],[item quantity],[piece weight]\n" +
            "[item id],[item length],[item quantity],[piece weight]\n";

    public static final String CONSTRAINT_PATTERN = "^([A-Z]*_?[A-Z]*_?[A-Z]*),([0-9]*),([0-9]*.?[0-9]+)$";
    public static final String ITEM_DATA_PATTERN = "^([0-9]*),([0-9]*),([0-9]*),([0-9]*.?[0-9]+)$";

    public static final String OUTPUT_MESSAGE = "================== Pack Planner ================== \n";
    public static final String DIVIDER = "================================================== \n";
    public static final String SEPARATOR = "-------------------------------------------------- \n";
    public static final String PACK_NUMBER = "Pack Number: ";
    public static final String PACK_LENGTH = "Pack Length: ";
    public static final String PACK_WEIGHT = "Pack Weight: ";
    public static final float LENGTH_CONVERTING_FACTOR = 1000.0f;
    public static final String UNIT_METER = "m";
    public static final String UNIT_KILOGRAM = "kg";
    public static final int ID_INCREMENT = 1;

}


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

using System;
using Microsoft.Build.Framework;
using System.Reflection;
using Microsoft.Build.Shared;

namespace Microsoft.Build.BackEnd
{
    /// <summary>
    /// Provide a class which can verify the correct type for both input and output parameters.
    /// </summary>
    internal static class TaskParameterTypeVerifier
    {
        /// <summary>
        /// Is the parameter type a valid scalar input value
        /// </summary>
        internal static bool IsValidScalarInputParameter(Type parameterType)
        {
            bool result = (parameterType.GetTypeInfo().IsValueType || parameterType == typeof(string) || parameterType == typeof(ITaskItem));
            return result;
        }

        /// <summary>
        /// Is the passed in parameterType a valid vector input parameter
        /// </summary>
        internal static bool IsValidVectorInputParameter(Type parameterType)
        {
            bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) ||
                        parameterType == typeof(string[]) ||
                        parameterType == typeof(ITaskItem[]);
            return result;
        }

        /// <summary>
        /// Is the passed in value type assignable to an ITask or Itask[] object
        /// </summary>
        internal static bool IsAssignableToITask(Type parameterType)
        {
            bool result = typeof(ITaskItem[]).GetTypeInfo().IsAssignableFrom(parameterType.GetTypeInfo()) ||    /* ITaskItem array or derived type, or */
                          typeof(ITaskItem).IsAssignableFrom(parameterType);                                    /* ITaskItem or derived type */
            return result;
        }

        /// <summary>
        /// Is the passed parameter a valid value type output parameter
        /// </summary>
        internal static bool IsValueTypeOutputParameter(Type parameterType)
        {
            bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) ||    /* array of value types, or */
                          parameterType == typeof(string[]) ||                                                      /* string array, or */
                          parameterType.GetTypeInfo().IsValueType ||                                                /* value type, or */
                          parameterType == typeof(string);                                                          /* string */
            return result;
        }

        /// <summary>
        /// Is the parameter type a valid scalar or value type input parameter
        /// </summary>
        internal static bool IsValidInputParameter(Type parameterType)
        {
            return IsValidScalarInputParameter(parameterType) || IsValidVectorInputParameter(parameterType);
        }

        /// <summary>
        /// Is the parameter type a valid scalar or value type output parameter
        /// </summary>
        internal static bool IsValidOutputParameter(Type parameterType)
        {
            return IsValueTypeOutputParameter(parameterType) || IsAssignableToITask(parameterType);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.RegularExpressions;
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable SuggestBaseTypeForParameter

namespace TWCore.Net.HttpServer
{
    /// <summary>
    /// Parses a Http form multipart data
    /// </summary>
    public class FormMultipartParser
    {
        #region Statics Regex
        private static readonly Regex NameRegex = new Regex(@"(?<=name\=\"")(.*?)(?=\"")", RegexOptions.Compiled);
        private static readonly Regex ContentTypeRegex = new Regex(@"(?<=Content\-Type:)(.*?)(?=\r\n\r\n)", RegexOptions.Compiled);
        private static readonly Regex FilenameRegex = new Regex(@"(?<=filename\=\"")(.*?)(?=\"")", RegexOptions.Compiled);
        #endregion

        #region Properties
        /// <summary>
        /// File part name
        /// </summary>
        public string FilePartName { get; }
        /// <summary>
        /// true if the content was successfully parsed; otherwise, false.
        /// </summary>
        public bool Success { get; private set; }
        /// <summary>
        /// Content type
        /// </summary>
        public string ContentType { get; private set; }
        /// <summary>
        /// File name
        /// </summary>
        public string Filename { get; private set; }
        /// <summary>
        /// File content byte array
        /// </summary>
        public byte[] FileContents { get; private set; }
        /// <summary>
        /// Form parameters
        /// </summary>
        public IDictionary<string, string> Parameters { get; } = new Dictionary<string, string>();
        #endregion

        #region .ctor
        /// <summary>
        /// Parses a Http form multipart data
        /// </summary>
        /// <param name="bytes">Byte array</param>
        /// <param name="filePartName">File part name</param>
        /// <param name="encoding">Encoding used to convert the byte array to a string</param>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public FormMultipartParser(byte[] bytes, string filePartName, Encoding encoding = null)
        {
            FilePartName = filePartName;
            Parse(bytes, encoding ?? Encoding.UTF8);
        }
        #endregion

        #region Private Methods
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        private void Parse(byte[] bytes, Encoding encoding)
        {
            Success = false;
            var content = encoding.GetString(bytes);
            var delimiterEndIndex = content.IndexOf("\r\n", StringComparison.OrdinalIgnoreCase);

            if (delimiterEndIndex <= -1) return;

            var delimiter = content.Substring(0, content.IndexOf("\r\n", StringComparison.OrdinalIgnoreCase));
            var sections = content.Split(new[] { delimiter }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var s in sections)
            {
                if (!s.Contains("Content-Disposition")) continue;

                // If we find "Content-Disposition", this is a valid multi-part section
                // Now, look for the "name" parameter
                var nameMatch = NameRegex.Match(s);
                var name = nameMatch.Value.Trim().ToLower();

                if (name == FilePartName)
                {
                    // Look for Content-Type
                    var contentTypeMatch = ContentTypeRegex.Match(content);

                    // Look for filename
                    var filenameMatch = FilenameRegex.Match(content);

                    // Did we find the required values?
                    if (!contentTypeMatch.Success || !filenameMatch.Success) continue;

                    // Set properties
                    ContentType = contentTypeMatch.Value.Trim();
                    Filename = filenameMatch.Value.Trim();

                    // Get the start & end indexes of the file contents
                    var startIndex = contentTypeMatch.Index + contentTypeMatch.Length + "\r\n\r\n".Length;

                    var delimiterBytes = encoding.GetBytes("\r\n" + delimiter);
                    var endIndex = IndexOf(bytes, delimiterBytes, startIndex);

                    var contentLength = endIndex - startIndex;

                    // Extract the file contents from the byte array
                    var fileData = new byte[contentLength];

                    Buffer.BlockCopy(bytes, startIndex, fileData, 0, contentLength);

                    FileContents = fileData;
                }
                else if (!string.IsNullOrWhiteSpace(name))
                {
                    // Get the start & end indexes of the file contents
                    var startIndex = nameMatch.Index + nameMatch.Length + "\r\n\r\n".Length;
                    Parameters.Add(name, s.Substring(startIndex).TrimEnd('\r', '\n').Trim());
                }
            }

            // If some data has been successfully received, set success to true
            Success |= FileContents != null || Parameters.Count != 0;
        }
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        private static int IndexOf(byte[] searchWithin, byte[] serachFor, int startIndex)
        {
            var index = 0;
            var startPos = Array.IndexOf(searchWithin, serachFor[0], startIndex);
            if (startPos == -1) return -1;

            while ((startPos + index) < searchWithin.Length)
            {
                if (searchWithin[startPos + index] == serachFor[index])
                {
                    index++;
                    if (index == serachFor.Length)
                        return startPos;
                }
                else
                {
                    startPos = Array.IndexOf(searchWithin, serachFor[0], startPos + index);
                    if (startPos == -1)
                        return -1;
                    index = 0;
                }
            }
            return -1;
        }
        #endregion
    }
}


text:
var fs = require('fs');
var path = require('path');
var util = require('util');
var exec = require('child_process');
var tracer = require('tracer');
var commander = require('commander');
var UTILS_ROOT = path.resolve('./');//Utils
var APP_ROOT = path.resolve('../../');//Control-Freak
var eol = require('os').EOL;
var extend = require('extend');

var _process = process;
var os = require('os');
var arch = os.arch();
var is32 = arch!=='x64';
var is64 = arch==='x64';
var lodash = require('lodash');
var userStopped = false;

var IS_WEB = false;
var IS_EXPORTED = false;

//collect pids here
var pids = [];
var options = {
    stdout: true,
    stderr: true,
    stdin: true,
    failOnError: true,
    stdinRawMode: false,
    //silent:false,
    callback:function(err, stdout, stderr){
        console.error('callback',arguments);
        if(err){
            console.error('-errror : '+err);
            return;
        }
        stdout.on('data', function(data) {
            console.log('stdout (' + childProcess.pid + '): ' + data);
            console.dir(data);
        });
    }
};

commander
    .version('0.0.1')
    .option('--mongo <ANY>', 'specify path to Mongo or set false to disable Mongo')
    .option('--nginx  <ANY>', 'specify path to NGINX or set false to disable NGINX')
    .option('--user  <ANY>', 'specify path to user directory')
    .option('--system  <ANY>', 'specify path to system directory')
    .option('--mqtt  <ANY>', 'enable/disable MQTT (requires Mongo)')
    .option('--web  <ANY>', 'enable web-server mode by setting this to true/false')
    .option('--export  <ANY>', 'set true/false to enable "exported mode" ')

commander.allowUnknownOption(true);
commander.parse(_process.argv);

/////////////////////////////////////////////////////////////////////////////////////////////
//
// Device Server Switches
//

/////////////////////////////////////////////////////////////////////////////////////////////
//
// MONGO Switches
//
var START_MONGO = true;
var MONGO_PATH = null;
if(commander.mongo==='false'){
    START_MONGO = false;
}else if(lodash.isString(commander.mongo)){
    MONGO_PATH = commander.mongo;
}

/////////////////////////////////////////////////////////////////////////////////////////////
//
// NGINX Switches
//
var START_NGINX = true;
var NGINX_PATH = null;
if(commander.nginx==='false'){
    START_NGINX = false;
}else if(lodash.isString(commander.NGINX)){
    NGINX_PATH = commander.nginx;
}

var defaultConfig = {
    "nginx":{
        "port":"8887"
    }
};
/////////////////////////////////////////////////////////////////////////////////////////////
//
// Utils
//
function readJson(file) {

    if(!fs.existsSync(file)){
        return null;
    }
    var str = fs.readFileSync(file,'utf8');
    var result = {};
    try{
        result = JSON.parse(str);
    }catch(e){
        console.error('Error reading file : '+file,e);
    }
    return result;

}
var console = console;
if(tracer){
    console = tracer.colorConsole({
        format : "{{title}}: {{message}}",
        dateformat : "HH:MM:ss.L"
    });
}
/////////////////////////////////////////////////////////////////////////////////////////////
//
// platform
//
var OS = "linux";
if(os.platform() ==='win32'){
    OS = 'windows';
}else if(os.platform() ==='darwin'){
    OS = 'osx';
}else if(os.arch() === 'arm'){
    OS = 'arm';
}

if(OS==='linux'){
    if(is32){
        arch = "_32";
    }else if(is64){
        arch = "_64";
    }
}else {
    arch ="";
}

var config = defaultConfig;

if(!Array.prototype.remove){
    Array.prototype.remove= function(){
        var what, a= arguments, L= a.length, ax;
        while(L && this.length){
            what= a[--L];
            if(this.indexOf==null){
                break;
            }
            while((ax= this.indexOf(what))!= -1){
                this.splice(ax, 1);
            }
        }
        return this;
    };
}
/////////////////////////////////////////////////////////////////////////////////////////////
//
// Server - Configs
//
var NGINX_EXE = path.resolve(NGINX_PATH ? path.resolve(NGINX_PATH) : APP_ROOT+'/nginx/nginx-' + OS + arch);

var NGINX_ARGS = ["-p", APP_ROOT + path.sep + 'nginx' + path.sep,"-c",path.resolve(APP_ROOT+'/nginx/nginx.conf')];
var nginx;
//----------------
var DEVICE_SERVER = path.resolve(UTILS_ROOT +'/server');

var USER_SCOPE_PATH = (commander.user || path.resolve(APP_ROOT +'/www/user'));
var SYSTEM_SCOPE_PATH = (commander.system || path.resolve(APP_ROOT +'/www/'));

if(commander.web==='true'){
    IS_WEB = true;
    DEVICE_SERVER = "node";
}
if(commander.export==='true'){
    IS_EXPORTED = true;
}
var DEVICE_SERVER_ARGS = ['noob','--serverSide=true'];
if(IS_EXPORTED){
    DEVICE_SERVER_ARGS = ['noob','--serverSide=true','--user='+USER_SCOPE_PATH,'--system='+SYSTEM_SCOPE_PATH];
}
var deviceServer = null;

//----------------
var MONGO_SERVER = path.resolve(MONGO_PATH ? path.resolve(MONGO_PATH) : APP_ROOT+'/mongo/mongod-'+OS +arch);
var MONGO_SERVER_ARGS = ["--smallfiles","--quiet","--dbpath", path.resolve(APP_ROOT + '/data/_MONGO'), "--storageEngine=mmapv1" , '--port=%mongo_port%'];
var mongo;

if(OS==='arm'){
    MONGO_SERVER_ARGS.remove("--storageEngine=mmapv1");
}

function startDeviceServer(){

    if(!deviceServer) {
        var deviceServerOptions =extend({
            cwd: path.resolve(UTILS_ROOT)
        }, options);

        function reststart(){
            deviceServer = start(DEVICE_SERVER, DEVICE_SERVER_ARGS, deviceServerOptions, "Device - Server");
            return deviceServer;
        }
        deviceServerOptions.restart = reststart;
        deviceServer = reststart();
    }else{
        console.warn("Device Server already created, wait please. Mongo didnt fire ready yet");
    }
}
function mongoReady(){
    startDeviceServer();
}

function maybeQuote(a) {
    if (a.indexOf(' ') != -1) {
        a = a.replace(' ', '\ ');
    }
    return a;
}

function start(exce_path,args,options,name){

    if(OS!=="windows") {
        try {
            exec.execFile('chmod', ['+x', exce_path]);
        }catch(e){}
    }

    if(OS=='windows' && exce_path.indexOf('.exe')===-1){
        exce_path+='.exe';
    }

    if(!fs.existsSync(exce_path)){
        console.error("Sorry, but cant start "+name +'. ' +exce_path +' doesnt exists!');
        return;
    }

    options.path = exce_path;
    options.name = name;

    var env = Object.create(_process.env);
    options.env = env;

    for (var i = 0; i < args.length; i++) {
        args[i] = maybeQuote(args[i]);

    }
    console.info('Start '+ name + ' @ ' + exce_path + ' ' + args.join(' '));

    var process = exec.spawn(exce_path, args || [],options, function (err, stdout, stderr) {
        if (typeof options.callback === 'function') {
            options.callback.call(this, err, stdout, stderr);
        } else {
            if (err && options.failOnError) {
                console.error('Error : ',err);
            }
        }
    }.bind(this));

    process.stdout.on('data',function(data){

        var str = data.toString();

        if(options.silent!==true) {
            console.debug('stdout data (pid:' + process.pid + ' name:' + name + '):');
            console.log(name +'\n\t' + str);
        }

        if(options.already && str.indexOf(options.already)!==-1){
            console.warn('Abort '+options.name +' , seems already running.');
            pids.remove(process);
            options.killed=true;
            if(options.alreadyCallback){
                options.alreadyCallback();
            }
        }
        if(options.ready && options.readyCB && str.indexOf(options.ready)!==-1){
            options.readyCB();
        }

    });
    process.stderr.on('data',function(data){
        console.debug('stderr data (pid:' + process.pid + ' name:' + name + '):');
        var str = data.toString();
        var newStr = String(str).split(eol).join(eol + '\t');
        console.log(name + '\n\t' + newStr);
        if(options.already && str.indexOf(options.already)!==-1){
            console.warn('Abort '+options.name+' , seems already running.');
            pids.remove(process);
            options.killed=true;
            if(options.alreadyCallback){
                options.alreadyCallback();
            }
        }
    });
    process.on('close', function(code){
        console.debug('Child process ' + options.name + ' ' + ' exited with code ' + code);
        options.background!==true && pids.remove(process);
        if(options.restart && userStopped!==true){
            console.debug('\t Restart : ' + options.name);
            options.restart();
        }
    });
    process.options = options;
    pids.push(process);

    var pidFilePath = APP_ROOT+ path.sep + "_" + options.name + '.pid';
    try {
        fs.writeFileSync(pidFilePath, "{name:" + process.pid + "}");
    }catch(e){
        console.log('cant write pid file',e);
    }

    return process;
}
/////////////////////////////////////////////////////////////////////////////////////////////
//
// Server instances
//

console.log('---start servers ' + IS_WEB + ' ' + DEVICE_SERVER);

if(!IS_WEB) {

    START_NGINX && (nginx = start(NGINX_EXE, NGINX_ARGS, extend({
        kill: NGINX_EXE,
        killCWD: APP_ROOT,
        killArgs: ['-s', 'stop'].concat(NGINX_ARGS),
        background:true
    }, options), "NGINX"));

    START_MONGO && (mongo = start(MONGO_SERVER, MONGO_SERVER_ARGS, extend({
        cwd: APP_ROOT + '',
        already: "Address already in use",
        silent: true,
        alreadyCallback: mongoReady,
        ready: "waiting for connections on port",
        readyCB: mongoReady
    }, options), "Mongo"));

    if(!START_MONGO){
        startDeviceServer();
    }

}else{

    DEVICE_SERVER = process.execPath;

    DEVICE_SERVER_ARGS = ['main.js'];

    var deviceServerOptions = extend({
        cwd: path.resolve(UTILS_ROOT)
    }, options);

    function reststart(){
        deviceServer = start(DEVICE_SERVER, DEVICE_SERVER_ARGS, deviceServerOptions, "Device - Server");
        return deviceServer;
    }
    deviceServerOptions.restart = reststart;
    deviceServer = reststart();

}

/////////////////////////////////////////////////////////////////////////////////////////////
//
// Keep running and end child processes on SIGINT
//
process.stdin.resume();
process.on('SIGINT', function() {
    userStopped = true;
    console.log('received kill signal, stopping ' + pids.length + ' processes');
    for (var i = 0; i < pids.length; i++) {
        var obj = pids[i];
        var options = obj.options;
        console.log('Stopping '+options.name + ' pid '+obj.pid);
        var pidFilePath = APP_ROOT+ path.sep + "_" + options.name + '.pid';
        try {
            fs.unlinkSync(pidFilePath, process.pid);
        }catch(e){
            console.log('cant delete pid file ' + pidFilePath,e);
        }
        //has own kill
        if(obj.options.kill){
            console.log('Stopping '+options.name + ' @ ' + obj.options.kill + ' ' + obj.options.killArgs.join(" "));
            exec.spawn(obj.options.kill,obj.options.killArgs,extend({
                cwd:obj.options.killCWD
            },obj.options),obj.options.killArgs);
            continue;
        }
        try {
            obj.kill(obj.pid);
        }catch(e){
            console.error('error killing '+options.name,e);
        }
    }
    //kill us in latestly 5 secs
    setTimeout(function(){
        process.exit();
    },5000);
});


text:
NS_ASSUME_NONNULL_BEGIN

@interface DoraemonDemoMultiConTapGesture : DoraemonDemoBaseViewController

@end

NS_ASSUME_NONNULL_END


text:
package io.bartholomews.spotify4s

import enumeratum.Circe
import io.bartholomews.fsclient.circe.FsClientCirceApi
import io.bartholomews.iso_country.CountryCodeAlpha2
import io.bartholomews.spotify4s.core.entities.TimeInterval.{Bar, Beat, Tatum}
import io.bartholomews.spotify4s.core.entities.requests.{
  AddTracksToPlaylistRequest,
  CreatePlaylistRequest,
  ModifyPlaylistRequest
}
import io.bartholomews.spotify4s.core.entities.{
  AlbumGroup,
  AlbumType,
  AudioAnalysis,
  AudioFeatures,
  AudioFeaturesResponse,
  AudioKey,
  AudioMode,
  AudioSection,
  AudioSegment,
  CollectionLink,
  Confidence,
  ExternalIds,
  ExternalResourceUrl,
  Followers,
  FullEpisode,
  FullPlaylist,
  FullTrack,
  FullTracksResponse,
  LinkedTrack,
  Loudness,
  Modality,
  NewReleases,
  Page,
  PitchClass,
  PlaylistTrack,
  PrivateUser,
  PublicUser,
  ReleaseDate,
  Restrictions,
  SimpleAlbum,
  SimpleArtist,
  SimplePlaylist,
  SimplePlaylistItem,
  SnapshotId,
  SpotifyCategoryId,
  SpotifyError,
  SpotifyId,
  SpotifyImage,
  SpotifyScope,
  SpotifyUri,
  SpotifyUrl,
  SpotifyUserId,
  SubscriptionLevel,
  Tempo,
  TimeSignature
}
import io.circe.Decoder.Result
import io.circe.generic.extras.Configuration
import io.circe.generic.extras.semiauto.{
  deriveConfiguredCodec,
  deriveConfiguredDecoder,
  deriveConfiguredEncoder,
  deriveUnwrappedCodec
}
import io.circe.{Codec, Decoder, DecodingFailure, Encoder, HCursor}

package object circe extends FsClientCirceApi {
  implicit val defaultConfig: Configuration = Configuration.default.withSnakeCaseMemberNames

  implicit def pageDecoder[A](implicit decoder: Decoder[A]): Decoder[Page[A]] = CircePage.decoder
  implicit def pageEncoder[A](implicit encoder: Encoder[A]): Encoder[Page[A]] = CircePage.encoder

  implicit val spotifyScopeCodec: Codec[SpotifyScope] =
    Codec.from(Circe.decoder(SpotifyScope), Circe.encoder(SpotifyScope))

  implicit val snapshotIdDecoder: Decoder[SnapshotId] = (c: HCursor) =>
    c.downField("snapshot_id").as[String].map(SnapshotId.apply)

  implicit val albumGroupCodec: Codec[AlbumGroup] = Codec.from(Circe.decoder(AlbumGroup), Circe.encoder(AlbumGroup))
  implicit val albumTypeCodec: Codec[AlbumType] = Codec.from(Circe.decoder(AlbumType), Circe.encoder(AlbumType))
  implicit val audioAnalysisDecoder: Decoder[AudioAnalysis] = deriveConfiguredDecoder
  // Decoder.decodeList[AudioFeatures].at("audio_features")
  implicit val tatumCodec: Codec[Tatum] = CirceTimeInterval.tatumCodec
  implicit val audioFeaturesDecoder: Decoder[AudioFeatures] = deriveConfiguredDecoder
  implicit val audioFeaturesResponseDecoder: Decoder[AudioFeaturesResponse] = deriveConfiguredDecoder
  implicit val audioSectionCodec: Codec[AudioSection] = CirceAudioSection.codec
  implicit val audioSegmentCodec: Codec[AudioSegment] = CirceAudioSegment.codec
  implicit val barCodec: Codec[Bar] = CirceTimeInterval.barCodec
  implicit val beatCodec: Codec[Beat] = CirceTimeInterval.beatCodec
  implicit val confidenceCodec: Codec[Confidence] = deriveUnwrappedCodec
  implicit val collectionLinkDecoder: Decoder[CollectionLink] = deriveConfiguredDecoder
  implicit val externalIdsCodec: Codec[ExternalIds] = Codec.from(CirceExternalIds.decoder, CirceExternalIds.encoder)
  implicit val externalResourceUrlCodec: Codec[ExternalResourceUrl] = CirceExternalResourceUrl.codec
  implicit val followersDecoder: Decoder[Followers] = deriveConfiguredDecoder
  implicit val fullEpisodeDecoder: Decoder[FullEpisode] = deriveConfiguredDecoder
  implicit val fullPlaylistDecoder: Decoder[FullPlaylist] = deriveConfiguredDecoder
  implicit val fullTrackDecoder: Decoder[FullTrack] = CirceFullTrack.decoder
  implicit val fullTracksResponseDecoder: Decoder[FullTracksResponse] = deriveConfiguredDecoder
  implicit val linkedTrackDecoder: Decoder[LinkedTrack] = deriveConfiguredDecoder
  implicit val modalityCodec: Codec[Modality] = CirceModality.codec
  implicit val newReleasesDecoder: Decoder[NewReleases] = deriveConfiguredDecoder
  implicit val pitchClassCodec: Codec[PitchClass] = deriveUnwrappedCodec
  implicit val playlistTrackDecoder: Decoder[PlaylistTrack] = deriveConfiguredDecoder
  implicit val privateUserDecoder: Decoder[PrivateUser] = deriveConfiguredDecoder
  implicit val publicUserDecoder: Decoder[PublicUser] = CircePublicUser.decoder
  implicit val releaseDateCodec: Codec[ReleaseDate] = CirceReleaseDate.codec
  implicit val restrictionsDecoder: Codec[Restrictions] = deriveConfiguredCodec
  implicit val simpleAlbumCodec: Decoder[SimpleAlbum] = CirceSimpleAlbum.decoder
  implicit val simpleArtistDecoder: Codec[SimpleArtist] = CirceSimpleArtist.codec
  implicit val simplePlaylistDecoder: Decoder[SimplePlaylist] = deriveConfiguredDecoder
  implicit val spotifyCategoryIdCodec: Codec[SpotifyCategoryId] = deriveUnwrappedCodec
  implicit val spotifyErrorDecoder: Decoder[SpotifyError] = CirceSpotifyError.spotifyErrorDecoder
  implicit val spotifyIdCodec: Codec[SpotifyId] = deriveUnwrappedCodec
  implicit val spotifyImageDecoder: Codec[SpotifyImage] = deriveConfiguredCodec
  implicit val spotifyUriCodec: Codec[SpotifyUri] = deriveUnwrappedCodec
  implicit val spotifyUrlCodec: Codec[SpotifyUrl] = deriveUnwrappedCodec
  implicit val spotifyUserIdCodec: Codec[SpotifyUserId] = deriveUnwrappedCodec
  implicit val subscriptionLevelCodec: Codec[SubscriptionLevel] = CirceSubscriptionLevel.codec

  implicit val addTracksToPlaylistRequestEncoder: Encoder[AddTracksToPlaylistRequest] =
    dropNullValues(deriveConfiguredEncoder[AddTracksToPlaylistRequest])

  implicit val createPlaylistRequestEncoder: Encoder[CreatePlaylistRequest] =
    dropNullValues(deriveConfiguredEncoder[CreatePlaylistRequest])

  implicit val modifyPlaylistRequestEncoder: Encoder[ModifyPlaylistRequest] =
    dropNullValues(deriveConfiguredEncoder[ModifyPlaylistRequest])

  // Custom decoders merging two fields in AudioSegment/AudioSection:
  implicit val audioKeyEncoder: Encoder[AudioKey] = deriveConfiguredEncoder
  implicit val audioModeEncoder: Encoder[AudioMode] = deriveConfiguredEncoder
  implicit val loudnessEncoder: Encoder[Loudness] = deriveConfiguredEncoder
  implicit val tempoEncoder: Encoder[Tempo] = deriveConfiguredEncoder
  implicit val timeSignatureEncoder: Encoder[TimeSignature] = deriveConfiguredEncoder

  implicit val simplePlaylistItemDecoder: Decoder[SimplePlaylistItem] = (c: HCursor) =>
    // TODO: decode with "type" discriminator ("track" / "episode")
    //  also double check optional (aka empty object) externalResourceUrl issue
    Left(DecodingFailure("TODO: decode with \"type\" discriminator (\"track\" / \"episode\")", c.history))
}


text:
SapiUpload::__get
--FILE--
<?php
$upload = new SapiUpload('foo', 'text/plain', 123, '/tmp/foo.txt', 0);
var_dump($upload->name);
var_dump($upload->type);
var_dump($upload->size);
var_dump($upload->tmpName);
var_dump($upload->error);
--EXPECT--
string(3) "foo"
string(10) "text/plain"
int(123)
string(12) "/tmp/foo.txt"
int(0)


text:
__all__ = ['khan_download']

from ..common import *
from .youtube import YouTube

def khan_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
    html = get_content(url)
    youtube_url = re.search('<meta property="og:video" content="([^"]+)', html).group(1)
    YouTube().download_by_url(youtube_url, output_dir=output_dir, merge=merge, info_only=info_only)

site_info = "khanacademy.org"
download = khan_download
download_playlist = playlist_not_supported('khan')


text:
layout: talk
title: Devtools at Etsy
date: 2013-05-27
conf:
  location: DevOpsDays Berlin 2013
  url: http://devopsdays.org/events/2013-berlin/
  date: May 27, 2013
dataid: 92625f30a8e20130254136b7e3e22260
dataratio: 1.72972972972973
vimeo: 70764386
links:
  - url: http://codeascraft.com
    name: Etsy Engineering Blog
  - url: http://etsy.com/codeascraft/talks
    name: Etsy Engineering Talks
  - url: http://codeascraft.com/2013/01/11/schemanator-love-child-of-deployinator-and-schema-changes/
    name: Schemanator - Schema changes at Etsy

abstract: |
  The Etsy DevTools team was created to foster collaboration between
  engineering and operations and also between different teams within
  engineering. We provide the tools to make it easy for everyone to deploy,
  reaching from deployment tools to developer VMs and CI infrastructure
  automation. Our main concern is to make processes fast and simple to enable
  developers to do their work with maximum happiness.

  The talk will be about what are the main concerns of the DevTools team and its
  place between Engineering and Operations. I will give examples of how
  processes were improved and how we introduced tools which make it simple and
  safe to give developers access to production servers and data without causing
  ops headaches.
---


text:
require 'pry'
binding.pry
require Network::Interface

network = Network::Interface.new('eth0')


text:
<ymp_presentation>
	<ymp_slice>
		<ymp_param_istitle>true</ymp_param_istitle>
		<ymp_title>Progress of Reaction: Comparing Q and K</ymp_title>
		<ymp_idx>0</ymp_idx>
		<ymp_xAbsolute>25</ymp_xAbsolute>
		<ymp_yAbsolute>0</ymp_yAbsolute>
		<ymp_xOffset>394</ymp_xOffset>
		<ymp_yOffset>11</ymp_yOffset>
		<ymp_tc>00:00</ymp_tc>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>1</ymp_idx>
		<ymp_xAbsolute>65</ymp_xAbsolute>
		<ymp_yAbsolute>55</ymp_yAbsolute>
		<ymp_xOffset>394</ymp_xOffset>
		<ymp_yOffset>11</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[1] -->A chemical equation gives a rule for how molecules react with one another. However, it does not describe a single state of a chemical system. Instead, the reaction leads to a range of possible states that we can view as lying along a coordinate that we will call the progress of reaction. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>2</ymp_idx>
		<ymp_xAbsolute>50</ymp_xAbsolute>
		<ymp_yAbsolute>68.9</ymp_yAbsolute>
		<ymp_xOffset>523.2</ymp_xOffset>
		<ymp_yOffset>106.7</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[2] -->To illustrate what we mean by progress of reaction will use the dimerization of NO2 to form N2O4. This reaction occurs in the gas phase and we will draw these molecules in a container as shown here. The colors of our molecules are brown for NO2 and grey for N2O4, which represent the actual colors of the gas molecules in the reaction because NO2 is a brown gas and N204 is a colorless gas.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>3</ymp_idx>
		<ymp_xAbsolute>101.5</ymp_xAbsolute>
		<ymp_yAbsolute>205.3</ymp_yAbsolute>
		<ymp_xOffset>365.6</ymp_xOffset>
		<ymp_yOffset>80.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[3] -->We can define the progress of a reaction as the relative amount of NO2 that has been converted to N2O4.</ymp_txt>
	</ymp_slice>

		<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>4</ymp_idx>
		<ymp_xAbsolute>112.35</ymp_xAbsolute>
		<ymp_yAbsolute>296.9</ymp_yAbsolute>
		<ymp_xOffset>41.6</ymp_xOffset>
		<ymp_yOffset>13.7</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[4] -->These diagrams show a range of possible states for the NO2 reaction. The maximal number of NO2s in this case is 10, shown in the far left box.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_param_istoggle>true</ymp_param_istoggle>
		<ymp_idx>5</ymp_idx>
		<ymp_xAbsolute>101.5</ymp_xAbsolute>
		<ymp_yAbsolute>205.3</ymp_yAbsolute>
		<ymp_xOffset>365.6</ymp_xOffset>
		<ymp_yOffset>80.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[5] -->As we move one box to the right, 2 NO2s have reacted to form a single N2O4.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_param_istoggle>true</ymp_param_istoggle>
		<ymp_idx>6</ymp_idx>
		<ymp_xAbsolute>101.5</ymp_xAbsolute>
		<ymp_yAbsolute>205.3</ymp_yAbsolute>

		<ymp_xOffset>365.6</ymp_xOffset>
		<ymp_yOffset>80.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[6] -->In the next box to the right, an additional N2O4 has been formed, and so on until ...</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>7</ymp_idx>
		<ymp_xAbsolute>101.5</ymp_xAbsolute>
		<ymp_yAbsolute>205.3</ymp_yAbsolute>

		<ymp_xOffset>365.6</ymp_xOffset>
		<ymp_yOffset>80.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[7] -->...the far right-hand side, in which all of the NO2s have been converted to N2O4. The maximal number of N2O4s is 5 in this case.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>8</ymp_idx>
		<ymp_xAbsolute>172.25</ymp_xAbsolute>
		<ymp_yAbsolute>295.8</ymp_yAbsolute>
		<ymp_xOffset>235.8</ymp_xOffset>
		<ymp_yOffset>26.1</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[8] -->This graphic provides a convenient visual representation of the progress of reaction. As we move from left to right, reactants combine to form products. As we move from right to left, products break up to form reactants.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_param_istoggle>true</ymp_param_istoggle>
		<ymp_idx>9</ymp_idx>
		<ymp_xAbsolute>101.5</ymp_xAbsolute>
		<ymp_yAbsolute>205.3</ymp_yAbsolute>
		<ymp_xOffset>365.6</ymp_xOffset>
		<ymp_yOffset>80.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[9] -->The very far right corresponds to the limiting reagent situation in which the forward reaction has progressed until all of the reactants have run out.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_param_istoggle>true</ymp_param_istoggle>
		<ymp_idx>10</ymp_idx>
		<ymp_xAbsolute>105</ymp_xAbsolute>
		<ymp_yAbsolute>231</ymp_yAbsolute>
		<ymp_xOffset>365.6</ymp_xOffset>
		<ymp_yOffset>80.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[10] -->Conversely, the leftmost box corresponds to the limiting reagent situation in which the reverse reaction has progressed until all of the products have run out. Since chemical equilibrium systems involve reversible reactions, the equilibrium state lies between these end points. We will use a variable called the reaction quotient, Q to determine where along this continuum a system currently resides and the equilibrium constant, K, to determine where the system resides when it reaches the steady equilibrium state.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>11</ymp_idx>
		<ymp_xAbsolute>67.6</ymp_xAbsolute>
		<ymp_yAbsolute>348.25</ymp_yAbsolute>
		<ymp_xOffset>500</ymp_xOffset>
		<ymp_yOffset>15</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[11] -->The reaction quotient, Q, is the mathematical entity that we use to capture the position along this continuum. As we'll see below, Q is a valuable tool for thinking about equilibrium systems.  Let's write the formula for Q for a general reaction in which reactants A and B react to form products C and D, with the stoichiometric coefficients lowercase a, b, c and d. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>12</ymp_idx>
		<ymp_xAbsolute>132.55</ymp_xAbsolute>
		<ymp_yAbsolute>381.55</ymp_yAbsolute>
		<ymp_xOffset>91.1</ymp_xOffset>
		<ymp_yOffset>39.9</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[12] -->Q gives an indication of the progress of the forward reaction. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>13</ymp_idx>
		<ymp_xAbsolute>258.55</ymp_xAbsolute>
		<ymp_yAbsolute>410</ymp_yAbsolute>
		<ymp_xOffset>120</ymp_xOffset>
		<ymp_yOffset>31</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[13] -->The formula for the reaction quotient, Q, is a ratio of concentrations. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>14</ymp_idx>
		<ymp_xAbsolute>80</ymp_xAbsolute>
		<ymp_yAbsolute>443</ymp_yAbsolute>
		<ymp_xOffset>115</ymp_xOffset>
		<ymp_yOffset>34</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[14] -->The concentrations of products raised to their stoichiometric coefficients are in the numerator.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>15</ymp_idx>
		<ymp_xAbsolute>123</ymp_xAbsolute>
		<ymp_yAbsolute>474</ymp_yAbsolute>
		<ymp_xOffset>68</ymp_xOffset>
		<ymp_yOffset>22</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[15] -->The concentrations of reactants raised to their stoichiometric coefficients are in the denominator. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>16</ymp_idx>
		<ymp_xAbsolute>211</ymp_xAbsolute>
		<ymp_yAbsolute>458</ymp_yAbsolute>
		<ymp_xOffset>100</ymp_xOffset>
		<ymp_yOffset>22.4</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[16] -->If the reaction occurs in a solution, the concentrations are given in molarity, M.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>17</ymp_idx>
		<ymp_xAbsolute>357</ymp_xAbsolute>
		<ymp_yAbsolute>443</ymp_yAbsolute>
		<ymp_xOffset>253</ymp_xOffset>
		<ymp_yOffset>48</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[17] -->If the reaction involves gases, like our NO2 example, the concentration of reactants and products are expressed as partial pressures in atmospheres.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>18</ymp_idx>
		<ymp_xAbsolute>70</ymp_xAbsolute>
		<ymp_yAbsolute>520.05</ymp_yAbsolute>
		<ymp_xOffset>288</ymp_xOffset>
		<ymp_yOffset>12</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[18] -->Our example reaction is this: 2 NO2 molecules combine to form one N2O4 molecule.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>19</ymp_idx>
		<ymp_xAbsolute>80</ymp_xAbsolute>
		<ymp_yAbsolute>555.85</ymp_yAbsolute>
		<ymp_xOffset>120</ymp_xOffset>
		<ymp_yOffset>31</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[19] -->Q is the ratio of the concentration of products to reactants. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>20</ymp_idx>
		<ymp_xAbsolute>215</ymp_xAbsolute>
		<ymp_yAbsolute>549</ymp_yAbsolute>
		<ymp_xOffset>64</ymp_xOffset>
		<ymp_yOffset>40</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[20] -->For this example, the equation takes the following form: the partial pressure of N2O4 divided by the partial pressure of NO2 squared, with the pressure being expressed in atm.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>21</ymp_idx>
		<ymp_xAbsolute>119.8</ymp_xAbsolute>
		<ymp_yAbsolute>610</ymp_yAbsolute>
		<ymp_xOffset>362.1</ymp_xOffset>
		<ymp_yOffset>54.8</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[21] -->Let's return to our sequence of boxes, and calculate Q, the reaction quotient, for each of them. When we calculate Q, the values are always in partial pressures or concentrations.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>22</ymp_idx>
		<ymp_xAbsolute>491.1</ymp_xAbsolute>
		<ymp_yAbsolute>571</ymp_yAbsolute>
		<ymp_xOffset>101.0</ymp_xOffset>
		<ymp_yOffset>79.2</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[22] -->We'll assume that we are looking at a small portion of the gas, with the size of our viewing area such that the partial pressure is one atmosphere for each molecule we see. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>23</ymp_idx>
		<ymp_xAbsolute>72.75</ymp_xAbsolute>
		<ymp_yAbsolute>675</ymp_yAbsolute>
		<ymp_xOffset>396.0</ymp_xOffset>
		<ymp_yOffset>19.1</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[23] -->The partial pressure of N2O4 increases from zero to 5 atmospheres as the forward reaction progresses and we go from left to right. This direction corresponds to converting reactants into products.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>24</ymp_idx>
		<ymp_xAbsolute>74.2</ymp_xAbsolute>
		<ymp_yAbsolute>707</ymp_yAbsolute>
		<ymp_xOffset>393.9</ymp_xOffset>
		<ymp_yOffset>16.9</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[24] -->Conversely, the partial pressure of NO2 increases from zero to 10 as the reverse reaction progresses and we go from right to left. This direction corresponds to converting products into reactants.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>25</ymp_idx>
		<ymp_xAbsolute>57</ymp_xAbsolute>
		<ymp_yAbsolute>738</ymp_yAbsolute>
		<ymp_xOffset>64.5</ymp_xOffset>
		<ymp_yOffset>29.8</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[25] -->The reaction quotient, Q, is given by a ratio of the partial pressures of products over reactants. Like we saw above, Q equals the partial pressure of N2O4/NO2^2.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>26</ymp_idx>
		<ymp_xAbsolute>138.3</ymp_xAbsolute>
		<ymp_yAbsolute>736</ymp_yAbsolute>
		<ymp_xOffset>334.6</ymp_xOffset>
		<ymp_yOffset>29.6</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[26] -->We fill in the values for each snapshot of the reaction and calculate Q.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>27</ymp_idx>
		<ymp_xAbsolute>145</ymp_xAbsolute>
		<ymp_yAbsolute>776</ymp_yAbsolute>
		<ymp_xOffset>334.6</ymp_xOffset>
		<ymp_yOffset>29.6</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[27] -->On the far left, Q = 0, because the partial pressure of N2O4 is zero. Q increases as we move to the right.</ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>28</ymp_idx>
		<ymp_xAbsolute>250</ymp_xAbsolute>
		<ymp_yAbsolute>804</ymp_yAbsolute>
		<ymp_xOffset>327.6</ymp_xOffset>
		<ymp_yOffset>11.3</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[28] -->At the far right, the partial pressure of NO2 is zero, so the value of Q becomes infinite. </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>29</ymp_idx>
		<ymp_xAbsolute>80</ymp_xAbsolute>
		<ymp_yAbsolute>792</ymp_yAbsolute>
		<ymp_xOffset>456</ymp_xOffset>
		<ymp_yOffset>69</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[29] -->However, reversible reactions don't ever end up at either of these extremes because the reaction never totally stops like non-reversible reactions do.  </ymp_txt>
	</ymp_slice>

	<ymp_slice>
		<!--<ymp_param_hasaudio>true</ymp_param_hasaudio> -->
		<ymp_idx>30</ymp_idx>
		<ymp_xAbsolute>40</ymp_xAbsolute>
		<ymp_yAbsolute>792</ymp_yAbsolute>
		<ymp_xOffset>1</ymp_xOffset>
		<ymp_yOffset>1</ymp_yOffset>
		<ymp_tc>00:01</ymp_tc>
		<ymp_txt><!--[30] -->Instead, the reversible reactions will eventually reach a <b>steady state</b> - where some reactants are being converted to products and vice versa, but the total amounts of reactants and products isn't changing - Q is not changing.  We'll explore this in more detail in the next module, which discusses equilibrium constants and the Law of Mass Action. </ymp_txt>
	</ymp_slice>

</ymp_presentation>


text:
package search

/*
	GENERATED CODE, YOUR EDITS ARE FUTILE

	generated from Thing
	using http://github.com/brianstarke/go-beget/generator/searcher
*/

import (
	"fmt"
	"strings"

	"github.com/brianstarke/go-beget/searcher"
)

// ThingField is a field within the Thing struct
// that is able to be filtered on, sorted on, or returned.
type ThingField int

// Enum'd for helpfulness
const (
	ThingID ThingField = iota
	ThingColor
	ThingDescription
	ThingLength
	ThingHeight
)

// MarshalText implements https://golang.org/pkg/encoding/#TextMarshaler
func (s ThingField) MarshalText() ([]byte, error) {
	var data string

	switch s {
	case ThingID:
		data = "id"
	case ThingColor:
		data = "color"
	case ThingDescription:
		data = "description"
	case ThingLength:
		data = "length"
	case ThingHeight:
		data = "height"

	default:
		return nil, fmt.Errorf("Unable to marshal `%v` in to bytes", s)
	}
	return []byte(data), nil
}

// UnmarshalText implements https://golang.org/pkg/encoding/#TextUnmarshaler
func (s *ThingField) UnmarshalText(b []byte) error {
	str := strings.Trim(string(b), `"`)

	switch str {
	case "id":
		*s = ThingID
	case "color":
		*s = ThingColor
	case "description":
		*s = ThingDescription
	case "length":
		*s = ThingLength
	case "height":
		*s = ThingHeight

	default:
		return fmt.Errorf("Unable to marshal '%s' into type ThingField", str)
	}
	return nil
}

// DbFieldName returns the name of the field to use in the SQL query
func (s ThingField) DbFieldName() string {
	switch s {
	case ThingID:
		return "id"
	case ThingColor:
		return "color"
	case ThingDescription:
		return "description"
	case ThingLength:
		return "length"
	case ThingHeight:
		return "height"

	}
	return ""
}

/*
ThingSearchRequest defines a set of parameters for
searching for Thing.  It can be serialized and passed
between services as JSON, or used to generate a SQL statement.
*/
type ThingSearchRequest struct {
	searcher.SearchRequestFields
	Filters []ThingSearchFilter `json:"filters"`
	OrderBy ThingOrderBy        `json:"orderBy"`
	Fields  []ThingField        `json:"fields"`
}

/*
ThingSearchFilter is a filter specific to Thing
*/
type ThingSearchFilter struct {
	Field     ThingField               `json:"field"`
	Value     interface{}              `json:"value"`
	Operator  searcher.FilterOperator  `json:"operator"`
	Condition searcher.FilterCondition `json:"condition"`
}

/*
ThingOrderBy is a sort directive that is specific to Thing
*/
type ThingOrderBy struct {
	Field      ThingField `json:"field"`
	Descending bool       `json:"desc"`
}

// Implement searcher.SearchRequest interface

// GetTableName returns the database table name
func (sr *ThingSearchRequest) GetTableName() string {
	return "things"
}

// GetFilters returns the SQL WHERE clauses
func (sr *ThingSearchRequest) GetFilters() []searcher.Filter {
	filters := []searcher.Filter{}

	for _, f := range sr.Filters {
		filter := searcher.Filter{
			Field:     f.Field,
			Value:     f.Value,
			Operator:  f.Operator,
			Condition: f.Condition,
		}
		filters = append(filters, filter)
	}

	return filters
}

// GetOrderBy returns the SQL ORDER BY clauses
func (sr *ThingSearchRequest) GetOrderBy() searcher.OrderBy {
	return searcher.OrderBy{
		Field:      sr.OrderBy.Field,
		Descending: sr.OrderBy.Descending,
	}
}

// GetLimit returns the SQL LIMIT clause
func (sr *ThingSearchRequest) GetLimit() int {
	return sr.Limit
}

// GetOffset returns the SQL OFFSET clause
func (sr *ThingSearchRequest) GetOffset() int {
	return sr.Offset
}

// AddFilter adds a WHERE clause
func (sr *ThingSearchRequest) AddFilter(field ThingField, value interface{}, operator searcher.FilterOperator, condition searcher.FilterCondition) {
	f := ThingSearchFilter{
		Field:     field,
		Value:     value,
		Operator:  operator,
		Condition: condition,
	}
	sr.Filters = append(sr.Filters, f)
}

// SetOrderBy sets the ORDER BY clause
func (sr *ThingSearchRequest) SetOrderBy(field ThingField, isDescending bool) {
	sr.OrderBy = ThingOrderBy{
		Field:      field,
		Descending: isDescending,
	}
}

// GetFields returns the SQL SELECT fields
func (sr *ThingSearchRequest) GetFields() []string {
	fields := []string{}

	for _, f := range sr.Fields {
		fields = append(fields, f.DbFieldName())
	}

	return fields
}


text:
from django.contrib import admin

from . import models

admin.site.register(models.EventPage)
admin.site.register(models.EventListPage)
admin.site.register(models.Organization)


text:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package hector_imu_tools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.3.3 (2014-06-15)
------------------
* hector_imu_tools: Basics of simple height etimation
* hector_imu_tools: Add tf publishers in hector_imu_tools
* hector_imu_tools: Also write out fake odometry
* hector_imu_tools: Fix typo
* hector_imu_tools: Prevent race conditions in slam, formatting
* hector_imu_tools: Small executable for generating a IMU message out of a (2d) pose and roll/pitch imu message
* Contributors: Stefan Kohlbrecher


text:
function Log(name, level) {
	this.name      = name;
	this.level     = level || Log.DEBUG;
	this.formatter = function(log, level, message) {
		return '[' + log.getLevelName(level, true).toUpperCase() + '] ' + message;
	};
}

Log.DEBUG   = 1;
Log.INFO    = 2;
Log.WARNING = 3;
Log.ERROR   = 4;

Log.prototype = {
	getLevelName: function(level, shortName) {
		switch (level) {
			case Log.DEBUG:   return shortName ? 'dbg' : 'debug';
			case Log.INFO:    return shortName ? 'inf' : 'info';
			case Log.WARNING: return shortName ? 'wrn' : 'warning';
			case Log.ERROR:   return shortName ? 'err' : 'error';
		}

		return '[?]';
	},

	setFormatter: function(formatter) {
		this.formatter = formatter;
	},

	debug: function(message) {
		this.log(Log.DEBUG, message);
	},

	info: function(message) {
		this.log(Log.INFO, message);
	},

	warning: function(message) {
		this.log(Log.WARNING, message);
	},

	error: function(message) {
		this.log(Log.ERROR, message);
	},

	ircMessage: function(chan, username, message) {
		this.info(this.prependQueueInfo('[#' + chan + '] ' + username + ': ' + message));
	},

	ircInfo: function(chan, info) {
		this.info(this.prependQueueInfo('[#' + chan + '] ' + info));
	},

	log: function(level, message) {
		if (level >= this.level) {
			console.log(this.formatter(this, level, message));
		}
	},

	prependQueueInfo: function(message) {
		var queue = this.outgoingQueueLength();

		if (queue) {
			message = '[' + (queue < 10 ? '0' : '') + queue + '] ' + message;
		}
		else {
			message = '[  ] ' + message;
		}

		return message;
	},

	outgoingQueueLength: function() {
		return null;
	}
};

module.exports = Log;


text:
package net.snowflake.client.jdbc.telemetryOOB;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * A singleton class which wrapped the ExecutorService, which is used to submit telemetry data
 * asynchronously to server
 */
public class TelemetryThreadPool {
  private ExecutorService uploader;

  private static TelemetryThreadPool instance;

  public static TelemetryThreadPool getInstance() {
    if (instance == null) {
      synchronized (TelemetryThreadPool.class) {
        if (instance == null) {
          instance = new TelemetryThreadPool();
        }
      }
    }
    return instance;
  }

  private TelemetryThreadPool() {
    uploader =
        new ThreadPoolExecutor(
            0, // core size
            10, // max size
            1, // keep alive time
            TimeUnit.SECONDS,
            new LinkedBlockingQueue<>() // work queue
            );
  }

  public void execute(Runnable task) {
    uploader.execute(task);
  }

  public <T> Future<T> submit(Callable<T> task) {
    return uploader.submit(task);
  }
}


text:
using System.Security.Cryptography;

namespace Vinchuca.Utils
{
    static class PoW
    {
        public static bool IsEnough(byte[] payload, int offset, int count, int requiredWork)
        {
            var hash = SHA256.Create().ComputeHash(payload, offset, count);
            var val = (uint)(hash[0] << 24 | hash[1] << 16 | hash[2] << 8 | hash[3]);
            var difficulty = 0xffffffff >> requiredWork;
            return val < difficulty;
        }
    }
}


text:
tests=[
      ("python","testCMIM.py",{}),
          ]

longTests=[]

if __name__=='__main__':
  import sys
  from rdkit import TestRunner
  failed,tests = TestRunner.RunScript('test_list.py',0,1)
  sys.exit(len(failed))


text:
require 'spec_helper'
require 'shared/adapter'
require 'oanda_api/streaming/adapters/gson' if gem_installed? :Gson

describe "OandaAPI::Streaming::Adapters::Gson", :if => gem_installed?(:Gson) do
  it_behaves_like 'an adapter', described_class
end


text:
#ifndef PRIMITIV_C_INITIALIZER_IMPL_H_
#define PRIMITIV_C_INITIALIZER_IMPL_H_

#include <primitiv/c/define.h>
#include <primitiv/c/initializer.h>
#include <primitiv/c/tensor.h>

/**
 * Creates a new Initializer object that generates a same-value tensor.
 * @param k Constant value to fill a tensor.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateConstantInitializer(
    float k, primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that uses a parameterized uniform
 * distribution (lower, upper].
 * @param lower Lower boundary of the uniform distribution.
 * @param upper Upper boundary of the uniform distribution.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateUniformInitializer(
    float lower, float upper, primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that uses a parameterized normal
 * distribution N(mean, sd).
 * @param mean Mean of the normal distribution.
 * @param sd Standard deviation of the normal distribution.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateNormalInitializer(
    float mean, float sd, primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that generates a identity tensor.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateIdentityInitializer(
    primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that generates a tensor by the Xavier matrix
 * initialization with the uniform distribution.
 * @param scale Constant value that determines the scale of the uniform
 *              distribution.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateXavierUniformInitializer(
    float scale, primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that generates a tensor by the Xavier matrix
 * initialization with the normal distribution.
 * @param scale Constant value that determines the scale of the normal
 *              distribution.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateXavierNormalInitializer(
    float scale, primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that generates a tensor by the Xavier matrix
 * initialization with the uniform distribution for conv2d filters.
 * @param scale Constant value that determines the scale of the uniform
 *              distribution.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateXavierUniformConv2DInitializer(
    float scale, primitivInitializer_t **newobj);

/**
 * Creates a new Initializer object that generates a tensor by the Xavier matrix
 * initialization with the normal distribution for conv2d filters.
 * @param scale Constant value that determines the scale of the normal
 *              distribution.
 * @param newobj Pointer to receive a handler.
 * @return Status code.
 */
PRIMITIV_C_API PRIMITIV_C_STATUS primitivCreateXavierNormalConv2DInitializer(
    float scale, primitivInitializer_t **newobj);

#endif  // PRIMITIV_C_INITIALIZER_IMPL_H_