text:
package org.apache.hadoop.hdds.scm.container;

import org.apache.commons.lang3.RandomUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.StorageUnit;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.hdds.HddsConfigKeys;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.hdds.scm.container.common.helpers
    .ContainerWithPipeline;
import org.apache.hadoop.hdds.scm.pipeline.PipelineManager;
import org.apache.hadoop.hdds.scm.pipeline.SCMPipelineManager;
import org.apache.hadoop.hdds.server.events.EventQueue;
import org.apache.hadoop.ozone.container.common.SCMTestUtils;
import org.apache.hadoop.test.GenericTestUtils;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.File;
import java.io.IOException;

import static org.apache.hadoop.hdds.protocol.proto.HddsProtos.LifeCycleEvent.CREATED;
import static org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_CONTAINER_SIZE_DEFAULT;
import static org.apache.hadoop.hdds.scm.ScmConfigKeys.OZONE_SCM_CONTAINER_SIZE;
import static org.apache.hadoop.hdds.scm.events.SCMEvents.CLOSE_CONTAINER;
import static org.apache.hadoop.hdds.scm.events.SCMEvents.DATANODE_COMMAND;

/**
 * Tests the closeContainerEventHandler class.
 */
public class TestCloseContainerEventHandler {

  private static Configuration configuration;
  private static MockNodeManager nodeManager;
  private static SCMContainerManager containerManager;
  private static long size;
  private static File testDir;
  private static EventQueue eventQueue;

  @BeforeClass
  public static void setUp() throws Exception {
    configuration = SCMTestUtils.getConf();
    size = (long)configuration.getStorageSize(OZONE_SCM_CONTAINER_SIZE,
        OZONE_SCM_CONTAINER_SIZE_DEFAULT, StorageUnit.BYTES);
    testDir = GenericTestUtils
        .getTestDir(TestCloseContainerEventHandler.class.getSimpleName());
    configuration
        .set(HddsConfigKeys.OZONE_METADATA_DIRS, testDir.getAbsolutePath());
    nodeManager = new MockNodeManager(true, 10);
    PipelineManager pipelineManager =
        new SCMPipelineManager(configuration, nodeManager, eventQueue);
    containerManager = new
        SCMContainerManager(configuration, nodeManager,
        pipelineManager, new EventQueue());
    eventQueue = new EventQueue();
    eventQueue.addHandler(CLOSE_CONTAINER,
        new CloseContainerEventHandler(containerManager));
    eventQueue.addHandler(DATANODE_COMMAND, nodeManager);
  }

  @AfterClass
  public static void tearDown() throws Exception {
    if (containerManager != null) {
      containerManager.close();
    }
    FileUtil.fullyDelete(testDir);
  }

  @Test
  public void testIfCloseContainerEventHadnlerInvoked() {
    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer
        .captureLogs(CloseContainerEventHandler.LOG);
    eventQueue.fireEvent(CLOSE_CONTAINER,
        new ContainerID(Math.abs(RandomUtils.nextInt())));
    eventQueue.processAll(1000);
    Assert.assertTrue(logCapturer.getOutput()
        .contains("Close container Event triggered for container"));
  }

  @Test
  public void testCloseContainerEventWithInvalidContainer() {
    long id = Math.abs(RandomUtils.nextInt());
    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer
        .captureLogs(CloseContainerEventHandler.LOG);
    eventQueue.fireEvent(CLOSE_CONTAINER,
        new ContainerID(id));
    eventQueue.processAll(1000);
    Assert.assertTrue(logCapturer.getOutput()
        .contains("Failed to update the container state"));
  }

  @Test
  public void testCloseContainerEventWithValidContainers() throws IOException {

    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer
        .captureLogs(CloseContainerEventHandler.LOG);
    ContainerWithPipeline containerWithPipeline = containerManager
        .allocateContainer(HddsProtos.ReplicationType.RATIS,
            HddsProtos.ReplicationFactor.ONE, "ozone");
    ContainerID id = new ContainerID(
        containerWithPipeline.getContainerInfo().getContainerID());
    DatanodeDetails datanode =
        containerWithPipeline.getPipeline().getFirstNode();
    int closeCount = nodeManager.getCommandCount(datanode);
    eventQueue.fireEvent(CLOSE_CONTAINER, id);
    eventQueue.processAll(1000);
    // At this point of time, the allocated container is not in open
    // state, so firing close container event should not queue CLOSE
    // command in the Datanode
    Assert.assertEquals(0, nodeManager.getCommandCount(datanode));
    //Execute these state transitions so that we can close the container.
    containerManager.updateContainerState(id, CREATED);
    eventQueue.fireEvent(CLOSE_CONTAINER,
        new ContainerID(
            containerWithPipeline.getContainerInfo().getContainerID()));
    eventQueue.processAll(1000);
    Assert.assertEquals(closeCount + 1,
        nodeManager.getCommandCount(datanode));
    Assert.assertEquals(HddsProtos.LifeCycleState.CLOSING,
        containerManager.getContainer(id).getState());
  }

  @Test
  public void testCloseContainerEventWithRatis() throws IOException {

    GenericTestUtils.LogCapturer logCapturer = GenericTestUtils.LogCapturer
        .captureLogs(CloseContainerEventHandler.LOG);
    ContainerWithPipeline containerWithPipeline = containerManager
        .allocateContainer(HddsProtos.ReplicationType.RATIS,
            HddsProtos.ReplicationFactor.THREE, "ozone");
    ContainerID id = new ContainerID(
        containerWithPipeline.getContainerInfo().getContainerID());
    int[] closeCount = new int[3];
    eventQueue.fireEvent(CLOSE_CONTAINER, id);
    eventQueue.processAll(1000);
    int i = 0;
    for (DatanodeDetails details : containerWithPipeline.getPipeline()
        .getNodes()) {
      closeCount[i] = nodeManager.getCommandCount(details);
      i++;
    }
    i = 0;
    for (DatanodeDetails details : containerWithPipeline.getPipeline()
        .getNodes()) {
      Assert.assertEquals(closeCount[i], nodeManager.getCommandCount(details));
      i++;
    }
    //Execute these state transitions so that we can close the container.
    containerManager.updateContainerState(id, CREATED);
    eventQueue.fireEvent(CLOSE_CONTAINER, id);
    eventQueue.processAll(1000);
    i = 0;
    // Make sure close is queued for each datanode on the pipeline
    for (DatanodeDetails details : containerWithPipeline.getPipeline()
        .getNodes()) {
      Assert.assertEquals(closeCount[i] + 1,
          nodeManager.getCommandCount(details));
      Assert.assertEquals(HddsProtos.LifeCycleState.CLOSING,
          containerManager.getContainer(id).getState());
      i++;
    }
  }
}


text:
package com.rajpriya.home.utils;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ImageView;
import android.widget.TextView;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.NetworkImageView;
import com.android.volley.toolbox.ImageLoader;
import com.android.volley.toolbox.Volley;
import com.rajpriya.home.R;
import com.rajpriya.home.WebViewActivity;

import java.net.NetworkInterface;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by rajkumar on 3/9/14.
 */
public class WebAppAdatper extends BaseAdapter implements Filterable{
    private Context context;
    public ArrayList<String> mNames;
    public ArrayList<String> mUrls;
    private ImageLoader mImageLoader;
    private Filter mFilter;
    private Map<String, String> mMap = new HashMap<String, String>();

    public WebAppAdatper(Context context, ArrayList<String> names, ArrayList<String> urls, ImageLoader il) {
        this.context = context;
        mNames = names;
        mUrls = urls;
        mImageLoader = il;
        mFilter = new WebAppFilter(mNames, mUrls, this);
        //Map url n names
        for(int i=0; i<mNames.size(); i++) {
            String name = mNames.get(i);
            mMap.put(name, mUrls.get(i));
        }

    }

    public void refresh() {
        ((WebAppFilter)mFilter).refresh();
    }

    public View getView(final int position, View convertView, ViewGroup parent) {

        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);

        //View root;

        if (convertView == null) {
            // get layout from mobile.xml
            convertView = inflater.inflate(R.layout.webapp, null);
        }

        Holder h = Holder.get(convertView);
        // set value into textview
        h.title.setText(mNames.get(position));

        // set image based on selected text
        h.icon.setImageUrl(mUrls.get(position) + "/favicon.ico", mImageLoader);
        h.icon.setDefaultImageResId(R.drawable.web_app2);
        h.icon.setErrorImageResId(R.drawable.web_app2);

