text:
package httpaccesslog

import (
	"bytes"
	"log"
	"net/http"
	"os"
	"testing"
	"time"
)

type blackHole struct {
}

func (this blackHole) Write(p []byte) (n int, err error) {
	return len(p), nil
}

func (this blackHole) WriteHeader(int) {
}

func (this blackHole) Header() http.Header {
	return nil
}

var usageMessage = []byte(`
supported requests:
	/render/?target=
	/metrics/find/?query=
	/info/?target=
`)

func usageHandler(w http.ResponseWriter, r *http.Request) {
	w.Write(usageMessage)
}

func deniedHandler(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(401)
}

func delayedHandler(w http.ResponseWriter, r *http.Request) {
	time.Sleep(50 * time.Millisecond)
}

func notFoundHandler(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(404)
}

type clockMock struct {
	time.Time
}

func (this *clockMock) now() time.Time {
	startTime := time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC)
	if this.Time.IsZero() {
		this.Time = time.Now()
		return startTime
	}

	difference := time.Now().Sub(this.Time)
	return startTime.Add(difference)
}

func TestConstructor(t *testing.T) {
	New(os.Stdout)
}

func TestServeMux(t *testing.T) {
	target := &bytes.Buffer{}
	log.SetOutput(target)
	log.SetFlags(0)
	accessLogger := AccessLogger{nil, &clockMock{}}
	http.HandleFunc("/", accessLogger.Handle(notFoundHandler))
	go http.ListenAndServe(":5000", nil)
	tests := []struct {
		path     string
		handler  http.HandlerFunc
		expected string
	}{
		{
			"/NotFound",
			nil,
			"127.0.0.1 - user [10/Nov/2009:23:00:00 +0000] \"GET /NotFound HTTP/1.1\" 404 0 0.000/0.000 \"-\" \"-\" - -\n",
		},
		{
			"/usage",
			usageHandler,
			"127.0.0.1 - user [10/Nov/2009:23:00:00 +0000] \"GET /usage HTTP/1.1\" 200 78 0.000/0.000 \"-\" \"-\" - -\n",
		},
		{
			"/usage/subpath",
			nil,
			// the higher level handler ("/", notFoundHandler) has precedence over ("/usage", usageHandler)
			"127.0.0.1 - user [10/Nov/2009:23:00:00 +0000] \"GET /usage/subpath HTTP/1.1\" 404 0 0.000/0.000 \"-\" \"-\" - -\n",
		},
		{
			"/denied",
			deniedHandler,
			"127.0.0.1 - user [10/Nov/2009:23:00:00 +0000] \"GET /denied HTTP/1.1\" 401 0 0.000/0.000 \"-\" \"-\" - -\n",
		},
		{
			"/delayed",
			delayedHandler,
			"127.0.0.1 - user [10/Nov/2009:23:00:00 +0000] \"GET /delayed HTTP/1.1\" 200 0 0.050/0.050 \"-\" \"-\" - -\n",
		},
	}
	for _, tt := range tests {
		target.Reset()
		if tt.handler != nil {
			http.HandleFunc(tt.path, accessLogger.Handle(tt.handler))
		}

		http.Get("http://user:pass@localhost:5000" + tt.path)
		actual := target.String()
		if actual != tt.expected {
			t.Errorf("\nactual\n%s\nexpected\n%s", actual, tt.expected)
		}
	}
}

func TestHandle(t *testing.T) {
	target := &bytes.Buffer{}
	accessLogger := AccessLogger{log.New(target, "", 0), &clockMock{}}
	tests := []struct {
		remoteAddr string
		username   string
		method     string
		path       string
		proto      string
		referer    string
		userAgent  string
		handler    http.HandlerFunc
		expected   string
	}{
		{
			"127.0.0.1:1234",
			"frank",
			"GET",
			"/apache_pb.gif",
			"HTTP/1.0",
			"http://www.example.com/start.html",
			"Mozilla/4.08 [en] (Win98; I ;Nav)",
			usageHandler,
			"127.0.0.1 - frank [10/Nov/2009:23:00:00 +0000] \"GET /apache_pb.gif HTTP/1.0\" 200 78 0.000/0.000 \"http://www.example.com/start.html\" \"Mozilla/4.08 [en] (Win98; I ;Nav)\" - -\n",
		},
		{
			"10.1.2.254:4567",
			"",
			"GET",
			"/",
			"HTTP/1.1",
			"",
			"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)",
			deniedHandler,
			"10.1.2.254 - - [10/Nov/2009:23:00:00 +0000] \"GET / HTTP/1.1\" 401 0 0.000/0.000 \"-\" \"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)\" - -\n",
		},
		{
			"10.1.2.254",
			"",
			"GET",
			"/somepage",
			"HTTP/1.1",
			"https://github.com/",
			"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)",
			delayedHandler,
			"10.1.2.254 - - [10/Nov/2009:23:00:00 +0000] \"GET /somepage HTTP/1.1\" 200 0 0.050/0.050 \"https://github.com/\" \"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)\" - -\n",
		},
	}

	for _, tt := range tests {
		request, err := http.NewRequest(tt.method, tt.path, nil)
		if err != nil {
			t.Error("failed to create request")
		}

		request.Proto = tt.proto
		request.RemoteAddr = tt.remoteAddr
		request.SetBasicAuth(tt.username, "")
		if tt.referer != "" {
			request.Header["Referer"] = []string{tt.referer}
		}
		if tt.userAgent != "" {
			request.Header["UserAgent"] = []string{tt.userAgent}
		}
		target.Reset()
		accessLogger.Handle(tt.handler)(blackHole{}, request)
		actual := target.String()
		if actual != tt.expected {
			t.Errorf("\nactual\n%s\nexpected\n%s", actual, tt.expected)
		}
	}
}

func TestFormatAccessLog(t *testing.T) {
	mst, err := time.LoadLocation("MST")
	if err != nil {
		t.Error("Error loading timezone MST")
	}

	cet, err := time.LoadLocation("CET")
	if err != nil {
		t.Error("Error loading timezone CET")
	}

	tests := []struct {
		remoteAddr        string
		username          string
		dateTime          time.Time
		method            string
		path              string
		proto             string
		status            int
		responseBodyBytes int
		requestTime       time.Duration
		upstreamTime      time.Duration
		referer           string
		userAgent         string
		compressionRatio  float64
		expected          string
	}{
		{
			"127.0.0.1:1234",
			"frank",
			time.Date(2000, time.October, 10, 13, 55, 36, 0, mst),
			"GET",
			"/apache_pb.gif",
			"HTTP/1.0",
			http.StatusOK,
			2326,
			0,
			0,
			"http://www.example.com/start.html",
			"Mozilla/4.08 [en] (Win98; I ;Nav)",
			0,
			"127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] \"GET /apache_pb.gif HTTP/1.0\" 200 2326 0.000/0.000 \"http://www.example.com/start.html\" \"Mozilla/4.08 [en] (Win98; I ;Nav)\" - -",
		},
		{
			"10.1.2.254:4567",
			"",
			time.Date(2016, time.June, 13, 15, 19, 37, 0, cet),
			"GET",
			"/",
			"HTTP/1.1",
			http.StatusUnauthorized,
			22,
			80 * time.Millisecond,
			80 * time.Millisecond,
			"",
			"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)",
			0,
			"10.1.2.254 - - [13/Jun/2016:15:19:37 +0200] \"GET / HTTP/1.1\" 401 22 0.080/0.080 \"-\" \"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)\" - -",
		},
		{
			"10.1.2.254",
			"",
			time.Date(2016, time.June, 13, 15, 19, 37, 0, cet),
			"GET",
			"/somepage",
			"HTTP/1.1",
			http.StatusOK,
			950,
			50 * time.Millisecond,
			50 * time.Millisecond,
			"https://github.com/",
			"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)",
			3.02,
			"10.1.2.254 - - [13/Jun/2016:15:19:37 +0200] \"GET /somepage HTTP/1.1\" 200 950 0.050/0.050 \"https://github.com/\" \"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)\" 3.02 -",
		},
	}

	for _, tt := range tests {
		request, err := http.NewRequest(tt.method, tt.path, nil)
		if err != nil {
			t.Error("failed to create request")
		}

		request.Proto = tt.proto
		request.RemoteAddr = tt.remoteAddr
		request.SetBasicAuth(tt.username, "")
		if tt.referer != "" {
			request.Header["Referer"] = []string{tt.referer}
		}
		if tt.userAgent != "" {
			request.Header["UserAgent"] = []string{tt.userAgent}
		}
		actual := formatAccessLog(request, tt.dateTime, responseStats{tt.responseBodyBytes, tt.status}, tt.requestTime, tt.upstreamTime, tt.compressionRatio)
		if actual != tt.expected {
			t.Errorf("\nactual\n%s\nexpected\n%s", actual, tt.expected)
		}
	}
}

repository: JaderDias/go-httpaccesslog

repo_name: JaderDias/go-httpaccesslog


text:
package destination

import (
	"testing"

	conekta "github.com/conekta/conekta-go"
	"github.com/conekta/conekta-go/payee"
	"github.com/stretchr/testify/assert"
)

func init() {
	conekta.APIKey = conekta.TestKey
}

func createDestination() (*conekta.Payee, *conekta.Destination, error) {
	p := &conekta.PayeeParams{}
	payee, err := payee.Create(p.Mock())
	if err != nil {
		return nil, nil, err
	}
	dp := &conekta.DestinationParams{}
	des, err := Create(payee.ID, dp.Mock())
	if err != nil {
		return nil, nil, err
	}
	return payee, des, nil
}

func TestCreate(t *testing.T) {
	_, des, err := createDestination()
	assert.NotZero(t, des.ID)
	assert.Nil(t, err)
}

license: MIT

repository: shamigor/conekta-go

license_type: permissive

repo_name: shamigor/conekta-go

branch_name: refs/heads/master

gha_license_id: MIT

extension: go


text:
#
# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
# License: MIT (see COPYING.MIT)
#
# Filename: mplayer-common.bb
# Date: 26-Mar-06

DESCRIPTION = "Preconfigured mplayer preferences"
HOMEPAGE = "http://www.hentges.net/misc/openzaurus/index.shtml"

######################################################################################

PV = "0.0.1"
PR = "r0"

######################################################################################

SRC_URI = "file://mplayer.conf"

######################################################################################

FILES_${PN} = "/usr/etc/mplayer"

######################################################################################

do_install() {
	install -d "${D}/usr/etc/mplayer"

	install -m 0644 ${WORKDIR}/mplayer.conf "${D}/usr/etc/mplayer"
}

extension: bb


text:
require qt5-git.inc
require ${PN}.inc

# qtlocation wasn't released yet, last tag before this SRCREV is 5.0.0-beta1
PV = "4.999+5.0.0-beta1+git${SRCPV}"

# drop when bumping SRCREV
PR = "r1"

QT_MODULE_BRANCH = "master"

SRCREV = "f28408346243cf090326f4738fd838219c21e00f"


text:
SUMMARY = "A system to allow node parameters to be changed without restarting the node."
HOMEPAGE = "http://ros.org/wiki/dynamic_reconfigure"
LICENSE  = "BSD"
LIC_FILES_CHKSUM = "file://stack.xml;md5=227bd1fe664d588e63c7b7efd497d0bb"

STACK = "dynamic_reconfigure"
inherit rosbuild

BBCLASSEXTEND = "native"

SRC_URI  = "hg://kforge.ros.org/dynamicreconfig;module=dynamic_reconfigure;rev=dynamic_reconfigure-1.4.2;proto=http \
            file://cross-compilation.patch \
"

DEPENDS += "\
	ros-fuerte-ros-comm-native \
	ros-fuerte-ros-comm \
	ros-fuerte-genmsg-native \
	ros-fuerte-gencpp-native \
	ros-fuerte-genpy-native \
	ros-fuerte-genlisp-native \
	ros-fuerte-roscpp-core \
	ros-fuerte-std-msgs \
"

RDEPENDS_${PN} += "\
	ros-fuerte-ros \
	ros-fuerte-ros-comm \
"

FILES_${PN}-dbg += " \
	${ros_stacksdir}/${STACK}/lib/.debug \
	${ros_stacksdir}/${STACK}/bin/.debug \
"

FILES_${PN}-staticdev += " \
	${ros_stacksdir}/${STACK}/lib/*.a \
"

do_install_append() {
    rm -rf ${D}/${ros_stacksdir}/${STACK}/build
}

S = "${WORKDIR}/dynamic_reconfigure"


text:
DESCRIPTION = "Panel plugin with graphical representation of the cpu frequency"
HOMEPAGE = "http://goodies.xfce.org/projects/panel-plugins/xfce4-eyes-plugin"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"

inherit xfce-panel-plugin

# SRC_URI must follow inherited one
SRC_URI += "file://port-to-libxfce4ui.patch"
SRC_URI[md5sum] = "dcbf6ea9035d379d168b479be0d09f14"
SRC_URI[sha256sum] = "eaae5d230b5c2fe6a8b448b59cfe959bf126796911c166a7343a51dc440fbbb2"

FILES_${PN} += "${datadir}/xfce4/eyes"


text:
require libeventdb.inc

PR = "r2"
SRC_URI += "file://libeventdb-unbreak-LIVE-macro.patch;patch=1"


