text:
package com.fernandocejas.android10.sample.data.cache;

import android.content.Context;
import com.fernandocejas.android10.sample.data.cache.serializer.JsonSerializer;
import com.fernandocejas.android10.sample.data.entity.UserEntity;
import com.fernandocejas.android10.sample.data.exception.UserNotFoundException;
import com.fernandocejas.android10.sample.domain.executor.ThreadExecutor;
import java.io.File;
import javax.inject.Inject;
import javax.inject.Singleton;
import rx.Observable;
import rx.Subscriber;

/**
 * {@link UserCache} implementation.
 */
@Singleton
public class UserCacheImpl implements UserCache {

  private static final String SETTINGS_FILE_NAME = "com.fernandocejas.android10.SETTINGS";
  private static final String SETTINGS_KEY_LAST_CACHE_UPDATE = "last_cache_update";

  private static final String DEFAULT_FILE_NAME = "user_";
  private static final long EXPIRATION_TIME = 60 * 10 * 1000;

  private final Context context;
  private final File cacheDir;
  private final JsonSerializer serializer;
  private final FileManager fileManager;
  private final ThreadExecutor threadExecutor;

  /**
   * Constructor of the class {@link UserCacheImpl}.
   *
   * @param context A
   * @param userCacheSerializer {@link JsonSerializer} for object serialization.
   * @param fileManager {@link FileManager} for saving serialized objects to the file system.
   */
  @Inject
  public UserCacheImpl(Context context, JsonSerializer userCacheSerializer,
      FileManager fileManager, ThreadExecutor executor) {
    if (context == null || userCacheSerializer == null || fileManager == null || executor == null) {
      throw new IllegalArgumentException("Invalid null parameter");
    }
    this.context = context.getApplicationContext();
    this.cacheDir = this.context.getCacheDir();
    this.serializer = userCacheSerializer;
    this.fileManager = fileManager;
    this.threadExecutor = executor;
  }

  @Override public synchronized Observable<UserEntity> get(final int userId) {
    return Observable.create(new Observable.OnSubscribe<UserEntity>() {
      @Override public void call(Subscriber<? super UserEntity> subscriber) {
        File userEntityFile = UserCacheImpl.this.buildFile(userId);
        String fileContent = UserCacheImpl.this.fileManager.readFileContent(userEntityFile);
        UserEntity userEntity = UserCacheImpl.this.serializer.deserialize(fileContent);

        if (userEntity != null) {
          subscriber.onNext(userEntity);
          subscriber.onCompleted();
        } else {
          subscriber.onError(new UserNotFoundException());
        }
      }
    });
  }

  @Override public synchronized void put(UserEntity userEntity) {
    if (userEntity != null) {
      File userEntitiyFile = this.buildFile(userEntity.getUserId());
      if (!isCached(userEntity.getUserId())) {
        String jsonString = this.serializer.serialize(userEntity);
        this.executeAsynchronously(new CacheWriter(this.fileManager, userEntitiyFile,
            jsonString));
        setLastCacheUpdateTimeMillis();
      }
    }
  }

  @Override public boolean isCached(int userId) {
    File userEntitiyFile = this.buildFile(userId);
    return this.fileManager.exists(userEntitiyFile);
  }

  @Override public boolean isExpired() {
    long currentTime = System.currentTimeMillis();
    long lastUpdateTime = this.getLastCacheUpdateTimeMillis();

    boolean expired = ((currentTime - lastUpdateTime) > EXPIRATION_TIME);

    if (expired) {
      this.evictAll();
    }

    return expired;
  }

  @Override public synchronized void evictAll() {
    this.executeAsynchronously(new CacheEvictor(this.fileManager, this.cacheDir));
  }

  /**
   * Build a file, used to be inserted in the disk cache.
   *
   * @param userId The id user to build the file.
   * @return A valid file.
   */
  private File buildFile(int userId) {
    StringBuilder fileNameBuilder = new StringBuilder();
    fileNameBuilder.append(this.cacheDir.getPath());
    fileNameBuilder.append(File.separator);
    fileNameBuilder.append(DEFAULT_FILE_NAME);
    fileNameBuilder.append(userId);

    return new File(fileNameBuilder.toString());
  }

  /**
   * Set in millis, the last time the cache was accessed.
   */
  private void setLastCacheUpdateTimeMillis() {
    long currentMillis = System.currentTimeMillis();
    this.fileManager.writeToPreferences(this.context, SETTINGS_FILE_NAME,
        SETTINGS_KEY_LAST_CACHE_UPDATE, currentMillis);
  }

  /**
   * Get in millis, the last time the cache was accessed.
   */
  private long getLastCacheUpdateTimeMillis() {
    return this.fileManager.getFromPreferences(this.context, SETTINGS_FILE_NAME,
        SETTINGS_KEY_LAST_CACHE_UPDATE);
  }

  /**
   * Executes a {@link Runnable} in another Thread.
   *
   * @param runnable {@link Runnable} to execute
   */
  private void executeAsynchronously(Runnable runnable) {
    this.threadExecutor.execute(runnable);
  }

  /**
   * {@link Runnable} class for writing to disk.
   */
  private static class CacheWriter implements Runnable {
    private final FileManager fileManager;
    private final File fileToWrite;
    private final String fileContent;

    CacheWriter(FileManager fileManager, File fileToWrite, String fileContent) {
      this.fileManager = fileManager;
      this.fileToWrite = fileToWrite;
      this.fileContent = fileContent;
    }

    @Override public void run() {
      this.fileManager.writeToFile(fileToWrite, fileContent);
    }
  }

  /**
   * {@link Runnable} class for evicting all the cached files
   */
  private static class CacheEvictor implements Runnable {
    private final FileManager fileManager;
    private final File cacheDir;

    CacheEvictor(FileManager fileManager, File cacheDir) {
      this.fileManager = fileManager;
      this.cacheDir = cacheDir;
    }

    @Override public void run() {
      this.fileManager.clearDirectory(this.cacheDir);
    }
  }
}


text:
@interface KMLandmarkViewController () {
    KMLandmarkInfoViewController *viewController1;
    KMKeywordListController *viewController2;
}
@end

@implementation KMLandmarkViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    viewController1 = [[KMLandmarkInfoViewController alloc] init];
    viewController1.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done)];

    viewController2 = [[KMKeywordListController alloc] initWithStyle:UITableViewStylePlain];
    viewController2.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done)];

    UINavigationController* nav1 = [[UINavigationController alloc] initWithRootViewController:viewController1];
    UINavigationController* nav2 = [[UINavigationController alloc] initWithRootViewController:viewController2];
    self.viewControllers = @[nav1, nav2];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    viewController1.tabBarItem.title = viewController1.navigationItem.title;
    viewController1.navigationItem.title = self.title;
    viewController1.urlString = _urlString;

    viewController2.keywordsDelegate = _landmarkDelegate;
    viewController2.keywords = _keywords;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)done
{
    [_landmarkDelegate landmarkViewControllerDone:self];
}
@end

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP                        #-}
--------------------------------------------------------------------
-- |
-- Module      : System.Cron.Parser
-- Description : Attoparsec parser for cron formatted intervals
-- Copyright   : (c) Michael Xavier 2012
-- License     : MIT
--
-- Maintainer: Michael Xavier <michael@michaelxavier.net>
-- Portability: portable
--
-- Attoparsec parser combinator for cron schedules. See cron documentation for
-- how those are formatted.
--
-- > import Data.Attoparsec.Text (parseOnly)
-- > import System.Cron.Parser
-- >
-- > main :: IO ()
-- > main = do
-- >   print $ parseOnly cronSchedule "*/2 * 3 * 4,5,6"
--
--------------------------------------------------------------------
module System.Cron.Parser (cronSchedule,
                           cronScheduleLoose,
                           crontab,
                           crontabEntry) where

import           System.Cron

#if !MIN_VERSION_base(4,8,0)
import           Control.Applicative  (pure, (*>), (<$>), (<*), (<*>), (<|>))
#else
import           Control.Applicative  ((<$>), (<|>))
#endif
import           Data.Char (isSpace)
import           Data.Attoparsec.Text (Parser)
import qualified Data.Attoparsec.Text as A
import           Data.Text (Text)

-- | Attoparsec Parser for a cron schedule. Complies fully with the standard
-- cron format.  Also includes the following shorthand formats which cron also
-- supports: \@yearly, \@monthly, \@weekly, \@daily, \@hourly. Note that this
-- parser will fail if there is extraneous input. This is to prevent things
-- like extra fields. If you want a more lax parser, use 'cronScheduleLoose',
-- which is fine with extra input.
cronSchedule :: Parser CronSchedule
cronSchedule = cronScheduleLoose <* A.endOfInput

-- | Same as 'cronSchedule' but does not fail on extraneous input.
cronScheduleLoose :: Parser CronSchedule
cronScheduleLoose = yearlyP  <|>
                    monthlyP <|>
                    weeklyP  <|>
                    dailyP   <|>
                    hourlyP  <|>
                    classicP

-- | Parses a full crontab file, omitting comments and including environment
-- variable sets (e.g FOO=BAR).
crontab :: Parser Crontab
crontab = Crontab <$> A.sepBy lineP (A.char '\n')
  where lineP    = A.skipMany commentP *> crontabEntry
        commentP = A.skipSpace *> A.char '#' *> skipToEOL

-- | Parses an individual crontab line, which is either a scheduled command or
-- an environmental variable set.
crontabEntry :: Parser CrontabEntry
crontabEntry = A.skipSpace *> parser
  where parser = envVariableP <|>
                 commandEntryP
        envVariableP = do var <- A.takeWhile1 (A.notInClass " =")
                          A.skipSpace
                          _   <- A.char '='
                          A.skipSpace
                          val <- A.takeWhile1 $ not . isSpace
                          A.skipWhile (\c -> c == ' ' || c == '\t')
                          return $ EnvVariable var val
        commandEntryP = CommandEntry <$> cronScheduleLoose
                                     <*> (A.skipSpace *> takeToEOL)

---- Internals
takeToEOL :: Parser Text
takeToEOL = A.takeTill (== '\n') -- <* A.skip (== '\n')

skipToEOL :: Parser ()
skipToEOL = A.skipWhile (/= '\n')

classicP :: Parser CronSchedule
classicP = CronSchedule <$> (minutesP    <* space)
                        <*> (hoursP      <* space)
                        <*> (dayOfMonthP <* space)
                        <*> (monthP      <* space)
                        <*> dayOfWeekP
  where space = A.char ' '

cronFieldP :: Parser CronField
cronFieldP = steppedP  <|>
             rangeP    <|>
             listP     <|>
             starP     <|>
             specificP
  where starP         = A.char '*' *> pure Star
        rangeP        = do start <- parseInt
                           _     <- A.char '-'
                           end   <- parseInt
                           if start <= end
                             then return $ RangeField start end
                             else rangeInvalid
        rangeInvalid  = fail "start of range must be less than or equal to end"
        -- Must avoid infinitely recursive parsers
        listP         = reduceList <$> A.sepBy1 listableP (A.char ',')
        listableP     = starP    <|>
                        rangeP   <|>
                        steppedP <|>
                        specificP
        stepListP     = ListField <$> A.sepBy1 stepListableP (A.char ',')
        stepListableP = starP  <|>
                        rangeP
        steppedP      = StepField <$> steppableP <*> (A.char '/' *> parseInt)
        steppableP    = starP     <|>
                        rangeP    <|>
                        stepListP <|>
                        specificP
        specificP     = SpecificField <$> parseInt

