text:
// Copyright 2021 Saferwall. All rights reserved.
// Use of this source code is governed by Apache v2 license
// license that can be found in the LICENSE file.

package pe

import (
	"encoding/binary"
	"log"
)

const (
	maxAllowedEntries = 0x1000
)

var (
	depth = 0
)

// Predefined Resource Types.
var (
	RTCursor       = 1
	RTBitmap       = 2
	RTIcon         = 3
	RTMenu         = 4
	RTDialog       = 5
	RTString       = 6
	RTFontdir      = 7
	RTFont         = 8
	RTAccelerator  = 9
	RTRCdata       = 10
	RTMessagetable = 11
	RTGroupCursor  = 12
	RTGroupIcon    = 14
	RTVersion      = 16
	RTDlgInclude   = 17
	RTPlugPlay     = 19
	RTVxd          = 20
	RTAniCursor    = 21
	RTAniIcon      = 22
	RTHtml         = 23
	RTManifest     = 24
)

// ImageResourceDirectory represents the IMAGE_RESOURCE_DIRECTORY.
// This data structure should be considered the heading of a table because the
// table actually consists of directory entries.
type ImageResourceDirectory struct {
	// Resource flags. This field is reserved for future use. It is currently
	// set to zero.
	Characteristics uint32

	// The time that the resource data was created by the resource compiler.
	TimeDateStamp uint32

	// The major version number, set by the user.
	MajorVersion uint16

	// The minor version number, set by the user.
	MinorVersion uint16

	// The number of directory entries immediately following the table that use
	// strings to identify Type, Name, or Language entries (depending on the
	// level of the table).
	NumberOfNamedEntries uint16

	// The number of directory entries immediately following the Name entries
	// that use numeric IDs for Type, Name, or Language entries.
	NumberOfIDEntries uint16
}

// ImageResourceDirectoryEntry represents an entry in the resource directory
// entries.
type ImageResourceDirectoryEntry struct {
	// is used to identify either a type of resource, a resource name, or a
	// resource's language ID.
	Name uint32

	//is always used to point to a sibling in the tree, either a directory node
	// or a leaf node.
	OffsetToData uint32
}

// ImageResourceDataEntry Each Resource Data entry describes an actual unit of
// raw data in the Resource Data area.
type ImageResourceDataEntry struct {
	// The address of a unit of resource data in the Resource Data area.
	OffsetToData uint32

	// The size, in bytes, of the resource data that is pointed to by the Data
	// RVA field.
	Size uint32

	// The code page that is used to decode code point values within the
	// resource data. Typically, the code page would be the Unicode code page.
	CodePage uint32

	// Reserved, must be 0.
	Reserved uint32
}

// ResourceDirectory represents resource directory information.
type ResourceDirectory struct {
	// IMAGE_RESOURCE_DIRECTORY structure
	Struct ImageResourceDirectory

	// list of entries
	Entries []ResourceDirectoryEntry
}

// ResourceDirectoryEntry represents a resource directory entry.
type ResourceDirectoryEntry struct {
	// IMAGE_RESOURCE_DIRECTORY_ENTRY structure.
	Struct ImageResourceDirectoryEntry

	// If the resource is identified by name this attribute will contain the
	// name string. Empty string otherwise. If identified by id, the id is
	// available at .Id field.
	Name string

	// The resource identifier.
	ID uint32

	// If this entry has a lower level directory this attribute will point to
	// the ResourceDirData instance representing it.
	Directory ResourceDirectory

	// If this entry has no further lower directories and points to the actual
	// resource data, this attribute will reference the corresponding
	// ResourceDataEntry instance.
	Data ResourceDataEntry
}

// ResourceDataEntry represents a resource data entry.
type ResourceDataEntry struct {

	// IMAGE_RESOURCE_DATA_ENTRY structure.
	Struct ImageResourceDataEntry

	// Primary language ID
	Lang    uint32
	Sublang uint32 // Sublanguage ID
}

func (pe *File) parseResourceDataEntry(rva uint32) *ImageResourceDataEntry {
	dataEntry := ImageResourceDataEntry{}
	dataEntrySize := uint32(binary.Size(dataEntry))
	offset := pe.getOffsetFromRva(rva)
	err := pe.structUnpack(&dataEntry, offset, dataEntrySize)
	if err != nil {
		log.Println("Error parsing a resource directory data entry, the RVA is invalid")
		return nil
	}
	return &dataEntry
}

func (pe *File) parseResourceDirectoryEntry(rva uint32) *ImageResourceDirectoryEntry {
	resource := ImageResourceDirectoryEntry{}
	resourceSize := uint32(binary.Size(resource))
	offset := pe.getOffsetFromRva(rva)
	err := pe.structUnpack(&resource, offset, resourceSize)
	if err != nil {
		return nil
	}

	if resource == (ImageResourceDirectoryEntry{}) {
		return nil
	}

	// resource.NameOffset = resource.Name & 0x7FFFFFFF

	// resource.__pad = resource.Name & 0xFFFF0000
	// resource.Id = resource.Name & 0x0000FFFF
	//fmt.Println(resource.Name, resource.Name & 0x0000FFFF)
	// resource.DataIsDirectory = (resource.OffsetToData & 0x80000000) >> 31
	// resource.OffsetToDirectory = resource.OffsetToData & 0x7FFFFFFF

	return &resource
}

