text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE eagle SYSTEM "eagle.dtd">
<eagle version="6.5.0">
<drawing>
<settings>
<setting alwaysvectorfont="no"/>
<setting verticaltext="up"/>
</settings>
<grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch" altunit="inch"/>
<layers>
<layer number="1" name="Top" color="4" fill="1" visible="no" active="no"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="no" active="no"/>
<layer number="17" name="Pads" color="2" fill="1" visible="no" active="no"/>
<layer number="18" name="Vias" color="2" fill="1" visible="no" active="no"/>
<layer number="19" name="Unrouted" color="6" fill="1" visible="no" active="no"/>
<layer number="20" name="Dimension" color="15" fill="1" visible="no" active="no"/>
<layer number="21" name="tPlace" color="7" fill="1" visible="no" active="no"/>
<layer number="22" name="bPlace" color="7" fill="1" visible="no" active="no"/>
<layer number="23" name="tOrigins" color="15" fill="1" visible="no" active="no"/>
<layer number="24" name="bOrigins" color="15" fill="1" visible="no" active="no"/>
<layer number="25" name="tNames" color="7" fill="1" visible="no" active="no"/>
<layer number="26" name="bNames" color="7" fill="1" visible="no" active="no"/>
<layer number="27" name="tValues" color="7" fill="1" visible="no" active="no"/>
<layer number="28" name="bValues" color="7" fill="1" visible="no" active="no"/>
<layer number="29" name="tStop" color="7" fill="3" visible="no" active="no"/>
<layer number="30" name="bStop" color="7" fill="6" visible="no" active="no"/>
<layer number="31" name="tCream" color="7" fill="4" visible="no" active="no"/>
<layer number="32" name="bCream" color="7" fill="5" visible="no" active="no"/>
<layer number="33" name="tFinish" color="6" fill="3" visible="no" active="no"/>
<layer number="34" name="bFinish" color="6" fill="6" visible="no" active="no"/>
<layer number="35" name="tGlue" color="7" fill="4" visible="no" active="no"/>
<layer number="36" name="bGlue" color="7" fill="5" visible="no" active="no"/>
<layer number="37" name="tTest" color="7" fill="1" visible="no" active="no"/>
<layer number="38" name="bTest" color="7" fill="1" visible="no" active="no"/>
<layer number="39" name="tKeepout" color="4" fill="11" visible="no" active="no"/>
<layer number="40" name="bKeepout" color="1" fill="11" visible="no" active="no"/>
<layer number="41" name="tRestrict" color="4" fill="10" visible="no" active="no"/>
<layer number="42" name="bRestrict" color="1" fill="10" visible="no" active="no"/>
<layer number="43" name="vRestrict" color="2" fill="10" visible="no" active="no"/>
<layer number="44" name="Drills" color="7" fill="1" visible="no" active="no"/>
<layer number="45" name="Holes" color="7" fill="1" visible="no" active="no"/>
<layer number="46" name="Milling" color="3" fill="1" visible="no" active="no"/>
<layer number="47" name="Measures" color="7" fill="1" visible="no" active="no"/>
<layer number="48" name="Document" color="7" fill="1" visible="no" active="no"/>
<layer number="49" name="Reference" color="7" fill="1" visible="no" active="no"/>
<layer number="51" name="tDocu" color="7" fill="1" visible="no" active="no"/>
<layer number="52" name="bDocu" color="7" fill="1" visible="no" active="no"/>
<layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"/>
<layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"/>
<layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"/>
<layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"/>
<layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"/>
<layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"/>
<layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"/>
<layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"/>
</layers>
<schematic xreflabel="%F%N/%S.%C%R" xrefpart="/%S.%C%R">
<libraries>
<library name="Connectors">
<packages>
<package name="CON06X2_2MM">
<pad name="1" x="-5" y="-1" drill="0.8" shape="square"/>
<pad name="2" x="-5" y="1" drill="0.8"/>
<pad name="3" x="-3" y="-1" drill="0.8"/>
<pad name="4" x="-3" y="1" drill="0.8"/>
<pad name="6" x="-1" y="1" drill="0.8"/>
<pad name="5" x="-1" y="-1" drill="0.8"/>
<pad name="7" x="1" y="-1" drill="0.8"/>
<pad name="8" x="1" y="1" drill="0.8"/>
<pad name="10" x="3" y="1" drill="0.8"/>
<pad name="9" x="3" y="-1" drill="0.8"/>
<pad name="11" x="5" y="-1" drill="0.8"/>
<pad name="12" x="5" y="1" drill="0.8"/>
<wire x1="-6" y1="2" x2="6" y2="2" width="0.127" layer="20"/>
<wire x1="6" y1="2" x2="6" y2="-2" width="0.127" layer="20"/>
<wire x1="6" y1="-2" x2="-6" y2="-2" width="0.127" layer="20"/>
<wire x1="-6" y1="-2" x2="-6" y2="2" width="0.127" layer="20"/>
<text x="-5.75" y="2.25" size="1.27" layer="25">>NAME</text>
<text x="5.75" y="-2.25" size="1.27" layer="27" rot="R180">>VALUE</text>
</package>
<package name="SOCKET06X2">
<pad name="1" x="-6.35" y="-1.27" drill="0.8" shape="square"/>
<pad name="2" x="-6.35" y="1.27" drill="0.8"/>
<pad name="3" x="-3.81" y="-1.27" drill="0.8"/>
<pad name="4" x="-3.81" y="1.27" drill="0.8"/>
<pad name="5" x="-1.27" y="-1.27" drill="0.8"/>
<pad name="6" x="-1.27" y="1.27" drill="0.8"/>
<pad name="7" x="1.27" y="-1.27" drill="0.8"/>
<pad name="8" x="1.27" y="1.27" drill="0.8"/>
<pad name="9" x="3.81" y="-1.27" drill="0.8"/>
<pad name="10" x="3.81" y="1.27" drill="0.8"/>
<pad name="11" x="6.35" y="-1.27" drill="0.8"/>
<pad name="12" x="6.35" y="1.27" drill="0.8"/>
<wire x1="-10.4775" y1="-4.445" x2="10.4775" y2="-4.445" width="0.127" layer="21"/>
<wire x1="10.4775" y1="4.445" x2="2.54" y2="4.445" width="0.127" layer="21"/>
<wire x1="2.54" y1="4.445" x2="-2.54" y2="4.445" width="0.127" layer="21"/>
<wire x1="-2.54" y1="4.445" x2="-10.4775" y2="4.445" width="0.127" layer="21"/>
<wire x1="-10.4775" y1="-4.445" x2="-10.4775" y2="4.445" width="0.127" layer="21"/>
<wire x1="10.4775" y1="4.445" x2="10.4775" y2="-4.445" width="0.127" layer="21"/>
<wire x1="-2.54" y1="4.445" x2="-2.54" y2="3.175" width="0.127" layer="21"/>
<wire x1="-2.54" y1="3.175" x2="2.54" y2="3.175" width="0.127" layer="21"/>
<wire x1="2.54" y1="3.175" x2="2.54" y2="4.445" width="0.127" layer="21"/>
<text x="-7.3025" y="-1.905" size="0.762" layer="21" align="bottom-right">1</text>
<text x="-7.3025" y="0.635" size="0.762" layer="21" align="bottom-right">2</text>
<text x="7.3025" y="0.635" size="0.762" layer="21">12</text>
<text x="7.3025" y="-1.5875" size="0.762" layer="21">11</text>
<text x="10.16" y="-5.08" size="1.27" layer="27" rot="R180">>VALUE</text>
<text x="-10.16" y="5.08" size="1.27" layer="25">>NAME</text>
</package>
</packages>
<symbols>
<symbol name="M06X2">
<pin name="1" x="-7.62" y="7.62" visible="pad" length="middle" direction="pas"/>
<pin name="3" x="-7.62" y="5.08" visible="pad" length="middle" direction="pas"/>
<pin name="5" x="-7.62" y="2.54" visible="pad" length="middle" direction="pas"/>
<pin name="7" x="-7.62" y="0" visible="pad" length="middle" direction="pas"/>
<pin name="9" x="-7.62" y="-2.54" visible="pad" length="middle" direction="pas"/>
<pin name="11" x="-7.62" y="-5.08" visible="pad" length="middle" direction="pas"/>
<pin name="2" x="7.62" y="7.62" visible="pad" length="middle" direction="pas" rot="R180"/>
<pin name="4" x="7.62" y="5.08" visible="pad" length="middle" direction="pas" rot="R180"/>
<pin name="6" x="7.62" y="2.54" visible="pad" length="middle" direction="pas" rot="R180"/>
<pin name="8" x="7.62" y="0" visible="pad" length="middle" direction="pas" rot="R180"/>
<pin name="10" x="7.62" y="-2.54" visible="pad" length="middle" direction="pas" rot="R180"/>
<pin name="12" x="7.62" y="-5.08" visible="pad" length="middle" direction="pas" rot="R180"/>
<wire x1="-2.54" y1="7.62" x2="-1.27" y2="7.62" width="0.6096" layer="94"/>
<wire x1="-2.54" y1="5.08" x2="-1.27" y2="5.08" width="0.6096" layer="94"/>
<wire x1="-2.54" y1="2.54" x2="-1.27" y2="2.54" width="0.6096" layer="94"/>
<wire x1="-2.54" y1="0" x2="-1.27" y2="0" width="0.6096" layer="94"/>
<wire x1="-2.54" y1="-2.54" x2="-1.27" y2="-2.54" width="0.6096" layer="94"/>
<wire x1="-2.54" y1="-5.08" x2="-1.27" y2="-5.08" width="0.6096" layer="94"/>
<wire x1="1.27" y1="7.62" x2="2.54" y2="7.62" width="0.6096" layer="94"/>
<wire x1="1.27" y1="5.08" x2="2.54" y2="5.08" width="0.6096" layer="94"/>
<wire x1="1.27" y1="2.54" x2="2.54" y2="2.54" width="0.6096" layer="94"/>
<wire x1="1.27" y1="0" x2="2.54" y2="0" width="0.6096" layer="94"/>
<wire x1="1.27" y1="-2.54" x2="2.54" y2="-2.54" width="0.6096" layer="94"/>
<wire x1="1.27" y1="-5.08" x2="2.54" y2="-5.08" width="0.6096" layer="94"/>
<wire x1="-4.445" y1="10.16" x2="4.445" y2="10.16" width="0.4064" layer="94"/>
<wire x1="4.445" y1="10.16" x2="4.445" y2="-7.62" width="0.4064" layer="94"/>
<wire x1="4.445" y1="-7.62" x2="-4.445" y2="-7.62" width="0.4064" layer="94"/>
<wire x1="-4.445" y1="-7.62" x2="-4.445" y2="10.16" width="0.4064" layer="94"/>
<text x="-4.445" y="-10.16" size="1.778" layer="96">>VALUE</text>
<text x="-4.445" y="10.795" size="1.778" layer="95">>NAME</text>
</symbol>
</symbols>
<devicesets>
<deviceset name="CON06X2-2MM">
<gates>
<gate name="G$1" symbol="M06X2" x="0" y="0"/>
</gates>
<devices>
<device name="" package="CON06X2_2MM">
<connects>
<connect gate="G$1" pin="1" pad="1"/>
<connect gate="G$1" pin="10" pad="10"/>
<connect gate="G$1" pin="11" pad="11"/>
<connect gate="G$1" pin="12" pad="12"/>
<connect gate="G$1" pin="2" pad="2"/>
<connect gate="G$1" pin="3" pad="3"/>
<connect gate="G$1" pin="4" pad="4"/>
<connect gate="G$1" pin="5" pad="5"/>
<connect gate="G$1" pin="6" pad="6"/>
<connect gate="G$1" pin="7" pad="7"/>
<connect gate="G$1" pin="8" pad="8"/>
<connect gate="G$1" pin="9" pad="9"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
<deviceset name="IDC-SOCKET06X2">
<gates>
<gate name="G$1" symbol="M06X2" x="0" y="0"/>
</gates>
<devices>
<device name="" package="SOCKET06X2">
<connects>
<connect gate="G$1" pin="1" pad="1"/>
<connect gate="G$1" pin="10" pad="10"/>
<connect gate="G$1" pin="11" pad="11"/>
<connect gate="G$1" pin="12" pad="12"/>
<connect gate="G$1" pin="2" pad="2"/>
<connect gate="G$1" pin="3" pad="3"/>
<connect gate="G$1" pin="4" pad="4"/>
<connect gate="G$1" pin="5" pad="5"/>
<connect gate="G$1" pin="6" pad="6"/>
<connect gate="G$1" pin="7" pad="7"/>
<connect gate="G$1" pin="8" pad="8"/>
<connect gate="G$1" pin="9" pad="9"/>
</connects>
<technologies>
<technology name=""/>
</technologies>
</device>
</devices>
</deviceset>
</devicesets>
</library>
</libraries>
<attributes>
</attributes>
<variantdefs>
</variantdefs>
<classes>
<class number="0" name="default" width="0" drill="0">
</class>
</classes>
<parts>
<part name="J2" library="Connectors" deviceset="CON06X2-2MM" device="" value=""/>
<part name="J1" library="Connectors" deviceset="IDC-SOCKET06X2" device="" value=""/>
</parts>
<sheets>
<sheet>
<plain>
</plain>
<instances>
<instance part="J2" gate="G$1" x="40.64" y="63.5" rot="MR0"/>
<instance part="J1" gate="G$1" x="73.66" y="63.5"/>
</instances>
<busses>
</busses>
<nets>
<net name="N$1" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="1"/>
<pinref part="J1" gate="G$1" pin="1"/>
<wire x1="48.26" y1="71.12" x2="66.04" y2="71.12" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$2" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="3"/>
<pinref part="J1" gate="G$1" pin="3"/>
<wire x1="48.26" y1="68.58" x2="66.04" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$3" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="5"/>
<pinref part="J1" gate="G$1" pin="5"/>
<wire x1="48.26" y1="66.04" x2="66.04" y2="66.04" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$4" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="7"/>
<pinref part="J1" gate="G$1" pin="7"/>
<wire x1="48.26" y1="63.5" x2="66.04" y2="63.5" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$5" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="9"/>
<pinref part="J1" gate="G$1" pin="9"/>
<wire x1="48.26" y1="60.96" x2="66.04" y2="60.96" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$6" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="11"/>
<pinref part="J1" gate="G$1" pin="11"/>
<wire x1="48.26" y1="58.42" x2="66.04" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$7" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="2"/>
<wire x1="33.02" y1="71.12" x2="30.48" y2="71.12" width="0.1524" layer="91"/>
<wire x1="30.48" y1="71.12" x2="30.48" y2="78.74" width="0.1524" layer="91"/>
<wire x1="30.48" y1="78.74" x2="83.82" y2="78.74" width="0.1524" layer="91"/>
<wire x1="83.82" y1="78.74" x2="83.82" y2="71.12" width="0.1524" layer="91"/>
<pinref part="J1" gate="G$1" pin="2"/>
<wire x1="81.28" y1="71.12" x2="83.82" y2="71.12" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$8" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="4"/>
<wire x1="33.02" y1="68.58" x2="27.94" y2="68.58" width="0.1524" layer="91"/>
<wire x1="27.94" y1="68.58" x2="27.94" y2="81.28" width="0.1524" layer="91"/>
<wire x1="27.94" y1="81.28" x2="86.36" y2="81.28" width="0.1524" layer="91"/>
<wire x1="86.36" y1="81.28" x2="86.36" y2="68.58" width="0.1524" layer="91"/>
<pinref part="J1" gate="G$1" pin="4"/>
<wire x1="86.36" y1="68.58" x2="81.28" y2="68.58" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$9" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="6"/>
<wire x1="33.02" y1="66.04" x2="25.4" y2="66.04" width="0.1524" layer="91"/>
<wire x1="25.4" y1="66.04" x2="25.4" y2="83.82" width="0.1524" layer="91"/>
<wire x1="25.4" y1="83.82" x2="88.9" y2="83.82" width="0.1524" layer="91"/>
<wire x1="88.9" y1="83.82" x2="88.9" y2="66.04" width="0.1524" layer="91"/>
<pinref part="J1" gate="G$1" pin="6"/>
<wire x1="88.9" y1="66.04" x2="81.28" y2="66.04" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$10" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="12"/>
<wire x1="33.02" y1="58.42" x2="30.48" y2="58.42" width="0.1524" layer="91"/>
<wire x1="30.48" y1="58.42" x2="30.48" y2="53.34" width="0.1524" layer="91"/>
<wire x1="30.48" y1="53.34" x2="83.82" y2="53.34" width="0.1524" layer="91"/>
<wire x1="83.82" y1="53.34" x2="83.82" y2="58.42" width="0.1524" layer="91"/>
<pinref part="J1" gate="G$1" pin="12"/>
<wire x1="83.82" y1="58.42" x2="81.28" y2="58.42" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$11" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="10"/>
<wire x1="33.02" y1="60.96" x2="27.94" y2="60.96" width="0.1524" layer="91"/>
<wire x1="27.94" y1="60.96" x2="27.94" y2="50.8" width="0.1524" layer="91"/>
<wire x1="27.94" y1="50.8" x2="86.36" y2="50.8" width="0.1524" layer="91"/>
<wire x1="86.36" y1="50.8" x2="86.36" y2="60.96" width="0.1524" layer="91"/>
<pinref part="J1" gate="G$1" pin="10"/>
<wire x1="86.36" y1="60.96" x2="81.28" y2="60.96" width="0.1524" layer="91"/>
</segment>
</net>
<net name="N$12" class="0">
<segment>
<pinref part="J2" gate="G$1" pin="8"/>
<wire x1="33.02" y1="63.5" x2="25.4" y2="63.5" width="0.1524" layer="91"/>
<wire x1="25.4" y1="63.5" x2="25.4" y2="48.26" width="0.1524" layer="91"/>
<wire x1="25.4" y1="48.26" x2="88.9" y2="48.26" width="0.1524" layer="91"/>
<wire x1="88.9" y1="48.26" x2="88.9" y2="63.5" width="0.1524" layer="91"/>
<pinref part="J1" gate="G$1" pin="8"/>
<wire x1="88.9" y1="63.5" x2="81.28" y2="63.5" width="0.1524" layer="91"/>
</segment>
</net>
</nets>
</sheet>
</sheets>
</schematic>
</drawing>
</eagle>

