/*************************************************************************/
/*                                                                       */
/*                  Language Technologies Institute                      */
/*                     Carnegie Mellon University                        */
/*                        Copyright (c) 2000                             */
/*                        All Rights Reserved.                           */
/*                                                                       */
/*  Permission is hereby granted, free of charge, to use and distribute  */
/*  this software and its documentation without restriction, including   */
/*  without limitation the rights to use, copy, modify, merge, publish,  */
/*  distribute, sublicense, and/or sell copies of this work, and to      */
/*  permit persons to whom this work is furnished to do so, subject to   */
/*  the following conditions:                                            */
/*   1. The code must retain the above copyright notice, this list of    */
/*      conditions and the following disclaimer.                         */
/*   2. Any modifications must be clearly marked as such.                */
/*   3. Original authors' names are not deleted.                         */
/*   4. The authors' names are not used to endorse or promote products   */
/*      derived from this software without specific prior written        */
/*      permission.                                                      */
/*                                                                       */
/*  CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK         */
/*  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      */
/*  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   */
/*  SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE      */
/*  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    */
/*  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   */
/*  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          */
/*  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       */
/*  THIS SOFTWARE.                                                       */
/*                                                                       */
/*************************************************************************/
/*             Author:  Alan W Black (awb@cs.cmu.edu)                    */
/*               Date:  October 2000                                     */
/*************************************************************************/
/*                                                                       */
/*  A client/server audio play program                                   */
/*                                                                       */
/*  Server listens to a socket and play anything coming in (streaming)   */
/*  Client just sends (riff) headered waveform to named socket           */
/*                                                                       */
/*************************************************************************/
#include "cst_file.h"
#include <stdlib.h>
#include "cst_socket.h"
#include "cst_string.h"
#include "cst_wave.h"
#include "cst_file.h"
#include "cst_audio.h"

#ifndef CST_NO_SOCKETS

#ifdef _MSC_VER
#include <io.h>
#define read(fd, buffer, count) _read(fd, buffer, count)
#else
#include <unistd.h>
#endif

static int play_wave_from_socket(snd_header *header,int audiostream)
{
    /* Read audio from stream and play it to audio device, converting */
    /* it to pcm if required                                          */
    int num_samples;
    int sample_width;
    cst_audiodev *audio_device;
    int q,i,n,r;
    unsigned char bytes[CST_AUDIOBUFFSIZE];
    short shorts[CST_AUDIOBUFFSIZE];
#ifdef DEBUG
    cst_file fff;

    fff = cst_fopen("/tmp/awb.wav",CST_OPEN_WRITE|CST_OPEN_BINARY);
#endif

    if ((audio_device = audio_open(header->sample_rate,1,
				   (header->encoding == CST_SND_SHORT) ?
				   CST_AUDIO_LINEAR16 : CST_AUDIO_LINEAR8)) == NULL)
    {
	cst_errmsg("play_wave_from_socket: can't open audio device\n");
	return -1;
    }

    if (header->encoding == CST_SND_SHORT)
	sample_width = 2;
    else
	sample_width = 1;

    num_samples = header->data_size / sample_width;
    /* we naively let the num_channels sort itself out */
    for (i=0; i < num_samples; i += r/2)
    {
	if (num_samples > i+CST_AUDIOBUFFSIZE)
	    n = CST_AUDIOBUFFSIZE;
	else
	    n = num_samples-i;
	if (header->encoding == CST_SND_ULAW)
	{
	    r = read(audiostream,bytes,n);
	    for (q=0; q<r; q++)
		shorts[q] = cst_ulaw_to_short(bytes[q]);
	    r *= 2;
	}
	else /* if (header->encoding == CST_SND_SHORT) */
	{
	    r = read(audiostream,shorts,n*2);
	    if (CST_LITTLE_ENDIAN)
		for (q=0; q<r/2; q++)
		    shorts[q] = SWAPSHORT(shorts[q]);
	}

	if (r <= 0)
	{   /* I'm not getting any data from the server */
	    audio_close(audio_device);
	    return CST_ERROR_FORMAT;
	}

	for (q=r; q > 0; q-=n)
	{
	    n = audio_write(audio_device,shorts,q);
#ifdef DEBUG
	    cst_fwrite(fff,shorts,2,q);
#endif
	    if (n <= 0)
	    {
		audio_close(audio_device);
		return CST_ERROR_FORMAT;
	    }
	}
    }
    audio_close(audio_device);
#ifdef DEBUG
    cst_fclose(fff);
#endif

    return CST_OK_FORMAT;

}

static int auserver_process_client(int client_name, int fd)
{
    /* Gets called for each client */
    snd_header header;
    int r;

    printf("client %d connected, ",client_name);
    fflush(stdout);
    /* Get header */
    r = read(fd,&header,sizeof(header));
    if (r != sizeof(header))
    {
	cst_errmsg("socket: connection didn't give a header\n");
	return -1;
    }
    if (CST_LITTLE_ENDIAN)
    {
	header.magic = SWAPINT(header.magic);
	header.hdr_size = SWAPINT(header.hdr_size);
	header.data_size = SWAPINT(header.data_size);
	header.encoding = SWAPINT(header.encoding);
	header.sample_rate = SWAPINT(header.sample_rate);
	header.channels = SWAPINT(header.channels);
    }

    if (header.magic != CST_SND_MAGIC)
    {
	cst_errmsg("socket: client something other than snd waveform\n");
	return -1;
    }

    printf("%d bytes at %d rate, ", header.data_size, header.sample_rate);
    fflush(stdout);

    if (play_wave_from_socket(&header,fd) == CST_OK_FORMAT)
	printf("successful\n");
    else
	printf("unsuccessful\n");

    return 0;
}

int auserver(int port)
{
    return cst_socket_server("audio",port,auserver_process_client);
}

#endif

{'repo_name': 'festvox/flite', 'stars': '316', 'repo_language': 'C', 'file_name': 'Makefile', 'mime_type': 'text/plain', 'hash': -4332371754208210596, 'source_dataset': 'data'}


DC/OS service configuration properties

Service name

The name of the service instance. The name must contain only alphanumeric characters, underscores and dashes up to a maximum of 24 characters, and must start and end with an alphanumeric character).

The Kubernetes cluster will run in this region. When no region is specified the cluster is constrained to the local region.

The sleep duration in seconds before tasks exit.

The service account for DC/OS service authentication. This is typically left empty to use the default unless service authentication is needed. The value given here is passed as the principal of the Mesos framework.

Credential secret name (optional)

Name of the Secret Store credentials to use for DC/OS service authentication. This should be left empty unless service authentication is needed.

The name of the DC/OS virtual network to use.

The log level for the DC/OS service.

OFF FATAL ERROR WARN INFO DEBUG TRACE ALL

Use the agent's Docker certificates

Whether to use the agent's Docker certificates in order to access private Docker registries.

Kubernetes general properties

The authorization mode to use.

High-availability

Whether to deploy a highly-available control plane.

Service CIDR

Kubernetes Service CIDR block, e.g. '10.100.0.0/16'. It MUST NOT overlap with DC/OS VIP CIDR block.

DC/OS token authentication

Whether to enable DC/OS token authentication.

Reserved resources for Kubernetes control plane.

CPU count

The CPU required by every instance of the control plane.

Memory size (MB)

The RAM required by every instance of the control plane.

Control Plane Disk size (MB)

Amount of persistent disk available for the control plane docker instance (in MB)

Control Plane node placement constraints (e.g., [["hostname", "UNIQUE"]]).

Control plane pre-reserved role

Kubernetes control-plane pre-reserved role.

Private Node Count

Number of desired private Kubernetes nodes.

Reserved resources for Kubernetes private nodes

Node CPU available for pods

Amount of CPU resources available for pods.

Node RAM memory available for pods (in MB)

Amount of memory RAM resources available for pods (in MB).

Node Disk size (MB)

Amount of persistent disk available for pods (in MB)

Kube-reserved CPU count

CPU reserved for kubelet and container runtime daemons.

Kube-reserved RAM memory (in MB)

RAM memory reserved for kubelet and container runtime daemons (in MB).

Private Kubernetes node placement constraints (e.g., [["hostname", "UNIQUE"]]).

Private node pre-reserved role

Kubernetes private node pre-reserved role.

Proxy injection configuration

Configure the injection of proxy settings to Kubernetes.

By default agent proxy configurations are injected. This option allows for manual configuration of these proxy rules as defined in the HTTP, HTTPS and No Proxy fields. Leave these fields blank to completely disable proxy rules for Kubernetes.

http proxy server to use, leave blank if you wish to define none.

https proxy server to use, leave blank if you wish to define none.

This option is used when HTTP or HTTPS proxies are define, all entries must be separated by comma (,), cidrs must be valid, no wildcards (*)

Public Node Count

Number of desired public Kubernetes nodes.

Reserved resources for Kubernetes public nodes

Node CPU available for pods

Node Disk size (MB)

Kube-reserved CPU count

Kube-reserved RAM memory (in MB)

Public Kubernetes node placement constraints (e.g., [["hostname", "UNIQUE"]]).

Public node pre-reserved role

Kubernetes public node pre-reserved role.

Calico configuration

Calico provides secure network connectivity for containers and virtual machine workloads.

When using Calico IPAM, each workload is assigned an address from the selection of configured IP pools. You may want to modify the IP pool of a running cluster.