// Navigating the resource directory hierarchy is like navigating a hard disk.
// There's a master directory (the root directory), which has subdirectories.
// The subdirectories have subdirectories of their own that may point to the
// raw resource data for things like dialog templates.
func (pe *File) doParseResourceDirectory(rva, size, baseRVA, level uint32,
	dirs []uint32) (ResourceDirectory, error) {

	resourceDir := ImageResourceDirectory{}
	resourceDirSize := uint32(binary.Size(resourceDir))
	offset := pe.getOffsetFromRva(rva)
	err := pe.structUnpack(&resourceDir, offset, resourceDirSize)
	if err != nil {
		return ResourceDirectory{}, err
	}

	if baseRVA == 0 {
		baseRVA = rva
	}

	if len(dirs) == 0 {
		dirs = append(dirs, rva)
	}

	// Advance the RVA to the position immediately following the directory
	// table header and pointing to the first entry in the table.
	rva += resourceDirSize

	numberOfEntries := int(resourceDir.NumberOfNamedEntries +
		resourceDir.NumberOfIDEntries)
	var dirEntries []ResourceDirectoryEntry

	// Set a hard limit on the maximum reasonable number of entries.
	if numberOfEntries > maxAllowedEntries {
		log.Printf(`Error parsing the resources directory.
		 The directory contains %d entries`, numberOfEntries)
		return ResourceDirectory{}, nil
	}

	for i := 0; i < numberOfEntries; i++ {
		res := pe.parseResourceDirectoryEntry(rva)
		if res == nil {
			log.Println("Error parsing a resource directory entry, the RVA is invalid")
			break
		}

		nameIsString := (res.Name & 0x80000000) >> 31
		entryName := ""
		entryID := uint32(0)
		if nameIsString == 0 {
			entryID = res.Name
		} else {
			nameOffset := res.Name & 0x7FFFFFFF
			uStringOffset := pe.getOffsetFromRva(baseRVA + nameOffset)
			maxLen, err := pe.ReadUint16(uStringOffset)
			if err != nil {
				break
			}
			entryName = pe.readUnicodeStringAtRVA(baseRVA+nameOffset+2,
				uint32(maxLen))
		}

		// A directory entry points to either another resource directory or to
		// the data for an individual resource. When the directory entry points
		// to another resource directory, the high bit of the second DWORD in
		// the structure is set and the remaining 31 bits are an offset to the
		// resource directory.
		dataIsDirectory := (res.OffsetToData & 0x80000000) >> 31

		// The offset is relative to the beginning of the resource section,
		// not an RVA.
		OffsetToDirectory := res.OffsetToData & 0x7FFFFFFF
		if dataIsDirectory > 0 {
			// One trick malware can do is to recursively reference
			// the next directory. This causes hilarity to ensue when
			// trying to parse everything correctly.
			// If the original RVA given to this function is equal to
			// the next one to parse, we assume that it's a trick.
			// Instead of raising a PEFormatError this would skip some
			// reasonable data so we just break.
			// 9ee4d0a0caf095314fd7041a3e4404dc is the offending sample.
			if intInSlice(baseRVA+OffsetToDirectory, dirs) {
				break
			}

			level++
			dirs = append(dirs, baseRVA+OffsetToDirectory)
			directoryEntry, _ := pe.doParseResourceDirectory(
				baseRVA+OffsetToDirectory,
				size-(rva-baseRVA),
				baseRVA,
				level,
				dirs)

			dirEntries = append(dirEntries, ResourceDirectoryEntry{
				Struct:    *res,
				Name:      entryName,
				ID:        entryID,
				Directory: directoryEntry})
		} else {
			// data is entry
			dataEntryStruct := pe.parseResourceDataEntry(baseRVA +
				OffsetToDirectory)
			entryData := ResourceDataEntry{
				Struct:  *dataEntryStruct,
				Lang:    res.Name & 0x3ff,
				Sublang: res.Name >> 10,
			}

			dirEntries = append(dirEntries, ResourceDirectoryEntry{
				Struct: *res,
				Name:   entryName,
				ID:     entryID,
				Data:   entryData})
		}

		rva += uint32(binary.Size(res))
	}

	return ResourceDirectory{
		Struct:  resourceDir,
		Entries: dirEntries,
	}, nil
}

// The resource directory contains resources like dialog templates, icons,
// and bitmaps. The resources are found in a section called .rsrc section.
func (pe *File) parseResourceDirectory(rva, size uint32) error {
	var dirs []uint32
	Resources, err := pe.doParseResourceDirectory(rva, size, 0, 0, dirs)
	pe.Resources = &Resources
	return err
}

repository: wanglei-coder/pescan

repo_name: wanglei-coder/pescan


text:
package upstream

import (
	"context"

	"github.com/uber-go/tally"

	v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
	clusterservice "github.com/envoyproxy/go-control-plane/envoy/service/cluster/v3"
	discoveryv3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
	endpointservice "github.com/envoyproxy/go-control-plane/envoy/service/endpoint/v3"
	listenerservice "github.com/envoyproxy/go-control-plane/envoy/service/listener/v3"
	routeservice "github.com/envoyproxy/go-control-plane/envoy/service/route/v3"
	"github.com/envoyproxy/xds-relay/internal/pkg/log"
)

// NewMockClient creates a mock implementation for testing
func NewMockClient(
	ctx context.Context,
	ldsClient v2.ListenerDiscoveryServiceClient,
	rdsClient v2.RouteDiscoveryServiceClient,
	edsClient v2.EndpointDiscoveryServiceClient,
	cdsClient v2.ClusterDiscoveryServiceClient,
	callOptions CallOptions,
	scope tally.Scope) Client {
	return &client{
		ldsClient:   ldsClient,
		rdsClient:   rdsClient,
		edsClient:   edsClient,
		cdsClient:   cdsClient,
		callOptions: callOptions,
		logger:      log.MockLogger,
		scope:       scope,
		shutdown:    make(<-chan struct{}),
	}
}

// NewMockClientV3 creates a mock implementation for testing
func NewMockClientV3(
	ctx context.Context,
	ldsClient listenerservice.ListenerDiscoveryServiceClient,
	rdsClient routeservice.RouteDiscoveryServiceClient,
	edsClient endpointservice.EndpointDiscoveryServiceClient,
	cdsClient clusterservice.ClusterDiscoveryServiceClient,
	callOptions CallOptions,
	scope tally.Scope) Client {
	return &client{
		ldsClientV3: ldsClient,
		rdsClientV3: rdsClient,
		edsClientV3: edsClient,
		cdsClientV3: cdsClient,
		callOptions: callOptions,
		logger:      log.MockLogger,
		scope:       scope,
		shutdown:    make(<-chan struct{}),
	}
}

// NewMockClientEDS creates a mock implementation for testing both v2 and v3 eds together
func NewMockClientEDS(
	ctx context.Context,
	edsClientV3 endpointservice.EndpointDiscoveryServiceClient,
	edsClientV2 v2.EndpointDiscoveryServiceClient,
	callOptions CallOptions,
	scope tally.Scope) Client {
	return &client{
		edsClient:   edsClientV2,
		edsClientV3: edsClientV3,
		callOptions: callOptions,
		logger:      log.MockLogger,
		scope:       scope,
		shutdown:    make(<-chan struct{}),
	}
}