yearlyP :: Parser CronSchedule
yearlyP  = A.string "@yearly"  *> pure yearly

monthlyP :: Parser CronSchedule
monthlyP = A.string "@monthly" *> pure monthly

weeklyP :: Parser CronSchedule
weeklyP  = A.string "@weekly"  *> pure weekly

dailyP :: Parser CronSchedule
dailyP   = A.string "@daily"   *> pure daily

hourlyP :: Parser CronSchedule
hourlyP  = A.string "@hourly"  *> pure hourly

--TODO: must handle a combination of many of these. EITHER just *, OR a list of
minutesP :: Parser MinuteSpec
minutesP = Minutes <$> cronFieldP

hoursP :: Parser HourSpec
hoursP = Hours <$> cronFieldP

dayOfMonthP :: Parser DayOfMonthSpec
dayOfMonthP = DaysOfMonth <$> cronFieldP

monthP :: Parser MonthSpec
monthP = Months <$> cronFieldP

dayOfWeekP :: Parser DayOfWeekSpec
dayOfWeekP = DaysOfWeek <$> cronFieldP

parseInt :: Parser Int
parseInt = A.decimal

reduceList :: [CronField] -> CronField
reduceList []  = ListField [] -- this should not happen
reduceList [x] = x
reduceList xs  = ListField xs


text:
<bill session="110" type="h" number="3461" updated="2009-01-09T00:08:25-05:00">
	<status><vote date="1194996600" datetime="2007-11-13T19:30:00-05:00" where="h" result="pass" how="roll" roll="1085"/></status>

	<introduced date="1186200000" datetime="2007-08-04"/>
	<titles>
		<title type="short" as="introduced">Safeguarding America's Families by Enhancing and Reorganizing New and Efficient Technologies Act of 2007</title>
		<title type="short" as="passed house">Safeguarding America's Families by Enhancing and Reorganizing New and Efficient Technologies Act of 2007</title>
		<title type="official" as="introduced">To establish a public awareness campaign regarding Internet safety.</title>
	</titles>
	<sponsor id="400631"/>
	<cosponsors>
		<cosponsor id="400661" joined="2007-08-04"/>
		<cosponsor id="400041" joined="2007-08-04"/>
		<cosponsor id="412229" joined="2007-10-30"/>
		<cosponsor id="400177" joined="2007-08-04"/>
		<cosponsor id="400257" joined="2007-10-31"/>
		<cosponsor id="400263" joined="2007-10-18"/>
		<cosponsor id="400162" joined="2007-10-18"/>
		<cosponsor id="412224" joined="2007-10-25"/>
		<cosponsor id="412225" joined="2007-11-13"/>
		<cosponsor id="400246" joined="2007-10-30"/>
		<cosponsor id="400623" joined="2007-10-23"/>
		<cosponsor id="400443" joined="2007-10-31"/>
		<cosponsor id="412210" joined="2007-11-13"/>
		<cosponsor id="400323" joined="2007-09-25"/>
		<cosponsor id="400229" joined="2007-10-25"/>
		<cosponsor id="412231" joined="2007-10-04"/>
		<cosponsor id="400184" joined="2007-08-04"/>
		<cosponsor id="412208" joined="2007-10-25"/>
		<cosponsor id="400373" joined="2007-10-04"/>
		<cosponsor id="400663" joined="2007-10-23"/>
		<cosponsor id="412223" joined="2007-10-25"/>
		<cosponsor id="400044" joined="2007-10-18"/>
		<cosponsor id="412193" joined="2007-10-10"/>
		<cosponsor id="412205" joined="2007-08-04"/>
		<cosponsor id="412211" joined="2007-10-23"/>
		<cosponsor id="400039" joined="2007-10-04"/>
		<cosponsor id="400346" joined="2007-11-01"/>
		<cosponsor id="412222" joined="2007-10-18"/>
		<cosponsor id="400350" joined="2007-10-04"/>
		<cosponsor id="400360" joined="2007-10-23"/>
		<cosponsor id="400120" joined="2007-10-18"/>
		<cosponsor id="400628" joined="2007-10-25"/>
		<cosponsor id="400638" joined="2007-10-18"/>
		<cosponsor id="400081" joined="2007-10-18"/>
		<cosponsor id="400266" joined="2007-10-30"/>
		<cosponsor id="400032" joined="2007-10-30"/>
		<cosponsor id="400042" joined="2007-10-18"/>
		<cosponsor id="400218" joined="2007-08-04"/>
		<cosponsor id="400024" joined="2007-10-31"/>
		<cosponsor id="412206" joined="2007-08-04"/>
		<cosponsor id="400345" joined="2007-10-23"/>
		<cosponsor id="400114" joined="2007-10-31"/>
		<cosponsor id="412233" joined="2007-08-04"/>
	</cosponsors>
	<actions>
		<action date="1186200000" datetime="2007-08-04"><text>Referred to the House Committee on Energy and Commerce.</text></action>
		<action date="1186200000" datetime="2007-08-04"><text>Referred to the Subcommittee on Commerce, Trade and Consumer Protection.</text></action>
		<action date="1193112000" datetime="2007-10-23"><text>Subcommittee Hearings Held.</text></action>
		<action date="1193112000" datetime="2007-10-23"><text>Subcommittee Consideration and Mark-up Session Held.</text></action>
		<action date="1193112000" datetime="2007-10-23"><text>Forwarded by Subcommittee to Full Committee (Amended) by Voice Vote .</text></action>
		<action date="1193716800" datetime="2007-10-30"><text>Committee Consideration and Mark-up Session Held.</text></action>
		<calendar date="1193716800" datetime="2007-10-30" ><text>Ordered to be Reported (Amended) by Voice Vote.</text></calendar>
		<action date="1194980520" datetime="2007-11-13T15:02:00-05:00"><text>Mr. Butterfield moved to suspend the rules and pass the bill, as amended.</text></action>
		<action date="1194980580" datetime="2007-11-13T15:03:00-05:00"><text>Considered under suspension of the rules.</text><reference label="consideration" ref="CR H13561-13562"/></action>
		<action date="1194980580" datetime="2007-11-13T15:03:00-05:00"><text>DEBATE - The House proceeded with forty minutes of debate on H.R. 3461.</text></action>
		<action date="1194981120" datetime="2007-11-13T15:12:00-05:00"><text>At the conclusion of debate, the Yeas and Nays were demanded and ordered. Pursuant to the provisions of clause 8, rule XX, the Chair announced that further proceedings on the motion would be postponed.</text></action>
		<action date="1194996360" datetime="2007-11-13T19:26:00-05:00"><text>Considered as unfinished business.</text><reference label="consideration" ref="CR H13824-13825"/></action>
		<vote date="1194996600" how="roll" roll="1085" datetime="2007-11-13T19:30:00-05:00" where="h" type="vote" suspension="1" result="pass" ><text>On motion to suspend the rules and pass the bill, as amended Agreed to by the Yeas and Nays: (2/3 required): 398 - 6 (Roll no. 1085).</text><reference label="text" ref="CR H13561"/></vote>
		<action date="1195016400" datetime="2007-11-14"><text>Received in the Senate and Read twice and referred to the Committee on Commerce, Science, and Transportation.</text></action>
	</actions>
	<committees>

	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>
	<summary>
	11/13/2007--Passed House amended. Safeguarding America's Families by Enhancing and Reorganizing New and Efficient Technologies Act of 2007 - Requires the Federal Trade Commission (FTC) to carry out a nationwide program to increase public awareness and education regarding Internet safety, including including threats to online commercial transactions, financial information and privacy, and juveniles, using existing resources and efforts of all levels of government and other appropriate entities. Includes in the program activities relating to best practices, a national outreach and education campaign, and information access and exchange. Authorizes appropriations. Directs the Assistant Secretary of Commerce for Communications and Information to establish an Online Safety and Technology working group comprised of representatives of the business community, public interest groups, federal agencies, and other appropriate groups.<br/>
	</summary>
</bill>


text:
#include <avr/io.h>
#include <avr/interrupt.h>
#define  F_CPU 16000000UL
#include "ir_remote_nec.h"

#include "uart.h"

void ir_init() {
	TCCR1B |= (1 << WGM12);     //CTC mode
	TCCR1B |= (1 << CS10); 		/* prescaler = 1 */
	TIMSK1 |= 1<<OCIE1A;	// bit 1 OCIE1A		Use 'Output Compare A Match' Interrupt, i.e. generate an interrupt
	OCR1A = ((F_CPU/1000000) * SAMPLE_RATIO)-1;; // Output Compare Registers (16 bit) OCR1BH and OCR1BL
    TCNT1 = 0;// initialize counter

    DDRD &= ~(1 << IR_PIN);      //set IR_PIN to input
    EIMSK |= (1 << INT3); 		/* External INT3 enable */
    EICRA |= (1 << ISC31); 		/* Falling edge detection */

	sei();					// Enable interrupts at global level, set Global Interrupt Enable (I) bit

	ir_reset();
	total_cycles_counter = 0;
}

void ir_reset() {
	state = STATE_WAIT;
	repeat = 0;
	cycles_counter = 0;
}

uint8_t ir_check_command(uint32_t command) {
	uint8_t address_high = (command >> 24);
	uint8_t address_low = (command >> 16);
	return (address_high & address_low) == 0;
}

void ir_check_timeout() {
	if (total_cycles_counter < TIMEOUT)
	return;

	ir_reset();
	total_cycles_counter = 0;
	check_falling_edge();
}

ISR(TIMER1_COMPA_vect) {
	cycles_counter++;
	total_cycles_counter++;
// 	if(100000==cycles_counter){
// 		cycles_counter=0;
// 		fprintf(USART,"1s passed!\n");
// 	}

}

ISR(INT3_vect) {
	ir_check_timeout();

	switch (state) {
		case STATE_WAIT:
		if (edge == EDGE_FALLING)
		ir_handle_state_wait_edge_falling();
		else
		ir_handle_state_wait_edge_rising();
		break;

		case STATE_START:
		if (edge == EDGE_RISING)
		ir_handle_state_start_edge_rising();
		else if (edge == EDGE_FALLING)
		ir_handle_state_start_edge_falling();
		break;

		case STATE_BITS:
		if (edge == EDGE_RISING)
		ir_handle_state_bits_edge_rising();
		else if (edge == EDGE_FALLING)
		ir_handle_state_bits_edge_falling();
		break;

		case STATE_STOP:
		ir_handle_state_stop();
		break;

		default:
		ir_reset();
		break;
	}

	toggle_edge();
}

void ir_handle_state_wait_edge_falling() {
	cycles_counter = 0;
	state = STATE_START;
}

