text:
module SimpleCov
  # Holds the individual data of a coverage result.
  #
  # This is uniform across coverage criteria as they all have:
  #
  # * total - how many things to cover there are (total relevant loc/branches)
  # * covered - how many of the coverables are hit
  # * missed - how many of the coverables are missed
  # * percent - percentage as covered/missed
  # * strength - average hits per/coverable (will not exist for one shot lines format)
  class CoverageStatistics
    attr_reader :total, :covered, :missed, :strength, :percent

    def self.from(coverage_statistics)
      sum_covered, sum_missed, sum_total_strength =
        coverage_statistics.reduce([0, 0, 0.0]) do |(covered, missed, total_strength), file_coverage_statistics|
          [
            covered + file_coverage_statistics.covered,
            missed + file_coverage_statistics.missed,
            # gotta remultiply with loc because files have different strength and loc
            # giving them a different "weight" in total
            total_strength + (file_coverage_statistics.strength * file_coverage_statistics.total)
          ]
        end

      new(covered: sum_covered, missed: sum_missed, total_strength: sum_total_strength)
    end

    # Requires only covered, missed and strength to be initialized.
    #
    # Other values are computed by this class.
    def initialize(covered:, missed:, total_strength: 0.0)
      @covered  = covered
      @missed   = missed
      @total    = covered + missed
      @percent  = compute_percent(covered, missed, total)
      @strength = compute_strength(total_strength, total)
    end

  private

    def compute_percent(covered, missed, total)
      return 100.0 if missed.zero?

      covered * 100.0 / total
    end

    def compute_strength(total_strength, total)
      return 0.0 if total.zero?

      total_strength.to_f / total
    end
  end
end


text:
name=theme_RLDE
version=`cat $name/manifest.xml | grep '<version>' | head -1 | cut -f2 -d'>' | cut -f1 -d'<'`
git archive --prefix=$name-$version/ --format=zip --output=$name-$version.zip HEAD $name

redpajama_set_name: RedPajamaGithub


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GrPPI: gtest-printers.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

GrPPI
    1.0

Generic and Reusable Parallel Pattern Interface

cmake-build-debug

googletest-src

googletest

include

gtest

internal

custom

cmake-build-debug/googletest-src/googletest/include/gtest/internal/custom/gtest-printers.h

Go to the documentation of this file.

    1 // Copyright 2015, Google Inc.

    2 // All rights reserved.

    3 //

    4 // Redistribution and use in source and binary forms, with or without

    5 // modification, are permitted provided that the following conditions are

    6 // met:

    7 //

    8 //     * Redistributions of source code must retain the above copyright

    9 // notice, this list of conditions and the following disclaimer.

   10 //     * Redistributions in binary form must reproduce the above

   11 // copyright notice, this list of conditions and the following disclaimer

   12 // in the documentation and/or other materials provided with the

   13 // distribution.

   14 //     * Neither the name of Google Inc. nor the names of its

   15 // contributors may be used to endorse or promote products derived from

   16 // this software without specific prior written permission.

   17 //

   18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

   19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

   20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

   21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT

   22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

   23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

   24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

   25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

   26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

   27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

   28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

   29 //

   30 // This file provides an injection point for custom printers in a local

   31 // installation of gTest.

   32 // It will be included from gtest-printers.h and the overrides in this file

   33 // will be visible to everyone.

   34 //

   35 // Injection point for custom user configurations. See README for details

   36 //

   37 // ** Custom implementation starts here **

   38

   39 #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_

   40 #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_

   41

   42 #endif  // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_

<address class="footer">
Generated by  1.9.2
</address>


text:
<Alloy>
	<Window class="container">
		<Widget src="tablewidget" id="tablew"></Widget>
	</Window>
</Alloy>


text:
package io.fabric8.gateway.handlers.detecting.protocol.stomp;

import io.fabric8.gateway.handlers.detecting.Protocol;
import io.fabric8.gateway.SocketWrapper;
import io.fabric8.gateway.handlers.loadbalancer.ConnectionParameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.vertx.java.core.Handler;
import org.vertx.java.core.buffer.Buffer;

import static io.fabric8.gateway.handlers.detecting.protocol.BufferSupport.startsWith;
import static io.fabric8.gateway.handlers.detecting.protocol.stomp.Constants.*;

/**
 */
public class StompProtocol implements Protocol {
    private static final transient Logger LOG = LoggerFactory.getLogger(StompProtocol.class);

    public static final int maxCommandLength = 20;
    public int maxHeaderLength = 1024 * 10;
    public int maxHeaders = 1000;
    public int maxDataLength = 1024 * 1024 * 100;

    @Override
    public String getProtocolName() {
        return "stomp";
    }

    private static final String[] SCHEMES = new String[]{ "stomp", "stomp+nio" };

    @Override
    public String[] getProtocolSchemes() {
        return SCHEMES;
    }

    public int getMaxIdentificationLength() {
        return 10;
    }

    @Override
    public boolean matches(Buffer header) {
        return startsWith(header, 0, CONNECT.toBuffer()) ||
               startsWith(header, 0, STOMP.toBuffer());
    }

    @Override
    public void snoopConnectionParameters(final SocketWrapper socket, Buffer received, final Handler<ConnectionParameters> handler) {

        StompProtocolDecoder h = new StompProtocolDecoder(this);
        h.errorHandler(new Handler<String>() {
            @Override
            public void handle(String error) {
                LOG.info("STOMP protocol decoding error: "+error);
                socket.close();
            }
        });
        h.codecHandler(new Handler<StompFrame>() {
            @Override
            public void handle(StompFrame event) {
                if( event.action().equals(CONNECT) || event.action().equals(STOMP)) {
                    ConnectionParameters parameters = new ConnectionParameters();
                    parameters.protocolVirtualHost = event.getHeaderAsString(HOST);
                    parameters.protocolUser = event.getHeaderAsString(USERID);
                    parameters.protocolClientId = event.getHeaderAsString(CLIENT_ID);
                    handler.handle(parameters);
                } else {
                    LOG.info("Expected a CONNECT or STOMP frame");
                    socket.close();
                }
            }
        });
        socket.readStream().dataHandler(h);
        h.handle(received);
    }

}


text:
var xHRObject = false;

if (window.XMLHttpRequest)
	xHRObject = new XMLHttpRequest();
else if (window.ActiveXObject)
	xHRObject = new ActiveXObject("Microsoft.XMLHTTP");

var filter = true;//remember edit on php file
load();
function load() {
	var bodyOfRequest = "request=load";
	xHRObject.open("POST", "processing.php", true);
	xHRObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xHRObject.send(bodyOfRequest);
	xHRObject.onreadystatechange = function() { //calback function

		loadTable("load");
	}

}

function Process() {
	var bodyOfRequest = "request=process";
	xHRObject.open("POST", "processing.php", true);
	xHRObject.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xHRObject.send(bodyOfRequest);
	xHRObject.onreadystatechange = function() { //calback function

		loadTable("process");
	}

}
function loadTable(action) {
	var table = "";
		if ((xHRObject.readyState == 4) && (xHRObject.status == 200)) {
			var errorLogin = xHRObject.responseText;
			if (errorLogin=="login") {
				window.location="buyonline.htm";
			}
			//if (filter) {
			//	var serverResponse = xHRObject.responseText;
			//	var spantag = document.getElementById("catalog");
			//	spantag.innerHTML = serverResponse;
			//} else
			{

			var serverResponse = xHRObject.responseXML;
			var header = serverResponse.getElementsByTagName("item");
			var spantag = document.getElementById("catalog");
			spantag.innerHTML = "";

			if (header.length > 0) {

				table += "
";
				table += "
Item Number	Item Name	Price	Quantity Available	Quantity on Hold	Quantity Sold
";

				for (i = 0; i < header.length; i++) {
					var node = header[i];
					var itemNumber = node.getElementsByTagName("id")[0].firstChild.nodeValue;
					var itemName = node.getElementsByTagName("name")[0].firstChild.nodeValue;
					var itemPrice = node.getElementsByTagName("price")[0].firstChild.nodeValue;
					var itemQty = node.getElementsByTagName("quantity")[0].firstChild.nodeValue;
					var itemHoldon = node.getElementsByTagName("holdon")[0].firstChild.nodeValue;
					var itemSold = node.getElementsByTagName("sold")[0].firstChild.nodeValue;
					table += "
";
					table += "" + itemNumber + "	";
					table += "" + itemName + "	";
					table += "" + itemPrice + "	";
					table += "" + itemQty + "	";
					table += "" + itemHoldon + "	";
					table += "" + itemSold + "	";

					table += "
";
				}
				if (action=="load") {

					table += "
";
					table += "<input type=\"button\" value=\"Process\" onclick=\"Process();\"/>";

					table += "
";
				}
				table += "
";
				isloadProcess = true;
			}
			spantag.innerHTML = table;
			}
		}
}


