text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd">
<xliff version="1.0">
  <file source-language="EN" target-language="nl" datatype="plaintext" original="messages" date="2010-10-22T14:15:18Z" product-name="messages">
    <header/>
    <body>
      <!-- ##### LOGIN/OUT ##### -->
      <trans-unit>
        <source>Username</source>
        <target>Gebruikersnaam</target>
      </trans-unit>
      <trans-unit>
        <source>Password</source>
        <target>Wachtwoord</target>
      </trans-unit>
      <trans-unit>
        <source>Remember me</source>
        <target>Onthoud mij</target>
      </trans-unit>
      <trans-unit>
        <source>Sign in</source>
        <target>Aanmelden</target>
      </trans-unit>
      <trans-unit>
        <source>Forgot your password?</source>
        <target>Wachtwoord vergeten?</target>
      </trans-unit>
      <trans-unit>
        <source>Welcome, [1]!</source>
        <target>Welkom [1]!</target>
      </trans-unit>
      <trans-unit>
        <source>Logout</source>
        <target>Afmelden</target>
      </trans-unit>
      <!-- ##### DASHBOARD ##### -->
      <trans-unit>
        <source>Dashboard</source>
        <target>Dashboard</target>
      </trans-unit>
      <trans-unit>
        <source>Recent invoices</source>
        <target>Recente facturen</target>
      </trans-unit>
      <trans-unit>
        <source>Past due invoices</source>
        <target>Vervallen facturen</target>
      </trans-unit>
      <trans-unit>
        <source>Number</source>
        <target>Aantal</target>
      </trans-unit>
      <trans-unit>
        <source>Customer Name</source>
        <target>Klantnaam</target>
      </trans-unit>
      <trans-unit>
        <source>Date</source>
        <target>Datum</target>
      </trans-unit>
      <trans-unit>
        <source>Due Date</source>
        <target>Vervaldatum</target>
      </trans-unit>
      <trans-unit>
        <source>Due</source>
        <target>Vervallen</target>
      </trans-unit>
      <trans-unit>
        <source>Payments</source>
        <target>Betalingen</target>
      </trans-unit>
      <trans-unit>
        <source>Add payment</source>
        <target>Betaling toevoegen</target>
      </trans-unit>
      <trans-unit>
        <source>Cancel</source>
        <target>Annuleren</target>
      </trans-unit>
      <trans-unit>
        <source>Save</source>
        <target>Opslaan</target>
      </trans-unit>
      <trans-unit>
        <source>Receipts</source>
        <target>Ontvangsten</target>
      </trans-unit>
      <!-- ##### INVOICES ##### -->
      <trans-unit>
        <source>opened</source>
        <target>geopend</target>
      </trans-unit>
      <trans-unit>
        <source>closed</source>
        <target>gesloten</target>
      </trans-unit>
      <trans-unit>
        <source>overdue</source>
        <target>Achterstallig</target>
      </trans-unit>
      <trans-unit>
        <source>draft</source>
        <target>Concept</target>
      </trans-unit>
      <trans-unit>
        <source>Invoices</source>
        <target>Facturen</target>
      </trans-unit>
      <trans-unit>
        <source>New Invoice</source>
        <target>Nieuwe factuur</target>
      </trans-unit>
      <trans-unit>
        <source>Invoice</source>
        <target>Factuur</target>
      </trans-unit>
      <trans-unit>
        <source>Edit Invoice</source>
        <target>Wijzig factuur</target>
      </trans-unit>
      <trans-unit>
        <source>Customer identification</source>
        <target>Klantkenmerk</target>
      </trans-unit>
      <trans-unit>
        <source>Payment details</source>
        <target>Betaling details</target>
      </trans-unit>
      <trans-unit>
        <source>Payments were saved successfully.</source>
        <target>Betalingen succesvol opgeslagen</target>
      </trans-unit>
      <trans-unit>
        <source>Payments could not be saved because of an unknown error.</source>
        <target>Betalingen niet opgeslagen vanwege onbekende fout.</target>
      </trans-unit>
      <trans-unit>
        <source>Description</source>
        <target>Omschrijving</target>
      </trans-unit>
      <trans-unit>
        <source>Unit Cost</source>
        <target>Kosten/Eenheid</target>
      </trans-unit>
      <trans-unit>
        <source>Qty</source>
        <target>Aantal</target>
      </trans-unit>
      <trans-unit>
        <source>Taxes</source>
        <target>Belastingen</target>
      </trans-unit>
      <trans-unit>
        <source>Base</source>
        <target>Grondslag</target>
      </trans-unit>
      <trans-unit>
        <source>Discount</source>
        <target>Korting</target>
      </trans-unit>
      <trans-unit>
        <source>Price</source>
        <target>Prijs</target>
      </trans-unit>
      <trans-unit>
        <source>Add Item</source>
        <target>Artikel toevoegen</target>
      </trans-unit>
      <trans-unit>
        <source>Add</source>
        <target>Toevoegen</target>
      </trans-unit>
      <trans-unit>
        <source>Subtotal</source>
        <target>Subtotaal</target>
      </trans-unit>
      <trans-unit>
        <source>Total</source>
        <target>Totaal</target>
      </trans-unit>
      <trans-unit>
        <source>Notes</source>
        <target>Opmerkingen</target>
      </trans-unit>
      <trans-unit>
        <source>Delete</source>
        <target>Verwijderen</target>
      </trans-unit>
      <trans-unit>
        <source>Save as draft</source>
        <target>Opslaan als concept</target>
      </trans-unit>
      <trans-unit>
        <source>Save and send by e-mail</source>
        <target>Opslaan en verzenden per Email</target>
      </trans-unit>
      <trans-unit>
        <source>Print</source>
        <target>Afdrukken</target>
      </trans-unit>
      <trans-unit>
        <source>PDF</source>
        <target>PDF</target>
      </trans-unit>
      <trans-unit>
        <source>Send</source>
        <target>Verzenden</target>
      </trans-unit>
      <trans-unit>
        <source>The invoice was successfully sent.</source>
        <target>De factuur is succesvol verzonden.</target>
      </trans-unit>
      <trans-unit>
        <source>The invoice could not be sent due to an error.</source>
        <target>De factuur werd niet verzonden vanwege een onbekende fout.</target>
      </trans-unit>
      <trans-unit>
        <source>The invoice has not been saved due to some errors.</source>
        <target>De invoice is niet opgeslagen vanwege enkele fouten.</target>
      </trans-unit>
      <trans-unit>
        <source>%d invoices were successfully deleted.</source>
        <target>%d facturen werden verwijderd.</target>
      </trans-unit>
      <trans-unit>
        <source>%d invoices were successfully sent.</source>
        <target>%d facturen werden verzonden.</target>
      </trans-unit>
      <trans-unit>
        <source>view all [1] invoices</source>
        <target>Bekijk alle [1] facturen</target>
      </trans-unit>
      <trans-unit>
        <source>Issued at</source>
        <target>Afgegeven op</target>
      </trans-unit>
      <trans-unit>
        <source>will become overdue at</source>
        <target>zal vervallen op</target>
      </trans-unit>
      <trans-unit>
        <source>Sent by email</source>
        <target>Verzonden per email</target>
      </trans-unit>
      <trans-unit>
        <source>Force to be closed</source>
        <target>Geforceerd sluiten</target>
      </trans-unit>
      <trans-unit>
        <source>Issue date</source>
        <target>Datum van uitgifte</target>
      </trans-unit>
      <trans-unit>
        <source>Due date</source>
        <target>Vervaldatum</target>
      </trans-unit>
      <!-- ##### RECURRING INVOICES ##### -->
      <trans-unit>
        <source>enabled</source>
        <target>ingeschakeld</target>
      </trans-unit>
      <trans-unit>
        <source>disabled</source>
        <target>uitgeschakeld</target>
      </trans-unit>
      <trans-unit>
        <source>finished</source>
        <target>gereed</target>
      </trans-unit>
      <trans-unit>
        <source>pending</source>
        <target>uitstaand</target>
      </trans-unit>
      <trans-unit>
        <source>Recurring Invoices</source>
        <target>Terugkerende facturen</target>
      </trans-unit>
      <trans-unit>
        <source>New Recurring Invoice</source>
        <target>Nieuwe terugkerende factuur</target>
      </trans-unit>
      <trans-unit>
        <source>Overdue</source>
        <target>Achterstallig</target>
      </trans-unit>
      <trans-unit>
        <source>Period Type</source>
        <target>Periode</target>
      </trans-unit>
      <trans-unit>
        <source>Frequency</source>
        <target>Frequentie</target>
      </trans-unit>
      <trans-unit>
        <source>This amount is not reflected in the total</source>
        <target>Dit bedrag is niet opgenomen in het totaal</target>
      </trans-unit>
      <trans-unit>
        <source>There are %d recurring invoices that were not executed.</source>
        <target>Er zijn %d terugkerende facturen niet verwerkt.</target>
      </trans-unit>
      <trans-unit>
        <source>Edit Recurring Invoice</source>
        <target>Wijzig terugkerende factuur</target>
      </trans-unit>
      <trans-unit>
        <source>All %d recurring invoices were processed.</source>
        <target>Alle %d terugkerende facturen werden verwerkt.</target>
      </trans-unit>
      <trans-unit>
        <source>Invoice Execution Time</source>
        <target>Factuur uitvoeringstermijn</target>
      </trans-unit>
      <trans-unit>
        <source>Starting</source>
        <target>Start</target>
      </trans-unit>
      <trans-unit>
        <source>Finishing</source>
        <target>Eindigt</target>
      </trans-unit>
      <trans-unit>
        <source>Average turnover</source>
        <target>Gemiddelde omzet</target>
      </trans-unit>
      <trans-unit>
        <source>Generate pending invoices now</source>
        <target>Genereer uitstaande facturen</target>
      </trans-unit>
      <trans-unit>
        <source>Years</source>
        <target>Jaren</target>
      </trans-unit>
      <trans-unit>
        <source>Months</source>
        <target>Maanden</target>
      </trans-unit>
      <trans-unit>
        <source>Days</source>
        <target>Dagen</target>
      </trans-unit>
      <trans-unit>
        <source>yearly</source>
        <target>Jaarlijks</target>
      </trans-unit>
      <trans-unit>
        <source>monthly</source>
        <target>Maandelijks</target>
      </trans-unit>
      <trans-unit>
        <source>daily</source>
        <target>Dagelijks</target>
      </trans-unit>
      <trans-unit>
        <source>weekly</source>
        <target>Wekelijks</target>
      </trans-unit>
      <trans-unit>
        <source>Series</source>
        <target>Reeks</target>
      </trans-unit>
      <trans-unit>
        <source>Create every</source>
        <target>Genereer elke</target>
      </trans-unit>
      <trans-unit>
        <source>Starting date</source>
        <target>Startdatum</target>
      </trans-unit>
      <trans-unit>
        <source>Finishing date</source>
        <target>Einddatum</target>
      </trans-unit>
      <trans-unit>
        <source>Maximum number of occurrences</source>
        <target>Max. aantal keren</target>
      </trans-unit>
      <trans-unit>
        <source>Days to due</source>
        <target>Dagen tot verval</target>
      </trans-unit>
      <!-- ##### CUSTOMERS ##### -->
      <trans-unit>
        <source>Customers</source>
        <target>Klanten</target>
      </trans-unit>
      <trans-unit>
        <source>New Customer</source>
        <target>Nieuwe klant</target>
      </trans-unit>
      <trans-unit>
        <source>Edit Customer</source>
        <target>Wijzig klant</target>
      </trans-unit>
      <trans-unit>
        <source>Customer</source>
        <target>Klant</target>
      </trans-unit>
      <trans-unit>
        <source>Client info</source>
        <target>Cliënt informatie</target>
      </trans-unit>
      <trans-unit>
        <source>Client Name</source>
        <target>Cliëntnaam</target>
      </trans-unit>
      <trans-unit>
        <source>Client Legal Id</source>
        <target>Cliënt ID nummer</target>
      </trans-unit>
      <trans-unit>
        <source>Client Address</source>
        <target>Cliënt adres</target>
      </trans-unit>
      <trans-unit>
        <source>Contact Person</source>
        <target>Contactpersoon</target>
      </trans-unit>
      <trans-unit>
        <source>Invoicing Address</source>
        <target>Factuuradres</target>
      </trans-unit>
      <trans-unit>
        <source>Shipping Address</source>
        <target>Verzendadres</target>
      </trans-unit>
      <trans-unit>
        <source>Client Email</source>
        <target>Cliënt Email</target>
      </trans-unit>
      <trans-unit>
        <source>The customer has not been saved due to some errors.</source>
        <target>De Klant is niet opgeslagen vanwege enkele fouten.</target>
      </trans-unit>
      <trans-unit>
        <source>%d customers were successfully deleted.</source>
        <target>%d klanten werden verwijderd.</target>
      </trans-unit>
      <!-- ##### SEARCH ##### -->
      <trans-unit>
        <source>from</source>
        <target>vanaf</target>
      </trans-unit>
      <trans-unit>
        <source>to</source>
        <target>tot</target>
      </trans-unit>
      <trans-unit>
        <source>last week</source>
        <target>afgelopen week</target>
      </trans-unit>
      <trans-unit>
        <source>last month</source>
        <target>afgelopen maand</target>
      </trans-unit>
      <trans-unit>
        <source>last year</source>
        <target>afgelopen jaar</target>
      </trans-unit>
      <trans-unit>
        <source>last 5 years</source>
        <target>afgelopen 5 jaar</target>
      </trans-unit>
      <trans-unit>
        <source>Status</source>
        <target>Status</target>
      </trans-unit>
      <trans-unit>
        <source>Opened</source>
        <target>Geopend</target>
      </trans-unit>
      <trans-unit>
        <source>Closed</source>
        <target>Gesloten</target>
      </trans-unit>
      <trans-unit>
        <source>Drafts</source>
        <target>Concepten</target>
      </trans-unit>
      <trans-unit>
        <source>Enabled</source>
        <target>Ingeschakeld</target>
      </trans-unit>
      <trans-unit>
        <source>Disabled</source>
        <target>Uitgeschakeld</target>
      </trans-unit>
      <trans-unit>
        <source>Pending</source>
        <target>Uitstaand</target>
      </trans-unit>
      <trans-unit>
        <source>Finished</source>
        <target>Gereed</target>
      </trans-unit>
      <trans-unit>
        <source>Not sent</source>
        <target>Niet verzonden</target>
      </trans-unit>
      <trans-unit>
        <source>Series</source>
        <target>Reeks</target>
      </trans-unit>
      <trans-unit>
        <source>Tags</source>
        <target>Kenmerken</target>
      </trans-unit>
      <trans-unit>
        <source>Search</source>
        <target>Zoeken</target>
      </trans-unit>
      <trans-unit>
        <source>Reset</source>
        <target>Reset</target>
      </trans-unit>
      <!-- ##### PAGER ##### -->
      <trans-unit>
        <source>First</source>
        <target>Eerste</target>
      </trans-unit>
      <trans-unit>
        <source>Prev</source>
        <target>Vorige</target>
      </trans-unit>
      <trans-unit>
        <source>PAGE</source>
        <target>PAGINA</target>
      </trans-unit>
      <trans-unit>
        <source>Next</source>
        <target>Volgende</target>
      </trans-unit>
      <trans-unit>
        <source>Last</source>
        <target>Einde</target>
      </trans-unit>
      <trans-unit>
        <source>go to </source>
        <target>ga naar </target>
      </trans-unit>
      <trans-unit>
        <source>Go</source>
        <target>Ga</target>
      </trans-unit>
      <trans-unit>
        <source>more</source>
        <target>meer</target>
      </trans-unit>
      <trans-unit>
        <source>Showing [1]-[2] of [3] results</source>
        <target>Toon [1] - [2] van [3] resultaten</target>
      </trans-unit>
      <!-- ##### SETTINGS ##### -->
      <trans-unit>
        <source>Settings</source>
        <target>Instellingen</target>
      </trans-unit>
      <trans-unit>
        <source>Global settings</source>
        <target>Algemene instellingen</target>
      </trans-unit>
      <trans-unit>
        <source>My settings</source>
        <target>Mijn instellingen</target>
      </trans-unit>
      <trans-unit>
        <source>Printing templates</source>
        <target>Print sjablonen</target>
      </trans-unit>
      <trans-unit>
        <source>Your settings were successfully saved.</source>
        <target>Instellingen werden succesvol opgeslagen.</target>
      </trans-unit>
      <trans-unit>
        <source>Settings could not be saved. Please, check entered values and try to correct them.</source>
        <target>Instellingen werden niet bewaard. Controleer ingevulde gegevens en probeer opnieuw.</target>
      </trans-unit>
      <trans-unit>
        <source>Please check these errors and correct them before saving:</source>
        <target>Graag deze fouten controleren en zondig corrigeren voordat u ze opslaat:</target>
      </trans-unit>
      <!-- ##### SETTINGS - GLOBAL SETTINGS ##### -->
      <trans-unit>
        <source>Company</source>
        <target>Bedrijf</target>
      </trans-unit>
      <trans-unit>
        <source>Name</source>
        <target>Naam</target>
      </trans-unit>
      <trans-unit>
        <source>Address</source>
        <target>Adres</target>
      </trans-unit>
      <trans-unit>
        <source>Phone</source>
        <target>Telefoon</target>
      </trans-unit>
      <trans-unit>
        <source>FAX</source>
        <target>Fax</target>
      </trans-unit>
      <trans-unit>
        <source>Email</source>
        <target>Email</target>
      </trans-unit>
      <trans-unit>
        <source>Web</source>
        <target>Website</target>
      </trans-unit>
      <trans-unit>
        <source>Logo</source>
        <target>Logo</target>
      </trans-unit>
      <trans-unit>
        <source>Invoicing taxes</source>
        <target>Factuur belasting</target>
      </trans-unit>
      <trans-unit>
        <source>Value</source>
        <target>Waarde</target>
      </trans-unit>
      <trans-unit>
        <source>Active</source>
        <target>Actief</target>
      </trans-unit>
      <trans-unit>
        <source>Default</source>
        <target>Standaard</target>
      </trans-unit>
      <trans-unit>
        <source>Add a new tax value</source>
        <target>Voeg nieuwe belasting perc. toe</target>
      </trans-unit>
      <trans-unit>
        <source>PDF Settings</source>
        <target>PDF instellingen</target>
      </trans-unit>
      <trans-unit>
        <source>Page size</source>
        <target>Pagina formaat</target>
      </trans-unit>
      <trans-unit>
        <source>Page orientation</source>
        <target>Pagina afdrukstand</target>
      </trans-unit>
      <trans-unit>
        <source>Legal texts</source>
        <target>Juridische tekst</target>
      </trans-unit>
      <trans-unit>
        <source>Terms & Conditions</source>
        <target>Algemene Voorwaarden</target>
      </trans-unit>
      <trans-unit>
        <source>Invoicing series</source>
        <target>Factuur nummering</target>
      </trans-unit>
      <trans-unit>
        <source>Label</source>
        <target>Label</target>
      </trans-unit>
      <trans-unit>
        <source>Initial value</source>
        <target>Beginwaarde</target>
      </trans-unit>
      <trans-unit>
        <source>Add a new series value</source>
        <target>Nieuwe nummering toevoegen</target>
      </trans-unit>
      <trans-unit>
        <source>The initial value will only be used for the first saved invoice of the series if there are no invoices assigned.</source>
        <target>De beginwaarde wordt alleen gebruikt voor de eerst opgeslagen factuur van de betreffende (ongebruikte) nummering</target>
      </trans-unit>
      <!-- ##### SETTINGS - MY SETTINGS ##### -->
      <trans-unit>
        <source>About you</source>
        <target>Over u</target>
      </trans-unit>
      <trans-unit>
        <source>First Name</source>
        <target>Voornaam</target>
      </trans-unit>
      <trans-unit>
        <source>Last Name</source>
        <target>Achternaam</target>
      </trans-unit>
      <trans-unit>
        <source>Translate the application</source>
        <target>Vertaal het programma</target>
      </trans-unit>
      <trans-unit>
        <source>Interface language</source>
        <target>taal</target>
      </trans-unit>
      <trans-unit>
        <source>Make it easy</source>
        <target>Maak Eenvoudig</target>
      </trans-unit>
      <trans-unit>
        <source>Results to display in listings</source>
        <target>Resultaten tonen in lijsten</target>
      </trans-unit>
      <trans-unit>
        <source>Search filter</source>
        <target>Zoekfilter</target>
      </trans-unit>
      <trans-unit>
        <source>Default date filter</source>
        <target>Standaard datumfilter</target>
      </trans-unit>
      <trans-unit>
        <source>Default invoicing series</source>
        <target>Standaard factuurnummering</target>
      </trans-unit>
      <trans-unit>
        <source>Change your password</source>
        <target>Verander uw wachtwoord</target>
      </trans-unit>
      <trans-unit>
        <source>Old password</source>
        <target>Oude wachtwoord</target>
      </trans-unit>
      <trans-unit>
        <source>New password</source>
        <target>Nieuw wachtwoord</target>
      </trans-unit>
      <trans-unit>
        <source>New password (confirmation)</source>
        <target>Nieuw wachtwoord (bevestigen)</target>
      </trans-unit>
      <trans-unit>
        <source>remove the current file</source>
        <target>Verwijder huidig bestand</target>
      </trans-unit>
      <!-- ##### SETTINGS - PRINTING TEMPLATES ##### -->
      <trans-unit>
        <source>Updated at</source>
        <target>Gewijzigd op</target>
      </trans-unit>
      <trans-unit>
        <source>Create new template</source>
        <target>Maak nieuw sjabloon</target>
      </trans-unit>
      <trans-unit>
        <source>Delete selected</source>
        <target>Verwijder geselecteerde</target>
      </trans-unit>
      <trans-unit>
        <source>Mark as default</source>
        <target>Markeer als standaard</target>
      </trans-unit>
      <trans-unit>
        <source>The template has not been saved due to some errors.</source>
        <target>Het sjabloon is niet opgeslagen vanwege fouten.</target>
      </trans-unit>
      <!-- ##### MISCELANEOUS ##### -->
      <trans-unit>
        <source>Are you sure?</source>
        <target>Weet u het zeker?</target>
      </trans-unit>
      <trans-unit>
        <source>No results</source>
        <target>Geen resultaten</target>
      </trans-unit>
      <trans-unit>
        <source>day</source>
        <target>dag</target>
      </trans-unit>
      <trans-unit>
        <source>week</source>
        <target>week</target>
      </trans-unit>
      <trans-unit>
        <source>month</source>
        <target>maand</target>
      </trans-unit>
      <trans-unit>
        <source>year</source>
        <target>jaar</target>
      </trans-unit>
      <trans-unit>
        <source>Can't connect to database</source>
        <target>Kan geen verbinging maken met database</target>
      </trans-unit>
      <trans-unit>
        <source>Check your e-mail for your new password.</source>
        <target>Controleer uw e-mail voor uw nieuwe wachtwoord.</target>
      </trans-unit>
      <trans-unit>
        <source>There have been problems with the messaging system. Please try again later</source>
        <target>Er was een probleem met het mail-systeem. Probeer het later opnieuw.</target>
      </trans-unit>
      <trans-unit>
        <source>Wrong hash code</source>
        <target>Verkeerde hash code</target>
      </trans-unit>
      <trans-unit>
        <source>Sample data has been loaded.</source>
        <target>Voorbeeldgegevens zijn ingelezen.</target>
      </trans-unit>
      <trans-unit>
        <source>If you provided either a valid username or email, an email has been sent to you with the activation instructions.</source>
        <target>Als u een geldige gebruikersnaam of email ingegeven hebt, is er een email naar u verzonden met de activatie instructies.</target>
      </trans-unit>
      <trans-unit>
        <source>If you want to send another activation email, you'll need to reload this page first</source>
        <target>Als u nog een activatie email wil versturen, herlaad deze pagina dan eerst</target>
      </trans-unit>
      <trans-unit>
        <source>You don't have the required permission to access this page.</source>
        <target>U hebt niet de juiste machtigingen voor deze pagina.</target>
      </trans-unit>
      <trans-unit>
        <source>close</source>
        <target>sluiten</target>
      </trans-unit>
      <trans-unit>
        <source>Please type your username or email and we will send you an email with the activation link.</source>
        <target>Geef uw gebruikersnaam of email zodat we u een email kunnen sturen met de activatie-link.</target>
      </trans-unit>
      <trans-unit>
        <source>Username or email</source>
        <target>Gebruikersnaam of email</target>
      </trans-unit>
      <trans-unit id="1">
        <source>Contact person</source>
        <target>Contactpersoon</target>
      </trans-unit>
      <trans-unit id="2">
        <source>Invoicing address</source>
        <target>Factuuradres</target>
      </trans-unit>
      <trans-unit id="3">
        <source>Shipping address</source>
        <target>Verzendadres</target>
      </trans-unit>
      <trans-unit id="4">
        <source>Unit cost</source>
        <target>Prijs/eenheid</target>
      </trans-unit>
      <trans-unit id="5">
        <source>Save PDF</source>
        <target>Opslaan als PDF</target>
      </trans-unit>
      <trans-unit id="6">
        <source>Edit</source>
        <target>Wijzigen</target>
      </trans-unit>
      <trans-unit id="7">
        <source>The customer could not be deleted. </source>
        <target>De klant kon niet verwijderd worden. </target>
      </trans-unit>
      <trans-unit>
        <source>Currency</source>
        <target>Valuta</target>
      </trans-unit>
      <trans-unit>
        <source>The default invoicing series is mandatory</source>
        <target>De standaard factuurnummering is verplicht</target>
      </trans-unit>
      <trans-unit id="1">
        <source>The invoice was successfully saved.</source>
        <target/>
      </trans-unit>
      <trans-unit id="1">
        <source>There is a problem with invoice %s</source>
        <target/>
      </trans-unit>
    </body>
  </file>
