text:
#pragma once
#pragma once
#include <kernel_headers/cscmm.hpp>
#include <program.hpp>
#include <traits.hpp>
#include <string>
#include <mutex>
#include <map>
#include <dispatch.hpp>
#include <Param.hpp>
#include <debug_opencl.hpp>
#include <cache.hpp>
#include <type_util.hpp>
#include "scan_dim.hpp"
#include "reduce.hpp"
#include "scan_first.hpp"
#include "config.hpp"
#include <af/opencl.h>

using cl::Buffer;
using cl::Program;
using cl::Kernel;
using cl::KernelFunctor;
using cl::EnqueueArgs;
using cl::NDRange;
using std::string;

namespace opencl
{
    namespace kernel
    {
        template<typename T>
        void cscmm_nn(Param out,
                      const Param &values, const Param &colIdx, const Param &rowIdx,
                      const Param &rhs, const T alpha, const T beta, bool is_conj)
        {
            try {
                bool use_alpha = (alpha != scalar<T>(1.0));
                bool use_beta = (beta != scalar<T>(0.0));

                int threads = 256;
                // TODO: Find a better way to tune these parameters
                int rows_per_group = 8;
                int cols_per_group = 8;

                std::string ref_name =
                    std::string("cscmm_nn_") +
                    std::string(dtype_traits<T>::getName()) +
                    std::string("_") +
                    std::to_string(use_alpha) +
                    std::string("_") +
                    std::to_string(use_beta) +
                    std::string("_") +
                    std::to_string(is_conj) +
                    std::string("_") +
                    std::to_string(rows_per_group) +
                    std::string("_") +
                    std::to_string(cols_per_group) +
                    std::string("_") +
                    std::to_string(threads);

                int device = getActiveDeviceId();
                auto idx = kernelCaches[device].find(ref_name);
                kc_entry_t entry;

                if (idx == kernelCaches[device].end()) {

                    std::ostringstream options;
                    options << " -D T=" << dtype_traits<T>::getName();
                    options << " -D USE_ALPHA=" << use_alpha;
                    options << " -D USE_BETA=" << use_beta;
                    options << " -D IS_CONJ=" << is_conj;
                    options << " -D THREADS=" << threads;
                    options << " -D ROWS_PER_GROUP=" << rows_per_group;
                    options << " -D COLS_PER_GROUP=" << cols_per_group;

                    if (std::is_same<T, double>::value ||
                        std::is_same<T, cdouble>::value) {
                        options << " -D USE_DOUBLE";
                    }
                    if (std::is_same<T, cfloat>::value ||
                        std::is_same<T, cdouble>::value) {
                        options << " -D IS_CPLX=1";
                    } else {
                        options << " -D IS_CPLX=0";
                    }

                    const char *ker_strs[] = {cscmm_cl};
                    const int   ker_lens[] = {cscmm_cl_len};

                    Program prog;
                    buildProgram(prog, 1, ker_strs, ker_lens, options.str());
                    entry.prog = new Program(prog);
                    entry.ker  = new Kernel(*entry.prog, "cscmm_nn");
                } else {
                    entry = idx->second;
                }

                auto cscmm_kernel = *entry.ker;
                auto cscmm_func = KernelFunctor<Buffer,
                                                Buffer, Buffer, Buffer,
                                                int, int, int,
                                                Buffer, KParam, T, T>(cscmm_kernel);

                NDRange local(threads, 1);
                int M = out.info.dims[0];
                int N = out.info.dims[1];
                int K = colIdx.info.dims[0] - 1;

                int groups_x = divup(M, rows_per_group);
                int groups_y = divup(N, cols_per_group);
                NDRange global(local[0] * groups_x, local[1] * groups_y);

                cscmm_func(EnqueueArgs(getQueue(), global, local),
                           *out.data, *values.data, *colIdx.data, *rowIdx.data,
                           M, K, N, *rhs.data, rhs.info, alpha, beta);

                CL_DEBUG_FINISH(getQueue());
            } catch (cl::Error &ex) {
                CL_TO_AF_ERROR(ex);
            }
        }
    }
}


text:
goog.provide('recoil.ui.CellWidget');
goog.provide('recoil.ui.Widget');

goog.require('goog.ui.Component');
goog.require('recoil.frp.struct');
/**
 * @interface
 */
recoil.ui.Widget = function() {
};

/**
 * @return {!goog.ui.Component}
 */
recoil.ui.Widget.prototype.getComponent = function() {

};

/**
 * all widgets should not allow themselves to be flatterned
 *
 * @type {!Object}
 */

recoil.ui.Widget.prototype.flatten;

/**
 * @interface
 * @extends {recoil.ui.Widget}
 */
recoil.ui.CellWidget = function() {
};

/**
 * @param  {!recoil.frp.Behaviour<recoil.structs.table.TableCell>} cellB
 */
