text:
layout: page
title: "Carla Farsi"
comments: true
description: "blanks"
keywords: "Carla Farsi,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Arts and Sciences

**Classes taught**: MATH 1130, MATH 2300, MATH 2400, MATH 3001, MATH 3130, MATH 3140, MATH 3200, MATH 4001, MATH 4200, MATH 5905, MATH 6210, MATH 6220

#### MATH 1130: MATH FROM VISUAL ARTS

**Terms taught**: Spring 2007

**Instructor rating**: 5.29

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.13

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 1.78

**Standard deviation in workload** (raw): 0.0

#### MATH 2300: ANALYTIC GEOMETRY/CALC 2

**Terms taught**: Spring 2009, Spring 2009

**Instructor rating**: 5.27

**Standard deviation in instructor rating**: 0.27

**Average grade** (4.0 scale): 2.59

**Standard deviation in grades** (4.0 scale): 0.11

**Average workload** (raw): 3.55

**Standard deviation in workload** (raw): 0.01

#### MATH 2400: Calculus 3

**Terms taught**: Fall 2013, Fall 2013, Fall 2013, Fall 2013, Fall 2014, Fall 2014, Fall 2014, Fall 2014, Fall 2014, Fall 2014

**Instructor rating**: 4.56

**Standard deviation in instructor rating**: 0.76

**Average grade** (4.0 scale): 2.69

**Standard deviation in grades** (4.0 scale): 0.19

**Average workload** (raw): 3.63

**Standard deviation in workload** (raw): 0.46

#### MATH 3001: Analysis 1

**Terms taught**: Fall 2011, Fall 2011, Fall 2016

**Instructor rating**: 3.79

**Standard deviation in instructor rating**: 0.76

**Average grade** (4.0 scale): 2.89

**Standard deviation in grades** (4.0 scale): 0.33

**Average workload** (raw): 3.16

**Standard deviation in workload** (raw): 0.25

#### MATH 3130: Introduction to Linear Algebra for Non-Mathematics Majors

**Terms taught**: Spring 2008, Spring 2008, Spring 2014, Fall 2015, Fall 2016

**Instructor rating**: 4.71

**Standard deviation in instructor rating**: 0.33

**Average grade** (4.0 scale): 3.14

**Standard deviation in grades** (4.0 scale): 0.18

**Average workload** (raw): 2.4

**Standard deviation in workload** (raw): 0.2

#### MATH 3140: ABSTRACT ALGEBRA 1

**Terms taught**: Spring 2010

**Instructor rating**: 4.81

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 2.82

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 2.81

**Standard deviation in workload** (raw): 0.0

#### MATH 3200: INTRO/ABST MATH/TOPOLOGY

**Terms taught**: Spring 2007, Spring 2008

**Instructor rating**: 4.46

**Standard deviation in instructor rating**: 0.46

**Average grade** (4.0 scale): 2.79

**Standard deviation in grades** (4.0 scale): 0.39

**Average workload** (raw): 2.59

**Standard deviation in workload** (raw): 0.24

#### MATH 4001: Analysis II

**Terms taught**: Spring 2011

**Instructor rating**: 3.67

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.06

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 3.0

**Standard deviation in workload** (raw): 0.0

#### MATH 4200: Introduction to Topology

**Terms taught**: Fall 2015

**Instructor rating**: 5.0

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.67

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 3.0

**Standard deviation in workload** (raw): 0.0

#### MATH 5905: Mathematics Teacher Training

**Terms taught**: Fall 2010

**Instructor rating**: 0.0

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 4.0

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 0.0

**Standard deviation in workload** (raw): 0.0

#### MATH 6210: Introduction to Topology 1

**Terms taught**: Fall 2006, Fall 2009, Fall 2010, Fall 2013

**Instructor rating**: 3.89

**Standard deviation in instructor rating**: 0.9

**Average grade** (4.0 scale): 3.82

**Standard deviation in grades** (4.0 scale): 0.15

**Average workload** (raw): 3.27

**Standard deviation in workload** (raw): 0.55

#### MATH 6220: Introduction to Topology 2

**Terms taught**: Spring 2007, Spring 2016

**Instructor rating**: 3.75

**Standard deviation in instructor rating**: 0.58

**Average grade** (4.0 scale): 3.99

**Standard deviation in grades** (4.0 scale): 0.01

**Average workload** (raw): 2.33

**Standard deviation in workload** (raw): 0.33


text:
def append_attr(obj, attr, value):
    """
    Appends value to object attribute

    Attribute may be undefined

    For example:
        append_attr(obj, 'test', 1)
        append_attr(obj, 'test', 2)

        assert obj.test == [1, 2]
    """
    try:
        getattr(obj, attr).append(value)
    except AttributeError:
        setattr(obj, attr, [value])

redpajama_set_name: RedPajamaGithub


text:
class RepositoryPolicy
  attr_reader :user, :repository

  def initialize(user, repository)
    @user = user
    @repository = repository
  end

  def show?
    @user.admin? ||
      @repository.namespace.public? ||
      @repository.namespace.team.users.exists?(user.id)
  end

  class Scope
    attr_reader :user, :scope

    def initialize(user, scope)
      @user = user
      @scope = scope
    end

    def resolve
      if user.admin?
        @scope.all
      else
        # Show repositories only if the repository is public or
        # the repository belongs to the current_user
        @scope
          .joins(namespace: { team: :users })
          .where("namespaces.public = :namespace_public OR " \
                 "users.id = :user_id",
                  namespace_public: true, user_id: @user.id)
          .distinct
      end
    end
  end
end


text:
LearnOrgUpdated
===============

