text:
SELECT TOP 25
	o.Name as 'TableName',
    MAX(s.row_count) AS 'Rows',
    SUM(s.reserved_page_count) * 8.0 / 1024 as 'SizeInMB',
    (8 * 1024 * sum(s.reserved_page_count)) / (max(s.row_count)) as 'BytesPerRow'
FROM sys.dm_db_partition_stats s, sys.objects o
WHERE o.object_id = s.object_id
GROUP BY o.Name
ORDER BY 'SizeInMB' DESC

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Magefan\Blog\Controller\Adminhtml\Tag;

/**
 * Blog tag save controller
 */
class Save extends \Magefan\Blog\Controller\Adminhtml\Tag
{

}


text:
import { NOTIFICATION_TIMEOUT_TYPE } from '../../notifications';
import { showWarningNotification } from '../../notifications/actions';
import { timeout } from '../../virtual-background/functions';
import logger from '../../virtual-background/logger';

import JitsiStreamBackgroundEffect from './JitsiStreamBackgroundEffect';
import createTFLiteModule from './vendor/tflite/tflite';
import createTFLiteSIMDModule from './vendor/tflite/tflite-simd';
const models = {
    modelLandscape: 'libs/selfie_segmentation_landscape.tflite'
};

let modelBuffer;
let tflite;
let wasmCheck;
let isWasmDisabled = false;

const segmentationDimensions = {
    modelLandscape: {
        height: 144,
        width: 256
    }
};

/**
 * Creates a new instance of JitsiStreamBackgroundEffect. This loads the Meet background model that is used to
 * extract person segmentation.
 *
 * @param {Object} virtualBackground - The virtual object that contains the background image source and
 * the isVirtualBackground flag that indicates if virtual image is activated.
 * @param {Function} dispatch - The Redux dispatch function.
 * @returns {Promise<JitsiStreamBackgroundEffect>}
 */
export async function createVirtualBackgroundEffect(virtualBackground: Object, dispatch: Function) {
    if (!MediaStreamTrack.prototype.getSettings && !MediaStreamTrack.prototype.getConstraints) {
        throw new Error('JitsiStreamBackgroundEffect not supported!');
    }

    if (isWasmDisabled) {
        dispatch(showWarningNotification({
            titleKey: 'virtualBackground.backgroundEffectError'
        }, NOTIFICATION_TIMEOUT_TYPE.LONG));

        return;
    }

    // Checks if WebAssembly feature is supported or enabled by/in the browser.
    // Conditional import of wasm-check package is done to prevent
    // the browser from crashing when the user opens the app.

    if (!tflite) {
        try {
            wasmCheck = require('wasm-check');
            const tfliteTimeout = 10000;

            if (wasmCheck?.feature?.simd) {
                tflite = await timeout(tfliteTimeout, createTFLiteSIMDModule());
            } else {
                tflite = await timeout(tfliteTimeout, createTFLiteModule());
            }
        } catch (err) {
            if (err?.message === '408') {
                logger.error('Failed to download tflite model!');
                dispatch(showWarningNotification({
                    titleKey: 'virtualBackground.backgroundEffectError'
                }, NOTIFICATION_TIMEOUT_TYPE.LONG));
            } else {
                isWasmDisabled = true;
                logger.error('Looks like WebAssembly is disabled or not supported on this browser', err);
                dispatch(showWarningNotification({
                    titleKey: 'virtualBackground.webAssemblyWarning',
                    descriptionKey: 'virtualBackground.webAssemblyWarningDescription'
                }, NOTIFICATION_TIMEOUT_TYPE.LONG));
            }

            return;
        }
    }

    if (!modelBuffer) {
        const modelResponse = await fetch(models.modelLandscape);

        if (!modelResponse.ok) {
            throw new Error('Failed to download tflite model!');
        }

        modelBuffer = await modelResponse.arrayBuffer();

        tflite.HEAPU8.set(new Uint8Array(modelBuffer), tflite._getModelBufferMemoryOffset());

        tflite._loadModel(modelBuffer.byteLength);
    }

    const options = {
        ...segmentationDimensions.modelLandscape,
        virtualBackground
    };

    return new JitsiStreamBackgroundEffect(tflite, options);
}


text:
package algs.chapter5.table5;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;

import algs.model.search.ListHashTable;
import algs.model.search.StringFileIterator;
import algs.model.tests.common.TrialSuite;

/**
 * It is so hard to provide timing when loading up from a file, so instead
 * we compute the build times for all hashtables separately.
 *
 * @author George Heineman
 * @author Gary Pollice
 */
public class HashTableBuildTimes {

	public static void main(String[] args) throws java.io.FileNotFoundException {
		TrialSuite main_ts = new TrialSuite();
		TrialSuite extended_ts = new TrialSuite();  /* alpha=.75f */
		TrialSuite modest_ts = new TrialSuite();    /* alpha=4.0f */
		TrialSuite norehash_ts = new TrialSuite();    /* alpha=HIGH */
		int numWords = 213557;

		String loc = "resources" + java.io.File.separatorChar +
					 "algs" + java.io.File.separatorChar +
					 "chapter5" + java.io.File.separatorChar +
					 "words.english.txt";

		ArrayList<String> words = new ArrayList<String> ();
		Iterator<String> it = new StringFileIterator(new File (loc));
		while (it.hasNext()) {
			words.add(it.next());
		}

		int NUM_TRIALS = 100;
		for (int k = 12; k <= 20; k++) {
			long now, after;
			System.out.println(k + "...");
			int sz = (int) (Math.pow(2, k))-1;
			java.util.Hashtable<String,Boolean> htnative;

			for (int t = 0; t < NUM_TRIALS; t++) {
				System.gc();

				ListHashTable<String> ht = new ListHashTable<String>(sz);

				// we know the size of this list: 213,557 words.
				it = words.iterator();
				System.gc();

				// (1) only time the loading up of MAIN
				// --------------------------------------
				now = System.currentTimeMillis();
				ht.load(it);
				after = System.currentTimeMillis();
				main_ts.addTrial(sz, now, after);
				ht = null;

				// now time HashTable (default capacity of .75f)
				htnative = new java.util.Hashtable<String,Boolean> (sz);

				it = words.iterator();
				System.gc();
				// (2) only time the loading up of Extended (capacity=.75)
				// --------------------------------------------------------
				now = System.currentTimeMillis();
				while (it.hasNext()) {
					htnative.put(it.next(), Boolean.TRUE);
				}
				after = System.currentTimeMillis();
				extended_ts.addTrial(sz, now, after);
				htnative = null;

				// now time HashTable (default capacity of 4.0f)
				htnative = new java.util.Hashtable<String,Boolean> (sz, 4.0f);

				it = words.iterator();
				System.gc();
				// (3) only time the loading up of Extended Modest Rehash
				// ------------------------------------------------------
				now = System.currentTimeMillis();
				while (it.hasNext()) {
					htnative.put(it.next(), Boolean.TRUE);
				}
				after = System.currentTimeMillis();
				modest_ts.addTrial(sz, now, after);
				htnative = null;

				// now time HashTable (default capacity of HIGH so no rehash)
				float cap = numWords;
				cap /= sz;
				htnative = new java.util.Hashtable<String,Boolean> (sz, 1+cap);

				it = words.iterator();
				System.gc();
				// (3) only time the loading up of Extended Modest Rehash
				// ------------------------------------------------------
				now = System.currentTimeMillis();
				while (it.hasNext()) {
					htnative.put(it.next(), Boolean.TRUE);
				}
				after = System.currentTimeMillis();
				norehash_ts.addTrial(sz, now, after);
				htnative = null;
			}
		}

		System.out.println("MAIN");
		System.out.println(main_ts.computeTable());

		System.out.println("EXTENDED");
		System.out.println(extended_ts.computeTable());

		System.out.println("MODEST");
		System.out.println(modest_ts.computeTable());

		System.out.println("NO REHASH");
		System.out.println(norehash_ts.computeTable());

	}
}


text:
module Api
  module V1
    class TopicsController < ApiController

      def index
        if params[:keywords]
          @topics = Topic.where('name ilike ?', "%#{params[:keywords]}%")
        elsif params[:all]
          @topics = Topic.all
        else
          @topics = []
        end
        render 'index'
      end

      def show
        @topic = Topic.find_by_id(params[:id])
        if @topic
          render '_show'
        else
          render json: {message: 'Resource not found'}, status: 404
        end
      end

      def destroy
        @topic = Topic.find_by_id(params[:id])
        if @topic
          @topic.delete
          render '_show'
        else
          render json: {message: 'Resource not found'}, status: 404
        end
      end
    end
  end
end


text:
import proxys from '../../proxys';

export default {
  event:'remoting.invoke',
  invoke: async function (params) {
    const {container,packet} = params;
    const data = await proxys.call(packet.data);
    container.send(
      params,
      {
        packet: {
          event: `remoting.result`,
          data
        }
      },
      true
    );
  }
};


text:
/**
 * Overwrites default Mousetrap.bind method to optionally accept
 * an object to bind multiple key events in a single call
 *
 * You can pass it in like:
 *
 * Mousetrap.bind({
 *     'a': function() { console.log('a'); },
 *     'b': function() { console.log('b'); }
 * });
 *
 * And can optionally pass in 'keypress', 'keydown', or 'keyup'
 * as a second argument
 *
 */
/* global Mousetrap:true */
Mousetrap = (function(Mousetrap) {
    var self = Mousetrap,
        _oldBind = self.bind,
        args;

    self.bind = function() {
        args = arguments;

        // normal call
        if (typeof args[0] == 'string' || args[0] instanceof Array) {
            return _oldBind(args[0], args[1], args[2]);
        }

        // object passed in
        for (var key in args[0]) {
            if (args[0].hasOwnProperty(key)) {
                _oldBind(key, args[0][key], args[1]);
            }
        }
    };

    return self;
}) (Mousetrap);


text:
package com.lehman.ic9.io;

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

import javax.script.ScriptException;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

import com.lehman.ic9.ic9engine;
import com.lehman.ic9.ic9exception;

/**
 * Config object used for managing configuration files.
 * @author Austin Lehman
 */
public class config
{
	/** The config object. */
	private PropertiesConfiguration config = null;

	/**
	 * Default constructor instantiate the config object.
	 */
	public config()
	{
		this.config = new PropertiesConfiguration();
	}

	/**
	 * Loads the configuration from the provided file name.
	 * @param FileName is a String with the config file to load.
	 * @throws ic9exception if something goes wrong.
	 */
	public void load(String FileName) throws ic9exception
	{
		try
		{
			this.config = new PropertiesConfiguration(FileName);
		}
		catch (ConfigurationException e)
		{
			throw new ic9exception("config.load(): ConfigurationException: " + e.getMessage());
		}
	}

