text:
package doobie.example

import doobie.imports._
import doobie.contrib.postgresql.imports._

import java.io.File

import scalaz._, Scalaz._, scalaz.concurrent.Task
import scalaz.stream._
import scodec.bits.ByteVector
import org.postgresql.copy.{CopyIn, CopyOut}

object postgrescopymanager {

  case class City(
    id: Int,
    name: String,
    countryCode: String,
    district: String,
    population: Int
  )

  val cities =
    City(1400, "Mazar-e-Sharif", "AFG", "Balkh", 127800) ::
    City(1500, "Amsterdam", "NLD", "Noord-Holland", 731200) ::
    City(1600, "Rotterdam", "NLD", "Zuid-Holland", 593321) ::
    City(1700, "Haag", "NLD", "Zuid-Holland", 440900) ::
    City(1800, "Utrecht", "NLD", "Utrecht", 234323) ::
    City(1900, "Eindhoven", "NLD", "Noord-Brabant", 201843) :: Nil

  def cityToFields(city: City): String =
    // string escaping is omitted for simplicity
    List(
      city.id.shows,
      city.name,
      city.countryCode,
      city.district,
      city.population.shows
    ).intercalate("|")

  lazy val xa: Transactor[Task] =
    DriverManagerTransactor("org.postgresql.Driver", "jdbc:postgresql:world", "postgres", "")

  object inputstream {

    val citiesProcess: Process[Task, City] =
      Process.emitAll(cities)

    def stringToByteVector(str: String): ByteVector =
      ByteVector.view(str.getBytes("UTF-8"))

    def prog(cities: Process[Task, City]): CopyManagerIO[Long] =
      PFCM.copyIn(
        "COPY city FROM STDIN DELIMITER '|'",
        io.toInputStream(
          cities
            .map(cityToFields)
            .intersperse("\n")
            .map(stringToByteVector)
        )
      )

    val task: Task[Unit] =
      PHC.pgGetCopyAPI(prog(citiesProcess)).transact(xa) >>= { count =>
        Task.delay(Console.println(s"$count records inserted"))
      }

    def main(args: Array[String]): Unit =
      task.run
  }

  object copyinprocess {

    val copyInSink: Sink[CopyInIO, ByteVector] =
      Process.repeatEval {
        PFCI.delay((bytes: ByteVector) => {
          val barr = bytes.toArray
          PFCI.writeToCopy(barr, 0, barr.length)
        })
      }.onComplete(Process.eval_(PFCI.endCopy.void))

    val copyOutProcess: Process[CopyOutIO, ByteVector] =
      Process.repeatEval[CopyOutIO, ByteVector] {
        PFCO.readFromCopy >>= { bytes =>
          PFCO.delay {
            Option(bytes).map(ByteVector.view)
              .getOrElse(throw Cause.Terminated(Cause.End))
          }
        }
      }

    val citiesProcess: Process[CopyInIO, City] =
      Process.emitAll(cities)

    def stringToByteVector(str: String): ByteVector =
      ByteVector.view(str.getBytes("UTF-8"))

    val stdOutLines: Sink[CopyOutIO, String] =
      Process.constant((s: String) => PFCO.delay(println(s)))

    val outProcess: Process[CopyOutIO, Unit] =
      copyOutProcess
        .map(b => new String(b.toArray, "UTF-8"))
        .flatMap(s => Process.emitAll(s.split("\n")))
        .map { s =>
          // naive parsing. error handling is omitted for simplicity
          val fields = s.split(",")
          City(fields(0).toInt, fields(1), fields(2), fields(3), fields(4).toInt)
        }
        .map(_.toString)
        .to(stdOutLines)

    val progOut: CopyManagerIO[Unit] =
      PFCM.copyOut("copy city to stdout (encoding 'utf-8', format csv)") >>= {
        outProcess.run.transK[CopyManagerIO].run(_)
      }

    val progIn: CopyManagerIO[Unit] =
      PFCM.copyIn("COPY city FROM STDIN DELIMITER '|'") >>= {
        citiesProcess
          .map(cityToFields)
          .intersperse("\n")
          .map(stringToByteVector)
          .to(copyInSink)
          .run.transK[CopyManagerIO].run(_)
      }