This project is to update the User interface of current learning management system of university of Moratuwa (https://lms.mrt.ac.lk/).

For a live demo of the design, please visit (http://prabhath.github.io/LearnOrgUpdated/)


text:
class InputManager
{
private:

	FontManager* m_pFmanager;
	CameraManager* m_pCmanager;
	CollisionManager* m_pCollmanager;

// 	std::list<CustomModel*>* m_lModels;
// 	D3DXVECTOR4* m_pForcePosition;

	bool m_bAltDown;

	bool m_bLeftButtonDown;
	bool m_bRightButtonDown;
	bool m_bMiddleButtonDown;
	bool m_bSideButton1Down;
	bool m_bSideButton2Down;
	int m_iMouseWheelDelta;
	int m_ixPos;
	int m_iyPos;

	bool m_bLRButtonHold;
	int m_ixPosPrevious;
	int m_iyPosPrevious;

	InputManager();

	InputManager(const InputManager &);

protected:

public:

	static InputManager* Instance();

	~InputManager();

	void Initialise(FontManager* Fmanager, CameraManager* CManager,
					CollisionManager* CollManager);

	void CatchKeyboardDown(UINT nChar, bool bKeyDown, bool bAltDown);

	void CatchMouse ( bool bLeftButtonDown, bool bRightButtonDown, bool bMiddleButtonDown,
					  bool bSideButton1Down, bool bSideButton2Down, int nMouseWheelDelta,
				      int xPos, int yPos );

	void MouseWheel ();
	void MouseButtons ();

	//Accessors

};

#endif


text:
include("bed3.jl")

for entry in open("data.bed", BED3)
    @show entry
end


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

<TITLE>
CvsTagEntry (Apache Ant API)
</TITLE>

<META NAME="date" CONTENT="2013-12-23">

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

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.tools.ant.taskdefs.cvslib

Class CvsTagEntry

java.lang.Object
  org.apache.tools.ant.taskdefs.cvslib.CvsTagEntry

public class CvsTagEntry
extends java.lang.Object

Holds the information of a line of rdiff

Constructor Summary

CvsTagEntry(java.lang.String filename)

          Creates a new CvsTagEntry

CvsTagEntry(java.lang.String filename,
            java.lang.String revision)

          Creates a new CvsTagEntry

CvsTagEntry(java.lang.String filename,
            java.lang.String revision,
            java.lang.String prevRevision)

          Creates a new CvsTagEntry

Method Summary

 java.lang.String
getFile()

          Gets the filename for this CvsTagEntry

 java.lang.String
getPreviousRevision()

          Gets the previous revision for this CvsTagEntry

 java.lang.String
getRevision()

          Gets the revision for this CvsTagEntry

 java.lang.String
toString()

          Gets a String containing filename and difference from previous version

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

CvsTagEntry

public CvsTagEntry(java.lang.String filename)

Creates a new CvsTagEntry

Parameters:
filename - the filename to add

CvsTagEntry

public CvsTagEntry(java.lang.String filename,
                   java.lang.String revision)

Creates a new CvsTagEntry

Parameters:
filename - the filename to add
revision - the revision

CvsTagEntry

public CvsTagEntry(java.lang.String filename,
                   java.lang.String revision,
                   java.lang.String prevRevision)

Creates a new CvsTagEntry

Parameters:
filename - the filename to add
revision - the revision
prevRevision - the previous revision

Method Detail

getFile

public java.lang.String getFile()

Gets the filename for this CvsTagEntry

Returns:
the filename

getRevision

public java.lang.String getRevision()

Gets the revision for this CvsTagEntry

Returns:
the revision

getPreviousRevision

public java.lang.String getPreviousRevision()

Gets the previous revision for this CvsTagEntry

Returns:
the previous revision

toString

public java.lang.String toString()

Gets a String containing filename and difference from previous version

Overrides:
toString in class java.lang.Object

Returns:
a string representation of this CVSTagEntry

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DefaultView
 *
 * @author frank
 */
class DefaultView {
    //put your code here
}


text:
package org.apache.hyracks.storage.common;

import org.apache.commons.io.FileUtils;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.io.FileReference;
import org.apache.hyracks.api.io.IODeviceHandle;
import org.apache.hyracks.control.nc.io.IOManager;
import org.junit.*;

import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class IOManagerPathTest {
    @Test
    public void testPrefixNames() throws HyracksDataException {
        IODeviceHandle shorter = new IODeviceHandle(new File("/tmp/tst/1"), "storage");
        IODeviceHandle longer = new IODeviceHandle(new File("/tmp/tst/11"), "storage");
        IOManager ioManager = new IOManager(Arrays.asList(new IODeviceHandle[] { shorter, longer }));
        FileReference f = ioManager.resolveAbsolutePath("/tmp/tst/11/storage/Foo_idx_foo/my_btree");
        Assert.assertEquals("/tmp/tst/11/storage/Foo_idx_foo/my_btree", f.getAbsolutePath());
    }

    @Test(expected = HyracksDataException.class)
    public void testDuplicates() throws HyracksDataException {
        IODeviceHandle first = new IODeviceHandle(new File("/tmp/tst/1"), "storage");
        IODeviceHandle second = new IODeviceHandle(new File("/tmp/tst/1"), "storage");
        IOManager ioManager = new IOManager(Arrays.asList(new IODeviceHandle[] { first, second }));
    }

    @After
    @Before
    public void cleanup() throws IOException {
        FileUtils.deleteDirectory(new File("/tmp/tst/"));
    }

}


text:
import { Component, OnInit, ViewEncapsulation } from '@angular/core';

@Component({
  selector: 'app-about',
  templateUrl: './about.component.html',
  styleUrls: ['./about.component.scss'],
  encapsulation: ViewEncapsulation.None
})
export class AboutComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}


text:
namespace Plugin.XamJam.BugHound.Abstractions
{
    /// <summary>
    /// Resolves all platform-dependent functionality required by the <see cref="Plugin.XamJam.BugHound"/>
    /// </summary>
    public interface IBugHoundHelper
    {
        /// <summary>
        /// Returns a unique identifier for the current thread, or null if the platform doesn't allow access to a unique thread-based identifier.
        /// </summary>
        string ThreadName { get; }
    }
}


text: <!DOCTYPE html>


text:
package rzaharov.servlets.cop.musiccourt.dao.postgres;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rzaharov.servlets.cop.musiccourt.dao.AddressDao;
import rzaharov.servlets.cop.musiccourt.models.Address;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class AddressDatabaseDao implements AddressDao {

    private static final Logger Log = LoggerFactory.getLogger(AddressDatabaseDao.class);

    /**
     * Connection of database.
     */
    private final FactoryDAO factoryDAO = FactoryDAO.Singleton.INSTANCE.getInstance();

    private final Connection connection = factoryDAO.getConn();

    @Override
    public List<Address> getAll() {
        List<Address> addresses = new ArrayList<>();
        Address address;
        try(PreparedStatement select = connection.prepareStatement(AddressSql.GET.QUERY)) {
            try(ResultSet rs = select.executeQuery()) {
                while (rs.next()) {
                    address = new Address();
                    address.setId(rs.getInt("id"));
                    address.setCity(rs.getString("city"));
                    address.setDistrict(rs.getString("district"));
                    address.setStreet(rs.getString("street"));
                    address.setHouse(rs.getString("house"));
                    address.setApartment(rs.getInt("apartment"));
                    addresses.add(address);
                }
            }
        } catch (SQLException e) {
            Log.error(e.getMessage(), e);
        }
        return addresses;
    }

    @Override
    public Address getById(Integer id) {
        Address address = new Address();
        try(PreparedStatement select = connection.prepareStatement(AddressSql.GetById.QUERY)) {
            select.setInt(1, id);
            try(ResultSet rs = select.executeQuery()) {
                if (rs.next()) {
                    //  address = new Address();
                    address.setId(rs.getInt("id"));
                    address.setCity(rs.getString("city"));
                    address.setDistrict(rs.getString("district"));
                    address.setStreet(rs.getString("street"));
                    address.setHouse(rs.getString("house"));
                    address.setApartment(rs.getInt("apartment"));
                }
            }
        } catch (SQLException e) {
            Log.error(e.getMessage(), e);
        }
        return address;
    }

    @Override
    public void add(Address model) {
        try(PreparedStatement add = connection.prepareStatement(AddressSql.ADD.QUERY)) {
            add.setString(1, model.getCity());
            add.setString(2, model.getDistrict());
            add.setString(3, model.getStreet());
            add.setString(4, model.getHouse());
            add.setInt(5, model.getApartment());
            add.executeUpdate();
        }catch (SQLException e) {
            Log.error(e.getMessage(), e);
        }
    }

    @Override
    public void update(Address model) {
        try(PreparedStatement update = connection.prepareStatement(AddressSql.UPDATE.QUERY)) {
            update.setString(1, model.getCity());
            update.setString(2, model.getDistrict());
            update.setString(3, model.getStreet());
            update.setString(4, model.getHouse());
            update.setInt(5, model.getApartment());
            update.setInt(6, model.getId());
            update.executeUpdate();
        } catch (SQLException e) {
            Log.error(e.getMessage(), e);
        }
    }

    @Override
    public void delete(Integer id) {
        try(PreparedStatement delete = connection.prepareStatement(AddressSql.DELETE.QUERY)) {
            delete.setInt(1, id);
            delete.executeUpdate();
        } catch (SQLException e) {
            Log.error(e.getMessage(), e);
        }

    }

    @Override
    public Address getUser(String address) {
        return null;
    }

    enum AddressSql {
        GetById("SELECT * FROM address WHERE id = ?"),
        GET("SELECT * FROM address"),
        DELETE("DELETE FROM address WHERE id = ?"),
        ADD("INSERT INTO address(city, district, street, house, apartment) VALUES(?, ?, ?, ?, ?)"),
        UPDATE("UPDATE address SET city = ?, district = ?, street = ?, house = ?, apartment = ? WHERE id = ?");

        String QUERY;

        AddressSql(String QUERY) {
            this.QUERY = QUERY;
        }
    }
}


text:
<?php

/**
* class for admin screens
*/
class FlxMapAdmin {

	protected $plugin;

	/**
	* @param FlxMapPlugin $plugin
	*/
	public function __construct($plugin) {
		$this->plugin = $plugin;

		// add action hook for adding plugin meta links
		add_filter('plugin_row_meta', array($this, 'addPluginDetailsLinks'), 10, 2);
	}

	/**
	* action hook for adding plugin details links
	*/
	public function addPluginDetailsLinks($links, $file) {
		// add settings link
		if ($file == FLXMAP_PLUGIN_NAME) {
			$links[] = '' . __('Get help') . '';
			$links[] = '' . __('Rating') . '';
			$links[] = '' . __('Donate') . '';
		}

		return $links;
	}

}


text:
export * from './DragSourceMonitorImpl.js';
export * from './DropTargetMonitorImpl.js';
export * from './registration.js';
export * from './SourceConnector.js';
export * from './TargetConnector.js';

//# sourceMappingURL=index.js.map


text: document.write("This text comes from an Local file script.");


text:
import pytest

from flex.exceptions import (
    ValidationError,
)
from flex.error_messages import (
    MESSAGES,
)
from flex.constants import (
    ARRAY,
    EMPTY,
)

from tests.utils import (
    generate_validator_from_schema,
    assert_error_message_equal,
    assert_message_in_errors,
)

#
# minLength validation tests
#
@pytest.mark.parametrize(
    'letters',
    (
        [],
        ['a', 'b', 'c'],
        ['a', 'b', 'c', 'd'],
    ),
)
def test_unique_items_with_unique_array(letters):
    schema = {
        'type': ARRAY,
        'uniqueItems': True,
    }
    validator = generate_validator_from_schema(schema)

    validator(letters)

@pytest.mark.parametrize(
    'letters',
    (
        ['a', 'b', 'a'],
        [1, 2, 3, 1],
        [True, True],
    ),
)
def test_unique_items_with_dupes_in_array(letters):
    schema = {
        'type': ARRAY,
        'uniqueItems': True,
    }
    validator = generate_validator_from_schema(schema)

    with pytest.raises(ValidationError) as err:
        validator(letters)

    assert_message_in_errors(
        MESSAGES['unique_items']['invalid'],
        err.value.detail,
        'uniqueItems',
    )

def test_unique_items_is_noop_when_not_required_and_not_present():
    schema = {
        'type': ARRAY,
        'uniqueItems': True,
    }
    validator = generate_validator_from_schema(schema)

    validator(EMPTY)


text:
define([
    'knockout'
], function (ko) {
    'use strict';

    // Define the formula version model.
    function FormulaVersion(raw, parent) {
        // Save the raw in order to get things like URLs
        this.raw = raw;

        // Save the parent VM
        this.parent = parent;

        // Editable fields
        this.formula = ko.observable();
        this.version = ko.observable();

        this.formulaHtmlId = ko.observable();

        this._process(raw);
    }

    FormulaVersion.constructor = FormulaVersion;

    FormulaVersion.prototype._process = function (raw) {
        this.formula(raw.formula);
        this.version(raw.version);
        // This is necessary because html ids can't contain slashes, colons, or periods.
        // We use the formula URI as an html ID at points.
        this.formulaHtmlId(raw.formula.replace(/\//g, '-').replace(/:/g, '-').replace(/\./g, '-').replace(/@/g, '-'));
    };

    return FormulaVersion;
});


text:
from PipelineTools.packages import metadata
import maya.cmds as cmds
import os
#print os.getpid()
import pymel.core as pm
class FacialRig(metadata.MetaRig):
    '''
    Example custom mRig class inheriting from MetaRig
    '''
    def __init__(self,*args,**kws):
        super(FacialRig, self).__init__(*args,**kws)
        self.lockState=False

    def __bindData__(self):
        '''
        bind our default attrs to this node
        '''
        self.addAttr('RigType','FacialRig', l=True)
        self.addAttr('CharacterName','')
        self.addAttr('BuildBy','{} {}'.format(os.environ.get('COMPUTERNAME'), os.environ.get('USERNAME')), l=True)
        self.addAttr('Branch',os.environ.get('USERDOMAIN'), l=True)
        self.addAttr('BuildDate',pm.date(), l=True)
        #self.addAttr('Models','-'*50, l=True)
        self.addAttr('FaceGp','')
        self.addAttr('EyeGp','')
        self.addAttr('FaceDeformGp','')
        self.addAttr('FacialTargetPath','')
        #self.addAttr('Bones','-'*100, l=True)
        self.addAttr('HeadBone', 'CH_Head')
        self.addAttr('FacialBoneGp','')
        self.addAttr('EyeBoneGp','')
        self.addAttr('BlendshapeCtl','')
        self.addAttr('FacialCtl','')
        self.addAttr('EyeCtl','')
        self.addAttr('TongueCtl','')
        self.addAttr('JawCtl','')
#r9Meta.registerMClassInheritanceMapping()
if __name__ == 'main':
    try:
        networks = pm.ls(type=pm.nt.Network)
        networks.extend(pm.selected())
        for networknode in networks:
            pm.lockNode(networknode, lock=False)
            pm.delete(networknode)
    except:
        pass
    myRigmetaGp = pm.nt.Transform(name='facialGP')
    myRigmeta = FacialRig(myRigmetaGp.name())
    myRigmeta.CharacterName='KG'
    #myRigmeta.addRigCtrl(pm.selected()[0],'new')
    #pm.select(myRigmeta)
    print myRigmeta
    #pm.delete(myRigmeta)


text:
<title>
Marines detain Vietnam resister
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

Marines detain Vietnam resister

By Eric Ruder | January 6, 2006 | Page 2

THE MARINES have decided to prosecute yet another war resister. But this case has a twist: It's 40 years old. Jerry Texiero refused orders to deploy to an illegal and unjust war half a world away--not in Iraq or Afghanistan, but in Vietnam.

Jerry refused combat in July 1965. For more than 40 years, he ran a classic car business in Florida. As the result of a larceny conviction stemming from the corrupt dealings of a business partner, a unit charged with apprehending Marines who don't turn up for duty recently matched his current whereabouts to his military file.

Local police arrested him August 14, 2005, and in December, he was transferred to a Marine brig at Fort LeJeune, N.C. The Marines are now contemplating whether to court-martial Jerry for desertion, which carries a possible five-year prison term.

"Why are scarce Marine resources being squandered on the prosecution of a senior citizen whose only 'crime' is refusing to fight a war that today is universally discredited?" asked Citizen Soldier legal director Tod Ensign in a letter to Camp LeJeune base commander Major Gen. Robert Dickinson. "Or is the Corps warning Marines in Iraq that they will pursue deserters to the grave?"

In the coming weeks, Vietnam veterans and others plan to demonstrate in support of Jerry on or near Camp LeJeune.

Send letters of protest on Jerry's behalf to Base Commander Major General Robert Dickinson, or Col. Wunder, Staff Judge Advocate, PSC Box 2004, Camp LeJeune, NC 28542, or call at 910-451-1113.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
Purpose:

* Validate the localStorage functionality is available after reboot the system

This usecase covers following methods:

* webapp localStorage setItem and getItem.


text:
  {{ entry.who }}
  created service
  {{ entry.organizationId }}
  /
  {{ entry.entityId }}

    version
    {{ entry.entityVersion }}

  .


text:
local make_suite = select(1, ...)

local test = make_suite("simple-test-1")
assert(type(test) == "table", "suite object 'test' is table'")

assert(pcall(function() test "a" (false) end) == false)

assert(suite_tests_results.to_call['1'] == true)
test '1' (function()
  if suite_tests_results.next_i ~= 1 then
    suite_tests_results.next_i = false
  else
    suite_tests_results.next_i = 2
  end
  suite_tests_results.to_call['1'] = nil
end)
assert(suite_tests_results.to_call['1'] == true)


text:
#include <iostream>
#include "testcpp.h"

/**
 * binary search by timestamp: excercices KafkaConsumer's seek() API.
 */

static std::string topic;
static const int partition      = 0;
static int64_t golden_timestamp = -1;
static int64_t golden_offset    = -1;

/**
 * @brief Seek to offset and consume that message.
 *
 * Asserts on failure.
 */
static RdKafka::Message *get_msg(RdKafka::KafkaConsumer *c,
                                 int64_t offset,
                                 bool use_seek) {
  RdKafka::TopicPartition *next =
      RdKafka::TopicPartition::create(topic, partition, offset);
  RdKafka::ErrorCode err;

  /* Since seek() can only be used to change the currently consumed
   * offset we need to start consuming the first time we run this
   * loop by calling assign() */

  test_timing_t t_seek;
  TIMING_START(&t_seek, "seek");
  if (!use_seek) {
    std::vector<RdKafka::TopicPartition *> parts;
    parts.push_back(next);
    err = c->assign(parts);
    if (err)
      Test::Fail("assign() failed: " + RdKafka::err2str(err));
  } else {
    err = c->seek(*next, tmout_multip(5000));
    if (err)
      Test::Fail("seek() failed: " + RdKafka::err2str(err));
  }
  TIMING_STOP(&t_seek);
  delete next;

  test_timing_t t_consume;
  TIMING_START(&t_consume, "consume");

  RdKafka::Message *msg = c->consume(tmout_multip(5000));
  if (!msg)
    Test::Fail("consume() returned NULL");
  TIMING_STOP(&t_consume);

  if (msg->err())
    Test::Fail("consume() returned error: " + msg->errstr());

  if (msg->offset() != offset)
    Test::Fail(tostr() << "seek()ed to offset " << offset
                       << " but consume() returned offset " << msg->offset());

  return msg;
}

class MyDeliveryReportCb : public RdKafka::DeliveryReportCb {
 public:
  void dr_cb(RdKafka::Message &msg) {
    if (msg.err())
      Test::Fail("Delivery failed: " + msg.errstr());

    if (!msg.msg_opaque())
      return;

    RdKafka::MessageTimestamp ts = msg.timestamp();
    if (ts.type != RdKafka::MessageTimestamp::MSG_TIMESTAMP_CREATE_TIME)
      Test::Fail(tostr() << "Dr msg timestamp type wrong: " << ts.type);

    golden_timestamp = ts.timestamp;
    golden_offset    = msg.offset();
  }
};

static void do_test_bsearch(void) {
  RdKafka::Conf *conf, *tconf;
  int msgcnt = 1000;
  int64_t timestamp;
  std::string errstr;
  RdKafka::ErrorCode err;
  MyDeliveryReportCb my_dr;

  topic = Test::mk_topic_name("0059-bsearch", 1);
  Test::conf_init(&conf, &tconf, 0);
  Test::conf_set(tconf, "acks", "all");
  Test::conf_set(conf, "api.version.request", "true");
  conf->set("dr_cb", &my_dr, errstr);
  conf->set("default_topic_conf", tconf, errstr);

  RdKafka::Producer *p = RdKafka::Producer::create(conf, errstr);
  if (!p)
    Test::Fail("Failed to create Producer: " + errstr);
  delete conf;
  delete tconf;

  timestamp = 1000;
  for (int i = 0; i < msgcnt; i++) {
    err = p->produce(topic, partition, RdKafka::Producer::RK_MSG_COPY,
                     (void *)topic.c_str(), topic.size(), NULL, 0, timestamp,
                     i == 357 ? (void *)1 /*golden*/ : NULL);
    if (err != RdKafka::ERR_NO_ERROR)
      Test::Fail("Produce failed: " + RdKafka::err2str(err));
    timestamp += 100 + (timestamp % 9);
  }

  if (p->flush(tmout_multip(5000)) != 0)
    Test::Fail("Not all messages flushed");

  Test::Say(tostr() << "Produced " << msgcnt << " messages, "
                    << "golden message with timestamp " << golden_timestamp
                    << " at offset " << golden_offset << "\n");

  delete p;

  /*
   * Now find the golden message using bsearch
   */

  /* Create consumer */
  Test::conf_init(&conf, NULL, 10);
  Test::conf_set(conf, "group.id", topic);
  Test::conf_set(conf, "api.version.request", "true");
  Test::conf_set(conf, "fetch.wait.max.ms", "1");
  Test::conf_set(conf, "fetch.error.backoff.ms", "1");
  Test::conf_set(conf, "queued.min.messages", "1");
  Test::conf_set(conf, "enable.auto.commit", "false");

  RdKafka::KafkaConsumer *c = RdKafka::KafkaConsumer::create(conf, errstr);
  if (!c)
    Test::Fail("Failed to create KafkaConsumer: " + errstr);
  delete conf;

  Test::Say("Find initial middle offset\n");
  int64_t low, high;
  test_timing_t t_qr;
  TIMING_START(&t_qr, "query_watermark_offsets");
  err = c->query_watermark_offsets(topic, partition, &low, &high,
                                   tmout_multip(5000));
  TIMING_STOP(&t_qr);
  if (err)
    Test::Fail("query_watermark_offsets failed: " + RdKafka::err2str(err));

  /* Divide and conquer */
  test_timing_t t_bsearch;
  TIMING_START(&t_bsearch, "actual bsearch");
  int itcnt = 0;
  do {
    int64_t mid;

    mid = low + ((high - low) / 2);

    Test::Say(1, tostr() << "Get message at mid point of " << low << ".."
                         << high << " -> " << mid << "\n");

    RdKafka::Message *msg = get_msg(c, mid,
                                    /* use assign() on first iteration,
                                     * then seek() */
                                    itcnt > 0);

    RdKafka::MessageTimestamp ts = msg->timestamp();
    if (ts.type != RdKafka::MessageTimestamp::MSG_TIMESTAMP_CREATE_TIME)
      Test::Fail(tostr() << "Expected CreateTime timestamp, not " << ts.type
                         << " at offset " << msg->offset());

    Test::Say(1, tostr() << "Message at offset " << msg->offset()
                         << " with timestamp " << ts.timestamp << "\n");

    if (ts.timestamp == golden_timestamp) {
      Test::Say(1, tostr() << "Found golden timestamp " << ts.timestamp
                           << " at offset " << msg->offset() << " in "
                           << itcnt + 1 << " iterations\n");
      delete msg;
      break;
    }

    if (low == high) {
      Test::Fail(tostr() << "Search exhausted at offset " << msg->offset()
                         << " with timestamp " << ts.timestamp
                         << " without finding golden timestamp "
                         << golden_timestamp << " at offset " << golden_offset);

    } else if (ts.timestamp < golden_timestamp)
      low = msg->offset() + 1;
    else if (ts.timestamp > golden_timestamp)
      high = msg->offset() - 1;

    delete msg;
    itcnt++;
  } while (true);
  TIMING_STOP(&t_bsearch);

  c->close();

  delete c;
}

extern "C" {
int main_0059_bsearch(int argc, char **argv) {
  do_test_bsearch();
  return 0;
}
}


text:
import Ember from 'ember';
import layout from '../templates/components/affinity-engine-stage-layer';
import { AnimatableMixin } from 'affinity-engine';
import { DirectableComponentMixin, layerName } from 'affinity-engine-stage';
import multiton from 'ember-multiton-service';

const {
  Component,
  assign,
  computed,
  get,
  getProperties,
  isPresent
} = Ember;

const { reads } = computed;

export default Component.extend(AnimatableMixin, DirectableComponentMixin, {
  layout,

  hook: 'affinity_engine_stage_layer',
  mediaElementSelector: '.ae-stage',

  classNames: ['ae-stage-layer'],
  classNameBindings: ['layerName'],

  config: multiton('affinity-engine/config', 'engineId'),

  directions: computed(() => Ember.A()),
  name: '',

  direction: reads('directionObserver.value'),
  directionConfiguration: reads('direction.configuration.attrs'),
  transitions: reads('configuration.transitions'),
  animator: reads('configuration.animator'),
  zIndex: reads('configuration.zIndex'),

  _baseConfiguration: computed('config', 'name', {
    get() {
      const name = get(this, 'name');

      return name ? get(this, `config.attrs.component.stage.layer.${name}.attrs`) || get(this, `config.attrs.default.component.stage.layer.${name}.attrs`) || {} : {};
    }
  }),

  configuration: computed('directionConfiguration', '_baseConfiguration', {
    get() {
      const baseConfiguration = get(this, '_baseConfiguration');
      const directionConfiguration =  get(this, 'directionConfiguration') || {};

      return assign({}, baseConfiguration, directionConfiguration);
    }
  }),

  directionObserver: computed('layerDirectionsMap', 'name', {
    get() {
      const { layerDirectionsMap, name } = getProperties(this, 'layerDirectionsMap', 'name');
      const safeLayerName = name.replace(/\./g, '/');

      return Ember.Object.extend({
        value: computed(`layerDirectionsMap.${safeLayerName}`, {
          get() {
            return isPresent(safeLayerName) ?
              get(this, `layerDirectionsMap.${safeLayerName}`) :
              {};
          }
        })
      }).create({ layerDirectionsMap });
    }
  }),

  layerDirections: computed('directions.@each.layer', 'name', {
    get() {
      return get(this, 'directions').filter((direction) => {
        return get(direction, 'layer') === get(this, 'name');
      });
    }
  }).readOnly(),

  layerName: computed('name', {
    get() {
      return layerName(get(this, 'name'));
    }
  }).readOnly(),

  childLayers: computed('directions.@each.layer', {
    get() {
      const name = get(this, 'name');
      const parentName = name ? `${name}.` : '';

      const childLayerDirections = get(this, 'directions').filter((direction) => {
        return get(direction, 'layer').replace(name, '').length > 1;
      });

      const childLayerNames = Ember.A(childLayerDirections.map((direction) => {
        return get(direction, 'layer');
      })).uniq();

      return childLayerNames.reduce((layers, layer) => {
        const subName = layer.replace(parentName, '').split('.')[0];
        const childLayerName = name ? `${name}.${subName}` : subName;
        const childLayer = childLayerDirections.filter((direction) => {
          return get(direction, 'layer') === layer;
        });

        if (layers[childLayerName]) {
          layers[childLayerName] = layers[childLayerName].concat(childLayer);
        } else {
          layers[childLayerName] = childLayer;
        }

        return layers;
      }, {});
    }
  }).readOnly(),

  didCompleteQueue() {
    this.resolve();
  }
});


text:
package info.fingo.urlopia.reports.evidence;

import info.fingo.urlopia.api.v2.presence.PresenceConfirmationService;
import info.fingo.urlopia.history.HistoryLogService;
import info.fingo.urlopia.holidays.HolidayService;
import info.fingo.urlopia.reports.ParamResolver;
import info.fingo.urlopia.reports.evidence.params.resolver.*;
import info.fingo.urlopia.request.RequestService;
import info.fingo.urlopia.user.User;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
@RequiredArgsConstructor
public class EvidenceReportModelFactory {
    private static final String START_TIME_PREFIX = "startTime";
    private static final String REPORT_DATE_PREFIX = "reportDate";
    private static final String END_TIME_PREFIX = "endTime";
    private static final String USER_METADATA_PREFIX = "user";
    private static final String VACATION_LEAVE_PREFIX = "vacationLeave";
    private static final String DAY_STATUS_PREFIX = "day";
    private static final String USED_TIME_PREFIX = "usedTime";

    private final PresenceConfirmationService presenceConfirmationService;
    private final HolidayService holidayService;
    private final RequestService requestService;
    private final HistoryLogService historyLogService;

    public EvidenceReportModel generateModelForFileName(User user,
                                                        int year){
        var model = new HashMap<String,String>();
        var resolvers = getFileNameResolvers(user,year);
        resolvers.forEach((prefix, resolver) -> putAllWithPrefix(resolver.resolve(), model, prefix));
        return new EvidenceReportModel(model);
    }

    public EvidenceReportModel create(User user,
                                      int year) {
        var resolvers = getResolvers(user,year);
        Map<String, String> model = new HashMap<>();
        resolvers.forEach((prefix, resolver) -> putAllWithPrefix(resolver.resolve(), model, prefix));
        addPresenceConfirmationResolveToModel(user,year,model);
        return new EvidenceReportModel(model);
    }

    private void putAllWithPrefix(Map<String, String> from,
                                  Map<String, String> to,
                                  String prefix) {
        from.forEach((key, value) -> to.put(prefix + "." + key, value));
    }

    private Map<String, ParamResolver> getResolvers(User user,
                              int year){
        Map<String, ParamResolver> resolvers = new HashMap<>();
        resolvers.put(REPORT_DATE_PREFIX, new EvidenceReportDateParamsResolver(year));
        resolvers.put(USER_METADATA_PREFIX, new EvidenceReportUserParamsResolver(user));
        resolvers.put(USED_TIME_PREFIX, new EvidenceReportUsedTimeDuringTheYearParamsResolver(user, year,
                                                                                historyLogService,
                                                                                requestService));
        resolvers.put(VACATION_LEAVE_PREFIX, new EvidenceReportVacationLeaveParamsResolver(user, year,
                                                                                historyLogService));
        resolvers.put(DAY_STATUS_PREFIX, new EvidenceReportDayParamsResolver(user, year, holidayService,
                requestService, presenceConfirmationService, historyLogService));
        return resolvers;

    }

    private Map<String, ParamResolver> getFileNameResolvers(User user,
                                                            int year){
        Map<String, ParamResolver> resolvers = new HashMap<>();
        resolvers.put(USER_METADATA_PREFIX, new EvidenceReportUserParamsResolver(user));
        resolvers.put(REPORT_DATE_PREFIX, new EvidenceReportDateParamsResolver(year));
        return resolvers;
    }

    private void addPresenceConfirmationResolveToModel(User user,
                                                       int year,
                                                       Map<String,String> model){
        var presenceConfirmationResolver = new EvidenceReportPresenceConfirmationTimeParamResolver(user,year,
                presenceConfirmationService,holidayService);
        var presenceConfirmationResolve = presenceConfirmationResolver.resolve();
        putAllWithPrefix(presenceConfirmationResolve.startTimeResolve(),model,START_TIME_PREFIX);
        putAllWithPrefix(presenceConfirmationResolve.endTimeResolve(),model,END_TIME_PREFIX);
    }
}


text:
/*
 *  Dukweb glue appended to Emscripten-generated dukweb.js code.
 *
 *  Sets up a 'Duktape' object accessible from web page Javascript.  'Duktape'
 *  provides various glue functions, the most important being Duktape.eval()
 *  which evaluates a string inside Duktape and returns the result.  Currently
 *  Duktape.eval() is limited to JSON compatible results (other values are
 *  coerced in whichever way).
 *
 *  https://github.com/kripken/emscripten/wiki/Interacting-with-code
 */

var Duktape = {};

/*
 *  Utilities
 */

Duktape.log = function() {};
if (typeof console === 'object' && typeof console.log === 'function') {
    Duktape.log = function() {
        console.log.apply(console, arguments);
    }
} else if (typeof print === 'function') {
    Duktape.log = function() {
        print.apply(this, arguments);
    }
}
Duktape.log('Duktape (dukweb) initializing');

Duktape.logOwnProperties = function() {
    Duktape.log('Own properties of Duktape:');
    Object.getOwnPropertyNames(Duktape).forEach(function (k) {
        var v = Duktape[k];
        if (typeof v === 'function') { v = '[omitted]'; }
        Duktape.log('    ' + k + ' = (' + typeof Duktape[k] + ') ' + String(v));
    });
}

Duktape.hexVal = function(x, ndigits) {
    var nybbles = '0123456789abcdef';
    var i;
    var res = ''
    for (i = 0; i < ndigits; i++) {
        res += nybbles[x & 0x0f];
        x >>>= 4;
    }
    return res;
};

Duktape.escapeTable = (function() {
    var i, n;
    var res = {};

    for (i = 0; i < 256; i++) {
        if (i < 0x20 || i > 0x7e || i == 0x27 /*apos*/ || i == 0x22 /*quot*/ ||
            i == 0x5c /*backslash*/) {
            res[String.fromCharCode(i)] = '\\u' + Duktape.hexVal(i, 4);
        } else {
            res[String.fromCharCode(i)] = String.fromCharCode(i);
        }
    }
    return res;
})();

// Probably unnecessary, JSON.stringify() escapes strings nicely.
Duktape.escapeString = function(x) {
    var res = [];
    var i, n = x.length;
    var c;
    var esc = Duktape.escapeTable;
    for (i = 0; i < n; i++) {
        c = x.charAt(i);
        res.push(esc[c] || '\\u' + Duktape.hexVal(String.charCodeAt(i)));
    }
    return res.join('');
}

/*
 *  Raw C function bindings.
 *
 *  The dukweb_eval() binding is a very raw binding which provides an
 *  interface to eval one string, and to get one string output (ToString
 *  coerced result or error).
 */

// FIXME: not sure about the memory use here (leaks?), check
Duktape.dukweb_is_open = Module.cwrap('dukweb_is_open', 'number', [ ]);
Duktape.dukweb_open = Module.cwrap('dukweb_open', 'void', [ ]);
Duktape.dukweb_close = Module.cwrap('dukweb_close', 'void', [ ]);
Duktape.dukweb_eval = Module.cwrap('dukweb_eval', 'string', [ 'string' ]);
Duktape.logOwnProperties();

/*
 *  Duktape.eval: run code inside Duktape, encode output value using JSON.
 */

// FIXME: errors should probably be promoted to work better
Duktape.eval = function(code) {
    // Code escape into a Javascript string
    var escapedString = JSON.stringify(String(code));
    //var escapedString = '"' + Duktape.escapeString(code) + '"';

    // The raw eval result is first JSON encoded to make it a string.
    // For unsupported types JSON.stringify() might return e.g. 'undefined'.
    var res = Duktape.dukweb_eval(
        '(function() { var t; try { ' +
        't = eval(' + escapedString + ');' +
        'return JSON.stringify(t) || "\\"undefined\\"";' +
        '} catch (e) { ' +
        'return "ERROR: " + String(e); ' +
        '} })();'
    );
    Duktape.log('raw eval result: ' + typeof(res) + ': ' + String(res));
    return JSON.parse(res);
};

/*
 *  Handlers for Duktape's print() and alert() replacements.
 */

// Expect web page to override this, e.g. to append to some buffer.
Duktape.printHandler = function(msg) {
    log(msg);
}

// Expect web page to override this, e.g. to use browser alert().
Duktape.alertHandler = function(msg) {
    log(msg);
}

/*
 *  Initialize Duktape heap automatically (not closed for now), and use
 *  Duktape.eval() to pull in some convenience properties like Duktape
 *  version.
 */

Duktape.dukweb_open();
Duktape.version = Duktape.eval('Duktape.version');
Duktape.env = Duktape.eval('Duktape.env');
Duktape.logOwnProperties();

/*
 *  Initialize a 'Dukweb' instance inside Duktape for interfacing with the
 *  browser side.
 */

// Minimal console object.
var DUKWEB_CONSOLE_INIT =
    'Dukweb.console = (function () {\n' +
    '    var useProxyWrapper = true;\n' +
    '    var c = {};\n' +
    '    function console_log(args, errName) {\n' +
    '        var msg = Array.prototype.map.call(args, function (v) {\n' +
    '            if (typeof v === "object" && v !== null) { return console.format(v); };\n' +
    '            return v;\n' +
    '        }).join(" ");\n' +
    '        if (errName) {\n' +
    '            var err = new Error(msg);\n' +
    '            err.name = "Trace";\n' +
    '            Dukweb.print(err.stack || err);\n' +
    '        } else {\n' +
    '            Dukweb.print(msg);\n' +
    '        }\n' +
    '    };\n' +
    '    c.format = function format(v) { try { return Duktape.enc("jx", v); } catch (e) { return String(v); } };\n' +
    '    c.assert = function assert(v) {\n' +
    '        if (arguments[0]) { return; }\n' +
    '        console_log(arguments.length > 1 ? Array.prototype.slice.call(arguments, 1) : [ "false == true" ], "AssertionError");\n' +
    '    };\n'+
    '    c.log = function log() { console_log(arguments, null); };\n' +
    '    c.debug = function debug() { console_log(arguments, null); };\n' +
    '    c.trace = function trace() { console_log(arguments, "Trace"); };\n' +
    '    c.info = function info() { console_log(arguments, null); };\n' +
    '    c.warn = function warn() { console_log(arguments, null); };\n' +
    '    c.error = function error() { console_log(arguments, "Error"); };\n' +
    '    c.exception = function exception() { console_log(arguments, "Error"); };\n' +
    '    c.dir = function dir() { console_log(arguments, null); };\n' +
    '    if (typeof Proxy === "function" && useProxyWrapper) {\n' +
    '        var orig = c;\n' +
    '        var dummy = function () {};\n' +
    '        c = new Proxy(orig, {\n' +
    '            get: function (targ, key, recv) {\n' +
    '                var v = targ[key];\n' +
    '                return typeof v === "function" ? v : dummy;\n' +
    '            }\n' +
    '        });\n' +
    '    }\n' +
    '    return c;\n' +
    '})();';

Duktape.eval('Dukweb = {};');
Duktape.eval('Dukweb.userAgent = ' + (JSON.stringify(navigator.userAgent.toString()) || '"unknown"') + ';');
Duktape.eval('Dukweb.emscripten_run_script = this.emscripten_run_script; delete this.emscripten_run_script;');
Duktape.eval('Dukweb.eval = Dukweb.emscripten_run_script;')  // FIXME: better binding
Duktape.eval('Dukweb.print = function() { Dukweb.eval("Duktape.printHandler(" + JSON.stringify(Array.prototype.join.call(arguments, " ")) + ")") };');
Duktape.eval('Dukweb.alert = function() { Dukweb.eval("Duktape.alertHandler(" + JSON.stringify(Array.prototype.join.call(arguments, " ")) + ")") };');
Duktape.eval(DUKWEB_CONSOLE_INIT);
Duktape.eval('print = Dukweb.print;');
Duktape.eval('alert = Dukweb.print;');  // intentionally bound to print()
Duktape.eval('console = Dukweb.console;');

Duktape.initSuccess = !!Duktape.dukweb_is_open();
//console.log('=== ' + Duktape.eval('Duktape.enc("jx", { env: Duktape.env, version: Duktape.version })') + ' ===');


text:
<?php
/**
 * Contains EWSType_MailboxData.
 */

/**
 * Represents an individual mailbox user and options for the type of data to be
 * returned about the mailbox user.
 *
 * @package php-ews\Types
 */
class EWSType_MailboxData extends EWSType
{
    /**
     * Represents the type of attendee identified in the Email
     * (EmailAddressType) element.
     *
     * This is used in requests for meeting suggestions.
     *
     * @since Exchange 2007
     *
     * @var EWSType_MeetingAttendeeType
     */
    public $AttendeeType;

    /**
     * Represents the mailbox user for a GetUserAvailability query.
     *
     * @since Exchange 2007
     *
     * @var EWSType_EmailAddressType
     */
    public $Email;

    /**
     * Specifies whether to return suggested times for calendar times that
     * conflict among the attendees.
     *
     * @since Exchange 2007
     *
     * @var boolean
     */
    public $ExcludeConflicts;
}


text:
title: Ottawa 2
date: 2015-09-09
images: []
props: []
---
Just like [last night's concert]({{ site.baseurl }}{% post_url 2015-09-08-ottawa-1 %}), RBB and SB were missing. Given the concert was in the same venue, and fandom speculation is that the usual stage area for the bears has had to be cut to adapt the smaller stage, this makes sense!

Hopefully we'll see the bears for the Boston concert!


text:
#ifndef cmLoadCacheCommand_h
#define cmLoadCacheCommand_h

#include "cmCommand.h"

/** \class cmLoadCacheCommand
 * \brief load a cache file
 *
 * cmLoadCacheCommand loads the non internal values of a cache file
 */
class cmLoadCacheCommand : public cmCommand
{
public:
  /**
   * This is a virtual constructor for the command.
   */
  virtual cmCommand* Clone()
    {
    return new cmLoadCacheCommand;
    }

  /**
   * This is called when the command is first encountered in
   * the CMakeLists.txt file.
   */
  virtual bool InitialPass(std::vector<std::string> const& args,
                           cmExecutionStatus &status);

  /**
   * The name of the command as specified in CMakeList.txt.
   */
  virtual const char* GetName() { return "load_cache";}

  /**
   * Succinct documentation.
   */
  virtual const char* GetTerseDocumentation()
    {
    return "Load in the values from another project's CMake cache.";
    }

  /**
   * More documentation.
   */
  virtual const char* GetFullDocumentation()
    {
    return
      "  load_cache(pathToCacheFile READ_WITH_PREFIX\n"
      "             prefix entry1...)\n"
      "Read the cache and store the requested entries in variables with "
      "their name prefixed with the given prefix.  "
      "This only reads the values, and does not create entries in the local "
      "project's cache.\n"
      "  load_cache(pathToCacheFile [EXCLUDE entry1...]\n"
      "             [INCLUDE_INTERNALS entry1...])\n"
      "Load in the values from another cache and store them in the local "
      "project's cache as internal entries.  This is useful for a project "
      "that depends on another project built in a different tree.  "
      "EXCLUDE option can be used to provide a list of entries to be "
      "excluded.  "
      "INCLUDE_INTERNALS can be used to provide a list of internal entries "
      "to be included.  Normally, no internal entries are brought in.  Use "
      "of this form of the command is strongly discouraged, but it is "
      "provided for backward compatibility.";
    }

  cmTypeMacro(cmLoadCacheCommand, cmCommand);
protected:

  std::set<cmStdString> VariablesToRead;
  std::string Prefix;

  bool ReadWithPrefix(std::vector<std::string> const& args);
  void CheckLine(const char* line);
  bool ParseEntry(const char* entry, std::string& var, std::string& value);
};

#endif


text:
#include "webrtc/modules/audio_coding/neteq4/accelerate.h"

#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"

namespace webrtc {

Accelerate::ReturnCodes Accelerate::Process(
    const int16_t* input,
    int input_length,
    AudioMultiVector<int16_t>* output,
    int16_t* length_change_samples) {
  // Input length must be (almost) 30 ms.
  static const int k15ms = 120;  // 15 ms = 120 samples at 8 kHz sample rate.
  if (num_channels_ == 0 ||
      input_length / num_channels_ < (2 * k15ms - 1) * fs_mult_) {
    // Length of input data too short to do accelerate. Simply move all data
    // from input to output.
    output->PushBackInterleaved(input, input_length);
    return kError;
  }
  return TimeStretch::Process(input, input_length, output,
                              length_change_samples);
}

void Accelerate::SetParametersForPassiveSpeech(int /*len*/,
                                               int16_t* best_correlation,
                                               int* /*peak_index*/) const {
  // When the signal does not contain any active speech, the correlation does
  // not matter. Simply set it to zero.
  *best_correlation = 0;
}

Accelerate::ReturnCodes Accelerate::CheckCriteriaAndStretch(
    const int16_t* input, int input_length, size_t peak_index,
    int16_t best_correlation, bool active_speech,
    AudioMultiVector<int16_t>* output) const {
  // Check for strong correlation or passive speech.
  if ((best_correlation > kCorrelationThreshold) || !active_speech) {
    // Do accelerate operation by overlap add.

    // Pre-calculate common multiplication with |fs_mult_|.
    // 120 corresponds to 15 ms.
    size_t fs_mult_120 = fs_mult_ * 120;

    assert(fs_mult_120 >= peak_index);  // Should be handled in Process().
    // Copy first part; 0 to 15 ms.
    output->PushBackInterleaved(input, fs_mult_120 * num_channels_);
    // Copy the |peak_index| starting at 15 ms to |temp_vector|.
    AudioMultiVector<int16_t> temp_vector(num_channels_);
    temp_vector.PushBackInterleaved(&input[fs_mult_120 * num_channels_],
                                    peak_index * num_channels_);
    // Cross-fade |temp_vector| onto the end of |output|.
    output->CrossFade(temp_vector, peak_index);
    // Copy the last unmodified part, 15 ms + pitch period until the end.
    output->PushBackInterleaved(
        &input[(fs_mult_120 + peak_index) * num_channels_],
        input_length - (fs_mult_120 + peak_index) * num_channels_);

    if (active_speech) {
      return kSuccess;
    } else {
      return kSuccessLowEnergy;
    }
  } else {
    // Accelerate not allowed. Simply move all data from decoded to outData.
    output->PushBackInterleaved(input, input_length);
    return kNoStretch;
  }
}

}  // namespace webrtc


text:
import {of} from 'rxjs';
import {AppService} from './app.service';
import {App, ApplicationType} from '../model/app.model';
import {GET_APP_VERSIONS} from '../../tests/data/app';

describe('shared/api/app.service.ts', () => {
  let mockHttp;
  let appService;
  let jsonData = {};
  beforeEach(() => {
    mockHttp = {
      delete: jasmine.createSpy('delete'),
      get: jasmine.createSpy('get'),
      post: jasmine.createSpy('post'),
      put: jasmine.createSpy('put')
    };
    jsonData = {};
    appService = new AppService(mockHttp);
  });

  it('unregisterApps', () => {
    mockHttp.delete.and.returnValue(of(jsonData));
    appService.unregisterApps([App.parse({name: 'foo', type: 'source'}), App.parse({name: 'bar', type: 'processor'})]);
    let httpUri = mockHttp.delete.calls.argsFor(0)[0];
    expect(httpUri).toEqual('/apps/source/foo');
    httpUri = mockHttp.delete.calls.argsFor(1)[0];
    expect(httpUri).toEqual('/apps/processor/bar');
  });

  it('getApp', () => {
    mockHttp.get.and.returnValue(of(jsonData));
    appService.getApp('foo', 'processor' as any as ApplicationType);
    const httpUri = mockHttp.get.calls.mostRecent().args[0];
    const headerArgs = mockHttp.get.calls.mostRecent().args[1].headers;
    expect(httpUri).toEqual('/apps/processor/foo');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
  });

  it('getApp with version', () => {
    mockHttp.get.and.returnValue(of(jsonData));
    appService.getApp('foo', 'processor' as any as ApplicationType, '1.0.0');
    const httpUri = mockHttp.get.calls.mostRecent().args[0];
    const headerArgs = mockHttp.get.calls.mostRecent().args[1].headers;
    expect(httpUri).toEqual('/apps/processor/foo/1.0.0');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
  });

  it('importUri', () => {
    mockHttp.post.and.returnValue(of(true));
    appService.importUri('https://uri.foo.bar', true);
    const httpUri = mockHttp.post.calls.mostRecent().args[0];
    const headerArgs = mockHttp.post.calls.mostRecent().args[2].headers;
    const httpParams = mockHttp.post.calls.mostRecent().args[2].params;
    expect(httpUri).toEqual('/apps');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
    expect(httpParams.get('uri')).toEqual('https://uri.foo.bar');
    expect(httpParams.get('force')).toEqual('true');
  });

  it('unregisterApp', () => {
    mockHttp.delete.and.returnValue(of(jsonData));
    appService.unregisterApp(App.parse({name: 'foo', type: 'source'}));
    const httpUri = mockHttp.delete.calls.mostRecent().args[0];
    const headerArgs = mockHttp.delete.calls.mostRecent().args[1].headers;
    expect(httpUri).toEqual('/apps/source/foo');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
  });

  it('unregisterApp with version', () => {
    mockHttp.delete.and.returnValue(of(jsonData));
    appService.unregisterApp(App.parse({name: 'foo', type: 'source', version: '1.0.0'}));
    const httpUri = mockHttp.delete.calls.mostRecent().args[0];
    const headerArgs = mockHttp.delete.calls.mostRecent().args[1].headers;
    expect(httpUri).toEqual('/apps/source/foo/1.0.0');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
  });

  it('importProps', () => {
    mockHttp.post.and.returnValue(of(true));
    appService.importProps('foo', true);
    const httpUri = mockHttp.post.calls.mostRecent().args[0];
    const headerArgs = mockHttp.post.calls.mostRecent().args[2].headers;
    const httpParams = mockHttp.post.calls.mostRecent().args[2].params;
    expect(httpUri).toEqual('/apps');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
    expect(httpParams.get('apps')).toEqual('foo');
    expect(httpParams.get('force')).toEqual('true');
  });

  it('registerApp', () => {
    mockHttp.post.and.returnValue(of(true));
    appService.registerProp({
      name: 'foo',
      uri: 'https://uri.foo.bar',
      metaDataUri: 'https://metaDataUri.foo.bar',
      type: ApplicationType.processor,
      force: true
    });
    const httpUri = mockHttp.post.calls.mostRecent().args[0];
    const headerArgs = mockHttp.post.calls.mostRecent().args[2].headers;
    const httpParams = mockHttp.post.calls.mostRecent().args[2].params;
    expect(httpUri).toEqual('/apps/processor/foo');
    expect(headerArgs.get('Content-Type')).toEqual('application/json');
    expect(headerArgs.get('Accept')).toEqual('application/json');
    expect(httpParams.get('uri')).toEqual('https://uri.foo.bar');
    expect(httpParams.get('metadata-uri')).toEqual('https://metaDataUri.foo.bar');
    expect(httpParams.get('force')).toEqual('true');
  });

  it('registerProps', () => {
    mockHttp.post.and.returnValue(of(true));
    const props = [
      {
        name: 'foo',
        uri: 'https://uri.foo',
        metaDataUri: 'https://metaDataUri.foo',
        type: ApplicationType.processor,
        force: true
      },
      {
        name: 'bar',
        uri: 'https://uri.bar',
        metaDataUri: 'https://metaDataUri.bar',
        type: ApplicationType.sink,
        force: false
      }
    ];
    appService.registerProps(props);
    const httpUri1 = mockHttp.post.calls.argsFor(0)[0];
    const headerArgs1 = mockHttp.post.calls.argsFor(0)[2].headers;
    const httpParams1 = mockHttp.post.calls.argsFor(0)[2].params;
    const httpUri2 = mockHttp.post.calls.argsFor(1)[0];
    const headerArgs2 = mockHttp.post.calls.argsFor(1)[2].headers;
    const httpParams2 = mockHttp.post.calls.argsFor(1)[2].params;
    expect(httpUri1).toEqual('/apps/processor/foo');
    expect(headerArgs1.get('Content-Type')).toEqual('application/json');
    expect(headerArgs1.get('Accept')).toEqual('application/json');
    expect(httpParams1.get('uri')).toEqual('https://uri.foo');
    expect(httpParams1.get('metadata-uri')).toEqual('https://metaDataUri.foo');
    expect(httpParams1.get('force')).toEqual('true');
    expect(httpUri2).toEqual('/apps/sink/bar');
    expect(headerArgs2.get('Content-Type')).toEqual('application/json');
    expect(headerArgs2.get('Accept')).toEqual('application/json');
    expect(httpParams2.get('uri')).toEqual('https://uri.bar');
    expect(httpParams2.get('metadata-uri')).toEqual('https://metaDataUri.bar');
    expect(httpParams2.get('force')).toEqual('false');
    expect(mockHttp.post).toHaveBeenCalledTimes(2);
  });

  it('defaultVersion', () => {
    mockHttp.put.and.returnValue(of(jsonData));
    appService.defaultVersion(App.parse({name: 'foo', type: 'source', version: '1.0.0'}));
    const httpUri1 = mockHttp.put.calls.mostRecent().args[0];
    expect(httpUri1).toEqual('/apps/source/foo/1.0.0');
  });

  it('getApps', () => {
    mockHttp.get.and.returnValue(of(jsonData));
    appService.getApps(0, 20, 'bar', 'processor' as any as ApplicationType, 'name', 'DESC');
    const httpUri = mockHttp.get.calls.mostRecent().args[0];
    const httpParams = mockHttp.get.calls.mostRecent().args[1].params;
    expect(httpParams.get('sort')).toEqual('name,DESC');
    expect(httpParams.get('search')).toEqual('bar');
    expect(httpParams.get('type')).toEqual('processor');
    expect(httpParams.get('page')).toEqual('0');
    expect(httpParams.get('size')).toEqual('20');
    expect(httpUri).toEqual('/apps');
  });

  it('getAppVersions', async done => {
    mockHttp.get.and.returnValue(of(GET_APP_VERSIONS));
    await appService.getAppVersions('aggregator', 'processor' as any as ApplicationType).subscribe();
    const httpUri = mockHttp.get.calls.mostRecent().args[0];
    const httpParams = mockHttp.get.calls.mostRecent().args[1].params;
    expect(httpParams.get('search')).toEqual('aggregator');
    expect(httpParams.get('type')).toEqual('processor');
    expect(httpParams.get('page')).toEqual('0');
    expect(httpParams.get('size')).toEqual('10000');
    expect(httpUri).toEqual('/apps');
    done();
  });
});


text:
function init(){
	var arr_btnLink = document.getElementsByClassName("btnLink");
	buttonLink(arr_btnLink);

	//variables de control de imagenes
	window.imgBox.boxSize = 190; //Ancho de caja caja: .image-box.width = 190px
	window.imgBox.margin = 5; //separacion htal
	window.imgBox.col = ""; //num columnas en el grid
	window.imgBox.box_name = ".image_box";

	/*recolocamos las imagenes con el plugin BLOCKSIT*/
	recolocarImagenes(window.imgBox);

	//añadir archivos
	document.getElementById("files").addEventListener("change", addFiles, false);

	document.getElementById("dropFiles").addEventListener("dragover", resetEvent, false);
	document.getElementById("dropFiles").addEventListener("dragleave", resetEvent, false);
	document.getElementById("dropFiles").addEventListener("drop", addFiles, false);
}

var addFiles = function(e_files){
	resetEvent(e_files);

	var arr_files = e_files.target.files || e_files.dataTransfer.files;
	for (var i = 0, len = arr_files.length; i < len; i++)
		//The problem is you're running the loop now but the callbacks you are setting are getting run later (when the events fire). By the time they run, the loop is over and remains at whatever the last value was. So it will always show "file2" in your case for the name.
		//The solution is to put the file name inside a closure with the rest
		setupReader(arr_files[i]);
};

var setupReader = function(file){
		var dl_files = getPropFiles(file);

		var reader = new FileReader(); //debemos crear un lector por cada archivo que leamos
		reader.onload = function(event){
			displayInfo(event, dl_files); //se ejecutara cuando lea un archivo
		};

		if( file.type.match(/image.*/i) )
			reader.readAsDataURL(file); //leemos el contenido de FILE cono una url
		else reader.readAsText(file); //leemos el contenido como texto
};

var resetEvent = function(any_event){
	any_event.stopPropagation();
	any_event.preventDefault();
	var classEvent = any_event.target.classList;
	if( any_event.type !== "dragleave" )
		classEvent.add("classDragover");
	else
		classEvent.remove("classDragover");
};

var displayInfo = function(e_read, dl_files){
	var contenedor = document.getElementById("grid_images");
	var lectura = e_read.target.result;
	// en general, si lo que se lee del archivo NO contiene espacios, se trata de una URL
	if( lectura.indexOf(" ") < 1){ //lectura de la url de una imagen
		var article = document.createElement("article");
		article.classList.add("image_box");

		var imagen = document.createElement("img");
		imagen.src = lectura;

		var listFiles = document.createElement("dl");
		listFiles.classList.add("meta");
		listFiles.innerHTML += dl_files;

		article.appendChild(imagen);
		article.appendChild(listFiles);
		contenedor.appendChild(article);
	}else //lectura de un archivo de texto
		window.alert("Solo se permite lectura de imagenes");

	recolocarImagenes(window.imgBox);
};

var getPropFiles = function(file){
	var fileName = file.name;
	var fileSize = file.size;
	var fileDate = file.lastModifiedDate.toLocaleDateString();

	var html = "";
	html += "
"+fileName+"
";
	html += "
"+fileSize+" bytes
";
	html += "
"+fileDate+", last modify
";

	return html;
};

var recolocarImagenes = function(imgBox){
	//adaptamos el ancho de la caja al numero de columnas
	var winWidth = $("#contenedor-ppal").width();
	imgBox.col = Math.floor( (winWidth / (imgBox.boxSize + imgBox.margin * 2)));
	var currentWidth = imgBox.col * (imgBox.boxSize + (imgBox.margin * 2));
	$('#grid_images').width(currentWidth);
	$('#addPhotos').width(currentWidth);

	$("#grid_images").BlocksIt({
		numOfCol: imgBox.col,
		offsetX: imgBox.margin,
		offsetY: imgBox.margin,
		blockElement: imgBox.box_name
	});
};

var buttonLink = function(arr_btnLink){
	for (var i = 0, len = arr_btnLink.length; i < len; i++) {
		arr_btnLink[i].addEventListener("click", function(e_click){
			window.location.href = e_click.target.dataset.url;
		}, false);
	}
};

//variables de control de imagenes
window.imgBox = {};
//recolocamos las imagenes al cambiar el tamaño de la ventana del navegador
window.onresize = function(){
	recolocarImagenes(window.imgBox);
};
window.onload = init();


text:
package com.facebook.buck.features.project.intellij.model;

import com.facebook.buck.core.util.immutables.BuckStyleValueWithBuilder;
import com.facebook.buck.features.project.intellij.lang.android.AndroidManifestParser;
import com.facebook.buck.features.project.intellij.lang.android.AndroidProjectType;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Ordering;
import java.io.File;
import java.nio.file.Path;
import java.util.Optional;
import org.immutables.value.Value;

/**
 * The information necessary to add the Android facet to the module. This essentially means the Java
 * code in the given module is written against the Android SDK.
 */
@BuckStyleValueWithBuilder
public abstract class IjModuleAndroidFacet {
  /** @return set of paths to all AndroidManifest.xml files. */
  public abstract ImmutableSet<Path> getManifestPaths();

  /** @return paths to resources (usually stuff under the res/ folder). */
  public abstract ImmutableSet<Path> getResourcePaths();

  /** @return paths to assets (usually stuff under the assets/ folder). */
  public abstract ImmutableSet<Path> getAssetPaths();

  /** @return paths to the proguard configuration. */
  public abstract Optional<Path> getProguardConfigPath();

  /**
   * @return whether or not this is an Android Library. IntelliJ identifies libraries using a
   *     is_android_library_project setting in the module iml to allow other modules which depend on
   *     it to inherit assets, resources, etc.
   */
  public boolean isAndroidLibrary() {
    return getAndroidProjectType() == AndroidProjectType.LIBRARY;
  }

  public abstract AndroidProjectType getAndroidProjectType();

  /**
   * @return The package that the R file should be located in. This is used by android_resources
   *     targets to specify the package their resources should referenced via.
   */
  public abstract Optional<String> getPackageName();

  public abstract boolean autogenerateSources();

  /** @return The minimum Android SDK version supported. */
  @Value.Lazy
  public Optional<String> getMinSdkVersion() {
    Ordering<String> byIntegerValue = Ordering.natural().onResultOf(Integer::valueOf);
    return getMinSdkVersions().stream().filter(IjModuleAndroidFacet::isInteger).min(byIntegerValue);
  }

  private static boolean isInteger(String s) {
    try {
      Integer.valueOf(s);
      return true;
    } catch (NumberFormatException e) {
      return false;
    }
  }

  /** @return either the package name from facet or package name from the first manifest */
  @Value.Lazy
  public Optional<String> discoverPackageName(AndroidManifestParser androidManifestParser) {
    Optional<String> packageName = getPackageName();
    if (packageName.isPresent()) {
      return packageName;
    } else {
      return getPackageFromFirstManifest(androidManifestParser);
    }
  }

  public Optional<Path> getFirstManifestPath() {
    ImmutableSet<Path> androidManifestPaths = getManifestPaths();
    if (androidManifestPaths.isEmpty()) {
      return Optional.empty();
    } else {
      return Optional.of(androidManifestPaths.iterator().next());
    }
  }

  private Optional<String> getPackageFromFirstManifest(
      AndroidManifestParser androidManifestParser) {
    Optional<Path> firstManifest = getFirstManifestPath();
    if (firstManifest.isPresent()) {
      return androidManifestParser.parsePackage(firstManifest.get());
    } else {
      return Optional.empty();
    }
  }

  public abstract ImmutableSet<String> getMinSdkVersions();

  public abstract Path getGeneratedSourcePath();

  public abstract ImmutableSet<String> getPermissions();

  /**
   * AndroidManifest.xml can be generated when package name is known. Also, it's not generated when
   * there is exactly one manifest from targets (this manifest will be used in IntelliJ project).
   */
  @Value.Lazy
  public boolean hasValidAndroidManifest() {
    ImmutableSet<Path> androidManifestPaths = getManifestPaths();
    Optional<String> packageName = getPackageName();

    // This is guaranteed during target parsing and creation
    Preconditions.checkState(packageName.isPresent() || !androidManifestPaths.isEmpty());

    return androidManifestPaths.size() == 1
        || (!packageName.isPresent() && androidManifestPaths.size() > 1);
  }

  @Value.Lazy
  public Path getAndroidManifestPath() {
    Path androidManifestPath;
    if (hasValidAndroidManifest()) {
      Optional<String> packageName = getPackageName();
      Preconditions.checkState(packageName.isPresent());
      androidManifestPath =
          getGeneratedSourcePath()
              .resolve(packageName.get().replace('.', File.separatorChar))
              .resolve("AndroidManifest.xml");

    } else {
      androidManifestPath = getManifestPaths().iterator().next();
    }
    return androidManifestPath;
  }

  public static Builder builder() {
    return new Builder();
  }

  public static class Builder extends ImmutableIjModuleAndroidFacet.Builder {}
}


text:
require File.dirname(__FILE__) + '/active_record.rb'
ActiveRecord::Schema.define do
  self.verbose = false

  create_table(:voynich_data_keys) do |t|
    t.string :name
    t.string :cmk_id
    t.text :ciphertext
  end

  create_table(:voynich_values) do |t|
    t.integer :data_key_id
    t.string :uuid
    t.text :ciphertext
  end

  create_table(:voynich_active_model_targets) do |t|
    t.string :uuid
    t.integer :voynich_secret_value_id
    t.integer :voynich_auth_secret_value_id
  end
end


text:
#ifndef _DEPENDENCY_H_
#define _DEPENDENCY_H_

//
//
// EFI_DEP_BEFORE       - If present, it must be the first and only opcode
// EFI_DEP_AFTER        - If present, it must be the first and only opcode
// EFI_DEP_SOR          - If present, it must be the first opcode
// EFI_DEP_REPLACE_TRUE - Used to dynamically patch the dependency expression
//                        to save time.  A EFI_DEP_PUSH is evaluated one an
//                        replaced with EFI_DEP_REPLACE_TRUE
//
#define EFI_DEP_BEFORE        0x00
#define EFI_DEP_AFTER         0x01
#define EFI_DEP_PUSH          0x02
#define EFI_DEP_AND           0x03
#define EFI_DEP_OR            0x04
#define EFI_DEP_NOT           0x05
#define EFI_DEP_TRUE          0x06
#define EFI_DEP_FALSE         0x07
#define EFI_DEP_END           0x08
#define EFI_DEP_SOR           0x09
#define EFI_DEP_REPLACE_TRUE  0xff

//
// Define the initial size of the dependency expression evaluation stack
//
#define DEPEX_STACK_SIZE_INCREMENT  0x1000

#endif


text:
"use strict";

var Storable = require('./storable').Storable;
var und = require('underscore');

exports.Model = Storable.extend({
  initializer: function(attributes, options) {

    // For maintaining state in storage.
    this._destroyed = false;
    this.attributes = {};
    this._changes = {};

    // Copy the defaults into the attributes
    und.each(this.defaults, function(value, attribute) {
      this.attributes[attribute] = this.defaults[attribute];
    }, this);

    // If any attributes are specified, copy them over
    if (attributes) {
      und.each(attributes, function(value, attribute) {
        this.attributes[attribute] = attributes[attribute];
      }, this);
    }

    this.parent(Storable).constructor(options);
  },

  properties: {

    keyAttribute: "id",
    defaults: {},

    get: function(attribute) {
      return this.attributes[attribute];
    },

    set: function(values, attrs) {
      if (!this.isDestroyed() && values) {
        var updatedAttributes = [];
        und.each(values, function(value, attribute) {
          if(this.attributes[attribute] !== value && attribute !== this.keyAttribute) {
            if (!attrs || attrs.indexOf(attribute) !== -1) {
              this.attributes[attribute] = value;
              updatedAttributes.push(attribute);
            }
          }
        }, this);

        if (updatedAttributes.length) {
          this.trigger("change", updatedAttributes);
        }
      }
    },

    has : function(attribute) {
      return this.attributes[attribute] !== undefined;
    },

    clear : function(attribute) {
      var values = {};
      values[attribute] = undefined;
      this.set(values);
    },

    test : function(attributes) {
      return Object.keys(attributes).every(function(attribute) {
        return (this.get(attribute) === attributes[attribute]);
      }, this);
    },

    xport : function(attributes) {
      attributes = attributes || und.keys(this.attributes);
      var values = {};
      und.each(attributes, function(key) {
        values[key] = this.attributes[key];
      }, this);
      return values;
    },

    resume : function() {
      this.parent(Storable).resume();
      if(und.size(this._changes)) {
        this.trigger("change", this._changes);
        this._changes = {};
      }
    },

    trigger : function(eventName, eventData) {
      this.parent(Storable).trigger(eventName, eventData);

      // For the change events, if we've been given a set of attributes,
      // blow out that dictionary and send one event for each attribute
      // in addition to the event for all attributes.
      if (eventName === "change" && eventData) {
        und.each(eventData, function(key) {
          this.trigger(eventName + ":" + key, eventData);
        },this);
      }
    }
  }

});


text:
//
//  NBClient+Tags.h
//  NBClient
//
//  Copyright (MIT) 2014-present NationBuilder
//

#import "NBClient.h"

@interface NBClient (Tags)

/**
 Tags

 The endpoint annotations are for reference only to link to the API docs and may
 change independently of the method selectors below.

 The order of the methods listing attempts to mirror that of apiexplorer.nationbuilder.com.
 */

// GET /tags
- (nonnull NSURLSessionDataTask *)fetchTagsWithPaginationInfo:(nullable NBPaginationInfo *)paginationInfo
                                            completionHandler:(nonnull NBClientResourceListCompletionHandler)completionHandler;

// GET /tags/:id/people
- (nonnull NSURLSessionDataTask *)fetchTagPeopleByName:(nonnull NSString *)tagName
                                    withPaginationInfo:(nullable NBPaginationInfo *)paginationInfo
                                     completionHandler:(nonnull NBClientResourceListCompletionHandler)completionHandler;

@end


text:
require 'spec_helper'

describe BootstrapNavbar::Helpers::Bootstrap2 do
  before do
    BootstrapNavbar.configure do |config|
      config.current_url_method = '"/"'
      config.bootstrap_version  = '2.0.0'
    end
  end

  it 'includes the correct module' do
    expect(renderer.class.ancestors).to include(BootstrapNavbar::Helpers::Bootstrap2)
    expect(renderer.class.ancestors).to_not include(BootstrapNavbar::Helpers::Bootstrap3)
  end

  describe '#navbar' do
    context 'without parameters' do
      it 'generates the correct HTML' do
        expect(renderer.navbar).to have_tag(:div, with: { class: 'navbar' }) do
          with_tag :div, with: { class: 'navbar-inner' } do
            with_tag :div, with: { class: 'container' }
          end
        end
      end
    end

    context 'with a block' do
      it 'generates the correct HTML' do
        expect(renderer.navbar { 'foo' }).to have_tag(:div, with: { class: 'navbar' }, text: /foo/)
      end
    end

    context 'with "static" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar(static: 'top')).to have_tag(:div, with: { class: 'navbar navbar-static-top' })
        expect(renderer.navbar(static: 'bottom')).to have_tag(:div, with: { class: 'navbar navbar-static-bottom' })
      end
    end

    context 'with "fixed" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar(fixed: 'top')).to have_tag(:div, with: { class: 'navbar navbar-fixed-top' })
        expect(renderer.navbar(fixed: 'bottom')).to have_tag(:div, with: { class: 'navbar navbar-fixed-bottom' })
      end
    end

    context 'with "inverse" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar(inverse: true)).to have_tag(:div, with: { class: 'navbar navbar-inverse' })
      end
    end

    context 'with "brand" and "brank_link" parameters' do
      it 'generates the correct HTML' do
        expect(renderer.navbar(brand: 'foo')).to have_tag(:a, with: { href: '/', class: 'brand' }, text: /foo/)
        expect(renderer.navbar(brand: 'foo', brand_link: 'http://google.com')).to have_tag(:a, with: { href: 'http://google.com', class: 'brand' }, text: /foo/)
        expect(renderer.navbar(brand_link: 'http://google.com')).to have_tag(:a, with: { href: 'http://google.com', class: 'brand' })
      end
    end

    context 'with "responsive" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar(responsive: true)).to have_tag(:a, with: { class: 'btn btn-navbar', :'data-toggle' => 'collapse', :'data-target' => '.nav-collapse' }) do
          3.times do
            with_tag :span, with: { class: 'icon-bar' }
          end
        end
        with_bootstrap_versions %w(2.2.0 2.2.1 2.2.2 2.3.0 2.3.1 2.3.2) do
          expect(renderer.navbar(responsive: true)).to have_tag(:div, with: { class: 'nav-collapse collapse' })
        end
        with_bootstrap_versions %w(2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.0 2.1.1) do
          expect(renderer.navbar(responsive: true)).to have_tag(:div, with: { class: 'nav-collapse' })
        end
      end
    end

    context 'with "fluid" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar(fluid: true)).to have_tag(:div, with: { class: 'container-fluid' })
      end
    end

    context 'with wrapper parameters' do
      it 'generates the correct HTML' do
        expect(renderer.navbar({}, class: 'my-wrapper-class', id: 'my-wrapper-id')).to have_tag(:div, with: { class: 'navbar my-wrapper-class', id: 'my-wrapper-id' })
      end
    end
  end

  describe '#navbar_group' do
    context 'without parameters' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_group).to have_tag(:ul, with: { class: 'nav' })
        expect(renderer.navbar_group { 'foo' }).to have_tag(:ul, with: { class: 'nav' }, text: /foo/)
      end
    end

    context 'with "pull" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_group(pull: 'right')).to have_tag(:ul, with: { class: 'nav pull-right' })
      end
    end

    context 'with "class" parameter' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_group(class: 'foo')).to have_tag(:ul, with: { class: 'nav foo' })
      end
    end

    context 'with random parameters' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_group(:'data-foo' => 'bar')).to have_tag(:ul, with: { class: 'nav', :'data-foo' => 'bar' })
      end
    end

    context 'with many parameters' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_group(pull: 'right', class: 'foo', :'data-foo' => 'bar')).to have_tag(:ul, with: { class: 'nav foo pull-right', :'data-foo' => 'bar' })
      end
    end
  end

  describe '#navbar_item' do
    it_behaves_like 'marking the navbar items as active correctly'

    context 'with root URL' do
      context 'with list item options' do
        it 'generates the correct HTML' do
          BootstrapNavbar.configuration.current_url_method = '"/"'
          expect(renderer.navbar_item('foo', '/', class: 'bar', id: 'baz')).to have_tag(:li, with: { class: 'active bar', id: 'baz' })
        end
      end

      context 'with link options' do
        it 'generates the correct HTML' do
          BootstrapNavbar.configuration.current_url_method = '"/"'
          expect(renderer.navbar_item('foo', '/', {}, class: 'pelle', id: 'fant')).to have_tag(:li, with: { class: 'active' }) do
            with_tag :a, with: { href: '/', class: 'pelle', id: 'fant' }, text: /foo/
          end
        end
      end

      context 'with list item options and link options' do
        it 'generates the correct HTML' do
          BootstrapNavbar.configuration.current_url_method = '"/"'
          expect(renderer.navbar_item('foo', '/', { class: 'bar', id: 'baz' }, class: 'pelle', id: 'fant')).to have_tag(:li, with: { class: 'active bar', id: 'baz' }) do
            with_tag :a, with: { href: '/', class: 'pelle', id: 'fant' }, text: /foo/
          end
        end
      end
    end

    context 'without current URL' do
      it 'generates the correct HTML' do
        BootstrapNavbar.configuration.current_url_method = '"/foo"'
        expect(renderer.navbar_item('foo')).to have_tag(:li, without: { class: 'active' }) do
          with_tag :a, with: { href: '#' }, text: /foo/
        end
        expect(renderer.navbar_item('foo', '/')).to have_tag(:li, without: { class: 'active' }) do
          with_tag :a, with: { href: '/' }, text: /foo/
        end
        expect(renderer.navbar_item('foo', '/bar')).to have_tag(:li, without: { class: 'active' }) do
          with_tag :a, with: { href: '/bar' }, text: /foo/
        end
        BootstrapNavbar.configuration.current_url_method = '"/"'
        expect(renderer.navbar_item('foo', '/foo')).to have_tag(:li, without: { class: 'active' }) do
          with_tag :a, with: { href: '/foo' }, text: /foo/
        end
      end

      context 'with list item options' do
        it 'generates the correct HTML' do
          BootstrapNavbar.configuration.current_url_method = '"/foo"'
          expect(renderer.navbar_item('foo', '/', class: 'bar', id: 'baz')).to have_tag(:li, without: { class: 'active' }, with: { class: 'bar', id: 'baz' })
        end
      end
    end

    context 'with a block' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_item { 'bar' }).to have_tag(:li) do
          with_tag :a, with: { href: '#' }, text: /bar/
        end
      end

      context 'with list item options' do
        it 'generates the correct HTML' do
          expect(renderer.navbar_item('/foo', class: 'pelle', id: 'fant') { 'bar' }).to have_tag(:li, with: { class: 'pelle', id: 'fant' }) do
            with_tag :a, with: { href: '/foo' }, text: /bar/
          end
        end
      end

      context 'with link options' do
        it 'generates the correct HTML' do
          expect(renderer.navbar_item('/foo', {}, class: 'pelle', id: 'fant') { 'bar' }).to have_tag(:li) do
            with_tag :a, with: { href: '/foo', class: 'pelle', id: 'fant' }, text: /bar/
          end
        end
      end

      context 'with list item options and link options' do
        it 'generates the correct HTML' do
          expect(renderer.navbar_item('/foo', { class: 'bar', id: 'baz' }, class: 'pelle', id: 'fant') { 'shnoo' }).to have_tag(:li, with: { class: 'bar', id: 'baz' }) do
            with_tag :a, with: { href: '/foo', class: 'pelle', id: 'fant' }, text: /shnoo/
          end
        end
      end
    end
  end

  context 'dropdowns' do
    def with_dropdown_menu(content = nil)
      options = { with: { class: 'dropdown-menu' } }
      options[:content] = content unless content.nil?
      with_tag :ul, options
    end

    describe '#navbar_dropdown' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_dropdown('foo')).to have_tag(:li, with: { class: 'dropdown' }) do
          with_tag :a, with: { href: '#', class: 'dropdown-toggle', :'data-toggle' => 'dropdown' } do
            with_text /foo/
            with_tag :b, with: { class: 'caret' }
          end
          with_dropdown_menu
        end

        expect(renderer.navbar_dropdown('foo') { 'bar' }).to have_tag(:li, with: { class: 'dropdown' }) do
          with_tag :a, with: { href: '#', class: 'dropdown-toggle', :'data-toggle' => 'dropdown' } do
            with_text /foo/
            with_tag :b, with: { class: 'caret' }
          end
          with_dropdown_menu('bar')
        end
      end
    end

    describe '#navbar_sub_dropdown' do
      it 'generates the correct HTML' do
        expect(renderer.navbar_sub_dropdown('foo')).to have_tag(:li, with: { class: 'dropdown-submenu' }) do
          with_tag :a, with: { href: '#' }, text: /foo/
          with_dropdown_menu
        end

        expect(renderer.navbar_sub_dropdown('foo') { 'bar' }).to have_tag(:li, with: { class: 'dropdown-submenu' }) do
          with_tag :a, with: { href: '#' }, text: /foo/
          with_dropdown_menu('bar')
        end
      end

      context 'with list item options' do
        it 'generates the correct HTML' do
          expect(renderer.navbar_sub_dropdown('foo', class: 'bar', id: 'baz')).to have_tag(:li, with: { class: 'dropdown-submenu bar', id: 'baz' }) do
            with_tag :a, with: { href: '#' }, text: /foo/
          end
        end
      end

      context 'with link options' do
        it 'generates the correct HTML' do
          expect(renderer.navbar_sub_dropdown('foo', {}, class: 'pelle', id: 'fant')).to have_tag(:li, with: { class: 'dropdown-submenu' }) do
            with_tag :a, with: { href: '#', class: 'pelle', id: 'fant' }, text: /foo/
          end
        end
      end

      context 'with list item options and link options' do
        it 'generates the correct HTML' do
          expect(renderer.navbar_sub_dropdown('foo', { class: 'bar', id: 'baz' }, class: 'pelle', id: 'fant')).to have_tag(:li, with: { class: 'dropdown-submenu bar', id: 'baz' }) do
            with_tag :a, with: { href: '#', class: 'pelle', id: 'fant' }, text: /foo/
          end
        end
      end
    end
  end

  describe '#navbar_dropdown_divider' do
    it 'generates the correct HTML' do
      expect(renderer.navbar_dropdown_divider).to have_tag(:li, with: { class: 'divider' }, text: '')
    end
  end

  describe '#navbar_dropdown_header' do
    it 'generates the correct HTML' do
      expect(renderer.navbar_dropdown_header('foo')).to have_tag(:li, with: { class: 'nav-header' }, text: /foo/)
    end
  end

  describe '#navbar_divider' do
    it 'generates the correct HTML' do
      expect(renderer.navbar_divider).to have_tag(:li, with: { class: 'divider-vertical' }, text: '')
    end
  end

  describe '#navbar_text' do
    it 'generates the correct HTML' do
      expect(renderer.navbar_text('foo')).to have_tag(:p, with: { class: 'navbar-text' }, text: /foo/)
      expect(renderer.navbar_text { 'foo' }).to have_tag(:p, with: { class: 'navbar-text' }, text: /foo/)
      expect(renderer.navbar_text('foo', 'right')).to have_tag(:p, with: { class: 'navbar-text pull-right' }, text: /foo/)
      expect(renderer.navbar_text(nil, 'left') { 'foo' }).to have_tag(:p, with: { class: 'navbar-text pull-left' }, text: /foo/)
    end
  end

  describe '#navbar_brand_link' do
    it 'generates the correct HTML' do
      expect(renderer.navbar_brand_link('foo')).to have_tag(:a, with: { class: 'brand', href: '/' }, text: /foo/)
      expect(renderer.navbar_brand_link('foo', '/foo')).to have_tag(:a, with: { class: 'brand', href: '/foo' }, text: /foo/)
    end
  end
