text:
// Code generated by go-swagger; DO NOT EDIT.

package vm_folder

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"

	"github.com/smartxworks/cloudtower-go-sdk/v2/models"
)

// GetVMFoldersConnectionReader is a Reader for the GetVMFoldersConnection structure.
type GetVMFoldersConnectionReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetVMFoldersConnectionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetVMFoldersConnectionOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetVMFoldersConnectionBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetVMFoldersConnectionNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetVMFoldersConnectionInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
	}
}

// NewGetVMFoldersConnectionOK creates a GetVMFoldersConnectionOK with default headers values
func NewGetVMFoldersConnectionOK() *GetVMFoldersConnectionOK {
	return &GetVMFoldersConnectionOK{}
}

/* GetVMFoldersConnectionOK describes a response with status code 200, with default header values.

GetVMFoldersConnectionOK get Vm folders connection o k
*/
type GetVMFoldersConnectionOK struct {
	XTowerRequestID string

	Payload *models.VMFolderConnection
}

func (o *GetVMFoldersConnectionOK) Error() string {
	return fmt.Sprintf("[POST /get-vm-folders-connection][%d] getVmFoldersConnectionOK  %+v", 200, o.Payload)
}
func (o *GetVMFoldersConnectionOK) GetPayload() *models.VMFolderConnection {
	return o.Payload
}

func (o *GetVMFoldersConnectionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// hydrates response header x-tower-request-id
	hdrXTowerRequestID := response.GetHeader("x-tower-request-id")

	if hdrXTowerRequestID != "" {
		o.XTowerRequestID = hdrXTowerRequestID
	}

	o.Payload = new(models.VMFolderConnection)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetVMFoldersConnectionBadRequest creates a GetVMFoldersConnectionBadRequest with default headers values
func NewGetVMFoldersConnectionBadRequest() *GetVMFoldersConnectionBadRequest {
	return &GetVMFoldersConnectionBadRequest{}
}

/* GetVMFoldersConnectionBadRequest describes a response with status code 400, with default header values.

Bad request
*/
type GetVMFoldersConnectionBadRequest struct {
	XTowerRequestID string

	Payload *models.ErrorBody
}

func (o *GetVMFoldersConnectionBadRequest) Error() string {
	return fmt.Sprintf("[POST /get-vm-folders-connection][%d] getVmFoldersConnectionBadRequest  %+v", 400, o.Payload)
}
func (o *GetVMFoldersConnectionBadRequest) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetVMFoldersConnectionBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// hydrates response header x-tower-request-id
	hdrXTowerRequestID := response.GetHeader("x-tower-request-id")

	if hdrXTowerRequestID != "" {
		o.XTowerRequestID = hdrXTowerRequestID
	}

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetVMFoldersConnectionNotFound creates a GetVMFoldersConnectionNotFound with default headers values
func NewGetVMFoldersConnectionNotFound() *GetVMFoldersConnectionNotFound {
	return &GetVMFoldersConnectionNotFound{}
}

/* GetVMFoldersConnectionNotFound describes a response with status code 404, with default header values.

Not found
*/
type GetVMFoldersConnectionNotFound struct {
	XTowerRequestID string

	Payload *models.ErrorBody
}

func (o *GetVMFoldersConnectionNotFound) Error() string {
	return fmt.Sprintf("[POST /get-vm-folders-connection][%d] getVmFoldersConnectionNotFound  %+v", 404, o.Payload)
}
func (o *GetVMFoldersConnectionNotFound) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetVMFoldersConnectionNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// hydrates response header x-tower-request-id
	hdrXTowerRequestID := response.GetHeader("x-tower-request-id")

	if hdrXTowerRequestID != "" {
		o.XTowerRequestID = hdrXTowerRequestID
	}

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetVMFoldersConnectionInternalServerError creates a GetVMFoldersConnectionInternalServerError with default headers values
func NewGetVMFoldersConnectionInternalServerError() *GetVMFoldersConnectionInternalServerError {
	return &GetVMFoldersConnectionInternalServerError{}
}

/* GetVMFoldersConnectionInternalServerError describes a response with status code 500, with default header values.

Server error
*/
type GetVMFoldersConnectionInternalServerError struct {
	XTowerRequestID string

	Payload *models.ErrorBody
}

func (o *GetVMFoldersConnectionInternalServerError) Error() string {
	return fmt.Sprintf("[POST /get-vm-folders-connection][%d] getVmFoldersConnectionInternalServerError  %+v", 500, o.Payload)
}
func (o *GetVMFoldersConnectionInternalServerError) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetVMFoldersConnectionInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// hydrates response header x-tower-request-id
	hdrXTowerRequestID := response.GetHeader("x-tower-request-id")

	if hdrXTowerRequestID != "" {
		o.XTowerRequestID = hdrXTowerRequestID
	}

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

license: ISC

repository: smartxworks/cloudtower-go-sdk

repo_name: smartxworks/cloudtower-go-sdk

gha_license_id: ISC


text:
// This is part of the Microsoft Foundation Classes C++ library.
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
//
// mfcieVw.h : interface of the CMfcieView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MFCIEVIEW_H__47FF4085_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)
#define AFX_MFCIEVIEW_H__47FF4085_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

class CMfcieView : public CHtmlView
{
protected: // create from serialization only
    CMfcieView();
    DECLARE_DYNCREATE(CMfcieView)

// Attributes
public:
    CMfcieDoc* GetDocument();

// Operations
public:

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CMfcieView)
public:
    virtual void OnDraw(CDC* pDC);  // overridden to draw this view
    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
    virtual void OnInitialUpdate();
    //}}AFX_VIRTUAL
    void OnTitleChange(LPCTSTR lpszText);
    void OnDocumentComplete(LPCTSTR lpszUrl);
    void OnBeforeNavigate2(LPCTSTR lpszURL, DWORD nFlags,
                           LPCTSTR lpszTargetFrameName, CByteArray& baPostedData,
                           LPCTSTR lpszHeaders, BOOL* pbCancel);

// Implementation
public:
    virtual ~CMfcieView();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
    //{{AFX_MSG(CMfcieView)
    afx_msg void OnGoBack();
    afx_msg void OnGoForward();
    afx_msg void OnGoSearchTheWeb();
    afx_msg void OnGoStartPage();
    afx_msg void OnViewStop();
    afx_msg void OnViewRefresh();
    afx_msg void OnHelpWebTutorial();
    afx_msg void OnHelpOnlineSupport();
    afx_msg void OnHelpMicrosoftOnTheWebFreeStuff();
    afx_msg void OnHelpMicrosoftOnTheWebFrequentlyAskedQuestions();
    afx_msg void OnHelpMicrosoftOnTheWebGetFasterInternetAccess();
    afx_msg void OnHelpMicrosoftOnTheWebMicrosoftHomePage();
    afx_msg void OnHelpMicrosoftOnTheWebSearchTheWeb();
    afx_msg void OnHelpMicrosoftOnTheWebSendFeedback();
    afx_msg void OnHelpMicrosoftOnTheWebInternetStartPage();
    afx_msg void OnHelpMicrosoftOnTheWebBestOfTheWeb();
    afx_msg void OnViewFontsLargest();
    afx_msg void OnViewFontsLarge();
    afx_msg void OnViewFontsMedium();
    afx_msg void OnViewFontsSmall();
    afx_msg void OnViewFontsSmallest();
    afx_msg void OnFileOpen();
    //}}AFX_MSG
    DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in mfcieView.cpp
inline CMfcieDoc* CMfcieView::GetDocument()
{
    return (CMfcieDoc*)m_pDocument;
}
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MFCIEVIEW_H__47FF4085_CE1B_11D0_BEB6_00C04FC99F83__INCLUDED_)

license: MIT

repository: JetAr/ZDoc

license_type: permissive

repo_name: JetAr/ZDoc

branch_name: refs/heads/master

extension: h


text:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/

%% Created for Sarah Schmidt at 2019-09-10 17:15:52 +0200

%% Saved with string encoding Unicode (UTF-8)

