text:
////////////////////////////////////////////////////////////////////////////
//
// Use Windows NT/2000 keyboard DLLs for mapping virtual keys to characters
//
////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "../../../../engine/keyman32/kbd.h"	/* DDK kbdlayout */

typedef struct {
    PVK_TO_BIT pVkToBit;     // Virtual Keys -> Mod bits
    DWORD     filler;
    WORD       wMaxModBits;  // max Modification bit combination value
    BYTE       ModNumber[1];  // Mod bits -> Modification Number
} MODIFIERS_x64, *PMODIFIERS_x64;

typedef struct _VK_TO_WCHAR_TABLE_x64 {
    PVK_TO_WCHARS1 pVkToWchars;
    DWORD filler;
    BYTE           nModifications;
    BYTE           cbSize;
    BYTE filler2[2];
    DWORD filler3;
} VK_TO_WCHAR_TABLE_x64, *PVK_TO_WCHAR_TABLE_x64;

/***************************************************************************\
* VSC_VK     - Associate a Virtual Scancode with a Virtual Key
*  Vsc - Virtual Scancode
*  Vk  - Virtual Key | flags
* Used by VKFromVSC() for scancodes prefixed 0xE0 or 0xE1
\***************************************************************************/
typedef struct _VSC_VK_x64 {
    BYTE Vsc;
    USHORT Vk;
} VSC_VK_x64, *PVSC_VK_x64;

/***************************************************************************\
* VK_VSC     - Associate a Virtual Key with a Virtual Scancode
*  Vk  - Virtual Key
*  Vsc - Virtual Scancode
* Used by MapVirtualKey for Virtual Keys not appearing in ausVK[]
\***************************************************************************/
typedef struct _VK_VSC_x64 {
    BYTE Vk;
    BYTE Vsc;
} VK_VSC_x64, *PVK_VSC_x64;

typedef struct tagKdbLayer_x64
{
    /*
     * Modifier keys
     */
    PMODIFIERS_x64 pCharModifiers;
    DWORD filler1;

    /*
     * Characters
     */
    VK_TO_WCHAR_TABLE_x64 *pVkToWcharTable;  // ptr to tbl of ptrs to tbl
    DWORD filler2;

    /*
     * Diacritics
     */
    PDEADKEY pDeadKey;
    DWORD filler3;

    /*
     * Names of Keys
     */
    VSC_LPWSTR *pKeyNames;
    DWORD filler4;
    VSC_LPWSTR *pKeyNamesExt;
    DWORD filler5;
    LPWSTR     *pKeyNamesDead;
    DWORD filler6;

    /*
     * Scan codes to Virtual Keys
     */
    USHORT *pusVSCtoVK;
    DWORD filler7;
    BYTE    bMaxVSCtoVK;
    DWORD filler8;
    PVSC_VK_x64 pVSCtoVK_E0;  // Scancode has E0 prefix
    DWORD filler9;
    PVSC_VK_x64 pVSCtoVK_E1;  // Scancode has E1 prefix
    DWORD fillerA;

    /*
     * Locale-specific special processing
     */
    DWORD fLocaleFlags;
    DWORD fillerB;
} KBDTABLES_x64, *PKBDTABLES_x64;

typedef PKBDTABLES_x64 (WINAPI *PKBDLAYERDESCRIPTORFUNC)(VOID);

static HMODULE hKbdLibrary_x64 = NULL;
static PKBDTABLES_x64 KbdTables_x64 = NULL;

BOOL LoadNewLibrary_NT_x64(PWSTR filename) {
  if(hKbdLibrary_x64) FreeLibrary(hKbdLibrary_x64);

	hKbdLibrary_x64 = LoadLibrary(filename);
	if(!hKbdLibrary_x64) {
	  LogError(L"LoadNewLibrary_x64: Exit -- could not load library");
		return FALSE;
	}

  PKBDLAYERDESCRIPTORFUNC KbdLayerDescriptorFunc = (PKBDLAYERDESCRIPTORFUNC) GetProcAddress(hKbdLibrary_x64, "KbdLayerDescriptor");
	if(KbdLayerDescriptorFunc)
	{
		KbdTables_x64 = (*KbdLayerDescriptorFunc)();
		if(KbdTables_x64) {
			return TRUE;
    }
	}

	FreeLibrary(hKbdLibrary_x64);

	hKbdLibrary_x64 = NULL;
	KbdTables_x64 = NULL;

  LogError(L"LoadNewLibrary_x64: Exit -- failed to find function");
	return FALSE;
}

WCHAR CharFromVK_NT_x64(WORD VKey, UINT ShiftFlags, WCHAR *PDeadKey) {
	PVK_TO_WCHARS1 pv;
	PVK_TO_WCHAR_TABLE_x64 pvt;
	int i;

	/* MCD 02/12/2002: Fix bug with number pad keys when numlock is on */

  if(IsNumberPadKey(VKey)) {
    return 0;
  }

	/* Get the appropriate table column for shift state */

	int shift = -1, shiftidx = 0, capslockbit = 0;

	for(PVK_TO_BIT pvtb = KbdTables_x64->pCharModifiers->pVkToBit; pvtb->Vk; pvtb++) {
		switch(pvtb->Vk) {
		case VK_MENU:
			if(ShiftFlags & (LALTFLAG|RALTFLAG)) shiftidx |= pvtb->ModBits; break;
		case VK_SHIFT:
			if(ShiftFlags & CAPITALFLAG) capslockbit = pvtb->ModBits;
			if(ShiftFlags & (K_SHIFTFLAG)) shiftidx |= pvtb->ModBits; break;
		case VK_CONTROL:
			if(ShiftFlags & (LCTRLFLAG|RCTRLFLAG)) shiftidx |= pvtb->ModBits; break;
		}
  }

	/* If the shift modifier is unused, don't produce a character */

	if(shiftidx > KbdTables_x64->pCharModifiers->wMaxModBits ||
			KbdTables_x64->pCharModifiers->ModNumber[shiftidx] == 0xF) {
		return 0;
	}

	shift = KbdTables_x64->pCharModifiers->ModNumber[shiftidx];

	/* Get the appropriate virtual key */

	for(i = 0, pvt = KbdTables_x64->pVkToWcharTable; pvt->pVkToWchars; i++, pvt++) {
		for(pv = pvt->pVkToWchars; pv->VirtualKey;) {
			if(pv->VirtualKey == VKey) {
				if(shift >= pvt->nModifications) {
					return 0;
        }

				/* Check for Caps Lock */
				if(ShiftFlags & CAPITALFLAG) {
					if(pv->Attributes & CAPLOK) {
						/* Invert the state of the SHIFT key */
						shift = KbdTables_x64->pCharModifiers->ModNumber[shiftidx ^ capslockbit];
          } else if(pv->Attributes & SGCAPS) {
						pv++; /* Next keystroke has the appropriate capitalised character */
          }
				}

				/* Found the keystroke combination, return the appropriate character (if existing) */
				switch(pv->wch[shift]) {
				case WCH_DEAD:
					pv = (PVK_TO_WCHARS1) ((BYTE *)pv + pvt->cbSize);
          *PDeadKey = pv->wch[shift];
					return 0xFFFF; /* Don't queue as WM_KEYDOWN -- don't output either */
				case WCH_NONE:
					return 0x0000; /* Not a valid key, queue as WM_KEYDOWN */
				}

				return (pv->wch[shift] > 31 && pv->wch[shift] != 127) ? pv->wch[shift] : 0; /* Don't generate 'special chars'; I911 - fix ctrl+bksp */
			}
			pv = (PVK_TO_WCHARS1) ((BYTE *)pv + pvt->cbSize);
		}
	}

	return 0;
}

WORD ModificationToShift_NT_x64(int mod) {
  WORD ShiftFlags = 0;

  int shiftidx = -1;
  for(int i = 0; i <= KbdTables_x64->pCharModifiers->wMaxModBits; i++) {
    if(KbdTables_x64->pCharModifiers->ModNumber[i] == mod) {
      shiftidx = i;
      break;
    }
  }

  if(shiftidx == -1) return 0xFFFF;

	for(PVK_TO_BIT pvtb = KbdTables_x64->pCharModifiers->pVkToBit; pvtb->Vk; pvtb++) {
    if(shiftidx & pvtb->ModBits) {
      switch(pvtb->Vk) {
        case VK_MENU: ShiftFlags |= RALTFLAG; break;
        case VK_SHIFT: ShiftFlags |= K_SHIFTFLAG; break;
        case VK_CONTROL: ShiftFlags |= LCTRLFLAG; break;
      }
    }
  }

  return ShiftFlags;
}

WORD CharToUSVK_NT_x64(WORD ch, WORD *shift)
{
	PVK_TO_WCHARS1 pv;
	PVK_TO_WCHAR_TABLE_x64 pvt;
	int i, j;

	/* Find the appropriate keyboard tables */

	if(!KbdTables_x64) return 0;				/* Could not load keyboard DLL */

	/* Map the character back to the virtual key */

	for(i = 0, pvt = KbdTables_x64->pVkToWcharTable; pvt->pVkToWchars; i++, pvt++)
		for(pv = pvt->pVkToWchars; pv->VirtualKey;)
		{
			for(j = 0; j < pvt->nModifications; j++)
				if(pv->wch[j] == ch)
				{
					/* Return the new virtual key */
          *shift = ModificationToShift_NT_x64(j);
          if(*shift == 0xFFFF) return 0;
          return pv->VirtualKey;
				}
			pv = (PVK_TO_WCHARS1) ((BYTE *)pv + pvt->cbSize);
		}

	/* Remapping not found */
	return 0;
}

int GetDeadkeys_NT_x64(WORD DeadKey, WORD *OutputPairs) {
  WORD *p = OutputPairs, shift;
	for(int i = 0; KbdTables_x64->pDeadKey[i].dwBoth; i++) {
		if(HIWORD(KbdTables_x64->pDeadKey[i].dwBoth) == DeadKey) {
			WORD vk = CharToUSVK_NT_x64(LOWORD(KbdTables_x64->pDeadKey[i].dwBoth), &shift);
      if(vk != 0) {
        *p++ = vk;
        *p++ = shift;
        *p++ = KbdTables_x64->pDeadKey[i].wchComposed;
      } else {
        LogError(L"Warning: complex deadkey not supported.");
      }
		}
	}
  *p = 0;
  return (INT_PTR)(p-OutputPairs);
}

WORD VKUSToVKUnderlyingLayout_NT_x64(WORD VKey) {

	/* Num lock test -- MCD: 02/12/2002 Fix num lock not working bug */

	if((VKey >= VK_NUMPAD0 && VKey <= VK_NUMPAD9) || VKey == VK_DECIMAL) return VKey;

	/* Find the appropriate keyboard tables */

	if(!KbdTables_x64)				/* Could not load keyboard DLL */
		return VKey;

  if(VKey > 255) return VKey;

	UINT scan = USVirtualKeyToScanCode[VKey];
	if(scan == 0 || scan >= KbdTables_x64->bMaxVSCtoVK) return VKey;
	return KbdTables_x64->pusVSCtoVK[scan];
}

WORD VKUnderlyingLayoutToVKUS_NT_x64(WORD VKey) {

	/* Num lock test -- MCD: 02/12/2002 Fix num lock not working bug */

	if((VKey >= VK_NUMPAD0 && VKey <= VK_NUMPAD9) || VKey == VK_DECIMAL) return VKey;

	/* Find the appropriate keyboard tables */

	if(!KbdTables_x64)				/* Could not load keyboard DLL */
		return VKey;

  UINT scan;
  for(scan = 1; scan <= KbdTables_x64->bMaxVSCtoVK; scan++) {
    if(KbdTables_x64->pusVSCtoVK[scan] == VKey) {
      break;
    }
  }
  if(scan > KbdTables_x64->bMaxVSCtoVK || scan > 127) {
    // no translation.
    return VKey;
  }

  return ScanCodeToUSVirtualKey[scan];
}

typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);

LPFN_ISWOW64PROCESS
fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle(L"kernel32"),"IsWow64Process");
BOOL fStored = FALSE;
BOOL bIsWow64 = FALSE;

BOOL IsWow64() {
  if(fStored) return bIsWow64;
  bIsWow64 = FALSE;

  if(NULL != fnIsWow64Process) {
    if(!fnIsWow64Process(GetCurrentProcess(),&bIsWow64)){
      // handle error
      return FALSE;
    }
  }
  fStored = TRUE;
  return bIsWow64;
}

redpajama_set_name: RedPajamaGithub


text:
package org.javacc.jjtree;

import java.io.IOException;

public class ASTJavacodeBody extends JJTreeNode {
  ASTJavacodeBody(int id) {
    super(id);
  }

  NodeScope nodeScope;

  @Override
  public void print(IO io) {
    if (nodeScope.isVoid()) {
      super.print(io);
      return;
    }

    Token first = getFirstToken();

    String indent = "";
    for (int i = 4; i < first.getColumn(); ++i) {
      indent += " ";
    }

    JJTreeNode.openJJTreeComment(io, nodeScope.getNodeDescriptorText());
    io.println();
    try {
      nodeScope.insertOpenNodeCode(io, indent);
    }
    catch (IOException ex) {
      throw new IllegalStateException(ex);
    }
    nodeScope.tryTokenSequence(io, indent, first, getLastToken());
  }
}


text:
package com.amazonaws.services.ecs.model;

import javax.annotation.Generated;

/**
 *
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public enum TaskDefinitionFamilyStatus {

    ACTIVE("ACTIVE"),
    INACTIVE("INACTIVE"),
    ALL("ALL");

    private String value;

    private TaskDefinitionFamilyStatus(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * Use this in place of valueOf.
     *
     * @param value
     *        real value
     * @return TaskDefinitionFamilyStatus corresponding to the value
     */
    public static TaskDefinitionFamilyStatus fromValue(String value) {
        if (value == null || "".equals(value)) {
            throw new IllegalArgumentException("Value cannot be null or empty!");
        }

        for (TaskDefinitionFamilyStatus enumEntry : TaskDefinitionFamilyStatus.values()) {
            if (enumEntry.toString().equals(value)) {
                return enumEntry;
            }
        }

        throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
    }
}


text:
from cinder.api import extensions
from cinder.api.openstack import wsgi
import cinder.api.views.availability_zones
from cinder.api import xmlutil
import cinder.exception
import cinder.volume.api

def make_availability_zone(elem):
    elem.set('name', 'zoneName')
    zoneStateElem = xmlutil.SubTemplateElement(elem, 'zoneState',
                                               selector='zoneState')
    zoneStateElem.set('available')

class ListTemplate(xmlutil.TemplateBuilder):
    def construct(self):
        root = xmlutil.TemplateElement('availabilityZones')
        elem = xmlutil.SubTemplateElement(root, 'availabilityZone',
                                          selector='availabilityZoneInfo')
        make_availability_zone(elem)
        alias = Availability_zones.alias
        namespace = Availability_zones.namespace
        return xmlutil.MasterTemplate(root, 1, nsmap={alias: namespace})

class Controller(wsgi.Controller):

    _view_builder_class = cinder.api.views.availability_zones.ViewBuilder

    def __init__(self, *args, **kwargs):
        super(Controller, self).__init__(*args, **kwargs)
        self.volume_api = cinder.volume.api.API()

    @wsgi.serializers(xml=ListTemplate)
    def index(self, req):
        """Describe all known availability zones."""
        azs = self.volume_api.list_availability_zones()
        return self._view_builder.list(req, azs)

class Availability_zones(extensions.ExtensionDescriptor):
    """Describe Availability Zones"""

    name = 'AvailabilityZones'
    alias = 'os-availability-zone'
    namespace = ('http://docs.openstack.org/volume/ext/'
                 'os-availability-zone/api/v1')
    updated = '2013-06-27T00:00:00+00:00'

    def get_resources(self):
        controller = Controller()
        res = extensions.ResourceExtension(Availability_zones.alias,
                                           controller)
        return [res]


text:
class PhoneValidator < RegexValidator
  def validate_each(record, attribute, value)
    default_message = "#{value} #{I18n.t('errors.messages.invalid_phone')}"

    regex = /\A(\((\d{3})\)|\d{3})[ |\.\-]?(\d{3})[ |\.\-]?(\d{4})\z/

    regex_validate_each(regex, default_message, record, attribute, value)
  end
end


text:
using System;
namespace DevExpress.Mvvm.Native {
    [AttributeUsage(AttributeTargets.All, Inherited = true)]
    public sealed class TypeConverterAttribute : Attribute {
        public TypeConverterAttribute() { }
        public TypeConverterAttribute(Type type) { }
        public string ConverterTypeName { get; private set; }
    }
}


text:
<?php

require_once("direccionamiento.php");
if ((!isset($_SESSION["usuario_valido"]))||(($_SESSION["permiso"]!="Administrador") && ($_SESSION["permiso"]!="Usuario")))
{
    header("Location: login.php");
}
$usuario=$_SESSION["usuario_valido"];
$empresa=$_SESSION["cveEmpresa"];
$sucursal=$_SESSION["cveSucursal"];

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="estilos/ewebfac1.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" type="text/css" href="css/mtoForm.css" media="all"/>
    <link rel="stylesheet" href="estilos/calendar.css" type="text/css"/>

    <link href="themes/default.css" rel="stylesheet" type="text/css"/>

    <link href="themes/mac_os_x.css" rel="stylesheet" type="text/css"/>
    <title>EWebFac - Reporte de Ventas</title>

	<?php include_once ($menu); ?>

Reportes |  Ventas por Cliente

Ventas por Cliente

        <form id="form2">
        	 <input type="hidden" id="txthAccion" name="txthAccion" value="0" />

                Por favor espere...
                Cargando...

                <fieldset>
                    <legend>Datos Generales</legend>

                            Fecha Inicial

                                <input name="txtFechaI" type="text" id="txtFechaI" class="calendar" size="10" />

                                Fecha Final

                                    <input name="txtFechaF" type="text" id="txtFechaF" class="calendar" size="10" />

                                <input type="button" id="btnEnviar" value="Generar Reporte" onclick="imprimir()"/>

                </fieldset>

        </form>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>VideoSources</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.myrobotlab.opencv

Class VideoSources

java.lang.Object

org.myrobotlab.opencv.VideoSources

public class VideoSources
extends java.lang.Object

Author:

GroG

         The single source for all OpenCV Data in a key'ed structure OpenCV
         Images. The Images should be retrieved through one of the OpenCV
         methods, and not directly from the sources. This will allow a copy of
         references and the blocking data to effectively copy a set of
         references to the desired data.

         TODO create interface offer a switch - straight reference versus
         LinkedBlockingQueue

Constructor Summary

Constructors

Constructor and Description

VideoSources()

Method Summary

Methods

Modifier and Type
Method and Description

com.googlecode.javacv.cpp.opencv_core.IplImage
get(java.lang.String key)

com.googlecode.javacv.cpp.opencv_core.IplImage
get(java.lang.String serviceName,
   java.lang.String filtername)

java.util.HashMap<java.lang.String,java.lang.Object>
getData()

java.util.Set<java.lang.String>
getKeySet()

void
put(java.lang.String inputKey,
   com.googlecode.javacv.cpp.opencv_core.IplImage frame)

void
put(java.lang.String serviceName,
   java.lang.String filtername,
   com.googlecode.javacv.cpp.opencv_core.IplImage img)

void
put(java.lang.String serviceName,
   java.lang.String filtername,
   java.lang.String subkey,
   com.googlecode.javacv.cpp.opencv_core.IplImage img)

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

VideoSources

public VideoSources()

Method Detail

put

public void put(java.lang.String serviceName,
       java.lang.String filtername,
       java.lang.String subkey,
       com.googlecode.javacv.cpp.opencv_core.IplImage img)

put

public void put(java.lang.String serviceName,
       java.lang.String filtername,
       com.googlecode.javacv.cpp.opencv_core.IplImage img)

put

public void put(java.lang.String inputKey,
       com.googlecode.javacv.cpp.opencv_core.IplImage frame)

get

public com.googlecode.javacv.cpp.opencv_core.IplImage get(java.lang.String serviceName,
                                                 java.lang.String filtername)

get

public com.googlecode.javacv.cpp.opencv_core.IplImage get(java.lang.String key)

getKeySet

public java.util.Set<java.lang.String> getKeySet()

getData

public java.util.HashMap<java.lang.String,java.lang.Object> getData()

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
import uuid
import hashlib
import Image
import StringIO
import time
import json
import re
import urllib2
import tornado.web
import lib.jsonp
import pprint

from base import *
from lib.variables import *
from form.topic import *
from lib.variables import gen_random
from lib.xss import XssCleaner
from lib.utils import find_mentions

class ListHandler(BaseHandler):
    @tornado.web.authenticated
    def get(self, template_variables = {}):
        user_info = self.current_user
        page = int(self.get_argument("p", "1"))
        template_variables["user_info"] = user_info
        template_variables["user_info"]["counter"] = {
            "topics": self.topic_model.get_user_all_topics_count(user_info["uid"]),
            "replies": self.reply_model.get_user_all_replies_count(user_info["uid"]),
            "favorites": self.favorite_model.get_user_favorite_count(user_info["uid"]),
        }

        template_variables["notifications_count"] = self.notification_model.get_user_unread_notification_count(user_info["uid"]);
        template_variables["notifications"] = self.notification_model.get_user_all_notifications(user_info["uid"], current_page = page)
        template_variables["active_page"] = "topic"
        template_variables["gen_random"] = gen_random

        # mark user unread notifications as read
        self.notification_model.mark_user_unread_notification_as_read(user_info["uid"])

        self.render("notification/notifications.html", **template_variables)


text:
<!DOCTYPE html>

		<title>FCC Voting App</title>

		<link href="/public/css/main.css" rel="stylesheet" type="text/css">

Welcome, !

		Home

|

		Profile

|

		Logout

Poll Modify

Poll Names:

<select id="poll-name">
		</select>

		<form>

		</form>

<button type="button" id="save-poll">Save Poll</button>
		<button type="button" id="rem-poll">Remove Poll</button>
		<button type="button" id="share-poll">Share Poll</button>


text:
#ifndef CLK_GENCLK_H_INCLUDED
#define CLK_GENCLK_H_INCLUDED

#include "parts.h"

#if SAM3S
# include "sam3s/genclk.h"
#elif SAM3U
# include "sam3u/genclk.h"
#elif SAM3N
# include "sam3n/genclk.h"
#elif SAM3XA
# include "sam3x/genclk.h"
#elif SAM4S
# include "sam4s/genclk.h"
#elif (UC3A0 || UC3A1)
# include "uc3a0_a1/genclk.h"
#elif UC3A3
# include "uc3a3_a4/genclk.h"
#elif UC3B
# include "uc3b0_b1/genclk.h"
#elif UC3C
# include "uc3c/genclk.h"
#elif UC3D
# include "uc3d/genclk.h"
#elif UC3L
# include "uc3l/genclk.h"
#else
# error Unsupported chip type
#endif

