<?php

declare(strict_types=1);

/*
 * This file is part of JoliCode's Slack PHP API project.
 *
 * (c) JoliCode <coucou@jolicode.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace JoliCode\Slack\Api\Normalizer;

use Jane\JsonSchemaRuntime\Normalizer\CheckArray;
use Jane\JsonSchemaRuntime\Reference;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

class EmojiListGetResponsedefaultNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
    use DenormalizerAwareTrait;
    use NormalizerAwareTrait;
    use CheckArray;

    public function supportsDenormalization($data, $type, $format = null)
    {
        return 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === $type;
    }

    public function supportsNormalization($data, $format = null)
    {
        return \is_object($data) && 'JoliCode\\Slack\\Api\\Model\\EmojiListGetResponsedefault' === \get_class($data);
    }

    public function denormalize($data, $class, $format = null, array $context = [])
    {
        if (isset($data['$ref'])) {
            return new Reference($data['$ref'], $context['document-origin']);
        }
        if (isset($data['$recursiveRef'])) {
            return new Reference($data['$recursiveRef'], $context['document-origin']);
        }
        $object = new \JoliCode\Slack\Api\Model\EmojiListGetResponsedefault();
        if (\array_key_exists('ok', $data) && null !== $data['ok']) {
            $object->setOk($data['ok']);
            unset($data['ok']);
        } elseif (\array_key_exists('ok', $data) && null === $data['ok']) {
            $object->setOk(null);
        }
        foreach ($data as $key => $value) {
            if (preg_match('/.*/', (string) $key)) {
                $object[$key] = $value;
            }
        }

        return $object;
    }

    public function normalize($object, $format = null, array $context = [])
    {
        $data = [];
        if (null !== $object->getOk()) {
            $data['ok'] = $object->getOk();
        }
        foreach ($object as $key => $value) {
            if (preg_match('/.*/', (string) $key)) {
                $data[$key] = $value;
            }
        }

        return $data;
    }
}

{'repo_name': 'jolicode/slack-php-api', 'stars': '105', 'repo_language': 'PHP', 'file_name': 'posting-message.php', 'mime_type': 'text/x-php', 'hash': 1753115235114696445, 'source_dataset': 'data'}


// C Primer Plus
// Chapter 12 Exercise 2:

// Gasoline consumption commonly is computed in miles per gallon in the U.S.
// and in liters per 100 kilometers in Europe. What follows is part of a
// program that asks the user to choose a mode (metric or U.S.) and then
// gathers data and computes fuel consumption. If the user enters an incorrect
// mode, the program comments on that and uses the most recent mode. Supply a
// header file and a pe12-2a.c source code file to make this work. The source
// code file should define three file-scope, internal-linkage variables. One
// represents the mode, one represents the distance, and one represents the
// fuel consumed. The get_info() function prompts for data according to the
// mode setting and stores the responses in the file-scope variables. The
// show_info() function calculates and displays the fuel consumption based on
// the mode setting. You can assume the user responds with numeric input.

// compile with exercise02-b.c

#include <stdio.h>
#include "exercise02.h"

int main(void)
{
	int mode;

	printf("Enter 0 for metric mode, 1 for US mode: ");
	scanf("%d", &mode);
	while (mode >= 0)
	{
		set_mode(mode);
		get_info();
		show_info();
		printf("Enter 0 for metric mode, 1 for US mode");
		printf(" (-1 to quit): ");
		scanf("%d", &mode);
	}

	printf("Done.\n");
	return 0;
}

{'repo_name': 'sgreenlee/C-Primer-Plus-Exercises', 'stars': '173', 'repo_language': 'C', 'file_name': 'exercise05.c', 'mime_type': 'text/x-c', 'hash': -6065428751490955377, 'source_dataset': 'data'}


/*
Copyright 2016 The Kubernetes Authors.

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.
*/

package internalversion

import (
	api "k8s.io/kubernetes/pkg/api"
	registered "k8s.io/kubernetes/pkg/apimachinery/registered"
	restclient "k8s.io/kubernetes/pkg/client/restclient"
)

type CoreInterface interface {
	RESTClient() restclient.Interface
	ComponentStatusesGetter
	ConfigMapsGetter
	EndpointsGetter
	EventsGetter
	LimitRangesGetter
	NamespacesGetter
	NodesGetter
	PersistentVolumesGetter
	PersistentVolumeClaimsGetter
	PodsGetter
	PodTemplatesGetter
	ReplicationControllersGetter
	ResourceQuotasGetter
	SecretsGetter
	ServicesGetter
	ServiceAccountsGetter
}

// CoreClient is used to interact with features provided by the k8s.io/kubernetes/pkg/apimachinery/registered.Group group.
type CoreClient struct {
	restClient restclient.Interface
}

func (c *CoreClient) ComponentStatuses() ComponentStatusInterface {
	return newComponentStatuses(c)
}

func (c *CoreClient) ConfigMaps(namespace string) ConfigMapInterface {
	return newConfigMaps(c, namespace)
}

func (c *CoreClient) Endpoints(namespace string) EndpointsInterface {
	return newEndpoints(c, namespace)
}

func (c *CoreClient) Events(namespace string) EventInterface {
	return newEvents(c, namespace)
}

func (c *CoreClient) LimitRanges(namespace string) LimitRangeInterface {
	return newLimitRanges(c, namespace)
}

func (c *CoreClient) Namespaces() NamespaceInterface {
	return newNamespaces(c)
}

func (c *CoreClient) Nodes() NodeInterface {
	return newNodes(c)
}

func (c *CoreClient) PersistentVolumes() PersistentVolumeInterface {
	return newPersistentVolumes(c)
}

func (c *CoreClient) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface {
	return newPersistentVolumeClaims(c, namespace)
}

func (c *CoreClient) Pods(namespace string) PodInterface {
	return newPods(c, namespace)
}

func (c *CoreClient) PodTemplates(namespace string) PodTemplateInterface {
	return newPodTemplates(c, namespace)
}

func (c *CoreClient) ReplicationControllers(namespace string) ReplicationControllerInterface {
	return newReplicationControllers(c, namespace)
}

func (c *CoreClient) ResourceQuotas(namespace string) ResourceQuotaInterface {
	return newResourceQuotas(c, namespace)
}

func (c *CoreClient) Secrets(namespace string) SecretInterface {
	return newSecrets(c, namespace)
}

func (c *CoreClient) Services(namespace string) ServiceInterface {
	return newServices(c, namespace)
}

func (c *CoreClient) ServiceAccounts(namespace string) ServiceAccountInterface {
	return newServiceAccounts(c, namespace)
}

// NewForConfig creates a new CoreClient for the given config.
func NewForConfig(c *restclient.Config) (*CoreClient, error) {
	config := *c
	if err := setConfigDefaults(&config); err != nil {
		return nil, err
	}
	client, err := restclient.RESTClientFor(&config)
	if err != nil {
		return nil, err
	}
	return &CoreClient{client}, nil
}

// NewForConfigOrDie creates a new CoreClient for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *CoreClient {
	client, err := NewForConfig(c)
	if err != nil {
		panic(err)
	}
	return client
}

// New creates a new CoreClient for the given RESTClient.
func New(c restclient.Interface) *CoreClient {
	return &CoreClient{c}
}

func setConfigDefaults(config *restclient.Config) error {
	// if core group is not registered, return an error
	g, err := registered.Group("")
	if err != nil {
		return err
	}
	config.APIPath = "/api"
	if config.UserAgent == "" {
		config.UserAgent = restclient.DefaultKubernetesUserAgent()
	}
	if config.GroupVersion == nil || config.GroupVersion.Group != g.GroupVersion.Group {
		copyGroupVersion := g.GroupVersion
		config.GroupVersion = &copyGroupVersion
	}
	config.NegotiatedSerializer = api.Codecs

	if config.QPS == 0 {
		config.QPS = 5
	}
	if config.Burst == 0 {
		config.Burst = 10
	}
	return nil
}

// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CoreClient) RESTClient() restclient.Interface {
	if c == nil {
		return nil
	}
	return c.restClient
}

{'repo_name': 'continuouspipe/continuouspipe', 'stars': '165', 'repo_language': 'PHP', 'file_name': 'xsrf.go', 'mime_type': 'text/plain', 'hash': 6809521331161140414, 'source_dataset': 'data'}


/* original parser id follows */
/* yysccsid[] = "@(#)yaccpar	1.9 (Berkeley) 02/21/93" */
/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */

#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define YYCHECK "yyyymmdd"

#define YYEMPTY        (-1)
#define yyclearin      (yychar = YYEMPTY)
#define yyerrok        (yyerrflag = 0)
#define YYRECOVERING() (yyerrflag != 0)
#define YYENOMEM       (-2)
#define YYEOF          0

#ifndef yyparse
#define yyparse    calc2_parse
#endif /* yyparse */

#ifndef yylex
#define yylex      calc2_lex
#endif /* yylex */

#ifndef yyerror
#define yyerror    calc2_error
#endif /* yyerror */

#ifndef yychar
#define yychar     calc2_char
#endif /* yychar */

#ifndef yyval
#define yyval      calc2_val
#endif /* yyval */

#ifndef yylval
#define yylval     calc2_lval
#endif /* yylval */

#ifndef yydebug
#define yydebug    calc2_debug
#endif /* yydebug */

#ifndef yynerrs
#define yynerrs    calc2_nerrs
#endif /* yynerrs */

#ifndef yyerrflag
#define yyerrflag  calc2_errflag
#endif /* yyerrflag */

#ifndef yylhs
#define yylhs      calc2_lhs
#endif /* yylhs */

#ifndef yylen
#define yylen      calc2_len
#endif /* yylen */

#ifndef yydefred
#define yydefred   calc2_defred
#endif /* yydefred */

#ifndef yydgoto
#define yydgoto    calc2_dgoto
#endif /* yydgoto */

#ifndef yysindex
#define yysindex   calc2_sindex
#endif /* yysindex */

#ifndef yyrindex
#define yyrindex   calc2_rindex
#endif /* yyrindex */

#ifndef yygindex
#define yygindex   calc2_gindex
#endif /* yygindex */

#ifndef yytable
#define yytable    calc2_table
#endif /* yytable */

#ifndef yycheck
#define yycheck    calc2_check
#endif /* yycheck */

#ifndef yyname
#define yyname     calc2_name
#endif /* yyname */

#ifndef yyrule
#define yyrule     calc2_rule
#endif /* yyrule */
#define YYPREFIX "calc2_"