Typically the MTU for your kubernetes workload interfaces should match the network MTU. If you need IP-in-IP then the MTU size for both the workload and tunnel interfaces should be 20 bytes less than the network MTU for your network. This is due to the extra 20 byte header that the tunnel will add to each packet.

Each Kubernetes node must be configured with an IPv4 address that has access to the virtual network (as defined in option "virtual_network_name" above). Calico will autodetect these IP addresses based on the method defined here. For more information, please refer to the official documentation at docs.projectcalico.org/v3.5/reference/node/configuration#ip-autodetection-methods.

Calico can be configured to use IP-in-IP encapsulation by enabling the IPIP option on the IP pool resource. When enabled, Calico will use IP-in-IP encapsulation when routing packets to workload IPs falling in the IP pool range.

The MTU Calico sets on the tunnel device created in the kube-node task.

Whether Calico should configure an IPinIP interface on the kube-node.

Typha configuration

Typha sits in between Felix and the Kubernetes API server, reducing Calico's load on the API server. Recommended when deploying Kubernetes cluster with more than 50 nodes.

Whether to enable Calico Typha deployment. Recommended when deploying Kubernetes cluster with more than 50 nodes.

Number of Typha replicas. We recommend using Typha if you have more than 50 nodes. Above 100 nodes it is essential. Use one replica for every 100-200 nodes. In production, we recommend running at least 3 replicas to reduce the impact of rolling upgrade.

etcd properties

CPU count

etcd node CPU requirements.

Memory size (MB)

etcd node RAM requirements (in MB).

Disk size (MB) for data

etcd node persistent disk requirements (in MB) for the data

Disk size (MB) for logs

etcd node persistent disk requirements (in MB) for the logs

Disk type [ROOT, MOUNT]

Mount volumes require pre-configuration in DC/OS.

etcd placement constraints (e.g., [["hostname", "UNIQUE"]]).

Pre-reserved role

etcd pre-reserved role.

{'repo_name': 'mesosphere/universe', 'stars': '305', 'repo_language': 'HTML', 'file_name': 'marathon.json.mustache', 'mime_type': 'text/plain', 'hash': -3132485667536260879, 'source_dataset': 'data'}


define("ace/snippets/r",["require","exports","module"], function(require, exports, module) {
"use strict";

exports.snippetText = "snippet #!\n\
	#!/usr/bin/env Rscript\n\
\n\
# includes\n\
snippet lib\n\
	library(${1:package})\n\
snippet req\n\
	require(${1:package})\n\
snippet source\n\
	source('${1:file}')\n\
\n\
# conditionals\n\
snippet if\n\
	if (${1:condition}) {\n\
		${2:code}\n\
	}\n\
snippet el\n\
	else {\n\
		${1:code}\n\
	}\n\
snippet ei\n\
	else if (${1:condition}) {\n\
		${2:code}\n\
	}\n\
\n\
# functions\n\
snippet fun\n\
	${1:name} = function (${2:variables}) {\n\
		${3:code}\n\
	}\n\
snippet ret\n\
	return(${1:code})\n\
\n\
# dataframes, lists, etc\n\
snippet df\n\
	${1:name}[${2:rows}, ${3:cols}]\n\
snippet c\n\
	c(${1:items})\n\
snippet li\n\
	list(${1:items})\n\
snippet mat\n\
	matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})\n\
\n\
# apply functions\n\
snippet apply\n\
	apply(${1:array}, ${2:margin}, ${3:function})\n\
snippet lapply\n\
	lapply(${1:list}, ${2:function})\n\
snippet sapply\n\
	sapply(${1:list}, ${2:function})\n\
snippet vapply\n\
	vapply(${1:list}, ${2:function}, ${3:type})\n\
snippet mapply\n\
	mapply(${1:function}, ${2:...})\n\
snippet tapply\n\
	tapply(${1:vector}, ${2:index}, ${3:function})\n\
snippet rapply\n\
	rapply(${1:list}, ${2:function})\n\
\n\
# plyr functions\n\
snippet dd\n\
	ddply(${1:frame}, ${2:variables}, ${3:function})\n\
snippet dl\n\
	dlply(${1:frame}, ${2:variables}, ${3:function})\n\
snippet da\n\
	daply(${1:frame}, ${2:variables}, ${3:function})\n\
snippet d_\n\
	d_ply(${1:frame}, ${2:variables}, ${3:function})\n\
\n\
snippet ad\n\
	adply(${1:array}, ${2:margin}, ${3:function})\n\
snippet al\n\
	alply(${1:array}, ${2:margin}, ${3:function})\n\
snippet aa\n\
	aaply(${1:array}, ${2:margin}, ${3:function})\n\
snippet a_\n\
	a_ply(${1:array}, ${2:margin}, ${3:function})\n\
\n\
snippet ld\n\
	ldply(${1:list}, ${2:function})\n\
snippet ll\n\
	llply(${1:list}, ${2:function})\n\
snippet la\n\
	laply(${1:list}, ${2:function})\n\
snippet l_\n\
	l_ply(${1:list}, ${2:function})\n\
\n\
snippet md\n\
	mdply(${1:matrix}, ${2:function})\n\
snippet ml\n\
	mlply(${1:matrix}, ${2:function})\n\
snippet ma\n\
	maply(${1:matrix}, ${2:function})\n\
snippet m_\n\
	m_ply(${1:matrix}, ${2:function})\n\
\n\
# plot functions\n\
snippet pl\n\
	plot(${1:x}, ${2:y})\n\
snippet ggp\n\
	ggplot(${1:data}, aes(${2:aesthetics}))\n\
snippet img\n\
	${1:(jpeg,bmp,png,tiff)}(filename=\"${2:filename}\", width=${3}, height=${4}, unit=\"${5}\")\n\
	${6:plot}\n\
	dev.off()\n\
\n\
# statistical test functions\n\
snippet fis\n\
	fisher.test(${1:x}, ${2:y})\n\
snippet chi\n\
	chisq.test(${1:x}, ${2:y})\n\
snippet tt\n\
	t.test(${1:x}, ${2:y})\n\
snippet wil\n\
	wilcox.test(${1:x}, ${2:y})\n\
snippet cor\n\
	cor.test(${1:x}, ${2:y})\n\
snippet fte\n\
	var.test(${1:x}, ${2:y})\n\
snippet kvt \n\
	kv.test(${1:x}, ${2:y})\n\
";
exports.scope = "r";

});

{'repo_name': 'ghinda/jotted', 'stars': '476', 'repo_language': 'JavaScript', 'file_name': 'prism-file-highlight.js', 'mime_type': 'text/plain', 'hash': 8986796605218500791, 'source_dataset': 'data'}


# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR The R Foundation
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: bugs@R-project.org\n"
"POT-Creation-Date: 2012-06-27 09:31+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: RODBC.c:156
msgid "[RODBC] ERROR: Could not SQLAllocStmt"
msgstr ""

#: RODBC.c:169
msgid "[RODBC] ERROR: Could not SQLAllocEnv"
msgstr ""

#: RODBC.c:220
msgid "[RODBC] ERROR:invalid connection argument"
msgstr ""

#: RODBC.c:289
#, c-format
msgid "[RODBC] ERROR: state %s, code %d, message %s"
msgstr ""

#: RODBC.c:292
msgid "[RODBC] ERROR: Could not SQLDriverConnect"
msgstr ""

#: RODBC.c:296
msgid "[RODBC] ERROR: Could not SQLAllocConnect"
msgstr ""

#: RODBC.c:389
msgid "[RODBC] ERROR: Failure in SQLPrimary keys"
msgstr ""

#: RODBC.c:434
msgid "[RODBC] ERROR: Failure in SQLColumns"
msgstr ""

#: RODBC.c:470
msgid "[RODBC] ERROR: Failure in SQLSpecialColumns"
msgstr ""

#: RODBC.c:524 RODBC.c:572
msgid "[RODBC] ERROR: SQLTables failed"
msgstr ""

#: RODBC.c:647
msgid "[RODBC] ERROR: SQLRowCount failed"
msgstr ""

#: RODBC.c:697
msgid "[RODBC] ERROR: SQLDescribeCol failed"
msgstr ""

#: RODBC.c:744
msgid "[RODBC] ERROR: SQLBindCol failed"
msgstr ""

#: RODBC.c:763 RODBC.c:795 RODBC.c:964
msgid "[RODBC] No results available"
msgstr ""

#: RODBC.c:801
msgid "No Data"
msgstr ""

#: RODBC.c:865
#, c-format
msgid "character data truncated in column '%s'"
msgstr ""

#: RODBC.c:1113
msgid "[RODBC] SQLBindParameter failed"
msgstr ""

#: RODBC.c:1158
#, c-format
msgid "character data '%s' truncated to %d bytes in column '%s'"
msgstr ""

#: RODBC.c:1175
msgid "[RODBC] Failed exec in Update"
msgstr ""

#: RODBC.c:1207
msgid "[RODBC] Error in SQLDisconnect"
msgstr ""

#: RODBC.c:1212
msgid "[RODBC] Error in SQLFreeconnect"
msgstr ""

#: RODBC.c:1231
#, c-format
msgid "closing unused RODBC handle %d\n"
msgstr ""

{'repo_name': 'vertica/DistributedR', 'stars': '151', 'repo_language': 'R', 'file_name': 'odbcGetInfo.Rd', 'mime_type': 'text/plain', 'hash': -5547916800306188614, 'source_dataset': 'data'}


