text:
package pbutil

import (
	uipb "fgame/fgame/common/codec/pb/ui"
	babypbutil "fgame/fgame/game/baby/pbutil"
	droptemplate "fgame/fgame/game/drop/template"
	email "fgame/fgame/game/email/player"
)

func BuildSCEmailsGet(emailObjMap []*email.PlayerEmailObject) *uipb.SCEmailsGet {
	scEmailsGet := &uipb.SCEmailsGet{}
	if len(emailObjMap) > 0 {

		scEmailsGetArr := make([]*uipb.EmailInfo, 0, len(emailObjMap))
		for _, emailObj := range emailObjMap {
			scEmailsGetArr = append(scEmailsGetArr, buildEmailInfo(emailObj))
		}
		scEmailsGet.EmailInfo = scEmailsGetArr
	}
	return scEmailsGet
}

func buildEmailInfo(emailObject *email.PlayerEmailObject) *uipb.EmailInfo {
	emailId := emailObject.GetEmailId()
	isRead := emailObject.GetIsRead()
	isGetAttachment := emailObject.GetIsGetAttachment()
	title := emailObject.GetTitle()
	content := emailObject.GetContent()
	createTime := emailObject.GetCreateTime()
	attachmentInfo := emailObject.GetAttachmentInfo()

	scEmailInfo := &uipb.EmailInfo{}
	scEmailInfo.EmailId = &emailId
	scEmailInfo.IsRead = &isRead
	scEmailInfo.IsGetAttachment = &isGetAttachment
	scEmailInfo.Title = &title
	scEmailInfo.Content = &content
	scEmailInfo.CreateTime = &createTime
	if len(attachmentInfo) > 0 {
		scEmailInfo.AttachementInfo = buildAttachmentList(attachmentInfo)
	}

	return scEmailInfo
}

func buildAttachmentList(attachmentInfo []*droptemplate.DropItemData) (attachList []*uipb.AttachementInfo) {
	for _, itemData := range attachmentInfo {
		itemId := itemData.GetItemId()
		num := itemData.GetNum()
		level := itemData.GetLevel()
		bindType := int32(itemData.GetBindType())
		upstar := itemData.GetUpstar()
		attrList := itemData.GetAttrList()
		isRandomAttr := itemData.GetIsRandomAttr()
		expireType := int32(itemData.GetExpireType())
		expireTime := itemData.GetExpireTimestamp()
		itemGetTime := itemData.GetItemGetTime()
		quality := itemData.GetQuality()
		danbei := itemData.GetDanbei()
		talentList := itemData.GetTalentList()
		sex := int32(itemData.GetSex())
		openLightLevel := int32(itemData.GetOpenLightLevel())
		openTimes := int32(itemData.GetOpenTimes())
		info := &uipb.AttachementInfo{}
		info.ItemId = &itemId
		info.Num = &num
		info.Level = &level
		info.Upstar = &upstar
		info.AttrList = attrList
		info.BindType = &bindType
		info.IsRandomAttr = &isRandomAttr
		info.ExpireType = &expireType
		info.ExpireTime = &expireTime
		info.ItemGetTime = &itemGetTime
		info.Quality = &quality
		info.Sex = &sex
		info.TalentList = babypbutil.BuildTalentInfoList(talentList)
		info.Danbei = &danbei

		info.OpenLightLevel = &openLightLevel
		info.OpenTimes = &openTimes
		attachList = append(attachList, info)
	}

	return attachList
}

func BuildSCReadEmail(emailId int64) *uipb.SCReadEmail {
	scReadEmail := &uipb.SCReadEmail{}
	scReadEmail.EmailId = &emailId

	return scReadEmail
}

func BuildSCDelHadReadEmail(hadDelEmailIdArr []int64) *uipb.SCDelHadReadEmail {
	scDelHadReadEmail := &uipb.SCDelHadReadEmail{}
	scDelHadReadEmail.EmailIdList = hadDelEmailIdArr

	return scDelHadReadEmail
}

func BuildSCDelEmail(emailId int64) *uipb.SCDelEmail {
	scDelEmail := &uipb.SCDelEmail{}
	scDelEmail.EmailId = &emailId

	return scDelEmail
}

func BuildSCGetAttachment(emailId int64, totalItemList []*droptemplate.DropItemData) *uipb.SCGetAttachment {
	scGetAttachment := &uipb.SCGetAttachment{}
	scGetAttachment.EmailId = &emailId
	scGetAttachment.AttachementInfo = buildAttachmentList(totalItemList)

	return scGetAttachment
}

func BuildSCGetAttachmentBatch(emailIdArr []int64, totalItemList []*droptemplate.DropItemData) *uipb.SCGetAttachmentBatch {
	scGetAttachmentBatch := &uipb.SCGetAttachmentBatch{}
	scGetAttachmentBatch.AttachementInfo = buildAttachmentList(totalItemList)
	scGetAttachmentBatch.EmailIdList = emailIdArr

	return scGetAttachmentBatch
}

func BuildSCAddEmail(emailObject *email.PlayerEmailObject) *uipb.SCAddEmail {
	scAddEmail := &uipb.SCAddEmail{}
	scAddEmail.EmailInfo = buildEmailInfo(emailObject)

	return scAddEmail
}

repository: rebider/Fgame

repo_name: rebider/Fgame

gha_license_id: MIT


text:
@article{Hamed2006,
    author = {Ben Hamed, Mahe and Wang, Feng},
    journal = {Diachronica},
    pages = {29-60},
    title = {Stuck in the forest: Trees, networks and Chinese dialects},
    volume = {23},
    year = {2006}
}

license: MIT

repository: cldf/cltoolkit

license_type: permissive

repo_name: cldf/cltoolkit

branch_name: refs/heads/main

gha_language: Python

extension: bib


text:
// defined from .NET Framework 4.5 and NETFX_CORE

namespace UniRx
{
    public interface IProgress<T>
    {
        void Report(T value);
    }
}

repository: kimsama/Unity-ZipDownload

repo_name: kimsama/Unity-ZipDownload

branch_name: refs/heads/master

gha_language: C#

extension: cs


text:
#pragma once
#include "raylib.h"
#include <iostream>
class Sprite : public Vector2
{
public:
	Texture2D currentSprite;
	Texture2D * textureList = NULL;
	int cellCount;
	float frameRate;

	void Update();
	void Animate(float gameTimer, int frameCount);

	Sprite(const std::string * filename, const int cellCount, const float _frameRate);
	Sprite();
	~Sprite();
};

repository: devjonathanday/CPP-Projects

repo_name: devjonathanday/CPP-Projects

extension: h


text:
DESCRIPTION = "User space daemon for extended IEEE 802.11 management"
HOMEPAGE = "http://hostap.epitest.fi"
SECTION = "kernel/userland"
PRIORITY = "optional"
MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
LICENSE = "GPL"
RDEPENDS = "hostap-modules (${PV}) hostap-utils (${PV})"
DEPENDS_mtx-1_append = "madwifi-modules"

SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
	file://makefile-cross.diff;patch=1;pnum=0 \
	file://madwifi-bsd-fix.diff;patch=1;pnum=0 \
	file://defconfig \
	file://init"

S = "${WORKDIR}/hostapd-${PV}"

do_configure() {
       install -m 0644 ${WORKDIR}/defconfig ${S}/.config
}

do_compile() {
	CFLAGS='${CFLAGS}' CC='${CC}' make
}

do_install() {
	install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
	make TARGET_PREFIX=${D}${sbindir} install
	install -m 0644 hostapd.conf ${D}${sysconfdir}
	install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
}

repository: Terentyev/familiar-linux

repo_name: Terentyev/familiar-linux

extension: bb