#define YYPURE 0

#line 7 "calc2.y"
# include <stdio.h>
# include <ctype.h>

#ifdef YYBISON
#define YYLEX_PARAM base
#define YYLEX_DECL() yylex(int *YYLEX_PARAM)
#define YYERROR_DECL() yyerror(int regs[26], int *base, const char *s)
int YYLEX_DECL();
static void YYERROR_DECL();
#endif

#line 113 "calc2.tab.c"

#if ! defined(YYSTYPE) && ! defined(YYSTYPE_IS_DECLARED)
/* Default: YYSTYPE is the semantic value type. */
typedef int YYSTYPE;
# define YYSTYPE_IS_DECLARED 1
#endif

/* compatibility with bison */
#ifdef YYPARSE_PARAM
/* compatibility with FreeBSD */
# ifdef YYPARSE_PARAM_TYPE
#  define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)
# else
#  define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)
# endif
#else
# define YYPARSE_DECL() yyparse(int regs[26], int *base)
#endif

/* Parameters sent to lex. */
#ifdef YYLEX_PARAM
# define YYLEX_DECL() yylex(void *YYLEX_PARAM)
# define YYLEX yylex(YYLEX_PARAM)
#else
# define YYLEX_DECL() yylex(int *base)
# define YYLEX yylex(base)
#endif

/* Parameters sent to yyerror. */
#ifndef YYERROR_DECL
#define YYERROR_DECL() yyerror(int regs[26], int *base, const char *s)
#endif
#ifndef YYERROR_CALL
#define YYERROR_CALL(msg) yyerror(regs, base, msg)
#endif

extern int YYPARSE_DECL();

#define DIGIT 257
#define LETTER 258
#define UMINUS 259
#define YYERRCODE 256
typedef short YYINT;
static const YYINT calc2_lhs[] = {                       -1,
    0,    0,    0,    1,    1,    2,    2,    2,    2,    2,
    2,    2,    2,    2,    2,    2,    3,    3,
};
static const YYINT calc2_len[] = {                        2,
    0,    3,    3,    1,    3,    3,    3,    3,    3,    3,
    3,    3,    3,    2,    1,    1,    1,    2,
};
static const YYINT calc2_defred[] = {                     1,
    0,    0,   17,    0,    0,    0,    0,    0,    0,    3,
    0,   15,   14,    0,    2,    0,    0,    0,    0,    0,
    0,    0,   18,    0,    6,    0,    0,    0,    0,    9,
   10,   11,
};
static const YYINT calc2_dgoto[] = {                      1,
    7,    8,    9,
};
static const YYINT calc2_sindex[] = {                     0,
  -40,   -7,    0,  -55,  -38,  -38,    1,  -29, -247,    0,
  -38,    0,    0,   22,    0,  -38,  -38,  -38,  -38,  -38,
  -38,  -38,    0,  -29,    0,   51,   60,  -20,  -20,    0,
    0,    0,
};
static const YYINT calc2_rindex[] = {                     0,
    0,    0,    0,    2,    0,    0,    0,    9,   -9,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,   10,    0,   -6,   14,    5,   13,    0,
    0,    0,
};
static const YYINT calc2_gindex[] = {                     0,
    0,   65,    0,
};
#define YYTABLESIZE 220
static const YYINT calc2_table[] = {                      6,
   16,    6,   10,   13,    5,   11,    5,   22,   17,   23,
   15,   15,   20,   18,    7,   19,   22,   21,    4,    5,
    0,   20,    8,   12,    0,    0,   21,   16,   16,    0,
    0,   16,   16,   16,   13,   16,    0,   16,   15,   15,
    0,    0,    7,   15,   15,    7,   15,    7,   15,    7,
    8,   12,    0,    8,   12,    8,    0,    8,   22,   17,
    0,    0,   25,   20,   18,    0,   19,    0,   21,   13,
   14,    0,    0,    0,    0,   24,    0,    0,    0,    0,
   26,   27,   28,   29,   30,   31,   32,   22,   17,    0,
    0,    0,   20,   18,   16,   19,   22,   21,    0,    0,
    0,   20,   18,    0,   19,    0,   21,    0,    0,    0,
    0,    0,    0,    0,   16,    0,    0,   13,    0,    0,
    0,    0,    0,    0,    0,   15,    0,    0,    7,    0,
    0,    0,    0,    0,    0,    0,    8,   12,    0,    0,
    0,    0,    0,    0,    0,   16,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    2,    3,    4,    3,   12,
};
static const YYINT calc2_check[] = {                     40,
   10,   40,   10,   10,   45,   61,   45,   37,   38,  257,
   10,   10,   42,   43,   10,   45,   37,   47,   10,   10,
   -1,   42,   10,   10,   -1,   -1,   47,   37,   38,   -1,
   -1,   41,   42,   43,   41,   45,   -1,   47,   37,   38,
   -1,   -1,   38,   42,   43,   41,   45,   43,   47,   45,
   38,   38,   -1,   41,   41,   43,   -1,   45,   37,   38,
   -1,   -1,   41,   42,   43,   -1,   45,   -1,   47,    5,
    6,   -1,   -1,   -1,   -1,   11,   -1,   -1,   -1,   -1,
   16,   17,   18,   19,   20,   21,   22,   37,   38,   -1,
   -1,   -1,   42,   43,  124,   45,   37,   47,   -1,   -1,
   -1,   42,   43,   -1,   45,   -1,   47,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,  124,   -1,   -1,  124,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,  124,   -1,   -1,  124,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,  124,  124,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,  124,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,  256,  257,  258,  257,  258,
};
#define YYFINAL 1
#ifndef YYDEBUG
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 259
#define YYUNDFTOKEN 265
#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))
#if YYDEBUG
static const char *const calc2_name[] = {

"end-of-file",0,0,0,0,0,0,0,0,0,"'\\n'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'",0,"'-'",0,"'/'",0,0,0,0,0,0,0,
0,0,0,0,0,0,"'='",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'|'",0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,"DIGIT","LETTER","UMINUS",0,0,0,0,0,"illegal-symbol",
};
static const char *const calc2_rule[] = {
"$accept : list",
"list :",
"list : list stat '\\n'",
"list : list error '\\n'",
"stat : expr",
"stat : LETTER '=' expr",
"expr : '(' expr ')'",
"expr : expr '+' expr",
"expr : expr '-' expr",
"expr : expr '*' expr",
"expr : expr '/' expr",
"expr : expr '%' expr",
"expr : expr '&' expr",
"expr : expr '|' expr",
"expr : '-' expr",
"expr : LETTER",
"expr : number",
"number : DIGIT",
"number : number DIGIT",

};
#endif

int      yydebug;
int      yynerrs;

int      yyerrflag;
int      yychar;
YYSTYPE  yyval;
YYSTYPE  yylval;

/* define the initial stack-sizes */
#ifdef YYSTACKSIZE
#undef YYMAXDEPTH
#define YYMAXDEPTH  YYSTACKSIZE
#else
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
#define YYSTACKSIZE 10000
#define YYMAXDEPTH  10000
#endif
#endif

#define YYINITSTACKSIZE 200

typedef struct {
    unsigned stacksize;
    YYINT    *s_base;
    YYINT    *s_mark;
    YYINT    *s_last;
    YYSTYPE  *l_base;
    YYSTYPE  *l_mark;
} YYSTACKDATA;
/* variables for the parser stack */
static YYSTACKDATA yystack;
#line 73 "calc2.y"
 /* start of programs */

#ifdef YYBYACC
extern int YYLEX_DECL();
#endif

int
main (void)
{
    int regs[26];
    int base = 10;

    while(!feof(stdin)) {
	yyparse(regs, &base);
    }
    return 0;
}

#define UNUSED(x) ((void)(x))

static void
YYERROR_DECL()
{
    UNUSED(regs); /* %parse-param regs is not actually used here */
    UNUSED(base); /* %parse-param base is not actually used here */
    fprintf(stderr, "%s\n", s);
}

int
YYLEX_DECL()
{
	/* lexical analysis routine */
	/* returns LETTER for a lower case letter, yylval = 0 through 25 */
	/* return DIGIT for a digit, yylval = 0 through 9 */
	/* all other characters are returned immediately */

    int c;

    while( (c=getchar()) == ' ' )   { /* skip blanks */ }

    /* c is now nonblank */

    if( islower( c )) {
	yylval = c - 'a';
	return ( LETTER );
    }
    if( isdigit( c )) {
	yylval = (c - '0') % (*base);
	return ( DIGIT );
    }
    return( c );
}
#line 367 "calc2.tab.c"

#if YYDEBUG
#include <stdio.h>		/* needed for printf */
#endif

#include <stdlib.h>	/* needed for malloc, etc */
#include <string.h>	/* needed for memset */

/* allocate initial stack or double stack size, up to YYMAXDEPTH */
static int yygrowstack(YYSTACKDATA *data)
{
    int i;
    unsigned newsize;
    YYINT *newss;
    YYSTYPE *newvs;

    if ((newsize = data->stacksize) == 0)
        newsize = YYINITSTACKSIZE;
    else if (newsize >= YYMAXDEPTH)
        return YYENOMEM;
    else if ((newsize *= 2) > YYMAXDEPTH)
        newsize = YYMAXDEPTH;

    i = (int) (data->s_mark - data->s_base);
    newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));
    if (newss == 0)
        return YYENOMEM;

    data->s_base = newss;
    data->s_mark = newss + i;

    newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));
    if (newvs == 0)
        return YYENOMEM;

    data->l_base = newvs;
    data->l_mark = newvs + i;

    data->stacksize = newsize;
    data->s_last = data->s_base + newsize - 1;
    return 0;
}

#if YYPURE || defined(YY_NO_LEAKS)
static void yyfreestack(YYSTACKDATA *data)
{
    free(data->s_base);
    free(data->l_base);
    memset(data, 0, sizeof(*data));
}
#else
#define yyfreestack(data) /* nothing */
#endif

#define YYABORT  goto yyabort
#define YYREJECT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR  goto yyerrlab