// NewMock creates a mock client implementation for testing
func NewMock(
	ctx context.Context,
	callOptions CallOptions,
	errorOnCreate []error,
	ldsReceiveChan chan *v2.DiscoveryResponse,
	rdsReceiveChan chan *v2.DiscoveryResponse,
	edsReceiveChan chan *v2.DiscoveryResponse,
	cdsReceiveChan chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error,
	scope tally.Scope) Client {
	return NewMockClient(
		ctx,
		createMockLdsClient(errorOnCreate, ldsReceiveChan, sendCb),
		createMockRdsClient(errorOnCreate, rdsReceiveChan, sendCb),
		createMockEdsClient(errorOnCreate, edsReceiveChan, sendCb),
		createMockCdsClient(errorOnCreate, cdsReceiveChan, sendCb),
		callOptions,
		scope,
	)
}

// NewMockV3 creates a mock client implementation for testing
func NewMockV3(
	ctx context.Context,
	callOptions CallOptions,
	errorOnCreate []error,
	ldsReceiveChan chan *discoveryv3.DiscoveryResponse,
	rdsReceiveChan chan *discoveryv3.DiscoveryResponse,
	edsReceiveChan chan *discoveryv3.DiscoveryResponse,
	cdsReceiveChan chan *discoveryv3.DiscoveryResponse,
	sendCb func(m interface{}) error,
	scope tally.Scope) Client {
	return NewMockClientV3(
		ctx,
		createMockLdsClientV3(errorOnCreate, ldsReceiveChan, sendCb),
		createMockRdsClientV3(errorOnCreate, rdsReceiveChan, sendCb),
		createMockEdsClientV3(errorOnCreate, edsReceiveChan, sendCb),
		createMockCdsClientV3(errorOnCreate, cdsReceiveChan, sendCb),
		callOptions,
		scope,
	)
}

// NewMockEDS creates a mock client implementation for testing v2 and v3 eds together
func NewMockEDS(
	ctx context.Context,
	callOptions CallOptions,
	errorOnCreate []error,
	edsReceiveChanV3 chan *discoveryv3.DiscoveryResponse,
	edsReceiveChanV2 chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error,
	scope tally.Scope) Client {
	return NewMockClientEDS(
		ctx,
		createMockEdsClientV3(errorOnCreate, edsReceiveChanV3, sendCb),
		createMockEdsClient(errorOnCreate, edsReceiveChanV2, sendCb),
		callOptions,
		scope,
	)
}