/**
 * \ingroup clk_group
 * \defgroup genclk_group Generic Clock Management
 *
 * Generic clocks are configurable clocks which run outside the system
 * clock domain. They are often connected to peripherals which have an
 * asynchronous component running independently of the bus clock, e.g.
 * USB controllers, low-power timers and RTCs, etc.
 *
 * Note that not all platforms have support for generic clocks; on such
 * platforms, this API will not be available.
 *
 * @{
 */

/**
 * \def GENCLK_DIV_MAX
 * \brief Maximum divider supported by the generic clock implementation
 */
/**
 * \enum genclk_source
 * \brief Generic clock source ID
 *
 * Each generic clock may be generated from a different clock source.
 * These are the available alternatives provided by the chip.
 */

//! \name Generic clock configuration
//@{
/**
 * \struct genclk_config
 * \brief Hardware representation of a set of generic clock parameters
 */
/**
 * \fn void genclk_config_defaults(struct genclk_config *cfg,
 *              unsigned int id)
 * \brief Initialize \a cfg to the default configuration for the clock
 * identified by \a id.
 */
/**
 * \fn void genclk_config_read(struct genclk_config *cfg, unsigned int id)
 * \brief Read the currently active configuration of the clock
 * identified by \a id into \a cfg.
 */
/**
 * \fn void genclk_config_write(const struct genclk_config *cfg,
 *              unsigned int id)
 * \brief Activate the configuration \a cfg on the clock identified by
 * \a id.
 */
/**
 * \fn void genclk_config_set_source(struct genclk_config *cfg,
 *              enum genclk_source src)
 * \brief Select a new source clock \a src in configuration \a cfg.
 */
/**
 * \fn void genclk_config_set_divider(struct genclk_config *cfg,
 *              unsigned int divider)
 * \brief Set a new \a divider in configuration \a cfg.
 */
/**
 * \fn void genclk_enable_source(enum genclk_source src)
 * \brief Enable the source clock \a src used by a generic clock.
 */
 //@}

//! \name Enabling and disabling Generic Clocks
//@{
/**
 * \fn void genclk_enable(const struct genclk_config *cfg, unsigned int id)
 * \brief Activate the configuration \a cfg on the clock identified by
 * \a id and enable it.
 */
/**
 * \fn void genclk_disable(unsigned int id)
 * \brief Disable the generic clock identified by \a id.
 */
//@}

/**
 * \brief Enable the configuration defined by \a src and \a divider
 * for the generic clock identified by \a id.
 *
 * \param id      The ID of the generic clock.
 * \param src     The source clock of the generic clock.
 * \param divider The divider used to generate the generic clock.
 */
static inline void genclk_enable_config(unsigned int id, enum genclk_source src, unsigned int divider)
{
	struct genclk_config gcfg;

	genclk_config_defaults(&gcfg, id);
	genclk_enable_source(src);
	genclk_config_set_source(&gcfg, src);
	genclk_config_set_divider(&gcfg, divider);
	genclk_enable(&gcfg, id);
}

//! @}

#endif /* CLK_GENCLK_H_INCLUDED */


text:
class AddIndexToFeedbackSubmissions < ActiveRecord::Migration
  def up
    add_index :c_rater_feedback_submissions, [:interactive_page_id, :run_id, :created_at], name: 'c_rater_fed_submission_page_run_created_idx'
    remove_index :c_rater_feedback_submissions, name: 'c_rater_fed_submission_page_run_idx'
  end

  def down
    add_index :c_rater_feedback_submissions, [:interactive_page_id, :run_id], name: 'c_rater_fed_submission_page_run_idx'
    remove_index :c_rater_feedback_submissions, name: 'c_rater_fed_submission_page_run_created_idx'
  end
end


text:
class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable, :omniauthable,
         :recoverable, :rememberable, :trackable, :validatable

  def self.process_omniauth auth
  	# byebug

  	where(provider: auth["provider"], uid: auth["uid"]).first_or_create do |user|
  		user.provider = auth.provider
  		user.uid = auth.uid
  		user.username = auth.info.nickname
  		user.email = "test@gmail.com"
  	end
  end

  def password_required?
  	super && provider.blank?
  end

  def self.new_with_session(params, session)
  	if session["devise.user_attributes"]
  		new(session["devise.user_attributes"], without_protection: true) do |user|
  			user.attributes = params
  			user.valid?
  		end
  	else
  		super
	end
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>

<configuration>

	<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
		<encoder>
			<pattern>%d{dd.MM.yy HH:mm:ss.SSS} [%thread] %-5level %logger{5} - %msg%n</pattern>
		</encoder>
		<file>logs/infrastructure.log</file>
		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
			<fileNamePattern>logs/infrastructure.%i.log.zip</fileNamePattern>
			<minIndex>1</minIndex>
			<maxIndex>3</maxIndex>
		</rollingPolicy>

		<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
			<maxFileSize>5MB</maxFileSize>
		</triggeringPolicy>
	</appender>

	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<encoder>
			<pattern>%d{dd.MM.yy HH:mm:ss.SSS} [%thread] %-5level %logger{5} - %msg%n</pattern>
		</encoder>
	</appender>

	<logger name="template-infrastructure" level="DEBUG"/>

	<root level="INFO">
		<appender-ref ref="STDOUT"/>
		<appender-ref ref="FILE"/>
	</root>

</configuration>


text:
using Entitas;
public sealed class UISystem : IInitializeSystem
{
    public void Initialize()
    {
        Singleton<UIManager>.Create();
        Singleton<ContextManager>.Create();

        var contextSingle = Singleton<ContextManager>.Instance;
        contextSingle.Push(new GameStartContext());
    }
}


text:
namespace MassTransit.SagaStateMachine
{
    using System;
    using System.Threading.Tasks;

    public class ConditionExceptionActivity<TSaga, TConditionException> :
        IStateMachineActivity<TSaga>
        where TSaga : class, ISaga
        where TConditionException : Exception
    {
        readonly StateMachineAsyncExceptionCondition<TSaga, TConditionException> _condition;
        readonly IBehavior<TSaga> _elseBehavior;
        readonly IBehavior<TSaga> _thenBehavior;

        public ConditionExceptionActivity(StateMachineAsyncExceptionCondition<TSaga, TConditionException> condition, IBehavior<TSaga> thenBehavior,
            IBehavior<TSaga> elseBehavior)
        {
            _condition = condition;
            _thenBehavior = thenBehavior;
            _elseBehavior = elseBehavior;
        }

        void IProbeSite.Probe(ProbeContext context)
        {
            var scope = context.CreateScope("condition");

            _thenBehavior.Probe(scope);
            _elseBehavior.Probe(scope);
        }

        public void Accept(StateMachineVisitor visitor)
        {
            visitor.Visit(this, x => _thenBehavior.Accept(visitor));
            visitor.Visit(this, x => _elseBehavior.Accept(visitor));
        }

        public Task Execute(BehaviorContext<TSaga> context, IBehavior<TSaga> next)
        {
            return next.Execute(context);
        }

        public Task Execute<T>(BehaviorContext<TSaga, T> context, IBehavior<TSaga, T> next)
            where T : class
        {
            return next.Execute(context);
        }

        public async Task Faulted<TException>(BehaviorExceptionContext<TSaga, TException> context, IBehavior<TSaga> next)
            where TException : Exception
        {
            var behaviorContext = context as BehaviorExceptionContext<TSaga, TConditionException>;
            if (behaviorContext != null)
            {
                if (await _condition(behaviorContext).ConfigureAwait(false))
                    await _thenBehavior.Faulted(context).ConfigureAwait(false);
                else
                    await _elseBehavior.Faulted(context).ConfigureAwait(false);
            }

            await next.Faulted(context).ConfigureAwait(false);
        }

        public async Task Faulted<T, TException>(BehaviorExceptionContext<TSaga, T, TException> context, IBehavior<TSaga, T> next)
            where T : class
            where TException : Exception
        {
            var behaviorContext = context as BehaviorExceptionContext<TSaga, T, TConditionException>;
            if (behaviorContext != null)
            {
                if (await _condition(behaviorContext).ConfigureAwait(false))
                    await _thenBehavior.Faulted(context).ConfigureAwait(false);
                else
                    await _elseBehavior.Faulted(context).ConfigureAwait(false);
            }

            await next.Faulted(context).ConfigureAwait(false);
        }
    }