require('../../modules/es7.reflect.has-own-metadata');
module.exports = require('../../modules/_core').Reflect.hasOwnMetadata;

{'repo_name': 'cyforever123/weex-hongkong', 'stars': '128', 'repo_language': 'Java', 'file_name': 'navbar.we', 'mime_type': 'text/html', 'hash': 388691049234849443, 'source_dataset': 'data'}


<!doctype html>

    <input type="checkbox" id="border">

{'repo_name': 'Samsung/ChromiumGStreamerBackend', 'stars': '105', 'repo_language': 'None', 'file_name': 'keyboard_utils.js', 'mime_type': 'text/plain', 'hash': 1783097775820250229, 'source_dataset': 'data'}


[Unit]
Description=BOINC client
After=network.target

[Service]
ExecStart=/usr/bin/boinc_client
Restart=always

[Install]
WantedBy=multi-user.target

{'repo_name': 'gamaral/rpi-buildroot', 'stars': '548', 'repo_language': 'Makefile', 'file_name': 'linux-ext-aufs.mk', 'mime_type': 'text/plain', 'hash': 8553889579570056406, 'source_dataset': 'data'}


		Cable:

		{{if data.machine}}
			{{:helper.link("Connected", '', {}, 'selected')}}
		{{else data.cable}}
			{{:helper.link("Extended", '', {}, 'yellowButton')}}
		{{else}}
			{{:helper.link("Retracted", '', {"stopic":"door_jack", "cable":1})}}
		{{/if}}

{{if data.machine}}

		Hack:

		{{if data.inprogress}}
			{{if data.progress_a <= 33}}

{{:helper.smoothRound(data.progress_a)}}.{{:helper.smoothRound(data.progress_b)}}%

			{{else data.progress_a <= 67}}

{{:helper.smoothRound(data.progress_a)}}.{{:helper.smoothRound(data.progress_b)}}%

			{{else}}

{{:helper.smoothRound(data.progress_a)}}.{{:helper.smoothRound(data.progress_b)}}%

			{{/if}}
			{{:helper.link("Cancel", '', {"stopic":"door_jack", "cancel":1}, null, 'redButton')}}
		{{else}}
			{{:helper.link("Start", '', {"stopic":"door_jack", "jack":1})}}
		{{/if}}

{{else data.aborted}}

Hack aborted!

{{/if}}

{'repo_name': 'ParadiseSS13/Paradise', 'stars': '214', 'repo_language': 'DM', 'file_name': 'mode.txt', 'mime_type': 'text/plain', 'hash': -6031027940042538304, 'source_dataset': 'data'}


from django.db import models

class TestTable(models.Model):
    char_filed = models.CharField(max_length=120)

{'repo_name': 'tbicr/django-pg-zero-downtime-migrations', 'stars': '325', 'repo_language': 'Python', 'file_name': 'migrate_isnotnull_check_constraints.py', 'mime_type': 'text/x-python', 'hash': -7114276208421400636, 'source_dataset': 'data'}


/*
 * This file is part of the libopencm3 project.
 *
 * Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

/* Linker script for ST STM32F103C8T6 */

MEMORY
{
	rom (rx) : ORIGIN = 0x08000000, LENGTH = 64K
	ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
}

/* Enforce emmition of the vector table. */
EXTERN (vector_table)

/* Define the entry point of the output file. */
ENTRY(reset_handler)

/* Define sections. */
SECTIONS
{
	.text : {
		*(.vectors)	/* Vector table */
		*(.text*)	/* Program code */
		. = ALIGN(4);
		*(.rodata*)	/* Read-only data */
		. = ALIGN(4);
	} >rom

	/* C++ Static constructors/destructors, also used for __attribute__
	 * ((constructor)) and the likes */
	.preinit_array : {
		. = ALIGN(4);
		__preinit_array_start = .;
		KEEP (*(.preinit_array))
		__preinit_array_end = .;
	} >rom
	.init_array : {
		. = ALIGN(4);
		__init_array_start = .;
		KEEP (*(SORT(.init_array.*)))
		KEEP (*(.init_array))
		__init_array_end = .;
	} >rom
	.fini_array : {
		. = ALIGN(4);
		__fini_array_start = .;
		KEEP (*(.fini_array))
		KEEP (*(SORT(.fini_array.*)))
		__fini_array_end = .;
	} >rom

	/*
	 * Another section used by C++ stuff, appears when using newlib with
	 * 64bit (long long) printf support
	 */
	.ARM.extab : {
		*(.ARM.extab*)
	} >rom
	.ARM.exidx : {
		__exidx_start = .;
		*(.ARM.exidx*)
		__exidx_end = .;
	} >rom

	. = ALIGN(4);
	_etext = .;

	.data : {
		_data = .;
		*(.data*)	/* Read-write initialized data */
		. = ALIGN(4);
		_edata = .;
	} >ram AT >rom
	_data_loadaddr = LOADADDR(.data);

	.bss : {
		*(.bss*)	/* Read-write zero initialized data */
		*(COMMON)
		. = ALIGN(4);
		_ebss = .;
	} >ram

	/*
	 * The .eh_frame section appears to be used for C++ exception handling.
	 * You may need to fix this if you're using C++.
	 */
	/DISCARD/ : { *(.eh_frame) }

	. = ALIGN(4);
	end = .;
}

PROVIDE(_stack = ORIGIN(ram) + LENGTH(ram));

{'repo_name': 've3wwg/stm32f103c8t6', 'stars': '159', 'repo_language': 'C', 'file_name': 'Makefile', 'mime_type': 'text/x-makefile', 'hash': -4260383199208732726, 'source_dataset': 'data'}


/*
  Copyright (C) 2006-2009 Werner Dittmann

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
 * Authors: Werner Dittmann <Werner.Dittmann@t-online.de>
 */

#ifndef _ZRTPDH_H__
#define _ZRTPDH_H__

#include <stdint.h>

/**
 * @file zrtpDH.h
 * @brief Class that implemets Diffie-Helman key agreement for ZRTP
 *
 * @ingroup GNU_ZRTP
 * @{
 */

/**
 * Generates a number of random bytes.
 *
 * @param buf
 *    Pointer to a buffer that receives the random data. Must have a size
 *    of at least length bytes.
 *
 * @param length
 *    Number of random bytes to produce.
 */
#if defined(__cplusplus)
extern "C"
{
#endif
void randomZRTP(uint8_t *buf, int32_t length);
#if defined(__cplusplus)
}
#endif

#if defined(__cplusplus)

#include <libzrtpcpp/ZrtpConfigure.h>

const int32_t DH2K = 0;
const int32_t DH3K = 1;
const int32_t EC25 = 2;
const int32_t EC38 = 3;
const int32_t E255 = 4;
const int32_t E414 = 5;

/**
 * Implementation of Diffie-Helman for ZRTP
 *
 * This class defines functions to generate and compute the
 * Diffie-Helman public and secret data and the shared secret. According to
 * the ZRTP specification we use the MODP groups as defined by RFC 3526 for
 * length 3072 and 4096.
 *
 * @author Werner Dittmann <Werner.Dittmann@t-online.de>
 */

class ZrtpDH {

private:
    void* ctx;      ///< Context the DH
    int pkType;     ///< Which type of DH to use

public:
    /**
     * Create a Diffie-Helman key agreement algorithm
     *
     * @param type
     *     Name of the DH algorithm to use
     */
    ZrtpDH(const char* type);

    ~ZrtpDH();

    /**
     * Generates a public key based on the DH parameters and a random
     * private key.
     *
     * @return 1 on success, 0 on failure
     */
    int32_t generatePublicKey();

    /**
     * Returns the size in bytes of the DH parameter p.
     *
     * @return Size in bytes.
     */
    int32_t getDhSize() const;

    /**
     * Returns the size in bytes of computed public key.
     *
     * @return Size in bytes.
     */
    int32_t getPubKeySize() const;

    /**
     * Returns the bytes of computed secret key.
     *
     * Returns the bytes of the public key in network (big endian) order.#
     *
     * @param buf
     *    Pointer to a buffer of at least getPubKeySize() bytes.
     *
     * @return Size in bytes.
     */
    int32_t getPubKeyBytes(uint8_t *buf) const;

    /**
     * Compute the secret key and returns it to caller.
     *
     * This method computes the secret key based on the DH parameters, the
     * private key and the peer's public key.
     *
     * @param pubKeyBytes
     *    Pointer to the peer's public key bytes. Must be in big endian order.
     *
     * @param secret
     *    Pointer to a buffer that receives the secret key. This buffer must
     *    have a length of at least getSecretSize() bytes.
     *
     * @return the size of the shared secret on success, -1 on error.
     */
    int32_t computeSecretKey(uint8_t *pubKeyBytes, uint8_t *secret);

    /**
     * Check and validate the public key received from peer.
     *
     * Check if this is a correct Diffie-Helman public key. If the public
     * key value is either one or (P-1) then this is a wrong public key
     * value.
     *
     * @param pubKeyBytes
     *     Pointer to the peer's public key bytes. Must be in big endian order.
     *
     * @return 0 if check faild, 1 if public key value is ok.
     */
    int32_t checkPubKey(uint8_t* pubKeyBytes) const;

    /**
     * Get type of DH algorithm.
     *
     * @return
     *     Pointer to DH algorithm name
     */
    const char* getDHtype();
};
#endif /*__cpluscplus */
#endif