text:
module app.common {

    export class DataService implements IDataService {

        constructor(
            public $http: ng.IHttpService,
            public $q: ng.IQService,
            public _baseUri:string,
            public entityName: string,
            public storage: IStorage) {

        }

        public getById = (id: string) => {
            return this.fromCacheOrService({ method: "GET", uri: this.baseUri + "/getbyid", params: { id: id } });
        }

        public getAll = () => {
            return this.fromCacheOrService({ method: "GET", uri: this.baseUri + "/getAll" });
        }

        public fromCacheOrService = (action: IHttpAction) => {
            var deferred = this.$q.defer();
            var cachedData = this.storage.getByName({ name: action.uri + JSON.stringify(action.params) });
            if (!cachedData || !cachedData.value) {
                this.$http({ method: action.method, url: action.uri, data: action.data, params: action.params }).then((results) => {
                    this.storage.put({ category: this.entityName, name: action.uri + JSON.stringify(action.params), value: results });
                    deferred.resolve(results);
                }).catch((error) => {
                    deferred.reject(error);
                });
            } else {
                deferred.resolve(cachedData.value);
            }
            return deferred.promise;
        }

        public add = (entity) => {
            var deferred = this.$q.defer();
            this.$http({ method: "POST", url: this.baseUri + "/add", data: entity }).then((results) => {
                this.invalidateCache();
                deferred.resolve(results);
            }).catch((error) => {
                deferred.reject(error);
            });
            return deferred.promise;
        }

        public update = (entity) => {
            var deferred = this.$q.defer();
            this.$http({ method: "PUT", url: this.baseUri + "/update", data: JSON.stringify(entity) }).then((results) => {
                this.invalidateCache();
                deferred.resolve(results);
            }).catch((error) => {
                deferred.reject(error);
            });
            return deferred.promise;
        }

        public remove = (id: string) => {
            var deferred = this.$q.defer();
            this.$http({ method: "DELETE", url: this.baseUri + "/remove?id=" + id }).then((results) => {
                this.invalidateCache();
                deferred.resolve(results);
            }).catch((error) => {
                deferred.reject(error);
            });
            return deferred.promise;
        }

        public invalidateCache = () => {
            this.storage.get().forEach((item) => {
                if (item.category === this.entityName) {
                    this.storage.put({ name: item.name, value: null });
                }
            });
        }

        public get baseUri() {
            return this._baseUri + "/" + this.entityName;
        }
    }
}


text:
package com.a21vianet.wallet.vport.library.commom.http.vport;

import com.a21vianet.wallet.vport.library.commom.http.vport.bean.CertificationResult;
import com.google.gson.JsonObject;
import com.littlesparkle.growler.core.http.BaseHttpSubscriber;
import com.littlesparkle.growler.core.http.Request;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

public class VPortRequest extends Request<VPortRequest.VPortApi> {

    public VPortRequest() {
        super();
    }

    public VPortRequest(String url) {
        super(url);
    }

    @Override
    protected Class<VPortApi> getServiceClass() {
        return VPortApi.class;
    }

    /**
     * Vport 登录业务
     *
     * @param subscriber
     * @param userJWT
     * @return
     */
    public Subscription login(BaseHttpSubscriber<LoginResponse> subscriber, String userJWT) {

        JsonObject json = new JsonObject();
        json.addProperty("userJWT", userJWT);
        RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json" +
                "charset=utf-8"), json.toString());

        return mService.login(body)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .unsubscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }

    /**
     * Vport 声明业务
     *
     * @param subscriber
     * @param claimJWT
     * @return
     */
    public Subscription claim(BaseHttpSubscriber<ClaimResponse> subscriber, String claimJWT) {

        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("claimJWT", claimJWT);
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json" +
                "charset=utf-8"), jsonObject.toString());

        return mService.claim(requestBody)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .unsubscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }

    /**
     * 授权业务
     *
     * @param subscriber
     * @param authJWT
     * @return
     */
    public Subscription auth(BaseHttpSubscriber<AuthResponse> subscriber, String authJWT) {

        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("authorizationJWT", authJWT);
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json" +
                "charset=utf-8"), jsonObject.toString());

        return mService.authorizations(requestBody)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .unsubscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }

    /**
     * 获取 认证结果
     *
     * @param subscriber
     * @param tx
     * @return
     */
    public Subscription certificate(BaseHttpSubscriber<CertificationResult> subscriber, String tx) {

        JsonObject jsonObject = new JsonObject();
        jsonObject.addProperty("attestationJWT", tx);
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json" +
                "charset=utf-8"), jsonObject.toString());

        return mService.certificate(requestBody)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .unsubscribeOn(Schedulers.io())
                .subscribe(subscriber);
    }

    interface VPortApi {

        @POST("login/jwt")
        @Headers({"Content-Type: application/json"})
        Observable<LoginResponse> login(
                @Body RequestBody login
        );

        @POST("claims/add")
        @Headers({"Content-Type: application/json"})
        Observable<ClaimResponse> claim(
                @Body RequestBody claim
        );

        @POST("attestations")
        @Headers({"Content-Type: application/json"})
        Observable<CertificationResult> certificate(
                @Body RequestBody attestations
        );

        @POST("authorizations/jwt")
        @Headers({"Content-Type: application/json"})
        Observable<AuthResponse> authorizations(
                @Body RequestBody auth
        );
    }
}


text:
from itertools import chain
import warnings

import numpy as np
import scipy.sparse as sp
from scipy.linalg import pinv2

from sklearn.utils.testing import (assert_equal, assert_raises, assert_true,
                                   assert_almost_equal, assert_array_equal,
                                   SkipTest, assert_raises_regex,
                                   assert_greater_equal, ignore_warnings)
from sklearn.utils import check_random_state
from sklearn.utils import deprecated
from sklearn.utils import resample
from sklearn.utils import safe_mask
from sklearn.utils import column_or_1d
from sklearn.utils import safe_indexing
from sklearn.utils import shuffle
from sklearn.utils import gen_even_slices
from sklearn.utils.extmath import pinvh
from sklearn.utils.arpack import eigsh
from sklearn.utils.mocking import MockDataFrame
from sklearn.utils.graph import graph_laplacian

def test_make_rng():
    # Check the check_random_state utility function behavior
    assert_true(check_random_state(None) is np.random.mtrand._rand)
    assert_true(check_random_state(np.random) is np.random.mtrand._rand)

    rng_42 = np.random.RandomState(42)
    assert_true(check_random_state(42).randint(100) == rng_42.randint(100))

    rng_42 = np.random.RandomState(42)
    assert_true(check_random_state(rng_42) is rng_42)

    rng_42 = np.random.RandomState(42)
    assert_true(check_random_state(43).randint(100) != rng_42.randint(100))

    assert_raises(ValueError, check_random_state, "some invalid seed")

def test_deprecated():
    # Test whether the deprecated decorator issues appropriate warnings
    # Copied almost verbatim from http://docs.python.org/library/warnings.html

    # First a function...
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter("always")

        @deprecated()
        def ham():
            return "spam"

        spam = ham()

        assert_equal(spam, "spam")     # function must remain usable

        assert_equal(len(w), 1)
        assert_true(issubclass(w[0].category, DeprecationWarning))
        assert_true("deprecated" in str(w[0].message).lower())

    # ... then a class.
    with warnings.catch_warnings(record=True) as w:
        warnings.simplefilter("always")

        @deprecated("don't use this")
        class Ham(object):
            SPAM = 1

        ham = Ham()

        assert_true(hasattr(ham, "SPAM"))

        assert_equal(len(w), 1)
        assert_true(issubclass(w[0].category, DeprecationWarning))
        assert_true("deprecated" in str(w[0].message).lower())

def test_resample():
    # Border case not worth mentioning in doctests
    assert_true(resample() is None)

    # Check that invalid arguments yield ValueError
    assert_raises(ValueError, resample, [0], [0, 1])
    assert_raises(ValueError, resample, [0, 1], [0, 1],
                  replace=False, n_samples=3)
    assert_raises(ValueError, resample, [0, 1], [0, 1], meaning_of_life=42)
    # Issue:6581, n_samples can be more when replace is True (default).
    assert_equal(len(resample([1, 2], n_samples=5)), 5)