    val task: Task[Unit] =
      PHC.pgGetCopyAPI(progIn *> progOut).transact(xa)

    def main(args: Array[String]): Unit =
      task.run
  }

  object recaptured {

    def copyInSink(ci: => CopyIn): Sink[Task, ByteVector] =
      io.resource(Task.delay(ci))(ci => Task.delay(ci.endCopy()).void) { ci =>
        Task.now((bytes: ByteVector) => Task.delay {
          val barr = bytes.toArray
          ci.writeToCopy(barr, 0, barr.length)
        })
      }

    def copyOutProcess(co: => CopyOut): Process[Task, ByteVector] =
      io.resource(Task.delay(co))(_ => ().point[Task]) { co =>
        Task.delay {
          val bytes = co.readFromCopy()
          Option(bytes).map(ByteVector.view)
            .getOrElse(throw Cause.Terminated(Cause.End))
        }
      }

    val citiesProcess: Process[Task, City] =
      Process.emitAll(cities)

    def stringToByteVector(str: String): ByteVector =
      ByteVector.view(str.getBytes("UTF-8"))

    val progIn: CopyManagerIO[Unit] =
      PFCM.copyIn("COPY city FROM STDIN DELIMITER '|'") >>= { copyIn =>
        Capture[CopyManagerIO].apply {
          citiesProcess
            .map(cityToFields)
            .intersperse("\n")
            .map(stringToByteVector)
            .to(copyInSink(copyIn))
            .run.run // side-effect is re-captured in CopyManagerIO
        }
      }

    val progOut: CopyManagerIO[Unit] =
      PFCM.copyOut("copy city to stdout (encoding 'utf-8', format csv)") >>= { copyOut =>
        Capture[CopyManagerIO].apply {
          copyOutProcess(copyOut)
            .map(b => new String(b.toArray, "UTF-8"))
            .flatMap(s => Process.emitAll(s.split("\n")))
            .map { s =>
              // naive parsing. error handling is omitted for simplicity
              val fields = s.split(",")
              City(fields(0).toInt, fields(1), fields(2), fields(3), fields(4).toInt)
            }
            .map(_.toString)
            .to(io.stdOutLines)
            .run.run // side-effect is re-captured in CopyManagerIO
        }
      }

    val task: Task[Unit] =
      PHC.pgGetCopyAPI(progIn *> progOut).transact(xa)

    def main(args: Array[String]): Unit =
      task.run
  }

}


text:
using System;
using Twilio;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var twilio = new TwilioRestClient(AccountSid, AuthToken);

    var queue = twilio.CreateQueue("newqueue");

    Console.WriteLine(queue.Sid);
  }
}

redpajama_set_name: RedPajamaGithub


text:
%getSurfaceIdx  Return the surface index of the contour
%
%   iSurface = getSurfaceIdx(imodContour)
%
%   iSurface    The surface index of the contour.
%
%   imodContour The ImodContour object.
%
%   ImodContour.getSurfaceIdx returns the surface index of the contour.
%
%   Bugs: none known
%
% This file is part of PEET (Particle Estimation for Electron Tomography).
% Copyright 2000-2012 The Regents of the University of Colorado & BLD3EMC:
%           The Boulder Laboratory For 3D Electron Microscopy of Cells.
% See PEETCopyright.txt for more details.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  $Author: John Heumann $
%
%  $Date: 2012/01/12 17:22:51 $
%
%  $Revision: 04b6cb6df697 $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function iSurface = getSurfaceIdx(imodContour)
iSurface = imodContour.points(:, indices);


text:
#import <Foundation/NSObject.h>
#import <Foundation/NSData.h>
#import <CoreFoundation/CFData.h>
#import <CoreFoundation/CFURL.h>

@class O2DataConsumer;
typedef O2DataConsumer *O2DataConsumerRef;

@interface O2DataConsumer : NSObject {
   NSMutableData *_data;
   size_t         _position;
}

-(NSMutableData *)mutableData;

O2DataConsumerRef O2DataConsumerCreateWithCFData(CFMutableDataRef data);
O2DataConsumerRef O2DataConsumerCreateWithURL(CFURLRef url);
O2DataConsumerRef O2DataConsumerRetain(O2DataConsumerRef self);
void O2DataConsumerRelease(O2DataConsumerRef self);