text:
@article{DBLP:journals/pacmpl/JiS0H20,
  author    = {Ruyi Ji and
               Yican Sun and
               Yingfei Xiong and
               Zhenjiang Hu},
  title     = {Guiding dynamic programing via structural probability for accelerating
               programming by example},
  journal   = {Proc. {ACM} Program. Lang.},
  volume    = {4},
  number    = {{OOPSLA}},
  pages     = {224:1--224:29},
  year      = {2020},
  url       = {https://doi.org/10.1145/3428292},
  doi       = {10.1145/3428292},
  timestamp = {Fri, 11 Dec 2020 14:27:07 +0100},
  biburl    = {https://dblp.org/rec/journals/pacmpl/JiS0H20.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}

repository: gtwgtwgtw/academic-kickstart

repo_name: gtwgtwgtw/academic-kickstart


text:
package alsc

import (
    "net/url"

    "github.com/bububa/opentaobao/model"
)

/*
查询卡模板列表(支持数据下行) APIRequest
alibaba.alsc.crm.card.pagetmp

查询卡模板列表(支持数据下行)
当传递了数据下行参数:
     * isDeleted,lastMaxId,gmtModified,num时,进行数据下行处理,返回结果不带分页信息
     * 否则分页查询卡模板,返回结果带有分页信息
*/
type AlibabaAlscCrmCardPagetmpRequest struct {
    model.Params

    // 请求结果
    paramPullCardTemplateOpenReq   *PullCardTemplateOpenReq

}

func NewAlibabaAlscCrmCardPagetmpRequest() *AlibabaAlscCrmCardPagetmpRequest{
    return &AlibabaAlscCrmCardPagetmpRequest{
        Params: model.NewParams(),
    }
}

func (r AlibabaAlscCrmCardPagetmpRequest) GetApiMethodName() string {
    return "alibaba.alsc.crm.card.pagetmp"
}

func (r AlibabaAlscCrmCardPagetmpRequest) GetApiParams() url.Values {
    params := url.Values{}
    for k, v := range r.GetRawParams() {
        params.Set(k, v.String())
    }
    return params
}

func (r *AlibabaAlscCrmCardPagetmpRequest) SetParamPullCardTemplateOpenReq(paramPullCardTemplateOpenReq *PullCardTemplateOpenReq) error {
    r.paramPullCardTemplateOpenReq = paramPullCardTemplateOpenReq
    r.Set("param_pull_card_template_open_req", paramPullCardTemplateOpenReq)
    return nil
}

func (r AlibabaAlscCrmCardPagetmpRequest) GetParamPullCardTemplateOpenReq() *PullCardTemplateOpenReq {
    return r.paramPullCardTemplateOpenReq
}

repository: phpyandong/opentaobao

repo_name: phpyandong/opentaobao

extension: go


text:
using QTFK.Attributes;
using QTFK.Services;

namespace QTFK.Models.DBIO
{
    [OleDB]
    internal class OleDBUpdateQuery : AbstractUpdateQuery
    {
        public OleDBUpdateQuery(IParameterBuilderFactory parameterBuilderFactory) : base(parameterBuilderFactory)
        {
        }
    }
}

repository: hossmi/qtfk

repo_name: hossmi/qtfk

branch_name: refs/heads/develop


text:
SUMMARY = "Utility functions for dLeyna libraries"
DESCRIPTION = "dleyna-core is a library of utility functions that are used \
by the higher level dLeyna libraries that communicate with DLNA devices, \
e.g., dleyna-server. In brief, it provides APIs for logging, error, settings \
and task management and an IPC asbstraction API."
HOMEPAGE = "https://01.org/dleyna/"

LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
                    file://libdleyna/core/core.c;endline=21;md5=68602998351825b0844aae34c684c54e"

DEPENDS = "glib-2.0 gupnp"

PV .= "+git${SRCPV}"

SRC_URI = "git://github.com/01org/${BPN}.git;branch=master;protocol=https"
SRCREV = "1c6853f5bc697dc0a8774fd70dbc915c4dbe7c5b"
S = "${WORKDIR}/git"

inherit autotools pkgconfig

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake


text:
package main

import (
	"fmt"
	_ "go.pyspa.org/brbundle/examples"

	"net/http"

	"github.com/labstack/echo"
	"go.pyspa.org/brbundle/brecho"
)

func main() {
	e := echo.New()
	e.GET("/api/status", func (c echo.Context) error {
		return c.String(http.StatusOK, "Hello, World!")
	})
	g := e.Group("/assets")
	fmt.Println("You can access index.html at /assets/index.html")
	g.GET("/*", brecho.Mount())
	e.Logger.Fatal(e.Start(":1323"))
}

repository: pyspa/brbundle

repo_name: pyspa/brbundle

gha_language: Go


text:
DESCRIPTION = "RAUC bundle generator"

inherit bundle

RAUC_BUNDLE_COMPATIBLE = "${MACHINE}"
RAUC_BUNDLE_VERSION = "${DISTRO_VERSION}"
RAUC_BUNDLE_DESCRIPTION = "Generic Demo Bundle"
RAUC_BUNDLE_SLOTS = "rootfs"
RAUC_SLOT_rootfs = "core-image-base"
RAUC_SLOT_rootfs[fstype] = "ext4"

RAUC_KEY_FILE = "${THISDIR}/files/development-1.key.pem"
RAUC_CERT_FILE = "${THISDIR}/files/development-1.cert.pem"

gha_language: Batchfile


text:
@Article{Ross2012a,
  title = {How Christians reconcile their personal political views and the teachings of their faith: Projection as a means of dissonance reduction},
  author = {Lee D. L.D. Ross and Yphtach Lelkes and Alexandra G. A.G. Russell},
  journal = {Proceedings of the National Academy of Sciences},
  pages = {3616--3622},
  year = {2012},
  volume = {109},
  number = {10},
  isbn = {0027-8424},
  doi = {10.1073/pnas.1117557109},
  keywords = {mypubs},
  url = {https://www.dropbox.com/s/tsnio6vhx86305i/3616.full.pdf?dl=1},
  abstract = {The present study explores the dramatic projection of one's own views onto those of Jesus among conservative and liberal American Christians. In a large-scale survey, the relevant views that each group attributed to a contemporary Jesus differed almost as much as their own views. Despite such dissonance-reducing projection, however, conservatives acknowledged the relevant discrepancy with regard to “fellowship” issues (e.g., taxation to reduce economic inequality and treatment of immigrants) and liberals acknowledged the relevant discrepancy with regard to “morality” issues (e.g., abortion and gay marriage). However, conservatives also claimed that a contemporary Jesus would be even more conservative than themselves on the former issues whereas liberals claimed that Jesus would be even more liberal than themselves on the latter issues. Further reducing potential dissonance, liberal and conservative Christians differed markedly in the types of issues they claimed to be more central to their faith. A concluding discussion considers the relationship between individual motivational processes and more social processes that may underlie the present findings, as well as implications for contemporary social and political conflict.},
  issn = {0027-8424},
  mendeley.tags = {mypubs},
  pmid = {22308413},
  journaltitle = {Proceedings of the National Academy of Sciences},
  pubtype = {2},
}

repository: ylelkes/academic-kickstart

repo_name: ylelkes/academic-kickstart


text:
SUMMARY = "ROS core"
HOMEPAGE = "http://www.ros.org/wiki/ROS"
LICENSE  = "BSD"
LIC_FILES_CHKSUM = "file://git/stack.xml;md5=2f42c226cd143722544441b73c2d1d2c"

VCSDIR = "git"
inherit catkin

BBCLASSEXTEND = "native"

SRC_URI  = "git://github.com/wg-debs/ros-release.git;rev=debian/ros-fuerte-ros_1.8.9_lucid;protocol=git \
            file://cross-compilation.patch \
"

DEPENDS += "\
	gtest \
	python-nose-native \
	python \
	python-native \
	bzip2-native \
	python-rospkg-native \
	boost \
	ros-fuerte-rospack \
	pkgconfig-native \
	log4cxx \
"

S = "${WORKDIR}"


text:
import {
  Body,
  Controller,
  Get,
  Post,
  UseGuards,
  UsePipes,
  ValidationPipe,
} from '@nestjs/common';
import {
  ApiBearerAuth,
  ApiOperation,
  ApiResponse,
  ApiTags,
} from '@nestjs/swagger';
import { JwtAuthGuard } from './jwt-auth.guard';
// import { UserEntity } from './user.entity';
import { UserService } from './user.service';
import { LoginUserDto } from './dto/login-user.dto';
import { CreateUserDto } from './dto/user-create.dto';
import { UserEntity } from './user.entity';

@ApiTags('User')
@Controller('user')
export class UserController {
  constructor(private readonly userService: UserService) {}

  @Post('register')
  @ApiOperation({ summary: 'Register middleware' })
  @ApiResponse({ status: 200, type: String, description: 'Return JWT Token' })
  @UsePipes(new ValidationPipe())
  async createUser(@Body() createUserDto: CreateUserDto): Promise<string> {
    return await this.userService.createUser(createUserDto);
  }

  @Post('login')
  @ApiOperation({ summary: 'Login middleware' })
  @ApiResponse({ status: 200, type: String, description: 'Return JWT Token' })
  @UsePipes(new ValidationPipe())
  async loginUser(@Body() loginUserDto: LoginUserDto): Promise<string> {
    return await this.userService.loginUser(loginUserDto);
  }

  @Get('all')
  @ApiBearerAuth('JWT')
  @ApiOperation({ summary: 'Get all users' })
  @ApiResponse({ status: 200, type: [UserEntity] })
  @UseGuards(JwtAuthGuard)
  async getAllUsers(): Promise<UserEntity[]> {
    return await this.userService.getAllUsers();
  }
}

extension: ts


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using booklist.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;

namespace booklist.Controllers {

  public class BooksController : Controller {

    private readonly BooksContext _db;

    public BooksController (BooksContext db) {
      _db = db;
    }

    // GET: Books
    public async Task<IActionResult> Index () {
      return View (await _db.Books.ToListAsync ());
    }

    // GET: Books/Details/5
    public async Task<IActionResult> Details (int? id) {
      if (id == null) {
        return NotFound ();
      }

      var book = await _db.Books
        .FirstOrDefaultAsync (m => m.Id == id);
      if (book == null) {
        return NotFound ();
      }

      return View (book);
    }

    // GET: Books/Create
    public IActionResult Create () {
      return View ();
    }

    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<IActionResult> Create ([Bind ("Id,Name")] Book book) {
      if (ModelState.IsValid) {
        _db.Add (book);
        await _db.SaveChangesAsync ();
        return RedirectToAction (nameof (Index));
      }
      return View (book);
    }

    // GET: Books/Edit/5
    public async Task<IActionResult> Edit (int? id) {
      if (id == null) {
        return NotFound ();
      }

      var book = await _db.Books.FindAsync (id);
      if (book == null) {
        return NotFound ();
      }
      return View (book);
    }

    // POST: Books/Edit/5
    // To protect from overposting attacks, please enable the specific properties you want to bind to, for
    // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
    [HttpPost]
    [ValidateAntiForgeryToken]
    public async Task<IActionResult> Edit (int id, [Bind ("Id,Name")] Book book) {
      if (id != book.Id) {
        return NotFound ();
      }

      if (ModelState.IsValid) {
        try {
          _db.Update (book);
          await _db.SaveChangesAsync ();
        } catch (DbUpdateConcurrencyException) {
          if (!BookExists (book.Id)) {
            return NotFound ();
          } else {
            throw;
          }
        }
        return RedirectToAction (nameof (Index));
      }
      return View (book);
    }

    // GET: Books/Delete/5
    public async Task<IActionResult> Delete (int? id) {
      if (id == null) {
        return NotFound ();
      }

      var book = await _db.Books
        .FirstOrDefaultAsync (m => m.Id == id);
      if (book == null) {
        return NotFound ();
      }

      return View (book);
    }

    // POST: Books/Delete/5
    [HttpPost, ActionName ("Delete")]
    [ValidateAntiForgeryToken]
    public async Task<IActionResult> DeleteConfirmed (int id) {
      var book = await _db.Books.FindAsync (id);
      _db.Books.Remove (book);
      await _db.SaveChangesAsync ();
      return RedirectToAction (nameof (Index));
    }

    private bool BookExists (int id) {
      return _db.Books.Any (e => e.Id == id);
    }
  }
}

gha_language: HTML


text:
package argparse

// Copyright (c) 2020 by Gilbert Ramirez <gram@alumni.rice.edu>

import (
	"fmt"
	//	"log"
)

type Values interface{}

type ParserCallback func(*Command, Values) error

type Command struct {
	// The name of the program or subcommand
	Name string

	// This can be a multi-line string that is shown
	// after after the command name, and before the options.
	Description string

	// This can be a multi-line string that is shown
	// after all the options in the --help output
	Epilog string

	// The struct that will receive the values after parsing
	Values Values

	// The function to call when this parser is selected
	Function ParserCallback

	// Was an option seen during the parse? The key is the name
	// of the destination variable.
	Seen map[string]bool

	// Was a sub-command seen during the parse?
	CommandSeen map[string]bool

	// Internal fields
	subCommands         []*Command
	switchArguments     []*Argument
	positionalArguments []*Argument

	numRequiredPositionalArguments int
	// -1 if there is no max (i.e., if the final NumArgsGlob is "*" or "+")
	numMaxPositionalArguments int

	// Pointer to the ArgumentParser
	ap *ArgumentParser
}

func (self *Command) init(parent *Command, ap *ArgumentParser) {
	self.Seen = make(map[string]bool)
	self.CommandSeen = make(map[string]bool)
	self.ap = ap

	// Nothing futher for the root Command
	if parent == nil {
		return
	}

	// Does the parent have any arguments to inherit?
	for _, arg := range parent.switchArguments {
		if arg.Inherit {
			newArg := arg.deepCopy()
			self.Add(newArg)
		}
	}
}

func (self *Command) propagateInherited(cmds []*Command, myIndex int) {
	if self != cmds[myIndex] {
		panic(fmt.Sprintf("Expected %v at %d but got %v", self, myIndex,
			cmds[myIndex]))
	}
	if len(self.switchArguments) == 0 {
		return
	}

	nextIndex := myIndex + 1
	if len(cmds) <= nextIndex {
		return
	}
	nextCmd := cmds[nextIndex]

	if len(nextCmd.switchArguments) == 0 {
		return
	}

	for _, arg := range self.switchArguments {
		if arg.Inherit && self.Seen[arg.Dest] && !nextCmd.Seen[arg.Dest] {
			// Propagate
			found := false
			for _, nextCmdArg := range nextCmd.switchArguments {
				if nextCmdArg.Dest == arg.Dest {
					found = true
					nextCmdArg.value.setValue(arg.value.getValue())
					nextCmd.Seen[arg.Dest] = true
					break
				}
			}
			if !found {
				panic(fmt.Sprintf("Arg %s inherited from %s to %s can't be found",
					arg.Dest, self.Name, nextCmd.Name))
			}
		}
	}

	if len(cmds) > nextIndex {
		nextCmd.propagateInherited(cmds, nextIndex)
	}
}

func (self *Command) New(cmd *Command) *Command {

	// Check for duplicates
	for _, other := range self.subCommands {
		if other.Name == cmd.Name {
			panic(fmt.Sprintf("Sub-command %s already exists in %s",
				other.Name, self.Name))
		}
	}

	cmd.init(self, self.ap)

	self.subCommands = append(self.subCommands, cmd)
	return cmd
}

// TODO - check that it's not a HelpSwitch; Command will need to know HelpSwitches
func (self *Command) Add(arg *Argument) {

	// Arguments with Inherit == true cannot be added after a sub-command is already
	// added
	if arg.Inherit && len(self.subCommands) > 0 {
		panic(fmt.Sprintf("Cannot add argument %s because it's Inherit flag is true "+
			"and the Command %s already has sub-commands", arg.PrettyName(),
			self.Name))
	}

	// Check for a duplicate
	if arg.isPositional() {
		for _, other := range self.positionalArguments {
			if other.Name == arg.Name {
				panic(fmt.Sprintf("%s is already used by a "+
					"positional argument in this Command.", arg.Name))
			}
		}
	} else {
		for _, other := range self.switchArguments {
			for _, otherSwitch := range other.Switches {
				for _, thisSwitch := range arg.Switches {
					if otherSwitch == thisSwitch {
						panic(fmt.Sprintf("%s is already used by a "+
							"switch argument in this Command.", thisSwitch))
					}
				}
			}
		}
	}

	// Sanity check
	if self.Values == nil {
		panic(fmt.Sprintf("There is no Values field set for Command %s", self.Name))
	}

	// set arg.value
	arg.init(self.Values, &self.ap.Messages)

	if arg.isPositional() {
		if len(self.positionalArguments) > 0 {
			prevArg := self.positionalArguments[len(self.positionalArguments)-1]
			if prevArg.NumArgsGlob == "*" || prevArg.NumArgsGlob == "+" ||
				prevArg.NumArgsGlob == "?" {
				panic(fmt.Sprintf(
					"Cannot add a positional argument after argument "+
						"'%s' which has a variable number of values.",
					prevArg.PrettyName()))
			}
		}

		self.positionalArguments = append(self.positionalArguments, arg)
		// If the user didn't set it, it's 1.
		if arg.NumArgs == 0 && arg.NumArgsGlob == "" {
			arg.NumArgs = 1
		}
		var canBeMoreThanOne bool
		if arg.NumArgs > 0 {
			self.numRequiredPositionalArguments += arg.NumArgs
			self.numMaxPositionalArguments += arg.NumArgs
			canBeMoreThanOne = true
		} else if arg.NumArgsGlob == "+" {
			// + : one or more
			arg.NumArgs = -1
			self.numRequiredPositionalArguments++
			self.numMaxPositionalArguments = -1
			canBeMoreThanOne = true
		} else if arg.NumArgsGlob == "?" {
			// ? : zero or one
			arg.NumArgs = -1
			self.numMaxPositionalArguments++
			canBeMoreThanOne = false
		} else if arg.NumArgsGlob == "*" {
			// * : zero or more
			arg.NumArgs = -1
			self.numMaxPositionalArguments = -1
			canBeMoreThanOne = true
		} else {
			panic("Not reached")
		}

		// If the positional argument accepts more than one value,
		// the destination must be a slice
		if arg.NumArgs == -1 && canBeMoreThanOne && arg.value.storageType() != Slice {
			panic(fmt.Sprintf(
				"Cannot use positional argument %s with a non-slice destination variable because NumArgsGlob is %s", arg.PrettyName(), arg.NumArgsGlob))
		} else if arg.NumArgs > 1 && arg.value.storageType() != Slice {
			panic(fmt.Sprintf(
				"Cannot use positional argument %s with a non-slice destination variable because NumArgs is %d", arg.PrettyName(), arg.NumArgs))
		}

	} else if arg.isSwitch() {
		if arg.NumArgsGlob != "" {
			panic(fmt.Sprintf(
				"Cannot add a switch argument (%s) with a NumArgGlobs "+
					"pattern (%s)", arg.PrettyName(), arg.NumArgsGlob))
		}
		if arg.NumArgs == 0 {
			arg.NumArgs = arg.value.defaultSwitchNumArgs()
		}
		// If the switch argument accepts more than one value,
		// the destination must be a slice
		if arg.NumArgs > 1 && arg.value.storageType() != Slice {
			panic(fmt.Sprintf(
				"Cannot use switch argument %s with a non-slice destination variable because NumArgs is %d", arg.PrettyName(), arg.NumArgs))
		}
		self.switchArguments = append(self.switchArguments, arg)
	} else {
		panic(fmt.Sprintf("Cannot determine argument type for %v", arg))
	}
}

repository: gilramir/argparse

repo_name: gilramir/argparse


text:
file(REMOVE_RECURSE
  "CMakeFiles/ArrayTransformation.dir/main.cpp.o"
  "ArrayTransformation.pdb"
  "ArrayTransformation"
)

# Per-language clean rules from dependency scanning.
foreach(lang CXX)
  include(CMakeFiles/ArrayTransformation.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

extension: cmake


text:
version https://git-lfs.github.com/spec/v1
oid sha256:ea3f8e9ea2c6f30ef9d78f93ff559deb520f3fe0342aeff1cc2aed8700a30f61
size 3534

repository: initialz/tensorflow-yolo-face-ios

repo_name: initialz/tensorflow-yolo-face-ios

extension: hh


text:
// Copyright 2016-2018, Pulumi Corporation.
//
// 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 resource

import (
	"sort"

	"github.com/pulumi/pulumi/sdk/v3/go/common/slice"
)

// ObjectDiff holds the results of diffing two object property maps.
type ObjectDiff struct {
	Adds    PropertyMap               // properties in this map are created in the new.
	Deletes PropertyMap               // properties in this map are deleted from the new.
	Sames   PropertyMap               // properties in this map are the same.
	Updates map[PropertyKey]ValueDiff // properties in this map are changed in the new.
}

// Added returns true if the property 'k' has been added in the new property set.
func (diff *ObjectDiff) Added(k PropertyKey) bool {
	_, has := diff.Adds[k]
	return has
}

// Deleted returns true if the property 'k' has been deleted from the new property set.
func (diff *ObjectDiff) Deleted(k PropertyKey) bool {
	_, has := diff.Deletes[k]
	return has
}

// Updated returns true if the property 'k' has been changed between new and old property sets.
func (diff *ObjectDiff) Updated(k PropertyKey) bool {
	_, has := diff.Updates[k]
	return has
}

// Changed returns true if the property 'k' is known to be different between old and new.
func (diff *ObjectDiff) Changed(k PropertyKey) bool {
	return diff.Added(k) || diff.Deleted(k) || diff.Updated(k)
}

// Same returns true if the property 'k' is *not* known to be different; note that this isn't the same as looking up in
// the Sames map, because it is possible the key is simply missing altogether (as is the case for nulls).
func (diff *ObjectDiff) Same(k PropertyKey) bool {
	return !diff.Changed(k)
}

// AnyChanges returns true if there are any changes (adds, deletes, updates) in the diff. Otherwise returns false.
func (diff *ObjectDiff) AnyChanges() bool {
	return diff != nil && len(diff.Adds)+len(diff.Deletes)+len(diff.Updates) > 0
}

// Keys returns a stable snapshot of all keys known to this object, across adds, deletes, sames, and updates.
func (diff *ObjectDiff) Keys() []PropertyKey {
	bufferSize := len(diff.Adds) + len(diff.Deletes) + len(diff.Sames) + len(diff.Updates)
	ks := slice.Prealloc[PropertyKey](bufferSize)
	for k := range diff.Adds {
		ks = append(ks, k)
	}
	for k := range diff.Deletes {
		ks = append(ks, k)
	}
	for k := range diff.Sames {
		ks = append(ks, k)
	}
	for k := range diff.Updates {
		ks = append(ks, k)
	}
	sort.Slice(ks, func(i, j int) bool { return ks[i] < ks[j] })
	return ks
}

// All keys where Changed(k) = true.
func (diff *ObjectDiff) ChangedKeys() []PropertyKey {
	var ks []PropertyKey
	if diff != nil {
		for _, k := range diff.Keys() {
			if diff.Changed(k) {
				ks = append(ks, k)
			}
		}
	}
	return ks
}

// ValueDiff holds the results of diffing two property values.
type ValueDiff struct {
	Old    PropertyValue // the old value.
	New    PropertyValue // the new value.
	Array  *ArrayDiff    // the array's detailed diffs (only for arrays).
	Object *ObjectDiff   // the object's detailed diffs (only for objects).
}

// ArrayDiff holds the results of diffing two arrays of property values.
type ArrayDiff struct {
	Adds    map[int]PropertyValue // elements added in the new.
	Deletes map[int]PropertyValue // elements deleted in the new.
	Sames   map[int]PropertyValue // elements the same in both.
	Updates map[int]ValueDiff     // elements that have changed in the new.
}

// Len computes the length of this array, taking into account adds, deletes, sames, and updates.
func (diff *ArrayDiff) Len() int {
	length := 0
	for i := range diff.Adds {
		if i+1 > length {
			length = i + 1
		}
	}
	for i := range diff.Deletes {
		if i+1 > length {
			length = i + 1
		}
	}
	for i := range diff.Sames {
		if i+1 > length {
			length = i + 1
		}
	}
	for i := range diff.Updates {
		if i+1 > length {
			length = i + 1
		}
	}
	return length
}

// IgnoreKeyFunc is the callback type for Diff's ignore option.
type IgnoreKeyFunc func(key PropertyKey) bool

// Diff returns a diffset by comparing the property map to another; it returns nil if there are no diffs.
func (props PropertyMap) Diff(other PropertyMap, ignoreKeys ...IgnoreKeyFunc) *ObjectDiff {
	adds := make(PropertyMap)
	deletes := make(PropertyMap)
	sames := make(PropertyMap)
	updates := make(map[PropertyKey]ValueDiff)

	ignore := func(key PropertyKey) bool {
		for _, ikf := range ignoreKeys {
			if ikf(key) {
				return true
			}
		}
		return false
	}

	// First find any updates or deletes.
	for k, old := range props {
		if ignore(k) {
			continue
		}

		if new, has := other[k]; has {
			// If a new exists, use it; for output properties, however, ignore differences.
			if new.IsOutput() {
				sames[k] = old
			} else if diff := old.Diff(new, ignoreKeys...); diff != nil {
				if !old.HasValue() {
					adds[k] = new
				} else if !new.HasValue() {
					deletes[k] = old
				} else {
					updates[k] = *diff
				}
			} else {
				sames[k] = old
			}
		} else if old.HasValue() {
			// If there was no new property, it has been deleted.
			deletes[k] = old
		}
	}

	// Next find any additions not in the old map.
	for k, new := range other {
		if ignore(k) {
			continue
		}

		if _, has := props[k]; !has && new.HasValue() {
			adds[k] = new
		}
	}

	// If no diffs were found, return nil; else return a diff structure.
	if len(adds) == 0 && len(deletes) == 0 && len(updates) == 0 {
		return nil
	}
	return &ObjectDiff{
		Adds:    adds,
		Deletes: deletes,
		Sames:   sames,
		Updates: updates,
	}
}

// Diff returns a diff by comparing a single property value to another; it returns nil if there are no diffs.
func (v PropertyValue) Diff(other PropertyValue, ignoreKeys ...IgnoreKeyFunc) *ValueDiff {
	if v.IsArray() && other.IsArray() {
		old := v.ArrayValue()
		new := other.ArrayValue()
		// If any elements exist in the new array but not the old, track them as adds.
		adds := make(map[int]PropertyValue)
		for i := len(old); i < len(new); i++ {
			adds[i] = new[i]
		}
		// If any elements exist in the old array but not the new, track them as adds.
		deletes := make(map[int]PropertyValue)
		for i := len(new); i < len(old); i++ {
			deletes[i] = old[i]
		}
		// Now if elements exist in both, track them as sames or updates.
		sames := make(map[int]PropertyValue)
		updates := make(map[int]ValueDiff)
		for i := 0; i < len(old) && i < len(new); i++ {
			if diff := old[i].Diff(new[i]); diff != nil {
				updates[i] = *diff
			} else {
				sames[i] = old[i]
			}
		}

		if len(adds) == 0 && len(deletes) == 0 && len(updates) == 0 {
			return nil
		}
		return &ValueDiff{
			Old: v,
			New: other,
			Array: &ArrayDiff{
				Adds:    adds,
				Deletes: deletes,
				Sames:   sames,
				Updates: updates,
			},
		}
	}
	if v.IsObject() && other.IsObject() {
		old := v.ObjectValue()
		new := other.ObjectValue()
		if diff := old.Diff(new, ignoreKeys...); diff != nil {
			return &ValueDiff{
				Old:    v,
				New:    other,
				Object: diff,
			}
		}
		return nil
	}

	// If we got here, either the values are primitives, or they weren't the same type; do a simple diff.
	if v.DeepEquals(other) {
		return nil
	}
	return &ValueDiff{Old: v, New: other}
}

// DeepEquals returns true if this property map is deeply equal to the other property map; and false otherwise.
func (props PropertyMap) DeepEquals(other PropertyMap) bool {
	// If any in props either doesn't exist, or is of a different value, return false.
	for _, k := range props.StableKeys() {
		v := props[k]
		if p, has := other[k]; has {
			if !v.DeepEquals(p) {
				return false
			}
		} else if v.HasValue() {
			return false
		}
	}

	// If the other map has properties that this map doesn't have, return false.
	for _, k := range other.StableKeys() {
		if _, has := props[k]; !has && other[k].HasValue() {
			return false
		}
	}

	return true
}

// DeepEquals returns true if this property map is deeply equal to the other property map; and false otherwise.
func (v PropertyValue) DeepEquals(other PropertyValue) bool {
	// Arrays are equal if they are both of the same size and elements are deeply equal.
	if v.IsArray() {
		if !other.IsArray() {
			return false
		}
		va := v.ArrayValue()
		oa := other.ArrayValue()
		if len(va) != len(oa) {
			return false
		}
		for i, elem := range va {
			if !elem.DeepEquals(oa[i]) {
				return false
			}
		}
		return true
	}

	// Assets and archives enjoy value equality.
	if v.IsAsset() {
		if !other.IsAsset() {
			return false
		}
		return v.AssetValue().Equals(other.AssetValue())
	} else if v.IsArchive() {
		if !other.IsArchive() {
			return false
		}
		return v.ArchiveValue().Equals(other.ArchiveValue())
	}

	// Object values are equal if their contents are deeply equal.
	if v.IsObject() {
		if !other.IsObject() {
			return false
		}
		vo := v.ObjectValue()
		oa := other.ObjectValue()
		return vo.DeepEquals(oa)
	}

	// Secret are equal if the value they wrap are equal.
	if v.IsSecret() {
		if !other.IsSecret() {
			return false
		}
		vs := v.SecretValue()
		os := other.SecretValue()

		return vs.Element.DeepEquals(os.Element)
	}

	// Resource references are equal if they refer to the same resource. The package version is ignored.
	if v.IsResourceReference() {
		if !other.IsResourceReference() {
			return false
		}
		vr := v.ResourceReferenceValue()
		or := other.ResourceReferenceValue()

		if vr.URN != or.URN {
			return false
		}

		vid, oid := vr.ID, or.ID
		if vid.IsComputed() && oid.IsComputed() {
			return true
		}
		return vid.DeepEquals(oid)
	}

	// Outputs are equal if each of their fields is deeply equal.
	if v.IsOutput() {
		if !other.IsOutput() {
			return false
		}
		vo := v.OutputValue()
		oo := other.OutputValue()

		if vo.Known != oo.Known {
			return false
		}
		if vo.Secret != oo.Secret {
			return false
		}

		// Note that the dependencies are assumed to be sorted.
		if len(vo.Dependencies) != len(oo.Dependencies) {
			return false
		}
		for i, dep := range vo.Dependencies {
			if dep != oo.Dependencies[i] {
				return false
			}
		}

		return vo.Element.DeepEquals(oo.Element)
	}

	// For all other cases, primitives are equal if their values are equal.
	return v.V == other.V
}

// DiffIncludeUnknowns returns a diffset by comparing the property map to another; it returns nil if there are no diffs.
func (props PropertyMap) DiffIncludeUnknowns(other PropertyMap, ignoreKeys ...IgnoreKeyFunc) *ObjectDiff {
	adds := make(PropertyMap)
	deletes := make(PropertyMap)
	sames := make(PropertyMap)
	updates := make(map[PropertyKey]ValueDiff)

	ignore := func(key PropertyKey) bool {
		for _, ikf := range ignoreKeys {
			if ikf(key) {
				return true
			}
		}
		return false
	}

	// First find any updates or deletes.
	for k, old := range props {
		if ignore(k) {
			continue
		}

		if new, has := other[k]; has {
			// If a new exists, use it; for output properties, however, ignore differences.
			if new.IsOutput() {
				sames[k] = new
			} else if diff := old.DiffIncludeUnknowns(new, ignoreKeys...); diff != nil {
				if !old.HasValue() {
					adds[k] = new
				} else if !new.HasValue() {
					deletes[k] = old
				} else {
					updates[k] = *diff
				}
			} else {
				sames[k] = new
			}
		} else {
			if old.IsComputed() {
				// The old property was <computed> it probably resolved to undefined so this isn't a diff,
				// but it isn't really a same either... just don't add to the diff
			} else if old.HasValue() {
				// If there was no new property, it has been deleted.
				deletes[k] = old
			}
		}
	}

	// Next find any additions not in the old map.
	for k, new := range other {
		if ignore(k) {
			continue
		}

		if _, has := props[k]; !has && new.HasValue() {
			adds[k] = new
		}
	}

	// If no diffs were found, return nil; else return a diff structure.
	if len(adds) == 0 && len(deletes) == 0 && len(updates) == 0 {
		return nil
	}
	return &ObjectDiff{
		Adds:    adds,
		Deletes: deletes,
		Sames:   sames,
		Updates: updates,
	}
}

// Diff returns a diff by comparing a single property value to another; it returns nil if there are no diffs.
func (v PropertyValue) DiffIncludeUnknowns(other PropertyValue, ignoreKeys ...IgnoreKeyFunc) *ValueDiff {
	if v.IsArray() && other.IsArray() {
		old := v.ArrayValue()
		new := other.ArrayValue()
		// If any elements exist in the new array but not the old, track them as adds.
		adds := make(map[int]PropertyValue)
		for i := len(old); i < len(new); i++ {
			adds[i] = new[i]
		}
		// If any elements exist in the old array but not the new, track them as adds.
		deletes := make(map[int]PropertyValue)
		for i := len(new); i < len(old); i++ {
			deletes[i] = old[i]
		}
		// Now if elements exist in both, track them as sames or updates.
		sames := make(map[int]PropertyValue)
		updates := make(map[int]ValueDiff)
		for i := 0; i < len(old) && i < len(new); i++ {
			if diff := old[i].DiffIncludeUnknowns(new[i]); diff != nil {
				updates[i] = *diff
			} else {
				sames[i] = new[i]
			}
		}

		if len(adds) == 0 && len(deletes) == 0 && len(updates) == 0 {
			return nil
		}
		return &ValueDiff{
			Old: v,
			New: other,
			Array: &ArrayDiff{
				Adds:    adds,
				Deletes: deletes,
				Sames:   sames,
				Updates: updates,
			},
		}
	}
	if v.IsObject() && other.IsObject() {
		old := v.ObjectValue()
		new := other.ObjectValue()
		if diff := old.DiffIncludeUnknowns(new, ignoreKeys...); diff != nil {
			return &ValueDiff{
				Old:    v,
				New:    other,
				Object: diff,
			}
		}
		return nil
	}

	// If we got here, either the values are primitives, or they weren't the same type; do a simple diff.
	if v.DeepEqualsIncludeUnknowns(other) {
		return nil
	}
	return &ValueDiff{Old: v, New: other}
}

func (props PropertyMap) DeepEqualsIncludeUnknowns(other PropertyMap) bool {
	// If any in props either doesn't exist, or is of a different value, return false.
	for _, k := range props.StableKeys() {
		v := props[k]
		if p, has := other[k]; has {
			if !v.DeepEqualsIncludeUnknowns(p) {
				return false
			}
		} else if v.HasValue() && !v.IsComputed() {
			return false
		}
	}

	// If the other map has properties that this map doesn't have, return false.
	for _, k := range other.StableKeys() {
		if _, has := props[k]; !has && other[k].HasValue() {
			return false
		}
	}

	return true
}

func (v PropertyValue) DeepEqualsIncludeUnknowns(other PropertyValue) bool {
	// Anything is equal to a computed
	if v.IsComputed() || other.IsComputed() {
		return true
	}

	// Arrays are equal if they are both of the same size and elements are deeply equal.
	if v.IsArray() {
		if !other.IsArray() {
			return false
		}
		va := v.ArrayValue()
		oa := other.ArrayValue()
		if len(va) != len(oa) {
			return false
		}
		for i, elem := range va {
			if !elem.DeepEqualsIncludeUnknowns(oa[i]) {
				return false
			}
		}
		return true
	}

	// Assets and archives enjoy value equality.
	if v.IsAsset() {
		if !other.IsAsset() {
			return false
		}
		return v.AssetValue().Equals(other.AssetValue())
	} else if v.IsArchive() {
		if !other.IsArchive() {
			return false
		}
		return v.ArchiveValue().Equals(other.ArchiveValue())
	}

	// Object values are equal if their contents are deeply equal.
	if v.IsObject() {
		if !other.IsObject() {
			return false
		}
		vo := v.ObjectValue()
		oa := other.ObjectValue()
		return vo.DeepEqualsIncludeUnknowns(oa)
	}

	// Secret are equal if the value they wrap are equal.
	if v.IsSecret() {
		if !other.IsSecret() {
			return false
		}
		vs := v.SecretValue()
		os := other.SecretValue()

		return vs.Element.DeepEqualsIncludeUnknowns(os.Element)
	}

	// Resource references are equal if they refer to the same resource. The package version is ignored.
	if v.IsResourceReference() {
		if !other.IsResourceReference() {
			return false
		}
		vr := v.ResourceReferenceValue()
		or := other.ResourceReferenceValue()

		if vr.URN != or.URN {
			return false
		}

		vid, oid := vr.ID, or.ID
		if vid.IsComputed() || oid.IsComputed() {
			return true
		}
		return vid.DeepEqualsIncludeUnknowns(oid)
	}

	// Outputs are equal if each of their fields is deeply equal.
	if v.IsOutput() {
		if !other.IsOutput() {
			return false
		}
		vo := v.OutputValue()
		oo := other.OutputValue()

		if vo.Known != oo.Known {
			return false
		}
		if vo.Secret != oo.Secret {
			return false
		}

		// Note that the dependencies are assumed to be sorted.
		if len(vo.Dependencies) != len(oo.Dependencies) {
			return false
		}
		for i, dep := range vo.Dependencies {
			if dep != oo.Dependencies[i] {
				return false
			}
		}

		return vo.Element.DeepEqualsIncludeUnknowns(oo.Element)
	}

	// For all other cases, primitives are equal if their values are equal.
	return v.V == other.V
}

repository: pulumi/pulumi

repo_name: pulumi/pulumi


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerFollow : MonoBehaviour
{
    public Transform player;
    public float cameraPos;

    private void FixedUpdate()
    {
        if (player == null) return;

        if(player != null)
        {
            Vector3 pos = player.position;
            transform.position = new Vector3(player.position.x, player.position.y + cameraPos, player.position.z);
        }
    }
}

repository: RacerZStudios/Checkpoint

repo_name: RacerZStudios/Checkpoint


text:
file(REMOVE_RECURSE
  "CMakeFiles/TestUnitTest++.dir/tests/TestExceptions.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestAssertHandler.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestCompositeTestReporter.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTestMacros.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTestSuite.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTestRunner.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTimeConstraintMacro.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/Main.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTimeConstraint.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestCurrentTest.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestMemoryOutStream.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestUnitTestPP.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTest.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestDeferredTestReporter.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTestList.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestTestResults.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestChecks.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestXmlTestReporter.cpp.o"
  "CMakeFiles/TestUnitTest++.dir/tests/TestCheckMacros.cpp.o"
  "TestUnitTest++.pdb"
  "TestUnitTest++"
)

# Per-language clean rules from dependency scanning.
foreach(lang CXX)
  include(CMakeFiles/TestUnitTest++.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

repository: asifadamsha/FiltreMusical

repo_name: asifadamsha/FiltreMusical


text:
SUMMARY = "module providing minimalistic try/catch"
DESCRIPTION = "\
Try::Tiny is a Perl module that provides bare bones try/catch statements. It \
is designed to eliminate common mistakes with eval blocks, and NOTHING else. \
. \
The main focus of this module is to provide simple and reliable error \
handling for those having a hard time installing TryCatch, but who still want \
to write correct eval blocks without 5 lines of boilerplate each time. \
"
HOMEPAGE = "https://metacpan.org/release/Try-Tiny"
PR = "r0"
inherit debian-package

LICENSE = "MIT"
LIC_FILES_CHKSUM = "\
	file://LICENSE;md5=781485aae6e6d87e2262fc7baa08dcc7"
inherit cpan

FILES_${PN} += "${datadir}/*"
RDEPENDS_${PN} += "libparams-validate-perl"

# source format is 3.0 (quilt) but there is no debian patch
DEBIAN_QUILT_PATCHES = ""

repository: nghiaht-tsdv/meta-debian

repo_name: nghiaht-tsdv/meta-debian

branch_name: refs/heads/jethro


text:
DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux."
HOMEPAGE = "http://libvirt.org"
LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
LICENSE:${PN}-ptest = "GPL-2.0-or-later & LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                    file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d"
SECTION = "console/tools"

DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \
	   iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper libtirpc \
           python3-docutils-native \
	   ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)} \
	   ${@bb.utils.contains('PACKAGECONFIG', 'gnutls', 'gnutls-native', '', d)}"

# libvirt-guests.sh needs gettext.sh
#
RDEPENDS:${PN} = "gettext-runtime"

RDEPENDS:${PN}-ptest += "make gawk perl bash"

RDEPENDS:${PN}-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd"
RDEPENDS:${PN}-libvirtd:append:x86-64 = " dmidecode"
RDEPENDS:${PN}-libvirtd:append:x86 = " dmidecode"

CVE_PRODUCT = "libvirt"

#connman blocks the 53 port and libvirtd can't start its DNS service
RCONFLICTS:${PN}_libvirtd = "connman"

SRC_URI = "git://github.com/projectacrn/acrn-libvirt.git;protocol=https;branch=${SRCBRANCH};destsuffix=acrn-libvirt-${PV};name=libvirt \
           git://gitlab.com/keycodemap/keycodemapdb.git;protocol=https;branch=master;destsuffix=acrn-libvirt-${PV}/src/keycodemapdb;name=keycodemapdb \
           file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \
           file://libvirtd.sh \
           file://libvirtd.conf \
           file://dnsmasq.conf \
           file://runptest.patch \
           file://run-ptest \
           file://libvirt-use-pkg-config-to-locate-libcap.patch \
           file://install-missing-file.patch \
           file://0001-ptest-Remove-Windows-1252-check-from-esxutilstest.patch \
           file://configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch \
           file://0001-build-drop-unnecessary-libgnu.la-reference.patch \
           file://gnutls-helper.py \
           file://Fix-template-matching-in-page.xsl.patch \
          "

SRCBRANCH = "dev-acrn-v6.1.0"
# with acrn v6.1.0
SRCREV_libvirt = "666d8e6f0aa9b89a8594edef3bd5b466fa3ca300"
SRCREV_keycodemapdb = "27acf0ef828bf719b2053ba398b195829413dbdd"
SRCREV_FORMAT = "libvirt_keycodemapdb"

inherit autotools gettext update-rc.d pkgconfig ptest systemd useradd perlnative
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM:${PN} = "-r qemu; -r kvm"
USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu"

# Override the default set in autotools.bbclass so that we will use relative pathnames
# to our local m4 files.  This prevents an "Argument list too long" error during configuration
# if our project is in a directory with an absolute pathname of more than about 125 characters.
#
acpaths = "-I ./m4"

CACHED_CONFIGUREVARS += "\
ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \
ac_cv_path_AUGPARSE=/usr/bin/augparse \
ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \
ac_cv_path_BRCTL=/usr/sbin/brctl \
ac_cv_path_TC=/sbin/tc \
ac_cv_path_UDEVADM=/sbin/udevadm \
ac_cv_path_MODPROBE=/sbin/modprobe \
ac_cv_path_IP_PATH=/bin/ip \
ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \
ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \
ac_cv_path_MOUNT=/bin/mount \
ac_cv_path_UMOUNT=/bin/umount \
ac_cv_path_MKFS=/usr/sbin/mkfs \
ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \
ac_cv_path_PVCREATE=/usr/sbin/pvcreate \
ac_cv_path_VGCREATE=/usr/sbin/vgcreate \
ac_cv_path_LVCREATE=/usr/sbin/lvcreate \
ac_cv_path_PVREMOVE=/usr/sbin/pvremove \
ac_cv_path_VGREMOVE=/usr/sbin/vgremove \
ac_cv_path_LVREMOVE=/usr/sbin/lvremove \
ac_cv_path_LVCHANGE=/usr/sbin/lvchange \
ac_cv_path_VGCHANGE=/usr/sbin/vgchange \
ac_cv_path_VGSCAN=/usr/sbin/vgscan \
ac_cv_path_PVS=/usr/sbin/pvs \
ac_cv_path_VGS=/usr/sbin/vgs \
ac_cv_path_LVS=/usr/sbin/lvs \
ac_cv_path_PARTED=/usr/sbin/parted \
ac_cv_path_DMSETUP=/usr/sbin/dmsetup"

# Ensure that libvirt uses polkit rather than policykit, whether the host has
# pkcheck installed or not, and ensure the path is correct per our config.
CACHED_CONFIGUREVARS += "ac_cv_path_PKCHECK_PATH=${bindir}/pkcheck"

# Some other possible paths we are not yet setting
#ac_cv_path_RPCGEN=
#ac_cv_path_XSLTPROC=
#ac_cv_path_RADVD=
#ac_cv_path_UDEVSETTLE=
#ac_cv_path_EBTABLES_PATH=
#ac_cv_path_PKG_CONFIG=
#ac_cv_path_ac_pt_PKG_CONFIG
#ac_cv_path_POLKIT_AUTH=
#ac_cv_path_DTRACE=
#ac_cv_path_ISCSIADM=
#ac_cv_path_MSGFMT=
#ac_cv_path_GMSGFMT=
#ac_cv_path_XGETTEXT=
#ac_cv_path_MSGMERGE=
#ac_cv_path_SCRUB=
#ac_cv_path_PYTHON=

ALLOW_EMPTY:${PN} = "1"

PACKAGES =+ "${PN}-libvirtd ${PN}-virsh"

ALLOW_EMPTY:${PN}-libvirtd = "1"

FILES:${PN}-libvirtd = " \
	${sysconfdir}/init.d \
	${sysconfdir}/sysctl.d \
	${sysconfdir}/logrotate.d \
	${sysconfdir}/libvirt/libvirtd.conf \
        /usr/lib/sysctl.d/60-libvirtd.conf \
	${sbindir}/libvirtd \
	${systemd_unitdir}/system/* \
	${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \
	${@bb.utils.contains('PACKAGECONFIG', 'gnutls', '${sysconfdir}/pki/libvirt/* ${sysconfdir}/pki/CA/*', '', d)} \
        "

FILES:${PN}-virsh = " \
    ${bindir}/virsh \
    ${datadir}/bash-completion/completions/virsh \
"

FILES:${PN} += "${libdir}/libvirt/connection-driver \
	    ${datadir}/augeas \
	    ${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \
	    ${datadir}/bash-completion/completions/vsh \
	    ${datadir}/bash-completion/completions/virt-admin \
	    ${datadir}/libvirt/api \
	    ${datadir}/libvirt/cpu_map \
	    ${datadir}/libvirt/schemas \
	    ${datadir}/libvirt/test-screenshot.png \
	    /usr/lib/firewalld/zones/libvirt.xml \
	    "

FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug"
FILES:${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a"

CONFFILES:${PN} += "${sysconfdir}/libvirt/libvirt.conf \
                    ${sysconfdir}/libvirt/lxc.conf \
                    ${sysconfdir}/libvirt/qemu-lockd.conf \
                    ${sysconfdir}/libvirt/qemu.conf \
                    ${sysconfdir}/libvirt/virt-login-shell.conf \
                    ${sysconfdir}/libvirt/virtlockd.conf"

CONFFILES:${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \
                            ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \
                            ${sysconfdir}/libvirt/libvirtd.conf \
                            /usr/lib/sysctl.d/libvirtd.conf"

INITSCRIPT_PACKAGES = "${PN}-libvirtd"
INITSCRIPT_NAME:${PN}-libvirtd = "libvirtd"
INITSCRIPT_PARAMS:${PN}-libvirtd = "defaults 72"

SYSTEMD_PACKAGES = "${PN}-libvirtd"
SYSTEMD_SERVICE:${PN}-libvirtd = " \
    libvirtd.service \
    virtlockd.service \
    libvirt-guests.service \
    virtlockd.socket \
    "

PRIVATE_LIBS:${PN}-ptest = " \
	libvirt-lxc.so.0 \
	libvirt.so.0 \
	libvirt-qemu.so.0 \
	lockd.so \
	libvirt_driver_secret.so \
	libvirt_driver_nodedev.so \
	libvirt_driver_vbox.so \
	libvirt_driver_interface.so \
	libvirt_driver_uml.so \
	libvirt_driver_network.so \
	libvirt_driver_nwfilter.so \
	libvirt_driver_qemu.so \
	libvirt_driver_storage.so \
	libvirt_driver_lxc.so \
    "

# xen-minimal config
#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd"

# full config
PACKAGECONFIG ??= "qemu yajl openvz vmware vbox esx iproute2 lxc test \
                   remote macvtap libvirtd netcf udev python ebtables \
                   fuse iproute2 firewalld libpcap acrn \
                   ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \
                   ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \
                   ${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'polkit', '', d)} \
                  "
# acrn config recommended from ACRN Team
PACKAGECONFIG = "acrn remote macvtap libvirtd netcf udev ebtables fuse iproute2 firewalld libpcap test python storage-dir storage-fs storage-lvm "

# qemu is NOT compatible with mips64
PACKAGECONFIG:remove:mipsarchn32 = "qemu"
PACKAGECONFIG:remove:mipsarchn64 = "qemu"

# numactl is NOT compatible with arm
PACKAGECONFIG:remove:arm = "numactl"
PACKAGECONFIG:remove:armeb = "numactl"

# enable,disable,depends,rdepends
#
PACKAGECONFIG[gnutls] = ",,,gnutls-bin"
PACKAGECONFIG[qemu] = "--with-qemu --with-qemu-user=qemu --with-qemu-group=qemu,--without-qemu,qemu,"
PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl"
PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,xen,"
PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,,"
PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,,"
PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,,"
PACKAGECONFIG[esx] = "--with-esx,--without-esx,,"
PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,,"
PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit"
PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc,"
PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,,"
PACKAGECONFIG[remote] = "--with-remote,--without-remote,,"
PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl"
PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,,"
PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf"
PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,,"
PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess,"
PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux,"
PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables"
PACKAGECONFIG[python] = ",,python3,"
PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl"
PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2"
PACKAGECONFIG[numactl] = "--with-numactl,--without-numactl,numactl,"
PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse,"
PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit,"
PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng,"
PACKAGECONFIG[wireshark] = "--with-wireshark-dissector,--without-wireshark-dissector,wireshark libwsutil,"
PACKAGECONFIG[apparmor-profiles] = "--with-apparmor-profiles, --without-apparmor-profiles,"
PACKAGECONFIG[firewalld] = "--with-firewalld, --without-firewalld,"
PACKAGECONFIG[libpcap] = "--with-libpcap, --without-libpcap,libpcap,libpcap"
PACKAGECONFIG[numad] = "--with-numad, --without-numad,"
PACKAGECONFIG[acrn] = "--with-acrn,--without-acrn,,acrn-devicemodel acrn-tools"
PACKAGECONFIG[storage-dir] = "--with-storage-dir,--without-storage-dir,,"
PACKAGECONFIG[storage-fs] = "--with-storage-fs, --without-storage-fs,,"
PACKAGECONFIG[storage-lvm] = "--with-storage-lvm, --without-storage-lvm,,"

# Enable the Python tool support
require libvirt-python.inc

EXTRA_OECONF:append = " --disable-werror"
do_configure:prepend () {
    olddir=`pwd`
    cd ${S}
    autoreconf --verbose --force --install
    cd $olddir
}

do_compile() {
	cd ${B}/src
	# There may be race condition, but without creating these directories
	# in the source tree, generation of files fails.
	for i in access admin logging esx locking rpc hyperv lxc \
		    remote network storage interface nwfilter node_device \
		    secret vbox qemu acrn; do
		mkdir -p $i;
	done

	cd ${B}
	export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:"
	oe_runmake all
}

do_install:prepend() {
	# so the install routines can find the libvirt.pc in the source dir
	export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${B}/src:"
}

do_install:append() {
	install -d ${D}/etc/init.d
	install -d ${D}/etc/libvirt
	install -d ${D}/etc/dnsmasq.d

	install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
	install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf

	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
	    # This will wind up in the libvirtd package, but will NOT be invoked by default.
	    #
	    mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d
	fi

	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
	    # This variable is used by libvirtd.service to start libvirtd in the right mode
	    sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd

	    # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities.
	    sed -i -e 's/Type=notify/Type=forking/' \
	           -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \
		   ${D}/${systemd_unitdir}/system/libvirtd.service
	fi

	# The /var/run/libvirt directories created by the Makefile
	# are wiped out in volatile, we need to create these at boot.
	rm -rf ${D}${localstatedir}/run
	install -d ${D}${sysconfdir}/default/volatiles
	echo "d root root 0755 ${localstatedir}/run/libvirt none" \
	     > ${D}${sysconfdir}/default/volatiles/99_libvirt
	echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \
	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
	echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \
	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
	echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \
	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt
	echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \
	     >> ${D}${sysconfdir}/default/volatiles/99_libvirt

	# Manually set permissions and ownership to match polkit recipe
	if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
		install -d -m 0700 ${D}/${datadir}/polkit-1/rules.d
		chown polkitd ${D}/${datadir}/polkit-1/rules.d
		chgrp root ${D}/${datadir}/polkit-1/rules.d
	else
		rm -rf ${D}/${datadir}/polkit-1
	fi

	# disable seccomp_sandbox
        if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then
	   sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
	       ${D}${sysconfdir}/libvirt/qemu.conf
        fi

	# Force the main dnsmasq instance to bind only to specified interfaces and
	# to not bind to virbr0. Libvirt will run its own instance on this interface.
	install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon

	# remove .la references to our working diretory
	for i in `find ${D}${libdir} -type f -name *.la`; do
	    sed -i -e 's#-L${B}/src/.libs##g' $i
	done

	sed -i -e 's/^\(unix_sock_group\ =\ \).*/\1"kvm"/' ${D}/etc/libvirt/libvirtd.conf
	sed -i -e 's/^\(unix_sock_rw_perms\ =\ \).*/\1"0776"/' ${D}/etc/libvirt/libvirtd.conf

	case ${MACHINE_ARCH} in
		*mips*)
			break
			;;
		*)
			if ${@bb.utils.contains('PACKAGECONFIG','qemu','true','false',d)}; then
			    chown -R qemu:qemu ${D}/${localstatedir}/lib/libvirt/qemu
			    echo "d qemu qemu 0755 ${localstatedir}/cache/libvirt/qemu none" \
			        >> ${D}${sysconfdir}/default/volatiles/99_libvirt
			fi
			break
			;;
	esac

	if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then
	    # Generate sample keys and certificates.
	    cd ${WORKDIR}
	    ${WORKDIR}/gnutls-helper.py -y

	    # Deploy all sample keys and certificates of CA, server and client
	    # to target so that libvirtd is able to boot successfully and local
	    # connection via 127.0.0.1 is available out of box.
	    install -d ${D}/etc/pki/CA
	    install -d ${D}/etc/pki/libvirt/private
	    install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir}
	    install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem
	    install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem
	    install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem
	    install -m 0644 ${WORKDIR}/servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem
	    install -m 0644 ${WORKDIR}/clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem
	    install -m 0644 ${WORKDIR}/clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem

	    # Force the connection to be tls.
	    sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf
	fi

	# virt-login-shell needs to run with setuid permission
	chmod 4755 ${D}${bindir}/virt-login-shell

	# Remove /var/log/libvirt as anything created in /var/log will not be
	# available when tmpfs is mounted at /var/volatile/log.
	rm -rf ${D}${localstatedir}/log

}

EXTRA_OECONF += " \
    --with-init-script=systemd \
    --with-test-suite \
    "

# gcc9 end up mis-compiling qemuxml2argvtest.o with Og which then
# crashes on target, so remove -Og and use -O2 as workaround
SELECTED_OPTIMIZATION:remove:virtclass-multilib-lib32:mipsarch = "-Og"
SELECTED_OPTIMIZATION:append:virtclass-multilib-lib32:mipsarch = " -O2"

EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH} SYSTEMD_UNIT_DIR=${systemd_system_unitdir}"

PRIVATE_LIBS:${PN}-ptest:append = "libvirt-admin.so.0"

do_compile_ptest() {
	oe_runmake -C tests buildtest-TESTS
}

do_install_ptest() {
	oe_runmake -C tests install-ptest

	find ${S}/tests -maxdepth 1 -type d -exec cp -r {} ${D}${PTEST_PATH}/tests/ \;

	# remove .la files for ptest, they aren't required and can trigger QA errors
	for i in `find ${D}${PTEST_PATH} -type f \( -name *.la -o -name *.o \)`; do
                rm -f $i
	done
}

pkg_postinst:${PN}() {
        if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
                /etc/init.d/populate-volatile.sh update
        fi
        mkdir -m 711 -p $D/data/images
}

python () {
    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
}

PROVIDES_${PN} = "libvirt"
RPROVIDES:${PN} += " libvirt"

PROVIDES_${PN}-libvirtd = "libvirt-libvirtd"
RPROVIDES:${PN}-libvirtd += " libvirt-libvirtd"

PROVIDES_${PN}-virsh = "libvirt-virsh"
RPROVIDES:${PN}-virsh += " libvirt-virsh"

PROVIDES_${PN}-python = "libvirt-python"
RPROVIDES:${PN}-python += " libvirt-python"

RPROVIDES:${PN}-ptest += " libvirt-ptest "

CVE_CHECK_IGNORE += "CVE-2014-8135 CVE-2014-8136 CVE-2015-5313 CVE-2017-1000256 CVE-2018-5748 CVE-2018-6764 CVE-2019-3886"

#CVE-2014-8135:
#Fixed in v1.2.11
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=87b9437f8951f9d24f9a85c6bbfff0e54df8c984
#Ref: https://security.libvirt.org/2014/0009.html

#CVE-2014-8136:
#Fixed in v1.2.11
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=2bdcd29c713dfedd813c89f56ae98f6f3898313d
#Ref: https://security.libvirt.org/2014/0010.html

#CVE-2015-5313:
#Fixed in v1.3.1
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=034e47c338b13a95cf02106a3af912c1c5f818d7
#Ref: https://security.libvirt.org/2015/0004.html

#CVE-2017-1000256
#Fixed in v3.9.0
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=441d3eb6d1be940a67ce45a286602a967601b157
#Ref: https://security.libvirt.org/2017/0002.html

#CVE-2018-5748:
#Fixed in v4.0.0
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=bc251ea91bcfddd2622fce6bce701a438b2e7276
#Ref: https://security.libvirt.org/2018/0002.html

#CVE-2018-6764:
#Fixed in v4.1.0
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=c2dc6698c88fb591639e542c8ecb0076c54f3dfb
#Ref: https://security.libvirt.org/2018/0003.html

#CVE-2019-3886:
#Fixed in v5.3.0
#Fixed by: https://libvirt.org/git/?p=libvirt.git;a=commit;h=ae076bb40e0e150aef41361b64001138d04d6c60
#and
#https://libvirt.org/git/?p=libvirt.git;a=commit;h=2a07c990bd9143d7a0fe8d1b6b7c763c52185240
#Ref: https://security.libvirt.org/2019/0001.html

repository: intel/meta-acrn

repo_name: intel/meta-acrn


text:
// Copyright 2018 Axel Etcheverry. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.

package cluster

import (
	"github.com/hashicorp/memberlist"
)

// EventDelegate interface
type EventDelegate interface {
	Delegate() memberlist.EventDelegate
	Events() <-chan memberlist.NodeEvent
}

type eventDelegate struct {
	events chan memberlist.NodeEvent
}

// NewEventDelegate constructor
func NewEventDelegate(size int) EventDelegate {
	return &eventDelegate{
		events: make(chan memberlist.NodeEvent, size),
	}
}

func (e *eventDelegate) Delegate() memberlist.EventDelegate {
	return &memberlist.ChannelEventDelegate{
		Ch: e.events,
	}
}

func (e *eventDelegate) Events() <-chan memberlist.NodeEvent {
	return e.events
}

repository: hyperscale/hyperfs

repo_name: hyperscale/hyperfs


text:
import Base from '../lib/Base';

class BaseService<TConfig = any> extends Base {

  protected options: TConfig;

  constructor(options: TConfig) {
    super();
    this.options = options;
  }

  async init(options: TConfig) {
  }

  async stop() {
  }

}

export default BaseService;

repository: nexushubs/nexusdocs

repo_name: nexushubs/nexusdocs

gha_language: TypeScript


text:
/*
	Copyright 2018 Telenor Digital AS

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

import { TimeAgoValueConverter } from "./timeAgo";

Date.now = jest.fn(() => 1490997600000);

const timeAgo = new TimeAgoValueConverter();

describe("TimeAgo value converter", () => {
  const firstOfApril = "1490997600000";
  const illegalDate = "abc";

  it("should return the default format if given correct date but no format", () => {
    expect(timeAgo.toView(firstOfApril)).toBe("a few seconds ago");
  });

  it("should show a error message if the given value is illegal", () => {
    expect(timeAgo.toView(illegalDate)).toBe("Invalid date");
  });
});

repository: ExploratoryEngineering/congress-console

repo_name: ExploratoryEngineering/congress-console


text:
package cron

import (
	"github.com/imroc/log"
)

//Start 定时任务启动
func Start() {
	StartToken() //获取accesstoken
	log.Info("cron.Start ok")
}

//Stop 定时任务结束
func Stop() {
	log.Info("cron.Stop ok")
}

license: Unlicense

repository: Benert/appletMessagesServer

repo_name: Benert/appletMessagesServer


text:
/*
Copyright (c) 2021 Seculeet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
package main

import (
	"fmt"
	"strings"
)

type SmallAudit struct {
	Name       string   `json:"name"`
	Command    string   `json:"command"`
	Arguments  []string `json:"arguments"`
	Filepath   string   `json:"filepath"`
	Classified bool     `json:"classified"`
}

// splits the command attribute of struct in smaller commands to execute for better debugging
func separateInSmallAuditsButOnlyForCall(bigAuditName string, auditStep string) []SmallAudit {

	lowerBoarder := 0
	counter := 1
	bigCommand := strings.Fields(auditStep)

	var audits = make([]SmallAudit, 0)
	//count how many small audit steps there are
	for _, v := range bigCommand {
		if v == "|" {
			counter++
		}
	}
	if debugModeEnabled {
		WriteDebugLog(bigAuditName+": "+fmt.Sprint(counter)+" small audits detected", "INFO")
	}
	// make slice with len of small audits
	var stringOfAudits = make([]string, counter)
	// separate small audits in string slice
	for _, v := range bigCommand {
		if v != "|" {
			stringOfAudits[lowerBoarder] += v + " "
		} else {
			lowerBoarder++
		}
	}

	// create audit structs from string slices and add name and expected value from big audit step
	for _, v := range stringOfAudits {
		audit := makeAudit(strings.Fields(v))
		audit.Name = bigAuditName
		audits = append(audits, audit)
	}

	return audits

}

// creates audit type from command
func makeAudit(command []string) SmallAudit {
	audit := SmallAudit{}
	// command ALWAYS has to be the first word!
	audit.Command = command[0]

	if debugModeEnabled {
		WriteDebugLog("CommandType detected: "+audit.Command, "INFO")
	}

	argumentsString := make([]string, 0)
	// if filepath is given it HAS to be the last word in command
	for counter, value := range command {
		// indicates filepath with §file§
		if strings.HasPrefix(value, "§file§") {
			audit.Filepath = value[8:]
			if debugModeEnabled {
				WriteDebugLog(audit.Command+": §file§ detected "+audit.Filepath, "INFO")
			}
			for i := 1; i < counter; i++ {
				argumentsString = append(argumentsString, command[i])
			}
			audit.Arguments = argumentsString
			if debugModeEnabled {
				WriteDebugLog(audit.Command+": argumentes added "+fmt.Sprint(audit.Arguments), "INFO")
			}
			return audit
		}
	}
	// command does not have a filepath -> just separating arguments
	for i := 1; i < len(command); i++ {
		argumentsString = append(argumentsString, command[i])
	}
	audit.Arguments = argumentsString
	if debugModeEnabled {
		WriteDebugLog(audit.Command+": argumentes added "+fmt.Sprint(audit.Arguments), "INFO")
	}
	return audit
}

repository: Seculeet/secuteel

repo_name: Seculeet/secuteel


text:
package models

// Status type represents JIRA issue status
type Status struct {
	Id       string `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	StepId   uint   `json:"stepId"`
	StatusId string `json:"statusId"`
}

repository: isc-lindensc/jira-cli

repo_name: isc-lindensc/jira-cli


text:
namespace WildFarm.Models.Animals
{
    using System;
    using WildFarm.Contracts.Foods;
    using WildFarm.Models.Foods;

    public class Cat : Feline
    {
        public Cat(string name, double weight, string livingRegion, string breed)
            : base(name, weight, livingRegion, breed)
        {
        }

        public override void Eat(IFood food)
        {
            if (food is Vegetable == false && food is Meat == false)
            {
                base.WrongFood(food);
            }
            else
            {
                base.Eat(food);
            }
        }

        public override void ProduceSound()
        {
            Console.WriteLine("Meow");
        }
    }
}

repository: VeselinBPavlov/csharp-oop-basics

path: /14. Polymorphism - Exercise/WildFarm/Models/Animals/Cat.cs

repo_name: VeselinBPavlov/csharp-oop-basics


text:
namespace DmmLog {
    partial class NewDeviceSerialInterfaceForm {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing) {
            if (disposing && (components != null)) {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent() {
            this.btnCancel = new System.Windows.Forms.Button();
            this.btnOk = new System.Windows.Forms.Button();
            this.grpSerialPortSettings = new System.Windows.Forms.GroupBox();
            this.lblStopBits = new System.Windows.Forms.Label();
            this.cmbStopBits = new System.Windows.Forms.ComboBox();
            this.lblDataBits = new System.Windows.Forms.Label();
            this.cmbDataBits = new System.Windows.Forms.ComboBox();
            this.lblParity = new System.Windows.Forms.Label();
            this.cmbParity = new System.Windows.Forms.ComboBox();
            this.lblBaudRate = new System.Windows.Forms.Label();
            this.lblPortName = new System.Windows.Forms.Label();
            this.cmbBaudRate = new System.Windows.Forms.ComboBox();
            this.cmbPortName = new System.Windows.Forms.ComboBox();
            this.txtDisplayName = new System.Windows.Forms.TextBox();
            this.lblDisplayName = new System.Windows.Forms.Label();
            this.grpSerialPortSettings.SuspendLayout();
            this.SuspendLayout();
            //
            // btnCancel
            //
            this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnCancel.Location = new System.Drawing.Point(215, 235);
            this.btnCancel.Margin = new System.Windows.Forms.Padding(3, 15, 3, 3);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(75, 23);
            this.btnCancel.TabIndex = 6;
            this.btnCancel.Text = "Cancel";
            this.btnCancel.UseVisualStyleBackColor = true;
            //
            // btnOk
            //
            this.btnOk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.btnOk.Enabled = false;
            this.btnOk.Location = new System.Drawing.Point(134, 235);
            this.btnOk.Margin = new System.Windows.Forms.Padding(3, 15, 3, 3);
            this.btnOk.Name = "btnOk";
            this.btnOk.Size = new System.Drawing.Size(75, 23);
            this.btnOk.TabIndex = 5;
            this.btnOk.Text = "OK";
            this.btnOk.UseVisualStyleBackColor = true;
            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
            //
            // grpSerialPortSettings
            //
            this.grpSerialPortSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.grpSerialPortSettings.Controls.Add(this.lblStopBits);
            this.grpSerialPortSettings.Controls.Add(this.cmbStopBits);
            this.grpSerialPortSettings.Controls.Add(this.lblDataBits);
            this.grpSerialPortSettings.Controls.Add(this.cmbDataBits);
            this.grpSerialPortSettings.Controls.Add(this.lblParity);
            this.grpSerialPortSettings.Controls.Add(this.cmbParity);
            this.grpSerialPortSettings.Controls.Add(this.lblBaudRate);
            this.grpSerialPortSettings.Controls.Add(this.lblPortName);
            this.grpSerialPortSettings.Controls.Add(this.cmbBaudRate);
            this.grpSerialPortSettings.Controls.Add(this.cmbPortName);
            this.grpSerialPortSettings.Location = new System.Drawing.Point(12, 46);
            this.grpSerialPortSettings.Margin = new System.Windows.Forms.Padding(3, 9, 3, 3);
            this.grpSerialPortSettings.Name = "grpSerialPortSettings";
            this.grpSerialPortSettings.Padding = new System.Windows.Forms.Padding(3, 9, 3, 3);
            this.grpSerialPortSettings.Size = new System.Drawing.Size(278, 177);
            this.grpSerialPortSettings.TabIndex = 4;
            this.grpSerialPortSettings.TabStop = false;
            this.grpSerialPortSettings.Text = "Serial port";
            //
            // lblStopBits
            //
            this.lblStopBits.AutoSize = true;
            this.lblStopBits.Location = new System.Drawing.Point(6, 150);
            this.lblStopBits.Name = "lblStopBits";
            this.lblStopBits.Size = new System.Drawing.Size(67, 17);
            this.lblStopBits.TabIndex = 8;
            this.lblStopBits.Text = "Stop bits:";
            //
            // cmbStopBits
            //
            this.cmbStopBits.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.cmbStopBits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbStopBits.FormattingEnabled = true;
            this.cmbStopBits.Location = new System.Drawing.Point(122, 147);
            this.cmbStopBits.Name = "cmbStopBits";
            this.cmbStopBits.Size = new System.Drawing.Size(150, 24);
            this.cmbStopBits.TabIndex = 9;
            this.cmbStopBits.SelectedIndexChanged += new System.EventHandler(this.cmbSerialPortSettings_Common_SelectedIndexChanged);
            //
            // lblDataBits
            //
            this.lblDataBits.AutoSize = true;
            this.lblDataBits.Location = new System.Drawing.Point(6, 120);
            this.lblDataBits.Name = "lblDataBits";
            this.lblDataBits.Size = new System.Drawing.Size(68, 17);
            this.lblDataBits.TabIndex = 6;
            this.lblDataBits.Text = "Data bits:";
            //
            // cmbDataBits
            //
            this.cmbDataBits.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.cmbDataBits.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbDataBits.FormattingEnabled = true;
            this.cmbDataBits.Location = new System.Drawing.Point(122, 117);
            this.cmbDataBits.Name = "cmbDataBits";
            this.cmbDataBits.Size = new System.Drawing.Size(150, 24);
            this.cmbDataBits.TabIndex = 7;
            this.cmbDataBits.SelectedIndexChanged += new System.EventHandler(this.cmbSerialPortSettings_Common_SelectedIndexChanged);
            //
            // lblParity
            //
            this.lblParity.AutoSize = true;
            this.lblParity.Location = new System.Drawing.Point(6, 90);
            this.lblParity.Name = "lblParity";
            this.lblParity.Size = new System.Drawing.Size(44, 17);
            this.lblParity.TabIndex = 4;
            this.lblParity.Text = "Parity";
            //
            // cmbParity
            //
            this.cmbParity.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.cmbParity.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbParity.FormattingEnabled = true;
            this.cmbParity.Location = new System.Drawing.Point(122, 87);
            this.cmbParity.Name = "cmbParity";
            this.cmbParity.Size = new System.Drawing.Size(150, 24);
            this.cmbParity.TabIndex = 5;
            this.cmbParity.SelectedIndexChanged += new System.EventHandler(this.cmbSerialPortSettings_Common_SelectedIndexChanged);
            //
            // lblBaudRate
            //
            this.lblBaudRate.AutoSize = true;
            this.lblBaudRate.Location = new System.Drawing.Point(6, 60);
            this.lblBaudRate.Name = "lblBaudRate";
            this.lblBaudRate.Size = new System.Drawing.Size(74, 17);
            this.lblBaudRate.TabIndex = 2;
            this.lblBaudRate.Text = "Baud rate:";
            //
            // lblPortName
            //
            this.lblPortName.AutoSize = true;
            this.lblPortName.Location = new System.Drawing.Point(6, 30);
            this.lblPortName.Name = "lblPortName";
            this.lblPortName.Size = new System.Drawing.Size(77, 17);
            this.lblPortName.TabIndex = 0;
            this.lblPortName.Text = "Port name:";
            //
            // cmbBaudRate
            //
            this.cmbBaudRate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.cmbBaudRate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbBaudRate.FormattingEnabled = true;
            this.cmbBaudRate.Location = new System.Drawing.Point(122, 57);
            this.cmbBaudRate.Name = "cmbBaudRate";
            this.cmbBaudRate.Size = new System.Drawing.Size(150, 24);
            this.cmbBaudRate.TabIndex = 3;
            this.cmbBaudRate.SelectedIndexChanged += new System.EventHandler(this.cmbSerialPortSettings_Common_SelectedIndexChanged);
            //
            // cmbPortName
            //
            this.cmbPortName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.cmbPortName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbPortName.FormattingEnabled = true;
            this.cmbPortName.Location = new System.Drawing.Point(122, 27);
            this.cmbPortName.Name = "cmbPortName";
            this.cmbPortName.Size = new System.Drawing.Size(150, 24);
            this.cmbPortName.TabIndex = 1;
            this.cmbPortName.SelectedIndexChanged += new System.EventHandler(this.cmbSerialPortSettings_Common_SelectedIndexChanged);
            //
            // txtDisplayName
            //
            this.txtDisplayName.Location = new System.Drawing.Point(90, 12);
            this.txtDisplayName.MaxLength = 32;
            this.txtDisplayName.Name = "txtDisplayName";
            this.txtDisplayName.Size = new System.Drawing.Size(200, 22);
            this.txtDisplayName.TabIndex = 1;
            this.txtDisplayName.TextChanged += new System.EventHandler(this.cmbSerialPortSettings_Common_SelectedIndexChanged);
            //
            // lblDisplayName
            //
            this.lblDisplayName.AutoSize = true;
            this.lblDisplayName.Location = new System.Drawing.Point(12, 15);
            this.lblDisplayName.Name = "lblDisplayName";
            this.lblDisplayName.Size = new System.Drawing.Size(49, 17);
            this.lblDisplayName.TabIndex = 0;
            this.lblDisplayName.Text = "Name:";
            //
            // NewDeviceSerialForm
            //
            this.AcceptButton = this.btnOk;
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.CancelButton = this.btnCancel;
            this.ClientSize = new System.Drawing.Size(302, 270);
            this.Controls.Add(this.lblDisplayName);
            this.Controls.Add(this.txtDisplayName);
            this.Controls.Add(this.grpSerialPortSettings);
            this.Controls.Add(this.btnOk);
            this.Controls.Add(this.btnCancel);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "NewDeviceSerialForm";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Device settings";
            this.Load += new System.EventHandler(this.Form_Load);
            this.grpSerialPortSettings.ResumeLayout(false);
            this.grpSerialPortSettings.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button btnCancel;
        private System.Windows.Forms.Button btnOk;
        private System.Windows.Forms.GroupBox grpSerialPortSettings;
        private System.Windows.Forms.Label lblStopBits;
        private System.Windows.Forms.ComboBox cmbStopBits;
        private System.Windows.Forms.Label lblDataBits;
        private System.Windows.Forms.ComboBox cmbDataBits;
        private System.Windows.Forms.Label lblParity;
        private System.Windows.Forms.ComboBox cmbParity;
        private System.Windows.Forms.Label lblBaudRate;
        private System.Windows.Forms.Label lblPortName;
        private System.Windows.Forms.ComboBox cmbBaudRate;
        private System.Windows.Forms.ComboBox cmbPortName;
        private System.Windows.Forms.Label lblDisplayName;
        private System.Windows.Forms.TextBox txtDisplayName;
    }
}


text:
using UnityEngine;
using System.Collections;

public class CTeamTowerNeutral : CTeam
{

    // referent to the component of the Unit itself
    private TowerNeutral selfUnit;

    public void Awake ()
    {
        base.Awake();
        selfUnit = GetComponent<TowerNeutral>();
    }

    public override void EnemyEntersInVisionSphere (CTeam unit)
    {
        selfUnit.EnemyEntersInVisionSphere(unit);
    }

    public override void EnemyLeavesVisionSphere(CTeam unit)
    {
        selfUnit.EnemyExitsInVisionSphere(unit);
    }

}

path: /New Detroit Project/Assets/NewDetroit/Scripts/Common Scripts/CTeamTowerNeutral.cs


text:
import { GraphNode } from "./graphNode";
import { Point } from "./point";

/**
 * A representation of a graph.
 *
 * @export
 * @class Graph
 */
export class Graph {

    /**
     * A collection of all graph nodes.
     *
     * @private
     * @type {Array<GraphNode>}
     * @memberof Graph
     */
    private nodes: Array<GraphNode>;

    /**
     * Creates an instance of Graph.
     *
     * @memberof Graph
     */
    public constructor() {
        this.nodes = new Array<GraphNode>();
    }

    /**
     * Adds a given node to the graph.
     *
     * @param {GraphNode} node
     * @memberof Graph
     */
    public addNode(node: GraphNode): void {
        this.nodes.push(node);
    }

    /**
     * Adds a new connection between to given nodes.
     *
     * @param {GraphNode} sourceNode
     * @param {GraphNode} targetNode
     * @memberof Graph
     */
    public addConnection(sourceNode: GraphNode, targetNode: GraphNode): void {
        sourceNode.addConnection(targetNode);
    }

}

repository: waxalot/graph-renderer

repo_name: waxalot/graph-renderer


text:
#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using ModInstallation.Interfaces.Mods;
using Semver;

#endregion

namespace ModInstallation.Implementations.Mods
{
    public class RetailModification : IInstalledModification
    {
        public RetailModification(string installPath)
        {
            InstallPath = installPath;
        }

        #region IInstalledModification Members

        #region Implementation of INotifyPropertyChanged

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region Implementation of IEquatable<IModification>

        public bool Equals(IModification other)
        {
            return string.Equals(Id, other.Id);
        }

        #endregion

        #region Implementation of IInstalledModification

        public string InstallPath { get; private set; }

        #endregion

        #endregion

        #region Implementation of IModification

        public string Title
        {
            get { return "FreeSpace Retail"; }
        }

        public SemVersion Version
        {
            get { return new SemVersion(1); }
        }

        public string Id
        {
            get { return "retail"; }
        }

        public string Commandline
        {
            get { return ""; }
        }

        public string FolderName
        {
            get { throw new NotImplementedException(); }
        }

        public IEnumerable<IPackage> Packages
        {
            get { return Enumerable.Empty<IPackage>(); }
        }

        public string Description
        {
            get { return "Retail FreeSpace 2, no mods."; }
        }

        public Uri LogoUri {
            get { return new Uri(Path.Combine(InstallPath, "FS2.bmp")); }
        }

        public IPostInstallActions PostInstallActions
        {
            get { throw new NotImplementedException(); }
        }

        #endregion
    }
}

repository: asarium/FSOLauncher

repo_name: asarium/FSOLauncher


text:
/*
Copyright 2019 The Skaffold 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 shared

import (
	plugin "github.com/hashicorp/go-plugin"
)

// Handshake is a common handshake that is shared by plugin and host.
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion: 1,

	MagicCookieKey:   "SKAFFOLD_BUILDER_PLUGIN",
	MagicCookieValue: "hello",
}

// PluginMap is a map of all accepted plugins
var PluginMap = map[string]plugin.Plugin{
	"docker": &BuilderPlugin{},
}

repository: DalavanCloud/skaffold

repo_name: DalavanCloud/skaffold


text:
SUMMARY = "Google USB EEM Gadget Configuration Script"
DESCRIPTION = "Google USB EEM Gadget Configuration Script"
PR = "r1"
PV = "0.2"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

FILESEXTRAPATHS:prepend = "${THISDIR}/${PN}:"

inherit systemd

DEPENDS += "m4-native"
DEPENDS += "systemd"
RDEPENDS:${PN} += "bash"

BMC_USB_ECM_PRODUCT_ID ??= ""
BMC_USB_ECM_PRODUCT_NAME ??= "${MACHINE} BMC"
BMC_USB_ECM_HOST_MAC ??= "invalid"
BMC_USB_ECM_DEV_MAC ??= "invalid"
BMC_USB_ECM_BIND_DEV ??= ""
BMC_USB_TYPE ??= "eem"
BMC_USB_IFACE ??= "gusb0"

SRC_URI += "file://usb_network.service.m4"
SRC_URI += "file://usb_network.sh"

SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "${@'usb_network.service' if d.getVar('BMC_USB_ECM_PRODUCT_ID') else ''}"

do_compile:append() {
  if [ -n "${BMC_USB_ECM_PRODUCT_ID}" ]; then
    test "X${BMC_USB_ECM_PRODUCT_NAME}" != "X" || bberror "Please define BMC_USB_ECM_PRODUCT_NAME"
    test "X${BMC_USB_ECM_BIND_DEV}" != "X" || bberror "Please define BMC_USB_ECM_BIND_DEV"

    m4 \
        -DM_BMC_USB_PRODUCT_ID="${BMC_USB_ECM_PRODUCT_ID}" \
        -DM_BMC_USB_PRODUCT_NAME="${BMC_USB_ECM_PRODUCT_NAME}" \
        -DM_BMC_USB_TYPE="${BMC_USB_TYPE}" \
        -DM_BMC_USB_HOST_MAC="${BMC_USB_ECM_HOST_MAC}" \
        -DM_BMC_USB_DEV_MAC="${BMC_USB_ECM_DEV_MAC}" \
        -DM_BMC_USB_IFACE="${BMC_USB_IFACE}" \
        -DM_BMC_USB_BIND_DEV="${BMC_USB_ECM_BIND_DEV}" \
        -DM_SCRIPT_INSTALL_DIR="${bindir}" \
        ${WORKDIR}/usb_network.service.m4 > ${WORKDIR}/usb_network.service
  fi
}

do_install:append() {
  install -d ${D}/${bindir}
  install -m 0755 ${WORKDIR}/usb_network.sh ${D}/${bindir}

  if [ -n "${BMC_USB_ECM_PRODUCT_ID}" ]; then
    install -d ${D}${systemd_system_unitdir}
    install -m 0644 ${WORKDIR}/usb_network.service ${D}${systemd_system_unitdir}
  fi
}

repository: openbmc/openbmc

repo_name: openbmc/openbmc

gha_license_id: NOASSERTION