def test_safe_mask():
    random_state = check_random_state(0)
    X = random_state.rand(5, 4)
    X_csr = sp.csr_matrix(X)
    mask = [False, False, True, True, True]

    mask = safe_mask(X, mask)
    assert_equal(X[mask].shape[0], 3)

    mask = safe_mask(X_csr, mask)
    assert_equal(X_csr[mask].shape[0], 3)

@ignore_warnings  # Test deprecated backport to be removed in 0.21
def test_pinvh_simple_real():
    a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 10]], dtype=np.float64)
    a = np.dot(a, a.T)
    a_pinv = pinvh(a)
    assert_almost_equal(np.dot(a, a_pinv), np.eye(3))

@ignore_warnings  # Test deprecated backport to be removed in 0.21
def test_pinvh_nonpositive():
    a = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=np.float64)
    a = np.dot(a, a.T)
    u, s, vt = np.linalg.svd(a)
    s[0] *= -1
    a = np.dot(u * s, vt)  # a is now symmetric non-positive and singular
    a_pinv = pinv2(a)
    a_pinvh = pinvh(a)
    assert_almost_equal(a_pinv, a_pinvh)

@ignore_warnings  # Test deprecated backport to be removed in 0.21
def test_pinvh_simple_complex():
    a = (np.array([[1, 2, 3], [4, 5, 6], [7, 8, 10]])
         + 1j * np.array([[10, 8, 7], [6, 5, 4], [3, 2, 1]]))
    a = np.dot(a, a.conj().T)
    a_pinv = pinvh(a)
    assert_almost_equal(np.dot(a, a_pinv), np.eye(3))

@ignore_warnings  # Test deprecated backport to be removed in 0.21
def test_arpack_eigsh_initialization():
    # Non-regression test that shows null-space computation is better with
    # initialization of eigsh from [-1,1] instead of [0,1]
    random_state = check_random_state(42)

    A = random_state.rand(50, 50)
    A = np.dot(A.T, A)  # create s.p.d. matrix
    A = graph_laplacian(A) + 1e-7 * np.identity(A.shape[0])
    k = 5

    # Test if eigsh is working correctly
    # New initialization [-1,1] (as in original ARPACK)
    # Was [0,1] before, with which this test could fail
    v0 = random_state.uniform(-1, 1, A.shape[0])
    w, _ = eigsh(A, k=k, sigma=0.0, v0=v0)

    # Eigenvalues of s.p.d. matrix should be nonnegative, w[0] is smallest
    assert_greater_equal(w[0], 0)

def test_column_or_1d():
    EXAMPLES = [
        ("binary", ["spam", "egg", "spam"]),
        ("binary", [0, 1, 0, 1]),
        ("continuous", np.arange(10) / 20.),
        ("multiclass", [1, 2, 3]),
        ("multiclass", [0, 1, 2, 2, 0]),
        ("multiclass", [[1], [2], [3]]),
        ("multilabel-indicator", [[0, 1, 0], [0, 0, 1]]),
        ("multiclass-multioutput", [[1, 2, 3]]),
        ("multiclass-multioutput", [[1, 1], [2, 2], [3, 1]]),
        ("multiclass-multioutput", [[5, 1], [4, 2], [3, 1]]),
        ("multiclass-multioutput", [[1, 2, 3]]),
        ("continuous-multioutput", np.arange(30).reshape((-1, 3))),
    ]

    for y_type, y in EXAMPLES:
        if y_type in ["binary", 'multiclass', "continuous"]:
            assert_array_equal(column_or_1d(y), np.ravel(y))
        else:
            assert_raises(ValueError, column_or_1d, y)

def test_safe_indexing():
    X = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
    inds = np.array([1, 2])
    X_inds = safe_indexing(X, inds)
    X_arrays = safe_indexing(np.array(X), inds)
    assert_array_equal(np.array(X_inds), X_arrays)
    assert_array_equal(np.array(X_inds), np.array(X)[inds])

def test_safe_indexing_pandas():
    try:
        import pandas as pd
    except ImportError:
        raise SkipTest("Pandas not found")
    X = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
    X_df = pd.DataFrame(X)
    inds = np.array([1, 2])
    X_df_indexed = safe_indexing(X_df, inds)
    X_indexed = safe_indexing(X_df, inds)
    assert_array_equal(np.array(X_df_indexed), X_indexed)
    # fun with read-only data in dataframes
    # this happens in joblib memmapping
    X.setflags(write=False)
    X_df_readonly = pd.DataFrame(X)
    with warnings.catch_warnings(record=True):
        X_df_ro_indexed = safe_indexing(X_df_readonly, inds)

    assert_array_equal(np.array(X_df_ro_indexed), X_indexed)

def test_safe_indexing_mock_pandas():
    X = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
    X_df = MockDataFrame(X)
    inds = np.array([1, 2])
    X_df_indexed = safe_indexing(X_df, inds)
    X_indexed = safe_indexing(X_df, inds)
    assert_array_equal(np.array(X_df_indexed), X_indexed)

def test_shuffle_on_ndim_equals_three():
    def to_tuple(A):    # to make the inner arrays hashable
        return tuple(tuple(tuple(C) for C in B) for B in A)

    A = np.array([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])  # A.shape = (2,2,2)
    S = set(to_tuple(A))
    shuffle(A)  # shouldn't raise a ValueError for dim = 3
    assert_equal(set(to_tuple(A)), S)

def test_shuffle_dont_convert_to_array():
    # Check that shuffle does not try to convert to numpy arrays with float
    # dtypes can let any indexable datastructure pass-through.
    a = ['a', 'b', 'c']
    b = np.array(['a', 'b', 'c'], dtype=object)
    c = [1, 2, 3]
    d = MockDataFrame(np.array([['a', 0],
                                ['b', 1],
                                ['c', 2]],
                      dtype=object))
    e = sp.csc_matrix(np.arange(6).reshape(3, 2))
    a_s, b_s, c_s, d_s, e_s = shuffle(a, b, c, d, e, random_state=0)

    assert_equal(a_s, ['c', 'b', 'a'])
    assert_equal(type(a_s), list)

    assert_array_equal(b_s, ['c', 'b', 'a'])
    assert_equal(b_s.dtype, object)

    assert_equal(c_s, [3, 2, 1])
    assert_equal(type(c_s), list)

    assert_array_equal(d_s, np.array([['c', 2],
                                      ['b', 1],
                                      ['a', 0]],
                                     dtype=object))
    assert_equal(type(d_s), MockDataFrame)

    assert_array_equal(e_s.toarray(), np.array([[4, 5],
                                                [2, 3],
                                                [0, 1]]))

def test_gen_even_slices():
    # check that gen_even_slices contains all samples
    some_range = range(10)
    joined_range = list(chain(*[some_range[slice] for slice in
                                gen_even_slices(10, 3)]))
    assert_array_equal(some_range, joined_range)

    # check that passing negative n_chunks raises an error
    slices = gen_even_slices(10, -1)
    assert_raises_regex(ValueError, "gen_even_slices got n_packs=-1, must be"
                        " >=1", next, slices)


text:
/**
 * Created by Sam on 4/20/2015.
 */

Template.messageItem.helpers({
    prettyDate: function() {
        return this.createdDate.toLocaleTimeString() + ", " + this.createdDate.toDateString();
    }
});


text:
/*
 * This file is subject to the terms of the GFX License. If a copy of
 * the license was not distributed with this file, you can obtain one at:
 *
 *              http://ugfx.org/license.html
 */

/**
 * @file    src/ginput/ginput_driver_dial.h
 * @brief   GINPUT header file for dial drivers.
 *
 * @defgroup Dial Dial
 * @ingroup GINPUT
 * @{
 */

#ifndef _LLD_GINPUT_DIAL_H
#define _LLD_GINPUT_DIAL_H

#if GINPUT_NEED_DIAL || defined(__DOXYGEN__)

#include "ginput_lld_dial_config.h"

typedef void (*DialCallbackFn)(uint16_t instance, uint16_t rawvalue);

/*===========================================================================*/
/* External declarations.                                                    */
/*===========================================================================*/

#ifdef __cplusplus
extern "C" {
#endif

	void ginput_lld_dial_init(void);
	void ginput_lld_dial_poll(DialCallbackFn fn);

#ifdef __cplusplus
}
#endif

#endif /* GFX_USE_GINPUT && GINPUT_NEED_TOGGLE */