text:
SUMMARY = "A behavior-driven development framework, Python style"
DESCRIPTION = "Behavior-driven development (or BDD) is an agile software \
development technique that encourages collaboration between developers, QA and \
non-technical or business participants in a software project.\
\
behave uses tests written in a natural language style, backed up by Python code."
HOMEPAGE = "https://github.com/behave/behave"
SECTION = "devel/python"

LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d950439e8ea6ed233e4288f5e1a49c06"

SRC_URI[md5sum] = "3f05c859a1c45f5ed33e925817ad887d"
SRC_URI[sha256sum] = "b9662327aa53294c1351b0a9c369093ccec1d21026f050c3bd9b3e5cccf81a86"

inherit pypi setuptools

RDEPENDS:${PN} += " \
    ${PYTHON_PN}-argparse \
    ${PYTHON_PN}-enum34 \
    ${PYTHON_PN}-parse-type \
    ${PYTHON_PN}-setuptools \
    ${PYTHON_PN}-six \
    ${PYTHON_PN}-traceback2 \
    "

SKIP_RECIPE[python-behave] ?= "${@bb.utils.contains('I_SWEAR_TO_MIGRATE_TO_PYTHON3', 'yes', '', 'python2 is out of support for long time, read https://www.python.org/doc/sunset-python-2/ https://python3statement.org/ and if you really have to temporarily use this, then set I_SWEAR_TO_MIGRATE_TO_PYTHON3 to "yes"', d)}"

branch_name: refs/heads/jansa/master

gha_language: BitBake


text:
@article{melymcb-0166,
 author = {Vericat, F. and Melgarejo, A.A.},
 document_type = {Article},
 doi = {10.1103/PhysRevE.50.830},
 journal = {Physical Review E},
 note = {cited By 1},
 number = {2},
 pages = {830-837},
 source = {Scopus},
 title = {Long-range correlations in degenerate multicomponent systems of charged fermions},
 url = {https://www.scopus.com/inward/record.uri?eid=2-s2.0-35949006360&doi=10.1103%2fPhysRevE.50.830&partnerID=40&md5=d8dc1b98ae95d87341b04efab81f28d7},
 volume = {50},
 year = {1994}
}

extension: bib


text:
package main

import (
	"net/http"

	api "./api"
	_ "github.com/mattn/go-sqlite3"
)

func main() {
	rt, err := api.New(api.WithSearchPath("/home/wangha/work/go/fwwb-code/wangha/server/search"),
		api.WithImagePath("/home/wangha/work/go/fwwb-code/wangha/server/images"),
		api.WithVisionProxy("127.0.0.1:1080"))
	if err != nil {
		panic(err)
	}
	defer rt.Close()

	rt.LoadSchema()

	srv := &http.Server{
		Addr:    ":8085",
		Handler: rt,
	}

	srv.ListenAndServe()
	defer srv.Close()
}

repository: wanghaMAX/fwwb-code

repo_name: wanghaMAX/fwwb-code


text:
DESCRIPTION = "PHYTEC camera examples"
HOMEPAGE = "http://www.phytec.de"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=16469200a43ccc97395e139bb705a9e2"

SECTION = "multimedia"

PR = "r0"

# Archive created via
#   $ mkdir phytec-camera-examples
#   $ unzip gstreamer_examples.zip
#   $ unzip v4l2_c_examples.zip
#   $ unzip opencv_examples.zip
#   $ mv gstreamer_examples phytec-camera-examples/phytec-gstreamer-examples
#   $ mv v4l2_c_examples phytec-camera-examples/phytec-v4l2_c-examples
#   $ mv opencv_examples phytec-camera-examples/phytec-opencv-examples
#   $ mv phytec-camera-examples/phytec-gstreamer-examples/COPYING.MIT \
#   $ phytec-camera-examples/
#   $ mv phytec-camera-examples phytec-camera-examples-imx8mp-1.0
#   $ find phytec-camera-examples-imx8mp-1.0/ -exec "touch" "{}" ";"
#   $ find phytec-camera-examples-imx8mp-1.0/ -name "*.sh" -or -iname "*.py" -exec "chmod" "+x" "{}" ";"
#   $ tar -czf phytec-camera-examples-imx8mp-1.0.tar.gz \
#     phytec-camera-examples-imx8mp-1.0/

SRC_URI = "https://download.phytec.de/Software/Linux/Applications/${BPN}-${PV}.tar.gz"
SRC_URI[md5sum] = "361591c2dc4da6b7021ae5c16684840b"
SRC_URI[sha256sum] = "699dd5076aaf914167dd789a9d38f3ce06aaf84da4c974838add249bc0b30ebb"

do_configure[noexec] = "1"
do_compile[noexec] = "1"

do_install() {
	DESTDIR="${D}${datadir}"

	for dir in `find -type d`; do
		if [ ${dir} != "./patches" ]; then
			install -d ${DESTDIR}/${dir}
		fi
	done

	for file in `find ./*/ -type f`; do
		install -m 0644 ${file} ${DESTDIR}/${file}
	done

	find ${DESTDIR} -type f -iname "*.sh" -exec chmod 0755 {} \;
	find ${DESTDIR} -type f -iname "*.py" -exec chmod 0755 {} \;

	# Create link in home folder for old documentation
	install -d ${D}${ROOT_HOME}
	ln -s ${datadir}/phytec-gstreamer-examples ${D}${ROOT_HOME}/gstreamer-examples
	ln -s ${datadir}/phytec-v4l2_c-examples ${D}${ROOT_HOME}/v4l2_c-examples
	ln -s ${datadir}/phytec-opencv-examples ${D}${ROOT_HOME}/opencv-examples
}

FILES_${PN} += " \
    ${ROOT_HOME}/ \
    ${datadir}/phytec-gstreamer-examples \
    ${datadir}/phytec-v4l2_c-examples \
    ${datadir}/phytec-opencv-examples \
"

RDEPENDS_${PN} += " \
    bash \
    python3 \
    media-ctl \
    v4l-utils \
    gstreamer1.0 \
    gstreamer1.0-plugins-good-multifile \
    gstreamer1.0-plugins-good-video4linux2 \
    gstreamer1.0-plugins-bad-fbdevsink \
    gstreamer1.0-plugins-bad-bayer \
    gstreamer1.0-plugins-good-jpeg \
    gstreamer1.0-plugin-bayer2rgb-neon \
    gstreamer1.0-plugin-pseudocolor \
"


text:
package autoscaling

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/service/autoscaling"
)

func checkAutoscalingError(err error) error {
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case autoscaling.ErrCodeScalingActivityInProgressFault:
				return fmt.Errorf("%v: %v", autoscaling.ErrCodeScalingActivityInProgressFault, aerr.Error())
			case autoscaling.ErrCodeResourceContentionFault:
				return fmt.Errorf("%v: %v", autoscaling.ErrCodeResourceContentionFault, aerr.Error())
			default:
				return fmt.Errorf("%v", aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			return err
		}
	}
	return nil
}

repository: dizhaung/sigmund

repo_name: dizhaung/sigmund


text:
// Package msg micserver 中消息传递的基本单位
package msg

import (
	"encoding/hex"
	"errors"

	"github.com/liasece/micserver/log"
	msgbase "github.com/liasece/micserver/msg/base"
)

const (
	// MessageMaxSize 允许的最大消息大小（包括头部大小）
	// 普通代码中间应留出至少 32 字节提供给消息头部使用
	MessageMaxSize = 8 * 1024 * 1024
)

// MessageBinary micserver 中消息传递的基本单位
type MessageBinary struct {
	msgbase.MessageBase

	totalLength int
	msgID       uint16
	protoLength int

	ProtoData []byte
	buffer    []byte
}

// Free 将消息对象释放到对象池中
func (mb *MessageBinary) Free() {
	// 重置本消息各个属性
	mb.Reset()
	// 根据缓冲区容量归类
	size := len(mb.buffer)
	err := pools.Put(mb, size)
	if err != nil {
		log.Error("[MessageBinary.Free] pools.Put error", log.ErrorField(err))
	}
}

// Reset 重置 Message 数据
func (mb *MessageBinary) Reset() {
	mb.MessageBase.Reset()

	mb.totalLength = 0
	mb.msgID = 0
	mb.ProtoData = nil
	// 为了减轻GC压力，不应重置buffer字段
}

// GetTotalLength 获取消息包二进制总长度
func (mb *MessageBinary) GetTotalLength() int {
	return mb.totalLength
}

// SetTotalLength 设置消息包二进制总长度
func (mb *MessageBinary) SetTotalLength(v int) {
	mb.totalLength = v
}

// GetProtoLength 获取消息包数据段总长度
func (mb *MessageBinary) GetProtoLength() int {
	return mb.protoLength
}

// SetProtoLength 设置消息包数据段总长度
func (mb *MessageBinary) SetProtoLength(v int) {
	mb.protoLength = v
}

// GetMsgID 获取消息ID
func (mb *MessageBinary) GetMsgID() uint16 {
	return mb.msgID
}

// SetMsgID 设置消息ID
func (mb *MessageBinary) SetMsgID(v uint16) {
	mb.msgID = v
}

// 从二进制流中读取数据
// soffset 从本地偏移复制
// data 数据源
// doffset 数据源偏移
// Read bytenum 要读取的字节数
func (mb *MessageBinary) Read(soffset int,
	data []byte, doffset int, bytenum int) error {
	dataLen := len(data)
	// 消息结构错误
	if doffset+bytenum > dataLen {
		log.Error("[MessageBinary.Read] Buffer overflow", log.Int("DOffset", doffset), log.Int("ByteNum", bytenum), log.Int("DataLen", dataLen))
		return errors.New("buffer overflow")
	}
	// 检查 buffer
	if mb.buffer == nil ||
		len(mb.buffer) < soffset+bytenum {
		tmpmsg := GetMessageBinary(soffset + bytenum)
		if tmpmsg == nil {
			log.Error("[MessageBinary.Read] Unable to allocate MsgBinary's memory!!!!", log.Int("Size", soffset+bytenum))
			return errors.New("unable to allocate MsgBinary's memory")
		}
		// 重新构建合理的 buffer
		mb.buffer = tmpmsg.buffer
	}
	// 复制 MessageBinaryHeadL2+protodata 数据域
	copy(mb.buffer[soffset:soffset+bytenum], data[doffset:doffset+bytenum])
	// 将数据指针字段指向buffer数据域
	return nil
}

// GetBuffer 获取消息的二进制流数据
func (mb *MessageBinary) GetBuffer() []byte {
	return mb.buffer
}

// SetProtoDataBound 设置消息内容数据域
func (mb *MessageBinary) SetProtoDataBound(offset int, bytenum int) error {
	if len(mb.buffer) < offset+bytenum || offset+bytenum < 0 {
		log.Error("[MessageBinary.SetProtoDataBound] Buffer overflow", log.Int("Len", len(mb.buffer)), log.Int("Need", offset+bytenum))
		return errors.New("buffer overflow")
	}
	mb.ProtoData = mb.buffer[offset : offset+bytenum]
	mb.SetProtoLength(bytenum)
	return nil
}

// String 获取消息的所有二进制内容的16进制字符串
func (mb *MessageBinary) String() string {
	if mb.buffer == nil {
		return ""
	}
	return hex.EncodeToString(mb.buffer)
}

repository: liasece/micserver

repo_name: liasece/micserver

gha_language: Go


text:
@book{su2015study,
  title={Study of odor-producing \textit{Planktothrix} sp.~in
      Miyun Reservoir, regarding the ecological niche
          identification, regulation and control strategy},
  publisher={Research Center for Eco-Environmental Sciences,
      Chinese Academy of Sciences},
  author={Ming Su},
  year={2015},
  volume={2015}
}


text:
package todo

import (
	"testing"

	"github.com/99designs/gqlgen/client"
	"github.com/99designs/gqlgen/graphql/handler"
	"github.com/99designs/gqlgen/graphql/introspection"
	"github.com/stretchr/testify/require"
)