int
YYPARSE_DECL()
{
    int yym, yyn, yystate;
#if YYDEBUG
    const char *yys;

    if ((yys = getenv("YYDEBUG")) != 0)
    {
        yyn = *yys;
        if (yyn >= '0' && yyn <= '9')
            yydebug = yyn - '0';
    }
#endif

    yynerrs = 0;
    yyerrflag = 0;
    yychar = YYEMPTY;
    yystate = 0;

#if YYPURE
    memset(&yystack, 0, sizeof(yystack));
#endif

    if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
    yystack.s_mark = yystack.s_base;
    yystack.l_mark = yystack.l_base;
    yystate = 0;
    *yystack.s_mark = 0;

yyloop:
    if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
    if (yychar < 0)
    {
        if ((yychar = YYLEX) < 0) yychar = YYEOF;
#if YYDEBUG
        if (yydebug)
        {
            yys = yyname[YYTRANSLATE(yychar)];
            printf("%sdebug: state %d, reading %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
    }
    if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: state %d, shifting to state %d\n",
                    YYPREFIX, yystate, yytable[yyn]);
#endif
        if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
        {
            goto yyoverflow;
        }
        yystate = yytable[yyn];
        *++yystack.s_mark = yytable[yyn];
        *++yystack.l_mark = yylval;
        yychar = YYEMPTY;
        if (yyerrflag > 0)  --yyerrflag;
        goto yyloop;
    }
    if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
        yyn = yytable[yyn];
        goto yyreduce;
    }
    if (yyerrflag) goto yyinrecovery;

    YYERROR_CALL("syntax error");

    goto yyerrlab;

yyerrlab:
    ++yynerrs;

yyinrecovery:
    if (yyerrflag < 3)
    {
        yyerrflag = 3;
        for (;;)
        {
            if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 &&
                    yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: state %d, error recovery shifting\
 to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
#endif
                if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
                {
                    goto yyoverflow;
                }
                yystate = yytable[yyn];
                *++yystack.s_mark = yytable[yyn];
                *++yystack.l_mark = yylval;
                goto yyloop;
            }
            else
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: error recovery discarding state %d\n",
                            YYPREFIX, *yystack.s_mark);
#endif
                if (yystack.s_mark <= yystack.s_base) goto yyabort;
                --yystack.s_mark;
                --yystack.l_mark;
            }
        }
    }
    else
    {
        if (yychar == YYEOF) goto yyabort;
#if YYDEBUG
        if (yydebug)
        {
            yys = yyname[YYTRANSLATE(yychar)];
            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
        yychar = YYEMPTY;
        goto yyloop;
    }

yyreduce:
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
                YYPREFIX, yystate, yyn, yyrule[yyn]);
#endif
    yym = yylen[yyn];
    if (yym)
        yyval = yystack.l_mark[1-yym];
    else
        memset(&yyval, 0, sizeof yyval);
    switch (yyn)
    {
case 3:
#line 35 "calc2.y"
	{  yyerrok ; }
break;
case 4:
#line 39 "calc2.y"
	{  printf("%d\n",yystack.l_mark[0]);}
break;
case 5:
#line 41 "calc2.y"
	{  regs[yystack.l_mark[-2]] = yystack.l_mark[0]; }
break;
case 6:
#line 45 "calc2.y"
	{  yyval = yystack.l_mark[-1]; }
break;
case 7:
#line 47 "calc2.y"
	{  yyval = yystack.l_mark[-2] + yystack.l_mark[0]; }
break;
case 8:
#line 49 "calc2.y"
	{  yyval = yystack.l_mark[-2] - yystack.l_mark[0]; }
break;
case 9:
#line 51 "calc2.y"
	{  yyval = yystack.l_mark[-2] * yystack.l_mark[0]; }
break;
case 10:
#line 53 "calc2.y"
	{  yyval = yystack.l_mark[-2] / yystack.l_mark[0]; }
break;
case 11:
#line 55 "calc2.y"
	{  yyval = yystack.l_mark[-2] % yystack.l_mark[0]; }
break;
case 12:
#line 57 "calc2.y"
	{  yyval = yystack.l_mark[-2] & yystack.l_mark[0]; }
break;
case 13:
#line 59 "calc2.y"
	{  yyval = yystack.l_mark[-2] | yystack.l_mark[0]; }
break;
case 14:
#line 61 "calc2.y"
	{  yyval = - yystack.l_mark[0]; }
break;
case 15:
#line 63 "calc2.y"
	{  yyval = regs[yystack.l_mark[0]]; }
break;
case 17:
#line 68 "calc2.y"
	{  yyval = yystack.l_mark[0]; (*base) = (yystack.l_mark[0]==0) ? 8 : 10; }
break;
case 18:
#line 70 "calc2.y"
	{  yyval = (*base) * yystack.l_mark[-1] + yystack.l_mark[0]; }
break;
#line 629 "calc2.tab.c"
    }
    yystack.s_mark -= yym;
    yystate = *yystack.s_mark;
    yystack.l_mark -= yym;
    yym = yylhs[yyn];
    if (yystate == 0 && yym == 0)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: after reduction, shifting from state 0 to\
 state %d\n", YYPREFIX, YYFINAL);
#endif
        yystate = YYFINAL;
        *++yystack.s_mark = YYFINAL;
        *++yystack.l_mark = yyval;
        if (yychar < 0)
        {
            if ((yychar = YYLEX) < 0) yychar = YYEOF;
#if YYDEBUG
            if (yydebug)
            {
                yys = yyname[YYTRANSLATE(yychar)];
                printf("%sdebug: state %d, reading %d (%s)\n",
                        YYPREFIX, YYFINAL, yychar, yys);
            }
#endif
        }
        if (yychar == YYEOF) goto yyaccept;
        goto yyloop;
    }
    if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
        yystate = yytable[yyn];
    else
        yystate = yydgoto[yym];
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: after reduction, shifting from state %d \
to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
#endif
    if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
    {
        goto yyoverflow;
    }
    *++yystack.s_mark = (YYINT) yystate;
    *++yystack.l_mark = yyval;
    goto yyloop;

yyoverflow:
    YYERROR_CALL("yacc stack overflow");

yyabort:
    yyfreestack(&yystack);
    return (1);

yyaccept:
    yyfreestack(&yystack);
    return (0);
}

{'repo_name': 'sivadeilra/racc', 'stars': '105', 'repo_language': 'C', 'file_name': 'no_b_opt1.output', 'mime_type': 'text/plain', 'hash': 3194765890640996393, 'source_dataset': 'data'}


## RSpec: What is the difference between let and a before block?
[Reference](https://stackoverflow.com/questions/5974360/rspec-what-is-the-difference-between-let-and-a-before-block)

- Code within a `let` block is only executed when referenced, lazy loading, so the order of the blocks is irrelevant.
- `let` should not be used if you're searching for something which has been saved to the database as they will not be saved to the database unless they have already been referenced.
- Difference between `let!` and `before(:each)` is that you end up with an explicit reference to the `let` variable.
- When many commands have to be executed, I could use `before(:each)` because its syntax is more clear when many commands are involved.

## When to use RSpec let()?
[Reference](https://stackoverflow.com/questions/5359558/when-to-use-rspec-let)

- Instance variables spring into existence when referenced, if wrong spelling, a new ivar will be created and initialized to nil, which causes false positives.
- `before(:each)` will run before each example, even if the example doesn't use any of the instance variables defined in the hook.
- `let` always memoizes the value for the duration of a single example. It does not memoize the value across multiple examples.

{'repo_name': 'daryllxd/lifelong-learning', 'stars': '227', 'repo_language': 'Elixir', 'file_name': '38-animation.md', 'mime_type': 'text/plain', 'hash': -7230467558145093578, 'source_dataset': 'data'}


package fo_DK

import (
	"testing"
	"time"

	"github.com/go-playground/locales"
	"github.com/go-playground/locales/currency"
)

func TestLocale(t *testing.T) {

	trans := New()
	expected := "fo_DK"

	if trans.Locale() != expected {
		t.Errorf("Expected '%s' Got '%s'", expected, trans.Locale())
	}
}

func TestPluralsRange(t *testing.T) {

	trans := New()

	tests := []struct {
		expected locales.PluralRule
	}{
	// {
	// 	expected: locales.PluralRuleOther,
	// },
	}

	rules := trans.PluralsRange()
	// expected := 1
	// if len(rules) != expected {
	// 	t.Errorf("Expected '%d' Got '%d'", expected, len(rules))
	// }

	for _, tt := range tests {

		r := locales.PluralRuleUnknown

		for i := 0; i < len(rules); i++ {
			if rules[i] == tt.expected {
				r = rules[i]
				break
			}
		}
		if r == locales.PluralRuleUnknown {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, r)
		}
	}
}

func TestPluralsOrdinal(t *testing.T) {

	trans := New()

	tests := []struct {
		expected locales.PluralRule
	}{
	// {
	// 	expected: locales.PluralRuleOne,
	// },
	// {
	// 	expected: locales.PluralRuleTwo,
	// },
	// {
	// 	expected: locales.PluralRuleFew,
	// },
	// {
	// 	expected: locales.PluralRuleOther,
	// },
	}

	rules := trans.PluralsOrdinal()
	// expected := 4
	// if len(rules) != expected {
	// 	t.Errorf("Expected '%d' Got '%d'", expected, len(rules))
	// }

	for _, tt := range tests {

		r := locales.PluralRuleUnknown

		for i := 0; i < len(rules); i++ {
			if rules[i] == tt.expected {
				r = rules[i]
				break
			}
		}
		if r == locales.PluralRuleUnknown {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, r)
		}
	}
}

func TestPluralsCardinal(t *testing.T) {

	trans := New()

	tests := []struct {
		expected locales.PluralRule
	}{
	// {
	// 	expected: locales.PluralRuleOne,
	// },
	// {
	// 	expected: locales.PluralRuleOther,
	// },
	}

	rules := trans.PluralsCardinal()
	// expected := 2
	// if len(rules) != expected {
	// 	t.Errorf("Expected '%d' Got '%d'", expected, len(rules))
	// }

	for _, tt := range tests {

		r := locales.PluralRuleUnknown

		for i := 0; i < len(rules); i++ {
			if rules[i] == tt.expected {
				r = rules[i]
				break
			}
		}
		if r == locales.PluralRuleUnknown {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, r)
		}
	}
}

func TestRangePlurals(t *testing.T) {

	trans := New()

	tests := []struct {
		num1     float64
		v1       uint64
		num2     float64
		v2       uint64
		expected locales.PluralRule
	}{
	// {
	// 	num1:     1,
	// 	v1:       1,
	// 	num2:     2,
	// 	v2:       2,
	// 	expected: locales.PluralRuleOther,
	// },
	}

	for _, tt := range tests {
		rule := trans.RangePluralRule(tt.num1, tt.v1, tt.num2, tt.v2)
		if rule != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, rule)
		}
	}
}