#endif /* _LLD_GINPUT_TOGGLE_H */
/** @} */


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('ik_events_todays_occurrences', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='todaysoccurrences',
            name='fall_back_to_next_day',
            field=models.BooleanField(default=True, help_text=b"if there are no events to show on a day, show the next day's instead."),
        ),
        migrations.AddField(
            model_name='todaysoccurrences',
            name='title',
            field=models.CharField(max_length=255, help_text=b'Title to show. Natural date is appended.', blank=True),
        ),
    ]


text:
var _ = require('./index')
var config = require('../config')
var extend = _.extend

/**
 * Option overwriting strategies are functions that handle
 * how to merge a parent option value and a child option
 * value into the final value.
 *
 * All strategy functions follow the same signature:
 *
 * @param {*} parentVal
 * @param {*} childVal
 * @param {Vue} [vm]
 */

var strats = config.optionMergeStrategies = Object.create(null)

/**
 * Helper that recursively merges two data objects together.
 */

function mergeData (to, from) {
  var key, toVal, fromVal
  for (key in from) {
    toVal = to[key]
    fromVal = from[key]
    if (!to.hasOwnProperty(key)) {
      to.$add(key, fromVal)
    } else if (_.isObject(toVal) && _.isObject(fromVal)) {
      mergeData(toVal, fromVal)
    }
  }
  return to
}

/**
 * Data
 */

strats.data = function (parentVal, childVal, vm) {
  if (!vm) {
    // in a Vue.extend merge, both should be functions
    if (!childVal) {
      return parentVal
    }
    if (typeof childVal !== 'function') {
      process.env.NODE_ENV !== 'production' && _.warn(
        'The "data" option should be a function ' +
        'that returns a per-instance value in component ' +
        'definitions.'
      )
      return parentVal
    }
    if (!parentVal) {
      return childVal
    }
    // when parentVal & childVal are both present,
    // we need to return a function that returns the
    // merged result of both functions... no need to
    // check if parentVal is a function here because
    // it has to be a function to pass previous merges.
    return function mergedDataFn () {
      return mergeData(
        childVal.call(this),
        parentVal.call(this)
      )
    }
  } else if (parentVal || childVal) {
    return function mergedInstanceDataFn () {
      // instance merge
      var instanceData = typeof childVal === 'function'
        ? childVal.call(vm)
        : childVal
      var defaultData = typeof parentVal === 'function'
        ? parentVal.call(vm)
        : undefined
      if (instanceData) {
        return mergeData(instanceData, defaultData)
      } else {
        return defaultData
      }
    }
  }
}

/**
 * El
 */

strats.el = function (parentVal, childVal, vm) {
  if (!vm && childVal && typeof childVal !== 'function') {
    process.env.NODE_ENV !== 'production' && _.warn(
      'The "el" option should be a function ' +
      'that returns a per-instance value in component ' +
      'definitions.'
    )
    return
  }
  var ret = childVal || parentVal
  // invoke the element factory if this is instance merge
  return vm && typeof ret === 'function'
    ? ret.call(vm)
    : ret
}

/**
 * Hooks and param attributes are merged as arrays.
 */

strats.created =
strats.ready =
strats.attached =
strats.detached =
strats.beforeCompile =
strats.compiled =
strats.beforeDestroy =
strats.destroyed =
strats.props = function (parentVal, childVal) {
  return childVal
    ? parentVal
      ? parentVal.concat(childVal)
      : _.isArray(childVal)
        ? childVal
        : [childVal]
    : parentVal
}

/**
 * 0.11 deprecation warning
 */

strats.paramAttributes = function () {
  /* istanbul ignore next */
  process.env.NODE_ENV !== 'production' && _.warn(
    '"paramAttributes" option has been deprecated in 0.12. ' +
    'Use "props" instead.'
  )
}

/**
 * Assets
 *
 * When a vm is present (instance creation), we need to do
 * a three-way merge between constructor options, instance
 * options and parent options.
 */

function mergeAssets (parentVal, childVal) {
  var res = Object.create(parentVal)
  return childVal
    ? extend(res, guardArrayAssets(childVal))
    : res
}

config._assetTypes.forEach(function (type) {
  strats[type + 's'] = mergeAssets
})

/**
 * Events & Watchers.
 *
 * Events & watchers hashes should not overwrite one
 * another, so we merge them as arrays.
 */

strats.watch =
strats.events = function (parentVal, childVal) {
  if (!childVal) return parentVal
  if (!parentVal) return childVal
  var ret = {}
  extend(ret, parentVal)
  for (var key in childVal) {
    var parent = ret[key]
    var child = childVal[key]
    if (parent && !_.isArray(parent)) {
      parent = [parent]
    }
    ret[key] = parent
      ? parent.concat(child)
      : [child]
  }
  return ret
}

/**
 * Other object hashes.
 */

strats.methods =
strats.computed = function (parentVal, childVal) {
  if (!childVal) return parentVal
  if (!parentVal) return childVal
  var ret = Object.create(parentVal)
  extend(ret, childVal)
  return ret
}

/**
 * Default strategy.
 */

var defaultStrat = function (parentVal, childVal) {
  return childVal === undefined
    ? parentVal
    : childVal
}

/**
 * Make sure component options get converted to actual
 * constructors.
 *
 * @param {Object} options
 */

function guardComponents (options) {
  if (options.components) {
    var components = options.components =
      guardArrayAssets(options.components)
    var def
    var ids = Object.keys(components)
    for (var i = 0, l = ids.length; i < l; i++) {
      var key = ids[i]
      if (_.commonTagRE.test(key)) {
        process.env.NODE_ENV !== 'production' && _.warn(
          'Do not use built-in HTML elements as component ' +
          'id: ' + key
        )
        continue
      }
      def = components[key]
      if (_.isPlainObject(def)) {
        def.id = def.id || key
        components[key] = def._Ctor || (def._Ctor = _.Vue.extend(def))
      }
    }
  }
}

/**
 * Ensure all props option syntax are normalized into the
 * Object-based format.
 *
 * @param {Object} options
 */

function guardProps (options) {
  var props = options.props
  if (_.isPlainObject(props)) {
    options.props = Object.keys(props).map(function (key) {
      var val = props[key]
      if (!_.isPlainObject(val)) {
        val = { type: val }
      }
      val.name = key
      return val
    })
  } else if (_.isArray(props)) {
    options.props = props.map(function (prop) {
      return typeof prop === 'string'
        ? { name: prop }
        : prop
    })
  }
}

/**
 * Guard an Array-format assets option and converted it
 * into the key-value Object format.
 *
 * @param {Object|Array} assets
 * @return {Object}
 */

function guardArrayAssets (assets) {
  if (_.isArray(assets)) {
    var res = {}
    var i = assets.length
    var asset
    while (i--) {
      asset = assets[i]
      var id = asset.id || (asset.options && asset.options.id)
      if (!id) {
        process.env.NODE_ENV !== 'production' && _.warn(
          'Array-syntax assets must provide an id field.'
        )
      } else {
        res[id] = asset
      }
    }
    return res
  }
  return assets
}

/**
 * Merge two option objects into a new one.
 * Core utility used in both instantiation and inheritance.
 *
 * @param {Object} parent
 * @param {Object} child
 * @param {Vue} [vm] - if vm is present, indicates this is
 *                     an instantiation merge.
 */

exports.mergeOptions = function merge (parent, child, vm) {
  guardComponents(child)
  guardProps(child)
  var options = {}
  var key
  if (child.mixins) {
    for (var i = 0, l = child.mixins.length; i < l; i++) {
      parent = merge(parent, child.mixins[i], vm)
    }
  }
  for (key in parent) {
    mergeField(key)
  }
  for (key in child) {
    if (!(parent.hasOwnProperty(key))) {
      mergeField(key)
    }
  }
  function mergeField (key) {
    var strat = strats[key] || defaultStrat
    options[key] = strat(parent[key], child[key], vm, key)
  }
  return options
}

/**
 * Resolve an asset.
 * This function is used because child instances need access
 * to assets defined in its ancestor chain.
 *
 * @param {Object} options
 * @param {String} type
 * @param {String} id
 * @return {Object|Function}
 */

exports.resolveAsset = function resolve (options, type, id) {
  var camelizedId = _.camelize(id)
  var pascalizedId = camelizedId.charAt(0).toUpperCase() + camelizedId.slice(1)
  var assets = options[type]
  var asset = assets[id] || assets[camelizedId] || assets[pascalizedId]
  while (
    !asset &&
    options._parent &&
    (!config.strict || options._repeat)
  ) {
    options = (options._context || options._parent).$options
    assets = options[type]
    asset = assets[id] || assets[camelizedId] || assets[pascalizedId]
  }
  return asset
}