void ir_handle_state_wait_edge_rising() {
	ir_reset();
}

void ir_handle_state_start_edge_falling() {

	if(cycles_counter >= TIME_START_HALFBIT_HIGH_COMMAND_MIN && cycles_counter <= TIME_START_HALFBIT_HIGH_COMMAND_MAX) {
		//fprintf(USART,"cycles_counter:%d\n",cycles_counter );
		state = STATE_BITS;
		command_bits_counter = 0;
		command = 0;
		return;
	}

	if (cycles_counter >= TIME_START_HALFBIT_HIGH_REPEAT_MIN && cycles_counter <= TIME_START_HALFBIT_HIGH_REPEAT_MAX) {
		state = STATE_STOP;
		repeat = 1;
		command = current_command;
		return;
	}

	ir_reset();
}

void ir_handle_state_start_edge_rising() {
	cycles_counter = 0;
	state = STATE_START;
}

void ir_handle_state_bits_edge_falling() {
	//fprintf(USART,"state_bits:%d\n",cycles_counter );
	if (cycles_counter >= TIME_COMMAND_HALFBIT_HIGH_ZERO_MIN && cycles_counter <= TIME_COMMAND_HALFBIT_HIGH_ZERO_MAX) {
		command = (command << 1);
		command_bits_counter++;

		if (command_bits_counter < 32) {
			state = STATE_BITS;
			} else if (!ir_check_command(command)) {
			ir_reset();
			} else {
			state = STATE_STOP;
			current_command = command;
		}

		return;
	}

	if (cycles_counter >= TIME_COMMAND_HALFBIT_HIGH_ONE_MIN && cycles_counter <= TIME_COMMAND_HALFBIT_HIGH_ONE_MAX) {
		command = ((command << 1) | 1);
		command_bits_counter++;

		if (command_bits_counter < 32) {
			state = STATE_BITS;
			} else if (!ir_check_command(command)) {
			ir_reset();
			} else {
			state = STATE_STOP;
			current_command = command;
		}

		return;
	}

	command_bits_counter = 0;
	command = 0;
	ir_reset();
}

void ir_handle_state_bits_edge_rising() {
	cycles_counter = 0;
	state = STATE_BITS;
}

void ir_handle_state_stop() {
	cycles_counter = 0;
	state = STATE_WAIT;
	current_command = command;
	fprintf(USART,"current_command:%x\n",current_command );
	total_cycles_counter = 0;
}


text:
import math
import unittest
import imath
import IECore

class AngleConversionTest( unittest.TestCase ) :

	def test( self ) :

		d = imath.V3f( 180, 90, 360 )
		r = IECore.degreesToRadians( d )
		self.assert_( isinstance( r, imath.V3f ) )
		self.assert_( r.equalWithAbsError( d * math.pi / 180.0, 0.0001 ) )

		self.assertAlmostEqual( IECore.radiansToDegrees( math.pi ), 180, 6 )

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


text:
package com.myrunning.leaderboard.web;

/**
 *  File: EditAdminFormController.java
 *  Author:  Joshua Forester
 *  Date: 2009/08/23
 *  Description: Controller object for the admin app.
 **/

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.validation.BindException;
import org.apache.log4j.Logger;
import org.apache.log4j.MDC;
import com.myrunning.leaderboard.global.Constants;
import com.myrunning.leaderboard.security.PasswordFilter;
import com.myrunning.leaderboard.model.Admin;
import com.myrunning.leaderboard.model.DataResource;
import com.myrunning.leaderboard.model.Identity;
import com.myrunning.leaderboard.model.Competitor;
import com.myrunning.leaderboard.model.stats.DataCorrelator;
import com.myrunning.leaderboard.db.DataAccessFilter;
import com.myrunning.leaderboard.db.dao.ifacedao.DataResourceDao;
import com.myrunning.leaderboard.db.dao.ifacedao.LastInsertIdDao;
import com.myrunning.leaderboard.db.dao.ifacedao.IdentityDao;
import com.myrunning.leaderboard.db.dao.ifacedao.AdminDao;
import com.myrunning.leaderboard.db.dao.ifacedao.PersonDao;

public class EditAdminFormController extends AdminFormController {

    static Logger logger = Logger.getLogger(EditAdminFormController.class);

    private DataResourceDao dataResourceDao;
    private LastInsertIdDao lastInsertIdDao;
    private IdentityDao identityDao;
    private AdminDao adminDao;
    private PersonDao personDao;

    public EditAdminFormController() {
	// empty
    }

    protected Object formBackingObject (HttpServletRequest request)
	throws Exception {
	Admin a = new Admin();
	long a_id = ServletRequestUtils.getLongParameter(request, "admin_id", 0);

	Admin admin = (Admin) request.getSession().getAttribute(Constants.ADMIN_SESSION_KEY);
	if (admin == null) {
	    return a;
	}

	if (DataAccessFilter.filterDataResourceById(a_id, admin.getId()) == null) {
	    return a;
	}

	if (a_id != 0) {
	    WebApplicationContext wac = getWebApplicationContext();
	    adminDao = (AdminDao) wac.getBean("adminDao");
	    a = adminDao.getAdminById(a_id);
	}

	return a;
    }

