text:
var Crafty = require('../core/core.js');

Crafty.extend({
    /**@
     * #Crafty.multitouch
     * @category Input
     * @kind Method
     *
     * Enables/disables support for multitouch feature.
     * @sign public this .multitouch(Boolean bool)
     * @param bool - Turns multitouch on and off.  The initial state is off (false).
     *
     * Query whether multitouch is on or off.
     * @sign public Boolean .multitouch()
     * @returns Whether multitouch is currently enabled
     *
     * By default, touch events are treated as mouse events and are handled by the `MouseSystem`.
     * To change this behaviour and handle events by the `TouchSystem`, enable multitouch.
     *
     * If this is set to true, it is expected that your entities have the `Touch` component instead of the `Mouse` component.
     * If false (default), then only entities with the Mouse component will respond to touch.
     * It's recommended to add the `Button` component instead, which requires the proper component depending on this feature.
     *
     * @note The multitouch feature is currently incompatible with the `Draggable` component and `Crafty.viewport.mouselook`.
     *
     * @example
     * ~~~
     * Crafty.multitouch(true);
     * Crafty.log("multitouch is " + Crafty.multitouch());
     *
     * Crafty.e('2D, Canvas, Color, Button')
     *    .attr({ x: 100, y: 100, w:200, h:200, z:1 })
     *    .color('black')
     *    .bind('TouchStart', function(e) { this.color('green'); });
     * ~~~
     * @see TouchSystem
     * @see MouseSystem
     * @see Button
     * @see Touch
     * @see Mouse
     */
    multitouch: function (bool) {
        if (typeof bool !== "boolean") return this._multitouch;
        this._multitouch = bool;
        return this;
    },
     _multitouch: false,

    _touchDispatch: (function () {
        var touchSystem;

        var startX = 0, // keeps track of start touch location
            startY = 0; // keeps track of start touch location

        function mimicMouse (e) {
            var type, first;
            if (e.type === "touchstart") type = "mousedown";
            else if (e.type === "touchmove") type = "mousemove";
            else if (e.type === "touchend") type = "mouseup";
            else if (e.type === "touchcancel") type = "mouseup";
            else if (e.type === "touchleave") type = "mouseup";
            if (e.touches && e.touches.length) {
                first = e.touches[0];
            } else if (e.changedTouches && e.changedTouches.length) {
                first = e.changedTouches[0];
            }
            var simulatedEvent = document.createEvent("MouseEvent");
            simulatedEvent.initMouseEvent(type, true, true, window, 1,
                first.screenX,
                first.screenY,
                first.clientX,
                first.clientY,
                false, false, false, false, 0, e.relatedTarget
            );
            first.target.dispatchEvent(simulatedEvent);

            // trigger click when it should be triggered
            if (type === 'mousedown') {
                startX = first.clientX;
                startY = first.clientY;
            } else if (type === 'mouseup') {
                var diffX = first.clientX - startX,
                    diffY = first.clientY - startY;

                // make sure that distance between touchstart and touchend smaller than some threshold,
                // e.g. <= 16 px
                if (diffX * diffX + diffY * diffY <= 256) {
                    type = 'click';
                    simulatedEvent = document.createEvent("MouseEvent");
                    simulatedEvent.initMouseEvent(type, true, true, window, 1,
                        first.screenX,
                        first.screenY,
                        first.clientX,
                        first.clientY,
                        false, false, false, false, 0, e.relatedTarget
                    );
                    first.target.dispatchEvent(simulatedEvent);
                }
            }
        }

        return function(e) {
            // either dispatch real touch events
            if (Crafty._multitouch) {
                if (!touchSystem) touchSystem = Crafty.s('Touch');
                touchSystem.processEvent(e);
            // or mimic mouse events
            } else {
                mimicMouse(e);
            }
        };
    })()
});

/**@
 * #TouchSystem
 * @category Input
 * @kind System
 *
 * Provides access to touch point events.
 * @note Additional events and methods are inherited from the `TouchState` component.
 *
 * @trigger TouchOver - when a finger enters an entity - TouchPointEvent
 * @trigger TouchOut - when a finger leaves an entity - TouchPointEvent
 *
 * The event callbacks are triggered with the native [`TouchEvent`](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent)
 * received by Crafty's stage (`Crafty.stage.elem`), which is wrapped in a standard Crafty event object (see `TouchState`).
 * Note that for each changed [`Touch` point](https://developer.mozilla.org/en-US/docs/Web/API/Touch)) a separate
 * Crafty TouchPointEvent event is triggered.
 *
 * These touch point events are triggered on the TouchSystem itself.
 * Additionally, they are dispatched to the closest (visible & `Touch`-enhanced) entity to the source of the event (if available).
 *
 * @note By default, touch events are treated as mouse events and are not triggered by this system.
 * To change this behaviour (and enable multitouch) use `Crafty.multitouch`.
 *
 * @see TouchState, Touch
 * @see Crafty.multitouch
 */
Crafty.s("Touch", Crafty.extend.call(Crafty.extend.call(new Crafty.__eventDispatcher(), {
    normedEventNames: {
        "touchstart": "TouchStart",
        "touchmove": "TouchMove",
        "touchend": "TouchEnd",
        "touchcancel": "TouchCancel" // touchcancel is treated as touchend, but triggers a TouchCancel event
    },

    _evt: { // evt object to reuse
        eventName:'',
        identifier: -1,
        target: null,
        entity: null, // DEPRECATED: remove this in upcoming release
        realX: 0,
        realY: 0,
        originalEvent: null
    },

    // Indicates how many entities have the Touch component, for performance optimization
    // Touch events are still routed to Crafty.s('Touch') even if there are no entities with Touch component
    touchObjs: 0,

    // current entites that are pointed at
    overs: {},

    prepareEvent: function (e, type) {
        var evt = this._evt;

        // Normalize event name
        evt.eventName = this.normedEventNames[type] || type;

        // copy identifier
        evt.identifier = e.identifier;

        // augment touch event with real coordinates
        Crafty.translatePointerEventCoordinates(e, evt);

        // augment touch event with target entity
        evt.target = this.touchObjs ? Crafty.findPointerEventTargetByComponent("Touch", e) : null;
        // DEPRECATED: remove this in upcoming release
        evt.entity = evt.target;

        return evt;
    },

    // this method will be called by TouchState iff triggerTouch event was valid
    triggerTouchEvent: function(eventName, e) {
        // trigger event on TouchSystem itself
        this.trigger(eventName, e);

        var identifier = e.identifier,
            closest = e.target,
            over = this.overs[identifier];

        if (over) { // if old TouchOver target wasn't null, send TouchOut
            if ((eventName === "TouchMove" && over !== closest) || // if TouchOver target changed
                eventName === "TouchEnd" || eventName === "TouchCancel") { // or TouchEnd occurred

                e.eventName = "TouchOut";
                e.target = over;
                e.entity = over; // DEPRECATED: remove this in upcoming release
                over.trigger("TouchOut", e);
                e.eventName = eventName;
                e.target = closest;
                e.entity = closest; // DEPRECATED: remove this in upcoming release

                // delete old over entity
                delete this.overs[identifier];
            }
        }

        // TODO: move routing of events in future to controls system, make it similar to KeyboardSystem
        // try to find closest element that will also receive touch event, whatever the event is
        if (closest) {
            closest.trigger(eventName, e);
        }

        if (closest) { // if new TouchOver target isn't null, send TouchOver
            if (eventName === "TouchStart" || // if TouchStart occurred
                (eventName === "TouchMove" && over !== closest)) { // or TouchOver target changed

                e.eventName = "TouchOver";
                closest.trigger("TouchOver", e);
                e.eventName = eventName;

                // save new over entity
                this.overs[identifier] = closest;
            }
        }
    },

    dispatchEvent: function (e) {
        var evt, touches = e.changedTouches;
        for (var i = 0, l = touches.length; i < l; i++) {
            evt = this.prepareEvent(touches[i], e.type);
            // wrap original event into standard Crafty event object
            evt.originalEvent = e;
            this.triggerTouch(evt.eventName, evt);
        }
    }
}), Crafty.__touchStateTemplate), {}, false);

/**@
 * #Touch
 * @category Input
 * @kind Component
 *
 * Provides the entity with touch point events.
 * Touch point events get dispatched to the closest (visible & `Touch`-enhanced) entity to the source of the event (if available).
 * @note If you do not add this component, touch events will not be triggered on the entity.
 *
 * Triggers all events described in `TouchSystem` and `TouchState`, these are:
 * @trigger TouchOver - when a finger enters the entity - TouchPointEvent
 * @trigger TouchMove - when a finger is over the entity and moves - TouchPointEvent
 * @trigger TouchOut - when a finger leaves the entity - TouchPointEvent
 * @trigger TouchStart - when a finger is pressed on the entity - TouchPointEvent
 * @trigger TouchEnd - when a finger is raised over the entity - TouchPointEvent
 * @trigger TouchCancel - when a touch event has been disrupted in some way whilst over the entity - TouchPointEvent
 *
 * @note By default, touch events are treated as mouse events and are not triggered by this component.
 * To change this behaviour (and enable multitouch) use `Crafty.multitouch`.
 *
 * @example
 * ~~~
 * Crafty.multitouch(true);
 *
 * Crafty.e('2D, Canvas, Color, Touch')
 *   .attr({x: 10, y: 10, w: 40, h: 40})
 *   .color('green')
 *   .bind('TouchOver', function(TouchPoint){
 *     Crafty.log('A finger is over the entity', TouchPoint.identifier);
 *   })
 *   .bind('TouchMove', function(TouchPoint) {
 *     Crafty.log('A finger moves over the entity at { x: ' + TouchPoint.realX + ', y: ' + TouchPoint.realY + ' } coordinates.');
 *   })
 *   .bind('TouchOut', function(TouchPoint){
 *     Crafty.log('A finger is no longer over the entity', TouchPoint.identifier);
 *   });
 * ~~~
 *
 * @example
 * ~~~
 * Crafty.multitouch(true);
 *
 * var myEntity1 = Crafty.e('2D, Canvas, Color, Touch')
 *    .attr({x: 100, y: 100, w:200, h:200, z:1 })
 *    .color('black')
 *    .bind('TouchStart',function(e){ alert('big black box was touched', e); }),
 *  myEntity2 = Crafty.e('2D, Canvas, Color, Touch')
 *    .attr({x: 40, y: 150, w:90, h:300, z:2 })
 *    .color('green')
 *    .bind('TouchStart',function(e){ alert('big green box was touched', e); });
 * ~~~
 *
 * @see TouchState, TouchSystem
 * @see Crafty.multitouch
 */
Crafty.c("Touch", {
    required: "AreaMap",
    init: function () {
        Crafty.s('Touch').touchObjs++;
    },
    remove: function () {
        Crafty.s('Touch').touchObjs--;
    }
});


text:
//package com.di.nomothesia.util;
//
//import java.lang.annotation.ElementType;
//import java.lang.annotation.Retention;
//import java.lang.annotation.RetentionPolicy;
//import java.lang.annotation.Target;
//
///**
// * Loggable annotation may be used by various <b>Spring-managed</b> class methods to enable the call logging.
// * Created by psour on 16/11/2016.
// */
//@Retention (RetentionPolicy.RUNTIME)
//@Target (ElementType.METHOD)
//public @interface Loggable {
//    /**
//     * If set to false, method arguments will not be logged
//     */
//    boolean arguments() default true;
//    /**
//     * If set to false, method result will not be logged
//     */
//    boolean result() default true;
//}

redpajama_set_name: RedPajamaGithub


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