repository: joruizdegaribay/wireless-basedgames

path: /PCB Schemas/Connector V1/Connector.sch

repo_name: joruizdegaribay/wireless-basedgames

extension: sch


text:
// Lit renders a literal.
// Lit supports only built-in types (see in README.md)
// Passing any other type will panic

package main

import (
	"fmt"
	. "github.com/dave/jennifer/jen"
)

func main() {
	c := Id("a").Op(":=").Lit("a")

	fmt.Printf("%#v\n", c)

	c = Id("a").Op(":=").Lit(1.5)

	fmt.Printf("%#v\n", c)
}

repository: shahincsejnu/jennifer-library-hands-on

license_type: permissive

repo_name: shahincsejnu/jennifer-library-hands-on

branch_name: refs/heads/main

extension: go


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BulletController : MonoBehaviour
{
    private Rigidbody bulletRigidBody;
    private void OnEnable()
    {
        if (bulletRigidBody == null)
            bulletRigidBody = GetComponent<Rigidbody>();
        Invoke("DisableObject", 4);
    }
    /// <summary>
    /// invoked after a certain interval of time to
    /// reset the objects velocity and diables the gameobject
    /// </summary>
    private void DisableObject()
    {
        bulletRigidBody.velocity = Vector3.zero;
        gameObject.SetActive(false);
    }
}

license: MIT

repository: MaryamSaeed/VRCardBoard

repo_name: MaryamSaeed/VRCardBoard

branch_name: refs/heads/master

extension: cs


text:
# - Try to find btrie headers and libraries.
#
# Usage of this module as follows:
#
#     find_package(btrie)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
#  BTRIE_ROOT_DIR Set this variable to the root installation of
#                    btrie if the module has problems finding
#                    the proper installation path.
#
# Variables defined by this module:
#
#  BTRIE_FOUND             System has btrie libs/headers
#  BTRIE_LIBRARIES         The btrie library/libraries
#  BTRIE_INCLUDE_DIR       The location of btrie headers

find_path(BTRIE_ROOT_DIR
    NAMES include/btrie.h
)

find_library(BTRIE_LIBRARIES
    NAMES btrie
    PATHS ${BTRIE_ROOT_DIR}/lib ${BTRIE_LIBRARIES_PATHS}
)