text:
package org.apache.spark.rdd

import org.apache.spark.annotation.Experimental
import org.apache.spark.{TaskContext, Logging}
import org.apache.spark.partial.BoundedDouble
import org.apache.spark.partial.MeanEvaluator
import org.apache.spark.partial.PartialResult
import org.apache.spark.partial.SumEvaluator
import org.apache.spark.util.StatCounter

/**
 * Extra functions available on RDDs of Doubles through an implicit conversion.
 */
class DoubleRDDFunctions(self: RDD[Double]) extends Logging with Serializable {
  /** Add up the elements in this RDD. */
  def sum(): Double = {
    self.reduce(_ + _)
  }

  /**
   * Return a [[org.apache.spark.util.StatCounter]] object that captures the mean, variance and
   * count of the RDD's elements in one operation.
   */
  def stats(): StatCounter = {
    self.mapPartitions(nums => Iterator(StatCounter(nums))).reduce((a, b) => a.merge(b))
  }

  /** Compute the mean of this RDD's elements. */
  def mean(): Double = stats().mean

  /** Compute the variance of this RDD's elements. */
  def variance(): Double = stats().variance

  /** Compute the standard deviation of this RDD's elements. */
  def stdev(): Double = stats().stdev

  /**
   * Compute the sample standard deviation of this RDD's elements (which corrects for bias in
   * estimating the standard deviation by dividing by N-1 instead of N).
   */
  def sampleStdev(): Double = stats().sampleStdev

  /**
   * Compute the sample variance of this RDD's elements (which corrects for bias in
   * estimating the variance by dividing by N-1 instead of N).
   */
  def sampleVariance(): Double = stats().sampleVariance

  /**
   * :: Experimental ::
   * Approximate operation to return the mean within a timeout.
   */
  @Experimental
  def meanApprox(timeout: Long, confidence: Double = 0.95): PartialResult[BoundedDouble] = {
    val processPartition = (ctx: TaskContext, ns: Iterator[Double]) => StatCounter(ns)
    val evaluator = new MeanEvaluator(self.partitions.size, confidence)
    self.context.runApproximateJob(self, processPartition, evaluator, timeout)
  }

  /**
   * :: Experimental ::
   * Approximate operation to return the sum within a timeout.
   */
  @Experimental
  def sumApprox(timeout: Long, confidence: Double = 0.95): PartialResult[BoundedDouble] = {
    val processPartition = (ctx: TaskContext, ns: Iterator[Double]) => StatCounter(ns)
    val evaluator = new SumEvaluator(self.partitions.size, confidence)
    self.context.runApproximateJob(self, processPartition, evaluator, timeout)
  }

  /**
   * Compute a histogram of the data using bucketCount number of buckets evenly
   *  spaced between the minimum and maximum of the RDD. For example if the min
   *  value is 0 and the max is 100 and there are two buckets the resulting
   *  buckets will be [0, 50) [50, 100]. bucketCount must be at least 1
   * If the RDD contains infinity, NaN throws an exception
   * If the elements in RDD do not vary (max == min) always returns a single bucket.
   */
  def histogram(bucketCount: Int): Pair[Array[Double], Array[Long]] = {
    // Scala's built-in range has issues. See #SI-8782
    def customRange(min: Double, max: Double, steps: Int): IndexedSeq[Double] = {
      val span = max - min
      Range.Int(0, steps, 1).map(s => min + (s * span) / steps) :+ max
    }
    // Compute the minimum and the maximum
    val (max: Double, min: Double) = self.mapPartitions { items =>
      Iterator(items.foldRight(Double.NegativeInfinity,
        Double.PositiveInfinity)((e: Double, x: Pair[Double, Double]) =>
        (x._1.max(e), x._2.min(e))))
    }.reduce { (maxmin1, maxmin2) =>
      (maxmin1._1.max(maxmin2._1), maxmin1._2.min(maxmin2._2))
    }
    if (min.isNaN || max.isNaN || max.isInfinity || min.isInfinity ) {
      throw new UnsupportedOperationException(
        "Histogram on either an empty RDD or RDD containing +/-infinity or NaN")
    }
    val range = if (min != max) {
      // Range.Double.inclusive(min, max, increment)
      // The above code doesn't always work. See Scala bug #SI-8782.
      // https://issues.scala-lang.org/browse/SI-8782
      customRange(min, max, bucketCount)
    } else {
      List(min, min)
    }
    val buckets = range.toArray
    (buckets, histogram(buckets, true))
  }

  /**
   * Compute a histogram using the provided buckets. The buckets are all open
   * to the right except for the last which is closed
   *  e.g. for the array
   *  [1, 10, 20, 50] the buckets are [1, 10) [10, 20) [20, 50]
   *  e.g 1<=x<10 , 10<=x<20, 20<=x<=50
   *  And on the input of 1 and 50 we would have a histogram of 1, 0, 1
   *
   * Note: if your histogram is evenly spaced (e.g. [0, 10, 20, 30]) this can be switched
   * from an O(log n) inseration to O(1) per element. (where n = # buckets) if you set evenBuckets
   * to true.
   * buckets must be sorted and not contain any duplicates.
   * buckets array must be at least two elements
   * All NaN entries are treated the same. If you have a NaN bucket it must be
   * the maximum value of the last position and all NaN entries will be counted
   * in that bucket.
   */
  def histogram(buckets: Array[Double], evenBuckets: Boolean = false): Array[Long] = {
    if (buckets.length < 2) {
      throw new IllegalArgumentException("buckets array must have at least two elements")
    }
    // The histogramPartition function computes the partail histogram for a given
    // partition. The provided bucketFunction determines which bucket in the array
    // to increment or returns None if there is no bucket. This is done so we can
    // specialize for uniformly distributed buckets and save the O(log n) binary
    // search cost.
    def histogramPartition(bucketFunction: (Double) => Option[Int])(iter: Iterator[Double]):
        Iterator[Array[Long]] = {
      val counters = new Array[Long](buckets.length - 1)
      while (iter.hasNext) {
        bucketFunction(iter.next()) match {
          case Some(x: Int) => {counters(x) += 1}
          case _ => {}
        }
      }
      Iterator(counters)
    }
    // Merge the counters.
    def mergeCounters(a1: Array[Long], a2: Array[Long]): Array[Long] = {
      a1.indices.foreach(i => a1(i) += a2(i))
      a1
    }
    // Basic bucket function. This works using Java's built in Array
    // binary search. Takes log(size(buckets))
    def basicBucketFunction(e: Double): Option[Int] = {
      val location = java.util.Arrays.binarySearch(buckets, e)
      if (location < 0) {
        // If the location is less than 0 then the insertion point in the array
        // to keep it sorted is -location-1
        val insertionPoint = -location-1
        // If we have to insert before the first element or after the last one
        // its out of bounds.
        // We do this rather than buckets.lengthCompare(insertionPoint)
        // because Array[Double] fails to override it (for now).
        if (insertionPoint > 0 && insertionPoint < buckets.length) {
          Some(insertionPoint-1)
        } else {
          None
        }
      } else if (location < buckets.length - 1) {
        // Exact match, just insert here
        Some(location)
      } else {
        // Exact match to the last element
        Some(location - 1)
      }
    }
    // Determine the bucket function in constant time. Requires that buckets are evenly spaced
    def fastBucketFunction(min: Double, increment: Double, count: Int)(e: Double): Option[Int] = {
      // If our input is not a number unless the increment is also NaN then we fail fast
      if (e.isNaN()) {
        return None
      }
      val bucketNumber = (e - min)/(increment)
      // We do this rather than buckets.lengthCompare(bucketNumber)
      // because Array[Double] fails to override it (for now).
      if (bucketNumber > count || bucketNumber < 0) {
        None
      } else {
        Some(bucketNumber.toInt.min(count - 1))
      }
    }
    // Decide which bucket function to pass to histogramPartition. We decide here
    // rather than having a general function so that the decission need only be made
    // once rather than once per shard
    val bucketFunction = if (evenBuckets) {
      fastBucketFunction(buckets(0), buckets(1)-buckets(0), buckets.length-1) _
    } else {
      basicBucketFunction _
    }
    self.mapPartitions(histogramPartition(bucketFunction)).reduce(mergeCounters)
  }

}