/**
 * @}
 */

/** EMACS **
 * Local variables:
 * mode: c++
 * c-default-style: ellemtel
 * c-basic-offset: 4
 * End:
 */

{'repo_name': 'AGProjects/python-sipsimple', 'stars': '207', 'repo_language': 'Python', 'file_name': 'format', 'mime_type': 'text/plain', 'hash': -7295675393774491457, 'source_dataset': 'data'}


<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

require __DIR__ . '/../../../Magento/Catalog/_files/multiple_products.php';

$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();

$productIds = range(10, 12, 1);
foreach ($productIds as $productId) {
    /** @var \Magento\CatalogInventory\Model\Stock\Item $stockItem */
    $stockItem = $objectManager->create(\Magento\CatalogInventory\Model\Stock\Item::class);
    $stockItem->load($productId, 'product_id');

    if (!$stockItem->getProductId()) {
        $stockItem->setProductId($productId);
    }
    $stockItem->setUseConfigManageStock(1);
    $stockItem->setQty(1000);
    $stockItem->setIsQtyDecimal(0);
    $stockItem->setIsInStock(1);
    $stockItem->save();
}

/** @var $product \Magento\Catalog\Model\Product */
$product = $objectManager->create(\Magento\Catalog\Model\Product::class);
$product->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE)
    ->setId(3)
    ->setAttributeSetId(4)
    ->setWebsiteIds([1])
    ->setName('Bundle Product')
    ->setSku('bundle-product')
    ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
    ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
    ->setStockData(['use_config_manage_stock' => 1, 'qty' => 100, 'is_qty_decimal' => 0, 'is_in_stock' => 1])
    ->setPriceView(1)
    ->setPriceType(1)
    ->setPrice(10.0)
    ->setShipmentType(0)
    ->setBundleOptionsData(
        [
            // Required "Drop-down" option
            [
                'title' => 'Option 1',
                'default_title' => 'Option 1',
                'type' => 'select',
                'required' => 1,
                'position' => 1,
                'delete' => '',
            ],
            // Required "Radio Buttons" option
            [
                'title' => 'Option 2',
                'default_title' => 'Option 2',
                'type' => 'radio',
                'required' => 1,
                'position' => 2,
                'delete' => '',
            ],
            // Required "Checkbox" option
            [
                'title' => 'Option 3',
                'default_title' => 'Option 3',
                'type' => 'checkbox',
                'required' => 1,
                'position' => 3,
                'delete' => '',
            ],
            // Required "Multiple Select" option
            [
                'title' => 'Option 4',
                'default_title' => 'Option 4',
                'type' => 'multi',
                'required' => 1,
                'position' => 4,
                'delete' => '',
            ],
            // Non-required "Multiple Select" option
            [
                'title' => 'Option 5',
                'default_title' => 'Option 5',
                'type' => 'multi',
                'required' => 0,
                'position' => 5,
                'delete' => '',
            ]
        ]
    )->setBundleSelectionsData(
        [
            [
                [
                    'product_id' => 10,
                    'selection_qty' => 1,
                    'selection_can_change_qty' => 1,
                    'delete' => '',
                    'option_id' => 1
                ],
                [
                    'product_id' => 11,
                    'selection_qty' => 1,
                    'selection_can_change_qty' => 1,
                    'delete' => '',
                    'option_id' => 1
                ]
            ],
            [
                [
                    'product_id' => 10,
                    'selection_qty' => 1,
                    'selection_can_change_qty' => 1,
                    'delete' => '',
                    'option_id' => 2
                ],
                [
                    'product_id' => 11,
                    'selection_qty' => 1,
                    'selection_can_change_qty' => 1,
                    'delete' => '',
                    'option_id' => 2
                ]
            ],
            [
                [
                    'product_id' => 10,
                    'selection_qty' => 1,
                    'delete' => '',
                    'option_id' => 3
                ],
                [
                    'product_id' => 11,
                    'selection_qty' => 1,
                    'delete' => '',
                    'option_id' => 3
                ]
            ],
            [
                [
                    'product_id' => 10,
                    'selection_qty' => 1,
                    'delete' => '',
                    'option_id' => 4
                ],
                [
                    'product_id' => 11,
                    'selection_qty' => 1,
                    'delete' => '',
                    'option_id' => 4
                ]
            ],
            [
                [
                    'product_id' => 10,
                    'selection_qty' => 1,
                    'delete' => '',
                    'option_id' => 5
                ],
                [
                    'product_id' => 11,
                    'selection_qty' => 1,
                    'delete' => '',
                    'option_id' => 5
                ]
            ]
        ]
    );
$productRepository = $objectManager->create(\Magento\Catalog\Api\ProductRepositoryInterface::class);

if ($product->getBundleOptionsData()) {
    $options = [];
    foreach ($product->getBundleOptionsData() as $key => $optionData) {
        if (!(bool)$optionData['delete']) {
            $option = $objectManager->create(\Magento\Bundle\Api\Data\OptionInterfaceFactory::class)
                ->create(['data' => $optionData]);
            $option->setSku($product->getSku());
            $option->setOptionId(null);

            $links = [];
            $bundleLinks = $product->getBundleSelectionsData();
            if (!empty($bundleLinks[$key])) {
                foreach ($bundleLinks[$key] as $linkData) {
                    if (!(bool)$linkData['delete']) {
                        $link = $objectManager->create(\Magento\Bundle\Api\Data\LinkInterfaceFactory::class)
                            ->create(['data' => $linkData]);
                        $linkProduct = $productRepository->getById($linkData['product_id']);
                        $link->setSku($linkProduct->getSku());
                        $link->setQty($linkData['selection_qty']);
                        $links[] = $link;
                    }
                }
                $option->setProductLinks($links);
                $options[] = $option;
            }
        }
    }
    $extension = $product->getExtensionAttributes();
    $extension->setBundleProductOptions($options);
    $product->setExtensionAttributes($extension);
}
$product->save();

{'repo_name': 'magento/graphql-ce', 'stars': '136', 'repo_language': 'PHP', 'file_name': 'report.phtml', 'mime_type': 'text/x-php', 'hash': -847902557906932476, 'source_dataset': 'data'}


package com.woorea.openstack.keystone.v3;

import com.woorea.openstack.keystone.v3.api.DomainsResource;
import com.woorea.openstack.keystone.v3.api.EndpointsResource;
import com.woorea.openstack.keystone.v3.api.RolesResource;
import com.woorea.openstack.keystone.v3.api.ServicesResource;
import com.woorea.openstack.keystone.v3.api.ProjectsResource;
import com.woorea.openstack.keystone.v3.api.TokensResource;
import com.woorea.openstack.keystone.v3.api.UsersResource;
import com.woorea.openstack.base.client.OpenStackClient;
import com.woorea.openstack.base.client.OpenStackClientConnector;

public class Keystone extends OpenStackClient {

	private final TokensResource TOKENS;

	private final DomainsResource DOMAINS;

	private final ProjectsResource PROJECTS;

	private final UsersResource USERS;

	private final RolesResource ROLES;

	private final ServicesResource SERVICES;

	private final EndpointsResource ENDPOINTS;

	public Keystone(String endpoint, OpenStackClientConnector connector) {
		super(endpoint, connector);
		TOKENS = new TokensResource(this);
		DOMAINS = new DomainsResource(this);
		PROJECTS = new ProjectsResource(this);
		USERS = new UsersResource(this);
		ROLES = new RolesResource(this);
		SERVICES = new ServicesResource(this);
		ENDPOINTS = new EndpointsResource(this);
	}

	public Keystone(String endpoint) {
		this(endpoint, null);
	}

	public TokensResource tokens() {
		return TOKENS;
	}

	public DomainsResource domains() {
		return DOMAINS;
	}

	public ProjectsResource projects() {
		return PROJECTS;
	}

	public UsersResource users() {
		return USERS;
	}

	public RolesResource roles() {
		return ROLES;
	}

	public ServicesResource services() {
		return SERVICES;
	}

	public EndpointsResource endpoints() {
		return ENDPOINTS;
	}

}

{'repo_name': 'woorea/openstack-java-sdk', 'stars': '178', 'repo_language': 'Java', 'file_name': 'Pools.java', 'mime_type': 'text/x-java', 'hash': 4591208162136498890, 'source_dataset': 'data'}