    public ModelAndView onSubmit (HttpServletRequest request,
				  HttpServletResponse response,
				  Object command,
				  BindException errors)
	throws Exception {

	MDC.put("Session", request.getSession().getId());
	logger.debug("handling request");

	WebApplicationContext wac = getWebApplicationContext();
	dataResourceDao = (DataResourceDao) wac.getBean("dataResourceDao");
	lastInsertIdDao = (LastInsertIdDao) wac.getBean("lastInsertIdDao");
	identityDao = (IdentityDao) wac.getBean("identityDao");
	personDao = (PersonDao) wac.getBean("personDao");
	adminDao = (AdminDao) wac.getBean("adminDao");

	Admin a = (Admin) command;

	Admin admin = (Admin) request.getSession().getAttribute(Constants.ADMIN_SESSION_KEY);
	if (admin == null) {
	    return new ModelAndView(Constants.OWNERSHIP_ERROR);
	}

	if (DataAccessFilter.filterDataResourceById(a, admin.getId()) == null) {
	    return new ModelAndView(Constants.OWNERSHIP_ERROR);
	}

	// set identity here, adding one (and associated DATA_RESOURCE
	// if it doesn't exist.  this means doing vetting to ensure it
	// is a duplicate if it does exist.  this is global and should
	// go beyond the scope of the RD's data, whereas validation
	// should only be scoped for the RD's data.
	Identity identity = DataCorrelator.correlateIdentity(a);
	long identityId = a.getIdentityId();
	boolean identityChanged = false;
	if (identity == null) {

	    identity = new Identity();
	    DataResource dataResource = new DataResource();
	    dataResource.setAdminId(admin.getId());
	    dataResourceDao.insertDataResource(dataResource);
	    identity.setId(lastInsertIdDao.getLastInsertId());
	    identityDao.insertIdentity(identity);
	    a.setIdentityId(identity.getId());

	    identityChanged = true;

	} else if (identity.getId() != identityId) {

	    a.setIdentityId(identity.getId());

	    identityChanged = true;

	}

	a.setPassword(PasswordFilter.hash(a.getPassword()));
	adminDao.updateAdmin(a);

	// now get rid of old identity if it is orphaned
	if (identityChanged) {

	    if (personDao.getPersonsByIdentityId(identityId, null, false).isEmpty()) {
		identityDao.deleteIdentityById(identityId);
		dataResourceDao.deleteDataResourceById(identityId);
	    }

	}

	return new ModelAndView(this.getSuccessView());
    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EED.Domain
{
    public class District
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Abbreviation { get; set; }
        public DistrictType DistrictType { get; set; }
        public District ParentDistrict { get; set; }
        public ElectionProject Project { get; set; }

        public IList<District> ChildDistricts { get; set; }
        public IList<Precinct> Precincts { get; set; }
        public IList<Contest> Contests { get; set; }
    }
}


text:
"""
This module contains constants representing the kinds of Collections.
"""
from __future__ import unicode_literals

from django.utils.translation import ugettext_lazy as _

FACILITY = "facility"
CLASSROOM = "classroom"
LEARNERGROUP = "learnergroup"

# the ordering of kinds in the following tuple corresponds to their level in the hierarchy tree
choices = (
    (FACILITY, _("Facility")),
    (CLASSROOM, _("Classroom")),
    (LEARNERGROUP, _("Learner group")),
)


text:
<meta http-equiv="content-type" content="text/html; charset=utf-8">
  1 CAAT.Module({
  2
  3     /**
  4      * @name TexturePacker
  5      * @memberOf CAAT.Module
  6      * @namespace
  7      */
  8
  9     /**
 10      * @name TextureElement
 11      * @memberOf CAAT.Module.TexturePacker
 12      * @constructor
 13      */
 14
 15
 16     defines : "CAAT.Module.TexturePacker.TextureElement",
 17     extendsWith : {
 18
 19         /**
 20          * @lends CAAT.Module.TexturePacker.TextureElement.prototype
 21          */
 22
 23         /**
 24          *
 25          */
 26         inverted:   false,
 27
 28         /**
 29          *
 30          */
 31         image:      null,
 32
 33         /**
 34          *
 35          */
 36         u:          0,
 37
 38         /**
 39          *
 40          */
 41         v:          0,
 42
 43         /**
 44          *
 45          */
 46         glTexture:  null
 47     }
 48 });
 49


text: export let SERVER_URL = "http://localhost:5000/";


text:
layout: post
title: Closed due to budget cuts and general lack of interest.
tags:
- weeds
---

[Ron Swanson](http://swansonquotes.com/quotes/season01/ep-03-reporter-like-tom/):

>I like Tom. He doesn't do a lot of work around here. He shows zero initiative. He's not a team player. He's never one to go that extra mile. Tom is exactly what I'm looking for in a government employee.

[Jeff Winger](http://fuckyeahcommunity.tumblr.com/post/116957676811/im-always-willing-to-go-the-extra-mile-to-avoid):

>I'm always willing to go the extra mile to avoid doing something.

When wealth is lost, nothing is lost; when health is lost, something is lost; when character is lost, all is lost.


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

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">

    <solid android:color="@color/drawer_bg_color_bottom" />

    <corners
        android:bottomLeftRadius="2dp"
        android:bottomRightRadius="2dp"
        android:topLeftRadius="2dp"
        android:topRightRadius="2dp" />
</shape>


text:
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="app.js" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="C:/Program Files/nodejs/node" path-to-js-file="app.js" application-parameters="C:\Users\AlinC\AppData\Roaming\npm\node_modules\supervisor\lib\cli-wrapper.js –no-restart-on error" working-dir="$PROJECT_DIR$">
    <envs>
      <env name="AWS_SECRET_ACCESS_KEY" value="LlF1z4E7lGcwOaxCHwSlgrgibDNhB1xwYO8Q65Ov" />
      <env name="AWS_ACCESS_KEY_ID" value="AKIAJ34V46JYOGTJGTJQ" />
    </envs>
    <browser start="false" url="http://localhost:3000" with-js-debugger="false" />
    <RunnerSettings RunnerId="NodeJS.debug" />
    <RunnerSettings RunnerId="NodeJS.run" />
    <ConfigurationWrapper RunnerId="NodeJS.debug" />
    <ConfigurationWrapper RunnerId="NodeJS.run" />
    <method />
  </configuration>
</component>


text:
Each material contains multiple computations for different purposes. Each computation is referred to as a "task". This field contains a dictionary of all the tasks performed on this material and their associated task_ids. An example would be:

{'GGA Uniform v2': 'mp-882394',
'GGA band structure v2': 'mp-885182',
'GGA+U Uniform v2': 'mp-797269',
'GGA+U band structure v2': 'mp-797820',
'GGA+U optimize structure (2x)': 'mp-19017'}

## Example response in JSON

```json
{
    "GGA NSCF Line": "mp-1062271",
    "GGA NSCF Uniform": "mp-1062278",
    "GGA Static": "mp-1062254",
    "GGA Static Dielectric": "mp-1140942",
    "GGA Structure Optimization": "mp-1062240"
}
```


text:
using Autofac.Extras.IocManager;

using Couchbase.Linq;

using Stove.Domain.Uow;

namespace Stove.Couchbase.Uow
{
    public class UnitOfWorkSessionProvider : ISessionProvider, ITransientDependency
    {
        private readonly ICurrentUnitOfWorkProvider _unitOfWorkProvider;

        public UnitOfWorkSessionProvider(ICurrentUnitOfWorkProvider unitOfWorkProvider)
        {
            _unitOfWorkProvider = unitOfWorkProvider;
        }

        public IBucketContext Session => _unitOfWorkProvider.Current.GetSession();
    }
}


text:
typedef enum {
    ALPointRoadStateRoad,
    ALPointRoadStateWall,
    ALPointRoadStateStart,
    ALPointRoadStateEnd,
    ALPointRoadStateTotalCount
}ALPointRoadState;

typedef enum {
    ALPointSearchStateNew,
    ALPointSearchStateWalked,
    ALPointSearchStateTotalCount
}ALPointSearchState;

@interface ALPoint : NSObject
@property (assign, nonatomic) ALPointRoadState roadState;
@property (assign, nonatomic) ALPointSearchState searchState;
@property (assign, nonatomic) ALCoordiante coor;

+(BOOL)isCoordinateEqualWithPoint:(ALPoint *)pointA withAnotherPoint:(ALPoint *)pointB;

-(id)initWithCoor:(ALCoordiante)coor;
-(id)initWithRandomRoadStateOfPointAtCoor:(ALCoordiante)coor;
-(id)initWithCoor:(ALCoordiante)coor state:(ALPointRoadState)state;

@end


text:
import {__platform_browser_private__ as r, __platform_browser_private__ as t} from '@angular/platform-browser';

export var getDOM: typeof t.getDOM = r.getDOM;
export var initDomAdapter: typeof t.initDomAdapter = r.initDomAdapter;


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.07.02 at 03:35:23 PM MSK
//

package ru.gov.zakupki.oos.types._1;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * Справочник: Причины изменения условий контракта
 *
 *
Java class for zfcs_nsiContractModificationReasonType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="zfcs_nsiContractModificationReasonType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="code" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonCodeType"/>
 *         <element name="name" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonNameType"/>
 *         <element name="actual" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *         <element name="documents" minOccurs="0">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="document" maxOccurs="unbounded">
 *                     <complexType>
 *                       <complexContent>
 *                         <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                           <sequence>
 *                             <element name="code" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonDocCodeType"/>
 *                             <element name="name" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonDocNameType"/>
 *                             <element name="actual" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
 *                           </sequence>
 *                         </restriction>
 *                       </complexContent>
 *                     </complexType>
 *                   </element>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "zfcs_nsiContractModificationReasonType", propOrder = {
    "code",
    "name",
    "actual",
    "documents"
})
public class ZfcsNsiContractModificationReasonType {

    @XmlElement(required = true)
    protected String code;
    @XmlElement(required = true)
    protected String name;
    protected boolean actual;
    protected ZfcsNsiContractModificationReasonType.Documents documents;

    /**
     * Gets the value of the code property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getCode() {
        return code;
    }

    /**
     * Sets the value of the code property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setCode(String value) {
        this.code = value;
    }

    /**
     * Gets the value of the name property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the actual property.
     *
     */
    public boolean isActual() {
        return actual;
    }

    /**
     * Sets the value of the actual property.
     *
     */
    public void setActual(boolean value) {
        this.actual = value;
    }

    /**
     * Gets the value of the documents property.
     *
     * @return
     *     possible object is
     *     {@link ZfcsNsiContractModificationReasonType.Documents }
     *
     */
    public ZfcsNsiContractModificationReasonType.Documents getDocuments() {
        return documents;
    }

    /**
     * Sets the value of the documents property.
     *
     * @param value
     *     allowed object is
     *     {@link ZfcsNsiContractModificationReasonType.Documents }
     *
     */
    public void setDocuments(ZfcsNsiContractModificationReasonType.Documents value) {
        this.documents = value;
    }

    /**
     *
Java class for anonymous complex type.
     *
     *
The following schema fragment specifies the expected content contained within this class.
     *
     *

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="document" maxOccurs="unbounded">
     *           <complexType>
     *             <complexContent>
     *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *                 <sequence>
     *                   <element name="code" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonDocCodeType"/>
     *                   <element name="name" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonDocNameType"/>
     *                   <element name="actual" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
     *                 </sequence>
     *               </restriction>
     *             </complexContent>
     *           </complexType>
     *         </element>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "document"
    })
    public static class Documents {

        @XmlElement(required = true)
        protected List<ZfcsNsiContractModificationReasonType.Documents.Document> document;

        /**
         * Gets the value of the document property.
         *
         *

         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a set method for the document property.
         *
         *

         * For example, to add a new item, do as follows:
         *

         *    getDocument().add(newItem);
         *

         *
         *
         *

         * Objects of the following type(s) are allowed in the list
         * {@link ZfcsNsiContractModificationReasonType.Documents.Document }
         *
         *
         */
        public List<ZfcsNsiContractModificationReasonType.Documents.Document> getDocument() {
            if (document == null) {
                document = new ArrayList<ZfcsNsiContractModificationReasonType.Documents.Document>();
            }
            return this.document;
        }

        /**
         *
Java class for anonymous complex type.
         *
         *
The following schema fragment specifies the expected content contained within this class.
         *
         *

         * <complexType>
         *   <complexContent>
         *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
         *       <sequence>
         *         <element name="code" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonDocCodeType"/>
         *         <element name="name" type="{http://zakupki.gov.ru/oos/types/1}zfcs_nsiContractModificationReasonDocNameType"/>
         *         <element name="actual" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
         *       </sequence>
         *     </restriction>
         *   </complexContent>
         * </complexType>
         *

         *
         *
         */
        @XmlAccessorType(XmlAccessType.FIELD)
        @XmlType(name = "", propOrder = {
            "code",
            "name",
            "actual"
        })
        public static class Document {

            @XmlElement(required = true)
            protected String code;
            @XmlElement(required = true)
            protected String name;
            protected boolean actual;

            /**
             * Gets the value of the code property.
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getCode() {
                return code;
            }

            /**
             * Sets the value of the code property.
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setCode(String value) {
                this.code = value;
            }

            /**
             * Gets the value of the name property.
             *
             * @return
             *     possible object is
             *     {@link String }
             *
             */
            public String getName() {
                return name;
            }

            /**
             * Sets the value of the name property.
             *
             * @param value
             *     allowed object is
             *     {@link String }
             *
             */
            public void setName(String value) {
                this.name = value;
            }

            /**
             * Gets the value of the actual property.
             *
             */
            public boolean isActual() {
                return actual;
            }

            /**
             * Sets the value of the actual property.
             *
             */
            public void setActual(boolean value) {
                this.actual = value;
            }

        }

    }

}


text:
cask "spectx" do
  version "1.4.68"
  sha256 "053f6e9d9c7539cd86bfbbc99787483822ee28eebe8f04dd24cd6d2ccd47575d"

  url "https://download.spectx.com/versions/#{version}/SpectXDesktop-v#{version}.dmg"
  appcast "https://www.spectx.com/get-spectx"
  name "SpectX Desktop"
  desc "Parse and investigate raw log files"
  homepage "https://www.spectx.com/"

  app "SpectXDesktop.app"
end


text:
avpath
======

XPath likeness for Avro

.. image:: https://travis-ci.org/wandoulabs/avpath.png
   :target: https://travis-ci.org/wandoulabs/avpath
   :alt: avpath build status

avpath User Manual
------------------

Preface
-------

avpath is the likeness of xpath/jspath to select, update, insert, delete
data on Avro form. Which could be used by Java/Scala as API library,or
used as data service for Avro records. The expression is similar to
`jspath <https://github.com/dfilatov/jspath>`__, but we also added APIs
to support for **Update**, **Delete**, **Clear**, **Insert** and
**InsertAll**. This manual is based on the User Manual of jspath.

Comparing to jspath that is applied on Json data, avpath is applied on
Avro data that has Map data type, thus leading to an extra experssion to
query map by key:

.. code:: scala

    avpath.select(record, ".mapfield(\"thekey\")")

Usage
-----

Select:
~~~~~~~

.. code:: scala

    import com.wandoujia.avro.avpath.Evaluator
    import com.wandoujia.avro.avpath.Parser

    val schema = new Schema.parse("account.avsc")
    val account = new GenericData.Record(schema)
    ...

    var x = avpath.select(record, ".chargeRecords[0].time")

Update:
~~~~~~~

.. code:: scala

    avpath.update(record, ".chargeRecords[0].time", 100000)

Delete (Only applicable on elements of Array/Map):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: scala

    avpath.delete(record, ".chargeRecords[*]{.time < 1000}")

Clear (Only applicable on Array/Map):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: scala

    avpath.clear(record, ".chargeRecords")

Insert/InsertAll (Only applicable on Array/Map):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: scala

    avpath.insert(record, ".chargeRecords", chargeRecord)

    avpath.insertAll(record, ".chargeRecords", List(chargeRecord1, chargeRecord2))

where:

+--------+----------------+-----------------+
|        | Type           | Description     |
+========+================+=================+
| path   | string         | path expression |
+--------+----------------+-----------------+
| avro   | any valid avro | input avro data |
+--------+----------------+-----------------+
| schema | schema         |                 |
+--------+----------------+-----------------+

Quick example
~~~~~~~~~~~~~

the first param is pseudo avro record in json format.

.. code:: scala

    avpath.select(
        {
            "automobiles" : [
                { "maker" : "Nissan", "model" : "Teana", "year" : 2011 },
                { "maker" : "Honda", "model" : "Jazz", "year" : 2010 },
                { "maker" : "Honda", "model" : "Civic", "year" : 2007 },
                { "maker" : "Toyota", "model" : "Yaris", "year" : 2008 },
                { "maker" :* "Honda", "model" : "Accord", "year" : 2011 }
            ],
            "motorcycles" : [{ "maker" : "Honda", "model" : "ST1300", "year" : 2012 }]
        },
        ".automobiles{.maker === \"Honda\" && .year > 2009}.model"
        )

Result will be:

::