</xliff>


text:
#include <opencv2\opencv.hpp>
#include "PointUtil.h"
using namespace cv;
using namespace std;

// ×î»ù±¾µÄÊÓƵ²ÉÑùdemo, Ïêϸ°æ±¾ÔÚvideoSampleAndDetectÖÐ
void sdfsdfsmain(){
	CvSVM model;
	model.load("../data/texture_svm");
	Mat centers;
	FileStorage fs("../data/kmeans_feature.xml", FileStorage::READ);
	fs["data"] >> centers;
	fs.release();
	int step = 2;
	int sample_w = 40;
	int dim = centers.cols;

	string save_data = "GOPRO0134_fix/";
	VideoCapture video("E:\\PowerStationData\\2016_11_15\\GOPR0011.MP4");
	FileStorage fi;
	fi.open("out_camera_data.xml", FileStorage::READ);
	Mat cameraMatrix, distCoeffs;
	fi["Camera_Matrix"] >> cameraMatrix;
	fi["Distortion_Coefficients"] >> distCoeffs;

   // double fps = video.get(CV_CAP_PROP_FPS);

    // For OpenCV 3, you can also use the following
	double fps = video.get(CV_CAP_PROP_FPS);
	Mat frame;
	char path_b[200];
	int scale = 0.8;
	bool is_record = true;
	int record_rate = 25, count = 0, save_count = 0;
	video.set(CV_CAP_PROP_POS_FRAMES, 890 * fps);
	do {
		video >> frame;
		Mat fix_img;
		undistort(frame, fix_img, cameraMatrix, distCoeffs);
		frame = fix_img;
		cout << count << endl;
		count++;
		//imshow("video", frame);
		//char button = waitKey(max(1.0, 1000 / fps / scale));
		//if(save_count >= 250) {
			Mat mask = Mat::zeros(frame.rows / step, frame.cols / step, CV_8U);
#pragma omp parallel for
			for(int r = 0; r < frame.rows - sample_w; r+=step) {
				for(int c = 0; c < frame.cols - sample_w; c+=step) {

					Mat pre_data(1, 3 * 64, CV_32F);
					float *pre_ptr = (float *)pre_data.data;

					Mat roi = frame(Rect(c, r, sample_w, sample_w));
					hist_cal(roi, pre_ptr, 0, 3 * 64, Mat());

					Mat result;
					model.predict(pre_data, result);
					if(result.at<float>(0) == 1)
						mask.at<uchar>(r/step,c/step) = 255;
					/*
					Mat feats(1, dim, CV_32F);
					hist_cal(frame(Rect(c, r, sample_w, sample_w)).clone(), (float *)feats.data, 0, dim, Mat());
					double min_dist = 100000000000;
					for(int f_i = 0; f_i < centers.rows; ++f_i) {
						double dist = norm(feats,centers.rowRange(f_i, f_i+1),NORM_L2);
						min_dist = min(dist, min_dist);
					}
					if(min_dist < 1.5)
						mask.at<uchar>(r/step,c/step) = 255;
					*/
				}
			}
			int DILATION_SIZE = 2;
			cv::UMat element_2 = cv::getStructuringElement( cv::MORPH_ELLIPSE,
			cv::Size( 2*DILATION_SIZE+1, 2*DILATION_SIZE+1 ),
			cv::Point(1 * DILATION_SIZE,1 * DILATION_SIZE ) );
			cv::erode(mask, mask, element_2);
			//imshow("ori", img_list[i]);
			imshow("mask", mask);

			/*
			cv::UMat hsv, h_c;
			cv::cvtColor(frame, hsv, cv::COLOR_BGR2HSV);
			vector<Mat> hsvChannels;
			cv::split(hsv, hsvChannels);
			resize(hsvChannels[0], h_c, Size(), 0.5, 0.5);
			imshow("h channel", h_c);
			*/
			Mat show;
			resize(frame, show, Size(), 0.5, 0.5);
			imshow("frame", show);
			waitKey(1);
		//}
		int button = 0;
		if(button != -1)
			int tmp = 0;

		if(button ==  'd')
			scale *= 2;
		else if(button == 'w')
			is_record = true;
		else if(button == 's')
			is_record = false;

		else if(button == 'r')
			scale = 1;

		else if(button == 'a') {
			if (scale > 1)
				scale /= 2;

		}
	} while(frame.size > 0);

    video.release();
}