// private internal use
size_t O2DataConsumerPutBytes(O2DataConsumerRef self,const void *buffer,size_t count);

@end


text:
export RUN_PATH=`pwd`
export BAM_DIR=$OUTPUT_DIR

for LIB in ${LIB_LIST}; do

	if [[ ! -d $OUTPUT_DIR/$LIB ]]; then
		mkdir $OUTPUT_DIR/$LIB
	fi

	export LIST=$LIB
	JOB_NAME="Merging & deduplication of unsorted file for methExtraction"

	### Will take 8 core for the merging of the bam files for each SL# or libraries, and removes pcr deduplicates from those merged bam files, which is passed on to bismark methylation extractor:
	bsub -We 24:00 -q night -n $CORE_NUM -R span[hosts=1] -J "$JOB_NAME" -o $OUTPUT_DIR/$LIB/log_files/${LIB}_full_pipeline_deduplication.out $RUN_PATH/mergeUnsorted_dedup_files_for_methExtraction_orig.sh
	echo " "
done


text:
using namespace centauri::appctl::common;
using centauri::appctl::common::commands::mountOpts_t;

namespace centauri {
    namespace appctl {
        namespace mount {
            int command::run(commandOptions_t *_options) {
                mountOpts_t *options = (mountOpts_t *) _options;
                return ENOSYS;
            }
        }
    }
}


text:
#ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_RENDERPLAYERINFOCARDSPROVIDERREGISTRARINTERFACE_H_
#define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_RENDERPLAYERINFOCARDSPROVIDERREGISTRARINTERFACE_H_

#include <memory>
#include <unordered_set>

#include <AVSCommon/SDKInterfaces/RenderPlayerInfoCardsProviderInterface.h>

namespace alexaClientSDK {
namespace avsCommon {
namespace sdkInterfaces {

/**
 * This class provides an interface to register providers of the @c RenderPlayerInfoCardsProviderInterface.
 */
class RenderPlayerInfoCardsProviderRegistrarInterface {
public:
    /**
     * Destructor
     */
    virtual ~RenderPlayerInfoCardsProviderRegistrarInterface() = default;

    /**
     * Add a new @c RenderPlayerInfoCardsProviderInterface instance to provide cards when creating a TemplateRuntime CA.
     *
     * @param provider The @c RenderPlayerInfoCardsProviderInterface instance to add.
     */
    virtual bool registerProvider(
        const std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderInterface>& provider) = 0;

    /**
     * Get the set of @c RenderPlayerInfoCardsProviderInterface instances to be invoked when creating a
     * TemplateRuntime CA.
     *
     * @return A vector of @c RenderPlayerInfoCardsProviderInterface instances.
     */
    virtual std::unordered_set<std::shared_ptr<avsCommon::sdkInterfaces::RenderPlayerInfoCardsProviderInterface>>
    getProviders() = 0;
};

}  // namespace sdkInterfaces
}  // namespace avsCommon
}  // namespace alexaClientSDK

#endif  // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_INCLUDE_AVSCOMMON_SDKINTERFACES_RENDERPLAYERINFOCARDSPROVIDERREGISTRARINTERFACE_H_


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-volumespecification.html

module Stratosphere.ResourceProperties.EMRClusterVolumeSpecification where

import Stratosphere.ResourceImports

-- | Full data type definition for EMRClusterVolumeSpecification. See
-- 'emrClusterVolumeSpecification' for a more convenient constructor.
data EMRClusterVolumeSpecification =
  EMRClusterVolumeSpecification
  { _eMRClusterVolumeSpecificationIops :: Maybe (Val Integer)
  , _eMRClusterVolumeSpecificationSizeInGB :: Val Integer
  , _eMRClusterVolumeSpecificationVolumeType :: Val Text
  } deriving (Show, Eq)

instance ToJSON EMRClusterVolumeSpecification where
  toJSON EMRClusterVolumeSpecification{..} =
    object $
    catMaybes
    [ fmap (("Iops",) . toJSON) _eMRClusterVolumeSpecificationIops
    , (Just . ("SizeInGB",) . toJSON) _eMRClusterVolumeSpecificationSizeInGB
    , (Just . ("VolumeType",) . toJSON) _eMRClusterVolumeSpecificationVolumeType
    ]