text:
//==================================================================================
// Copyright (c) 2016 , Advanced Micro Devices, Inc.  All rights reserved.
//
/// \author AMD Developer Tools Team
/// \file csMonitoredFunctionPointers.h
///
//==================================================================================

//------------------------------ csMonitoredFunctionPointers.h ------------------------------

#ifndef __CSMONITOREDFUNCTIONPOINTERS_H
#define __CSMONITOREDFUNCTIONPOINTERS_H

// Forward declarations:
typedef struct _cl_icd_dispatch_table cl_icd_dispatch_table;

// Infra:
#include <AMDTBaseTools/Include/AMDTDefinitions.h>

// OpenCL and OpenGL:
#include <AMDTOSAPIWrappers/Include/oaOpenGLIncludes.h>
#include <AMDTOSAPIWrappers/Include/oaOpenCLIncludes.h>
#if !((AMDT_BUILD_TARGET == AMDT_LINUX_OS) && (AMDT_LINUX_VARIANT == AMDT_MAC_OS_X_LINUX_VARIANT))
    // Mac has its own version of cl_gl (GROSWrappers/CL/mac/CL/OpenCL/cl_gl.h), which is included in osOpenCLIncludes.h
    #include <CL/cl_gl.h>
#endif

// ----------------------------------------------------------------------------------
// Struct Name:          csMonitoredFunctionPointers
//
// General Description:
//  Contains pointers to the real implementation of the wrapped functions, extension pointers, etc.
//
// Author:               Yaki Tebeka
// Creation Date:        29/10/2009
// ----------------------------------------------------------------------------------
struct csMonitoredFunctionPointers
{
    // OpenCL base functions:
    cl_int(CL_API_CALL* clGetPlatformIDs)(cl_uint num_entries, cl_platform_id* platforms, cl_uint* num_platforms);
    cl_int(CL_API_CALL* clGetPlatformInfo)(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // Device APIs
    cl_int(CL_API_CALL* clGetDeviceIDs)(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices);
    cl_int(CL_API_CALL* clGetDeviceInfo)(cl_device_id device, cl_device_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // SubDevices:
    cl_int(CL_API_CALL* clCreateSubDevices)(cl_device_id in_device, const cl_device_partition_property* properties, cl_uint num_devices, cl_device_id* out_devices, cl_uint* num_devices_ret);
    cl_int(CL_API_CALL* clRetainDevice)(cl_device_id device);
    cl_int(CL_API_CALL* clReleaseDevice)(cl_device_id device);

    // Context APIs
#if (AMDT_BUILD_TARGET == AMDT_LINUX_OS) && (AMDT_LINUX_VARIANT == AMDT_MAC_OS_X_LINUX_VARIANT)
    cl_context(CL_API_CALL* clCreateContext)(cl_context_properties* properties, cl_uint num_devices, const cl_device_id* devices,
                                             void (*pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret);

    cl_context(CL_API_CALL* clCreateContextFromType)(cl_context_properties* properties, cl_device_type device_type, void (*pfn_notify)(const char*, const void*, size_t, void*),
                                                     void* user_data, cl_int* errcode_ret);
#else
    cl_context(CL_API_CALL* clCreateContext)(const cl_context_properties* properties, cl_uint num_devices, const cl_device_id* devices,
                                             void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret);

    cl_context(CL_API_CALL* clCreateContextFromType)(const cl_context_properties* properties, cl_device_type device_type, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*),
                                                     void* user_data, cl_int* errcode_ret);
#endif

    cl_int(CL_API_CALL* clRetainContext)(cl_context context);

    cl_int(CL_API_CALL* clReleaseContext)(cl_context context);

    cl_int(CL_API_CALL* clGetContextInfo)(cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // Command Queue APIs
    cl_command_queue(CL_API_CALL* clCreateCommandQueue)(cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret);

    cl_int(CL_API_CALL* clRetainCommandQueue)(cl_command_queue command_queue);

    cl_int(CL_API_CALL* clReleaseCommandQueue)(cl_command_queue command_queue);

    cl_int(CL_API_CALL* clGetCommandQueueInfo)(cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    cl_int(CL_API_CALL* clSetCommandQueueProperty)(cl_command_queue command_queue, cl_command_queue_properties properties, cl_bool enable, cl_command_queue_properties* old_properties);

    // Memory Object APIs
    cl_mem(CL_API_CALL* clCreateBuffer)(cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int* errcode_ret);

    cl_mem(CL_API_CALL* clCreateSubBuffer)(cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const void* buffer_create_info, cl_int* errcode_ret);

    cl_mem(CL_API_CALL* clCreateImage)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, const cl_image_desc* image_desc, void* host_ptr, cl_int* errcode_ret);

    cl_mem(CL_API_CALL* clCreateImage2D)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void* host_ptr, cl_int* errcode_ret);

    cl_mem(CL_API_CALL* clCreateImage3D)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void* host_ptr, cl_int* errcode_ret);

    cl_int(CL_API_CALL* clRetainMemObject)(cl_mem memobj);

    cl_int(CL_API_CALL* clReleaseMemObject)(cl_mem memobj);

    cl_int(CL_API_CALL* clGetSupportedImageFormats)(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format* image_formats, cl_uint* num_image_formats);

    cl_int(CL_API_CALL* clGetMemObjectInfo)(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    cl_int(CL_API_CALL* clGetImageInfo)(cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    cl_int(CL_API_CALL* clSetMemObjectDestructorCallback)(cl_mem memobj, void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), void* user_data);

    // Sampler APIs
    cl_sampler(CL_API_CALL* clCreateSampler)(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int* errcode_ret);

    cl_int(CL_API_CALL* clRetainSampler)(cl_sampler sampler);

    cl_int(CL_API_CALL* clReleaseSampler)(cl_sampler sampler);

    cl_int(CL_API_CALL* clGetSamplerInfo)(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // Program Object APIs
    cl_program(CL_API_CALL* clCreateProgramWithSource)(cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret);

    cl_program(CL_API_CALL* clCreateProgramWithBinary)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const size_t* lengths, const unsigned char** binaries,
                                                       cl_int* binary_status, cl_int* errcode_ret);

    cl_program(CL_API_CALL* clCreateProgramWithBuiltInKernels)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* kernel_names, cl_int* errcode_ret);

    cl_int(CL_API_CALL* clRetainProgram)(cl_program program);
    cl_int(CL_API_CALL* clReleaseProgram)(cl_program program);
    cl_int(CL_API_CALL* clBuildProgram)(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options,
                                        void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data);

    cl_int(CL_API_CALL* clCompileProgram)(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_headers,
                                          const cl_program* input_headers, const char** header_include_names,
                                          void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data);

    cl_program(CL_API_CALL* clLinkProgram)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* options,
                                           cl_uint num_input_programs, const cl_program* input_programs,
                                           void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data),
                                           void* user_data, cl_int* errcode_ret);

    cl_int(CL_API_CALL* clUnloadPlatformCompiler)(cl_platform_id platform);
    cl_int(CL_API_CALL* clUnloadCompiler)(void) ;
    cl_int(CL_API_CALL* clGetProgramInfo)(cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);
    cl_int(CL_API_CALL* clGetProgramBuildInfo)(cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // Kernel Object APIs
    cl_kernel(CL_API_CALL* clCreateKernel)(cl_program program, const char* kernel_name, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clCreateKernelsInProgram)(cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret);
    cl_int(CL_API_CALL* clRetainKernel)(cl_kernel kernel);
    cl_int(CL_API_CALL* clReleaseKernel)(cl_kernel kernel);
    cl_int(CL_API_CALL* clSetKernelArg)(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value);
    cl_int(CL_API_CALL* clGetKernelInfo)(cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);
    cl_int(CL_API_CALL* clGetKernelArgInfo)(cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    cl_int(CL_API_CALL* clGetKernelWorkGroupInfo)(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // Event Object APIs
    cl_int(CL_API_CALL* clWaitForEvents)(cl_uint num_events, const cl_event* event_list);
    cl_int(CL_API_CALL* clGetEventInfo)(cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);
    cl_event(CL_API_CALL* clCreateUserEvent)(cl_context context, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clRetainEvent)(cl_event event);
    cl_int(CL_API_CALL* clReleaseEvent)(cl_event event);
    cl_int(CL_API_CALL* clSetUserEventStatus)(cl_event event, cl_int execution_status);
    cl_int(CL_API_CALL* clSetEventCallback)(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK* pfn_notify)(cl_event, cl_int, void*), void* user_data);

    // Profiling APIs
    cl_int(CL_API_CALL* clGetEventProfilingInfo)(cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    // Flush and Finish APIs
    cl_int(CL_API_CALL* clFlush)(cl_command_queue command_queue);
    cl_int(CL_API_CALL* clFinish)(cl_command_queue command_queue);

    // Enqueued Commands APIs
    cl_int(CL_API_CALL* clEnqueueReadBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t cb, void* ptr, cl_uint num_events_in_wait_list,
                                             const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueReadBufferRect)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, const size_t* buffer_origin,
                                                 const size_t* host_origin, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch,
                                                 size_t host_row_pitch, size_t host_slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list,
                                                 cl_event* event);

    cl_int(CL_API_CALL* clEnqueueWriteBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t cb, const void* ptr,
                                              cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueWriteBufferRect)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, const size_t* buffer_origin,
                                                  const size_t* host_origin,  const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch,
                                                  size_t host_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueFillBuffer)(cl_command_queue command_queue, cl_mem buffer, const void* pattern, size_t pattern_size, size_t offset, size_t size,
                                             cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueCopyBuffer)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t cb,
                                             cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueCopyBufferRect)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, const size_t* src_origin, const size_t* dst_origin,
                                                 const size_t* region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch,
                                                 cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) ;

    cl_int(CL_API_CALL* clEnqueueReadImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t* origin/*[3]*/, const size_t* region/*[3]*/, size_t row_pitch,
                                            size_t slice_pitch, void* ptr, cl_uint num_events_in_wait_list,    const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueWriteImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t* origin/*[3]*/, const size_t* region/*[3]*/,
                                             size_t input_row_pitch, size_t input_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueFillImage)(cl_command_queue command_queue, cl_mem image, const void* fill_color, const size_t* origin, const size_t* region,
                                            cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueCopyImage)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t* src_origin/*[3]*/, const size_t* dst_origin/*[3]*/, const size_t* region/*[3]*/,
                                            cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueCopyImageToBuffer)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t* src_origin/*[3]*/, const size_t* region/*[3]*/,
                                                    size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueCopyBufferToImage)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t* dst_origin/*[3]*/,
                                                    const size_t* region/*[3]*/, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    void* (CL_API_CALL* clEnqueueMapBuffer)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset,
                                            size_t cb, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret);

    void* (CL_API_CALL* clEnqueueMapImage)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t* origin/*[3]*/, const size_t* region/*[3]*/,
                                           size_t* image_row_pitch, size_t* image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret);

    cl_int(CL_API_CALL* clEnqueueUnmapMemObject)(cl_command_queue command_queue, cl_mem memobj, void* mapped_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueMigrateMemObjects)(cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_mem_migration_flags flags,
                                                    cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueNDRangeKernel)(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, const size_t* local_work_size,
                                                cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueTask)(cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueNativeKernel)(cl_command_queue command_queue, void (CL_CALLBACK* user_func)(void*), void* args, size_t cb_args, cl_uint num_mem_objects, const cl_mem* mem_list,
                                               const void** args_mem_loc, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clEnqueueMarkerWithWaitList)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueBarrierWithWaitList)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clSetPrintfCallback)(cl_context context, void (CL_CALLBACK* pfn_notify)(cl_context program, cl_uint printf_data_len, char* printf_data_ptr, void* user_data), void* user_data);

    void* (CL_API_CALL* clGetExtensionFunctionAddressForPlatform)(cl_platform_id platform, const char* func_name);

    cl_int(CL_API_CALL* clEnqueueMarker)(cl_command_queue command_queue, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueWaitForEvents)(cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list);
    cl_int(CL_API_CALL* clEnqueueBarrier)(cl_command_queue command_queue);

    void* (CL_API_CALL* clGetExtensionFunctionAddress)(const char* func_name);

    ////////////////////////////////////////////////////////////////////////////
    // cl_gl
    ////////////////////////////////////////////////////////////////////////////
    cl_mem(CL_API_CALL* clCreateFromGLBuffer)(cl_context context, cl_mem_flags flags, GLuint bufobj, int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromGLTexture)(cl_context context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texture, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromGLTexture2D)(cl_context context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texture, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromGLTexture3D)(cl_context context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texture, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromGLRenderbuffer)(cl_context context, cl_mem_flags flags, GLuint renderbuffer, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clGetGLObjectInfo)(cl_mem memobj, cl_gl_object_type* gl_object_type, GLuint* gl_object_name);
    cl_int(CL_API_CALL* clGetGLTextureInfo)(cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);
    cl_int(CL_API_CALL* clEnqueueAcquireGLObjects)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueReleaseGLObjects)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    cl_int(CL_API_CALL* clGetGLContextInfoKHR)(const cl_context_properties* properties, cl_gl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);

    //////////////////////////////////////////////////////////////////////////
    // OpenCL 2.0
    //////////////////////////////////////////////////////////////////////////
    cl_command_queue(CL_API_CALL* clCreateCommandQueueWithProperties)(cl_context context, cl_device_id device, const cl_queue_properties* properties, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreatePipe)(cl_context context, cl_mem_flags flags, cl_uint pipe_packet_size, cl_uint pipe_max_packets, const cl_pipe_properties* properties, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clGetPipeInfo)(cl_mem pipe, cl_pipe_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret);
    void* (CL_API_CALL* clSVMAlloc)(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment);
    void(CL_API_CALL* clSVMFree)(cl_context context, void* svm_pointer);
    cl_sampler(CL_API_CALL* clCreateSamplerWithProperties)(cl_context context, const cl_sampler_properties* normalized_coords, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clSetKernelArgSVMPointer)(cl_kernel kernel, cl_uint arg_index, const void* arg_value);
    cl_int(CL_API_CALL* clSetKernelExecInfo)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value);
    cl_int(CL_API_CALL* clEnqueueSVMFree)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[],
                                          void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data),
                                          void* user_data, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueSVMMemcpy)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueSVMMemFill)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueSVMMap)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void* svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueSVMUnmap)(cl_command_queue command_queue, void* svm_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);

    ////////////////////////////////////////////////////////////////////////////
    // cl_amd_computation_frame
    ////////////////////////////////////////////////////////////////////////////
    cl_int(CL_API_CALL* clBeginComputationFrameAMD)(cl_context context);
    cl_int(CL_API_CALL* clEndComputationFrameAMD)(cl_context context);

    ////////////////////////////////////////////////////////////////////////////
    // cl_amd_object_naming
    ////////////////////////////////////////////////////////////////////////////
    cl_int(CL_API_CALL* clNameContextAMD)(cl_context context, const char* name, size_t length);
    cl_int(CL_API_CALL* clNameCommandQueueAMD)(cl_command_queue command_queue, const char* name, size_t length);
    cl_int(CL_API_CALL* clNameMemObjectAMD)(cl_mem memobj, const char* name, size_t length);
    cl_int(CL_API_CALL* clNameSamplerAMD)(cl_sampler sampler, const char* name, size_t length);
    cl_int(CL_API_CALL* clNameProgramAMD)(cl_program program, const char* name, size_t length);
    cl_int(CL_API_CALL* clNameKernelAMD)(cl_kernel kernel, const char* name, size_t length);
    cl_int(CL_API_CALL* clNameEventAMD)(cl_event event,  const char* name, size_t length);

    ///////////////////////////////////////////////////////////////////////////
    // cl_gl_ext:
    ///////////////////////////////////////////////////////////////////////////
    cl_event(CL_API_CALL* clCreateEventFromGLsyncKHR)(cl_context context, cl_GLsync cl_GLsync, cl_int* errcode_ret);

    ///////////////////////////////////////////////////////////////////////////
    // cl_khr_dx9_media_sharing:
    ///////////////////////////////////////////////////////////////////////////