<UserControl
  x:Class="Dopamine.Views.Common.LyricsControl"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:commonviewmodels="clr-namespace:Dopamine.ViewModels.Common"
  xmlns:commonviews="clr-namespace:Dopamine.Views.Common"
  xmlns:cp="clr-namespace:Dopamine.Core.Prism;assembly=Dopamine.Core"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:dc="clr-namespace:Digimezzo.Foundation.WPF.Controls;assembly=Digimezzo.Foundation.WPF"
  xmlns:lyrics="clr-namespace:Dopamine.Core.Api.Lyrics;assembly=Dopamine.Core"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  xmlns:prismMvvm="clr-namespace:Prism.Mvvm;assembly=Prism.Wpf"
  xmlns:utils="clr-namespace:Dopamine.Utils"
  d:DesignHeight="300"
  d:DesignWidth="300"
  prismMvvm:ViewModelLocator.AutoWireViewModel="True"
  mc:Ignorable="d">

    <UserControl.Resources>
        <!--  Setting this CollectionViewSource as a ContextMenu resource doesn't work. Binding with ContextMenuPlaylists fails. No idea why.  -->
        <CollectionViewSource x:Key="PlaylistsDataSource" Source="{Binding ContextMenuPlaylists}" />
        <DataTemplate DataType="{x:Type commonviewmodels:LyricsViewModel}">
            <Grid>
                <Border Panel.ZIndex="1" Visibility="{Binding IsNoLyricsTextVisible, Converter={StaticResource BooleanToCollapsedConverter}}">
                    <StackPanel Visibility="{Binding DataContext.IsDownloadingLyrics, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Converter={StaticResource InvertingBooleanToVisibilityConverter}}">
                        <TextBlock
              FontSize="18"
              Foreground="{DynamicResource Brush_PrimaryText}"
              Text="{DynamicResource Language_No_Lyrics_Found}" />
                        <Button
              Margin="0,10,0,0"
              HorizontalAlignment="Left"
              Command="{Binding EditCommand}"
              Content="{DynamicResource Language_Add_Lyrics}"
              Style="{StaticResource LinkButton}" />
                    </StackPanel>
                </Border>
                <DockPanel Panel.ZIndex="0" Visibility="{Binding IsEditing, Converter={StaticResource BooleanToCollapsedConverter}}">
                    <TextBlock
            Margin="0,0,0,10"
            DockPanel.Dock="Top"
            Foreground="{DynamicResource Brush_Accent}"
            Text="{DynamicResource Language_Play_Song_And_Insert_Timestamp}"
            TextWrapping="Wrap" />
                    <StackPanel
            Margin="0,10,0,0"
            HorizontalAlignment="Right"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">
                        <Button
              Command="{Binding SaveCommand}"
              Content="{DynamicResource Language_Save_In_Audio_File}"
              Style="{StaticResource RegularButton}" />
                        <Button
              Margin="10,0,0,0"
              Command="{Binding CancelEditCommand}"
              Content="{DynamicResource Language_Cancel_Edit}"
              Style="{StaticResource RegularButton}" />
                    </StackPanel>
                    <Border Background="{DynamicResource Brush_ItemHovered}">
                        <TextBox
              x:Name="LyricsTextBox"
              AcceptsReturn="True"
              Background="{DynamicResource Brush_TextBoxBackgroundInvisible}"
              KeyDown="TextBox_KeyDown"
              Loaded="LyricsTextBox_Loaded"
              Style="{StaticResource LargeMetroTextBox}"
              Text="{Binding Lyrics.Text}"
              VerticalScrollBarVisibility="Auto" />
                    </Border>
                </DockPanel>
                <Grid Panel.ZIndex="0">
                    <ListBox
            x:Name="LyricsListBox"
            Padding="0,0,10,0"
            Panel.ZIndex="0"
            Background="Transparent"
            BorderThickness="0"
            ItemsSource="{Binding LyricsLines}"
            Loaded="LyricsListBox_Loaded"
            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
            ScrollViewer.VerticalScrollBarVisibility="Auto"
            Visibility="{Binding IsEditing, Converter={StaticResource InvertingBooleanToCollapsedConverter}}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Margin="0,0,10,0">
                                    <TextBlock
                    FontSize="{Binding DataContext.FontSize, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}}"
                    Foreground="{DynamicResource Brush_Accent}"
                    Text="{Binding Text}"
                    TextAlignment="{Binding DataContext.CenterLyrics, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}, Converter={StaticResource BooleanToCenterTextAlignmentConverter}}"
                    TextWrapping="Wrap"
                    Visibility="{Binding IsHighlighted, Converter={StaticResource BooleanToVisibilityConverter}}" />
                                    <TextBlock
                    FontSize="{Binding DataContext.FontSize, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}}"
                    Foreground="{DynamicResource Brush_PrimaryText}"
                    Text="{Binding Text}"
                    TextAlignment="{Binding DataContext.CenterLyrics, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}, Converter={StaticResource BooleanToCenterTextAlignmentConverter}}"
                    TextWrapping="Wrap"
                    Visibility="{Binding IsHighlighted, Converter={StaticResource InvertingBooleanToVisibilityConverter}}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                        <ListBox.ItemContainerStyle>
                            <!--  This style makes sure that the items are not selectable  -->
                            <Style TargetType="{x:Type ListBoxItem}">
                                <Setter Property="IsHitTestVisible" Value="False" />
                                <Setter Property="HorizontalContentAlignment" Value="{Binding DataContext.CenterLyrics, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ListBox}}, Converter={StaticResource BooleanToCenterHorizontalAlignmentConverter}}" />
                            </Style>
                        </ListBox.ItemContainerStyle>
                        <ListBox.ContextMenu>
                            <ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
                                <MenuItem StaysOpenOnClick="True">
                                    <MenuItem.Header>
                                        <DockPanel>
                                            <TextBlock
                        HorizontalAlignment="Left"
                        DockPanel.Dock="Left"
                        Text="{DynamicResource Language_Font_Size}" />
                                            <StackPanel
                        Margin="50,0,0,0"
                        DockPanel.Dock="Right"
                        Orientation="Horizontal">
                                                <Button
                          Command="{Binding DecreaseFontSizeCommand}"
                          Content="-"
                          Style="{StaticResource ContextMenuButton}" />
                                                <Border Width="60">
                                                    <TextBlock
                            Margin="5,0,5,0"
                            HorizontalAlignment="Center"
                            Text="{Binding FontSizePixels}" />
                                                </Border>
                                                <Button
                          Command="{Binding IncreaseFontSizeCommand}"
                          Content="+"
                          Style="{StaticResource ContextMenuButton}" />
                                            </StackPanel>
                                            <ContentControl />
                                        </DockPanel>
                                    </MenuItem.Header>
                                </MenuItem>
                                <Separator />
                                <MenuItem
                  Header="{DynamicResource Language_Automatic_Scrolling}"
                  IsCheckable="True"
                  IsChecked="{Binding AutomaticScrolling}" />
                                <MenuItem
                  Header="{DynamicResource Language_Center_Lyrics}"
                  IsCheckable="True"
                  IsChecked="{Binding CenterLyrics}" />
                                <Separator />
                                <MenuItem Command="{x:Static cp:ApplicationCommands.RefreshLyricsCommand}" Header="{DynamicResource Language_Search_Again}" />
                                <Separator />
                                <MenuItem
                  DisplayMemberPath="Name"
                  Header="{DynamicResource Language_Search_Online}"
                  IsEnabled="{Binding HasContextMenuSearchProviders}"
                  ItemsSource="{Binding ContextMenuSearchProviders}">
                                    <MenuItem.ItemContainerStyle>
                                        <Style TargetType="MenuItem">
                                            <Setter Property="Foreground" Value="{DynamicResource Brush_ContextMenuText}" />
                                            <Setter Property="Command" Value="{Binding DataContext.SearchOnlineCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type MenuItem}}}" />
                                            <Setter Property="CommandParameter" Value="{Binding Id}" />
                                        </Style>
                                    </MenuItem.ItemContainerStyle>
                                </MenuItem>
                                <Separator />
                                <MenuItem
                  Click="EditMenuItem_Click"
                  Command="{Binding EditCommand}"
                  Header="{DynamicResource Language_Edit}" />
                                <Separator />
                                <MenuItem Command="{Binding SaveIfNotEmptyCommand}" Header="{DynamicResource Language_Save_In_Audio_File}" />
                            </ContextMenu>
                        </ListBox.ContextMenu>
                    </ListBox>
                    <dc:ProgressRing
            Width="60"
            Height="60"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Panel.ZIndex="1"
            Foreground="{DynamicResource Brush_Accent}"
            IsActive="{Binding DataContext.IsDownloadingLyrics, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
            Visibility="{Binding DataContext.IsDownloadingLyrics, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
                </Grid>
            </Grid>
        </DataTemplate>
    </UserControl.Resources>

    <DockPanel
    x:Name="PlaylistPanel"
    HorizontalAlignment="Stretch"
    VerticalAlignment="Stretch">
        <!--  Cover  -->
        <StackPanel
      Width="290"
      VerticalAlignment="Top"
      DockPanel.Dock="Left">
            <StackPanel.ContextMenu>
                <ContextMenu>
                    <ContextMenu.Resources>
                        <utils:BindingProxy x:Key="NewPlaylistProxy" Data="{DynamicResource Language_New_Playlist}" />
                    </ContextMenu.Resources>
                    <MenuItem DisplayMemberPath="Name" Header="{DynamicResource Language_Add_To_Playlist}">
                        <MenuItem.ItemContainerStyle>
                            <Style TargetType="MenuItem">
                                <Setter Property="Command" Value="{Binding DataContext.AddPlayingTrackToPlaylistCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" />
                                <Setter Property="CommandParameter" Value="{Binding Name}" />
                            </Style>
                        </MenuItem.ItemContainerStyle>
                        <MenuItem.ItemsSource>
                            <CompositeCollection>
                                <MenuItem Header="{Binding Source={StaticResource NewPlaylistProxy}, Path=Data, Converter={StaticResource AddEllipsisConverter}}" />
                                <Separator />
                                <CollectionContainer Collection="{Binding Source={StaticResource PlaylistsDataSource}}" />
                            </CompositeCollection>
                        </MenuItem.ItemsSource>
                    </MenuItem>
                </ContextMenu>
            </StackPanel.ContextMenu>
            <Border
        x:Name="CoverArt"
        Width="250"
        Height="250"
        Margin="20"
        DockPanel.Dock="Left">
                <commonviews:CoverArtControl />
                <Border.Effect>
                    <DropShadowEffect
            BlurRadius="20"
            Opacity="{DynamicResource Opacity_CoverArtShadow}"
            ShadowDepth="0"
            Color="{DynamicResource Color_Black}" />
                </Border.Effect>
            </Border>
            <commonviews:PlaybackInfoControl
        Height="50"
        Margin="20,0,20,0"
        ShowAlbumInfo="False"
        TitleFontSize="22"
        TitleFontWeight="Light" />
            <!-- Lyrics source -->
            <Grid Visibility="{Binding LyricsViewModel.ShowSource, TargetNullValue=Hidden, FallbackValue=Hidden, Converter={StaticResource BooleanToVisibilityConverter}}">
                <!-- Source: audio file -->
                <StackPanel Margin="20,0,0,0" Orientation="Horizontal"
                            Visibility="{Binding LyricsViewModel.SourceType, Converter={StaticResource LyricSourceVisibilityConverter}, ConverterParameter={x:Static lyrics:SourceTypeEnum.Audio}}">
                    <TextBlock VerticalAlignment="Center" FontSize="17" Foreground="{DynamicResource Brush_SecondaryText}" Style="{StaticResource SegoeAssets}" Text="" />
                    <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource Brush_SecondaryText}" Text="{DynamicResource Language_Audio_File}" />
                </StackPanel>
                <!-- Source: LRC file -->
                <StackPanel Margin="20,0,0,0" Orientation="Horizontal"
                            Visibility="{Binding LyricsViewModel.SourceType, Converter={StaticResource LyricSourceVisibilityConverter}, ConverterParameter={x:Static lyrics:SourceTypeEnum.Lrc}}">
                    <TextBlock VerticalAlignment="Center" FontSize="17" Foreground="{DynamicResource Brush_SecondaryText}" Style="{StaticResource SegoeAssets}" Text="" />
                    <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource Brush_SecondaryText}" Text="{DynamicResource Language_Lyrics_File}" />
                </StackPanel>
                <!-- Source: online -->
                <StackPanel Margin="20,0,0,0" Orientation="Horizontal"
                            Visibility="{Binding LyricsViewModel.SourceType, Converter={StaticResource LyricSourceVisibilityConverter}, ConverterParameter={x:Static lyrics:SourceTypeEnum.Online}}">
                    <TextBlock VerticalAlignment="Center" FontSize="17" Foreground="{DynamicResource Brush_SecondaryText}" Style="{StaticResource SegoeAssets}"  Text="" />
                    <TextBlock Margin="5,0,0,0" VerticalAlignment="Center" Foreground="{DynamicResource Brush_SecondaryText}" Text="{Binding LyricsViewModel.Lyrics.Source}" />
                </StackPanel>
            </Grid>
        </StackPanel>
        <!--  Lyrics  -->
        <ContentControl Margin="10,20,0,0" Content="{Binding LyricsViewModel}" />
    </DockPanel>