-- | Constructor for 'EMRClusterVolumeSpecification' containing required
-- fields as arguments.
emrClusterVolumeSpecification
  :: Val Integer -- ^ 'emrcvsSizeInGB'
  -> Val Text -- ^ 'emrcvsVolumeType'
  -> EMRClusterVolumeSpecification
emrClusterVolumeSpecification sizeInGBarg volumeTypearg =
  EMRClusterVolumeSpecification
  { _eMRClusterVolumeSpecificationIops = Nothing
  , _eMRClusterVolumeSpecificationSizeInGB = sizeInGBarg
  , _eMRClusterVolumeSpecificationVolumeType = volumeTypearg
  }

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-volumespecification.html#cfn-elasticmapreduce-cluster-volumespecification-iops
emrcvsIops :: Lens' EMRClusterVolumeSpecification (Maybe (Val Integer))
emrcvsIops = lens _eMRClusterVolumeSpecificationIops (\s a -> s { _eMRClusterVolumeSpecificationIops = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-volumespecification.html#cfn-elasticmapreduce-cluster-volumespecification-sizeingb
emrcvsSizeInGB :: Lens' EMRClusterVolumeSpecification (Val Integer)
emrcvsSizeInGB = lens _eMRClusterVolumeSpecificationSizeInGB (\s a -> s { _eMRClusterVolumeSpecificationSizeInGB = a })

-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticmapreduce-cluster-volumespecification.html#cfn-elasticmapreduce-cluster-volumespecification-volumetype
emrcvsVolumeType :: Lens' EMRClusterVolumeSpecification (Val Text)
emrcvsVolumeType = lens _eMRClusterVolumeSpecificationVolumeType (\s a -> s { _eMRClusterVolumeSpecificationVolumeType = a })


text:
echo "iOS_BUILD = $iOS_BUILD"

if [ "$BUILD_APP" != true -o  "$iOS_BUILD" != true ]; then
    echo "Info: Can only run for iOS build. Skip~~~"
    exit 0
fi

KEYCHAIN_FILE="ios-build.keychain"

# Remove the custom keychain file.
security delete-keychain $KEYCHAIN_FILE

# Remove decrypted cert files
rm -f "./env/xcode-cert/$XCODE_CERT_NAME.cer"
rm -f "./env/xcode-cert/$XCODE_CERT_NAME.p12"

# Remove provisioning profile
PROVISIONING_PROFILE_UUID=`grep UUID -A1 -a "./env/xcode-profile/$XCODE_PROVISIONING_PROFILE_NAME.mobileprovision"  | grep -io "[-A-Z0-9]\{36\}"`
rm -f "~/Library/MobileDevice/Provisioning Profiles/$PROVISIONING_PROFILE_UUID.mobileprovision"
rm -f "./env/xcode-profile/$XCODE_PROVISIONING_PROFILE_NAME.mobileprovision"


text:
#include "n_exec_widget.h"
#include "ui_n_exec_widget.h"
#include <QScreen>
#include <QCursor>
#include <QWebInspector>
#include <QWebFrame>
#include <QDebug>
#include <QWebPage>

NExecWidget::NExecWidget(QWidget *parent) : QMainWindow(parent), ui(new Ui::NExecWidget)
{
    ui->setupUi(this);

    resize(QGuiApplication::primaryScreen()->availableSize());
    ui->menubar->hide();
    ui->statusbar->hide();

    mInspector = new QWebInspector();

    QWebPage *page = ui->webView->page();
    QVBoxLayout *layout = new QVBoxLayout;
    layout->addWidget(mInspector);
    layout->setMargin(0);
    ui->inspector->setLayout(layout);
    mInspector->setPage(page);
    mInspector->show();

    QWebView *webView = ui->webView;
    QWebSettings *settings = webView->settings();
    QWebSettings::setObjectCacheCapacities(0, 0, 0);
    settings->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, true);
    settings->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
    settings->setAttribute(QWebSettings::AcceleratedCompositingEnabled, false);

    // 本来はブリッジは必要ないのだが、JS側にNavyCreatorから実行されていることを知らせるためにあえてブリッジを入れている
    mNative = new NativeBridge(this);
    webView->page()->mainFrame()->addToJavaScriptWindowObject(QString("Native"), mNative);

    connect(webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(injectNativeBridge()));
    connect(ui->webView, SIGNAL(loadFinished(bool)), this, SIGNAL(finishLoad()));
    connect(ui->webView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuForWebView(QPoint)));
}

