text:
if test ! $(which brew)
then
  echo "Installation de Homebrew"
  /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

# Ajout des binaires Homebrew au PATH
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc

# Mettre à jour la liste des applications disponibles
brew update

# Installer les nouvelles applications du bundle Brewfile
# et mettre à jour celles déjà présentes
brew bundle

echo "Ouverture de Dropbox pour commencer la synchronisation"
open -a Dropbox

echo "Installation des outils de développement Ruby"
# Mise à jour de RubyGems
sudo gem update --system --silent
# Installation de RVM
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable --ruby
# Installation de Bundler
sudo gem install bundler

## ************************* CONFIGURATION ********************************
echo "Configuration de quelques paramètres par défaut"

## FINDER

# Affichage de la bibliothèque
# chflags nohidden ~/Library

# Affichage de la barre latérale
defaults write com.apple.finder ShowStatusBar -bool true

# Afficher par défaut en mode colonne
# Flwv ▸ Cover Flow View
# Nlsv ▸ List View
# clmv ▸ Column View
# icnv ▸ Icon View
defaults write com.apple.finder FXPreferredViewStyle -string "clmv"

# Ne pas afficher le chemin d'accès
defaults write com.apple.finder ShowPathbar -bool false

# Affichage de toutes les extensions
sudo defaults write NSGlobalDomain AppleShowAllExtensions -bool true

# Afficher le dossier maison par défaut
defaults write com.apple.finder NewWindowTarget -string "PfHm"
defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"

# Recherche dans le dossier en cours par défaut
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"

# Fenêtre de sauvegarde complète par défaut
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true

# Fenêtre d'impression complète par défaut
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true

# Sauvegarde sur disque (et non sur iCloud) par défaut
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

# Coup d'œil : sélection de texte
defaults write com.apple.finder QLEnableTextSelection -bool true

# Ne pas alerter en cas de modification de l'extension d'un fichier
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

# Pas de création de fichiers .DS_STORE sur les disques réseau et externes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

# Supprimer l'alerte de quarantaine des applications
defaults write com.apple.LaunchServices LSQuarantine -bool false

## DOCK

# Taille minimum
defaults write com.apple.dock tilesize -int 32
# Agrandissement actif
defaults write com.apple.dock magnification -bool true
# Taille maximale pour l'agrandissement
defaults write com.apple.dock largesize -float 128

## MISSION CONTROL

# Pas d'organisation des bureaux en fonction des apps ouvertes
defaults write com.apple.dock mru-spaces -bool false

# Mot de passe demandé immédiatement quand l'économiseur d'écran s'active
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0

## COINS ACTIFS

#  0: no-op
#  2: Mission Control
#  3: Show application windows
#  4: Desktop
#  5: Start screen saver
#  6: Disable screen saver
#  7: Dashboard
# 10: Put display to sleep
# 11: Launchpad
# 12: Notification Center

# En haut à gauche : bureau
# defaults write com.apple.dock wvous-tl-corner -int 4
# defaults write com.apple.dock wvous-tl-modifier -int 0

# En haut à droite : screensaver
defaults write com.apple.dock wvous-tr-corner -int 5
defaults write com.apple.dock wvous-tr-modifier -int 0

# En bas à gauche : fenêtres de l'application
# defaults write com.apple.dock wvous-bl-corner -int 3
# defaults write com.apple.dock wvous-bl-modifier -int 0

# En bas à droite : Mission Control
# defaults write com.apple.dock wvous-br-corner -int 2
# defaults write com.apple.dock wvous-br-modifier -int 0

## CLAVIER ET TRACKPAD

# Accès au clavier complet (tabulation dans les boîtes de dialogue)
sudo defaults write NSGlobalDomain AppleKeyboardUIMode -int 3

# Arrêt pop-up clavier façon iOS
sudo defaults write -g ApplePressAndHoldEnabled -bool false

# Répétition touches plus rapide
sudo defaults write NSGlobalDomain KeyRepeat -int 1
# Délai avant répétition des touches
sudo defaults write NSGlobalDomain InitialKeyRepeat -int 10

# Trackpad : toucher pour cliquer
#sudo defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
#sudo defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1

## APPS

# Vérifier la disponibilité de mise à jour quotidiennement
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1

# Safari : menu développeur / URL en bas à gauche / URL complète en haut / Do Not Track / affichage barre favoris
defaults write com.apple.safari IncludeDevelopMenu -int 1
defaults write com.apple.safari ShowOverlayStatusBar -int 1
defaults write com.apple.safari ShowFullURLInSmartSearchField -int 1
defaults write com.apple.safari SendDoNotTrackHTTPHeader -int 1
defaults write com.apple.Safari ShowFavoritesBar -bool true

# Chrome : désactiver la navigation dans l'historique au swipe
#defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool FALSE

# Photos : pas d'affichage pour les iPhone
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES

# TextEdit : .txt par défaut
defaults write com.apple.TextEdit RichText -int 0

# TextEdit : ouvre et enregistre les fichiers en UTF-8
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4

## SONS

# Alertes sonores quand on modifie le volume
sudo defaults write com.apple.systemsound com.apple.sound.beep.volume -float 1

## IMAGES

# Enregistrer les screenshots en PNG (autres options: BMP, GIF, JPG, PDF, TIFF)
defaults write com.apple.screencapture type -string "png"

# Ne pas mettre d'ombre sur les screenshots
defaults write com.apple.screencapture disable-shadow -bool true

## ************ Fin de l'installation *********
echo "Finder et Dock relancés… redémarrage nécessaire pour terminer."
killall Dock
killall Finder

echo "Derniers nettoyages…"
brew cleanup
rm -f -r /Library/Caches/Homebrew/*

echo ""
echo "ET VOILÀ !"
echo "Après synchronisation des données Dropbox (seuls les dossiers « Mackup » et « Settings » sont nécessaires dans un premier temps), lancer le script post-cloud.sh"


text:
ASP.NET Core middleware to establish endpoints which proxy to another server, e.g. forward API calls.

Inspired by
* https://github.com/aspnet/Proxy (Apache 2 License)
* http://stackoverflow.com/questions/34932382/creating-an-api-proxy-in-asp-net-mvc-6

Freely available under the terms of the MIT license.

## Installation

You can install *GlacierCrates.AspNetCore.ApiProxy* via nuget using the UI or the Package Manager Console

    Install-Package GlacierCrates.AspNetCore.ApiProxy

## Configuration

In your `Configure` method you can setup the proxy like this:

    public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
    {
        loggerFactory.AddConsole(Configuration.GetSection("Logging"));
        loggerFactory.AddDebug();

        var options = new ApiProxyOptions();
        options.ProxiedEndpoints = new[] { new ApiEndpointOption() { Endpoint = "/api2", Host = "localhost", TargetEndpoint = "/api" } };
        app.RunApiProxy(options);

        app.UseMvc();
    }

For the endpoint options all parameters except `Endpoint` are optional and default to the current request or localhost or port 80.

redpajama_set_name: RedPajamaGithub


text:
module Shoulda
  module Matchers
    module ActiveModel
      module NumericalityMatchers
        # @private
        class EvenNumberMatcher < NumericTypeMatcher
          NON_EVEN_NUMBER_VALUE = 1

          def allowed_type
            'even numbers'
          end

          def diff_to_compare
            2
          end

          protected

          def wrap_disallow_value_matcher(matcher)
            matcher.with_message(:even)
          end

          def disallowed_value
            if @numeric_type_matcher.given_numeric_column?
              NON_EVEN_NUMBER_VALUE
            else
              NON_EVEN_NUMBER_VALUE.to_s
            end
          end
        end
      end
    end
  end
end


text:
<?php

namespace Mage\Checkout\Test\Block\Onepage\Review\Items;

use Mage\Checkout\Test\Block\AbstractItem;

/**
 * Item product form on order review items block.
 */
class Product extends AbstractItem
{
    /**
     * Items tax type.
     *
     * @var array
     */
    protected $pricesType = [
        'cart_item_price_excl_tax' => [
            'selector' => '[data-rwd-label="Price (Excl. Tax)"] span.price'
        ],
        'cart_item_price_incl_tax' => [
            'selector' => '[data-rwd-label="Price (Incl. Tax)"] span.price'
        ],
        'cart_item_subtotal_excl_tax' => [
            'selector' => '[data-rwd-label="Subtotal (Excl. Tax)"] span.price'
        ],
        'cart_item_subtotal_incl_tax' => [
            'selector' => '[data-rwd-label="Subtotal (Incl. Tax)"] span.price'
        ],
        'cart_item_price' => ['selector' => '[data-rwd-label="Price"] .cart-price .price'],
        'cart_item_subtotal' => ['selector' => '[data-rwd-label="Subtotal"] .cart-price .price']
    ];
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.redkale.test.service;

/**
 *
 * @author zhangjx
 * @param <V> V
 * @param <A> A
 */
public abstract class MyAsyncHandler<V, A> extends MyAsyncInnerHandler<V, A> {

    public abstract int id();

}


text:
package binarytree.abr;

import java.util.LinkedList;

public class MainAbr {

    public static void main(String[] args) {

      //MyTreeAbr t = MyTreeAbr.makeTree(new int[]{1,2,3,4,5,6,7,8}, 0, 7);
      MyTreeAbr t2 = new MyTreeAbr(2, createLinkedList(new MyTreeAbr(8, createLinkedList(new MyTreeAbr(1)))));
      MyTreeAbr t6 = new MyTreeAbr(6, createLinkedList(new MyTreeAbr(7)));
      MyTreeAbr t4 = new MyTreeAbr(4, createLinkedList(new MyTreeAbr(10), t6, new MyTreeAbr(5)));
      MyTreeAbr t3 = new MyTreeAbr(3, createLinkedList(t4, new MyTreeAbr(9, createLinkedList(t2))));
      MyTreeAbr.printLevels(t3);
    }

  static <T> LinkedList<T> createLinkedList(T...elements) {
    LinkedList<T> newList = new LinkedList<T>();
    for (T el : elements) {
      newList.add(el);
    }

    return newList;
  }
}


text:
package com.emjay.simpleitems;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import com.emjay.simpleitems.DragAndDropListView.DynamicListView;

public class TabManagerActivity extends Activity implements OnClickListener {

	private ArrayList<String> tabNames;

	private StableArrayAdapter adapter;

	private DynamicListView dragDropListView;

	private TabListState state = TabListState.CheckItems;

	private enum TabListState {
		CheckItems, DeleteItems
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_tab_manager);

		getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);

		Button button = (Button) findViewById(R.id.button_add_tab);
		button.setOnClickListener(this);

		Button button2 = (Button) findViewById(R.id.button_save);
		button2.setOnClickListener(this);

		this.tabNames = (ArrayList<String>) getIntent().getExtras().getSerializable("Tabnames");

		this.dragDropListView = (DynamicListView) findViewById(R.id.tablist);
		this.adapter = new StableArrayAdapter(this, R.layout.tab_unit_list, this.tabNames);