	/**
	 * Gets a property value with the provided property name. If the provided default value
	 * is not null and an exception occurs, the default value is returned. If the default is
	 * set to null, then the exception is thrown.
	 * @param PropertyName is a String with the property name to find.
	 * @param DefaultValue is a String with the default value to return or null.
	 * @return A String with the property value.
	 * @throws ic9exception if something goes wrong.
	 */
	public String get(String PropertyName, String DefaultValue) throws ic9exception
	{
		if(this.config != null)
		{
			try
			{
				return this.config.getString(PropertyName);
			}
			catch(Exception e)
			{
				if(DefaultValue != null) return DefaultValue;
				else throw new ic9exception("config.get(): " + e.getMessage());
			}
		}
		else
			throw new ic9exception("config.get(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Gets a property value as a String with the provided property name. If the provided default value
	 * is not null and an exception occurs, the default value is returned. If the default is
	 * set to null, then the exception is thrown.
	 * @param PropertyName is a String with the property name to find.
	 * @param DefaultValue is a String with the default value to return or null.
	 * @return A String with the property value.
	 * @throws ic9exception if something goes wrong.
	 */
	public String getString(String PropertyName, String DefaultValue) throws ic9exception
	{
		return this.get(PropertyName, DefaultValue);
	}

	/**
	 * Gets a property value as a boolean with the provided property name. If the provided default value
	 * is not null and an exception occurs, the default value is returned. If the default is
	 * set to null, then the exception is thrown.
	 * @param PropertyName is a String with the property name to find.
	 * @param DefaultValue is a boolean with the default value to return or null.
	 * @return A boolean with the property value.
	 * @throws ic9exception if something goes wrong.
	 */
	public boolean getBool(String PropertyName, boolean DefaultValue) throws ic9exception
	{
		if(this.config != null)
		{
			try
			{
				return this.config.getBoolean(PropertyName);
			}
			catch(Exception e)
			{
				return DefaultValue;
			}
		}
		else
			throw new ic9exception("config.getBool(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Gets a property value as a long integer with the provided property name. If the provided default value
	 * is not null and an exception occurs, the default value is returned. If the default is
	 * set to null, then the exception is thrown.
	 * @param PropertyName is a String with the property name to find.
	 * @param DefaultValue is a long integer with the default value to return or null.
	 * @return A long integer with the property value.
	 * @throws ic9exception if something goes wrong.
	 */
	public long getInt(String PropertyName, long DefaultValue) throws ic9exception
	{
		if(this.config != null)
		{
			try
			{
				return this.config.getLong(PropertyName);
			}
			catch(Exception e)
			{
				return DefaultValue;
			}
		}
		else
			throw new ic9exception("config.getInt(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Gets a property value as a double with the provided property name. If the provided default value
	 * is not null and an exception occurs, the default value is returned. If the default is
	 * set to null, then the exception is thrown.
	 * @param PropertyName is a String with the property name to find.
	 * @param DefaultValue is a double with the default value to return or null.
	 * @return A double with the property value.
	 * @throws ic9exception if something goes wrong.
	 */
	public double getDouble(String PropertyName, double DefaultValue) throws ic9exception
	{
		if(this.config != null)
		{
			try
			{
				return this.config.getDouble(PropertyName);
			}
			catch(Exception e)
			{
				return DefaultValue;
			}
		}
		else
			throw new ic9exception("config.getDouble(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Gets a property value as a list with the provided property name. If the provided default value
	 * is not null and an exception occurs, the default value is returned. If the default is
	 * set to null, then the exception is thrown.
	 * @param PropertyName is a String with the property name to find.
	 * @param DefaultValue is a list with the default value to return or null.
	 * @return A list with the property value.
	 * @throws ic9exception if something goes wrong.
	 */
	public List<Object> getList(String PropertyName, List<Object> DefaultValue) throws ic9exception
	{
		if(this.config != null)
		{
			try
			{
				return (ArrayList<Object>) this.config.getList(PropertyName);
			}
			catch(Exception e)
			{
				return DefaultValue;
			}
		}
		else
			throw new ic9exception("config.getList(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Gets the full config as a map.
	 * @param Eng is an instance of ic9engine.
	 * @return A map with the property value.
	 * @throws ic9exception if something goes wrong.
	 * @throws ScriptException Exception
	 * @throws NoSuchMethodException Exception
	 */
	public Map<String, Object> getConfigMap(ic9engine Eng) throws ic9exception, NoSuchMethodException, ScriptException
	{
		Map<String, Object> ret = Eng.newObj();

		if(this.config != null)
		{
			try
			{
				Iterator<String> keys = this.config.getKeys();
				while(keys.hasNext())
				{
					String key = keys.next();
					ret.put(key, this.config.getString(key));
				}
				return ret;
			}
			catch(Exception e)
			{
				throw new ic9exception("config.getMap(): Unhandled exception. " + e.getMessage());
			}
		}
		else
			throw new ic9exception("config.getMap(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Puts property value with the provided property name.
	 * @param PropertyName is a String with the property name to find.
	 * @param Value is a value to set for the property.
	 * @throws ic9exception if something goes wrong.
	 */
	public void put(String PropertyName, Object Value) throws ic9exception
	{
		if(this.config != null)
			this.config.addProperty(PropertyName, Value);
		else
			throw new ic9exception("config.add(): org.apache.commons.configuration.PropertiesConfiguration object is null.");
	}

	/**
	 * Saves the current config to a file with the provided file name.
	 * @param FileName is a String with the file name to save the config to.
	 * @throws ic9exception if something goes wrong.
	 */
	public void save(String FileName) throws ic9exception
	{
		try
		{
			this.config.save(FileName);
		}
		catch (ConfigurationException e)
		{
			throw new ic9exception("config.save(): ConfigurationException: " + e.getMessage());
		}
	}
}


text:
package com.googlecode.yatspec.state;

import java.util.List;

public interface Result {

    List<TestMethod> getTestMethods() throws Exception;

    Class<?> getTestClass();

    Scenario getScenario(String name) throws Exception;

    String getName();

    String getPackageName();

}


text:
package desktop

import (
	"context"
	"fmt"
	"net"
	"strings"
	"time"

	"github.com/go-ldap/ldap/v3"
	"github.com/gravitational/trace"

	apidefaults "github.com/gravitational/teleport/api/defaults"
	"github.com/gravitational/teleport/api/types"
	"github.com/gravitational/teleport/lib/auth/windows"
	"github.com/gravitational/teleport/lib/defaults"
	"github.com/gravitational/teleport/lib/services"
	"github.com/gravitational/teleport/lib/utils"
)

// startDesktopDiscovery starts fetching desktops from LDAP, periodically
// registering and unregistering them as necessary.
func (s *WindowsService) startDesktopDiscovery() error {
	reconciler, err := services.NewReconciler(services.ReconcilerConfig{
		// Use a matcher that matches all resources, since our desktops are
		// pre-filtered by nature of using an LDAP search with filters.
		Matcher: func(r types.ResourceWithLabels) bool { return true },

		GetCurrentResources: func() types.ResourcesWithLabelsMap { return s.lastDiscoveryResults },
		GetNewResources:     s.getDesktopsFromLDAP,
		OnCreate:            s.upsertDesktop,
		OnUpdate:            s.upsertDesktop,
		OnDelete:            s.deleteDesktop,
		Log:                 s.cfg.Log,
	})
	if err != nil {
		return trace.Wrap(err)
	}

	go func() {
		// reconcile once before starting the ticker, so that desktops show up immediately
		// (we still have a small delay to give the LDAP client time to initialize)
		time.Sleep(15 * time.Second)
		if err := reconciler.Reconcile(s.closeCtx); err != nil && err != context.Canceled {
			s.cfg.Log.Errorf("desktop reconciliation failed: %v", err)
		}

		// TODO(zmb3): consider making the discovery period configurable
		// (it's currently hard coded to 5 minutes in order to match DB access discovery behavior)
		t := s.cfg.Clock.NewTicker(5 * time.Minute)
		defer t.Stop()
		for {
			select {
			case <-s.closeCtx.Done():
				return
			case <-t.Chan():
				if err := reconciler.Reconcile(s.closeCtx); err != nil && err != context.Canceled {
					s.cfg.Log.Errorf("desktop reconciliation failed: %v", err)
				}
			}
		}
	}()

	return nil
}

func (s *WindowsService) ldapSearchFilter() string {
	var filters []string
	filters = append(filters, fmt.Sprintf("(objectClass=%s)", windows.ComputerClass))
	filters = append(filters, fmt.Sprintf("(!(objectClass=%s))", windows.GMSAClass))
	filters = append(filters, s.cfg.DiscoveryLDAPFilters...)

	return windows.CombineLDAPFilters(filters)
}

// getDesktopsFromLDAP discovers Windows hosts via LDAP
func (s *WindowsService) getDesktopsFromLDAP() types.ResourcesWithLabelsMap {
	if !s.ldapReady() {
		s.cfg.Log.Warn("skipping desktop discovery: LDAP not yet initialized")
		return nil
	}

	filter := s.ldapSearchFilter()
	s.cfg.Log.Debugf("searching for desktops with LDAP filter %v", filter)

	var attrs []string
	attrs = append(attrs, ComputerAttributes...)
	attrs = append(attrs, s.cfg.DiscoveryLDAPAttributeLabels...)

	entries, err := s.lc.ReadWithFilter(s.cfg.DiscoveryBaseDN, filter, attrs)
	if trace.IsConnectionProblem(err) {
		// If the connection was broken, re-initialize the LDAP client so that it's
		// ready for the next reconcile loop. Return the last known set of desktops
		// in this case, so that the reconciler doesn't delete the desktops it already
		// knows about.
		s.cfg.Log.Info("LDAP connection error when searching for desktops, reinitializing client")
		if err := s.initializeLDAP(); err != nil {
			s.cfg.Log.Errorf("failed to reinitialize LDAP client, will retry on next reconcile: %v", err)
		}
		return s.lastDiscoveryResults
	} else if err != nil {
		s.cfg.Log.Warnf("could not discover Windows Desktops: %v", err)
		return nil
	}

	s.cfg.Log.Debugf("discovered %d Windows Desktops", len(entries))

	result := make(types.ResourcesWithLabelsMap)
	for _, entry := range entries {
		desktop, err := s.ldapEntryToWindowsDesktop(s.closeCtx, entry, s.cfg.HostLabelsFn)
		if err != nil {
			s.cfg.Log.Warnf("could not create Windows Desktop from LDAP entry: %v", err)
			continue
		}
		result[desktop.GetName()] = desktop
	}

	// capture the result, which will be used on the next reconcile loop
	s.lastDiscoveryResults = result

	return result
}

func (s *WindowsService) upsertDesktop(ctx context.Context, r types.ResourceWithLabels) error {
	d, ok := r.(types.WindowsDesktop)
	if !ok {
		return trace.Errorf("upsert: expected a WindowsDesktop, got %T", r)
	}
	return s.cfg.AuthClient.UpsertWindowsDesktop(ctx, d)
}

func (s *WindowsService) deleteDesktop(ctx context.Context, r types.ResourceWithLabels) error {
	d, ok := r.(types.WindowsDesktop)
	if !ok {
		return trace.Errorf("delete: expected a WindowsDesktop, got %T", r)
	}
	return s.cfg.AuthClient.DeleteWindowsDesktop(ctx, d.GetHostID(), d.GetName())
}

func (s *WindowsService) applyLabelsFromLDAP(entry *ldap.Entry, labels map[string]string) {
	// apply common LDAP labels by default
	labels[types.OriginLabel] = types.OriginDynamic
	labels[types.TeleportNamespace+"/dns_host_name"] = entry.GetAttributeValue(windows.AttrDNSHostName)
	labels[types.TeleportNamespace+"/computer_name"] = entry.GetAttributeValue(windows.AttrName)
	labels[types.TeleportNamespace+"/os"] = entry.GetAttributeValue(windows.AttrOS)
	labels[types.TeleportNamespace+"/os_version"] = entry.GetAttributeValue(windows.AttrOSVersion)

	// attempt to compute the desktop's OU from its DN
	dn := entry.GetAttributeValue(windows.AttrDistinguishedName)
	cn := entry.GetAttributeValue(windows.AttrCommonName)
	if len(dn) > 0 && len(cn) > 0 {
		ou := strings.TrimPrefix(dn, "CN="+cn+",")
		labels[types.TeleportNamespace+"/ou"] = ou
	}

	// label domain controllers
	switch entry.GetAttributeValue(windows.AttrPrimaryGroupID) {
	case windows.WritableDomainControllerGroupID, windows.ReadOnlyDomainControllerGroupID:
		labels[types.TeleportNamespace+"/is_domain_controller"] = "true"
	}

	// apply any custom labels per the discovery configuration
	for _, attr := range s.cfg.DiscoveryLDAPAttributeLabels {
		if v := entry.GetAttributeValue(attr); v != "" {
			labels["ldap/"+attr] = v
		}
	}
}

// lookupDesktop does a DNS lookup for the provided hostname.
// It checks using the default system resolver first, and falls
// back to making a DNS query of the configured LDAP server
// if the system resolver fails.
func (s *WindowsService) lookupDesktop(ctx context.Context, hostname string) (addrs []string, err error) {
	tctx, cancel := context.WithTimeout(ctx, 10*time.Second)
	defer cancel()

	addrs, err = net.DefaultResolver.LookupHost(tctx, hostname)
	if err == nil && len(addrs) > 0 {
		return addrs, nil
	}

	s.cfg.Log.WithError(err).Debugf("DNS lookup for %v failed, falling back to LDAP server", hostname)
	return s.dnsResolver.LookupHost(ctx, hostname)
}

// ldapEntryToWindowsDesktop generates the Windows Desktop resource
// from an LDAP search result
func (s *WindowsService) ldapEntryToWindowsDesktop(ctx context.Context, entry *ldap.Entry, getHostLabels func(string) map[string]string) (types.ResourceWithLabels, error) {
	hostname := entry.GetAttributeValue(windows.AttrDNSHostName)
	labels := getHostLabels(hostname)
	labels[types.TeleportNamespace+"/windows_domain"] = s.cfg.Domain
	s.applyLabelsFromLDAP(entry, labels)

	addrs, err := s.lookupDesktop(ctx, hostname)
	if err != nil || len(addrs) == 0 {
		return nil, trace.WrapWithMessage(err, "couldn't resolve %q", hostname)
	}

	s.cfg.Log.Debugf("resolved %v => %v", hostname, addrs)
	addr, err := utils.ParseHostPortAddr(addrs[0], defaults.RDPListenPort)
	if err != nil {
		return nil, trace.Wrap(err)
	}

	desktop, err := types.NewWindowsDesktopV3(
		// ensure no '.' in name, because we use SNI to route to the right
		// desktop, and our cert is valid for *.desktop.teleport.cluster.local
		strings.ReplaceAll(hostname, ".", "-"),
		labels,
		types.WindowsDesktopSpecV3{
			Addr:   addr.String(),
			Domain: s.cfg.Domain,
			HostID: s.cfg.Heartbeat.HostUUID,
		},
	)
	if err != nil {
		return nil, trace.Wrap(err)
	}

	desktop.SetExpiry(s.cfg.Clock.Now().UTC().Add(apidefaults.ServerAnnounceTTL))
	return desktop, nil
}


text:
<?php

/**
 *  Lousson\Config\Callback\CallbackConfigSQLSimpleTest class definition
 *
 *  @package    org.lousson.config
 *  @copyright  (c) 2012 - 2013, The Lousson Project
 *  @license    http://opensource.org/licenses/bsd-license.php New BSD License
 *  @author     Nils Gotzhein <nils.gotzhein at gmail.com>
 *  @filesource
 */
namespace Lousson\Config\Callback;

/** Dependencies: */
use Lousson\Config\Callback\CallbackConfigSQLSimple;
use Closure;

/**
 *  A test case for the CallbackConfigSQLSimple implementation
 *
 *  @since      lousson/Lousson_Config-0.2.0
 *  @package    org.lousson.config
 */
class CallbackConfigSQLSimpleTest extends CallbackConfigSQLTest
{

    /**
     *  Obtain the config entity to test
     *
     *  The getConfigEntity() method returns the AnyConfigEntity object
     *  that is about to be tested.
     *
     *	@param	$callback	Closure
     *  @return \Lousson\Config\AnyConfigEntity
     *          A config entity is returned on success
     */
    public function getConfigEntity( Closure $callback = null )
    {
 		if(null === $callback) {
    		$callback = $this->getCallback();
 		}

    	$index = array(
    		'entity_key' => 'entity_value'
    	);

        $config = new CallbackConfigSQLSimple(
			$callback,
			self::TABLE_PREFIX,
			$index
		);
        return $config;
    }

    /**
     *  Test the internal error handling
     *
     *  The testHasErrorOption() method is a test case that verifies that
     *  non-config exceptions raised by the callback do not lead to a
     *  violation of the AnyConfig interface.
     *
     *  @expectedException          PHPUnit_Framework_Error_Warning
     *  @test
     *
     *  @throws \PHPUnit_Framework_Error_Warning
     *          Raised in case the test is successful
     *
     *  @throws \Exception
     *          Raised in case of an implementation error
     */
    public function testHasErrorOption()
    {
        $callback = function($name, &$fallback) {
            throw new \DomainException("foo bar baz");
        };

        $config = new CallbackConfigSQLSimple($callback);
        $config->hasOption("test");
    }

    /**
     * Example value for the parameter $tableName of the constructor
     * of the tested class.
     *
     * @var string
     */
    const TABLE_PREFIX = 'pre_';

}


text:
class InjectionInfo {
    private _injectedParams: DependencyInjection.InjectedParamInfo[];
    private _injectedProperties: DependencyInjection.InjectedPropertyInfo[];
    private _className: string;

    constructor(className: string) {
        this._injectedParams = [];
        this._injectedProperties = [];
        this._className = className;
    }

    public get injectedParams() {
        return this._injectedParams;
    }

    public get injectedProperties() {
        return this._injectedProperties;
    }

}

class InjectionManager {
    private _injectionMap: Map<string | symbol, InjectionInfo> = new Map<string, InjectionInfo>();

    public getInjectionInfo(name: string) {
        return this._injectionMap.get(name);
    }

    public regeisterParam(parameter: { name: string } & DependencyInjection.InjectedParamInfo) {
        var injection = this._injectionMap.get(parameter.name)
        if (injection) {
            injection.injectedParams.push({
                parameterIndex: parameter.parameterIndex,
                injectionName: parameter.injectionName
            });
        } else {
            injection = new InjectionInfo(parameter.name)
            injection.injectedParams.push({
                parameterIndex: parameter.parameterIndex,
                injectionName: parameter.injectionName
            });
            this._injectionMap.set(parameter.name, injection);
        }
    }

    public regeisterProperty(parameter: { name: string } & DependencyInjection.InjectedPropertyInfo) {
        var injection = this._injectionMap.get(parameter.name)
        if (injection) {
            injection.injectedProperties.push({
                injectionName: parameter.injectionName,
                propertyName: parameter.propertyName
            });
        } else {
            injection = new InjectionInfo(parameter.name)
            injection.injectedProperties.push({
                injectionName: parameter.injectionName,
                propertyName: parameter.propertyName
            });
            this._injectionMap.set(parameter.name, injection);
        }

    }
}

export const injectionManager: InjectionManager = new InjectionManager();


text:
Silex, a simple Web Framework
=============================

Silex is a PHP micro-framework to develop websites based on `Symfony2
components`_:

.. code-block:: php

    <?php

    require_once __DIR__.'/../vendor/autoload.php';

    $app = new Silex\Application();

    $app->get('/hello/{name}', function ($name) use ($app) {
      return 'Hello '.$app->escape($name);
    });

    $app->run();

Silex works with PHP 5.3.3 or later.

Installation
------------

The recommended way to install Silex is through `Composer`_. Just create a
``composer.json`` file and run the ``php composer.phar install`` command to
install it:

.. code-block:: json

    {
        "require": {
            "silex/silex": "~1.2"
        }
    }

Alternatively, you can download the `silex.zip`_ file and extract it.

More Information
----------------

Read the `documentation`_ for more information.

Tests
-----

To run the test suite, you need `Composer`_:

.. code-block:: bash

    $ php composer.phar install --dev
    $ vendor/bin/phpunit

Community
---------

Check out #silex-php on irc.freenode.net.

License
-------

Silex is licensed under the MIT license.

.. _Symfony2 components: http://symfony.com
.. _Composer:            http://getcomposer.org
.. _silex.zip:           http://silex.sensiolabs.org/download
.. _documentation:       http://silex.sensiolabs.org/documentation


text:
! RUN: %B/test/Semantics/test_errors.sh %s %flang %t
! Tests based on examples in C.10.6

! C.10.6(10)
module m1
  interface GOOD1
    function F1A(X)
      real :: F1A, X
    end function
    function F1B(X)
      integer :: F1B, X
    end function
  end interface
end

! C.10.6(13)
module m2
  interface GOOD2
    function F2A(X)
      real :: F2A, X
    end function
    function F2B(X, Y)
      complex :: F2B
      real :: X, Y
    end function
  end interface
end

! C.10.6(15)
module m3
  interface GOOD3
    subroutine S3A(W, X, Y, Z)
      real :: W, Y
      integer :: X, Z
    end subroutine
    subroutine S3B(X, W, Z, Y)
      real :: W, Z
      integer :: X, Y
    end subroutine
  end interface
end
module m3b
  interface GOOD3
    subroutine S3B(X, W, Z, Y)
      real :: W, Z
      integer :: X, Y
    end subroutine
    subroutine S3A(W, X, Y, Z)
      real :: W, Y
      integer :: X, Z
    end subroutine
  end interface
end

! C.10.6(17)
! BAD4(1.0,2,Y=3.0,Z=4) could apply to either procedure
module m4
  !ERROR: Generic 'bad4' may not have specific procedures 's4a' and 's4b' as their interfaces are not distinguishable
  interface BAD4
    subroutine S4A(W, X, Y, Z)
      real :: W, Y
      integer :: X, Z
    end subroutine
    subroutine S4B(X, W, Z, Y)
      real :: X, Y
      integer :: W, Z
    end subroutine
  end interface
end
module m4b
  !ERROR: Generic 'bad4' may not have specific procedures 's4b' and 's4a' as their interfaces are not distinguishable
  interface BAD4
    subroutine S4B(X, W, Z, Y)
      real :: X, Y
      integer :: W, Z
    end subroutine
    subroutine S4A(W, X, Y, Z)
      real :: W, Y
      integer :: X, Z
    end subroutine
  end interface
end

! C.10.6(19)
module m5
  interface GOOD5
    subroutine S5A(X)
      real :: X
    end subroutine
    subroutine S5B(Y, X)
      real :: Y, X
    end subroutine
  end interface
end

module FRUITS
  type :: FRUIT
  end type
  type, extends(FRUIT) :: APPLE
  end type
  type, extends(FRUIT) :: PEAR
  end type
  type, extends(PEAR) :: BOSC
  end type
end

! C.10.6(21)
! type(PEAR) :: A_PEAR
! type(BOSC) :: A_BOSC
! BAD6(A_PEAR,A_BOSC)  ! could be s6a or s6b
module m6
  !ERROR: Generic 'bad6' may not have specific procedures 's6a' and 's6b' as their interfaces are not distinguishable
  interface BAD6
    subroutine S6A(X, Y)
      use FRUITS
      class(PEAR) :: X, Y
    end subroutine
    subroutine S6B(X, Y)
      use FRUITS
      class(FRUIT) :: X
      class(BOSC) :: Y
    end subroutine
  end interface
end
module m6b
  !ERROR: Generic 'bad6' may not have specific procedures 's6b' and 's6a' as their interfaces are not distinguishable
  interface BAD6
    subroutine S6B(X, Y)
      use FRUITS
      class(FRUIT) :: X
      class(BOSC) :: Y
    end subroutine
    subroutine S6A(X, Y)
      use FRUITS
      class(PEAR) :: X, Y
    end subroutine
  end interface
end

! C.10.6(22)
module m7
  interface GOOD7
    subroutine S7A(X, Y, Z)
      use FRUITS
      class(PEAR) :: X, Y, Z
    end subroutine
    subroutine S7B(X, Z, W)
      use FRUITS
      class(FRUIT) :: X
      class(BOSC) :: Z
      class(APPLE), optional :: W
    end subroutine
  end interface
end
module m7b
  interface GOOD7
    subroutine S7B(X, Z, W)
      use FRUITS
      class(FRUIT) :: X
      class(BOSC) :: Z
      class(APPLE), optional :: W
    end subroutine
    subroutine S7A(X, Y, Z)
      use FRUITS
      class(PEAR) :: X, Y, Z
    end subroutine
  end interface
end

! C.10.6(25)
! Invalid generic (according to the rules), despite the fact that it is unambiguous
module m8
  !ERROR: Generic 'bad8' may not have specific procedures 's8a' and 's8b' as their interfaces are not distinguishable
  interface BAD8
    subroutine S8A(X, Y, Z)
      real, optional :: X
      integer :: Y
      real :: Z
    end subroutine
    subroutine S8B(X, Z, Y)
      integer, optional :: X
      integer :: Z
      real :: Y
    end subroutine
  end interface
end


text:
..
   Copyright © 2012-2015 Cask Data, Inc.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

:orphan:

.. index::
   single: Provisioner Configuration

=========================
Provisioner Configuration
=========================

The Provisioner is a running process that manages workers and plugin resources. Workers are separate
processes that perform individual tasks for a specific tenant. Plugin resources are files or archives
that may be used to execute tasks. Chef cookbooks are examples of plugin resources. Each provisioner
has a capacity, which is the maximum number of workers it can manage. When configuring capacity for
your provisioner, assume each worker takes 256mb of memory. CPU usage is negligible. The provisioner
periodically sends a heartbeat to the server to tell the system it is alive. Live provisioners may
get requests from the server to add or remove workers for different tenants.

Example
^^^^^^^^
Shown below is an example configuration with settings that you are most likely to change.
::

  <configuration>
    <property>
      <name>provisioner.capacity</name>
      <value>10</value>
      <description>Max number of running workers for this provisioner</description>
    </property>
    <property>
      <name>provisioner.server.uri</name>
      <value>http://localhost:55054</value>
      <description>URI of server to connect to</description>
    </property>
    <property>
      <name>provisioner.data.dir</name>
      <value>/var/coopr/data/provisioner/data</value>
      <description>Provisioner storage directory for plugin data resources</description>
    </property>
    <property>
      <name>provisioner.work.dir</name>
      <value>/var/coopr/data/provisioner/work</value>
      <description>Provisioner working directory</description>
    </property>
  </configuration>

Running Provisioner to use SSL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To configure the provisioner to support server with SSL, add or update this property in ``provisioner-site.xml``::

    <property>
      <name>provisioner.server.uri</name>
      <value>https://localhost:55054</value>
      <description>URI of server to connect to</description>
    </property>

To configure the provisioner to support server that uses mutual authentication with SSL,
setup these environment variables:

====================================     ==========================    =======================================
   Environment variable                     Default Value                     Description
====================================     ==========================    =======================================
TRUST_CERT_PATH                             None                        Trusted certificate file location.
TRUST_CERT_PASSWORD                         None                        Trusted certificate password.
====================================     ==========================    =======================================

Configuration
^^^^^^^^^^^^^

A full list of available configuration settings and their default values are given below:

.. list-table::
   :header-rows: 1

   * - Config setting
     - Default
     - Description
   * - provisioner.server.uri
     - http://localhost:55054
     - URI of server to connect to.
   * - provisioner.bind.ip
     - 0.0.0.0
     - Local IP provisioner should listen on.
   * - provisioner.bind.port
     - 55056
     - Local Port provisioner should listen on.
   * - provisioner.register.ip
     -
     - Routable IP for the server to call back to this provisioner's API. If left empty, the provisioner will attempt to auto-detect.
   * - provisioner.data.dir
     - /var/coopr/data/provisioner/data
     - Provisioner storage directory for plugin data resources
   * - provisioner.work.dir
     - /var/coopr/data/provisioner/work
     - Provisioner working directory
   * - provisioner.capacity
     - 10
     - Max number of running workers for this provisioner. Assume each worker takes 256mb of memory.
   * - provisioner.heartbeat.interval
     - 10
     - Interval in seconds to send heartbeat to server


text:
<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "configuracion".
 *
 * @property string $id
 * @property integer $mantenimiento
 */
class Configuracion extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'configuracion';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['mantenimiento'], 'required'],
            [['mantenimiento'], 'integer']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'mantenimiento' => 'Mantenimiento',
        ];
    }
}


text:
Ruby gem that allows you to store your static pages and meta data in database.

## Requirements

SuperbPages requires Ruby version >= 1.9.3 and Ruby on Rails version >= 4.0.0.

## Installation

Add this line to your application's Gemfile:

    gem 'superb_pages'

And then execute:

    $ bundle

And run the generator:

    rails g superb_pages:install

## Generators

### Install

    rails g superb_pages:install

This one runs all SuperbPages generators. Use it if you didn't do anything related to the functionality of this gem.

### Migrations

    rails g superb_pages:migration

This generator copies migration that are required by the gem.

### Models

    rails g superb_pages:models

It generates `Page` and `MetaBlock` models:

    app/models/page.rb
    app/models/meta_block.rb

### Route

    rails g superb_pages:route

Run this migration to add route for `PagesController`.

## Usage

Static pages are ready straight away after installation. Just visit `localhost:3000/pages/your-page` and it will render its content (of course, if there is a page with `your-page` slug in your database). Just write your own admin interface and you are ready.

## Customization

### Models

Feel free to change `Pages` and `MetaBlock` models to add new or override the existing functionality.

### Controller

Create `app/controllers/pages_controller.rb` file and it will be used instead of default `PagesController`. Or write your own routes.

### View

Create `app/views/pages/show.html.erb` file and it will be used instead of default view.

### Uploader

`MetaBlock` model uses `SuperbPages::MetaFacebookImageUploader` to upload images for Facebook meta tags. You can use your own uploader instead. Just perform the following steps:

Create your own uploader `app/uploaders/custom_uploader.rb`

Add the following line to the `app/models/meta_block.rb`:

    mount_uploader :fb_image, CustomUploader


text:
package armbatch_test

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/batch/armbatch"
)

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationGetQuotas.json
func ExampleLocationClient_GetQuotas() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armbatch.NewLocationClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.GetQuotas(ctx, "japaneast", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListVirtualMachineSkus.json
func ExampleLocationClient_NewListSupportedVirtualMachineSKUsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armbatch.NewLocationClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListSupportedVirtualMachineSKUsPager("japaneast", &armbatch.LocationClientListSupportedVirtualMachineSKUsOptions{Maxresults: nil,
		Filter: nil,
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListCloudServiceSkus.json
func ExampleLocationClient_NewListSupportedCloudServiceSKUsPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armbatch.NewLocationClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListSupportedCloudServiceSKUsPager("japaneast", &armbatch.LocationClientListSupportedCloudServiceSKUsOptions{Maxresults: nil,
		Filter: nil,
	})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_AlreadyExists.json
func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAlreadyExists() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armbatch.NewLocationClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckNameAvailability(ctx, "japaneast", armbatch.CheckNameAvailabilityParameters{
		Name: to.Ptr("existingaccountname"),
		Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_Available.json
func ExampleLocationClient_CheckNameAvailability_locationCheckNameAvailabilityAvailable() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armbatch.NewLocationClient("subid", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CheckNameAvailability(ctx, "japaneast", armbatch.CheckNameAvailabilityParameters{
		Name: to.Ptr("newaccountname"),
		Type: to.Ptr("Microsoft.Batch/batchAccounts"),
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}


text:
%% Web Access using Data Import and Export API
% This is not possible with the webread/webwrite API

%% HTTP Interface
import matlab.net.*
import matlab.net.http.*
import matlab.net.http.io.*

header = HeaderField('Authorization', 'Bearer ACCESS_TOKEN');
uri = URI('https://upload.box.com/api/2.0/files/content');
body = MultipartFormProvider(...
    'attributes', JSONProvider(struct(...
        'name', 'tigers.jpeg',...
        'parent', struct(...
            'id', '11446498'...
        )...
    )),...
    'file', ImageProvider('myfile.jpg')...
);
response = RequestMessage('post', header, body).send(uri.EncodedURI);


text:
import * as Platform from '../platform/platform.js';

export class Segment<T> {
  begin: number;
  end: number;
  data: T;

  constructor(begin: number, end: number, data: T) {
    if (begin > end) {
      throw new Error('Invalid segment');
    }
    this.begin = begin;
    this.end = end;
    this.data = data;
  }

  intersects(that: Segment<T>): boolean {
    return this.begin < that.end && that.begin < this.end;
  }
}

export class SegmentedRange<T> {
  #segmentsInternal: Segment<T>[];
  readonly #mergeCallback: ((arg0: Segment<T>, arg1: Segment<T>) => Segment<T>| null)|undefined;

  constructor(mergeCallback?: ((arg0: Segment<T>, arg1: Segment<T>) => Segment<T>| null)) {
    this.#segmentsInternal = [];
    this.#mergeCallback = mergeCallback;
  }

  append(newSegment: Segment<T>): void {
    // 1. Find the proper insertion point for new segment
    let startIndex =
        Platform.ArrayUtilities.lowerBound(this.#segmentsInternal, newSegment, (a, b) => a.begin - b.begin);
    let endIndex = startIndex;
    let merged: (Segment<T>|null)|null = null;
    if (startIndex > 0) {
      // 2. Try mering the preceding segment
      const precedingSegment = this.#segmentsInternal[startIndex - 1];
      merged = this.tryMerge(precedingSegment, newSegment);
      if (merged) {
        --startIndex;
        newSegment = merged;
      } else if (this.#segmentsInternal[startIndex - 1].end >= newSegment.begin) {
        // 2a. If merge failed and segments overlap, adjust preceding segment.
        // If an old segment entirely contains new one, split it in two.
        if (newSegment.end < precedingSegment.end) {
          this.#segmentsInternal.splice(
              startIndex, 0, new Segment<T>(newSegment.end, precedingSegment.end, precedingSegment.data));
        }
        precedingSegment.end = newSegment.begin;
      }
    }
    // 3. Consume all segments that are entirely covered by the new one.
    while (endIndex < this.#segmentsInternal.length && this.#segmentsInternal[endIndex].end <= newSegment.end) {
      ++endIndex;
    }
    // 4. Merge or adjust the succeeding segment if it overlaps.
    if (endIndex < this.#segmentsInternal.length) {
      merged = this.tryMerge(newSegment, this.#segmentsInternal[endIndex]);
      if (merged) {
        endIndex++;
        newSegment = merged;
      } else if (newSegment.intersects(this.#segmentsInternal[endIndex])) {
        this.#segmentsInternal[endIndex].begin = newSegment.end;
      }
    }
    this.#segmentsInternal.splice(startIndex, endIndex - startIndex, newSegment);
  }

  appendRange(that: SegmentedRange<T>): void {
    that.segments().forEach(segment => this.append(segment));
  }

  segments(): Segment<T>[] {
    return this.#segmentsInternal;
  }

  private tryMerge(first: Segment<T>, second: Segment<T>): Segment<T>|null {
    const merged = this.#mergeCallback && this.#mergeCallback(first, second);
    if (!merged) {
      return null;
    }
    merged.begin = first.begin;
    merged.end = Math.max(first.end, second.end);
    return merged;
  }
}


text:
#ifndef STM32MP_COMMON_H
#define STM32MP_COMMON_H

#include <stdbool.h>

#include <platform_def.h>

#define JEDEC_ST_BKID U(0x0)
#define JEDEC_ST_MFID U(0x20)

/* Functions to save and get boot context address given by ROM code */
void stm32mp_save_boot_ctx_address(uintptr_t address);
uintptr_t stm32mp_get_boot_ctx_address(void);
uint16_t stm32mp_get_boot_itf_selected(void);

bool stm32mp_is_single_core(void);
bool stm32mp_is_closed_device(void);

/* Return the base address of the DDR controller */
uintptr_t stm32mp_ddrctrl_base(void);

/* Return the base address of the DDR PHY */
uintptr_t stm32mp_ddrphyc_base(void);

/* Return the base address of the PWR peripheral */
uintptr_t stm32mp_pwr_base(void);

/* Return the base address of the RCC peripheral */
uintptr_t stm32mp_rcc_base(void);

/* Check MMU status to allow spinlock use */
bool stm32mp_lock_available(void);

/* Get IWDG platform instance ID from peripheral IO memory base address */
uint32_t stm32_iwdg_get_instance(uintptr_t base);

/* Return bitflag mask for expected IWDG configuration from OTP content */
uint32_t stm32_iwdg_get_otp_config(uint32_t iwdg_inst);

#if defined(IMAGE_BL2)
/* Update OTP shadow registers with IWDG configuration from device tree */
uint32_t stm32_iwdg_shadow_update(uint32_t iwdg_inst, uint32_t flags);
#endif

/*
 * Platform util functions for the GPIO driver
 * @bank: Target GPIO bank ID as per DT bindings
 *
 * Platform shall implement these functions to provide to stm32_gpio
 * driver the resource reference for a target GPIO bank. That are
 * memory mapped interface base address, interface offset (see below)
 * and clock identifier.
 *
 * stm32_get_gpio_bank_offset() returns a bank offset that is used to
 * check DT configuration matches platform implementation of the banks
 * description.
 */
uintptr_t stm32_get_gpio_bank_base(unsigned int bank);
unsigned long stm32_get_gpio_bank_clock(unsigned int bank);
uint32_t stm32_get_gpio_bank_offset(unsigned int bank);

/* Return node offset for target GPIO bank ID @bank or a FDT error code */
int stm32_get_gpio_bank_pinctrl_node(void *fdt, unsigned int bank);

/* Get the chip revision */
uint32_t stm32mp_get_chip_version(void);
/* Get the chip device ID */
uint32_t stm32mp_get_chip_dev_id(void);

/* Get SOC name */
#define STM32_SOC_NAME_SIZE 20
void stm32mp_get_soc_name(char name[STM32_SOC_NAME_SIZE]);

/* Print CPU information */
void stm32mp_print_cpuinfo(void);

/* Print board information */
void stm32mp_print_boardinfo(void);

/*
 * Util for clock gating and to get clock rate for stm32 and platform drivers
 * @id: Target clock ID, ID used in clock DT bindings
 */
bool stm32mp_clk_is_enabled(unsigned long id);
void stm32mp_clk_enable(unsigned long id);
void stm32mp_clk_disable(unsigned long id);
unsigned long stm32mp_clk_get_rate(unsigned long id);

/* Initialise the IO layer and register platform IO devices */
void stm32mp_io_setup(void);

#if STM32MP_USE_STM32IMAGE
/*
 * Check that the STM32 header of a .stm32 binary image is valid
 * @param header: pointer to the stm32 image header
 * @param buffer: address of the binary image (payload)
 * @return: 0 on success, negative value in case of error
 */
int stm32mp_check_header(boot_api_image_header_t *header, uintptr_t buffer);
#endif /* STM32MP_USE_STM32IMAGE */

/* Functions to map DDR in MMU with non-cacheable attribute, and unmap it */
int stm32mp_map_ddr_non_cacheable(void);
int stm32mp_unmap_ddr(void);

#endif /* STM32MP_COMMON_H */


text:
#ifndef _ALTOVA_INCLUDED_AIMXML_ALTOVA__ALTOVA_CTwoDimensionPolyline
#define _ALTOVA_INCLUDED_AIMXML_ALTOVA__ALTOVA_CTwoDimensionPolyline

#include "type_.CTwoDimensionGeometricShapeEntity.h"

namespace AIMXML
{

class CTwoDimensionPolyline : public ::AIMXML::CTwoDimensionGeometricShapeEntity
{
public:
	AIMXML_EXPORT CTwoDimensionPolyline(xercesc::DOMNode* const& init);
	AIMXML_EXPORT CTwoDimensionPolyline(CTwoDimensionPolyline const& init);
	void operator=(CTwoDimensionPolyline const& other) { m_node = other.m_node; }
	static altova::meta::ComplexType StaticInfo() { return altova::meta::ComplexType(types + _altova_ti_altova_CTwoDimensionPolyline); }
	AIMXML_EXPORT void SetXsiType();
};

}	// namespace AIMXML

#endif // _ALTOVA_INCLUDED_AIMXML_ALTOVA__ALTOVA_CTwoDimensionPolyline


text:
package javaguide.di;

public class MessageQueue {
    public static boolean stopped = false;

    public static MessageQueue connect() {
        return new MessageQueue();
    }

    public void stop() {
        stopped = true;
    }
}


text:
using UnityEngine;

namespace UnitySampleAssets.Utility
{

    public class FollowTarget : MonoBehaviour
    {
        public Transform target;
        public Vector3 offset = new Vector3(0f, 7.5f, 0f);

        private void LateUpdate()
        {
            transform.position = target.position + offset;
        }
    }
}


text:
package tw.invictus.tventhusiast.view.adapter;

import android.support.annotation.Nullable;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;

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

import butterknife.Bind;
import butterknife.BindString;
import butterknife.ButterKnife;
import butterknife.OnClick;
import tw.invictus.tventhusiast.BuildConfig;
import tw.invictus.tventhusiast.R;
import tw.invictus.tventhusiast.model.pojo.TvShow;
import tw.invictus.tventhusiast.view.MainFragmentView;

/**
 * Created by ivan on 12/27/15.
 */
public class MainRecyclerViewAdapter extends RecyclerView.Adapter<MainRecyclerViewAdapter.ViewHolder> {
    private static final String TAG = MainRecyclerViewAdapter.class.getSimpleName();
    private ArrayList<TvShow> shows;
    private MainFragmentView mainView;

    public MainRecyclerViewAdapter(ArrayList<TvShow> shows, MainFragmentView mainView) {
        this.shows = shows;
        this.mainView = mainView;
    }

    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View rootView = LayoutInflater.from(parent.getContext()).inflate(R.layout.tv_list_item, parent, false);
        return new ViewHolder(rootView, mainView, shows);
    }

    @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        TvShow show = shows.get(position);
        String imageUrl = BuildConfig.IMG_BASE_URL + holder.imageSizeUrl + show.getPosterPath();
        String title = show.getTitle();
        if(holder.textView != null){
            holder.textView.setText(title);
        }
        Glide.with(holder.poster.getContext())
                .load(imageUrl)
                .asBitmap()
                .diskCacheStrategy(DiskCacheStrategy.ALL)
                .into(holder.poster);

    }

    public ArrayList<TvShow> getShows() {
        return shows;
    }

    @Override
    public int getItemCount() {
        return shows.size();
    }

    public static class ViewHolder extends RecyclerView.ViewHolder{

        @Bind(R.id.poster)
        ImageView poster;
        @Nullable
        @Bind(R.id.card_text)
        TextView textView;
        @Bind(R.id.card_view)
        CardView cardView;
        @BindString(R.string.image_size_url)
        String imageSizeUrl;

        View itemView;
        MainFragmentView mainView;
        List<TvShow> tvShows;

        public ViewHolder(View itemView, MainFragmentView mainView, List<TvShow> shows) {
            super(itemView);
            this.itemView = itemView;
            this.mainView = mainView;
            this.tvShows = shows;
            ButterKnife.bind(this, itemView);
        }

        @OnClick(R.id.card_view)
        public void onClick(View view){
            mainView.onTvShowClicked(tvShows.get(getAdapterPosition()));
        }
    }
}


text:
/**
 *
 */
function JobAssignmentEditList() {
	// newly added staff ID array on the position or the project role
	this.addedStaffIds = [];
	// removed staff ID array on the position or the project role
	this.removedStaffIds = [];

	// the position ID or project role ID
	this.positionId = null;
	// 0: position; 1: project role
	this.source = 0;
	// organization ID
	this.ownerId = null;

	// current staff array list on the position and the project role
	this.leftList = [];
	// current staff array list NOT on the position and the project role
	this.rightList = [];

	// the description for changed assignments
	this.description = null;

};

JobAssignmentEditList.prototype.parseFromJSON = function(json, ownerid) {
	this.positionId = json.positionId;
	if (json.leftList.length > 0) {
		this.leftList = [];
		for (var i = 0; i < json.leftList.length; i++) {
			var member = new JobAssignment();
			member.parseFromJSON(json.leftList[i], ownerid);
			this.leftList.push(member);
		}
	}
	if (json.rightList.length > 0) {
		this.rightList = [];
		for (var i = 0; i < json.rightList.length; i++) {
			var member = new JobAssignment();
			member.parseFromJSON(json.rightList[i], ownerid);
			this.rightList.push(member);
		}
	}
	this.ownerId = ownerid;
};

JobAssignmentEditList.prototype.findMember = function(id) {
	var gm = null;
	for (var i = 0; i < this.leftList.length; i++) {
		if (this.leftList[i].staffId == id) {
			gm = this.leftList[i];
		}
	}
	if (gm == null) {
		for (var i = 0; i < this.rightList.length; i++) {
			if (this.rightList[i].staffId == id) {
				gm = this.rightList[i];
			}
		}
	}
	return gm;
};

JobAssignmentEditList.prototype.searchLeftList = function(condition) {
	var result = [];
	var list = this.leftList;
	for (var i = 0; i < list.length; i++) {
		if ((list[i].staffCode != null && list[i].staffCode.search(condition) >= 0)
				|| (list[i].staffFullName != null && list[i].staffFullName
						.search(condition) >= 0)) {
			result.push(list[i]);
		}
	}
	return result;
};

JobAssignmentEditList.prototype.searchRightList = function(condition) {
	var result = [];
	var list = this.rightList;
	for (var i = 0; i < list.length; i++) {
		if ((list[i].staffCode != null && list[i].staffCode.search(condition) >= 0)
				|| (list[i].staffFullName != null && list[i].staffFullName
						.search(condition) >= 0)) {
			result.push(list[i]);
		}
	}
	return result;
};

JobAssignmentEditList.prototype.clearChangedStaffIds = function() {
	var t1 = [];
	for (var i = 0; i < this.addedStaffIds.length; i++) {
		if (!this.existLeftStaffIds(this.addedStaffIds[i])
				&& !this.existRemovedStaffIds(this.addedStaffIds[i])) {
			t1.push(this.addedStaffIds[i]);
		}
	}
	// console.log(t1);
	this.addedStaffIds = t1;
	var t2 = [];
	for (var i = 0; i < this.removedStaffIds.length; i++) {
		if (this.existLeftStaffIds(this.removedStaffIds[i])) {
			t2.push(this.removedStaffIds[i]);
		}
	}
	// console.log(t2);
	this.removedStaffIds = t2;
};

JobAssignmentEditList.prototype.existLeftStaffIds = function(id) {
	for (var j = 0; j < this.leftList.length; j++) {
		if (this.leftList[j].staffId == id) {
			return true;
		}
	}
	return false;
};

JobAssignmentEditList.prototype.existRemovedStaffIds = function(id) {
	for (var j = 0; j < this.removedStaffIds.length; j++) {
		if (this.removedStaffIds[j] == id) {
			return true;
		}
	}
	return false;
};


text:
import { WindowService } from './window.service';
import { BowserService } from './bowser.service';
import { NgModule } from '@angular/core';
export { bowser, BowserService } from './bowser.service';
export { WindowService } from './window.service';

@NgModule({
    providers: [BowserService, WindowService]
})
export class BowserModule {
}


text:
/*
 * @author Jim Graham
 */

package sun.java2d.loops;

import sun.java2d.loops.GraphicsPrimitive;
import sun.java2d.SunGraphics2D;
import sun.java2d.SurfaceData;

/**
 * DrawParallelogram
 * 1) fill the area between the 4 edges of an outer parallelogram
 *    (as specified by an origin and 2 delta vectors)
 *    but also outside the 4 edges of an inner parallelogram
 *    (as specified by proportional amounts of the outer delta vectors)
 */
public class DrawParallelogram extends GraphicsPrimitive
{
    public final static String methodSignature =
        "DrawParallelogram(...)".toString();

    public final static int primTypeID = makePrimTypeID();

    public static DrawParallelogram locate(SurfaceType srctype,
                                           CompositeType comptype,
                                           SurfaceType dsttype)
    {
        return (DrawParallelogram)
            GraphicsPrimitiveMgr.locate(primTypeID,
                                        srctype, comptype, dsttype);
    }

    protected DrawParallelogram(SurfaceType srctype,
                                CompositeType comptype,
                                SurfaceType dsttype)
    {
        super(methodSignature, primTypeID,
              srctype, comptype, dsttype);
    }

    public DrawParallelogram(long pNativePrim,
                             SurfaceType srctype,
                             CompositeType comptype,
                             SurfaceType dsttype)
    {
        super(pNativePrim, methodSignature, primTypeID,
              srctype, comptype, dsttype);
    }

    /**
     * All DrawParallelogram implementors must have this invoker method
     */
    public native void DrawParallelogram(SunGraphics2D sg, SurfaceData dest,
                                         double x, double y,
                                         double dx1, double dy1,
                                         double dx2, double dy2,
                                         double lw1, double lw2);

    public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                           CompositeType comptype,
                                           SurfaceType dsttype)
    {
        // REMIND: iterate with a FillRect primitive?
        throw new InternalError("DrawParallelogram not implemented for "+
                                srctype+" with "+comptype);
    }

    public GraphicsPrimitive traceWrap() {
        return new TraceDrawParallelogram(this);
    }

    private static class TraceDrawParallelogram extends DrawParallelogram {
        DrawParallelogram target;

        public TraceDrawParallelogram(DrawParallelogram target) {
            super(target.getSourceType(),
                  target.getCompositeType(),
                  target.getDestType());
            this.target = target;
        }

        public GraphicsPrimitive traceWrap() {
            return this;
        }

        public void DrawParallelogram(SunGraphics2D sg2d, SurfaceData dest,
                                      double x, double y,
                                      double dx1, double dy1,
                                      double dx2, double dy2,
                                      double lw1, double lw2)
        {
            tracePrimitive(target);
            target.DrawParallelogram(sg2d, dest,
                                     x, y, dx1, dy1, dx2, dy2, lw1, lw2);
        }
    }
}


text:
using System;
using System.Threading;
using Microsoft.AspNet.SignalR;

namespace Thinktecture.Dwx2015.SignalR.Data
{
	public class DataUpdater
	{
		private const int IntervalInMilliseconds = 200;
		private const int MaxValue = 100;

		private readonly IHubContext _hub;
		private readonly Timer _taskTimer;
		private readonly Random _random;

		public DataUpdater()
		{
			_hub = GlobalHost.ConnectionManager.GetHubContext<GummibearHub>();
			_taskTimer = new Timer(OnTimerElapsed, null, IntervalInMilliseconds, IntervalInMilliseconds);

			_random = new Random();
		}

		private void OnTimerElapsed(object state)
		{
			var continent = (Continent)_random.Next(0, DataProvider.Data.Count);
			var newValue = _random.NextDouble() * MaxValue;

			DataProvider.Data[continent] = newValue;

			Console.WriteLine("Update consumption of {0} to {1}", continent, newValue);
			_hub.Clients.All.UpdateConsumption(continent.ToString(), newValue);
		}

		public void Stop()
		{
			_taskTimer.Dispose();
		}
	}
}


text:
<!--
Description: feed tagline type='text/plain'
Expect:      not bozo and feed['tagline_detail']['type'] == 'text/plain'
-->
<feed version="0.3" xmlns="http://purl.org/atom/ns#">
  <tagline type="text/plain">Example Atom</tagline>
</feed>


text:
import stripesComponentsTranslations from '@folio/stripes-components/translations/stripes-components/en';
import stripesCoreTranslations from '../../../translations/stripes-core/en';

const translationsProperties = [
  {
    prefix: 'stripes-components',
    translations: stripesComponentsTranslations,
  },
  {
    prefix: 'stripes-core',
    translations: stripesCoreTranslations,
  }
];

export default translationsProperties;


text:
// $Id$

/**********************************************************************************
 * mozileSave.js V0.5: this file implements save/post option in Mozile.
 *
 * POST05:
 * - add xml post, ftp post and other support or use of that support
 * - hone to use a configuration file/preferences: ex/ where a user can specify what
 * save method should be used when editing a particular site. The default will always
 * be to save to local disk.
 **********************************************************************************/

/**
 * Save changes to a remote server or to a local file
 *
 * This method is called by the "save" button in the Mozile toolbar. Change this
 * method to allow users to save changes made through Mozile.
 *
 * editableArea: the topmost element in the currently selected editable area
 */
function mozileSave()
{
	// call default
	__mozileDummySave();

	// one alternative: save the document as a whole.
	// __mozileSaveToFile();

	// second alternative: saveing using TransportDrivers
	// replace "file" by "webdav", if you want to use webdav
	//__mozileTDSave("file");
}

/**
 * Dummy save just shows what in the editable area needs to be saved
 * calls alert to show what should be saved: mozile deployer should replace this
 * with a post, ftp or XML rpc call to a CMS.
 */
function __mozileDummySave()
{
	var cssr = window.getSelection().getEditableRange();
	if(!cssr)
	{
		alert("*mozileModify.js:mozileSave: this default implementation only works if the current selection is in an editable area");
		return;
	}

	var editableArea = cssr.top;

	// get the id of the editable area - this would tell a remote CMS where the data
	// is coming from
	var editableAreaId = editableArea.id;

	// get the contents of the editable area
	var dataToSaveRange = document.createRange();
	dataToSaveRange.selectNodeContents(editableArea);
	var dataToSave = dataToSaveRange.cloneContents();

	// Note: despite its name, the new DOM 3 method, "saveXML" doesn't save. It
	// returns the (X)HTML or XML information you need to save in order to persist
	// an element's contents.
	alert("*mozileModify.js:mozileSave: replace this implementation with a CMS specific equivalent*\nData from editable element <"+ editableAreaId + "> to save/post/ftp:\n" + documentSaveXML(dataToSave));
}

/**
 * Alternative save - save document as a whole
 */
function __mozileSaveToFile()
{
	// first nix the toolbar
	ptbdisable();

	var mfp = mozilla.createFilePicker(MozFilePicker.MODE_SAVE, "save to local file");
	if(mfp)
	{
		mfp.addFilter(MozFilePicker.FILTER_HTML);
		if(mfp.promptUser())
		{
			var mf = mfp.file;
			var documentContents = document.saveXML(document);
			mf.write(documentContents); // to do: remove toolbar
		}
	}
	else
	{
		alert("mozileSave: can't save-to-file because Mozilla doesn't allow remote scripts to launch its native file picker dialog. Either run Mozile locally or wait until it is packaged as an extension. For more information, see http://mozile.mozdev.org/use.html.");
	}

	ptbenable();
}

function __mozileTDsaved(reqObj) {

	if (reqObj.isError) {
		alert ("couldn't save document \n" + reqObj.statusText);
	} else {
		alert("document saved");
	}
}

function __mozileTDSave (container) {
	var cssr = window.getSelection().getEditableRange();
	if(!cssr)
	{
		alert("*mozileModify.js:mozileSave: this default implementation only works if the current selection is in an editable area");
		return;
	}
	var editableArea = cssr.top;

	// get the id of the editable area - this would tell a remote CMS where the data
	// is coming from
	var editableAreaId = editableArea.id;

	// get the contents of the editable area
	var dataToSaveRange = document.createRange();
	dataToSaveRange.selectNodeContents(editableArea);
	var dataToSave = dataToSaveRange.cloneContents();
	var td = new mozileTransportDriver(container);
	td.save("test.html",documentSaveXML(dataToSave),__mozileTDsaved);
}


text:
/*********************************************************************
*  File: main.h
*  Project: Assignment #2 for ENEL323
*  Brief: Header file for main.c
*  Authors: Paul Bowler & Aydin Arik
*  Last Modified: June 2011
**********************************************************************/

#ifndef MAIN_H_
#define MAIN_H_

/*---------------------------
  	Global variables
----------------------------*/
extern volatile uint32_t left_tick, right_tick, left_curr, right_curr,
							left_prev, right_prev, left_period, right_period;
extern volatile uint32_t left_timeout, right_timeout;
extern int PWMState;

/*---------------------------
  Public function prototypes
----------------------------*/

//*-------------------------------------------------------------
//*	Function name:		Timer0AIntHandler
//*	Object:				Required to correctly measure wheel periods when
//*						Timer 0A resets.
//*	Input Parameters:	none
//*	Output Parameters:	none
//*-------------------------------------------------------------
void Timer0AIntHandler(void);

//*-------------------------------------------------------------
//*	Function name:		PortBIntHandler
//*	Object:				Measures wheel periods.
//*	Input Parameters:	none
//*	Output Parameters:	none
//*-------------------------------------------------------------
void PortBIntHandler(void);

//*-------------------------------------------------------------
//*	Function name:		SysTickISR
//*	Object:				Allows for ADC sampling at 50/sec and increments a
//*						variable used to determine wheel lockup.
//*	Input Parameters:	none
//*	Output Parameters:	none
//*-------------------------------------------------------------
void SysTickISR(void);

#endif /*MAIN_H_*/


text:
function [hpb] = hpe2hpb(hpe)
% Convert power from electrical horsepower to boiler horsepower.
% Chad A. Greene 2012
hpb = hpe*0.076048728;


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ListView
        android:id="@+id/messages_list_view"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:animationCache="false"
        android:clipToPadding="false"
        android:divider="@drawable/messages_list_divider"
        android:dividerHeight="1px"
        android:fadingEdge="none"
        android:fadingEdgeLength="0dp" />

    <TextView
        android:id="@+id/searchEmptyView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:textColor="#808080"
        android:textSize="24dp"
        android:visibility="invisible" />

    <LinearLayout
        android:id="@+id/list_empty_view"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="gone">

        <TextView
            android:id="@+id/list_empty_view_text1"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:textColor="#959595"
            android:textSize="24dp" />

        <TextView
            android:id="@+id/list_empty_view_text2"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:gravity="center"
            android:lineSpacingExtra="2dp"
            android:paddingTop="6dp"
            android:textColor="#959595"
            android:textSize="15dp" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/progressLayout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:orientation="vertical"
        android:visibility="gone">

        <ProgressBar
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"></ProgressBar>
    </LinearLayout>
</RelativeLayout>


text:
import distutils.sysconfig
import json
import os
import sys

try:
  import pip._internal.locations as pip_locations
except ImportError:
  import pip.locations as pip_locations

PACKAGE_MANIFEST = module.context.package_manifest
MODULES_DIRECTORY = module.context.modules_directory
PIP_DIRECTORY = module.context.pipprefix_directory
PROGRAM_DIRECTORY = os.path.join(os.path.dirname(PIP_DIRECTORY), 'bin')
LINK_SUFFIX = module.context.link_suffix

def is_virtualenv():
  if hasattr(sys, 'real_prefix'):
    return True
  if hasattr(sys, 'base_prefix'): # Python 3+ only
    return sys.prefix != sys.base_prefix
  return False

def get_directories(location, auto_upgrade=True):
  """
  Returns a dictionary that contains information on the install location of
  Node.py packages. The dictionary contains the following keys:

  - packages
  - bin
  - pip_bin

  Only when *location* is `'local'` or `'global'`, the following keys are
  available:

  - pip_prefix
  - pip_lib

  If *auto_upgrade* is #True (which it is by default), `'global'` will
  automatically be upgraded into `'root'` inside a virtual environment.
  """

  assert location in ('local', 'global', 'root')
  if auto_upgrade and location == 'global' and is_virtualenv():
    location = 'root'

  local = pip_locations.distutils_scheme('', prefix=PIP_DIRECTORY)
  if location == 'local':
    return {
      'packages': MODULES_DIRECTORY,
      'bin': PROGRAM_DIRECTORY,
      'pip_prefix': local['data'],
      'pip_bin': local['scripts'],
      'pip_lib': local['purelib']
    }

  user = (location == 'global')
  scheme = pip_locations.distutils_scheme('', user=user)

  return {
    # Install Node.py modules near the site-packages.
    'packages': os.path.join(os.path.dirname(scheme['purelib']), 'nodepy-modules'),
    'bin': scheme['scripts'],
    'pip_prefix': scheme['data'],
    # Re-use Pip's script and site-packages directory.
    'pip_bin': scheme['scripts'],
    'pip_lib': scheme['purelib']
  }

def pip_locations_for(directory):
  """
  Returns a dictionary that contains the `pip_prefix`, `pip_bin` and
  `pip_lib` members as returned by #get_directories() but for a directory
  that contains the pip data (i.e. `myproject/.nodepy`).
  """

  scheme = pip_locations.distutils_scheme('', prefix=PIP_DIRECTORY)
  return {
    'pip_prefix': os.path.join(directory, scheme['data']),
    'pip_bin': os.path.join(directory, scheme['scripts']),
    'pip_lib': os.path.join(directory, scheme['purelib'])
  }

def get_python_install_type():
  """
  Returns a string with information about this Python installation. Possible
  return values are

  - `'root'` for a root-type installation
  - `'user'` for a user-type installation (eg. AppData/Local/Programs/Python
    on Windows)
  - `'virtual'` for a virtual environment-type installation
  """

  if is_virtualenv():
    return 'virtual'
  # If the executable is inside the current user's home directory, we
  # consider this to be a user-type installation.
  home = os.path.expanduser('~')
  try:
    rel = os.path.relpath(sys.prefix, home)
  except ValueError:
    pass
  else:
    if not rel.startswith(os.curdir) and not rel.startswith(os.pardir):
      return 'user'
  return 'root'

def get_module_dist_info(module, pythonpath=None):
  """
  Finds a Python module in the *pythonpath* and returns the distribution
  information stored by Pip in the respective `.dist-info` directory. If
  the module can not be found, #None will be returned.

  Note that the *module* name does not necessarily reflect the name of the
  Python module name that is used on `import`s, but instead the name of the
  module on PyPI and as defined in the `setup.py` script.
  """

  module = module.replace('-', '_').lower()

  if not pythonpath:
    pythonpath = sys.path
  sosuffix = distutils.sysconfig.get_config_var('SO')
  for dirname in sys.path:
    if not os.path.isdir(dirname): continue
    for fn in os.listdir(dirname):
      if not fn.endswith('.dist-info'): continue
      if not fn.lower().startswith(module + '-'): continue
      break
    else:
      continue
    dist_info = os.path.join(dirname, fn)
    version = fn[len(module) + 1:-len('.dist-info')]

    # Load the metadata.json.
    fn = os.path.join(dist_info, 'metadata.json')
    if not os.path.isfile(fn):
      # TODO: Don't show if no verbose output is desired.
      print('warning: file \'{}\' does not exist'.format(fn))
      continue
    with open(fn) as fp:
      data =json.load(fp)
    data['.dist-info'] = dist_info

    # Load the top-level file.
    fn = os.path.join(dist_info, 'top_level.txt')
    if os.path.isfile(fn):
      with open(fn) as fp:
        data['top_level'] = fp.read().splitlines()
    else:
      data['top_level'] = []

    return data

  return None

def cfgvars(dev):
  """
  Determines the variables available to the `cfg(...)` feature in the
  manifest file. Note that the `dev` flag is not intended to be used
  transitively, thus it is not automatically determined but must instead
  be explicitly specified, and usually it is only specified for the
  main package that is being installed.
  """

  vars = {}
  if dev: vars['dev'] = True
  else: vars['prod'] = True
  if os.name == 'nt': vars['win32'] = True
  elif sys.platform.startswith('darwin'): vars['darwin'] = True
  elif sys.platform.startswith('linux'): vars['linux'] = True
  else: vars['unknown'] = True
  return vars


text:
@page StealJS.roadmap Roadmap
@parent StealJS.guides

Here's what we've got planned:

## Watch Builds

Automatically build when a file changes. We should be able to make
this extremely high performance if the dependency graph is not changing.

## Live Reloading

Would make development extremely convenient as modules would automatically
reload as you change them without needing to reload the browser.

## Remove Traceur Runtime and IE8 ES6 module support

[Read here](https://groups.google.com/forum/#!topic/systemjs/yECCl6I9SDw)

## Development Packages

Build a package that will be loaded in development. For example, instead of
loading each CanJS module individually, you could easily build them
into a package that would be loaded in development as a single file.


text:
package cc.factorie.directed

import cc.factorie.model._
import cc.factorie.variable.{MutableVar, Var}

trait DirectedFactor extends Factor {
  type ChildType <: Var
  def child: ChildType
  def parents: Seq[Var]
  //def pr(s:StatisticsType): Double
  def pr: Double // = pr(statistics)
  //def logpr(s:StatisticsType): Double = math.log(pr(s))
  def logpr: Double = math.log(pr) // logpr(statistics)
  //def score: Double = logpr
  //def sampledValue(s:StatisticsType): Any
  def sampledValue(implicit random: scala.util.Random): Any // = sampledValue(statistics)
  // TODO Consider removing these methods because we'd have specialized code in the inference recipes.
  /** Update sufficient statistics in collapsed parents, using current value of child, with weight.  Return false on failure. */
  // TODO Consider passing a second argument which is the value of the child to use in the update
  def updateCollapsedParents(weight:Double): Boolean = throw new Error(factorName+": Collapsing parent not implemented in " + this.getClass.getName)
  def updateCollapsedChild(): Boolean = throw new Error(factorName+": Collapsing child not implemented.")
  def resetCollapsedChild(): Boolean = throw new Error(factorName+": Resetting child not implemented.")
}

class GeneratedVarWrapper[V<:Var](val v:V) {
  /** Create a new DirectedFactor, make it the "parent" generating factor for this variable,
      and add this new factor to the given model. */
  def ~[V2<:Var](partialFactor: V2 => DirectedFactor)(implicit model:MutableDirectedModel): V = {
    model += partialFactor(v.asInstanceOf[V2])
    v
  }
}

class GeneratedMutableVarWrapper[V<:MutableVar](val v:V) {
  /** Create a new DirectedFactor, make it the "parent" generating factor for this variable,
      add this new factor to the given model,
      and also assign the variable a new value randomly drawn from this factor. */
  def :~[V2<:Var](partialFactor: V2 => DirectedFactor)(implicit model:MutableDirectedModel, random: scala.util.Random): V = {
    model += partialFactor(v.asInstanceOf[V2])
    v.set(model.parentFactor(v).sampledValue.asInstanceOf[v.Value])(null)
    v
  }
}

trait RealGeneratingFactor extends DirectedFactor {
  def sampleDouble: Double
  def pr(x:Double): Double
  def logpr(x:Double): Double
}

trait IntGeneratingFactor extends DirectedFactor {
  def sampleInt: Int
  def pr(x:Int): Double
  def logpr(x:Int): Double
}

abstract class DirectedFactorWithStatistics1[C<:Var](override val _1:C) extends FactorWithStatistics1[C](_1) with DirectedFactor {
  type ChildType = C
  def child = _1
  def parents: Seq[Var] = Nil
  def score(v1:C#Value): Double = logpr(v1:C#Value)
  def pr(v1:C#Value): Double
  def logpr(v1:C#Value): Double = math.log(pr(v1))
  def pr: Double = pr(_1.value.asInstanceOf[C#Value])
  override def sampledValue(implicit random: scala.util.Random): C#Value
}

abstract class DirectedFactorWithStatistics2[C<:Var,P1<:Var](override val _1:C, override val _2:P1) extends TupleFactorWithStatistics2[C,P1](_1, _2) with DirectedFactor {
  type ChildType = C
  def child = _1
  def parents = Seq(_2)
  def score(v1:C#Value, v2:P1#Value): Double = logpr(v1, v2)
  def pr(v1:C#Value, v2:P1#Value): Double
  def logpr(v1:C#Value, v2:P1#Value): Double = math.log(pr(v1, v2))
  def pr: Double = pr(_1.value.asInstanceOf[C#Value], _2.value.asInstanceOf[P1#Value])
  def sampledValue(p1:P1#Value)(implicit random: scala.util.Random): C#Value
  def sampledValue(implicit random: scala.util.Random): C#Value = sampledValue(_2.value.asInstanceOf[P1#Value])
  // TODO Consider this:
  //def parents = _2 match { case vars:Vars[Parameter] => vars; case _ => Seq(_2) }
}

abstract class DirectedFactorWithStatistics3[C<:Var,P1<:Var,P2<:Var](override val _1:C, override val _2:P1, override val _3:P2) extends TupleFactorWithStatistics3[C,P1,P2](_1, _2, _3) with DirectedFactor {
  type ChildType = C
  def child = _1
  def parents = Seq(_2, _3)
  def score(v1:C#Value, v2:P1#Value, v3:P2#Value): Double = logpr(v1, v2, v3)
  def pr(v1:C#Value, v2:P1#Value, v3:P2#Value): Double
  def logpr(v1:C#Value, v2:P1#Value, v3:P2#Value): Double = math.log(pr(v1, v2, v3))
  def pr: Double = pr(_1.value.asInstanceOf[C#Value], _2.value.asInstanceOf[P1#Value], _3.value.asInstanceOf[P2#Value])
  def sampledValue(p1:P1#Value, p2:P2#Value)(implicit random: scala.util.Random): C#Value
  def sampledValue(implicit random: scala.util.Random): C#Value = sampledValue(_2.value.asInstanceOf[P1#Value], _3.value.asInstanceOf[P2#Value])
}

abstract class DirectedFactorWithStatistics4[C<:Var,P1<:Var,P2<:Var,P3<:Var](override val _1:C, override val _2:P1, override val _3:P2, override val _4:P3) extends TupleFactorWithStatistics4[C,P1,P2,P3](_1, _2, _3, _4) with DirectedFactor {
  type ChildType = C
  def child = _1
  def parents = Seq(_2, _3, _4)
  def score(v1:C#Value, v2:P1#Value, v3:P2#Value, v4:P3#Value): Double = logpr(v1, v2, v3, v4)
  def pr(v1:C#Value, v2:P1#Value, v3:P2#Value, v4:P3#Value): Double
  def logpr(v1:C#Value, v2:P1#Value, v3:P2#Value, v4:P3#Value): Double = math.log(pr(v1, v2, v3, v4))
  def pr: Double = pr(_1.value.asInstanceOf[C#Value], _2.value.asInstanceOf[P1#Value], _3.value.asInstanceOf[P2#Value], _4.value.asInstanceOf[P3#Value])
  def sampledValue(p1:P1#Value, p2:P2#Value, p3:P3#Value)(implicit random: scala.util.Random): C#Value
  def sampledValue(implicit random: scala.util.Random): C#Value = sampledValue(_2.value.asInstanceOf[P1#Value], _3.value.asInstanceOf[P2#Value], _4.value.asInstanceOf[P3#Value])
}

trait DirectedFamily1[Child<:Var] {
  type C = Child
  abstract class Factor(override val _1:Child) extends DirectedFactorWithStatistics1[C](_1)
  def newFactor(c:C): Factor
  def apply(): C => Factor = newFactor(_)
}

trait DirectedFamily2[Child<:Var,Parent1<:Var] {
  type C = Child
  type P1 = Parent1
  abstract class Factor(override val _1:Child, override val _2:Parent1) extends DirectedFactorWithStatistics2[C,P1](_1, _2)
  def newFactor(c:C, p1:P1): Factor
  def apply(p1: P1): C => Factor = newFactor(_, p1)
}

trait DirectedFamily3[Child<:Var,Parent1<:Var,Parent2<:Var] {
  type C = Child
  type P1 = Parent1
  type P2 = Parent2
  abstract class Factor(override val _1:Child, override val _2:Parent1, override val _3:Parent2) extends DirectedFactorWithStatistics3[C,P1,P2](_1, _2, _3)
  def newFactor(c:C, p1:P1, p2:P2): Factor
  def apply(p1: P1, p2: P2): C => Factor = newFactor(_, p1, p2)
}

trait DirectedFamily4[Child<:Var,Parent1<:Var,Parent2<:Var,Parent3<:Var] {
  type C = Child
  type P1 = Parent1
  type P2 = Parent2
  type P3 = Parent3
  abstract class Factor(override val _1:Child, override val _2:Parent1, override val _3:Parent2, override val _4:Parent3) extends DirectedFactorWithStatistics4[C,P1,P2,P3](_1, _2, _3, _4)
  def newFactor(c:C, p1:P1, p2:P2, p3:P3): Factor
  def apply(p1: P1, p2: P2, p3: P3): C => Factor = newFactor(_, p1, p2, p3)
}


text:
<?php

namespace Broadway\EventSourcing\AggregateFactory;

use Assert\Assertion as Assert;
use Broadway\Domain\DomainEventStreamInterface;

/**
 * Creates aggregates by passing a DomainEventStream to the given public static method
 * which is itself responsible for returning an instance of itself.
 * E.g. (\Vendor\AggregateRoot::instantiateForReconstitution())->initializeState($domainEventStream);
 */
class NamedConstructorAggregateFactory implements AggregateFactoryInterface
{
    /**
     * @var string the name of the method to call on the Aggregate
     */
    private $staticConstructorMethod;

    public function __construct($staticConstructorMethod = 'instantiateForReconstitution')
    {
        $this->staticConstructorMethod = $staticConstructorMethod;
    }

    /**
     * {@inheritDoc}
     */
    public function create($aggregateClass, DomainEventStreamInterface $domainEventStream)
    {
        Assert::true(method_exists($aggregateClass, $this->staticConstructorMethod));

        $methodCall = sprintf('%s::%s', $aggregateClass, $this->staticConstructorMethod);
        $aggregate  = call_user_func($methodCall);

        Assert::isInstanceOf($aggregate, $aggregateClass);

        $aggregate->initializeState($domainEventStream);

        return $aggregate;
    }
}


text:
class AlertMailerPreview < ActionMailer::Preview

end


text:
public class TestBanqueRunnable {

	public static void main(String[] args) {
		int nombreMaxComptes = 100;
		BanqueRunnable b = new BanqueRunnable(nombreMaxComptes);
		BanqueRunnable.Compte c1 = b.new Compte("Cisse", "El Hadj Babacar", 250000, 25000);
		BanqueRunnable.Compte c2 = b.new Compte("Tiller", "Bryson", 500000, 30000);
		BanqueRunnable.Compte c3 = b.new Compte("Lanez", "Tory", 300000, 30000);

		System.out.println("C1 : " + c1.affiche());
		System.out.println("c2 : " + c2.affiche());
		System.out.println("c3 : " + c3.affiche());

		ProcessBankCreditRunnable t1c = new ProcessBankCreditRunnable(c1, 12000);
		ProcessBankDebitRunnable t1d = new ProcessBankDebitRunnable(c1, 2000);

		t1c.run();
		t1d.run();
		t1c.interrupt();
		t1d.interrupt();

		System.out.println("C1 apres credit et debit : " + c1.affiche());

	}

}


text:
@interface SecondTab ()

@end

@implementation SecondTab

- (id)initWithStyle:(UITableViewStyle)style{

    if (self = [super initWithStyle:style]) {

    }

    [self loadNames];

    return self;
}

- (void) loadNames{
    names = [[NSMutableArray alloc] initWithObjects:@"Todd", @"Andrew", @"Eric", @"Justin", nil];
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

#pragma mark Table view methods

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [names count];
}

// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }
    // Set up the cell...
    cell.textLabel.text = [names objectAtIndex:indexPath.row];
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *name = [names objectAtIndex:indexPath.row];
    NSString *title = [NSString stringWithFormat:@"Hello, %@.", name];
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title message:@"Who are you?" delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
    [alertView show];
    [tableView deselectRowAtIndexPath:indexPath animated:YES];

}

@end


text:
[link](https://blog.codinghorror.com/password-rules-are-bullshit/)

## TL;DR

Must read for anyone building registration forms with passwords.


text:
package hudson.plugins.robot.tokens;

import hudson.Extension;
import hudson.FilePath;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.AbstractBuild;
import hudson.plugins.robot.RobotBuildAction;
import hudson.plugins.robot.model.RobotResult;

import java.io.IOException;

import org.jenkinsci.plugins.tokenmacro.DataBoundTokenMacro;
import org.jenkinsci.plugins.tokenmacro.MacroEvaluationException;

@Extension(optional = true)
public class RobotPassPercentageTokenMacro extends DataBoundTokenMacro {

	/**
	 * If true return only pass percentage of critical tests
	 */
	@Parameter
	public boolean onlyCritical;

	@Override
	public String evaluate(AbstractBuild<?, ?> context, TaskListener listener,
			String macroName) throws MacroEvaluationException, IOException,
			InterruptedException {
		return evaluate(context, context.getWorkspace(), listener, macroName);
	}

	// Required for pipeline
	@Override
	public String evaluate(Run<?, ?> context, FilePath workspace, TaskListener listener, String macroName)
			throws MacroEvaluationException {
		RobotBuildAction action = context.getAction(RobotBuildAction.class);

		if (action!=null){
			RobotResult result = action.getResult();
			return String.valueOf(result.getPassPercentage(onlyCritical));
		}
		return "";
	}

	@Override
	public boolean acceptsMacroName(String macroName) {
		return macroName.equals("ROBOT_PASSPERCENTAGE");
	}

}


text:
package org.cinchapi.concourse.security;

import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;

import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;

/**
 * A collection of tools for dealing with passwords in a secure manner.
 *
 * @author Jeff Nelson
 */
public final class Passwords {

    /**
     * The number of bytes used to encode a salt value.
     */
    public static final int SALT_LENGTH = 32;

    /**
     * The number of bytes used to encode a hashed password.
     */
    public static final int PASSWORD_LENGTH = 64;

    /**
     * Return a ByteBuffer that contains a hash of {@code password} with
     * {@code salt}.
     *
     * @param password
     * @param salt
     * @return the ByteBuffer hash
     */
    public static ByteBuffer hash(ByteBuffer password, ByteBuffer salt) {
        try {
            ByteBuffer unhashed = ByteBuffer.allocate(password.capacity()
                    + salt.capacity());
            unhashed.put(password);
            unhashed.put(salt);
            MessageDigest message = MessageDigest.getInstance("SHA-512");
            ByteBuffer hashed = ByteBuffer
                    .wrap(message.digest(unhashed.array()));
            password = null;
            salt = null;
            Preconditions.checkState(hashed.capacity() == PASSWORD_LENGTH);
            return hashed;
        }
        catch (NoSuchAlgorithmException e) {
            throw Throwables.propagate(e);
        }
    }

    /**
     * Get a random salt value.
     *
     * @return the salt
     */
    public static ByteBuffer getSalt() {
        SecureRandom srand = new SecureRandom();
        byte[] salt = new byte[SALT_LENGTH];
        srand.nextBytes(salt);
        return ByteBuffer.wrap(salt);
    }

    private Passwords() {}

}


text:
(function (DomHelper, FinanceHeadFactory) {

  FinanceHeadFactory.CreatePreviousTotalRow = function (previousTotal) {

    return DomHelper.CreateElement("tr", { "class": "previous-balance" }, [
      DomHelper.CreateElement("td", { "colspan": "6" }),
      DomHelper.CreateElement("td", { "class": "text-right", "colspan": "2" }, [
        DomHelper.CreateElement("div", {}, previousTotal),
        DomHelper.CreateElement("small", {}, "(Previous balance)")
      ])
    ]);
  }

  FinanceHeadFactory.CreateNoLedgerEntriesRow = function () {

    return DomHelper.CreateElement("tr", {},
      DomHelper.CreateElement("td", {
        "colspan": "8",
        "class": "text-center"
      }, "There are currently no ledger entries for this batch.")
    );
  }

  FinanceHeadFactory.CreateLedgerEntryRow = function (entry) {

    var projected = (!Boolean(entry.status)) ? entry.total.projected : "";

    return DomHelper.CreateElement("tr", {}, [
      DomHelper.CreateElement("td", { "class": "text-center" }, entry.date),
      DomHelper.CreateElement("td", { "class": "text-center" },
        (!Boolean(entry.status)) ? DomHelper.CreateElement(
          "button", {
            "class": "button button-extra-small button-info no-margin verify-entry-button",
            "data-entry-id": entry.id
          }, "Verify"
        ) : "Verified"
      ),
      DomHelper.CreateElement("td", {}, entry.member),
      DomHelper.CreateElement("td", {}, entry.description),
      DomHelper.CreateElement("td", { "class": "text-right" }, entry.debit),
      DomHelper.CreateElement("td", { "class": "text-right" }, entry.credit),
      DomHelper.CreateElement("td", { "class": "text-right" }, projected),
      DomHelper.CreateElement("td", { "class": "text-right" }, entry.total.actual),
    ]);
  }

})(
  DomHelper, this.FinanceHeadFactory = (
    this.FinanceHeadFactory == undefined
  ) ? {} : this.FinanceHeadFactory
  );


text:
import React, { Component } from 'react';

export default class Home extends Component {
  render() {
    const styles = require('./Home.scss');
    // require the logo image both from client and server
    const logoImage = require('./logo.png');
    return (

Clicker

    );
  }
}