recoil.ui.CellWidget.prototype.attachCell = function(cellB) {};

redpajama_set_name: RedPajamaGithub


text:
var BaseExpression  = require("./base");
var ArrayExpression = require("./array");

function ElementNodeExpression(nodeName, attributes, childNodes) {
  this.name       = nodeName;
  this.attributes = attributes;
  this.childNodes = childNodes || new ArrayExpression();
  BaseExpression.apply(this, arguments);
}

BaseExpression.extend(ElementNodeExpression, {
  type: "elementNode",
  toJavaScript: function() {
    return "element(\"" + this.name + "\", " + this.attributes.toJavaScript() +
    ", " + this.childNodes.toJavaScript() + ")";
  }
});

module.exports = ElementNodeExpression;


text:
package com.google.android.apps.dashclock;

import net.nurik.roman.dashclock.R;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.DialogInterface;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

/**
 * Helper class for showing about dialogs and what not.
 */
public class HelpUtils {

    public static void showAboutDialog(Activity activity) {
        FragmentManager fm = activity.getFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        Fragment prev = fm.findFragmentByTag("dialog_about");
        if (prev != null) {
            ft.remove(prev);
        }
        ft.addToBackStack(null);

        new AboutDialog().show(ft, "dialog_about");
    }

    public static class AboutDialog extends DialogFragment {

        private static final String VERSION_UNAVAILABLE = "N/A";

        public AboutDialog() {
        }

        @Override
        public Dialog onCreateDialog(Bundle savedInstanceState) {
            // Get app version
            PackageManager pm = getActivity().getPackageManager();
            String packageName = getActivity().getPackageName();
            String versionName;
            try {
                PackageInfo info = pm.getPackageInfo(packageName, 0);
                versionName = info.versionName;
            } catch (PackageManager.NameNotFoundException e) {
                versionName = VERSION_UNAVAILABLE;
            }

            // Build the about body view and append the link to see OSS licenses
            LayoutInflater layoutInflater = getActivity().getLayoutInflater();
            View rootView = layoutInflater.inflate(R.layout.dialog_about, null);
            TextView nameAndVersionView = (TextView) rootView.findViewById(
                    R.id.app_name_and_version);
            nameAndVersionView.setText(Html.fromHtml(
                    getString(R.string.app_name_and_version, versionName)));

            TextView aboutBodyView = (TextView) rootView.findViewById(R.id.about_body);
            aboutBodyView.setText(Html.fromHtml(getString(R.string.about_body)));
            aboutBodyView.setMovementMethod(new LinkMovementMethod());

            return new AlertDialog.Builder(getActivity())
                    .setView(rootView)
                    .setPositiveButton(R.string.close,
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int whichButton) {
                                    dialog.dismiss();
                                }
                            }
                    )
                    .create();
        }
    }
}


text:
namespace __sanitizer {

void ParseFlag(const char *env, bool *flag, const char *name);
void ParseFlag(const char *env, int *flag, const char *name);
void ParseFlag(const char *env, const char **flag, const char *name);

}  // namespace __sanitizer

#endif  // SANITIZER_FLAGS_H


text:
package rest;

import java.sql.Date;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletContext;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import dao.DAOTablaSitios;
import tm.CompañiaMaster;
import tm.SitioMaster;
import vos.Compañia;
import vos.ListaSitios;
import vos.Sitio;

@Path("sitios")
public class SitioServices extends FestivAndesServices {

	/**
	 * Atributo que usa la anotación @Context para tener el ServletContext de la conexión actual.
	 */
	@Context
	private ServletContext context;

	/**
	 * Método que retorna el path de la carpeta WEB-INF/ConnectionData en el deploy actual dentro del servidor.
	 * @return path de la carpeta WEB-INF/ConnectionData en el deploy actual.
	 */
	private String getPath() {
		return context.getRealPath("WEB-INF/ConnectionData");
	}

	// Rest

	/**
	 * Da los sitios de la base de datos
	 * @return Sitios de la base de datos
	 */
	@GET
	@Produces({MediaType.APPLICATION_JSON})
	public Response getSitios() {
		SitioMaster tm = new SitioMaster(getPath());
		ListaSitios sitios;
		try {
			sitios = tm.darSitios();
		} catch(Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}

		return Response.status(200).entity(sitios).build();
	}