    ['Jazz', 'Accord']

Documentation
-------------

avpath expression consists of two type of top-level expressions:
location path (required) and predicates (optional).

Location path
~~~~~~~~~~~~~

To select items in avpath, you use a location path. A location path
consists of one or more location steps. Every location step starts with
dot (.) or two dots (..) depending on the item you're trying to select:

-  ``.property`` — locates property immediately descended from context
   items

-  ``..property`` **[TODO]** — locates property deeply descended from
   context items

-  ``.`` — locates context items itself

You can use the wildcard symbol (\*) instead of exact name of property:

-  ``.*`` — locates all properties immediately descended from the
   context items

-  ``..*`` **[TODO]** — locates all properties deeply descended from the
   context items

Also avpath allows to join several properties:

-  ``(.property1 | .property2 | .propertyN)`` — locates property1,
   property2, propertyN immediately descended from context items

-  or even ``(.property1 | .property2.property2_1.property2_1_1)`` —
   locates .property1, .property2.property2\_1.property2\_1\_1 items

Your location path can be absolute or relative. If location path starts
with the root (^) you are using an absolute location path — your
location path begins from the root items.

Consider the following Avro data (**expressed in JSON for
convenience**):

.. code:: json

    var doc =
    """
    {
        "books" : [
            {
                "id"     : 1,
                "title"  : "Clean Code",
                "author" : { "name" : "Robert C. Martin" },
                "price"  : 17.96
            },
            {
                "id"     : 2,
                "title"  : "Maintainable JavaScript",
                "author" : { "name" : "Nicholas C. Zakas" },
                "price"  : 10
            },
            {
                "id"     : 3,
                "title"  : "Agile Software Development",
                "author" : { "name" : "Robert C. Martin" },
                "price"  : 20
            },
            {
                "id"     : 4,
                "title"  : "JavaScript: The Good Parts",
                "author" : { "name" : "Douglas Crockford" },
                "price"  : 15.67
            }
        ]
    };

    """

Examples
^^^^^^^^

.. code:: scala

    // find all books authors
    avpath.select(doc, ".books.author")
    // [{ name : 'Robert C. Martin' }, { name : 'Nicholas C. Zakas' }, { name : 'Robert C. Martin' }, { name : 'Douglas Crockford' }]

    // find all books author names
    avpath.select(doc, ".books.author.name")
    // ['Robert C. Martin', 'Nicholas C. Zakas', 'Robert C. Martin', 'Douglas Crockford' ]

    // find all names in books*
    avpath.select(doc, ".books..name")
    // ['Robert C. Martin', 'Nicholas C. Zakas', 'Robert C. Martin', 'Douglas Crockford' ]

Predicates
~~~~~~~~~~

avpath predicates allow you to write very specific rules about items
you'd like to select when constructing your expressions. Predicates are
filters that restrict the items selected by location path. There're two
possible types of predicates: object and positional.

Object predicates
~~~~~~~~~~~~~~~~~

Object predicates can be used in a path expression to filter a subset of
items according to a boolean expressions working on a properties of each
item. Object predicates are embedded in braces.

Basic expressions in object predicates:

-  numeric literals (e.g. 1.23)

-  string literals (e.g. "John Gold")

-  boolean literals (true/false)

-  subpathes (e.g. .nestedProp.deeplyNestedProp)

avpath allows to use in predicate expressions following types of
operators:

-  comparison operators

-  string comparison operators

-  logical operators

-  arithmetic operators

**Comparison operators**
^^^^^^^^^^^^^^^^^^^^^^^^
+---------+--------------------------------------------------------------------------------+------------------------+
| ``==``  | Returns is true if both operands are equal                                     | ``.books{.id == "1"}`` |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``===`` | Returns true if both operands are strictly equal with no type conversion       | ``.books{.id === 1}``  |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``!=``  | Returns true if the operands are not equal                                     | ``.books{.id != "1"}`` |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``!==`` | Returns true if the operands are not equal and/or not of the same type         | ``.books{.id !== 1}``  |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``>``   | Returns true if the left operand is greater than the right operand             | ``.books{.id > 1}``    |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``>=``  | Returns true if the left operand is greater than or equal to the right operand | ``.books{.id >= 1}``   |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``<``   | Returns true if the left operand is less than the right operand                | ``.books{.id < 1}``    |
+---------+--------------------------------------------------------------------------------+------------------------+
| ``<=``  | Returns true if the left operand is less than or equal to the right operand    | ``.books{.id <= 1}``   |
+---------+--------------------------------------------------------------------------------+------------------------+

Comparison rules:

-  if both operands to be compared are arrays, then the comparison will
   be true if there is an element in the first array and an element in
   the second array such that the result of performing the comparison of
   two elements is true

-  if one operand is array and another is not, then the comparison will
   be true if there is element in array such that the result of
   performing the comparison of element and another operand is true

-  primitives to be compared as usual javascript primitives

If both operands are strings, there're also available additional
comparison operators:

**String comparison operators**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``==``  | Like an usual ``==`` but case insensitive                             | ``.books{.title == "clean code"}``   |
+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``^==`` | Returns true if left operand value beginning with right operand value | ``.books{.title ^== "Javascript"}``  |
+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``^=``  | Like the ``^==`` but case insensitive                                 | ``.books{.title ^= "javascript"}``   |
+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``$==`` | Returns true if left operand value ending with right operand value    | ``.books{.title $== "Javascript"}``  |
+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``$=``  | Like the ``$==`` but case insensitive                                 | ``.books{.title $= "javascript"}``   |
+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``*==`` | Returns true if left operand value contains right operand value       | ``.books{.title \*== "Javascript"}`` |
+---------+-----------------------------------------------------------------------+--------------------------------------+
| ``*=``  | Like the ``\*==`` but case insensitive                                | ``.books{.title \*= "javascript"}``  |
+---------+-----------------------------------------------------------------------+--------------------------------------+

**Logical operators**
^^^^^^^^^^^^^^^^^^^^^

+---------+----------------------------------------+-----------------------------------------------------------------------------+
| ``&&``  | Returns true if both operands are true | ``.books{.price > 19 && .author.name === "Robert C. Martin"}``              |
+---------+----------------------------------------+-----------------------------------------------------------------------------+
| ``||``  | Returns true if either operand is true | ``.books{.title === "Maintainable JavaScript" || .title === "Clean Code"}`` |
+---------+----------------------------------------+-----------------------------------------------------------------------------+
| ``!``   | Returns true if operand is false       | ``.books{!.title}``                                                         |
+---------+----------------------------------------+-----------------------------------------------------------------------------+

Logical operators convert their operands to boolean values using next
rules:

-  if operand is array (as you remember result of applying subpath is
   also array):

   -  if length of array greater than zero, result will be true

   -  else result will be false

-  Casting with double NOT (!!) javascript operator to be used in any
   other cases.

**Arithmetic operators**
^^^^^^^^^^^^^^^^^^^^^^^^
+-------+----------------+
| ``+`` | addition       |
+-------+----------------+
| ``-`` | subtraction    |
+-------+----------------+
| ``*`` | multiplication |
+-------+----------------+
| ``/`` | division       |
+-------+----------------+
| ``%`` | modulus        |
+-------+----------------+

**Operator precedence**
^^^^^^^^^^^^^^^^^^^^^^^
+---------+----------------------------------------+
| 1 (top) | ``! -unary``                           |
+---------+----------------------------------------+
| 2       | ``* / %``                              |
+---------+----------------------------------------+
| 3       | ``+ -binary``                          |
+---------+----------------------------------------+
| 4       | ``>=``                                 |
+---------+----------------------------------------+
| 5       | ``== === != !== ^= ^== $== $= *= *==`` |
+---------+----------------------------------------+
| 6       | ``&&``                                 |
+---------+----------------------------------------+
| 7       | ``||``                                 |
+---------+----------------------------------------+

Parentheses are used to explicitly denote precedence by grouping parts
of an expression that should be evaluated first.

Examples
^^^^^^^^

.. code:: scala

    // find all book titles whose author is Robert C. Martin
    avpath.select(doc, ".books{.author.name === \"Robert C. Martin\"}.title", schema)
    // ['Clean Code', 'Agile Software Development']

    // find all book titles with price less than 17
    avpath.select(doc, ".books{.price < 17}.title", schema)
    // ['Maintainable JavaScript', 'JavaScript: The Good Parts']

Array positional predicates
~~~~~~~~~~~~~~~~~~~~~

Positional predicates allow you to filter items by their context
position. Positional predicates are always embedded in square brackets.

There are four available forms:

-  ``[index]`` — returns index-positioned item in context (first item
   is at index 0), e.g. [3] returns fourth item in context

-  ``[index:]`` — returns items whose index in context is greater or
   equal to index, e.g. [2:] returns items whose index in context is
   greater or equal to 2

-  ``[:index]`` — returns items whose index in context is smaller than
   index, e.g. [:5] returns first five items in context

-  ``[indexFrom:indexTo]`` — returns items whose index in context is
   greater or equal to indexFrom and smaller than indexTo, e.g. [2:5]
   returns three items with indices 2, 3 and 4

Also you can use negative position numbers:

-  ``[-1]`` — returns last item in context

-  ``[-3:]`` — returns last three items in context

Examples
^^^^^^^^

.. code:: Scala

    // find first book title
    avpath.select(doc, ".books[0].title")
    // ['Clean Code']

    // find first title of books
    avpath.select(doc, ".books.title[0]")
    // 'Clean Code'

    // find last book title
    avpath.select(doc, ".books[-1].title")
    // ['JavaScript: The Good Parts']

    // find two first book titles
    avpath.select(doc, ".books[:2].title")
    // ['Clean Code', 'Maintainable JavaScript']

    // find two last book titles
    avpath.select(doc, ".books[-2:].title")
    // ['Agile Software Development', 'JavaScript: The Good Parts']

    // find two book titles from second position
    avpath.select(doc, ".books[1:3].title")
    // ['Maintainable JavaScript', 'Agile Software Development']

Map key predicates
~~~~~~~~~~~~~~~~~~~~~

Key predicates allow you to filter items by their key via regex.
Regex predicates are always embedded in ().

-  ``("key" | ~"key regex")`` — returns items in context (which matches
   regex)

Multiple predicates
~~~~~~~~~~~~~~~~~~~

You can use more than one predicate. The result will contain only items
that match all the predicates.

**Examples**
^^^^^^^^^^^^

.. code:: scala

    // find first book name whose price less than 15 and greater than 5
    avpath.select(doc, ".books{.price < 15}{.price > 5}[0].title")
    // ['Maintainable JavaScript']

Substitutions (TODO)
~~~~~~~~~~~~~~~~~~~~

Substitutions allow you to use runtime-evaluated values in predicates.

Examples
^^^^^^^^

.. code:: scala