func TestOrdinalPlurals(t *testing.T) {

	trans := New()

	tests := []struct {
		num      float64
		v        uint64
		expected locales.PluralRule
	}{
	// {
	// 	num:      1,
	// 	v:        0,
	// 	expected: locales.PluralRuleOne,
	// },
	// {
	// 	num:      2,
	// 	v:        0,
	// 	expected: locales.PluralRuleTwo,
	// },
	// {
	// 	num:      3,
	// 	v:        0,
	// 	expected: locales.PluralRuleFew,
	// },
	// {
	// 	num:      4,
	// 	v:        0,
	// 	expected: locales.PluralRuleOther,
	// },
	}

	for _, tt := range tests {
		rule := trans.OrdinalPluralRule(tt.num, tt.v)
		if rule != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, rule)
		}
	}
}

func TestCardinalPlurals(t *testing.T) {

	trans := New()

	tests := []struct {
		num      float64
		v        uint64
		expected locales.PluralRule
	}{
	// {
	// 	num:      1,
	// 	v:        0,
	// 	expected: locales.PluralRuleOne,
	// },
	// {
	// 	num:      4,
	// 	v:        0,
	// 	expected: locales.PluralRuleOther,
	// },
	}

	for _, tt := range tests {
		rule := trans.CardinalPluralRule(tt.num, tt.v)
		if rule != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, rule)
		}
	}
}