		this.dragDropListView.setCheeseList(this.tabNames);
		this.dragDropListView.setAdapter(this.adapter);
		this.dragDropListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
	}

	private void resetUI() {
		EditText tabNameEditText = (EditText) findViewById(R.id.new_tab_name);
		tabNameEditText.setText("");
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {

		getMenuInflater().inflate(R.menu.tabmanager, menu);
		return super.onCreateOptionsMenu(menu);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {

		switch (item.getItemId()) {
		case R.id.action_bin:
			changeTabListState(item);
			this.adapter.notifyDataSetChanged();
			break;
		}

		return super.onOptionsItemSelected(item);
	}

	private void changeTabListState(MenuItem item) {

		if (this.state == TabListState.CheckItems) {

			this.state = TabListState.DeleteItems;
			item.setIcon(R.drawable.ic_action_moving);
		} else if (this.state == TabListState.DeleteItems) {

			this.state = TabListState.CheckItems;
			item.setIcon(R.drawable.ic_action_discard);
		}
	}

	@Override
	public void onClick(View v) {

		if (v.getId() == R.id.button_add_tab) {

			EditText tabNameEditText = (EditText) findViewById(R.id.new_tab_name);
			String tabname = tabNameEditText.getText().toString();
			tabname.trim();

			if (tabname.isEmpty()) {
				Toast.makeText(this, "Empty Tab Name", Toast.LENGTH_SHORT).show();
			} else if (this.tabNames.contains(tabname)) {
				Toast.makeText(this, "Tabname already exists", Toast.LENGTH_SHORT).show();
			} else {
				this.adapter.addTabname(tabname);
				resetUI();
			}
		} else if (v.getId() == R.id.button_save) {

			Intent intent = new Intent();
			intent.putExtra("Tabnames", this.tabNames);
			setResult(RESULT_OK, intent);
			finish();
		}
	}

	public class StableArrayAdapter extends ArrayAdapter<String> {

	    final int INVALID_ID = -1;

	    HashMap<String, Integer> mIdMap = new HashMap<String, Integer>();

	    public StableArrayAdapter(Context context, int textViewResourceId, List<String> objects) {
	        super(context, textViewResourceId, objects);
	        for (int i = 0; i < objects.size(); ++i) {
	            mIdMap.put(objects.get(i), i);
	        }
	    }

	    @Override
	    public long getItemId(int position) {
	        if (position < 0 || position >= mIdMap.size()) {
	            return INVALID_ID;
	        }
	        String item = getItem(position);
	        return mIdMap.get(item);
	    }

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

	    @Override
	    public View getView(int position, View convertView, ViewGroup parent) {

	    	if (convertView == null) {
	    		LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
	    		convertView = layoutInflater.inflate(R.layout.tab_unit_list, parent, false);
	    	}

			String tabname = tabNames.get(position);
			TextView itemlistNameText = (TextView) convertView.findViewById(R.id.tab_name);

			itemlistNameText.setTextSize(20f);
			itemlistNameText.setText(tabname);

			ImageView imageViewButton = (ImageView) convertView.findViewById(R.id.tab_button);
			imageViewButton.setTag(position);

			// Because if Focusable is enabled you cant click the ListView items to drag and drop.
			// and you must set the Focusable at runtime. Cause the constructor of ImageButton set it to true!
			imageViewButton.setFocusable(false);

			if (state == TabListState.DeleteItems) {

				imageViewButton.setImageResource(R.drawable.ic_action_discard);
				imageViewButton.setOnClickListener(new OnClickListener() {
					@Override
					public void onClick(View v) {
						// TODO Auto-generated method stub
						int index = (int) v.getTag();

						String tabname = tabNames.get(index);
						removeTabname(tabname);
						notifyDataSetChanged();
					}
				});
			} else if (state == TabListState.CheckItems) {

				imageViewButton.setImageResource(R.drawable.ic_action_moving);
			}

			return convertView;
	    }

	    public void addTabname(String tabname) {

	    	add(tabname);
	    	mIdMap.put(tabname, mIdMap.size());
	    }

	    public void removeTabname(String tabname) {

	    	remove(tabname);
	    	mIdMap.remove(tabname);
	    }
	}
}


text:
package org.codehaus.groovy.ast.tools;

import org.codehaus.groovy.ast.ClassHelper;
import org.codehaus.groovy.ast.ClassNode;
import org.codehaus.groovy.ast.MethodNode;
import org.codehaus.groovy.ast.Parameter;
import org.codehaus.groovy.ast.PropertyNode;
import org.codehaus.groovy.ast.expr.Expression;
import org.codehaus.groovy.ast.expr.MapExpression;
import org.codehaus.groovy.ast.expr.SpreadExpression;
import org.codehaus.groovy.ast.expr.TupleExpression;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static org.codehaus.groovy.ast.ClassHelper.boolean_TYPE;

public class ClassNodeUtils {
    public static void addInterfaceMethods(ClassNode cnode, Map<String, MethodNode> methodsMap) {
        // add in unimplemented abstract methods from the interfaces
        for (ClassNode iface : cnode.getInterfaces()) {
            Map<String, MethodNode> ifaceMethodsMap = iface.getDeclaredMethodsMap();
            for (String methSig : ifaceMethodsMap.keySet()) {
                if (!methodsMap.containsKey(methSig)) {
                    MethodNode methNode = ifaceMethodsMap.get(methSig);
                    methodsMap.put(methSig, methNode);
                }
            }
        }
    }

    public static Map<String, MethodNode> getDeclaredMethodMapsFromInterfaces(ClassNode classNode) {
        Map<String, MethodNode> result = new HashMap<String, MethodNode>();
        ClassNode[] interfaces = classNode.getInterfaces();
        for (ClassNode iface : interfaces) {
            result.putAll(iface.getDeclaredMethodsMap());
        }
        return result;
    }

    public static void addDeclaredMethodMapsFromSuperInterfaces(ClassNode cn, Map<String, MethodNode> allInterfaceMethods) {
        List cnInterfaces = Arrays.asList(cn.getInterfaces());
        ClassNode sn = cn.getSuperClass();
        while (sn != null && !sn.equals(ClassHelper.OBJECT_TYPE)) {
            ClassNode[] interfaces = sn.getInterfaces();
            for (ClassNode iface : interfaces) {
                if (!cnInterfaces.contains(iface)) {
                    allInterfaceMethods.putAll(iface.getDeclaredMethodsMap());
                }
            }
            sn = sn.getSuperClass();
        }
    }

    /**
     * Returns true if the given method has a possibly matching static method with the given name and arguments.
     *
     * @param cNode     the ClassNode of interest
     * @param name      the name of the method of interest
     * @param arguments the arguments to match against
     * @param trySpread whether to try to account for SpreadExpressions within the arguments
     * @return true if a matching method was found
     */
    public static boolean hasPossibleStaticMethod(ClassNode cNode, String name, Expression arguments, boolean trySpread) {
        int count = 0;
        boolean foundSpread = false;

        if (arguments instanceof TupleExpression) {
            TupleExpression tuple = (TupleExpression) arguments;
            for (Expression arg : tuple.getExpressions()) {
                if (arg instanceof SpreadExpression) {
                    foundSpread = true;
                } else {
                    count++;
                }
            }
        } else if (arguments instanceof MapExpression) {
            count = 1;
        }

        for (MethodNode method : cNode.getMethods(name)) {
            if (method.isStatic()) {
                Parameter[] parameters = method.getParameters();
                // do fuzzy match for spread case: count will be number of non-spread args
                if (trySpread && foundSpread && parameters.length >= count) return true;

                if (parameters.length == count) return true;

                // handle varargs case
                if (parameters.length > 0 && parameters[parameters.length - 1].getType().isArray()) {
                    if (count >= parameters.length - 1) return true;
                    // fuzzy match any spread to a varargs
                    if (trySpread && foundSpread) return true;
                }

                // handle parameters with default values
                int nonDefaultParameters = 0;
                for (Parameter parameter : parameters) {
                    if (!parameter.hasInitialExpression()) {
                        nonDefaultParameters++;
                    }
                }

                if (count < parameters.length && nonDefaultParameters <= count) {
                    return true;
                }
                // TODO handle spread with nonDefaultParams?
            }
        }
        return false;
    }

    /**
     * Return true if we have a static accessor
     */
    public static boolean hasPossibleStaticProperty(ClassNode candidate, String methodName) {
        // assume explicit static method call checked first so we can assume a simple check here
        if (!methodName.startsWith("get") && !methodName.startsWith("is")) {
            return false;
        }
        String propName = getPropNameForAccessor(methodName);
        PropertyNode pNode = getStaticProperty(candidate, propName);
        return pNode != null && (methodName.startsWith("get") || boolean_TYPE.equals(pNode.getType()));
    }

    /**
     * Returns the property name, e.g. age, given an accessor name, e.g. getAge.
     * Returns the original if a valid prefix cannot be removed.
     *
     * @param accessorName the accessor name of interest, e.g. getAge
     * @return the property name, e.g. age, or original if not a valid property accessor name
     */
    public static String getPropNameForAccessor(String accessorName) {
        if (!isValidAccessorName(accessorName)) return accessorName;
        int prefixLength = accessorName.startsWith("is") ? 2 : 3;
        return String.valueOf(accessorName.charAt(prefixLength)).toLowerCase() + accessorName.substring(prefixLength + 1);
    }

    /**
     * Detect whether the given accessor name starts with "get", "set" or "is" followed by at least one character.
     *
     * @param accessorName the accessor name of interest, e.g. getAge
     * @return true if a valid prefix is found
     */
    public static boolean isValidAccessorName(String accessorName) {
        if (accessorName.startsWith("get") || accessorName.startsWith("is") || accessorName.startsWith("set")) {
            int prefixLength = accessorName.startsWith("is") ? 2 : 3;
            return accessorName.length() > prefixLength;
        };
        return false;
    }

    public static boolean hasStaticProperty(ClassNode cNode, String propName) {
        return getStaticProperty(cNode, propName) != null;
    }

    /**
     * Detect whether a static property with the given name is within the class
     * or a super class.
     *
     * @param cNode the ClassNode of interest
     * @param propName the property name
     * @return the static property if found or else null
     */
    public static PropertyNode getStaticProperty(ClassNode cNode, String propName) {
        ClassNode classNode = cNode;
        while (classNode != null) {
            for (PropertyNode pn : classNode.getProperties()) {
                if (pn.getName().equals(propName) && pn.isStatic()) return pn;
            }
            classNode = classNode.getSuperClass();
        }
        return null;
    }

    public static boolean isInnerClass(ClassNode currentClass) {
        return currentClass.getOuterClass() != null && !currentClass.isStaticClass();
    }
}


text:
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Manatee.Trello.Internal.DataAccess;
using Manatee.Trello.Internal.Validation;
using Manatee.Trello.Json;

namespace Manatee.Trello
{
	/// <summary>
	/// A collection of custom field drop down options.
	/// </summary>
	public class DropDownOptionCollection : ReadOnlyDropDownOptionCollection,
	                                        IDropDownOptionCollection
	{
		internal DropDownOptionCollection(Func<string> getOwnerId, TrelloAuthorization auth)
			: base(getOwnerId, auth)
		{
		}

		/// <summary>
		/// Adds a new drop down option.
		/// </summary>
		/// <param name="text">The option's text.</param>
		/// <param name="position">The option's position.</param>
		/// <param name="color">(Optional) the option's color.</param>
		/// <param name="ct">(Optional) A cancellation token for async processing.</param>
		/// <returns>The <see cref="IDropDownOption"/> generated by Trello.</returns>
		public async Task<IDropDownOption> Add(string text, Position position, LabelColor? color = null,
		                                       CancellationToken ct = default)
		{
			var error = NotNullRule<string>.Instance.Validate(null, text);
			if (error != null)
				throw new ValidationException<string>(text, new[] {error});

			var json = TrelloConfiguration.JsonFactory.Create<IJsonCustomDropDownOption>();
			json.Color = color;
			json.Pos = Position.GetJson(position);
			json.Text = text;

			var endpoint = EndpointFactory.Build(EntityRequestType.CustomFieldDefinition_Write_AddOption,
			                                     new Dictionary<string, object>
				                                     {
					                                     {"_id", OwnerId}
				                                     });
			var newData = await JsonRepository.Execute(Auth, endpoint, json, ct);

			return new DropDownOption(newData, Auth);
		}
	}
}


text:
///////////////////////////////////////////////////////////////////////////////////
// Open 3D Model Viewer (open3mod) (v2.0)
// [ThumbnailViewBase.cs]
// (c) 2012-2015, Open3Mod Contributors
//
// Licensed under the terms and conditions of the 3-clause BSD license. See
// the LICENSE file in the root folder of the repository for the details.
//
// HIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
///////////////////////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

using System.Windows.Forms;

namespace open3mod
{
    /// <summary>
    /// Defines base behavior for the thumbnail panels used in the materials and textures tabs
    /// </summary>
    /// <typeparam name="TThumbnailType">(User) control type that pertains to a single thumbnail</typeparam>
    public abstract class ThumbnailViewBase<TThumbnailType> where TThumbnailType : ThumbnailControlBase<TThumbnailType>
    {
        protected readonly FlowLayoutPanel Flow;
        // Not ordered - Flow is authoritative of order.
        protected readonly List<TThumbnailType> Entries;
        private TThumbnailType _selectedEntry;

        private ToolTip _toolTip;

        protected ThumbnailViewBase(FlowLayoutPanel flow)
        {
            Flow = flow;
            Flow.AutoScroll = false;
            Entries = new List<TThumbnailType>();

            _toolTip = new ToolTip();
        }

        public bool Empty
        {
            get { return Entries.Count == 0; }
        }

        /// <summary>
        /// Gets the selected thumbnail entry, or null if there is no selection.
        /// </summary>
        public TThumbnailType SelectedEntry
        {
            get { return _selectedEntry; }
        }

        /// <summary>
        /// Remove the given thumbnail entry from the view.
        /// </summary>
        /// <param name="thumb"></param>
        /// <returns>Previous index of the entry for re-insertion/undo purposes.</returns>
        public int RemoveEntry(TThumbnailType thumb)
        {
            var index = Flow.Controls.GetChildIndex(thumb);
            Entries.Remove(thumb);
            Flow.Controls.Remove(thumb);
            return index;
        }

        /// <summary>
        /// Makes a given entry in the thumbnail view the currently selected one
        /// </summary>
        /// <param name="thumb">Entry to select, must be contained in the thumbnail view</param>
        public void SelectEntry(TThumbnailType thumb)
        {
            Debug.Assert(Entries.Contains(thumb));

            if (thumb == SelectedEntry)
            {
                return;
            }

            thumb.IsSelected = true;

            if (_selectedEntry != null)
            {
                _selectedEntry.IsSelected = false;
            }
            _selectedEntry = thumb;
        }

        /// <summary>
        /// Ensure a specific thumbnail entry is visible (i.e. scroll so it is).
        /// </summary>
        /// <param name="thumb">Entry to scroll to, must be contained in the thumbnail view</param>
        public void EnsureVisible(TThumbnailType thumb)
        {
            Debug.Assert(Entries.Contains(thumb));
            Flow.ScrollControlIntoView(thumb);
        }

        /// <summary>
        /// Adds a given entry to the thumbnail view.
        /// </summary>
        /// <param name="control">Entry to be added, it may not be contained in the
        /// thumbnail view yet</param>
        /// <param name="index">Index at which to add the entry, -1 to add to end.</param>
        public TThumbnailType AddEntry(TThumbnailType control, int index = -1)
        {
            Debug.Assert(!Entries.Contains(control));

            control.Click += (sender, args) =>
            {
                var v = sender as TThumbnailType;
                if (v != null)
                {
                    SelectEntry(v);
                }
            };

            Entries.Add(control);
            Flow.Controls.Add(control);
            if (index != -1)
            {
                Flow.Controls.SetChildIndex(control, index);
            }

            control.OnSetTooltips(_toolTip);
            return control;
        }
    }
}

/* vi: set shiftwidth=4 tabstop=4: */


text:
An example of using git hooks with [npm run scripts](https://docs.npmjs.com/cli/run-script) and [Surge](https://surge.sh).

## Getting started

To try out this example, clone the project and add a test commit and you'll be prompted to publish.

In your own project, install [Surge](https://github.com/sintaxi/surge) and [git-scripts](https://github.com/nkzawa/git-scripts):

```sh
npm install --save-dev surge git-scripts
```

Next, in your `package.json`, add the git hook you'd like to run your npm task on. Finally, add add a `npm run` task for Surge:

```json
"git": {
  "scripts": {
    "post-commit": "npm run deploy",
    "pre-push": "npm run deploy"
  }
},
"scripts": {
  "deploy": "surge --project ./ --domain my-project.surge.sh"
}
```

Now, anyone can `npm run deploy` to use Surge, and they will also deploy `post-commit` and `pre-push` (note the later requires git 1.8.x and up).

In practice, you probably won't want to publish `post-commit`, but `pre-push` is very useful. The full list of hooks is [available here](https://github.com/nkzawa/git-scripts#description).

## License

[The MIT License (MIT)](LICENSE.md)

Copyright © 2015 [Chloi Inc.](http://chloi.io)


text:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Project:     Documentation Tools
%% Descr:       Latex -->  MAN-page (groff -man), LATEX documentation
%% Author:      Dr. Jürgen Vollmer, Juergen.Vollmer@informatik-vollmer.de
%% $Id: latex2man.tex,v 1.187 2008/11/11 07:21:18 vollmer Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Latex2man is a tool to translate UNIX manual pages written with LaTeX into a
%% format understood by the UNIX man(1)-command.
%% Alternatively HTML or TexInfo code can be produced too.
%% Output of parts of the text may be supressed using the conditional text
%% feature.
%%
%% There is LaTeX package (latex2man.sty) used for writing the Man-page
%% and a PERL script (latex2man) doing the actual translation.
%%
%% Copyright (C) 1998, Dr. Juergen Vollmer
%%                     Viktoriastrasse 15, D-76133 Karlsruhe, Germany
%%                     Juergen.Vollmer@informatik-vollmer.de
%% License:
%%   This program can be redistributed and/or modified under the terms
%%   of the LaTeX Project Public License Distributed from CTAN
%%   archives in directory macros/latex/base/lppl.txt; either
%%   version 1 of the License, or any later version.
%%
%% If you find this software useful, please send me a postcard.
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[english]{article}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{verbatim}

%% do we have the `hyperref package?
\IfFileExists{hyperref.sty}{
   \usepackage[bookmarksopen,bookmarksnumbered]{hyperref}
}{}

%% do we have the `fancyhdr' package?
\IfFileExists{fancyhdr.sty}{
\usepackage[fancyhdr]{latex2man}
}{
%% do we have the `fancyheadings' package?
\IfFileExists{fancyheadings.sty}{
\usepackage[fancy]{latex2man}
}{
\usepackage[nofancy]{latex2man}
\message{no fancyhdr or fancyheadings package present, discard it}
}}

%% do we have the `rcsinfo' package?
\IfFileExists{rcsinfo.sty}{
\usepackage[nofancy]{rcsinfo}
\rcsInfo $Id: latex2man.tex,v 1.187 2008/11/11 07:21:18 vollmer Exp $
\setDate{\rcsInfoLongDate}
}{
\setDate{2008/11/11}    %%%% must be manually set, if rcsinfo is not present
\message{package rcsinfo not present, discard it}
}

\setVersionWord{Version:}  %%% that's the default, no need to set it.
\setVersion{1.23}

\begin{document}

\begin{Name}{1}{latex2man}{Dr.~J{\"u}rgen Vollmer}{Documentation Tools}{\LaTeX2man\\--\\ A Documentation Tool}

  \Prog{Latex2man} is a tool to translate UNIX manual pages written with
  \LaTeX\ into a format understood by the UNIX \Cmd{man}{1}-command.
  Alternatively HTML, TexInfo, or \LaTeX\ code can be produced too.
  Output of parts of the text may be suppressed using the conditional text
  feature (for this, LaTeX generation may be used).
\end{Name}

\section{Synopsis}
%%%%%%%%%%%%%%%%%%

\Prog{latex2man} \oOptArg{-t}{transfile}
                 \oOpt{-HMTL} \oOpt{-h} \oOpt{-V} \oOptArg{-C}{name} \TEXIbr
                 \oOptArg{-a}{char}
                 \Arg{infile}
                 \Arg{outfile}

\section{Description}
%%%%%%%%%%%%%%%%%%%%%
\Prog{Latex2man} reads the file \Arg{infile} and writes \Arg{outfile}. The
input must be a \LaTeX\ document using the \Prog{latex2man} \LaTeX\ package.
\Prog{Latex2man} translates that document into the \Cmd{troff}{1} format using
the \Opt{-man} macro package.

Using the \Opt{-H} option, HTML code can be produced, instead of
\Cmd{troff}{1}.

Using the \Opt{-T} option, TexInfo code can be produced, instead of
\Cmd{troff}{1}.

Using the \Opt{-M} option, \Cmd{troff}{1} input is produced.

Using the \Opt{-L} option, \LaTeX\ ouput can be produced, instead of
\Cmd{troff}{1}.

\section{Options}
%%%%%%%%%%%%%%%%%
\begin{Description}[\OptArg{-t}{transfile}]\setlength{\itemsep}{0cm}
\item[\OptArg{-t}{transfile}] Translation for user defined \LaTeX\ macros.
\item[\Opt{-M}] Produce output suitable for the \Cmd{man}{1} command (default).
\item[\Opt{-H}] Instead of producing output suitable for the \Cmd{man}{1}
     command, HTML code is produced (despite the name of the command).
\item[\Opt{-T}] Instead of producing output suitable for the \Cmd{man}{1}
     command, TexInfo code is produced (despite the name of the command).  The
     generated \File{.texi}-file may be processed with \Cmd{makeinfo}{1}
     (to produce an \File{.info}-file) which in turn may be installed using
     \Cmd{install-info}{1}.  The Info tags \verb+@dircategory+ and
     \verb+@direntry+ are provided.
\item[\Opt{-L}] The \LaTeX\ source is written to the \Arg{outfile}. This is
     useful in conjunction with the \OptArg{-C}{name} option.
\item[\OptArg{-C}{name}] Output the conditional text for \Arg{name}.  If more
     than one name should be given use quotes: \OptArg{-C}{'name1 name2 ...'}\\
     The following names are defined automatically:
     \begin{itemize}
        \item \Opt{-H} defines \texttt{HTML}
        \item \Opt{-T} defines \texttt{TEXI}
        \item \Opt{-M} defines \texttt{MAN}
        \item \Opt{-L} defines \texttt{LATEX}
     \end{itemize}
 \item[\OptArg{-a}{char}] Is used only in conjunction with -T.\\
     Background:\\
     TexInfo ignores all blanks before the first word on a new line. In order
     to produce some additional space before that word (using \Bs SP) some
     character has to be printed before the additional space. By default this
     is a . (dot).  The \Arg{char} specifies an alternative for that first
     character.  Giving a blank to
     \Opt{-a} supresses the indentation of a line.\\
     Note: only for the first \Bs SP of a series that \Arg{char} is printed.
\item[\Opt{-h}] Show a help text.
\item[\Opt{-V}] Show version information.
\end{Description}

\section{Files}
%%%%%%%%%%%%%%%

\begin{Description}\setlength{\itemsep}{0cm}
\item[\File{latex2man.tex}] The \LaTeX\ file containing this Man-page.
\item[\File{latex2man.sty}] The \LaTeX\ package defining the environments and
     commands.
\item[\File{latex2man.cfg}] The configuration file for \Prog{Latex2man}
     \LaTeX-package.
\item[\File{latex2man.trans}] File containing example translations of user
     defined \LaTeX\ macros.
\item[\File{fancyheadings.sty}] A \LaTeX\ package used to typeset head- and
     foot lines.
\item[\File{fancyhdr.sty}] A \LaTeX\ package used to typeset head- and foot
     lines.
\item[\File{rcsinfo.sty}] A \LaTeX\ package used to extract and use RCS version
     control information in \LaTeX\ documents.
\end{Description}

\section{See Also}
%%%%%%%%%%%%%%%%%%

\LaTeX, TexInfo, \Cmd{troff}{1}, \Cmd{groff}{1}, \Cmd{makeinfo}{1}.

\section{\LaTeX\ commands}
%%%%%%%%%%%%%%%%%%%%%%%%%%

The \LaTeX\ package \texttt{latex2man} is used to write the Man-pages with
\LaTeX.  Since we translate into other text formats, not all \LaTeX\ stuff can
be translated.

\subsection{Package Options}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The \texttt{latex2man} package accepts the following options:

\begin{description}\setlength{\itemsep}{0cm}
\item[fancy]    use the  \LaTeX\ package \texttt{fancyheadings}.
\item[fancyhdr] use the  \LaTeX\ package \texttt{fancyhdr}.
\item[nofancy] neither the \LaTeX\ package \texttt{fancyheadings} nor
     \texttt{fancyhdr} are used.
\end{description}

The default option may be specified in the file \texttt{latex2man.cfg}.

\subsection{Package Specific Environments}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following environments are provided by the package:
\begin{description}\setlength{\itemsep}{0cm}
\item[\Bs begin\{Name\}\{chapter\}\{name\}\{author\}\{info\}\{title\} ] The
     \texttt{Name} environment takes five arguments: 1.\ the Man-page chapter,
     2.\ the name of the Man-page, 3.\ the author, 4.\ some short information
     about the tool printed in the footline of the Man-page, and 5.\ a text
     which is used as title, for HTML and \LaTeX\ (it's ignored for output of
     the Man-page or TeXinfo. The \texttt{Name} environment must be the first
     environment in the document. Processing starts with this environment. Any
     text before this is ignored (exception: the \verb+setVersion+ and
     \verb+setDate+ commands).  (Note: all arguments of \Bs begin\{Name\} must
     be written on one line).
\item[\Bs begin\{Table\}\Lbr width\Rbr\{columns\}] The \texttt{Table}
     environment takes two arguments: the first optional one specifies
     a width of the last column, the second one gives the number of columns.
     For example:

     \verb+\begin{Table}[2cm]{3}+            \\
     \verb+ Here & am  & I   \\\hline+  \\
     \verb+  A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5 \\+        \\
     \verb+  B 1 & B 2 & B 3 \\+        \\
     \verb+\end{Table}+

     will be typeset as:

     \begin{Table}[2cm]{3}
       Here & am  & I   \\\hline
        A 1 & A 2 & A 3 1 2 3 4 5 A 3 1 2 3 4 5\\
        B 1 & B 2 & B 3 \\
     \end{Table}

     If no optional \emph{width} argument is given, all entries are
     typeset left justified.
     The \emph{width} is a length measured absolutly in \emph{cm}.
     Processing with \LaTeX\ a \verb+p{width}+ column is typeset
     as last column. The translation to \Cmd{troff}{1} commands
     results in a \texttt{lw(width)} column specification. Translating
     to HTML and TexInfo ignores the \emph{width} parameter.

     \verb+\hline+ may be used.

     If the Man-page is formatted with \Cmd{troff}{1} and tables are used, the
     \Cmd{tbl}{1} preprocessor should be called, usually by giving
     a \Opt{-t} to the call of \Cmd{troff}{1}. When viewing the generated
     manula page using \Cmd{man}{1}, \Cmd{tbl}{1} is called automatically.
\item[\Bs begin\{Description\}] is the same as \Bs begin\{description\}
\item[\Bs begin\{Description\}\Lbr label\Rbr] is similar to
     \Bs begin\{description\}, but the item labels have at minimum the size
     of the (optional) word \emph{label}. The difference is visible only
     in the DVI and PDF-output, not in the troff, TexInfo or HTML output.
     \begin{description}
     \item[a]   \Bar a \verb+\begin{description}+
     \item[ab]  \Bar ab
     \item[abc] \Bar abc
     \end{description}
     \begin{Description}
     \item[a]  \Bar a \verb+\begin{Description}+
     \item[ab] \Bar ab
     \item[abc]\Bar abc
     \end{Description}
     \begin{Description}[ab]
     \item[a]   \Bar a \verb+\begin{Description}[aa]+
     \item[ab]  \Bar ab
     \item[abc] \Bar abc
     \end{Description}
\end{description}

\subsection{Accepted \LaTeX\ Environments}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following environments are accepted:
\begin{itemize}\setlength{\itemsep}{0cm}
\item \texttt{description}
\item \texttt{enumerate}
\item \texttt{itemize}
\item \texttt{verbatim}
\item \texttt{center}
\end{itemize}

They may be nested:
\begin{itemize}
\item Itemize and nested center:
     \begin{center}
       A centered line.\\
       Another centered line.
     \end{center}
\item Another item an nested enumerate
     \begin{enumerate}
       \item a
       \item b
     \end{enumerate}
\end{itemize}

\subsection{Package Specific Macros}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following commands are provided:
\begin{description}\setlength{\itemsep}{0cm}
\item[\Bs Opt\{option\}] Option:  \verb+\Opt{-o}+ will be typeset as \Opt{-o}.
\item[\Bs Arg\{argument\}] Argument: \verb+\Arg{filename}+ will be typeset as
     \Arg{filename}.
\item[\Bs OptArg\{option\}\{argument\}] Option with Argument:\\
     \verb+\OptArg{-o}{filename}+ will be typeset as \OptArg{-o}{filename}.
\item[\Bs OptoArg\{option\}\{argument\}] Option with optional Argument:\\
     \verb+\OptoArg{-o}{filename}+ will be
     typeset as \OptoArg{-o}{filename}.
\item[\Bs oOpt\{option\}] Optional option, e.g.\ \verb+\oOpt{-o}+ will be
     typeset as \oOpt{-o}.
\item[\Bs oArg\{argument\}] Optional argument, e.g.\ \verb+\oArg{filename}+
     will be typeset as \oArg{filename}.
\item[\Bs oOptArg\{option\}\{argument\}] Optional option with argument, e.g.\\
     \verb+\oOptArg{-o}{filename}+ will be typeset as \oOptArg{-o}{filename}.
\item[\Bs oOptoArg\{option\}\{argument\}] Optional option with optional
     argument, e.g.\
     \verb+\oOptoArg{-o}{filename}+ will be typeset as \oOptoArg{-o}{filename}.
\item[\Bs File\{filename\}] used to typeset filenames, e.g.\
     \verb+\File{filename}+ will be typeset as \File{filename}.
\item[\Bs Prog\{prog\}] used to typeset program names, e.g.\
     \verb+\Prog{latex2man}+ will be typeset as \Prog{latex2man}.
\item[\Bs Cmd\{command\}\{chapter\}] used to typeset references to other
     commands, e.g.\ \verb+\Cmd{latex2man}{1}+ will be typeset as
     \Cmd{latex2man}{1}.
\item[\Bs Bar] is typeset as \Bar.
\item[\Bs Bs] (BackSlash) is typeset as \Bs.
\item[\Bs Tilde] is typeset as a \Tilde.
\item[\Bs Dots] is typeset as \Dots
\item[\Bs Bullet] us typeset as \Bullet.
\item[\Bs setVersion\{..\}] set  \verb+..+ as version information.
\item[\Bs setVersionWord\{..\}] set \verb+..+ for the word \emph{Version:} in
     the footline. The default is \verb+\setVersionWord{Version:}+.
\item[\Bs Version] returns the version information.
\item[\Bs setDate\{..\}] sets \verb+..+ as date information.
\item[\Bs Date] returns the date information.
\item[\Bs Email\{..\}] use to mark an Email address:\\
        \verb+\Email{Juergen.Vollmer@informatik-vollmer.de}+ is typeset as:\\
        \Email{Juergen.Vollmer@informatik-vollmer.de}.
\item[\Bs URL\{..\}] use to mark an URL:
        \verb+\URL{http://www.foo.de/\Tilde vollmer}+ is typeset as
        \URL{http://www.foo.de/\Tilde vollmer}.
\item[\Bs LatexManEnd] the input file is read and processed until reading
        end-of-file or \verb+\LatexManEnd+ (at the beginning of a line).
        \LaTeX\ ignores this command.
\item[\Bs Lbr, \Bs Rbr] is typeset as \Lbr\ and \Rbr\ (these variants are
        needed only somtimes like in \verb+item[FooBar\LBr xx \Lbr]+. Usually
        \verb+[ ]+ will work.
\item[\Bs LBr, \Bs RBr] is typeset as \LBr\ and \RBr\ (these variants are
        needed when using \{ or \} as arguments to macros.
\item[\Bs Circum] is typeset as \Circum.
\item[\Bs Percent] is typeset as \Percent.
\item[\Bs TEXbr] If processed with \LaTeX\ causes a linebreak (i.e.\ is
     equivalent to \Bs\Bs). In the output of \Prog{latex2man} this macro is
     ignored.
\item[\Bs TEXIbr] If TexInfo output is generated, causes a linebreak (i.e.\ is
     equivalent to \Bs\Bs), otherwise ignored.
\item[\Bs MANbr] If Man-Page output is generated, causes a linebreak (i.e.\ is
     equivalent to \Bs\Bs), otherwise ignored.
\item[\Bs HTMLbr] If HTML output is generated, causes a linebreak (i.e.\ is
     equivalent to \Bs\Bs), otherwise ignored.
\item[\Bs medskip] An empty line.
\item[\Bs SP] Produces some extra space, works also at the beginning of lines.
     The code of the second line looks like:
     \texttt{\Bs SP abc \Bs SP\Bs SP xx\Bs\Bs}:\\
     abc  \SP\SP\SP xx\\
     \SP abc \SP\SP xx\\
     \SP\SP abc \SP xx

     Note: Due to some ``problems'' with TexInfo, the lines starting with
     \texttt{\Bs SP} have a leading . (dot) in the TexInfo output,
     see \OptArg{-a}{char}.
\end{description}

\subsection{Accepted Macros from the rcsinfo Package}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{description}\setlength{\itemsep}{0cm}
\item[\Bs rcsInfo \$Id ...\$] if the \LaTeX\ package \File{rcsinfo} is used,
     this command is used to extract the date of the Man-page.
\item[\Bs rcsInfoLongDate] if the \LaTeX\ package \File{rcsinfo} is used, this
     command is used to typeset the date coded in the \verb+$Id ..$+ string.
\end{description}

\subsection{Accepted \LaTeX\ Macros}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The following standard \LaTeX\ commands are accepted:
\begin{description}\setlength{\itemsep}{0cm}
\item[\Bs section\{..\}] The \texttt{section} macro takes one argument: the
     name of the Man-page section.  Each Man-page consists of several sections.
     Usually there are the following sections in a Man-page: \emph{Name}
     (special handling as environment, c.f.\ above), \emph{Synopsis},
     \emph{Description}, \emph{Options}, \emph{Files}, \emph{See Also},
     \emph{Diagnostics}, \emph{Return Values}, \emph{Bugs}, \emph{Author},
     \emph{version}, etc.

     \emph{Synopsis} must be the first section after the \texttt{Name}
     environment.

     Note: Do not use \LaTeX-macros in section names.
\item[\Bs subsection\{..\}] works as well as
\item[\Bs subsubsection\{..\}] those.
\item[\Bs emph\{..\}] \verb+\emph{example}+ is typeset as \emph{example}.
\item[\Bs textbf\{..\}] \verb+\textbf{example}+ is typeset as \textbf{example}.
\item[\Bs texttt\{..\}]\verb+\textt{example}+ is typeset as \texttt{example}.
\item[\Bs underline\{..\}]\verb+\underline{example}+ is typeset as
     \underline{example of underline}.
\item[\Bs date\{..\}] uses \verb+..+ as date.
\item[\Bs verb+..+] but only + is allowed as delimiter.
\item[\$$<$\$]  is typeset as $<$.
\item[\$$>$\$]  is typeset as $>$.
\item[\$$<=$\$] is typeset as $<=$.
\item[\$$>=$\$] is typeset as $>=$.
\item[\$$=$\$]  is typeset as $=$.
\item[\$$<>$\$] is typeset as $<>$.
\item[\$\Bs ge\$] is typeset as $\ge$.
\item[\$\Bs le\$] is typeset as $\le$.
\item[\$\Bs leftarrow\$] is typeset as $\leftarrow$.
\item[\$\Bs Leftarrow\$] is typeset as $\Leftarrow$.
\item[\$\Bs rightarrow\$] is typeset as $\rightarrow$.
\item[\$\Bs Rightarrow\$] is typeset as $\Rightarrow$.
\item[\Bs \{] is typeset as \{.
\item[\Bs \}] is typeset as \}.
\item[\Bs \$] is typeset as \$.
\item[\Bs \Dollar] is typeset as \Dollar, should be used inside macro
     arguments.
\item[\Bs \_] is typeset as \_.
\item[\Bs \&] is typeset as \&.
\item[\Bs \#] is typeset as \#.
\item[\Bs \%] is typeset as \%.
\item[\Bs ,] is typeset as smaller blank -\,- (between the two -)
\item[\Bs -]  is used to mark hyphenation in a word.
\item[\Bs \Bs] is typeset as a linebreak or marks the end of a column in the
     \texttt{Table} environment.
\item[\Bs ] (a \Bs\ followed by a blank) is typeset as a blank,
     although it cannot be used at the beginning of a line to make indentation
     (see the \texttt{\Bs SP} command).
\item[\Tilde] is typeset as a blank.
\item[\Bs copyright] is typeset as \copyright.
\item[\Bs noindent]
\item[\Bs hline] inside a \texttt{Table} environment.
\item[\Bs item] inside a \texttt{itemize}, \texttt{enumerate}, or
     \texttt{description} environment.
\item[\Bs today] \today\ (see also the \texttt{rcsinfo} \LaTeX\ package).
\item[\Bs ss,\Bs"a, ...] \Bs ss = \ss, \Bs"a = \"a, \Bs"o = \"o, \Bs"u = \"u,
     \Bs"A = \"A, \Bs"O = \"O, \Bs"U = \"U. It is allowed to surround these
     macros in \{ and \} in all places, even inside other macros, e.g.
     \begin{verbatim}
     \textbf{\"a\"o\"u\"A\"O\"U\ss}
     \textbf{\"a}{\"o}{\"u}{\"A}{\"O}{\"U}{\ss}}
     \textbf{äöüÄÖÜß}
     \end{verbatim}

     \textbf{\"a\"o\"u\"A\"O\"U\ss {\"a}{\"o}{\"u}{\"A}{\"O}{\"U}{\ss} äöüÄÖÜß}

     If these letters are used in their LATIN-1 8-bit coding, they are
     translated into the equivalent letter of the desired output format.
     E.g. \texttt{Ä} becomes \texttt{\&Auml}; in HTML and \texttt{@"A}
     in texinfo.
\end{description}

\subsection{Conditional Text}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\Prog{latex2man} preprocesses the \LaTeX\ input to allow text to be used
conditionally. A special sort of \LaTeX\ comment is used for that purpose.
\begin{itemize}\setlength{\itemsep}{0cm}
\item \Percent@\Percent\ IF \emph{condition} \Percent@\Percent
\item \Percent@\Percent\ ELSE \Percent@\Percent
\item \Percent@\Percent\ END-IF \Percent@\Percent
\end{itemize}

A line must contain only such a comment and nothing else.  \emph{condition} is
a boolean expression containing ``names'' and operators.  The names given with
the \OptArg{-C}{name} option have the value ``true'', while all other names
occuring in the expression are assumed to be ``false''.  If the evaluation of
the boolean expression results in the value ``true'', the text in the
``then''-part is used and the text in the optional ``else''-part is skipped
(and vice versa).  The \texttt{IF/ELSE/END-IF} may be nested.  As boolean
operators the following are allowed:

\begin{Table}{2}
\Bar\Bar & boolean or   \\
\&\&     & boolean and  \\
!        & negation
\end{Table}

( and ) for grouping are allowed.

\noindent
For example:\\
\Percent@\Percent\ IF abc                    \Percent@\Percent\\
\verb+    +abc set\\
\verb+    +\Percent@\Percent\ IF xyz         \Percent@\Percent\\
\verb+       +xyz set\\
\verb+    +\Percent@\Percent\ ELSE           \Percent@\Percent\\
\verb+       +xyz NOT set\\
\verb+    +\Percent@\Percent\ END-IF         \Percent@\Percent\\
\Percent@\Percent\ ELSE                      \Percent@\Percent\\
\verb+    +abc NOT set\\
\verb+    +\Percent@\Percent\ IF xyz \Bar\Bar\ !XYZ \Percent@\Percent\\
\verb+       +xyz OR !XYZ set\\
\verb+    +\Percent@\Percent\ ELSE           \Percent@\Percent\\
\verb+       +xyz OR !XYZ NOT set\\
\verb+    +\Percent@\Percent\ END-IF         \Percent@\Percent\\
\Percent@\Percent\ END-IF                    \Percent@\Percent

\noindent
Run this manual page through \Prog{latex2man} with e.g.\
\OptArg{-C}{'abc XYZ'} and have a look to the generated output.
(If simply running the \LaTeX-document\ through \LaTeX, all lines are shown in the
.dvi file).\\
%@% IF abc            %@%
   abc set\\
   %@% IF xyz         %@%
       xyz set\\
   %@% ELSE           %@%
       xyz NOT set\\
   %@% END-IF         %@%
%@% ELSE              %@%
    abc NOT set\\
    %@% IF xyz || !XYZ %@%
    xyz OR !XYZ set\\
    %@% ELSE          %@%
    xyz OR !XYZ NOT set
    %@% END-IF        %@%
%@% END-IF            %@%

\noindent
To check the conditional text feature, when \Prog{latex2man} is called with
\begin{description}
\item[\OptArg{-C}{HTML}]  the lines 1a, 2b, 3b, and 4b;
\item[\OptArg{-C}{TEXI}]  the lines 1b, 2a, 3b, and 4b;
\item[\OptArg{-C}{MAN}]   the lines 1b, 2b, 3a, and 4b;
\item[\OptArg{-C}{LATEX}] the lines 1b, 2b, 3b, and 4a;
\item[calling \LaTeX\ without preprocessing] all lines
\end{description}
should be shown:

%@% IF HTML %@%
1a. This text occurs only when viewing the HTML output.

%@% ELSE %@%
1b. The HTML conditional was not set.

%@% END-IF %@%

%@% IF TEXI %@%
2a. This text occurs only when viewing the TEXI output

%@% ELSE %@%
2b. The TEXI conditional was not set.

%@% END-IF %@%

%@% IF MAN %@%
3a. This text occurs only when viewing the MAN output

%@% ELSE %@%
3b. The MAN conditional was not set.

%@% END-IF %@%

%@% IF LATEX %@%
4a. This text occurs only when viewing the LATEX output

%@% ELSE %@%
4b. The LATEX conditional was not set.

%@% END-IF %@%

\subsection{Translation of User Defined Macros}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The user macro translation file (given by the \oOptArg{-t}{transfile}) contains
\Prog{Perl} commands specifying the translation of \LaTeX\ macros defined by
the user. These macros may have none, one or two arguments. The following code
is expected:

\begin{itemize}\setlength{\itemsep}{0cm}
\item Comments start with a \# up to the end of the line.
\item For a macro \verb+\foo+ with no arguments, the following code must be
     specified:
     \begin{description}\setlength{\itemsep}{0cm}
       \item[Translation to Man-Pages]\TEXbr
            \verb+$manMacro{'foo'}  = '...';+
       \item[Translation to HTML]\TEXbr
            \verb+$htmlMacro{'foo'} = '...';+
       \item[Translation to TexInfo]\TEXbr
            \verb+$texiMacro{'foo'} = '...';+
     \end{description}

     where \verb+...+ is the translation.

\item For a macro \verb+\foo{..}+ with one argument, the following code must be
     specified:
     \begin{description}\setlength{\itemsep}{0cm}
       \item[Translation to Man-Pages]\TEXbr
            \verb+$manMacro1a{'foo'}  = '...';+\\
            \verb+$manMacro1b{'foo'}  = '...';+
       \item[Translation to HTML]\TEXbr
            \verb+$htmlMacro1a{'foo'} = '...';+\\
            \verb+$htmlMacro1b{'foo'} = '...';+

       \item[Translation to TexInfo]\TEXbr
            \verb+$texiMacro1a{'foo'} = '...';+\\
            \verb+$texiMacro1b{'foo'} = '...';+
     \end{description}

     where \verb+...+ is the translation. The \verb+1a+ code is used before the
     argument, while \verb+1b+ is typeset after the argument is set.

\item For a macro \verb+\foo{..}{..}+ with two arguments, the following code
     must be specified:
     \begin{description}\setlength{\itemsep}{0cm}
     \item[Translation to Man-Pages]\TEXbr
          \verb+$manMacro2a{'foo'}  = '...';+\\
          \verb+$manMacro2b{'foo'}  = '...';+\\
          \verb+$manMacro2c{'foo'}  = '...';+
     \item[Translation to HTML]\TEXbr
          \verb+$htmlMacro2a{'foo'} = '...';+\\
          \verb+$htmlMacro2b{'foo'} = '...';+\\
          \verb+$htmlMacro2c{'foo'} = '...';+
     \item[Translation to TexInfo]\TEXbr
          \verb+$texiMacro2a{'foo'} = '...';+\\
          \verb+$texiMacro2b{'foo'} = '...';+\\
          \verb+$texiMacro2c{'foo'} = '...';+
     \end{description}

     where \verb+...+ is the translation. The \verb+2a+ code is used before the
     first argument, \verb+2b+ between the two arguments and \verb+2c+ is
     typeset after the second argument is set.
\item The file \File{latex2man.trans} contains some example code.
\end{itemize}

\subsection{Verbatim Environment}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{verbatim}
This
    {is}
        \texttt{a}
                  $test$
                         _of_
verbatim
<this is no HTML tag> and no @* TexInfo command
\end{verbatim}

\subsection{Subsection works}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is a \verb+\subsection+.

\subsubsection{Subsubsection works}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is a \verb+\subsubsection+.

\subsubsection{Subsubsection still works}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is another \verb+\subsubsection+.

\subsection{General Remarks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{enumerate}\setlength{\itemsep}{0cm}
\item Empty lines are typeset as paragraph separators.
\item The arguments of the \LaTeX\ commands must not be split over several
     lines.
\item Do not nest calls to macros.
\item Except the mentioned environment and macros, the usage of other \LaTeX\
     environments or macros are not translated. Their usage will cause garbage
     in the output.
\item \Prog{latex2man} requires Perl version $>=$ 5.0004\_03.
\item If you want to install the system with the distributed \File{Makefile},
     you need GNU-\Prog{make}. If you don't have it, you should execute the
     steps shown in the \File{Makefile} manually.
\end{enumerate}

\subsection{Some Bug Fix Tests}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% TODO: HTML: a blank line after \begin{description} should not emit a <p>
\begin{description}
\item[Leading . and ']
%%%%%%%%%%%%%%%%%%%%%%
Now leading . and ' in generation troff output should work propperly,
since a \verb+\&+ is added. Therfore the \verb+\Dot+ macro has been deleted.\\
Thanks to \Email{Frank.Schilder@Mathematik.Tu-Ilmenau.De}.\\
Testcase 1:
\begin{description}
\item['\Bs n'] ...
\end{description}
Testcase 2:\\
\File{.foobar}
Testcase 3:\\
\Dots

abc \Dots abc . efg ' 123

\item[\% in verbatim] A \% in a \Bs verb and verbatim-environment was not
     emitted correctly.  Thanks to Aleksey Nogin \Email{nogin@cs.caltech.edu}
     for the bug report and bug fix.

\verb+ % abc+

\begin{verbatim}
   % abc %
\end{verbatim}

but ignore comments following this: % this should be ignored

\end{description}

\section{Requirements}
%%%%%%%%%%%%%%%%%%%%%%

\begin{description}\setlength{\itemsep}{0cm}
\item[Perl] \Prog{latex2man} requires Perl version $>=$ 5.0004\_03.
\item[Make] If you want to install the system with the distributed
     \File{Makefile}, you need GNU-\Prog{make}. If you don't have it, you
     should execute the steps shown in the \File{Makefile} manually.
\item[\LaTeX] \LaTeX 2e is required.
\end{description}

\section{Changes}
%@% IF LATEX %@%
{\small\verbatiminput{CHANGES}}
%@% ELSE %@%
Please check the file \URL{latex2man-CHANGES} for the list of changes.
%@% END-IF %@%

\section{Version}
%%%%%%%%%%%%%%%%%

Version: \Version\ of \Date.

\section{License and Copyright}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{description}
\item[Copyright] \copyright\ 1998, Dr.~Jürgen Vollmer, Viktoriastraße 15,
     D-76133 Karlsruhe, Germany, \Email{Juergen.Vollmer@informatik-vollmer.de}

     The actual version of  \Prog{Latex2man} may be found on my homepage\\
     \URL{http://www.informatik-vollmer.de/software/latex2man.html}.

\item[License] This program can be redistributed and/or modified under the
     terms of the LaTeX Project Public License Distributed from CTAN archives
     in directory \File{macros/latex/base/lppl.txt}; either version 1 of the
     License, or any later version.

\item[Misc] If you find this software useful, please send me a postcard from
     the place where you are living.
\end{description}

\section{Author}
%%%%%%%%%%%%%%%%

\noindent
Dr.~Jürgen Vollmer                      \\
Viktoriastraße 15                       \\
D-76133 Karlsruhe                       \\
Email: \Email{Juergen.Vollmer@informatik-vollmer.de}  \\
WWW: \URL{http://www.informatik-vollmer.de}.

\LatexManEnd

\end{document}


text:
azure.schemaregistry.encoder.avroencoder.aio package
====================================================

.. automodule:: azure.schemaregistry.encoder.avroencoder.aio
   :members:
   :undoc-members:
   :inherited-members:


text:
module Critical

  class LoadError < ::LoadError
  end

  module FileLoader
    extend self
    extend Loggable

    def load_metrics_and_monitors_in(file_or_dir)
      log.debug { "Loading source file #{file_or_dir}" }
      load_in_context(Critical::DSL::TopLevel, file_or_dir)
    end

    def load_in_context(context_obj, file)
      assert_file_exists!(file)

      if filename = file_full_name(file)
        load_file_in_context(context_obj, filename)
      elsif filenames = files_in_dir(file)
        filenames.each { |f| load_in_context(context_obj, f) }
      else
        raise LoadError, "Could not load file/directory #{file}. Is it a pipe/device/alien?"
      end
    end

    private

    def file_full_name(file)
      filename = nil
      filename = file if File.file?(file)
      filename = file + ".rb" if File.file?(file + ".rb")
      File.expand_path(filename) if filename
    end

    def files_in_dir(dir)
      if File.directory?(dir)
        log.debug { "Searching directory #{dir} for source files" }
        filenames = Dir["#{dir}/**/*.rb"]
        filenames.map! { |f| File.expand_path(f) }
        filenames
      end
    end

    def load_file_in_context(context_obj, filename)
      begin
        context_obj.instance_eval(IO.read(filename), filename, 1)
      rescue Errno::EACCES => e
        raise Critical::LoadError, "permission denied trying to access file #{file}\n Original error: #{e.message}"
      end
    end

    def assert_file_exists!(file)
      no_such_file!(file) unless File.exist?(file) || File.exist?(file + ".rb")
    end

    def no_such_file!(file)
      raise Critical::LoadError, "Could not load the file #{file} -- The OS says it doesn't exist"
    end
  end

  module LibraryMetricLoader
    extend self
    extend Loggable

    METRIC_PATH_SPEC = /(#{Regexp.escape 'critical/metrics/'}(.+))\.rb/
    #' fix syntax highlighting in vim :(

    METRIC_REQUIRE_PATHS = {}

    def add_library_metric(path)
      match = METRIC_PATH_SPEC.match(path)
      METRIC_REQUIRE_PATHS[match[2]] = path
    end

    begin
      require 'rubygems'
      Gem.find_files('critical/metrics/*.rb').each do |file|
        add_library_metric(file)
      end
    rescue LoadError
    end

    Dir[File.expand_path('../metrics/*.rb', __FILE__)].each do |file|
      add_library_metric(file)
    end

    def require_metric(name)
      if path = METRIC_REQUIRE_PATHS[name]
        FileLoader.load_metrics_and_monitors_in(path)
      else
        log.debug { "Metric #{name} not found" }
        msg = "The metric #{name} was not found in the stdlib or any installed gems\n"
        msg << "Available metrics are: #{METRIC_REQUIRE_PATHS.keys.join(',')}"
        raise LoadError, msg
      end
    end

    def reset_metric_load_paths!(*paths)
      METRIC_REQUIRE_PATHS.clear
      paths.each do |path|
        Dir[File.join(path, '*.rb')].each do |file|
          add_library_metric(file)
        end
      end
    end

  end

end


text:
/* Common header file that is included by all of QEMU.
 *
 * This file is supposed to be included only by .c files. No header file should
 * depend on qemu-common.h, as this would easily lead to circular header
 * dependencies.
 *
 * If a header file uses a definition from qemu-common.h, that definition
 * must be moved to a separate header file, and the header that uses it
 * must include that header.
 */
#ifndef QEMU_COMMON_H
#define QEMU_COMMON_H

#include "qemu/osdep.h"
#include "qemu/typedefs.h"

#include "glib.h"
#include "config-host.h"

#if defined(O_BINARY)   /* O_BINARY isn't used in slirp */
#undef O_BINARY         /* Avoid potential redefinition elsewhere */
#endif

/* HOST_LONG_BITS is the size of a native pointer in bits. */
#if UINTPTR_MAX == UINT32_MAX
# define HOST_LONG_BITS 32
#elif UINTPTR_MAX == UINT64_MAX
# define HOST_LONG_BITS 64
#else
# error Unknown pointer size
#endif

/* util/cutils.c */
/**
 * pstrcpy:
 * @buf: buffer to copy string into
 * @buf_size: size of @buf in bytes
 * @str: string to copy
 *
 * Copy @str into @buf, including the trailing NUL, but do not
 * write more than @buf_size bytes. The resulting buffer is
 * always NUL terminated (even if the source string was too long).
 * If @buf_size is zero or negative then no bytes are copied.
 *
 * This function is similar to strncpy(), but avoids two of that
 * function's problems:
 *  * if @str fits in the buffer, pstrcpy() does not zero-fill the
 *    remaining space at the end of @buf
 *  * if @str is too long, pstrcpy() will copy the first @buf_size-1
 *    bytes and then add a NUL
 */
void pstrcpy(char *buf, int buf_size, const char *str);
#endif


text:
package org.openengsb.edb.core.repository;

import java.io.File;
import java.io.IOException;

/**
 * Internal wrapper interface for the real implementation used to store and
 * version the data behind the interface. This could be a GIT repository, a SVN
 * repository... Repositories could be created via the RepositoryFactory class.
 */
public interface Repository {

    /**
     * Method creates a repository at the actual user-path with the repositoryId
     * as sub-path. The path of the repository could be seen as ./repositoryId
     * in more detail. If any exception in the state of the repository exists an
     * {@link RepositoryStateException} is thrown. This could happen if jgit
     * throws any internal {@link IOException}. A
     * {@link RepositoryManagementException}should be thrown in each other case
     * (e.g. if null is entered for the {@link #create(String)} method. This
     * method should return the pointer to an existing repository or create a
     * new one if the repository does not exist at the moment.
     */
    Repository create(final String repositoryId) throws RepositoryStateException, RepositoryManagementException;

    /**
     * Method returning a class to finally prepare and do a commit.
     */
    Commit prepareCommit();

    /**
     * Method returning a class to finally prepare and do a reset.
     */
    Reset prepareReset();

    /**
     * Be careful in using this method; it will delete the entire repository
     * recursively.
     */
    void removeRepository();

    /**
     * Returns the base path of an repository.
     */
    File getRepositoryBase();

    /**
     * Returns the current head revision identifier.
     *
     * @throws RepositoryStateException in case the repository is in illegal
     *         state
     * @return head id
     */
    String getHeadRevision() throws RepositoryStateException;
}


text:
TEST_USERS = [{'fn' : 'Test', 'ln' : 'User1',
               'email' : 'testuser1@example.com', 'pwd' : 'testUser123'},
              {'fn' : 'Test', 'ln' : 'User2',
               'email' : 'testuser2@example.com', 'pwd' : 'testUser123'},
              {'fn' : 'Test', 'ln' : 'User3',
               'email' : 'testuser3@example.com', 'pwd' : 'testUser123'}]

var frisby = require('frisby');
var tc = require('./config/test_config');

TEST_USERS.forEach(function createUser(user, index, array) {
    frisby.create('POST enroll user ' + user.email)
        .post(tc.url + '/user/enroll',
              { 'firstName' : user.fn,
                'lastName' : user.ln,
                'email' : user.email,
                'password' : user.pwd })
        .expectStatus(201)
        .expectHeader('Content-Type', 'application/json; charset=utf-8')
        .expectJSON({ 'firstName' : user.fn,
                      'lastName' : user.ln,
                      'email' : user.email })
        .toss()
});

frisby.create('POST enroll duplicate user ')
    .post(tc.url + '/user/enroll',
          { 'firstName' : TEST_USERS[0].fn,
            'lastName' : TEST_USERS[0].ln,
            'email' : TEST_USERS[0].email,
            'password' : TEST_USERS[0].pwd })
    .expectStatus(400)
    .expectHeader('Content-Type', 'application/json; charset=utf-8')
    .expectJSON({'error' : 'Account with that email already exists.  Please choose another email.'})
    .toss()


text:
package com.tsy.sdk.myokhttp.builder;

import com.tsy.sdk.myokhttp.MyOkHttp;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 带有param的base request body
 * Created by tsy on 2016/12/6.
 */

public abstract class OkHttpRequestBuilderHasParam<T extends OkHttpRequestBuilderHasParam> extends OkHttpRequestBuilder<T> {

    protected Map<String, String> mParams;

    public OkHttpRequestBuilderHasParam(MyOkHttp myOkHttp) {
        super(myOkHttp);
    }

    /**
     * set Map params
     * @param params
     * @return
     */
    public T params(Map<String, String> params) {
        this.mParams = params;
        return (T) this;
    }

    /**
     * add param
     * @param key param key
     * @param val param val
     * @return
     */
    public T addParam(String key, String val) {
        if (this.mParams == null)
        {
            mParams = new LinkedHashMap<>();
        }
        mParams.put(key, val);
        return (T) this;
    }
}


text:
<?php require_once("shared/core.php"); ?>
<?php require_once("logic/LoginProvider.php"); ?>
<?php $login_provider = LoginProvider::create(); ?>
<?php if(section("content")): ?>

        <a class="btn btn-lg btn-primary" href="<?php echo $login_provider->getLoginPageUrl(get_return_url(NULL));?>">Quicklogons Login page

        Custom Login page

        Profile

    <?php var_dump($_SERVER);?>
    <?php var_dump($_REQUEST);?>

<?php endif ?>
<?php render_layout("shared/master.php", "Home"); ?>


text:
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using NodeFlow.Core.Nodes;
using NodeFlow.Core.Utilities;

namespace NodeFlow.Core.Graph
{
  /// <summary>
  ///   A complete node-flow graph.
  /// </summary>
  [JsonObject(MemberSerialization.OptIn)]
  public class Graph
  {
    #region Fields / Properties

    [JsonProperty] public readonly Dictionary<ShortGuid, Node> Nodes = new Dictionary<ShortGuid, Node>();

    /// <summary>
    ///   The graph-wide GUID. Individual nodes are assigned very short UUIDs from here.
    /// </summary>
    [JsonProperty] public Guid Guid = Guid.NewGuid();

    /// <summary>
    ///   The short-guid generator for node GUIDs.
    /// </summary>
    [JsonProperty] private int _nextNodeId;

    #endregion

    public Node MakeNewNode(NodeDefinition nodeDefinition)
    {
      var nNode = new Node
      {
        Guid = new ShortGuid("NODE_" + (_nextNodeId++).ToSymbolString()),
        NodeDefinition = nodeDefinition
      };
      Nodes.Add(nNode.Guid, nNode);
      return nNode;
    }

    public string ToJson()
    {
      var contractResolver = new DefaultContractResolver
      {
        NamingStrategy = new SnakeCaseNamingStrategy()
      };
      return JsonConvert.SerializeObject(this, new JsonSerializerSettings
      {
        ContractResolver = contractResolver,
        Formatting = Formatting.Indented
      });
    }
  }
}


text:
<?php

declare(strict_types=1);

namespace ApiPlatform\Symfony\Validator\Metadata\Property\Restriction;

use ApiPlatform\Metadata\ApiProperty;
use Symfony\Component\PropertyInfo\Type;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\Range;

/**
 * @author Tomas Norkūnas <norkunas.tom@gmail.com>
 */
final class PropertySchemaRangeRestriction implements PropertySchemaRestrictionMetadataInterface
{
    /**
     * {@inheritdoc}
     */
    public function create(Constraint $constraint, ApiProperty $propertyMetadata): array
    {
        $restriction = [];

        if (isset($constraint->min) && is_numeric($constraint->min)) {
            $restriction['minimum'] = $constraint->min;
        }

        if (isset($constraint->max) && is_numeric($constraint->max)) {
            $restriction['maximum'] = $constraint->max;
        }

        return $restriction;
    }

    /**
     * {@inheritdoc}
     */
    public function supports(Constraint $constraint, ApiProperty $propertyMetadata): bool
    {
        return $constraint instanceof Range && null !== ($type = $propertyMetadata->getBuiltinTypes()[0] ?? null) && \in_array($type->getBuiltinType(), [Type::BUILTIN_TYPE_INT, Type::BUILTIN_TYPE_FLOAT], true);
    }
}


text:
                Notice Information

                        Subject
                        Ticket #
                        Priority
                        Status
                        Opened By
                        Updated By
                        Action

                        {{notice.subject}}
                        {{notice.ticket_number}}
                        {{notice.priority}}
                        {{notice.status}}
                        {{notice.created_by.username}}
                        {{notice.updated_by}}

                        <button class="btn btn-xs btn-danger"> update </button>

Notice created ({{notice.created_at | date: 'shortTime'}})

Email notification (ITSB) was successfully sent

                View Notice

                        {{notice.created_at | date: 'EEEE'}}

                        {{notice.created_at | date: 'MMMM dd'}}

Update {{update.number}} Sent ({{update.updated_at | date: 'shortTime'}})

Updated by {{notice.created_by.username}}

                            {{update.updated_at | date: 'EEEE'}}

                            {{update.updated_at | date: 'MMMM dd'}}

Resolution Sent ({{update.updated_at | date: 'shortTime'}})

Updated by {{notice.created_by.username}}

                            {{update.updated_at | date: 'EEEE'}}

                            {{update.updated_at | date: 'MMMM dd'}}


text:
<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration as R;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;

/**
 * Class ZeroController
 *
 * Please make sure that this controller is called last if no other path match
 * Symfony has a stupid way of route priority since it takes controller name and sorts
 * the routes in the controller alphabetically
 *
 * we could use chain routers but it is an overkill
 * @see http://symfony.com/doc/current/cmf/book/routing.html
 */
class ZeroController
{
    /**
     * @R\Route("/{url}", name="remove_trailing_slash",
     *     requirements={"url" = ".*\/$"}, methods={"GET"})
     */
    public function removeTrailingSlashAction(Request $request)
    {
        $pathInfo = $request->getPathInfo();
        $requestUri = $request->getRequestUri();

        $url = str_replace($pathInfo, rtrim($pathInfo, ' /'), $requestUri);

        return new RedirectResponse($url, 302);
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">

    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

    <title>Blockquote Demo</title>


text:
public class Derived extends Base {
    public static void notDeclaredInBase() {
        System.out.println("notDeclaredInBase: Derived");
    }

    public void overridden() {
        System.out.println("overridden: Derived");
    }

    public void wasOverridden() {
        System.out.println("wasOverridden: Derived");
    }

    public void overrideWithPublic() {
        System.out.println("overrideWithPublic: Derived");
    }

    protected void overridePublicWithProtected() {
        System.out.println("overridePublicWithProtected: Derived");
    }

    public void overrideProtectedWithPublic() {
        System.out.println("overrideProtectedWithPublic: Derived");
    }

    private void overridePublicWithPrivate() {
        System.out.println("overridePublicWithPrivate: Derived");
    }

    public void overridePrivateWithPublic() {
        System.out.println("overridePrivateWithPublic: Derived");
    }

    /* not really an "override"; just has same method signature */
    public static void overrideVirtualWithStatic() {
        System.out.println("overrideVirtualWithStatic: Derived");
    }

    /* not really an "override"; just has same method signature */
    public void overrideStaticWithVirtual() {
        System.out.println("overrideStaticWithVirtual: Derived");
    }
}


text:
<?php

include(__DIR__.'/system/dandelion.boot.php');

/// Copyright © 2014-2015 Чернов, Александр. Contacts: <aeonrush@live.ru>, <black_web@outlook.com>
/// License: http://www.apache.org/licenses/LICENSE-2.0


text:
        <button type="button" class="navbar-toggle" data-toggle="collapse"
                data-target=".navbar-ex1-collapse">
          Desplegar navegación

        </button>

<a href="<?php echo base_url(); ?>home/usuario">Agregar nuevo usuario

<a href="<?php echo base_url(); ?>home/usuarios">Listar usuarios

                Escuelas

<a href="<?php echo base_url(); ?>home/escuelas">Listar

Nueva

            <input id="cuenta" type="number" min="0" class="form-control" placeholder="Ingrese cuenta de usuario">

          <button id="buscar" class="btn btn-info">Buscar</button>


text: ctx logger info "Deleting!"


text:
module DotName where

-- Example from Data.Function
-- uses an infix operator as a pattern variable

-- I think the only solution is to rename to normal variable and make all uses prefix

on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
(.*.) `on` f = \x y -> f x .*. f y


text:
package org.ccci.gto.android.common.recyclerview.adapter;

import android.database.Cursor;
import android.provider.BaseColumns;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.UiThread;
import androidx.recyclerview.widget.RecyclerView;

public abstract class CursorAdapter<VH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter<VH> {
    @Nullable
    protected Cursor mCursor;
    private int mIdColumn = -1;

    public CursorAdapter() {
        // default to stable ids for CursorAdapters
        setHasStableIds(true);
    }

    @UiThread
    @Nullable
    public Cursor swapCursor(@Nullable final Cursor cursor) {
        final Cursor old = mCursor;

        // update Cursor
        mCursor = cursor;
        mIdColumn = mCursor != null ? mCursor.getColumnIndex(BaseColumns._ID) : -1;

        // notify that data has changed
        notifyDataSetChanged();

        // return the old cursor
        return old;
    }

    @UiThread
    protected Cursor scrollCursor(@Nullable final Cursor cursor, final int position) {
        if (cursor != null) {
            cursor.moveToPosition(position);
        }
        return cursor;
    }

    @UiThread
    @Override
    public long getItemId(final int position) {
        // return the item id if we have a cursor and id column
        if (mIdColumn >= 0) {
            final Cursor c = scrollCursor(mCursor, position);
            if (c != null) {
                return c.getLong(mIdColumn);
            }
        }

        // default to NO_ID
        return RecyclerView.NO_ID;
    }

    @UiThread
    @Override
    public int getItemCount() {
        return mCursor != null ? mCursor.getCount() : 0;
    }

    @UiThread
    @Override
    public final void onBindViewHolder(@NonNull final VH holder, final int position) {
        onBindViewHolder(holder, scrollCursor(mCursor, position), position);
    }

    @UiThread
    protected abstract void onBindViewHolder(@NonNull VH holder, @Nullable Cursor cursor, int position);
}


text:
angular.module('n52.core.base')
    .constant('constants', {
        platformType: {
            stationaryInsitu: 'stationary_insitu',
            mobileInsitu: 'mobile_insitu'
        },
        valueType: {
            quantity: 'quantity',
            quantityProfile: 'quantity-profile'
        }
    });


text:
package com.github.splee.burrower.write

import com.github.splee.burrower.lag.LagGroup
import com.paulgoldbaum.influxdbclient.{InfluxDB, Point}
import com.paulgoldbaum.influxdbclient.Parameter.Precision
import com.typesafe.scalalogging.LazyLogging
import scala.compat.Platform._
import scala.concurrent.ExecutionContext.Implicits.global

import scala.util.{Failure, Success}

class InfluxWriter(
  influxHost: String,
  influxPort: Int,
  influxDatabase: String,
  influxSeries: String,
  userName: String,
  password: String,
  isSecure: Boolean
) extends Writer with LazyLogging {

  val influxdb = InfluxDB.connect(influxHost, influxPort, userName, password, isSecure)
  val database = influxdb.selectDatabase(influxDatabase)

  def write(lagGroup: LagGroup): Unit = {
    val points = lagGroup.lags.map(lag => {
      Point(influxSeries, lagGroup.timestamp)
        .addTag("cluster", lag.cluster)
        .addTag("consumer_group", lag.group)
        .addTag("topic", lag.topic)
        .addTag("partition", lag.partition.toString)
        .addField("offset", lag.offset)
        .addField("lag", lag.lag)
    })
    database.bulkWrite(points, precision = Precision.MILLISECONDS)
      .onComplete(_ match {
        case Success(v) =>
          logger.debug("Metrics sent to InfluxDB")
        case Failure(e) =>
          logger.debug(f"Sending metrics to InfluxDB failed: ${e.getMessage}")
      })
  }
}


text:
1. Fork this project
2. Add your changes into a feature branch
3. Run all of the extensive test


text:
using System;

namespace OpenADK.Library.Tools.XPath
{
    internal class SingleNodeIterator : INodeIterator
    {
        private INodePointer fPointer;
        private int fPosition = -1;

        public SingleNodeIterator( INodePointer iteratedItem )
        {
            fPointer = iteratedItem;
        }

        private SingleNodeIterator( INodePointer iteratedItem, int position )
        {
            fPointer = iteratedItem;
            fPosition = position;
        }

        /// <summary>
        /// The parent node of the collection being iterated
        /// </summary>
        public INodePointer ParentNode
        {
            get { return fPointer.Parent; }
        }

        /// <summary>
        /// The next node in the collection or Null if at the end of the collection
        /// </summary>
        public INodePointer MoveNext()
        {
                fPosition++;
                return GetPointer();
        }

        private INodePointer GetPointer()
        {
            if ( fPosition == 0 )
            {
                return fPointer;
            }
            return null;
        }

        /// <summary>
        /// The previous node in the collection, or NULL if at the beginning of the collection
        /// </summary>
        public INodePointer MovePrevious()
        {
                fPosition--;
                return GetPointer();
        }

        public INodeIterator Clone()
        {
            return new SingleNodeIterator( fPointer, fPosition );
        }

        public int Count
        {
            get { return 1; }
        }
    }
}


text:
import { invert } from 'lodash'
import Complex from '../../chem/Complex'
import Exporter from './Exporter'
import PDBResult from './PDBResult'
import Assembly from '../../chem/Assembly'
import { typeByPDBHelixClass } from '../../chem/Helix'

export default class PDBExporter extends Exporter {
  constructor(source, options) {
    super(source, options)
    this._tags = [
      'HEADER',
      'TITLE',
      'COMPND',
      'REMARK',
      'HELIX',
      'SHEET',
      'ATOM and HETATM',
      'CONECT'
    ]
    this._result = null
    this._tagExtractors = {
      HEADER: this._extractHEADER,
      TITLE: this._extractTITLE,
      'ATOM and HETATM': this._extractATOM,
      CONECT: this._extractCONECT,
      COMPND: this._extractCOMPND,
      REMARK: this._extractREMARK,
      HELIX: this._extractHELIX,
      SHEET: this._extractSHEET
    }
    this._stringForRemark350 =
      'COORDINATES FOR A COMPLETE MULTIMER REPRESENTING THE KNOWN\n' +
      'BIOLOGICALLY SIGNIFICANT OLIGOMERIZATION STATE OF THE\n' +
      'MOLECULE CAN BE GENERATED BY APPLYING BIOMT TRANSFORMATIONS\n' +
      'GIVEN BELOW.  BOTH NON-CRYSTALLOGRAPHIC AND\n' +
      'CRYSTALLOGRAPHIC OPERATIONS ARE GIVEN.'

    this._stringForRemark290 =
      'CRYSTALLOGRAPHIC SYMMETRY TRANSFORMATIONS\n' +
      'THE FOLLOWING TRANSFORMATIONS OPERATE ON THE ATOM/HETATM\n' +
      'RECORDS IN THIS ENTRY TO PRODUCE CRYSTALLOGRAPHICALLY\n' +
      'RELATED MOLECULES.'
  }

  exportSync() {
    const result = new PDBResult()
    if (!this._source) {
      return this._result
    }

    for (let i = 0; i < this._tags.length; i++) {
      const tag = this._tags[i]
      const func = this._tagExtractors[tag]
      if (typeof func === 'function') {
        func.call(this, result)
      }
    }

    this._result = result.getResult()

    return this._result
  }

  _extractHEADER(result) {
    if (!this._source.metadata) {
      return
    }
    const { metadata } = this._source
    result.newTag('HEADER')
    result.newString()
    if (metadata.classification) {
      result.writeString(metadata.classification, 11, 50)
    }
    if (metadata.date) {
      result.writeString(metadata.date, 51, 59)
    }
    if (metadata.id) {
      result.writeString(metadata.id, 63, 66)
    }
  }

  _extractTITLE(result) {
    if (!this._source.metadata) {
      return
    }
    const { metadata } = this._source
    if (!metadata.title) {
      return
    }
    result.newTag('TITLE', true)
    for (let i = 0; i < metadata.title.length; i++) {
      result.newString()
      result.writeString(metadata.title[i], 11, 80)
    }
  }

  _extractCONECT(result) {
    if (!this._source._atoms) {
      return
    }

    const atoms = this._source._atoms
    result.newTag('CONECT')

    for (let i = 0; i < atoms.length; i++) {
      const fixedBonds = atoms[i].bonds.filter((bond) => bond._fixed)
      if (fixedBonds.length !== 0) {
        result.writeBondsArray(fixedBonds.reverse(), atoms[i])
      }
    }
  }

  _extractSHEET(result) {
    if (!this._source._sheets) {
      return
    }

    result.newTag('SHEET')

    const sheets = this._source._sheets
    for (let i = 0; i < sheets.length; i++) {
      if (sheets[i]._strands) {
        const strands = sheets[i]._strands
        for (let j = 0; j < strands.length; j++) {
          result.newString()
          result.writeString(j + 1, 10, 8)
          result.writeString(sheets[i]._name, 14, 12)
          result.writeString(strands.length, 16, 15)
          result.writeString(strands[j].init._type._name, 18, 20)
          result.writeString(strands[j].init._chain._name, 22, 22)
          result.writeString(strands[j].init._sequence, 26, 23)
          result.writeString(strands[j].init._icode, 27, 27)
          result.writeString(strands[j].term._type._name, 29, 31)
          result.writeString(strands[j].init._chain._name, 33, 33)
          result.writeString(strands[j].term._sequence, 37, 34)
          result.writeString(strands[j].term._icode, 38, 38)
          result.writeString(strands[j].sense, 40, 39)
        }
      }
    }
  }

  _extractHELIX(result) {
    if (!this._source._helices) {
      return
    }

    result.newTag('HELIX')
    const helices = this._source._helices
    for (let i = 0; i < helices.length; i++) {
      const helix = helices[i]
      const helixClass = invert(typeByPDBHelixClass)
      result.newString()
      result.writeString(helix.serial, 10, 8)
      result.writeString(helix.name, 14, 12)
      result.writeString(helix.init._type._name, 16, 18)
      result.writeString(helix.init._chain._name, 20, 20)
      result.writeString(helix.init._sequence, 25, 22)
      result.writeString(helix.init._icode, 26, 26)
      result.writeString(helix.term._type._name, 28, 30)
      result.writeString(helix.term._chain._name, 32, 32)
      result.writeString(helix.term._sequence, 37, 34)
      result.writeString(helix.term._icode, 38, 38)
      result.writeString(helixClass[helix.type], 40, 39)
      result.writeString(helix.comment, 41, 70)
      result.writeString(helix.length, 76, 72)
    }
  }

  _extractATOM(result) {
    if (!this._source._atoms) {
      return
    }
    const atoms = this._source._atoms

    for (let i = 0; i < atoms.length; i++) {
      const tag = atoms[i].het ? 'HETATM' : 'ATOM'
      result.newString(tag)
      const startIndx =
        atoms[i].element.name.length > 1 || atoms[i].name.length > 3 ? 13 : 14
      result.writeString(atoms[i].serial, 11, 7)
      result.writeString(atoms[i].name, startIndx, 16)
      result.writeString(String.fromCharCode(atoms[i].location), 17, 17)
      result.writeString(atoms[i].residue._type._name, 20, 18)
      result.writeString(atoms[i].residue._chain._name, 22, 22)
      result.writeString(atoms[i].residue._sequence, 26, 23)
      result.writeString(atoms[i].residue._icode, 27, 27)
      result.writeString(atoms[i].position.x.toFixed(3), 38, 31)
      result.writeString(atoms[i].position.y.toFixed(3), 46, 39)
      result.writeString(atoms[i].position.z.toFixed(3), 54, 47)
      result.writeString(atoms[i].occupancy.toFixed(2), 60, 55)
      result.writeString(atoms[i].temperature.toFixed(2), 66, 61)
      result.writeString(atoms[i].element.name, 78, 77)
      if (atoms[i].charge) {
        result.writeString(atoms[i].charge, 79, 80)
      }
    }
  }

  _extractCOMPND(result) {
    if (!this._source._molecules) {
      return
    }
    const molecules = this._source._molecules
    result.newTag('COMPND', true)

    for (let i = 0; i < molecules.length; i++) {
      const chains = this._getMoleculeChains(molecules[i])
      result.newString()
      result.writeString(`MOL_ID: ${molecules[i].index};`, 11, 80)
      result.newString()
      result.writeString(`MOLECULE: ${molecules[i].name};`, 11, 80)
      result.newString()
      result.writeString('CHAIN: ', 11, 18)
      const chainsString = `${chains.join(', ')};`
      result.writeEntireString(chainsString, 81)
    }
  }

  _extractREMARK(result) {
    this._Remark290(result)
    this._Remark350(result)
  }

  _Remark290(result) {
    if (!this._source.symmetry) {
      return
    }

    if (this._source.symmetry.length !== 0) {
      const matrices = this._source.symmetry
      result.newTag('REMARK', 290)
      result.newString()
      result.newString()
      result.writeEntireString(this._stringForRemark290)
      result.writeMatrices(matrices, 'SMTRY')
      result.newString()
      result.newString()
      result.writeString('REMARK: NULL', 11, 80)
    }
  }

  _Remark350(result) {
    if (!this._source.units) {
      return
    }
    const { units } = this._source
    let biomolIndx = 0

    result.newTag('REMARK', 350)
    result.newString()
    result.newString()
    result.writeEntireString(this._stringForRemark350)

    const assemblies = units.filter((unit) => unit instanceof Assembly)

    for (let i = 0; i < assemblies.length; i++) {
      result.newString()
      result.newString()
      biomolIndx++
      result.writeString(`BIOMOLECULE: ${biomolIndx}`, 11, 80)
      const chains = assemblies[i].chains.join(', ')
      result.newString()
      result.writeString('APPLY THE FOLLOWING TO CHAINS: ')
      result.writeEntireString(chains, 69, {
        tag: 'AND CHAINS: ',
        begin: 31,
        end: 42
      })

      const { matrices } = assemblies[i]
      result.writeMatrices(matrices, 'BIOMT')
    }
  }

  _getMoleculeChains(molecule) {
    function getChainName(residue) {
      return residue._chain._name
    }
    const chainNames = molecule.residues.map(getChainName)
    return chainNames.filter((item, pos) => chainNames.indexOf(item) === pos)
  }
}

PDBExporter.formats = ['pdb']
PDBExporter.SourceClass = Complex


text:
import datetime

BOT_NAME = 'proxySpider'
DOWNLOAD_DELAY = 2
DOWNLOAD_TIMEOUT = 7

RETRY_HTTP_CODES = [400, 500, 502, 503, 521]

DOWNLOADER_MIDDLEWARES = {
    'proxy.downloadermiddlewares.proxy.ProxyMiddleware': 200,
    'scrapy.downloadermiddlewares.useragent.UserAgentMiddleware': None,
    'random_useragent.RandomUserAgentMiddleware': 400
}
USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"

ITEM_PIPELINES = {
    'proxy.pipelines.DuplicatesPipeline': 300,
    'proxy.pipelines.RedisPipeline': 800,
}

REDIS_HOST = 'localhost'
REDIS_PORT = 4149
REDIS_DB = 0
REDIS_TEST_DB = 1
REDIS_SEP = ':'
NORMAL_S = 'normal'
GFW_S = 'gfw'
HOST_S = 'host'
EXPIRE_PRE = 'expire'
EXPIRE_DELTA = datetime.timedelta(seconds=60*60*3)


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Rambellia africana Bartoli & Maggi

### Remarks
null


text:
import { Provider } from '@angular/core';

import { Dict, Payload } from 'ash';
import { Image } from 'ash/image/store/model';
import { Link } from 'ash/link/store/model';

export interface LinkConfig {
  options?: LinkOptions;
  provider: Provider;
}

export interface LinkData {
  content?: string;
  id: string;
  image?: Image;
  title: string;
  url: string;
}

export interface LinkOptions {
  dir?: string;
  preload?: string;
  thumbSuffix?: string;
}

export type LinksPayload = Payload<Link[]>;

export interface LinkState {}

export interface LinkStaticResource {
  content?: string;
  hasImage?: boolean;
  id?: string;
  image?: string;
  title: string;
  url: string;
}

export interface LinkStaticState extends LinkState {
  items: Dict<LinkStoreItem>;
}

export interface LinkStoreItem {
  content?: string;
  id: string;
  image?: string;
  title: string;
  url: string;
}


text:
<?php

if(!function_exists('api_url'))
{

  /**
   * returns the api url
   * @param  object $class    the `$this` object
   * @return string           example: http://localhost/restigniter-crud/api/crud/27
   *
   * @author: @jjjjcccjjf
   */
  function api_url($class)
  {
   return base_url() . "api/" . strtolower(get_class($class)) . "/";
  }
}


text:
(function () {
    var panteonApp = angular.module('PanteonApp', [
        'ui.bootstrap',
        'ui.router',
        'ngCookies',
        'PanteonApp.common',
        'PanteonApp.home',
        'toaster',
        'ngAnimate',
        'smart-table'
    ]);

    init()
        .then(function () {
            angular.element(document).ready(function () {
                angular.bootstrap(document.getElementById('PanteonApp'), ['PanteonApp']);
            });
        });

    function init() {
        var initInjector = angular.injector(['ng']);
        var $http = initInjector.get('$http');

        return $http.get("/config.json").then(function (response) {
            panteonApp.constant('Constants', response.data);
        }, function (errorResponse) {
            console.log(errorResponse);
        });
    }
}());