#if AMDT_BUILD_TARGET == AMDT_WINDOWS_OS
    cl_int(CL_API_CALL* clGetDeviceIDsFromDX9MediaAdapterKHR)(cl_platform_id platform, cl_uint num_media_adapters, cl_dx9_media_adapter_type_khr* media_adapter_type, void* media_adapters, cl_dx9_media_adapter_set_khr media_adapter_set, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices);
    cl_mem(CL_API_CALL* clCreateFromDX9MediaSurfaceKHR)(cl_context context, cl_mem_flags flags, cl_dx9_media_adapter_type_khr adapter_type, void* surface_info, cl_uint plane, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clEnqueueAcquireDX9MediaSurfacesKHR)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueReleaseDX9MediaSurfacesKHR)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
#else
    void* clGetDeviceIDsFromDX9MediaAdapterKHR;
    void* clCreateFromDX9MediaSurfaceKHR;
    void* clEnqueueAcquireDX9MediaSurfacesKHR;
    void* clEnqueueReleaseDX9MediaSurfacesKHR;
#endif

    ///////////////////////////////////////////////////////////////////////////
    // cl_khr_d3d10_sharing:
    ///////////////////////////////////////////////////////////////////////////
#if AMDT_BUILD_TARGET == AMDT_WINDOWS_OS
    cl_int(CL_API_CALL* clGetDeviceIDsFromD3D10KHR)(cl_platform_id platform, cl_d3d10_device_source_khr d3d_device_source, void* d3d_object, cl_d3d10_device_set_khr d3d_device_set, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices);
    cl_mem(CL_API_CALL* clCreateFromD3D10BufferKHR)(cl_context context, cl_mem_flags flags, ID3D10Buffer* resource, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromD3D10Texture2DKHR)(cl_context context, cl_mem_flags flags, ID3D10Texture2D* resource, UINT subresource, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromD3D10Texture3DKHR)(cl_context context, cl_mem_flags flags, ID3D10Texture3D* resource, UINT subresource, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clEnqueueAcquireD3D10ObjectsKHR)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueReleaseD3D10ObjectsKHR)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