	/**
	 * Agrega un sitio a la base de datos
	 * @param sitio Sitio a agregar
	 * @return Resultado de intentar agregar el sitio
	 */
	@PUT
	@Path("/sitio")
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	public Response addSitio(Sitio sitio) {
		SitioMaster tm = new SitioMaster(getPath());
		try {
			tm.addSitio(sitio);
		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(sitio).build();
	}

	/**
	 * Actualiza un sitio de la base de datos.
	 * @param sitio Sitio con los nuevos datos.
	 * @return Resultado de intentar actualizar el sitio
	 */
	@POST
	@Path("/sitio")
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	public Response updateSitio(Sitio sitio) {
		SitioMaster tm = new SitioMaster(getPath());
		try {
			tm.updateSitio(sitio);
		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(sitio).build();
	}

	@GET
	@Path("/{id}/darInfo")
	@Produces(MediaType.APPLICATION_JSON)
	public Response darInfo(@PathParam("id") int id) {

		SitioMaster tm = new SitioMaster(getPath());
		ArrayList<Map<String, String>> objects;

		try {
			objects = tm.darInfoSitios(id, null, null, null);

		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(objects).build();
	}

	@GET
	@Path("/{id}/darInfo/{agrupamiento}")
	@Produces(MediaType.APPLICATION_JSON)
	public Response darInfo(@PathParam("id") int id, @PathParam("agrupamiento") String agrupamiento) {

		SitioMaster tm = new SitioMaster(getPath());
		ArrayList<Map<String, String>> objects;

		try {
			objects = tm.darInfoSitios(id, agrupamiento, null, null);

		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(objects).build();
	}

	@GET
	@Path("/{id}/darInfo/{orden}/{ordenadoPor}")
	@Produces(MediaType.APPLICATION_JSON)
	public Response darInfo(@PathParam("id") int id, @PathParam("orden") String orden, @PathParam("ordenadoPor") String ordenadoPor) {

		SitioMaster tm = new SitioMaster(getPath());
		ArrayList<Map<String, String>> objects;

		try {
			objects = tm.darInfoSitios(id, null, orden, ordenadoPor);

		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(objects).build();
	}

	@GET
	@Path("/{id}/darInfo/{agrupamiento}/{orden}/{ordenadoPor}")
	@Produces(MediaType.APPLICATION_JSON)
	public Response darInfo(@PathParam("id") int id, @PathParam("agrupamiento") String agrupamiento,  @PathParam("orden") String orden, @PathParam("ordenadoPor") String ordenadoPor) {

		SitioMaster tm = new SitioMaster(getPath());
		ArrayList<Map<String, String>> objects;

		try {
			objects = tm.darInfoSitios(id, agrupamiento, orden, ordenadoPor);

		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(objects).build();
	}

	/**
	 * Elimina un sitio de la base de datos
	 * @param sitio Sitio a eliminar de la base de datos.
	 * @return Resultado de intentar eliminar el sitio
	 */
	@DELETE
	@Path("/sitio")
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	public Response deleteSitio(Sitio sitio) {
		SitioMaster tm = new SitioMaster(getPath());
		try {
			tm.deleteSitio(sitio);
		} catch (Exception e) {
			return Response.status(500).entity(doErrorMessage(e)).build();
		}
		return Response.status(200).entity(sitio).build();
	}
}


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

using System.Threading.Tasks;
using Xunit;

[Collection(nameof(PubsubFixture))]
public class PublishMessageWithRetrySettingsAsyncTest
{
    private readonly PubsubFixture _pubsubFixture;
    private readonly PublishMessageWithRetrySettingsAsyncSample _publishMessageWithRetrySettingsAsyncSample;
    private readonly PullMessagesAsyncSample _pullMessagesAsyncSample;

    public PublishMessageWithRetrySettingsAsyncTest(PubsubFixture pubsubFixture)
    {
        _pubsubFixture = pubsubFixture;
        _publishMessageWithRetrySettingsAsyncSample = new PublishMessageWithRetrySettingsAsyncSample();
        _pullMessagesAsyncSample = new PullMessagesAsyncSample();
    }

    [Fact]
    public async Task PublishMessageWithRetrySettingsAsync()
    {
        string randomName = _pubsubFixture.RandomName();
        string topicId = $"testTopicForMessageWithRetrySettingsAsync{randomName}";
        string subscriptionId = $"testSubscriptionForMessageWithRetrySettingsAsync{randomName}";

        _pubsubFixture.CreateTopic(topicId);
        _pubsubFixture.CreateSubscription(topicId, subscriptionId);

        await _publishMessageWithRetrySettingsAsyncSample
            .PublishMessageWithRetrySettingsAsync(_pubsubFixture.ProjectId, topicId, "Hello World!");

        // Pull the Message to confirm it is valid
        await _pubsubFixture.Pull.Eventually(async () =>
        {
            var messageCount = await _pullMessagesAsyncSample.PullMessagesAsync(_pubsubFixture.ProjectId, subscriptionId, true);
            Assert.Equal(1, messageCount);
        });
    }
}


text: search_result['2893']=["topic_00000000000006F9.html","StaffRole Class",""];


text:
'use strict';
var internalFind = require('../internals/array-methods')(5);
var FIND = 'find';
var SKIPS_HOLES = true;

// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });

// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
require('../internals/export')({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  find: function find(callbackfn /* , that = undefined */) {
    return internalFind(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  }
});

// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
require('../internals/add-to-unscopables')(FIND);