#ifdef USE_MYSQL
string saveToDBTest(const char * savePathPrefix) {
	try {
		wstring tmp_s = wstring(L"Õòêã½ðÖÐ");
		string result = wstring_to_utf8(tmp_s);
		cout << result << endl;
		time_t curtime = time(0);
		tm tim = *localtime(&curtime);

		stringstream ss;
		ss.str("");
		ss << savePathPrefix << "_match/FrameInfo.txt";

		FrameTrack ft;
		ft.loadFrameInfo(ss.str().c_str());

		ss.str("");
		ss << savePathPrefix << "_match/save2frame.txt";
		ifstream fi(ss.str());
		ss.str("");
		int fps;
		fi >> fps;
		int save_id, frame_id;

		while (!fi.eof()) {
			fi >> save_id >> frame_id;
			ft.flight_info.save2frame[save_id] = frame_id;
		}
		ft.flight_info.frame_rate = fps;
		string ser;
		ft.serialization(ser);
		cout << "Size:" << ser.size() << "B, " << ser.size() / 1024.f << "kB, " << ser.size() / 1024.f / 1024.f << "MB" << endl;

		sql::Driver * driver = sql::mysql::get_driver_instance();
		boost::scoped_ptr< sql::Connection > con(driver->connect(URL, USER, PASS));
		cout << driver->getName() << endl;

		/* Creating a "simple" statement - "simple" = not a prepared statement */
		boost::scoped_ptr< sql::Statement > stmt(con->createStatement());
		bool flag = stmt->execute("USE " + string(USE_DB) + ";");

		stringstream sql;
		sql.str("");
		sql << "INSERT INTO solar_insight.analyze_result(create_time, solar_plants_name,"
			"flight_info_flight_begin_time, image_save_path, panel_image_save_path, data) VALUES (?, ?, ?, ?, ?, ?);";

		boost::scoped_ptr< sql::PreparedStatement > prep_stmt(con->prepareStatement(sql.str()));
		sql.str("");
		sql << 1900 + tim.tm_year << "/" << tim.tm_mon << "/" << tim.tm_mday << "/" << tim.tm_hour << ":" << tim.tm_min << ":" << tim.tm_sec;
		string id = sql.str();
		prep_stmt->setDateTime(1, sql::SQLString(sql.str()));

		prep_stmt->setString(2, result);
		prep_stmt->setDateTime(3, sql::SQLString("2016-11-17 12:40:00"));
		prep_stmt->setString(4, sql::SQLString(savePathPrefix));
		prep_stmt->setString(5, sql::SQLString(savePathPrefix + string("_match/panel_group/")));
		std::istringstream tmp_blob(ser);
		prep_stmt->setBlob(6, &tmp_blob);
		prep_stmt->executeUpdate();
		return id;
	}
	catch (sql::SQLException &e) {
		/*
		The MySQL Connector/C++ throws three different exceptions:

		- sql::MethodNotImplementedException (derived from sql::SQLException)
		- sql::InvalidArgumentException (derived from sql::SQLException)
		- sql::SQLException (derived from std::runtime_error)
		*/
		cout << "# ERR: SQLException in " << __FILE__;
		cout << "() on line " << __LINE__ << endl;
		cout << "# ERR: " << e.what();
		cout << " (MySQL error code: " << e.getErrorCode();
		cout << ", SQLState: " << e.getSQLState() << " )" << endl;
		return "";
	}
	catch (std::exception e) {
		cout << "# ERR: " << e.what() << endl;
		return "";
	}
}

void loadFromDBTest(string key, const char * savePathPrefix) {
	try {
		wstring tmp_s = wstring(L"Õòêã½ðÖÐ");
		string result = wstring_to_utf8(tmp_s);
		cout << result << endl;

		FrameTrack ft;
		//string ser;
		//ft.serialization(ser);
		//cout << "Size:" << ser.size() << "B, " << ser.size() / 1024.f << "kB, " << ser.size() / 1024.f / 1024.f << "MB" << endl;

		sql::Driver * driver = sql::mysql::get_driver_instance();
		boost::scoped_ptr< sql::Connection > con(driver->connect(URL, USER, PASS));
		cout << driver->getName() << endl;

		/* Creating a "simple" statement - "simple" = not a prepared statement */
		boost::scoped_ptr< sql::Statement > stmt(con->createStatement());
		bool flag = stmt->execute("USE " + string(USE_DB) + ";");

		stringstream sql;
		sql.str("");
		sql << "SELECT data FROM solar_insight.analyze_result WHERE create_time='"<< key << "';";
		boost::scoped_ptr<sql::ResultSet> resSet(stmt->executeQuery(sql.str()));
		int count = 0;
		while (resSet->next()) {
			Ptr<std::istream> tmp_blob(resSet->getBlob("data"));
			std::istreambuf_iterator<char> eos;
			std::string ss(std::istreambuf_iterator<char>(*tmp_blob), eos);
			ft.deserialization(ss);
		}
		cout << "Recover size:" << ft.flight_info.panel_img_info_record.size() << endl;
		//resSet.reset(NULL);

	}
	catch (sql::SQLException &e) {
		/*
		The MySQL Connector/C++ throws three different exceptions:

		- sql::MethodNotImplementedException (derived from sql::SQLException)
		- sql::InvalidArgumentException (derived from sql::SQLException)
		- sql::SQLException (derived from std::runtime_error)
		*/
		cout << "# ERR: SQLException in " << __FILE__;
		cout << "() on line " << __LINE__ << endl;
		cout << "# ERR: " << e.what();
		cout << " (MySQL error code: " << e.getErrorCode();
		cout << ", SQLState: " << e.getSQLState() << " )" << endl;
	}
	catch (std::exception e) {
		cout << "# ERR: " << e.what() << endl;
	}
}
#else