func TestTodo(t *testing.T) {
	c := client.New(handler.NewDefaultServer(NewExecutableSchema(New())))

	var resp struct {
		CreateTodo struct{ ID string }
	}
	c.MustPost(`mutation { createTodo(todo:{text:"Fery important"}) { id } }`, &resp)

	require.Equal(t, "5", resp.CreateTodo.ID)

	t.Run("update the todo text", func(t *testing.T) {
		var resp struct {
			UpdateTodo struct{ Text string }
		}
		c.MustPost(
			`mutation($id: ID!, $text: String!) { updateTodo(id: $id, changes:{text:$text}) { text } }`,
			&resp,
			client.Var("id", 5),
			client.Var("text", "Very important"),
		)

		require.Equal(t, "Very important", resp.UpdateTodo.Text)
	})

	t.Run("get __typename", func(t *testing.T) {
		var resp struct {
			Todo struct {
				Typename string `json:"__typename"`
			}
		}
		c.MustPost(`{ todo(id: 5) { __typename } }`, &resp)

		require.Equal(t, "Todo", resp.Todo.Typename)
	})

	t.Run("update the todo status", func(t *testing.T) {
		var resp struct {
			UpdateTodo struct{ Text string }
		}
		c.MustPost(`mutation { updateTodo(id: 5, changes:{done:true}) { text } }`, &resp)

		require.Equal(t, "Very important", resp.UpdateTodo.Text)
	})

	t.Run("update the todo status by user id in mutation", func(t *testing.T) {
		var resp struct {
			UpdateTodo struct {
				Text string
				Done bool
			}
		}
		c.MustPost(`mutation @user(id:2){ updateTodo(id: 3, changes:{done:true}) { text, done } }`, &resp)

		require.Equal(t, "Somebody else's todo", resp.UpdateTodo.Text)
	})

	t.Run("update the todo status by user id in field", func(t *testing.T) {
		var resp struct {
			UpdateTodo struct {
				Text string
				Done bool
			}
		}
		c.MustPost(`mutation { updateTodo(id: 3, changes:{done:true})@user(id:2) { text, done } }`, &resp)

		require.Equal(t, "Somebody else's todo", resp.UpdateTodo.Text)
	})

	t.Run("failed update the todo status by user id in field", func(t *testing.T) {
		var resp struct {
			UpdateTodo *struct {
				Text string
				Done bool
			}
		}
		err := c.Post(`mutation { updateTodo(id: 3, changes:{done:true}) { text, done } }`, &resp)
		require.EqualError(t, err, "[{\"message\":\"you don't own that\",\"path\":[\"updateTodo\",\"done\"]}]")

		require.Nil(t, resp.UpdateTodo)
	})

	t.Run("select with alias", func(t *testing.T) {
		var resp struct {
			A struct{ Text string }
			B struct{ ID string }
		}
		c.MustPost(`{ a: todo(id:1) { text } b: todo(id:2) { id } }`, &resp)

		require.Equal(t, "A todo not to forget", resp.A.Text)
		require.Equal(t, "2", resp.B.ID)
	})

	t.Run("find a missing todo", func(t *testing.T) {
		var resp struct {
			Todo *struct{ Text string }
		}
		err := c.Post(`{ todo(id:99) { text } }`, &resp)

		require.Error(t, err)
		require.Nil(t, resp.Todo)
	})

	t.Run("get done status of unowned todo", func(t *testing.T) {
		var resp struct {
			Todo *struct {
				Text string
				Done bool
			}
		}
		err := c.Post(`{ todo(id:3) { text, done } }`, &resp)

		require.EqualError(t, err, `[{"message":"you don't own that","path":["todo","done"]}]`)
		require.Nil(t, resp.Todo)
	})

	t.Run("test panic", func(t *testing.T) {
		var resp struct {
			Todo *struct{ Text string }
		}
		err := c.Post(`{ todo(id:666) { text } }`, &resp)

		require.EqualError(t, err, `[{"message":"internal system error","path":["todo"]}]`)
	})

	t.Run("select all", func(t *testing.T) {
		var resp struct {
			Todo struct {
				ID   string
				Text string
				Done bool
			}
			LastTodo struct {
				ID   string
				Text string
				Done bool
			}
			Todos []struct {
				ID   string
				Text string
			}
		}
		c.MustPost(`{
			todo(id:1) { id done text }
			lastTodo { id text done }
			todos { id text }
		}`, &resp)

		require.Equal(t, "1", resp.Todo.ID)
		require.Equal(t, "5", resp.LastTodo.ID)
		require.Len(t, resp.Todos, 5)
		require.Equal(t, "Very important", resp.LastTodo.Text)
		require.Equal(t, "5", resp.LastTodo.ID)
	})

	t.Run("introspection", func(t *testing.T) {
		// Make sure we can run the graphiql introspection query without errors
		var resp interface{}
		c.MustPost(introspection.Query, &resp)
	})

	t.Run("null optional field", func(t *testing.T) {
		var resp struct {
			CreateTodo struct{ Text string }
		}
		c.MustPost(`mutation { createTodo(todo:{text:"Completed todo", done: null}) { text } }`, &resp)

		require.Equal(t, "Completed todo", resp.CreateTodo.Text)
	})
}

func TestSkipAndIncludeDirectives(t *testing.T) {
	c := client.New(handler.NewDefaultServer(NewExecutableSchema(New())))

	t.Run("skip on field", func(t *testing.T) {
		var resp map[string]interface{}
		c.MustPost(`{ todo(id: 1) @skip(if:true) { __typename } }`, &resp)
		_, ok := resp["todo"]
		require.False(t, ok)
	})

	t.Run("skip on variable", func(t *testing.T) {
		q := `query Test($cond: Boolean!) { todo(id: 1) @skip(if: $cond) { __typename } }`
		var resp map[string]interface{}

		c.MustPost(q, &resp, client.Var("cond", true))
		_, ok := resp["todo"]
		require.False(t, ok)

		c.MustPost(q, &resp, client.Var("cond", false))
		_, ok = resp["todo"]
		require.True(t, ok)
	})

	t.Run("skip on inline fragment", func(t *testing.T) {
		var resp struct {
			Todo struct {
				Typename string `json:"__typename"`
			}
		}
		c.MustPost(`{ todo(id: 1) {
				...@skip(if:true) {
					__typename
				}
			}
		}`, &resp)
		require.Empty(t, resp.Todo.Typename)
	})

	t.Run("skip on fragment", func(t *testing.T) {
		var resp struct {
			Todo struct {
				Typename string `json:"__typename"`
			}
		}
		c.MustPost(`
		{
			todo(id: 1) {
				...todoFragment @skip(if:true)
			}
		}
		fragment todoFragment on Todo {
			__typename
		}
		`, &resp)
		require.Empty(t, resp.Todo.Typename)
	})

	t.Run("include on field", func(t *testing.T) {
		q := `query Test($cond: Boolean!) { todo(id: 1) @include(if: $cond) { __typename } }`
		var resp map[string]interface{}

		c.MustPost(q, &resp, client.Var("cond", true))
		_, ok := resp["todo"]
		require.True(t, ok)

		c.MustPost(q, &resp, client.Var("cond", false))
		_, ok = resp["todo"]
		require.False(t, ok)
	})

	t.Run("both skip and include defined", func(t *testing.T) {
		type TestCase struct {
			Skip     bool
			Include  bool
			Expected bool
		}
		table := []TestCase{
			{Skip: true, Include: true, Expected: false},
			{Skip: true, Include: false, Expected: false},
			{Skip: false, Include: true, Expected: true},
			{Skip: false, Include: false, Expected: false},
		}
		q := `query Test($skip: Boolean!, $include: Boolean!) { todo(id: 1) @skip(if: $skip) @include(if: $include) { __typename } }`
		for _, tc := range table {
			var resp map[string]interface{}
			c.MustPost(q, &resp, client.Var("skip", tc.Skip), client.Var("include", tc.Include))
			_, ok := resp["todo"]
			require.Equal(t, tc.Expected, ok)
		}
	})

	t.Run("skip with default query argument", func(t *testing.T) {
		var resp map[string]interface{}
		c.MustPost(`query Test($skip: Boolean = true) { todo(id: 1) @skip(if: $skip) { __typename } }`, &resp)
		_, ok := resp["todo"]
		require.False(t, ok)
	})
}


text:
@book{choset,
   title =     {Principles of Robot Motion: Theory, Algorithms, and Implementations},
   author =    {Choset H., et al.},
   publisher = {MIT},
   isbn =      {0-262-03327-5},
   year =      {2005},
   series =    {Intelligent Robotics and Autonomous Agents series},
   edition =   {},
   volume =    {}
  },