@inproceedings{2017AAS...22933605H,
	Abstract = {The success of the Sloan Digital Sky Survey (SDSS) hinges on tapping into a diverse talent base. From our experience, however, it is clear that simply allowing access to SDSS data is not enough to increase the participation of underrepresented minorities in the collaboration. For this reason, the SDSS collaboration instituted the Faculty and Student Team (FAST) Program, which pairs teams of faculty and students from underrepresented groups with SDSS partners to build serious, long-term research collaborations. Our intent is to build capacity at the faculty level to propagate SDSS research to students in the long-term. We present the FAST initiative in detail and outline results from the first 1.5 years of the program.},
	Adsnote = {Provided by the SAO/NASA Astrophysics Data System},
	Adsurl = {https://ui.adsabs.harvard.edu/abs/2017AAS...22933605H},
	Author = {{Holley-Bockelmann}, Kelly and {Chanover}, Nancy J. and {Burgasser}, Adam J. and {Cruz}, Kelle L. and {Liu}, Charles and {Mason}, Paul A. and {Pando}, Jesus and {Rice}, Emily L. and {Schmidt}, Sarah J. and {Sanchez-Gallego}, Jose Ramon and {Lucatello}, Sara and {Aragon-Salamanca}, Alfonso and {Belfiore}, Francesco and {Cherinka}, Brian and {Feuillet}, Diane and {Jones}, Amy and {Masters}, Karen and {Simmons}, Audrey and {Ross}, Ashley and {Stassun}, Keivan G. and {Tayar}, Jamie},
	Booktitle = {American Astronomical Society Meeting Abstracts \#229},
	Date-Added = {2019-09-10 17:15:35 +0200},
	Date-Modified = {2019-09-10 17:15:50 +0200},
	Eid = {336.05},
	Group = {coins},
	Month = {Jan},
	Pages = {336.05},
	Series = {American Astronomical Society Meeting Abstracts},
	Title = {{The FAST Initiative: Fostering a More Inclusive SDSS Collaboration}},
	Volume = {229},
	Year = {2017}}

@inproceedings{2017AAS...22923713S,
	Abstract = {In the era of large surveys, collaborations like the Sloan Digital Sky Survey (SDSS) are becoming a new normal for many scientists, and collaboration policies and climate have a considerable affect on scientific careers. As such, it is essential that collaborations actively strive to include all scientists regardless of gender, gender identity, race, ethnicity, sexual orientation, disability, career stage, geographic location, economic background, social and cultural backgrounds, and all possible intersections thereof. We report on the formation and progress of the Committee On INclusiveness in the SDSS (COINS). COINS was formed to assess the SDSS-IV project and collaboration's climate and demographics, to recommend new policies or practices with regard to increasing inclusiveness, and to assist in the implementation of these new activities where necessary. We report on our current activities, which include ongoing support for the SDSS Research Experience for Undergraduates program, support for the SDSS Faculty and Student Teams initiative, administering and analyzing the SDSS demographic surveys, working towards collaboration meeting inclusiveness and accessibility, and adopting strategies for integrating and mentoring new members. We welcome input from SDSS members and non-members about how to work towards a more equitable and inclusive collaboration.},
	Adsnote = {Provided by the SAO/NASA Astrophysics Data System},
	Adsurl = {https://ui.adsabs.harvard.edu/abs/2017AAS...22923713S},
	Author = {{Schmidt}, Sarah J. and {Sanchez-Gallego}, Jose Ramon and {Chanover}, Nancy J. and {Holley-Bockelmann}, Kelly and {Lucatello}, Sara and {Aragon-Salamanca}, Alfonso and {Belfiore}, Francesco and {Cherinka}, Brian and {Feuillet}, Diane and {Jones}, Amy and {Masters}, Karen and {Simmons}, Audrey and {Ross}, Ashley and {Stassun}, Keivan G. and {Tayar}, Jamie},
	Booktitle = {American Astronomical Society Meeting Abstracts \#229},
	Date-Added = {2019-09-10 17:13:27 +0200},
	Date-Modified = {2019-09-10 17:14:06 +0200},
	Eid = {237.13},
	Group = {coins},
	Month = {Jan},
	Pages = {237.13},
	Series = {American Astronomical Society Meeting Abstracts},
	Title = {{The Formation of COINS: Equity and Inclusion in SDSS}},
	Volume = {229},
	Year = {2017}}

@article{Garner2013,
	Abstract = {Since 2005, the Pre-Major in Astronomy Program (Pre-MAP) at the University of Washington (UW) Department of Astronomy has made a concentrated effort to recruit and retain underrepresented undergraduates in science, technology, engineering and mathematics (STEM). This paper evaluates Pre-MAP in the context of the larger UW student population using data compiled by the University's student database. We evaluate the Pre-MAP program in terms of our goals of recruiting a more diverse population than the University and in terms of a higher fraction of students successfully completing degrees. We find that Pre-MAP serves a higher percentage of underrepresented minorities and equal percentages of women compared to entering freshmen classes at UW. Additionally, Pre-MAP has a higher percentage of degree completion with higher average GPA's and similar time to completion when compared to UW as a whole and other STEM majors, particularly with students that place into lower-level math courses (such as basic algebra or pre-calculus).},
	Adsnote = {Provided by the SAO/NASA Astrophysics Data System},
	Adsurl = {http://adsabs.harvard.edu/abs/2013arXiv1311.5486G},
	Archiveprefix = {arXiv},
	Author = {{Garner}, S. and {Tremmel}, M.~J. and {Schmidt}, S.~J. and {Wisniewski}, J.~P. and {Agol}, E.},
	Date-Added = {2019-09-10 12:02:43 +0200},
	Date-Modified = {2019-09-10 12:04:48 +0200},
	Eprint = {1311.5486},
	Group = {premap},
	Journal = {ArXiv e-prints},
	Keywords = {Astrophysics - Instrumentation and Methods for Astrophysics, Physics - Physics Education},
	Month = nov,
	Primaryclass = {astro-ph.IM},
	Title = {{Evaluation of a College Freshman Diversity Research Program}},
	Year = 2013,
	Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAoLi4vLi4vLi4vRG9jdW1lbnRzL1BhcGVycy9HYXJuZXIyMDEzLnBkZk8RAVIAAAAAAVIAAgAADE1hY2ludG9zaCBIRAAAAAAAAAAAAAAAAAAAAAAAAABCRAAB/////w5HYXJuZXIyMDEzLnBkZgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAAAAAAAAAAAAMAAwAACiBjdQAAAAAAAAAAAAAAAAAGUGFwZXJzAAIALS86VXNlcnM6c2FyYWg6RG9jdW1lbnRzOlBhcGVyczpHYXJuZXIyMDEzLnBkZgAADgAeAA4ARwBhAHIAbgBlAHIAMgAwADEAMwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIAK1VzZXJzL3NhcmFoL0RvY3VtZW50cy9QYXBlcnMvR2FybmVyMjAxMy5wZGYAABMAAS8AABUAAgAM//8AAAAIAA0AGgAkAE8AAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAABpQ==}}

@inproceedings{Schmidt2016b,
	Abstract = {We examine the gender balance of the 18th and 19th meetings of the Cambridge Workshop on Cool Stellar Systems and the Sun (CS18 and CS19). The percent of female attendees at both meetings (31% at CS18 and 37% at CS19) was higher than the percent of women in the American Astronomical Society (25%) and the International Astronomical Union (18%). The representation of women in Cool Stars as SOC members, invited speakers, and contributed speakers was similar to or exceeded the percent of women attending the meetings. We requested that conference attendees assist in a project to collect data on the gender of astronomers asking questions after talks. Using this data, we found that men were over-represented (and women were under-represented) in the question sessions after each talk. Men asked 79% of the questions at CS18 and 75% of the questions at CS19, but were 69% and 63% of the attendees respectively. Contrary to findings from previous conferences, we did not find that the gender balance of questions was strongly affected by the session chair gender, the speaker gender, or the length of the question period. We also found that female and male speakers were asked a comparable number of questions after each talk. The contrast of these results from previous incarnations of the gender questions survey indicate that more data would be useful in understanding the factors that contribute to the gender balance of question askers. We include a preliminary set of recommendations based on this and other work on related topics, but also advocate for additional research on the demographics of conference participants. Additional data on the intersection of gender with race, seniority, sexual orientation, ability and other marginalized identities is necessary to fully address the role of gender in asking questions at conferences.},
	Adsnote = {Provided by the SAO/NASA Astrophysics Data System},
	Adsurl = {http://ads.ari.uni-heidelberg.de/abs/2016csss.confE.155T},
	Archiveprefix = {arXiv},
	Arxivurl = {http://arxiv.org/abs/1704.05260},
	Author = {{Schmidt}, S.~J. and {Douglas}, S. and {Gosnell}, N.~M. and {Muirhead}, P.~S. and {Booth}, R.~S. and {Davenport}, J.~R.~A. and {Mace}, G.~N.},
	Booktitle = {19th Cambridge Workshop on Cool Stars, Stellar Systems, and the Sun (CS19)},
	Date-Added = {2019-09-10 12:02:35 +0200},
	Date-Modified = {2019-09-10 12:04:09 +0200},
	Doi = {10.5281/zenodo.546881},
	Eid = {155},
	Eprint = {1704.05260},
	Group = {genderq},
	Keywords = {Gender, Equity and Inclusion, Scientific Meetings},
	Month = dec,
	Pages = {155},
	Primaryclass = {astro-ph.IM},
	Title = {{The Role Of Gender In Asking Questions At Cool Stars 18 And 19}},
	Year = 2016,
	Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAqLi4vLi4vLi4vRG9jdW1lbnRzL1BhcGVycy9TY2htaWR0MjAxNmIucGRmTxEBWgAAAAABWgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAAAAAAEJEAAH/////EFNjaG1pZHQyMDE2Yi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAwADAAAKIGN1AAAAAAAAAAAAAAAAAAZQYXBlcnMAAgAvLzpVc2VyczpzYXJhaDpEb2N1bWVudHM6UGFwZXJzOlNjaG1pZHQyMDE2Yi5wZGYAAA4AIgAQAFMAYwBoAG0AaQBkAHQAMgAwADEANgBiAC4AcABkAGYADwAaAAwATQBhAGMAaQBuAHQAbwBzAGgAIABIAEQAEgAtVXNlcnMvc2FyYWgvRG9jdW1lbnRzL1BhcGVycy9TY2htaWR0MjAxNmIucGRmAAATAAEvAAAVAAIADP//AAAACAANABoAJABRAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAa8=},
	Bdsk-Url-1 = {https://dx.doi.org/10.5281/zenodo.546881},
	Bdsk-Url-2 = {http://arxiv.org/abs/1704.05260},
	Bdsk-Url-3 = {http://ads.ari.uni-heidelberg.de/abs/2016csss.confE.155T}}

@article{Schmidt2017a,
	Abstract = {Over the last decade, significant attention has been drawn to the gender ratio of speakers at conferences, with ongoing efforts for meetings to better reflect the gender representation in the field. We find that women are significantly under-represented, however, among the astronomers asking questions after talks.},
	Adsnote = {Provided by the SAO/NASA Astrophysics Data System},
	Adsurl = {http://ads.ari.uni-heidelberg.de/abs/2017NatAs...1E.153S},
	Archiveprefix = {arXiv},
	Arxivurl = {http://arxiv.org/abs/1708.02775},
	Author = {{Schmidt}, S.~J. and {Davenport}, J.~R.~A.},
	Date-Added = {2019-09-10 12:02:24 +0200},
	Date-Modified = {2019-09-10 12:04:17 +0200},
	Doi = {10.1038/s41550-017-0153},
	Eid = {0153},
	Eprint = {1708.02775},
	Group = {genderq},
	Journal = {Nature Astronomy},
	Month = jun,
	Pages = {0153},
	Primaryclass = {astro-ph.IM},
	Title = {{Who asks questions at astronomy meetings?}},
	Volume = 1,
	Year = 2017,
	Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxApLi4vLi4vLi4vRG9jdW1lbnRzL1BhcGVycy9TY2htaWR0MjAxNy5wZGZPEQFUAAAAAAFUAAIAAAxNYWNpbnRvc2ggSEQAAAAAAAAAAAAAAAAAAAAAAAAAQkQAAf////8PU2NobWlkdDIwMTcucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////wAAAAAAAAAAAAAAAAADAAMAAAogY3UAAAAAAAAAAAAAAAAABlBhcGVycwACAC4vOlVzZXJzOnNhcmFoOkRvY3VtZW50czpQYXBlcnM6U2NobWlkdDIwMTcucGRmAA4AIAAPAFMAYwBoAG0AaQBkAHQAMgAwADEANwAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIALFVzZXJzL3NhcmFoL0RvY3VtZW50cy9QYXBlcnMvU2NobWlkdDIwMTcucGRmABMAAS8AABUAAgAM//8AAAAIAA0AGgAkAFAAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAABqA==},
	Bdsk-Url-1 = {https://dx.doi.org/10.1038/s41550-017-0153},
	Bdsk-Url-2 = {http://arxiv.org/abs/1708.02775},
	Bdsk-Url-3 = {http://ads.ari.uni-heidelberg.de/abs/2017NatAs...1E.153S}}

branch_name: refs/heads/main

gha_license_id: MIT

gha_language: HTML

extension: bib


text:
package scan

const (
	RuneError    = '\uFFFD'
	MaxRune      = '\U0010FFFF'
	RuneSelf     = 0x80
	surrogateMin = 0xD800
	surrogateMax = 0xDFFF
	t1           = 0x00 // 0000 0000
	tx           = 0x80 // 1000 0000
	t2           = 0xC0 // 1100 0000
	t3           = 0xE0 // 1110 0000
	t4           = 0xF0 // 1111 0000
	t5           = 0xF8 // 1111 1000

	maskx = 0x3F // 0011 1111
	mask2 = 0x1F // 0001 1111
	mask3 = 0x0F // 0000 1111
	mask4 = 0x07 // 0000 0111

	rune1Max = 1<<7 - 1
	rune2Max = 1<<11 - 1
	rune3Max = 1<<16 - 1
)

type Matcher interface {
	Match(buf []byte) (int, bool)
	String() string
}

func (s *CharSet) Match(buf []byte) (int, bool) {
	if len(buf) == 0 {
		return 0, false
	}
	if s.a.contains(buf[0]) {
		return 1, true
	}
	r, size := decode(buf)
	if r != RuneError && s.u.contains(r) {
		return size, true
	}
	return 0, false
}
func decode(p []byte) (r rune, size int) {
	n := len(p)
	if n < 1 {
		return RuneError, 0
	}
	c0 := p[0]

	// 1-byte, 7-bit sequence?
	if c0 < tx {
		return rune(c0), 1
	}

	// unexpected
	// continuation byte?
	if c0 < t2 {
		return RuneError, 1
	}

	// need
	// first
	// continuation
	// byte
	if n < 2 {
		return RuneError, 1
	}
	c1 := p[1]
	if c1 < tx || t2 <= c1 {
		return RuneError, 1
	}

	// 2-byte,
	// 11-bit
	// sequence?
	if c0 < t3 {
		r = rune(c0&mask2)<<6 | rune(c1&maskx)
		if r <= rune1Max {
			return RuneError, 1
		}
		return r, 2
	}

	// need
	// second
	// continuation
	// byte
	if n < 3 {
		return RuneError, 1
	}
	c2 := p[2]
	if c2 < tx || t2 <= c2 {
		return RuneError, 1
	}

	// 3-byte,
	// 16-bit
	// sequence?
	if c0 < t4 {
		r = rune(c0&mask3)<<12 | rune(c1&maskx)<<6 | rune(c2&maskx)
		if r <= rune2Max {
			return RuneError, 1
		}
		if surrogateMin <= r && r <= surrogateMax {
			return RuneError, 1
		}
		return r, 3
	}

	// need
	// third
	// continuation
	// byte
	if n < 4 {
		return RuneError, 1
	}
	c3 := p[3]
	if c3 < tx || t2 <= c3 {
		return RuneError, 1
	}

	// 4-byte,
	// 21-bit
	// sequence?
	if c0 < t5 {
		r = rune(c0&mask4)<<18 | rune(c1&maskx)<<12 | rune(c2&maskx)<<6 | rune(c3&maskx)
		if r <= rune3Max || MaxRune < r {
			return RuneError, 1
		}
		return r, 4
	}

	// error
	return RuneError, 1
}
func (s *unicodeSet) contains(r rune) bool {
	for _, rg := range *s {
		if rg.s <= r && r <= rg.e {
			return true
		}
	}
	return false
}
func (r *asciiSet) contains(b byte) bool {
	if b < 64 {
		return r[0]&(1<<b) != 0
	} else if b < RuneSelf {
		return r[1]&(1<<(b-64)) != 0
	}
	return false
}

func (l *Literal) Match(buf []byte) (int, bool) {
	if len(buf) < len(l.a) {
		return 0, false
	}
	for i := range l.a {
		if l.a[i] != buf[i] {
			return 0, false
		}
	}
	return len(l.a), true
}

func (s *Sequence) Match(buf []byte) (int, bool) {
	p := 0
	for _, m := range s.ms {
		if size, ok := m.Match(buf[p:]); ok {
			p += size
		} else {
			return 0, false
		}
	}
	return p, true
}

func (s *Choice) Match(buf []byte) (int, bool) {
	for _, m := range s.ms {
		if size, ok := m.Match(buf); ok {
			return size, true
		}
	}
	return 0, false
}

func (r *Repetition) Match(buf []byte) (int, bool) {
	p, n := 0, 0
	for {
		if r.sentinel != nil && n >= r.min {
			if size, ok := r.sentinel.Match(buf[p:]); ok {
				p += size
				break
			}
		}
		if n == r.max {
			break
		}
		if size, ok := r.m.Match(buf[p:]); ok {
			p += size
			n++
		} else {
			break
		}
	}
	if r.min <= n && n <= r.max {
		return p, true
	}
	return 0, false
}

extension: go


text:
package aliqin

import (
	"net/url"

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

// AlibabaAliqinFcIotCardStatusAPIRequest 物联卡状态查询 API请求
// alibaba.aliqin.fc.iot.cardStatus
//
// 物联卡状态查询
type AlibabaAliqinFcIotCardStatusAPIRequest struct {
	model.Params
	// SIM卡号
	_iccid string
}

// NewAlibabaAliqinFcIotCardStatusRequest 初始化AlibabaAliqinFcIotCardStatusAPIRequest对象
func NewAlibabaAliqinFcIotCardStatusRequest() *AlibabaAliqinFcIotCardStatusAPIRequest {
	return &AlibabaAliqinFcIotCardStatusAPIRequest{
		Params: model.NewParams(),
	}
}

// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaAliqinFcIotCardStatusAPIRequest) GetApiMethodName() string {
	return "alibaba.aliqin.fc.iot.cardStatus"
}

// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaAliqinFcIotCardStatusAPIRequest) GetApiParams(params url.Values) {
	for k, v := range r.Params {
		params.Set(k, v.String())
	}
}

// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaAliqinFcIotCardStatusAPIRequest) GetRawParams() model.Params {
	return r.Params
}

// SetIccid is Iccid Setter
// SIM卡号
func (r *AlibabaAliqinFcIotCardStatusAPIRequest) SetIccid(_iccid string) error {
	r._iccid = _iccid
	r.Set("iccid", _iccid)
	return nil
}

// GetIccid Iccid Getter
func (r AlibabaAliqinFcIotCardStatusAPIRequest) GetIccid() string {
	return r._iccid
}

repository: bububa/opentaobao

repo_name: bububa/opentaobao

gha_language: Go


text:
@ARTICLE{benzid,
author={R. Benzid},
journal={Electronics Letters},
title={Lossless compression of binary image using move-to-front transform and two-role encoder},
year={2011},
volume={47},
number={2},
pages={104-105},
doi={10.1049/el.2010.2362},
}

@book{H264,
	author = {Richardson, Iain E.},
	title = {The H.264 Advanced Video Compression Standard},
	year = {2010},
	edition = {2nd},
	publisher = {Wiley Publishing},
}

repository: mpetitjean/BilevelImageCompression

repo_name: mpetitjean/BilevelImageCompression


text:
DESCRIPTION = "A small XML pull parser, specially designed for constrained environments such as Applets, Personal Java or MIDP devices"
HOMEPAGE = "http://kxml.sourceforge.net"
PRIORITY = "optional"
SECTION = "libs"
LICENSE = "BSD CPL LGPL"
PR = "r2"

inherit java-library

DEPENDS = "xmlpull"
RDEPENDS_${PN} = "libxmlpull-java"

JAR = "${PN}-${PV}.jar"

SRC_URI = "\
    ${SOURCEFORGE_MIRROR}/kxml/${PN}-src-${PV}.zip;subdir=${BPN}-${PV} \
    file://makefile.patch \
    "

do_compile() {
 oe_runmake -C src \
    JAVAC_FLAGS="-sourcepath . -cp ${STAGING_DATADIR}/java/xmlpull.jar" \
    JAR="oefatal \"No jar invocation expected here.\"" \

 oe_runmake -C src \
    JAVAC="oefatal \"No Java compilation expected here.\"" \
    jar
}

do_stage() {
  oe_jarinstall -s src/${JAR} ${PN}.jar
}

do_install() {
  oe_jarinstall src/${JAR} ${PN}.jar
}

SRC_URI[md5sum] = "cb830720148bad0c555a02b27e1e7f9a"
SRC_URI[sha256sum] = "f2441575236be69a460c6a54344b6ba8b8ba03fd0bab242b989f4f0976944cd8"

repository: overo/overo-oe-natty

repo_name: overo/overo-oe-natty

branch_name: HEAD

extension: bb


text:
package main

import (
	"./edn"
	"fmt"
)

func main() {
	for {
		fmt.Print(">> ")

		var input string
		fmt.Scanf("%s", &input)
		edn.Read(&input)
	}
}

repository: thy-chan/gojure

repo_name: thy-chan/gojure


text:
# Copyright (C) 2020 Senzacarta

SUMMARY = "U-Boot bootloader with support for SenzaCarta Board"

DESCRIPTION = "U-Boot bootloader with support for SenzaCarta Board. \
               Contact MAINTAINER for more support."

require u-boot-common.inc
require recipes-bsp/u-boot/u-boot.inc
inherit pythonnative

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

PROVIDES += "u-boot"
DEPENDS_append = " dtc-native"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"

UBOOT_SRC ?= "git://github.com/econote/u-boot-senzacarta.git;protocol=https"
SRCBRANCH = "zeus"
SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
SRCREV = "b518c602f7ebef38ad79b8f895af1e8eb37e8998"

S = "${WORKDIR}/git"

inherit fsl-u-boot-localversion

LOCALVERSION ?= "-5.4.24-2.1.0"

BOOT_TOOLS = "imx-boot-tools"

PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx7|imx7dsenzacarta)"

UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
UBOOT_NAME_imx7dsenzacarta = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"

repository: econote/meta-senzacarta-zeus

repo_name: econote/meta-senzacarta-zeus


text:
package main

import (
	"flag"
	"fmt"
	"github.com/xyproto/distrodetector"
)

const versionString = "distro 1.0"

func main() {
	nFlag := flag.Bool("n", false, "output only the detected distro name")
	aFlag := flag.Bool("a", false, "output a combined string with all available information")
	vFlag := flag.Bool("v", false, "version info")
	flag.Parse()

	if *vFlag {
		fmt.Println(versionString)
		return
	}

	distro := distrodetector.New()
	if *nFlag {
		fmt.Println(distro.Name())
		return
	}
	if *aFlag {
		fmt.Println(distro)
		return
	}
	// Output that should be possible to use as a drop-in replacement for python-distro
	name := distro.Name()
	version := distro.Version()
	if version == "" {
		version = "n/a"
	}
	codename := distro.Codename()
	if codename == "" {
		codename = "n/a"
	}
	fmt.Printf("Name: %s\nVersion: %s\nCodename: %s\n", name, version, codename)
}

repository: xyproto/distrodetector

repo_name: xyproto/distrodetector


text:
include neutrino-plugins-ni-env.inc

DESCRIPTION = "Automatisches Anlegen von Rec/Zap-Timern"

SUB_PATH = "scripts-sh/plugins/${PLUGIN_NAME}"

repository: neutrino-hd/meta-neutrino

repo_name: neutrino-hd/meta-neutrino

gha_language: BitBake


text:
package main

import "fmt"

func main() {
	var s string
	s = "how are you?"
	s = `how are you?`

	fmt.Println(s)

	s = "\n\t\"hello\"\n"
	fmt.Println(s)

	s = `

	<bode>"hello"
`
	fmt.Println(s)

	fmt.Println("c:\\my\\dir\\file")  // String literal (Single line, processed)
	fmt.Println(`c:\my\dir\file`) // Raw string literal (Multi line unprocessed)
}


text:
@article{lilis2017automatic,
	Author = {Lilis, G. N. and Giannakis, G. I. and Rovas, D. V.},
	Date-Added = {2018-11-25 18:59:44 +0100},
	Date-Modified = {2018-11-25 19:00:01 +0100},
	Journal = {Automation in Construction},
	Pages = {108--124},
	Publisher = {Elsevier},
	Title = {Automatic generation of second-level space boundary topology from IFC geometry inputs},
	Volume = {76},
	Year = {2017}}

@phdthesis{treeck2004simulation,
	Author = {van~Treeck, C. A.},
	Date-Added = {2018-11-25 18:51:57 +0100},
	Date-Modified = {2018-11-25 18:56:43 +0100},
	Month = {May},
	School = {{T}echnische {U}niversit\"at {M}\"unchen},
	Title = {Geb\"audemodell-basierte {S}imulation von {R}aumluftst\"omungen},
	Type = {Dissertation},
	Year = {2004}}

@misc{treeck2010introduction,
	Author = {van~Treeck, C. A.},
	Date-Added = {2018-11-25 18:47:54 +0100},
	Date-Modified = {2018-11-25 18:50:49 +0100},
	Howpublished = {Habilitationsschrift},
	Month = {February},
	Title = {Introduction to Building Performance Modeling and Simulation},
	Year = {2010}}

@inproceedings{bazjanac2010requirements,
	Author = {Bazjanac, V.},
	Booktitle = {CIB W78: 27th International Conference},
	Date-Added = {2015-12-02 07:52:21 +0000},
	Date-Modified = {2018-11-25 18:51:17 +0100},
	Title = {Space boundary requirements for modeling of building geometry for energy and other performance simulation},
	Year = {2010}}

@article{rose2013algorithm,
	Author = {Rose, C. M. and Bazjanac, V.},
	Date-Modified = {2016-03-29 12:28:24 +0000},
	Journal = {Engineering with Computers},
	Number = {2},
	Pages = {271--280},
	Publisher = {Springer},
	Title = {An algorithm to generate space boundaries for building energy simulation},
	Volume = {31},
	Year = {2013}}


text:
package services

import (
	"fmt"
	"learn_Iris/respositories"
)

type MovieService interface {
	//业务逻辑类
	ShowMovieName() string
}

type MovieServiceManger struct {
	repo respositories.MovieRespository
}

func NewMovieServiceManger(repo respositories.MovieRespository) MovieService {
	return &MovieServiceManger{
		repo:repo,
	}
}

func (m *MovieServiceManger) ShowMovieName() string {
	fmt.Println("我们获取的视频" + m.repo.GetMovieName())
	return "我们获取的视频" + m.repo.GetMovieName()
}


text:
/************************************************************************************
**
**  BSD 3-Clause License
**
**  Copyright (c) 2019, shaoguang. All rights reserved.
**
**  Redistribution and use in source and binary forms, with or without
**  modification, are permitted provided that the following conditions are met:
**
**  1. Redistributions of source code must retain the above copyright notice, this
**     list of conditions and the following disclaimer.
**
**  2. Redistributions in binary form must reproduce the above copyright notice,
**     this list of conditions and the following disclaimer in the documentation
**     and/or other materials provided with the distribution.
**
**  3. Neither the name of the copyright holder nor the names of its
**     contributors may be used to endorse or promote products derived from
**     this software without specific prior written permission.
**
**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
**  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
**  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
**  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
**  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
**  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
**  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
**  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
**  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
**  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
************************************************************************************/

#ifndef UTILS4CPP_STR_STRINGGLOBAL_HPP
#define UTILS4CPP_STR_STRINGGLOBAL_HPP

#include <string>

#include "utils4cpp/core/Core.hpp"

namespace utils4cpp {

/*!
    \brief string libraries.
    \since v0.0
*/
namespace str {

/*! Indicates case sensitive or not. */
enum CaseSensitivity {
    CaseInsensitive,                ///< Case insensitive.  (no)
    CaseSensitive                   ///< Case sensitive.    (yes)
};

/*!
    Swap char \a a and \a b with no intermediate variable.
*/
template<typename CharT>
inline void swapChar(CharT &a, CharT& b) noexcept
{
    a = a ^ b;
    b = a ^ b;
    a = a ^ b;
}

} // namespace str
} // namespace utils4cpp

#endif

extension: hpp


text:
package mars

import (
	"io/ioutil"
	"log"
	"net/http"
	"net/http/httptest"
	"strings"
	"testing"
)

func TestPanicInAction(t *testing.T) {
	startFakeBookingApp()
	TRACE = log.New(ioutil.Discard, "", 0)
	INFO = TRACE
	WARN = TRACE
	ERROR = TRACE
	DevMode = false

	ts := httptest.NewServer(Handler)
	defer ts.Close()

	res, err := http.Get(ts.URL + "/boom")
	if err != nil {
		log.Fatal(err)
	}
	resp, err := ioutil.ReadAll(res.Body)
	res.Body.Close()
	if err != nil {
		log.Fatal(err)
	}

	if !strings.Contains(string(resp), "OMG") {
		t.Error("Unable to get panic description, got:\n", resp)
	}
}

func containsAll(raw []byte, list ...string) bool {
	s := string(raw)
	for _, i := range list {
		if !strings.Contains(s, i) {
			return false
		}
	}

	return true
}

func TestPanicInDevMode(t *testing.T) {
	startFakeBookingApp()
	TRACE = log.New(ioutil.Discard, "", 0)
	INFO = TRACE
	WARN = TRACE
	ERROR = TRACE
	DevMode = true

	ts := httptest.NewServer(Handler)
	defer ts.Close()

	res, err := http.Get(ts.URL + "/boom")
	if err != nil {
		log.Fatal(err)
	}
	resp, err := ioutil.ReadAll(res.Body)
	res.Body.Close()
	if err != nil {
		log.Fatal(err)
	}

	if !containsAll(resp,
		"mars/fakeapp_test.go",
		"Hotels.Boom",
		"OMG") {
		t.Error("Unable to get full panic info, got:\n", string(resp))
	}
}

repository: roblillack/mars

repo_name: roblillack/mars


text:
/**
	* \file CrdWzskNav.h
	* job handler for job CrdWzskNav (declarations)
	* \copyright (C) 2016-2020 MPSI Technologies GmbH
	* \author Emily Johnson (auto-generation)
	* \date created: 5 Dec 2020
	*/
// IP header --- ABOVE

#ifndef CRDWZSKNAV_H
#define CRDWZSKNAV_H

// IP include.spec --- INSERT

// IP include.cust --- INSERT

#include "PnlWzskNavGlry.h"
#include "PnlWzskNavAdmin.h"
#include "PnlWzskNavOp.h"
#include "PnlWzskNavHeadbar.h"
#include "PnlWzskNavPre.h"
#include "DlgWzskNavLoaini.h"

#define VecVWzskNavDo CrdWzskNav::VecVDo
#define VecVWzskNavSge CrdWzskNav::VecVSge

#define ContInfWzskNav CrdWzskNav::ContInf
#define StatAppWzskNav CrdWzskNav::StatApp
#define StatShrWzskNav CrdWzskNav::StatShr
#define TagWzskNav CrdWzskNav::Tag

#define DpchAppWzskNavDo CrdWzskNav::DpchAppDo
#define DpchEngWzskNavData CrdWzskNav::DpchEngData

/**
	* CrdWzskNav
	*/
class CrdWzskNav : public JobWzsk {

public:
	/**
		* VecVDo (full: VecVWzskNavDo)
		*/
	class VecVDo {

	public:
		static const Sbecore::uint CLOSE = 1;
		static const Sbecore::uint MITAPPABTCLICK = 2;
		static const Sbecore::uint MITSESSPSCLICK = 3;
		static const Sbecore::uint MITSESTRMCLICK = 4;
		static const Sbecore::uint MITCRDUSGCLICK = 5;
		static const Sbecore::uint MITCRDUSRCLICK = 6;
		static const Sbecore::uint MITCRDPRSCLICK = 7;
		static const Sbecore::uint MITCRDSCFCLICK = 8;
		static const Sbecore::uint MITCRDLLVCLICK = 9;
		static const Sbecore::uint MITCRDLIVCLICK = 10;
		static const Sbecore::uint MITCRDOGRCLICK = 11;
		static const Sbecore::uint MITCRDOBJCLICK = 12;
		static const Sbecore::uint MITCRDSESCLICK = 13;
		static const Sbecore::uint MITCRDSHTCLICK = 14;
		static const Sbecore::uint MITCRDFILCLICK = 15;
		static const Sbecore::uint MITAPPLOICLICK = 16;

		static Sbecore::uint getIx(const std::string& sref);
		static std::string getSref(const Sbecore::uint ix);
	};

	/**
		* VecVSge (full: VecVWzskNavSge)
		*/
	class VecVSge {

	public:
		static const Sbecore::uint IDLE = 1;
		static const Sbecore::uint ALRWZSKABT = 2;
		static const Sbecore::uint ALRWZSKTRM = 3;

		static Sbecore::uint getIx(const std::string& sref);
		static std::string getSref(const Sbecore::uint ix);

		static void fillFeed(Sbecore::Feed& feed);
	};

	/**
	  * ContInf (full: ContInfWzskNav)
	  */
	class ContInf : public Sbecore::Block {

	public:
		static const Sbecore::uint NUMFSGE = 1;
		static const Sbecore::uint MRLAPPHLP = 2;
		static const Sbecore::uint MTXSESSES1 = 3;
		static const Sbecore::uint MTXSESSES2 = 4;
		static const Sbecore::uint MTXSESSES3 = 5;

	public:
		ContInf(const Sbecore::uint numFSge = 1, const std::string& MrlAppHlp = "", const std::string& MtxSesSes1 = "", const std::string& MtxSesSes2 = "", const std::string& MtxSesSes3 = "");

	public:
		Sbecore::uint numFSge;
		std::string MrlAppHlp;
		std::string MtxSesSes1;
		std::string MtxSesSes2;
		std::string MtxSesSes3;

	public:
		void writeJSON(Json::Value& sup, std::string difftag = "");
		void writeXML(xmlTextWriter* wr, std::string difftag = "", bool shorttags = true);
		std::set<Sbecore::uint> comm(const ContInf* comp);
		std::set<Sbecore::uint> diff(const ContInf* comp);
	};

	/**
		* StatApp (full: StatAppWzskNav)
		*/
	class StatApp {

	public:
		static void writeJSON(Json::Value& sup, std::string difftag = "", const Sbecore::uint ixWzskVReqitmode = VecWzskVReqitmode::IDLE, const Sbecore::usmallint latency = 5, const std::string& shortMenu = "", const Sbecore::uint widthMenu = 0, const bool initdoneHeadbar = false, const bool initdonePre = false, const bool initdoneAdmin = false, const bool initdoneOp = false, const bool initdoneGlry = false);
		static void writeXML(xmlTextWriter* wr, std::string difftag = "", bool shorttags = true, const Sbecore::uint ixWzskVReqitmode = VecWzskVReqitmode::IDLE, const Sbecore::usmallint latency = 5, const std::string& shortMenu = "", const Sbecore::uint widthMenu = 0, const bool initdoneHeadbar = false, const bool initdonePre = false, const bool initdoneAdmin = false, const bool initdoneOp = false, const bool initdoneGlry = false);
	};

	/**
		* StatShr (full: StatShrWzskNav)
		*/
	class StatShr : public Sbecore::Block {

	public:
		static const Sbecore::uint JREFDLGLOAINI = 1;
		static const Sbecore::uint JREFHEADBAR = 2;
		static const Sbecore::uint JREFPRE = 3;
		static const Sbecore::uint PNLPREAVAIL = 4;
		static const Sbecore::uint JREFADMIN = 5;
		static const Sbecore::uint PNLADMINAVAIL = 6;
		static const Sbecore::uint JREFOP = 7;
		static const Sbecore::uint PNLOPAVAIL = 8;
		static const Sbecore::uint JREFGLRY = 9;
		static const Sbecore::uint PNLGLRYAVAIL = 10;
		static const Sbecore::uint MITSESSPSAVAIL = 11;
		static const Sbecore::uint MSPCRD1AVAIL = 12;
		static const Sbecore::uint MITCRDUSGAVAIL = 13;
		static const Sbecore::uint MITCRDUSRAVAIL = 14;
		static const Sbecore::uint MITCRDPRSAVAIL = 15;
		static const Sbecore::uint MITCRDSCFAVAIL = 16;
		static const Sbecore::uint MSPCRD2AVAIL = 17;
		static const Sbecore::uint MITCRDLLVAVAIL = 18;
		static const Sbecore::uint MITCRDLIVAVAIL = 19;
		static const Sbecore::uint MSPCRD3AVAIL = 20;
		static const Sbecore::uint MITCRDOGRAVAIL = 21;
		static const Sbecore::uint MITCRDOBJAVAIL = 22;
		static const Sbecore::uint MITCRDSESAVAIL = 23;
		static const Sbecore::uint MITCRDSHTAVAIL = 24;
		static const Sbecore::uint MITCRDFILAVAIL = 25;
		static const Sbecore::uint MSPAPP2AVAIL = 26;
		static const Sbecore::uint MITAPPLOIAVAIL = 27;

	public:
		StatShr(const Sbecore::ubigint jrefDlgloaini = 0, const Sbecore::ubigint jrefHeadbar = 0, const Sbecore::ubigint jrefPre = 0, const bool pnlpreAvail = false, const Sbecore::ubigint jrefAdmin = 0, const bool pnladminAvail = false, const Sbecore::ubigint jrefOp = 0, const bool pnlopAvail = false, const Sbecore::ubigint jrefGlry = 0, const bool pnlglryAvail = false, const bool MitSesSpsAvail = true, const bool MspCrd1Avail = true, const bool MitCrdUsgAvail = true, const bool MitCrdUsrAvail = true, const bool MitCrdPrsAvail = true, const bool MitCrdScfAvail = true, const bool MspCrd2Avail = true, const bool MitCrdLlvAvail = true, const bool MitCrdLivAvail = true, const bool MspCrd3Avail = true, const bool MitCrdOgrAvail = true, const bool MitCrdObjAvail = true, const bool MitCrdSesAvail = true, const bool MitCrdShtAvail = true, const bool MitCrdFilAvail = true, const bool MspApp2Avail = true, const bool MitAppLoiAvail = true);

	public:
		Sbecore::ubigint jrefDlgloaini;
		Sbecore::ubigint jrefHeadbar;
		Sbecore::ubigint jrefPre;
		bool pnlpreAvail;
		Sbecore::ubigint jrefAdmin;
		bool pnladminAvail;
		Sbecore::ubigint jrefOp;
		bool pnlopAvail;
		Sbecore::ubigint jrefGlry;
		bool pnlglryAvail;
		bool MitSesSpsAvail;
		bool MspCrd1Avail;
		bool MitCrdUsgAvail;
		bool MitCrdUsrAvail;
		bool MitCrdPrsAvail;
		bool MitCrdScfAvail;
		bool MspCrd2Avail;
		bool MitCrdLlvAvail;
		bool MitCrdLivAvail;
		bool MspCrd3Avail;
		bool MitCrdOgrAvail;
		bool MitCrdObjAvail;
		bool MitCrdSesAvail;
		bool MitCrdShtAvail;
		bool MitCrdFilAvail;
		bool MspApp2Avail;
		bool MitAppLoiAvail;

	public:
		void writeJSON(Json::Value& sup, std::string difftag = "");
		void writeXML(xmlTextWriter* wr, std::string difftag = "", bool shorttags = true);
		std::set<Sbecore::uint> comm(const StatShr* comp);
		std::set<Sbecore::uint> diff(const StatShr* comp);
	};

	/**
		* Tag (full: TagWzskNav)
		*/
	class Tag {

	public:
		static void writeJSON(const Sbecore::uint ixWzskVLocale, Json::Value& sup, std::string difftag = "");
		static void writeXML(const Sbecore::uint ixWzskVLocale, xmlTextWriter* wr, std::string difftag = "", bool shorttags = true);
	};

	/**
		* DpchAppDo (full: DpchAppWzskNavDo)
		*/
	class DpchAppDo : public DpchAppWzsk {

	public:
		static const Sbecore::uint JREF = 1;
		static const Sbecore::uint IXVDO = 2;

	public:
		DpchAppDo();

	public:
		Sbecore::uint ixVDo;

	public:
		std::string getSrefsMask();

		void readJSON(const Json::Value& sup, bool addbasetag = false);
		void readXML(xmlXPathContext* docctx, std::string basexpath = "", bool addbasetag = false);
	};

	/**
		* DpchEngData (full: DpchEngWzskNavData)
		*/
	class DpchEngData : public DpchEngWzsk {

	public:
		static const Sbecore::uint JREF = 1;
		static const Sbecore::uint CONTINF = 2;
		static const Sbecore::uint FEEDFSGE = 3;
		static const Sbecore::uint STATAPP = 4;
		static const Sbecore::uint STATSHR = 5;
		static const Sbecore::uint TAG = 6;
		static const Sbecore::uint ALL = 7;

	public:
		DpchEngData(const Sbecore::ubigint jref = 0, ContInf* continf = NULL, Sbecore::Feed* feedFSge = NULL, StatShr* statshr = NULL, const std::set<Sbecore::uint>& mask = {NONE});

	public:
		ContInf continf;
		Sbecore::Feed feedFSge;
		StatShr statshr;

	public:
		std::string getSrefsMask();
		void merge(DpchEngWzsk* dpcheng);

		void writeJSON(const Sbecore::uint ixWzskVLocale, Json::Value& sup);
		void writeXML(const Sbecore::uint ixWzskVLocale, xmlTextWriter* wr);
	};

	bool evalPnlpreAvail(DbsWzsk* dbswzsk);
	bool evalPnladminAvail(DbsWzsk* dbswzsk);
	bool evalPnlopAvail(DbsWzsk* dbswzsk);
	bool evalPnlglryAvail(DbsWzsk* dbswzsk);
	bool evalMitSesSpsAvail(DbsWzsk* dbswzsk);
	bool evalMspCrd1Avail(DbsWzsk* dbswzsk);
	bool evalMitCrdUsgAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdUsrAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdPrsAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdScfAvail(DbsWzsk* dbswzsk);
	bool evalMspCrd2Avail(DbsWzsk* dbswzsk);
	bool evalMitCrdLlvAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdLivAvail(DbsWzsk* dbswzsk);
	bool evalMspCrd3Avail(DbsWzsk* dbswzsk);
	bool evalMitCrdOgrAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdObjAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdSesAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdShtAvail(DbsWzsk* dbswzsk);
	bool evalMitCrdFilAvail(DbsWzsk* dbswzsk);
	bool evalMspApp2Avail(DbsWzsk* dbswzsk);
	bool evalMitAppLoiAvail(DbsWzsk* dbswzsk);

public:
	CrdWzskNav(XchgWzsk* xchg, DbsWzsk* dbswzsk, const Sbecore::ubigint jrefSup, const Sbecore::uint ixWzskVLocale);
	~CrdWzskNav();

public:
	ContInf continf;
	StatShr statshr;

	Sbecore::Feed feedFMcbAlert;
	Sbecore::Feed feedFSge;

	PnlWzskNavGlry* pnlglry;
	PnlWzskNavAdmin* pnladmin;
	PnlWzskNavOp* pnlop;
	PnlWzskNavHeadbar* pnlheadbar;
	PnlWzskNavPre* pnlpre;
	DlgWzskNavLoaini* dlgloaini;

	// IP vars.cust --- INSERT

public:
	// IP cust --- INSERT

public:
	DpchEngWzsk* getNewDpchEng(std::set<Sbecore::uint> items);
	void refresh(DbsWzsk* dbswzsk, std::set<Sbecore::uint>& moditems, const bool unmute = false);
	void updatePreset(DbsWzsk* dbswzsk, const Sbecore::uint ixWzskVPreset, const Sbecore::ubigint jrefTrig, const bool notif = false);
	void warnTerm(DbsWzsk* dbswzsk);

public:

public:
	void handleRequest(DbsWzsk* dbswzsk, ReqWzsk* req);

private:

	void handleDpchAppWzskInit(DbsWzsk* dbswzsk, DpchAppWzskInit* dpchappwzskinit, DpchEngWzsk** dpcheng);

	void handleDpchAppDoClose(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitAppAbtClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitSesSpsClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitSesTrmClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdUsgClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdUsrClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdPrsClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdScfClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdLlvClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdLivClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdOgrClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdObjClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdSesClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdShtClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitCrdFilClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppDoMitAppLoiClick(DbsWzsk* dbswzsk, DpchEngWzsk** dpcheng);
	void handleDpchAppWzskAlert(DbsWzsk* dbswzsk, DpchAppWzskAlert* dpchappwzskalert, DpchEngWzsk** dpcheng);

public:
	void handleCall(DbsWzsk* dbswzsk, Sbecore::Call* call);

private:
	bool handleCallWzskDlgClose(DbsWzsk* dbswzsk, const Sbecore::ubigint jrefTrig);

private:
	void changeStage(DbsWzsk* dbswzsk, Sbecore::uint _ixVSge, DpchEngWzsk** dpcheng = NULL);

public:
	std::string getSquawk(DbsWzsk* dbswzsk);

private:
	Sbecore::uint enterSgeIdle(DbsWzsk* dbswzsk, const bool reenter);
	void leaveSgeIdle(DbsWzsk* dbswzsk);
	Sbecore::uint enterSgeAlrwzskabt(DbsWzsk* dbswzsk, const bool reenter);
	void leaveSgeAlrwzskabt(DbsWzsk* dbswzsk);
	Sbecore::uint enterSgeAlrwzsktrm(DbsWzsk* dbswzsk, const bool reenter);
	void leaveSgeAlrwzsktrm(DbsWzsk* dbswzsk);

};

#endif

repository: mpsitech/wzsk-Whiznium-StarterKit

repo_name: mpsitech/wzsk-Whiznium-StarterKit


text:
include(vcpkg_common_functions)

vcpkg_download_distfile(ARCHIVE
    URLS "https://xpdfreader-dl.s3.amazonaws.com/xpdf-4.01.01.tar.gz"
    FILENAME "xpdf-4.01.01.tar.gz"
    SHA512 e0b42195ba4858ecf2ec3c3c06a42eae742eb8567dca695a45a01185b606b399b5e45d220b24ed39782d1f9b1ee16f674129db3346d25b709bbb3f90ef078c22
)

vcpkg_extract_source_archive_ex(
    OUT_SOURCE_PATH SOURCE_PATH
    ARCHIVE ${ARCHIVE}
)

vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
)

vcpkg_install_cmake()

set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
vcpkg_copy_pdbs()
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT})
vcpkg_copy_tool_deps(${CURRENT_PACKAGES_DIR}/tools/${PORT})
###
configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)

repository: MVoz/vcpkg-old

repo_name: MVoz/vcpkg-old

extension: cmake


text:
DESCRIPTION = "Matchbox input manager"
LICENSE = "GPL"
DEPENDS = "matchbox-wm libmatchbox"
SECTION = "x11/wm"

PR = "r5"

SRC_URI = "http://projects.o-hand.com/matchbox/sources/mb-applet-input-manager/${PV}/mb-applet-input-manager-${PV}.tar.gz \
	   file://update-to-svn.diff \
           file://mbinputmgr-libgtkinput.patch \
	   file://visibility-protocol.patch \
	   "

S = "${WORKDIR}/mb-applet-input-manager-${PV}"

inherit autotools pkgconfig

FILES_${PN} = "${bindir}/* ${datadir}/applications ${datadir}/pixmaps"

SRC_URI[md5sum] = "d56ac682c94c7f8ef07bab6348d3f0e2"
SRC_URI[sha256sum] = "e0ff8ad4d565247c480eb41a284bb947ba1ca0dd70aae9f4dde118320699cba4"


text:
// Copyright (c) Mainflux
// SPDX-License-Identifier: Apache-2.0

package policies

import (
	"context"
	"time"

	"github.com/mainflux/mainflux"
	"github.com/mainflux/mainflux/pkg/errors"
	upolicies "github.com/mainflux/mainflux/users/policies"
)

const (
	ReadAction       = "m_read"
	WriteAction      = "m_write"
	addPolicyAction  = "g_add"
	ClientEntityType = "client"
	GroupEntityType  = "group"
	ThingEntityType  = "thing"
	thingsObjectKey  = "things"
)

var (
	// ErrInvalidEntityType indicates that the entity type is invalid.
	ErrInvalidEntityType = errors.New("invalid entity type")
)

type service struct {
	auth        upolicies.AuthServiceClient
	policies    Repository
	policyCache Cache
	idProvider  mainflux.IDProvider
}

// NewService returns a new Clients service implementation.
func NewService(auth upolicies.AuthServiceClient, p Repository, ccache Cache, idp mainflux.IDProvider) Service {
	return service{
		auth:        auth,
		policies:    p,
		policyCache: ccache,
		idProvider:  idp,
	}
}

func (svc service) Authorize(ctx context.Context, ar AccessRequest) (Policy, error) {
	// fetch from cache first
	policy := Policy{
		Subject: ar.Subject,
		Object:  ar.Object,
	}
	policy, err := svc.policyCache.Get(ctx, policy)
	if err == nil {
		for _, action := range policy.Actions {
			if action == ar.Action {
				return policy, nil
			}
		}
		return Policy{}, errors.ErrAuthorization
	}
	if !errors.Contains(err, errors.ErrNotFound) {
		return Policy{}, err
	}

	// fetch from repo as a fallback if not found in cache
	switch ar.Entity {
	case GroupEntityType:
		policy, err = svc.policies.EvaluateGroupAccess(ctx, ar)
		if err != nil {
			return Policy{}, err
		}

	case ClientEntityType:
		policy, err = svc.policies.EvaluateThingAccess(ctx, ar)
		if err != nil {
			return Policy{}, err
		}

	case ThingEntityType:
		policy, err := svc.policies.EvaluateMessagingAccess(ctx, ar)
		if err != nil {
			return Policy{}, err
		}
		// Replace Subject since AccessRequest Subject is Thing Key,
		// and Policy subject is Thing ID.
		policy.Subject = ar.Subject
		if err := svc.policyCache.Put(ctx, policy); err != nil {
			return policy, err
		}

	default:
		return Policy{}, ErrInvalidEntityType
	}

	return policy, nil
}

// AddPolicy adds a policy is added if:
//
//  1. The client is admin
//
//  2. The client has `g_add` action on the object or is the owner of the object.
func (svc service) AddPolicy(ctx context.Context, token string, p Policy) (Policy, error) {
	userID, err := svc.identify(ctx, token)
	if err != nil {
		return Policy{}, err
	}
	if err := p.Validate(); err != nil {
		return Policy{}, err
	}

	p.OwnerID = userID
	p.CreatedAt = time.Now()

	// incase the policy exists, use these for update.
	p.UpdatedAt = time.Now()
	p.UpdatedBy = userID

	if err := svc.policyCache.Remove(ctx, p); err != nil {
		return Policy{}, err
	}

	// If the client is admin, add the policy
	if err := svc.checkAdmin(ctx, userID); err == nil {
		return svc.policies.Save(ctx, p)
	}

	// If the client has `g_add` action on the object or is the owner of the object, add the policy
	ar := AccessRequest{Subject: userID, Object: p.Object, Action: "g_add"}
	if _, err := svc.policies.EvaluateGroupAccess(ctx, ar); err == nil {
		return svc.policies.Save(ctx, p)
	}

	return Policy{}, errors.ErrAuthorization
}

func (svc service) UpdatePolicy(ctx context.Context, token string, p Policy) (Policy, error) {
	userID, err := svc.identify(ctx, token)
	if err != nil {
		return Policy{}, err
	}

	if err := p.Validate(); err != nil {
		return Policy{}, err
	}
	if err := svc.checkPolicy(ctx, userID, p); err != nil {
		return Policy{}, err
	}
	p.UpdatedAt = time.Now()
	p.UpdatedBy = userID

	if err := svc.policyCache.Remove(ctx, p); err != nil {
		return Policy{}, err
	}

	return svc.policies.Update(ctx, p)
}

func (svc service) ListPolicies(ctx context.Context, token string, pm Page) (PolicyPage, error) {
	userID, err := svc.identify(ctx, token)
	if err != nil {
		return PolicyPage{}, err
	}
	if err := pm.Validate(); err != nil {
		return PolicyPage{}, err
	}
	// If the user is admin, return all policies
	if err := svc.checkAdmin(ctx, userID); err == nil {
		return svc.policies.Retrieve(ctx, pm)
	}

	// If the user is not admin, return only the policies that they created
	pm.OwnerID = userID

	return svc.policies.Retrieve(ctx, pm)
}

func (svc service) DeletePolicy(ctx context.Context, token string, p Policy) error {
	userID, err := svc.identify(ctx, token)
	if err != nil {
		return err
	}
	if err := svc.checkPolicy(ctx, userID, p); err != nil {
		return err
	}

	if err := svc.policyCache.Remove(ctx, p); err != nil {
		return err
	}
	return svc.policies.Delete(ctx, p)
}

// checkPolicy checks for the following:
//
//  1. Check if the client is admin
//  2. Check if the client is the owner of the policy
func (svc service) checkPolicy(ctx context.Context, clientID string, p Policy) error {
	if err := svc.checkAdmin(ctx, clientID); err == nil {
		return nil
	}

	pm := Page{Subject: p.Subject, Object: p.Object, OwnerID: clientID, Offset: 0, Limit: 1}
	page, err := svc.policies.Retrieve(ctx, pm)
	if err != nil {
		return err
	}
	if len(page.Policies) == 1 && page.Policies[0].OwnerID == clientID {
		return nil
	}

	return errors.ErrAuthorization
}

func (svc service) identify(ctx context.Context, token string) (string, error) {
	req := &upolicies.Token{Value: token}
	res, err := svc.auth.Identify(ctx, req)
	if err != nil {
		return "", errors.Wrap(errors.ErrAuthorization, err)
	}
	return res.GetId(), nil
}

func (svc service) checkAdmin(ctx context.Context, id string) error {
	// for checking admin rights policy object, action and entity type are not important
	req := &upolicies.AuthorizeReq{
		Sub:        id,
		Obj:        thingsObjectKey,
		Act:        addPolicyAction,
		EntityType: GroupEntityType,
	}
	res, err := svc.auth.Authorize(ctx, req)
	if err != nil {
		return errors.Wrap(errors.ErrAuthorization, err)
	}
	if !res.GetAuthorized() {
		return errors.ErrAuthorization
	}
	return nil
}

repository: SINHASantos/mainflux

repo_name: SINHASantos/mainflux


text:
/*
 * File:   LPSolver.h
 * Author: sriram
 *
 * Created on 5 April, 2014, 12:31 PM
 */

#ifndef LPSOLVER_H
#define	LPSOLVER_H

class LPSolver{
   enum SolverType
   {
      /// Entering Simplex.
      /** The Simplex loop for the entering Simplex can be sketched
       *  as follows:
       *  - \em Pricing : Select a variable to #ENTER the basis.
       *  - \em Ratio-Test : Select variable to #LEAVE the
       *    basis such that the basis remains feasible.
       *  - Perform the basis update.
       */
      ENTER = -1,
      /// Leaving Simplex.
      /** The Simplex loop for the leaving Simplex can be sketched
       *  as follows:
       *  - \em Pricing: Select a variable to #LEAVE the basis.
       *  - \em Ratio-Test: Select variable to #ENTER the
       *    basis such that the basis remains priced.
       *  - Perform the basis update.
       */
      LEAVE = 1
   };
};

#endif	/* LPSOLVER_H */

repository: sriram-mahavadi/extlp

repo_name: sriram-mahavadi/extlp


text:
//
// Created by Matthias Preymann on 02.09.2019.
//

#ifndef PROMISE_POOLDEFS_H
#define PROMISE_POOLDEFS_H

#include "ObjectPool.h"

/**
 * Workaround as nested types cannot be forward declared
 */
namespace PoolDefs {
    using T_EventPool= SyncObjectPool< std::aligned_storage<96, sizeof(void*)>::type >;
}

#endif //PROMISE_POOLDEFS_H

repository: PreyMa/Pai

repo_name: PreyMa/Pai


text:
@inproceedings{elinas2020-vi-gcn,
 author = {Elinas, Pantelis and Bonilla, Edwin V and Tiao, Louis},
 booktitle = {Advances in Neural Information Processing Systems},
 editor = {H. Larochelle and M. Ranzato and R. Hadsell and M. F. Balcan and H. Lin},
 pages = {18648--18660},
 publisher = {Curran Associates, Inc.},
 title = {{V}ariational {I}nference for {G}raph {C}onvolutional {N}etworks in the {A}bsence of {G}raph {D}ata and {A}dversarial {S}ettings},
 url = {https://proceedings.neurips.cc/paper/2020/file/d882050bb9eeba930974f596931be527-Paper.pdf},
 volume = {33},
 year = {2020}
}


text:
DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
PR = "r93"

inherit task

DEPENDS = "task-boot"
PROVIDES = "${PACKAGES}"
PACKAGES = ' \
            task-base \
            task-base-extended \
            task-distro-base \
            task-machine-base \
            \
            ${@base_contains("MACHINE_FEATURES", "acpi", "task-base-acpi", "",d)} \
            ${@base_contains("MACHINE_FEATURES", "alsa", "task-base-alsa", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "apm", "task-base-apm", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "ext2", "task-base-ext2", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "vfat", "task-base-vfat", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "irda", "task-base-irda", "",d)} \
            ${@base_contains("MACHINE_FEATURES", "keyboard", "task-base-keyboard", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "pci", "task-base-pci", "",d)} \
            ${@base_contains("MACHINE_FEATURES", "pcmcia", "task-base-pcmcia", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "phone", "task-base-phone", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "screen", "task-base-screen", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "serial", "task-base-serial", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "touchscreen", "task-base-touchscreen", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "usbgadget", "task-base-usbgadget", "", d)} \
            ${@base_contains("MACHINE_FEATURES", "usbhost", "task-base-usbhost", "", d)} \
            \
            ${@base_contains("MACHINE_FEATURES", "uboot", "task-base-uboot", "",d)} \
            ${@base_contains("MACHINE_FEATURES", "redboot", "task-base-redboot", "",d)} \
            ${@base_contains("MACHINE_FEATURES", "apex", "task-base-apex", "",d)} \
            \
            task-base-bluetooth \
            task-base-wifi \
            \
            ${@base_contains("DISTRO_FEATURES", "cramfs", "task-base-cramfs", "", d)} \
            ${@base_contains("DISTRO_FEATURES", "ipsec", "task-base-ipsec", "", d)} \
            ${@base_contains("DISTRO_FEATURES", "ipv6", "task-base-ipv6", "", d)} \
            ${@base_contains("DISTRO_FEATURES", "nfs", "task-base-nfs", "", d)} \
            ${@base_contains("DISTRO_FEATURES", "ppp", "task-base-ppp", "", d)} \
            ${@base_contains("DISTRO_FEATURES", "smbfs", "task-base-smbfs", "", d)} \
            ${@base_contains("DISTRO_FEATURES", "raid", "task-base-raid", "",d)} \
            \
            ${@base_contains("MACHINE_FEATURES","kernel26","task-base-kernel26","task-base-kernel24",d)} \
            '

#
# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
#
PACKAGE_ARCH = "${MACHINE_ARCH}"

#
# linux-hotplug or none
#
HOTPLUG ?= "${@base_contains("MACHINE_FEATURES", "kernel24",  "linux-hotplug","",d)} "

#
# dropbear, openssh or none
#
DISTRO_SSH_DAEMON ?= "dropbear"

# Distro can override apm provider
DISTRO_APM ?= "apm"

#
# bluetooth manager
#
DISTRO_BLUETOOTH_MANAGER ?= "\
	blueprobe \
	bluez-utils \
	bluez-utils-compat \
	"

#
# pcmciautils for >= 2.6.13-rc1, pcmcia-cs for others
#
PCMCIA_MANAGER ?= "${@base_contains('MACHINE_FEATURES', 'kernel26','pcmciautils','pcmcia-cs',d)} "

#
# those ones can be set in machine config to supply packages needed to get machine booting
#
MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""

#
# task-base contain stuff needed for base system (machine related)
#
RDEPENDS_task-base = "\
    task-boot \
    task-distro-base \
    task-machine-base \
    ${DISTRO_SSH_DAEMON} \
    ${HOTPLUG} \
    \
    ${@base_contains('MACHINE_FEATURES', 'kernel26','task-base-kernel26','task-base-kernel24',d)} \
    ${@base_contains('MACHINE_FEATURES', 'apm', 'task-base-apm', '',d)} \
    ${@base_contains('MACHINE_FEATURES', 'acpi', 'task-base-acpi', '',d)} \
    ${@base_contains('MACHINE_FEATURES', 'keyboard', 'task-base-keyboard', '',d)} \
    ${@base_contains('MACHINE_FEATURES', 'touchscreen', 'task-base-touchscreen', '',d)} \
    \
    ${@base_contains('COMBINED_FEATURES', 'alsa', 'task-base-alsa', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'ext2', 'task-base-ext2', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'vfat', 'task-base-vfat', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'irda', 'task-base-irda', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'pci', 'task-base-pci', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'task-base-pcmcia', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'usbgadget', 'task-base-usbgadget', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'usbhost', 'task-base-usbhost', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'bluetooth', 'task-base-bluetooth', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'wifi', 'task-base-wifi', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'uboot', 'task-base-uboot', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'redboot', 'task-base-redboot', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'apex', 'task-base-apex', '',d)} \
    \
    ${@base_contains('DISTRO_FEATURES', 'nfs', 'task-base-nfs', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'cramfs', 'task-base-cramfs', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'smbfs', 'task-base-smbfs', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'ipv6', 'task-base-ipv6', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'ipsec', 'task-base-ipsec', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'ppp', 'task-base-ppp', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'raid', 'task-base-raid', '',d)} \
    "

RDEPENDS_task-base-extended = "\
    task-base \
    ${ADD_WIFI} \
    ${ADD_BT} \
    "

ADD_WIFI = ""
ADD_BT = ""

python __anonymous () {
    # If Distro want wifi and machine feature wifi/pci/pcmcia/usbhost (one of them)
    # then include task-base-wifi in task-base

    import bb

    try:
        set = __builtins__["set"]
    except KeyError:
        from sets import Set as set

    distro_features = set(bb.data.getVar("DISTRO_FEATURES", d, 1).split())
    machine_features= set(bb.data.getVar("MACHINE_FEATURES", d, 1).split())

    if "bluetooth" in distro_features and not "bluetooth" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
	bb.data.setVar("ADD_BT", "task-base-bluetooth", d)

    if "wifi" in distro_features and not "wifi" in machine_features and ("pcmcia" in machine_features or "pci" in machine_features or "usbhost" in machine_features):
	bb.data.setVar("ADD_WIFI", "task-base-wifi", d)
}

#
# packages added by distribution
#
DEPENDS_task-distro-base = "${DISTRO_EXTRA_DEPENDS}"
RDEPENDS_task-distro-base = "${DISTRO_EXTRA_RDEPENDS}"
RRECOMMENDS_task-distro-base = "${DISTRO_EXTRA_RRECOMMENDS}"

#
# packages added by machine config
#
RDEPENDS_task-machine-base = "${MACHINE_EXTRA_RDEPENDS}"
RRECOMMENDS_task-machine-base = "${MACHINE_EXTRA_RRECOMMENDS}"

RDEPENDS_task-base-kernel24 = "\
    modutils-depmod"

RDEPENDS_task-base-kernel26 = "\
    sysfsutils \
    module-init-tools"

RRECOMMENDS_task-base-kernel24 = "\
    kernel-module-input \
    kernel-module-uinput"

RRECOMMENDS_task-base-kernel26 = "\
    kernel-module-nls-utf8 \
    kernel-module-input \
    kernel-module-uinput \
    kernel-module-rtc-dev \
    kernel-module-rtc-proc \
    kernel-module-rtc-sysfs \
    kernel-module-rtc-sa1100 \
    kernel-module-unix"

RDEPENDS_task-base-keyboard = "\
    keymaps"

RDEPENDS_task-base-pci = "\
    pciutils"

RDEPENDS_task-base-acpi = "\
    acpid"

RDEPENDS_task-base-apm = "\
    ${DISTRO_APM} \
    apmd \
    ${@base_contains('MACHINE_FEATURES', 'kernel24', 'network-suspend-scripts', '',d)}"

RDEPENDS_task-base-ext2 = "\
    hdparm \
    e2fsprogs \
    e2fsprogs-e2fsck \
    e2fsprogs-mke2fs"

RRECOMMENDS_task-base-vfat = "\
    kernel-module-msdos \
    kernel-module-vfat \
    kernel-module-nls-iso8859-1 \
    kernel-module-nls-cp437"

RDEPENDS_task-base-alsa = "\
    alsa-utils-alsactl \
    alsa-utils-alsamixer"

#
# alsa-states are machine related so can be missing in feed, OSS support is optional
#
RRECOMMENDS_task-base-alsa = "\
    alsa-state \
    kernel-module-snd-mixer-oss \
    kernel-module-snd-pcm-oss"

RDEPENDS_task-base-pcmcia = "\
    ${PCMCIA_MANAGER} \
    ${@base_contains('DISTRO_FEATURES', 'wifi', 'prism-firmware', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'wifi', 'spectrum-fw', '',d)} \
    "

RRECOMMENDS_task-base-pcmcia = "\
    ${@base_contains('MACHINE_FEATURES', 'kernel26', '${task-base-pcmcia26}', '${task-base-pcmcia24}',d)} \
    kernel-module-pcmcia \
    kernel-module-airo-cs \
    kernel-module-pcnet-cs \
    kernel-module-serial-cs \
    kernel-module-ide-cs \
    kernel-module-ide-disk \
    "

task-base-pcmcia24 = "\
    "

task-base-pcmcia26 = "\
    ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-hostap-cs', '',d)} \
    ${@base_contains('DISTRO_FEATURES', 'wifi', 'kernel-module-spectrum-cs', '',d)}"

# Provide bluez-utils-compat utils for the time being, the binaries in that package will vanish soon from upstream releases, so beware!

RDEPENDS_task-base-bluetooth = "\
    ${DISTRO_BLUETOOTH_MANAGER} \
    "

RRECOMMENDS_task-base-bluetooth = "\
    kernel-module-bluetooth \
    kernel-module-l2cap \
    kernel-module-rfcomm \
    kernel-module-hci-vhci \
    kernel-module-bnep \
    kernel-module-hidp \
    kernel-module-hci-uart \
    kernel-module-sco \
    ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-btusb kernel-module-hci-usb', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetooth3c-cs', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluecard-cs', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-bluetoothuart-cs', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'pcmcia', 'kernel-module-dtl1-cs', '',d)} \
    "
RDEPENDS_task-base-irda = "\
    irda-utils"

RRECOMMENDS_task-base-irda = "\
    kernel-module-pxaficp-ir \
    kernel-module-irda \
    kernel-module-ircomm \
    kernel-module-ircomm-tty \
    kernel-module-irlan \
    ${@base_contains('DISTRO_FEATURES', 'ppp', 'kernel-module-irnet', '',d)} \
    kernel-module-irport \
    kernel-module-irtty \
    kernel-module-irtty-sir \
    kernel-module-sir-dev \
    ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-ir-usb', '',d)} "

RRECOMMENDS_task-base-usbgadget = "\
    kernel-module-pxa27x_udc \
    kernel-module-gadgetfs \
    kernel-module-g-file-storage \
    kernel-module-g-serial \
    kernel-module-g-ether \
    usb-gadget-mode"

RDEPENDS_task-base-usbhost = "\
    usbutils "

RRECOMMENDS_task-base-usbhost = "\
    kernel-module-uhci-hcd \
    kernel-module-ohci-hcd \
    kernel-module-ehci-hcd \
    kernel-module-usbcore \
    kernel-module-usbhid \
    kernel-module-usbnet \
    kernel-module-sd-mod \
    kernel-module-scsi-mod \
    kernel-module-usbmouse \
    kernel-module-mousedev \
    kernel-module-usbserial \
    kernel-module-usb-storage \
    kernel-module-asix \
    kernel-module-pegasus \
"

RDEPENDS_task-base-uboot = "\
    u-boot"

RDEPENDS_task-base-redboot = "\
    fis"

RDEPENDS_task-base-apex = "\
    apex-env"

RDEPENDS_task-base-ppp = "\
    ppp \
    ppp-dialin"

RRECOMMENDS_task-base-ppp = "\
    kernel-module-ppp-async \
    kernel-module-ppp-deflate \
    kernel-module-ppp-mppe"

RDEPENDS_task-base-ipsec = "\
    openswan"

RRECOMMENDS_task-base-ipsec = "\
    kernel-module-ipsec"

#
# task-base-wifi contain everything needed to get WiFi working
# WEP/WPA connection needs to be supported out-of-box
#
RDEPENDS_task-base-wifi = "\
    wireless-tools \
    ${@base_contains('COMBINED_FEATURES', 'hostap', 'hostap-utils', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'madwifi', 'madwifi-ng-tools', '',d)} \
    wpa-supplicant"

RRECOMMENDS_task-base-wifi = "\
    ${@base_contains('COMBINED_FEATURES', 'madwifi', 'madwifi-ng-modules', '',d)} \
    ${@base_contains('COMBINED_FEATURES', 'usbhost', 'kernel-module-zd1211rw', '',d)} \
    kernel-module-ieee80211-crypt \
    kernel-module-ieee80211-crypt-ccmp \
    kernel-module-ieee80211-crypt-tkip \
    kernel-module-ieee80211-crypt-wep \
    kernel-module-ecb \
    kernel-module-arc4 \
    kernel-module-crypto_algapi \
    kernel-module-cryptomgr \
    kernel-module-michael-mic \
    kernel-module-aes"

RRECOMMENDS_task-base-smbfs = "\
    kernel-module-cifs \
    kernel-module-smbfs"

RRECOMMENDS_task-base-cramfs = "\
    kernel-module-cramfs"

#
# task-base-nfs provides ONLY client support - server is in nfs-utils package
#
RDEPENDS_task-base-nfs = "\
    portmap"

RRECOMMENDS_task-base-nfs = "\
    kernel-module-nfs "

RDEPENDS_task-base-raid = "\
	"

RDEPENDS_task-base-screen = "\
	"

#
# GPE/OPIE/Openmoko provide own touchscreen calibration utils
#
RDEPENDS_task-base-touchscreen = "\
    tslib-tests \
    tslib-calibrate "

RDEPENDS_task-base-ipv6 = "\
    "

RRECOMMENDS_task-base-ipv6 = "\
    kernel-module-ipv6 "

RDEPENDS_task-base-serial = "\
    setserial \
    lrzsz "

# Tosort
# kernel-module-nvrd
# kernel-module-mip6-mn
# kernel-module-tun
# kernel-module-ide-probe-mo
# kernel-module-loop
# kernel-module-vfat
# kernel-module-ext2
# kernel-module-sco
# kernel-module-af_packet
# kernel-module-ip-gre
# kernel-module-ip-tables
# kernel-module-ipip
# kernel-module-des
# kernel-module-md5
# kernel-module-8250
# Should be DISTRO_EXTRA_RRECOMMENDS: lrzsz


text:
DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
SECTION = "console/network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
DEPENDS = "dbus-glib ncurses python libusb1"
PROVIDES = "virtual/gpsd"

PR = "r2"

EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
                --x-libraries=${STAGING_LIBDIR} \
                --enable-dbus \
                --disable-libQgpsmm \
"

SRC_URI = "http://download.berlios.de/${PN}/${P}bis.tar.gz;name=gpsd \
           file://gpsd-default \
           file://gpsd \
           file://gpsd.socket \
           file://gpsd.service \
           file://60-gpsd.rules"
SRC_URI[gpsd.md5sum] = "52b00cab0fb34bbf1923ae35c7ced6c4"
SRC_URI[gpsd.sha256sum] = "c6d72565bc06b802c749e69808eb7c6ee165962dc17383971c9001b5e1763690"

inherit autotools update-rc.d python-dir systemd

INITSCRIPT_NAME = "gpsd"
INITSCRIPT_PARAMS = "defaults 35"

SYSTEMD_PACKAGES = "${PN}-systemd"
SYSTEMD_SERVICE = "${PN}.socket"

LDFLAGS += "-L${STAGING_LIBDIR} -lm"
export STAGING_INCDIR
export STAGING_LIBDIR

TARGET_CC_ARCH += "${LDFLAGS}"

do_configure_prepend() {
    # skip first
    sed -i "s#for pylibpath in '/usr/lib'#for pylibpath in #g" ${S}/configure.ac
    # disable xmlto, in case xsltproc doesn't work xmlto is used and fails
    sed -i "s#AC_CHECK_PROG(WITH_XMLTO#AC_CHECK_PROG(WITH_XMLTO_DISABLED_IN_OE#g" ${S}/configure.ac
}

do_compile_prepend() {
    export BUILD_SYS="${BUILD_SYS}"
    export HOST_SYS="${HOST_SYS}"
	find ${S} -name "*.so" -exec rm -f {} \;
}

do_install_prepend() {
    export BUILD_SYS="${BUILD_SYS}"
    export HOST_SYS="${HOST_SYS}"
}

do_install_append() {
    install -d ${D}/${sysconfdir}/init.d
    install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
    install -d ${D}/${sysconfdir}/default
    install -m 0644 ${WORKDIR}/gpsd-default ${D}/${sysconfdir}/default/gpsd.default

    #support for udev
    install -d ${D}/${sysconfdir}/udev/rules.d
    install -m 0644 ${WORKDIR}/60-gpsd.rules ${D}/${sysconfdir}/udev/rules.d
    install -d ${D}${base_libdir}/udev/
    install -m 0755 ${S}/gpsd.hotplug ${D}${base_libdir}/udev/
    install -d ${D}${base_libdir}/udev/
    install -m 0755 ${S}/gpsd.hotplug.wrapper ${D}${base_libdir}/udev/
}

pkg_postinst_${PN}-conf() {
	update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
}

pkg_postrm_${PN}-conf() {
	update-alternatives --remove gpsd-defaults ${sysconfdir}/default/gpsd.default
}

PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gpsd-gpsctl gps-utils"

FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug"

RDEPENDS_${PN} = "gpsd-gpsctl"
RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev"

DESCRIPTION_gpsd-udev = "udev relevant files to use gpsd hotplugging"
FILES_gpsd-udev = "${base_libdir}/udev ${sysconfdir}/udev/*"
RDEPENDS_gpsd-udev += "udev gpsd-conf"

DESCRIPTION_libgpsd = "C service library used for communicating with gpsd"
FILES_libgpsd = "${libdir}/libgpsd.so.*"

DESCRIPTION_libgps = "C service library used for communicating with gpsd"
FILES_libgps = "${libdir}/libgps.so.*"

DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts"
FILES_gpsd-conf = "${sysconfdir}"

DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes"
FILES_gpsd-gpsctl = "${bindir}/gpsctl"

DESCRIPTION_gps-utils = "Utils used for simulating, monitoring,... a GPS"
FILES_gps-utils = "${bindir}/*"
RDEPENDS_gps-utils = "python-pygps"

DESCRIPTION_python-pygps = "Python bindings to gpsd"
FILES_python-pygps = "${PYTHON_SITEPACKAGES_DIR}/*"
RDEPENDS_python-pygps = "python-core python-curses gpsd python-json"


text:
package startup

import (
	"fmt"
	"io/ioutil"
	"path"
	"strings"
)

func getServerFromDNSConf(content string) ([]string, error) {
	servers := []string{}
	for _, line := range strings.Split(content, "\n") {
		if !strings.HasPrefix(line, "server=") {
			continue
		}
		servers = append(servers, strings.Split(line, "=")[1])
	}
	if len(servers) == 0 {
		return nil, fmt.Errorf("no servers found in origin-upstream-dns.conf")
	}
	return servers, nil
}

// GetNameserversFromDNSConfig read the nameservers from:
// {rootDir}/etc/dnsmasq.d/origin-upstream-dns.conf
func GetNameserversFromDNSConfig(rootDir string) ([]string, error) {
	dnsConfFile := path.Join(rootDir, "/etc/dnsmasq.d/origin-upstream-dns.conf")
	b, err := ioutil.ReadFile(dnsConfFile)
	if err != nil {
		return nil, err
	}
	return getServerFromDNSConf(string(b))
}

repository: openshift/openshift-azure

repo_name: openshift/openshift-azure


text:
DESCRIPTION = "McCabe checker, plugin for flake8"
HOMEPAGE = "https://github.com/PyCQA/mccabe"
SECTION = "devel/python"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=a489dc62bacbdad3335c0f160a974f0f"

SRC_URI[md5sum] = "723df2f7b1737b8887475bac4c763e1e"
SRC_URI[sha256sum] = "dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"

inherit pypi setuptools3

DEPENDS += "${PYTHON_PN}-pytest-runner-native"

RDEPENDS:${PN} += "${PYTHON_PN}-prettytable \
            ${PYTHON_PN}-cmd2 \
            ${PYTHON_PN}-pyparsing \
           "

repository: Intel-BMC/openbmc

repo_name: Intel-BMC/openbmc

gha_license_id: NOASSERTION

gha_language: Python


text:
/**
 * Copyright (c) 2016 Intel Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package actions

import (
	"fmt"

	catalogModels "github.com/trustedanalytics-ng/tap-catalog/models"
	"github.com/trustedanalytics-ng/tap-cli/cli/converter"
	containerBrokerModels "github.com/trustedanalytics-ng/tap-container-broker/models"
)

type stateChangingFunction func(string) (containerBrokerModels.MessageResponse, error)
type deletingFunction func(string) error

func (a *ActionsConfig) deleteInstance(df deletingFunction, instanceType catalogModels.InstanceType, instanceName string) error {
	instanceID, _, err := converter.FetchInstanceIDandType(a.Config, instanceType, instanceName)
	if err != nil {
		return err
	}
	if err = df(instanceID); err != nil {
		return err
	}
	announceSuccessfulOperation()
	return nil
}

func (a *ActionsConfig) GetInstanceLogs(instanceName string) error {
	instanceID, instanceType, err := converter.FetchInstanceIDandType(a.Config, converter.InstanceTypeBoth, instanceName)
	if err != nil {
		return err
	}

	if err != nil {
		return err
	}

	logs := make(map[string]string)
	if instanceType == catalogModels.InstanceTypeApplication {
		logs, err = a.ApiService.GetApplicationLogs(instanceID)
		if err != nil {
			return err
		}
	}
	if instanceType == catalogModels.InstanceTypeService {
		logs, err = a.ApiService.GetServiceLogs(instanceID)
		if err != nil {
			return err
		}
	}

	for container, log := range logs {
		fmt.Printf("%s:\n\n%s\n", container, log)
	}

	return nil
}

func (a *ActionsConfig) changeState(scf stateChangingFunction, instanceType catalogModels.InstanceType, instanceName string) error {
	instanceID, _, err := converter.FetchInstanceIDandType(a.Config, instanceType, instanceName)
	if err != nil {
		return err
	}

	message, err := scf(instanceID)
	if err != nil {
		return err
	}

	fmt.Println(message.Message)
	return nil
}

repository: trustedanalytics-ng/tap-cli

repo_name: trustedanalytics-ng/tap-cli


text:
package swfapi

import (
	"github.com/funkygao/swf"
	"github.com/parnurzeal/gorequest"
)

type Client struct {
	cf *config
}

func New(cf *config) *Client {
	return &Client{cf: cf}
}

func Default() *Client {
	return &Client{cf: NewConfig()}
}

func (this *Client) invoke(op string, payload interface{}) (gorequest.Response, []byte, []error) {
	agent := gorequest.New()
	return agent.Post(this.cf.Endpoint).
		Set("User-Agent", "swf-go:"+swf.Version).
		Set("X-Swf-Api", op).
		SendStruct(payload).
		EndBytes()
}

repository: funkygao/swf

repo_name: funkygao/swf


text:
SUMMARY = "Chassis Power Control service for Intel based platforms"
DESCRIPTION = "Chassis Power Control service for Intel based platforms"

SRC_URI = "git://github.com/openbmc/x86-power-control.git;protocol=https"
SRCREV = "c46ebb493f0e0cc1ccc5525d5484465bba69551f"

PV = "1.0+git${SRCPV}"

S = "${WORKDIR}/git"

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

inherit meson systemd pkgconfig
inherit obmc-phosphor-dbus-service

def get_service(d):
    if(d.getVar('OBMC_HOST_INSTANCES') == '0'):
      return "xyz.openbmc_project.Chassis.Control.Power@0.service"
    else:
      return " ".join(["xyz.openbmc_project.Chassis.Control.Power@{}.service".format(x) for x in d.getVar('OBMC_HOST_INSTANCES').split()])

SYSTEMD_SERVICE:${PN} = "${@get_service(d)}"

SYSTEMD_SERVICE:${PN} += "chassis-system-reset.service \
                         chassis-system-reset.target"

DEPENDS += " \
    boost \
    i2c-tools \
    libgpiod \
    nlohmann-json \
    sdbusplus \
    phosphor-logging \
  "
FILES:${PN}  += "${systemd_system_unitdir}/xyz.openbmc_project.Chassis.Control.Power@.service"


text:
/**
 * Copyright 2018 hydra Author. All rights reserved.
 * Author: Chuck1024
 */

package service

import (
	"encoding/json"
	"github.com/gdp-org/gd"
	"hydra/app/domain"
	"time"
)

func Route(local string, id string, uuid uint64, msg string) (string, error) {
	url := "http://" + local + ":" + gd.Config("Server", "httpPort").MustString("9527") + "/v1/route"
	request := &domain.RouteReq{
		Id:   id,
		Uuid: uuid,
		Msg:  msg,
	}

	resp, _, err := gd.NewHttpClient().Post(url).Timeout(3 * time.Second).Send(request).End()
	if err != nil {
		gd.Error("[Route] send to server occur error: %s", err)
		return "", err
	}

	dataByte, _ := json.Marshal(resp.Body)
	response := &domain.RouteResponse{}
	json.Unmarshal(dataByte, response)

	gd.Debug("[Route] seq:%s", response.Result.Seq)
	seq := response.Result.Seq
	return seq, nil
}


text:
package pars

import (
	"testing"
)

func BenchmarkParseStringSeq(b *testing.B) {
	prototype := Seq(Char('H'), Char('e'), Char('l'), Char('l'), Char('o'), Char(' '), Char('w'), Char('o'), Char('r'), Char('l'), Char('d'))
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseStringStringCI(b *testing.B) {
	prototype := StringCI("Hello world")
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseStringString(b *testing.B) {
	prototype := String("Hello world")
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseAnyRune(b *testing.B) {
	prototype := AnyRune()
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseAnyByte(b *testing.B) {
	prototype := AnyByte()
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}
func BenchmarkParseChar(b *testing.B) {
	prototype := Char('H')
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}
func BenchmarkParseByte(b *testing.B) {
	prototype := Byte(byte('H'))
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseDelimitedString(b *testing.B) {
	prototype := DelimitedString("'", "'")
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseBigInt(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := BigInt()
		ParseString("1234567", p)
	}
}

func BenchmarkParseNegativeBigInt(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := BigInt()
		ParseString("-1234567", p)
	}
}

func BenchmarkParseInt(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := Int()
		ParseString("1234567", p)
	}
}

func BenchmarkParseNegativeInt(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := Int()
		ParseString("-1234567", p)
	}
}

func BenchmarkParseFloat(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := Float()
		ParseString("123.4567", p)
	}
}

func BenchmarkParseNegativeFloat(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := Float()
		ParseString("-123.4567", p)
	}
}

func BenchmarkParseAndTransformInt(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := Transformer(Int(), func(v interface{}) (interface{}, error) { return v.(int) + 1, nil })
		ParseString("1234567", p)
	}
}

func BenchmarkParseAndTransformNegativeInt(b *testing.B) {
	for i := 0; i < b.N; i++ {
		p := Transformer(Int(), func(v interface{}) (interface{}, error) { return v.(int) + 1, nil })
		ParseString("-1234567", p)
	}
}

func BenchmarkParseSome(b *testing.B) {
	prototype := Some(AnyRune())
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkParseMany(b *testing.B) {
	prototype := Many(AnyRune())
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString("Hello world", p)
	}
}

func BenchmarkQuotedCSVStrings(b *testing.B) {
	prototype := Sep(DelimitedString("\"", "\""), Char(','))
	for i := 0; i < b.N; i++ {
		p := prototype.Clone()
		ParseString(`"abc","def","ghi"`, p)
	}
}

repository: DarkRagnara/pars

repo_name: DarkRagnara/pars


text: @inproceedings{Jindal_2021AIOPS,	author = {Anshul Jindal and Ilya Shakhat and Jorge Cardoso and Michael Gerndt and Vladimir Podolskiy},	booktitle = {AIOPS 2020 International Workshop on Artificial Intelligence for IT Operations},	date-added = {2021-11-19 09:02:08 +0100},	date-modified = {2021-12-19 09:03:07 +0100},	publisher = {Springer},	title = {IAD: Indirect Anomalous VMMs Detection in the Cloud-based Environment},	webpdf = {/Papers/WP-2021-081-AIOPS_IAD_Indirect_Anomalous_VMMs_Detection.pdf},	year = {2021}}

gha_language: TeX


text:
package cmd

import (
	"github.com/rsteube/carapace"
	"github.com/spf13/cobra"
)

var config_processCmd = &cobra.Command{
	Use:   "process",
	Short: "Validate config and display expanded configuration.",
	Run:   func(cmd *cobra.Command, args []string) {},
}

func init() {
	carapace.Gen(config_processCmd).Standalone()
	config_processCmd.Flags().StringP("org-slug", "o", "", "organization slug (for example: github/example-org), used when a config depends on private orbs belonging to that org")
	config_processCmd.Flags().String("pipeline-parameters", "", "YAML/JSON map of pipeline parameters, accepts either YAML/JSON directly or file path (for example: my-params.yml)")
	configCmd.AddCommand(config_processCmd)

	carapace.Gen(config_processCmd).FlagCompletion(carapace.ActionMap{
		"pipeline-parameters": carapace.ActionFiles(),
	})

	carapace.Gen(config_processCmd).PositionalCompletion(
		carapace.ActionFiles(),
	)
}

repository: rsteube/carapace-bin

repo_name: rsteube/carapace-bin


text:
@misc{wright2023multiview,
      title={{Multi-View Knowledge Distillation from Crowd Annotations for Out-of-Domain Generalization}},
      author={Dustin Wright and Isabelle Augenstein},
      year={2023},
      eprint={2212.09409},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

repository: copenlu/academic-kickstart

repo_name: copenlu/academic-kickstart


text:
package main

import (
	"fmt"
	"net"
)

func main() {
	listener, err := net.Listen("tcp", ":8080")

	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println("Start listen")

	for {
		conn, err := listener.Accept()

		if err != nil {
			fmt.Println(err)
			return
		}

		go run(conn)
	}
}

func run(conn net.Conn) {
	defer conn.Close()

	fmt.Println("Connect :", conn.RemoteAddr())

	for {
		data := make([]byte, 1024)

		n, err := conn.Read(data)

		addr := conn.RemoteAddr()

		if n == 0 {
			fmt.Printf("%s has disconnect\n", addr)
			break
		}

		if err != nil {
			fmt.Println(err)
			continue
		}

		fmt.Printf("Receive '%s' from '%s'\n", string(data[:n]), addr)

		_, err = conn.Write([]byte(">success"))

		if err != nil {
			fmt.Println(err)
			continue
		}
	}
}

repository: Junxwan/go-socket-practice

repo_name: Junxwan/go-socket-practice


text:
@article{chizhik2018monomerization146551950,
 address = {United Kingdom},
 author = {Solovyev, Ilya D. and AlexandraV, Gavshina and Katti, Aditya S. and Chizhik, Alexey I. and Vinokurov, Leonid M. and Lapshin, Grigory D. and Ivashina, Tatiana V. and Khrenova, Maria G. and Kireev, Igor I. and Ingo, Gregor and Jörg, Enderlein and Savitsky, Alexander P.},
 doi = {10.1038/s41598-018-33250-z},
 issn = {2045-2322},
 journal = {Scientific reports},
 language = {english},
 publisher = {United Kingdom},
 title = {Monomerization of the photoconvertible fluorescent protein SAASoti by rational mutagenesis of single amino acids},
 year = {2018}
}

repository: polyakoviv/LCC

repo_name: polyakoviv/LCC


text:
MACRO(SUBDIRLIST result curdir)
    FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
    SET(dirlist "")
    FOREACH(child ${children})
        IF(IS_DIRECTORY ${curdir}/${child})
            LIST(APPEND dirlist ${child})
        ENDIF()
    ENDFOREACH()
    SET(${result} ${dirlist})
ENDMACRO()

macro(lm_runtime_sync target)
    add_custom_command(
        TARGET ${target}
        POST_BUILD
        COMMAND ${CMAKE_COMMAND}
        -Dsrc_dir=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
        -Ddst_dir="$<TARGET_FILE_DIR:${target}>"
        -P "${CMAKE_SOURCE_DIR}/cmake/update_directory.cmake"
    )
endmacro()

repository: Lawrencemm/LM-Engine

repo_name: Lawrencemm/LM-Engine


text:
package main

import (
	"fmt"
	"html/template"
	"net/http"
	"path"
)

type M map[string]interface{}

func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		var data = M{"name": "Batman"}

		var tmpl = template.Must(template.ParseFiles(
			path.Join("b5","views","index.html"),
			path.Join("b5","views","_header.html"),
			path.Join("b5","views","_message.html"),
		))
		var err = tmpl.ExecuteTemplate(w, "index", data)
		if err != nil {
			http.Error(w, err.Error(), http.StatusInternalServerError)
		}
	})

	http.HandleFunc("/about", func(w http.ResponseWriter, r *http.Request) {
		var data = M{"name": "Batman"}
		var tmpl = template.Must(template.ParseFiles(
			path.Join("b5","views","about.html"),
			path.Join("b5","views","_header.html"),
			path.Join("b5","views","_message.html"),
		))

		var err = tmpl.ExecuteTemplate(w, "about", data)
		if err != nil {
			http.Error(w, err.Error(), http.StatusInternalServerError)
		}
	})

	fmt.Println("server started at localhost:9000")
	http.ListenAndServe(":9000", nil)
}

repository: wahyuoi/learn-go

repo_name: wahyuoi/learn-go


text:
package main

import (
	"context"
	"fmt"
	"github.com/36625090/solana-go/client"
	"github.com/36625090/solana-go/client/rpc"
	"github.com/36625090/solana-go/common"
	"github.com/36625090/solana-go/program/assotokenprog"
	"github.com/36625090/solana-go/program/metaplex/tokenmeta"
	"github.com/36625090/solana-go/program/sysprog"
	"github.com/36625090/solana-go/program/tokenprog"
	"github.com/36625090/solana-go/types"
	"log"
	"os"
	"time"
)

var alice = types.AccountFromPrivateKeyBytes([]byte{
	61, 103, 131, 192, 166, 221, 206, 161, 9, 35, 0, 68, 42, 71, 136, 199, 24, 39, 146, 179, 140, 139, 58, 149, 172, 52, 81, 3, 205, 236, 212, 77, 108,
	177, 196, 22, 17, 53, 254, 10, 102, 110, 46, 250, 91, 28, 21, 184, 202, 194, 206, 0, 15, 147, 229, 224, 198, 197, 133, 147, 200, 177, 40, 246,
})

var alicePubkey = common.PublicKeyFromString("8KJFQsdnPyzVYtazr6YFjXHDiWpHh151yudd7BJL1e7P")

func main() {
	log.SetFlags(log.Lshortfile | log.LstdFlags)
	c := client.NewClient(rpc.TestnetRPCEndpoint)

	res, err := c.GetRecentBlockhash(context.Background())
	if err != nil {
		log.Fatalf("get recent block hash error, err: %v\n", err)
	}
	log.Println("create non-fungible token, using block hash: ", res)
	balance, err := c.GetBalance(context.Background(), alicePubkey.ToBase58())
	if 0 == balance {
		res, err := c.RequestAirdrop(context.Background(), alicePubkey.ToBase58(), 1/0.000000001)
		if err != nil {
			log.Fatalf("request airdrop, err: %v\n", err)
		}
		log.Println("request airdrop, txn: ", res)
		balance = 1 / .000000001
	}
	if balance == 0 {
		fmt.Println("balance not enough: ", res.Blockhash)
		os.Exit(1)
	}
	rentExemptionBalance, err := c.GetMinimumBalanceForRentExemption(context.Background(), tokenprog.TokenAccountSize)
	if err != nil {
		log.Fatalf("get min balacne for rent exemption, err: %v", err)
	}
	mint := types.NewAccount()
	token := mint.PublicKey

	inst := tokenprog.InitializeMint(0, token, alice.PublicKey, common.PublicKey{})
	rawTx, err := types.CreateRawTransaction(types.CreateRawTransactionParam{
		Instructions: []types.Instruction{
			sysprog.CreateAccount(
				alice.PublicKey,
				mint.PublicKey,
				common.TokenProgramID,
				rentExemptionBalance,
				tokenprog.MintAccountSize,
			),
			inst,
		},
		Signers:         []types.Account{alice, mint},
		FeePayer:        alice.PublicKey,
		RecentBlockHash: res.Blockhash,
	})
	if err != nil {
		log.Fatalf("generate tx error, err: %v\n", err)
	}

	_, err = c.SendRawTransaction(context.Background(), rawTx)
	if err != nil {
		log.Fatalf("send raw tx error, err: %v\n", err)
	}

	log.Println("create token:", mint.PublicKey)
	ch := make(chan struct{})

	go createAccount(mint.PublicKey.String(), ch)

	select {
	case <-ch:
	}

	//// TODO
	//token = common.PublicKeyFromString(mint.PublicKey.String())
	//
	//inst, account := assotokenprog.CreateAssociatedTokenAccount(
	//	alice.PublicKey,
	//	alice.PublicKey,
	//	token,
	//)
	//log.Println("create account: ", account.String())
	//
	//rawTx, err = types.CreateRawTransaction(types.CreateRawTransactionParam{
	//	Instructions:    []types.Instruction{inst},
	//	Signers:         []types.Account{alice},
	//	FeePayer:        alice.PublicKey,
	//	RecentBlockHash: res.Blockhash,
	//})
	//if err != nil {
	//	log.Fatalf("generate tx error, err: %v\n", err)
	//}
	//
	//_, err = c.SendRawTransaction(context.Background(), rawTx)
	//if err != nil {
	//	log.Fatalf("send raw tx error, err: %v\n", err)
	//}
}

func createAccount(token string, ch chan struct{}) {
	time.Sleep(60 * time.Second)
	var mintPubkey = common.PublicKeyFromString(token)

	c := client.NewClient(rpc.TestnetRPCEndpoint)

	res, err := c.GetRecentBlockhash(context.Background())
	if err != nil {
		log.Fatalf("get recent block hash error, err: %v\n", err)
	}
	ins, account := assotokenprog.CreateAssociatedTokenAccount(
		alice.PublicKey,
		alice.PublicKey,
		mintPubkey,
	)

	log.Println("create token account:", account.String(),
		" token: ", mintPubkey.ToBase58(),
		" hash ", res.Blockhash)

	rawTx, err := types.CreateRawTransaction(types.CreateRawTransactionParam{
		Instructions:    []types.Instruction{ins},
		Signers:         []types.Account{alice},
		FeePayer:        alice.PublicKey,
		RecentBlockHash: res.Blockhash,
	})
	if err != nil {
		log.Fatalf("generate tx error, err: %v\n", err)
	}

	txhash, err := c.SendRawTransaction(context.Background(), rawTx)
	if err != nil {
		log.Fatalf("send raw tx error, err: %v\n", err)
	}

	log.Println("txhash:", txhash)
	metadataAccount, err := tokenmeta.GetTokenMetaPubkey(mintPubkey)
	info, err := c.GetAccountInfo(context.Background(), metadataAccount.ToBase58())
	metadata, err := tokenmeta.MetadataDeserialize(info.Data)

	log.Println(info.Owner == common.TokenProgramID.String(),
		metadata, err)
	close(ch)
}