void NExecWidget::injectNativeBridge() {
    QWebView *webView = ui->webView;
    webView->page()->mainFrame()->addToJavaScriptWindowObject(QString("Native"), mNative);
}

void NExecWidget::loadFile(const QString &filePath) {
    QWebView *webView = ui->webView;
    QString htmlPath = "file://" + filePath;
    mUrl = QUrl(htmlPath);
    webView->load(mUrl);
}

void NExecWidget::reload() {
    QWebView *webView = ui->webView;
    webView->load(mUrl);
}

void NExecWidget::contextMenuForWebView(const QPoint &/*point*/) {
    QMenu menu(this);
    menu.addAction(tr("&Reload"), this, SLOT(reload()));
    menu.exec(QCursor::pos());
}

NExecWidget::~NExecWidget()
{
    delete ui;
}


text:
<md-card>
    <md-card-content>
        <div layout layout-sm="column">
            <md-input-container flex="100">
                <label>Descrição da categoria</label>
                <input md-maxlength="50" ng-model="vm.categoria.descricao">
            </md-input-container>
        </div>
    </md-card-content>
    <md-card-footer>
        <md-button>Salvar</md-button>
    </md-card-footer>
</md-card>


text:
package org.mozilla.javascript;

import java.io.Serializable;

import org.mozilla.javascript.debug.DebuggableScript;

final class InterpreterData implements Serializable, DebuggableScript
{
    static final long serialVersionUID = 5067677351589230234L;

    static final int INITIAL_MAX_ICODE_LENGTH = 1024;
    static final int INITIAL_STRINGTABLE_SIZE = 64;
    static final int INITIAL_NUMBERTABLE_SIZE = 64;

    InterpreterData(int languageVersion, String sourceFile,
                    String encodedSource, boolean isStrict)
    {
        this.languageVersion = languageVersion;
        this.itsSourceFile = sourceFile;
        this.encodedSource = encodedSource;
        this.isStrict = isStrict;
        init();
    }

    InterpreterData(InterpreterData parent)
    {
        this.parentData = parent;
        this.languageVersion = parent.languageVersion;
        this.itsSourceFile = parent.itsSourceFile;
        this.encodedSource = parent.encodedSource;

        init();
    }

    private void init()
    {
        itsICode = new byte[INITIAL_MAX_ICODE_LENGTH];
        itsStringTable = new String[INITIAL_STRINGTABLE_SIZE];
    }

    String itsName;
    String itsSourceFile;
    boolean itsNeedsActivation;
    int itsFunctionType;

    String[] itsStringTable;
    double[] itsDoubleTable;
    InterpreterData[] itsNestedFunctions;
    Object[] itsRegExpLiterals;

    byte[] itsICode;

    int[] itsExceptionTable;

    int itsMaxVars;
    int itsMaxLocals;
    int itsMaxStack;
    int itsMaxFrameArray;

    // see comments in NativeFuncion for definition of argNames and argCount
    String[] argNames;
    boolean[] argIsConst;
    int argCount;

    int itsMaxCalleeArgs;

    String encodedSource;
    int encodedSourceStart;
    int encodedSourceEnd;

    int languageVersion;

    boolean useDynamicScope;
    boolean isStrict;
    boolean topLevel;

    Object[] literalIds;

    UintMap longJumps;

    int firstLinePC = -1; // PC for the first LINE icode

    InterpreterData parentData;

    boolean evalScriptFlag; // true if script corresponds to eval() code

    public boolean isTopLevel()
    {
        return topLevel;
    }

    public boolean isFunction()
    {
        return itsFunctionType != 0;
    }

    public String getFunctionName()
    {
        return itsName;
    }

    public int getParamCount()
    {
        return argCount;
    }

    public int getParamAndVarCount()
    {
        return argNames.length;
    }