func TestDaysAbbreviated(t *testing.T) {

	trans := New()
	days := trans.WeekdaysAbbreviated()

	for i, day := range days {
		s := trans.WeekdayAbbreviated(time.Weekday(i))
		if s != day {
			t.Errorf("Expected '%s' Got '%s'", day, s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      0,
	// 	expected: "Sun",
	// },
	// {
	// 	idx:      1,
	// 	expected: "Mon",
	// },
	// {
	// 	idx:      2,
	// 	expected: "Tue",
	// },
	// {
	// 	idx:      3,
	// 	expected: "Wed",
	// },
	// {
	// 	idx:      4,
	// 	expected: "Thu",
	// },
	// {
	// 	idx:      5,
	// 	expected: "Fri",
	// },
	// {
	// 	idx:      6,
	// 	expected: "Sat",
	// },
	}

	for _, tt := range tests {
		s := trans.WeekdayAbbreviated(time.Weekday(tt.idx))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestDaysNarrow(t *testing.T) {

	trans := New()
	days := trans.WeekdaysNarrow()

	for i, day := range days {
		s := trans.WeekdayNarrow(time.Weekday(i))
		if s != day {
			t.Errorf("Expected '%s' Got '%s'", string(day), s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      0,
	// 	expected: "S",
	// },
	// {
	// 	idx:      1,
	// 	expected: "M",
	// },
	// {
	// 	idx:      2,
	// 	expected: "T",
	// },
	// {
	// 	idx:      3,
	// 	expected: "W",
	// },
	// {
	// 	idx:      4,
	// 	expected: "T",
	// },
	// {
	// 	idx:      5,
	// 	expected: "F",
	// },
	// {
	// 	idx:      6,
	// 	expected: "S",
	// },
	}

	for _, tt := range tests {
		s := trans.WeekdayNarrow(time.Weekday(tt.idx))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestDaysShort(t *testing.T) {

	trans := New()
	days := trans.WeekdaysShort()

	for i, day := range days {
		s := trans.WeekdayShort(time.Weekday(i))
		if s != day {
			t.Errorf("Expected '%s' Got '%s'", day, s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      0,
	// 	expected: "Su",
	// },
	// {
	// 	idx:      1,
	// 	expected: "Mo",
	// },
	// {
	// 	idx:      2,
	// 	expected: "Tu",
	// },
	// {
	// 	idx:      3,
	// 	expected: "We",
	// },
	// {
	// 	idx:      4,
	// 	expected: "Th",
	// },
	// {
	// 	idx:      5,
	// 	expected: "Fr",
	// },
	// {
	// 	idx:      6,
	// 	expected: "Sa",
	// },
	}

	for _, tt := range tests {
		s := trans.WeekdayShort(time.Weekday(tt.idx))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestDaysWide(t *testing.T) {

	trans := New()
	days := trans.WeekdaysWide()

	for i, day := range days {
		s := trans.WeekdayWide(time.Weekday(i))
		if s != day {
			t.Errorf("Expected '%s' Got '%s'", day, s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      0,
	// 	expected: "Sunday",
	// },
	// {
	// 	idx:      1,
	// 	expected: "Monday",
	// },
	// {
	// 	idx:      2,
	// 	expected: "Tuesday",
	// },
	// {
	// 	idx:      3,
	// 	expected: "Wednesday",
	// },
	// {
	// 	idx:      4,
	// 	expected: "Thursday",
	// },
	// {
	// 	idx:      5,
	// 	expected: "Friday",
	// },
	// {
	// 	idx:      6,
	// 	expected: "Saturday",
	// },
	}

	for _, tt := range tests {
		s := trans.WeekdayWide(time.Weekday(tt.idx))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestMonthsAbbreviated(t *testing.T) {

	trans := New()
	months := trans.MonthsAbbreviated()

	for i, month := range months {
		s := trans.MonthAbbreviated(time.Month(i + 1))
		if s != month {
			t.Errorf("Expected '%s' Got '%s'", month, s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      1,
	// 	expected: "Jan",
	// },
	// {
	// 	idx:      2,
	// 	expected: "Feb",
	// },
	// {
	// 	idx:      3,
	// 	expected: "Mar",
	// },
	// {
	// 	idx:      4,
	// 	expected: "Apr",
	// },
	// {
	// 	idx:      5,
	// 	expected: "May",
	// },
	// {
	// 	idx:      6,
	// 	expected: "Jun",
	// },
	// {
	// 	idx:      7,
	// 	expected: "Jul",
	// },
	// {
	// 	idx:      8,
	// 	expected: "Aug",
	// },
	// {
	// 	idx:      9,
	// 	expected: "Sep",
	// },
	// {
	// 	idx:      10,
	// 	expected: "Oct",
	// },
	// {
	// 	idx:      11,
	// 	expected: "Nov",
	// },
	// {
	// 	idx:      12,
	// 	expected: "Dec",
	// },
	}

	for _, tt := range tests {
		s := trans.MonthAbbreviated(time.Month(tt.idx))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestMonthsNarrow(t *testing.T) {

	trans := New()
	months := trans.MonthsNarrow()

	for i, month := range months {
		s := trans.MonthNarrow(time.Month(i + 1))
		if s != month {
			t.Errorf("Expected '%s' Got '%s'", month, s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      1,
	// 	expected: "J",
	// },
	// {
	// 	idx:      2,
	// 	expected: "F",
	// },
	// {
	// 	idx:      3,
	// 	expected: "M",
	// },
	// {
	// 	idx:      4,
	// 	expected: "A",
	// },
	// {
	// 	idx:      5,
	// 	expected: "M",
	// },
	// {
	// 	idx:      6,
	// 	expected: "J",
	// },
	// {
	// 	idx:      7,
	// 	expected: "J",
	// },
	// {
	// 	idx:      8,
	// 	expected: "A",
	// },
	// {
	// 	idx:      9,
	// 	expected: "S",
	// },
	// {
	// 	idx:      10,
	// 	expected: "O",
	// },
	// {
	// 	idx:      11,
	// 	expected: "N",
	// },
	// {
	// 	idx:      12,
	// 	expected: "D",
	// },
	}

	for _, tt := range tests {
		s := trans.MonthNarrow(time.Month(tt.idx))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestMonthsWide(t *testing.T) {

	trans := New()
	months := trans.MonthsWide()

	for i, month := range months {
		s := trans.MonthWide(time.Month(i + 1))
		if s != month {
			t.Errorf("Expected '%s' Got '%s'", month, s)
		}
	}

	tests := []struct {
		idx      int
		expected string
	}{
	// {
	// 	idx:      1,
	// 	expected: "January",
	// },
	// {
	// 	idx:      2,
	// 	expected: "February",
	// },
	// {
	// 	idx:      3,
	// 	expected: "March",
	// },
	// {
	// 	idx:      4,
	// 	expected: "April",
	// },
	// {
	// 	idx:      5,
	// 	expected: "May",
	// },
	// {
	// 	idx:      6,
	// 	expected: "June",
	// },
	// {
	// 	idx:      7,
	// 	expected: "July",
	// },
	// {
	// 	idx:      8,
	// 	expected: "August",
	// },
	// {
	// 	idx:      9,
	// 	expected: "September",
	// },
	// {
	// 	idx:      10,
	// 	expected: "October",
	// },
	// {
	// 	idx:      11,
	// 	expected: "November",
	// },
	// {
	// 	idx:      12,
	// 	expected: "December",
	// },
	}

	for _, tt := range tests {
		s := string(trans.MonthWide(time.Month(tt.idx)))
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtTimeFull(t *testing.T) {

	// loc, err := time.LoadLocation("America/Toronto")
	// if err != nil {
	// 	t.Errorf("Expected '<nil>' Got '%s'", err)
	// }

	// fixed := time.FixedZone("OTHER", -4)

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 5, 1, 0, loc),
	// 	expected: "9:05:01 am Eastern Standard Time",
	// },
	// {
	// 	t:        time.Date(2016, 02, 03, 20, 5, 1, 0, fixed),
	// 	expected: "8:05:01 pm OTHER",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtTimeFull(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtTimeLong(t *testing.T) {

	// loc, err := time.LoadLocation("America/Toronto")
	// if err != nil {
	// 	t.Errorf("Expected '<nil>' Got '%s'", err)
	// }

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 5, 1, 0, loc),
	// 	expected: "9:05:01 am EST",
	// },
	// {
	// 	t:        time.Date(2016, 02, 03, 20, 5, 1, 0, loc),
	// 	expected: "8:05:01 pm EST",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtTimeLong(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtTimeMedium(t *testing.T) {

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 5, 1, 0, time.UTC),
	// 	expected: "9:05:01 am",
	// },
	// {
	// 	t:        time.Date(2016, 02, 03, 20, 5, 1, 0, time.UTC),
	// 	expected: "8:05:01 pm",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtTimeMedium(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtTimeShort(t *testing.T) {

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 5, 1, 0, time.UTC),
	// 	expected: "9:05 am",
	// },
	// {
	// 	t:        time.Date(2016, 02, 03, 20, 5, 1, 0, time.UTC),
	// 	expected: "8:05 pm",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtTimeShort(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtDateFull(t *testing.T) {

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC),
	// 	expected: "Wednesday, February 3, 2016",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtDateFull(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtDateLong(t *testing.T) {

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC),
	// 	expected: "February 3, 2016",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtDateLong(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtDateMedium(t *testing.T) {

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC),
	// 	expected: "Feb 3, 2016",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtDateMedium(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtDateShort(t *testing.T) {

	tests := []struct {
		t        time.Time
		expected string
	}{
	// {
	// 	t:        time.Date(2016, 02, 03, 9, 0, 1, 0, time.UTC),
	// 	expected: "2/3/16",
	// },
	// {
	// 	t:        time.Date(-500, 02, 03, 9, 0, 1, 0, time.UTC),
	// 	expected: "2/3/500",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtDateShort(tt.t)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtNumber(t *testing.T) {

	tests := []struct {
		num      float64
		v        uint64
		expected string
	}{
	// {
	// 	num:      1123456.5643,
	// 	v:        2,
	// 	expected: "1,123,456.56",
	// },
	// {
	// 	num:      1123456.5643,
	// 	v:        1,
	// 	expected: "1,123,456.6",
	// },
	// {
	// 	num:      221123456.5643,
	// 	v:        3,
	// 	expected: "221,123,456.564",
	// },
	// {
	// 	num:      -221123456.5643,
	// 	v:        3,
	// 	expected: "-221,123,456.564",
	// },
	// {
	// 	num:      -221123456.5643,
	// 	v:        3,
	// 	expected: "-221,123,456.564",
	// },
	// {
	// 	num:      0,
	// 	v:        2,
	// 	expected: "0.00",
	// },
	// {
	// 	num:      -0,
	// 	v:        2,
	// 	expected: "0.00",
	// },
	// {
	// 	num:      -0,
	// 	v:        2,
	// 	expected: "0.00",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtNumber(tt.num, tt.v)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtCurrency(t *testing.T) {

	tests := []struct {
		num      float64
		v        uint64
		currency currency.Type
		expected string
	}{
	// {
	// 	num:      1123456.5643,
	// 	v:        2,
	// 	currency: currency.USD,
	// 	expected: "$1,123,456.56",
	// },
	// {
	// 	num:      1123456.5643,
	// 	v:        1,
	// 	currency: currency.USD,
	// 	expected: "$1,123,456.60",
	// },
	// {
	// 	num:      221123456.5643,
	// 	v:        3,
	// 	currency: currency.USD,
	// 	expected: "$221,123,456.564",
	// },
	// {
	// 	num:      -221123456.5643,
	// 	v:        3,
	// 	currency: currency.USD,
	// 	expected: "-$221,123,456.564",
	// },
	// {
	// 	num:      -221123456.5643,
	// 	v:        3,
	// 	currency: currency.CAD,
	// 	expected: "-CAD 221,123,456.564",
	// },
	// {
	// 	num:      0,
	// 	v:        2,
	// 	currency: currency.USD,
	// 	expected: "$0.00",
	// },
	// {
	// 	num:      -0,
	// 	v:        2,
	// 	currency: currency.USD,
	// 	expected: "$0.00",
	// },
	// {
	// 	num:      -0,
	// 	v:        2,
	// 	currency: currency.CAD,
	// 	expected: "CAD 0.00",
	// },
	// {
	// 	num:      1.23,
	// 	v:        0,
	// 	currency: currency.USD,
	// 	expected: "$1.00",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtCurrency(tt.num, tt.v, tt.currency)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtAccounting(t *testing.T) {

	tests := []struct {
		num      float64
		v        uint64
		currency currency.Type
		expected string
	}{
	// {
	// 	num:      1123456.5643,
	// 	v:        2,
	// 	currency: currency.USD,
	// 	expected: "$1,123,456.56",
	// },
	// {
	// 	num:      1123456.5643,
	// 	v:        1,
	// 	currency: currency.USD,
	// 	expected: "$1,123,456.60",
	// },
	// {
	// 	num:      221123456.5643,
	// 	v:        3,
	// 	currency: currency.USD,
	// 	expected: "$221,123,456.564",
	// },
	// {
	// 	num:      -221123456.5643,
	// 	v:        3,
	// 	currency: currency.USD,
	// 	expected: "($221,123,456.564)",
	// },
	// {
	// 	num:      -221123456.5643,
	// 	v:        3,
	// 	currency: currency.CAD,
	// 	expected: "(CAD 221,123,456.564)",
	// },
	// {
	// 	num:      -0,
	// 	v:        2,
	// 	currency: currency.USD,
	// 	expected: "$0.00",
	// },
	// {
	// 	num:      -0,
	// 	v:        2,
	// 	currency: currency.CAD,
	// 	expected: "CAD 0.00",
	// },
	// {
	// 	num:      1.23,
	// 	v:        0,
	// 	currency: currency.USD,
	// 	expected: "$1.00",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtAccounting(tt.num, tt.v, tt.currency)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

func TestFmtPercent(t *testing.T) {

	tests := []struct {
		num      float64
		v        uint64
		expected string
	}{
	// {
	// 	num:      15,
	// 	v:        0,
	// 	expected: "15%",
	// },
	// {
	// 	num:      15,
	// 	v:        2,
	// 	expected: "15.00%",
	// },
	// {
	// 	num:      434.45,
	// 	v:        0,
	// 	expected: "434%",
	// },
	// {
	// 	num:      34.4,
	// 	v:        2,
	// 	expected: "34.40%",
	// },
	// {
	// 	num:      -34,
	// 	v:        0,
	// 	expected: "-34%",
	// },
	}

	trans := New()

	for _, tt := range tests {
		s := trans.FmtPercent(tt.num, tt.v)
		if s != tt.expected {
			t.Errorf("Expected '%s' Got '%s'", tt.expected, s)
		}
	}
}

{'repo_name': 'luizbafilho/fusis', 'stars': '116', 'repo_language': 'Go', 'file_name': 'election.go', 'mime_type': 'text/plain', 'hash': 5306599318135527323, 'source_dataset': 'data'}


{ stdenv, fetchFromGitHub, coq }:

let params =
  {
    "8.5"  = { version = "0.9.4";  sha256 = "1y66pamgsdxlq2w1338lj626ln70cwj7k53hxcp933g8fdsa4hp0"; };
    "8.6"  = { version = "0.9.5";  sha256 = "1b4cvz3llxin130g13calw5n1zmvi6wdd5yb8a41q7yyn2hd3msg"; };
    "8.7"  = { version = "0.9.7";  sha256 = "00v4bm4glv1hy08c8xsm467az6d1ashrznn8p2bmbmmp52lfg7ag"; };
    "8.8" = { version = "0.11.2"; sha256 = "0iyka81g26x5n99xic7kqn8vxqjw8rz7vw9rs27iw04lf137vzv6"; };
    "8.9" = { version = "0.11.2"; sha256 = "0iyka81g26x5n99xic7kqn8vxqjw8rz7vw9rs27iw04lf137vzv6"; };
    "8.10" = { version = "0.11.2"; sha256 = "0iyka81g26x5n99xic7kqn8vxqjw8rz7vw9rs27iw04lf137vzv6"; };
    "8.11" = { version = "0.11.2"; sha256 = "0iyka81g26x5n99xic7kqn8vxqjw8rz7vw9rs27iw04lf137vzv6"; };
    "8.12" = { version = "0.11.2"; sha256 = "0iyka81g26x5n99xic7kqn8vxqjw8rz7vw9rs27iw04lf137vzv6"; };
  };
  param = params.${coq.coq-version};
in

stdenv.mkDerivation rec {

  name = "coq${coq.coq-version}-coq-ext-lib-${version}";
  inherit (param) version;

  src = fetchFromGitHub {
    owner = "coq-ext-lib";
    repo = "coq-ext-lib";
    rev = "v${param.version}";
    inherit (param) sha256;
  };

  buildInputs = with coq.ocamlPackages; [ ocaml camlp5 ];
  propagatedBuildInputs = [ coq ];

  enableParallelBuilding = true;

  installFlags = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ];

  meta = with stdenv.lib; {
    homepage = "https://github.com/coq-ext-lib/coq-ext-lib";
    description = "A collection of theories and plugins that may be useful in other Coq developments";
    maintainers = with maintainers; [ jwiegley ptival ];
    platforms = coq.meta.platforms;
  };

  passthru = {
    compatibleCoqVersions = v: builtins.hasAttr v params;
  };
}

{'repo_name': 'NixOS/nixpkgs-channels', 'stars': '161', 'repo_language': 'Nix', 'file_name': 'default.nix', 'mime_type': 'text/plain', 'hash': -924574817474369538, 'source_dataset': 'data'}


/**
 * @fileoverview Rule to flag bitwise identifiers
 * @author Nicholas C. Zakas
 */

"use strict";

//
// Set of bitwise operators.
//
const BITWISE_OPERATORS = [
    "^", "|", "&", "<<", ">>", ">>>",
    "^=", "|=", "&=", "<<=", ">>=", ">>>=",
    "~"
];

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------

module.exports = {
    meta: {
        docs: {
            description: "disallow bitwise operators",
            category: "Stylistic Issues",
            recommended: false
        },

        schema: [
            {
                type: "object",
                properties: {
                    allow: {
                        type: "array",
                        items: {
                            enum: BITWISE_OPERATORS
                        },
                        uniqueItems: true
                    },
                    int32Hint: {
                        type: "boolean"
                    }
                },
                additionalProperties: false
            }
        ]
    },

    create(context) {
        const options = context.options[0] || {};
        const allowed = options.allow || [];
        const int32Hint = options.int32Hint === true;

        /**
         * Reports an unexpected use of a bitwise operator.
         * @param   {ASTNode} node Node which contains the bitwise operator.
         * @returns {void}
         */
        function report(node) {
            context.report({ node, message: "Unexpected use of '{{operator}}'.", data: { operator: node.operator } });
        }

        /**
         * Checks if the given node has a bitwise operator.
         * @param   {ASTNode} node The node to check.
         * @returns {boolean} Whether or not the node has a bitwise operator.
         */
        function hasBitwiseOperator(node) {
            return BITWISE_OPERATORS.indexOf(node.operator) !== -1;
        }

        /**
         * Checks if exceptions were provided, e.g. `{ allow: ['~', '|'] }`.
         * @param   {ASTNode} node The node to check.
         * @returns {boolean} Whether or not the node has a bitwise operator.
         */
        function allowedOperator(node) {
            return allowed.indexOf(node.operator) !== -1;
        }

        /**
         * Checks if the given bitwise operator is used for integer typecasting, i.e. "|0"
         * @param   {ASTNode} node The node to check.
         * @returns {boolean} whether the node is used in integer typecasting.
         */
        function isInt32Hint(node) {
            return int32Hint && node.operator === "|" && node.right &&
              node.right.type === "Literal" && node.right.value === 0;
        }

        /**
         * Report if the given node contains a bitwise operator.
         * @param   {ASTNode} node The node to check.
         * @returns {void}
         */
        function checkNodeForBitwiseOperator(node) {
            if (hasBitwiseOperator(node) && !allowedOperator(node) && !isInt32Hint(node)) {
                report(node);
            }
        }

        return {
            AssignmentExpression: checkNodeForBitwiseOperator,
            BinaryExpression: checkNodeForBitwiseOperator,
            UnaryExpression: checkNodeForBitwiseOperator
        };

    }
};

{'repo_name': 'ayojs/ayo', 'stars': '1707', 'repo_language': 'JavaScript', 'file_name': 'fitblk.c', 'mime_type': 'text/x-c', 'hash': -2692664158046934293, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="hello">Hello facebook-android-maven-sample!</string>
    <string name="app_name">facebook-android-maven-sample</string>
</resources>

{'repo_name': 'ihrupin/samples', 'stars': '166', 'repo_language': 'Java', 'file_name': 'mysqlfix.sh', 'mime_type': 'text/x-shellscript', 'hash': 8487794742272681358, 'source_dataset': 'data'}


/*================================================================================
  code generated by: java2cpp
  author: Zoran Angelov, mailto://baldzar@gmail.com
  class: javax.sql.PooledConnection
================================================================================*/

#ifndef J2CPP_INCLUDE_IMPLEMENTATION

#ifndef J2CPP_JAVAX_SQL_POOLEDCONNECTION_HPP_DECL
#define J2CPP_JAVAX_SQL_POOLEDCONNECTION_HPP_DECL

namespace j2cpp { namespace javax { namespace sql { class StatementEventListener; } } }
namespace j2cpp { namespace javax { namespace sql { class ConnectionEventListener; } } }
namespace j2cpp { namespace java { namespace lang { class Object; } } }
namespace j2cpp { namespace java { namespace sql { class Connection; } } }

#include <java/lang/Object.hpp>
#include <java/sql/Connection.hpp>
#include <javax/sql/ConnectionEventListener.hpp>
#include <javax/sql/StatementEventListener.hpp>

namespace j2cpp {

namespace javax { namespace sql {

	class PooledConnection;
	class PooledConnection
		: public object<PooledConnection>
	{
	public:

		J2CPP_DECLARE_CLASS

		J2CPP_DECLARE_METHOD(0)
		J2CPP_DECLARE_METHOD(1)
		J2CPP_DECLARE_METHOD(2)
		J2CPP_DECLARE_METHOD(3)
		J2CPP_DECLARE_METHOD(4)
		J2CPP_DECLARE_METHOD(5)

		explicit PooledConnection(jobject jobj)
		: object<PooledConnection>(jobj)
		{
		}

		operator local_ref<java::lang::Object>() const;

		void addConnectionEventListener(local_ref< javax::sql::ConnectionEventListener >  const&);
		void close();
		local_ref< java::sql::Connection > getConnection();
		void removeConnectionEventListener(local_ref< javax::sql::ConnectionEventListener >  const&);
		void addStatementEventListener(local_ref< javax::sql::StatementEventListener >  const&);
		void removeStatementEventListener(local_ref< javax::sql::StatementEventListener >  const&);
	}; //class PooledConnection

} //namespace sql
} //namespace javax

} //namespace j2cpp

#endif //J2CPP_JAVAX_SQL_POOLEDCONNECTION_HPP_DECL

#else //J2CPP_INCLUDE_IMPLEMENTATION

#ifndef J2CPP_JAVAX_SQL_POOLEDCONNECTION_HPP_IMPL
#define J2CPP_JAVAX_SQL_POOLEDCONNECTION_HPP_IMPL

namespace j2cpp {

javax::sql::PooledConnection::operator local_ref<java::lang::Object>() const
{
	return local_ref<java::lang::Object>(get_jobject());
}

void javax::sql::PooledConnection::addConnectionEventListener(local_ref< javax::sql::ConnectionEventListener > const &a0)
{
	return call_method<
		javax::sql::PooledConnection::J2CPP_CLASS_NAME,
		javax::sql::PooledConnection::J2CPP_METHOD_NAME(0),
		javax::sql::PooledConnection::J2CPP_METHOD_SIGNATURE(0),
		void
	>(get_jobject(), a0);
}

void javax::sql::PooledConnection::close()
{
	return call_method<
		javax::sql::PooledConnection::J2CPP_CLASS_NAME,
		javax::sql::PooledConnection::J2CPP_METHOD_NAME(1),
		javax::sql::PooledConnection::J2CPP_METHOD_SIGNATURE(1),
		void
	>(get_jobject());
}

local_ref< java::sql::Connection > javax::sql::PooledConnection::getConnection()
{
	return call_method<
		javax::sql::PooledConnection::J2CPP_CLASS_NAME,
		javax::sql::PooledConnection::J2CPP_METHOD_NAME(2),
		javax::sql::PooledConnection::J2CPP_METHOD_SIGNATURE(2),
		local_ref< java::sql::Connection >
	>(get_jobject());
}

void javax::sql::PooledConnection::removeConnectionEventListener(local_ref< javax::sql::ConnectionEventListener > const &a0)
{
	return call_method<
		javax::sql::PooledConnection::J2CPP_CLASS_NAME,
		javax::sql::PooledConnection::J2CPP_METHOD_NAME(3),
		javax::sql::PooledConnection::J2CPP_METHOD_SIGNATURE(3),
		void
	>(get_jobject(), a0);
}

void javax::sql::PooledConnection::addStatementEventListener(local_ref< javax::sql::StatementEventListener > const &a0)
{
	return call_method<
		javax::sql::PooledConnection::J2CPP_CLASS_NAME,
		javax::sql::PooledConnection::J2CPP_METHOD_NAME(4),
		javax::sql::PooledConnection::J2CPP_METHOD_SIGNATURE(4),
		void
	>(get_jobject(), a0);
}

void javax::sql::PooledConnection::removeStatementEventListener(local_ref< javax::sql::StatementEventListener > const &a0)
{
	return call_method<
		javax::sql::PooledConnection::J2CPP_CLASS_NAME,
		javax::sql::PooledConnection::J2CPP_METHOD_NAME(5),
		javax::sql::PooledConnection::J2CPP_METHOD_SIGNATURE(5),
		void
	>(get_jobject(), a0);
}

J2CPP_DEFINE_CLASS(javax::sql::PooledConnection,"javax/sql/PooledConnection")
J2CPP_DEFINE_METHOD(javax::sql::PooledConnection,0,"addConnectionEventListener","(Ljavax/sql/ConnectionEventListener;)V")
J2CPP_DEFINE_METHOD(javax::sql::PooledConnection,1,"close","()V")
J2CPP_DEFINE_METHOD(javax::sql::PooledConnection,2,"getConnection","()Ljava/sql/Connection;")
J2CPP_DEFINE_METHOD(javax::sql::PooledConnection,3,"removeConnectionEventListener","(Ljavax/sql/ConnectionEventListener;)V")
J2CPP_DEFINE_METHOD(javax::sql::PooledConnection,4,"addStatementEventListener","(Ljavax/sql/StatementEventListener;)V")
J2CPP_DEFINE_METHOD(javax::sql::PooledConnection,5,"removeStatementEventListener","(Ljavax/sql/StatementEventListener;)V")

} //namespace j2cpp

#endif //J2CPP_JAVAX_SQL_POOLEDCONNECTION_HPP_IMPL

#endif //J2CPP_INCLUDE_IMPLEMENTATION

{'repo_name': 'ShortTailLab/ph-open', 'stars': '503', 'repo_language': 'C++', 'file_name': 'lua.js', 'mime_type': 'text/plain', 'hash': -7911393417216691290, 'source_dataset': 'data'}


#!/usr/bin/env python

import os, socket, ssl, sys, pprint, time

host_port = ('localhost', 8899)

ssl_options = {"cert_reqs": ssl.CERT_REQUIRED, "ca_certs": os.getenv("HOME")+"/.ssh/localhost.crt"}

if 0:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    # require a certificate from the server
    ssl_sock = ssl.wrap_socket(s, **ssl_options)

    ssl_sock.connect(host_port)

    pprint.pprint(ssl_sock.getpeercert())
    # note that closing the SSLSocket will also close the underlying socket
    ssl_sock.close()

def on_connect():
    print "Connected"
    time.sleep(5)

import tornado.iostream, tornado.ioloop

if 0:
    stream = tornado.iostream.SSLIOStream(socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0),
                                          ssl_options=ssl_options)

    stream.connect(host_port, on_connect)

    sys.exit(0)

import packetserver

class MyClient(packetserver.PacketClient):
    _all_connections = {}
    def __init__(self, host, port, lterm_cookie="", io_loop=None, ssl_options={}):
        super(MyClient, self).__init__(host, port, io_loop=io_loop,
                                             ssl_options=ssl_options, max_packet_buf=3,
                                             reconnect_sec=300, server_type="frame")

conn2 = MyClient.get_client("conn2", connect=host_port, connect_kw={"ssl_options": ssl_options})

tornado.ioloop.IOLoop.instance().start()

print "conn2", conn2

{'repo_name': 'mitotic/graphterm', 'stars': '137', 'repo_language': 'JavaScript', 'file_name': 'jquery-migrate-1.1.1.js', 'mime_type': 'text/plain', 'hash': 488039992645138444, 'source_dataset': 'data'}


/*****************************************************************************
  Copyright (c) 2014, Intel Corp.
  All rights reserved.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of Intel Corporation nor the names of its contributors
      may be used to endorse or promote products derived from this software
      without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************
* Contents: Native middle-level C interface to LAPACK function spotri
* Author: Intel Corporation
* Generated November 2015
*****************************************************************************/

#include "lapacke_utils.h"

lapack_int LAPACKE_spotri_work( int matrix_layout, char uplo, lapack_int n,
                                float* a, lapack_int lda )
{
    lapack_int info = 0;
    if( matrix_layout == LAPACK_COL_MAJOR ) {
        /* Call LAPACK function and adjust info */
        LAPACK_spotri( &uplo, &n, a, &lda, &info );
        if( info < 0 ) {
            info = info - 1;
        }
    } else if( matrix_layout == LAPACK_ROW_MAJOR ) {
        lapack_int lda_t = MAX(1,n);
        float* a_t = NULL;
        /* Check leading dimension(s) */
        if( lda < n ) {
            info = -5;
            LAPACKE_xerbla( "LAPACKE_spotri_work", info );
            return info;
        }
        /* Allocate memory for temporary array(s) */
        a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
        if( a_t == NULL ) {
            info = LAPACK_TRANSPOSE_MEMORY_ERROR;
            goto exit_level_0;
        }
        /* Transpose input matrices */
        LAPACKE_spo_trans( matrix_layout, uplo, n, a, lda, a_t, lda_t );
        /* Call LAPACK function and adjust info */
        LAPACK_spotri( &uplo, &n, a_t, &lda_t, &info );
        if( info < 0 ) {
            info = info - 1;
        }
        /* Transpose output matrices */
        LAPACKE_spo_trans( LAPACK_COL_MAJOR, uplo, n, a_t, lda_t, a, lda );
        /* Release memory and exit */
        LAPACKE_free( a_t );
exit_level_0:
        if( info == LAPACK_TRANSPOSE_MEMORY_ERROR ) {
            LAPACKE_xerbla( "LAPACKE_spotri_work", info );
        }
    } else {
        info = -1;
        LAPACKE_xerbla( "LAPACKE_spotri_work", info );
    }
    return info;
}

{'repo_name': 'xianyi/OpenBLAS', 'stars': '3417', 'repo_language': 'Fortran', 'file_name': 'trtri_U_parallel.c', 'mime_type': 'text/x-c', 'hash': 7305842289291344161, 'source_dataset': 'data'}


#include <bits/stdc++.h>
using namespace std;

const int MAXN = 10005;
struct EdgeIn {
	int x, y, w;
	EdgeIn() {}
	EdgeIn(int x, int y, int w):
		x(x), y(y), w(w) {}
} edges[MAXN];

struct Edge {
	int to, i;
	Edge() {}
	Edge(int to, int i):
		to(to), i(i) {}
};

vector<Edge> g[MAXN];
vector<EdgeIn> q;

int to_p[MAXN];
int16_t depth[MAXN], visited[MAXN];
int16_t st_p[MAXN][16], st_w[MAXN][16];
int16_t parent[MAXN];
void dfs(int u, int p, int dep) {
	depth[u] = dep;

	for (int i = 1, j = 2; j <= dep; i++, j <<= 1) {
		st_p[u][i] = st_p[st_p[u][i-1]][i-1];
		st_w[u][i] = max(st_w[u][i-1], st_w[st_p[u][i-1]][i-1]);
	}

	for (auto e : g[u]) {
		if (depth[e.to] != -1)
			continue;
		st_p[e.to][0] = u;
		st_w[e.to][0] = edges[e.i].w;
		to_p[e.to] = e.i;
		dfs(e.to, u, dep+1);
	}
}

void build(int n) {
	memset(depth, -1, sizeof(depth));
	memset(st_p, -1, sizeof(st_p));
	dfs(1, -1, 0);
}

static inline int log2int(int32_t x) {
	return 32 - __builtin_clz(x);
}

int max_path(int x, int y) {
	if (x == y)
		return 0;
	if (depth[x] < depth[y])
		swap(x, y);
	int16_t ret = SHRT_MIN;
	if (depth[x] > depth[y]) {
		int diff = depth[x] - depth[y];
		for (int i = 0; diff; i++) {
			if ((diff>>i)&1) {
				ret = max(ret, st_w[x][i]);
				x = st_p[x][i];
				diff ^= 1<<i;
			}
		}
	}

	if (x != y) {
		int h = log2int(depth[x]) + 1;
		for (int i = h; i >= 0; i--) {
			if (st_p[x][i] != st_p[y][i]) {
				ret = max(ret, st_w[x][i]);
				ret = max(ret, st_w[y][i]);
				x = st_p[x][i];
				y = st_p[y][i];
			}
		}
		ret = max(ret, st_w[x][0]);
		ret = max(ret, st_w[y][0]);
	}

	return ret;
}

int get_lca(int x, int y) {
	if (x == y)
		return x;
	if (depth[x] < depth[y])
		swap(x, y);
	if (depth[x] > depth[y]) {
		int diff = depth[x] - depth[y];
		for (int i = 0; diff; i++) {
			if ((diff>>i)&1) {
				x = st_p[x][i];
				diff ^= 1<<i;
			}
		}
	}

	if (x != y) {
		int h = log2int(depth[x]) + 1;
		for (int i = h; i >= 0; i--) {
			if (st_p[x][i] != st_p[y][i]) {
				x = st_p[x][i];
				y = st_p[y][i];
			}
		}
		x = st_p[x][0];
	}

	return x;
}

int findp(int x) {
	return parent[x] == x ? x : parent[x] = findp(parent[x]);
}

int64_t min_path(int u, int p, int w) {
	int v = findp(u);
	if (v == p)
		return 0;
	int next = parent[u] == v ? st_p[u][0] : v;
	int64_t ret = 0;
	if (!visited[u]) {
		visited[u] = 1;

		int64_t i = to_p[u];
		const int a = w - st_w[u][0];
		const int b = -1;
		ret += i*a + i*i*b;
	}

	parent[u] = p;
	ret += min_path(next, p, w);
	return ret;
}

int64_t solve(int n) {
	sort(q.begin(), q.end(), [](const EdgeIn &x, const EdgeIn &y) {
		return x.w < y.w;
	});

	int64_t ret = 0;
	for (int i = 0; i <= n; i++)
		parent[i] = i, visited[i] = 0;
	for (int i = 0; i < q.size(); i++) {
		int lca = get_lca(q[i].x, q[i].y);
		lca = findp(lca);
		ret += min_path(q[i].x, lca, q[i].w);
		ret += min_path(q[i].y, lca, q[i].w);
	}

	for (int u = 2; u <= n; u++)  {
		if (visited[u] == 0) {
			int64_t i = to_p[u];
			const int a = -1;
			const int b = -1;
			ret += i*a + i*i*b;
		}
	}
	return ret;
}

int main() {
	int testcase, cases = 0;
	int n, m;
	scanf("%d", &testcase);
	while (testcase--) {
		scanf("%d %d", &n, &m);

		for (int i = 0; i <= n; i++)
			g[i].clear();
		q.clear();

		for (int i = 1; i <= m; i++) {
			int x, y, w;
			scanf("%d %d %d", &x, &y, &w);
			if (i < n) {
				edges[i] = EdgeIn(x, y, w);
				g[x].push_back(Edge(y, i));
				g[y].push_back(Edge(x, i));
			} else {
				q.push_back(EdgeIn(x, y, w));
			}
		}

		build(n);

		int64_t ret = 0;

		// for non-tree edge
		for (int i = 0; i < q.size(); i++) {
			int64_t j = i+n;
			const int a = -1;
			const int b = q[i].w - max_path(q[i].x, q[i].y);
			ret += j * a + j*j * b;
		}

		// for tree edge
		ret += solve(n);

		printf("Case %d: %lld\n", ++cases, ret);
	}
	return 0;
}
/*
2
3  3
1  2  5
2  3  7
1  3  10
4  5
1  3  1
3  4  2
1  2  3
1  4  4
2  4  5
*/


/****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.  For licensing terms and
** conditions see http://qt.digia.com/licensing.  For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights.  These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/

#include "vcsbaseeditorparameterwidget.h"

#include <QComboBox>
#include <QToolButton>
#include <QHBoxLayout>

#include <QDebug>

namespace VcsBase {

namespace Internal {

class SettingMappingData
{
public:
    enum Type
    {
        Invalid,
        Bool,
        String,
        Int
    };

    SettingMappingData() : boolSetting(0), m_type(Invalid)
    { }

    SettingMappingData(bool *setting) : boolSetting(setting), m_type(Bool)
    { }

    SettingMappingData(QString *setting) : stringSetting(setting), m_type(String)
    { }

    SettingMappingData(int *setting) : intSetting(setting), m_type(Int)
    { }

    Type type() const
    {
        return m_type;
    }

    union {
        bool *boolSetting;
        QString *stringSetting;
        int *intSetting;
    };

private:
    Type m_type;
};

class VcsBaseEditorParameterWidgetPrivate
{
public:
    VcsBaseEditorParameterWidgetPrivate() :
        m_layout(0), m_comboBoxOptionTemplate(QLatin1String("%{option}=%{value}"))
    { }

    QStringList m_baseArguments;
    QHBoxLayout *m_layout;
    QList<VcsBaseEditorParameterWidget::OptionMapping> m_optionMappings;
    QHash<QWidget*, SettingMappingData> m_settingMapping;
    QStringList m_comboBoxOptionTemplate;
};

} // namespace Internal

/*!
    \class VcsBase::VcsBaseEditorParameterWidget

    \brief A toolbar-like widget for use with VcsBase::VcsBaseEditor::setConfigurationWidget()
    influencing for example the generation of VCS diff output.

    The widget maintains a list of command line arguments (starting from baseArguments())
    which are set according to the state of the inside widgets. A change signal is provided
    that should trigger the rerun of the VCS operation.
*/

VcsBaseEditorParameterWidget::ComboBoxItem::ComboBoxItem(const QString &text,
                                                         const QVariant &val) :
    displayText(text),
    value(val)
{
}

VcsBaseEditorParameterWidget::VcsBaseEditorParameterWidget(QWidget *parent) :
    QWidget(parent), d(new Internal::VcsBaseEditorParameterWidgetPrivate)
{
    d->m_layout = new QHBoxLayout(this);
    d->m_layout->setContentsMargins(3, 0, 3, 0);
    d->m_layout->setSpacing(2);
    connect(this, SIGNAL(argumentsChanged()), this, SLOT(handleArgumentsChanged()));
}

VcsBaseEditorParameterWidget::~VcsBaseEditorParameterWidget()
{
    delete d;
}

QStringList VcsBaseEditorParameterWidget::baseArguments() const
{
    return d->m_baseArguments;
}

void VcsBaseEditorParameterWidget::setBaseArguments(const QStringList &b)
{
    d->m_baseArguments = b;
}

QStringList VcsBaseEditorParameterWidget::arguments() const
{
    // Compile effective arguments
    QStringList args = baseArguments();
    foreach (const OptionMapping &mapping, optionMappings())
        args += argumentsForOption(mapping);
    return args;
}

QToolButton *VcsBaseEditorParameterWidget::addToggleButton(const QString &option,
                                                           const QString &label,
                                                           const QString &toolTip)
{
    QToolButton *tb = new QToolButton;
    tb->setText(label);
    tb->setToolTip(toolTip);
    tb->setCheckable(true);
    connect(tb, SIGNAL(toggled(bool)), this, SIGNAL(argumentsChanged()));
    d->m_layout->addWidget(tb);
    d->m_optionMappings.append(OptionMapping(option, tb));
    return tb;
}

QComboBox *VcsBaseEditorParameterWidget::addComboBox(const QString &option,
                                                     const QList<ComboBoxItem> &items)
{
    QComboBox *cb = new QComboBox;
    foreach (const ComboBoxItem &item, items)
        cb->addItem(item.displayText, item.value);
    connect(cb, SIGNAL(currentIndexChanged(int)), this, SIGNAL(argumentsChanged()));
    d->m_layout->addWidget(cb);
    d->m_optionMappings.append(OptionMapping(option, cb));
    return cb;
}

void VcsBaseEditorParameterWidget::mapSetting(QToolButton *button, bool *setting)
{
    if (!d->m_settingMapping.contains(button) && button) {
        d->m_settingMapping.insert(button, Internal::SettingMappingData(setting));
        if (setting) {
            button->blockSignals(true);
            button->setChecked(*setting);
            button->blockSignals(false);
        }
    }
}

void VcsBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *setting)
{
    if (!d->m_settingMapping.contains(comboBox) && comboBox) {
        d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting));
        if (setting) {
            comboBox->blockSignals(true);
            const int itemIndex = setting ? comboBox->findData(*setting) : -1;
            if (itemIndex != -1)
                comboBox->setCurrentIndex(itemIndex);
            comboBox->blockSignals(false);
        }
    }
}

void VcsBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, int *setting)
{
    if (d->m_settingMapping.contains(comboBox) || !comboBox)
        return;

    d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting));

    if (!setting || *setting < 0 || *setting >= comboBox->count())
        return;

    comboBox->blockSignals(true);
    comboBox->setCurrentIndex(*setting);
    comboBox->blockSignals(false);
}

/*!
    \brief This property holds the format (template) of assignable command line
    options (like --file=<file> for example)

    The option's name and its actual value are specified with place markers
    within the template :
      \li %{option} for the option
      \li %{value} for the actual value

    \code
    QStringList("%{option}=%{value}"); // eg --file=a.out
    QStringList() << "%{option}" << "%{value}"; // eg --file a.out (two distinct arguments)
    \endcode
*/
QStringList VcsBaseEditorParameterWidget::comboBoxOptionTemplate() const
{
    return d->m_comboBoxOptionTemplate;
}

void VcsBaseEditorParameterWidget::setComboBoxOptionTemplate(const QStringList &optTemplate) const
{
    d->m_comboBoxOptionTemplate = optTemplate;
}

void VcsBaseEditorParameterWidget::executeCommand()
{
}

void VcsBaseEditorParameterWidget::handleArgumentsChanged()
{
    updateMappedSettings();
    executeCommand();
}

VcsBaseEditorParameterWidget::OptionMapping::OptionMapping() :
    widget(0)
{
}

VcsBaseEditorParameterWidget::OptionMapping::OptionMapping(const QString &optName, QWidget *w) :
    optionName(optName), widget(w)
{
}

const QList<VcsBaseEditorParameterWidget::OptionMapping> &VcsBaseEditorParameterWidget::optionMappings() const
{
    return d->m_optionMappings;
}

QStringList VcsBaseEditorParameterWidget::argumentsForOption(const OptionMapping &mapping) const
{
    const QToolButton *tb = qobject_cast<const QToolButton *>(mapping.widget);
    if (tb && tb->isChecked()) {
        if (!mapping.optionName.isEmpty())
            return QStringList(mapping.optionName);
        else
            return QStringList();
    }

    const QComboBox *cb = qobject_cast<const QComboBox *>(mapping.widget);
    if (cb) {
        const QString value = cb->itemData(cb->currentIndex()).toString();
        QStringList args;
        foreach (const QString &t, d->m_comboBoxOptionTemplate) {
            QString a = t;
            a.replace(QLatin1String("%{option}"), mapping.optionName);
            a.replace(QLatin1String("%{value}"), value);
            args += a;
        }
        return args;
    }

    return QStringList();
}

void VcsBaseEditorParameterWidget::updateMappedSettings()
{
    foreach (const OptionMapping &optMapping, d->m_optionMappings) {
        if (d->m_settingMapping.contains(optMapping.widget)) {
            Internal::SettingMappingData& settingData = d->m_settingMapping[optMapping.widget];
            switch (settingData.type()) {
            case Internal::SettingMappingData::Bool :
            {
                const QToolButton *tb = qobject_cast<const QToolButton *>(optMapping.widget);
                if (tb)
                    *settingData.boolSetting = tb->isChecked();
                break;
            }
            case Internal::SettingMappingData::String :
            {
                const QComboBox *cb = qobject_cast<const QComboBox *>(optMapping.widget);
                if (cb && cb->currentIndex() != -1)
                    *settingData.stringSetting = cb->itemData(cb->currentIndex()).toString();
                break;
            }
            case Internal::SettingMappingData::Int:
            {
                const QComboBox *cb = qobject_cast<const QComboBox *>(optMapping.widget);
                if (cb && cb->currentIndex() != -1)
                    *settingData.intSetting = cb->currentIndex();
                break;
            }
            case Internal::SettingMappingData::Invalid : break;
            } // end switch ()
        }
    }
}

} // namespace VcsBase

{'repo_name': 'forio/julia-studio', 'stars': '216', 'repo_language': 'C++', 'file_name': 'to-title-case.html', 'mime_type': 'text/html', 'hash': 6957481156993107120, 'source_dataset': 'data'}


/*
 * Copyright © Zhenjie Yan
 *
 * 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.
 */
package com.yanzhenjie.permission.source;

import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.os.Build;

/**
 *
android.app.Fragment Wrapper.

 * Created by Zhenjie Yan on 2017/5/1.
 */
public class FragmentSource extends Source {

    private Fragment mFragment;

    public FragmentSource(Fragment fragment) {
        this.mFragment = fragment;
    }

    @Override
    public Context getContext() {
        return mFragment.getActivity();
    }

    @Override
    public void startActivity(Intent intent) {
        mFragment.startActivity(intent);
    }

    @Override
    public void startActivityForResult(Intent intent, int requestCode) {
        mFragment.startActivityForResult(intent, requestCode);
    }

    @Override
    public boolean isShowRationalePermission(String permission) {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return false;
        return mFragment.shouldShowRequestPermissionRationale(permission);
    }
}

{'repo_name': 'yanzhenjie/AndPermission', 'stars': '6297', 'repo_language': 'Java', 'file_name': 'LauncherView.java', 'mime_type': 'text/x-java', 'hash': -6035691069855286163, 'source_dataset': 'data'}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Svg
{
    [SvgElement("tref")]
    public class SvgTextRef : SvgTextBase
    {
        private Uri _referencedElement;

        [SvgAttribute("href", SvgAttributeAttribute.XLinkNamespace)]
        public virtual Uri ReferencedElement
        {
            get { return this._referencedElement; }
            set { this._referencedElement = value; }
        }

        internal override IEnumerable<ISvgNode> GetContentNodes()
        {
            var refText = this.OwnerDocument.IdManager.GetElementById(this.ReferencedElement) as SvgTextBase;
            IEnumerable<ISvgNode> contentNodes = null;

            if (refText == null)
            {
                contentNodes = base.GetContentNodes();
            }
            else
            {
                contentNodes = refText.GetContentNodes();
            }

            contentNodes = contentNodes.Where(o => !(o is ISvgDescriptiveElement));

            return contentNodes;
        }

        public override SvgElement DeepCopy()
        {
            return DeepCopy<SvgTextRef>();
        }

        public override SvgElement DeepCopy<T>()
        {
            var newObj = base.DeepCopy<T>() as SvgTextRef;
            newObj.X = this.X;
            newObj.Y = this.Y;
            newObj.Dx = this.Dx;
            newObj.Dy = this.Dy;
            newObj.Text = this.Text;
            newObj.ReferencedElement = this.ReferencedElement;

            return newObj;
        }

    }
}

{'repo_name': 'arkypita/LaserGRBL', 'stars': '494', 'repo_language': 'C#', 'file_name': 'SvgModeForm.cs', 'mime_type': 'text/plain', 'hash': -3791238643139488661, 'source_dataset': 'data'}


/*
 * Copyright (c) 2014 Broadcom Corporation
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, 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.
 */

#ifndef _vendor_h_
#define _vendor_h_

#define BROADCOM_OUI	0x001018

enum brcmf_vndr_cmds {
	BRCMF_VNDR_CMDS_UNSPEC,
	BRCMF_VNDR_CMDS_DCMD,
	BRCMF_VNDR_CMDS_LAST
};

/**
 * enum brcmf_nlattrs - nl80211 message attributes
 *
 * @BRCMF_NLATTR_LEN: message body length
 * @BRCMF_NLATTR_DATA: message body
 */
enum brcmf_nlattrs {
	BRCMF_NLATTR_UNSPEC,

	BRCMF_NLATTR_LEN,
	BRCMF_NLATTR_DATA,

	__BRCMF_NLATTR_AFTER_LAST,
	BRCMF_NLATTR_MAX = __BRCMF_NLATTR_AFTER_LAST - 1
};

/**
 * struct brcmf_vndr_dcmd_hdr - message header for cfg80211 vendor command dcmd
 *				support
 *
 * @cmd: common dongle cmd definition
 * @len: length of expecting return buffer
 * @offset: offset of data buffer
 * @set: get or set request(optional)
 * @magic: magic number for verification
 */
struct brcmf_vndr_dcmd_hdr {
	uint cmd;
	int len;
	uint offset;
	uint set;
	uint magic;
};

extern const struct wiphy_vendor_command brcmf_vendor_cmds[];

#endif /* _vendor_h_ */

{'repo_name': 'PhoenixOS/kernel', 'stars': '202', 'repo_language': 'C', 'file_name': 'img-ir-hw.c', 'mime_type': 'text/x-c', 'hash': 1736777659325106525, 'source_dataset': 'data'}