find_path(BTRIE_INCLUDE_DIR
    NAMES btrie.h
    PATHS ${BTRIE_ROOT_DIR}/include ${BTRIE_INCLUDE_PATHS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(btrie DEFAULT_MSG
    BTRIE_LIBRARIES
    BTRIE_INCLUDE_DIR
)

mark_as_advanced(
    BTRIE_ROOT_DIR
    BTRIE_LIBRARIES
    BTRIE_INCLUDE_DIR
)

repository: kssenii/ClickHouse

repo_name: kssenii/ClickHouse

extension: cmake


text:
@article{malkhi:probabilistic-quorum-systems:ic2001,
 author = {Dahlia Malkhi and Michael K. Reiter and Avishai Wool and Rebecca N. Wright},
 title = {Probabilistic quorum systems},
 journal = {Information and Computation},
 volume = {170},
 number = {2},
 year = {2001},
 month = {November},
 issn = {0890-5401},
 pages = {184--206},
 doi = {http://dx.doi.org/10.1006/inco.2001.3054},
 publisher = {Academic Press, Inc.},
 address = {Duluth, MN, USA},
 }

repository: dataseries/Lintel

repo_name: dataseries/Lintel

gha_license_id: NOASSERTION

gha_language: Perl

extension: bib


text:
package pkg

import (
	"crypto/aes"
	"crypto/cipher"
	"encoding/binary"
	"io"
)

type fileEntry struct {
	Name   string
	Offset int64
	Size   int64
	Flags  uint32
	Key    cipher.Block
}

func (h *fileEntry) FileType() FileTypeEnum {
	flag := h.Flags & 0xff
	return FileTypeEnum(flag)
}

func (h *fileEntry) KeyType() uint16 {
	flag := h.Flags >> 24 & 0xff
	return uint16(flag)
}

func (h *fileEntry) IsFile() bool {
	switch h.FileType() {
	case FileTypeFile0:
		fallthrough
	case FileTypeFile1:
		fallthrough
	case FileTypeFileEdat:
		fallthrough
	case FileTypeFile3:
		fallthrough
	case FileTypeFileDocinfo:
		fallthrough
	case FileTypeFilePbp:
		fallthrough
	case FileTypeFileModule:
		fallthrough
	case FileTypeFile15:
		fallthrough
	case FileTypeFileKeystone:
		fallthrough
	case FileTypeFilePfs:
		fallthrough
	case FileTypeFileTemp:
		fallthrough
	case FileTypeFileInst:
		fallthrough
	case FileTypeFileClearsign:
		fallthrough
	case FileTypeFileSys:
		fallthrough
	case FileTypeFileDigs:
		return true
	default:
		return false
	}
}

func (h *fileEntry) IsDirectory() bool {
	switch h.FileType() {
	case FileTypeDirectory:
		fallthrough
	case FileTypeDirectoryPfs:
		return true
	default:
		return false
	}
}

func (pr *Reader) readFileIndex() ([]fileEntry, error) {
	itemRecords := make([]ItemRecord, pr.FileHeader.ItemCount)
	err := binary.Read(pr.reader, binary.BigEndian, &itemRecords)
	if err != nil {
		return nil, err
	}

	recordListSize := binary.Size(itemRecords)
	tableSize := itemRecords[0].DataOffset - int64(itemRecords[0].FilenameOffset)
	tableBuffer := make([]byte, tableSize)
	// do not use the current aes reader since the names
	// table could be encrypted using different keys
	_, err = io.ReadFull(pr.aesReader.RawReader(), tableBuffer)
	if err != nil {
		return nil, err
	}

	// advance the read stream
	pr.aesReader.SetCounter((int64(recordListSize) + tableSize) / 16)

	var ps3ctr cipher.Block

	if pr.extendedHeader.KeyType() == 1 {
		ps3ctr, err = aes.NewCipher(KeyPS3)
		if err != nil {
			return nil, err
		}
	}

	entries := make([]fileEntry, pr.FileHeader.ItemCount)

	for idx, entry := range itemRecords {
		counter := int64(entry.FilenameOffset / 16)
		tableOffset := int(entry.FilenameOffset) - recordListSize
		encryptedName := tableBuffer[tableOffset : tableOffset+int(entry.FilenameSize)]

		var ctr cipher.Block
		if pr.pkgType == PackageTypePSP || pr.pkgType == PackageTypePSOne {
			if entry.KeyType() == EntryTypePSP {
				ctr = pr.aesReader.block
			} else {
				ctr = ps3ctr
			}
		} else {
			ctr = pr.aesReader.block
		}

		AESCTRDecrypt(ctr, encryptedName, encryptedName, pr.FileHeader.DataIV[:], counter)

		entries[idx].Name = string(encryptedName)
		entries[idx].Size = entry.DataSize
		entries[idx].Offset = entry.DataOffset
		entries[idx].Flags = entry.Flags
		entries[idx].Key = ctr
	}

	return entries, nil
}

repository: codestation/go-pkgdec

repo_name: codestation/go-pkgdec


text:
import { gql } from 'apollo-server'
import { DocumentNode } from 'graphql'

const typeDefs: DocumentNode = gql`
    # Schemas
    type Layer {
        id: ID!
        title: String!
        time_enabled: Int!
        lat: Float!,
        lon: Float!,
        timestart: Int
        timeend: Int
        points: [Point]
    }

    type Point {
        id: ID!
        lat: Float!
        lon: Float!
        timestamp: Int
    }

    type Query {
        layers: [Layer]!
        points(layerIDs: [ID]!, timestart: Int, timeend: Int): [Point]
    }

    type Mutation {
        addLayer(title: String!, time_enabled: Int!, lat: Float!, lon: Float!, time_start: Int, time_end: Int): AddLayerResponse!
        addPoint(lat: Float!, lon: Float!, layerID: ID!, timestamp: Int): AddPointResponse!
    }

    type AddLayerResponse {
        success: Boolean!
        id: ID
    }

    type AddPointResponse {
        success: Boolean!
    }
`

export default typeDefs

repository: connorbillen/Patrol

repo_name: connorbillen/Patrol

extension: ts


text:
file(REMOVE_RECURSE
  "CMakeFiles/runHW4PopFromStackTests-3.dir/pop_tests.cpp.o"
  "runHW4PopFromStackTests-3.pdb"
  "runHW4PopFromStackTests-3"
)

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


text:
package rtime

import (
	"errors"
	"time"
)

// 计算2018年工作日间隔秒数
func SecondsAfterWorkDays(workDays int) (seconds int64) {
	now := time.Now()
	return int64(EndTimeInWorkDays(now, workDays).Sub(now).Seconds())
}

func IsWorkDay(day time.Time) bool {
	y, m, d := day.Date()
	t := time.Date(y, m, d, 0, 0, 0, 0, BeijingLocation)
	if holidays[t] {
		return false
	}
	if workdays[t] {
		return true
	}
	switch t.Weekday() {
	case time.Saturday:
		return false
	case time.Sunday:
		return false
	default:
		return true
	}
}

// work days between [start, end]
func WorkDaysBetween(start, end time.Time) (workDays int, err error) {
	start, end = start.In(BeijingLocation), end.In(BeijingLocation)

	if start.Before(effectStartDate) ||
		end.After(effectEndDate) ||
		start.After(end) {
		err = ErrTimeRangeNotSupport
		return
	}

	start = time.Date(start.Year(), start.Month(), start.Day(), 0, 0, 0, 0, BeijingLocation)
	end = time.Date(end.Year(), end.Month(), end.Day(), 0, 0, 0, 0, BeijingLocation)

	//TODO 有个优化方案，将每个月的工作日和假日数量落库，可以快速计算，将循环次数减少一个量级
	for start.Before(end) {
		if IsWorkDay(start) {
			workDays++
		}
		start = start.AddDate(0, 0, 1)
	}

	if IsWorkDay(end) {
		workDays++
	}
	return
}

func EndTimeInWorkDays(start time.Time, workDays int) (end time.Time) {
	if workDays <= 0 {
		return start
	}
	if workDays >= 60 {
		// 保险起见不允许计算超过60个工作日
		return start
	}
	//if start.Year() != 2018 {
	//	// 暂时只支持2018年的起始日期
	//	return start
	//}
	y, m, d := start.Date()
	t := time.Date(y, m, d, 0, 0, 0, 0, BeijingLocation)
	i := 0
	for {
		if i >= workDays {
			break
		}
		t = t.AddDate(0, 0, 1)
		if holidays[t] {
			goto HAPPY
		}
		if workdays[t] {
			goto WORK
		}
		switch t.Weekday() {
		case time.Saturday:
			goto HAPPY
		case time.Sunday:
			goto HAPPY
		default:
			goto WORK
		}
	WORK:
		i++
	HAPPY:
		continue
	}
	y, m, d = t.Date()
	return time.Date(y, m, d, 23, 59, 59, 0, BeijingLocation)
}

var (
	effectStartDate time.Time = time.Date(2018, 1, 1, 0, 0, 0, 0, BeijingLocation)
	effectEndDate   time.Time = time.Date(2020, 12, 31, 23, 59, 59, 0, BeijingLocation)

	ErrTimeRangeNotSupport error = errors.New("time range not support")
)

var holidays = map[time.Time]bool{
	// 2018
	time.Date(2018, 10, 1, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 10, 2, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 10, 3, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 10, 4, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 10, 5, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 10, 6, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 10, 7, 0, 0, 0, 0, BeijingLocation): true,

	// 2019
	time.Date(2019, 1, 1, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 2, 4, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 2, 5, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 2, 6, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 2, 7, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 2, 8, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 4, 5, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 5, 1, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 5, 2, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 5, 3, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 5, 4, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 6, 7, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 9, 13, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2019, 10, 1, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2019, 10, 2, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2019, 10, 3, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2019, 10, 4, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2019, 10, 7, 0, 0, 0, 0, BeijingLocation): true,

	// 2020
	time.Date(2020, 1, 1, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 1, 24, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 1, 27, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 1, 28, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 1, 29, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 1, 30, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 4, 6, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 5, 1, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 5, 4, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 5, 5, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 6, 25, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 6, 26, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 10, 1, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 10, 2, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 10, 5, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 10, 6, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 10, 7, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2020, 10, 8, 0, 0, 0, 0, BeijingLocation): true,

	// 2021
	// 元旦
	time.Date(2021, 1, 1, 0, 0, 0, 0, BeijingLocation): true,
	// 春节
	time.Date(2021, 2, 11, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 2, 12, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 2, 15, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 2, 16, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 2, 17, 0, 0, 0, 0, BeijingLocation): true,
	// 清明节
	time.Date(2021, 4, 5, 0, 0, 0, 0, BeijingLocation): true,
	// 劳动节
	time.Date(2021, 5, 3, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 5, 4, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 5, 5, 0, 0, 0, 0, BeijingLocation): true,
	// 端午节
	time.Date(2021, 6, 14, 0, 0, 0, 0, BeijingLocation): true,
	// 中秋节
	time.Date(2021, 9, 20, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 9, 21, 0, 0, 0, 0, BeijingLocation): true,
	// 国庆节
	time.Date(2021, 10, 1, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 10, 4, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 10, 5, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 10, 6, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 10, 7, 0, 0, 0, 0, BeijingLocation): true,
}

var workdays = map[time.Time]bool{
	// 2018
	time.Date(2018, 9, 29, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2018, 9, 30, 0, 0, 0, 0, BeijingLocation): true,

	// 2019
	time.Date(2019, 2, 2, 0, 0, 0, 0, BeijingLocation):   true,
	time.Date(2019, 2, 3, 0, 0, 0, 0, BeijingLocation):   true,
	time.Date(2019, 4, 28, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 5, 5, 0, 0, 0, 0, BeijingLocation):   true,
	time.Date(2019, 9, 29, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2019, 10, 12, 0, 0, 0, 0, BeijingLocation): true,

	// 2020
	time.Date(2020, 1, 19, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 2, 1, 0, 0, 0, 0, BeijingLocation):   true,
	time.Date(2020, 4, 26, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 5, 9, 0, 0, 0, 0, BeijingLocation):   true,
	time.Date(2020, 6, 28, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 9, 27, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2020, 10, 10, 0, 0, 0, 0, BeijingLocation): true,

	// 2021
	time.Date(2021, 2, 7, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2021, 2, 20, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 4, 25, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 5, 8, 0, 0, 0, 0, BeijingLocation):  true,
	time.Date(2021, 9, 18, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 9, 26, 0, 0, 0, 0, BeijingLocation): true,
	time.Date(2021, 10, 9, 0, 0, 0, 0, BeijingLocation): true,
}

repository: mt-team/mt-zero

repo_name: mt-team/mt-zero


text:
SUMMARY = "Cinnamon Control Center"
SECTION = "x11"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=75859989545e37968a99b631ef42722e"
DEPENDS = ""

inherit cinnamon autotools gettext gobject-introspection

SRC_URI[md5sum] = "2474b9f929758bffb121a33a139bc03a"
SRC_URI[sha256sum] = "3d9f0eb45168a91101f99452b38184dd6417dd89064be4523e565bd721a521fe"

repository: Varcain/meta-cinnamon

repo_name: Varcain/meta-cinnamon

extension: bb


text:
import {
  Body,
  Controller,
  Param,
  ParseUUIDPipe,
  Post,
  Sse,
} from '@nestjs/common';
import { UrlPipe } from '../pipe/url.pipe';
import { ConfigService } from '@nestjs/config';
import { Observable } from 'rxjs';
import { StreamService } from '../stream/stream.service';
import { StreamObservableInterface } from '../stream/streamObservable.interface';
import { InjectRepository } from '@nestjs/typeorm';
import { Report } from './report.entity';
import { Repository } from 'typeorm';
import { ApiBody, ApiTags } from '@nestjs/swagger';

@ApiTags('report')
@Controller('report')
export class ReportController {
  constructor(
    private configService: ConfigService,
    private streamService: StreamService,
    @InjectRepository(Report)
    private reportRepository: Repository<Report>,
  ) {}

  @ApiBody({
    // Issue https://github.com/nestjs/swagger/issues/669
    schema: {
      type: 'object',
      properties: {
        domain: {
          type: 'string',
        },
      },
    },
  })
  @Post()
  async createReport(
    @Body('domain', new UrlPipe()) domain: string,
  ): Promise<{ uuid: string; domain: string; updatedAt: Date }> {
    // we search if the domain has an existing entry in database
    let report = await this.reportRepository.findOne({ domain: domain });
    if (report === undefined) {
      // we need to create one
      report = new Report(domain);
      report.updatedAt = new Date();
      report = await this.reportRepository.save(report);
    }
    const { urls, createdAt, ...result } = report;
    return result;
  }

  @Sse('/:uuid')
  getReport(
    @Param('uuid', new ParseUUIDPipe()) uuid: string,
  ): Observable<StreamObservableInterface> {
    // checks if there is a current observable for this domain
    const existingObservable = this.streamService.getStreamObservableByUuid(
      uuid,
    );
    if (existingObservable) {
      return existingObservable;
    } else {
      // we need to create one
      return this.streamService.createStreamObservableEntry(uuid);
    }
  }
}

repository: baudev/gdpr-checker-backend

repo_name: baudev/gdpr-checker-backend


text:
package gbdb

import (
	"testing"
	"fmt"
	"unsafe"
)

func test1() {
	//定义一个切片类型的指针
	//给指针初始化
	mm := new([66]byte)
	a := (*[3]byte)(unsafe.Pointer(&mm))
	*a = [3]byte{'s'}
	fmt.Println(*a, 11111)
	u := unsafe.Pointer(mm)
	p := (*[3]byte)(u)
	fmt.Println(mm, &mm, &u)
	*p = [3]byte{'a', 'b', 'c'}
	*p = [3]byte{'f', 'f', 'f'}
	fmt.Println(mm, *p)
}

func Test(T *testing.T) {
	test1()
}

repository: blastbao/gbdb

repo_name: blastbao/gbdb


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Slicing_file
{
    public static class BinaryFile
    {
        static void Main(string[] args)
        {
            Slice("../../mk_icon.jpg", "../../parts", 4);
            Assemble("../../parts", "../../whole/result.jpg");
        }

        public static void Slice(string fileInputPath, string folderOutputPath, int outputFilesCount)
        {
            // Store the file in a byte array
            Byte[] byteSource = System.IO.File.ReadAllBytes(fileInputPath);

            FileInfo fiSource = new FileInfo(fileInputPath);

            int partSize = (int)Math.Ceiling((double)(fiSource.Length / outputFilesCount));

            // The offset at which to start reading from the source file
            int fileOffset = 0;

            // Stores the name of each file part
            string currPartPath;

            // The file stream that will hold each file part
            FileStream fsPart;

            // Loop through as many times we need to create the partial files
            for (int i = 0; i < outputFilesCount; i++)
            {
                // Store the path of the new part
                currPartPath = folderOutputPath + "\\" + fiSource.Name + "." + String.Format(@"{0:D4}", i) + ".part";

                // A filestream for the path
                if (!File.Exists(currPartPath))
                {
                    // Calculate the remaining size of the whole file
                    fsPart = new FileStream(currPartPath, FileMode.CreateNew);

                    // Set the new offset
                    fileOffset = i * partSize;

                    // Write the byte chunk to the part file
                    fsPart.Write(byteSource, fileOffset, partSize);

                    // Close the file stream
                    fsPart.Close();
                }
            }
        }

        public static void Assemble(string folderInputPath, string fileOutputPath)
        {
            // Needed to get all files in that directory
            DirectoryInfo diSource = new DirectoryInfo(folderInputPath);

            // Result file
            FileStream fsSource = new FileStream(fileOutputPath, FileMode.Append, FileAccess.Write);

            // Loop through all the files with the *.part extension in the folder
            foreach (FileInfo fiPart in diSource.GetFiles(@"*.part"))
            {
                Byte[] bytePart = System.IO.File.ReadAllBytes(fiPart.FullName);

                // Write the bytes to the reconstructed file appending to previous written data
                fsSource.Write(bytePart, 0, bytePart.Length);
            }

            fsSource.Close();
        }

    }
}


text:
# Include guard
if(OMZDOXYCONF_INCLUDED)
    return()
endif()
set(OMZDOXYCONF_INCLUDED 1)

# Add option string to Doxygen configuration
macro(_doxy_add_option VARIABLE OPTION VALUE)

    string(LENGTH "${OPTION}" OPTION_LENGTH)
    set(${VARIABLE} "${${VARIABLE}}${OPTION}")
    foreach(ITR RANGE ${OPTION_LENGTH} 21)
        set(${VARIABLE} "${${VARIABLE}} ")
    endforeach()
    set(${VARIABLE} "${${VARIABLE}} = ${VALUE}\n")

endmacro()

# Configure Doxygen configuration file
function(omz_configure_doxy_file CONFIGURATION_FILE)

    # Formats
    set(DOXY_FORMATS_ALL
        HTML
        HTMLHELP
        QHP
        LATEX
        MAN
        RTF
        XML
        DOCBOOK)

    # Bool options
    set(DOXY_OPTIONS_BOOL
        RECURSIVE
        DISABLE_INDEX
        SEARCHENGINE
        QUIET)
    # Single options
    set(DOXY_OPTIONS_SINGLE
        IMAGE_PATH
        USE_MDFILE_AS_MAINPAGE
        PROJECT_NAME
        PROJECT_NUMBER
        PROJECT_BRIEF
        PROJECT_LOGO
        OUTPUT_DIRECTORY
        OUTPUT_LANGUAGE
        HTML_EXTRA_STYLESHEET
        CHM_FILE
        CHM_INDEX_ENCODING
        HHC_LOCATION
        QCH_FILE
        QHP_NAMESPACE
        QHP_VIRTUAL_FOLDER
        QHP_CUST_FILTER_NAME
        QHP_CUST_FILTER_ATTRS
        QHP_SECT_FILTER_ATTRS
        QHG_LOCATION
        MAN_EXTENSION)
    # Multi options
    set(DOXY_OPTIONS_MULTI
        INPUT
        FILE_PATTERNS
        EXCLUDE_PATTERNS)

    # Parse function arguments
    cmake_parse_arguments(DOXY
        "${DOXY_OPTIONS_BOOL}"
        "${DOXY_OPTIONS_SINGLE}"
        "FORMATS;${DOXY_OPTIONS_MULTI}"
        ${ARGN})
    if(DOXY_UNPARSED_ARGUMENTS)
        foreach(ARG ${DOXY_UNPARSED_ARGUMENTS})
            message(WARNING "Unknown argument: ${ARG}")
        endforeach()
    endif()

    # Exit function if there is no input specified
    if(NOT DOXY_INPUT)
        message(WARNING "No input files were specified. Make shure the 'INPUT' argument is not empty.")
        return()
    endif()
    # Prepare input string for doxygen.conf
    string(REPLACE ";" " " DOXY_INPUT "${DOXY_INPUT}")

    # Check project name
    if(NOT DOXY_PROJECT_NAME)
        set(DOXY_PROJECT_NAME "${PROJECT_NAME}")
    endif()
    set(DOXY_PROJECT_NAME \"${DOXY_PROJECT_NAME}\")

    # Check project version
    if(NOT DOXY_PROJECT_NUMBER)
        set(DOXY_PROJECT_NUMBER ${PROJECT_VERSION})
    endif()

    # Check output directory
    if(NOT DOXY_OUTPUT_DIRECTORY)
        set(DOXY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
    endif()

    # Check OUTPUT_LANGUAGE
    if(NOT DOXY_OUTPUT_LANGUAGE)
        set(DOXY_OUTPUT_LANGUAGE "English")
    endif()

    # HTMLHELP
    if("HTMLHELP" IN_LIST DOXY_FORMATS)
        if(NOT CHM_FILE)
            message(CRITICAL "HTMLHELP is enabled but CHM_FILE is not set")
        endif()
        if(NOT DOXY_HHC_LOCATION)
            find_program(DOXY_HHC_LOCATION "hhc")
            if(NOT DOXY_HHC_LOCATION)
                message(WARNING "HHC executable was not found")
                set(DOXY_HHC_LOCATION "hhc.exe" CACHE PATH "HHC executable" FORCE)
            endif()
        endif()
        list(APPEND DOXY_FORMATS "html" "htmlhelp")
        set(DOXY_SEARCHENGINE "NO")
        set(DOXY_DISABLE_INDEX "YES")
        set(DOXY_GRAPHVIS "NO")
        set(CHM_FILE \"${CHM_FILE}\")
    endif()

    # QHP
    if("QHP" IN_LIST DOXY_FORMATS)
        if(NOT DOXY_QCH_FILE)
            message(CRITICAL "QHP is enabled but QCH_FILE is not set")
        endif()
        if(NOT DOXY_QHG_LOCATION)
            find_program(DOXY_QHG_LOCATION "qhelpgenerator")
            if(NOT DOXY_QHG_LOCATION)
                message(WARNING "qhelpgenerator executable was not found")
                set(DOXY_QHG_LOCATION "qhelpgenerator" CACHE PATH "QHG executable" FORCE)
            endif()
        endif()
        list(APPEND DOXY_FORMATS "html" "qhp")
        set(DOXY_SEARCHENGINE "NO")
        set(DOXY_DISABLE_INDEX "YES")
        set(DOXY_GRAPHVIS "NO")
        set(DOXY_QCH_FILE \"${DOXY_QCH_FILE}\")
    endif()

    # Check if no formats are enabled
    if(NOT DOXY_FORMATS)
        set(DOXY_FORMATS "html")
    endif()

    # Check file patterns
    if(NOT DOXY_FILE_PATTERNS)
        set(DOXY_FILE_PATTERNS "*.h *.h.in *.hpp *.cpp *.md *.txt")
    endif()

    # Exclude patterns
    list(APPEND DOXY_EXCLUDE_PATTERNS "CMakeLists.txt")

    # Create output directory
    file(MAKE_DIRECTORY "${DOXY_OUTPUT_DIRECTORY}")
    set(DOXY_OUTPUT_DIRECTORY \"${DOXY_OUTPUT_DIRECTORY}\")

    # Process formats variables
    list(REMOVE_DUPLICATES DOXY_FORMATS)
    foreach(FORMAT ${DOXY_FORMATS})
        string(TOUPPER ${FORMAT} FORMAT_UPPER)
        list(FIND DOXY_FORMATS_ALL ${FORMAT_UPPER} IND)
        if(NOT IND EQUAL -1)
            set(DOXY_GEN_${FORMAT_UPPER} "YES")
        else()
            message(WARNING "Unknown doxygen format: ${FORMAT}")
        endif()
    endforeach()

    # Generating Doxygen configuration
    unset(DOXY_CONF_CONTENT CACHE)

    # Executables
    foreach(EXECUTABLE HHC QHG)
        if(DOXY_${EXECUTABLE}_LOCATION)
            _doxy_add_option(DOXY_CONF_CONTENT ${EXECUTABLE}_LOCATION "\"${DOXY_${EXECUTABLE}_LOCATION}\"")
        endif()
    endforeach()
    if(DOXY_CONF_CONTENT)
        set(DOXY_CONF_CONTENT "# Executables:\n${DOXY_CONF_CONTENT}\n")
    endif()

    # Formats
    set(DOXY_CONF_CONTENT "${DOXY_CONF_CONTENT}# Formats:\n")
    foreach(FORMAT ${DOXY_FORMATS_ALL})
        if(DOXY_GEN_${FORMAT})
            _doxy_add_option(DOXY_CONF_CONTENT GENERATE_${FORMAT} YES)
        else()
            _doxy_add_option(DOXY_CONF_CONTENT GENERATE_${FORMAT} NO)
        endif()
    endforeach()
    # Options
    set(DOXY_CONF_CONTENT "${DOXY_CONF_CONTENT}\n# Options:\n")
    foreach(ARG IN LISTS DOXY_OPTIONS_BOOL DOXY_OPTIONS_SINGLE DOXY_OPTIONS_MULTI)
        if(DEFINED DOXY_${ARG})
            _doxy_add_option(DOXY_CONF_CONTENT ${ARG} "${DOXY_${ARG}}")
        endif()
    endforeach()

    # Writing Doxygen file if need
    unset(DOXY_CONF_CONTENT_OLD CACHE)
    if(EXISTS "${CONFIGURATION_FILE}")
        file(READ "${CONFIGURATION_FILE}" DOXY_CONF_CONTENT_OLD)
    endif()
    if(NOT "${DOXY_CONF_CONTENT_OLD}" STREQUAL "${DOXY_CONF_CONTENT}")
        file(WRITE "${CONFIGURATION_FILE}" "${DOXY_CONF_CONTENT}")
    endif()

endfunction()

# Configure a QHCP file
function(omz_configure_qhcp_file DOXY_QHCP_FILE)

    # Check arguments
    if(NOT ARGN)
        message(CRITICAL "Usage: configure_qhcp_file(<qhcp_file> <qch_file> [<qch_file> ...])")
    endif()

    # Generating QHCP file content
    unset(DOXY_QHCP_CONTENT CACHE)

    set(DOXY_QHCP_CONTENT "\
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<QHelpCollectionProject version=\"1.0\">
    <docFiles>
        <register>")

    foreach(QCH ${ARGN})
        set(DOXY_QHCP_CONTENT "${DOXY_QHCP_CONTENT}
            <file>${QCH}</file>")
    endforeach()

    set(DOXY_QHCP_CONTENT "${DOXY_QHCP_CONTENT}
        </register>
    </docFiles>
</QHelpCollectionProject>
")

    # Writing QHCP file if need
    unset(DOXY_QHCP_CONTENT_OLD CACHE)
    if(EXISTS "${DOXY_QHCP_FILE}")
       file(READ "${DOXY_QHCP_FILE}" DOXY_QHCP_CONTENT_OLD)
    endif()
    if(NOT "${DOXY_QHCP_CONTENT_OLD}" STREQUAL "${DOXY_QHCP_CONTENT}")
       file(WRITE "${DOXY_QHCP_FILE}" "${DOXY_QHCP_CONTENT}")
    endif()

endfunction()

# Write a file for sources versions
function(omz_write_sources_versions OUTPUT_FILE SOURCES)

    __check_git_executable()

    set(VERSIONS_CONTENT "/**\n")
    foreach(FILE ${SOURCES})
        if(${FILE} MATCHES ".*(CMakeLists\\.txt)")
            continue()
        endif()
        execute_process(COMMAND ${GIT_EXECUTABLE} -C ${PROJECT_SOURCE_DIR} log -n 1 --pretty=format:%ci ${FILE}
            OUTPUT_VARIABLE SOURCE_DATE
            RESULT_VARIABLE RESULT
            OUTPUT_STRIP_TRAILING_WHITESPACE)
        if(${RESULT} EQUAL 0)
            execute_process(COMMAND ${GIT_EXECUTABLE} -C ${PROJECT_SOURCE_DIR} log -n 1 --pretty=format:%h ${FILE}
                OUTPUT_VARIABLE SOURCE_VERSION
                OUTPUT_STRIP_TRAILING_WHITESPACE)
            set(VERSIONS_CONTENT
                "${VERSIONS_CONTENT} *\n * @file ${FILE}\n * @version ${SOURCE_VERSION}\n * @date ${SOURCE_DATE}\n")
        endif()
    endforeach()
    set(VERSIONS_CONTENT "${VERSIONS_CONTENT} *\n **/\n\n")

    unset(VERSIONS_CONTENT_OLD CACHE)
    if(EXISTS "${OUTPUT_FILE}")
        file(READ "${OUTPUT_FILE}" VERSIONS_CONTENT_OLD)
    endif()
    if(NOT "${VERSIONS_CONTENT_OLD}" STREQUAL "${VERSIONS_CONTENT}")
        file(WRITE "${OUTPUT_FILE}" "${VERSIONS_CONTENT}")
    endif()

endfunction()

license: Zlib

repository: mentaljam/OMZModules

repo_name: mentaljam/OMZModules


text:
package umem

/*
UMemSpaceSet - DescribeUMemSpace

this model is auto created by ucloud code generater for open api,
you can also see https://docs.ucloud.cn for detail.
*/
type UMemSpaceSet struct {

	// 内存空间ID
	SpaceId string

	// 内存空间名称
	Name string

	// 可用区，参见[可用区列表](../summary/regionlist.html)
	Zone string

	// 创建时间
	CreateTime int

	// 到期时间
	ExpireTime int

	// 空间类型:single(无热备),double(热备)
	Type string

	// 协议类型: memcache, redis
	Protocol string

	// 容量单位GB
	Size int

	// 使用量单位MB
	UsedSize int

	// Starting:创建中 Running:运行中 Fail:失败
	State string

	// Year, Month, Dynamic, Trial
	ChargeType string

	// IP端口信息请参见 UMemSpaceAddressSet
	Address []UMemSpaceAddressSet

	// VPC ID
	VPCId string

	// Subnet ID
	SubnetId string

	// 业务组
	Tag string
}

repository: haowangucloud/ucloud-sdk-go

repo_name: haowangucloud/ucloud-sdk-go


text:
require gnome-control-center.inc
SRC_URI[archive.md5sum] = "4f19c72a6cfe1956cc2172caae5494c1"
SRC_URI[archive.sha256sum] = "07aed27d6317f2cad137daa6d94a37ad02c32b958dcd30c8f07d0319abfb04c5"

repository: oholiab/citadel

repo_name: oholiab/citadel


text:
@article{twining-ward_social_2022,
 abstract = {Abstract Historically, Internet access has been linked to a country’s wealth. However, starting a decade ago, this situation changed dramatically and Internet access became increasingly available in primate range countries. The rapid growth of smartphone use in developing nations has created new avenues to communicate conservation. Here we assess the potential of social media to promote primate conservation at the local level within primate range countries. We interviewed 381 people in communities associated with 18 conservation projects from 11 countries to assess their use of social media. We found that 91% of the people had at least one social media account and 95% of these people checked their accounts daily. The median number of contacts per person across all platforms was 453 and 300 considering only each person’s most used platform. We also documented that local conservation projects had a diversity of information they wanted to relay to the local community through social media. Our research highlights the potential for social media to be an extremely useful communication tool for tropical conservation scientists. Thus, we encourage more conservation groups to explore using social media to communicate to local communities and to report on the impact it has on conservation.},
 author = {Twining-Ward, Cate and Luna, Jorge Ramos and Back, Janaína Paula and Barakagwira, Joselyne and Bicca-Marques, Júlio César and Chanvin, Mathilde and Diko, Nona and Duboscq, Julie and Fan, Pengfei and Galán-Acedo, Carmen and Gogarten, Jan F. and Guo, Songtao and Guzman-Caro, Diana C. and Hou, Rong and Kalbitzer, Urs and Kaplin, Beth A. and Lee, Sean M. and Mekonnen, Addisu and Mungongo, Paulin and Nautiyal, Himani and Omeja, Patrick and Ramananjato, Veronarindra and Raoelinjanakolona, Nasandratra Nancia and Razafindratsima, Onja and Sarabian, Cécile and Sarkar, Dipto and Serio-Silva, Juan Carlos and Yanti, Risma and Chapman, Colin A.},
 doi = {10.1163/14219980-bja10001},
 file = {Submitted Version:/Users/Urs/Zotero/storage/77FCJXEW/Twining-Ward et al. - 2022 - Social media’s potential to promote conservation a.pdf:application/pdf},
 issn = {1421-9980, 0015-5713},
 journal = {Folia Primatologica},
 keywords = {primate conservation, conservation education, conservation outreach, digital communication, environmental awareness, Internet access},
 language = {eng},
 month = {May},
 note = {Publisher: Brill},
 number = {2},
 pages = {163--173},
 shorttitle = {Social media’s potential to promote conservation at the local level},
 title = {Social media’s potential to promote conservation at the local level: an assessment in eleven primate range countries},
 url = {https://brill.com/view/journals/ijfp/93/2/article-p163_4.xml},
 urldate = {2023-01-13},
 volume = {93},
 year = {2022}
}

gha_license_id: MIT

gha_language: TeX


text:
package initsh

import "strings"
import "path/filepath"

type cargoDeliverer struct {
	bucket cargoBucketer
	slotter cargoSlotter
}

type cargoAddress struct {
	bucket string
	slot string
}

func pathToCargoAddress (dest cargoAddress) string {
	return dest.bucket + "/" + dest.slot
}

type cargoSlotter interface {
	slotCargo (dest cargoAddress, originPath string) error
}

type cargoBucketer interface {
	bucketCargo (bucket string) error
}

func (d cargoDeliverer) deliver (dest cargoAddress, originPath string) error {
	err := d.bucket.bucketCargo(dest.bucket)
	if err != nil {
		return err
	}
	return d.slotter.slotCargo(dest, originPath)
}

type bucketerPathMode struct { }

func (b bucketerPathMode) bucketCargo (bucket string) error {
	db := dirBinder{}
	return bindTo(db, bucket)
}

type bucketerSubcmd struct { }

func (b bucketerSubcmd) bucketCargo (bucket string) error {
	return bindTo(makeSubcmdBinder(), bucket)
}

type binderSlotter struct {
	binder idempotentBinder
}

func (s binderSlotter) slotCargo (dest cargoAddress, originPath string) error {
	return bindTo(s.binder, pathToCargoAddress(dest))
}

type subcmdSlotter struct {
	inTreeDir cargoSlotter
}

func (s subcmdSlotter) slotCargo (dest cargoAddress, originPath string) error {
	fileDest := cargoAddress{toSubcmdTreeDir(dest.bucket), dest.slot}
	return bindCargo(linkBinder{originPath}, fileDest)
}

func toSubcmdTreeDir (entryPath string) string {
	return strings.TrimRight(entryPath, "/") + "-subcmd/"
}

type symLinkSlotter struct { }
type dataSlotter struct { }
type gzDataSlotter struct { }

func (s symLinkSlotter) slotCargo (dest cargoAddress, originPath string) error {
	return bindCargo(linkBinder{originPath}, dest)
}

func (s dataSlotter) slotCargo (dest cargoAddress, originPath string) error {
	abs, err := filepath.Abs(originPath)
	if err != nil {
		return err
	}
	return bindCargo(makeReadBinder(abs, "cat"), dest)
}

func (s gzDataSlotter) slotCargo (dest cargoAddress, originPath string) error {
	abs, err := filepath.Abs(originPath)
	if err != nil {
		return err
	}
	return bindCargo(makeReadBinder(abs, "zcat"), dest)
}

func bindCargo (binder idempotentBinder, dest cargoAddress) error {
	return  bindTo(binder, pathToCargoAddress(dest))
}

repository: Mister-Meeseeks/initSh

repo_name: Mister-Meeseeks/initSh

gha_language: Shell


text:
package cli

import (
	"os"
	"path"

	"bytes"
	"fmt"

	"github.com/spf13/cobra"
)

func newGenerateDocsCommand(rootCmd *cobra.Command) *cobra.Command {
	cmd := &cobra.Command{
		Use:    "generate-docs",
		Short:  "",
		Run:    handleErrors(generateDocs(rootCmd)),
		Args:   cobra.ExactArgs(0),
		Hidden: true,
	}

	cmd.Flags().StringP("docs-folder", "f", "", "Path to replicate-docs")
	if err := cmd.MarkFlagRequired("docs-folder"); err != nil {
		panic(err)
	}

	return cmd
}

func generateDocs(rootCmd *cobra.Command) func(cmd *cobra.Command, args []string) error {
	return func(cmd *cobra.Command, args []string) error {
		docsFolder, err := cmd.Flags().GetString("docs-folder")
		if err != nil {
			return err
		}

		docsPath := path.Join(docsFolder, "cli.mdx")
		err = genMarkdownSingleFile(rootCmd, docsPath)
		if err != nil {
			return err
		}
		return nil
	}
}

func genMarkdownSingleFile(cmd *cobra.Command, path string) error {
	// TODO: support more than two levels of commands?

	f, err := os.Create(path)
	if err != nil {
		return err
	}
	defer f.Close()

	fmt.Fprintf(f, `
<!-- Do not edit this file! It is generated by go/pkg/cli/generate_docs.go and "make docs" -->
import DocsLayout from "../../../layouts/docs";

<DocsLayout title="CLI reference">

This is the reference for the Replicate command-line interface. You can also see this in the terminal by running `+"`replicate --help` or `replicate command --help`"+`.

To install the command-line interface, [see the installation instructions](/docs).

`)

	cmd.DisableAutoGenTag = true

	fmt.Fprintln(f, "## Commands")
	fmt.Fprintln(f)

	for _, c := range cmd.Commands() {
		if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
			continue
		}

		fmt.Fprintf(f, "* [`%s %s`](#replicate-%s) – %s\n", cmd.Name(), c.Name(), c.Name(), c.Short)
	}

	fmt.Fprintln(f, "")

	for _, c := range cmd.Commands() {
		if !c.IsAvailableCommand() || c.IsAdditionalHelpTopicCommand() {
			continue
		}
		c.DisableAutoGenTag = true
		if err := genMarkdown(c, f); err != nil {
			return err
		}
	}

	fmt.Fprintln(f, "</DocsLayout>")

	return nil
}

func genMarkdown(cmd *cobra.Command, f *os.File) error {
	cmd.InitDefaultHelpCmd()
	cmd.InitDefaultHelpFlag()

	buf := new(bytes.Buffer)
	name := cmd.CommandPath()

	short := cmd.Short
	long := cmd.Long

	buf.WriteString(fmt.Sprintf("## `%s`\n\n", name))
	if long != "" {
		buf.WriteString(long + "\n\n")
	} else {
		buf.WriteString(short + "\n\n")
	}

	if cmd.Runnable() {
		buf.WriteString("### Usage\n\n")
		buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.UseLine()))

		if len(cmd.Example) > 0 {
			buf.WriteString("### Examples\n\n")
			buf.WriteString(fmt.Sprintf("```\n%s\n```\n\n", cmd.Example))
		}

		if err := printOptions(buf, cmd, name); err != nil {
			return err
		}
	}
	_, err := buf.WriteTo(f)
	return err
}

func printOptions(buf *bytes.Buffer, cmd *cobra.Command, name string) error {
	flags := cmd.NonInheritedFlags()
	flags.SetOutput(buf)
	parentFlags := cmd.InheritedFlags()
	hasFlags := flags.HasAvailableFlags() || parentFlags.HasAvailableFlags()

	if !hasFlags {
		return nil
	}

	buf.WriteString("### Flags\n\n```\n")

	if flags.HasAvailableFlags() {
		flags.PrintDefaults()
		buf.WriteString("\n")
	}

	parentFlags.SetOutput(buf)
	if parentFlags.HasAvailableFlags() {
		parentFlags.PrintDefaults()
	}

	buf.WriteString("```\n")

	return nil
}

repository: talemache/replicate

repo_name: talemache/replicate


text:
package analysis_group

import (
	"errors"
	"fmt"
	"telegraphTranslator/config"
	"telegraphTranslator/global"
)

// 编组3： 电报类型
func AnalysisGroup3(message string) (data string, err error) {
	if true == global.GlobalVar.PrintDebugInfo {
		fmt.Println("GetGroup3Info：", message)
		defer func() {
			fmt.Println("GetGroup3Info resp ", data)
		}()
	}

	if len(message) < 3 {
		errMsg := fmt.Sprintf("电报类型数据错误：请检查[Message: %s]\n", message)
		err = errors.New(errMsg)
		return
	}
	messageType := message[0:3]
	for _, value := range config.Group3_info.Info {
		if value.MessageType == messageType {
			data = value.Desc + "\n"
		}
	}

	messageContent := message[3:]

	tmp := ""

	messageArr := make([]string, 0)
	for _, value := range messageContent {
		ch := fmt.Sprintf("%c", value)
		if "/" == ch {
			if "" != tmp {
				messageArr = append(messageArr, tmp)
			}

			tmp = ""
		} else if ch >= "A" && ch <= "Z" {
			if 0 != len(tmp) && tmp[0:1] >= "A" && tmp[0:1] <= "Z" {
				tmp += ch
			} else {
				if "" != tmp {
					messageArr = append(messageArr, tmp)
				}
				tmp = ch
			}

		} else if ch >= "0" && ch <= "9" {
			if 0 != len(tmp) && tmp[0:1] >= "0" && tmp[0:1] <= "9" {
				tmp += ch
			} else {
				if "" != tmp {
					messageArr = append(messageArr, tmp)
				}
				tmp = ch
			}
		}
	}
	messageArr = append(messageArr, tmp)

	// 解析报文
	if "LAM" == messageType {
		tmp, _ = ProLAMGroup3Message(messageArr)
	}

	if "" != tmp {
		data += "   -" + tmp + "\n"
	}

	return
}

func ProLAMGroup3Message(message []string) (data string, err error) {

	data = "空中交通服务单位" + message[1] + "收到了单位" + message[0] + "所发的" + message[2] + "电报" + ","
	data += "此电报为对单位" + message[3] + "发送给单位" + message[4] + "的" + message[5] + "号电报的确认"
	return
}

repository: mywangxiaojie/telegraphTranslator

repo_name: mywangxiaojie/telegraphTranslator


text:
SUMMARY = "Hardware performance monitoring counters"
HOMEPAGE = "https://team.inria.fr/pacap/software/tiptop/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "ncurses libxml2 bison-native flex-native"

SRC_URI = "http://files.inria.fr/pacap/${BPN}/${BP}.tar.gz \
           file://0001-Fix-parallel-build-problems-by-Adrian-Bunk.patch \
           file://0002-fix-reproducibility-of-build-process.patch \
           file://0001-Fix-build-when-S-B.patch \
           file://0001-Fix-a-lot-of-Werror-format-security-errors-with-mvwp.patch \
           "
SRC_URI[sha256sum] = "51c4449c95bba34f16b429729c2f58431490665d8093efaa8643b2e1d1084182"

UPSTREAM_CHECK_URI = "https://team.inria.fr/pacap/software/tiptop/"

inherit autotools

EXTRA_OECONF = "CFLAGS="$CFLAGS -I${STAGING_INCDIR}/libxml2""
COMPATIBLE_HOST = "(i.86|x86_64|arm|powerpc|aarch64).*-linux"

do_configure:prepend () {
    # Two bugs in configure.ac when cross-compiling.
    # 1. The path of libxml2. Specify it in EXTRA_OECONF.
    # 2. hw's value on other platforms. Replace it if the target is
    #    not i*86/x86_64.
    if ( echo "${TARGET_ARCH}" | grep -q -e 'i.86' -e 'x86_64' ); then
        sed -i 's= -I/usr/include/libxml2=='    ${S}/configure.ac
    else
        sed -i 's/hw=`uname -m`/hw="unknown"/'  ${S}/configure.ac
        sed -i 's= -I/usr/include/libxml2=='    ${S}/configure.ac
    fi
}

repository: openembedded/meta-openembedded

repo_name: openembedded/meta-openembedded

gha_language: BitBake


text:
@article{DIGIACOMO201725,
	title = "High performance encapsulation and networking in Casanova 2",
	journal = "Entertainment Computing",
	volume = "20",
	pages = "25 - 41",
	year = "2017",
	author = "F. Di Giacomo and M. Abbadi and A. Cortesi and P. Spronck and G. Costantini and G. Maggiore",
}

@misc{oleg2016,
	title = {Free and Freer Monads: Putting Monads Back into Closet},
	author = {O. Kiselyov},
	howpublished = {\url{http://okmij.org/ftp/Computation/free-monad.html}},
	year = {2016}
}

@inproceedings{weise1993programmable,
	title={Programmable syntax macros},
	author={Weise, Daniel and Crew, Roger},
	booktitle={ACM SIGPLAN Notices},
	volume={28},
	number={6},
	pages={156--165},
	year={1993},
	organization={ACM}
}

@article{campbell1978compiler,
	title={A compiler definition facility based on the syntactic macro},
	author={Campbell, WR},
	journal={The Computer Journal},
	volume={21},
	number={1},
	pages={35--41},
	year={1978},
	publisher={Br Computer Soc}
}

@inproceedings{sheard2002template,
	title={Template meta-programming for Haskell},
	author={Sheard, Tim and Jones, Simon Peyton},
	booktitle={Proceedings of the 2002 ACM SIGPLAN workshop on Haskell},
	pages={1--16},
	year={2002},
	organization={ACM}
}

@article{bravenboer2008stratego,
	title={Stratego/XT 0.17. A language and toolset for program transformation},
	author={Bravenboer, Martin and Kalleberg, Karl Trygve and Vermaas, Rob and Visser, Eelco},
	journal={Science of computer programming},
	volume={72},
	number={1},
	pages={52--70},
	year={2008},
	publisher={Elsevier}
}

@inproceedings{pettersson1996compiler,
	title={A compiler for natural semantics},
	author={Pettersson, Mikael},
	booktitle={Compiler Construction},
	pages={177--191},
	year={1996},
	organization={Springer}
}

@article{van2000domain,
  title={Domain-specific languages: An annotated bibliography.},
  author={Van Deursen, Arie and Klint, Paul and Visser, Joost and others},
  journal={Sigplan Notices},
  volume={35},
  number={6},
  pages={26--36},
  year={2000}
}

@book{voelter2013dsl,
	title={DSL engineering: Designing, implementing and using domain-specific languages},
	author={Voelter, Markus and Benz, Sebastian and Dietrich, Christian and Engelmann, Birgit and Helander, Mats and Kats, Lennart CL and Visser, Eelco and Wachsmuth, Guido},
	year={2013},
	publisher={dslbook. org}
}

@article{mernik2005and,
	title={When and how to develop domain-specific languages},
	author={Mernik, Marjan and Heering, Jan and Sloane, Anthony M},
	journal={ACM computing surveys (CSUR)},
	volume={37},
	number={4},
	pages={316--344},
	year={2005},
	publisher={ACM}
}

@article{kamin1998research,
	title={Research on domain-specific embedded languages and program generators},
	author={Kamin, Samuel N},
	journal={Electronic Notes in Theoretical Computer Science},
	volume={14},
	pages={149--168},
	year={1998},
	publisher={Elsevier}
}

@inproceedings{sloane2002post,
	title={Post-design domain-specific language embedding: A case study in the software engineering domain},
	author={Sloane, Anthony M},
	booktitle={System Sciences, 2002. HICSS. Proceedings of the 35th Annual Hawaii International Conference on},
	pages={3647--3655},
	year={2002},
	organization={IEEE}
}

@book{aho1986compilers,
	title={Compilers, Principles, Techniques},
	author={Aho, Alfred V and Sethi, Ravi and Ullman, Jeffrey D},
	year={1986},
	publisher={Addison wesley Boston}
}

@article{book1970cwic,
	title={The cwic/36o system, a compiler for writing and implementing compilers},
	author={Book, Erwin and Shorre, Dewey Val and Sherman, Steven J},
	journal={ACM SIGPLAN Notices},
	volume={5},
	number={6},
	pages={11--29},
	year={1970},
	publisher={ACM}
}

@article{czarnecki2000generative,
	title={Generative programming},
	author={Czarnecki, Krzysztof and Eisenecker, Ulrich W and Goos, G and Hartmanis, J and van Leeuwen, J},
	journal={Edited by G. Goos, J. Hartmanis, and J. van Leeuwen},
	volume={15},
	year={2000},
	publisher={Springer}
}

@techreport{plotkin1981,
	author = {Plotkin G.D.},
	title = {A structural approach 	to operational semantics},
	year = {1981},
	institution = {Computer science department, Aarhus University}
}

@article{kahn1987natural,
	title={Natural semantics},
	author={Kahn, Gilles},
	journal={STACS 87},
	pages={22--39},
	year={1987},
	publisher={Springer}
}

@inproceedings{abbadi2015casanova,
	title={Casanova: a simple, high-performance language for game development},
	author={Abbadi, Mohamed and Di Giacomo, Francesco and Cortesi, Agostino and Spronck, Pieter and Costantini, Giulia and Maggiore, Giuseppe},
	booktitle={Joint International Conference on Serious Games},
	pages={123--134},
	year={2015},
	organization={Springer}
}

@article{cardelli1996type,
	title={Type systems},
	author={Cardelli, Luca},
	journal={ACM Computing Surveys},
	volume={28},
	number={1},
	pages={263--264},
	year={1996}
}

@article{klop1992term,
	title={Term rewriting systems},
	author={Klop, Jan Willem and others},
	journal={Handbook of logic in computer science},
	volume={2},
	pages={1--116},
	year={1992}
}

@inproceedings{DiGiacomo2017,
	author= {Di Giacomo, Francesco
	and Abbadi, Mohamed
	and Cortesi, Agostino
	and Spronck, Pieter
	and Maggiore, Giuseppe"},
	title="Building Game Scripting DSL's with the Metacasanova Metacompiler",
	booktitle="INTETAIN 2016, Utrecht, The Netherlands, June 28--30",
	year="2017",
	publisher="Springer",
	pages="231--242"
}

@phdthesis{abbadithesis2017,
	author = {Mohamed Abbadi},
	title = {Casanova 2, A domain specific language for general game development},
	school = {Universit\`{a} Ca' Foscari, Tilburg University},
	year = {2017}
}

repository: vs-team/Papers

path: /20. Metacasanova (SLE)/references.bib

repo_name: vs-team/Papers


text:
DESCRIPTION = "A console URL download utility featuring HTTP, FTP, and more."
SECTION = "console/network"
LICENSE = "GPL"

inherit autotools gettext debian-vampyre update-alternatives

SRC_URI += "file://m4macros.patch;patch=1 \
	    file://autotools.patch;patch=1"

EXTRA_OECONF = "--enable-ipv6"

# The unslung kernel does not support ipv6
EXTRA_OECONF_unslung = ""

do_configure () {
	if [ ! -e acinclude.m4 ]; then
		mv aclocal.m4 acinclude.m4
	fi
	rm -f libtool.m4
	autotools_do_configure
}

do_install () {
	autotools_do_install
	mv ${D}${bindir}/wget ${D}${bindir}/wget.${PN}
}

ALTERNATIVE_NAME = "wget"
ALTERNATIVE_PATH = "${bindir}/wget.${PN}"
ALTERNATIVE_PRIORITY = "100"

repository: Terentyev/familiar-linux

repo_name: Terentyev/familiar-linux


text:
package main

import (
	"log"
	"os"

	"github.com/bwmarrin/discordgo"
)

func main() {

	// open auth file
	file, err := os.Open("auth.txt")
	// error check
	if err != nil {
		log.Fatal(err)
	}
	defer file.Close()

	// read file
	token := make([]byte, 59)
	_, err = file.Read(token)
	if err != nil {
		log.Fatal(err)
	}

	discord, err := discordgo.New(string(token))
	if err != nil {
		log.Fatal(err)
	}

	// init bot
	err = discord.Open()
	if err != nil {
		log.Fatal(err)
	}
}

repository: eyecontacts/Tree-Bot-Old

repo_name: eyecontacts/Tree-Bot-Old


text:
DESCRIPTION = "comprehensive template processing system"

SECTION = "libs"
LICENSE = "Artisticv1 | GPLv1+"
PR = "r0"

MAINTAINER=	"Poky <poky@yoctoproject.org>"
HOMEPAGE=	"https://metacpan.org/release/Template-Toolkit"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Artistic-1.0;md5=cda03bbdc3c1951996392b872397b798 \
file://${COMMON_LICENSE_DIR}/GPL-1.0;md5=e9e36a9de734199567a4d769498f743d"

SRC_URI = "https://cpan.metacpan.org/authors/id/A/AT/ATOOMIC/Template-Toolkit-2.28.tar.gz"

SRC_URI[md5sum] = "64d0bb7fc74bcc56164d7418144b52f8"
SRC_URI[sha256sum] = "71af368009f13582ef907e33d3812776b597f42b3da0bc0fd3bc7418e4785dd7"
RDEPENDS_${PN} += "appconfig-perl"
DEPENDS += "cgi-perl-native"
DEPENDS += "test-leaktrace-perl-native"

S = "${WORKDIR}/Template-Toolkit-${PV}"

inherit cpan

BBCLASSEXTEND = "native"

repository: CELLINKAB/meta-cpan

repo_name: CELLINKAB/meta-cpan


text:
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
	class Item
	{
			public int inx { get; set; }
			public string country { get; set; }
			public int countryCoded { get; set; }
			public string degree { get; set; }
			public int degreeCoded { get; set; }
			public string eng { get; set; }
			public int engCoded { get; set; }
			public int fieldGroup { get; set; }
			public bool fund { get; set; }
			public double gpaBachelors { get; set; }
			public double gpaMasters { get; set; }
			public bool gre { get; set; }
			public bool highLevelBachUni { get; set; }
			public bool highLevelMasterUni { get; set; }
			public int papersGLOB { get; set; }
			public int papersIRAN { get; set; }
			public string targetUni { get; set; }
			public int uniRank { get; set; }
			public int year { get; set; }
	}

	class Program
	{
		static void Main(string[] args)
		{
			var filePath = @"C:\Users\Master\Dropbox\DataMiningProject Team Folder\DM17\06_DM_UseAppliedUni\01_Preprocessing\cw.csv";
			var cw = File.ReadLines(filePath).Select(x => x.Split(','));
			filePath = @"C:\Users\Master\Dropbox\DataMiningProject Team Folder\DM17\06_DM_UseAppliedUni\01_Preprocessing\Flip.json";
			var ls= LoadJson(filePath);

			var count = 0;
			foreach (var item in ls)
			{
				if (item.targetUni == "n/a") continue;
				var x = cw.ToList().Find(obj => item.targetUni.Contains(obj[1]));
				if (x == null) continue;
				item.uniRank = Convert.ToInt32(x[0]);
				count++;
			}
			Console.WriteLine(count);
			SaveJson(ls);
		}

		public static List<Item> LoadJson(string path)
		{
			using (StreamReader r = new StreamReader(path))
			{
				string json = r.ReadToEnd();
				List<Item> items = JsonConvert.DeserializeObject<List<Item>>(json);
				return items;
			}
		}
		public static void SaveJson(List<Item> items)
		{
			using (StreamWriter file = File.CreateText(@"xx.json"))
			{
				JsonSerializer serializer = new JsonSerializer();
				serializer.Serialize(file, items);
			}
		}
	}
}


text:
package main

import (
	"bytes"
	"fmt"
	"log"
	"net/http"
	"net/url"
)

// Message to be sent to slack as json
type Message struct {
	Text        string        `json:"text"`
	Channel     string        `json:"channel,omitempty"`
	UserName    string        `json:"username,omitempty"`
	IconURL     string        `json:"icon_url,omitempty"`
	IconEmoji   string        `json:"icon_emoji,omitempty"`
	Attachments []*Attachment `json:"attachments,omitempty"`
}

// Field for slack messages
type Field struct {
	Title string `json:"title"`
	Value string `json:"value"`
	Short bool   `json:"short"`
}

// Action are buttons in slack
type Action struct {
	Name    string        `json:"name,omitempty"`
	Type    string        `json:"type"`
	Text    string        `json:"text"`
	URL     string        `json:"url"`
	Value   string        `json:"value,omitempty"`
	Style   string        `json:"style,omitempty"`
	Confirm ConfirmFields `json:"confirm,omitempty"`
}

// ConfirmFields are confirmation boxes in slack
type ConfirmFields struct {
	Title       string `json:"title"`
	Text        string `json:"text"`
	OkText      string `json:"ok_text"`
	DismissText string `json:"dismiss_text"`
}

// Attachment allows for fancy Slack messages
type Attachment struct {
	Fallback   string   `json:"fallback"`
	Color      string   `json:"color"`
	PreText    string   `json:"pretext"`
	AuthorName string   `json:"author_name"`
	AuthorLink string   `json:"author_link"`
	AuthorIcon string   `json:"author_icon"`
	Title      string   `json:"title"`
	TitleLink  string   `json:"title_link"`
	Text       string   `json:"text"`
	ImageURL   string   `json:"image_url"`
	Fields     []Field  `json:"fields"`
	Footer     string   `json:"footer"`
	FooterIcon string   `json:"footer_icon"`
	Timestamp  int64    `json:"ts"`
	MarkdownIn []string `json:"mrkdwn_in"`
	Actions    []Action `json:"actions"`
}

func (m *Message) init() {
	m.Channel = configuration.SlackChannel
	m.UserName = configuration.SlackUsername
	m.IconURL = configuration.SlackIconURL
}

// returns the fallback, title, and value
func (m *Message) serviceAlert(nagios NagiosAlert) (string, string, string) {
	var fallback string
	var title string
	var value string
	if isServiceMode() {
		fallback = nagios.HostAlias + " (" + nagios.HostAddress + ")" + " - " + nagios.ServiceDesc + " - " + nagios.NotificationType + " - " + nagios.LongDateTime + "\n" +
			nagios.NotificationComments + " " + nagios.ServiceOutput
		title = nagios.HostAlias + " (" + nagios.HostAddress + ")" + " - " + nagios.ServiceDesc + " - " + nagios.NotificationType
		value = nagios.NotificationComments + " " + nagios.ServiceOutput
	} else {
		fallback = nagios.HostAlias + " (" + nagios.HostAddress + ")" + " - " + nagios.NotificationType + " - " + nagios.LongDateTime + "\n" +
			nagios.ServiceOutput
		title = nagios.HostAlias + " (" + nagios.HostAddress + ") - " + nagios.NotificationType
		value = nagios.ServiceOutput
	}
	if configuration.Debug {
		log.Println("Fallback:", fallback)
		log.Println("Title:", title)
		log.Println("Value:", value)
	}
	return fallback, title, value
}

func (m *Message) genACKurl(nagios NagiosAlert) string {
	var ackURL string
	if isServiceMode() {
		ackURL = configuration.NagiosAckURL + nagiosACKservice + "&host=" + url.QueryEscape(nagios.HostAlias) + "&service=" + url.QueryEscape(nagios.ServiceDesc)
	} else {
		ackURL = configuration.NagiosAckURL + nagiosACKhost + "&host=" + url.QueryEscape(nagios.HostAlias)
	}
	if configuration.Debug {
		fmt.Println("ackURL:", ackURL)
	}
	return ackURL
}

func (m *Message) alert(nagios NagiosAlert) {
	m.init()
	var attach Attachment
	var fld Field
	attach.Color = nagios.getUrgencyColor()
	fld.Short = false
	attach.Fallback, fld.Title, fld.Value = m.serviceAlert(nagios)
	attach.Fields = append(attach.Fields, fld)
	var action Action
	action.Text = "ACKNOWLEDGE"
	action.Type = "button"
	action.URL = m.genACKurl(nagios)
	action.Style = "primary"
	if nagios.getUrgencyColor() == configuration.ProblemColor { // we can only ack bad things
		var conf ConfirmFields
		conf.Title = "Are you sure?"
		conf.Text = "This acknowledges the alarm on Nagios, thus muting notifications until a change occurs."
		conf.OkText = "Yes"
		conf.DismissText = "No"
		action.Confirm = conf
		// attach.Actions = append(attach.Actions, action)
		attach.AddAction(action)
	}

	attach.Footer = configuration.SlackNagiosLink
	m.AddAttachment(&attach)
}

// AddAttachment to a Slack Message
func (m *Message) AddAttachment(a *Attachment) {
	m.Attachments = append(m.Attachments, a)
}

// AddAction to a Slack Attachment
func (a *Attachment) AddAction(action Action) {
	a.Actions = append(a.Actions, action)
}

func (m Message) send() {
	// out, err := json.Marshal(m)
	out, err := JSONMarshal(m, true)
	if err != nil {
		fmt.Println(err)
	}
	resp, err := http.Post(configuration.SlackHookURL, appType, bytes.NewReader(out))
	if err != nil {
		fmt.Println(err)
	}
	defer resp.Body.Close()
	if configuration.Debug {
		fmt.Println(resp.Status)
		fmt.Println(string(out))
	}
}

repository: Mortimus/nagiosSlackNotifier

repo_name: Mortimus/nagiosSlackNotifier


text:
namespace Shorthand.Geodesy.Projections {
    public class SWEREF99_2145 : SWEREF99 {
        public SWEREF99_2145() {
            CentralMeridianLon = 21.75d;
        }
    }
}


text:
package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
	"sort"
)

type caseInput struct {
	a, p  uint32
	seats string
}

func readCaseInput(scanner *bufio.Scanner) caseInput {
	_ = uint32(readInt64(scanner))

	a := uint32(readInt64(scanner))
	p := uint32(readInt64(scanner))
	seats := readString(scanner)

	return caseInput{a, p, seats}
}

type caseOutput struct {
	seated uint32
}

func writeCaseOutput(writer *bufio.Writer, out caseOutput) {
	writef(writer, "%d\n", out.seated)
}

type Uint32Slice []uint32

func (p Uint32Slice) Len() int           { return len(p) }
func (p Uint32Slice) Less(i, j int) bool { return p[i] < p[j] }
func (p Uint32Slice) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }

func solveCase(in caseInput) caseOutput {
	freeZoneSizes := make([]uint32, 0, 0)

	firstFreeSeat := -1
	for i, c := range []rune(in.seats) {
		if c == '*' {
			if firstFreeSeat >= 0 {
				freeZoneSizes = append(freeZoneSizes, uint32(i-firstFreeSeat))
				firstFreeSeat = -1
			}
		} else if c == '.' {
			if firstFreeSeat == -1 {
				firstFreeSeat = i
			}
		}
	}
	if firstFreeSeat != -1 {
		freeZoneSizes = append(freeZoneSizes, uint32(len(in.seats)-firstFreeSeat))
	}

	sort.Sort(Uint32Slice(freeZoneSizes))

	seated := uint32(0)
	a, p := in.a, in.p
	for len(freeZoneSizes) > 0 && a+p > 0 {
		freeZone := freeZoneSizes[0]
		freeZoneSizes = freeZoneSizes[1:]

		bigger := (freeZone + 1) / 2
		smaller := freeZone / 2

		seatedA := uint32(0)
		seatedP := uint32(0)
		if a > p {
			seatedA = min_u32(a, bigger)
			seatedP = min_u32(p, smaller)
		} else {
			seatedA = min_u32(a, smaller)
			seatedP = min_u32(p, bigger)
		}

		seated += seatedA
		seated += seatedP
		a -= seatedA
		p -= seatedP
	}

	return caseOutput{seated}
}

func solveSequential(scanner *bufio.Scanner, writer *bufio.Writer) {
	writeCaseOutput(writer, solveCase(readCaseInput(scanner)))
}

func main() {
	var scanner *bufio.Scanner
	if len(os.Args) > 1 {
		reader, err := os.Open(os.Args[1])
		if err != nil {
			panic(err)
		}
		defer reader.Close()
		scanner = bufio.NewScanner(reader)
	} else {
		scanner = bufio.NewScanner(os.Stdin)
	}
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 0, 1024*1024), 1024*1024)

	var writer = bufio.NewWriter(os.Stdout)
	defer writer.Flush()

	solveSequential(scanner, writer)
}

func readString(sc *bufio.Scanner) string {
	if !sc.Scan() {
		panic("failed to scan next token")
	}

	return sc.Text()
}

func readInt64(sc *bufio.Scanner) int64 {
	if !sc.Scan() {
		panic("failed to scan next token")
	}
	res, err := strconv.ParseInt(sc.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return res
}

func writef(writer *bufio.Writer, formatStr string, values ...interface{}) {
	out := fmt.Sprintf(formatStr, values...)
	_, err := writer.WriteString(out)
	if err != nil {
		panic(err)
	}
}

func min_u32(a, b uint32) uint32 {
	if a < b {
		return a
	}
	return b
}

repository: akraievoy/codejam

repo_name: akraievoy/codejam

gha_language: Go


text:
package model

// DeploymentDiff -- model for deployments diff
//
// swagger:model
type DeploymentDiff struct {
	Diff string `json:"diff"`
}

repository: ninedraft/kube-client

repo_name: ninedraft/kube-client


text:
// COPIED FROM https://github.com/jehiah/go-strftime
package main

import (
	"time"
)

// taken from time/format.go
var conversion = map[string]string{
	/*stdLongMonth      */ "B": "January",
	/*stdMonth          */ "b": "Jan",
	// stdNumMonth       */ "m": "1",
	/*stdZeroMonth      */ "m": "01",
	/*stdLongWeekDay    */ "A": "Monday",
	/*stdWeekDay        */ "a": "Mon",
	// stdDay            */ "d": "2",
	// stdUnderDay       */ "d": "_2",
	/*stdZeroDay        */ "d": "02",
	/*stdHour           */ "H": "15",
	// stdHour12         */ "I": "3",
	/*stdZeroHour12     */ "I": "03",
	// stdMinute         */ "M": "4",
	/*stdZeroMinute     */ "M": "04",
	// stdSecond         */ "S": "5",
	/*stdZeroSecond     */ "S": "05",
	/*stdLongYear       */ "Y": "2006",
	/*stdYear           */ "y": "06",
	/*stdPM             */ "p": "PM",
	// stdpm             */ "p": "pm",
	/*stdTZ             */ "Z": "MST",
	// stdISO8601TZ      */ "z": "Z0700",  // prints Z for UTC
	// stdISO8601ColonTZ */ "z": "Z07:00", // prints Z for UTC
	/*stdNumTZ          */ "z": "-0700", // always numeric
	// stdNumShortTZ     */ "b": "-07",    // always numeric
	// stdNumColonTZ     */ "b": "-07:00", // always numeric
	"%": "%",
}

// This is an alternative to time.Format because no one knows
// what date 040305 is supposed to create when used as a 'layout' string
// this takes standard strftime format options. For a complete list
// of format options see http://strftime.org/
func strftime(format string, t time.Time) string {
	layout := ""
	length := len(format)
	for i := 0; i < length; i++ {
		if format[i] == '%' && i <= length-2 {
			if layoutCmd, ok := conversion[format[i+1:i+2]]; ok {
				layout = layout + layoutCmd
				i++
				continue
			}
		}
		layout = layout + format[i:i+1]
	}
	return t.Format(layout)
}

repository: nsqio/nsq

repo_name: nsqio/nsq


text:
using MoneyFox.Presentation.Utilities;
using MoneyFox.Presentation.ViewModels;

namespace MoneyFox.Presentation.Views
{
    public partial class AddCategoryPage
    {
        private AddCategoryViewModel ViewModel => BindingContext as AddCategoryViewModel;

        public AddCategoryPage()
        {
            InitializeComponent();
            BindingContext = ViewModelLocator.AddCategoryVm;

            ViewModel.InitializeCommand.ExecuteAsync().FireAndForgetSafeAsync();
        }
    }
}

license: MS-PL

repository: helen-c/MoneyFox

repo_name: helen-c/MoneyFox


text:
package versioncontrol

import (
	"strings"
	"time"
)

type Mercurial struct {
	dir string
}

func NewMercurial(dir string) Interface {
	return &Mercurial{dir: dir}
}

func (g *Mercurial) VcKind() string {
	return "hg"
}

func (g *Mercurial) WithAnotherDir(dir string) Interface {
	return &Mercurial{dir: dir}
}

func (m *Mercurial) Identify() (string, time.Time, error) {
	output, err := execWithDir(m.dir, "hg", "log", "--rev", ".", "--template", "{node},{date|isodate}")
	if err != nil {
		return "", zeroTime, err
	}

	parts := strings.Split(output, ",")

	timestamp, errTime := time.Parse("2006-01-02 15:04 -0700", parts[1])
	if errTime != nil {
		return "", zeroTime, errTime
	}

	return parts[0], timestamp.UTC(), nil
}

func (m *Mercurial) CloneFrom(source string) error {
	// cannot set dir, because target dir does not yet exist
	_, err := execWithDir("", "hg", "clone", "--noupdate", source, m.dir)
	return err
}

func (m *Mercurial) Pull() error {
	_, err := execWithDir(m.dir, "hg", "pull")
	return err
}

func (m *Mercurial) Update(revision string) error {
	_, err := execWithDir(m.dir, "hg", "update", "--rev", revision)
	return err
}


text:
namespace SpellforceDataEditor.SFCFF.category_forms
{
    partial class Control35
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

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

        #region Component Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.label1 = new System.Windows.Forms.Label();
            this.button1 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.ListPolygons = new System.Windows.Forms.ListBox();
            this.buttonRemove = new System.Windows.Forms.Button();
            this.buttonInsert = new System.Windows.Forms.Button();
            this.textBox5 = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.textBox4 = new System.Windows.Forms.TextBox();
            this.textBox3 = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.listBox1 = new System.Windows.Forms.ListBox();
            this.SuspendLayout();
            //
            // textBox1
            //
            this.textBox1.BackColor = System.Drawing.Color.DarkOrange;
            this.textBox1.Location = new System.Drawing.Point(105, 19);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(126, 20);
            this.textBox1.TabIndex = 12;
            this.textBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.textBox1_MouseDown);
            this.textBox1.Leave += new System.EventHandler(this.textBox1_TextChanged);
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(47, 22);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(52, 13);
            this.label1.TabIndex = 11;
            this.label1.Text = "Object ID";
            //
            // button1
            //
            this.button1.Location = new System.Drawing.Point(406, 74);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 23);
            this.button1.TabIndex = 27;
            this.button1.Text = "Remove";
            this.button1.UseVisualStyleBackColor = true;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            //
            // button2
            //
            this.button2.Location = new System.Drawing.Point(405, 45);
            this.button2.Name = "button2";
            this.button2.Size = new System.Drawing.Size(75, 23);
            this.button2.TabIndex = 26;
            this.button2.Text = "Insert";
            this.button2.UseVisualStyleBackColor = true;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            //
            // ListPolygons
            //
            this.ListPolygons.FormattingEnabled = true;
            this.ListPolygons.Location = new System.Drawing.Point(105, 45);
            this.ListPolygons.Name = "ListPolygons";
            this.ListPolygons.Size = new System.Drawing.Size(295, 134);
            this.ListPolygons.TabIndex = 25;
            this.ListPolygons.SelectedIndexChanged += new System.EventHandler(this.ListPolygons_SelectedIndexChanged);
            //
            // buttonRemove
            //
            this.buttonRemove.Location = new System.Drawing.Point(406, 240);
            this.buttonRemove.Name = "buttonRemove";
            this.buttonRemove.Size = new System.Drawing.Size(75, 23);
            this.buttonRemove.TabIndex = 24;
            this.buttonRemove.Text = "Remove";
            this.buttonRemove.UseVisualStyleBackColor = true;
            this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
            //
            // buttonInsert
            //
            this.buttonInsert.Location = new System.Drawing.Point(406, 211);
            this.buttonInsert.Name = "buttonInsert";
            this.buttonInsert.Size = new System.Drawing.Size(75, 23);
            this.buttonInsert.TabIndex = 23;
            this.buttonInsert.Text = "Insert";
            this.buttonInsert.UseVisualStyleBackColor = true;
            this.buttonInsert.Click += new System.EventHandler(this.buttonInsert_Click);
            //
            // textBox5
            //
            this.textBox5.Location = new System.Drawing.Point(105, 185);
            this.textBox5.Name = "textBox5";
            this.textBox5.Size = new System.Drawing.Size(38, 20);
            this.textBox5.TabIndex = 22;
            this.textBox5.Leave += new System.EventHandler(this.textBox5_TextChanged);
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(20, 188);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(79, 13);
            this.label5.TabIndex = 21;
            this.label5.Text = "Casts shadow?";
            //
            // textBox4
            //
            this.textBox4.Location = new System.Drawing.Point(181, 351);
            this.textBox4.Name = "textBox4";
            this.textBox4.Size = new System.Drawing.Size(50, 20);
            this.textBox4.TabIndex = 20;
            this.textBox4.Leave += new System.EventHandler(this.textBox4_TextChanged);
            //
            // textBox3
            //
            this.textBox3.Location = new System.Drawing.Point(105, 351);
            this.textBox3.Name = "textBox3";
            this.textBox3.Size = new System.Drawing.Size(50, 20);
            this.textBox3.TabIndex = 19;
            this.textBox3.Leave += new System.EventHandler(this.textBox3_TextChanged);
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(55, 354);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(44, 13);
            this.label4.TabIndex = 18;
            this.label4.Text = "Position";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(23, 211);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(76, 13);
            this.label3.TabIndex = 17;
            this.label3.Text = "Polygon points";
            //
            // listBox1
            //
            this.listBox1.FormattingEnabled = true;
            this.listBox1.Location = new System.Drawing.Point(105, 211);
            this.listBox1.Name = "listBox1";
            this.listBox1.Size = new System.Drawing.Size(295, 134);
            this.listBox1.TabIndex = 16;
            this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged);
            //
            // Control35
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.button1);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.ListPolygons);
            this.Controls.Add(this.buttonRemove);
            this.Controls.Add(this.buttonInsert);
            this.Controls.Add(this.textBox5);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.textBox4);
            this.Controls.Add(this.textBox3);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.listBox1);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.label1);
            this.Name = "Control35";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.ListBox ListPolygons;
        private System.Windows.Forms.Button buttonRemove;
        private System.Windows.Forms.Button buttonInsert;
        private System.Windows.Forms.TextBox textBox5;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.TextBox textBox4;
        private System.Windows.Forms.TextBox textBox3;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.ListBox listBox1;
    }
}

detected_licenses: BSD-3-Clause MIT MS-PL

gha_language: C#


text:
using System.Diagnostics;

namespace GitSwitch
{
    public interface IProcessKiller
    {
        void KillSshAgent();
    }

    public class ProcessKiller : IProcessKiller
    {
        public void KillSshAgent()
        {
            foreach (var process in Process.GetProcessesByName(AppConstants.SshAgentProcessName))
                process.Kill();
        }
    }
}

repository: pluralsight/git-switch

repo_name: pluralsight/git-switch