    public String getParamOrVarName(int index)
    {
        return argNames[index];
    }

    public boolean getParamOrVarConst(int index)
    {
        return argIsConst[index];
    }

    public String getSourceName()
    {
        return itsSourceFile;
    }

    public boolean isGeneratedScript()
    {
        return ScriptRuntime.isGeneratedScript(itsSourceFile);
    }

    public int[] getLineNumbers()
    {
        return Interpreter.getLineNumbers(this);
    }

    public int getFunctionCount()
    {
        return (itsNestedFunctions == null) ? 0 : itsNestedFunctions.length;
    }

    public DebuggableScript getFunction(int index)
    {
        return itsNestedFunctions[index];
    }

    public DebuggableScript getParent()
    {
         return parentData;
    }
}


text:
#ifndef _DSC_LIBRARY_H
#define _DSC_LIBRARY_H

#include "MI.h"
#include "EngineHelper.h"
#include "parson.h"

MI_Result  DscLib_GetConfiguration (
        _In_ JSON_Value** p_result_root_value,
        _In_ MI_Char* p_configuration_filename,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_TestConfiguration (
        _In_ JSON_Value** p_result_root_value,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_PerformInventory (
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_PerformInventoryOOB (
        _In_ MI_Char* p_mof_filename,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_SetConfiguration (
        _In_ MI_Char* p_configuration_filename,
        _In_ MI_Uint32 p_flags,
        _In_ MI_Boolean p_force,
        _In_ MI_Char* p_method_name,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_SendConfiguration (
        _In_ MI_Char* p_configuration_filename,
        _In_ MI_Boolean p_force,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_SendConfigurationApply (
        _In_ MI_Char* p_configuration_filename,
        _In_ MI_Boolean p_force,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_SendMetaConfigurationApply (
        _In_ MI_Char* p_metaconfiguration_filename,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_GetMetaConfiguration (
        _In_ JSON_Value** p_result_root_value,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_ApplyConfiguration (
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_RollBack (
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_PerformRequiredConfigurationChecks (
        _In_ MI_Uint32 p_flags,
        _In_ JSON_Value** p_error_root_value
    );

MI_Result  DscLib_StopConfiguration (
        _In_ MI_Boolean p_force,
        _In_ JSON_Value** p_error_root_value
    );

#endif // _DSC_LIBRARY_H


text:
require 'formula'

# Reference: https://github.com/b4winckler/macvim/wiki/building
class Macvim < Formula
  homepage 'http://code.google.com/p/macvim/'
  url 'https://github.com/b4winckler/macvim/archive/snapshot-73.tar.gz'
  version '7.4-73'
  sha1 'b87e37fecb305a99bc268becca39f8854e3ff9f0'

  head 'https://github.com/b4winckler/macvim.git', :branch => 'master'

  option "custom-icons", "Try to generate custom document icons"
  option "override-system-vim", "Override system vim"

  depends_on :xcode
  depends_on 'cscope' => :recommended
  depends_on 'lua' => :optional
  depends_on 'luajit' => :optional
  depends_on :python => :recommended
  depends_on :python3 => :optional

  env :std if MacOS.version <= :snow_leopard
  # Help us! We'd like to use superenv in these environments too

  def install
    # MacVim doesn't have and required any Python package, unset PYTHONPATH.
    ENV.delete('PYTHONPATH')

    # Set ARCHFLAGS so the Python app (with C extension) that is
    # used to create the custom icons will not try to compile in
    # PPC support (which isn't needed in Homebrew-supported systems.)
    ENV['ARCHFLAGS'] = "-arch #{MacOS.preferred_arch}"

    # If building for 10.7 or up, make sure that CC is set to "clang".
    ENV.clang if MacOS.version >= :lion

    # macvim HEAD only works with the current Ruby.framework because it builds with -framework Ruby
    system_ruby = "/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby"

    args = %W[
      --with-features=huge
      --enable-multibyte
      --with-macarchs=#{MacOS.preferred_arch}
      --enable-perlinterp
      --enable-rubyinterp
      --enable-tclinterp
      --with-ruby-command=#{system_ruby}
      --with-tlib=ncurses
      --with-compiledby=Homebrew
      --with-local-dir=#{HOMEBREW_PREFIX}
    ]

    args << "--with-macsdk=#{MacOS.version}" unless MacOS::CLT.installed?
    args << "--enable-cscope" if build.with? "cscope"

    if build.with? "lua"
      args << "--enable-luainterp"
      args << "--with-lua-prefix=#{HOMEBREW_PREFIX}"
    end

    if build.with? "luajit"
      args << "--enable-luainterp"
      args << "--with-lua-prefix=#{HOMEBREW_PREFIX}"
      args << "--with-luajit"
    end

    if build.with? "python"
      if build.without? "python3"
        # MacVim seems to link Python by `-framework Python` (instead of
        # `python-config --ldflags`) and so we have to pass the -F to point to
        # where the Python.framework is located, we want it to use!
        # Also the -L is needed for the correct linking. This is a mess but we have
        # to wait until MacVim is really able to link against different Python's
        # on the Mac. Note configure detects brewed python correctly, but that
        # is ignored.
        # See https://github.com/Homebrew/homebrew/issues/17908
        py_prefix = Pathname.new `python-config --prefix`.chomp
        ENV.prepend "LDFLAGS", "-L#{py_prefix}/lib/python2.7/config -F#{py_prefix.parent.parent.parent}"

        args << "--enable-pythoninterp"
      else
        args << "--enable-pythoninterp=dynamic" << "--enable-python3interp=dynamic"
      end
    elsif build.with? "python3"
      args << "--enable-python3interp"
    end

    unless MacOS::CLT.installed?
      # On Xcode-only systems:
      # Macvim cannot deal with "/Applications/Xcode.app/Contents/Developer" as
      # it is returned by `xcode-select -print-path` and already set by
      # Homebrew (in superenv). Instead Macvim needs the deeper dir to directly
      # append "SDKs/...".
      args << "--with-developer-dir=#{MacOS::Xcode.prefix}/Platforms/MacOSX.platform/Developer"
    end

    system "./configure", *args

    if build.with? "python"
      if build.with? "python3"
        py_prefix = `python-config --prefix`.chomp
        inreplace "src/auto/config.mk", /-DDYNAMIC_PYTHON_DLL=\\".*\\"/,
                    %Q[-DDYNAMIC_PYTHON_DLL=\'\"#{py_prefix}/Python\"\']
        py3_version = /\d\.\d/.match `python3 --version 2>&1`
        py3_prefix = `python#{py3_version}-config --prefix`.chomp
        inreplace 'src/auto/config.mk', /-DDYNAMIC_PYTHON3_DLL=\\".*\\"/,
                  %Q[-DDYNAMIC_PYTHON3_DLL=\'\"#{py3_prefix}/Python\"\']
      end

      unless Formula["python"].installed?
        inreplace "src/auto/config.h", "/* #undef PY_NO_RTLD_GLOBAL */",
                                        "#define PY_NO_RTLD_GLOBAL 1"
        inreplace "src/auto/config.h", "/* #undef PY3_NO_RTLD_GLOBAL */",
                                       "#define PY3_NO_RTLD_GLOBAL 1"
      end
    end

    if build.include? "custom-icons"
      # Get the custom font used by the icons
      system "make", "-C", "src/MacVim/icons", "getenvy"
    else
      # Building custom icons fails for many users, so off by default.
      inreplace "src/MacVim/icons/Makefile", "$(MAKE) -C makeicns", ""
      inreplace "src/MacVim/icons/make_icons.py", "dont_create = False", "dont_create = True"
    end

    system "make"

    prefix.install "src/MacVim/build/Release/MacVim.app"
    inreplace "src/MacVim/mvim", /^# VIM_APP_DIR=\/Applications$/,
                                 "VIM_APP_DIR=#{prefix}"
    bin.install "src/MacVim/mvim"

    # Create MacVim vimdiff, view, ex equivalents
    executables = %w[mvimdiff mview mvimex gvim gvimdiff gview gvimex]
    executables += %w[vi vim vimdiff view vimex] if build.include? "override-system-vim"
    executables.each { |e| bin.install_symlink "mvim" => e }
  end

  def caveats
    if build.with? "python" and build.with? "python3"
      <<-EOS.undent
        MacVim has been built with dynamic loading of Python 2 and Python 3.

        Note: if MacVim dynamically loads both Python 2 and Python 3, it may
        crash. For more information, see:
            http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python3
      EOS
    end
  end
end


text:
<?php

namespace anli\metronic\widgets;

use Yii;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\Menu;
use yii\bootstrap\Widget;
use yii\bootstrap\BootstrapPluginAsset;
use yii\widgets\ActiveForm;

/**
 * This is the Search widget class.
 * @author Su Anli <anli@euqol.com>
 * @since 2.0.0
 */
class Search extends Widget
{
    /**
     * @var mixed
     */
    public $searchModel;

    /**
     * Initializes the widget.
     */
    public function init()
    {
        parent::init();
    }

    /**
     * Renders the widget.
     */
    public function run()
    {
        echo Html::beginTag('div', ['class' => 'portlet-input input-inline']);
        echo Html::beginTag('div', ['class' => 'input-icon right']);
        echo Html::tag('i', '', ['class' => 'icon-magnifier']);

        ActiveForm::begin([
            'action' => $this->url,
            'method' => 'get',
        ]);
        echo Html::activeInput('text', $this->searchModel, 'searchField', ['class' => 'form-control input-circle', 'placeholder' => 'search...', 'autofocus' => true]);
        ActiveForm::end();

        echo Html::endTag('div');   // portlet-input input-inline
        echo Html::endTag('div');   // input-icon right
        echo ' ';
        echo Html::a(Html::tag('i', '', ['class' => 'fa fa-refresh']), $this->resetUrl, ['class' => 'btn btn-circle purple btn-sm', 'accesskey' => '',
            'data-toggle' => 'tooltip', 'title' => 'Reset Search',
        ]);
    }

    /**
     * @return array
     */
    public function getUrl()
    {
        return array_merge(['/' . Yii::$app->controller->route], Yii::$app->request->queryParams);
    }

    /**
     * @return array
     */
    public function getResetUrl()
    {
        $params = Yii::$app->request->queryParams;
        unset($params[$this->searchModelShortName]);

        return array_merge(['/' . Yii::$app->controller->route], $params);
    }

    /**
     * @return string
     */
    protected function getSearchModelShortName()
    {
        return (new \ReflectionClass($this->searchModel))->getShortName();
    }
}


text:
package com.facebook.infrastructure.concurrent;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;

import com.facebook.infrastructure.net.*;

/**
 * This class is an implementation of the IStage interface. In particular
 * it is for a stage that has a thread pool with a single thread. For details
 * please refer to the IStage documentation.
 * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com )
 */

public class SingleThreadedStage implements IStage
{
    protected DebuggableThreadPoolExecutor executorService_;
    private String name_;

	public SingleThreadedStage(String name)
    {
        //executorService_ = new DebuggableScheduledThreadPoolExecutor(1,new ThreadFactoryImpl(name));
        executorService_ = new DebuggableThreadPoolExecutor( 1,
                1,
                Integer.MAX_VALUE,
                TimeUnit.SECONDS,
                new LinkedBlockingQueue<Runnable>(),
                new ThreadFactoryImpl(name)
                );
        name_ = name;
	}

    /* Implementing the IStage interface methods */

    public String getName()
    {
        return name_;
    }
    public void execute(Runnable runnable)
    {
        executorService_.execute(runnable);
    }

    public Future<Object> execute(Callable<Object> callable)
    {
        return executorService_.submit(callable);
    }

    public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
    {
        //return executorService_.schedule(command, delay, unit);
        throw new UnsupportedOperationException("This operation is not supported");
    }

    public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
    {
        //return executorService_.scheduleAtFixedRate(command, initialDelay, period, unit);
        throw new UnsupportedOperationException("This operation is not supported");
    }

    public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
    {
        //return executorService_.scheduleWithFixedDelay(command, initialDelay, delay, unit);
        throw new UnsupportedOperationException("This operation is not supported");
    }

    public void shutdown()
    {
        executorService_.shutdownNow();
    }

    public boolean isShutdown()
    {
        return executorService_.isShutdown();
    }

    public long getTaskCount(){
        return (executorService_.getTaskCount() - executorService_.getCompletedTaskCount());
    }
    /* Finished implementing the IStage interface methods */
}