<TITLE>
Uses of Class org.apache.poi.hwpf.model.NotesTables (POI API Documentation)
</TITLE>

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
org.apache.poi.hwpf.model.NotesTables

Packages that use NotesTables

org.apache.poi.hwpf

org.apache.poi.hwpf.usermodel

Uses of NotesTables in org.apache.poi.hwpf

Fields in org.apache.poi.hwpf declared as NotesTables

protected  NotesTables
HWPFDocument._endnotesTables

          Holds the ending notes tables

protected  NotesTables
HWPFDocument._footnotesTables

          Holds the footnotes tables

Uses of NotesTables in org.apache.poi.hwpf.usermodel

Constructors in org.apache.poi.hwpf.usermodel with parameters of type NotesTables

NotesImpl(NotesTables notesTables)

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

                Copyright 2015 The Apache Software Foundation or
        its licensors, as applicable.


text: cp src/Locker/bin/Release/Locker* lib/


text:
function import(moduleName, currentModuleName)
    local currentModuleNameParts
    local moduleFullName = moduleName
    local offset = 1

    while true do
        if string.byte(moduleName, offset) ~= 46 then -- .
            moduleFullName = string.sub(moduleName, offset)
            if currentModuleNameParts and #currentModuleNameParts > 0 then
                moduleFullName = table.concat(currentModuleNameParts, ".") .. "." .. moduleFullName
            end
            break
        end
        offset = offset + 1

        if not currentModuleNameParts then
            if not currentModuleName then
                local n,v = debug.getlocal(3, 1)
                currentModuleName = v
            end

            currentModuleNameParts = string.split(currentModuleName, ".")
        end
        table.remove(currentModuleNameParts, #currentModuleNameParts)
    end

    return require(moduleFullName)
end


text:
<?php

class Task extends Entity {

    public $id, $task, $priority, $size, $group, $deadline, $status, $flag;

    public function __construct()
    {
        parent::__construct();
    }

    public function setId($value)
    {
        if($value < 0) {
            $this->id = false;
            return false;
        }
        $this->id = $value;
        return true;
    }

    public function setTask($value)
    {
        if(!ctype_alpha(str_replace(' ', '', $value)) || strlen($value) >= 64) {
            return false;
        }
        $this->task = $value;
        return true;
    }

    public function setPriority($value)
    {
        if(!is_numeric($value) || $value < 1 || $value >= 4) {
            return false;
        }
        $this->priority = $value;
        return true;
    }

    public function setSize($value)
    {
        if(!is_numeric($value) || $value < 1 || $value >= 4) {
            return false;
        }
        $this->size = $value;
        return true;
    }

    public function setGroup($value)
    {
        if(!is_numeric($value) || $value < 1 || $value >= 5) {
            return false;
        }
        $this->group = $value;
        return true;
    }

    public function setDeadline($value)
    {
        $this->deadline = $value;
        return true;
    }

    public function setStatus($value)
    {
        $this->status = $value;
        return true;
    }

    public function setFlag($value)
    {
        $this->flag = $value;
        return true;
    }
}


text:
<?php

return [
    // Components
    'components' => [
        'status' => [
            1 => 'Operacional',
            2 => 'Problemas de performance',
            3 => 'Indisponibilidade parcial',
            4 => 'Indisponibilidade total',
        ],
    ],

    // Incidents
    'incidents' => [
        'none'          => 'Nenhum incidente reportado.',
        'past'          => 'Incidentes anteriores',
        'previous_week' => 'Semana anterior',
        'next_week'     => 'Próxima semana',
        'none'          => 'Nenhum incidente reportado.',
        'scheduled'     => '',
        'scheduled_at'  => '',
        'status'        => [
            0 => '', // TODO: Hopefully remove this.
            1 => 'Investigando',
            2 => 'Identificado',
            3 => 'Observando',
            4 => 'Resolvido',
        ],
    ],

    // Service Status
    'service' => [
        'good' => 'Todos os serviços estão operando normalmente.',
        'bad'  => 'Alguns serviços estão passando por problemas.',
    ],

    'api' => [
        'regenerate' => 'Gerar nova chave de API',
        'revoke'     => 'Revogar a chave de API',
    ],

    // Metrics
    'metrics' => [
        'filter' => [
            'hourly'  => 'Last 12 Hours',
            'weekly'  => 'Week',
            'monthly' => 'Month',
        ],
    ],

    // Subscriber
    'subscriber' => [
        'subscribe' => 'Subscribe to get the most recent updates.',
        'button'    => 'Subscribe',
        'email'     => [
            'subscribe'    => 'Subscribe to email updates.',
            'subscribed'   => 'You\'ve been subscribed to email notifications, please check your email to confirm your subscription.',
            'verified'     => 'Your email subscription has been confirmed. Thank you!',
            'unsubscribe'  => 'Unsuscribe from email updates.',
            'unsubscribed' => 'Your email subscription has been cancelled.',
            'failure'      => 'Something went wrong with the subscription.',
            'verify'       => [
                'text'           => "Please confirm your email subscription to :app_name status updates.\n:link\nThank you, :app_name",
                'html-preheader' => 'Please confirm your email subscription to :app_name status updates.',
                'html'           => '
Please confirm your email subscription to :app_name status updates.

:link

Thank you, :app_name
',
            ],
            'maintenance' => [
                'text'           => "New maintenance has been scheduled on :app_name.\nThank you, :app_name",
                'html-preheader' => 'New maintenance has been scheduled on :app_name.',
                'html'           => '
New maintenance has been scheduled on :app_name.

Thank you, :app_name
',
            ],
            'incident' => [
                'text'           => "New incident has been reported on :app_name.\nThank you, :app_name",
                'html-preheader' => 'New incident has been reported on :app_name.',
                'html'           => '
New incident has been reported on :app_name.

Thank you, :app_name
',
            ],
        ],
    ],

    // Other
    'powered_by'      => ':app Esta Status Page é fornecida por Cachet.',
    'about_this_site' => 'Sobre este site',
    'rss-feed'        => 'RSS Feed',
    'atom-feed'       => 'Atom Feed',
    'feed'            => 'Status Feed',

];


text:
package br.gov.siscomex.portalunico.due.model;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.swagger.annotations.ApiModelProperty;

@XmlAccessorType(XmlAccessType.FIELD)
 @XmlType(name = "DeclarationOffice", propOrder =
    { "id", "warehouse"
})

@XmlRootElement(name="DeclarationOffice")
public class DeclarationOffice  {

  @XmlElement(name="id", required = true)
  @ApiModelProperty(required = true, value = "")
  @Valid
  private DeclarationOfficeIdentificationCodeType id = null;

  @XmlElement(name="warehouse", required = true)
  @ApiModelProperty(required = true, value = "")
  @Valid
  private Warehouse warehouse = null;
 /**
   * Get id
   * @return id
  **/
  @JsonProperty("id")
  @NotNull
  public DeclarationOfficeIdentificationCodeType getId() {
    return id;
  }

  public void setId(DeclarationOfficeIdentificationCodeType id) {
    this.id = id;
  }

  public DeclarationOffice id(DeclarationOfficeIdentificationCodeType id) {
    this.id = id;
    return this;
  }

 /**
   * Get warehouse
   * @return warehouse
  **/
  @JsonProperty("warehouse")
  @NotNull
  public Warehouse getWarehouse() {
    return warehouse;
  }

  public void setWarehouse(Warehouse warehouse) {
    this.warehouse = warehouse;
  }

  public DeclarationOffice warehouse(Warehouse warehouse) {
    this.warehouse = warehouse;
    return this;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DeclarationOffice {\n");

    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    warehouse: ").append(toIndentedString(warehouse)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private static String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}


text:
class Caprica::Six
  module Error

    def error opts = {}
      @caprica.task.failed!
      @caprica.spinner.stop

      print_error opts
    end

    def print_error opts = {}
      @caprica.logger.puts styling: :red, notice: opts[:notice], clear_line: true, status: :error
      abort unless opts[:continue]
    end

  end
end


text:
package fi.uef.envi.emrooz.examples;

import org.openrdf.repository.sail.SailRepository;
import org.openrdf.sail.memory.MemoryStore;

import fi.uef.envi.emrooz.Emrooz;
import fi.uef.envi.emrooz.api.KnowledgeStore;
import fi.uef.envi.emrooz.cassandra.CassandraDataStore;
import fi.uef.envi.emrooz.entity.EntityFactory;
import fi.uef.envi.emrooz.entity.qb.ComponentProperty;
import fi.uef.envi.emrooz.sesame.SesameKnowledgeStore;
import fi.uef.envi.emrooz.vocabulary.QUDTUnit;
import fi.uef.envi.emrooz.vocabulary.SDMXDimension;

/**
 *

 * Title: AddSensorObservationExample.java
 *

 *

 * Description:
 *

 *

 * Project: Emrooz
 *

 *

 * Copyright: Copyright (C) 2015
 *

 *
 * @author Markus Stocker
 */

public class AddDatasetObservationExample {

	public static void main(String[] args) {
		EntityFactory f = EntityFactory.getInstance("http://example.org#");

		KnowledgeStore ks = new SesameKnowledgeStore(new SailRepository(
				new MemoryStore()));

		ComponentProperty timePeriod = f
				.createDimensionProperty(SDMXDimension.timePeriod);
		ComponentProperty temperature = f.createMeasureProperty("temperature");
		ComponentProperty humidity = f.createMeasureProperty("humidity");

		ks.addDataset(f.createDataset(
				"d1",
				1.0,
				f.createDataStructureDefinition("s1",
						f.createComponentSpecification(timePeriod),
						f.createComponentSpecification(temperature),
						f.createComponentSpecification(humidity))));

		Emrooz emrooz = new Emrooz(ks, new CassandraDataStore());

		emrooz.add(f.createDatasetObservation(
				"d1",
				f.createComponent(
						timePeriod,
						f.createComponentPropertyValue("2015-04-21T01:30:00.000+03:00")),
				f.createComponent(
						temperature,
						f.createComponentPropertyValue(7.4,
								f.createUnit(QUDTUnit.DegreeCelsius))),
				f.createComponent(
						humidity,
						f.createComponentPropertyValue(84.0,
								f.createUnit(QUDTUnit.RelativeHumidity)))));

		emrooz.close();
	}
}


text:
title: How to Determine a P Value When Testing a Null Hypothesis
localeTitle: Como determinar um valor P ao testar uma hipótese nula
---
## Como determinar um valor P ao testar uma hipótese nula

Este é um esboço. [Ajude nossa comunidade a expandi-lo](https://github.com/freecodecamp/guides/tree/master/src/pages/mathematics/how-to-determine-a-p-value-when-testing-a-null-hypothesis/index.md) .

[Este guia de estilo rápido ajudará a garantir que sua solicitação de recebimento seja aceita](https://github.com/freecodecamp/guides/blob/master/README.md) .

#### Mais Informações:


text:
<bill session="110" type="s" number="2746" updated="2009-01-09T17:34:52-05:00">
	<status><introduced date="1205294400" datetime="2008-03-12"/></status>

	<introduced date="1205294400" datetime="2008-03-12"/>
	<titles>
		<title type="short" as="introduced">OPEN FOIA Act of 2008</title>
		<title type="official" as="introduced">A bill to amend section 552(b)(3) of title 5, United States Code (commonly referred to as the Freedom of Information Act) to provide that statutory exemptions to the disclosure requirements of that Act shall specifically cite to the provision of that Act authorizing such exemptions, to ensure an open and deliberative process in Congress by providing for related legislative proposals to explicitly state such required citations, and for other purposes.</title>
	</titles>
	<sponsor id="300065"/>
	<cosponsors>
		<cosponsor id="300002" joined="2008-04-02"/>
		<cosponsor id="300027" joined="2008-03-12"/>
	</cosponsors>
	<actions>
		<action date="1205294400" datetime="2008-03-12"><text>Sponsor introductory remarks on measure. (CR S2001)</text></action>
		<action date="1205294400" datetime="2008-03-12"><text>Read twice and referred to the Committee on the Judiciary.</text><reference label="text of measure as introduced" ref="CR S2001"/></action>
	</actions>
	<committees>

	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>

	3/12/2008--Introduced.
OPEN FOIA Act of 2008 - Amends the Freedom of Information Act to require statutory exemptions to its disclosure requirements to specifically cite its provision that authorizes such exemptions.

</bill>


text:
package com.aol.cyclops.functions;

import java.util.function.Consumer;
import java.util.function.Function;

public interface QuintConsumer<T1, T2, T3, T4, T5> {

	public void accept(T1 a,T2 b, T3 c,T4 d,T5 e);

	default Function<T2,Function<T3,Function<T4,Consumer<T5>>>> apply(T1 s){
		return CurryConsumer.curryC5(this).apply(s);
	}
	default Function<T3,Function<T4,Consumer<T5>>> apply(T1 s, T2 s2){
		return CurryConsumer.curryC5(this).apply(s).apply(s2);
	}
	default Function<T4,Consumer<T5>> apply(T1 s, T2 s2, T3 s3){
		return CurryConsumer.curryC5(this).apply(s).apply(s2).apply(s3);
	}
	default Consumer<T5> apply(T1 s, T2 s2, T3 s3,T4 s4){
		return CurryConsumer.curryC5(this).apply(s).apply(s2).apply(s3).apply(s4);
	}
}


text:
/**
 * Nine degree problem 1078: binary tree traversal.
 * Construct tree from given preorder and inorder traversals, output postorder sequences.
 *
 * STEPS:
 *    1, In a preorder sequence, leftmost element is the root of the tree, we name it A.
 *    2, By searching A in inorder sequence, we can find out all elements on left side of A are in left subtree and elements on right are in right subtree.
 *    3, Recurse child subtree and right subtree.
 *
 *
 * hellfire (asyncloading#163.com)
 * Jan 28th, 2016
 */
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

/* A binary tree node. */
typedef struct node
{
  char data;
  struct node* left;
  struct node* right;
} Node;

/* Create a new tree node. */
Node* new_node(char data);

/* Define binary tree related functions. */
Node* build_tree(char pre[], char in[], int inStart, int inEnd);

/* Search index. */
int search(char arr[], int start, int end, char value);

/* Print postorder. */
void postorder(Node* node);

static int pre_index = 0;

int main(int argc, char **argv)
{
  char pre[26];
  char in[26];
  while (gets(pre) != NULL && gets(in) != NULL)
  {
    pre_index = 0;
    int len = strlen(in);
    Node *root = build_tree(pre, in, 0, len - 1);
    postorder(root);
    free(root);
    printf("\n");
  }
}

Node* new_node(char data)
{
  Node* node = (Node*)malloc(sizeof(Node));
  node -> data = data;
  node -> left = NULL;
  node -> right = NULL;
  return node;
}

int search(char arr[], int start, int end, char value)
{
  int i;
  for (i = start; i <= end; i ++)
  {
    if (arr[i] == value)
    {
      return i;
    }
  }
  return -1;
}

Node* build_tree(char pre[], char in[], int in_start, int in_end)
{
  if (in_start > in_end)
  {
    return NULL;
  }

  Node* node = new_node(pre[pre_index ++]);

  if (in_start == in_end)
  {
    return node;
  }

  int in_index = search(in, in_start, in_end, node -> data);
  node -> left = build_tree(pre, in, in_start, in_index - 1);
  node -> right = build_tree(pre, in, in_index + 1, in_end);

  return node;
}

void postorder(Node* node)
{
  if (node == NULL)
  {
    return;
  }
  postorder(node -> left);
  postorder(node -> right);
  printf("%c", node -> data);
}


text:
var _ = require('underscore');
var Backbone = require('backbone');
var HeaderView = require('./header');
var OrgsView = require('./sidebar/orgs');
var utils = require('.././util');
var templates = require('../../templates');

module.exports = Backbone.View.extend({
  template: templates.profile,

  subviews: {},

  initialize: function(options) {
    this.auth = options.auth;
    this.repos = options.repos;
    this.router = options.router;
    this.search = options.search;
    this.sidebar = options.sidebar;
    this.user = options.user;
  },

  render: function() {
    this.$el.empty().append(this.template({}));

    this.search.setElement(this.$el.find('#search')).render();
    this.repos.setElement(this.$el.find('#repos'));

    var header = new HeaderView({ user: this.user, alterable: false });
    header.setElement(this.$el.find('#heading')).render();
    this.subviews['header'] = header;

    if (this.auth) {
      var orgs = this.sidebar.initSubview('orgs', {
        model: this.auth.orgs,
        router: this.router,
        sidebar: this.sidebar,
        user: this.user
      });

      this.subviews['orgs'] = orgs;
    }

    return this;
  },

  remove: function() {
    this.sidebar.close();

    _.invoke(this.subviews, 'remove');
    this.subviews = {};

    Backbone.View.prototype.remove.apply(this, arguments);
  }
});


text:
//Capture log
if(typeof console === "undefined") {console = {log: function() { }};}

var animationId = null;
var analyserContext = null;
var canvasWidth, canvasHeight;
var input = null;

// These vars are for the canvas audio analysis
var timeToNextPlot = 0;
var barToPlot = 1;
var secondsPerBar = 100;
var recordingStopped = false;
var recordingStarted = false;

  function __log(e, data) {
    log.innerHTML += "\n" + e + " " + (data || '');
  }

  // The "opener" is the window that spawned this popup
  function callOpener(name, arg) {

    //Try this window
    if (typeof window[name] === 'function') {
	window[name](arg)
    }

    //Then check the opener
    else if (window.opener != null && typeof window.opener[name] === 'function') {
	window.opener[name](arg)
    }
  }

function hideMicCheckButton() {
  $('#audio-mic-check').hide();
}

function updateAttemptsText(attemptsRemaining) {
  if (isNaN (attemptsRemaining)) return;

  console.log('Attempts remaining: ' + attemptsRemaining);

  if (attemptsRemaining > 1000 && typeof unlimitedString !== 'undefined') {
    $('#audio-attempts').text(unlimitedString);
  }
  else {
    $('#audio-attempts').text(attemptsRemaining);
  }

  if (attemptsRemaining == 1) {
    $('#audio-last-attempt').show();
  }
}

function microphoneCheck(stream) {
  if (audio_context) {
    $('#volumemeter').show();
    var h = $('#volumemeter').height();
    var w = $('#volumemeter').width();

    // connect to the user input; the lower the smoothing, the more variation in the meter
    analyzerNode = audio_context.createAnalyser();
    analyzerNode.smoothingTimeConstant = 0.2;
    analyzerNode.fftSize = 256;
    input.connect( analyzerNode );

    var volumeCanvas = document.getElementById('volumemeter');
    var vCtx  = volumeCanvas.getContext('2d');
    vCtx.fillStyle = '#333';
	vCtx.fillRect(0,0,w,h);

    var intervalId = setInterval(
      function() {
        // Once the user starts recording, hide the mic check and stop this loop
        if (recordingStarted) {
          hideMicCheckButton();
          clearInterval(intervalId);
        }

        var freqByteData = new Float32Array(analyzerNode.frequencyBinCount);
        analyzerNode.getFloatFrequencyData(freqByteData);

        // compute an average volume
        var values = 0;
        for (var i = 0; i < freqByteData.length; i++) {
          values += freqByteData[i];
        }
        var average = Math.round(values / freqByteData.length) + 120;
        if (navigator.mozGetUserMedia) average = average + 30;

        var grad = vCtx.createLinearGradient(w/10,h*0.2,w/10,h*0.95);
		grad.addColorStop(0,'red');
		grad.addColorStop(-6/-72,'yellow');
		grad.addColorStop(1,'green');
		// fill the grey background
		vCtx.fillStyle = '#555';
		vCtx.fillRect(0,0,w,h);
		vCtx.fillStyle = grad;
		// draw the current volume
		vCtx.fillRect(0,h,w, average*-1);
      }, 500 // rinse and repeat every half second
    );
  }
}

function audioAnalyzer(time) {
  // We are resetting the state of the audio visualization if a user is doing another attempt
  if (time == 0) {
    console.log('Resetting analyzer canvas');
    analyserContext = false;
    timeToNextPlot = 0;
    barToPlot = 1;
  }

  if (!analyserContext) {
    var canvas = document.getElementById('audio-analyzer');
    $(canvas).show();
    canvasWidth = canvas.width;
    canvasHeight = canvas.height;
	secondsPerBar = Math.floor ( (maxSeconds*1000) / canvasWidth );
    analyserContext = canvas.getContext('2d');

    // make the background black
    analyserContext.fillStyle = "black";
    analyserContext.fillRect ( 0, 0, canvasWidth, canvasHeight);

    // draw a horizontal line down the middle
    analyserContext.fillStyle = "blue";
    analyserContext.fillRect ( 0, Math.floor(canvasHeight/2)-2, canvasWidth, 2)

    // the waveform will be white
    analyserContext.fillStyle = "white";
  }

  {
    // Only plot a bar in the waveform when enough time has passed
    if (time > timeToNextPlot) {
      var freqByteData = new Uint8Array(analyzerNode.frequencyBinCount);
      analyzerNode.getByteFrequencyData(freqByteData);

      // compute an average volume
      var values = 0;
      for (var i = 0; i < freqByteData.length; i++) {
        values += freqByteData[i];
      }
      average = values / freqByteData.length;

      analyserContext.fillRect ( barToPlot, canvasHeight/2, 1, Math.floor(average*1) );
      analyserContext.fillRect ( barToPlot, canvasHeight/2, 1, Math.floor(average*-1) );

      barToPlot = barToPlot + 1;
      timeToNextPlot = time + secondsPerBar;
    }
  }

  if (!recordingStopped) animationId = window.requestAnimationFrame(audioAnalyzer);
}

  function enableRecording(stream) {
      // enable the mic check and record buttons
      $('#mic-check').prop('disabled','').fadeTo('slow', 1.0);
      $('#audio-record').prop('disabled','').fadeTo('slow', 1.0);

      if (stream) {
          //Save the input for later
          input = audio_context.createMediaStreamSource(stream);
          console.log('Media input started.');
      }
  }

  function startUserMedia() {
      if (audio_context && input) {
		  //This command would be useful for preview but causes the audio to echo to no other effect
          //input.connect(audio_context.destination);
          //console.log('Input connected to audio context destination.');

          // this is our audio analysis setup
          analyzerNode = audio_context.createAnalyser();
          analyzerNode.fftSize = 2048;
          input.connect( analyzerNode );

          recorder = new Recorder(input);
          console.log('Recorder initialized.');

          // initialize the audio analysis
          audioAnalyzer(0);
      }

  }

  // This is a recording timer
  function startTimer() {
    timer = setInterval(function() {
      timeRemaining--;
      timeTaken = (maxSeconds - timeRemaining);
      timeTakenMins = Math.floor(timeTaken / 60);
      timeTakenSecs = timeTaken - (timeTakenMins * 60);

	  if (typeof scrubberMultiple === 'undefined') {
		  scrubberMultiple = 0;
	  }

      $('#audio-timer').text( timeTakenMins + ":" + (timeTakenSecs < 10 ? "0" : "") + timeTakenSecs );
      $('#audio-timer').css("left", timerStartPosition + (timeTaken * scrubberMultiple));

      if (timeRemaining <= 0) {
        clearInterval(timer);
        console.log('MaxSeconds reached');
        stopRecording(this);
      }
    }, 1000);
  }

  // This is a playback timer (just simulating)
  function playbackTimer(secsToCount) {
    var secsTaken = 0;

    timer = setInterval(function() {
      secsTaken++;
      minsTaken = Math.floor(secsTaken / 60);
      secsToDisplay = secsTaken - (minsTaken * 60);

	  if (typeof scrubberMultiple === 'undefined') {
		  scrubberMultiple = 0;
	  }

      $('#audio-timer').text( minsTaken + ":" + (secsToDisplay < 10 ? "0" : "") + secsToDisplay );
      $('#audio-timer').css("left", timerStartPosition + (secsTaken * scrubberMultiple));

      if (secsTaken >= secsToCount) {
        clearInterval(timer);
        console.log('MaxSeconds of playback reached');
      }
    }, 1000);
  }

  function startRecording(button) {
    recordingStarted = true;
    recordingStopped = false;
    hideMicCheckButton();

    //Try to stop/reload previous recording
    if (userMediaSupport) {
      document.getElementById('audio-html5').load();
    }
    else {
        //If this fails it's just because jRecorder hasn't started and they tried to close the window
        try {
            $.jRecorder.stopPreview();
        }
        catch (err) {}
    }

    // disable Save and Submit on parent page
    callOpener ("disableSave", window);
    callOpener ("disableSubmitForGrade", window);

    // Reset time remaining
    timeRemaining = maxSeconds;

    startUserMedia();

    if (userMediaSupport) {
      recorder && recorder.record();
      startTimer();
    }
    else {
      // wait for the callback from the SWF before starting timer
      $.jRecorder.record(maxSeconds);
    }

    // disable the record and play button, enable the stop button
    $('#audio-stop').prop('disabled','').fadeTo('slow', 1.0);
    $('#audio-record').prop('disabled','disabled').fadeTo('slow', 0.5);
    $('#audio-upload').prop('disabled','disabled').fadeTo('slow', 0.5);
    $('#audio-play').prop('disabled', 'disabled').fadeTo('slow', 0.5);
    console.log('Recording...');
  }

  function stopRecording(button) {
    recordingStopped = true;

    if (userMediaSupport) {
      recorder && recorder.stop();
    }
    else {
		//If this fails it's just because jRecorder hasn't started and they tried to close the window
		try {
			$.jRecorder.stop();
		}
		catch (err) {}
    }

    //Disconnect the stream
    if (input != null) {
        input.disconnect();
    }

    // enable Save and Submit on parent page
    callOpener ("enableSave", window);
    callOpener ("enableSubmitForGrade", window);

    // reset timers
    clearInterval(timer);

    // disable the stop button, enable the record button
    $('#audio-stop').prop('disabled','disabled').fadeTo('slow', 0.5);
    $('#audio-record').prop('disabled','').fadeTo('slow', 1.0);
    $('#audio-upload').prop('disabled','').fadeTo('slow', 1.0);
    //button.previousElementSibling.disabled = false;
    console.log('Stopped recording.');

    // see if a user has attempts remaining
    attemptsRemaining--;
    updateAttemptsText(attemptsRemaining);

    //force the user submission!
    if (attemptsRemaining < 1) {
      $('#audio-record').prop('disabled', 'disabled');
      $('#audio-stop').prop('disabled','disabled').fadeTo('slow', 0.5);

	  //This might fail if there's no data
	  try {
		  postDataToServer(button);
	  }
	  catch (err) {}
    }
    else {
        createDownloadLink();
    }
  }

  function postDataToServer (button) {
    console.log('seconds: ' + maxSeconds + ";remain: " + timeRemaining);
    var duration = maxSeconds - timeRemaining;
    // attempts is what Samigo expects to be attemptsRemaining
    // agentId is the Samigo agentId and is not the browser user agent
    if (typeof(agentId) === 'undefined') agentId = 'ckeditorAgent';

    if (postUrl) {
      var url  = postUrl + "&agent=" + agentId + "&lastDuration=" + duration + "&suffix=" + "au" + "&attempts=" + attemptsRemaining;
    }
    else {
      console.log ("postUrl not set yet");
    }

    // disable all buttons while we upload
    $('#audio-controls button').fadeTo('slow', 0).hide();
    $('#audio-posting').fadeTo('slow', 1.0);

    if (userMediaSupport) {
      recorder && recorder.exportWAV(function(blob) {
        console.log('Blob size: ' + blob.size + ';type=' + blob.type);
        uploadBlob(url,blob);
      });
    }
    else {
      // add params before POSTing audio to server
      $.jRecorder.addParameter('agent', agentId);
      $.jRecorder.addParameter('suffix', 'wav');
      $.jRecorder.addParameter('lastDuration', duration);
      $.jRecorder.addParameter('attempts', attemptsRemaining);
      $.jRecorder.addParameter('Command','QuickUploadAttachment');

      $.jRecorder.sendData();
    }
  }

  function uploadBlob (url, blob) {
    // plot the upload progress
    $('#audio-levelbar').hide();
    $('#audio-statusbar').css('width', '2px').show();

    var xhr = new XMLHttpRequest();
    xhr.open('POST', url, true);
    xhr.onload = function(e) { /*uploaded*/ };

    // Listen to the upload progress.
    xhr.upload.onprogress = function(e) {
      if (e.lengthComputable) {
        p = (e.loaded / e.total) * 100;
        if (!isNaN(p) && p > 0) {
          $('#audio-statusbar').css('width', ((p/100)*(maxWidth)) + 'px');
        }
        console.log('Progress: ' + p);
      }
    };

    xhr.onreadystatechange = function(e) {
      if ( 4 == this.readyState ) {
        console.log('xhr upload complete');

        // close up shop
        finishAndClose(true, this.responseText);
      }
    };

    xhr.send(blob);
  }

  function finishAndClose (success, responseUrl) {
    // refresh the parent page
    callOpener ("clickReloadLink", window);

	//Update the Url if it's passed back and this method accepts it
    callOpener ("updateUrl", responseUrl);
    $('#audio-visual-container').hide();
    $('#audio-statusbar').show().css('width', '2px').show();
    $('#audio-posting').hide();
    $('#audio-finished').fadeTo('slow', 1.0);

    var closeSoon = parseInt(1);
    var closer = setInterval(
      function() {
        $('#audio-statusbar').css('width', ((closeSoon/5)*(maxWidth)) + 'px');
        if (closeSoon > 5) {
            var ckeditor_loaded = false;
            for (var instances in CKEDITOR.instances) {
              ckeditor_loaded = true;
            }

            if (ckeditor_loaded) {
                curdialog = CKEDITOR.dialog.getCurrent()
                //Might have closed the dialog
                if (curdialog) {
                  curdialog.hide();
                }
            }
            else {
                window.close();
            }

            //Stop timer
            clearInterval(closer);
        }
        closeSoon++;
      }
    , 500);
  }

  function createDownloadLink() {
    $('#audio-play').prop('disabled', '').fadeTo('slow', 1.0);

    recorder && recorder.exportWAV(function(blob) {
      var url = URL.createObjectURL(blob);
      //var li = document.createElement('li');
      // var au = document.createElement('audio');
      var au = document.getElementById('audio-html5');

      au.src = url;
      // li.appendChild(au);
      //$('#audio-debug-log').append(li);

    });
  }

  function playRecording(button) {
	//Try to stop/reload previous recording
    if (userMediaSupport) {
      document.getElementById('audio-html5').load();
    }
    else {
        //If this fails it's just because jRecorder hasn't started and they tried to close the window
        try {
            $.jRecorder.stopPreview();
        }
        catch (err) {}
    }

    if (userMediaSupport) {
        document.getElementById('audio-html5').play();
    }
    else {
        try {
        	$.jRecorder.startPreview();
        }
        catch (err) {}
    }

    // Start the playback timer
    playbackTimer(timeTaken);
  }

  function drawBuffer(width, height, context, data) {
    var step = Math.ceil( data.length / width );
    var amp = height / 2;
    context.fillStyle = "silver";
    for(var i=0; i < width; i++){
        var min = 1.0;
        var max = -1.0;
        for (j=0; j<step; j++) {
            var datum = data[(i*step)+j];
            if (datum < min)
                min = datum;
            if (datum > max)
                max = datum;
        }
        context.fillRect(i,(1+min)*amp,1,Math.max(1,(max-min)*amp));
    }
  }

$(document).ready(function() {

    try {
      // webkit shim
      window.AudioContext = window.AudioContext || window.webkitAudioContext;

      //navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
      // IE doesn't support everything needed yet, use flash fallback
      navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia;

      window.URL = window.URL || window.webkitURL;

      if (AudioContext) {
        audio_context = new AudioContext;
        console.log('Audio context set up.');
      }
    } catch (e) {
      console.log('No web audio support in this browser!' + e.message);
      userMediaSupport = false;
    }

    //Maybe no error but still no support
    if (navigator.getUserMedia === undefined || typeof audio_context === 'undefined') {
        userMediaSupport = false;
        console.log('Setting userMediaSupport to false because of bad browser support.');
    }
    else {
      console.log('navigator.getUserMedia ' + (navigator.getUserMedia ? 'available.' : 'not present!'));
    }

    if (isNaN(attemptsAllowed)) {
      attemptsAllowed = 1;
    }

    if (isNaN(attemptsRemaining)) {
      attemptsRemaining = attemptsAllowed;
      console.log('Settings attempts remaining to ' + attemptsRemaining);
    }

    if (isNaN(maxSeconds)) {
      maxSeconds = 30;
      console.log('maxSeconds was NaN. Setting to ' + maxSeconds);
    }

    // Set some initial variables
    timeRemaining = maxSeconds;
    timeTaken = 0;
    timerStartPosition = $('#audio-timer').position().left;
    $('#audio-time-allowed').text(timeRemaining);
    $('#audio-max-time').text(maxSeconds);

    if (attemptsAllowed > 1000 && typeof unlimitedString !== 'undefined') {
      $('#audio-attempts-allowed').text(unlimitedString);
    }
    else {
      $('#audio-attempts-allowed').text(attemptsAllowed);
    }

    updateAttemptsText(attemptsRemaining);

    maxWidth = $('#audio-controls').width();
    if (isNaN(maxWidth) || maxWidth < 100) maxWidth = 100;
    console.log('Width of controls: ' + maxWidth);

    // We need to move the playback scrubber smoothly
    scrubberWidth = $('#audio-scrubber').width();
    if (isNaN(scrubberWidth) || scrubberWidth < 100) scrubberWidth = 520;
    scrubberMultiple = (scrubberWidth - 10) / maxSeconds;

    // disable record button until the user grants microphone approval
    $('#audio-record').prop('disabled','disabled').fadeTo('slow', 0.5);
    $('#audio-play').prop('disabled','disabled').fadeTo('slow', 0.5);
    $('#mic-check').fadeTo('fast', 0.2);

    if (userMediaSupport) {

      navigator.getUserMedia({audio: true}, enableRecording, function(e) {
        console.log('No live audio input: ' + e);
        userMediaSupport = false;

        // Why is the user denying the mic? Reload and try again.
        $('#sakai-recorder-error').show();
      });

    }
    else {
      var hasFlashSupport = swfobject.hasFlashPlayerVersion("9.0.18");
      if (!hasFlashSupport) {
        $('#audio-visual-container').hide();
        $('#audio-browser-plea').show(); // Please upgrade your browser!!
        hideMicCheckButton();
      }
      else {
        var flash = document.getElementById('flashrecarea');
        $(flash).show();
        $.jRecorder({
          swf_path : '/library/js/recorder/jRecorder.swf',
          host : postUrl,
          swf_object_path : '/library/js/swfobject',
          //These are in the main body right now because flash couldn't call them
          callback_started_recording: function()      { startTimer(); },
          // I wish this callback worked better but in my testing, it returns high levels no matter my volume
          // callback_activityLevel:     function(level) { plotLevels(level); },
          callback_finished_sending:  function(response)  {finishAndClose(true, response) },
          callback_hide_the_flash:    function() { hideMicCheckButton(); enableRecording(); }
        });
      }
    }

});


text:
if ("undefined" === typeof (ConnectionsToolbar)) {
    var ConnectionsToolbar = {};
};
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/FileUtils.jsm");

ConnectionsToolbar.database = {
    /**
     * Enter description here...
     */
    init : function() {
        ConnectionsToolbar.database.checkTablesExist();
        ConnectionsToolbar.database.checkTableHasContent();
    },
    /**
     * Enter description here...
     */
    openDatabase : function() {
        var file = FileUtils.getFile("ProfD",
                ["connections_toolbar_firefox.sqlite"]);
        var mDBConn = Services.storage.openDatabase(file);
        return mDBConn;
        // Will also create the file if it does not exist
    },
    /**
     * Enter description here...
     */
    closeDatabase : function(dbConn) {
        dbConn.asyncClose();
    },
    /**
     * Updates the row in the table
     */
    updateRow : function(tableName, columnValues, dbConn) {
        var statement =  dbConn
                .createStatement("INSERT INTO toolbar_content VALUES ( :title, :url, :type, :component, :download );");
        statement.params.title = ConnectionsToolbar.database
                .escapeApostrophe(columnValues[ConnectionsToolbar.constants.TITLE]);
        statement.params.url = ConnectionsToolbar.database
                .escapeApostrophe(columnValues[ConnectionsToolbar.constants.URL]);
        statement.params.type = ConnectionsToolbar.database
                .escapeApostrophe(columnValues[ConnectionsToolbar.constants.TYPE]);
        statement.params.component = ConnectionsToolbar.database
                .escapeApostrophe(columnValues[ConnectionsToolbar.constants.COMPONENT]);
        statement.params.download = ConnectionsToolbar.database
                .escapeApostrophe(columnValues[ConnectionsToolbar.constants.DOWNLOAD]);
        return statement;
    },
    /**
     * Updates the content table with the content
     */
    updateContentTable : function(rowsArray) {
        var mDBConn = ConnectionsToolbar.database.openDatabase();
        var statements = [];
        for (row in rowsArray) {
            statements.push(ConnectionsToolbar.database.updateRow("toolbar_content", rowsArray[row],
                    mDBConn));
        }
        mDBConn.executeAsync(statements, statements.length);
        mDBConn.asyncClose();
    },
    /**
     * Retrieve all of the content from the content table
     */
    retrieveContentTable : function() {
        var mDBConn = ConnectionsToolbar.database.openDatabase();
        var statement = mDBConn
                .createStatement("SELECT * FROM toolbar_content ORDER BY "
                        + "title COLLATE NOCASE ASC");
        statement
                .executeAsync({
                    handleResult : function(aResultSet) {
                        ConnectionsToolbar.data.setContentObjects(aResultSet);
                    },

                    handleError : function(aError) {
                        ConnectionsToolbar.logger.error(aError.message);
                    },

                    handleCompletion : function(aReason) {
                        if (aReason != Components.interfaces.mozIStorageStatementCallback.REASON_FINISHED) {
                            ConnectionsToolbar.logger.info("Query canceled or aborted!");
                        }
                        ConnectionsToolbar.logger
                                .info("Content retrieved and going to populate the UI - "
                                        + Components.interfaces.mozIStorageStatementCallback.REASON_FINISHED);
                        ConnectionsToolbar.browserOverlay.populateUi();
                    }
                });
        mDBConn.asyncClose();
    },
    /**
     * Create the statement to check the table exists
     */
    checkTableExistsStatement : function(mDBConn) {
    	return mDBConn
                .createStatement("CREATE TABLE IF NOT EXISTS toolbar_content" +
                        " ( title varchar(256) NOT NULL, " +
                        "url varchar(256) NOT NULL, " +
                        "type varchar(8) NOT NULL, " +
                        "component varchar(25) NOT NULL, " +
                        "download_link varchar(256), " +
                        "PRIMARY KEY ( title, url , type, component))");
    },

    /**
     * Check that the table exists
     */
    checkTablesExist : function() {
        var statements = [];
        var mDBConn = ConnectionsToolbar.database.openDatabase();
        statements.push(ConnectionsToolbar.database.checkTableExistsStatement(mDBConn));
        mDBConn.executeAsync(statements, statements.length);
        mDBConn.asyncClose();
    },

    checkTableHasContent : function() {
        var mDBConn = ConnectionsToolbar.database.openDatabase();
        var statement = mDBConn
                .createStatement("SELECT COUNT(*) FROM toolbar_content");
        statement
                .executeAsync({
                    handleResult : function(aResultSet) {
                        ConnectionsToolbar.access.continueOnError = true;
                        ConnectionsToolbar.scheduler.run(aResultSet);
                    },

                    handleError : function(aError) {
                        ConnectionsToolbar.logger.error(aError.message);
                    },

                    handleCompletion : function(aReason) {
                        if (aReason != Components.interfaces.mozIStorageStatementCallback.REASON_FINISHED) {
                            ConnectionsToolbar.logger.info("Query canceled or aborted!");
                        }
                    }
                });
        mDBConn.asyncClose();
    },

    /**
     *
     */
    emptyContentTable : function() {
        ConnectionsToolbar.logger.info("Emptying the content table");
        var mDBConn = ConnectionsToolbar.database.openDatabase();
        var statement = mDBConn.createStatement("DELETE FROM toolbar_content");
        statement.executeAsync();
        mDBConn.asyncClose();
    },
    /**
     * Enter description here...
     */
    escapeApostrophe : function(str) {
        return (str + '').replace(/[']/g, '\'$&').replace(/\u0000/g, '\\0');
    }
};


text:
using Evol.Fx.EntityFramework.Repository;
using System.Data.Entity;
using Evol.Common.IoC;
using System;

namespace Evol.Fx.EntityFramework.Uow
{
    public class EfDbContextProvider : IEfDbContextProvider
    {
        private IIoCManager _ioCManager;

        public EfDbContextProvider(IIoCManager ioCManager)
        {
            if (ioCManager == null)
                throw new ArgumentNullException(nameof(ioCManager));
            _ioCManager = ioCManager;
        }

        public TDbContext Get<TDbContext>() where TDbContext : DbContext
        {
            var context = _ioCManager.GetService<TDbContext>();
            return context;
        }
    }
}


text:
class ConferenceSearch

  attr_accessor :query, :category_ids, :from, :until

  def initialize(options = {})
    @query = options[:query]
    @category_ids = options[:category_ids] || []
    @until = options[:until]
    @from = options[:from]
  end

  def find
    scope = Conference
    if query
      scope = scope.search(query)
    end
    if category_ids.present?
      scope = scope.in_categories(category_ids)
    end
    if from_date
      scope = scope.from_date(from_date)
    elsif !until_date and (query.blank? or (!query.include?('from:') and !query.include?('to:')))
      scope = scope.from_date(Date.today)
    end
    if until_date
      scope = scope.until_date(until_date)
    end
    scope
  end

  # Define this method to silence deprecation warnings when we are using the non-ActiveRecord class in Rails forms.
  def id
    nil
  end

  def until_date
    Date.parse(@until) rescue nil
  end

  def from_date
    Date.parse(@from) rescue nil
  end

  def present?
    query.present? or from_date.present? or until_date.present? or category_ids.present?
  end

end


text:
#include <logging/log.h>
LOG_MODULE_DECLARE(net_l2_openthread, CONFIG_OPENTHREAD_L2_LOG_LEVEL);

#include <net/net_core.h>
#include <net/net_pkt.h>
#include <net/openthread.h>

#include <openthread/ip6.h>
#include <openthread/thread.h>

#include "openthread_utils.h"

#define ALOC16_MASK 0xfc

static bool is_anycast_locator(const otNetifAddress *address)
{
	return address->mAddress.mFields.m16[4] == htons(0x0000) &&
	       address->mAddress.mFields.m16[5] == htons(0x00ff) &&
	       address->mAddress.mFields.m16[6] == htons(0xfe00) &&
	       address->mAddress.mFields.m8[14] == ALOC16_MASK;
}

static bool is_mesh_local(struct openthread_context *context,
			  const u8_t *address)
{
	const otMeshLocalPrefix *ml_prefix =
				otThreadGetMeshLocalPrefix(context->instance);

	return (memcmp(address, ml_prefix->m8, sizeof(ml_prefix)) == 0);
}

int pkt_list_add(struct openthread_context *context, struct net_pkt *pkt)
{
	u16_t i_idx = context->pkt_list_in_idx;

	if (context->pkt_list_full) {
		return -ENOMEM;
	}

	i_idx++;
	if (i_idx == CONFIG_OPENTHREAD_PKT_LIST_SIZE) {
		i_idx = 0U;
	}

	if (i_idx == context->pkt_list_out_idx) {
		context->pkt_list_full = 1;
	}

	context->pkt_list[context->pkt_list_in_idx].pkt = pkt;
	context->pkt_list_in_idx = i_idx;

	return 0;
}

struct net_pkt *pkt_list_peek(struct openthread_context *context)
{
	if ((context->pkt_list_in_idx == context->pkt_list_out_idx) &&
	    (!context->pkt_list_full)) {

		return NULL;
	}
	return context->pkt_list[context->pkt_list_out_idx].pkt;
}

void pkt_list_remove_last(struct openthread_context *context)
{
	if ((context->pkt_list_in_idx == context->pkt_list_out_idx) &&
	    (!context->pkt_list_full)) {

		return;
	}

	context->pkt_list_out_idx++;
	if (context->pkt_list_out_idx == CONFIG_OPENTHREAD_PKT_LIST_SIZE) {
		context->pkt_list_out_idx = 0;
	}

	context->pkt_list_full = 0;
}

void add_ipv6_addr_to_zephyr(struct openthread_context *context)
{
	const otNetifAddress *address;
	struct net_if_addr *if_addr;

	for (address = otIp6GetUnicastAddresses(context->instance);
	     address; address = address->mNext) {

		if (address->mRloc || is_anycast_locator(address)) {
			continue;
		}

		if (CONFIG_OPENTHREAD_L2_LOG_LEVEL == LOG_LEVEL_DBG) {
			char buf[NET_IPV6_ADDR_LEN];

			NET_DBG("Adding %s",
				log_strdup(net_addr_ntop(AF_INET6,
				       (struct in6_addr *)(&address->mAddress),
				       buf, sizeof(buf))));
		}

		if_addr = net_if_ipv6_addr_add(
					context->iface,
					(struct in6_addr *)(&address->mAddress),
					NET_ADDR_AUTOCONF, 0);

		if (if_addr == NULL) {
			NET_ERR("Cannot add OpenThread unicast address");
			continue;
		}

		if_addr->is_mesh_local = is_mesh_local(
					context, address->mAddress.mFields.m8);
	}
}

void add_ipv6_addr_to_ot(struct openthread_context *context)
{
	struct net_if *iface = context->iface;
	struct otNetifAddress addr;
	struct net_if_ipv6 *ipv6;
	int i;

	(void)memset(&addr, 0, sizeof(addr));

	if (net_if_config_ipv6_get(iface, &ipv6) < 0) {
		NET_DBG("Cannot allocate IPv6 address");
		return;
	}

	/* save the last added IP address for this interface */
	for (i = NET_IF_MAX_IPV6_ADDR - 1; i >= 0; i--) {
		if (ipv6->unicast[i].is_used) {
			memcpy(&addr.mAddress,
			       &ipv6->unicast[i].address.in6_addr,
			       sizeof(addr.mAddress));
			break;
		}
	}

	ipv6->unicast[i].is_mesh_local = is_mesh_local(
			context, ipv6->unicast[i].address.in6_addr.s6_addr);

	addr.mValid = true;
	addr.mPreferred = true;
	addr.mPrefixLength = 64;

	otIp6AddUnicastAddress(context->instance, &addr);

	if (CONFIG_OPENTHREAD_L2_LOG_LEVEL == LOG_LEVEL_DBG) {
		char buf[NET_IPV6_ADDR_LEN];

		NET_DBG("Added %s",
			log_strdup(net_addr_ntop(AF_INET6,
						 &addr.mAddress, buf,
						 sizeof(buf))));
	}
}

void add_ipv6_maddr_to_ot(struct openthread_context *context)
{
	struct otIp6Address addr;
	struct net_if_ipv6 *ipv6;
	int i;

	if (net_if_config_ipv6_get(context->iface, &ipv6) < 0) {
		NET_DBG("Cannot allocate IPv6 address");
		return;
	}

	/* save the last added IP address for this interface */
	for (i = NET_IF_MAX_IPV6_MADDR - 1; i >= 0; i--) {
		if (ipv6->mcast[i].is_used) {
			memcpy(&addr,
			       &ipv6->mcast[i].address.in6_addr,
			       sizeof(addr));
			break;
		}
	}

	otIp6SubscribeMulticastAddress(context->instance, &addr);

	if (CONFIG_OPENTHREAD_L2_LOG_LEVEL == LOG_LEVEL_DBG) {
		char buf[NET_IPV6_ADDR_LEN];

		NET_DBG("Added multicast %s",
			log_strdup(net_addr_ntop(AF_INET6, &addr,
						 buf, sizeof(buf))));
	}
}

void add_ipv6_maddr_to_zephyr(struct openthread_context *context)
{
	const otNetifMulticastAddress *maddress;

	for (maddress = otIp6GetMulticastAddresses(context->instance);
	     maddress; maddress = maddress->mNext) {
		if (net_if_ipv6_maddr_lookup(
				(struct in6_addr *)(&maddress->mAddress),
				&context->iface) != NULL) {
			continue;
		}

		if (CONFIG_OPENTHREAD_L2_LOG_LEVEL == LOG_LEVEL_DBG) {
			char buf[NET_IPV6_ADDR_LEN];

			NET_DBG("Adding multicast %s",
				log_strdup(net_addr_ntop(AF_INET6,
							 (struct in6_addr *)
							 (&maddress->mAddress),
							 buf, sizeof(buf))));
		}

		net_if_ipv6_maddr_add(context->iface,
				      (struct in6_addr *)(&maddress->mAddress));
	}
}

void rm_ipv6_addr_from_zephyr(struct openthread_context *context)
{
	struct in6_addr *ot_addr;
	struct net_if_addr *zephyr_addr;
	struct net_if_ipv6 *ipv6;
	int i;

	if (net_if_config_ipv6_get(context->iface, &ipv6) < 0) {
		NET_DBG("Cannot find IPv6 address");
		return;
	}

	for (i = 0; i < NET_IF_MAX_IPV6_ADDR; i++) {
		const otNetifAddress *address;
		bool used = false;

		zephyr_addr = &ipv6->unicast[i];
		if (!zephyr_addr->is_used) {
			continue;
		}

		for (address = otIp6GetUnicastAddresses(context->instance);
		     address; address = address->mNext) {

			ot_addr = (struct in6_addr *)(&address->mAddress);
			if (net_ipv6_addr_cmp(ot_addr,
					      &zephyr_addr->address.in6_addr)) {

				used = true;
				break;
			}
		}
		if (!used) {
			if (CONFIG_OPENTHREAD_L2_LOG_LEVEL == LOG_LEVEL_DBG) {
				char buf[NET_IPV6_ADDR_LEN];

				NET_DBG("Removing %s",
					log_strdup(net_addr_ntop(AF_INET6,
					      &zephyr_addr->address.in6_addr,
					      buf, sizeof(buf))));
			}

			net_if_ipv6_addr_rm(context->iface,
					    &zephyr_addr->address.in6_addr);
		}
	}
}

void rm_ipv6_maddr_from_zephyr(struct openthread_context *context)
{
	struct in6_addr *ot_addr;
	struct net_if_mcast_addr *zephyr_addr;
	struct net_if_ipv6 *ipv6;
	int i;

	if (net_if_config_ipv6_get(context->iface, &ipv6) < 0) {
		NET_DBG("Cannot find IPv6 address");
		return;
	}

	for (i = 0; i < NET_IF_MAX_IPV6_MADDR; i++) {
		const otNetifMulticastAddress *maddress;
		bool used = false;

		zephyr_addr = &ipv6->mcast[i];
		if (!zephyr_addr->is_used) {
			continue;
		}

		for (maddress = otIp6GetMulticastAddresses(context->instance);
		     maddress; maddress = maddress->mNext) {

			ot_addr = (struct in6_addr *)(&maddress->mAddress);
			if (net_ipv6_addr_cmp(ot_addr,
					      &zephyr_addr->address.in6_addr)) {

				used = true;
				break;
			}
		}
		if (!used) {
			if (CONFIG_OPENTHREAD_L2_LOG_LEVEL == LOG_LEVEL_DBG) {
				char buf[NET_IPV6_ADDR_LEN];

				NET_DBG("Removing multicast %s",
					log_strdup(net_addr_ntop(AF_INET6,
					      &zephyr_addr->address.in6_addr,
					      buf, sizeof(buf))));
			}

			net_if_ipv6_maddr_rm(context->iface,
					     &zephyr_addr->address.in6_addr);
		}
	}
}


text:
import PageObject from 'ember-cli-page-object';

const { text, is } = PageObject;

export const KineticFormForm = {
  scope: '.kinetic-form--form',
  title: text('h1'),
  submitButton: {
    scope: 'button[type=submit]',
    isEnabled: is(':enabled'),
    isDisabled: is(':disabled')
  }
};

export default PageObject.create(KineticFormForm);


text:
How To...
=========

.. toctree::
   :maxdepth: 2

   define_a_conference.rst
   modify_tags_and_unavailability.rst
   use_different_solver.rst
   use_heuristics.rst
   obtain_mathematical_representation.rst


text:
using System.Collections.Generic;
using DevLab.JmesPath.Functions;

namespace DevLab.JmesPath.Interop
{
    public interface IFunctionRepository
    {
        IEnumerable<string> Names { get; }
        JmesPathFunction this[string name] { get; }
        bool Contains(string name);
    }
}


text:
import youtube
import media
import fresh_tomatoes

list = youtube.Youtube()
list.search = "movie trailer" # What is interesting topic? 'funny pet'? 'cute kitten'? 'Udacity'?
list.load()

movies = []
youtube_prefix = 'https://www.youtube.com/watch?v='
# Mapping youtube API response to our movie array
for item in list.data['items']:
	title = item['snippet']['title']
	storyline = item['snippet']['description']
	video = youtube_prefix + item['id']['videoId']
	poster_image_url = item['snippet']['thumbnails']['high']['url']
	movies.append(media.Movie(title, storyline, poster_image_url, video))

# Rendering page
fresh_tomatoes.open_movies_page(movies)


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="app.simone.scores.view.ScoreboardActivity">

    <LinearLayout
        android:id="@+id/scoreboard_fullscreen_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:weightSum="2">

        <LinearLayout
            android:id="@+id/scoreboard_top_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:layout_weight="1"
            android:weightSum="2">

            <LinearLayout
                android:id="@+id/scoreboard_top_left_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/myYellow"
                android:orientation="vertical">

            </LinearLayout>
            <LinearLayout
                android:id="@+id/scoreboard_top_right_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/myBlue"
                android:orientation="vertical">

            </LinearLayout>

        </LinearLayout>
        <LinearLayout
            android:id="@+id/scoreboard_bottomlayout"
            android:layout_width="match_parent"
            android:layout_height="fill_parent"
            android:layout_weight="1"
            android:weightSum="2"
            android:background="@color/myYellow"
            android:gravity="center_horizontal|center_vertical"
            android:orientation="horizontal" >

            <LinearLayout
                android:id="@+id/scoreboard_bottom_left_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/myYellow"
                android:orientation="vertical">

            </LinearLayout>
            <LinearLayout
                android:id="@+id/scoreboard_bottom_right_layout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@color/myBlue"
                android:orientation="vertical">

            </LinearLayout>
        </LinearLayout>
    </LinearLayout>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/scoreboard_fab_leaderboard"
        android:layout_width="120dp"
        android:layout_height="120dp"
        android:layout_marginEnd="20dp"
        app:backgroundTint="@color/myLightGray"
        app:layout_anchor="@id/scoreboard_top_layout"
        app:layout_anchorGravity="center" />

    <app.simone.shared.styleable.SimoneTextView
        android:id="@+id/scoreboard_simone_textview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:elevation="6dp"
        android:text="@string/leaderboard"
        android:textColor="@color/myDarkGray"
        android:textAlignment="center"
        android:textSize="32sp"
        app:layout_anchor="@id/scoreboard_top_layout"
        app:layout_anchorGravity="center" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/scoreboard_fab_achievements"
        android:layout_width="120dp"
        android:layout_height="120dp"
        android:layout_marginEnd="20dp"
        app:backgroundTint="@color/myLightGray"
        app:layout_anchor="@id/scoreboard_bottomlayout"
        app:layout_anchorGravity="center" />

    <app.simone.shared.styleable.SimoneTextView
        android:id="@+id/scoreboard_simone_textview_hard"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:elevation="6dp"
        android:text="@string/achievements"
        android:textColor="@color/myDarkGray"
        android:textAlignment="center"
        android:textSize="32sp"
        app:layout_anchor="@id/scoreboard_bottomlayout"
        app:layout_anchorGravity="center" />
    <app.simone.shared.styleable.MainTextView

        android:id="@+id/scoreboard_textview_scoreboard"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="20sp"
        android:layout_marginTop="30sp"
        android:alpha="0.6"
        android:text="@string/scoreboard_long"
        android:textColor="#FFF"
        android:textSize="32sp"
        app:layout_anchor="@id/scoreboard_top_layout"
        app:layout_anchorGravity="bottom|center" />

</android.support.design.widget.CoordinatorLayout>


text:
using System;
using System.Collections.Generic;

namespace LiteDB
{
    /// <summary>
    /// Manage ConnectionString to connect and create databases. Connection string are NameValue using Name1=Value1; Name2=Value2
    /// </summary>
    public class ConnectionString
    {
        /// <summary>
        /// "filename": Full path or relative path from DLL directory
        /// </summary>
        public string Filename { get; set; } = "";

        /// <summary>
        /// "journal": Enabled or disable double write check to ensure durability (default: true)
        /// </summary>
        public bool Journal { get; set; } = true;

        /// <summary>
        /// "password": Encrypt (using AES) your datafile with a password (default: null - no encryption)
        /// </summary>
        public string Password { get; set; } = null;

        /// <summary>
        /// "cache size": Max number of pages in cache. After this size, flush data to disk to avoid too memory usage (default: 5000)
        /// </summary>
        public int CacheSize { get; set; } = 5000;

        /// <summary>
        /// "timeout": Timeout for waiting unlock operations (default: 1 minute)
        /// </summary>
        public TimeSpan Timeout { get; set; } = TimeSpan.FromMinutes(1);

        /// <summary>
        /// "mode": Define if datafile will be shared, exclusive or read only access (default in environments with file locking: Shared, otherwise: Exclusive)
        /// </summary>
#if HAVE_LOCK
        public FileMode Mode { get; set; } = FileMode.Shared;
#else
        public FileMode Mode { get; set; } = FileMode.Exclusive;
#endif

        /// <summary>
        /// "initial size": If database is new, initialize with allocated space - support KB, MB, GB (default: 0 bytes)
        /// </summary>
        public long InitialSize { get; set; } = 0;

        /// <summary>
        /// "limit size": Max limit of datafile - support KB, MB, GB (default: long.MaxValue - no limit)
        /// </summary>
        public long LimitSize { get; set; } = long.MaxValue;

        /// <summary>
        /// "log": Debug messages from database - use `LiteDatabase.Log` (default: Logger.NONE)
        /// </summary>
        public byte Log { get; set; } = Logger.NONE;

        /// <summary>
        /// "utc": Returns date in UTC timezone from BSON deserialization (default: false - LocalTime)
        /// </summary>
        public bool UtcDate { get; set; } = false;

        /// <summary>
        /// "upgrade": Test if database is in old version and update if needed (default: false)
        /// </summary>
        public bool Upgrade { get; set; } = false;

#if HAVE_SYNC_OVER_ASYNC
        /// <summary>
        /// "async": Use "sync over async" to UWP apps access any directory (default: false)
        /// </summary>
        public bool Async { get; set; } = false;
#endif

#if HAVE_FLUSH_DISK
        /// <summary>
        /// "flush": If true, apply flush direct to disk, ignoring OS cache [FileStream.Flush(true)]
        /// </summary>
        public bool Flush { get; set; } = false;
#endif

        /// <summary>
        /// Initialize empty connection string
        /// </summary>
        public ConnectionString()
        {
        }

        /// <summary>
        /// Initialize connection string parsing string in "key1=value1;key2=value2;...." format or only "filename" as default (when no ; char found)
        /// </summary>
        public ConnectionString(string connectionString)
        {
            if (string.IsNullOrEmpty(connectionString)) throw new ArgumentNullException(nameof(connectionString));

            var values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);

            // create a dictionary from string name=value collection
            if (connectionString.Contains("="))
            {
                values.ParseKeyValue(connectionString);
            }
            else
            {
                values["filename"] = connectionString;
            }

            // setting values to properties
            this.Filename = values.GetValue("filename", this.Filename);
            this.Journal = values.GetValue("journal", this.Journal);
            this.Password = values.GetValue<string>("password", this.Password);
            this.CacheSize = values.GetValue(@"cache size", this.CacheSize);
            this.Timeout = values.GetValue("timeout", this.Timeout);
            this.Mode = values.GetValue("mode", this.Mode);
            this.InitialSize = values.GetFileSize(@"initial size", this.InitialSize);
            this.LimitSize = values.GetFileSize(@"limit size", this.LimitSize);
            this.Log = values.GetValue("log", this.Log);
            this.UtcDate = values.GetValue("utc", this.UtcDate);
            this.Upgrade = values.GetValue("upgrade", this.Upgrade);
#if HAVE_SYNC_OVER_ASYNC
            this.Async = values.GetValue("async", this.Async);
#endif
#if HAVE_FLUSH_DISK
            this.Flush = values.GetValue("flush", this.Flush);
#endif

        }
    }
}


text: <!DOCTYPE html>


text:
<!doctype html>

<meta charset="utf-8">

<title> Cut Display</title>

QI-GONG

Means: Life Energy Cultivation

The Air And Energy Breathing Technique

        	There is a lot of free energy circulating in the air and space around you. This useful energy is called Prana; it is as subtle
            as air, and it is constantly used by your energetic body. When you inhale, you naturally draw air and Prana into your nose.
            The air goes down into your lungs. The Prana takes another route. It travels along the inside of your nasal cavity and up
            inside the cranial vault. When the Prana reaches the top of your spinal column, it splits and travels down either side of
            your spine. As you inhale, the air and Prana naturally flow along the correct path without effort or concentration on your
            part. Unfortunately, many of us have obstructions that prevent Prana from flowing to its natural destination.

Breathing in, visualize the Prana flowing into your nasal cavity, and then flowing up into the inside of your cranial vault
as a 2-3" wide stream of white energy

From there it travels to the top of the inside of your cranial bone, to the back of your head, and then splitting to flow
down either side of your spinal column

At the tail bone (coccyx) it continues on to your perineum, (the tender spot between your anus and sexual organs) where it
condenses its flow and enters the base Chakra

Breathe From Your Belly

When you inhale, feel your breath come into your nose, down your throat and into your lungs and belly. Let your belly muscles expand to move your belly forward.

When you exhale, let your belly return to its original position and relax. Do your best to completely relax your chest and not use any strength to puff it out when you breathe. You should have very little or no sense of air going into your chest.

First, practice by focusing on expanding and relaxing your lower belly. Your lower belly extends from slightly above the top of your pubic hair to your navel. Breathe in such a way that the lower belly does not move from below the top of your pubic hair. Avoid straining or any feeling of pressure in your genitals.

When you can expand and relax your lower belly comfortably, turn your attention to moving the middle belly when you breathe, which for most people is more difficult. The middle belly extends from your navel to just before your diaphragm. Placing your hands on the lower, middle and upper parts of your belly as you breathe will give you clear feedback as to whether and how much your belly is moving.

Finally, concentrate on expanding and relaxing your upper belly—your diaphragm and solar plexus—just underneath your lowest ribs. Try to have your diaphragm move downward as you inhale and upward as you exhale. This will help push air into the back and top of your lungs, parts that seldom get exercised. Eventually, you will be able to move all three parts of your belly in unison.

Breathe Smoothly And Deeply

            As you breathe, make both your inhales and exhales smooth and full, without strain. When your exhale is full, your next inhale will naturally and smoothly arise by itself. Conversely, if your last exhale is shallow and not full, your next inhale will not come smoothly.
            You may have a tendency to hold your breath, gulp your inhale or even hyperventilate. Deep and smooth breathing enables you to take in and use more oxygen, better release carbon dioxide and calm your nerves. Over time, you take longer breaths, increasing the length of your inhale and exhale, without strain.

            To get the sense of how to breathe smoothly and deeply, practice breathing from a straw for a few minutes a day, in a smooth and steady fashion. It will help you tune in to your breathing habits, and, over time, help you overcome poor ones.
            Often lifetime habits of poor breathing can be overcome by practicing breathing with a straw for a few weeks.

Exhale Fully

            Exhaling fully will get rid of the carbon dioxide in your cells and lungs and decrease its buildup in your cells, which produces sluggishness and yawning, diminishes mental clarity and increases stress.
            Exhaling fully will also make it easier for you to breathe in sufficient oxygen and make it easier for your cells to procure it.

You can do this in one of three ways:

Exhaling A Little More Than You Inhale (ex. Inhale 4 seconds, Exhale 5 seconds)

Extremely Rapid Exhale (ex. 1 or 2 seconds forcibly)

Vary The Speed Of The Exhale (ex. Exhale 50|60% of your breath in first 2 seconds, then take 4 more seconds to exhale the rest)

Never Hold Your Breath

            Focus on not holding your breath between the end of an inhale/exhale and the beginning of the next inhale/exhale. Let one flow into the other in as relaxed a manner as you can. Holding your breath can cause emotional tension and jangle your nervous system.
            Breathe smoothly and evenly, without stop-and-start breaks or jerkiness. Involuntarily holding the breath both triggers and escalates stress.

Keep The Tip Of Your Tongue On The Roof Of Your Mouth

            As you breathe, keep the tip of your tongue touching the roof of your mouth. (If you make the sound "le," as pronounced in the word "let," your tongue will touch the correct spot just slightly behind your top front teeth.)
            Eventually, the muscles on the base of your tongue will stretch slightly and allow you to maintain this position comfortably, without effort. When your tongue touches the roof of your mouth, it continuously stimulates and balances all your body's acupuncture meridians.

            The twelve main acupuncture meridians of your body are all connected to points along the governing and conception vessels, which are two of acupuncture's eight extraordinary meridians.
            The points along these two special meridians interface with and influence all the acupuncture points and meridians within your body. These two vessels form the chi pathway that is called the "microcosmic orbit."
            That place just behind your upper front teeth on your hard palate is the acupuncture point where the governing and conception vessels meet. At this point, upward-flowing energy from yang meridians in the back of your body changes to downward-flowing energy in the yin meridians in the front of your body.

Only Breathe To 70% Of Your Capacity

            There is no gain in putting tension in your body by straining to take longer inhales and exhales. Because breath is such a primary human function, it is quite possible to negatively pattern yourself and lock tension into your nervous system by forcing your breath.
            If breath induced tension lodges in your nervous system, the tension and stress will far outweigh the benefits of breathing quietly, softly and deeply in a relaxed manner.
            By staying within 70 percent of your capacity, you will wean yourself from pushing yourself and gain the habit of relaxation.

How To Practice Breathing

            You can practice Longevity Breathing any time you remember to do so. The goal is to train the body to breathe this way twenty-four hours a day.


text:
define([
  'jquery',
  'underscore',
  'backbone',
  'app',
  'text!scripts/main/templates/classroom/invite.html',
  'scripts/common/views/modal'
  ], function($, _, Backbone, App, template, ModalConfirmView) {
    var InvitaionManger = Backbone.View.extend({
        courseId : null,
        emails_ : [],
        text : null,
        initialize : function(options) {
            this.$el.html (_.template(template)({username :  App.username}));
            this.on('view:readyView', this.readyView);
            this.on('view:confirm', this.invitePeople);
            this.on('view:blur', this.blur);
            this.on('view:keyUp', this.keyUp);
            this.courseId = options.courseId,
            this.on('view:submit', function() {return false;});
          var events =  {
                    'keyup #send_to_email' : 'keyUp',
                    'blur #send_to_email' : 'blur',
                    'submit form': function() {return false;}
                },
            modalConfirmView = new ModalConfirmView({
                    header : common.tr('invite students'),
                    ok :  common.tr('send invitations'),
                    dismiss : common.tr('Cancel'),
                    body   : this.$el.html(),
                    scope : this,
                    events : events
                });
        modalConfirmView.render ();
        this.modalConfirmView = modalConfirmView ;
    },
    /**
     *
     */
    bindEmails : function(event, $content){
        var emails = this.emails_,
            input =event.currentTarget,
            value =  input.value,
            jListContainer = $content.find ('#send_to_list_addresses:eq(0)'),
            context = this ;
        if (emails.indexOf(value) > -1)
            return;
        // #debug
        console.log (value);
        if (common.isEmail(value)) {
            var jParent = $(''),
                parent = jParent[0];
            $('' +
                value + '').appendTo(parent);
                jParent.appendTo(jListContainer);
            var close = $('' +
                '×').appendTo(parent).click(
                    function() {
                        jParent.remove();
                        context.emails_ =
                            common.popFromArray(emails, value);
                    }
                );
                context.emails_.push(value);
                input.value = '';
        }
        else {
            $(this).css({color: 'red'});
            var object = this;
            setTimeout(
                function() {
                    $(object).css({color: ''});
                },
                2000
            );
        }
     },
    keyUp : function (event, content){
        /**
         * @this {HTMLInputElement}
        */
        if ((event.keyCode == 13) || (event.keyCode == 32)) {
            this.bindEmails.call(this, event, content);
        };
        console.log (event.keyCode);
    },
    /**
     *
     */
    blur : function (event, content){
        this.bindEmails.call(this, event, content);
    },
    /**
     * Add excluded choice
     */
    invitePeople : function(event, content) {
        var length = this.emails_.length,
            emails = this.emails_,
            emailsString = '',
            text = $('textarea', content).val();
        if (length < 1)
            return;
        for (var i = 0; i < length; i++) {
            emailsString += emails[i] ;
            if (i < length - 1)
                emailsString += '#';
        }
        // hide the element
        common.Widget.overlay(content[0], {selector : '#glabal_modal_confirm_body' });
        $.post(
            App.students.url + '/invite/',
            $.extend(
                {list : emailsString, text: text, cid : this.courseId},
                { csrfmiddlewaretoken : __CONFIG__.csrf }
            ),
            $.proxy(this.successSubmit, this, content[0])
        );
    },
    /**
     * handles the success of alert
     * @param {JSON} data
     */
    successSubmit: function(content,  data) {
        common.Widget.unOverlay(content);
        this.close ();
    },
    /**
     * handles the success of alert
     * @param {JSON} data
     */
    close: function() {
        this.remove ();
        this.modalConfirmView.close ();
    },
  });
  return InvitaionManger ;
});


text:
package org.foi.nwtis.mdomladov.zadaca_1;

import static java.lang.Thread.sleep;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author mitz
 */
public class KorisnikSustavaTest {

    public KorisnikSustavaTest() {
    }

    @AfterClass
    public static void tearDownClass() {
    }

    @Before
    public void setUp() {
        try{
            Thread t = new Thread() {
                @Override
                public void run() {
                     String[] args = {"-konf NWTiS_mdomlad_zadaca_1.txt -load"};
                     ServerSustava.main(args);
                }
            };
            t.start();
        } catch(Exception ex){
          //We will kill thread
        }
    }

    /**
     * Test of main method, of class KorisnikSustava.
     */
    @Test
    public void testKorisnikSustavaMain() {
        System.out.println("test KorisnikSustava");
        String[] args = {"-admin -server localhost -port 8000 -u pero -p 123456 -pause"};

        try {
            sleep(3000);
        } catch (InterruptedException ex) {
            Logger.getLogger(KorisnikSustavaTest.class.getName()).log(Level.SEVERE, null, ex);
        }

        KorisnikSustava.main(args);
        assertTrue(ServerSustava.stanjeServera == ServerSustava.StanjeServera.PAUSED);
    }

}


text:
package org.springframework.cloud.skipper.shell.command.support;

/**
 * Encapsulates the credentials to the Skipper Server Target, such as {@link #username}
 * and {@link #password}.
 *
 * @author Gunnar Hillert
 * @since 1.0
 */
public class TargetCredentials {

	private final String username;

	private final String password;

	private final boolean usesAccessToken;

	public TargetCredentials(String username, String password) {
		this.username = username;
		this.password = password;
		this.usesAccessToken = false;
	}

	public TargetCredentials(boolean usesAccessToken) {
		super();
		this.username = null;
		this.password = null;
		this.usesAccessToken = usesAccessToken;
	}

	public String getUsername() {
		return username;
	}

	public String getPassword() {
		return password;
	}

	@Override
	public String toString() {
		if (this.usesAccessToken) {
			return "[Uses OAuth2 Access Token]";
		}
		else {
			return "Credentials [username='" + username + "', password='********']";
		}
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		TargetCredentials that = (TargetCredentials) o;

		if (usesAccessToken != that.usesAccessToken) {
			return false;
		}
		if (username != null ? !username.equals(that.username) : that.username != null) {
			return false;
		}
		return password != null ? password.equals(that.password) : that.password == null;
	}

	@Override
	public int hashCode() {
		int result = username != null ? username.hashCode() : 0;
		result = 31 * result + (password != null ? password.hashCode() : 0);
		result = 31 * result + (usesAccessToken ? 1 : 0);
		return result;
	}
}


text:
/**
* WebCLGLBuffer Object
* @class
* @constructor
* @property {Float} length
*/
WebCLGLBuffer = function(gl, type, offset, linear, mode) {
    "use strict";

    var _gl = gl;

    this.type = (type != undefined) ? type : 'FLOAT';
    this._supportFormat = _gl.FLOAT;

    this.offset = (offset != undefined) ? offset : 0;
    this.linear = (linear != undefined && linear == true) ? true : false;
    this.mode = (mode != undefined) ? mode : "SAMPLER"; // "SAMPLER", "ATTRIBUTE", "VERTEX_INDEX"

    this.textureData = null;
    this.textureDataTemp = null;
    this.vertexData0 = null;

    var _oldW = 0;

    if(this.mode == "SAMPLER") {
        this.textureData = _gl.createTexture();
        this.textureDataTemp = _gl.createTexture();
    }
    if(this.mode == "SAMPLER" || this.mode == "ATTRIBUTE" || this.mode == "VERTEX_INDEX") {
        this.vertexData0 = _gl.createBuffer();
    }

    /**
     * Write WebGLTexture buffer
     * @param {Array|Float32Array|Uint8Array|WebGLTexture|HTMLImageElement} array
     * @param {Bool} [flip=false]
     * @private
     */
    var writeWebGLTextureBuffer = (function(arr, flip) {
        var ps = (function(tex, flip) {
            if(flip == false || flip == undefined)
                _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, false);
            else
                _gl.pixelStorei(_gl.UNPACK_FLIP_Y_WEBGL, true);

            _gl.pixelStorei(_gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
            _gl.bindTexture(_gl.TEXTURE_2D, tex);
        }).bind(this);

        var writeTexNow = (function(arr) {
            if(arr instanceof HTMLImageElement)  {
                //texImage2D(target, level, internalformat, format, type, TexImageSource);
                if(this.type == 'FLOAT4') {
                    if(_oldW != this.W)
                        _gl.texImage2D(	_gl.TEXTURE_2D, 0, _gl.RGBA, _gl.RGBA, this._supportFormat, arr);
                    else
                        _gl.texSubImage2D(_gl.TEXTURE_2D, 0, 0, 0, this.W, this.H, _gl.RGBA, this._supportFormat, arr);
                }/* else if(this.type == 'INT4') {
                    _gl.texImage2D(_gl.TEXTURE_2D, 0, _gl.RGBA, _gl.RGBA, _gl.UNSIGNED_BYTE, arr);
                 }*/
            } else {
                //texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
                if(_oldW != this.W)
                    _gl.texImage2D(_gl.TEXTURE_2D, 0, _gl.RGBA, this.W, this.H, 0, _gl.RGBA, this._supportFormat, arr);
                else
                    _gl.texSubImage2D(_gl.TEXTURE_2D, 0, 0, 0, this.W, this.H, _gl.RGBA, this._supportFormat, arr);
            }
        }).bind(this);

        var tp = (function() {
            _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, _gl.NEAREST);
            _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, _gl.NEAREST);
            _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE);
            _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE);

            /*_gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_MAG_FILTER, _gl.LINEAR);
             _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_MIN_FILTER, _gl.LINEAR_MIPMAP_NEAREST);
             _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_WRAP_S, _gl.CLAMP_TO_EDGE);
             _gl.texParameteri(_gl.TEXTURE_2D, _gl.TEXTURE_WRAP_T, _gl.CLAMP_TO_EDGE);
             _gl.generateMipmap(_gl.TEXTURE_2D);*/
        }).bind(this);

        if(arr instanceof WebGLTexture) {
            this.textureData = arr;
            this.textureDataTemp = arr;
        } else {
            ps(this.textureData, flip);
            writeTexNow(arr);
            tp();

            ps(this.textureDataTemp, flip);
            writeTexNow(arr);
            tp();
        }

        _oldW = this.W;

        _gl.bindTexture(_gl.TEXTURE_2D, null);
    }).bind(this);

    /**
     * Write on buffer
     * @type Void
     * @param {Array|Float32Array|Uint8Array|WebGLTexture|HTMLImageElement} array
     * @param {Bool} [flip=false]
     * @param {Array<Float2>} [overrideDimensions=new Array(){Math.sqrt(value.length), Math.sqrt(value.length)}]
     */
    this.writeBuffer = function(arr, flip, overrideDimensions) {
        var prepareArr = (function(arr) {
            if(!(arr instanceof HTMLImageElement))  {
                this.W = Math.ceil(Math.sqrt(this.length));
                if(new WebCLGLUtils().isPowerOfTwo(this.W) == false)
                    this.W = new WebCLGLUtils().nextHighestPowerOfTwo(this.W);
                this.H = this.W;

                if(this.type == 'FLOAT4') {
                    arr = (arr instanceof Float32Array) ? arr : new Float32Array(arr);

                    var l = (this.W*this.H*4);
                    if(arr.length != l) {
                        var arrt = new Float32Array(l);
                        for(var n=0; n < l; n++) {
                            arrt[n] = (arr[n] != null) ? arr[n] : 0.0;
                        }
                        arr = arrt;
                    }
                } else if(this.type == 'FLOAT') {
                    var arrayTemp = new Float32Array(this.W*this.H*4);

                    for(var n = 0, f = this.W*this.H; n < f; n++) {
                        var idd = n*4;
                        arrayTemp[idd] = (arr[n] != null) ? arr[n] : 0.0;
                        arrayTemp[idd+1] = 0.0;
                        arrayTemp[idd+2] = 0.0;
                        arrayTemp[idd+3] = 0.0;
                    }
                    arr = arrayTemp;
                }
            }
            return arr;
        }).bind(this);

        if(overrideDimensions == undefined) {
            if(arr instanceof HTMLImageElement)
                this.length = (arr.width*arr.height);
            else
                this.length = ((this.type == "FLOAT4") ? arr.length/4 : arr.length);
        } else
            this.length = [overrideDimensions[0], overrideDimensions[1]];

        if(this.mode == "SAMPLER") {
            writeWebGLTextureBuffer(prepareArr(arr), flip);
        }
        if(this.mode == "SAMPLER" || this.mode == "ATTRIBUTE") {
            _gl.bindBuffer(_gl.ARRAY_BUFFER, this.vertexData0);
            _gl.bufferData(_gl.ARRAY_BUFFER, ((arr instanceof Float32Array) ? arr : new Float32Array(arr)), _gl.STATIC_DRAW);
        }
        if(this.mode == "VERTEX_INDEX") {
            _gl.bindBuffer(_gl.ELEMENT_ARRAY_BUFFER, this.vertexData0);
            _gl.bufferData(_gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(arr), _gl.STATIC_DRAW);
        }
    };

    /**
     * Remove this buffer
     */
    this.remove = function() {
        if(this.mode == "SAMPLER") {
            _gl.deleteTexture(this.textureData);
            _gl.deleteTexture(this.textureDataTemp);
        }
        if(this.mode == "SAMPLER" || this.mode == "ATTRIBUTE" || this.mode == "VERTEX_INDEX") {
            _gl.deleteBuffer(this.vertexData0);
        }
    };
};


text:
<?php
/**
* Load the javascript files using a dynamic include
*/
$data['js'] = Sys::$JS_Files;

if(@$tpl)
    $tpl->setContext($data);