end


text:
use syntax::ast::*;
use syntax::ext::base::{ExtCtxt, Annotatable};
use syntax::codemap::{Span, Spanned, dummy_spanned};

use rocket::http::Status;

use utils::{span, MetaItemExt};
use super::Function;

/// This structure represents the parsed `error` attribute.
pub struct ErrorParams {
    pub annotated_fn: Function,
    pub code: Spanned<u16>,
}

impl ErrorParams {
    /// Parses the route attribute from the given decorator context. If the
    /// parse is not successful, this function exits early with the appropriate
    /// error message to the user.
    pub fn from(ecx: &mut ExtCtxt,
                sp: Span,
                meta_item: &MetaItem,
                annotated: &Annotatable)
                -> ErrorParams {
        let function = Function::from(annotated).unwrap_or_else(|item_sp| {
            ecx.span_err(sp, "this attribute can only be used on functions...");
            ecx.span_fatal(item_sp, "...but was applied to the item above.");
        });

        let meta_items = meta_item.meta_item_list().unwrap_or_else(|| {
            ecx.struct_span_fatal(sp, "incorrect use of attribute")
                .help("attributes in Rocket must have the form: #[name(...)]")
                .emit();
            ecx.span_fatal(sp, "malformed attribute");
        });

        if meta_items.len() < 1 {
            ecx.span_fatal(sp, "attribute requires the `code` parameter");
        } else if meta_items.len() > 1 {
            ecx.span_fatal(sp, "attribute can only have one `code` parameter");
        }

        ErrorParams {
            annotated_fn: function,
            code: parse_code(ecx, &meta_items[0])
        }
    }
}