    public class ConditionExceptionActivity<TSaga, TMessage, TConditionException> :
        IStateMachineActivity<TSaga>
        where TSaga : class, ISaga
        where TMessage : class
        where TConditionException : Exception
    {
        readonly StateMachineAsyncExceptionCondition<TSaga, TMessage, TConditionException> _condition;
        readonly IBehavior<TSaga> _elseBehavior;
        readonly IBehavior<TSaga> _thenBehavior;

        public ConditionExceptionActivity(StateMachineAsyncExceptionCondition<TSaga, TMessage, TConditionException> condition,
            IBehavior<TSaga> thenBehavior, IBehavior<TSaga> elseBehavior)
        {
            _condition = condition;
            _thenBehavior = thenBehavior;
            _elseBehavior = elseBehavior;
        }

        void IProbeSite.Probe(ProbeContext context)
        {
            var scope = context.CreateScope("condition");

            _thenBehavior.Probe(scope);
            _elseBehavior.Probe(scope);
        }

        public void Accept(StateMachineVisitor visitor)
        {
            visitor.Visit(this, x => _thenBehavior.Accept(visitor));
            visitor.Visit(this, x => _elseBehavior.Accept(visitor));
        }

        public Task Execute(BehaviorContext<TSaga> context, IBehavior<TSaga> next)
        {
            throw new SagaStateMachineException("This activity requires a body with the event, but no body was specified.");
        }

        public Task Execute<T>(BehaviorContext<TSaga, T> context, IBehavior<TSaga, T> next)
            where T : class
        {
            return next.Execute(context);
        }

        public Task Faulted<TException>(BehaviorExceptionContext<TSaga, TException> context, IBehavior<TSaga> next)
            where TException : Exception
        {
            throw new SagaStateMachineException("This activity requires a body with the event, but no body was specified.");
        }

        public async Task Faulted<T, TException>(BehaviorExceptionContext<TSaga, T, TException> context, IBehavior<TSaga, T> next)
            where T : class
            where TException : Exception
        {
            var behaviorContext = context as BehaviorExceptionContext<TSaga, TMessage, TConditionException>;
            if (behaviorContext != null)
            {
                if (await _condition(behaviorContext).ConfigureAwait(false))
                    await _thenBehavior.Faulted(context).ConfigureAwait(false);
                else
                    await _elseBehavior.Faulted(context).ConfigureAwait(false);
            }

            await next.Faulted(context).ConfigureAwait(false);
        }
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syll. fung. (Abellini) 8: 737 (1889)

#### Original name
Rhytisma pterygotae Berk. & Broome

### Remarks
null


text:
import amulet
import re
import unittest

class TestDeploy(unittest.TestCase):
    """
    Deployment and smoke test for the Apache Bigtop Pig service.
    """
    @classmethod
    def setUpClass(cls):
        cls.d = amulet.Deployment(series='xenial')
        cls.d.add('pig')

        cls.d.setup(timeout=1800)
        cls.d.sentry.wait_for_messages({'pig': re.compile('ready')}, timeout=1800)
        cls.pig = cls.d.sentry['pig'][0]

    def test_pig(self):
        """
        Validate Pig by running the smoke-test action.
        """
        uuid = self.pig.action_do('smoke-test')
        result = self.d.action_fetch(uuid)
        # pig smoke-test sets outcome=success on success
        if (result['outcome'] != "success"):
            error = "Pig smoke-test failed"
            amulet.raise_status(amulet.FAIL, msg=error)

if __name__ == '__main__':
    unittest.main()


text:
#if !LESSTHAN_NET35
using System;
using System.Linq;
using System.Linq.Expressions;

using CodeJam.Reflection;

using JetBrains.Annotations;

namespace CodeJam.Collections
{
	partial class QueryableExtensions
	{
		/// <summary>
		/// Sorts the elements of a sequence in ascending order according to a key.
		/// </summary>
		/// <param name="source">A sequence of values to order.</param>
		/// <param name="property">The property name.</param>
		/// <returns>
		/// An <see cref="IOrderedQueryable{TElement}"/> whose elements are sorted according to a key.
		/// </returns>
		[NotNull, Pure]
		public static IOrderedQueryable<T> OrderBy<T>([NotNull] this IQueryable<T> source, [NotNull] string property) =>
			ApplyOrder(source, property, nameof(OrderBy));

		/// <summary>
		/// Sorts the elements of a sequence in descending order according to a key.
		/// </summary>
		/// <param name="source">A sequence of values to order.</param>
		/// <param name="property">The property name.</param>
		/// <returns>
		/// An <see cref="IOrderedQueryable{TElement}"/> whose elements are sorted according to a key.
		/// </returns>
		[NotNull, Pure]
		public static IOrderedQueryable<T> OrderByDescending<T>(
			[NotNull] this IQueryable<T> source, [NotNull] string property) =>
				ApplyOrder(source, property, nameof(OrderByDescending));

		/// <summary>
		/// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.
		/// </summary>
		/// <param name="source">An <see cref="IOrderedEnumerable{TElement}"/> that contains elements to sort.</param>
		/// <param name="property">The property name.</param>
		/// <returns>
		/// An <see cref="IOrderedQueryable{TElement}"/> whose elements are sorted according to a key.
		/// </returns>
		[NotNull, Pure]
		public static IOrderedQueryable<T> ThenBy<T>([NotNull] this IOrderedQueryable<T> source, [NotNull] string property) =>
			ApplyOrder(source, property, nameof(ThenBy));

		/// <summary>
		/// Performs a subsequent ordering of the elements in a sequence in descending order according to a key.
		/// </summary>
		/// <param name="source">An <see cref="IOrderedEnumerable{TElement}"/> that contains elements to sort.</param>
		/// <param name="property">The property name.</param>
		/// <returns>
		/// An <see cref="IOrderedQueryable{TElement}"/> whose elements are sorted according to a key.
		/// </returns>
		[NotNull, Pure]
		public static IOrderedQueryable<T> ThenByDescending<T>(
			[NotNull] this IOrderedQueryable<T> source,
			[NotNull] string property)
			=> ApplyOrder(source, property, nameof(ThenByDescending));

		private static IOrderedQueryable<T> ApplyOrder<T>(this IQueryable<T> source, string property, string method)
		{
			Code.NotNull(source, nameof(source));
			Code.NotNullNorEmpty(property, nameof(property));

			var parameter = Expression.Parameter(typeof(T), "p");
			var member = property.IndexOf('.') == -1
				? Expression.PropertyOrField(parameter, property)
				: property.Split('.').Aggregate((Expression)parameter, Expression.PropertyOrField);
			var expression = Expression.Lambda(member, parameter);

			return (IOrderedQueryable<T>)source.Provider.CreateQuery<T>(
				Expression.Call(
					typeof(Queryable),
					method,
					new[] { typeof(T), ((MemberExpression)member).Member.GetMemberType() },
					source.Expression,
					Expression.Quote(expression)));
		}
	}
}
#endif


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Newtonsoft.Json;

namespace Nest
{
	[JsonConverter(typeof(ReadAsTypeJsonConverter<InnerHits>))]
	public interface IInnerHits
	{
		[JsonProperty("name")]
		string Name { get; set; }

		[JsonProperty("from")]
		int? From { get; set; }

		[JsonProperty("size")]
		int? Size { get; set; }

		[JsonProperty(PropertyName = "sort")]
		IList<ISort> Sort { get; set; }

		[JsonProperty(PropertyName = "highlight")]
		IHighlight Highlight { get; set; }

		[JsonProperty(PropertyName = "explain")]
		bool? Explain { get; set; }

		[JsonProperty(PropertyName = "_source")]
		ISourceFilter Source { get; set; }

		[JsonProperty(PropertyName = "version")]
		bool? Version { get; set; }

		[JsonProperty(PropertyName = "fielddata_fields")]
		IList<Field> FielddataFields { get; set; }

		[JsonProperty(PropertyName = "script_fields")]
		IScriptFields ScriptFields { get; set; }
	}

	public class InnerHits : IInnerHits
	{
		public string Name { get; set; }

		public int? From { get; set; }

		public int? Size { get; set; }

		public IList<ISort> Sort { get; set; }

		public IHighlight Highlight { get; set; }

		public bool? Explain { get; set; }

		public ISourceFilter Source { get; set; }

		public bool? Version { get; set; }

		public IList<Field> FielddataFields { get; set; }

		public IScriptFields ScriptFields { get; set; }
	}

	[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
	public class InnerHitsDescriptor<T> : DescriptorBase<InnerHitsDescriptor<T>, IInnerHits>, IInnerHits where T : class
	{
		string IInnerHits.Name { get; set; }
		int? IInnerHits.From { get; set; }
		int? IInnerHits.Size { get; set; }
		IList<ISort> IInnerHits.Sort { get; set; }
		IHighlight IInnerHits.Highlight { get; set; }
		bool? IInnerHits.Explain { get; set; }
		ISourceFilter IInnerHits.Source { get; set; }
		bool? IInnerHits.Version { get; set; }
		IList<Field> IInnerHits.FielddataFields { get; set; }
		IScriptFields IInnerHits.ScriptFields { get; set; }

		public InnerHitsDescriptor<T> From(int? from) => Assign(a => a.From = from);

		public InnerHitsDescriptor<T> Size(int? size) => Assign(a => a.Size = size);

		public InnerHitsDescriptor<T> Name(string name) => Assign(a => a.Name = name);

		public InnerHitsDescriptor<T> FielddataFields(params Field[] fielddataFields) =>
			Assign(a => a.FielddataFields = fielddataFields?.ToListOrNullIfEmpty());

		public InnerHitsDescriptor<T> FielddataFields(params Expression<Func<T, object>>[] fielddataFields) =>
			Assign(a => a.FielddataFields = fielddataFields?.Select(f => (Field)f).ToListOrNullIfEmpty());

		public InnerHitsDescriptor<T> Explain(bool? explain = true) => Assign(a => a.Explain = explain);

		public InnerHitsDescriptor<T> Version(bool? version = true) => Assign(a => a.Version = version);

		public InnerHitsDescriptor<T> Sort(Func<SortDescriptor<T>, IPromise<IList<ISort>>> selector) => Assign(a => a.Sort = selector?.Invoke(new SortDescriptor<T>())?.Value);

		/// <summary>
		/// Allow to highlight search results on one or more fields. The implementation uses the either lucene fast-vector-highlighter or highlighter.
		/// </summary>
		public InnerHitsDescriptor<T> Highlight(Func<HighlightDescriptor<T>, IHighlight> selector) =>
			Assign(a => a.Highlight = selector?.Invoke(new HighlightDescriptor<T>()));

		//TODO map source of union bool/SourceFileter
		public InnerHitsDescriptor<T> Source(bool include = true) => Assign(a => a.Source = !include ? SourceFilter.ExcludeAll : null);

		public InnerHitsDescriptor<T> Source(Func<SourceFilterDescriptor<T>, ISourceFilter> selector) =>
			Assign(a => a.Source = selector?.Invoke(new SourceFilterDescriptor<T>()));

		public InnerHitsDescriptor<T> ScriptFields(Func<ScriptFieldsDescriptor, IPromise<IScriptFields>> selector) =>
			Assign(a => a.ScriptFields = selector?.Invoke(new ScriptFieldsDescriptor())?.Value);
	}
}


text:
For more information about developing apps with Liger Mobile go to the main [Liger Mobile repo](https://github.com/reachlocal/liger).

Liger-iOS is the iOS specific component to Liger. It's the part that creates and opens pages and dialogs and is the gateway into using native pages, both custom written for Liger, Apple's own, and from 3rd parties.

Liger-iOS is intended to be used as a [cocoapod](http://www.cocoapods.org) in an application. There's a number of XCTest test cases written and we use [Travis CI](https://travis-ci.org/reachlocal/liger-ios) to continuously build and run those tests.

To run the tests and generate coverage files, run this at the command line using the latest version of xctool/Xcode:

```bash
xctool build test GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES
```


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
null

#### Original name
Clathrospora elynae Rabenh., 1857

### Remarks
null


text:
declare function _exports(ds: any): boolean;
export = _exports;


text:
/*global define*/
define([
        './SceneMode'
    ], function(
        SceneMode) {
    "use strict";

    /**
     * State information about the current frame.  An instance of this class
     * is provided to update functions.
     *
     * @param {CreditDisplay} creditDisplay Handles adding and removing credits from an HTML element
     *
     * @alias FrameState
     * @constructor
     *
     * @private
     */
    var FrameState = function(context, creditDisplay) {
        /**
         * The rendering context.
         * @type {Context}
         */
        this.context = context;

        /**
         * An array of rendering commands.
         * @type {DrawCommand[]}
         */
        this.commandList = [];

        /**
         * The current mode of the scene.
         * @type {SceneMode}
         * @default {@link SceneMode.SCENE3D}
         */
        this.mode = SceneMode.SCENE3D;

        /**
         * The current morph transition time between 2D/Columbus View and 3D,
         * with 0.0 being 2D or Columbus View and 1.0 being 3D.
         *
         * @type {Number}
         */
        this.morphTime = SceneMode.getMorphTime(SceneMode.SCENE3D);

        /**
         * The current frame number.
         *
         * @type {Number}
         * @default 0
         */
        this.frameNumber = 0;

        /**
         * The scene's current time.
         *
         * @type {JulianDate}
         * @default undefined
         */
        this.time = undefined;

        /**
         * The map projection to use in 2D and Columbus View modes.
         *
         * @type {MapProjection}
         * @default undefined
         */
        this.mapProjection = undefined;

        /**
         * The current camera.
         * @type {Camera}
         * @default undefined
         */
        this.camera = undefined;

        /**
         * The culling volume.
         * @type {CullingVolume}
         * @default undefined
         */
        this.cullingVolume = undefined;

        /**
         * The current occluder.
         * @type {Occluder}
         * @default undefined
         */
        this.occluder = undefined;

        this.passes = {
            /**
             * true if the primitive should update for a render pass, false otherwise.
             * @type {Boolean}
             * @default false
             */
            render : false,
            /**
             * true if the primitive should update for a picking pass, false otherwise.
             * @type {Boolean}
             * @default false
             */
            pick : false
        };

        /**
        * The credit display.
        * @type {CreditDisplay}
        */
        this.creditDisplay = creditDisplay;

        /**
         * An array of functions to be called at the end of the frame.  This array
         * will be cleared after each frame.
         *

         * This allows queueing up events in update functions and
         * firing them at a time when the subscribers are free to change the
         * scene state, e.g., manipulate the camera, instead of firing events
         * directly in update functions.
         *

         *
         * @type {FrameState~AfterRenderCallback[]}
         *
         * @example
         * frameState.afterRender.push(function() {
         *   // take some action, raise an event, etc.
         * });
         */
        this.afterRender = [];

        /**
         * Gets whether or not to optimized for 3D only.
         * @type {Boolean}
         * @default false
         */
        this.scene3DOnly = false;

        this.fog = {
            /**
             * true if fog is enabled, false otherwise.
             * @type {Boolean}
             * @default false
             */
            enabled : false,
            /**
             * A positive number used to mix the color and fog color based on camera distance.
             * @type {Number}
             * @default undefined
             */
            density : undefined,
            /**
             * A scalar used to modify the screen space error of geometry partially in fog.
             * @type {Number}
             * @default undefined
             */
            sse : undefined
        };

        /**
        * A scalar used to exaggerate the terrain.
        * @type {Number}
        */
        this.terrainExaggeration = 1.0;
    };

    /**
     * A function that will be called at the end of the frame.
     * @callback FrameState~AfterRenderCallback
     */

    return FrameState;
});


text:
import { Request } from './PhRequest';
/**
 * When reverting without amount,
 * entire amount will be reverted
 */
export declare class AfterPayRevertTransactionRequest extends Request {
    amount?: number;
    constructor(amount?: number);
}


text:
export const vertex = /* glsl */`
#define NORMAL

#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )

	varying vec3 vViewPosition;

#endif

#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>

void main() {

	#include <uv_vertex>

	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>

	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>

#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )

	vViewPosition = - mvPosition.xyz;

#endif

}
`;

export const fragment = /* glsl */`
#define NORMAL

uniform float opacity;

#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )

	varying vec3 vViewPosition;

#endif

#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>

void main() {

	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>

	gl_FragColor = vec4( packNormalToRGB( normal ), opacity );

	#ifdef OPAQUE

		gl_FragColor.a = 1.0;

	#endif

}
`;


text:
"""Tests for app functions."""

import os

from clusterfuzz._internal.platforms.android import app
from clusterfuzz._internal.system import environment
from clusterfuzz._internal.tests.test_libs import android_helpers

class IsInstalledTest(android_helpers.AndroidTest):
  """Tests is_installed."""

  def test_nonexistent_package_not_installed(self):
    """Ensure that a non-existent package is not installed."""
    self.assertFalse(app.is_installed('non.existent.package'))

  def test_partial_package_name_not_installed(self):
    """Test that com.google is not recognized as an installed package."""
    self.assertFalse(app.is_installed('com.google'))

  def test_package_installed(self):
    """Ensure that gms (which should always be available) is installed."""
    self.assertTrue(app.is_installed('com.google.android.gms'))

class GetPackageNameTest(android_helpers.AndroidTest):
  """Tests get_package_name."""

  def setUp(self):
    super(GetPackageNameTest, self).setUp()

    root_dir = environment.get_value('ROOT_DIR')
    self.test_apk_path = os.path.join(root_dir, 'resources', 'platform',
                                      'android', 'wifi_util.apk')
    self.test_apk_pkg_name = 'com.android.tradefed.utils.wifi'

  def test_pkg_name_in_env(self):
    """Test package name already set in |PKG_NAME| env."""
    environment.set_value('PKG_NAME', 'a.b.c')
    self.assertEqual(app.get_package_name(), 'a.b.c')

  def test_apk_path_in_app_path_env(self):
    """Test apk path set in |APP_PATH| env variable."""
    environment.set_value('APP_PATH', self.test_apk_path)
    self.assertEqual(app.get_package_name(), self.test_apk_pkg_name)

  def test_apk_path_in_arg(self):
    """Test apk path passed as argument."""
    self.assertEqual(
        app.get_package_name(self.test_apk_path), self.test_apk_pkg_name)


text:
using Microsoft.EntityFrameworkCore.ChangeTracking;
using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Threading;

namespace Abp.EntityHistory
{
    public interface IEntityHistoryHelper
    {
        EntityChangeSet CreateEntityChangeSet(ICollection<EntityEntry> entityEntries);

        Task SaveAsync(EntityChangeSet changeSet);
    }

    public static class EntityHistoryHelperExtensions
    {
        public static void Save(this IEntityHistoryHelper entityHistoryHelper, EntityChangeSet changeSet)
        {
            AsyncHelper.RunSync(() => entityHistoryHelper.SaveAsync(changeSet));
        }
    }
}


text:
package com.polidea.rxandroidble2.internal.util;

public interface LocationServicesStatus {

    boolean isLocationPermissionOk();
    boolean isLocationProviderOk();
}


text:
import { autoHandler } from 'knifecycle';
import type { WhookResponse, WhookAPIHandlerDefinition } from '../index.js';

export const definition: WhookAPIHandlerDefinition = {
  path: '/ping',
  method: 'get',
  operation: {
    operationId: 'getPing',
    summary: "Checks API's availability.",
    tags: ['system'],
    responses: {
      200: {
        description: 'Pong',
        content: {
          'application/json': {
            schema: {
              type: 'object',
              additionalProperties: false,
              properties: {
                pong: {
                  type: 'string',
                  enum: ['pong'],
                },
              },
            },
          },
        },
      },
    },
  },
};

export default autoHandler(getPing);

async function getPing({
  NODE_ENV,
}: {
  NODE_ENV: string;
}): Promise<WhookResponse<200, { 'X-Node-ENV': string }, { pong: 'pong' }>> {
  return {
    status: 200,
    headers: {
      'X-Node-ENV': NODE_ENV,
    },
    body: {
      pong: 'pong',
    },
  };
}


text:
package org.olat.commons.servlets;

import java.io.Writer;
import java.util.Date;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.pdfbox.io.IOUtils;
import org.olat.basesecurity.Authentication;
import org.olat.basesecurity.BaseSecurityManager;
import org.olat.commons.rss.RSSUtil;
import org.olat.core.commons.persistence.DBFactory;
import org.olat.core.commons.services.notifications.PersonalRSSFeed;
import org.olat.core.dispatcher.DispatcherModule;
import org.olat.core.id.Identity;
import org.olat.core.logging.OLog;
import org.olat.core.logging.Tracing;
import org.olat.core.util.i18n.I18nManager;

import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.FeedException;
import com.sun.syndication.io.SyndFeedOutput;

/**
 * Description:

 * Servlet that produces a personalized RSS feed of the users notifications.
 *

 * Initial Date: Jan 11, 2005 2004
 *
 * @author Florian Gnägi
 */
public class RSSServlet extends HttpServlet {

	private static final long serialVersionUID = -674630331334472714L;
	private static final OLog log = Tracing.createLoggerFor(RSSServlet.class);
	public static final String DEFAULT_ENCODING = "UTF-8";
	private static int outputBufferSize = 2048;
	private static int inputBufferSize = 2048;

	/**
	 * @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
	 */
	public void init(ServletConfig servletConfig) throws ServletException {
		super.init(servletConfig);
		log.info("init statics servlet");
		try {
			String bufSize = servletConfig.getInitParameter("input");
			inputBufferSize = Integer.parseInt(bufSize);
			bufSize = servletConfig.getInitParameter("output");
			outputBufferSize = Integer.parseInt(bufSize);
		} catch (Exception e) {
			log.warn("problem with config parameters for rss servlets:", e);
		}
		log.info("input buffer size: " + inputBufferSize);
		log.info("output buffer size: " + outputBufferSize);
	}

	/**
	 * @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest,
	 *      javax.servlet.http.HttpServletResponse)
	 */
	protected void service(HttpServletRequest req, HttpServletResponse resp) {
		Tracing.setUreq(req);
		I18nManager.attachI18nInfoToThread(req);
		try {
			String method = req.getMethod();
			if (method.equals("GET")) {
				doGet(req, resp);
			} else {
				super.service(req, resp);
			}
		} catch (Exception e) {
			log.error("Exception while serving RSS feed::" + req.getPathInfo(), e);
		} finally {
			I18nManager.remove18nInfoFromThread();
			// consume the user request.
			Tracing.setUreq(null);
		}
	}

	/**
	 * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest,
	 *      javax.servlet.http.HttpServletResponse)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) {
		SyndFeed feed = null;
		Writer writer = null;

		try {
			String pathInfo = request.getPathInfo();
			if ((pathInfo == null) || (pathInfo.equals(""))) { return; // error
			}

			// pathInfo is like /personal/username/tokenid.rss
			if (pathInfo.indexOf(RSSUtil.RSS_PREFIX_PERSONAL) == 0) {
				feed = getPersonalFeed(pathInfo);
				if (feed == null) {
					DispatcherModule.sendNotFound(pathInfo, response);
					return;
				}
			} else {
				DispatcherModule.sendNotFound(pathInfo, response);
				return;
			}

			// OLAT-5400 and OLAT-5243 related: sending back the reply can take arbitrary long,
			// considering slow end-user connections for example - or a sudden death of the connection
			// on the client-side which remains unnoticed (network partitioning)
			DBFactory.getInstance().intermediateCommit();

			response.setBufferSize(outputBufferSize);

			String encoding = feed.getEncoding();
			if (encoding == null) {
				encoding = DEFAULT_ENCODING;
				if (log.isDebug()) {
					log.debug("Feed encoding::" + encoding);
				}
				log.warn("No encoding provided by feed::" + feed.getClass().getCanonicalName() + " Using utf-8 as default.");
			}
			response.setCharacterEncoding(encoding);
			response.setContentType("application/rss+xml");

			Date pubDate = feed.getPublishedDate();
			if (pubDate != null) {
				response.setDateHeader("Last-Modified", pubDate.getTime());
			}
			// TODO:GW Do we need this?
			// response.setContentLength(feed.get);

			writer = response.getWriter();
			SyndFeedOutput output = new SyndFeedOutput();
			output.output(feed, writer);

		} catch (FeedException e) {
			// throw olat exception for nice logging
			log.warn("Error when generating RSS stream for path::" + request.getPathInfo(), e);
			DispatcherModule.sendNotFound("none", response);
		} catch (Exception e) {
			log.warn("Unknown Exception in rssservlet", e);
			DispatcherModule.sendNotFound("none", response);
		} catch (Error e) {
			log.warn("Unknown Error in rssservlet", e);
			DispatcherModule.sendNotFound("none", response);
		} finally {
			IOUtils.closeQuietly(writer);
			DBFactory.getInstance(false).commitAndCloseSession();
		}
	}

	/**
	 * Creates a personal RSS document
	 *
	 * @param pathInfo
	 * @return RssDocument
	 */
	private SyndFeed getPersonalFeed(String pathInfo) {
		// pathInfo is like /personal/username/tokenid/olat.rss
		int startIdName = RSSUtil.RSS_PREFIX_PERSONAL.length();
		int startIdToken = pathInfo.indexOf("/", RSSUtil.RSS_PREFIX_PERSONAL.length());
		String idName = pathInfo.substring(startIdName, startIdToken);
		int startUselessUri = pathInfo.indexOf("/", startIdToken + 1);
		String idToken = pathInfo.substring(startIdToken + 1, startUselessUri);

		// ---- check integrity and user authentication ----
		if (idName == null || idName.equals("")) { return null; }
		Identity identity = BaseSecurityManager.getInstance().findIdentityByName(idName);
		if (identity == null) {
			// error - abort
			return null;
		}
		// check if this is a valid authentication
		Authentication auth = BaseSecurityManager.getInstance().findAuthentication(identity, RSSUtil.RSS_AUTH_PROVIDER);
		if (auth == null) {
			// error, rss authentication not yet set. user must login first, then the
			// auth provider will be generated on the fly
			return null;
		}
		if (!auth.getCredential().equals(idToken)) {
			// error - wrong authentication
			return null;
		}

		// create rss feed for user notifications
		SyndFeed feed = new PersonalRSSFeed(identity, idToken);
		//TODO implements some caching
		return feed;
	}
}


text:
package sctags

import org.specs._
import org.specs.runner.JUnit3

class tagSpecTest extends JUnit3(tagSpec)
object tagSpec extends Specification {
  val pos = Position(1,1,"c")
  "A tag" should {
    "escape tabs" in {
      val tag = new Tag("a",pos, "d" -> "foo\tbar")
      val tagString = tag.toString
      tagString must include("foo\\tbar")
      tagString must notInclude("foo\tbar")
    }
    "escape line feeds" in {
      val tag = new Tag("a",pos, "d" -> "foo\nbar")
      val tagString = tag.toString
      tagString must include("foo\\nbar")
      tagString must notInclude("foo\nbar")
    }
    "escape carriage returns" in {
      val tag = new Tag("a",pos, "d" -> "foo\rbar")
      val tagString = tag.toString
      tagString must include("foo\\rbar")
      tagString must notInclude("foo\rbar")
    }
    "separate fields with tabs" in {
      val tag = new Tag("a",pos,"d"->"e")
      val tagString = tag.toString
      tagString mustEqual "a\t\tc;\"\td:e"
    }
  }
}


text:
from __future__ import print_function, division

from sympy import Basic
from sympy.functions import adjoint, conjugate

from sympy.matrices.expressions.matexpr import MatrixExpr

class Transpose(MatrixExpr):
    """
    The transpose of a matrix expression.

    This is a symbolic object that simply stores its argument without
    evaluating it. To actually compute the transpose, use the ``transpose()``
    function, or the ``.T`` attribute of matrices.

    Examples
    ========

    >>> from sympy.matrices import MatrixSymbol, Transpose
    >>> from sympy.functions import transpose
    >>> A = MatrixSymbol('A', 3, 5)
    >>> B = MatrixSymbol('B', 5, 3)
    >>> Transpose(A)
    A'
    >>> A.T == transpose(A) == Transpose(A)
    True
    >>> Transpose(A*B)
    (A*B)'
    >>> transpose(A*B)
    B'*A'

    """
    is_Transpose = True

    def doit(self, **hints):
        arg = self.arg
        if hints.get('deep', True) and isinstance(arg, Basic):
            arg = arg.doit(**hints)
        try:
            result = arg._eval_transpose()
            return result if result is not None else Transpose(arg)
        except AttributeError:
            return Transpose(arg)

    @property
    def arg(self):
        return self.args[0]

    @property
    def shape(self):
        return self.arg.shape[::-1]

    def _entry(self, i, j):
        return self.arg._entry(j, i)

    def _eval_adjoint(self):
        return conjugate(self.arg)

    def _eval_conjugate(self):
        return adjoint(self.arg)

    def _eval_transpose(self):
        return self.arg

    def _eval_trace(self):
        from .trace import Trace
        return Trace(self.arg)  # Trace(X.T) => Trace(X)

    def _eval_determinant(self):
        from sympy.matrices.expressions.determinant import det
        return det(self.arg)

def transpose(expr):
    """ Matrix transpose """
    return Transpose(expr).doit()

from sympy.assumptions.ask import ask, Q
from sympy.assumptions.refine import handlers_dict

def refine_Transpose(expr, assumptions):
    """
    >>> from sympy import MatrixSymbol, Q, assuming, refine
    >>> X = MatrixSymbol('X', 2, 2)
    >>> X.T
    X'
    >>> with assuming(Q.symmetric(X)):
    ...     print(refine(X.T))
    X
    """
    if ask(Q.symmetric(expr), assumptions):
        return expr.arg

    return expr

handlers_dict['Transpose'] = refine_Transpose


text:
namespace media {

class FakeAudioLogImpl : public AudioLog {
 public:
  FakeAudioLogImpl() {}
  ~FakeAudioLogImpl() override {}
  void OnCreated(int component_id,
                 const media::AudioParameters& params,
                 const std::string& device_id) override {}
  void OnStarted(int component_id) override {}
  void OnStopped(int component_id) override {}
  void OnClosed(int component_id) override {}
  void OnError(int component_id) override {}
  void OnSetVolume(int component_id, double volume) override {}
  void OnSwitchOutputDevice(int component_id,
                            const std::string& device_id) override {}
  void OnLogMessage(int component_id, const std::string& message) override {}
};

FakeAudioLogFactory::FakeAudioLogFactory() {}
FakeAudioLogFactory::~FakeAudioLogFactory() {}

std::unique_ptr<AudioLog> FakeAudioLogFactory::CreateAudioLog(
    AudioComponent component) {
  return base::MakeUnique<FakeAudioLogImpl>();
}

}  // namespace media


text:
ioloop_redis
========

another async redis lib for tornado, short and intuitive

<br/>

##Sample
-----------

```py:sample.py
from __future__ import absolute_import
from tornado import httpserver
from tornado.web import Application, RequestHandler
from tornado.gen import coroutine
from redis_client import *

_queue = AsyncRedis('redis://localhost:6379/1')

class HelloworldHandler(RequestHandler):
    @coroutine
    def get(self):
        next_cmd = yield _queue.invoke(redis_lpop('key'))
        #do sth.
        self.write(next_cmd)
        self.finish()

def main():
    app = Application([
        ('/', HelloworldHandler),
    ])

    server = httpserver.HTTPServer(app)
    server.listen(8000)
    IOLoop.instance().start()

if __name__ == "__main__":
    main()
```


text:
import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import App from './App';
import goods from 'components/goods/goods';
import ratings from 'components/ratings/ratings';
import seller from 'components/seller/seller';
import 'common/stylus/index.styl';
Vue.use(VueRouter);
Vue.use(VueResource);
let app = Vue.extend(App);
let router = new VueRouter({
  linkActiveClass: 'active'
});
router.map({
  '/goods': {
    component: goods
  },
  '/ratings': {
    component: ratings
  },
  '/seller': {
    component: seller
  }
});
router.start(app, '#app');
/* 设置默认路由地址*/
router.go('/goods');


text:
brew install font-3270-nerd-font
brew install font-abeezee
brew install font-abel
brew install font-aboriginal-sans
brew install font-aboriginal-serif
brew install font-abril-fatface
brew install font-aclonica
brew install font-acme
brew install font-actor
brew install font-adamina
brew install font-adinatha-tamil-brahmi
brew install font-advent-pro
brew install font-african-sans
brew install font-african-serif
brew install font-agave-nerd-font
brew install font-aguafina-script
brew install font-ahuramzda
brew install font-aileron
brew install font-akronim
brew install font-aladin
brew install font-aldrich
brew install font-alef
brew install font-alegreya-sans-sc
brew install font-alegreya-sans
brew install font-alegreya-sc
brew install font-alegreya
brew install font-aleo
brew install font-alex-brush
brew install font-alfa-slab-one
brew install font-alice
brew install font-alike-angular
brew install font-alike
brew install font-allan
brew install font-allerta-stencil
brew install font-allerta
brew install font-allura
brew install font-almendra-display
brew install font-almendra-sc
brew install font-almendra
brew install font-amarante
brew install font-amaranth
brew install font-amatic-sc
brew install font-amethysta
brew install font-amiri
brew install font-andika
brew install font-angkor
brew install font-anka-coder
brew install font-annie-use-your-telescope
brew install font-anonymice-powerline
brew install font-anonymice-nerd-font
brew install font-anonymous-pro
brew install font-antic-didone
brew install font-antic-slab
brew install font-antic
brew install font-antinoou
brew install font-anton
brew install font-arapey
brew install font-arbutus-slab
brew install font-arbutus
brew install font-architects-daughter
brew install font-archivo-black
brew install font-archivo-narrow
brew install font-arimo-nerd-font
brew install font-arizonia
brew install font-armata
brew install font-artifika
brew install font-arvo
brew install font-asap
brew install font-asset
brew install font-astloch
brew install font-asul
brew install font-atomic-age
brew install font-aubrey
brew install font-audiowide
brew install font-aurulent-sans-mono-nerd-font
brew install font-autour-one
brew install font-average-sans
brew install font-average
brew install font-averia-gruesa-libre
brew install font-averia-libre
brew install font-averia-sans-libre
brew install font-averia-serif-libre
brew install font-awesome-terminal-fonts
brew install font-bad-script
brew install font-baloo
brew install font-balthazar
brew install font-baron
brew install font-basic
brew install font-battambang
brew install font-baumans
brew install font-bayon
brew install font-bebas-neue
brew install font-belgrano
brew install font-belleza
brew install font-benchnine
brew install font-bentham
brew install font-berkshire-swash
brew install font-bevan
brew install font-bigblue-terminal-nerd-font
brew install font-bigelow-rules
brew install font-bigshot-one
brew install font-bilbo-swash-caps
brew install font-bilbo
brew install font-bitstream-vera
brew install font-bitstream-vera-sans-mono-nerd-font
brew install font-bitter
brew install font-black-ops-one
brew install font-blokk-neue
brew install font-bokor
brew install font-bonbon
brew install font-boogaloo
brew install font-bowlby-one-sc
brew install font-bowlby-one
brew install font-brawler
brew install font-bree-serif
brew install font-bubblegum-sans
brew install font-bubbler-one
brew install font-buda
brew install font-buenard
brew install font-bukyvede-bold
brew install font-bukyvede-italic
brew install font-bukyvede-regular
brew install font-bungee
brew install font-butcherman
brew install font-butterfly-kids
brew install font-cabin-condensed
brew install font-cabin-sketch
brew install font-cabin
brew install font-caesar-dressing
brew install font-cagliostro
brew install font-calligraffitti
brew install font-cambo
brew install font-camingocode
brew install font-candal
brew install font-cantarell
brew install font-cantata-one
brew install font-cantora-one
brew install font-capriola
brew install font-cardo
brew install font-carme
brew install font-carrois-gothic-sc
brew install font-carrois-gothic
brew install font-carter-one
brew install font-cascadia-code
brew install font-caskaydia-cove-nerd-font
brew install font-caudex
brew install font-cedarville-cursive
brew install font-ceviche-one
brew install font-changa-one
brew install font-chango
brew install font-chapbook
brew install font-charis-sil
brew install font-chau-philomene-one
brew install font-chela-one
brew install font-chelsea-market
brew install font-chenla
brew install font-cherry-cream-soda
brew install font-cherry-swash
brew install font-chewy
brew install font-chicle
brew install font-chivo
brew install font-cinzel-decorative
brew install font-cinzel
brew install font-clear-sans
brew install font-clicker-script
brew install font-coda-caption
brew install font-coda
brew install font-code2002
brew install font-code-new-roman-nerd-font
brew install font-codystar
brew install font-combo
brew install font-comfortaa
brew install font-comic-neue
brew install font-coming-soon
brew install font-conakry
brew install font-concert-one
brew install font-condiment
brew install font-consolas-for-powerline
brew install font-constructium
brew install font-content
brew install font-contrail-one
brew install font-convergence
brew install font-cookie
brew install font-copse
brew install font-corben
brew install font-courgette
brew install font-courier-prime
brew install font-cousine-nerd-font
brew install font-coustard
brew install font-covered-by-your-grace
brew install font-crafty-girls
brew install font-creepster
brew install font-crete-round
brew install font-crimson-text
brew install font-croissant-one
brew install font-crushed
brew install font-cuprum
brew install font-cutive-mono
brew install font-cutive
brew install font-d2coding
brew install font-daddy-time-mono-nerd-font
brew install font-damion
brew install font-dancing-script
brew install font-dashicons
brew install font-dawning-of-a-new-day
brew install font-days-one
brew install font-dejavu-sans-mono-for-powerline
brew install font-dejavu-sans-mono-nerd-font
brew install font-delius-swash-caps
brew install font-delius-unicase
brew install font-delius
brew install font-della-respira
brew install font-denk-one
brew install font-devicons
brew install font-devonshire
brew install font-dhyana
brew install font-digohweli-old-do
brew install font-diplomata-sc
brew install font-diplomata
brew install font-domine
brew install font-donegal-one
brew install font-doppio-one
brew install font-dorsa
brew install font-dosis
brew install font-dr-sugiyama
brew install font-droid-sans-mono-for-powerline
brew install font-droid-sans-mono-nerd-font
brew install font-duru-sans
brew install font-dynalight
brew install font-eagle-lake
brew install font-eater
brew install font-eb-garamond
brew install font-economica
brew install font-edlo
brew install font-electrolize
brew install font-elsie-swash-caps
brew install font-elsie
brew install font-emblema-one
brew install font-emilys-candy
brew install font-engagement
brew install font-englebert
brew install font-enriqueta
brew install font-erica-one
brew install font-esteban
brew install font-et-book
brew install font-euphoria-script
brew install font-everson-mono
brew install font-ewert
brew install font-exo
brew install font-ezra-sil
brew install font-fairfax
brew install font-fantasque-sans-mono-nerd-font
brew install font-fanwood-text
brew install font-fascinate-inline
brew install font-fascinate
brew install font-faster-one
brew install font-fasthand
brew install font-fauna-one
brew install font-federant
brew install font-federo
brew install font-felipa
brew install font-fenix
brew install font-finger-paint
brew install font-fira-code-nerd-font
brew install font-fira-mono-for-powerline
brew install font-fira-mono-nerd-font
brew install font-fira-sans
brew install font-fjalla-one
brew install font-fjord-one
brew install font-flamenco
brew install font-flavors
brew install font-fondamento
brew install font-fontawesome
brew install font-fontdiner-swanky
brew install font-forum
brew install font-foundation-icons
brew install font-francois-one
brew install font-freckle-face
brew install font-fredericka-the-great
brew install font-fredoka-one
brew install font-fresca
brew install font-frijole
brew install font-fruktur
brew install font-fugaz-one
brew install font-gabriela
brew install font-gafata
brew install font-galdeano
brew install font-galindo
brew install font-gentium-basic
brew install font-gentium-book-basic
brew install font-gentium-plus
brew install font-geo
brew install font-geostar-fill
brew install font-geostar
brew install font-germania-one
brew install font-gfs-didot
brew install font-gfs-neohellenic
brew install font-gidole
brew install font-gilda-display
brew install font-give-you-glory
brew install font-glass-antiqua
brew install font-glegoo
brew install font-gloria-hallelujah
brew install font-gnu-unifont
brew install font-go-mono-nerd-font
brew install font-go
brew install font-goblin-one
brew install font-gochi-hand
brew install font-gorditas
brew install font-graduate
brew install font-grand-hotel
brew install font-gravitas-one
brew install font-great-vibes
brew install font-griffy
brew install font-gruppo
brew install font-gudea
brew install font-habibi
brew install font-hack-nerd-font
brew install font-halant
brew install font-hammersmith-one
brew install font-handlee
brew install font-hanuman
brew install font-happy-monkey
brew install font-hasklig
brew install font-hasklug-nerd-font
brew install font-headland-one
brew install font-henny-penny
brew install font-hermeneus-one
brew install font-herr-von-muellerhoff
brew install font-hind
brew install font-holtwood-one-sc
brew install font-homemade-apple
brew install font-homenaje
brew install font-hurmit-nerd-font
brew install font-iceberg
brew install font-iceland
brew install font-icomoon
brew install font-im-fell-double-pica-sc
brew install font-im-fell-double-pica
brew install font-im-fell-dw-pica-sc
brew install font-im-fell-dw-pica
brew install font-im-fell-english-sc
brew install font-im-fell-english
brew install font-im-fell-french-canon-sc
brew install font-im-fell-french-canon
brew install font-im-fell-great-primer-sc
brew install font-im-fell-great-primer
brew install font-imprima
brew install font-inconsolata-dz-for-powerline
brew install font-inconsolata-for-powerline
brew install font-inconsolata-g-for-powerline
brew install font-inconsolata-lgc-nerd-font
brew install font-inconsolata-nerd-font
brew install font-inconsolata-go-nerd-font
brew install font-inder
brew install font-indie-flower
brew install font-inika
brew install font-iosevka-nerd-font
brew install font-iranian-sans
brew install font-iranian-serif
brew install font-irish-grover
brew install font-istok-web
brew install font-italiana
brew install font-italianno
brew install font-jaapokki
brew install font-jacques-francois-shadow
brew install font-jacques-francois
brew install font-jetbrains-mono-nerd-font
brew install font-jim-nightshade
brew install font-jockey-one
brew install font-jolly-lodger
brew install font-josefin-sans
brew install font-josefin-slab
brew install font-joti-one
brew install font-jsmath-cmbx10
brew install font-judson
brew install font-julee
brew install font-julius-sans-one
brew install font-junge
brew install font-junicode
brew install font-jura
brew install font-just-another-hand
brew install font-just-me-again-down-here
brew install font-kalam
brew install font-kameron
brew install font-kantumruy
brew install font-karla-tamil-inclined
brew install font-karla-tamil-upright
brew install font-karla
brew install font-karma
brew install font-kaushan-script
brew install font-kavoon
brew install font-kawkab-mono
brew install font-kayases
brew install font-kdam-thmor
brew install font-keania-one
brew install font-kelly-slab
brew install font-kenia
brew install font-khand
brew install font-khmer
brew install font-kite-one
brew install font-knewave
brew install font-koruri
brew install font-kotta-one
brew install font-kranky
brew install font-kreon
brew install font-kristi
brew install font-krona-one
brew install font-la-belle-aurore
brew install font-laila
brew install font-lalezar
brew install font-lancelot
brew install font-lateef
brew install font-latin-modern-math
brew install font-latin-modern
brew install font-lato
brew install font-league-gothic
brew install font-league-script
brew install font-league-spartan
brew install font-leckerli-one
brew install font-ledger
brew install font-lekton-nerd-font
brew install font-lemon
brew install font-liberation-mono-for-powerline
brew install font-libertinus
brew install font-libre-baskerville
brew install font-libre-caslon-text
brew install font-libre-franklin
brew install font-life-savers
brew install font-ligature-symbols
brew install font-lilita-one
brew install font-lily-script-one
brew install font-limelight
brew install font-linden-hill
brew install font-lobster-two
brew install font-lobster
brew install font-londrina-outline
brew install font-londrina-shadow
brew install font-londrina-sketch
brew install font-londrina-solid
brew install font-lora
brew install font-love-ya-like-a-sister
brew install font-loved-by-the-king
brew install font-lovers-quarrel
brew install font-luckiest-guy
brew install font-luculent
brew install font-lusitana
brew install font-lustria
brew install font-macondo-swash-caps
brew install font-macondo
brew install font-magra
brew install font-maiden-orange
brew install font-mako
brew install font-marcellus-sc
brew install font-marcellus
brew install font-marck-script
brew install font-margarine
brew install font-marko-one
brew install font-marmelad
brew install font-marta
brew install font-marvel
brew install font-masinahikan-dene
brew install font-masinahikan
brew install font-mate-sc
brew install font-mate
brew install font-material-icons
brew install font-materialdesignicons-webfont
brew install font-maven-pro
brew install font-mclaren
brew install font-meddon
brew install font-medievalsharp
brew install font-medula-one
brew install font-megrim
brew install font-meie-script
brew install font-menlo-for-powerline
brew install font-merienda-one
brew install font-merienda
brew install font-merriweather-sans
brew install font-merriweather
brew install font-meslo-lg-for-powerline
brew install font-meslo-lg-nerd-font
brew install font-metal-mania
brew install font-metamorphous
brew install font-metrophobic
brew install font-miao-unicode
brew install font-migmix-1m
brew install font-migmix-1p
brew install font-migmix-2m
brew install font-migmix-2p
brew install font-migu-1c
brew install font-migu-1m
brew install font-migu-1p
brew install font-migu-2m
brew install font-milonga
brew install font-miltonian-tattoo
brew install font-miltonian
brew install font-miniver
brew install font-miss-fajardose
brew install font-modern-antiqua
brew install font-molengo
brew install font-molle
brew install font-monda
brew install font-monofett
brew install font-monofur-for-powerline
brew install font-monofur-nerd-font
brew install font-monoid-nerd-font
brew install font-monoisome
brew install font-mononoki-nerd-font
brew install font-monoton
brew install font-monsieur-la-doulaise
brew install font-montaga
brew install font-montez
brew install font-montserrat-alternates
brew install font-montserrat-subrayada
brew install font-montserrat
brew install font-mountains-of-christmas
brew install font-mouse-memoirs
brew install font-mplus-nerd-font
brew install font-mr-bedfort
brew install font-mr-dafoe
brew install font-mr-de-haviland
brew install font-mrs-saint-delafield
brew install font-mrs-sheppards
brew install font-mukti-narrow
brew install font-myrica
brew install font-myricam
brew install font-mystery-quest
brew install font-n-gage
brew install font-neucha
brew install font-neuton
brew install font-new-rocker
brew install font-news-cycle
brew install font-niconne
brew install font-nixie-one
brew install font-nobile
brew install font-norican
brew install font-nosifer
brew install font-nothing-you-could-do
brew install font-noticia-text
brew install font-noto-color-emoji
brew install font-noto-emoji
brew install font-noto-kufi-arabic
brew install font-noto-mono
brew install font-noto-naskh-arabic
brew install font-noto-nastaliq-urdu
brew install font-noto-sans-armenian
brew install font-noto-sans-avestan
brew install font-noto-sans-balinese
brew install font-noto-sans-bamum
brew install font-noto-sans-batak
brew install font-noto-sans-bengali
brew install font-noto-sans-brahmi
brew install font-noto-sans-buginese
brew install font-noto-sans-buhid
brew install font-noto-sans-canadian-aboriginal
brew install font-noto-sans-carian
brew install font-noto-sans-cham
brew install font-noto-sans-cherokee
brew install font-noto-sans-cjk-jp
brew install font-noto-sans-cjk-kr
brew install font-noto-sans-cjk-sc
brew install font-noto-sans-cjk-tc
brew install font-noto-sans-cjk
brew install font-noto-sans-coptic
brew install font-noto-sans-cuneiform
brew install font-noto-sans-cypriot
brew install font-noto-sans-deseret
brew install font-noto-sans-devanagari
brew install font-noto-sans-egyptian-hieroglyphs
brew install font-noto-sans-ethiopic
brew install font-noto-sans-georgian
brew install font-noto-sans-glagolitic
brew install font-noto-sans-gothic
brew install font-noto-sans-gujarati
brew install font-noto-sans-gurmukhi
brew install font-noto-sans-hanunoo
brew install font-noto-sans-imperial-aramaic
brew install font-noto-sans-inscriptional-pahlavi
brew install font-noto-sans-inscriptional-parthian
brew install font-noto-sans-javanese
brew install font-noto-sans-kaithi
brew install font-noto-sans-kannada
brew install font-noto-sans-kayah-li
brew install font-noto-sans-kharoshthi
brew install font-noto-sans-khmer
brew install font-noto-sans-lao
brew install font-noto-sans-lepcha
brew install font-noto-sans-limbu
brew install font-noto-sans-linear-b
brew install font-noto-sans-lisu
brew install font-noto-sans-lycian
brew install font-noto-sans-lydian
brew install font-noto-sans-malayalam
brew install font-noto-sans-mandaic
brew install font-noto-sans-meetei-mayek
brew install font-noto-sans-mongolian
brew install font-noto-sans-myanmar
brew install font-noto-sans-n-ko
brew install font-noto-sans-new-tai-lue
brew install font-noto-sans-ogham
brew install font-noto-sans-ol-chiki
brew install font-noto-sans-old-italic
brew install font-noto-sans-old-persian
brew install font-noto-sans-old-south-arabian
brew install font-noto-sans-old-turkic
brew install font-noto-sans-oriya
brew install font-noto-sans-osmanya
brew install font-noto-sans-phags-pa
brew install font-noto-sans-phoenician
brew install font-noto-sans-rejang
brew install font-noto-sans-runic
brew install font-noto-sans-samaritan
brew install font-noto-sans-saurashtra
brew install font-noto-sans-shavian
brew install font-noto-sans-sinhala
brew install font-noto-sans-sundanese
brew install font-noto-sans-syloti-nagri
brew install font-noto-sans-symbols
brew install font-noto-sans-syriac-eastern
brew install font-noto-sans-syriac-estrangela
brew install font-noto-sans-syriac-western
brew install font-noto-sans-tagalog
brew install font-noto-sans-tagbanwa
brew install font-noto-sans-tai-le
brew install font-noto-sans-tai-tham
brew install font-noto-sans-tai-viet
brew install font-noto-sans-tamil
brew install font-noto-sans-telugu
brew install font-noto-sans-thaana
brew install font-noto-sans-thai
brew install font-noto-sans-tibetan
brew install font-noto-sans-tifinagh
brew install font-noto-sans-ugaritic
brew install font-noto-sans-vai
brew install font-noto-sans-yi
brew install font-noto-sans
brew install font-noto-serif-armenian
brew install font-noto-serif-georgian
brew install font-noto-serif-khmer
brew install font-noto-serif-lao
brew install font-noto-serif-thai
brew install font-noto-serif
brew install font-noto-nerd-font
brew install font-nova-cut
brew install font-nova-flat
brew install font-nova-mono
brew install font-nova-oval
brew install font-nova-round
brew install font-nova-script
brew install font-nova-slim
brew install font-nova-square
brew install font-numans
brew install font-nunito
brew install font-office-code-pro
brew install font-offside
brew install font-old-standard-tt
brew install font-oldenburg
brew install font-oleo-script-swash-caps
brew install font-oleo-script
brew install font-open-iconic
brew install font-open-sans-condensed
brew install font-open-sans
brew install font-oranienbaum
brew install font-orbitron
brew install font-oregano
brew install font-orienta
brew install font-original-surfer
brew install font-oswald
brew install font-over-the-rainbow
brew install font-overlock-sc
brew install font-overlock
brew install font-overpass-nerd-font
brew install font-ovo
brew install font-oxygen-mono
brew install font-oxygen
brew install font-pacifico
brew install font-padauk
brew install font-palemonas
brew install font-paprika
brew install font-parisienne
brew install font-passero-one
brew install font-passion-one
brew install font-pathway-gothic-one
brew install font-patrick-hand-sc
brew install font-patrick-hand
brew install font-patua-one
brew install font-paytone-one
brew install font-pecita
brew install font-peralta
brew install font-permanent-marker
brew install font-petit-formal-script
brew install font-petrona
brew install font-phetsarath
brew install font-philosopher
brew install font-piedra
brew install font-pinyon-script
brew install font-pirata-one
brew install font-plaster
brew install font-play
brew install font-playball
brew install font-playfair-display-sc
brew install font-playfair-display
brew install font-podkova
brew install font-poetsenone
brew install font-poiret-one
brew install font-poller-one
brew install font-poly
brew install font-pompiere
brew install font-pontano-sans
brew install font-poppins
brew install font-port-lligat-sans
brew install font-port-lligat-slab
brew install font-prata
brew install font-prime
brew install font-prince-valiant
brew install font-princess-sofia
brew install font-prociono
brew install font-profont-nerd-font
brew install font-profontx
brew install font-prosto-one
brew install font-pt-mono
brew install font-pt-sans
brew install font-pt-serif
brew install font-puritan
brew install font-purple-purse
brew install font-quando
brew install font-quantico
brew install font-quattrocento-sans
brew install font-quattrocento
brew install font-questrial
brew install font-quicksand
brew install font-quintessential
brew install font-qwigley
brew install font-racing-sans-one
brew install font-radley
brew install font-rajdhani
brew install font-raleway-dots
brew install font-raleway
brew install font-rambla
brew install font-rammetto-one
brew install font-ranchers
brew install font-rancho
brew install font-rationale
brew install font-redacted
brew install font-redressed
brew install font-reenie-beanie
brew install font-revalia
brew install font-ribeye-marrow
brew install font-ribeye
brew install font-ricty-diminished
brew install font-righteous
brew install font-risque
brew install font-roboto-mono-for-powerline
brew install font-roboto-mono-nerd-font
brew install font-roboto-slab
brew install font-roboto
brew install font-rochester
brew install font-rock-salt
brew install font-rokkitt
brew install font-romanesco
brew install font-ropa-sans
brew install font-rosario
brew install font-rosarivo
brew install font-rouge-script
brew install font-rozha-one
brew install font-ruda
brew install font-rufina
brew install font-ruge-boogie
brew install font-ruluko
brew install font-rum-raisin
brew install font-ruslan-display
brew install font-russo-one
brew install font-ruthie
brew install font-rye
brew install font-sacramento
brew install font-sail
brew install font-salsa
brew install font-sanchez
brew install font-sancreek
brew install font-sansita-one
brew install font-sarina
brew install font-sarpanch
brew install font-satisfy
brew install font-sauce-code-pro-nerd-font
brew install font-scada
brew install font-scheherazade
brew install font-schoolbell
brew install font-seaweed-script
brew install font-sevillana
brew install font-seymour-one
brew install font-shadows-into-light-two
brew install font-shadows-into-light
brew install font-shanti
brew install font-share-tech-mono
brew install font-share-tech
brew install font-share
brew install font-shojumaru
brew install font-short-stack
brew install font-shure-tech-mono-nerd-font
brew install font-siemreap
brew install font-sigmar-one
brew install font-signika-negative
brew install font-simonetta
brew install font-sinkin-sans
brew install font-sintony
brew install font-sirin-stencil
brew install font-six-caps
brew install font-skranji
brew install font-slackey
brew install font-smokum
brew install font-smythe
brew install font-sniglet
brew install font-snippet
brew install font-snowburst-one
brew install font-sofadi-one
brew install font-sofia
brew install font-sonsie-one
brew install font-sorts-mill-goudy
brew install font-source-code-pro-for-powerline
brew install font-source-code-pro
brew install font-source-sans-pro
brew install font-source-serif-pro
brew install font-space-mono-nerd-font
brew install font-special-elite
brew install font-spicy-rice
brew install font-spinnaker
brew install font-spirax
brew install font-squada-one
brew install font-stalemate
brew install font-stalinist-one
brew install font-stardos-stencil
brew install font-stint-ultra-condensed
brew install font-stint-ultra-expanded
brew install font-stoke
brew install font-strait
brew install font-sue-ellen-francisco
brew install font-sunshiney
brew install font-supermercado-one
brew install font-swanky-and-moo-moo
brew install font-tauri
brew install font-teko
brew install font-telex
brew install font-tenor-sans
brew install font-terminess-nerd-font
brew install font-terminus
brew install font-tex-gyre-adventor
brew install font-tex-gyre-bonum
brew install font-tex-gyre-chorus
brew install font-tex-gyre-cursor
brew install font-tex-gyre-heros
brew install font-tex-gyre-pagella-math
brew install font-tex-gyre-pagella
brew install font-tex-gyre-schola
brew install font-tex-gyre-termes
brew install font-text-me-one
brew install font-thabit
brew install font-the-girl-next-door
brew install font-tienne
brew install font-tillana
brew install font-tinos-nerd-font
brew install font-titan-one
brew install font-titillium-web
brew install font-trade-winds
brew install font-trocchi
brew install font-trochut
brew install font-trykker
brew install font-tuffy
brew install font-tulpen-one
brew install font-twitter-color-emoji
brew install font-ubuntu-mono-nerd-font
brew install font-ubuntu-nerd-font
brew install font-ultra
brew install font-uncial-antiqua
brew install font-underdog
brew install font-unica-one
brew install font-unifrakturcook
brew install font-unifrakturmaguntia
brew install font-unkempt
brew install font-unlock
brew install font-unna
brew install font-vampiro-one
brew install font-varela-round
brew install font-varela
brew install font-vast-shadow
brew install font-vazir-code
brew install font-vazir
brew install font-vibur
brew install font-victor-mono-nerd-font
brew install font-vidaloka
brew install font-viga
brew install font-voces
brew install font-vollkorn
brew install font-voltaire
brew install font-vt323
brew install font-waiting-for-the-sunrise
brew install font-wallpoet
brew install font-waltograph
brew install font-warnes
brew install font-wellfleet
brew install font-wendy-one
brew install font-wire-one
brew install font-work-sans
brew install font-xits
brew install font-yanone-kaffeesatz
brew install font-yellowtail
brew install font-yeseva-one
brew install font-yesteryear
brew install font-zeyada


text:
dockerfile="docker-compose.yml";
user="david"
service="php7.1"
composer="/usr/local/bin/composer"

dir=$(dirname $0)
cd $dir

args=""
while [[ $# -ge 1 ]]
do
    args="$args $1"
    shift
done

docker-compose -f $dockerfile run --rm -u $user $service $composer $args


text:
class Dropbox
  class Api
    Base = '/1/datastores'

    class << self
      def connection
        Dropbox.connection
      end

      def list_datastores
        res = connection.get("#{Base}/list_datastores")
        ds  = res.body['datastores'].map do |v|
          Dropbox::DataStore.new v
        end
        {datastores: ds}
      end

      def delete_datastore handle
        res = connection.post("#{Base}/delete_datastore", handle: handle)
        {ok: res.body['ok']}
      end

      def get_or_create_datastore dsid
        res = connection.post("#{Base}/get_or_create_datastore", dsid: dsid)
        {rev: res.body['rev'], handle: res.body['handle'], created: res.body['created']}
      end

      def get_snapshot handle
        res  = connection.get("#{Base}/get_snapshot", handle: handle)
        rows = res.body['rows'].map do |v|
          Dropbox::Record.new v
        end
        {rev: res.body['rev'].to_i, rows: rows}
      end

      def get_deltas handle, rev
        res = connection.get("#{Base}/get_deltas", handle: handle, rev: rev)
        dts = (res.body['deltas'] || []).map do |v|
          Dropbox::Delta.new v
        end
        {deltas: dts}
      end

      def put_delta handle, delta
        payload = {handle: handle, rev: delta.rev, changes: delta.changes_to_json}

        # puts "Sending delta... #{payload}"
        res = connection.post("#{Base}/put_delta", payload)

        # puts res.body
        raise res.body.to_s unless res.body['rev']

        {rev: res.body['rev'].to_i}
      end
    end
  end
end