string saveToDBTest(const char * savePathPrefix) {
	sqlite3 *db;
	char *zErrMsg = 0;
	sqlite3_stmt *stmt;
	string key = "";
	try {
		stringstream ss;
		ss.str("");
		ss << savePathPrefix << "_match/FrameInfo.txt";

		FrameTrack ft;
		ft.loadFrameInfo(ss.str().c_str());

		ss.str("");
		ss << savePathPrefix << "_match/save2frame.txt";
		ifstream fi(ss.str());
		ss.str("");
		int fps;
		fi >> fps;
		int save_id, frame_id;

		while (!fi.eof()) {
			fi >> save_id >> frame_id;
			ft.flight_info.save2frame[save_id] = frame_id;
		}
		ft.flight_info.frame_rate = fps;
		string ser;
		ft.serialization(ser);
		cout << "Size:" << ser.size() << "B, " << ser.size() / 1024.f << "kB, " << ser.size() / 1024.f / 1024.f << "MB" << endl;
		/* Read information from DB */

		SQL_CHECK_DB(sqlite3_open("../data/database.db", &db), db);
		time_t curtime = time(0);
		tm tim = *localtime(&curtime);
		std::stringstream sql;
		sql << 1900 + tim.tm_year << "-" << tim.tm_mon << "-" << tim.tm_mday << " " << tim.tm_hour << ":" << tim.tm_min << ":" << tim.tm_sec;
		key = sql.str();
		sql.str("");

		sql << "INSERT INTO analyze_result(create_time, solar_plants_name, flight_begin_time,"
			"image_save_path, panel_image_save_path, data) VALUES ('" << key << "', '"
			<< "Õòêã½ðÖÐ" << format("', '%s', '%s', '%s', ?);", "2016-11-17 12:40:00", savePathPrefix, savePathPrefix + string("_match/panel_group/"));
		int nbyte = sql.str().size();
		string tmp = sql.str();
		SQL_CHECK_DB(sqlite3_prepare_v2(db, tmp.c_str(), -1, &stmt, NULL), db);
		sqlite3_bind_blob(stmt, 1, ser.data(), ser.size(), SQLITE_STATIC);
		SQL_CHECK_STEP(sqlite3_step(stmt), db);

		sqlite3_finalize(stmt);
		sqlite3_close(db);

	}
	catch (SQLiteException &e) {
		/*
		The MySQL Connector/C++ throws three different exceptions:

		- sql::MethodNotImplementedException (derived from sql::SQLException)
		- sql::InvalidArgumentException (derived from sql::SQLException)
		- sql::SQLException (derived from std::runtime_error)
		*/
		cout << "# ERR: SQLException in " << __FILE__;
		cout << "() on line " << __LINE__ << endl;
		cout << "# ERR: " << e.what();

		sqlite3_finalize(stmt);
		sqlite3_free(zErrMsg);
		sqlite3_close(db);
		key = "";
	}
	catch (std::exception e) {
		cout << "# ERR: " << e.what() << endl;
		sqlite3_finalize(stmt);
		sqlite3_free(zErrMsg);
		sqlite3_close(db);
		key = "";
	}
	return key;
}

void loadFromDBTest(string key, const char * savePathPrefix) {
	sqlite3 *db;
	sqlite3_stmt * stmt;
	try {
		FrameTrack ft;
		/* Read information from DB */
		SQL_CHECK_DB(sqlite3_open("../data/database.db", &db), db);

		map<string, int> col_name_map;
		/* Select the solar plants */
		db::getTableMap(db, "analyze_result", col_name_map);

		// It may returns more than one result, but it just tests the query here.
		string sql = "SELECT * FROM analyze_result WHERE solar_plants_name='Õòêã½ðÖÐ';";
		sqlite3_stmt * stmt;
		SQL_CHECK_DB(sqlite3_prepare_v2(db, sql.c_str(), -1, &stmt, NULL), db);
		int flag = sqlite3_step(stmt);
		while (flag != SQLITE_DONE) {
			if (flag == SQLITE_ROW) {
				char *data = NULL;
				// The memory is alloced by sqlite, after the step, it will be collected.
				data = (char *)sqlite3_column_blob(stmt, col_name_map["data"]);
				int iLen = sqlite3_column_bytes(stmt, col_name_map["data"]);
				ft.deserialization(data, iLen);
				flag = sqlite3_step(stmt);
			}
			else  {
				throw SQLiteException(sqlite3_errmsg(db));
			}
		}
		sqlite3_finalize(stmt);
		sqlite3_close(db);

	}
	catch (SQLiteException &e) {
		cout << "# ERR: SQLException in " << __FILE__;
		cout << "() on line " << __LINE__ << endl;
		cout << "# ERR: " << e.what();
	}
	catch (std::exception e) {
		cout << "# ERR: " << e.what() << endl;
	}
}
#endif

void serializeTest(const char * savePathPrefix) {
	stringstream ss;
	ss.str("");
	ss << savePathPrefix << "_match/FrameInfo.txt";

	FrameTrack ft;
	ft.loadFrameInfo(ss.str().c_str());
	ss.str("");
	ss << savePathPrefix << "_match/save2frame.txt";
	ifstream fi(ss.str());
	ss.str("");
	int fps;
	fi >> fps;
	int save_id, frame_id;

	while (!fi.eof()) {
		fi >> save_id >> frame_id;
		ft.flight_info.save2frame[save_id] = frame_id;
	}
	ft.flight_info.frame_rate = fps;
	string ser;
	ft.serialization(ser);
	cout << "Size:" << ser.size() << "B, " << ser.size() / 1024.f << "kB, " << ser.size() / 1024.f / 1024.f << "MB" << endl;

	ft.flight_info = AnalyzeInfo();
	ft.deserialization(ser);
	int bug = 0;
}

#define JLIST_PUT(arr, tmp, value) tmp.put("", value); arr.push_back(std::make_pair("", tmp)); tmp.clear();

void jsonTest() {
	namespace pt = boost::property_tree;
	pt::ptree position, corner, grid_position;
	/* position.txt */
	position.put("ori_w", "600");
	position.put("ori_h", "360");
	pt::ptree pos_children;
	for (int i = 0; i < 5; ++i) {
		pt::ptree tmp_list, tmp;
		JLIST_PUT(tmp_list, tmp, 5 + i);
		JLIST_PUT(tmp_list, tmp, 10 + i);
		JLIST_PUT(tmp_list, tmp, 15 + i);
		JLIST_PUT(tmp_list, tmp, 20 + i);
		pos_children.push_back(std::make_pair(cv::format("%d", i), tmp_list));
	}
	position.put_child("img_position", pos_children);

	//pt::ptree corner_children;
	for (int i = 0; i < 5; ++i) {
		for (int j = 0; j < 5; ++j) {
			pt::ptree tmp_list, tmp;
			JLIST_PUT(tmp_list, tmp, 5 + i);
			JLIST_PUT(tmp_list, tmp, 10 + i);
			JLIST_PUT(tmp_list, tmp, 15 + i);
			JLIST_PUT(tmp_list, tmp, 20 + i);
			corner.push_back(std::make_pair(cv::format("%d-%d", i, j), tmp_list));
		}
	}

	for (int i = 0; i < 5; ++i) {
		for (int j = 0; j < 5; ++j) {
			pt::ptree tmp_grid;
			for (int k = 0; k < 10; ++k) {
				for (int l = 0; l < 10; ++l) {
					pt::ptree tmp_list, tmp;
					JLIST_PUT(tmp_list, tmp, 5 + i);
					JLIST_PUT(tmp_list, tmp, 10 + i);
					JLIST_PUT(tmp_list, tmp, 15 + i);
					JLIST_PUT(tmp_list, tmp, 20 + i);
					tmp_grid.push_back(std::make_pair(cv::format("%d_%d", k, l), tmp_list));
				}
			}
			grid_position.push_back(std::make_pair(cv::format("%d-%d", i, j), tmp_grid));
		}
	}

	pt::ptree root;
	root.put_child("position", position);
	root.put_child("corner", corner);
	root.put_child("grid_position", grid_position);
	ofstream fo("../data/json_test.json");
	pt::write_json(fo, root, false);

	fo.close();
}

void parseFromFileAndDB() {
	try{
		vector<string> tmp_path;
		ifstream fi("file_db.txt");  // read basic
		fi >> isVideoWrite >> isImgWrite >> debug_frame_b >> debug_frame_e;
		fi >> savePathPrefix;
		fi >> videoOutput;
		fi.close();

		sql::Driver * driver = sql::mysql::get_driver_instance();
		boost::scoped_ptr< sql::Connection > con(driver->connect(URL, USER, PASS));
		cout << driver->getName() << endl;

		boost::scoped_ptr< sql::Statement > stmt(con->createStatement());
		bool flag = stmt->execute("USE " + string(USE_DB) + ";");

		stringstream sql;
		/* Select the solar plants */
		sql.str("");
		sql << "SELECT * FROM solar_insight.solar_plants_info;";
		boost::scoped_ptr<sql::ResultSet> resSet(stmt->executeQuery(sql.str()));

		vector<SolarPlantsInfo> candidate_list;
		while (resSet->next()) {
			SolarPlantsInfo tmp_info;
			tmp_info.name = utf8_to_wstring(resSet->getString("solar_plants_name"));
			tmp_info.aspect_ratio = resSet->getDouble("aspect_ratio");
			tmp_info.row_num = resSet->getInt("row_num");
			tmp_info.col_num = resSet->getInt("col_num");
			candidate_list.push_back(tmp_info);
		}
		//resSet.reset(NULL);
		int choose_id = -1;
		wcout.imbue(std::locale("chs"));
		while (choose_id == -1) {
			cout << OUTPUT_FILL('*', 10) << " "<< endl;
			int i = 0;
			ITER(it, candidate_list) {
				wcout <<  i++ << ": " << it->name << endl;
			}

			cout << "Enter the solar plants ID:";
			cin >> choose_id;
			if (choose_id < 0 || choose_id >= candidate_list.size()) {
				cout << "Error, enter the invalid ID, please enter again!" << endl;
				choose_id = -1;
			}
		}

		sp_info = candidate_list[choose_id];
		candidate_list.clear();

		/* Select the flight */
		sql.str("");
		vector<string> flight_begin_time;
		sql << "SELECT * FROM solar_insight.flight_info WHERE solar_plants_name=?;";
		boost::scoped_ptr<sql::PreparedStatement> pre_stmt(con->prepareStatement(sql.str()));
		pre_stmt->setString(1, wstring_to_utf8(sp_info.name));
		resSet.reset(pre_stmt->executeQuery());
		while (resSet->next()) {
			flight_begin_time.push_back(resSet->getString("flight_begin_time"));
		}
		choose_id = -1;
		while (choose_id == -1) {
			cout << OUTPUT_FILL('*', 10) << " " << endl;
			wcout << sp_info.name << " flight number:" << flight_begin_time.size() << endl;
			int i = 0;
			cout.flags(ios::left);
			cout << OUTPUT_FILL(' ', 3) << "ID" << " | Flight Date" << endl;
			ITER(it, flight_begin_time) {
				cout << OUTPUT_FILL('-', 20) << " " << endl;
				cout.flags(ios::left);
				cout << OUTPUT_FILL(' ', 3) << i++ << " | " << *it << endl;
			}

			cout << "Enter the flight ID:";
			cin >> choose_id;
			if (choose_id < 0 || choose_id >= flight_begin_time.size()) {
				cout << "Error, enter the invalid ID, please enter again!" << endl;
				choose_id = -1;
			}
		}
		sp_info.flight_begin_time = flight_begin_time[choose_id];

		/* Get the video, given the solar plants name and flight_begin_time, it can
			automatically choose the video
		*/
		cout << "Getting the video..." << endl;
		sql.str("");
		sql << "SELECT * FROM solar_insight.color_video_info WHERE solar_plants_name=? AND flight_begin_time=? ORDER BY v_id;";
		pre_stmt.reset(con->prepareStatement(sql.str()));
		pre_stmt->setString(1, wstring_to_utf8(sp_info.name));
		pre_stmt->setString(2, sp_info.flight_begin_time);
		resSet.reset(pre_stmt->executeQuery());
		while (resSet->next()) {
			string path = resSet->getString("save_folder");
			string video_name = resSet->getString("video_name");
			cout.flags(ios::left);
			cout << OUTPUT_FILL(' ', 20);
			cout << video_name << "| ";
			sp_info.video_path.push_back((path+video_name).c_str());
			string b_t = resSet->getString("valued_start_time");
			string e_t = resSet->getString("valued_end_time");
			tm tmp_t = boost::posix_time::to_tm(boost::posix_time::time_from_string("2000/1/1 " + b_t));
			pair<int, int>range;
			range.first = TIME_TO_INT(tmp_t);
			tmp_t = boost::posix_time::to_tm(boost::posix_time::time_from_string("2000/1/1 " + e_t));
			range.second = TIME_TO_INT(tmp_t);
			cout.flags(ios::right);
			cout << "start:" << b_t << "(" << OUTPUT_FILL(' ', 4) << range.first << ")---end:" << e_t << "(" << OUTPUT_FILL(' ', 4) << range.second << ")" << endl;
			sp_info.valued_range.push_back(range);
		}

	}
	catch (sql::SQLException &e) {
		/*
		The MySQL Connector/C++ throws three different exceptions:

		- sql::MethodNotImplementedException (derived from sql::SQLException)
		- sql::InvalidArgumentException (derived from sql::SQLException)
		- sql::SQLException (derived from std::runtime_error)
		*/
		cout << "# ERR: SQLException in " << __FILE__;
		cout << "() on line " << __LINE__ << endl;
		cout << "# ERR: " << e.what();
		cout << " (MySQL error code: " << e.getErrorCode();
		cout << ", SQLState: " << e.getSQLState() << " )" << endl;
	}
}