    var path = ".books{.author.name === $author}.title"

    // find book name whose author Nicholas C. Zakas
    avpath.select(doc, path, """{ author : 'Nicholas C. Zakas' }""")
    // ['Maintainable JavaScript']

    // find books name whose authors Robert C. Martin or Douglas Crockford
    avpath.select(doc, path, { author : """['Robert C. Martin', 'Douglas Crockford']""" })
    // ['Clean Code', 'Agile Software Development', 'JavaScript: The Good Parts']

Result
~~~~~~

Result of applying AvPath is always a List (empty, if found nothing),
excluding case when the last predicate in top-level expression is a
positional predicate with the exact index (e.g. [0], [5], [-1]). In this
case, result is an Option item at the specified index (None if item
hasn't found).


text:
body {
  padding-top: 70px;
  padding-bottom: 30px;
}

body,
.navbar-fixed-top,
.navbar-fixed-bottom {
  min-width: 500px;
}

img, a {
  user-select: none;
  -webkit-user-drag: none;
}

.lead {
  font-size: 16px;
}

.page-header {
  margin-bottom: 30px;
}

.page-header .lead {
  margin-bottom: 10px;
}

.container {
  width: 100%;
  max-width: none !important;
}

.col-xs-4 {
  padding-top: 15px;
  padding-bottom: 15px;
  background-color: #eee;
  background-color: rgba(86, 61, 124, 0.15);
  border: 1px solid #ddd;
  border: 1px solid rgba(86, 61, 124, 0.2);
}

.container .navbar-header,
.container .navbar-collapse {
  margin-right: 0;
  margin-left: 0;
}

.navbar-header {
  float: left;
}

.navbar-collapse {
  display: block !important;
  height: auto !important;
  padding-bottom: 0;
  overflow: visible !important;
  visibility: visible !important;
}

.navbar-toggle {
  display: none;
}

.navbar-collapse {
  border-top: 0;
}

.navbar-brand {
  margin-left: -15px;
}

.navbar-nav {
  float: left;
  margin: 0;
}

.navbar-nav > li {
  float: left;
}

.navbar-nav > li > a {
  padding: 15px;
}

.navbar-nav.navbar-right {
  float: right;
}

.navbar .navbar-nav .open .dropdown-menu {
  position: absolute;
  float: left;
  background-color: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-width: 0 1px 1px;
  border-radius: 0 0 4px 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}

.navbar-default .navbar-nav .open .dropdown-menu > li > a {
  color: #333;
}

.navbar .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar .navbar-nav .open .dropdown-menu > li > a:focus,
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
  color: #fff !important;
  background-color: #428bca !important;
}

.navbar .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus {
  color: #999 !important;
  background-color: transparent !important;
}

.navbar-form {
  float: left;
  width: auto;
  padding-top: 0;
  padding-bottom: 0;
  margin-right: 0;
  margin-left: 0;
  border: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
}

.navbar-form .form-group {
  display: inline-block;
  margin-bottom: 0;
  vertical-align: middle;
}

.navbar-form .form-control {
  display: inline-block;
  width: auto;
  vertical-align: middle;
}

.navbar-form .form-control-static {
  display: inline-block;
}

.navbar-form .input-group {
  display: inline-table;
  vertical-align: middle;
}

.navbar-form .input-group .input-group-addon,
.navbar-form .input-group .input-group-btn,
.navbar-form .input-group .form-control {
  width: auto;
}

.navbar-form .input-group > .form-control {
  width: 100%;
}

.navbar-form .control-label {
  margin-bottom: 0;
  vertical-align: middle;
}

.navbar-form .radio,
.navbar-form .checkbox {
  display: inline-block;
  margin-top: 0;
  margin-bottom: 0;
  vertical-align: middle;
}

.navbar-form .radio label,
.navbar-form .checkbox label {
  padding-left: 0;
}

.navbar-form .radio input[type="radio"],
.navbar-form .checkbox input[type="checkbox"] {
  position: relative;
  margin-left: 0;
}

.navbar-form .has-feedback .form-control-feedback {
  top: 0;
}

.form-inline .form-group {
  display: inline-block;
  margin-bottom: 0;
  vertical-align: middle;
}

.form-inline .form-control {
  display: inline-block;
  width: auto;
  vertical-align: middle;
}

.form-inline .form-control-static {
  display: inline-block;
}

.form-inline .input-group {
  display: inline-table;
  vertical-align: middle;
}

.form-inline .input-group .input-group-addon,
.form-inline .input-group .input-group-btn,
.form-inline .input-group .form-control {
  width: auto;
}

.form-inline .input-group > .form-control {
  width: 100%;
}

.form-inline .control-label {
  margin-bottom: 0;
  vertical-align: middle;
}

.form-inline .radio,
.form-inline .checkbox {
  display: inline-block;
  margin-top: 0;
  margin-bottom: 0;
  vertical-align: middle;
}

.form-inline .radio label,
.form-inline .checkbox label {
  padding-left: 0;
}

.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
  position: relative;
  margin-left: 0;
}

.form-inline .has-feedback .form-control-feedback {
  top: 0;
}

.sidebar {
  position: fixed;
  width: 50px;
  top: 40px;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: block;
  padding: 20px;
  padding-top: 11px;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #f8f8f8;
  border-right: 1px solid #eee;
}

.nav-sidebar {
  margin-right: -21px;
  margin-bottom: 20px;
  margin-left: -20px;
}

.nav-sidebar > li {
  padding-top: 0px;
  padding-bottom: 0px;
}

.nav-sidebar > li > button {
  border: 0px;
  background-color: #f8f8f8;
}

#designer-editor {
  position: absolute;
  top: 4px;
  right: 0;
  bottom: 0;
  left: 50px;
  margin-top: 47px;
  margin-left: 0px;
}

.ace_gutter {
  background-color: white !important;
}

.ace_scroller.ace_scroll-left {
  box-shadow: none !important;
}

.designer-message-success {
  display: none;
}

.designer-message-info {
  display: none;
}

.designer-message-warning {
  display: none;
}

.designer-message-danger {
  display: none;
}

#designer-message {
  z-index: 1000;
  padding-right: 20px;
  position: fixed;
  right: 0px;
  bottom: 0;
  width: 400px;
}

#designer-menubar-items li:hover {
  background-color: #e7e7e7;
}

.tooltip-inner {
  background-color: #e7e7e7;
  color: black;
}

.tooltip.in {
  opacity: 1;
}

.tooltip.bottom .tooltip-arrow {
  border-bottom-color: #e7e7e7 !important;
}

.tooltip.right .tooltip-arrow {
  border-right-color: #e7e7e7 !important;
  border-bottom-color: white !important;
}

.btn:focus {
  outline: none !important;
}

.modal-dialog .modal-content .modal-footer {
  border: 0px;
}

.CodeMirror {
  height: inherit !important;
}

.CodeMirror-gutter {
  background-color: white !important;
}

.CodeMirror-gutters {
  border-right: 2px #fff !important;
}

.CodeMirror-linenumber {
  color: #555 !important;
}

.CodeMirror-lines {
  padding-top: 0px !important;
  padding-bottom: 0px !important;
}

.ace_search {
  padding-right: 6px !important;
  padding: 3px !important;
}

.icon-reverse {
  transform: scaleX(-1) !important;
  -moz-transform: scaleX(-1) !important;
  -webkit-transform: scaleX(-1) !important;
  -ms-transform: scaleX(-1) !important;
}

.icon-rotate-left {
  transform: rotate(90deg) !important;
  -webkit-transform: rotate(90deg) !important;
  -moz-transform: rotate(90deg) !important;
  -ms-transform: rotate(90deg) !important;
}

#designer-dialog-command-modal .modal-body {
  padding-bottom: 0px;
}

#designer-dialog-command-result-area {
  margin-bottom: 0px;
}

.designer-command-result {
  max-height: 300px;
  overflow: auto;
}

.list-group.designer-command-result {
  cursor: pointer;
  margin-bottom: 0px;
}

.result-command {
  max-height: 400px;
  overflow: auto;
}

.list-group-item {
  border-left-width: 0px;
  border-right-width: 0px;
  color: color !important;
  border: 0px;
}

.ace_editor.ace_autocomplete {
  width: 400px !important;
}


text:
var animationBar = document.getElementById("animationBar");
var dropdownBtn = document.getElementById("dropdownBtn");
var chevronUp = document.getElementById("chevronUp");
var chevronDown = document.getElementById("chevronDown");
var dropdownLabel = document.getElementById("dropdownLabel");
var dropdownContent = document.getElementById("dropdownContent");
var playBtn = document.getElementById("playBtn");
var slider = document.getElementById("slider");
var clickInterceptor = document.getElementById("click-interceptor");

clickInterceptor.addEventListener("mousedown", function() {
    displayDropdownContent(false);
    displayDropdownContentEnv(false);
});

// event on the dropdown
function formatId(name) {
    return "data-" + name.replace(/\s/g, '');
}

function displayDropdownContent(display) {
    if (display) {
        dropdownContent.style.display = "block";
        chevronDown.style.display = "inline";
        chevronUp.style.display = "none";
        dropdownBtn.classList.add("open");
        clickInterceptor.classList.remove("hidden");
    }
    else {
        dropdownContent.style.display = "none";
        chevronDown.style.display = "none";
        chevronUp.style.display = "inline";
        dropdownBtn.classList.remove("open");
        clickInterceptor.classList.add("hidden");
    }
}
dropdownBtn.addEventListener("click", function() {
    if (dropdownContent.style.display === "block") {
        displayDropdownContent(false);
    }
    else {
        displayDropdownContent(true);
    }
});

function selectCurrentGroup(group, index, animation) {
    if (currentGroupIndex !== undefined) {
        document.getElementById(formatId(currentGroup.name + "-" + currentGroupIndex)).classList.remove("active");
    }
    playBtn.classList.remove("play");
    playBtn.classList.add("pause");

    // start the new animation group
    currentGroup = group;
    currentGroupIndex = index;
    animation.classList.add("active");
    dropdownLabel.innerHTML = currentGroup.name;
    dropdownLabel.title = currentGroup.name;

    // set the slider
    slider.setAttribute("min", currentGroup.from);
    slider.setAttribute("max", currentGroup.to);
    currentSliderValue = currentGroup.from;
    slider.value = currentGroup.from;
}

function createDropdownLink(group, index) {
    var animation = document.createElement("a");
    animation.innerHTML = group.name;
    animation.title = group.name;
    animation.setAttribute("id", formatId(group.name + "-" + index));
    animation.addEventListener("click", function() {
        // stop the current animation group
        currentGroup.reset();
        currentGroup.stop();

        group.play(true);

        // hide the content of the dropdown
        displayDropdownContent(false);
    });
    dropdownContent.appendChild(animation);

    group.onAnimationGroupPlayObservable.add(function(grp) {
        selectCurrentGroup(grp, index, animation);
    });

    group.onAnimationGroupPauseObservable.add(function(grp) {
        playBtn.classList.add("play");
        playBtn.classList.remove("pause");
    });
}