@book{docarmo,
  added-at = {2011-03-16T00:00:00.000+0100},
  author = {do Carmo, Manfredo P.},
  biburl = {http://www.bibsonomy.org/bibtex/258eaa18020b8234bda1a88bce7f9b053/dblp},
  interhash = {dcc8a99249d52c3bb9445ce2910ce388},
  intrahash = {58eaa18020b8234bda1a88bce7f9b053},
  isbn = {978-0-13-212589-5},
  keywords = {dblp},
  pages = {I-VIII, 1-503},
  publisher = {Prentice Hall},
  timestamp = {2011-04-29T15:26:07.000+0200},
  title = {Differential geometry of curves and surfaces.},
  year = 1976
},

@book{farin,
  added-at = {2011-04-14T00:00:00.000+0200},
  author = {Farin, Gerald E.},
  biburl = {http://www.bibsonomy.org/bibtex/2656d436dd2e5795e526c17982426aa30/dblp},
  interhash = {a65756692832b0914858d233062c6d80},
  intrahash = {656d436dd2e5795e526c17982426aa30},
  keywords = {dblp},
  pages = {I-XVII, 1-444},
  publisher = {Academic Press},
  series = {Computer science and scientific computing},
  timestamp = {2011-04-29T15:26:51.000+0200},
  title = {Curves and surfaces for computer aided geometric design - a practical guide (2.ed.).},
  year = 1990
},

@book{farin2,
   title =     {Handbook of Computer Aided Geometric Design},
   author =    {G. Farin, J. Hoschek, M.-S. Kim},
   publisher = {North Holland},
   isbn =      {0444511040,9780444511041},
   year =      {2002},
   series =    {},
   edition =   {1},
   volume =    {}
  },

@book{schneider,
 author = {Schneider, Philip J. and Eberly, David},
 title = {Geometric Tools for Computer Graphics},
 year = {2002},
 isbn = {1558605940},
 publisher = {Elsevier Science Inc.},
 address = {New York, NY, USA},
},

@book{bondy,
   title =     {Graph theory},
   author =    {Adrian Bondy, U.S.R. Murty},
   publisher = {Springer},
   isbn =      {1846289696,9781846289699},
   year =      {2008},
   series =    {Graduate texts in mathematics 244},
   edition =   {3rd Corrected Printing.},
   volume =    {}
},

@book{press,
  added-at = {2010-02-21T22:43:51.000+0100},
  author = {Press, W. H. and Flannery, B. P. and Teukolsky, S. A. and Vetterling, W. T.},
  biburl = {http://www.bibsonomy.org/bibtex/28fc8822af03593443912bdb623434223/sknecht},
  interhash = {8dd6df4ccbf3268624fdef5215aadaea},
  intrahash = {8fc8822af03593443912bdb623434223},
  keywords = {imported},
  publisher = {Cambridge University Press},
  timestamp = {2010-02-21T22:43:55.000+0100},
  title = {Numerical Recipes},
  year = 1992
},

@book{stoer,
  added-at = {2009-03-03T17:19:04.000+0100},
  address = {New York},
  author = {Stoer, J. and Bulirsch, R.},
  biburl = {http://www.bibsonomy.org/bibtex/2b7274e942bbe4c5e28104dbc4560a052/bronckobuster},
  interhash = {d122fbc67268b4f67d394f30f8775e44},
  intrahash = {b7274e942bbe4c5e28104dbc4560a052},
  keywords = {imported},
  nota = {aa:},
  publisher = {Springer-Verlag},
  timestamp = {2009-03-03T17:19:41.000+0100},
  title = {Introduction to numerical analysis},
  year = 1992
},

@book{deboor,
  added-at = {2010-11-11T15:22:40.000+0100},
  author = {de Boor, C.},
  biburl = {http://www.bibsonomy.org/bibtex/23cb02bd69676e9eab9f1fe35dabf0f37/toevanen},
  interhash = {7db52c2dc60819112e53d56c7ee8088c},
  intrahash = {3cb02bd69676e9eab9f1fe35dabf0f37},
  keywords = {book splines},
  publisher = {Springer-Verlag},
  timestamp = {2010-11-12T19:30:09.000+0100},
  title = {A Practical Guide to Splines},
  year = 1978
},

@book{lavalle,
   title =     {Planning Algorithms},
   author =    {Steven M. LaValle},
   publisher = {Cambridge University Press},
   isbn =      {9780521862059,0521862051},
   year =      {2006},
   series =    {},
   edition =   {},
   volume =    {}
  },

@book{canny,
   title =     {Complexity of Robot Motion Planning},
   author =    {John F. Canny},
   publisher = {The MIT Press},
   isbn =      {0262031361,9780262031363},
   year =      {1988},
   series =    {ACM Doctoral Dissertation Award},
   edition =   {},
   volume =    {}
  },

@book{salomon,
   title =     {Curves and Surfaces for Computer Graphics},
   author =    {D. Salomon},
   publisher = {Springer},
   isbn =      {0387284524,0387241965,9780387241968},
   year =      {2006},
   series =    {},
   edition =   {},
   volume =    {}
  },

@book{bartels,
   title =     {An Introduction to Splines for Use in Computer Graphics and Geometric Modeling (The Morgan Kaufmann Series in Computer Graphics)},
   author =    {Richard H. Bartels, John C. Beatty, Brian A. Barsky},
   publisher = {Morgan Kaufmann},
   isbn =      {9781558604001,1558604006},
   year =      {1995},
   series =    {The Morgan Kaufmann Series in Computer Graphics},
   edition =   {1},
   volume =    {}
  },

@book{hughes,
   title =     {Computer Graphics: Principles and Practice},
   author =    {Hughes J.F., et al.},
   publisher = {Addison-Wesley Professional},
   isbn =      {0321399528,9780321399526},
   year =      {2013},
   series =    {3rd Edition},
   edition =   {3},
   volume =    {}
  },

@book{foley,
   title =     {Computer Graphics. Principles and Practice in C},
   author =    {James D. Foley, et al.},
   publisher = {Addison-Wesley},
   isbn =      {0201848406, 978-0201848403},
   year =      {1995},
   series =    {},
   edition =   {2},
   volume =    {}
  },

@book{bertsekas,
   title =     {Nonlinear programming},
   author =    {Dimitri P. Bertsekas},
   publisher = {Athena Scientific},
   isbn =      {1886529000,9781886529007},
   year =      {1999},
   series =    {},
   edition =   {2nd},
   volume =    {}
  },

@book{okabe,
   title =     {Spatial tessellations: Concepts and applications of Voronoi diagrams},
   author =    {Okabe A., et al.},
   publisher = {Wiley},
   isbn =      {0471986356,9780471986355},
   year =      {2000},
   series =    {Wiley Series in Probability and Statistics},
   edition =   {2ed},
   volume =    {}
  },

@article{giannelli,
title = "Path planning with obstacle avoidance by {$G^1$ PH} quintic splines ",
journal = "Computer-Aided Design ",
volume = "75–76",
number = "",
pages = "47 - 60",
year = "2016",
note = "",
issn = "0010-4485",
doi = "http://dx.doi.org/10.1016/j.cad.2016.02.004",
url = "http://www.sciencedirect.com/science/article/pii/S0010448516000166",
author = "Carlotta Giannelli and Duccio Mugnaini and Alessandra Sestini",
keywords = "Path planning",
keywords = "Obstacle avoidance",
keywords = "Spline",
keywords = "Pythagorean-hodograph curves",
keywords = "Tension parameters "
},

@article{bhattacharya,
  added-at = {2013-09-27T00:00:00.000+0200},
  author = {Bhattacharya, Priyadarshi and Gavrilova, Marina L.},
  biburl = {http://www.bibsonomy.org/bibtex/2b496fd7d6a4b15c7404be8042f7c6955/dblp},
  ee = {http://dx.doi.org/10.1109/MRA.2008.921540},
  interhash = {97386151426bd10fea92825c6fa0e30f},
  intrahash = {b496fd7d6a4b15c7404be8042f7c6955},
  journal = {IEEE Robot. Automat. Mag.},
  keywords = {dblp},
  number = 2,
  pages = {58-66},
  timestamp = {2013-09-28T11:33:20.000+0200},
  title = {Roadmap-Based Path Planning - Using the Voronoi Diagram for a Clearance-Based Shortest Path.},
  url = {http://dblp.uni-trier.de/db/journals/ram/ram15.html#BhattacharyaG08},
  volume = 15,
  year = 2008
},

@inproceedings{ho-liu,
  added-at = {2011-10-18T00:00:00.000+0200},
  author = {Ho, Yi-Ju and Liu, Jing-Sin},
  biburl = {http://www.bibsonomy.org/bibtex/2a5a18fdf01fe5b0a5f7f13090960eed2/dblp},
  booktitle = {CIRA},
  ee = {http://dx.doi.org/10.1109/CIRA.2009.5423161},
  interhash = {4f1a1525d57b71c389744ad1a44f7e64},
  intrahash = {a5a18fdf01fe5b0a5f7f13090960eed2},
  isbn = {978-1-4244-4808-1},
  keywords = {dblp},
  pages = {463-468},
  publisher = {IEEE},
  timestamp = {2011-10-19T11:33:08.000+0200},
  title = {Collision-free curvature-bounded smooth path planning using composite Bezier curve based on Voronoi diagram.},
  url = {http://dblp.uni-trier.de/db/conf/cira/cira2009.html#HoL09},
  year = 2009
},

@inproceedings{seda-pich,
 author = {\v{S}eda, Milo\v{s} and Pich, V\'{a}clav},
 title = {Robot Motion Planning Using Generalised Voronoi Diagrams},
 booktitle = {Proceedings of the 8th Conference on Signal Processing, Computational Geometry and Artificial Vision},
 series = {ISCGAV'08},
 year = {2008},
 isbn = {978-960-6766-95-4},
 location = {Rhodes, Greece},
 pages = {215--220},
 numpages = {6},
 url = {http://dl.acm.org/citation.cfm?id=1503734.1503770},
 acmid = {1503770},
 publisher = {World Scientific and Engineering Academy and Society (WSEAS)},
 address = {Stevens Point, Wisconsin, USA},
 keywords = {cell decomposition, generalised Voronoi diagram, motion planning, roadmap method, sampling methods},
},

 @inproceedings{fortune,
  added-at = {2015-01-30T00:00:00.000+0100},
  author = {Fortune, Steven},
  biburl = {http://www.bibsonomy.org/bibtex/276b6b8047a3faa1bf7ce4aeeddfaac18/dblp},
  booktitle = {Symposium on Computational Geometry},
  editor = {Aggarwal, Alok},
  ee = {http://doi.acm.org/10.1145/10515.10549},
  interhash = {f6bfd72eba7c2151d4d4ea201825b419},
  intrahash = {76b6b8047a3faa1bf7ce4aeeddfaac18},
  isbn = {0-89791-194-6},
  keywords = {dblp},
  pages = {313-322},
  publisher = {ACM},
  timestamp = {2015-06-19T05:25:38.000+0200},
  title = {A Sweepline Algorithm for Voronoi Diagrams.},
  url = {http://dblp.uni-trier.de/db/conf/compgeom/compgeom86.html#Fortune86},
  year = 1986
},

@book{deberg,
  added-at = {2009-12-02T20:58:46.000+0100},
  address = {Berlin Heidelberg},
  author = {de Berg, Mark and Cheong, Otfried and van Kreveld, Mark and Overmars, Mark},
  biburl = {http://www.bibsonomy.org/bibtex/2ad075a54e13be711e69c189ef2e3e403/cgray},
  edition = 3,
  interhash = {19f14f501e40f948ea5c1f389e00dd62},
  intrahash = {ad075a54e13be711e69c189ef2e3e403},
  isbn = {3-540-61270-x},
  keywords = {imported},
  publisher = {{Springer-Verlag}},
  timestamp = {2009-12-02T20:58:46.000+0100},
  title = {Computational Geometry Algorithms and Applications},
  year = 2008
},

@inproceedings{benjamin,
  added-at = {2014-12-19T00:00:00.000+0100},
  author = {Wah, Benjamin W. and Wang, Tao},
  biburl = {http://www.bibsonomy.org/bibtex/2e571dd0398d06c568258b93ef69792dc/dblp},
  booktitle = {ICTAI},
  //crossref = {conf/ictai/1999},
  ee = {http://doi.ieeecomputersociety.org/10.1109/TAI.1999.809827},
  interhash = {516947a78a57bd8f939b31f7d73f5b25},
  intrahash = {e571dd0398d06c568258b93ef69792dc},
  isbn = {0-7695-0456-6},
  keywords = {dblp},
  pages = {381-},
  publisher = {IEEE Computer Society},
  timestamp = {2015-06-18T19:02:05.000+0200},
  title = {Constrained Simulated Annealing with Applications in Nonlinear Continuous Constrained Global Optimization.},
  url = {http://dblp.uni-trier.de/db/conf/ictai/ictai1999.html#WahW99},
  year = 1999
},

@inproceedings{ho,
  added-at = {2010-04-25T00:00:00.000+0200},
  author = {Ho, Yi-Ju and Liu, Jing-Sin},
  biburl = {http://www.bibsonomy.org/bibtex/24992c2424593df0eff3e5e20a9b1e6f2/dblp},
  booktitle = {SAC},
  //crossref = {conf/sac/2010},
  editor = {Shin, Sung Y. and Ossowski, Sascha and Schumacher, Michael and Palakal, Mathew J. and Hung, Chih-Cheng},
  ee = {http://doi.acm.org/10.1145/1774088.1774361},
  interhash = {6a350ca3f9783a81c78dcb657fc14ab9},
  intrahash = {4992c2424593df0eff3e5e20a9b1e6f2},
  isbn = {978-1-60558-639-7},
  keywords = {dblp},
  pages = {1277-1281},
  publisher = {ACM},
  timestamp = {2015-11-04T11:51:43.000+0100},
  title = {Simulated annealing based algorithm for smooth robot path planning with different kinematic constraints.},
  url = {http://dblp.uni-trier.de/db/conf/sac/sac2010.html#HoL10},
  year = 2010
},

@article{dijkstra,
  added-at = {2007-08-22T12:47:43.000+0200},
  author = {Dijkstra, E.W.},
  biburl = {http://www.bibsonomy.org/bibtex/26dbbdd3500932d76b396643a80ca7d23/bsmyth},
  interhash = {66b00fcaed94c50176fb8ee35860f073},
  intrahash = {6dbbdd3500932d76b396643a80ca7d23},
  journal = {{Numerische Mathematik}},
  keywords = {imported},
  pages = {269-271},
  timestamp = {2007-08-22T12:47:44.000+0200},
  title = {{A note on two problems in connection with graphs.}},
  volume = 1,
  year = 1959
},

@article{knuth,
title = "A generalization of Dijkstra's algorithm",
journal = "Information Processing Letters",
volume = "6",
number = "1",
pages = "1 - 5",
year = "1977",
note = "",
issn = "0020-0190",
doi = "http://dx.doi.org/10.1016/0020-0190(77)90002-3",
url = "http://www.sciencedirect.com/science/article/pii/0020019077900023",
author = "Donald E. Knuth",
keywords = "Shortest paths",
keywords = "AND/OR graphs",
keywords = "context-free grammars",
keywords = "simultaneous minimax equations",
keywords = "decision trees",
keywords = "dynamic programming"
},

@article{metropolis,
  added-at = {2009-03-03T17:19:04.000+0100},
  author = {Metropolis, N. and Ulam, S.},
  biburl = {http://www.bibsonomy.org/bibtex/23a9872b3a3572e446d5cedf42f2dc7d3/bronckobuster},
  interhash = {f23e8d1798ee5feb71cd41eea30d830d},
  intrahash = {3a9872b3a3572e446d5cedf42f2dc7d3},
  journal = {J.~Am.~Stat.~Assoc.},
  keywords = {imported},
  nota = {mm:},
  pages = 335,
  timestamp = {2009-03-03T17:19:30.000+0100},
  title = {The Monte Carlo method},
  volume = 44,
  year = 1949
},

@book{sobol,
  author = {Sobol', I. M.},
  title = {A primer for the Monte Carlo method},
  year = {1994},
  publisher = {CRC Press}
},

@book{newman,
  added-at = {2009-02-20T10:48:43.000+0100},
  author = {Barkema, M.E.J. and Newman, G.T.},
  biburl = {http://www.bibsonomy.org/bibtex/278510f795c8c6f49cf3cef1b4aead55e/tobias_qft_tpi},
  interhash = {a45975ca1dac9968e66932818a9bac9b},
  intrahash = {78510f795c8c6f49cf3cef1b4aead55e},
  keywords = {imported},
  publisher = {Oxford Uinversity Press},
  timestamp = {2009-02-20T10:48:44.000+0100},
  title = {Monte Carlo Methods in Statistical Physics},
  year = 1999
},

@article{kirkpatrick,
  author = "S. Kirkpatrick and C. D. Jr Gelatt and M. P. Vecchi",
  title = "Optimization by Simulated Annealing",
  year = "1983",
  journal = "Science"
},

@article{paden,
  added-at = {2016-05-02T00:00:00.000+0200},
  author = {Paden, Brian and Cáp, Michal and Yong, Sze Zheng and Yershov, Dmitry S. and Frazzoli, Emilio},
  biburl = {http://www.bibsonomy.org/bibtex/221f794f37ce7a3d3ba6f8ecf1fe7d185/dblp},
  ee = {http://arxiv.org/abs/1604.07446},
  interhash = {c0ab6d23898d883ce649693f51372197},
  intrahash = {21f794f37ce7a3d3ba6f8ecf1fe7d185},
  journal = {CoRR},
  keywords = {dblp},
  timestamp = {2016-05-03T11:42:50.000+0200},
  title = {A Survey of Motion Planning and Control Techniques for Self-driving Urban Vehicles.},
  url = {http://dblp.uni-trier.de/db/journals/corr/corr1604.html#PadenCYYF16},
  volume = {abs/1604.07446},
  year = 2016
},

@Article{goerzen,
author="Goerzen, C.
and Kong, Z.
and Mettler, B.",
title="A Survey of Motion Planning Algorithms from the Perspective of Autonomous UAV Guidance",
journal="Journal of Intelligent and Robotic Systems",
year="2009",
volume="57",
number="1",
pages="65--100",
abstract="A fundamental aspect of autonomous vehicle guidance is planning trajectories. Historically, two fields have contributed to trajectory or motion planning methods: robotics and dynamics and control. The former typically have a stronger focus on computational issues and real-time robot control, while the latter emphasize the dynamic behavior and more specific aspects of trajectory performance. Guidance for Unmanned Aerial Vehicles (UAVs), including fixed- and rotary-wing aircraft, involves significant differences from most traditionally defined mobile and manipulator robots. Qualities characteristic to UAVs include non-trivial dynamics, three-dimensional environments, disturbed operating conditions, and high levels of uncertainty in state knowledge. Otherwise, UAV guidance shares qualities with typical robotic motion planning problems, including partial knowledge of the environment and tasks that can range from basic goal interception, which can be precisely specified, to more general tasks like surveillance and reconnaissance, which are harder to specify. These basic planning problems involve continual interaction with the environment. The purpose of this paper is to provide an overview of existing motion planning algorithms while adding perspectives and practical examples from UAV guidance approaches.",
issn="1573-0409",
doi="10.1007/s10846-009-9383-1",
url="http://dx.doi.org/10.1007/s10846-009-9383-1"
},

@article{pukelsheim,
 ISSN = {00031305},
 URL = {http://www.jstor.org/stable/2684253},
 abstract = {For random variables with a unimodal Lebesgue density, the 3σ rule is proved by elementary calculus. It emerges as a special case of the Vysochanskiĭ-Petunin inequality, which in turn is based on the Gauss inequality.},
 author = {Friedrich Pukelsheim},
 journal = {The American Statistician},
 number = {2},
 pages = {88-91},
 publisher = {[American Statistical Association, Taylor \& Francis, Ltd.]},
 title = {The Three Sigma Rule},
 volume = {48},
 year = {1994}
},

@article{maekawa,
  added-at = {2010-07-21T15:41:36.000+0200},
  author = {Maekawa, Takashi and Noda, Tetsuya and Tamura, Shigefumi and Ozaki, Tomonori and ichiro Machida, Ken},
  biburl = {http://www.bibsonomy.org/bibtex/2c1dc3f8ab01ebf4c4eda6efe99427115/dblp},
  date = {2010-05-14},
  ee = {http://dx.doi.org/10.1016/j.cad.2009.12.007},
  interhash = {64c5a8a8dbf1c780153462523724c39b},
  intrahash = {c1dc3f8ab01ebf4c4eda6efe99427115},
  journal = {Computer-Aided Design},
  keywords = {dblp},
  number = 4,
  pages = {350-359},
  timestamp = {2010-07-21T15:41:36.000+0200},
  title = {Curvature continuous path generation for autonomous vehicle using B-spline curves.},
  url = {http://dblp.uni-trier.de/db/journals/cad/cad42.html#MaekawaNTOM10},
  volume = 42,
  year = 2010
},

@article{li,
title = "A smooth, obstacle-avoiding curve ",
journal = "Computers \& Graphics ",
volume = "30",
number = "4",
pages = "581 - 587",
year = "2006",
note = "",
issn = "0097-8493",
doi = "http://dx.doi.org/10.1016/j.cag.2006.03.003",
url = "http://www.sciencedirect.com/science/article/pii/S0097849306000756",
author = "Z. Li and D.S. Meek and D.J. Walton",
keywords = "Obstacle-avoiding curve",
keywords = "G2 continuity "
},

@book{farouki,
   title =     {Pythagorean-Hodograph Curves: Algebra and Geometry Inseparable},
   author =    {Rida T. Farouki},
   publisher = {Springer-Verlag Berlin Heidelberg},
   isbn =      {978-3-540-73397-3,978-3-540-73398-0},
   year =      {2008},
   series =    {Geometry and Computing 1},
   edition =   {1},
   volume =    {}
  },

@inproceedings{yang,
  title={3D smooth path planning for a UAV in cluttered natural environments},
  author={Yang, Kwangjin and Sukkarieh, Salah},
  booktitle={2008 IEEE/RSJ International Conference on Intelligent Robots and Systems},
  pages={794--800},
  year={2008},
  organization={IEEE}
},

@article{aghababa,
title = "3D path planning for underwater vehicles using five evolutionary optimization algorithms avoiding static and energetic obstacles ",
journal = "Applied Ocean Research ",
volume = "38",
number = "",
pages = "48 - 62",
year = "2012",
note = "",
issn = "0141-1187",
doi = "http://dx.doi.org/10.1016/j.apor.2012.06.002",
url = "http://www.sciencedirect.com/science/article/pii/S014111871200051X",
author = "Mohammad Pourmahmood Aghababa",
keywords = "Underwater vehicle",
keywords = "Path planning",
keywords = "Evolutionary algorithm",
keywords = "Collision avoidance "
},

@INPROCEEDINGS{kroumov,
author={V. Kroumov and Jianli Yu},
booktitle={Networking, Sensing and Control, 2009. ICNSC '09. International Conference on},
title={3D path planning for mobile robots using annealing neural network},
year={2009},
pages={130-135},
keywords={collision avoidance;mobile robots;neurocontrollers;piecewise linear techniques;simulated annealing;3D path planning;differential drive mobile robot;piecewise linear technique;potential field algorithms;simulated annealing neural network;Cranes;Mathematics;Mobile robots;Neural networks;Path planning;Physics;Piecewise linear techniques;Robot control;Simulated annealing;Underwater vehicles},
doi={10.1109/ICNSC.2009.4919259},
month={March}
},

@inproceedings{hrabar,
  title={3D path planning and stereo-based obstacle avoidance for rotorcraft UAVs},
  author={Hrabar, Stefan},
  booktitle={2008 IEEE/RSJ International Conference on Intelligent Robots and Systems},
  pages={807--814},
  year={2008},
  organization={IEEE}
}

repository: trianam/dissertation

repo_name: trianam/dissertation


text:
// Copyright 2021 Google LLC
//
// 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.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.27.1
// 	protoc        v3.17.3
// source: google/ads/googleads/v8/services/detailed_demographic_service.proto

package services

import (
	context "context"
	reflect "reflect"
	sync "sync"

	resources "google.golang.org/genproto/googleapis/ads/googleads/v8/resources"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Request message for [DetailedDemographicService.GetDetailedDemographic][google.ads.googleads.v8.services.DetailedDemographicService.GetDetailedDemographic].
type GetDetailedDemographicRequest struct {
	state         protoimpl.MessageState
	sizeCache     protoimpl.SizeCache
	unknownFields protoimpl.UnknownFields

	// Required. Resource name of the DetailedDemographic to fetch.
	ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
}

func (x *GetDetailedDemographicRequest) Reset() {
	*x = GetDetailedDemographicRequest{}
	if protoimpl.UnsafeEnabled {
		mi := &file_google_ads_googleads_v8_services_detailed_demographic_service_proto_msgTypes[0]
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		ms.StoreMessageInfo(mi)
	}
}

func (x *GetDetailedDemographicRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetDetailedDemographicRequest) ProtoMessage() {}

func (x *GetDetailedDemographicRequest) ProtoReflect() protoreflect.Message {
	mi := &file_google_ads_googleads_v8_services_detailed_demographic_service_proto_msgTypes[0]
	if protoimpl.UnsafeEnabled && x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetDetailedDemographicRequest.ProtoReflect.Descriptor instead.
func (*GetDetailedDemographicRequest) Descriptor() ([]byte, []int) {
	return file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescGZIP(), []int{0}
}

func (x *GetDetailedDemographicRequest) GetResourceName() string {
	if x != nil {
		return x.ResourceName
	}
	return ""
}

var File_google_ads_googleads_v8_services_detailed_demographic_service_proto protoreflect.FileDescriptor

var file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDesc = []byte{
	0x0a, 0x43, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x6f,
	0x67, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x2f, 0x76, 0x38, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
	0x65, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6d, 0x6f,
	0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x64,
	0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x38, 0x2e, 0x73,
	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x1a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
	0x61, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x2f, 0x76, 0x38,
	0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x74, 0x61, 0x69,
	0x6c, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x2e,
	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
	0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
	0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
	0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f,
	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62,
	0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67,
	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
	0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7a, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x44,
	0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68,
	0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0d, 0x72, 0x65, 0x73,
	0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
	0x42, 0x34, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2e, 0x0a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
	0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63,
	0x6f, 0x6d, 0x2f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x6d, 0x6f, 0x67,
	0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
	0x4e, 0x61, 0x6d, 0x65, 0x32, 0xc7, 0x02, 0x0a, 0x1a, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65,
	0x64, 0x44, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76,
	0x69, 0x63, 0x65, 0x12, 0xe1, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69,
	0x6c, 0x65, 0x64, 0x44, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x12, 0x3f,
	0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
	0x6c, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x38, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
	0x73, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x6d,
	0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
	0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f,
	0x67, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x38, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
	0x63, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x6d, 0x6f,
	0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12,
	0x36, 0x2f, 0x76, 0x38, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e,
	0x61, 0x6d, 0x65, 0x3d, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f,
	0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, 0x70,
	0x68, 0x69, 0x63, 0x73, 0x2f, 0x2a, 0x7d, 0xda, 0x41, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
	0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x45, 0xca, 0x41, 0x18, 0x67, 0x6f, 0x6f, 0x67,
	0x6c, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
	0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77,
	0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f,
	0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x64, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x42, 0x86,
	0x02, 0x0a, 0x24, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x64,
	0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x76, 0x38, 0x2e, 0x73,
	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x42, 0x1f, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65,
	0x64, 0x44, 0x65, 0x6d, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x53, 0x65, 0x72, 0x76,
	0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x6f, 0x6f, 0x67,
	0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65,
	0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
	0x73, 0x2f, 0x61, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x64, 0x73, 0x2f,
	0x76, 0x38, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3b, 0x73, 0x65, 0x72, 0x76,
	0x69, 0x63, 0x65, 0x73, 0xa2, 0x02, 0x03, 0x47, 0x41, 0x41, 0xaa, 0x02, 0x20, 0x47, 0x6f, 0x6f,
	0x67, 0x6c, 0x65, 0x2e, 0x41, 0x64, 0x73, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64,
	0x73, 0x2e, 0x56, 0x38, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0xca, 0x02, 0x20,
	0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x41, 0x64, 0x73, 0x5c, 0x47, 0x6f, 0x6f, 0x67, 0x6c,
	0x65, 0x41, 0x64, 0x73, 0x5c, 0x56, 0x38, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
	0xea, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x41, 0x64, 0x73, 0x3a, 0x3a,
	0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x41, 0x64, 0x73, 0x3a, 0x3a, 0x56, 0x38, 0x3a, 0x3a, 0x53,
	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}

var (
	file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescOnce sync.Once
	file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescData = file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDesc
)

func file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescGZIP() []byte {
	file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescOnce.Do(func() {
		file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescData)
	})
	return file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDescData
}

var file_google_ads_googleads_v8_services_detailed_demographic_service_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_google_ads_googleads_v8_services_detailed_demographic_service_proto_goTypes = []interface{}{
	(*GetDetailedDemographicRequest)(nil), // 0: google.ads.googleads.v8.services.GetDetailedDemographicRequest
	(*resources.DetailedDemographic)(nil), // 1: google.ads.googleads.v8.resources.DetailedDemographic
}
var file_google_ads_googleads_v8_services_detailed_demographic_service_proto_depIdxs = []int32{
	0, // 0: google.ads.googleads.v8.services.DetailedDemographicService.GetDetailedDemographic:input_type -> google.ads.googleads.v8.services.GetDetailedDemographicRequest
	1, // 1: google.ads.googleads.v8.services.DetailedDemographicService.GetDetailedDemographic:output_type -> google.ads.googleads.v8.resources.DetailedDemographic
	1, // [1:2] is the sub-list for method output_type
	0, // [0:1] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_google_ads_googleads_v8_services_detailed_demographic_service_proto_init() }
func file_google_ads_googleads_v8_services_detailed_demographic_service_proto_init() {
	if File_google_ads_googleads_v8_services_detailed_demographic_service_proto != nil {
		return
	}
	if !protoimpl.UnsafeEnabled {
		file_google_ads_googleads_v8_services_detailed_demographic_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
			switch v := v.(*GetDetailedDemographicRequest); i {
			case 0:
				return &v.state
			case 1:
				return &v.sizeCache
			case 2:
				return &v.unknownFields
			default:
				return nil
			}
		}
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDesc,
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_google_ads_googleads_v8_services_detailed_demographic_service_proto_goTypes,
		DependencyIndexes: file_google_ads_googleads_v8_services_detailed_demographic_service_proto_depIdxs,
		MessageInfos:      file_google_ads_googleads_v8_services_detailed_demographic_service_proto_msgTypes,
	}.Build()
	File_google_ads_googleads_v8_services_detailed_demographic_service_proto = out.File
	file_google_ads_googleads_v8_services_detailed_demographic_service_proto_rawDesc = nil
	file_google_ads_googleads_v8_services_detailed_demographic_service_proto_goTypes = nil
	file_google_ads_googleads_v8_services_detailed_demographic_service_proto_depIdxs = nil
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6

// DetailedDemographicServiceClient is the client API for DetailedDemographicService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DetailedDemographicServiceClient interface {
	// Returns the requested detailed demographic in full detail.
	GetDetailedDemographic(ctx context.Context, in *GetDetailedDemographicRequest, opts ...grpc.CallOption) (*resources.DetailedDemographic, error)
}

type detailedDemographicServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDetailedDemographicServiceClient(cc grpc.ClientConnInterface) DetailedDemographicServiceClient {
	return &detailedDemographicServiceClient{cc}
}

func (c *detailedDemographicServiceClient) GetDetailedDemographic(ctx context.Context, in *GetDetailedDemographicRequest, opts ...grpc.CallOption) (*resources.DetailedDemographic, error) {
	out := new(resources.DetailedDemographic)
	err := c.cc.Invoke(ctx, "/google.ads.googleads.v8.services.DetailedDemographicService/GetDetailedDemographic", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DetailedDemographicServiceServer is the server API for DetailedDemographicService service.
type DetailedDemographicServiceServer interface {
	// Returns the requested detailed demographic in full detail.
	GetDetailedDemographic(context.Context, *GetDetailedDemographicRequest) (*resources.DetailedDemographic, error)
}

// UnimplementedDetailedDemographicServiceServer can be embedded to have forward compatible implementations.
type UnimplementedDetailedDemographicServiceServer struct {
}

func (*UnimplementedDetailedDemographicServiceServer) GetDetailedDemographic(context.Context, *GetDetailedDemographicRequest) (*resources.DetailedDemographic, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDetailedDemographic not implemented")
}

func RegisterDetailedDemographicServiceServer(s *grpc.Server, srv DetailedDemographicServiceServer) {
	s.RegisterService(&_DetailedDemographicService_serviceDesc, srv)
}

func _DetailedDemographicService_GetDetailedDemographic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDetailedDemographicRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DetailedDemographicServiceServer).GetDetailedDemographic(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/google.ads.googleads.v8.services.DetailedDemographicService/GetDetailedDemographic",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DetailedDemographicServiceServer).GetDetailedDemographic(ctx, req.(*GetDetailedDemographicRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _DetailedDemographicService_serviceDesc = grpc.ServiceDesc{
	ServiceName: "google.ads.googleads.v8.services.DetailedDemographicService",
	HandlerType: (*DetailedDemographicServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDetailedDemographic",
			Handler:    _DetailedDemographicService_GetDetailedDemographic_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ads/googleads/v8/services/detailed_demographic_service.proto",
}

repository: rv-drassakhatsky/go-genproto

repo_name: rv-drassakhatsky/go-genproto


text:
---
---

@article{tran2022evaluating,
  title={Evaluating the Efficacy of Small Face Recognition by Convolutional Neural Networks with Interpolation Based on Auto-adjusted Parameters and Transfer Learning},
  author={Tran, Quan M and Pham, Vuong T and Nga, Duong Thi Thuy and The Bao, Pham},
  journal={Applied Artificial Intelligence},
  volume={36},
  number={1},
  pages={2012982},
  year={2022},
  publisher={Taylor \& Francis},
  preview={aai_preview.png},
}

@inproceedings{tran2019efficient,
  title={Efficient cnn models for beer bottle cap classification problem},
  author={Tran, Quan M and Nguyen, Linh V and Huynh, Tai and Vo, Hai H and Pham, Vuong T},
  booktitle={International Conference on Future Data and Security Engineering},
  pages={713--721},
  year={2019},
  organization={Springer},
  preview={fdse_preview.png},
  selected={true}
}

@inproceedings{tran2021influence,
  title={Influence prediction on social media network through contents and interaction behaviors using attention-based knowledge graph},
  author={Tran, Quan M and Nguyen, Hien D and Nguyen, Binh T and Pham, Vuong T and Le, Trong T},
  booktitle={2021 13th International Conference on Knowledge and Systems Engineering (KSE)},
  pages={1--7},
  year={2021},
  organization={IEEE},
  preview={kse_preview.png},
  selected={true},
}

@article{tran2022measuring,
  title={Measuring the influence and amplification of users on social network with unsupervised behaviors learning and efficient interaction-based knowledge graph},
  author={Tran, Quan M and Nguyen, Hien D and Huynh, Tai and Nguyen, Kha V and Hoang, Suong N and Pham, Vuong T},
  journal={Journal of Combinatorial Optimization},
  volume={44},
  number={4},
  pages={2919--2945},
  year={2022},
  publisher={Springer},
  preview={joco_preview.png},
  selected={true},
}


text:
// Licensed to Apache Software Foundation (ASF) under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. Apache Software Foundation (ASF) licenses this file to you 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 tsdb

import (
	"bytes"
	"sort"
	"sync"

	"github.com/apache/skywalking-banyandb/api/common"
	"github.com/apache/skywalking-banyandb/pkg/convert"
	"github.com/apache/skywalking-banyandb/pkg/posting"
	"github.com/apache/skywalking-banyandb/pkg/posting/roaring"
)

type termHashID uint64

type postingMap struct {
	repo  map[termHashID]*postingValue
	mutex sync.RWMutex
}

func newPostingMap() *postingMap {
	return &postingMap{
		repo: make(map[termHashID]*postingValue),
	}
}

func (p *postingMap) put(key []byte, id common.ChunkID) error {
	list := p.getOrCreate(key)
	list.Insert(id)
	return nil
}

func (p *postingMap) getOrCreate(key []byte) posting.List {
	list := p.get(key)
	if list != roaring.EmptyPostingList {
		return list
	}
	p.mutex.Lock()
	defer p.mutex.Unlock()
	hashedKey := termHashID(convert.Hash(key))
	v := &postingValue{
		key:   key,
		value: roaring.NewPostingList(),
	}
	p.repo[hashedKey] = v
	return v.value
}

func (p *postingMap) get(key []byte) posting.List {
	p.mutex.RLock()
	defer p.mutex.RUnlock()
	hashedKey := termHashID(convert.Hash(key))
	v, ok := p.repo[hashedKey]
	if !ok {
		return roaring.EmptyPostingList
	}
	return v.value
}

func (p *postingMap) allValues() posting.List {
	result := roaring.NewPostingList()
	for _, value := range p.repo {
		_ = result.Union(value.value)
	}
	return result
}

func (p *postingMap) getRange(opts *RangeOpts) posting.List {
	switch bytes.Compare(opts.Upper, opts.Lower) {
	case -1:
		return roaring.EmptyPostingList
	case 0:
		if opts.IncludesUpper && opts.IncludesLower {
			return p.get(opts.Upper)
		}
		return roaring.EmptyPostingList
	}
	p.mutex.RLock()
	defer p.mutex.RUnlock()
	keys := make(Asc, 0, len(p.repo))
	for _, v := range p.repo {
		keys = append(keys, v.key)
	}
	sort.Sort(keys)
	index := sort.Search(len(keys), func(i int) bool {
		return bytes.Compare(keys[i], opts.Lower) >= 0
	})
	result := roaring.NewPostingList()
	for i := index; i < len(keys); i++ {
		k := keys[i]
		switch {
		case bytes.Equal(k, opts.Lower):
			if opts.IncludesLower {
				_ = result.Union(p.repo[termHashID(convert.Hash(k))].value)
			}
		case bytes.Compare(k, opts.Upper) > 0:
			break
		case bytes.Equal(k, opts.Upper):
			if opts.IncludesUpper {
				_ = result.Union(p.repo[termHashID(convert.Hash(k))].value)
			}
		default:
			_ = result.Union(p.repo[termHashID(convert.Hash(k))].value)
		}
	}
	return result
}

type Asc [][]byte

func (a Asc) Len() int {
	return len(a)
}

func (a Asc) Less(i, j int) bool {
	return bytes.Compare(a[i], a[j]) < 0
}

func (a Asc) Swap(i, j int) {
	a[i], a[j] = a[j], a[i]
}

type postingValue struct {
	key   []byte
	value posting.List
}

repository: SunflowerInSpring/skywalking-banyandb

repo_name: SunflowerInSpring/skywalking-banyandb

branch_name: refs/heads/main


text:
function(vcpkg_get_tags PORT FEATURES VCPKG_TRIPLET_ID VCPKG_ABI_SETTINGS_FILE)
    message("d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af")
    vcpkg_triplet_file(${VCPKG_TRIPLET_ID})

    # GUID used as a flag - "cut here line"
    message("c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}
VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}
VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}
VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}
VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH}
VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}
VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE}
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f")

    # Just to enforce the user didn't set it in the triplet file
    if (DEFINED VCPKG_PUBLIC_ABI_OVERRIDE)
        set(VCPKG_PUBLIC_ABI_OVERRIDE)
        message(WARNING "VCPKG_PUBLIC_ABI_OVERRIDE set in the triplet will be ignored.")
    endif()
    include("${VCPKG_ABI_SETTINGS_FILE}" OPTIONAL)

    message("c35112b6-d1ba-415b-aa5d-81de856ef8eb
VCPKG_PUBLIC_ABI_OVERRIDE=${VCPKG_PUBLIC_ABI_OVERRIDE}
VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH}
e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f
8c504940-be29-4cba-9f8f-6cd83e9d87b7")
endfunction()

repository: JackBoos/vcpkg

repo_name: JackBoos/vcpkg

gha_license_id: NOASSERTION

extension: cmake


text:
// Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.
//
// 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 copier_test

import (
	"context"
	"os"

	"github.com/gardener/etcd-backup-restore/pkg/miscellaneous"
	. "github.com/gardener/etcd-backup-restore/pkg/snapshot/copier"
	brtypes "github.com/gardener/etcd-backup-restore/pkg/types"

	. "github.com/onsi/ginkgo/v2"
	. "github.com/onsi/gomega"
	. "github.com/onsi/gomega/gstruct"
)

var (
	sourceSnapstoreConfig *brtypes.SnapstoreConfig
	destSnapstoreConfig   *brtypes.SnapstoreConfig
	ss                    brtypes.SnapStore
	ds                    brtypes.SnapStore
	copier                *Copier
)

var _ = Describe("Running Copier", func() {
	BeforeEach(func() {
		sourceSnapstoreConfig = &brtypes.SnapstoreConfig{
			MaxParallelChunkUploads: 5,
			TempDir:                 "/tmp",
			Provider:                "Local",
			Container:               snapstoreDir,
		}
		destSnapstoreConfig = &brtypes.SnapstoreConfig{
			MaxParallelChunkUploads: 5,
			TempDir:                 "/tmp",
			Provider:                "Local",
			Container:               targetSnapstoreDir,
		}

		var err error
		ss, ds, err = GetSourceAndDestinationStores(sourceSnapstoreConfig, destSnapstoreConfig)
		Expect(err).ToNot(HaveOccurred())
		copier = NewCopier(logger, ss, ds, -1, -1, 10, false, 0)
	})
	AfterEach(func() {
		err = os.RemoveAll(targetSnapstoreDir)
		Expect(err).ShouldNot(HaveOccurred())
	})
	It("should run the copy command succesfully", func() {
		fullSourceStoreSnapshot, deltaSrourceStoreSnapList, err := miscellaneous.GetLatestFullSnapshotAndDeltaSnapList(ss)
		Expect(err).NotTo(HaveOccurred())
		Expect(copier.Run(context.TODO())).ToNot(HaveOccurred())
		fullTargetStoreSnapshot, deltaTargetStoreSnapList, err := miscellaneous.GetLatestFullSnapshotAndDeltaSnapList(ds)
		chekIfSnapsAreTheSame(fullSourceStoreSnapshot, fullTargetStoreSnapshot)
		Expect(len(deltaSrourceStoreSnapList)).To(Equal(len(deltaTargetStoreSnapList)))
		for i, ssnap := range deltaSrourceStoreSnapList {
			chekIfSnapsAreTheSame(ssnap, deltaSrourceStoreSnapList[i])
		}
	})
})

func chekIfSnapsAreTheSame(s1 *brtypes.Snapshot, s2 *brtypes.Snapshot) {
	// SnapName and Prefix could be different after the copy operation.
	logger.Logger.Infof("Comparing snaps: %v %v", s1, s2)
	Expect(*s1).To(MatchFields(IgnoreExtras, Fields{
		"Kind":              Equal(s2.Kind),
		"StartRevision":     Equal(s2.StartRevision),
		"LastRevision":      Equal(s2.LastRevision),
		"CreatedOn":         Equal(s2.CreatedOn),
		"SnapName":          Equal(s2.SnapName),
		"IsChunk":           Equal(s2.IsChunk),
		"CompressionSuffix": Equal(s2.CompressionSuffix),
	}))
}

repository: gardener/etcd-backup-restore

repo_name: gardener/etcd-backup-restore


text:
package nlife

import (
	"github.com/bububa/opentaobao/core"
	"github.com/bububa/opentaobao/model/nlife"
)

// AlibabaNlifeB2bTradeRefundList 获取采购退货单列表
// alibaba.nlife.b2b.trade.refund.list
//
// 获取采购退货单列表
func AlibabaNlifeB2bTradeRefundList(clt *core.SDKClient, req *nlife.AlibabaNlifeB2bTradeRefundListAPIRequest, session string) (*nlife.AlibabaNlifeB2bTradeRefundListAPIResponse, error) {
	var resp nlife.AlibabaNlifeB2bTradeRefundListAPIResponse
	err := clt.Post(req, &resp, session)
	if err != nil {
		return nil, err
	}
	return &resp, nil
}

repository: wp-jackliu/opentaobao

repo_name: wp-jackliu/opentaobao


text:
package middleware

//
//
//
//        ***************************     ***************************         *********      ************************
//      *****************************    ******************************      *********      *************************
//     *****************************     *******************************     *********     *************************
//    *********                         *********                *******    *********     *********
//    ********                          *********               ********    *********     ********
//   ********     ******************   *********  *********************    *********     *********
//   ********     *****************    *********  ********************     *********     ********
//  ********      ****************    *********     ****************      *********     *********
//  ********                          *********      ********             *********     ********
// *********                         *********         ******            *********     *********
// ******************************    *********          *******          *********     *************************
//  ****************************    *********            *******        *********      *************************
//    **************************    *********              ******       *********         *********************
//
//
import (
	"github.com/gin-gonic/gin"
	"github.com/satori/go.uuid"
	"strconv"
	"time"
)

type RequestIDOptions struct {
	AllowSetting bool
}

func RequestID(options RequestIDOptions) gin.HandlerFunc {
	return func(c *gin.Context) {
		var requestID string
		beginTime := strconv.FormatInt(time.Now().UnixNano(), 10)

		if options.AllowSetting {
			// If Set-Request-Id header is set on request, use that for
			// Request-Id response header. Otherwise, generate a new one.
			requestID = c.Request.Header.Get("Set-Request-Id")
		}

		if requestID == "" {
			s := uuid.NewV4()
			//if err != nil {
			//	zgh.ZLog().Error("message","uuid create  error","error",err.Error())
			//}
			requestID = s.String()
		}

		c.Writer.Header().Set("X-Begin-Time", beginTime)
		c.Writer.Header().Set("X-Request-Id", requestID)
		c.Next()
	}
}

repository: Ccheers/go-blog

repo_name: Ccheers/go-blog


text:
DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
SECTION = "network"
PRIORITY = "optional"
MAINTAINER = "Jose Bernardo Silva <jbs@bandos.homelinux.com> \
		Robert Anderson <rea@sr.unh.edu> \
		Stephan Zalewski <stephan.zalewski@uni-dusseldorf.de>"
LICENSE = "GPL"

SRC_URI = "http://download.berlios.de/gpsd/gpsd-${PV}.tar.gz \
	file://gpsd"

inherit autotools update-rc.d

INITSCRIPT_NAME = "gpsd"
INITSCRIPT_PARAMS = "defaults 35"

LDFLAGS = -lm

do_stage () {
        oe_libinstall -so -C ${S}/.libs libgps ${STAGING_LIBDIR}
        install -m 0655 ${S}/libgps.la ${STAGING_LIBDIR}
        install -m 0655 ${S}/gps.h ${STAGING_INCDIR}
        install -m 0655 ${S}/gpsd.h ${STAGING_INCDIR}
}

do_install_append () {
        install -d ${D}/${sysconfdir}/init.d
        install -d ${D}/dev
        install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
	ln -sf /dev/ttyS3 ${D}/dev/gps
}

FILES_gpsd =+ "/dev/gps ${sysconfdir}/inid.d/gpsd"
PACKAGES =+ "libgps"
FILES_libgps = "${libdir}"

repository: BackupTheBerlios/openslug-svn

repo_name: BackupTheBerlios/openslug-svn


text:
@Misc{TPC-W,
  author =	 {{Transaction Processing Performance Council}},
  key =		 {TPC-W},
  note =	 {\url{http://www.tpc.org/tpcw/}}
}

@INPROCEEDINGS{ali-eldin_2012,
  AUTHOR =	 "Ahmed Ali-Eldin and Johan Tordsson and Erik Elmroth",
  TITLE =	 "An adaptive hybrid elasticity controller for cloud
                  infrastructures",
  BOOKTITLE =	 "Proc.\ NOMS'12",
  PAGES =	 {204-212},
  YEAR =	 2012
}

@Misc{amazonEC2,
  author =	 {{Amazon Elastic Compute Cloud (EC2)}},
  key =		 {amazonEC2},
  url =		 {http://aws.amazon.com/ec2}
}

@Misc{appengine-project,
  author =	 {{AppEngine}},
  key =		 {AppEngine},
  note =	 {\url{http://appengine.google.com/}}
}

@article{appscale-2010,
  title =	 {AppScale: Scalable and Open AppEngine Application
                  Development and Deployment},
  volume =	 34,
  number =	 1,
  journal =	 {Cloud Computing},
  publisher =	 {Springer},
  author =	 {Chohan, Navraj and Bunch, Chris and Pang, Sydney and
                  Krintz, Chandra and Mostafa, Nagy and Soman, Sunil
                  and Wolski, Rich},
  editor =	 {Akan, Ozgur and Bellavista, Paolo and Cao, Jiannong
                  and Dressler, Falko and Ferrari, Domenico and Gerla,
                  Mario and Kobayashi, Hisashi and Palazzo, Sergio and
                  Sahni, Sartaj and Shen, Xuemin Sherman and et
                  al.Editors},
  year =	 2010,
  pages =	 {57--70}
}

@techreport{autoscaling_report,
  author =	 {Lorido-Botr{\'a}n, Tania and Miguel-Alonso, Jos{\'e}
                  and Lozano, Jose Antonio},
  abstract =	 {A review of proposals for auto-scaling applications
                  on elastic environments such as public clouds, with
                  focus on scalable web applications. },
  institution =	 {Department of Computer Architecture and Technology,
                  UPV/EHU},
  number =	 {EHU-KAT-IK},
  title =	 {{A}uto-scaling {T}echniques for {E}lastic
                  {A}pplications in {C}loud {E}nvironments},
  type =	 {Research},
  year =	 2012
}

@Misc{azure,
  author =	 {{Microsoft Windows- Windows Azure}},
  key =		 {azure},
  note =	 {\url{http://www.windowsazure.com/en-us}}
}

@Misc{azure-project,
  author =	 {{WindowsAzure}},
  key =		 {WindowsAzure},
  note =	 {\url{http://www.windowsazure.com/}}
}

@Misc{            beanstalk-project,
  author =	 {{ElasticBeanstalk}},
  key =		 {ElasticBeanstalk},
  note =	 {\url{http://aws.amazon.com/elasticbeanstalk/}}
}

@inproceedings{beloglazov_adaptive_2010,
  address =	 {New York, {NY}, {USA}},
  series =	 {{MGC} '10},
  title =	 {Adaptive threshold-based approach for
                  energy-efficient consolidation of virtual machines
                  in cloud data centers},
  isbn =	 {978-1-4503-0453-5},
  urldate =	 {2013-03-05},
  booktitle =	 {Proceedings of the 8th International Workshop on
                  Middleware for Grids, Clouds and e-Science},
  publisher =	 {{ACM}},
  author =	 {Beloglazov, Anton and Buyya, Rajkumar},
  year =	 2010,
  keywords =	 {cloud computing, green {IT}, {VM} placement},
  pages =	 {4:1--4:6}
}

@InProceedings{benchlab,
  author =	 {Emmanuel Cecchet and Veena Udayabhanu and Timothy
                  Wood and Prashant Shenoy},
  title =	 {{BenchLab}: An Open Testbed for Realistic
                  Benchmarking of Web Applications},
  booktitle =	 {Proceedings of 2nd USENIX Conference on Web
                  Application Development},
  year =	 2011,
  month =	 jun,
}

@INPROCEEDINGS{bunch_2012,
  AUTHOR =	 {Chris Bunch and Vaibhav Arora and Navraj Chohan and
                  Chandra Krintz and Shashank Hegde and Ankit
                  Srivastava},
  TITLE =	 {A Pluggable Autoscaling Service for Open Cloud
                  {PaaS} Systems},
  BOOKTITLE =	 {Proc.\ UCC},
  PAGES =	 {191-194},
  YEAR =	 2012
}

@article{chandra_dynamic_2003,
  title =	 {Dynamic resource allocation for shared data centers
                  using online measurements},
  volume =	 31,
  issn =	 {0163-5999},
  number =	 1,
  urldate =	 {2013-05-23},
  journal =	 {{SIGMETRICS} Perform. Eval. Rev.},
  author =	 {Chandra, Abhishek and Gong, Weibo and Shenoy,
                  Prashant},
  month =	 jun,
  year =	 2003,
  keywords =	 {adaptation, data centers, prediction, resource
                  allocation},
  pages =	 {300--301}
}

@Misc{            cloudfoundry-project,
  author =	 {{CloudFoundry}},
  key =		 {CloudFoundry},
  note =	 {\url{http://www.cloudfoundry.com}}
}

@Article{conpaasIC,
  author =	 {Guillaume Pierre and Corina Stratan},
  title =	 {{ConPaaS}: a Platform for Hosting Elastic Cloud
                  Applications},
  journal =	 {IEEE Internet Computing},
  year =	 2012,
  volume =	 16,
  number =	 5,
  pages =	 {88--92}
},

@Misc{das4,
  title =	 {{Advanced School for Computing and Imaging (ASCI),
                  The Distributed ASCI SuperComputer 4.}},
  key =		 {das4},
  url =		 {http://www.cs.vu.nl/das4/}
}

@article{dejavu2012,
  title =	 {{DejaVu:} accelerating resource allocation in
                  virtualized environments},
  volume =	 40,
  issn =	 {0163-5964},
  shorttitle =	 {{DejaVu}},
  number =	 1,
  urldate =	 {2012-10-12},
  journal =	 {{SIGARCH} Comput. Archit. News},
  author =	 {Vasi\'c, Nedeljko and Novakovi\'c, Dejan and
                  Miu\v{c}in, Svetozar and Kosti\'{c}, Dejan and
                  Bianchini, Ricardo},
  year =	 2012,
  pages =	 {423--436}
},

@inproceedings{do_profiling_2011,
  title =	 {Profiling Applications for Virtual Machine Placement
                  in Clouds},
  booktitle =	 {2011 {IEEE} International Conference on Cloud
                  Computing {(CLOUD)}},
  author =	 {Do, Anh Vu and Chen, Junliang and Wang, Chen and
                  Lee, Young Choon and Zomaya, {A.Y.} and Zhou, Bing
                  Bing},
  month =	 jul,
  year =	 2011,
  pages =	 {660--667}
},

@inproceedings{exponential_smoothing2010,
  title =	 {Online Self-Reconfiguration with Performance
                  Guarantee for Energy-Efficient Large-Scale Cloud
                  Computing Data Centers},
  booktitle =	 {Proc.\ intl.\ conf.\ on Services Computing},
  author =	 {Mi, Haibo and Wang, Huaimin and Yin, Gang and Zhou,
                  Yangfan and Shi, Dianxi and Yuan, Lin},
  month =	 jul,
  year =	 2010,
  pages =	 {514--521}
},

@article{gandhi_hybrid_2012,
  title =	 {Hybrid resource provisioning for minimizing data
                  center {SLA} violations and power consumption},
  volume =	 2,
  issn =	 {2210-5379},
  shorttitle =	 {{IEEE} International Green Computing Conference
                  ({IGCC} 2011)},
  number =	 2,
  urldate =	 {2013-03-05},
  journal =	 {Sustainable Computing: Informatics and Systems},
  author =	 {Gandhi, Anshul and Chen, Yuan and Gmach, Daniel and
                  Arlitt, Martin and Marwah, Manish},
  month =	 jun,
  year =	 2012,
  pages =	 {91--104}
},

@Misc{    ganglia,
  author =	 {{Ganglia monitoring system,}},
  key =		 {ganglia},
  url =		 {http://ganglia.sourceforge.net/}
}

@InProceedings{ghanbari_exploring_2011,
  author =	 {Hamoun Ghanbari and Bradley Simmons and Marin Litoiu
                  and Gabriel Iszlai},
  title =	 {Exploring Alternative Approaches to Implement an
                  Elasticity Policy},
  booktitle =	 {Proc.\ IEEE CLOUD},
  year =	 2011
},

@inproceedings{gong_gray-box_2010,
  title =	 {A Gray-Box Feedback Control Approach for
                  System-Level Peak Power Management},
  booktitle =	 {2010 39th International Conference on Parallel
                  Processing {(ICPP)}},
  author =	 {Gong, Jiayu and Xu, Cheng-Zhong},
  month =	 sep,
  year =	 2010,
  pages =	 {555--564}
}

@inproceedings{herbst_2013,
  author =	 {Herbst, Nikolas Roman and Huber, Nikolaus and
                  Kounev, Samuel and Amrehn, Erich},
  title =	 {Self-adaptive workload classification and
                  forecasting for proactive resource provisioning},
  booktitle =	 {Proc.\ Intl. Conference on Performance Engineering},
  year =	 2013,
  pages =	 {187--198}
}

@article{islam_empirical_2012,
  title =	 {Empirical prediction models for adaptive resource
                  provisioning in the cloud},
  volume =	 28,
  issn =	 {0167-{739X}},
  number =	 1,
  urldate =	 {2012-10-09},
  journal =	 {Future Gener. Comput. Syst.},
  author =	 {Islam, Sadeka and Keung, Jacky and Lee, Kevin and
                  Liu, Anna},
  month =	 jan,
  year =	 2012,
  pages =	 {155--162}
}

@PhdThesis{jiangThesis,
  AUTHOR =	 {Jiang Dejun},
  TITLE =	 {Performance Guarantees For {W}eb Applications},
  YEAR =	 2012,
  MONTH =	 {March},
  SCHOOL =	 {VU University Amsterdam}
}

@inproceedings{kaviani_profiling-as--service:_2011,
  title =	 {{Profiling-as-a-Service}: adaptive scalable resource
                  profiling for the cloud in the cloud},
  booktitle =	 {Proc.\ intl.\ conf.\ on Service-Oriented Computing},
  author =	 {Kaviani, Nima and Wohlstadter, Eric and Lea, Rodger},
  year =	 2011,
  pages =	 {157--171}
}

@Misc{            mediawiki,
  author =	 {{Wikipedia Foundation}},
  key =		 {mediawiki},
  note =	 {MediaWiki: a free software wiki
                  package. \url{http://www.mediawiki.org}}
}

@article{muppala_regression-based_2012,
  title =	 {Regression-based resource provisioning for session
                  slowdown guarantee in multi-tier Internet servers},
  volume =	 72,
  issn =	 {0743-7315},
  number =	 3,
  urldate =	 {2012-10-05},
  journal =	 {Journal of Parallel and Distributed Computing},
  author =	 {Muppala, Sireesha and Zhou, Xiaobo and Zhang,
                  Liqiang and Chen, Guihai},
  month =	 mar,
  year =	 2012,
  pages =	 {362--375}
}

@Misc{            opennebula,
  author =	 {{OpenNebula}},
  key =		 {OpenNebula},
  note =	 {\url{http://www.opennebula.org}}
}
}

@Misc{            openshift,
  author =	 {{OpenShift}},
  key =		 {openshift},
  note =	 {\url{https://openshift.redhat.com/app/flex}}
}

@article{outagesTimes,
  title =	 {Jackson Dies, almost takes Internet With Him},
  author =	 {Rawlinson, Linnie and Nick Hunt},
  journal =	 {CNN},
  month =	 {Jun},
  year =	 2009
}

@Misc{casestudiescloud,
author = {{Case studies of application hosting in AWS.}},
key = {caseStudiescloud},
note = {\url{http://aws.amazon.com/solutions/case-studies/}}
}

@Misc{            rackspace,
  author =	 {{Rackspace}},
  key =		 {rackspace},
  note =	 {\url{http://www.rackspace.com//}}
}

@Misc{            right-scale,
  author =	 {{RightScale}},
  key =		 {right-scale},
  note =	 {\url{http://www.rightscale.com/}}
}

@inproceedings{roy_2011,
  author =	 {Roy, Nilabja and Dubey, Abhishek and Gokhale,
                  Aniruddha and Dowdy, Larry},
  title =	 {A capacity planning process for performance
                  assurance of component-based distributed systems},
  booktitle =	 {Proc.\ Intl.\ Conf.\ on Performance Engineering},
  year =	 2011,
  pages =	 {259--270}
}

@inproceedings{roy_efficient_2011,
  title =	 {Efficient Autoscaling in the Cloud Using Predictive
                  Models for Workload Forecasting},
  booktitle =	 {Proc.\ CLOUD},
  author =	 {Roy, N. and Dubey, A. and Gokhale, A.},
  month =	 jul,
  year = 	 2011,
  pages =	 {500--507}
}

@inproceedings{sharma_cost-aware_2011,
  title =	 {A Cost-Aware Elasticity Provisioning System for the
                  Cloud},
  booktitle =	 {Proc.\ ICDCS},
  author =	 {Sharma, U. and Shenoy, P. and Sahu, S. and Shaikh,
                  A.},
  year =	 2011,
  pages =	 {559 --570}
}

@inproceedings{singh_autonomic_2010,
  address =	 {New York, {NY}, {USA}},
  series =	 {{ICAC} '10},
  title =	 {Autonomic mix-aware provisioning for non-stationary
                  data center workloads},
  isbn =	 {978-1-4503-0074-2},
  urldate =	 {2012-12-07},
  booktitle =	 {Proceedings of the 7th international conference on
                  Autonomic computing},
  publisher =	 {{ACM}},
  author =	 {Singh, Rahul and Sharma, Upendra and Cecchet,
                  Emmanuel and Shenoy, Prashant},
  year =	 2010,
  pages =	 {21--30}
}

@INPROCEEDINGS{smartscale_2012,
  AUTHOR =	 "Sourav Dutta and Sankalp Gera and Akshat Verma and
                  Balaji Viswanathan",
  TITLE =	 "SmartScale: Automatic Application Scaling in
                  Enterprise Clouds",
  BOOKTITLE =	 "Proc.\ IEEE CLOUD",
  PAGES =	 {221-228},
  YEAR =	 2012
}

@article{sotomayor_virtual_2009,
  title =	 {Virtual Infrastructure Management in Private and
                  Hybrid Clouds},
  volume =	 13,
  issn =	 {1089-7801},
  number =	 5,
  journal =	 {{IEEE} Internet Computing},
  author =	 {Sotomayor, B. and Montero, {R.S.} and Llorente,
                  {I.M.} and Foster, I.},
  month =	 oct,
  year =	 2009,
  pages =	 {14--22}
}

@inproceedings{trafficCongestion,
  author =	 {Baryshnikov, Yuliy and Coffman, Ed and Pierre,
                  Guillaume and Rubenstein, Dan and Squillante, Mark
                  and Yimwadsana, Teddy},
  title =	 {Predictability of Web-Server Traffic Congestion},
  booktitle =	 {Proc.\ in.\ WCW},
  year =	 2005,
  pages =	 {97--103}
}

@Article{urdaneta2009,
  author =	 {Guido Urdaneta and Guillaume Pierre and Maarten van
                  Steen},
  title =	 {Wikipedia Workload Analysis for Decentralized
                  Hosting},
  volume =	 53,
  number =	 11,
  pages =	 {1830-1845},
  month =	 {July},
  year =	 2009,
  journal =	 {Elsevier Computer Networks}
}

@article{urgaonkar_agile_2008,
  title =	 {Agile dynamic provisioning of multi-tier Internet
                  applications},
  volume =	 3,
  issn =	 {1556-4665},
  number =	 1,
  urldate =	 {2012-10-05},
  journal =	 {{ACM} Trans. Auton. Adapt. Syst.},
  author =	 {Urgaonkar, Bhuvan and Shenoy, Prashant and Chandra,
                  Abhishek and Goyal, Pawan and Wood, Timothy},
  month =	 mar,
  year =	 2008,
  keywords =	 {dynamic provisioning, Internet application},
  pages =	 {1--39}
}

@article{urgaonkar_cataclysm:_2008,
  title =	 {Cataclysm: Scalable overload policing for internet
                  applications},
  volume =	 31,
  issn =	 {1084-8045},
  shorttitle =	 {Cataclysm},
  number =	 4,
  urldate =	 {2012-11-06},
  journal =	 {Journal of Network and Computer Applications},
  author =	 {Urgaonkar, Bhuvan and Shenoy, Prashant},
  month =	 nov,
  year =	 2008,
  pages =	 {891--920}
}

@incollection{vector_autoregression_2006,
  year =	 2006,
  isbn =	 {978-0-387-27965-7},
  booktitle =	 {Modeling Financial Time Series with S-PLUS},
  title =	 {Vector Autoregressive Models for Multivariate Time
                  Series},
  publisher =	 {Springer New York},
  pages =	 {385--429}
}

@article{wang_appraise:_2009,
  title =	 {{AppRAISE:} application-level performance management
                  in virtualized server environments},
  volume =	 6,
  issn =	 {1932-4537},
  shorttitle =	 {{AppRAISE}},
  number =	 4,
  journal =	 {{IEEE} Transactions on Network and Service
                  Management},
  author =	 {Wang, Zhikui and Chen, Yuan and Gmach, D. and
                  Singhal, S. and Watson, {B.J.} and Rivera, W. and
                  Zhu, Xiaoyun and Hyser, {C.D.}},
  month =	 dec,
  year =	 2009,
  pages =	 {240--254}
}

@MastersThesis{wikibench,
  author =	 {van Baaren, Erik-Jan},
  title =	 {Wikibench: A distributed, wikipedia based web
                  application benchmark},
  school =	 {VU Amsterdam},
  year =	 2009
}

@article{wolski_network_1999,
  title =	 {The Network Weather Service: A Distributed Resource
                  Performance Forecasting Service for Metacomputing},
  volume =	 15,
  shorttitle =	 {The Network Weather Service},
  journal =	 {Journal of Future Generation Computing Systems},
  author =	 {Wolski, Rich and Spring, Neil T. and Hayes, Jim},
  year =	 1999,
  pages =	 {757--768}
}

@inproceedings{zhang_resilient_2009,
  address =	 {New York, {NY}, {USA}},
  series =	 {{ICAC} '09},
  title =	 {Resilient workload manager: taming bursty workload
                  of scaling internet applications},
  isbn =	 {978-1-60558-564-2},
  shorttitle =	 {Resilient workload manager},
  urldate =	 {2012-11-06},
  booktitle =	 {Proceedings of the 6th international conference on
                  Autonomic computing},
  publisher =	 {{ACM}},
  author =	 {Zhang, Hui and Jiang, Guofei and Yoshihira, Kenji
                  and Chen, Haifeng and Saxena, Akhilesh},
  year =	 2009,
  pages =	 {45--46}
},

@article{jorgensen_experience_1995,
	title = {Experience with the accuracy of software maintenance task effort prediction models},
	volume = {21},
	issn = {0098-5589},
	number = {8},
	journal = {{IEEE} Transactions on Software Engineering},
	author = {Jorgensen, M.},
	year = {1995},
	pages = {674--681}
}

@InProceedings{ec2Performance,
  author = 	 {Jiang Dejun and Guillaume Pierre and Chi-Hung Chi},
  title = 	 {{EC2} Performance Analysis for Resource Provisioning
                  of Service-Oriented Applications},
  booktitle = 	 {Proc.\ 3rd Workshop on Non-Functional Properties and
                  SLA Management in Service-Oriented Computing},
  year = 	 {2009}
}

@Misc{rubbos,
  author =	 {{The Object Web Consortium. RuBBoS: Bulletin Board Benchmark}},
  key =		 {rubbos},
  url =		 {http://jmob.ow2.org/rubbos.html}
}

@inproceedings{rubis,
	address = {Stevens Point, Wisconsin, {USA}},
	series = {{ICCOMP'08}},
	title = {Specification and implementation of dynamic web site benchmark in telecommunication area},
	isbn = {978-960-6766-85-5},
	urldate = {2013-07-26},
	booktitle = {Proceedings of the 12th {WSEAS} international conference on Computers},
	publisher = {World Scientific and Engineering Academy and Society ({WSEAS)}},
	author = {Sarhan, Ebada and Ghalwash, Atif and Khafagy, Mohamed},
	year = {2008},
	pages = {863–867}
}

repository: ConPaaS-team/conpaas

repo_name: ConPaaS-team/conpaas

gha_language: Python


text:
% !Mode:: "TeX:UTF-8"

@onlynote{1,
	note = "薛良金.毫米波工程基础[M].北京:国防工业出版社，1998，5-8",
}

@onlynote{2,
note = "刘成帅.Ka波段宽带功率合成放大器的研究[D].成都：电子科技大学，2014",
}

@onlynote{3,
	note = "薛良金.毫米波工程.哈尔滨：哈尔滨工业大学出版社，2004，3-12",
}

@onlynote{4,
	note = "邹涌泉，甘体国.Ka波段低噪声放大器的研制.电讯技术.2001(1): 29~30   ",
}
@onlynote{5,
	note = "王闯，钱蓉，孙晓玮.毫米波单片集成低噪声放大器电路.高技术通讯.2007年1月第17卷 第1期",
}
@onlynote{6,
	note = "ColinS. Whelan,  PhilF.Marsh, WilliamE. Hoke, etal, Millimeter-Wave Low-Noise and High Power Metamorphic HEMT Amplifiers and Devices on GaAs Substrates. IEEE Journal of Solid-State Circuits, SeP. 2000, Vo1.35, No.9: 1307~1311",
}
@onlynote{7,
	note = "Jonathan B Hacker, Joshua Bergman，etal. An ultra-low Power InAs/AISb HEMT Ka-band low-noise amplifier. IEEE Microwave and Wireless Components Letters，Vo1.14，No.4，April 2004
}
@onlynote{8,
	note = "Paul J.Riemer，Benjamin R.Buhrow，etal. Ka-Band(35 GHz)3-Stage Site HBT Low Noise Amplifier. 2005 IEEE: 1037~1040",
}
@onlynote{9,
	note = "陈邦媛.射频通信电路[M]：北京:科学出版社，2006，162-163",
}
@onlynote{10,
	note = "张冬雪.L波段低噪声放大器的研究[D].重庆：重庆大学，2008",
}
@onlynote{11,
	note = "K. Shirakawa，S. Ishibashi，Y. Kobayashi，F. Takeda.A New Planar Inductor with Ring-Connected Magnetic Core[J].IEEETrans.Magnetics.1990，26(5):2268-2270.",
}
@onlynote{12,
	note = "严兰芳.C波段LNA的设计[D].成都：电子科技大学，2010",
}
@onlynote{13,
	note = "Beom Kyu Ko. A New Simultaneous Noise and Input Power Matching Technique for Monolithic LNA's Using Cascode Feedback. IEEE Transactions on Microwave Theory and Techniques [J].Vol.45.No.9.Sept. 1997.P1627~1630.",
}
@onlynote{14,
	note = "顾继慧.微波技术.北京:科学出版社，2008",
}
@onlynote{15,
	note = "徐玺年.毫米波超低噪声放大器的研究与设计[D].成都：电子科技大学，2013",
}

repository: xuanyuwang/bachelorgraduatethesis

path: /latex - zxy/contents/reference.bib

repo_name: xuanyuwang/bachelorgraduatethesis


text:
FILESEXTRAPATHS_prepend := "${THISDIR}/../../../meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto:"

inherit distutils3
require ../../../meta-openembedded/meta-python/recipes-devtools/python/python-pycrypto.inc

SRC_URI += "file://cross-compiling.patch \
            file://CVE-2013-7459.patch \
           "

# We explicitly call distutils_do_install, since we want it to run, but
# *don't* want the autotools install to run, since this package doesn't
# provide a "make install" target.
do_install() {
       distutils3_do_install
}