func createMockLdsClient(
	errorOnCreate []error,
	receiveChan chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error) v2.ListenerDiscoveryServiceClient {
	return &mockClient{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockLdsClientV3(
	errorOnCreate []error,
	receiveChan chan *discoveryv3.DiscoveryResponse,
	sendCb func(m interface{}) error) listenerservice.ListenerDiscoveryServiceClient {
	return &mockClientV3{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockCdsClient(
	errorOnCreate []error,
	receiveChan chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error) v2.ClusterDiscoveryServiceClient {
	return &mockClient{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockCdsClientV3(
	errorOnCreate []error,
	receiveChan chan *discoveryv3.DiscoveryResponse,
	sendCb func(m interface{}) error) clusterservice.ClusterDiscoveryServiceClient {
	return &mockClientV3{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockRdsClient(
	errorOnCreate []error,
	receiveChan chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error) v2.RouteDiscoveryServiceClient {
	return &mockClient{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockRdsClientV3(
	errorOnCreate []error,
	receiveChan chan *discoveryv3.DiscoveryResponse,
	sendCb func(m interface{}) error) routeservice.RouteDiscoveryServiceClient {
	return &mockClientV3{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockEdsClient(
	errorOnCreate []error,
	receiveChan chan *v2.DiscoveryResponse,
	sendCb func(m interface{}) error) v2.EndpointDiscoveryServiceClient {
	return &mockClient{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

func createMockEdsClientV3(
	errorOnCreate []error,
	receiveChan chan *discoveryv3.DiscoveryResponse,
	sendCb func(m interface{}) error) endpointservice.EndpointDiscoveryServiceClient {
	return &mockClientV3{errorOnStreamCreate: errorOnCreate, receiveChan: receiveChan, sendCb: sendCb}
}

repository: envoyproxy/xds-relay

license_type: permissive

repo_name: envoyproxy/xds-relay

branch_name: refs/heads/main

gha_language: Go

extension: go


text:
// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package bookmarks

import "strconv"

type Status byte

const (
	StatusOnline       Status = 1
	StatusOffline      Status = 2
	StatusUnAccessAble Status = 4
)

var EnumNamesStatus = map[Status]string{
	StatusOnline:       "Online",
	StatusOffline:      "Offline",
	StatusUnAccessAble: "UnAccessAble",
}

var EnumValuesStatus = map[string]Status{
	"Online":       StatusOnline,
	"Offline":      StatusOffline,
	"UnAccessAble": StatusUnAccessAble,
}

func (v Status) String() string {
	if s, ok := EnumNamesStatus[v]; ok {
		return s
	}
	return "Status(" + strconv.FormatInt(int64(v), 10) + ")"
}

license: MIT

repository: tsingson/grpc-flatbuffers

repo_name: tsingson/grpc-flatbuffers

branch_name: refs/heads/master


text:
DESCRIPTION = "GeographicLib is a small set of C++ classes for performing conversions between geographic, UTM, UPS, MGRS, geocentric, and local cartesian coordinates, for gravity (e.g., EGM2008), geoid height, and geomagnetic field (e.g., WMM2010) calculations, and for solving geodesic problems."
SECTION = "devel"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=beda1cf298e14fa7de56a07a83308905"

DEPENDS = ""

SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/distrib/GeographicLib-${PV}.tar.gz"
SRC_URI[md5sum] = "e99153cf41bf64998cc4f91c00aea167"
SRC_URI[sha256sum] = "7203d56123b6f6fb31842295d57b2418f79fb0db9a06f2f65ee9e415c6f0cb70"

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

inherit cmake

repository: herb-kuta-lge/meta-ros

repo_name: herb-kuta-lge/meta-ros

branch_name: refs/heads/master-draft

gha_license_id: MIT

gha_language: BitBake

extension: bb


text:
@article{Bottou:2018cv,
author = {Bottou, L{\'e}on and Curtis, Frank E. and Nocedal, Jorge},
title = {{Optimization Methods for Large-Scale Machine Learning}},
journal = {SIAM Review},
year = {2018},
volume = {60},
number = {2},
pages = {223--311},
month = may
}

repository: Linyxus/YaDNS

repo_name: Linyxus/YaDNS

extension: bib


text:
# - Try to find Proteowizard packages
# Once done this will define
#
# This module defines
# PROTEOWIZARD_INCLUDE_DIR, where to find xercesc.h, etc.
# PROTEOWIZARD_LIBRARIES, the libraries to link against to use xercesc.
# PROTEOWIZARD_FOUND, If false, don't try to use xercesc.

function(_pwiz_find_library _name)
    find_library(${_name} NAMES ${ARGN})
    mark_as_advanced(${_name})
endfunction()

FIND_PATH(PWIZ_INCLUDE_DIR pwiz )

MESSAGE( STATUS "Found pwiz include directory: ${PWIZ_INCLUDE_DIR}" )

_pwiz_find_library(PWIZ_DATA_MSDATA_LIBRARY pwiz_data_msdata)
_pwiz_find_library(PWIZ_DATA_COMMON_LIBRARY pwiz_data_common)
_pwiz_find_library(PWIZ_UTILITY_MISC_LIBRARY pwiz_utility_misc)
_pwiz_find_library(PWIZ_UTILITY_MINIXML_LIBRARY pwiz_utility_minimxml)
_pwiz_find_library(PWIZ_DATA_MSDATA_VERSION_LIBRARY pwiz_data_msdata_version)
_pwiz_find_library(PWIZ_SHA1_LIBRARY SHA1)

set(PWIZ_LIBRARIES "")
list(APPEND PWIZ_LIBRARIES ${PWIZ_DATA_MSDATA_LIBRARY} ${PWIZ_DATA_COMMON_LIBRARY} ${PWIZ_UTILITY_MISC_LIBRARY} ${PWIZ_UTILITY_MINIXML_LIBRARY} ${PWIZ_DATA_MSDATA_VERSION_LIBRARY} ${PWIZ_SHA1_LIBRARY})

# if the include and the library are found then we have it
if (PWIZ_INCLUDE_DIR AND PWIZ_LIBRARIES)
  SET( PWIZ_FOUND 1 )
endif()

MARK_AS_ADVANCED(
  PWIZ_INCLUDE_DIR
  PWIZ_LIBRARIES
)

repository: jgriss/maracluster

repo_name: jgriss/maracluster

extension: cmake


text:
DESCRIPTION = "ZeroMQ looks like an embeddable networking library but acts like a concurrency framework"
HOMEPAGE = "http://www.zeromq.org"
LICENSE = "LGPLv3+"
LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=d5311495d952062e0e4fbba39cbf3de1"

PACKAGECONFIG ??= "libsodium"
PACKAGECONFIG[libsodium] = "--with-libsodium, --without-libsodium, libsodium"

SRC_URI = "http://github.com/zeromq/zeromq4-1/releases/download/v${PV}/zeromq-${PV}.tar.gz \
    file://run-ptest \
"
SRC_URI[md5sum] = "e7adf4b7dbae09b28cfd10d26cd67fac"
SRC_URI[sha256sum] = "04aac57f081ffa3a2ee5ed04887be9e205df3a7ddade0027460b8042432bdbcf"

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

#Uncomment to choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select
#EXTRA_OECONF += "--with-poller=kqueue"
#CFLAGS_append = " -O0"
#CXXFLAGS_append = " -O0"

inherit autotools ptest pkgconfig

do_compile_ptest () {
    echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${B}/Makefile
    oe_runmake buildtest-TESTS
}

do_install_ptest () {
    install -d ${D}${PTEST_PATH}/tests
    install -m 0755 ${B}/.libs/test_* ${D}${PTEST_PATH}/tests
}


text:
###########
## GTEST GMOCK
###########

function(func_load_gtest_gmock_from_github)

  # If func_load_gtest_gmock_from_github was called, and you want to change between shared and static libraries... then:
  # Be sure to clean entire build directory, when changing between the following:
  #   cmake -DBUILD_SHARED_LIBS=ON
  #   cmake -DBUILD_SHARED_LIBS=OFF
  # Reason: func_load_gtest_gmock_from_github creates
  #         googletest_with_googlemock/src/gtest_gmock-build/googlemock/libgmock.a  for static libs
  #         googletest_with_googlemock/src/gtest_gmock-build/googlemock/libgmock.so for shared libs
  # Both shared and static will exist, and you will NOT know which one gets chosen with: target_link_libraries(${target} gmock)

  include(ExternalProject)
  ExternalProject_Add(gtest_gmock
    GIT_REPOSITORY https://github.com/google/googletest.git
    GIT_TAG master # Git branch name, commit id or tag
    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/googletest_with_googlemock
    CMAKE_ARGS
            -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}   ## same as master project
            -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} ## same as master project
            -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
    PATCH_COMMAND          "${CMAKE_COMMAND}" "-E" "echo" "cmake_minimum_required(VERSION 3.2)" >   CMakeLists.txt
                   COMMAND "${CMAKE_COMMAND}" "-E" "echo" "add_subdirectory(googlemock)"        >>  CMakeLists.txt # next line
    INSTALL_COMMAND ""
    )

  ExternalProject_Get_Property(gtest_gmock
    SOURCE_DIR
    BINARY_DIR)

  set(ENV{GMOCK_INCLUDE} ${SOURCE_DIR}/googlemock/include PARENT_SCOPE)
  set(ENV{GTEST_INCLUDE} ${SOURCE_DIR}/googletest/include PARENT_SCOPE)
  set(GMOCK_LIB          ${BINARY_DIR}/googlemock         PARENT_SCOPE)
  set(GTEST_LIB          ${BINARY_DIR}/googlemock/gtest   PARENT_SCOPE)

endfunction()

# ========================================================

function(func_gtest_gmock_env_release exist)
  set(${exist} "no" PARENT_SCOPE) # default return
  if (        EXISTS $ENV{GMOCK_INCLUDE})
    if (      EXISTS $ENV{GTEST_INCLUDE})
      if (    EXISTS $ENV{GMOCK_LIB_REL})
        if (  EXISTS $ENV{GTEST_LIB_REL})
          set(${exist} "yes" PARENT_SCOPE)
        endif()
      endif()
    endif()
  endif()
endfunction()

function(func_gtest_gmock_env_debug exist)
  set(${exist} "no" PARENT_SCOPE) # default return
  if (        EXISTS $ENV{GMOCK_INCLUDE})
    if (      EXISTS $ENV{GTEST_INCLUDE})
      if (    EXISTS $ENV{GMOCK_LIB_DBG})
        if (  EXISTS $ENV{GTEST_LIB_DBG})
          set(${exist} "yes" PARENT_SCOPE)
        endif()
      endif()
    endif()
  endif()
endfunction()

## If env-variables indicate no gtest/gmock, then call func_load_gtest_gmock_from_github from above
if (CMAKE_BUILD_TYPE AND ${CMAKE_BUILD_TYPE} STREQUAL "Release")
  ## Release Build

  func_gtest_gmock_env_release(exist)
  if (${exist} STREQUAL "yes")

    set(GMOCK_LIB $ENV{GMOCK_LIB_REL}) # using location of release library
    set(GTEST_LIB $ENV{GTEST_LIB_REL}) # using location of release library

  else()

    message("## calling (release) func_load_gtest_gmock_from_github()")
    set(GTEST_GMOCK_DEPENDENCY "gtest_gmock") # name of ExternalProject_Add
    func_load_gtest_gmock_from_github()

  endif()

else()
  ## Debug Build

  func_gtest_gmock_env_debug(exist)
  if (${exist} STREQUAL "yes")

    set(GMOCK_LIB $ENV{GMOCK_LIB_DBG}) # using location of release library
    set(GTEST_LIB $ENV{GTEST_LIB_DBG}) # using location of release library

  else()

    message("## calling (debug) func_load_gtest_gmock_from_github()")
    set(GTEST_GMOCK_DEPENDENCY "gtest_gmock") # name of ExternalProject_Add
    func_load_gtest_gmock_from_github()

  endif()
endif()

# ========================================================

# setup include_directories and link_directories so that
#    gmock, gmock_main, gtest and gtest_main
# can be found

include_directories("$ENV{GMOCK_INCLUDE}"       "$ENV{GTEST_INCLUDE}")
link_directories(      "${GMOCK_LIB}"              "${GTEST_LIB}")


text:
package client

import (
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"

	"github.com/caioeverest/ingresso-watcher/config"
)

func GetEventById(conf *config.Config, id string) (interface{}, error) {

	url, err := selectApi(id)
	if err != nil {
		return nil, err
	}

	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		return nil, err
	}
	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("x-api-key", conf.ApiKey)

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		return nil, err
	}

	if err := successStatusCode(res.StatusCode); err != nil {
		return nil, err
	}
	defer res.Body.Close()

	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return nil, err
	}

	var decoded map[string]interface{}
	if err := json.Unmarshal(body, &decoded); err != nil {
		return nil, err
	}

	//presentations := decoded["data"].(map[string]interface{})["presentations"]
	//items := presentations.(map[string]interface{})["items"].([]interface{})
	e := decoded["data"].(map[string]interface{})

	return e, nil
}

func successStatusCode(code int) error {
	if code >= 200 && code <= 299 {
		return nil
	}
	return errors.New(fmt.Sprintf("Request receive HTTP status %d", code))
}

func selectApi(code string) (string, error) {
	spliter := strings.Split(code, "-")
	if len(spliter) < 2 {
		return "", errors.New(fmt.Sprintf("Unable to find api ref"))
	}

	apiRef := spliter[1]
	id := spliter[0]

	switch apiRef {
	case "1":
		return fmt.Sprintf("https://bff-sales-api-cdn.ingressorapido.com.br/api/v1/events/%s", id), nil
	case "2":
		return fmt.Sprintf("https://bff-sales-api-cdn.bileto.sympla.com.br/api/v1/events/%s", id), nil
	default:
		return "", errors.New(fmt.Sprintf("Api ref not acceptable %s", apiRef))
	}
}

repository: caioeverest/ingresso-watcher

repo_name: caioeverest/ingresso-watcher


text:
require gypsy.inc

DEFAULT_PREFERENCE = "-1"

SRCREV = "be8c9c382d2d1d37b51d29b0843045121ec90213"
PV = "0.9+git${SRCPV}"
PR = "r1"

S = "${WORKDIR}/git"

LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                    file://COPYING.lib;md5=7fbc338309ac38fefcd64b04bb903e34 \
                    file://src/main.c;beginline=1;endline=25;md5=3fe64e27e61b289b77383a54a982cbdd \
                    file://gypsy/gypsy-time.h;beginline=1;endline=24;md5=06432ea19a7b6607428d04d9dadc37fd"

SRC_URI = "git://anongit.freedesktop.org/gypsy;protocol=git \
           file://fixups.patch"

repository: linkessence/Galileo

repo_name: linkessence/Galileo


text:
#include "DHT.h"

#define DHTPIN 13
#define DHTTYPE DHT22

DHT dht(DHTPIN,DHTTYPE);

int HVAC = 10;
int rLed = 7;
int gLed = 8;
int bLed = 9;

void setup() {
  Serial.begin(9600);
  Serial.println("Thermostat v0.1.0");

  pinMode(HVAC, OUTPUT);
  pinMode(rLed, OUTPUT);
  pinMode(bLed, OUTPUT);
  pinMode(gLed, OUTPUT);

  dht.begin();

  // Allow the sensor to stablize.
  flicker(HVAC, 50, 20);
}

void loop() {
  float h = dht.readHumidity();
  float t = dht.readTemperature(true);
  float i = dht.computeHeatIndex(t,h);
  int s = (int) (i - 50)/10;

  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from sensor!");
    return;
  }

  printData(h,t,i,s);

  runHVAC(h,t);

  showHeatIndex(s);
}

void printData(float h, float t, float i, int s) {
  Serial.print("Humidity: ");
  Serial.print(h);
  Serial.print("%\t");
  Serial.print("Temperature: ");
  Serial.print(t);
  Serial.print("*F\t");
  Serial.print("Index: ");
  Serial.print(i);
  Serial.print("*F\t");
  Serial.print("State: ");
  Serial.println(s);
}

void runHVAC (float h, float t) {
  if ( h > 80 || t > 80) {
    turnOn(HVAC);
  }
  else {
    turnOff(HVAC);
  }
}

void turnOn (int device) {
  digitalWrite(device, HIGH);
}

void turnOff (int device) {
  digitalWrite(device, LOW);
}

void showHeatIndex(int s) {
  triColorLed(s);
}

void flicker(int device, int timeOn, int loops) {
  for (int i = 0; i < loops; i++) {
    ledOn(device, timeOn);
    ledOff(device, timeOn);
  }
}

void ledOn(int device, int timeOn) {
  digitalWrite(device, HIGH);
  delay(timeOn);
}

void ledOff(int device, int timeOff) {
  digitalWrite(device, LOW);
  delay(timeOff);
}

void triColorLed(int state) {
  switch (state) {
    case 0:
      digitalWrite(rLed, LOW);
      digitalWrite(bLed, LOW);
      digitalWrite(gLed, LOW);
      break;
    case 1:
      digitalWrite(rLed, LOW);
      digitalWrite(bLed, LOW);
      digitalWrite(gLed, HIGH);
      break;
    case 2:
      digitalWrite(rLed, LOW);
      digitalWrite(bLed, HIGH);
      digitalWrite(gLed, LOW);
      break;
    case 3:
      digitalWrite(rLed, LOW);
      digitalWrite(bLed, HIGH);
      digitalWrite(gLed, HIGH);
      break;
    case 4:
      digitalWrite(rLed, HIGH);
      digitalWrite(bLed, LOW);
      digitalWrite(gLed, LOW);
      break;
    case 5:
      digitalWrite(rLed, HIGH);
      digitalWrite(bLed, LOW);
      digitalWrite(gLed, HIGH);
      break;
    case 6:
      digitalWrite(rLed, HIGH);
      digitalWrite(bLed, HIGH);
      digitalWrite(gLed, LOW);
      break;
    case 7:
      digitalWrite(rLed, HIGH);
      digitalWrite(bLed, HIGH);
      digitalWrite(gLed, HIGH);
      break;
  }
}

repository: ashjonm/arduinoSketches

repo_name: ashjonm/arduinoSketches

extension: ino


text:
/*
Copyright (C) 2019 Synopsys, Inc.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownershia. The 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 soperator

import (
	"fmt"
	"strings"
	"time"

	alertv1 "github.com/blackducksoftware/synopsys-operator/pkg/api/alert/v1"
	blackduckv1 "github.com/blackducksoftware/synopsys-operator/pkg/api/blackduck/v1"
	opssightv1 "github.com/blackducksoftware/synopsys-operator/pkg/api/opssight/v1"
	"github.com/blackducksoftware/synopsys-operator/pkg/crdupdater"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"

	alertclientset "github.com/blackducksoftware/synopsys-operator/pkg/alert/client/clientset/versioned"
	blackduckclientset "github.com/blackducksoftware/synopsys-operator/pkg/blackduck/client/clientset/versioned"
	opssightclientset "github.com/blackducksoftware/synopsys-operator/pkg/opssight/client/clientset/versioned"
	operatorutil "github.com/blackducksoftware/synopsys-operator/pkg/util"
	log "github.com/sirupsen/logrus"
)

// UpdateSynopsysOperator updates the Synopsys-Operator's kubernetes componenets and changes
// all CRDs to versions that the Operator can use
func UpdateSynopsysOperator(restconfig *rest.Config, kubeClient *kubernetes.Clientset, namespace string, newSOperatorSpec *SpecConfig, blackduckClient *blackduckclientset.Clientset, opssightClient *opssightclientset.Clientset, alertClient *alertclientset.Clientset) error {
	currImage, err := GetOperatorImage(kubeClient, namespace)
	if err != nil {
		log.Errorf("Failed to Update the Synopsys Operator: %s", err)
		return nil
	}

	// Get CRD Version Data
	newOperatorVersion := strings.Split(newSOperatorSpec.SynopsysOperatorImage, ":")[1]
	currOperatorVersion := strings.Split(currImage, ":")[1]
	newCrdData := SOperatorCRDVersionMap.GetCRDVersions(newOperatorVersion)
	currCrdData := SOperatorCRDVersionMap.GetCRDVersions(currOperatorVersion)

	// Get CRDs that need to be updated (specs have new version set)
	log.Debugf("Getting CRDs that need new versions")
	var oldBlackducks = []blackduckv1.Blackduck{}
	kube, openshift := operatorutil.DetermineClusterClients(restconfig)
	if newCrdData.Blackduck.APIVersion != currCrdData.Blackduck.APIVersion {
		oldBlackducks, err = GetBlackduckVersionsToRemove(blackduckClient, newCrdData.Blackduck.APIVersion)
		if err != nil {
			return fmt.Errorf("failed to get Blackduck's to update: %s", err)
		}
		out, err := operatorutil.RunKubeCmd(restconfig, kube, openshift, "delete", "crd", currCrdData.Blackduck.CRDName)
		if err != nil {
			return fmt.Errorf("failed to delete the crd %s: %s", currCrdData.Blackduck.CRDName, out)
		}
		log.Debugf("Updating %d Black Ducks", len(oldBlackducks))
	}
	var oldOpsSights = []opssightv1.OpsSight{}
	if newCrdData.OpsSight.APIVersion != currCrdData.OpsSight.APIVersion {
		oldOpsSights, err = GetOpsSightVersionsToRemove(opssightClient, newCrdData.OpsSight.APIVersion)
		if err != nil {
			return fmt.Errorf("failed to get OpsSights to update: %s", err)
		}
		out, err := operatorutil.RunKubeCmd(restconfig, kube, openshift, "delete", "crd", currCrdData.OpsSight.CRDName)
		if err != nil {
			return fmt.Errorf("failed to delete the crd %s: %s", currCrdData.OpsSight.CRDName, out)
		}
		log.Debugf("Updating %d OpsSights", len(oldOpsSights))
	}
	var oldAlerts = []alertv1.Alert{}
	if newCrdData.Alert.APIVersion != currCrdData.Alert.APIVersion {
		oldAlerts, err = GetAlertVersionsToRemove(alertClient, newCrdData.Alert.APIVersion)
		if err != nil {
			return fmt.Errorf("failed to get Alerts to update%s", err)
		}
		out, err := operatorutil.RunKubeCmd(restconfig, kube, openshift, "delete", "crd", currCrdData.Alert.CRDName)
		if err != nil {
			return fmt.Errorf("failed to delete the crd %s: %s", currCrdData.Alert.CRDName, out)
		}
		log.Debugf("Updating %d Alerts", len(oldAlerts))
	}

	// Update the Synopsys-Operator's Components
	log.Debugf("Updating Synopsys-Operator's Components")
	err = UpdateSOperatorComponents(restconfig, kubeClient, namespace, newSOperatorSpec)
	if err != nil {
		return fmt.Errorf("failed to update Synopsys-Operator components: %s", err)
	}

	// Update the CRDs in the cluster with the new versions
	// loop to wait for kuberentes to register new CRDs
	log.Debugf("Updating CRDs to new Versions")
	for i := 1; i <= 10; i++ {
		if err = operatorutil.UpdateBlackducks(blackduckClient, oldBlackducks); err == nil {
			break
		}
		if i >= 10 {
			return fmt.Errorf("failed to update Black Ducks: %s", err)
		}
		time.Sleep(1 * time.Second)
	}
	for i := 1; i <= 10; i++ {
		if err = operatorutil.UpdateOpsSights(opssightClient, oldOpsSights); err == nil {
			break
		}
		if i >= 10 {
			return fmt.Errorf("failed to update OpsSights: %s", err)
		}
		time.Sleep(1 * time.Second)
	}
	for i := 1; i <= 10; i++ {
		if err = operatorutil.UpdateAlerts(alertClient, oldAlerts); err == nil {
			break
		}
		if i >= 10 {
			return fmt.Errorf("failed to update Alerts: %s", err)
		}
		log.Debugf("Attempt %d to update Alerts\n", i)
		time.Sleep(1 * time.Second)
	}

	return nil
}

// UpdateSOperatorComponents updates kubernetes resources for the Synopsys-Operator
func UpdateSOperatorComponents(restconfig *rest.Config, kubeClient *kubernetes.Clientset, namespace string, newSOperatorSpecConfig *SpecConfig) error {
	sOperatorComponents, err := newSOperatorSpecConfig.GetComponents()
	if err != nil {
		return fmt.Errorf("failed to get Synopsys-Operator components: %s", err)
	}
	sOperatorCommonConfig := crdupdater.NewCRUDComponents(restconfig, kubeClient, false, namespace, sOperatorComponents, "app=synopsys-operator")
	errs := sOperatorCommonConfig.CRUDComponents()
	if errs != nil {
		return fmt.Errorf("failed to update Synopsys-Operator components: %+v", errs)
	}

	return nil
}

// UpdatePrometheus updates kubernetes resources for Prometheus
func UpdatePrometheus(restconfig *rest.Config, kubeClient *kubernetes.Clientset, namespace string, newPrometheusSpecConfig *PrometheusSpecConfig) error {
	prometheusComponents, err := newPrometheusSpecConfig.GetComponents()
	if err != nil {
		return fmt.Errorf("failed to get Prometheus components: %s", err)
	}
	prometheusCommonConfig := crdupdater.NewCRUDComponents(restconfig, kubeClient, false, namespace, prometheusComponents, "app=prometheus")
	errs := prometheusCommonConfig.CRUDComponents()
	if errs != nil {
		return fmt.Errorf("failed to update Prometheus components: %+v", errs)
	}
	return nil
}

repository: fossabot/synopsys-operator

repo_name: fossabot/synopsys-operator


text:
@inproceedings{raffin2021gsde,
  title={Smooth Exploration for Robotic Reinforcement Learning},
  author={Raffin, Antonin and Kober, Jens and Stulp, Freek},
  booktitle={Conference on Robot Learning},
  year={2021}
}

repository: araffin/academic-kickstart

repo_name: araffin/academic-kickstart


text:
/* vertical spacing */
.spacer5 { height: 5px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer10 { height: 10px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer15 { height: 15px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer20 { height: 20px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer25 { height: 25px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer30 { height: 30px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer35 { height: 35px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer40 { height: 40px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer45 { height: 45px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer50 { height: 50px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer100 { height: 100px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }
.spacer200 { height: 200px; width: 100%; font-size: 0; margin: 0; padding: 0; border: 0; display: block; }

/* helper classes to style file inputs */
div.fileinputs {
    position: relative;
}

div.fakefile {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 1;
}

input.file {
    position: relative;
    text-align: right;
    -moz-opacity:0 ;
    filter:alpha(opacity: 0);
    opacity: 0;
    z-index: 2;
}

.btn-default-wohover {
    color: #333333;
    background-color: #ffffff;
    border-color: #cccccc;
    cursor: default;
}

/* custom sub navbar customized */
.custom-sub-navbar {
    border-radius: 10px;
    border: 0;
}

.custom-sub-navbar .navbar-nav > .active > a {
    border-radius: 10px;
}

.custom-sub-navbar .navbar-nav > li > a:hover {
    color: #777777;
}

.custom-sub-navbar .navbar-nav > li {
    margin-right: 50px;
}

.input-glyphicon {
    padding-right: 30px;
}

.input-glyphicon + .glyphicon {
    position: absolute;
    right: 0;
    padding: 8px 27px;
}

.small-dialog {
    width: 500px;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -120px;
    margin-left: -250px;
}

.payment-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -160px;
    margin-left: -300px;
}

.strikeText {
    text-decoration:line-through;
}

.selectItemContainer {
    height: 600px;
    width: 500px;
    border: 1px solid #dddddd;
    border-radius: 4px;
    overflow: auto;
}

.selectItem {
    padding: 5px 10px;
    font-size: 14px;
}

.selectItem:hover {
    background-color: #f5f5f5;
}

.icononly-button {
    color: #000000;
    font-weight: bold;
    text-shadow: 0 1px 0 #ffffff;
    opacity: 0.2;
    filter: alpha(opacity=20);
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;
}

.icononly-button:hover:enabled
{
    color: #000000;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.5;
    filter: alpha(opacity=50);
}

.form-control.ng-invalid.ng-dirty {
    border-color: #a94442;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.form-control:focus.ng-invalid.ng-dirty {
    border-color: #843534;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}

input.ng-invalid.ng-dirty {
    border-color: #a94442;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

input:focus.ng-invalid.ng-dirty {
    border-color: #843534;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}

.error {
    color: #a94442;
    margin-top: 3px;
}

/* expand navbar dropdown menu on hover (and not only on click) */
.dropdown:hover .dropdown-menu {
    display: block;
}

.modal-lg {
    width: 900px;
}

.dropdown-menu {
    z-index: 2000;
}

extension: css


text:
%%% -*-BibTeX-*-
@article{Human2008Paul,
   author   = {Sakrapee Paisitkriangkrai and Chunhua Shen and Jian Zhang},
   title    = {Fast Pedestrian Detection Using a Cascade of Boosted Covariance Features},
   journal  = {IEEE Transactions on Circuits and Systems for Video Technology},
   volume   = {18},
   number   = {8},
   year     = {2008},
   month    = {August},
   pages    = {1140--1151},
   publisher= {},
   url      = {http://dx.doi.org/10.1109/TCSVT.2008.928213},
   pdf      = {http://goo.gl/lgpDJB},
   venue    = {TCSVT},
}


text:
@article{WinkelEtAl2015,
	abstract = {{This work introduces the high-order Boris-SDC method for integrating the equations of motion for electrically charged particles in electric and magnetic fields. Boris-SDC relies on a combination of the Boris-integrator with spectral deferred corrections (SDC). SDC can be considered as preconditioned Picard iteration to compute the stages of a collocation method. In this interpretation, inverting the preconditioner corresponds to a sweep with a low-order method. In Boris-SDC, the Boris method, a second-order Lorentz force integrator based on velocity-Verlet, is used as a sweeper/preconditioner. The presented method provides a generic way to extend the classical Boris integrator, which is widely used in essentially all particle-based plasma physics simulations involving magnetic fields, to a high-order method. Stability, convergence order and conservation properties of the method are demonstrated for different simulation setups. Boris-SDC reproduces the expected high order of convergence for a single particle and for the center-of-mass of a particle cloud in a Penning trap and shows good long-term energy stability.}},
	title={A high-order {B}oris integrator},
	author={Winkel, M. and Speck, R. and Ruprecht, D.},
	journal={Journal of Computational Physics},
	year={2015},
	url={http://dx.doi.org/10.1016/j.jcp.2015.04.022},
	volume={295},
	pages={456--474}
}

repository: comp-maths/website

repo_name: comp-maths/website


text:
@article{saez2018kinematics,
  title={Kinematics of Big Biomedical Data to characterize temporal variability and seasonality of data repositories: Functional Data Analysis of data temporal evolution over non-parametric statistical manifolds},
  author={S{\'a}ez, Carlos and Garc{\'\i}a-G{\'o}mez, Juan M},
  journal={International journal of medical informatics},
  volume={119},
  pages={109--124},
  year={2018},
  publisher={Elsevier}
}

@article{moreno2012unifying,
  title={A unifying view on dataset shift in classification},
  author={Moreno-Torres, Jose G and Raeder, Troy and Alaiz-Rodr{\'\i}Guez, Roc{\'\i}O and Chawla, Nitesh V and Herrera, Francisco},
  journal={Pattern Recognition},
  volume={45},
  number={1},
  pages={521--530},
  year={2012},
  publisher={Elsevier}
}

@book{quionero2009dataset,
  title={Dataset shift in machine learning},
  author={Quionero-Candela, Joaquin and Sugiyama, Masashi and Schwaighofer, Anton and Lawrence, Neil D},
  year={2009},
  publisher={The MIT Press}
}

@article{denny2013systematic,
  title={Systematic comparison of phenome-wide association study of electronic medical record data and genome-wide association study data},
  author={Denny, Joshua C and Bastarache, Lisa and Ritchie, Marylyn D and Carroll, Robert J and Zink, Raquel and Mosley, Jonathan D and Field, Julie R and Pulley, Jill M and Ramirez, Andrea H and Bowton, Erica and others},
  journal={Nature biotechnology},
  volume={31},
  number={12},
  pages={1102},
  year={2013},
  publisher={Nature Publishing Group}
}

@InProceedings{saez2013,
  Title                    = {Comparative study of probability distribution distances to define a metric for the stability of multi-source biomedical research data},
  Author                   = {Carlos S{\'a}ez and Montserat Robles and Juan Miguel Garc\'{i}a-G\'{o}mez},
  Booktitle                = {Proceedings of the 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society},
  Year                     = {2013},
  Month                    = {July},
  Pages                    = {3226--3229},
  Location                 = {Osaka, Japan}
}

@article{saez_probabilistic_2015,
title={Probabilistic change detection and visualization methods for the assessment of temporal stability in biomedical data quality},
author={S{\'a}ez, Carlos and Rodrigues, Pedro Pereira and Gama, Jo{\~a}o and Robles, Montserrat and Garc{\'\i}a-G{\'o}mez, Juan M},
journal={Data Mining and Knowledge Discovery},
volume={29},
number={4},
pages={950--975},
year={2015},
publisher={Springer}
}

@article{saez2016applying,
	title={Applying probabilistic temporal and multisite data quality control methods to a public health mortality registry in Spain: a systematic approach to quality control of repositories},
	author={S{\'a}ez, Carlos and Zurriaga, Oscar and P{\'e}rez-Panad{\'e}s, Jordi and Melchor, Inma and Robles, Montserrat and Garc{\'\i}a-G{\'o}mez, Juan M},
	journal={Journal of the American Medical Informatics Association},
	volume={23},
	number={6},
	pages={1085--1095},
	year={2016},
	publisher={Oxford University Press}
}

@ARTICLE{Gewin2016,
	title     = "Data sharing: An open mind on open data",
	author    = "Gewin, Virginia",
	abstract  = "The move to make scientific findings transparent can be a major
	boon to research, but it can be tricky to embrace the change.",
	journal   = "Nature",
	publisher = "Nature Research",
	volume    =  529,
	number    =  7584,
	pages     = "117--119",
	month     =  jan,
	year      =  2016,
	language  = "en"
}

@ARTICLE{Andreu-Perez2015,
	author={J. Andreu-Perez and C. C. Y. Poon and R. D. Merrifield and S. T. C. Wong and G. Z. Yang},
	journal={IEEE Journal of Biomedical and Health Informatics},
	title={Big Data for Health},
	year={2015},
	volume={19},
	number={4},
	pages={1193-1208},
	keywords={biomedical imaging;data privacy;diseases;genomics;medical information systems;patient treatment;proteomics;security of data;big data;biomedical informatics;clinical diagnosis;data ownership;data stewardship;disease management;genomics;governance;health informatics;imaging informatics;long-term continuous physiological sensing;metabolomics;personalized information;personalized treatment;privacy;proteomics;security;sensor informatics;translational bioinformatics;Big data;Bioinformatics;Biomedical imaging;Diseases;Drugs;Genomics;Informatics;Big data;big data;bioinformatics;health informatics;medical imaging;medical informatics;precision medicine;sensor informatics;social health;Computational Biology;Databases, Factual;Diagnostic Imaging;Humans;Medical Informatics},
	ISSN={2168-2194},
	month={July}
	}

	@article{schlegel2017secondary,
	title={Secondary Use of Patient Data: Review of the Literature Published in 2016},
	author={Schlegel, DR and Ficheur, G},
	journal={Yearbook of medical informatics},
	volume={26},
	number={01},
	pages={68--70},
	year={2017},
	publisher={Georg Thieme Verlag KG}
}