</UserControl>

{'repo_name': 'digimezzo/dopamine-windows', 'stars': '871', 'repo_language': 'C#', 'file_name': 'Application.myapp', 'mime_type': 'text/xml', 'hash': -5990788184455406413, 'source_dataset': 'data'}


#ifndef BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP
#define BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP

//  (C) Copyright 2006-8 Anthony Williams
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)

#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/detail/thread_interruption.hpp>

#include <boost/config/abi_prefix.hpp>

namespace boost
{
    class shared_mutex
    {
    private:
        struct state_data
        {
            unsigned shared_count;
            bool exclusive;
            bool upgrade;
            bool exclusive_waiting_blocked;
        };

        state_data state;
        boost::mutex state_change;
        boost::condition_variable shared_cond;
        boost::condition_variable exclusive_cond;
        boost::condition_variable upgrade_cond;

        void release_waiters()
        {
            exclusive_cond.notify_one();
            shared_cond.notify_all();
        }

    public:
        shared_mutex()
        {
            state_data state_={0,0,0,0};
            state=state_;
        }

        ~shared_mutex()
        {
        }

        void lock_shared()
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);

            while(state.exclusive || state.exclusive_waiting_blocked)
            {
                shared_cond.wait(lk);
            }
            ++state.shared_count;
        }

        bool try_lock_shared()
        {
            boost::mutex::scoped_lock lk(state_change);

            if(state.exclusive || state.exclusive_waiting_blocked)
            {
                return false;
            }
            else
            {
                ++state.shared_count;
                return true;
            }
        }

        bool timed_lock_shared(system_time const& timeout)
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);

            while(state.exclusive || state.exclusive_waiting_blocked)
            {
                if(!shared_cond.timed_wait(lk,timeout))
                {
                    return false;
                }
            }
            ++state.shared_count;
            return true;
        }

        template<typename TimeDuration>
        bool timed_lock_shared(TimeDuration const & relative_time)
        {
            return timed_lock_shared(get_system_time()+relative_time);
        }

        void unlock_shared()
        {
            boost::mutex::scoped_lock lk(state_change);
            bool const last_reader=!--state.shared_count;

            if(last_reader)
            {
                if(state.upgrade)
                {
                    state.upgrade=false;
                    state.exclusive=true;
                    upgrade_cond.notify_one();
                }
                else
                {
                    state.exclusive_waiting_blocked=false;
                }
                release_waiters();
            }
        }

        void lock()
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);

            while(state.shared_count || state.exclusive)
            {
                state.exclusive_waiting_blocked=true;
                exclusive_cond.wait(lk);
            }
            state.exclusive=true;
        }

        bool timed_lock(system_time const& timeout)
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);

            while(state.shared_count || state.exclusive)
            {
                state.exclusive_waiting_blocked=true;
                if(!exclusive_cond.timed_wait(lk,timeout))
                {
                    if(state.shared_count || state.exclusive)
                    {
                        state.exclusive_waiting_blocked=false;
                        exclusive_cond.notify_one();
                        return false;
                    }
                    break;
                }
            }
            state.exclusive=true;
            return true;
        }

        template<typename TimeDuration>
        bool timed_lock(TimeDuration const & relative_time)
        {
            return timed_lock(get_system_time()+relative_time);
        }

        bool try_lock()
        {
            boost::mutex::scoped_lock lk(state_change);

            if(state.shared_count || state.exclusive)
            {
                return false;
            }
            else
            {
                state.exclusive=true;
                return true;
            }

        }

        void unlock()
        {
            boost::mutex::scoped_lock lk(state_change);
            state.exclusive=false;
            state.exclusive_waiting_blocked=false;
            release_waiters();
        }

        void lock_upgrade()
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);
            while(state.exclusive || state.exclusive_waiting_blocked || state.upgrade)
            {
                shared_cond.wait(lk);
            }
            ++state.shared_count;
            state.upgrade=true;
        }

        bool timed_lock_upgrade(system_time const& timeout)
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);
            while(state.exclusive || state.exclusive_waiting_blocked || state.upgrade)
            {
                if(!shared_cond.timed_wait(lk,timeout))
                {
                    if(state.exclusive || state.exclusive_waiting_blocked || state.upgrade)
                    {
                        return false;
                    }
                    break;
                }
            }
            ++state.shared_count;
            state.upgrade=true;
            return true;
        }

        template<typename TimeDuration>
        bool timed_lock_upgrade(TimeDuration const & relative_time)
        {
            return timed_lock_upgrade(get_system_time()+relative_time);
        }

        bool try_lock_upgrade()
        {
            boost::mutex::scoped_lock lk(state_change);
            if(state.exclusive || state.exclusive_waiting_blocked || state.upgrade)
            {
                return false;
            }
            else
            {
                ++state.shared_count;
                state.upgrade=true;
                return true;
            }
        }

        void unlock_upgrade()
        {
            boost::mutex::scoped_lock lk(state_change);
            state.upgrade=false;
            bool const last_reader=!--state.shared_count;

            if(last_reader)
            {
                state.exclusive_waiting_blocked=false;
                release_waiters();
            }
        }

        void unlock_upgrade_and_lock()
        {
            boost::this_thread::disable_interruption do_not_disturb;
            boost::mutex::scoped_lock lk(state_change);
            --state.shared_count;
            while(state.shared_count)
            {
                upgrade_cond.wait(lk);
            }
            state.upgrade=false;
            state.exclusive=true;
        }

        void unlock_and_lock_upgrade()
        {
            boost::mutex::scoped_lock lk(state_change);
            state.exclusive=false;
            state.upgrade=true;
            ++state.shared_count;
            state.exclusive_waiting_blocked=false;
            release_waiters();
        }

        void unlock_and_lock_shared()
        {
            boost::mutex::scoped_lock lk(state_change);
            state.exclusive=false;
            ++state.shared_count;
            state.exclusive_waiting_blocked=false;
            release_waiters();
        }

        void unlock_upgrade_and_lock_shared()
        {
            boost::mutex::scoped_lock lk(state_change);
            state.upgrade=false;
            state.exclusive_waiting_blocked=false;
            release_waiters();
        }
    };
}

#include <boost/config/abi_suffix.hpp>

#endif

{'repo_name': 'bumptop/BumpTop', 'stars': '337', 'repo_language': 'C++', 'file_name': 'windows.pro', 'mime_type': 'text/plain', 'hash': 6778614437930901241, 'source_dataset': 'data'}