redpajama_set_name: RedPajamaGithub


text:
namespace TeamWork.Models.Roles.SagittariusianFootballPlayer
{
    using Global.Contracts;
    using Species.Abstract;

    public static partial class FootballPlayerFactory
    {
        internal class SagittariusianDefender : Sagittariusian
        {
            public SagittariusianDefender(string name)
                : base(name)
            {
            }

            public SagittariusianDefender(IFootballPlayer player)
                : base(player)
            {
            }

            public SagittariusianDefender(string name, int pass, int shoot, int dribble, int save, int tackle, int interception, int awareness, int actionPoints)
                : base(name, pass, shoot, dribble, save, tackle, interception, awareness, actionPoints)
            {
            }
        }
    }
}


text:
package ua.com.fielden.platform.web.centre.api.crit.defaults;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.web.centre.api.crit.IAlsoCrit;
import ua.com.fielden.platform.web.centre.api.crit.defaults.assigners.IValueAssigner;
import ua.com.fielden.platform.web.centre.api.crit.defaults.mnemonics.SingleCritOtherValueMnemonic;

/**
 * A contract to provide a default value assigner or specific default values for a single-valued kind selection criteria of the string type.
 * The value may contain whild-cards.
 *
 * @author TG Team
 *
 * @param <T>
 */
public interface ISingleStringDefaultValueAssigner<T extends AbstractEntity<?>> extends IAlsoCrit<T> {
    IAlsoCrit<T> withDefaultValueAssigner(final Class<? extends IValueAssigner<SingleCritOtherValueMnemonic<String>, T>> assigner);
    IAlsoCrit<T> setDefaultValue(final SingleCritOtherValueMnemonic<String> value);
}


text:
package io.netty.buffer;

import io.netty.util.Recycler;
import io.netty.util.internal.PlatformDependent;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.GatheringByteChannel;
import java.nio.channels.ScatteringByteChannel;

final class PooledUnsafeDirectByteBuf extends PooledByteBuf<ByteBuffer> {
    private static final Recycler<PooledUnsafeDirectByteBuf> RECYCLER = new Recycler<PooledUnsafeDirectByteBuf>() {
        @Override
        protected PooledUnsafeDirectByteBuf newObject(Handle<PooledUnsafeDirectByteBuf> handle) {
            return new PooledUnsafeDirectByteBuf(handle, 0);
        }
    };

    static PooledUnsafeDirectByteBuf newInstance(int maxCapacity) {
        PooledUnsafeDirectByteBuf buf = RECYCLER.get();
        buf.reuse(maxCapacity);
        return buf;
    }

    private long memoryAddress;

    private PooledUnsafeDirectByteBuf(Recycler.Handle<PooledUnsafeDirectByteBuf> recyclerHandle, int maxCapacity) {
        super(recyclerHandle, maxCapacity);
    }

    @Override
    void init(PoolChunk<ByteBuffer> chunk, long handle, int offset, int length, int maxLength,
              PoolThreadCache cache) {
        super.init(chunk, handle, offset, length, maxLength, cache);
        initMemoryAddress();
    }

    @Override
    void initUnpooled(PoolChunk<ByteBuffer> chunk, int length) {
        super.initUnpooled(chunk, length);
        initMemoryAddress();
    }

    private void initMemoryAddress() {
        memoryAddress = PlatformDependent.directBufferAddress(memory) + offset;
    }

    @Override
    protected ByteBuffer newInternalNioBuffer(ByteBuffer memory) {
        return memory.duplicate();
    }

    @Override
    public boolean isDirect() {
        return true;
    }

    @Override
    protected byte _getByte(int index) {
        return UnsafeByteBufUtil.getByte(addr(index));
    }

    @Override
    protected short _getShort(int index) {
        return UnsafeByteBufUtil.getShort(addr(index));
    }

    @Override
    protected int _getUnsignedMedium(int index) {
        return UnsafeByteBufUtil.getUnsignedMedium(addr(index));
    }

    @Override
    protected int _getInt(int index) {
        return UnsafeByteBufUtil.getInt(addr(index));
    }

    @Override
    protected long _getLong(int index) {
        return UnsafeByteBufUtil.getLong(addr(index));
    }

    @Override
    public ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) {
        checkIndex(index, length);
        if (dst == null) {
            throw new NullPointerException("dst");
        }
        if (dstIndex < 0 || dstIndex > dst.capacity() - length) {
            throw new IndexOutOfBoundsException("dstIndex: " + dstIndex);
        }

        if (length != 0) {
            if (dst.hasMemoryAddress()) {
                PlatformDependent.copyMemory(addr(index), dst.memoryAddress() + dstIndex, length);
            } else if (dst.hasArray()) {
                PlatformDependent.copyMemory(addr(index), dst.array(), dst.arrayOffset() + dstIndex, length);
            } else {
                dst.setBytes(dstIndex, this, index, length);
            }
        }
        return this;
    }

    @Override
    public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) {
        checkIndex(index, length);
        if (dst == null) {
            throw new NullPointerException("dst");
        }
        if (dstIndex < 0 || dstIndex > dst.length - length) {
            throw new IndexOutOfBoundsException("dstIndex: " + dstIndex);
        }
        if (length != 0) {
            PlatformDependent.copyMemory(addr(index), dst, dstIndex, length);
        }
        return this;
    }

    @Override
    public ByteBuf getBytes(int index, ByteBuffer dst) {
        checkIndex(index);
        int bytesToCopy = Math.min(capacity() - index, dst.remaining());
        if (bytesToCopy == 0) {
            return this;
        }

        if (dst.isDirect()) {
            // Copy to direct memory
            long dstAddress = PlatformDependent.directBufferAddress(dst);
            PlatformDependent.copyMemory(addr(index), dstAddress + dst.position(), bytesToCopy);
        } else {
            // Copy to array
            PlatformDependent.copyMemory(addr(index), dst.array(), dst.arrayOffset() + dst.position(), bytesToCopy);
        }

        dst.position(dst.position() + bytesToCopy);
        return this;
    }

    @Override
    public ByteBuf readBytes(ByteBuffer dst) {
        int length = dst.remaining();
        checkReadableBytes(length);
        getBytes(readerIndex, dst);
        readerIndex += length;
        return this;
    }

    @Override
    public ByteBuf getBytes(int index, OutputStream out, int length) throws IOException {
        checkIndex(index, length);
        if (length != 0) {
            byte[] tmp = new byte[length];
            PlatformDependent.copyMemory(addr(index), tmp, 0, length);
            out.write(tmp);
        }
        return this;
    }

    @Override
    public int getBytes(int index, GatheringByteChannel out, int length) throws IOException {
        return getBytes(index, out, length, false);
    }

    private int getBytes(int index, GatheringByteChannel out, int length, boolean internal) throws IOException {
        checkIndex(index, length);
        if (length == 0) {
            return 0;
        }

        ByteBuffer tmpBuf;
        if (internal) {
            tmpBuf = internalNioBuffer();
        } else {
            tmpBuf = memory.duplicate();
        }
        index = idx(index);
        tmpBuf.clear().position(index).limit(index + length);
        return out.write(tmpBuf);
    }

    @Override
    public int readBytes(GatheringByteChannel out, int length)
            throws IOException {
        checkReadableBytes(length);
        int readBytes = getBytes(readerIndex, out, length, true);
        readerIndex += readBytes;
        return readBytes;
    }

    @Override
    protected void _setByte(int index, int value) {
        UnsafeByteBufUtil.setByte(addr(index), (byte) value);
    }

    @Override
    protected void _setShort(int index, int value) {
        UnsafeByteBufUtil.setShort(addr(index), value);
    }

    @Override
    protected void _setMedium(int index, int value) {
        UnsafeByteBufUtil.setMedium(addr(index), value);
    }

    @Override
    protected void _setInt(int index, int value) {
        UnsafeByteBufUtil.setInt(addr(index), value);
    }

    @Override
    protected void _setLong(int index, long value) {
        UnsafeByteBufUtil.setLong(addr(index), value);
    }

    @Override
    public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) {
        checkIndex(index, length);
        if (src == null) {
            throw new NullPointerException("src");
        }
        if (srcIndex < 0 || srcIndex > src.capacity() - length) {
            throw new IndexOutOfBoundsException("srcIndex: " + srcIndex);
        }

        if (length != 0) {
            if (src.hasMemoryAddress()) {
                PlatformDependent.copyMemory(src.memoryAddress() + srcIndex, addr(index), length);
            } else if (src.hasArray()) {
                PlatformDependent.copyMemory(src.array(), src.arrayOffset() + srcIndex, addr(index), length);
            } else {
                src.getBytes(srcIndex, this, index, length);
            }
        }
        return this;
    }

    @Override
    public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length) {
        checkIndex(index, length);
        if (length != 0) {
            PlatformDependent.copyMemory(src, srcIndex, addr(index), length);
        }
        return this;
    }

    @Override
    public ByteBuf setBytes(int index, ByteBuffer src) {
        checkIndex(index, src.remaining());

        int length = src.remaining();
        if (length == 0) {
            return this;
        }

        if (src.isDirect()) {
            // Copy from direct memory
            long srcAddress = PlatformDependent.directBufferAddress(src);
            PlatformDependent.copyMemory(srcAddress + src.position(), addr(index), src.remaining());
        } else {
            // Copy from array
            PlatformDependent.copyMemory(src.array(), src.arrayOffset() + src.position(), addr(index), length);
        }
        src.position(src.position() + length);
        return this;
    }

    @Override
    public int setBytes(int index, InputStream in, int length) throws IOException {
        checkIndex(index, length);
        byte[] tmp = new byte[length];
        int readBytes = in.read(tmp);
        if (readBytes > 0) {
            PlatformDependent.copyMemory(tmp, 0, addr(index), readBytes);
        }
        return readBytes;
    }

    @Override
    public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException {
        checkIndex(index, length);
        ByteBuffer tmpBuf = internalNioBuffer();
        index = idx(index);
        tmpBuf.clear().position(index).limit(index + length);
        try {
            return in.read(tmpBuf);
        } catch (ClosedChannelException ignored) {
            return -1;
        }
    }

    @Override
    public ByteBuf copy(int index, int length) {
        checkIndex(index, length);
        ByteBuf copy = alloc().directBuffer(length, maxCapacity());
        if (length != 0) {
            if (copy.hasMemoryAddress()) {
                PlatformDependent.copyMemory(addr(index), copy.memoryAddress(), length);
                copy.setIndex(0, length);
            } else {
                copy.writeBytes(this, index, length);
            }
        }
        return copy;
    }

    @Override
    public int nioBufferCount() {
        return 1;
    }

    @Override
    public ByteBuffer[] nioBuffers(int index, int length) {
        return new ByteBuffer[] { nioBuffer(index, length) };
    }

    @Override
    public ByteBuffer nioBuffer(int index, int length) {
        checkIndex(index, length);
        index = idx(index);
        return ((ByteBuffer) memory.duplicate().position(index).limit(index + length)).slice();
    }

    @Override
    public ByteBuffer internalNioBuffer(int index, int length) {
        checkIndex(index, length);
        index = idx(index);
        return (ByteBuffer) internalNioBuffer().clear().position(index).limit(index + length);
    }

    @Override
    public boolean hasArray() {
        return false;
    }

    @Override
    public byte[] array() {
        throw new UnsupportedOperationException("direct buffer");
    }

    @Override
    public int arrayOffset() {
        throw new UnsupportedOperationException("direct buffer");
    }

    @Override
    public boolean hasMemoryAddress() {
        return true;
    }

    @Override
    public long memoryAddress() {
        ensureAccessible();
        return memoryAddress;
    }

    private long addr(int index) {
        return memoryAddress + index;
    }

    @Override
    protected SwappedByteBuf newSwappedByteBuf() {
        if (PlatformDependent.isUnaligned()) {
            // Only use if unaligned access is supported otherwise there is no gain.
            return new UnsafeDirectSwappedByteBuf(this);
        }
        return super.newSwappedByteBuf();
    }
}