        convertView.setOnLongClickListener(new View.OnLongClickListener() {
            public boolean onLongClick(View arg0) {
                AlertDialog.Builder builder = new AlertDialog.Builder(context);
                builder.setTitle("Do you want to remove this app?");
                builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        ((WebAppFilter)mFilter).removeWebApp(mNames.get(position), mUrls.get(position));
                        mNames.remove(position);
                        mUrls.remove(position);
                        notifyDataSetChanged();
                    }
                });
                builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialogInterface, int i) {
                        dialogInterface.dismiss();
                    }
                });
                AlertDialog alert = builder.create();
                alert.show();
                return true;
            }
        });

        convertView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent i = new Intent(context, WebViewActivity.class);
                i.putExtra(WebViewActivity.WEB_URL, mUrls.get(position));
                i.putExtra(WebViewActivity.TITLE, mNames.get(position));
                context.startActivity(i);
            }
        });

        return convertView;
    }

    public void onNewWebAppAdded(String name, String url) {
        mMap.put(name, url);
        ((WebAppFilter)mFilter).onNewWebAppAdded(name, url);
    }
    public void sortAlphabetically1() {
        Collections.sort(mNames, new Comparator<String>() {
            public int compare(String s1, String s2) {
                return s1.compareToIgnoreCase(s2);
            }
        });
        correctUrlsOrder();
        notifyDataSetChanged();
    }
    public void sortAlphabetically2() {
        Collections.sort(mNames, new Comparator<String>() {
            public int compare(String s1, String s2) {
                return s2.compareToIgnoreCase(s1);
            }
        });
        correctUrlsOrder();
        notifyDataSetChanged();
    }

    public void correctUrlsOrder() {
        mUrls.clear();
        for (String name:mNames) {
            mUrls.add(mMap.get(name));
        }
    }

    @Override
    public int getCount() {
        return mUrls==null?0:mUrls.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public Filter getFilter() {
        if(mFilter == null)
            return new WebAppFilter(mNames, mUrls, this);
        else return mFilter;
    }

    static final class Holder {
        public final TextView title;
        public final NetworkImageView icon;

        Holder(View v) {
            title = (TextView) v.findViewById(R.id.name);
            icon = (NetworkImageView)v.findViewById(R.id.icon);
            v.setTag(this);
        }

        static Holder get(View v) {
            if (v.getTag() instanceof Holder) {
                return (Holder) v.getTag();
            }
            return new Holder(v);
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
const EuropeanOption = Option{EuropeanExercise}
const AmericanOption = Option{AmericanExercise}
const BermudanOption = Option{BermudanExercise}

mutable struct OptionResults # Greeks
  delta::Float64
  gamma::Float64
  theta::Float64
  vega::Float64
  rho::Float64
  dividendRho::Float64
  deltaForward::Float64
  elasticity::Float64
  thetaPerDay::Float64
  strikeSensitivity::Float64
  itmCashProbability::Float64
  value::Float64
end

OptionResults() = OptionResults(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)

struct VanillaOptionArgs{P <: StrikedTypePayoff, E <: Exercise}
  payoff::P
  exercise::E
end

function reset!(res::OptionResults)
  res.delta = 0.0
  res.gamma = 0.0
  res.theta = 0.0
  res.vega = 0.0
  res.rho = 0.0
  res.dividendRho = 0.0
  res.deltaForward = 0.0
  res.elasticity = 0.0
  res.thetaPerDay = 0.0
  res.strikeSensitivity = 0.0
  res.itmCashProbability = 0.0
  res.value = 0.0

  return res
end

mutable struct VanillaOption{S <: StrikedTypePayoff, E <: Exercise, P <: PricingEngine} <: OneAssetOption{E}
  lazyMixin::LazyMixin
  payoff::S
  exercise::E
  pricingEngine::P
  results::OptionResults
end

VanillaOption(payoff::S, exercise::E, pe::P) where {S <: StrikedTypePayoff, E <: Exercise, P <: PricingEngine} =
              VanillaOption{S, E, P}(LazyMixin(), payoff, exercise, pe, OptionResults())

get_pricing_engine_type(::VanillaOption{S, E, P}) where {S, E, P} = P

function clone(opt::VanillaOption, pe::P = opt.pricingEngine) where {P <: PricingEngine}
  lazyMixin, res = pe == opt.pricingEngine ? (opt.lazyMixin, opt.results) : (LazyMixin(), OptionResults())

  return VanillaOption{typeof(opt.payoff), typeof(opt.exercise), P}(lazyMixin, opt.payoff, opt.exercise, pe, res)
end


text:
class Abingo
  class Routes
    def self.reports_ui(map, options={})
      map.with_options(options.merge(:controller => 'ab_simulations')) do |t|
        t.score_test 'ab/simulations/:action' #, :action=>'index'
        t.simulations 'ab/simulations', :action=>"index"
      end
      map.with_options(options.merge(:controller => 'ab_reports')) do |t|
        t.connect '/ab/:action'
#        t.translate_reload 'translate/reload', :action => 'reload'
#        t.translate_edit 'translate/edit', :action => 'edit'
      end

    end
  end
end


text:
/**
 * CustomPermissionDependencyRequired.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
 */

package com.sforce.soap._2006._04.metadata;

public class CustomPermissionDependencyRequired  implements java.io.Serializable {
    private java.lang.String customPermission;

    private boolean dependency;

    public CustomPermissionDependencyRequired() {
    }

    public CustomPermissionDependencyRequired(
           java.lang.String customPermission,
           boolean dependency) {
           this.customPermission = customPermission;
           this.dependency = dependency;
    }

    /**
     * Gets the customPermission value for this CustomPermissionDependencyRequired.
     *
     * @return customPermission
     */
    public java.lang.String getCustomPermission() {
        return customPermission;
    }

    /**
     * Sets the customPermission value for this CustomPermissionDependencyRequired.
     *
     * @param customPermission
     */
    public void setCustomPermission(java.lang.String customPermission) {
        this.customPermission = customPermission;
    }

    /**
     * Gets the dependency value for this CustomPermissionDependencyRequired.
     *
     * @return dependency
     */
    public boolean isDependency() {
        return dependency;
    }

    /**
     * Sets the dependency value for this CustomPermissionDependencyRequired.
     *
     * @param dependency
     */
    public void setDependency(boolean dependency) {
        this.dependency = dependency;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof CustomPermissionDependencyRequired)) return false;
        CustomPermissionDependencyRequired other = (CustomPermissionDependencyRequired) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.customPermission==null && other.getCustomPermission()==null) ||
             (this.customPermission!=null &&
              this.customPermission.equals(other.getCustomPermission()))) &&
            this.dependency == other.isDependency();
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getCustomPermission() != null) {
            _hashCode += getCustomPermission().hashCode();
        }
        _hashCode += (isDependency() ? Boolean.TRUE : Boolean.FALSE).hashCode();
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(CustomPermissionDependencyRequired.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://soap.sforce.com/2006/04/metadata", "CustomPermissionDependencyRequired"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("customPermission");
        elemField.setXmlName(new javax.xml.namespace.QName("http://soap.sforce.com/2006/04/metadata", "customPermission"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("dependency");
        elemField.setXmlName(new javax.xml.namespace.QName("http://soap.sforce.com/2006/04/metadata", "dependency"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
        elemField.setNillable(false);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
package org.assertj.core.internal.files;

import static org.assertj.core.error.ShouldBeDirectory.shouldBeDirectory;
import static org.assertj.core.test.TestData.someInfo;
import static org.assertj.core.test.TestFailures.failBecauseExpectedAssertionErrorWasNotThrown;
import static org.assertj.core.util.FailureMessages.actualIsNull;

import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.io.File;

import org.assertj.core.api.AssertionInfo;
import org.assertj.core.internal.Files;
import org.assertj.core.internal.FilesBaseTest;
import org.junit.Test;

/**
 * Tests for <code>{@link Files#assertIsDirectory(AssertionInfo, File)}</code>.
 *
 * @author Yvonne Wang
 * @author Joel Costigliola
 */
public class Files_assertIsDirectory_Test extends FilesBaseTest {

  @Test
  public void should_fail_if_actual_is_null() {
    thrown.expectAssertionError(actualIsNull());
    files.assertIsDirectory(someInfo(), null);
  }

  @Test
  public void should_fail_if_actual_is_not_directory() {
    when(actual.isDirectory()).thenReturn(false);
    AssertionInfo info = someInfo();
    try {
      files.assertIsDirectory(info, actual);
    } catch (AssertionError e) {
      verify(failures).failure(info, shouldBeDirectory(actual));
      return;
    }
    failBecauseExpectedAssertionErrorWasNotThrown();
  }

  @Test
  public void should_pass_if_actual_is_directory() {
    when(actual.isDirectory()).thenReturn(true);
    files.assertIsDirectory(someInfo(), actual);
  }
}


text:
#include <QPen>

GravitationalObject::GravitationalObject() :
    QGraphicsEllipseItem(0), m_status(Unknown)
{
}

void GravitationalObject::init(const QPointF& pos)
{
    const qint32 r = ball_radius();
    setPos(pos.x(), pos.y());
    setRect(-r, -r, 2*r, 2*r);
    setup_paint(Unknown);
}

qint32 GravitationalObject::inner_radius() const
{
    return outer_radius();
}


text:
'use strict';

const _ = require('lodash');

module.exports = {
  afterFind: function (results, opt) {
    return bindPopulate.call(this, results, opt);
  },
  afterFindOne: function (result, opt) {
    return bindPopulate.call(this, [result], opt).then(result => result[0] || null);
  }
};

function bindPopulate(results, opt) {
  if (!opt.path || !opt.model) {
    throw new TypeError('No .populate path or model');
  }
  if (!results.length) {
    return results;
  }
  let keys = _.map(results, opt.path);
  let query = opt.match || {};
  let options = {};
  let omitId = false;
  query._id = { $in: keys };
  if (opt.select) {
    options.fields = opt.select;
    if (options.fields._id === 0) {
      omitId = true;
      if (Object.keys(options.fields).length > 1) {
        options.fields._id = 1;
      } else {
        delete options.fields._id;
      }
    }
  }
  let model = ('string' === typeof opt.model) ? this._model.model(opt.model, null, opt.options) : opt.model;
  return model
    .find(query, options)
    .exec()
    .then(populates => {
      return _.reduce(populates, function(obj, value) {
        obj[value._id.toString()] = value;
        return obj;
      }, {});
    })
    .then(obj => {
      _.forEach(results, result => {
        let refe = _.get(result, opt.path);
        try { refe = refe.toString(); } catch (e) {}
        if (refe && obj[refe]) {
          if (omitId) delete obj[refe]._id;
          _.set(result, opt.path, obj[refe]);
        }
      });
      return results;
    });
}


text:
#include <cc7tests/CC7Tests.h>

namespace cc7
{
namespace tests
{
	const UnitTestCreationInfoList _GetDefaultUnitTestCreationInfoList()
	{
		UnitTestCreationInfoList list;

		// cc7::tests framework tests
		CC7_ADD_UNIT_TEST(tt7Testception, list);
		CC7_ADD_UNIT_TEST(tt7JSONReaderTests, list);

		// cc7 framework tests
		CC7_ADD_UNIT_TEST(cc7PlatformTests, list);
		CC7_ADD_UNIT_TEST(cc7ByteArrayTests, list);
		CC7_ADD_UNIT_TEST(cc7ByteRangeTests, list);
		CC7_ADD_UNIT_TEST(cc7Base32Tests, list);
		CC7_ADD_UNIT_TEST(cc7Base64Tests, list);
		CC7_ADD_UNIT_TEST(cc7HexStringTests, list);

		// OpenSSL
		CC7_ADD_UNIT_TEST(cc7OpenSSLIntegration, list);

		return list;
	}

} // cc7::tests
} // cc7


text:
'use strict';

var key = 'YOURAPIKEY'
  , SparkPost = require('sparkpost')
  , client = new SparkPost(key)
  , options = {
    campaign_id: 'my_campaign'
  };

client.transmissions.all(options, function(err, res) {
  if (err) {
    console.log(err);
  } else {
    console.log(res.body);
    console.log('Congrats you can use our SDK!');
  }
});


text:
function [fe, feTime, varargout] = calc_excitation(obj, eta, dt)
% Calculates the time domain excitation force via convolution.
% If the sampling rate of the irf is greater than eta, then eta values will
% be upsampled to match by using linear interpolation. If they have the
% same sampling rate, it will be left be.
%
% NOTES: dt/dtIrf MUST BE AN INTEGER. OTHERWISE THIS WILL BREAK.
%
% Inputs:
%   eta: vector containing water surface elevation
%   dt: scalar - sample interval of eta in seconds
%
% [Fe, feTime] = calc_excitation(WecModel, eta, dt)

% Created 7/28/2014
% Bradley Ling
%
% Updated 8/15: need to scale irf to the sampling time. Should implement
% trapeziodal integration for the future.
%
% Updated 8/18: Implemented trapeziodal integration for convolution.
% Tested results with many uniform waves and compared to frequency domain
% results.
%
% Updated 8/22: changed interpolation to cubic

% Updated 8/25: Squashed some bugs with trimming output. Also optimized
% this process to use less memory and calcs.
%
% References:
% Ruehl Thesis 2011; Bosma et. al. 2013

% -------------------------------------------------------------------------
% Lets interpolate eta so it has the same sampling rate as the irf
%  CUBIC INTERPOLATION CURRENTLY IMPLEMENTED
%
% NOTES: ** dt/dtIrf MUST BE AN INTEGER. OTHERWISE THIS WILL BREAK.
%        ** the time range of the irf must be symmetrical.

irf = obj.feIrf;
dtIrf = irf.t(2) - irf.t(1);

ratio = round(dt/dtIrf);

% Check to make sure ratio is acceptable
if abs(ratio - dt/dtIrf) > 1e-5
    error('sampling rates are not compatable for interpolation')
elseif ratio ~= 1
    etaInterpTime = dtIrf .* ( 0:(length(eta)*ratio - (ratio - 1)) );
    etaInterp     = interp1(dt .* (0:length(eta)-1), eta, etaInterpTime, 'pchip');
else
    % don't do interpolation
    %warning('No Interpolation performed')
    etaInterp = eta;
    etaInterpTime = dtIrf .* [0:length(eta)-1];
end

% Implement Convolution via trapeziodal rule
fe = nan(size(etaInterp));
halfWidth = (length(irf.irf) - 1 ) / 2;
startIdx = halfWidth+1;
endIdx   = length(etaInterp)-halfWidth;
idxIrf = -halfWidth:halfWidth;

coeff = (irf.t(end) - irf.t(1)) / (4 .* halfWidth);
for it = startIdx:endIdx;
    fx = irf.irf .* etaInterp(idxIrf + it);
    fe(it) = coeff * sum( [fx fx(2:end-1)] );
end

% Trim the output
trimmedTime = etaInterpTime(~isnan(fe));
idxKeep = ~isnan(fe);
fe = fe(idxKeep);
if nargout == 3, varargout{1} = etaInterp(idxKeep); end
feTime = floor( (min(trimmedTime):dt:max(trimmedTime)) ./ dt) .* dt;

idx = dsearchn(trimmedTime', feTime');
fe = fe(idx);


text:
@implementation Calculator

-(void)calculateService: (NSPasteboard *)pboard userData:(NSString *)userData error:(NSString **)error
{
    //Test for strings on the pasteboard.
    NSArray *classes = [NSArray arrayWithObjects:[NSString class], nil];
    NSDictionary *options = [NSDictionary dictionary];

    if(![pboard canReadObjectForClasses:classes options:options]){
        *error = NSLocalizedString(@"Error: couldn't calculate text.", @"pboard couldn't give string.");
        return;
    }

    //get and calculate string
    NSString *pboardString = [pboard stringForType:NSStringPboardType];
    NSString *newString = [Calculator calculate:pboardString];

    if(!newString){
        *error = NSLocalizedString(@"Error: couldn't calculate text.", @"self couldn't calculate.");
        return;
    }

    //write the result string onto the paste board
    [pboard clearContents];
    NSArray * output = @[[NSString stringWithFormat:@"%@%@%@", pboardString, @" = ", newString]];
    [pboard writeObjects:output];
}

+ (NSString *) calculate: (NSString *)s
{
    NSDictionary * tree = [Parse tokenizeAndParse:s];
    if (tree)
    {
        return [NSString stringWithFormat:@"%f", [Calculator evaluate: tree]];
    }
    return nil;
}

+ (double) evaluate: (NSDictionary *)e
{
    for (NSString * operator in [e allKeys])
    {
        NSArray * children = [e objectForKey:operator];
        if ([@"Number" isEqualToString:operator])
        {
            return [[children objectAtIndex:0] doubleValue];
        }
        else if ([@"Plus" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];

            return (e1 + e2);
        }
        else if ([@"Minus" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return (e1 - e2);
        }
        else if ([@"Mult" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return (e1 * e2);
        }
        else if ([@"Divide" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return (e1 / e2);
        }
        else if ([@"Mod" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return fmod(e1, e2);
        }
        else if ([@"Rt" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return pow(e1, 1.0/e2);
        }
        else if ([@"Pow" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return pow(e1, e2);
        }
        else if ([@"Max" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return fmax(e1, e2);
        }
        else if ([@"Min" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return fmin(e1, e2);
        }
        else if ([@"Log" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            double e2 = [Calculator evaluate:[children objectAtIndex:1]];
            return [Calculator log:e1 withBase:e2];
        }
        else if ([@"Paren" isEqualToString:operator])
        {
            return [Calculator evaluate:[children objectAtIndex:0]];
        }
        else if ([@"Sqrt" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return sqrt(e1);
        }
        else if ([@"Abs" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return fabs(e1);
        }
        else if ([@"Neg" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return -e1;
        }
        else if ([@"Ceil" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return ceil(e1);
        }
        else if ([@"Floor" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return floor(e1);
        }
        else if ([@"Round" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return round(e1);
        }
        else if ([@"Fac" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return [Calculator factorial:(int)e1];
        }
        else if ([@"Sin" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return sin(e1);
        }
        else if ([@"Asin" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return asin(e1);
        }
        else if ([@"Cos" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return cos(e1);
        }
        else if ([@"Acos" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return acos(e1);
        }
        else if ([@"Tan" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return tan(e1);
        }
        else if ([@"Atan" isEqualToString:operator])
        {
            double e1 = [Calculator evaluate:[children objectAtIndex:0]];
            return atan(e1);
        }

    }
    return MAXFLOAT;
}

+ (double) factorial: (int) x
{
    double result = 1;
    for ( ; x > 0; x--)
    {
        result *= x;
    }
    return result;
}

+ (double) log: (float)value withBase: (float)base
{
    return log10(value) / log10(base);
}

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
     Copyright (C) 2016 Jorge Ruesga

     Licensed under the Apache License, ServerVersion 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.
 -->
<resources>
    <!-- Firebase -->
    <string name="define_firebase" />
    <string name="library_firebase_author">Google</string>
    <string name="library_firebase_authorWebsite">https://firebase.google.com/</string>
    <string name="library_firebase_libraryName">Firebase</string>
    <string name="library_firebase_libraryDescription">Firebase is an app development platform with tools to help you build, grow and monetize your app.</string>
    <string name="library_firebase_libraryWebsite">https://firebase.google.com/</string>
    <string name="library_firebase_licenseId">apache_2_0</string>
    <string name="library_firebase_isOpenSource">true</string>
    <string name="library_firebase_repositoryLink">https://github.com/firebase/firebase-android-sdk</string>
    <!-- okhttp-digest -->
    <string name="define_okhttp_digest" />
    <string name="library_okhttp_digest_author">rburgst</string>
    <string name="library_okhttp_digest_libraryName">okhttp-digest</string>
    <string name="library_okhttp_digest_libraryDescription">A digest authenticator for okhttp. Most of the code is ported from Apache Http Client.</string>
    <string name="library_okhttp_digest_libraryWebsite">https://github.com/rburgst/okhttp-digest</string>
    <string name="library_okhttp_digest_licenseId">apache_2_0</string>
    <string name="library_okhttp_digest_isOpenSource">true</string>
    <string name="library_okhttp_digest_repositoryLink">https://github.com/rburgst/okhttp-digest</string>
    <!-- rxloader -->
    <string name="define_rxloader_digest" />
    <string name="library_rxloader_digest_author">Evan Tatarka</string>
    <string name="library_rxloader_digest_libraryName">rxloader</string>
    <string name="library_rxloader_digest_libraryDescription">Asynchronous operations in Android are very hard to get right due to the Activity lifecycle. AsyncTasks don\'t handle any of it making them difficult to use. Loaders handle many things for you, but have a clunky api and fall down anytime you want to do anything more complex than loading data immediately when the Activity or Fragment is shown.</string>
    <string name="library_rxloader_libraryWebsite">https://github.com/evant/rxloader</string>
    <string name="library_rxloader_licenseId">apache_2_0</string>
    <string name="library_rxloader_isOpenSource">true</string>
    <string name="library_rxloader_repositoryLink">https://github.com/evant/rxloader</string>
    <!-- antlr -->
    <string name="define_antlr3_digest" />
    <string name="library_antlr3_digest_author">Terence Parr</string>
    <string name="library_antlr3_digest_libraryName">Antlr</string>
    <string name="library_antlr3_digest_libraryDescription">ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It\'s widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build and walk parse trees.</string>
    <string name="library_antlr3_libraryWebsite">https://www.antlr.org/</string>
    <string name="library_antlr3_licenseId">bsd_3</string>
    <string name="library_antlr3_isOpenSource">true</string>
    <string name="library_antlr3_repositoryLink">https://github.com/antlr/antlr3</string>
    <!-- prettytime -->
    <string name="define_prettytime_digest" />
    <string name="library_prettytime_digest_author">OCPsoft</string>
    <string name="library_prettytime_authorWebsite">http://ocpsoft.org/</string>
    <string name="library_prettytime_digest_libraryName">prettytime</string>
    <string name="library_prettytime_digest_libraryDescription">Social Style Date and Time Formatting for Java.</string>
    <string name="library_prettytime_libraryWebsite">https://www.ocpsoft.org/prettytime/</string>
    <string name="library_prettytime_licenseId">apache_2_0</string>
    <string name="library_prettytime_isOpenSource">true</string>
    <string name="library_prettytime_repositoryLink">https://github.com/ocpsoft/prettytime</string>
    <!-- androidsvg -->
    <string name="define_androidsvg_digest" />
    <string name="library_androidsvg_digest_author">Paul LeBeau</string>
    <string name="library_androidsvg_digest_libraryName">AndroidSVG</string>
    <string name="library_androidsvg_digest_libraryDescription">AndroidSVG is a SVG parser and renderer for Android. It has almost complete support for the static visual elements of the SVG 1.1 and SVG 1.2 Tiny specifications (except for filters).</string>
    <string name="library_androidsvg_libraryWebsite">https://bigbadaboom.github.io/androidsvg/</string>
    <string name="library_androidsvg_licenseId">apache_2_0</string>
    <string name="library_androidsvg_isOpenSource">true</string>
    <string name="library_androidsvg_repositoryLink">https://github.com/BigBadaboom/androidsvg</string>
    <!-- keyboardvisibilityevent -->
    <string name="define_keyboardvisibilityevent_digest" />
    <string name="library_keyboardvisibilityevent_digest_author">Yasuhiro SHIMIZU</string>
    <string name="library_keyboardvisibilityevent_digest_libraryName">KeyboardVisibilityEvent</string>
    <string name="library_keyboardvisibilityevent_digest_libraryDescription">Android Library to handle soft keyboard visibility change event. show/hide keyboard method is also included.</string>
    <string name="library_keyboardvisibilityevent_libraryWebsite">https://github.com/yshrsmz/KeyboardVisibilityEvent</string>
    <string name="library_keyboardvisibilityevent_licenseId">apache_2_0</string>
    <string name="library_keyboardvisibilityevent_isOpenSource">true</string>
    <string name="library_keyboardvisibilityevent_repositoryLink">https://github.com/yshrsmz/KeyboardVisibilityEvent</string>
    <!-- betterlinkmovementmethod -->
    <string name="define_betterlinkmovementmethod_digest" />
    <string name="library_betterlinkmovementmethod_digest_author">Saket Narayan</string>
    <string name="library_betterlinkmovementmethod_digest_libraryName">Better-Link-Movement-Method</string>
    <string name="library_betterlinkmovementmethod_digest_libraryDescription">Android Library that improves LinkMovementMethod.</string>
    <string name="library_betterlinkmovementmethod_libraryWebsite">https://github.com/saket/Better-Link-Movement-Method</string>
    <string name="library_betterlinkmovementmethod_licenseId">apache_2_0</string>
    <string name="library_betterlinkmovementmethod_isOpenSource">true</string>
    <string name="library_betterlinkmovementmethod_repositoryLink">https://github.com/saket/Better-Link-Movement-Method</string>
    <!-- junit -->
    <string name="define_junit_digest" />
    <string name="library_junit_digest_author">Junit Team</string>
    <string name="library_junit_digest_libraryName">Junit 4</string>
    <string name="library_junit_digest_libraryDescription">JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.</string>
    <string name="library_junit_libraryWebsite">https://junit.org/junit4/</string>
    <string name="library_junit_licenseId">eclipse_2_0</string>
    <string name="library_junit_isOpenSource">true</string>
    <string name="library_junit_repositoryLink">https://github.com/junit-team/junit4</string>
    <!-- hamcrest -->
    <string name="define_hamcrest_digest" />
    <string name="library_hamcrest_digest_author">Hamcrest</string>
    <string name="library_hamcrest_digest_libraryName">Hamcrest</string>
    <string name="library_hamcrest_digest_libraryDescription">Hamcrest is a library of matchers, which can be combined in to create flexible expressions of intent in tests. They\'ve also been used for other purposes.</string>
    <string name="library_hamcrest_libraryWebsite">http://hamcrest.org/</string>
    <string name="library_hamcrest_licenseId">bsd_3</string>
    <string name="library_hamcrest_isOpenSource">true</string>
    <string name="library_hamcrest_repositoryLink">https://github.com/hamcrest/JavaHamcrest</string>
    <!-- powermock -->
    <string name="define_powermock_digest" />
    <string name="library_powermock_digest_author">powermock</string>
    <string name="library_powermock_digest_libraryName">powermock</string>
    <string name="library_powermock_digest_libraryDescription">PowerMock is a framework that extends other mock libraries with more powerful capabilities.</string>
    <string name="library_powermock_libraryWebsite">https://github.com/powermock/powermock</string>
    <string name="library_powermock_licenseId">apache_2_0</string>
    <string name="library_powermock_isOpenSource">true</string>
    <string name="library_powermock_repositoryLink">https://github.com/powermock/powermock</string>
    <!-- robolectric -->
    <string name="define_robolectric_digest" />
    <string name="library_robolectric_digest_author">powermock</string>
    <string name="library_robolectric_digest_libraryName">powermock</string>
    <string name="library_robolectric_digest_libraryDescription">Robolectric is the industry-standard unit testing framework for Android. With Robolectric, your tests run in a simulated Android environment inside a JVM, without the overhead of an emulator.</string>
    <string name="library_robolectric_libraryWebsite">http://robolectric.org/</string>
    <string name="library_robolectric_licenseId">mit</string>
    <string name="library_robolectric_isOpenSource">true</string>
    <string name="library_robolectric_repositoryLink">https://github.com/robolectric/robolectric</string>
    <!-- dexcount -->
    <string name="define_dexcount_digest" />
    <string name="library_dexcount_digest_author">KeepSafe</string>
    <string name="library_dexcount_digest_libraryName">Dexcount Gradle Plugin</string>
    <string name="library_dexcount_digest_libraryDescription">A Gradle plugin to report the number of method references in your APK, AAR, or java module on every build.</string>
    <string name="library_dexcount_libraryWebsite">https://github.com/KeepSafe/dexcount-gradle-plugin</string>
    <string name="library_dexcount_licenseId">apache_2_0</string>
    <string name="library_dexcount_isOpenSource">true</string>
    <string name="library_dexcount_repositoryLink">https://github.com/KeepSafe/dexcount-gradle-plugin</string>
    <!-- iharder-base64 -->
    <string name="define_iharder_base64_digest" />
    <string name="library_iharder_base64_digest_author">iharder</string>
    <string name="library_iharder_base64_digest_libraryName">iharder-base64</string>
    <string name="library_iharder_base64_digest_libraryDescription">A java library providing very fast Base64 encoding and decoding in the form of convenience methods and input/output streams.</string>
    <string name="library_iharder_base64_libraryWebsite">http://iharder.sourceforge.net/current/java/base64/</string>
    <string name="library_iharder_base64_licenseId">mit</string>
    <string name="library_iharder_base64_isOpenSource">true</string>
    <string name="library_iharder_base64_repositoryLink">http://iharder.sourceforge.net/current/java/base64/</string>
</resources>


text:
%%-------------------------------------------------------------------------
%% Example 1
% Alice ran a cfd-simulation around two cylinders and gave Bob a *.csv file
% with the points coordinates and the airflow speed at each point. Bob
% wants to calculate the particle acceleration at each point and therefore
% needs to mesh the points set. Simply calculating a delaunay triangulation
% won't work because points on the upper and lower part of the cylinder
% would be connected, which physically does't make any sense. Furthermore,
% Bob needs to determine which points are on the surface of each cylinder.
%
% Run the following sections to see the raw data, run the program and see
% the results.
%% Create Alice's data
[X, Y] = meshgrid(1:100,1:90);
X = X(:)+2*(0.5-rand(9000,1))/20;
Y = Y(:)+2*(0.5-rand(9000,1))/20;
MAT = 9000;
x0 = 50;
y0 = 50;
r0 = 20;
c = zeros(MAT,1);
for i = 1:MAT
    if ((X(i)-x0)^2+(Y(i)-y0)^2)<r0^2
        X(i) = 0;
        Y(i) = 0;
        c(i) = 1;
    end
end
x1 = 80;
y1 = 20;
r1 = 10;
for i = 1:MAT
    if ((X(i)-x1)^2+(Y(i)-y1)^2)<r1^2
        X(i) = 0;
        Y(i) = 0;
        c(i) = 1;
    end
end
X(find(c)) = [];
Y(find(c)) = [];
T = delaunay(X,Y);
plot(X,Y,'.')

%% Bob runs findTheHoles
% The resulting mesh is saved in 'mesh'.
% The indices of each knot at the cylinder i are saved in cylinders{i}
[mesh, cylinders] = findTheHoles([X Y]);

%% Plot results
% Triangulation
figure();
triplot(mesh.ConnectivityList,mesh.Points(:,1),mesh.Points(:,2));

% Automatically recognized cylinders
figure();
hold on;
for i = 1:length(cylinders)
    lX = X(cylinders{i});
    lY = Y(cylinders{i});
    plot([lX; lX(1)],[lY; lY(1)]);
end
clear lX lY i

%% Manual update
% Bob doesn't like some of the calculated values and runs findTheHoles
% again in manual mode.
[mesh2, cylinders2] = findTheHoles([X Y],1.5,1);


text:
@interface GKDouyinHomeSearchViewController ()

@end

@implementation GKDouyinHomeSearchViewController

- (void)loadView {
    self.view = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"WechatIMG240"]];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    self.gk_navigationBar.hidden = YES;
    self.gk_statusBarHidden = YES;
}

@end


text:
import * as imported from './import'

declare module './import' {
  namespace main {
    export function augmented (): boolean;
  }
}

export { imported }


text:
UPicture::UPicture()
: m_pIPicture(NULL),
m_nHeight(0),
m_nWidth(0),
m_nWeight(0)
{}

UPicture::~UPicture()
{
    freePictureData();
}

BOOL UPicture::load(HINSTANCE hInstance, LPCTSTR lpszResourceName, LPCSTR ResourceType)
{
    HGLOBAL hGlobal = NULL;
    HRSRC hSource = NULL;
    LPVOID lpVoid  = NULL;
    int nSize   = 0;
    BOOL bResult=FALSE;

    if(m_pIPicture != NULL)
    {
        freePictureData(); // Important - Avoid Leaks...
    }

    hSource = ::FindResource(hInstance, lpszResourceName, ResourceType);

    if(hSource == NULL)
    {
        MessageBoxEx(NULL, "FindResource() Failed\t", ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
        return FALSE;
    }

    hGlobal = ::LoadResource(hInstance, hSource);
    if(hGlobal == NULL)
    {
        MessageBoxEx(NULL, "LoadResource() Failed\t", ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
        return FALSE;
    }

    lpVoid = ::LockResource(hGlobal);
    if(lpVoid == NULL)
    {
        MessageBoxEx(NULL, "LockResource() Failed\t", ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
        return FALSE;
    }

    nSize = (UINT)SizeofResource(hInstance, hSource);
    if(loadPictureData((BYTE*)hGlobal, nSize))
    {
        bResult = TRUE;
    }

    //UnlockResource(hGlobal); // 16Bit Windows Needs This
    //::FreeResource(hGlobal); // 16Bit Windows Needs This (32Bit - Automatic Release)

    m_nWeight = nSize; // Update Picture Size Info...

    getImageSize();

    return bResult;
}

BOOL UPicture::load(const TCHAR * sFilePathName)
{
    if(!PathFileExists(sFilePathName))
    {
        return FALSE;
    }
    BOOL bResult = FALSE;
    UFile PictureFile;
    //CFileException e;
    int nSize = 0;

    if(m_pIPicture != NULL) freePictureData(); // Important - Avoid Leaks...

    if(PictureFile.open(sFilePathName))
    {
        nSize = PictureFile.size();
        BYTE* pBuffer = new BYTE[nSize];
        DWORD dwRead;
        if(PictureFile.read(pBuffer, nSize, &dwRead))
        {
            if(loadPictureData(pBuffer, nSize)) bResult = TRUE;
        }

        PictureFile.close();
        delete [] pBuffer;
    }
    else // Open Failed...
    {
        //TCHAR szCause[255];
        //e.GetErrorMessage(szCause, 255, NULL);
        //MessageBoxEx(NULL, szCause, ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
        bResult = FALSE;
    }

    m_nWeight = nSize; // Update Picture Size Info...
    getImageSize();
    return bResult;
}

BOOL UPicture::loadPictureData(BYTE *pBuffer, int nSize)
{
    BOOL bResult = FALSE;
    HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, nSize);

    if(hGlobal == NULL)
    {
        MessageBoxEx(NULL, "Can not allocate enough memory\t", ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
        return FALSE;
    }

    void* pData = GlobalLock(hGlobal);
    memcpy(pData, pBuffer, nSize);
    GlobalUnlock(hGlobal);

    IStream* pStream = NULL;

    if(CreateStreamOnHGlobal(hGlobal, TRUE, &pStream) == S_OK)
    {
        HRESULT hr;
        if((hr = ::OleLoadPicture(pStream, nSize, FALSE, IID_IPicture, (LPVOID *)&m_pIPicture)) == E_NOINTERFACE)
        {
            MessageBoxEx(NULL, "IPicture interface is not supported\t", ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
            return FALSE;
        }
        else // S_OK
        {
            pStream->Release();
            pStream = NULL;
            bResult = TRUE;
        }
    }

    FreeResource(hGlobal); // 16Bit Windows Needs This (32Bit - Automatic Release)

    return bResult;
}

BOOL UPicture::show(HDC hDC, LPRECT pDrawRect, LPRECT pSrcRect)
{
    if (hDC == NULL || m_pIPicture == NULL) return FALSE;

    //RECT recrDest = *pDrawRect;

    long Width  = 0;
    long Height = 0;
    m_pIPicture->get_Width(&Width);
    m_pIPicture->get_Height(&Height);

    RECT SrcRect = { 0,0,Width,Height };

    if(pSrcRect)
    {
        SrcRect=*pSrcRect;
        // convert pixels to himetric
        SrcRect.bottom =MulDiv(SrcRect.bottom, HIMETRIC_INCH,GetDeviceCaps(hDC, LOGPIXELSX));
        SrcRect.left =MulDiv(SrcRect.left, HIMETRIC_INCH,GetDeviceCaps(hDC, LOGPIXELSX));
        SrcRect.right =MulDiv(SrcRect.right, HIMETRIC_INCH,GetDeviceCaps(hDC, LOGPIXELSX));
        SrcRect.top =MulDiv(SrcRect.top, HIMETRIC_INCH,GetDeviceCaps(hDC, LOGPIXELSX));
    }
    RECT DrawRect = *pDrawRect;
    //DrawRect.NormalizeRect();
    //SrcRect.NormalizeRect();
    HRESULT hrP = 0;

    hrP = m_pIPicture->Render(hDC,
    DrawRect.left,                  // Left
    DrawRect.top,                   // Top
    DrawRect.right - DrawRect.left, // Right
    DrawRect.bottom - DrawRect.top, // Bottom
    SrcRect.left,
    SrcRect.bottom,
    SrcRect.right - SrcRect.left,
    SrcRect.top - SrcRect.bottom,
    &DrawRect);

    if (SUCCEEDED(hrP)) return TRUE;
    //AfxThrowMemoryException();
    return FALSE;
}

BOOL UPicture::saveAsBitmap(const TCHAR *sFilePath)
{
    BOOL bResult = FALSE;
    ILockBytes *Buffer = 0;
    IStorage *pStorage = 0;
    IStream *FileStream = 0;
    BYTE *BufferBytes;
    STATSTG BytesStatistics;
    DWORD OutData;
    long OutStream;
    UFile BitmapFile;
    //CFileException e;
    double SkipFloat = 0;
    DWORD ByteSkip = 0;
    _ULARGE_INTEGER RealData;

    CreateILockBytesOnHGlobal(NULL, TRUE, &Buffer); // Create ILockBytes Buffer

    HRESULT hr = ::StgCreateDocfileOnILockBytes(Buffer,
    STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_READWRITE, 0, &pStorage);

    hr = pStorage->CreateStream(L"PICTURE",
    STGM_SHARE_EXCLUSIVE | STGM_CREATE | STGM_READWRITE, 0, 0, &FileStream);

    m_pIPicture->SaveAsFile(FileStream, TRUE, &OutStream); // Copy Data Stream
    FileStream->Release();
    pStorage->Release();
    Buffer->Flush();

    // Get Statistics For Final Size Of Byte Array
    Buffer->Stat(&BytesStatistics, STATFLAG_NONAME);

    // Cut UnNeeded Data Coming From SaveAsFile() (Leave Only "Pure" Picture Data)
    SkipFloat = (double(OutStream) / 512); // Must Be In a 512 Blocks...
    if(SkipFloat > DWORD(SkipFloat)) ByteSkip = (DWORD)SkipFloat + 1;
    else ByteSkip = (DWORD)SkipFloat;
    ByteSkip = ByteSkip * 512; // Must Be In a 512 Blocks...

    // Find Difference Between The Two Values
    ByteSkip = (DWORD)(BytesStatistics.cbSize.QuadPart - ByteSkip);

    // Allocate Only The "Pure" Picture Data
    RealData.LowPart = 0;
    RealData.HighPart = 0;
    RealData.QuadPart = ByteSkip;
    BufferBytes = (BYTE*)malloc(OutStream);
    if(BufferBytes == NULL)
    {
        Buffer->Release();
        MessageBoxEx(NULL, "Can not allocate enough memory\t", ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
    }

    Buffer->ReadAt(RealData, BufferBytes, OutStream, &OutData);

    if(BitmapFile.open(sFilePath))
    {
        BitmapFile.write(BufferBytes, OutData);
        BitmapFile.close();
        bResult = TRUE;
    }
    else // Write File Failed...
    {
        //TCHAR szCause[255];
        //e.GetErrorMessage(szCause, 255, NULL);
        //MessageBoxEx(NULL, szCause, ERROR_TITLE, MB_OK | MB_ICONSTOP, LANG_ENGLISH);
        bResult = FALSE;
    }

    Buffer->Release();
    free(BufferBytes);

    return bResult;
}

BOOL UPicture::updateSizeOnDC(HDC hDC)
{
    if(hDC == NULL || m_pIPicture == NULL)
    {
        m_nHeight = 0;
        m_nWidth = 0;
        return FALSE;
    }

    m_pIPicture->get_Height(&m_nHeight);
    m_pIPicture->get_Width(&m_nWidth);

    // Get Current DPI - Dot Per Inch
    int CurrentDPI_X = ::GetDeviceCaps(hDC, LOGPIXELSX);
    int CurrentDPI_Y = ::GetDeviceCaps(hDC, LOGPIXELSY);

    // Use a "Standard" Print (When Printing)
    //if(pDC->IsPrinting())
    //{
    //    CurrentDPI_X = 96;
    //    CurrentDPI_Y = 96;
    //}

    m_nHeight = MulDiv(m_nHeight, CurrentDPI_Y, HIMETRIC_INCH);
    m_nWidth  = MulDiv(m_nWidth,  CurrentDPI_X, HIMETRIC_INCH);

    return(TRUE);
}

BOOL UPicture::createFromIcon(HICON hIcon)
{
    BOOL bResult=FALSE;
    if(hIcon)
    {
        PICTDESC desc;
        desc.cbSizeofstruct = sizeof(PICTDESC);
        desc.picType = PICTYPE_ICON;
        desc.icon.hicon= hIcon;
        m_nWeight = 0;
        if(FAILED(::OleCreatePictureIndirect(&desc,IID_IPicture,FALSE,(LPVOID*)&m_pIPicture)))
        {
            bResult=FALSE;
        }
        else
        {
            bResult=TRUE;
        }
    }
    getImageSize();
    return bResult;
}

BOOL UPicture::createFromBitmap(HBITMAP hBitmap)
{
    BOOL bResult=FALSE;
    if(hBitmap)
    {
        PICTDESC desc;
        desc.cbSizeofstruct = sizeof(PICTDESC);
        desc.picType = PICTYPE_BITMAP;
        desc.bmp.hbitmap = hBitmap;
        desc.bmp.hpal = 0;
        m_nWeight = 0;
        if(FAILED(::OleCreatePictureIndirect(&desc, IID_IPicture, FALSE, (LPVOID*)&m_pIPicture)))
        {
            bResult=FALSE;
        }
        else
        {
            bResult=TRUE;
        }
    }
    getImageSize();
    return bResult;
}

void UPicture::unload()
{
    freePictureData();
}

void UPicture::getImageSize()
{
    if(m_pIPicture != NULL)
    {   // Do Not Try To Read From Memory That Is Not Exist...
        m_pIPicture->get_Height(&m_nHeight);
        m_pIPicture->get_Width(&m_nWidth);
        // Calculate Its Size On a "Standard" (96 DPI) Device Context
        m_nHeight = MulDiv(m_nHeight, 96, HIMETRIC_INCH);
        m_nWidth  = MulDiv(m_nWidth,  96, HIMETRIC_INCH);
    }
    else
    {// Picture Data Is Not a Known Picture Type
        m_nHeight = 0;
        m_nWidth = 0;
        m_nWeight=0;
    }
}

void UPicture::freePictureData()
{
    if(m_pIPicture != NULL)
    {
        m_pIPicture->Release();
        m_pIPicture = NULL;
        m_nHeight = 0;
        m_nWeight = 0;
        m_nWidth = 0;
    }
}


text:
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\000036}}
html {
  min-width: 400px;
  min-height: 500px;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000311}}
body {
  padding: 20px;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000315}}
*:focus {
  outline: 0;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000319}}
body {
  font-family: sans-serif;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000322}}
core-header-panel {
  background: white;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000325}}
core-toolbar {
  background-color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000328}}
.content {
  padding: 20px;
}

/* drawer is always visible on a wide screen
   so menu button isn't required */
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000333}}
core-drawer-panel:not([narrow]) #navicon {
  display: none;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000338}}
body {
  font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
  margin: 0;
  padding: 24px;
  color: #333;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000345}}
body.core-narrow {
  padding: 8px;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000349}}
paper-tabs, core-toolbar {
  background-color: #0c9875;
  color: #fff;
  box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2);
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000355}}
core-toolbar paper-tabs {
  box-shadow: none;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000359}}
paper-tabs.transparent-teal {
  background-color: transparent;
  color: #00bcd4;
  box-shadow: none;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000365}}
paper-tabs #selectionBar {
  background-color: #981DA5;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000369}}
h3 {
  font-size: 16px;
  font-weight: 400;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000374}}
paper-checkbox::shadow #ink[checked] {
  color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000377}}
paper-checkbox::shadow #checkbox.checked {
  background-color: #0c9875;
  border-color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000382}}
paper-input /deep/ ::-webkit-input-placeholder {
  color: #aaa;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000385}}
paper-input /deep/ ::-moz-placeholder {
  color: #aaa;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000388}}
paper-input /deep/ :-ms-input-placeholder {
  color: #aaa;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000391}}
paper-input /deep/ .label-text,
paper-input /deep/ .error {
  color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000395}}
paper-input /deep/ .unfocused-underline {
  background-color: #aaa;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\0000398}}
paper-input[focused] /deep/ .floated-label .label-text {
  color: red;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003101}}
paper-input /deep/ .focused-underline {
  background-color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003104}}
paper-input.invalid /deep/ .floated-label .label-text,
paper-input /deep/ .error {
  color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003108}}
paper-input.invalid /deep/ .focused-underline {
  background-color: #0c9875;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003111}}
paper-input {
  color: black;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003115}}
paper-button[raised].facebookLogin {
  background: #3b5998;
  color: #fff;
}

/** No more copy paste */
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003123}}
core-pages > div {
  position: relative;
  overflow: scroll;
}
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003129}}
core-pages #createPage #createReminderBtn {
  position: absolute;
  right: 0;
  bottom: 0;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003137}}
paper-fab {
  background-color: #981DA5;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003141}}
paper-checkbox {
  padding: 10px;
  padding-right: 15px;
  padding-left: 0px;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003147}}
paper-input.stretch {
  width: 100%;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003151}}
paper-ripple {
  position: absolute;
}

@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003156}}
#reminderList .row {
  padding-left: 10px;
  border-bottom: 1px solid #AAA;
}
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003160}}
#reminderList .row .reminderInfoRow .reminderNameRow {
  font-weight: bold;
}
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003163}}
#reminderList .row .reminderInfoRow .reminderUrlRow {
  color: #AAA;
}
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003170}}
#reminderList .row:last-of-type {
  border-bottom: none;
}
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/dominik\/dev\/mind-the-app\/chrome-extension\/app\/styles\/main\.scss}line{font-family:\00003174}}
#reminderList core-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}