<?php
/**
 * Qafoo PHP Refactoring Browser
 *
 * LICENSE
 *
 * This source file is subject to the MIT license that is bundled
 * with this package in the file LICENSE.txt.
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to kontakt@beberlei.de so I can send you a copy immediately.
 */

namespace QafooLabs\Refactoring\Adapters\PHPParser\Visitor;

use QafooLabs\Refactoring\Domain\Model\LineRange;
use PHPParser_Node;
use PHPParser_Node_Stmt;
use PHPParser_Node_Expr_FuncCall;

/**
 * Given a line range, collect the AST slice that is inside that range.
 */
class LineRangeStatementCollector extends \PHPParser_NodeVisitorAbstract
{
    /**
     * @var LineRange
     */
    private $lineRange;
    private $statements;

    public function __construct(LineRange $lineRange)
    {
        $this->lineRange = $lineRange;
        $this->statements = new \SplObjectStorage();
    }

    public function enterNode(PHPParser_Node $node)
    {
        if ( ! $this->lineRange->isInRange($node->getLine())) {
            return;
        }

        $parent = $node->getAttribute('parent');

        // TODO: Expensive (?)
        do {
            if ($parent && $this->statements->contains($parent)) {
                return;
            }
        } while($parent && $parent = $parent->getAttribute('parent'));

        $this->statements->attach($node);
    }

    public function getStatements()
    {
        return iterator_to_array($this->statements);
    }
}

{'repo_name': 'QafooLabs/php-refactoring-browser', 'stars': '569', 'repo_language': 'PHP', 'file_name': 'bounded_contexts.rst', 'mime_type': 'text/plain', 'hash': -1681505621233568487, 'source_dataset': 'data'}


package com.d.lib.common.view.dialog;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.StyleRes;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;

import com.d.lib.common.R;

/**
 * AbstractAlertDialog
 * Created by D on 2017/4/29.
 */
public abstract class AbstractAlertDialog extends AlertDialog {
    protected Context mContext;
    protected View mRootView;

    protected AbstractAlertDialog(@NonNull Context context) {
        this(context, R.style.lib_pub_dialog_style, false, 0, 0, 0);
    }

    protected AbstractAlertDialog(@NonNull Context context, @StyleRes int themeResId) {
        this(context, themeResId, false, 0, 0, 0);
    }

    /**
     * Creates a dialog window that uses a custom dialog style.
     *
     * @param context    Context
     * @param themeResId The dialog's layout resource
     * @param isSetWin   Set the gravity of the window
     * @param gravity    The desired gravity constant
     * @param width      The dialog's width
     * @param heith      The dialog's height
     */
    protected AbstractAlertDialog(@NonNull Context context, @StyleRes int themeResId, boolean isSetWin, int gravity, int width, int heith) {
        super(context, themeResId);
        this.mContext = context;
        this.mRootView = LayoutInflater.from(context).inflate(getLayoutRes(), null);
        setContentView(this.mRootView);
        setCanceledOnTouchOutside(true);
        setCancelable(true);
        if (isSetWin) {
            Window dialogWindow = getWindow();
            if (dialogWindow != null) {
                dialogWindow.setWindowAnimations(-1);
                dialogWindow.setBackgroundDrawableResource(android.R.color.transparent);
                dialogWindow.getDecorView().setPadding(0, 0, 0, 0);
                dialogWindow.setGravity(gravity);
                // Get the current layout param of the dialog
                WindowManager.LayoutParams p = dialogWindow.getAttributes();
                // Set dialog's width
                p.width = width;
                // Set dialog's height
                p.height = heith;
                dialogWindow.setAttributes(p);
            }
        }
        init(this.mRootView);
    }

    protected AbstractAlertDialog(Context context, int themeResId, ViewGroup.LayoutParams params) {
        super(context, themeResId);
        this.mContext = context;
        this.mRootView = LayoutInflater.from(context).inflate(getLayoutRes(), null);
        setContentView(this.mRootView, params);
        setCanceledOnTouchOutside(true);
        setCancelable(true);
        Window dialogWindow = getWindow();
        if (dialogWindow != null) {
            dialogWindow.setWindowAnimations(-1);
            dialogWindow.setBackgroundDrawableResource(android.R.color.transparent);
            dialogWindow.getDecorView().setPadding(0, 0, 0, 0);
        }
        init(this.mRootView);
    }

    /**
     * Show dialog
     */
    @Override
    public void show() {
        if (mContext instanceof Activity && ((Activity) mContext).isFinishing()) {
            return;
        }
        if (!isShowing()) {
            super.show();
        }
    }

    /**
     * Dismiss dialog
     */
    @Override
    public void dismiss() {
        if (isShowing()) {
            super.dismiss();
        }
    }

    protected abstract int getLayoutRes();

    protected abstract void init(View rootView);
}

{'repo_name': 'Dsiner/DMusic', 'stars': '107', 'repo_language': 'Java', 'file_name': 'ExampleUnitTest.java', 'mime_type': 'text/html', 'hash': 415584144814222091, 'source_dataset': 'data'}


Sitecore 9.2.0 rev. 002893 (WDP XP0 packages).zip

{'repo_name': 'Sitecore/docker-images', 'stars': '122', 'repo_language': 'PowerShell', 'file_name': 'settings.json', 'mime_type': 'text/plain', 'hash': 213872507430613079, 'source_dataset': 'data'}


//  Profile.swift
//
//  Copyright 2014 Awful Contributors. CC BY-NC-SA 3.0 US https://github.com/Awful/Awful.app

import Foundation

@objc(Profile)
public class Profile: AwfulManagedObject, Managed {
    public static var entityName: String { "Profile" }

    @NSManaged public var aboutMe: String?
    @NSManaged public var aimName: String?
    @NSManaged private var primitiveGender: String?
    @NSManaged public var homepageURL: URL?
    @NSManaged public var icqName: String?
    @NSManaged public var interests: String?
    @NSManaged var lastModifiedDate: Date
    @NSManaged public var lastPostDate: Date?
    @NSManaged public var location: String?
    @NSManaged public var occupation: String?
    @NSManaged public var postCount: Int32
    @NSManaged public var postRate: String?
    @NSManaged public var profilePictureURL: URL?
    @NSManaged public var yahooName: String?

    @NSManaged public var user: User

    public var gender: Gender? {
        get {
            willAccessValue(forKey: "gender")
            defer { didAccessValue(forKey: "gender") }
            return primitiveGender.flatMap { Gender(rawValue: $0) }
        }
        set {
            willChangeValue(forKey: "gender")
            defer { didChangeValue(forKey: "gender") }
            primitiveGender = newValue?.rawValue
        }
    }

    /// Genders available for selection on the Something Awful Forums.
    public enum Gender: String {
        case female = "female"
        case male = "male"
        case porpoise = "porpoise"
    }
}

{'repo_name': 'Awful/Awful.app', 'stars': '128', 'repo_language': 'Swift', 'file_name': 'MiniOnePassword.swift', 'mime_type': 'text/plain', 'hash': -4027597364139696156, 'source_dataset': 'data'}


# $FreeBSD$

PORTNAME=	Module-Pluggable
PORTVERSION=	5.2
CATEGORIES=	devel perl5
MASTER_SITES=	CPAN
PKGNAMEPREFIX=	p5-

MAINTAINER=	sunpoet@FreeBSD.org
COMMENT=	Automatically give your module the ability to have plugins

LICENSE=	ART10 GPLv1+
LICENSE_COMB=	dual

USES=		perl5
USE_PERL5=	configure

NO_ARCH=	yes

.include <bsd.port.mk>

{'repo_name': 'pfsense/FreeBSD-ports', 'stars': '255', 'repo_language': 'None', 'file_name': 'distinfo', 'mime_type': 'text/plain', 'hash': -452352786437665430, 'source_dataset': 'data'}


<?php
/**
 * Zend Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Zend
 * @package    Zend_Search_Lucene
 * @subpackage Analysis
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Utf8.php 24593 2012-01-05 20:35:02Z matthew $
 */

/** Zend_Search_Lucene_Analysis_Analyzer_Common */
require_once 'Zend/Search/Lucene/Analysis/Analyzer/Common.php';

/**
 * @category   Zend
 * @package    Zend_Search_Lucene
 * @subpackage Analysis
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */

class Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8 extends Zend_Search_Lucene_Analysis_Analyzer_Common
{
    /**
     * Current char position in an UTF-8 stream
     *
     * @var integer
     */
    private $_position;

    /**
     * Current binary position in an UTF-8 stream
     *
     * @var integer
     */
    private $_bytePosition;

    /**
     * Object constructor
     *
     * @throws Zend_Search_Lucene_Exception
     */
    public function __construct()
    {
        if (@preg_match('/\pL/u', 'a') != 1) {
            // PCRE unicode support is turned off
            require_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Utf8 analyzer needs PCRE unicode support to be enabled.');
        }
    }

    /**
     * Reset token stream
     */
    public function reset()
    {
        $this->_position     = 0;
        $this->_bytePosition = 0;

        // convert input into UTF-8
        if (strcasecmp($this->_encoding, 'utf8' ) != 0  &&
            strcasecmp($this->_encoding, 'utf-8') != 0 ) {
                $this->_input = iconv($this->_encoding, 'UTF-8', $this->_input);
                $this->_encoding = 'UTF-8';
        }
    }