text:
CREATE TABLE IF NOT EXISTS zn_data.event_type_schema (
  ets_event_type_name varchar(255) NOT NULL REFERENCES zn_data.event_type (et_name),
  ets_schema_object jsonb NOT NULL
);

CREATE INDEX ON zn_data.event_type_schema USING gin (ets_schema_object);

CREATE INDEX ON zn_data.event_type_schema ((ets_schema_object->>'version'));
CREATE INDEX ON zn_data.event_type_schema ((ets_schema_object->>'created_at'));

CREATE UNIQUE INDEX ON zn_data.event_type_schema ((ets_schema_object->>'version'),
                                                  (ets_event_type_name));


text:
"""Module for generating RSA keys like https://www.npmjs.com/package/keypair.

NOTE: This implementation is vulnerable and has been written as a helper for the
solely purpose of testing keys potentially weak to CVE-2021-41117. Please do not
copy-paste nor use this code.
"""
import hashlib
from cryptography.hazmat.primitives import ciphers
from cryptography.hazmat.primitives.ciphers import algorithms
from cryptography.hazmat.primitives.ciphers import modes
import gmpy

GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2]

class Generator():
  """Class for generating Keypair modulus for a given seed and bit size."""

  def __init__(self, seed: bytes):
    """Initializes the PRNG given an initial seed.

    Args:
      seed: the initial seed used in the PRNG.
    """
    t = hashlib.sha1(seed).digest()
    key = hashlib.sha1(t).digest()
    self.orig_key = key
    seed = hashlib.sha1(key).digest()
    self.key = key[:16]
    self.seed = seed[:16]

  def generate_prime(self, p_size_bits: int) -> int:
    """Generates a prime using Keypair PRNG.

    The prime is assembled by concatenating AES blocks. Original implementation
    is at https://github.com/juliangruber/keypair/blob/master/index.js.

    Args:
      p_size_bits: bit size of the prime to be generated.

    Returns:
      The generated prime.
    """
    p_size_bytes = p_size_bits // 8
    while True:
      prime_bytes = b''
      idx = 0
      while len(prime_bytes) <= p_size_bytes:
        # Add chunk
        encryptor = ciphers.Cipher(algorithms.AES(self.key),
                                   modes.ECB()).encryptor()
        prime_bytes += encryptor.update(self.seed)
        # Update key and seed
        seed_inc = (int.from_bytes(self.seed, 'big') + 1).to_bytes(16, 'big')
        self.key = encryptor.update(seed_inc)
        encryptor = ciphers.Cipher(algorithms.AES(self.key),
                                   modes.ECB()).encryptor()
        self.seed = encryptor.update(seed_inc)

      # Discard first and last bytes
      prime_bytes = prime_bytes[1:p_size_bytes + 1]
      p = int.from_bytes(prime_bytes, 'big')
      p |= 1 << (p_size_bits - 1)  # Set MSB
      p += 31 - p % 30  # Align number on 30k+1 boundary
      while not gmpy.is_prime(p, 1):
        p += GCD_30_DELTA[idx % 8]
        idx += 1
      if gmpy.is_prime(p, 10):
        return p

  def generate_key(self, bits: int) -> tuple[int, int]:
    """Generates the primes as in an RSA key.

    Args:
      bits: bit size of the RSA key/modulus.

    Returns:
      a tuple containing the two primes of the RSA key/modulus.
    """
    p_size_bits = bits // 2
    p = self.generate_prime(p_size_bits)
    q = self.generate_prime(p_size_bits)
    while True:
      if q > p:
        p, q = q, p
      n = p * q
      if n.bit_length() == bits:
        return p, q
      q = self.generate_prime(p_size_bits)


text:
ifeq ($(CROSS_COMPILE),)
  ifdef TILERA_ROOT
    CROSS_COMPILE := $(TILERA_ROOT)/bin/tile-
  else
    goals := $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)
    ifneq ($(strip $(filter vmlinux modules all,$(goals))),)
      HOST_ARCH := $(shell uname -m)
      ifneq ($(HOST_ARCH),$(ARCH))
$(error Set TILERA_ROOT or CROSS_COMPILE when building $(ARCH) on $(HOST_ARCH))
      endif
    endif
  endif
endif

# The tile compiler may emit .eh_frame information for backtracing.
# In kernel modules, this causes load failures due to unsupported relocations.
KBUILD_CFLAGS   += -fno-asynchronous-unwind-tables

ifneq ($(CONFIG_DEBUG_EXTRA_FLAGS),"")
KBUILD_CFLAGS   += $(CONFIG_DEBUG_EXTRA_FLAGS)
endif

LIBGCC_PATH     := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

# Provide the path to use for "make defconfig".
KBUILD_DEFCONFIG := $(ARCH)_defconfig

# Used as a file extension when useful, e.g. head_$(BITS).o
# Not needed for (e.g.) "$(CC) -m32" since the compiler automatically
# uses the right default anyway.
export BITS
ifeq ($(CONFIG_TILEGX),y)
BITS := 64
else
BITS := 32
endif

head-y		:= arch/tile/kernel/head_$(BITS).o

libs-y		+= arch/tile/lib/
libs-y		+= $(LIBGCC_PATH)

# See arch/tile/Kbuild for content of core part of the kernel
core-y		+= arch/tile/

core-$(CONFIG_KVM) += arch/tile/kvm/

ifdef TILERA_ROOT
INSTALL_PATH ?= $(TILERA_ROOT)/tile/boot
endif

install:
	install -D -m 755 vmlinux $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
	install -D -m 644 .config $(INSTALL_PATH)/config-$(KERNELRELEASE)
	install -D -m 644 System.map $(INSTALL_PATH)/System.map-$(KERNELRELEASE)

define archhelp
	echo '  install         - install kernel into $(INSTALL_PATH)'
endef


text:
package org.springframework.data.ebean.repository.query;

import io.ebean.EbeanServer;
import io.ebean.Query;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.repository.query.QueryMethod;
import org.springframework.data.repository.query.QueryMethodEvaluationContextProvider;
import org.springframework.data.repository.query.RepositoryQuery;
import org.springframework.expression.spel.standard.SpelExpressionParser;

/**
 * Factory to create the appropriate {@link RepositoryQuery} for a {@link EbeanQueryMethod}.
 *
 * @author Xuegui Yuan
 */
enum EbeanQueryFactory {

    /**
     * Instance
     */
    INSTANCE;

    private static final SpelExpressionParser PARSER = new SpelExpressionParser();
    private static final Logger LOG = LoggerFactory.getLogger(EbeanQueryFactory.class);

    /**
     * Creates a {@link RepositoryQuery} from the given {@link QueryMethod} that is potentially annotated with
     * {@link Query}.
     *
     * @param method                    must not be {@literal null}.
     * @param ebeanServer               must not be {@literal null}.
     * @param evaluationContextProvider
     * @return the {@link RepositoryQuery} derived from the annotation or {@code null} if no annotation found.
     */
    AbstractEbeanQuery fromQueryAnnotation(EbeanQueryMethod method, EbeanServer ebeanServer,
                                           QueryMethodEvaluationContextProvider evaluationContextProvider) {

        LOG.debug("Looking up query for method {}", method.getName());
        return fromMethodWithQueryString(method, ebeanServer, method.getAnnotatedQuery(), evaluationContextProvider);
    }

    /**
     * Creates a {@link RepositoryQuery} from the given {@link String} query.
     *
     * @param method                    must not be {@literal null}.
     * @param ebeanServer               must not be {@literal null}.
     * @param queryString               must not be {@literal null} or empty.
     * @param evaluationContextProvider
     * @return
     */
    AbstractEbeanQuery fromMethodWithQueryString(EbeanQueryMethod method, EbeanServer ebeanServer, String queryString,
                                                 QueryMethodEvaluationContextProvider evaluationContextProvider) {

        if (queryString == null) {
            return null;
        }
        // native
        if (method.isNativeQuery()) {
            if (method.isModifyingQuery()) {
                return new NativeEbeanUpdate(method, ebeanServer, queryString, evaluationContextProvider, PARSER);
            } else {
                return new NativeEbeanQuery(method, ebeanServer, queryString, evaluationContextProvider, PARSER);
            }
        } else { // ORM
            if (method.isModifyingQuery()) {
                return new OrmEbeanUpdate(method, ebeanServer, queryString, evaluationContextProvider, PARSER);
            } else {
                return new OrmEbeanQuery(method, ebeanServer, queryString, evaluationContextProvider, PARSER);
            }
        }
    }

}