text:
package net.lipecki.watson.product;

import lombok.Builder;
import lombok.Data;

@Data
@Builder
public class ModifyProductDto {

    private String name;
    private String categoryUuid;
    private String defaultUnit;
    private String producerUuid;

}


text:
package org.hisrc.jsonix.analysis;

import javax.xml.namespace.QName;

import org.apache.commons.lang3.Validate;
import org.jvnet.jaxb2_commons.xml.bind.model.MAnyAttributePropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MAnyElementPropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MAttributePropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MElement;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementPropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementRefPropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementRefsPropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementTypeInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementTypeRef;
import org.jvnet.jaxb2_commons.xml.bind.model.MElementsPropertyInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo;
import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfoVisitor;
import org.jvnet.jaxb2_commons.xml.bind.model.MTyped;
import org.jvnet.jaxb2_commons.xml.bind.model.MValuePropertyInfo;

public final class PropertyInfoGraphBuilder<T, C extends T> implements
		MPropertyInfoVisitor<T, C, PropertyInfoVertex<T, C>> {

	private final ModelInfoGraphBuilder<T, C> modelInfoGraphBuilder;
	private final MModelInfo<T, C> modelInfo;
	private final PropertyInfoVertex<T, C> vertex;

	public PropertyInfoGraphBuilder(
			ModelInfoGraphBuilder<T, C> modelInfoGraphBuilder,
			MModelInfo<T, C> modelInfo, PropertyInfoVertex<T, C> vertex) {
		Validate.notNull(modelInfoGraphBuilder);
		Validate.notNull(modelInfo);
		Validate.notNull(vertex);
		this.modelInfoGraphBuilder = modelInfoGraphBuilder;
		this.modelInfo = modelInfo;
		this.vertex = vertex;
	}

	private void addHardDependencyOnType(
			PropertyInfoVertex<T, C> propertyInfoVertex, MTyped<T, C> info) {
		final InfoVertex<T, C> typeInfoVertex = modelInfoGraphBuilder.typeInfo(
				propertyInfoVertex.getPackageInfo(), info.getTypeInfo());
		modelInfoGraphBuilder.addHardDependency(propertyInfoVertex,
				typeInfoVertex);
	}

	private void addSoftDependencyOnType(
			PropertyInfoVertex<T, C> propertyInfoVertex, MTyped<T, C> info) {
		final InfoVertex<T, C> typeInfoVertex = modelInfoGraphBuilder.typeInfo(
				propertyInfoVertex.getPackageInfo(), info.getTypeInfo());
		modelInfoGraphBuilder.addSoftDependency(propertyInfoVertex,
				typeInfoVertex);
	}

	@Override
	public PropertyInfoVertex<T, C> visitValuePropertyInfo(
			MValuePropertyInfo<T, C> info) {
		// Value property depends on its type
		addHardDependencyOnType(vertex, info);
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitAttributePropertyInfo(
			MAttributePropertyInfo<T, C> info) {
		// Attribute property depends on its type
		addHardDependencyOnType(vertex, info);
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitAnyAttributePropertyInfo(
			MAnyAttributePropertyInfo<T, C> info) {
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitAnyElementPropertyInfo(
			MAnyElementPropertyInfo<T, C> info) {
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitElementPropertyInfo(
			MElementPropertyInfo<T, C> info) {
		// Element property depends on its type
		addHardDependencyOnType(vertex, info);
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitElementsPropertyInfo(
			MElementsPropertyInfo<T, C> info) {
		// Elements property has a "soft" dependency types of its elements
		// That is, some of these types may be excluded
		for (MElementTypeRef<T, C> elementTypeInfo : info.getElementTypeInfos()) {
			addSoftDependencyOnType(vertex, elementTypeInfo);
		}
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitElementRefPropertyInfo(
			MElementRefPropertyInfo<T, C> info) {
		// Element reference property depends on the type of its element
		addHardDependencyOnType(vertex, info);
		addSubstitutionHeadDependencies(info, vertex);
		return vertex;
	}

	@Override
	public PropertyInfoVertex<T, C> visitElementRefsPropertyInfo(
			MElementRefsPropertyInfo<T, C> info) {
		for (MElement<T, C> elementTypeInfo : info.getElementTypeInfos()) {
			// Element references property has "soft" dependencies on the
			// types
			// of its elements
			addSoftDependencyOnType(vertex, elementTypeInfo);
			addSubstitutionHeadDependencies(elementTypeInfo, vertex);
		}
		return vertex;
	}

	private <M extends MElementTypeInfo<T, C, O>, O> void addSubstitutionHeadDependencies(
			M elementTypeInfo, PropertyInfoVertex<T, C> propertyInfoVertex) {
		final MClassInfo<T, C> classInfo = propertyInfoVertex.getClassInfo();
		final QName elementName = elementTypeInfo.getElementName();
		for (MElementInfo<T, C> elementInfo : this.modelInfo.getElementInfos()) {
			if (elementName.equals(elementInfo.getSubstitutionHead())
					&& (elementInfo.getScope() == null || elementInfo
							.getScope() == classInfo)) {
				final InfoVertex<T, C> elementInfoVertex = modelInfoGraphBuilder
						.elementInfo(elementInfo);
				modelInfoGraphBuilder.addSoftDependency(elementInfoVertex,
						propertyInfoVertex);
				modelInfoGraphBuilder.addSoftDependency(propertyInfoVertex,
						elementInfoVertex);
			}
		}
	}

}


text:
namespace blink {

class DrawingRecorder;
class GraphicsContext;

// Wraps a blink::GraphicsContext.
// Internal consumers can extract the underlying context (via WebGraphicsContextImpl).
// External consumers can make a single drawing using a WebCanvas.
class WebGraphicsContextImpl : public WebGraphicsContext {
public:
    WebGraphicsContextImpl(GraphicsContext&, const DisplayItemClientWrapper&, DisplayItem::Type);
    ~WebGraphicsContextImpl();
    GraphicsContext& graphicsContext() { return m_graphicsContext; }

    // blink::WebGraphicsContext
    WebCanvas* beginDrawing(const WebFloatRect& bounds) override;
    void endDrawing() override;

private:
    GraphicsContext& m_graphicsContext;
    DisplayItemClientWrapper m_client;
    DisplayItem::Type m_type;
    OwnPtr<DrawingRecorder> m_drawingRecorder;
#ifndef NDEBUG
    bool m_hasBegunDrawing;
#endif
};

// Source/web/ assumes that WebGraphicsContextImpl is the only implementation.
DEFINE_TYPE_CASTS(WebGraphicsContextImpl, WebGraphicsContext, webGraphicsContext, true, true);

} // namespace blink

#endif


text:
package com.amazonaws.services.elasticloadbalancing.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *

 * Contains the parameters for RemoveTags.
 *

 *
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RemoveTagsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * The name of the load balancer. You can specify a maximum of one load balancer name.
     *

     */
    private com.amazonaws.internal.SdkInternalList<String> loadBalancerNames;
    /**
     *

     * The list of tag keys to remove.
     *

     */
    private com.amazonaws.internal.SdkInternalList<TagKeyOnly> tags;

    /**
     *

     * The name of the load balancer. You can specify a maximum of one load balancer name.
     *

     *
     * @return The name of the load balancer. You can specify a maximum of one load balancer name.
     */

    public java.util.List<String> getLoadBalancerNames() {
        if (loadBalancerNames == null) {
            loadBalancerNames = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return loadBalancerNames;
    }

    /**
     *

     * The name of the load balancer. You can specify a maximum of one load balancer name.
     *

     *
     * @param loadBalancerNames
     *        The name of the load balancer. You can specify a maximum of one load balancer name.
     */

    public void setLoadBalancerNames(java.util.Collection<String> loadBalancerNames) {
        if (loadBalancerNames == null) {
            this.loadBalancerNames = null;
            return;
        }

        this.loadBalancerNames = new com.amazonaws.internal.SdkInternalList<String>(loadBalancerNames);
    }

    /**
     *

     * The name of the load balancer. You can specify a maximum of one load balancer name.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setLoadBalancerNames(java.util.Collection)} or {@link #withLoadBalancerNames(java.util.Collection)} if
     * you want to override the existing values.
     *

     *
     * @param loadBalancerNames
     *        The name of the load balancer. You can specify a maximum of one load balancer name.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RemoveTagsRequest withLoadBalancerNames(String... loadBalancerNames) {
        if (this.loadBalancerNames == null) {
            setLoadBalancerNames(new com.amazonaws.internal.SdkInternalList<String>(loadBalancerNames.length));
        }
        for (String ele : loadBalancerNames) {
            this.loadBalancerNames.add(ele);
        }
        return this;
    }

    /**
     *

     * The name of the load balancer. You can specify a maximum of one load balancer name.
     *

     *
     * @param loadBalancerNames
     *        The name of the load balancer. You can specify a maximum of one load balancer name.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RemoveTagsRequest withLoadBalancerNames(java.util.Collection<String> loadBalancerNames) {
        setLoadBalancerNames(loadBalancerNames);
        return this;
    }

    /**
     *

     * The list of tag keys to remove.
     *

     *
     * @return The list of tag keys to remove.
     */

    public java.util.List<TagKeyOnly> getTags() {
        if (tags == null) {
            tags = new com.amazonaws.internal.SdkInternalList<TagKeyOnly>();
        }
        return tags;
    }

    /**
     *

     * The list of tag keys to remove.
     *

     *
     * @param tags
     *        The list of tag keys to remove.
     */

    public void setTags(java.util.Collection<TagKeyOnly> tags) {
        if (tags == null) {
            this.tags = null;
            return;
        }

        this.tags = new com.amazonaws.internal.SdkInternalList<TagKeyOnly>(tags);
    }

    /**
     *

     * The list of tag keys to remove.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
     * existing values.
     *

     *
     * @param tags
     *        The list of tag keys to remove.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RemoveTagsRequest withTags(TagKeyOnly... tags) {
        if (this.tags == null) {
            setTags(new com.amazonaws.internal.SdkInternalList<TagKeyOnly>(tags.length));
        }
        for (TagKeyOnly ele : tags) {
            this.tags.add(ele);
        }
        return this;
    }

    /**
     *

     * The list of tag keys to remove.
     *

     *
     * @param tags
     *        The list of tag keys to remove.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RemoveTagsRequest withTags(java.util.Collection<TagKeyOnly> tags) {
        setTags(tags);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getLoadBalancerNames() != null)
            sb.append("LoadBalancerNames: ").append(getLoadBalancerNames()).append(",");
        if (getTags() != null)
            sb.append("Tags: ").append(getTags());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof RemoveTagsRequest == false)
            return false;
        RemoveTagsRequest other = (RemoveTagsRequest) obj;
        if (other.getLoadBalancerNames() == null ^ this.getLoadBalancerNames() == null)
            return false;
        if (other.getLoadBalancerNames() != null && other.getLoadBalancerNames().equals(this.getLoadBalancerNames()) == false)
            return false;
        if (other.getTags() == null ^ this.getTags() == null)
            return false;
        if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getLoadBalancerNames() == null) ? 0 : getLoadBalancerNames().hashCode());
        hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
        return hashCode;
    }

    @Override
    public RemoveTagsRequest clone() {
        return (RemoveTagsRequest) super.clone();
    }

}


text:
package com.intel.analytics.bigdl.models.resnet

import java.nio.ByteBuffer
import java.nio.file.{Files, Path, Paths}

import com.intel.analytics.bigdl.dataset.ByteRecord
import com.intel.analytics.bigdl.utils.File
import scopt.OptionParser

import scala.collection.mutable.ArrayBuffer

object Utils {
  case class TrainParams(
    folder: String = "./",
    checkpoint: Option[String] = None,
    modelSnapshot: Option[String] = None,
    stateSnapshot: Option[String] = None,
    optnet: Boolean = false,
    depth: Int = 20,
    classes: Int = 10,
    shortcutType: String = "A",
    batchSize: Int = 128,
    nepochs: Int = 165,
    learningRate: Double = 0.1,
    weightDecay: Double = 1e-4,
    momentum: Double = 0.9,
    dampening: Double = 0.0,
    nesterov: Boolean = true,
    graphModel: Boolean = false,
    warmupEpoch: Int = 0,
    maxLr: Double = 0.0)

  val trainParser = new OptionParser[TrainParams]("BigDL ResNet Example") {
    head("Train ResNet model on single node")
    opt[String]('f', "folder")
      .text("where you put your training files")
      .action((x, c) => c.copy(folder = x))
    opt[String]("model")
      .text("model snapshot location")
      .action((x, c) => c.copy(modelSnapshot = Some(x)))
    opt[String]("state")
      .text("state snapshot location")
      .action((x, c) => c.copy(stateSnapshot = Some(x)))
    opt[String]("cache")
      .text("where to cache the model")
      .action((x, c) => c.copy(checkpoint = Some(x)))
    opt[Boolean]("optnet")
      .text("shared gradients and caches to reduce memory usage")
      .action((x, c) => c.copy(optnet = x))
    opt[Int]("depth")
      .text("depth of ResNet, 18 | 20 | 34 | 50 | 101 | 152 | 200")
      .action((x, c) => c.copy(depth = x))
    opt[Int]("classes")
      .text("classes of ResNet")
      .action((x, c) => c.copy(classes = x))
    opt[String]("shortcutType")
      .text("shortcutType of ResNet, A | B | C")
      .action((x, c) => c.copy(shortcutType = x))
    opt[Int]("batchSize")
      .text("batchSize of ResNet, 64 | 128 | 256 | ..")
      .action((x, c) => c.copy(batchSize = x))
    opt[Int]("nEpochs")
      .text("number of epochs of ResNet; default is 165")
      .action((x, c) => c.copy(nepochs = x))
    opt[Double]("learningRate")
      .text("initial learning rate of ResNet; default is 0.1")
      .action((x, c) => c.copy(learningRate = x))
    opt[Double]("momentum")
      .text("momentum of ResNet; default is 0.9")
      .action((x, c) => c.copy(momentum = x))
    opt[Double]("weightDecay")
      .text("weightDecay of ResNet; default is 1e-4")
      .action((x, c) => c.copy(weightDecay = x))
    opt[Double]("dampening")
      .text("dampening of ResNet; default is 0.0")
      .action((x, c) => c.copy(dampening = x))
    opt[Boolean]("nesterov")
      .text("nesterov of ResNet; default is trye")
      .action((x, c) => c.copy(nesterov = x))
    opt[Unit]('g', "graphModel")
      .text("use graph model")
      .action((x, c) => c.copy(graphModel = true))
    opt[Int]("warmupEpoch")
      .text("warmup epoch")
      .action((x, c) => c.copy(warmupEpoch = x))
    opt[Double]("maxLr")
      .text("maxLr")
      .action((x, c) => c.copy(maxLr = x))
  }

  case class TestParams(
    folder: String = "./",
    model: String = "",
    batchSize: Int = 128
  )

  val testParser = new OptionParser[TestParams]("BigDL ResNet on Cifar10 Test Example") {
    opt[String]('f', "folder")
      .text("the location of Cifar10 dataset")
      .action((x, c) => c.copy(folder = x))

    opt[String]('m', "model")
      .text("the location of model snapshot")
      .action((x, c) => c.copy(model = x))
      .required()
      .required()
    opt[Int]('b', "batchSize")
      .text("batch size")
      .action((x, c) => c.copy(batchSize = x))
  }

  private[bigdl] def loadTrain(dataFile: String): Array[ByteRecord] = {
    val allFiles = Array(
      dataFile + "/data_batch_1.bin",
      dataFile + "/data_batch_2.bin",
      dataFile + "/data_batch_3.bin",
      dataFile + "/data_batch_4.bin",
      dataFile + "/data_batch_5.bin"
    )

    val result = new ArrayBuffer[ByteRecord]()
    allFiles.foreach(load(_, result))
    result.toArray
  }

  private[bigdl] def loadTest(dataFile: String): Array[ByteRecord] = {
    val result = new ArrayBuffer[ByteRecord]()
    val testFile = dataFile + "/test_batch.bin"
    load(testFile, result)
    result.toArray
  }

  /**
   * load cifar data.
   * read cifar from hdfs if data folder starts with "hdfs:", otherwise form local file.
   * @param featureFile
   * @param result
   */
  private[bigdl] def load(featureFile: String, result : ArrayBuffer[ByteRecord]): Unit = {
    val rowNum = 32
    val colNum = 32
    val imageOffset = rowNum * colNum * 3 + 1
    val channelOffset = rowNum * colNum
    val bufferOffset = 8

    val featureBuffer = if (featureFile.startsWith(File.hdfsPrefix)) {
      ByteBuffer.wrap(File.readHdfsByte(featureFile))
    } else {
      ByteBuffer.wrap(Files.readAllBytes(Paths.get(featureFile)))
    }

    val featureArray = featureBuffer.array()
    val featureCount = featureArray.length / (rowNum * colNum * 3 + 1)

    var i = 0
    while (i < featureCount) {
      val img = new Array[Byte]((rowNum * colNum * 3 + bufferOffset))
      val byteBuffer = ByteBuffer.wrap(img)
      byteBuffer.putInt(rowNum)
      byteBuffer.putInt(colNum)

      val label = featureArray(i * imageOffset).toFloat
      var y = 0
      val start = i * imageOffset + 1
      while (y < rowNum) {
        var x = 0
        while (x < colNum) {
          img((x + y * colNum) * 3 + 2 + bufferOffset) =
            featureArray(start + x + y * colNum)
          img((x + y * colNum) * 3 + 1 + bufferOffset) =
            featureArray(start + x + y * colNum + channelOffset)
          img((x + y * colNum) * 3 + bufferOffset) =
            featureArray(start + x + y * colNum + 2 * channelOffset)
          x += 1
        }
        y += 1
      }
      result.append(ByteRecord(img, label + 1.0f))
      i += 1
    }
  }

}


text:
#ifndef LIBITM_STMLOCK_H
#define LIBITM_STMLOCK_H 1

namespace GTM HIDDEN {

/* A versioned write lock on a cacheline.  This must be wide enough to
   store a pointer, and preferably wide enough to avoid overflowing the
   version counter.  Thus we use a "word", which should be 64-bits on
   64-bit systems even when their pointer size is forced smaller.  */
typedef gtm_word gtm_stmlock;

/* This has to be the same size as gtm_stmlock, we just use this name
   for documentation purposes.  */
typedef gtm_word gtm_version;

/* The maximum value a version number can have.  This is a consequence
   of having the low bit of gtm_stmlock reserved for the owned bit.  */
#define GTM_VERSION_MAX		(~(gtm_version)0 >> 1)

/* A value that may be used to indicate "uninitialized" for a version.  */
#define GTM_VERSION_INVALID	(~(gtm_version)0)

/* This bit is set when the write lock is held.  When set, the balance of
   the bits in the lock is a pointer that references STM backend specific
   data; it is up to the STM backend to determine if this thread holds the
   lock.  If this bit is clear, the balance of the bits are the last
   version number committed to the cacheline.  */
static inline bool
gtm_stmlock_owned_p (gtm_stmlock lock)
{
  return lock & 1;
}

static inline gtm_stmlock
gtm_stmlock_set_owned (void *data)
{
  return (gtm_stmlock)(uintptr_t)data | 1;
}

static inline void *
gtm_stmlock_get_addr (gtm_stmlock lock)
{
  return (void *)((uintptr_t)lock & ~(uintptr_t)1);
}

static inline gtm_version
gtm_stmlock_get_version (gtm_stmlock lock)
{
  return lock >> 1;
}

static inline gtm_stmlock
gtm_stmlock_set_version (gtm_version ver)
{
  return ver << 1;
}

/* We use a fixed set of locks for all memory, hashed into the
   following table.  */
#define LOCK_ARRAY_SIZE  (1024 * 1024)
extern gtm_stmlock gtm_stmlock_array[LOCK_ARRAY_SIZE];

static inline gtm_stmlock *
gtm_get_stmlock (const gtm_cacheline *addr)
{
  size_t idx = ((uintptr_t) addr / CACHELINE_SIZE) % LOCK_ARRAY_SIZE;
  return gtm_stmlock_array + idx;
}

/* The current global version number.  */
extern atomic<gtm_version> gtm_clock;

static inline gtm_version
gtm_get_clock (void)
{
  atomic_thread_fence(memory_order_release);
  return gtm_clock.load(memory_order_acquire);
}

static inline gtm_version
gtm_inc_clock (void)
{
  /* ??? Here we have a choice, the pre-inc operator mapping to
     __atomic_add_fetch with memory_order_seq_cst, or fetch_add
     with memory_order_acq_rel plus another separate increment.
     We really ought to recognize and optimize fetch_op(x) op x... */
  gtm_version r = ++gtm_clock;

  /* ??? Ought to handle wraparound for 32-bit.  */
  if (sizeof(r) < 8 && r > GTM_VERSION_MAX)
    abort ();

  return r;
}

} // namespace GTM

#endif // LIBITM_STMLOCK_H


text:
/* eslint-disable */
// Auto-generated by generate-enums script on Thu Feb 24 2022 03:38:38 GMT-0500 (Eastern Standard Time)

/**
 * @enum
 * @readonly
 */
const ELobbyType = {
	"Private": 0,
	"FriendsOnly": 1,
	"Public": 2,
	"Invisible": 3,
	"PrivateUnique": 4,

	// Value-to-name mapping for convenience
	"0": "Private",
	"1": "FriendsOnly",
	"2": "Public",
	"3": "Invisible",
	"4": "PrivateUnique",
};

module.exports = ELobbyType;


text:
<?php declare(strict_types=1);

namespace Cspray\Labrador\Http\Test\Stub;

use Amp\Promise;
use Amp\Http\Server\Middleware;
use Amp\Http\Server\Request;
use Amp\Http\Server\Response;
use Amp\Http\Server\RequestHandler;
use function Amp\call;

class ResponseDecoratorMiddleware implements Middleware {

    /**
     * @param Request $request
     * @param RequestHandler $requestHandler
     *
     * @return Promise<\Amp\Http\Server\Response>
     */
    public function handleRequest(Request $request, RequestHandler $requestHandler): Promise {
        return call(function() use ($request, $requestHandler) {
            /** @var Response $response */
            $response = yield $requestHandler->handleRequest($request);
            $body = yield $response->getBody()->read();
            $decorated = $request->getAttribute('decorated');

            $response->setBody("$body $decorated");

            return $response;
        });
    }
}