// event on the play/pause button
playBtn.addEventListener("click", function() {
    // click on the button to run the animation
    if (this.classList.contains("play")) {
        currentGroup.play(true);
    }
    // click on the button to pause the animation
    else {
        currentGroup.pause();
    }
});

// event on the slider
slider.addEventListener("input", function() {
    var value = parseFloat(this.value);

    if (playBtn.classList.contains("play")) {
        currentGroup.play(true);
        currentGroup.goToFrame(value);
        currentGroup.pause();
    } else {
        currentGroup.goToFrame(value);
    }
});

var sliderPause = false;
slider.addEventListener("mousedown", function() {
    if (playBtn.classList.contains("pause")) {
        sliderPause = true;
        playBtn.click();
    }
});

slider.addEventListener("mouseup", function() {
    if (sliderPause) {
        sliderPause = false;
        playBtn.click();
    }
});


text:
#ifndef AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_
#define AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_

#include <memory>
#include <string>

#include "api/task_queue/task_queue_base.h"
#include "api/test/simulated_network.h"
#include "test/call_test.h"

namespace webrtc {
namespace test {

class AudioBweTest : public test::EndToEndTest {
 public:
  AudioBweTest();

 protected:
  virtual std::string AudioInputFile() = 0;

  virtual BuiltInNetworkBehaviorConfig GetNetworkPipeConfig() = 0;

  size_t GetNumVideoStreams() const override;
  size_t GetNumAudioStreams() const override;
  size_t GetNumFlexfecStreams() const override;

  std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override;

  void OnFakeAudioDevicesCreated(
      TestAudioDeviceModule* send_audio_device,
      TestAudioDeviceModule* recv_audio_device) override;

  std::unique_ptr<test::PacketTransport> CreateSendTransport(
      TaskQueueBase* task_queue,
      Call* sender_call) override;
  std::unique_ptr<test::PacketTransport> CreateReceiveTransport(
      TaskQueueBase* task_queue) override;

  void PerformTest() override;

 private:
  TestAudioDeviceModule* send_audio_device_;
};

}  // namespace test
}  // namespace webrtc

#endif  // AUDIO_TEST_AUDIO_BWE_INTEGRATION_TEST_H_


text:
package gov.nih.nci.cagrid.common;

import EDU.oswego.cs.dl.util.concurrent.CountDown;
import EDU.oswego.cs.dl.util.concurrent.LinkedQueue;
import EDU.oswego.cs.dl.util.concurrent.PooledExecutor;

/**
 * @author Stephen Langella
 * @author Shannon Hastings
 * @author Scott Oster
 * @author David W. Ervin
 * @created Dec 18, 2003
 * @version $Id: ThreadManager.java,v 1.2 2007-04-05 16:42:59 langella Exp $
 */
public class ThreadManager {

	private static int POOL_SIZE = 20;
	private PooledExecutor workerPool;

	public ThreadManager() {
		workerPool = new PooledExecutor(new LinkedQueue(), POOL_SIZE);
		workerPool.setMinimumPoolSize(POOL_SIZE);
	}

	public void executeInBackground(Runner task) throws InterruptedException {
		workerPool.execute(task);
	}

	public void execute(Runner task) throws InterruptedException {
		CountDown barrier = new CountDown(1);
		task.setSync(barrier);
		workerPool.execute(task);
		barrier.acquire();
	}

	public void executeGroup(RunnerGroup group) throws InterruptedException {
		CountDown barrier = new CountDown(group.size());

		for (int i = 0; i < group.size(); i++) {
			Runner task = group.get(i);
			task.setSync(barrier);
			workerPool.execute(task);
		}
		barrier.acquire();

	}

	public void executeGroupInBackground(RunnerGroup group) throws InterruptedException {
		for (int i = 0; i < group.size(); i++) {
			Runner task = group.get(i);
			workerPool.execute(task);
		}
	}

}


text:
/* ----------------------------------------------------
   created with http://www.texturepacker.com
   ----------------------------------------------------

   usage:

   replace {-spritename-} with the sprite you like to use

*/

.textSprite { overflow:hidden; background-repeat: no-repeat;background-image:url('images/packedText.png'); /*border:1px solid black;*/}