#else
    void* clGetDeviceIDsFromD3D10KHR;
    void* clCreateFromD3D10BufferKHR;
    void* clCreateFromD3D10Texture2DKHR;
    void* clCreateFromD3D10Texture3DKHR;
    void* clEnqueueAcquireD3D10ObjectsKHR;
    void* clEnqueueReleaseD3D10ObjectsKHR;
#endif

    ///////////////////////////////////////////////////////////////////////////
    // cl_khr_d3d11_sharing:
    ///////////////////////////////////////////////////////////////////////////
#if AMDT_BUILD_TARGET == AMDT_WINDOWS_OS
    cl_int(CL_API_CALL* clGetDeviceIDsFromD3D11KHR)(cl_platform_id platform, cl_d3d11_device_source_khr d3d_device_source, void* d3d_object, cl_d3d11_device_set_khr d3d_device_set, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices);
    cl_mem(CL_API_CALL* clCreateFromD3D11BufferKHR)(cl_context context, cl_mem_flags flags, ID3D11Buffer* resource, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromD3D11Texture2DKHR)(cl_context context, cl_mem_flags flags, ID3D11Texture2D* resource, UINT subresource, cl_int* errcode_ret);
    cl_mem(CL_API_CALL* clCreateFromD3D11Texture3DKHR)(cl_context context, cl_mem_flags flags, ID3D11Texture3D* resource, UINT subresource, cl_int* errcode_ret);
    cl_int(CL_API_CALL* clEnqueueAcquireD3D11ObjectsKHR)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
    cl_int(CL_API_CALL* clEnqueueReleaseD3D11ObjectsKHR)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem* mem_objects, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
#else
    void* clGetDeviceIDsFromD3D11KHR;
    void* clCreateFromD3D11BufferKHR;
    void* clCreateFromD3D11Texture2DKHR;
    void* clCreateFromD3D11Texture3DKHR;
    void* clEnqueueAcquireD3D11ObjectsKHR;
    void* clEnqueueReleaseD3D11ObjectsKHR;
#endif
};

void csFillICDDispatchTableWithFunctionPointers(cl_icd_dispatch_table& icdDispatch, const csMonitoredFunctionPointers& functionPointers);

#endif //__CSMONITOREDFUNCTIONPOINTERS_H


text:
namespace lldb_private {

class OptionValueFormatEntity : public OptionValue {
public:
  OptionValueFormatEntity(const char *default_format);

  ~OptionValueFormatEntity() override {}

  // Virtual subclass pure virtual overrides

  OptionValue::Type GetType() const override { return eTypeFormatEntity; }

  void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
                 uint32_t dump_mask) override;

  Status
  SetValueFromString(llvm::StringRef value,
                     VarSetOperationType op = eVarSetOperationAssign) override;
  Status
  SetValueFromString(const char *,
                     VarSetOperationType = eVarSetOperationAssign) = delete;

  bool Clear() override;

  lldb::OptionValueSP DeepCopy() const override;

  void AutoComplete(CommandInterpreter &interpreter,
                    CompletionRequest &request) override;

  // Subclass specific functions

  FormatEntity::Entry &GetCurrentValue() { return m_current_entry; }

  const FormatEntity::Entry &GetCurrentValue() const { return m_current_entry; }

  void SetCurrentValue(const FormatEntity::Entry &value) {
    m_current_entry = value;
  }

  FormatEntity::Entry &GetDefaultValue() { return m_default_entry; }

  const FormatEntity::Entry &GetDefaultValue() const { return m_default_entry; }

protected:
  std::string m_current_format;
  std::string m_default_format;
  FormatEntity::Entry m_current_entry;
  FormatEntity::Entry m_default_entry;
};

} // namespace lldb_private

#endif // liblldb_OptionValueFormatEntity_h_


text:
using Stitch.Elements.Interface;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace Stitch.Elements
{
    // This file contains classes that directly inherit from IElement
    // The only element not here is Head

    public abstract class FormattedElement : IElement
    {
        public abstract string Tag { get; }

        public ClassList ClassList { get; set; } = new ClassList();

        public StyleList StyleList { get; set; } = new StyleList();

        public IDictionary<string, string> Attributes { get; private set; } = new Dictionary<string, string>();

        public string Text { get; protected set; }

        public string ID { get; set; }

        public string Title { get; set; }

        protected FormattedElement() { }

        protected FormattedElement( string text ) { Text = text; }

        protected FormattedElement( IElement element ) { Text = element.Render(); }

        public virtual string Render()
        {
            var builder = new StringBuilder();
            builder.Append( $"<{Tag}" );
            if (!string.IsNullOrWhiteSpace( ID )) builder.Append( $" id=\"{ID}\"" );
            if (ClassList.Count > 0) builder.Append( $" {ClassList.GetClassString()}" );
            if (StyleList.Count > 0) builder.Append( $" {StyleList.GetStyleString()}" );
            if (Attributes.Count > 0) foreach (var att in Attributes) builder.Append( $" {att.Key}=\"{att.Value}\"" );

            builder.Append( $">{Text}</{Tag}>" );
            return builder.ToString();
        }

        public override string ToString()
        {
            return Render();
        }

        public object Clone()
        {
            var clone = (IElement)MemberwiseClone();
            clone.ID = string.Empty;
            clone.ClassList = new ClassList();
            foreach (var cls in ClassList)
            {
                clone.ClassList.Add( cls );
            }
            return clone;
        }
    }
}


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

using System.Threading.Tasks;

namespace Coddee
{
    /// <summary>
    /// Identifies an application module
    /// </summary>
    public interface IModule
    {
        /// <summary>
        /// Called by the ApplicationModulesManager to initialize the module
        /// </summary>
        /// <param name="container">The dependency container</param>
        Task Initialize(IContainer container);
    }
}


text:
module Azure::Network::Mgmt::V2020_07_01
  module Models
    #
    # Defines values for RoutingState
    #
    module RoutingState
      None = "None"
      Provisioned = "Provisioned"
      Provisioning = "Provisioning"
      Failed = "Failed"
    end
  end
end


text:
<?php

namespace Magento\Setup\Console\Command;

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Command\Command;
use Magento\Framework\Setup\Lists;

/**
 * Command prints list of available language locales
 */
class InfoLanguageListCommand extends Command
{
    /**
     * List model provides lists of available options for currency, language locales, timezones
     *
     * @var Lists
     */
    private $lists;

    /**
     * @param Lists $lists
     */
    public function __construct(Lists $lists)
    {
        $this->lists = $lists;
        parent::__construct();
    }

    /**
     * {@inheritdoc}
     */
    protected function configure()
    {
        $this->setName('info:language:list')
            ->setDescription('Displays the list of available language locales');

        parent::configure();
    }

    /**
     * {@inheritdoc}
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $table = $this->getHelperSet()->get('table');
        $table->setHeaders(['Language', 'Code']);

        foreach ($this->lists->getLocaleList() as $key => $locale) {
            $table->addRow([$locale, $key]);
        }

        $table->render($output);

    }
}


text:
package bids

type BidFieldEnum string
type CalculateByEnum string