    /**
     * Tokenization stream API
     * Get next token
     * Returns null at the end of stream
     *
     * @return Zend_Search_Lucene_Analysis_Token|null
     */
    public function nextToken()
    {
        if ($this->_input === null) {
            return null;
        }

        do {
            if (! preg_match('/[\p{L}]+/u', $this->_input, $match, PREG_OFFSET_CAPTURE, $this->_bytePosition)) {
                // It covers both cases a) there are no matches (preg_match(...) === 0)
                // b) error occured (preg_match(...) === FALSE)
                return null;
            }

            // matched string
            $matchedWord = $match[0][0];

            // binary position of the matched word in the input stream
            $binStartPos = $match[0][1];

            // character position of the matched word in the input stream
            $startPos = $this->_position +
                        iconv_strlen(substr($this->_input,
                                            $this->_bytePosition,
                                            $binStartPos - $this->_bytePosition),
                                     'UTF-8');
            // character postion of the end of matched word in the input stream
            $endPos = $startPos + iconv_strlen($matchedWord, 'UTF-8');

            $this->_bytePosition = $binStartPos + strlen($matchedWord);
            $this->_position     = $endPos;

            $token = $this->normalize(new Zend_Search_Lucene_Analysis_Token($matchedWord, $startPos, $endPos));
        } while ($token === null); // try again if token is skipped

        return $token;
    }
}

{'repo_name': 'Xtraball/Siberian', 'stars': '118', 'repo_language': 'JavaScript', 'file_name': 'edit.js', 'mime_type': 'text/plain', 'hash': -3748432966998275974, 'source_dataset': 'data'}


/***************************************************************************/
/*                                                                         */
/*  ftgloadr.h                                                             */
/*                                                                         */
/*    The FreeType glyph loader (specification).                           */
/*                                                                         */
/*  Copyright 2002-2015 by                                                 */
/*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
/*                                                                         */
/*  This file is part of the FreeType project, and may only be used,       */
/*  modified, and distributed under the terms of the FreeType project      */
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
/*  this file you indicate that you have read the license and              */
/*  understand and accept it fully.                                        */
/*                                                                         */
/***************************************************************************/

#ifndef __FTGLOADR_H__
#define __FTGLOADR_H__

#include <ft2build.h>
#include FT_FREETYPE_H

FT_BEGIN_HEADER

  /*************************************************************************/
  /*                                                                       */
  /* <Struct>                                                              */
  /*    FT_GlyphLoader                                                     */
  /*                                                                       */
  /* <Description>                                                         */
  /*    The glyph loader is an internal object used to load several glyphs */
  /*    together (for example, in the case of composites).                 */
  /*                                                                       */
  /* <Note>                                                                */
  /*    The glyph loader implementation is not part of the high-level API, */
  /*    hence the forward structure declaration.                           */
  /*                                                                       */
  typedef struct FT_GlyphLoaderRec_*  FT_GlyphLoader ;

#if 0  /* moved to freetype.h in version 2.2 */
#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
#define FT_SUBGLYPH_FLAG_SCALE                   8
#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
#define FT_SUBGLYPH_FLAG_2X2                  0x80
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
#endif

  typedef struct  FT_SubGlyphRec_
  {
    FT_Int     index;
    FT_UShort  flags;
    FT_Int     arg1;
    FT_Int     arg2;
    FT_Matrix  transform;

  } FT_SubGlyphRec;

  typedef struct  FT_GlyphLoadRec_
  {
    FT_Outline   outline;       /* outline                   */
    FT_Vector*   extra_points;  /* extra points table        */
    FT_Vector*   extra_points2; /* second extra points table */
    FT_UInt      num_subglyphs; /* number of subglyphs       */
    FT_SubGlyph  subglyphs;     /* subglyphs                 */

  } FT_GlyphLoadRec, *FT_GlyphLoad;

  typedef struct  FT_GlyphLoaderRec_
  {
    FT_Memory        memory;
    FT_UInt          max_points;
    FT_UInt          max_contours;
    FT_UInt          max_subglyphs;
    FT_Bool          use_extra;

    FT_GlyphLoadRec  base;
    FT_GlyphLoadRec  current;

    void*            other;            /* for possible future extension? */

  } FT_GlyphLoaderRec;

  /* create new empty glyph loader */
  FT_BASE( FT_Error )
  FT_GlyphLoader_New( FT_Memory        memory,
                      FT_GlyphLoader  *aloader );

  /* add an extra points table to a glyph loader */
  FT_BASE( FT_Error )
  FT_GlyphLoader_CreateExtra( FT_GlyphLoader  loader );

  /* destroy a glyph loader */
  FT_BASE( void )
  FT_GlyphLoader_Done( FT_GlyphLoader  loader );

  /* reset a glyph loader (frees everything int it) */
  FT_BASE( void )
  FT_GlyphLoader_Reset( FT_GlyphLoader  loader );

  /* rewind a glyph loader */
  FT_BASE( void )
  FT_GlyphLoader_Rewind( FT_GlyphLoader  loader );

  /* check that there is enough space to add `n_points' and `n_contours' */
  /* to the glyph loader                                                 */
  FT_BASE( FT_Error )
  FT_GlyphLoader_CheckPoints( FT_GlyphLoader  loader,
                              FT_UInt         n_points,
                              FT_UInt         n_contours );

#define FT_GLYPHLOADER_CHECK_P( _loader, _count )       \
  ( (_count) == 0                                    || \
    ( (FT_UInt)(_loader)->base.outline.n_points    +    \
      (FT_UInt)(_loader)->current.outline.n_points +    \
      (FT_UInt)(_count) ) <= (_loader)->max_points   )

#define FT_GLYPHLOADER_CHECK_C( _loader, _count )         \
  ( (_count) == 0                                      || \
    ( (FT_UInt)(_loader)->base.outline.n_contours    +    \
      (FT_UInt)(_loader)->current.outline.n_contours +    \
      (FT_UInt)(_count) ) <= (_loader)->max_contours   )

#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \
  ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points )   &&              \
      FT_GLYPHLOADER_CHECK_C( _loader, _contours ) )               \
    ? 0                                                            \
    : FT_GlyphLoader_CheckPoints( (_loader),                       \
                                  (FT_UInt)(_points),              \
                                  (FT_UInt)(_contours) ) )

  /* check that there is enough space to add `n_subs' sub-glyphs to */
  /* a glyph loader                                                 */
  FT_BASE( FT_Error )
  FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader  loader,
                                 FT_UInt         n_subs );

  /* prepare a glyph loader, i.e. empty the current glyph */
  FT_BASE( void )
  FT_GlyphLoader_Prepare( FT_GlyphLoader  loader );

  /* add the current glyph to the base glyph */
  FT_BASE( void )
  FT_GlyphLoader_Add( FT_GlyphLoader  loader );

  /* copy points from one glyph loader to another */
  FT_BASE( FT_Error )
  FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,
                             FT_GlyphLoader  source );

 /* */

FT_END_HEADER

#endif /* __FTGLOADR_H__ */

/* END */

{'repo_name': '9miao/CrossApp', 'stars': '809', 'repo_language': 'C++', 'file_name': 'CABarItem.h', 'mime_type': 'text/x-c++', 'hash': 3475003566134221787, 'source_dataset': 'data'}


{% load i18n %}
{% load xadmin_tags %}
{% load crispy_forms_tags %}
<form class="exform quick-form" {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form">{% csrf_token %}
  {% crispy form %}
</form>
{{ media.css }}
{{ media.js }}

{'repo_name': 'myminwang/online', 'stars': '101', 'repo_language': 'Python', 'file_name': 'mobile.py', 'mime_type': 'text/x-python', 'hash': 8566649372847372385, 'source_dataset': 'data'}


/*==============================================================================

  Program: 3D Slicer

  Copyright (c) Kitware Inc.

  See COPYRIGHT.txt
  or http://www.slicer.org/copyright/copyright.txt for details.

  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.

  This file was originally developed by Benjamin LONG, Kitware Inc.
  and was partially funded by NIH grant 3P41RR013218-12S1

==============================================================================*/

#ifndef __qSlicerCLIModuleWidgetEventPlayer_h
#define __qSlicerCLIModuleWidgetEventPlayer_h

// QtTesting includes
#include <pqWidgetEventPlayer.h>

// QtCLI includes
#include "qSlicerBaseQTCLIExport.h"

class Q_SLICER_BASE_QTCLI_EXPORT qSlicerCLIModuleWidgetEventPlayer : public pqWidgetEventPlayer
{
  Q_OBJECT

public:
  typedef pqWidgetEventPlayer Superclass;
  qSlicerCLIModuleWidgetEventPlayer(QObject* parent = nullptr);

  using Superclass::playEvent;
  bool playEvent(QObject *Object, const QString &Command, const QString &Arguments, bool &Error) override;

private:
  qSlicerCLIModuleWidgetEventPlayer(const qSlicerCLIModuleWidgetEventPlayer&); // NOT implemented
  qSlicerCLIModuleWidgetEventPlayer& operator=(const qSlicerCLIModuleWidgetEventPlayer&); // NOT implemented
};

#endif // __qSlicerCLIModuleWidgetEventPlayer_h

{'repo_name': 'Slicer/SlicerGitSVNArchive', 'stars': '887', 'repo_language': 'C++', 'file_name': 'vtkFSSurfaceReader.h', 'mime_type': 'text/x-c++', 'hash': -8607737570559682309, 'source_dataset': 'data'}