table.hud td { border-bottom:1px solid #000; height:18px; }

.txtScoreCPU {width:84px; height:18px; background-position: -0px -288px}
.txtScorePlayer {width:84px; height:18px; background-position: -0px -306px}
.txtTilesLeft {width:84px; height:18px; background-position: -0px -378px}

.txtWaitingOnPlayer {width:115px; height:18px; background-position: -0px -414px}

.txtCheckWord {width:200px; height:18px; background-position: -0px -0px}
.txtDifficulty {width:200px; height:18px; background-position: -0px -18px}
.txtEasier {width:200px; height:18px; background-position: -0px -36px}
.txtEasiest {width:200px; height:18px; background-position: -0px -54px}
.txtEasy {width:200px; height:18px; background-position: -0px -72px}
.txtEndGameCPU {width:200px; height:18px; background-position: -0px -90px}
.txtEndGamePlayer {width:200px; height:18px; background-position: -0px -108px}
.txtEndGameTie {width:200px; height:18px; background-position: -0px -126px}
.txtHard {width:200px; height:18px; background-position: -0px -144px}
.txtHarder {width:200px; height:18px; background-position: -0px -162px}
.txtHardest {width:200px; height:18px; background-position: -0px -180px}
.txtMatchMe {width:200px; height:18px; background-position: -0px -198px}
.txtNormal {width:200px; height:18px; background-position: -0px -216px}
.txtNumber {width:200px; height:18px; background-position: -0px -234px}
.txtNumberSmall {width:200px; height:18px; background-position: -0px -252px}
.txtPts {width:200px; height:18px; background-position: -0px -270px}
.txtThinking {width:200px; height:18px; background-position: -0px -324px}
.txtThinkingSecBegin {width:200px; height:18px; background-position: -0px -342px}
.txtThinkingSecEnd {width:200px; height:18px; background-position: -0px -360px}
.txtTilesPlayed {width:200px; height:18px; background-position: -0px -396px}


text:
extern const BOOL IOS12_OR_LATER;
extern const BOOL IOS11_OR_LATER;
extern const BOOL IOS10_OR_LATER;
extern const BOOL IOS9_OR_LATER;
extern const BOOL IOS8_OR_LATER;
extern const BOOL IOS7_OR_LATER;
extern const BOOL IOS6_OR_LATER;
extern const BOOL IOS5_OR_LATER;
extern const BOOL IOS4_OR_LATER;
extern const BOOL IOS3_OR_LATER;

extern const BOOL IOS11_OR_EARLIER;
extern const BOOL IOS10_OR_EARLIER;
extern const BOOL IOS9_OR_EARLIER;
extern const BOOL IOS8_OR_EARLIER;
extern const BOOL IOS7_OR_EARLIER;
extern const BOOL IOS6_OR_EARLIER;
extern const BOOL IOS5_OR_EARLIER;
extern const BOOL IOS4_OR_EARLIER;
extern const BOOL IOS3_OR_EARLIER;

extern const BOOL IS_SCREEN_4_INCH;
extern const BOOL IS_SCREEN_35_INCH;
extern const BOOL IS_SCREEN_47_INCH;
extern const BOOL IS_SCREEN_55_INCH;
@interface EzSystemInfo : NSObject

AS_SINGLETON( EzSystemInfo )

+ (NSString *)OSVersion;
+ (NSString *)appVersion;
+ (NSString *)appIdentifier;
+ (NSString *)appSchema;
+ (NSString *)appSchema:(NSString *)name;
+ (NSString *)deviceModel;

+ (BOOL)isDevicePhone;
+ (BOOL)isDevicePad;

+ (BOOL)requiresPhoneOS;

+ (BOOL)isPhone;
+ (BOOL)isPhone35;
+ (BOOL)isPhoneRetina35;
+ (BOOL)isPhoneRetina4;
+ (BOOL)isPad;
+ (BOOL)isPadRetina;
+ (BOOL)isScreenSize:(CGSize)size;
+ (CGFloat)rem:(CGFloat)rem;

@end


text:
var WeatherElement = ElementInterface.extend({
    _level:     null,
    _currentSizeClass: null,

    constructor: function(elementId)
    {
        this.base(elementId);
        this._level = WeatherElement.LEVEL_SIZES.MIN_LEVEL;
    },

    increaseLevel: function()
    {
        var canIncrease = (this._level < WeatherElement.LEVEL_SIZES.MAX_LEVEL);
        if (canIncrease)
        {
            this._level++;
            this.update();
        }
        return canIncrease;
    },

    decreaseLevel: function()
    {
        var canDecrease = (this._level > WeatherElement.LEVEL_SIZES.MIN_LEVEL);
        if (canDecrease)
        {
            this._level--;
            this.update();
        }
        return canDecrease;
    },

    setMinLevel: function()
    {
        this._level = WeatherElement.LEVEL_SIZES.MIN_LEVEL;
    },

    setMaxLevel: function()
    {
        this._level = WeatherElement.LEVEL_SIZES.MAX_LEVEL;
    },

    getLevel: function()
    {
        return this._level;
    },

    update: function()
    {
        this.base();
        this.updateLevelCssClass();
    },

    updateLevelCssClass: function()
    {
        var neededSizeClass = WeatherElement.getSizeClassBySize(this._level);
        if (this._currentSizeClass != neededSizeClass)
        {
            var domObject = this.getDomObject();
            domObject.removeClass(this._currentSizeClass);
            domObject.addClass(neededSizeClass);
            this._currentSizeClass = neededSizeClass;
        }
    },

    render: function()
    {
        this.base();
    },

    renderFrame: function()
    {

    }
},
{
    LEVEL_SIZES:
    {
        MIN_LEVEL:   0,
        MAX_LEVEL:   3
    },

    CSS_LEVEL_CLASSES:
    {
        SIZE0: 'size0',
        SIZE1: 'size1',
        SIZE2: 'size2',
        SIZE3: 'size3'
    },

    getSizeClassBySize: function(size)
    {
        switch (size)
        {
            case 3:
                return this.CSS_LEVEL_CLASSES.SIZE3;
            case 2:
                return this.CSS_LEVEL_CLASSES.SIZE2;
            case 1:
                return this.CSS_LEVEL_CLASSES.SIZE1;
            default:
                return this.CSS_LEVEL_CLASSES.SIZE0;
        }
    }
});


text:
|          |                               |
| -------- | ----------------------------- |
| title    | Wink                          |
| status   | 10                            |
| section  | Technologies To Be Integrated |
| keywords | Technologies To Be Integrated |

Apache wink [@www-apache-wink] provides a framework to develop and
use RESTful web services. It implements using JAX-RS v1.1
specification. The project provides server module which integrates
with all popular web servers and a client module which can used to
write RESTful web services. This project will be integrated with
Geronimo and other opensource REST projects to build a vendor neutral
community. Currently IBM and HP have taken lead. IBM is writing a full
JAX-RS implementation while HP is working on RESTful SDK for client
and server components.  Portion of initial project was also taken from
Apache CXF which uses other Apache components like commons-codec,
commons-logging, Apache-Abdera. Apache wink will simply web services
development using one single standard.


text:
namespace Boxed.Mapping
{
    using System.Threading.Tasks;

    /// <summary>
    /// Maps an object of type <typeparamref name="TSource"/> to <typeparamref name="TDestination"/> asynchronously.
    /// </summary>
    /// <typeparam name="TSource">The type of the object to map from.</typeparam>
    /// <typeparam name="TDestination">The type of the object to map to.</typeparam>
    public interface IAsyncMapper<in TSource, in TDestination>
    {
        /// <summary>
        /// Maps the specified source object into the destination object.
        /// </summary>
        /// <param name="source">The source object to map from.</param>
        /// <param name="destination">The destination object to map to.</param>
        /// <returns>A task representing the operation.</returns>
        Task Map(TSource source, TDestination destination);
    }
}


text:
import Ember from 'ember';

export default Ember.Mixin.create({
  beforeModel() {
    const superReturn = this._super(...arguments);

    if (superReturn.then) {
      return this._super(...arguments).then(() => {
        return this.get('session').close().catch(() => { /* noop */});
      });
    } else {
      return this.get('session').close().catch(() => { /* noop */});
    }
  }
});


text:
RC planes

{{videoinfo.snippet.title}}

        More videos

    Loading...


text:
Boilerplate personal para programar frontend apps:

- [Webpack](https://webpack.github.io/) con HMR
- [VueJS](http://vuejs.org/)
- [Material Design Lite](http://www.getmdl.io/)
- [BrowserSync](http://www.browsersync.io/)
- [Babel](https://babeljs.io/) ES2015/16
- [Stylus](http://stylus-lang.com/)
- [Eslint](http://eslint.org/)

## Instalación

Para trabajar con el boilerplate necesitas instalar [NodeJS](https://nodejs.org/en/):

1.- Clonar repositorio:

    git clone https://github.com/jesus-repos/VueToolBox.git

2.- Instalar dependencias:

    npm install

3.- Comenzar:

    npm start

4.- Procesar para producción:

    npm run build

## License

Copyright (c) 2016 Felipe (Jesús) L. S. Guzmán

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

    [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)

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


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.iceberg.nessie;

import com.google.common.collect.ImmutableMap;
import org.testng.annotations.Test;

import java.util.Map;

import static com.facebook.airlift.configuration.testing.ConfigAssertions.assertFullMapping;
import static com.facebook.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults;
import static com.facebook.airlift.configuration.testing.ConfigAssertions.recordDefaults;

public class TestNessieConfig
{
    @Test
    public void testDefaults()
    {
        assertRecordedDefaults(recordDefaults(NessieConfig.class)
                .setClientBuilderImpl(null)
                .setAuthenticationType(null)
                .setBearerToken(null)
                .setCompressionEnabled(true)
                .setDefaultReferenceName("main")
                .setConnectTimeoutMillis(null)
                .setPassword(null)
                .setReadTimeoutMillis(null)
                .setReadTimeoutMillis(null)
                .setServerUri(null)
                .setUsername(null));
    }

    @Test
    public void testExplicitPropertyMappings()
    {
        Map<String, String> properties = ImmutableMap.<String, String>builder()
                .put("iceberg.nessie.uri", "http://localhost:xxx/api/v1")
                .put("iceberg.nessie.ref", "someRef")
                .put("iceberg.nessie.auth.type", "BASIC")
                .put("iceberg.nessie.auth.basic.username", "user")
                .put("iceberg.nessie.auth.basic.password", "pass")
                .put("iceberg.nessie.auth.bearer.token", "bearerToken")
                .put("iceberg.nessie.compression-enabled", "false")
                .put("iceberg.nessie.connect-timeout-ms", "123")
                .put("iceberg.nessie.read-timeout-ms", "456")
                .put("iceberg.nessie.client-builder-impl", "org.projectnessie.example.ClientBuilderImpl")
                .build();

        NessieConfig expected = new NessieConfig()
                .setServerUri("http://localhost:xxx/api/v1")
                .setDefaultReferenceName("someRef")
                .setAuthenticationType(AuthenticationType.BASIC)
                .setUsername("user")
                .setPassword("pass")
                .setBearerToken("bearerToken")
                .setCompressionEnabled(false)
                .setConnectTimeoutMillis(123)
                .setReadTimeoutMillis(456)
                .setClientBuilderImpl("org.projectnessie.example.ClientBuilderImpl");

        assertFullMapping(properties, expected);
    }
}


text:
/**
 * Created by Maple on 8/15/15.
 */

var BattleScene = mw.GameScene.extend({
    ctor: function () {
        this._super();
    },
    onEnter: function () {
        this._super();

        Registry.addClass("BattleAI", BattleAI);
        this.loadViewController(new BattleUIViewController(), BATTLE_UI_VC_NAME);
        this.loadViewController(new BattleDialogViewController(new ModalViewSegue()), BATTLE_DIALOG_VC_NAME);
        this.loadViewController(new BattleOperationViewController(new ModalViewSegue()), BATTLE_OPERATION_VC_NAME);
    },
    onExit: function () {
        this._super();

        Registry.removeClass("BattleAI");
    },
    initBattleProcessor: function (pokemon1, pokemon2, aiLevel) {
        this._battleProcessor = new BattleProcessor(pokemon1, pokemon2, aiLevel);
    },
    getBattleProcessor: function () {
        return this._battleProcessor;
    },
    _battleProcessor: null,
});


text:
<!--
  ~ Copyright (C) 2016, 2019 Samuel Wall
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <item name="ic_menu_share" type="drawable">@android:drawable/ic_menu_share</item>
</resources>


text:
/**
 * A wrapper class that allows client code to own references to
 * framework-specific element handles, but which does not expose any of the
 * framework-specific methods on that element.
 *
 * @template T
 * @public
 */
class ElementHandle {
  /**
   * Wrap the framework-specific element handle object.
   * @param {!T} element
   * @package
   */
  constructor(element) {
    /** @private */
    this.element_ = element;
  }

  /**
   * Unwrap the framework-specific element handle object.
   * @return {!T}
   * @package
   */
  getElement() {
    return this.element_;
  }
}

/**
 * Key codes used to trigger actions.
 * @enum {string}
 */
const Key = {
  'ArrowDown': 'ArrowDown',
  'ArrowLeft': 'ArrowLeft',
  'ArrowRight': 'ArrowRight',
  'ArrowUp': 'ArrowUp',
  'Backspace': 'Backspace',
  'Enter': 'Enter',
  'Escape': 'Escape',
  'Tab': 'Tab',
  'CtrlV': 'CtrlV',
};

/**
 * @typedef {{
 *   width: number,
 *   height: number
 * }} WindowRectDef
 */
let WindowRectDef;

/**
 * @typedef {{
 *   x: number,
 *   y: number,
 *   top: number,
 *   bottom: number,
 *   left: number,
 *   right: number,
 *   width: number,
 *   height: number
 * }}
 */
let DOMRectDef;

/**
 * @typedef {{
 *   left: number,
 *   top: number,
 *   behavior: ScrollBehavior
 * }}
 * {@link https://developer.mozilla.org/en-US/docs/Web/API/ScrollToOptions}
 */
let ScrollToOptionsDef;

module.exports = {
  ElementHandle,
  Key,
  WindowRectDef,
  DOMRectDef,
  ScrollToOptionsDef,
};


text:
<!DOCTYPE frameset SYSTEM "frameset.dtd">
<frameset>

    <predicate lemma="discharge">

        <roleset framnet="" id="discharge.01" name="Release from a location (NOT stuff being released itself)" vncls="">
            <roles>
                <role descr="Releaser" f="" n="0"/>

                <role descr="Patient" f="" n="1"/>
                <role descr="Place released from" f="" n="2"/>
                <note/>
            </roles>

            <example name="Arg1" src="" type="">
                <inflection aspect="ns" form="ns" person="ns" tense="ns" voice="ns"/>
                <text>The patient's discharge was given three days after his surgery.</text>

                <arg f="" n="1">The patient's</arg>
                <rel f="">discharge</rel>
                <note/>
            </example>
            <example name="Arg1 and Arg2" src="" type="">
                <inflection aspect="ns" form="ns" person="ns" tense="ns" voice="ns"/>
                <text>The patient received his hospital discharge three days after surgery.</text>

                <arg f="" n="1">his</arg>
                <arg f="" n="2">hospital</arg>
                <rel f="">discharge</rel>
                <note/>
            </example>
            <note>Based on frame for discharge-v.101. Framed by Anwen March 2011.</note>
        </roleset>

        <note/>
    </predicate>

    <note/>
</frameset>


text:
package com.amazonaws.services.lambda.runtime.events;

import lombok.*;

import java.util.Map;

/**
 * Represent the class for the Cognito User Pool Custom Message Lambda Trigger
 *
 * See Custom Message Lambda Trigger
 *
 * @author jvdl <jvdl@amazon.com>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class CognitoUserPoolCustomMessageEvent extends CognitoUserPoolEvent {
    /**
     * The request from the Amazon Cognito service.
     */
    private Request request;

    /**
     * The response from your Lambda trigger.
     */
    private Response response;

    @Builder(setterPrefix = "with")
    public CognitoUserPoolCustomMessageEvent(
            String version,
            String triggerSource,
            String region,
            String userPoolId,
            String userName,
            CallerContext callerContext,
            Request request,
            Response response) {
        super(version, triggerSource, region, userPoolId, userName, callerContext);
        this.request = request;
        this.response = response;
    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    @NoArgsConstructor
    public static class Request extends CognitoUserPoolEvent.Request {
        /**
         * One or more key-value pairs that you can provide as custom input to the Lambda function that you specify for the custom message trigger.
         */
        private Map<String, String> clientMetadata;
        /**
         * A string for you to use as the placeholder for the verification code in the custom message.
         */
        private String codeParameter;
        /**
         * The username parameter. It is a required request parameter for the admin create user flow.
         */
        private String usernameParameter;

        @Builder(setterPrefix = "with")
        public Request(Map<String, String> userAttributes, Map<String, String> clientMetadata, String codeParameter, String usernameParameter) {
            super(userAttributes);
            this.clientMetadata = clientMetadata;
            this.codeParameter = codeParameter;
            this.usernameParameter = usernameParameter;
        }
    }

    @Data
    @AllArgsConstructor
    @Builder(setterPrefix = "with")
    @NoArgsConstructor
    public static class Response {
        /**
         * The custom SMS message to be sent to your users. Must include the codeParameter value received in the request.
         */
        private String smsMessage;
        /**
         * The custom email message to be sent to your users. Must include the codeParameter value received in the request.
         */
        private String emailMessage;
        /**
         * The subject line for the custom message.
         */
        private String emailSubject;
    }
}


text:
import Mixin from '@ember/object/mixin';
import { computed } from '@ember/object';
import config from '../config/environment';

export default Mixin.create({
  isProduction: computed({
    get() {
      return config.environment === 'production';
    }
  }).volatile(),

  isDevelopment: computed.not('isProduction').volatile()
});