text:
[![Build Status](https://travis-ci.org/emulead/emulead-shared.svg?branch=master)](https://travis-ci.org/emulead/emulead-shared)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Shared components used for emulead server software.


text:
package org.gearvrf.bulletphysics.collision.dispatch;

import javax.vecmath.Vector3f;

import org.gearvrf.bulletphysics.collision.broadphase.CollisionAlgorithm;
import org.gearvrf.bulletphysics.collision.broadphase.CollisionAlgorithmConstructionInfo;
import org.gearvrf.bulletphysics.collision.broadphase.Dispatcher;
import org.gearvrf.bulletphysics.collision.broadphase.DispatcherInfo;
import org.gearvrf.bulletphysics.collision.narrowphase.PersistentManifold;
import org.gearvrf.bulletphysics.collision.shapes.CollisionShape;
import org.gearvrf.bulletphysics.collision.shapes.TriangleCallback;
import org.gearvrf.bulletphysics.collision.shapes.TriangleShape;
import org.gearvrf.bulletphysics.linearmath.Transform;
import org.gearvrf.bulletphysics.stack.Stack;

/**
 * For each triangle in the concave mesh that overlaps with the AABB of a convex
 * (see {@link #convexBody} field), processTriangle is called.
 *
 * @author jezek2
 */
class ConvexTriangleCallback extends TriangleCallback {

	//protected final BulletStack stack = BulletStack.get();

	private CollisionObject convexBody;
	private CollisionObject triBody;

	private final Vector3f aabbMin = new Vector3f();
	private final Vector3f aabbMax = new Vector3f();

	private ManifoldResult resultOut;

	private Dispatcher dispatcher;
	private DispatcherInfo dispatchInfoPtr;
	private float collisionMarginTriangle;

	public int triangleCount;
	public PersistentManifold manifoldPtr;

	public ConvexTriangleCallback(Dispatcher dispatcher, CollisionObject body0, CollisionObject body1, boolean isSwapped) {
		this.dispatcher = dispatcher;
		this.dispatchInfoPtr = null;

		convexBody = isSwapped ? body1 : body0;
		triBody = isSwapped ? body0 : body1;

		//
		// create the manifold from the dispatcher 'manifold pool'
		//
		manifoldPtr = dispatcher.getNewManifold(convexBody, triBody);

		clearCache();
	}

	public void destroy() {
		clearCache();
		dispatcher.releaseManifold(manifoldPtr);
	}

	public void setTimeStepAndCounters(float collisionMarginTriangle, DispatcherInfo dispatchInfo, ManifoldResult resultOut) {
		this.dispatchInfoPtr = dispatchInfo;
		this.collisionMarginTriangle = collisionMarginTriangle;
		this.resultOut = resultOut;

		// recalc aabbs
		Transform convexInTriangleSpace = Stack.alloc(Transform.class);

		triBody.getWorldTransform(convexInTriangleSpace);
		convexInTriangleSpace.inverse();
		convexInTriangleSpace.mul(convexBody.getWorldTransform(Stack.alloc(Transform.class)));

		CollisionShape convexShape = (CollisionShape)convexBody.getCollisionShape();
		//CollisionShape* triangleShape = static_cast<btCollisionShape*>(triBody->m_collisionShape);
		convexShape.getAabb(convexInTriangleSpace, aabbMin, aabbMax);
		float extraMargin = collisionMarginTriangle;
		Vector3f extra = Stack.alloc(Vector3f.class);
		extra.set(extraMargin, extraMargin, extraMargin);

		aabbMax.add(extra);
		aabbMin.sub(extra);
	}

	private CollisionAlgorithmConstructionInfo ci = new CollisionAlgorithmConstructionInfo();
	private TriangleShape tm = new TriangleShape();

	public void processTriangle(Vector3f[] triangle, int partId, int triangleIndex) {
		// just for debugging purposes
		//printf("triangle %d",m_triangleCount++);

		// aabb filter is already applied!

		ci.dispatcher1 = dispatcher;

		CollisionObject ob = (CollisionObject) triBody;

		// debug drawing of the overlapping triangles
		if (dispatchInfoPtr != null && dispatchInfoPtr.debugDraw != null && dispatchInfoPtr.debugDraw.getDebugMode() > 0) {
			Vector3f color = Stack.alloc(Vector3f.class);
			color.set(255, 255, 0);
			Transform tr = ob.getWorldTransform(Stack.alloc(Transform.class));

			Vector3f tmp1 = Stack.alloc(Vector3f.class);
			Vector3f tmp2 = Stack.alloc(Vector3f.class);

			tmp1.set(triangle[0]); tr.transform(tmp1);
			tmp2.set(triangle[1]); tr.transform(tmp2);
			dispatchInfoPtr.debugDraw.drawLine(tmp1, tmp2, color);

			tmp1.set(triangle[1]); tr.transform(tmp1);
			tmp2.set(triangle[2]); tr.transform(tmp2);
			dispatchInfoPtr.debugDraw.drawLine(tmp1, tmp2, color);

			tmp1.set(triangle[2]); tr.transform(tmp1);
			tmp2.set(triangle[0]); tr.transform(tmp2);
			dispatchInfoPtr.debugDraw.drawLine(tmp1, tmp2, color);

			//btVector3 center = triangle[0] + triangle[1]+triangle[2];
			//center *= btScalar(0.333333);
			//m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(center),color);
			//m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(center),color);
			//m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(center),color);
		}

		//btCollisionObject* colObj = static_cast<btCollisionObject*>(m_convexProxy->m_clientObject);

		if (convexBody.getCollisionShape().isConvex()) {
			tm.init(triangle[0], triangle[1], triangle[2]);
			tm.setMargin(collisionMarginTriangle);

			CollisionShape tmpShape = ob.getCollisionShape();
			ob.internalSetTemporaryCollisionShape(tm);

			CollisionAlgorithm colAlgo = ci.dispatcher1.findAlgorithm(convexBody, triBody, manifoldPtr);
			// this should use the btDispatcher, so the actual registered algorithm is used
			//		btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody);

			resultOut.setShapeIdentifiers(-1, -1, partId, triangleIndex);
			//cvxcvxalgo.setShapeIdentifiers(-1,-1,partId,triangleIndex);
			//cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
			colAlgo.processCollision(convexBody, triBody, dispatchInfoPtr, resultOut);
			//colAlgo.destroy();
			ci.dispatcher1.freeCollisionAlgorithm(colAlgo);
			ob.internalSetTemporaryCollisionShape(tmpShape);
		}
	}

	public void clearCache() {
		dispatcher.clearManifold(manifoldPtr);
	}

	public Vector3f getAabbMin(Vector3f out) {
		out.set(aabbMin);
		return out;
	}

	public Vector3f getAabbMax(Vector3f out) {
		out.set(aabbMax);
		return out;
	}

}


text:
using System;

using System.Windows;
using System.Windows.Media;
using System.Windows.Controls;
using System.Windows.Input;
using System.Collections.ObjectModel;
using System.Collections.Generic;

using Xceed.Wpf.Toolkit;
using Xceed.Wpf.DataGrid;
using Wind.Containers;
using Wind.Types;

namespace Parrot.Controls
{
    public class pViewList : pControl
    {
        public ListView Element;
        public Point startPoint;

        public ObservableCollection<Label> ItemsList = new ObservableCollection<Label>();

        public pViewList(string InstanceName)
        {
            //Set Element info setup
            Element = new ListView();
            Element.Name = InstanceName;
            Type = "ListView";

            Style itemContainerStyle = new Style(typeof(ListViewItem));
            itemContainerStyle.Setters.Add(new Setter(ListViewItem.AllowDropProperty, true));
            itemContainerStyle.Setters.Add(new EventSetter(ListViewItem.PreviewMouseLeftButtonDownEvent, new MouseButtonEventHandler(s_PreviewMouseLeftButtonDown)));
            itemContainerStyle.Setters.Add(new EventSetter(ListViewItem.DropEvent, new DragEventHandler(listbox1_Drop)));
            Element.ItemContainerStyle = itemContainerStyle;

            Element.HorizontalContentAlignment = HorizontalAlignment.Stretch;

            //Set "Clear" appearance to all elements
        }

        public void SetProperties(List<string> D, List<wColor> C)
        {
            ItemsList.Clear();
            for (int i = 0; i < D.Count; i++)
            {
                Label TempText = new Label();
                TempText.Content = D[i];
                TempText.Background = new SolidColorBrush(C[i].ToMediaColor());
                TempText.HorizontalAlignment = HorizontalAlignment.Stretch;
                TempText.ToolTip = i;

                ItemsList.Add(TempText);
            }

            Element.ItemsSource = ItemsList;

        }

        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        public void s_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (sender is ListViewItem)
            {
                ListViewItem draggedItem = sender as ListViewItem;
                DragDrop.DoDragDrop(draggedItem, draggedItem.DataContext, DragDropEffects.Move);
                draggedItem.IsSelected = true;
            }
        }

        public void listbox1_Drop(object sender, DragEventArgs e)
        {
            Label droppedData = e.Data.GetData(typeof(Label)) as Label;
            Label target = ((ListViewItem)(sender)).DataContext as Label;

            int removedIdx = Element.Items.IndexOf(droppedData);
            int targetIdx = Element.Items.IndexOf(target);

            if (removedIdx < targetIdx)
            {
                ItemsList.Insert(targetIdx + 1, droppedData);
                ItemsList.RemoveAt(removedIdx);

                Element.SelectedIndex = targetIdx;
            }
            else
            {
                int remIdx = removedIdx + 1;
                if (ItemsList.Count + 1 > remIdx)
                {
                    ItemsList.Insert(targetIdx, droppedData);
                    ItemsList.RemoveAt(remIdx);
                }

                Element.SelectedIndex = targetIdx;
            }
        }

        public override void SetFill()
        {
            Element.Background = Graphics.WpfFill;
        }

        public override void SetStroke()
        {
            Element.BorderThickness = new Thickness(Graphics.StrokeWeight[0], Graphics.StrokeWeight[1], Graphics.StrokeWeight[2], Graphics.StrokeWeight[3]);
            Element.BorderBrush = new SolidColorBrush(Graphics.StrokeColor.ToMediaColor());
        }

        public override void SetSize()
        {
            if (Graphics.Width < 1) { Element.Width = double.NaN; } else { Element.Width = Graphics.Width; }
            if (Graphics.Height < 1) { Element.Height = double.NaN; } else { Element.Height = Graphics.Height; }
        }

        public override void SetMargin()
        {
            Element.Margin = new Thickness(Graphics.Margin[0], Graphics.Margin[1], Graphics.Margin[2], Graphics.Margin[3]);
        }

        public override void SetPadding()
        {
            Element.Padding = new Thickness(Graphics.Padding[0], Graphics.Padding[1], Graphics.Padding[2], Graphics.Padding[3]);
        }

        public override void SetFont()
        {
            Element.Foreground = new SolidColorBrush(Graphics.FontObject.FontColor.ToMediaColor());
            Element.FontFamily = Graphics.FontObject.ToMediaFont().Family;
            Element.FontSize = Graphics.FontObject.Size;
            Element.FontStyle = Graphics.FontObject.ToMediaFont().Italic;
            Element.FontWeight = Graphics.FontObject.ToMediaFont().Bold;
        }
    }
}


text:
.. _coverage_statistics:

===================
Coverage Statistics
===================

**TODO**
The output from the coverage testing using gcov is available TODO.

.. note::

   The coverage test sometimes (this behaviour has been observed on macOS using Clang) reports single lines containing only a closing curly brace as not covered.
   This is currently being treated as a false positive.
   This can be seen in the 'Missing' column of the test report where only single lines are reported.
   For the case discussed here, the reported line should only contain a single closing curly brace.
   In this situation, we will accept the missed coverage report.


text:
package com.opensymphony.workflow.loader;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.w3c.dom.Element;

/**
 * @author Andrea Capitani (a.capitani@leonardomultimedia.it)
 */
public class ConfigValidatorDescriptor extends ValidatorDescriptor implements ArgsAware
{
  protected String name;
  protected String plugin;
  protected String description;
	protected List modifiableArgs = new ArrayList();
	protected Map argTypeMap = new HashMap();
	private PaletteDescriptor palette;

	public ConfigValidatorDescriptor(PaletteDescriptor palette)
  {
		this.palette = palette;
  }

  public ConfigValidatorDescriptor(PaletteDescriptor palette, Element validator)
  {
	  this.palette = palette;
    init(validator);
  }

  public ConfigValidatorDescriptor(ConfigValidatorDescriptor other)
  {
    this.setPlugin(other.getPlugin());
    this.setName(other.getName());
    this.setType(other.getType());
    this.getArgs().putAll(other.getArgs());
	  description = other.description;
    modifiableArgs = other.modifiableArgs;
	  palette = other.palette;
  }

	public PaletteDescriptor getPalette()
	{
		return palette;
	}

	public void setPalette(PaletteDescriptor palette)
	{
		this.palette = palette;
	}

  protected void init(Element validator)
  {
    type = validator.getAttribute("type");

    List args = XMLUtil.getChildElements(validator, "arg");
    for(int l = 0; l < args.size(); l++)
    {
      Element arg = (Element)args.get(l);
      this.args.put(arg.getAttribute("name"), XMLUtil.getText(arg));
      if("true".equals(arg.getAttribute("modifiable")))
      {
        modifiableArgs.add(arg.getAttribute("name"));
				String sArgType = arg.getAttribute("argtype");
				if (sArgType!=null)
				{
					ArgType at = (ArgType)palette.getArgType(sArgType);
					if (at!=null)
					{
						argTypeMap.put(arg.getAttribute("name"), at);
					}
				}
      }
    }
    plugin = XMLUtil.getChildText(validator, "plugin");
    name = XMLUtil.getChildText(validator, "name");
  }

  public boolean isArgModifiable(String name)
  {
    return modifiableArgs.contains(name);
  }

	public ArgType getArgType(String name)
	{
		return (ArgType)argTypeMap.get(name);
	}

  public void writeXML(PrintWriter writer, int indent)
  {
    throw new UnsupportedOperationException();
  }

  public String getDescription()
  {
    return description;
  }

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

  public String getPlugin()
  {
    return plugin;
  }

  public void setDescription(String string)
  {
    description = string;
  }

  public void setPlugin(String string)
  {
    plugin = string;
  }

	public String toString()
	{
		return getName();
	}
}


text:
<!DOCTYPE html>

    <title>StravaErrorCode Enum Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>

StravaKit Docs (32% documented)

View on GitHub

Install in Dash

        StravaKit Reference

        StravaErrorCode Enum Reference

            Classes

                DefaultRequestor

                Strava

            Global Variables

                PageKey

                PerPageKey

                RateLimitLimitHeaderKey

                RateLimitLimitKey

                RateLimitUsageHeaderKey

                RateLimitUsageKey

                StravaAuthorizationCompletedNotification

                StravaBaseURL

                StravaErrorDomain

                StravaErrorKey

                StravaStatusFailureValue

                StravaStatusKey

                StravaStatusSuccessValue

            Enums

                HTTPMethod

                OAuthScope

                StravaErrorCode

            Functions

                decodeLevels(_:)

                decodePolyline(_:precision:)

                decodePolyline(_:precision:)

                encodeCoordinates(_:precision:)

                encodeLevels(_:)

                encodeLocations(_:precision:)

            Protocols

                Requestor

            Structs

                Activity

                Athlete

                Club

                Leaderboard

                LeaderboardEntry

                Map

                MapBounds

                Page

                Photo

                PhotoURL

                Polyline

                ResourceSummary

                Route

                Segment

                SegmentEffort

                SegmentStats

                Stats

                StatsDetail

                Zone

                ZoneCollection

                Zones

            Typealiases

                JSONArray

                JSONDictionary

                ParamsDictionary

StravaErrorCode

public enum StravaErrorCode: Int

Strava Error Codes

                    remoteError

Error on backend.

Declaration

Swift

case remoteError = 501

                    missingCredentials

Required credentials were missing.

Declaration

Swift

case missingCredentials = 502

                    noAccessToken

Access Token was not found.

Declaration

Swift

case noAccessToken = 503

                    noResponse

Response was not returned.

Declaration

Swift

case noResponse = 504

                    invalidResponse

Response was not expected.

Declaration

Swift

case invalidResponse = 505

                    recordNotFound

Requested resource was not found.

Declaration

Swift

case recordNotFound = 506

                    rateLimitExceeded

Request exceeded rate limit. See error for details.

Declaration

Swift

case rateLimitExceeded = 507

                    accessForbidden

Access is not allowed.

Declaration

Swift

case accessForbidden = 508

                    unsupportedRequest

Request is not supported.

Declaration

Swift

case unsupportedRequest = 509

                    undefinedError

Reason for error is not known.

Declaration

Swift

case undefinedError = 599

© 2017 StravaKit. All rights reserved. (Last updated: 2017-02-16)

Generated by jazzy ♪♫ v0.7.2, a Realm project.


text:
package dotgit

import (
	"bufio"
	"errors"
	"fmt"
	"io/ioutil"
	"os"
	"strings"

	"srcd.works/go-git.v4/plumbing"

	"srcd.works/go-billy.v1"
)

const (
	suffix         = ".git"
	packedRefsPath = "packed-refs"
	configPath     = "config"
	indexPath      = "index"
	shallowPath    = "shallow"

	objectsPath = "objects"
	packPath    = "pack"
	refsPath    = "refs"

	packExt = ".pack"
	idxExt  = ".idx"
)

var (
	// ErrNotFound is returned by New when the path is not found.
	ErrNotFound = errors.New("path not found")
	// ErrIdxNotFound is returned by Idxfile when the idx file is not found
	ErrIdxNotFound = errors.New("idx file not found")
	// ErrPackfileNotFound is returned by Packfile when the packfile is not found
	ErrPackfileNotFound = errors.New("packfile not found")
	// ErrConfigNotFound is returned by Config when the config is not found
	ErrConfigNotFound = errors.New("config file not found")
	// ErrPackedRefsDuplicatedRef is returned when a duplicated reference is
	// found in the packed-ref file. This is usually the case for corrupted git
	// repositories.
	ErrPackedRefsDuplicatedRef = errors.New("duplicated ref found in packed-ref file")
	// ErrPackedRefsBadFormat is returned when the packed-ref file corrupt.
	ErrPackedRefsBadFormat = errors.New("malformed packed-ref")
	// ErrSymRefTargetNotFound is returned when a symbolic reference is
	// targeting a non-existing object. This usually means the repository
	// is corrupt.
	ErrSymRefTargetNotFound = errors.New("symbolic reference target not found")
)

// The DotGit type represents a local git repository on disk. This
// type is not zero-value-safe, use the New function to initialize it.
type DotGit struct {
	fs billy.Filesystem
}

// New returns a DotGit value ready to be used. The path argument must
// be the absolute path of a git repository directory (e.g.
// "/foo/bar/.git").
func New(fs billy.Filesystem) *DotGit {
	return &DotGit{fs: fs}
}

// ConfigWriter returns a file pointer for write to the config file
func (d *DotGit) ConfigWriter() (billy.File, error) {
	return d.fs.Create(configPath)
}

// Config returns a file pointer for read to the config file
func (d *DotGit) Config() (billy.File, error) {
	return d.fs.Open(configPath)
}

// IndexWriter returns a file pointer for write to the index file
func (d *DotGit) IndexWriter() (billy.File, error) {
	return d.fs.Create(indexPath)
}

// Index returns a file pointer for read to the index file
func (d *DotGit) Index() (billy.File, error) {
	return d.fs.Open(indexPath)
}

// ShallowWriter returns a file pointer for write to the shallow file
func (d *DotGit) ShallowWriter() (billy.File, error) {
	return d.fs.Create(shallowPath)
}

// Shallow returns a file pointer for read to the shallow file
func (d *DotGit) Shallow() (billy.File, error) {
	f, err := d.fs.Open(shallowPath)
	if err != nil {
		if os.IsNotExist(err) {
			return nil, nil
		}

		return nil, err
	}

	return f, nil
}

// NewObjectPack return a writer for a new packfile, it saves the packfile to
// disk and also generates and save the index for the given packfile.
func (d *DotGit) NewObjectPack() (*PackWriter, error) {
	return newPackWrite(d.fs)
}

// ObjectPacks returns the list of availables packfiles
func (d *DotGit) ObjectPacks() ([]plumbing.Hash, error) {
	packDir := d.fs.Join(objectsPath, packPath)
	files, err := d.fs.ReadDir(packDir)
	if err != nil {
		if os.IsNotExist(err) {
			return nil, nil
		}

		return nil, err
	}

	var packs []plumbing.Hash
	for _, f := range files {
		if !strings.HasSuffix(f.Name(), packExt) {
			continue
		}

		n := f.Name()
		h := plumbing.NewHash(n[5 : len(n)-5]) //pack-(hash).pack
		packs = append(packs, h)

	}

	return packs, nil
}

// ObjectPack returns a fs.File of the given packfile
func (d *DotGit) ObjectPack(hash plumbing.Hash) (billy.File, error) {
	file := d.fs.Join(objectsPath, packPath, fmt.Sprintf("pack-%s.pack", hash.String()))

	pack, err := d.fs.Open(file)
	if err != nil {
		if os.IsNotExist(err) {
			return nil, ErrPackfileNotFound
		}

		return nil, err
	}

	return pack, nil
}

// ObjectPackIdx returns a fs.File of the index file for a given packfile
func (d *DotGit) ObjectPackIdx(hash plumbing.Hash) (billy.File, error) {
	file := d.fs.Join(objectsPath, packPath, fmt.Sprintf("pack-%s.idx", hash.String()))
	idx, err := d.fs.Open(file)
	if err != nil {
		if os.IsNotExist(err) {
			return nil, ErrPackfileNotFound
		}

		return nil, err
	}

	return idx, nil
}

// NewObject return a writer for a new object file.
func (d *DotGit) NewObject() (*ObjectWriter, error) {
	return newObjectWriter(d.fs)
}

// Objects returns a slice with the hashes of objects found under the
// .git/objects/ directory.
func (d *DotGit) Objects() ([]plumbing.Hash, error) {
	files, err := d.fs.ReadDir(objectsPath)
	if err != nil {
		if os.IsNotExist(err) {
			return nil, nil
		}

		return nil, err
	}

	var objects []plumbing.Hash
	for _, f := range files {
		if f.IsDir() && len(f.Name()) == 2 && isHex(f.Name()) {
			base := f.Name()
			d, err := d.fs.ReadDir(d.fs.Join(objectsPath, base))
			if err != nil {
				return nil, err
			}

			for _, o := range d {
				objects = append(objects, plumbing.NewHash(base+o.Name()))
			}
		}
	}

	return objects, nil
}

// Object return a fs.File poiting the object file, if exists
func (d *DotGit) Object(h plumbing.Hash) (billy.File, error) {
	hash := h.String()
	file := d.fs.Join(objectsPath, hash[0:2], hash[2:40])

	return d.fs.Open(file)
}

func (d *DotGit) SetRef(r *plumbing.Reference) error {
	var content string
	switch r.Type() {
	case plumbing.SymbolicReference:
		content = fmt.Sprintf("ref: %s\n", r.Target())
	case plumbing.HashReference:
		content = fmt.Sprintln(r.Hash().String())
	}

	f, err := d.fs.Create(r.Name().String())
	if err != nil {
		return err
	}

	if _, err := f.Write([]byte(content)); err != nil {
		return err
	}
	return f.Close()
}

// Refs scans the git directory collecting references, which it returns.
// Symbolic references are resolved and included in the output.
func (d *DotGit) Refs() ([]*plumbing.Reference, error) {
	var refs []*plumbing.Reference
	if err := d.addRefsFromPackedRefs(&refs); err != nil {
		return nil, err
	}

	if err := d.addRefsFromRefDir(&refs); err != nil {
		return nil, err
	}

	if err := d.addRefFromHEAD(&refs); err != nil {
		return nil, err
	}

	return refs, nil
}

// Ref returns the reference for a given reference name.
func (d *DotGit) Ref(name plumbing.ReferenceName) (*plumbing.Reference, error) {
	ref, err := d.readReferenceFile(".", name.String())
	if err == nil {
		return ref, nil
	}

	refs, err := d.Refs()
	if err != nil {
		return nil, err
	}

	for _, ref := range refs {
		if ref.Name() == name {
			return ref, nil
		}
	}

	return nil, plumbing.ErrReferenceNotFound
}

func (d *DotGit) addRefsFromPackedRefs(refs *[]*plumbing.Reference) (err error) {
	f, err := d.fs.Open(packedRefsPath)
	if err != nil {
		if os.IsNotExist(err) {
			return nil
		}
		return err
	}

	defer func() {
		if errClose := f.Close(); err == nil {
			err = errClose
		}
	}()

	s := bufio.NewScanner(f)
	for s.Scan() {
		ref, err := d.processLine(s.Text())
		if err != nil {
			return err
		}

		if ref != nil {
			*refs = append(*refs, ref)
		}
	}

	return s.Err()
}

// process lines from a packed-refs file
func (d *DotGit) processLine(line string) (*plumbing.Reference, error) {
	switch line[0] {
	case '#': // comment - ignore
		return nil, nil
	case '^': // annotated tag commit of the previous line - ignore
		return nil, nil
	default:
		ws := strings.Split(line, " ") // hash then ref
		if len(ws) != 2 {
			return nil, ErrPackedRefsBadFormat
		}

		return plumbing.NewReferenceFromStrings(ws[1], ws[0]), nil
	}
}

func (d *DotGit) addRefsFromRefDir(refs *[]*plumbing.Reference) error {
	return d.walkReferencesTree(refs, refsPath)
}

func (d *DotGit) walkReferencesTree(refs *[]*plumbing.Reference, relPath string) error {
	files, err := d.fs.ReadDir(relPath)
	if err != nil {
		if os.IsNotExist(err) {
			return nil
		}

		return err
	}

	for _, f := range files {
		newRelPath := d.fs.Join(relPath, f.Name())
		if f.IsDir() {
			if err = d.walkReferencesTree(refs, newRelPath); err != nil {
				return err
			}

			continue
		}

		ref, err := d.readReferenceFile(".", newRelPath)
		if err != nil {
			return err
		}

		if ref != nil {
			*refs = append(*refs, ref)
		}
	}

	return nil
}

func (d *DotGit) addRefFromHEAD(refs *[]*plumbing.Reference) error {
	ref, err := d.readReferenceFile(".", "HEAD")
	if err != nil {
		if os.IsNotExist(err) {
			return nil
		}

		return err
	}

	*refs = append(*refs, ref)
	return nil
}

func (d *DotGit) readReferenceFile(refsPath, refFile string) (ref *plumbing.Reference, err error) {
	path := d.fs.Join(refsPath, refFile)

	f, err := d.fs.Open(path)
	if err != nil {
		return nil, err
	}

	defer func() {
		if errClose := f.Close(); err == nil {
			err = errClose
		}
	}()

	b, err := ioutil.ReadAll(f)
	if err != nil {
		return nil, err
	}

	line := strings.TrimSpace(string(b))
	return plumbing.NewReferenceFromStrings(refFile, line), nil
}

func isHex(s string) bool {
	for _, b := range []byte(s) {
		if isNum(b) {
			continue
		}
		if isHexAlpha(b) {
			continue
		}

		return false
	}

	return true
}

func isNum(b byte) bool {
	return b >= '0' && b <= '9'
}

func isHexAlpha(b byte) bool {
	return b >= 'a' && b <= 'f' || b >= 'A' && b <= 'F'
}