fn parse_code(ecx: &ExtCtxt, meta_item: &NestedMetaItem) -> Spanned<u16> {
    let code_from_u128 = |n: Spanned<u128>| {
        if n.node < 400 || n.node > 599 {
            ecx.span_err(n.span, "code must be >= 400 and <= 599.");
            span(0, n.span)
        } else if Status::from_code(n.node as u16).is_none() {
            ecx.span_warn(n.span, "status code is unknown.");
            span(n.node as u16, n.span)
        } else {
            span(n.node as u16, n.span)
        }
    };

    let sp = meta_item.span();
    if let Some((name, lit)) = meta_item.name_value() {
        if name != &"code" {
            ecx.span_err(sp, "the first key, if any, must be 'code'");
        } else if let LitKind::Int(n, _) = lit.node {
            return code_from_u128(span(n, lit.span))
        } else {
            ecx.span_err(lit.span, "`code` value must be an integer")
        }
    } else if let Some(n) = meta_item.int_lit() {
        return code_from_u128(span(n, sp))
    } else {
        ecx.struct_span_err(sp, r#"expected `code = int` or an integer literal"#)
            .help(r#"you can specify the code directly as an integer,
                  e.g: #[error(404)], or as a key-value pair,
                  e.g: $[error(code = 404)]"#)
            .emit();
    }

    dummy_spanned(0)
}


text:
package automata.esfa;

import java.util.List;

import automata.esfa.ESFAMove;
import theory.BooleanAlgebra;

/**
 * Epsilon move of an SFA
 * @param
 set of predicates over the domain S
 * @param <S> domain of the automaton alphabet
 */
public class ESFAEpsilon extends ESFAMove {

	/**
	 * Constructs an FSA Transition that starts from state from and ends at state
	 * to with input input
	 */
	public ESFAEpsilon(Integer from, Integer to) {
		super(from, to);
	}

	@Override
	public boolean isDisjointFrom(ESFAMove t, BooleanAlgebra ba){
		return t.from!=from;
	}

	@Override
	public boolean isSatisfiable(BooleanAlgebra boolal) {
		return true;
	}

	@Override
	public String toDotString() {
		return String.format("%s -> %s [label=\"ε\"]\n", from,to);
	}

	@Override
	public boolean equals(Object other) {
		if (other instanceof ESFAEpsilon<?, ?>) {
			ESFAEpsilon<?, ?> otherCasted = (ESFAEpsilon<?, ?>) other;
			return otherCasted.from==from && otherCasted.to==to;
		}

		return false;
	}

	@Override
	public String toString() {
		return String.format("E: %s --> %s", from, to);
	}

	@Override
	public Object clone(){
		  return new ESFAEpsilon(from, to);
	}

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

	@Override
	public List<S> getWitness(BooleanAlgebra boolal) {
		return null;
	}

	@Override
	public boolean hasModel(List<S> el, BooleanAlgebra ba) {
		return false;
	}

}