text:
/**
 * @description A logging tool for node js.
 * @file main.js
 */

/**
 * @constructor
 */
function Yolog(){

  var _printFuncName = false;
  var _depth = 3;
  var _colors = require('./colors.js');
  var _util   = require('util');
  var _eol    = process.platform === 'win32' ? '\r\n' : '\n';
  var _tags   = {
    trace:     { color: _colors.normal.cyan   ,active: true }
    , debug:   { color: _colors.normal.blue   ,active: true }
    , error:   { color: _colors.normal.red    ,active: true }
    , warning: { color: _colors.normal.yellow ,active: true }
    , info:    { color: _colors.normal.white  ,active: true }
    , todo:    { color: _colors.normal.green  ,active: true }
  };

 /**
   * Print a debug string formatted as "(date) tag: string with %s|d|j values" where % values will be replaced with passed arguments.
   * @param {string} tag Tag to use.
   * @param {string} string String to print.
   * @param {null|undefined|Array} args Arguments.
   */
  var _print = function(tag, string, args) {
   tag = tag.toLowerCase();
    if(args !== undefined && args !== null) {
      for(var i=0; i<args.length; i++){
        string = _util.format(string, args[i]);
      }
    }
    // [TagColor]Tag[/TagColor][Cyan]\tDate[/Cyan]Text\n
   var tagName = tag.charAt(0).toUpperCase() + tag.slice(1);
    var out = _util.format("%s%s%s%s\t(%s)%s: %s%s", _tags[tag].color, tagName, _colors.reset, _colors.normal.cyan, (new Date()).toLocaleTimeString(), _getCaller(3),  _colors.reset, string);
    if(tag === 'error'){
      console.error(out);
    } else {
      console.log(out);
    }
  };

  /**
   * Get calling function
   * @param {int} depth Max depth to go in call-stack.
   * @returns {string} Function name.
   */
  var _getCaller = function(depth) {
    if(!_printFuncName) {
      return "";
    }
    try {
      var caller = arguments.callee.caller;
      depth = depth === undefined ? 0 : depth;
      var funcName = "global/anonymous";
      for(var i=1;i<depth;i++) {
        if(caller.caller) {
          caller = caller.caller;
        }
      }
      if(caller.name !== "") {
        funcName = caller.name;
      }
      return "[" + funcName + "]";
    }  catch(e) {
      return "[unknown/strict]";
    }
  };

  /**
   * Set depth to use when printing objects (in trace).
   * @param {number} value Maximum depth to use.
   */
  this.setObjectMaxDepth = function setObjectMaxDepth(value) {
    // this.depth should in next major version be a private variable.
    _depth = value;
  };

  /**
   * If function names should be printed in the output, this should be set to true.
   * Default is true.
   * @param {boolean} state State to set it to.
   */
  this.showFunctionName = function showFunctionName(state) {
    _printFuncName = state;
  };

  /**
   * Set color of a tag.
   * @param {string} tag Tag name (debug, trace, error, info or warning).
   * @param {string} color Color as string (black, red, green, yellow, blue, purple, cyan, white).
   */
  this.setColor = function setTagColor(tag, color) {
    color = color.toLowerCase();
    tag = tag.toLowerCase();
    if(_colors.normal[color] === undefined) {
      _print("error", "Failed to set color of tag with name %s. The color (%s) is not a valid color.", [tag, color]);
    } else if(_tags[tag] === undefined) {
      _print("error", "Failed to set color of tag with name %s. The tag does not exist.", [tag]);
    }
    _tags[tag].color = _colors.normal[color];
  };

  /**
   * Set one or many tags to active or inactive.
   * @param {boolean} value True if active, false if inactive.
   * @param {...} args Argument list, one or many string of which to set to given value.
   */
  this['set'] = function setTagState(value, args) {
    for(var i=1;i<arguments.length;i++) {
      var tag = arguments[i].toLowerCase();
      if(tag in _tags) {
        _tags[tag].active = value;
      } else {
        _print("error", "Failed to set tag " + tag + " to " + (value ? "Active" : "Inactive") + ", tag do not exist.", null);
      }
    }
  };

  /**
   * Get current state of given tag.
   * @param {string} tag Tag as string.
   * @return {undefined|boolean} If tag is active, true, else false. If tag does not exist, undefined.
   */
  this['get'] = function getTagState(tag) {
    if(!tag) { return undefined; }
    tag = tag.toLowerCase();
    if(tag in _tags) {
      return _tags[tag].active;
    }
    return undefined;
  };

  /**
   * Output arguments to trace log.
   * @param {...} args Argument list.
   */
  this.trace = function trace(args) {
    if(_tags.trace.active) {
      var reg = new RegExp('\r?\n','g');
      var out = _tags.trace.color + "Trace\t(" + (new Date()).toLocaleTimeString() + ")" + _getCaller(2) + ": " + _colors.reset + _tags.trace.color + " [ length: " + arguments.length + " ] " + _colors.reset + _eol;
      for (var i = 0, il = arguments.length; i < il; i++) {
        out += _tags.trace.color + "["+ i + "]\t" + _colors.reset;
        var text = _util.inspect(arguments[i], { showHidden: true, depth: _depth });
        out += text.replace(reg, _tags.trace.color + _eol + " *\t" + _colors.reset) + _colors.reset;
        out += _eol;
      }
      out += _tags.trace.color + "end trace" + _colors.reset;
      console.log(out);
    }
  };

  /**
   * Prints a debug string to stdout.
   * The string uses % placeholders and replaces them with arguments passed.
   * Possible placeholders: %s - string, %d - number, %j json.
   * @param {string} str String to print.
   * @param {...} args Argument list.
   */
  this.debug = function debug(str, args) {
    if(_tags.debug.active) {
      _print("debug", str, (args !== undefined ? Array.prototype.slice.call(arguments, 1) : []));
    }
  };

  /**
   * Prints a error string to stderr.
   * The string uses % placeholders and replaces them with arguments passed.
   * Possible placeholders: %s - string, %d - number, %j json.
   * @param {string} str String to print.
   * @param {...} args Argument list.
   */
  this.error = function error(str, args) {
    if(_tags.error.active) {
       _print("error", str, (args !== undefined ? Array.prototype.slice.call(arguments, 1) : []));
    }
  };

  /**
   * Prints a warning string to stdout.
   * The string uses % placeholders and replaces them with arguments passed.
   * Possible placeholders: %s - string, %d - number, %j json.
   * @param {string} str String to print.
   * @param {...} args Argument list.
   */
  this.warning = function warning(str, args) {
    if(_tags.warning.active) {
      _print("warning", str, (args !== undefined ? Array.prototype.slice.call(arguments, 1) : []));
    }
  };

  /**
   * Prints a info string to stdout.
   * The string uses % placeholders and replaces them with arguments passed.
   * Possible placeholders: %s - string, %d - number, %j json.
   * @param {string} str String to print.
   * @param {...} args Argument list.
   */
  this.info = function info(str, args) {
    if(_tags.info.active) {
      _print("info", str, (args !== undefined ? Array.prototype.slice.call(arguments, 1) : []));
    }
  };

  /**
   * Prints a to-do string to stdout.
   * The string uses % placeholders and replaces them with arguments passed.
   * Possible placeholders: %s - string, %d - number, %j json.
   * @param {string} str String to print.
   * @param {...} args Argument list.
   */
  this.todo = function todo(str, args) {
    if(_tags.todo.active){
      _print("todo", str, (args !== undefined ? Array.prototype.slice.call(arguments,1) : []));
    }
  };
}

module.exports = new Yolog();


text:
package org.jreversepro.jls;

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

import org.jreversepro.jvm.LanguageContext;

public class JLSLanguageContext implements LanguageContext, JLSConstants {

  static {
    loadKeywords();
  }

  public String getTypeBoolean() {
    return JLS_TYPE_BOOLEAN;
  }

  public String getTypeChar() {
    return JLS_TYPE_CHAR;
  }

  public String getTypeDouble() {
    return JLS_TYPE_DOUBLE;
  }

  public String getTypeFloat() {
    return JLS_TYPE_FLOAT;
  }

  public String getTypeInt() {
    return JLS_TYPE_INT;
  }

  public String getTypeLong() {
    return JLS_TYPE_LONG;
  }

  public String getArrayTypeSuffix() {
    return JLS_TYPE_ARRAY_SUFFIX;
  }

  public String getTypeShort() {
    return JLS_TYPE_SHORT;
  }

  public String getTypeVoid() {
    return JLS_TYPE_VOID;
  }

  public static List<String> getKeywordList() {
    return keywordList;
  }

  private static void loadKeywords() {
    keywordList = new ArrayList<String>();

    keywordList.add(ACCESS_ABSTRACT);
    keywordList.add(JLS_TYPE_DOUBLE);
    keywordList.add(JLS_TYPE_INT);
    keywordList.add(ACCESS_STRICTFP);
    keywordList.add(JLS_TYPE_BOOLEAN);
    keywordList.add(ELSE);
    keywordList.add(INTERFACE);
    keywordList.add(SUPER);
    keywordList.add(ACCESS_SYNCHRONIZED);
    keywordList.add(BREAK);
    keywordList.add(EXTENDS);
    keywordList.add(JLS_TYPE_LONG);
    keywordList.add(SWITCH);
    keywordList.add(JLS_TYPE_BYTE);
    keywordList.add(ACCESS_FINAL);
    keywordList.add(ACCESS_NATIVE);
    keywordList.add(CASE);
    keywordList.add(FINALLY);
    keywordList.add(NEW);
    // keywordList.add("this");
    keywordList.add(CATCH);
    keywordList.add(JLS_TYPE_FLOAT);
    keywordList.add(PACKAGE);
    keywordList.add(THROW);
    keywordList.add(JLS_TYPE_CHAR);
    keywordList.add(FOR);
    keywordList.add(ACCESS_PRIVATE);
    keywordList.add(THROWS);
    keywordList.add(CLASS);
    keywordList.add(GOTO);
    keywordList.add(ACCESS_PROTECTED);
    keywordList.add(ACCESS_TRANSIENT);
    keywordList.add("const");// TODO: is const a java keyword
    keywordList.add(IF);
    keywordList.add(ACCESS_PUBLIC);
    keywordList.add(TRY);
    keywordList.add(CONTINUE);
    keywordList.add(IMPLEMENTS);
    keywordList.add(RETURN);
    keywordList.add(JLS_TYPE_VOID);
    keywordList.add(DEFAULT);
    keywordList.add(IMPORT);
    keywordList.add(JLS_TYPE_SHORT);
    keywordList.add(ACCESS_VOLATILE);
    keywordList.add(DO);
    keywordList.add(INSTANCEOF);
    keywordList.add(ACCESS_STATIC);
    keywordList.add(WHILE);

  }

  private static List<String> keywordList;

}

redpajama_set_name: RedPajamaGithub


text:
namespace blink {

class TaskAttributionTiming;
using TaskAttributionVector = HeapVector<Member<TaskAttributionTiming>>;

class PerformanceLongTaskTiming final : public PerformanceEntry {
  DEFINE_WRAPPERTYPEINFO();

 public:
  static PerformanceLongTaskTiming* create(double startTime,
                                           double endTime,
                                           String name,
                                           String frameSrc,
                                           String frameId,
                                           String frameName);

  TaskAttributionVector attribution() const;

  DECLARE_VIRTUAL_TRACE();

 private:
  PerformanceLongTaskTiming(double startTime,
                            double endTime,
                            String name,
                            String frameSrc,
                            String frameId,
                            String frameName);
  ~PerformanceLongTaskTiming() override;

  TaskAttributionVector m_attribution;
};

}  // namespace blink

#endif  // PerformanceLongTaskTiming_h


text:
module.exports = function (config) {
    'use strict';

    config.set({

        basePath: '.',
        frameworks: ['jasmine', 'jasmine-diff-print'],

        files: [
            'node_modules/jquery/dist/jquery.js',
            'node_modules/angular/angular.js',
            'node_modules/angular-mocks/angular-mocks.js',
            'node_modules/angular-animate/angular-animate.js',
            'node_modules/angular-aria/angular-aria.js',
            'node_modules/angular-cookies/angular-cookies.js',
            'node_modules/angular-material/angular-material.js',
            'node_modules/angular-resource/angular-resource.js',
            'node_modules/leaflet/dist/leaflet.js',
            'node_modules/angular-leaflet-directive/dist/angular-leaflet-directive.js',
            'node_modules/moment/min/moment-with-locales.min.js',
            'node_modules/angular-loading-bar/build/loading-bar.js',
            'node_modules/libs/*.js',
            'src/common/**/*.js',
            'src/common/templates/**/*.html',
            'src/operations/**/*.js',
            'src/operations/templates/**/*.html'
        ],

        exclude: [],
        preprocessors: {
            'src/common/directives/**/*.js': ['coverage'],
            'src/common/services/**/*.js': ['coverage'],
            'src/operations/controllers/**/*.js': ['coverage'],
            'src/operations/directives/**/*.js': ['coverage'],
            'src/common/templates/**/*.html': ['ng-html2js'],
            'src/operations/templates/**/*.html': ['ng-html2js']
        },
        ngHtml2JsPreprocessor: {
            moduleName: 'templates',
            // The following function removes the first directory from the
            // given path for a template since those are omitted within the
            // distributable template packages and, therefore, they are also
            // omitted within the <templateUrl> parameter of the definition of
            // the directive.
            cacheIdFromPath: function (filepath) {
                var regex = /^(\w+\/)/;
                return filepath.replace(regex, '');
            },
        },

        reporters: ['progress', 'coverage', 'coveralls'],
        coverageReporter: {
            type: 'lcov',
            repoToken: '',
            dir: '.coverage/'
        },

        port: 9876,
        colors: true,
        logLevel: config.LOG_DISABLE,
        autoWatch: true,
        browsers: ['PhantomJS'],
        singleRun: true

    });
};


text:
{
  var touchBank = touchHistory.touchBank;
  var total = 0;
  var count = 0;
  var oneTouchData =
    touchHistory.numberActiveTouches === 1
      ? touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch]
      : null;

  if (oneTouchData !== null) {
    if (
      oneTouchData.touchActive &&
      oneTouchData.currentTimeStamp > touchesChangedAfter
    ) {
      total +=
        ofCurrent && isXAxis
          ? oneTouchData.currentPageX
          : ofCurrent && !isXAxis
            ? oneTouchData.currentPageY
            : !ofCurrent && isXAxis
              ? oneTouchData.previousPageX
              : oneTouchData.previousPageY;
      count = 1;
    }
  } else {
    for (var i = 0; i < touchBank.length; i++) {
      var touchTrack = touchBank[i];

      if (
        touchTrack !== null &&
        touchTrack !== undefined &&
        touchTrack.touchActive &&
        touchTrack.currentTimeStamp >= touchesChangedAfter
      ) {
        var toAdd;

        if (ofCurrent && isXAxis) {
          toAdd = touchTrack.currentPageX;
        } else if (ofCurrent && !isXAxis) {
          toAdd = touchTrack.currentPageY;
        } else if (!ofCurrent && isXAxis) {
          toAdd = touchTrack.previousPageX;
        } else {
          toAdd = touchTrack.previousPageY;
        }

        total += toAdd;
        count++;
      }
    }
  }

  return count > 0 ? total / count : TouchHistoryMath.noCentroid;
}


text:
package xo

import (
	"fmt"
	"io"
	"log"
	"runtime"
	"sync"
	"time"

	"github.com/irifrance/gini/dimacs"
	"github.com/irifrance/gini/inter"
	"github.com/irifrance/gini/z"
)

const (
	// for each Solve() call don't restart until this many conflicts.
	// good for incremental solving.
	RestartAfter  uint  = 1000
	RestartFactor       = 768
	PropTick      int64 = 20000
	CancelTicks   int64 = 1
)

// Solver implements a CDCL like solver with
// some performance bells and whistles
type S struct {
	Vars   *Vars
	Cdb    *Cdb
	Trail  *Trail
	Guess  *Guess
	Driver *Deriver
	Active *Active
	gmu    sync.Mutex
	rmu    sync.Mutex
	luby   *Luby

	// last conflict clause
	x z.C
	// if trivially inconsistent assumptions, first conflicting assumption
	xLit z.Lit

	// keeps level of start of each test (before assumptions)
	testLevels   []int
	endTestLevel int
	// assumptionLevel can be > endTestLevel for untested assumptions
	assumptLevel int
	assumes      []z.Lit // only last set of requested assumptions before solve/test.
	failed       []z.Lit
	phases       phases

	// Control
	control          *Ctl
	restartStopwatch int
	startTime        time.Time
	deadline         time.Time // synchronous (no pause)

	// Stats (each object has its own, read by ReadStats())
	stRestarts  int64
	stSat       int64
	stUnsat     int64
	stEnded     int64
	stPinned    int
	stIncPinned int
	stAssumes   int64
	stFailed    int64
}

// NewS creates a new Solver with default (relatively small) capacity
func NewS() *S {
	_ = z.LitNull
	return NewSVc(128, 768)
}

// NewSV creates a new Solver with specified capacity hint for
// the number of variables.
func NewSV(vCapHint int) *S {
	return NewSVc(vCapHint, vCapHint*8)
}

// NewSVc creates a new solver using specified capacity
// hints for number of variables (vCapHint) and number of clauses (cCapHint).
func NewSVc(vCapHint, cCapHint int) *S {
	vars := NewVars(vCapHint)
	cdb := NewCdb(vars, cCapHint)
	return NewSCdb(cdb)
}

// NewSDimacs creates a new S from a dimacs file.
func NewSDimacs(r io.Reader) (*S, error) {
	vis := &DimacsVis{}
	if e := dimacs.ReadCnf(r, vis); e != nil {
		return nil, fmt.Errorf("error reading dimacs: %s\n", e)
	}
	return vis.S(), nil
}

// Func NewSCdb creates a new Solver from a Cdb
func NewSCdb(cdb *Cdb) *S {
	vars := cdb.Vars
	guess := NewGuessCdb(cdb)
	trail := NewTrail(cdb, guess)
	drv := NewDeriver(cdb, guess, trail)
	s := &S{
		Vars:   vars,
		Cdb:    cdb,
		Trail:  trail,
		Guess:  guess,
		Driver: drv,
		luby:   NewLuby(),
		x:      CNull,
		xLit:   z.LitNull,

		testLevels: make([]int, 0, 128),

		assumptLevel: 0,
		assumes:      make([]z.Lit, 0, 1024),
		failed:       make([]z.Lit, 0, 3),

		restartStopwatch: 0,
		control:          NewCtl(nil)}
	s.control.stFunc = func(st *Stats) *Stats {
		s.ReadStats(st)
		return st
	}
	s.control.xo = s
	s.startTime = time.Now()
	s.deadline = s.startTime
	return s
}

func (s *S) Copy() *S {
	s.rmu.Lock()
	defer s.rmu.Unlock()
	other := &S{}
	other.Vars = s.Vars.Copy()
	other.Cdb = s.Cdb.CopyWith(other.Vars)
	other.Guess = s.Guess.Copy()
	other.Trail = s.Trail.CopyWith(other.Cdb, other.Guess)
	other.Driver = s.Driver.CopyWith(other.Cdb, other.Guess, other.Trail)
	if s.Active != nil {
		other.Active = s.Active.Copy()
		other.Cdb.Active = other.Active
	}
	other.phases = s.phases
	luby := NewLuby()
	*luby = *(s.luby)
	other.luby = luby
	other.x = s.x
	other.xLit = s.xLit
	other.testLevels = make([]int, len(s.testLevels), cap(s.testLevels))
	copy(other.testLevels, s.testLevels)
	other.endTestLevel = s.endTestLevel
	other.assumptLevel = s.assumptLevel
	other.assumes = make([]z.Lit, len(s.assumes), cap(s.assumes))
	copy(other.assumes, s.assumes)
	other.failed = make([]z.Lit, len(s.failed), cap(s.failed))
	copy(other.failed, s.failed)
	other.restartStopwatch = s.restartStopwatch
	other.control = NewCtl(other)
	other.control.stFunc = func(st *Stats) *Stats {
		other.ReadStats(st)
		return st
	}
	other.startTime = s.startTime
	other.deadline = s.deadline
	return other
}

func (s *S) SCopy() inter.S {
	return s.Copy()
}

// GoSolve provides a connection to
// Solve() running in another goroutine.
func (s *S) GoSolve() inter.Solve {
	go func() {
		s.control.cResult <- s.Solve()
	}()
	return s.control
}

func (s *S) String() string {
	s.rmu.Lock()
	defer s.rmu.Unlock()
	return fmt.Sprintf("<xo@%d>", s.Trail.Level)
}

func (s *S) Try(dur time.Duration) int {
	if dur <= 0 {
		return 0
	}
	s.startTime = time.Now()
	s.deadline = s.startTime.Add(dur)
	return s.Solve()
}

// Method Solve solves the problem added to the solver under
// assumptions specified by Assume.
//
// Solve returns -1 if unsat and 1 if sat
func (s *S) Solve() int {
	s.lock()
	defer s.unlock()
	defer func() {
		s.assumptLevel = 0
		s.assumes = s.assumes[:0]
	}()
	trail := s.Trail
	if r := s.solveInit(); r != 0 {
		return r
	}
	vars := s.Vars
	guess := s.Guess
	guess.nextRestart(s.restartStopwatch)
	driver := s.Driver
	cdb := s.Cdb
	aLevel := s.assumptLevel
	var x z.C
	nxtTick := trail.Props + PropTick
	tick := int64(0)

	for {
		x = trail.Prop()
		if x != CNull {
			// conflict
			if trail.Level <= aLevel {
				s.x = x
				s.stUnsat++
				return -1
			}
			drvd := driver.Derive(x)
			if drvd.TargetLevel < aLevel {
				trail.Back(aLevel)
			} else {
				trail.Back(drvd.TargetLevel)
			}
			trail.Assign(drvd.Unit, drvd.P)
			guess.Decay()
			cdb.Decay()
			if drvd.TargetLevel == 0 {
				s.stPinned = trail.Tail
			} else if drvd.TargetLevel <= aLevel {
				s.stIncPinned = trail.Tail
			}
			s.restartStopwatch--
			continue
		}

		// propagation ticker
		if trail.Props > nxtTick {
			nxtTick += PropTick
			tick++
			if tick%CancelTicks == 0 {
				if s.deadline != s.startTime && time.Until(s.deadline) <= 0 {
					return 0
				}
				if !s.control.Tick() {
					s.stEnded++
					trail.Back(s.endTestLevel)
					return 0
				}
			}
		}

		// maybe restart.
		if s.restartStopwatch <= 0 {
			nxt := s.luby.Next()
			s.restartStopwatch = int(nxt * RestartFactor)
			trail.Back(s.assumptLevel)
			s.stRestarts++
			guess.nextRestart(s.restartStopwatch)
		}

		// guess
		m := guess.Guess(vars.Vals)
		if m == z.LitNull {
			errs := cdb.CheckModel()
			if s.Active != nil {
				s.Cdb.checkModel = false
			}
			if len(errs) != 0 {
				for _, e := range errs {
					log.Println(e)
				}
				log.Println(s.Vars)
				log.Println(s.Trail)

				log.Fatalf("%p %p internal error in solve: sat model\n", s, s.control)
			}
			s.stSat++
			//fmt.Printf("vars %s\n", s.Vars)
			return 1
		}
		if u, c, ms := cdb.MaybeCompact(); u != 0 {
			_ = ms
			_ = c
			//log.Printf("compacted %d/%d/%d\n", u, c, ms)
		}
		trail.Assign(m, CNull)
	}
}

// Value retrieves the value of the literal m
func (s *S) Value(m z.Lit) bool {
	return s.Vars.Vals[m] == 1
}

// Test checks if the solver is consistent under unit propagation
// for the current assumptions and clauses and Test opens a scope for
// subsequent assumptions.  Test takes one argument, which is a slice of
// literals in which to put propagated literals or failed assumptions.
//
// Test returns a pair
//
//  (res, ns)
//
// where
//
//  - If res == 1, then the problem is SAT and a full model is found.
//  - If res == 0, then the problem is unknown (but consistent under unit
//    propagation).
//  - If res == -1 then the problem is UNSAT.
//
// Additionally if ns is not nil, then
//
//  - If res in {0,1}, then ns
//  contains all literals assigned under BCP since last Test(), including
//  assumptions.
//  - If res = -1, then ns contains the literals in a clause
//  which is false under unit propagation, or an assumed false literal, whichever
//  we happen upon first. (This is distinct from Why which gives failed literals).
//  - ns is stored in ms if possible
//
// Test operates under the following caveat.
//
//  If Test() or Solve() returns unsat, then Test() should not
//  be called subsequently until Untest() is called and returns 0.  Note
//  That it can be that Untest() will never return 0 if the problem is unsat
//  without assumptions.
//
// If this does not hold, Test panics.
//
func (s *S) Test(ms []z.Lit) (res int, ns []z.Lit) {
	//fmt.Printf("test\n")
	ns = ms
	if ns != nil {
		ns = ns[:0]
	}
	if x := s.cleanupSolve(); x != CNull {
		panic("test after unresolved unsat.")
	}
	res = 0
	s.testLevels = append(s.testLevels, s.Trail.Level)

	trail := s.Trail
	start := trail.Tail
	if r := s.makeAssumptions(); r == -1 {
		ns = nil
		res = -1
		return
	}
	end := trail.Tail
	s.endTestLevel = trail.Level
	if ns != nil {
		for i := start; i != end; i++ {
			ns = append(ns, trail.D[i])
		}
	}
	if !s.Guess.has(s.Vars.Vals) {
		errs := s.Cdb.CheckModel()
		if len(errs) != 0 {
			for _, e := range errs {
				log.Println(e)
			}
			log.Fatal("internal error test: sat model")
		}
		s.stSat++
		return 1, ns
	}
	return 0, ns
}

// Untest removes assumptions since last test and returns -1 if the solver is
// inconsistent under unit propagation after removing assumptions,  0
// otherwise.  If Untest is called and there is no corresponding Test(), then
// Untest panics.
//
// Note that when interleaving Solve,Test,and Untest, the
// following sequences are possible:
//
//  Assume(A1)
//  Test()     ->   0, []
//  Assume(A2)
//  Test()     ->   0
//  Assume(A3)
//  Solve()        -1
//  Untest()   ->  -1, [] // problem is unsat with A1 and A2
//  Untest()   ->  -1, [] // problem is unsat with A1 under BCP, even though it wasn't before
//
//  Assume(A1)
//  Test()     ->   0, [...]
//  Solve()    ->  -1 // unsat under A1
//  Untest()   ->   0
//  Assume(A2) ->
//  Test()     ->   1  // sat under A2
//  Untest()   ->   0
//  Assume(A1)
//  Test()     ->  -1, [] // problem is unsat with A1 under BCP, even though it wasn't before
func (s *S) Untest() int {
	if len(s.testLevels) == 0 {
		panic("Untest without Test")
	}
	trail := s.Trail
	lastTestLevel := s.lastTestLevel()
	s.testLevels = s.testLevels[:len(s.testLevels)-1]
	s.endTestLevel = lastTestLevel
	if x := s.cleanupSolve(); x != CNull {
		s.x = x
		return -1
	}
	s.Trail.backWithLates(lastTestLevel)
	if x := trail.Prop(); x != CNull {
		s.x = x
		return -1
	}
	s.x = CNull
	s.xLit = z.LitNull
	return 0
}

// Reasons returns the Reasons for a propagated literal
// returned from test.
//
// Reasons takes 2 arguments,
//  dst a z.Lit slice in which to place the reasons
//  m the literal for which to supply reasons.
//
// Reasons returns the reasons for m appended to
// dst.
//
// If m is not a propagated literal returned from
// Test() (without Untest() in between), the result
// is undefined and may panic.
func (s *S) Reasons(dst []z.Lit, m z.Lit) []z.Lit {
	dst = dst[:0]
	p := s.Vars.Reasons[m.Var()]
	if p == CNull {
		return dst
	}
	D := s.Cdb.CDat.D
	p++ // invariant that implied reasons are always first in clause
	for {
		r := D[p]
		if r == z.LitNull {
			break
		}
		// invariant m should be the first.
		dst = append(dst, r.Not())
		p++
	}
	return dst
}

// ReadStats reads data from the solver into st.  The solver values are reset
// if they are cumulative.  The duration and start time attributes of st are
// not touched.
func (s *S) ReadStats(st *Stats) {
	s.rmu.Lock()
	defer s.rmu.Unlock()
	st.Restarts += s.stRestarts
	s.stRestarts = 0
	st.Sat += s.stSat
	s.stSat = 0
	st.Unsat += s.stUnsat
	s.stUnsat = 0
	st.Ended += s.stEnded
	s.stEnded = 0
	st.Pinned = s.stPinned
	st.IncPinned = s.stIncPinned
	st.Assumptions += s.stAssumes
	s.stAssumes = 0
	st.Failed += s.stFailed
	s.stFailed = 0
	s.Vars.readStats(st)
	s.Trail.readStats(st)
	s.Guess.readStats(st)
	s.Driver.readStats(st)
	s.Cdb.readStats(st)
}

// Add implements inter.S
func (s *S) Add(m z.Lit) {
	s.ensureLitCap(m)
	if m == z.LitNull {
		s.ensure0()
		s.Cdb.checkModel = true
	}
	loc, u := s.Cdb.Add(m)
	if u != z.LitNull {
		s.Trail.Assign(u, loc)
	}
}

func (s *S) ensureActive() {
	if s.Active == nil {
		s.Active = newActive(int(s.Vars.Top))
		s.Cdb.Active = s.Active
	}
}

func (s *S) Activate() z.Lit {
	s.ensure0()
	s.ensureActive()
	m := s.Active.Lit(s)
	s.Active.ActivateWith(m, s)
	return m
}

func (s *S) ActivationLit() z.Lit {
	s.ensure0()
	s.ensureActive()
	return s.Active.Lit(s)
}

func (s *S) ActivateWith(act z.Lit) {
	s.ensure0()
	s.ensureActive()
	s.Active.ActivateWith(act, s)
}

func (s *S) Deactivate(m z.Lit) {
	s.ensure0()
	s.ensureActive()
	s.Active.Deactivate(s.Cdb, m)
}

func (s *S) ensure0() {
	if len(s.testLevels) != 0 {
		panic("ivalid operation under test scope")
	}
	if s.Trail.Level != 0 {
		s.Trail.Back(0)
	}
	s.x = CNull
	s.xLit = z.LitNull
	s.failed = nil
}

// Assume causes the solver to Assume the literal m to be true for the
// next call to Solve() or Test().
//
// This may be called multiple times, indicating to make multiple assumptions.
// The assumptions hold for the next call to Solve() or Test().  Afterwards, if
// the result is unsat, then s.Why() gives a subset of inconsistent assumptions.
//
// When used with sequences of Test/Untest and Solves, S makes a distinction between
// tested and untested assumptions.  Solve always forgets/consumes untested assumptions;
// but Solve never forgets/consumes tested assumptions.  Forgetting tested assumptions
// is accomplished with s.Untest().
func (s *S) Assume(ms ...z.Lit) {
	s.stAssumes += int64(len(ms))
	s.assumes = append(s.assumes, ms...)
	for _, m := range ms {
		s.ensureLitCap(m)
	}
}

// Who identifies the solver and configuration.
func (s *S) Who() string {
	return fmt.Sprintf("xo.S %s/%s/%d", runtime.GOOS, runtime.GOARCH, runtime.NumCPU())
}

// MaxVar returns the maximum variable added or assumed.
func (s *S) MaxVar() z.Var {
	return s.Vars.Max
}

// Why appends to ms a minimized list of assumptions
// which together caused previous call to be unsat.
//
// If previous call was not unsat, then Why() returns ms
func (s *S) Why(ms []z.Lit) []z.Lit {
	s.failed = ms
	if s.xLit != z.LitNull {
		s.failed = append(s.failed, s.xLit)
		s.final([]z.Lit{s.xLit})
	} else if s.x != CNull {
		s.final(s.Cdb.Lits(s.x, nil))
	} else {
		return ms
	}
	return s.failed
}

// returns -1 if known to be inconsistent by BCP
// 0 otherwise.
func (s *S) solveInit() int {

	// set up restarts TODO(wsc) optimize this
	s.luby = NewLuby()
	for {
		r := s.luby.Next() * RestartFactor
		if r >= RestartAfter {
			s.restartStopwatch = int(r)
			break
		}
	}
	if x := s.cleanupSolve(); x != CNull {
		s.x = x
		return -1
	}

	//log.Printf("%s\n", s.Trail)
	//log.Printf("%s\n", s.Vars)
	// make any new assumptions
	if r := s.makeAssumptions(); r == -1 {
		return r
	}
	//log.Printf("%s\n", s.Trail)
	//log.Printf("%s\n", s.Vars)

	// initialize phase
	s.phases = s.phases.init(s)
	return 0
}

// can fail to clean up if a a unit propagates
// to a level properly lower than the highest
// test scope and the highest test scope
// contains the negation of that unit.  pass
// this info to caller in the form of return
// value for placing in s.x, or panicking if
// it indicates an invalid usage, such as a
// test after an unresolved unsat.
func (s *S) cleanupSolve() z.C {
	trail := s.Trail
	for s.x != CNull {
		if s.Cdb.Bot != CNull { // Cdb.Bot is always checked in makeAssumptions, true empty clause.
			s.x = CNull
			break
		}
		drvd := s.Driver.Derive(s.x)
		if drvd.TargetLevel < s.endTestLevel {
			trail.Back(s.endTestLevel)
			if s.Vars.Levels[drvd.Unit.Var()] == -1 {
				trail.Assign(drvd.Unit, drvd.P)
				s.x = trail.Prop()
				continue
			}
			return drvd.P
		}
		trail.Back(drvd.TargetLevel)
		trail.Assign(drvd.Unit, drvd.P)
		s.x = trail.Prop()
		continue
	}
	trail.Back(s.endTestLevel)
	s.xLit = z.LitNull
	s.failed = nil
	return CNull
}

func (s *S) lastTestLevel() int {
	if len(s.testLevels) > 0 {
		return s.testLevels[len(s.testLevels)-1]
	}
	return 0
}

func (s *S) makeAssumptions() int {
	// make assumptions
	trail := s.Trail
	s.stAssumes += int64(len(s.assumes))
	s.assumptLevel = trail.Level
	s.stPinned = trail.Tail
	defer func() {
		s.assumes = s.assumes[:0]
	}()
	// check if consistent without assumptions
	if s.Cdb.Bot != CNull {
		s.x = s.Cdb.Bot
		return -1
	}
	if x := trail.Prop(); x != CNull {
		s.x = x
		return -1
	}
	vals := s.Vars.Vals
	for _, m := range s.assumes {
		switch vals[m] {
		case 0:
			s.assumptLevel++
			trail.Assign(m, CNull)
			if x := trail.Prop(); x != CNull {
				s.x = x
				return -1
			}
			s.stIncPinned = trail.Tail
		case 1:
			// nothing
		case -1:
			s.xLit = m
			s.stFailed++
			return -1
		default:
			panic(fmt.Sprintf("bad value %d\n", vals[m]))
		}
	}
	return 0
}

func (s *S) final(ms []z.Lit) {
	marks := make([]bool, s.Vars.Max+1)
	for _, m := range ms {
		s.finalRec(m, marks)
	}
	return
}

// FinalRec computes the assumptions which caused
// the problem to be unsat (causality here is wrt bcp)
// and records them in s.Failed
func (s *S) finalRec(m z.Lit, marks []bool) {
	if marks[m.Var()] {
		return
	}
	marks[m.Var()] = true

	r := s.Vars.Reasons[m.Var()]
	if r == CNull {
		s.failed = append(s.failed, m.Not())
		s.stFailed++
		return
	}
	D := s.Cdb.CDat.D
	for r = r + 1; ; r++ {
		n := D[r]
		if n == z.LitNull {
			break
		}
		s.finalRec(n, marks)
	}
	return
}

// Lit returns the positive literal of a fresh variable.
func (s *S) Lit() z.Lit {
	n := s.Vars.Max + 1
	m := n.Pos()
	s.ensureLitCap(m)
	return m
}

// we keep a global track of variable/literal capacity here.
// when we need to grow, all subcomponents grow.
func (s *S) ensureLitCap(m z.Lit) {
	vars := s.Vars
	mVar := m.Var()
	top := vars.Top
	grow := mVar >= top
	if grow {
		for top <= mVar {
			top *= 2
		}
		vars.growToVar(top)
		s.Cdb.growToVar(top)
		s.Trail.growToVar(top)
		s.Guess.growToVar(top)
		s.Driver.growToVar(top)
		if s.Active != nil {
			s.Active.growToVar(top)
		}
	}
	if mVar > vars.Max {
		for i := vars.Max + 1; i <= mVar; i++ {
			s.Guess.Push(i.Pos())
		}
		vars.Max = mVar
	}
}

func (s *S) lock() {
	s.gmu.Lock()
	s.rmu.Lock()
}

func (s *S) unlock() {
	s.gmu.Unlock()
	s.rmu.Unlock()
}


text:
package com.googlecode.wickedcharts.highcharts.options;

import java.io.Serializable;

/**
 * Describes either a pixel value or a percentage value.
 *
 * @see <a
 *      href="http://api.highcharts.com/highcharts#plotOptions.pie.innerSize">http://api.highcharts.com/highcharts#plotOptions.pie.innerSize</a>
 *      and others
 * @author Tom Hombergs (tom.hombergs@gmail.com)
 *
 */
public class PixelOrPercent implements Serializable {

	public enum Unit {
		PERCENT,

		PIXELS;
	}

	private static final long serialVersionUID = 1L;

	private final int value;

	private final Unit unit;;

	public PixelOrPercent(final int value, final Unit unit) {
		this.value = value;
		this.unit = unit;
	}

	public Unit getUnit() {
		return this.unit;
	}

	public int getValue() {
		return this.value;
	}

}


text:
<!DOCTYPE html>

<title>OffscreenCanvas test: 2d.drawImage.negativedir</title>
<meta name="timeout" content="long">

2d.drawImage.negativedir

Negative dimensions do not affect the direction of the image


text:
GUI Helper(on Windows) for using new FFmpeg GIF encoder with color palette generation support. Bundles with AviUtl installer.

## How to use
1. download the VBScript file
2. download FFmpeg (latest)
3. downlaod gifsicle
4. put the above files in a folder
5. drag-and-drop your video file(s) on to the VBScript icon
6. Enjoy!


text:
package gov.sandia.cognition.learning.function.categorization;

import gov.sandia.cognition.evaluator.Evaluator;
import gov.sandia.cognition.learning.algorithm.AbstractBatchLearnerContainer;
import gov.sandia.cognition.learning.algorithm.BatchLearner;
import gov.sandia.cognition.learning.algorithm.SupervisedBatchLearner;
import gov.sandia.cognition.learning.data.InputOutputPair;
import gov.sandia.cognition.util.AbstractCloneableSerializable;
import gov.sandia.cognition.util.ObjectUtil;
import java.util.Collection;
import java.util.Set;
import java.util.TreeSet;

/**
 * The {@code EvaluatorToCategorizerAdapter} class implements an adapter from a
 * general {@code Evaluator} to be a {@code Categorizer}. This is done by just
 * having a reference to the evaluator plus a field to store the list of
 * possible output categories.
 *
 * @param   <InputType> The type of the input to categorize.
 * @param   <CategoryType> The type of the output categories.
 * @author  Justin Basilico
 * @since   2.0
 */
public class EvaluatorToCategorizerAdapter<InputType, CategoryType>
    extends AbstractCategorizer<InputType, CategoryType>
{

    /** The evaluator that is being wrapped into a categorizer. */
    private Evaluator<? super InputType, ? extends CategoryType> evaluator;

    /**
     * Creates a new {@code EvaluatorToCategorizerAdapter}.
     */
    public EvaluatorToCategorizerAdapter()
    {
        this(null, new TreeSet<CategoryType>());
    }

    /**
     * Creates a new {@code EvaluatorToCategorizerAdapter}.
     *
     * @param   evaluator The evaluator to turn into a categorizer.
     * @param   categories The list of possible output categories.
     */
    public EvaluatorToCategorizerAdapter(
        final Evaluator<? super InputType, ? extends CategoryType> evaluator,
        final Set<CategoryType> categories)
    {
        super(categories);

        this.setEvaluator(evaluator);
    }

    public CategoryType evaluate(
        final InputType input)
    {
        return this.evaluator.evaluate(input);
    }

    /**
     * Gets the evaluator that is to be adapted to be a categorizer.
     *
     * @return  The evaluator to adapt.
     */
    public Evaluator<? super InputType, ? extends CategoryType> getEvaluator()
    {
        return evaluator;
    }

    /**
     * Sets the evaluator that is to be adapted to be a categorizer.
     *
     * @param   evaluator The evaluator to adapt.
     */
    public void setEvaluator(
        final Evaluator<? super InputType, ? extends CategoryType> evaluator)
    {
        this.evaluator = evaluator;
    }

    @Override
    public void setCategories(
        final Set<CategoryType> categories)
    {
        super.setCategories(categories);
    }

    /**
     * The {@code EvaluatorToCategorizerAdapter.Learner} class implements a
     * simple supervised learner for a {@code EvaluatorToCategorizerAdapter}.
     *
     * @param <InputType> The type of the input values.
     * @param <CategoryType> The type of the output categories.
     */
    public static class Learner<InputType, CategoryType>
        extends AbstractBatchLearnerContainer<BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType, CategoryType>>, ? extends Evaluator<? super InputType, ? extends CategoryType>>>
        implements SupervisedBatchLearner<InputType,CategoryType,EvaluatorToCategorizerAdapter<InputType, CategoryType>>
    {
        /**
         * Creates a new {@code EvaluatorToCategorizerAdapter}.
         */
        public Learner()
        {
            this(null);
        }

        /**
         * Creates a new {@code EvaluatorToCategorizerAdapter}.
         *
         * @param   learner The learner to adapt the output of to be a
         *          categorizer.
         */
        public Learner(
            final BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType, CategoryType>>, ? extends Evaluator<? super InputType, ? extends CategoryType>> learner)
        {
            super();
            this.setLearner(learner);
        }

        @Override
        @SuppressWarnings("unchecked")
        public Learner<InputType,CategoryType> clone()
        {
            return (Learner<InputType,CategoryType>) super.clone();
        }

        @SuppressWarnings("unchecked")
        public EvaluatorToCategorizerAdapter<InputType, CategoryType> learn(
            Collection<? extends InputOutputPair<? extends InputType, CategoryType>> data)
        {
            final Evaluator<? super InputType, ? extends CategoryType> learned =
                (Evaluator<? super InputType, ? extends CategoryType>) this.getLearner().learn(data);

            // Go through the input data to determine the possible output
            // categories.
            final TreeSet<CategoryType> categories =
                new TreeSet<CategoryType>();
            for (InputOutputPair<? extends InputType, ? extends CategoryType>
                 example : data)
            {
                categories.add(example.getOutput());
            }

            return new EvaluatorToCategorizerAdapter<InputType, CategoryType>(
                learned, categories);
        }

        /**
         * Gets the learner whose output is to be adapted to be a categorizer.
         *
         * @return  The learner to adapt the output of.
         */
        public BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType, CategoryType>>, ? extends Evaluator<? super InputType, ? extends CategoryType>> getLearner()
        {
            return this.learner;
        }

        /**
         * Sets the learner whose output is to be adapted to be a categorizer.
         *
         * @param   learner The leaner to adapt the output of.
         */
        public void setLearner(
            final BatchLearner<? super Collection<? extends InputOutputPair<? extends InputType, CategoryType>>, ? extends Evaluator<? super InputType, ? extends CategoryType>> learner)
        {
            this.learner = learner;
        }

    }

}


text:
[![CK Version](http://img.shields.io/cookbook/v/nodejs.svg)](https://supermarket.getchef.com/cookbooks/nodejs) [![Build Status](https://img.shields.io/travis/redguide/nodejs.svg)](https://travis-ci.org/redguide/nodejs)
[![Gitter chat](https://badges.gitter.im/redguide/nodejs.png)](https://gitter.im/redguide/nodejs)

## DESCRIPTION

Installs node.js/io.js and manage npm

## USAGE

Include the nodejs recipe to install node on your system based on the default installation method:
```chef
include_recipe "nodejs"
```

### Engine

You can select different engine by setting `node['nodejs']['engine']`
```
node['nodejs']['engine'] => 'node' # default
node['nodejs']['engine'] => 'iojs'
```

You can also use recipes `nodejs::nodejs` or `nodejs::iojs`.

### Install methods

#### Package

Install node from packages:

```chef
node['nodejs']['install_method'] = 'package' # Not necessary because it's the default
include_recipe "nodejs"
# Or
include_recipe "nodejs::nodejs_from_package"
```
Note that only apt (Ubuntu, Debian) appears to have up to date packages available.
Centos, RHEL, etc are non-functional (try `nodejs_from_binary` for those).

#### Binary

Install node from official prebuilt binaries:
```chef
node['nodejs']['install_method'] = 'binary'
include_recipe "nodejs"
# Or
include_recipe "nodejs::nodejs_from_binary"
```

#### Source

Install node from sources:
```chef
node['nodejs']['install_method'] = 'source'
include_recipe "nodejs"
# Or
include_recipe "nodejs::nodejs_from_source"
```

## NPM

Npm is included in nodejs installs by default.
By default, we are using it and call it `embedded`.
Adding recipe `nodejs::npm` assure you to have npm installed and let you choose install method with `node['nodejs']['npm']['install_method']`
```chef
include_recipe "nodejs::npm"
```
_Warning:_ This recipe will include the `nodejs` recipe, which by default includes `nodejs::nodejs_from_package` if you did not set `node['nodejs']['install_method']`.

## LWRP

### nodejs_npm

`nodejs_npm` let you install npm packages from various sources:
* npm registry:
 * name: `attribute :package`
 * version: `attribute :version` (optionnal)
* url: `attribute :url`
 * for git use `git://{your_repo}`
* from a json (packages.json by default): `attribute :json`
 * use `true` for default
 * use a `String` to specify json file

Packages can be installed globally (by default) or in a directory (by using `attribute :path`)

You can specify an `NPM_TOKEN` environment variable for accessing [NPM private modules](https://docs.npmjs.com/private-modules/intro) by using `attribute :npm_token`

You can append more specific options to npm command with `attribute :options` array :
 * use an array of options (w/ dash), they will be added to npm call.
 * ex: `['--production','--force']` or `['--force-latest']`

This LWRP attempts to use vanilla npm as much as possible (no custom wrapper).

### Packages

```ruby
nodejs_npm "express"

nodejs_npm "async" do
  version "0.6.2"
end

nodejs_npm "request" do
  url "github mikeal/request"
end

nodejs_npm "grunt" do
  path "/home/random/grunt"
  json true
  user "random"
end

nodejs_npm "my_private_module" do
  path "/home/random/myproject" # The root path to your project, containing a package.json file
  json true
  npm_token "12345-abcde-e5d4c3b2a1"
  user "random"
  options ['--production'] # Only install dependencies. Skip devDependencies
end
```
[Working Examples](test/cookbooks/nodejs_test/recipes/npm.rb)

Or add packages via attributes (which accept the same attributes as the LWRP above):

```json
"nodejs": {
  "npm_packages": [
    {
      "name": "express"
    },
    {
      "name": "async",
      "version": "0.6.2"
    },
    {
      "name": "request",
      "url": "github mikeal/request"
    }
    {
      "name": "grunt",
      "path": "/home/random/grunt",
      "json": true,
      "user": "random"
    }
  ]
}
```

## AUTHORS

* Marius Ducea (marius@promethost.com)
* Nathan L Smith (nlloyds@gmail.com)
* Guilhem Lettron (guilhem@lettron.fr)
* Barthelemy Vessemont (bvessemont@gmail.com)


text:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="me.ykrank.s1next">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!-- to update image loader policy -->
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <!-- only need IMEI to verify user -->
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <!-- see https://code.google.com/p/android/issues/detail?id=170734 -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- self update -->
    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <queries>
        <package android:name="com.eg.android.AlipayGphone" />
        <intent>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data
                android:host="bbs.saraba1st.com"
                android:pathPattern=".*"
                android:scheme="https" />
        </intent>
    </queries>

    <application
        android:name=".App"
        android:allowBackup="true"
        android:fullBackupContent="@xml/backup"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:supportsRtl="true"
        android:theme="@style/Theme.Light.AfternoonTea"
        android:usesCleartextTraffic="true"
        tools:ignore="UnusedAttribute"
        tools:replace="android:theme">

        <!-- Bugly -->
        <meta-data
            android:name="BUGLY_APP_CHANNEL"
            android:value="${APP_CHANNEL}" />
        <!-- 配置Bugly调试模式(true或者false)-->
        <meta-data
            android:name="BUGLY_ENABLE_DEBUG"
            android:value="false" />

        <!-- TalkingData-->
        <meta-data
            android:name="TD_APP_ID"
            android:value="94B8FFC6A2CF49D6B1CBE8378B0B99C9" />
        <meta-data
            android:name="TD_CHANNEL_ID"
            android:value="${APP_CHANNEL}" />

        <activity
            android:name=".view.activity.LoginActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/activity_label_login"
            android:windowSoftInputMode="stateVisible|adjustResize" />

        <activity
            android:name=".view.page.app.AppLoginActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/action_app_login"
            android:windowSoftInputMode="stateVisible|adjustResize" />

        <activity
            android:name=".view.activity.ForumActivity"
            android:colorMode="wideColorGamut"
            android:launchMode="singleTop"
            android:windowSoftInputMode="adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".view.activity.SettingsActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/settings" />

        <activity
            android:name=".view.activity.HelpActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/help"
            android:process=":webView" />

        <activity
            android:name=".view.activity.FavouriteListActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.ThreadListActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.page.post.PostListActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.page.app.AppPostListActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.page.post.PostListGatewayActivity"
            android:colorMode="wideColorGamut"
            android:theme="@style/Theme.Translucent.Light">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="www.saraba1st.com"
                    android:pathPattern=".*"
                    android:scheme="http" />

                <data
                    android:host="www.saraba1st.com"
                    android:pathPattern=".*"
                    android:scheme="https" />

                <data
                    android:host="bbs.saraba1st.com"
                    android:pathPattern=".*"
                    android:scheme="http" />

                <data
                    android:host="bbs.saraba1st.com"
                    android:pathPattern=".*"
                    android:scheme="https" />

                <data
                    android:host="bbs.stage1.cc"
                    android:pathPattern=".*"
                    android:scheme="http" />

                <data
                    android:host="bbs.stage1.cc"
                    android:pathPattern=".*"
                    android:scheme="https" />

                <data
                    android:host="stage1st.com"
                    android:pathPattern=".*"
                    android:scheme="http" />

                <data
                    android:host="stage1st.com"
                    android:pathPattern=".*"
                    android:scheme="https" />

                <data
                    android:host="www.stage1st.com"
                    android:pathPattern=".*"
                    android:scheme="http" />

                <data
                    android:host="www.stage1st.com"
                    android:pathPattern=".*"
                    android:scheme="https" />
            </intent-filter>
        </activity>

        <activity
            android:name=".view.activity.ReplyActivity"
            android:colorMode="wideColorGamut" />

        <activity
            android:name=".view.activity.NewThreadActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/title_new_thread" />

        <activity
            android:name=".view.page.edit.EditPostActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/title_edit_post" />

        <activity
            android:name=".view.activity.GalleryActivity"
            android:colorMode="wideColorGamut"
            android:theme="@style/Theme.Gallery" />

        <activity
            android:name=".view.activity.PmActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/pms"
            android:windowSoftInputMode="adjustResize" />

        <activity
            android:name=".view.activity.NewPmActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/title_new_pm" />

        <activity
            android:name=".view.activity.SearchActivity"
            android:colorMode="wideColorGamut"
            android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
            </intent-filter>
        </activity>

        <activity
            android:name=".view.activity.NoteActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/title_note"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.UserHomeActivity"
            android:colorMode="wideColorGamut"
            android:label=""
            android:theme="@style/Theme.Translucent.AfternoonTea"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.FriendListActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/title_friends"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.UserThreadActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.UserReplyActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.NewRateActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.NewReportActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.HistoryActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/title_history"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.DarkRoomActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <activity
            android:name=".view.activity.OpenSourceLicensesActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/open_source_licenses" />

        <activity
            android:name=".view.activity.OpenSourceLicenseDetailActivity"
            android:colorMode="wideColorGamut" />

        <activity
            android:name=".view.activity.WebViewActivity"
            android:colorMode="wideColorGamut"
            android:windowSoftInputMode="adjustPan" />

        <!-- FilePicker -->

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/nnf_provider_paths" />
        </provider>

        <activity
            android:name="com.nononsenseapps.filepicker.FilePickerActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/app_name"
            android:theme="@style/FilePickerTheme">
            <intent-filter>
                <action android:name="android.intent.action.GET_CONTENT" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity
            android:name=".view.activity.RateDetailsListActivity"
            android:colorMode="wideColorGamut"
            android:label="@string/rate" />

        <activity
            android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
            android:colorMode="wideColorGamut"
            android:exported="true" />
    </application>

</manifest>


text:
#region Copyright
//
// DotNetNuke® - http://www.dotnetnuke.com
// Copyright (c) 2002-2014
// by DotNetNuke Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
// to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions
// of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#endregion

using System.Collections.Generic;

namespace DotNetNuke.Entities.Content.Workflow.Repositories
{
    /// <summary>
    /// This class is responsible to persist and retrieve workflow entity
    /// </summary>
    internal interface IWorkflowRepository
    {
        /// <summary>
        /// This method gets the list of system portal workflows
        /// </summary>
        /// <param name="portalId">Portal Id</param>
        /// <returns>List of system workflows of the portal</returns>
        IEnumerable<Entities.Workflow> GetSystemWorkflows(int portalId);

        /// <summary>
        /// This method gets the list of portal workflows
        /// </summary>
        /// <param name="portalId">Portal Id</param>
        /// <returns>List of workflows of the portal</returns>
        IEnumerable<Entities.Workflow> GetWorkflows(int portalId);

        /// <summary>
        /// This method gets the Workflow by Id
        /// </summary>
        /// <param name="workflowId">Workflow Id</param>
        /// <returns>Workflow entity</returns>
        Entities.Workflow GetWorkflow(int workflowId);

        /// <summary>
        /// This method gets the Workflow by Content Item Id
        /// </summary>
        /// <param name="contentItem">Content Item entity</param>
        /// <returns>Workflow entity</returns>
        Entities.Workflow GetWorkflow(ContentItem contentItem);

        /// <summary>
        /// This method persists a new workflow entity
        /// </summary>
        /// <param name="workflow">Workflow entity</param>
        void AddWorkflow(Entities.Workflow workflow);

        /// <summary>
        /// This method persists changes for a workflow entity
        /// </summary>
        /// <param name="workflow">Workflow entity</param>
        void UpdateWorkflow(Entities.Workflow workflow);

        /// <summary>
        /// This method hard deletes a workflow
        /// </summary>
        /// <param name="workflow">Workflow entity</param>
        void DeleteWorkflow(Entities.Workflow workflow);
    }
}


text:
extern zend_class_entry *ice_i18n_plural_french_ce;

ZEPHIR_INIT_CLASS(Ice_I18n_Plural_French);

PHP_METHOD(Ice_I18n_Plural_French, getCategory);

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ice_i18n_plural_french_getcategory, 0, 1, IS_STRING, 0)
	ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0)
ZEND_END_ARG_INFO()

ZEPHIR_INIT_FUNCS(ice_i18n_plural_french_method_entry) {
	PHP_ME(Ice_I18n_Plural_French, getCategory, arginfo_ice_i18n_plural_french_getcategory, ZEND_ACC_PUBLIC)
	PHP_FE_END
};


text:
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-align-3/#synthesize-baseline">
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">

Test passes if there is a filled green square and no red.


text:
define('modA', function() {
    return 123;
});


text:
namespace content {

MediaSessionServiceImpl::MediaSessionServiceImpl(
    RenderFrameHost* render_frame_host)
    : render_frame_process_id_(render_frame_host->GetProcess()->GetID()),
      render_frame_routing_id_(render_frame_host->GetRoutingID()),
      playback_state_(blink::mojom::MediaSessionPlaybackState::NONE) {
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnServiceCreated(this);
}

MediaSessionServiceImpl::~MediaSessionServiceImpl() {
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnServiceDestroyed(this);
}

// static
void MediaSessionServiceImpl::Create(
    RenderFrameHost* render_frame_host,
    mojo::PendingReceiver<blink::mojom::MediaSessionService> receiver) {
  MediaSessionServiceImpl* impl =
      new MediaSessionServiceImpl(render_frame_host);
  impl->Bind(std::move(receiver));
}

RenderFrameHost* MediaSessionServiceImpl::GetRenderFrameHost() {
  return RenderFrameHost::FromID(render_frame_process_id_,
                                 render_frame_routing_id_);
}

void MediaSessionServiceImpl::DidFinishNavigation() {
  // At this point the BrowsingContext of the frame has changed, so the members
  // need to be reset, and notify MediaSessionImpl.
  SetPlaybackState(blink::mojom::MediaSessionPlaybackState::NONE);
  SetMetadata(nullptr);
  ClearActions();
}

void MediaSessionServiceImpl::FlushForTesting() {
  client_.FlushForTesting();
}

void MediaSessionServiceImpl::SetClient(
    mojo::PendingRemote<blink::mojom::MediaSessionClient> client) {
  client_ = mojo::Remote<blink::mojom::MediaSessionClient>(std::move(client));
}

void MediaSessionServiceImpl::SetPlaybackState(
    blink::mojom::MediaSessionPlaybackState state) {
  playback_state_ = state;
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnMediaSessionPlaybackStateChanged(this);
}

void MediaSessionServiceImpl::SetPositionState(
    const base::Optional<media_session::MediaPosition>& position) {
  position_ = position;
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->RebuildAndNotifyMediaPositionChanged();
}

void MediaSessionServiceImpl::SetMetadata(
    blink::mojom::SpecMediaMetadataPtr metadata) {
  metadata_.reset();

  // When receiving a MediaMetadata, the browser process can't trust that it is
  // coming from a known and secure source. It must be processed accordingly.
  if (!metadata.is_null()) {
    if (!MediaMetadataSanitizer::CheckSanity(metadata)) {
      RenderFrameHost* rfh = GetRenderFrameHost();
      if (rfh) {
        rfh->GetProcess()->ShutdownForBadMessage(
            RenderProcessHost::CrashReportMode::GENERATE_CRASH_DUMP);
      }
      return;
    }

    metadata_ = std::move(metadata);
  }

  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnMediaSessionMetadataChanged(this);
}

void MediaSessionServiceImpl::EnableAction(
    media_session::mojom::MediaSessionAction action) {
  actions_.insert(action);
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnMediaSessionActionsChanged(this);
}

void MediaSessionServiceImpl::DisableAction(
    media_session::mojom::MediaSessionAction action) {
  actions_.erase(action);
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnMediaSessionActionsChanged(this);
}

void MediaSessionServiceImpl::ClearActions() {
  actions_.clear();
  MediaSessionImpl* session = GetMediaSession();
  if (session)
    session->OnMediaSessionActionsChanged(this);
}

MediaSessionImpl* MediaSessionServiceImpl::GetMediaSession() {
  RenderFrameHost* rfh = GetRenderFrameHost();
  if (!rfh)
    return nullptr;

  WebContentsImpl* contents =
      static_cast<WebContentsImpl*>(WebContentsImpl::FromRenderFrameHost(rfh));
  if (!contents)
    return nullptr;

  return MediaSessionImpl::Get(contents);
}

void MediaSessionServiceImpl::Bind(
    mojo::PendingReceiver<blink::mojom::MediaSessionService> receiver) {
  receiver_.reset(new mojo::Receiver<blink::mojom::MediaSessionService>(
      this, std::move(receiver)));
}

}  // namespace content


text:
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//

#include <stdio.h>
#define PROTECTED_THINGS_DISABLE

#include <vgui/MouseCode.h>
#include <KeyValues.h>
#include <vgui/IBorder.h>
#include <vgui/IInput.h>
#include <vgui/ISystem.h>
#include <vgui/IScheme.h>
#include <vgui/ISurface.h>
#include <vgui/ILocalize.h>

#include <vgui_controls/Slider.h>
#include <vgui_controls/Controls.h>
#include <vgui_controls/TextImage.h>

// memdbgon must be the last include file in a .cpp file!!!
#include <tier0/memdbgon.h>

using namespace vgui;

static const float NOB_SIZE = 8.0f;

//-----------------------------------------------------------------------------
// Purpose: Create a slider bar with ticks underneath it
//-----------------------------------------------------------------------------
Slider::Slider(Panel *parent, const char *panelName ) : Panel(parent, panelName)
{
	m_bIsDragOnRepositionNob = false;
	_dragging = false;
	_value = 0;
	_range[0] = 0;
	_range[1] = 0;
	_buttonOffset = 0;
	_sliderBorder = NULL;
	_insetBorder = NULL;
	m_nNumTicks = 10;
	_leftCaption = NULL;
	_rightCaption = NULL;

	SetThumbWidth( 8 );
	RecomputeNobPosFromValue();
	AddActionSignalTarget(this);
	SetBlockDragChaining( true );

	_subrange[ 0 ] = 0;
	_subrange[ 1 ] = 0;
	m_bUseSubRange = false;
	m_bInverted = false;
}

// This allows the slider to behave like it's larger than what's actually being drawn
//-----------------------------------------------------------------------------
// Purpose:
// Input  : bEnable -
//			0 -
//			100 -
//-----------------------------------------------------------------------------
void Slider::SetSliderThumbSubRange( bool bEnable, int nMin /*= 0*/, int nMax /*= 100*/ )
{
	m_bUseSubRange = bEnable;
	_subrange[ 0 ] = nMin;
	_subrange[ 1 ] = nMax;
}

//-----------------------------------------------------------------------------
// Purpose: Set the size of the slider bar.
//			Warning less than 30 pixels tall and everything probably won't fit.
//-----------------------------------------------------------------------------
void Slider::OnSizeChanged(int wide,int tall)
{
	BaseClass::OnSizeChanged(wide,tall);

	RecomputeNobPosFromValue();
}

//-----------------------------------------------------------------------------
// Purpose: Set the value of the slider to one of the ticks.
//-----------------------------------------------------------------------------
void Slider::SetValue(int value, bool bTriggerChangeMessage)
{
	int oldValue=_value;

	if ( _range[0] < _range[1] )
	{
		if(value<_range[0])
		{
			value=_range[0];
		}
		if(value>_range[1])
		{
			value=_range[1];
		}
	}
	else
	{
		if(value<_range[1])
		{
			value=_range[1];
		}
		if(value>_range[0])
		{
			value=_range[0];
		}
	}

	_value = value;

	RecomputeNobPosFromValue();

	if (_value != oldValue && bTriggerChangeMessage)
	{
		SendSliderMovedMessage();
	}
}

//-----------------------------------------------------------------------------
// Purpose: Return the value of the slider
//-----------------------------------------------------------------------------
int Slider::GetValue()
{
	return _value;
}

//-----------------------------------------------------------------------------
// Purpose: Layout the slider before drawing it on screen.
//-----------------------------------------------------------------------------
void Slider::PerformLayout()
{
	BaseClass::PerformLayout();
	RecomputeNobPosFromValue();

	if (_leftCaption)
	{
		_leftCaption->ResizeImageToContent();
	}
	if (_rightCaption)
	{
		_rightCaption->ResizeImageToContent();
	}
}

//-----------------------------------------------------------------------------
// Purpose: Move the nob on the slider in response to changing its value.
//-----------------------------------------------------------------------------
void Slider::RecomputeNobPosFromValue()
{
	//int wide,tall;
	//GetPaintSize(wide,tall);
	int x, y, wide, tall;
	GetTrackRect( x, y, wide, tall );

	float usevalue = _value;
	int *userange = &_range[ 0 ];
	if ( m_bUseSubRange )
	{
		userange = &_subrange[ 0 ];
		usevalue = clamp( _value, _subrange[ 0 ], _subrange[ 1 ] );
	}

	float fwide=(float)wide;
	float frange=(float)(userange[1] -userange[0]);
	float fvalue=(float)(usevalue -userange[0]);
	float fper = (frange != 0.0f) ? fvalue / frange : 0.0f;

	if ( m_bInverted )
		fper = 1.0f - fper;

	float freepixels = fwide - _nobSize;
	float leftpixel = (float)x;
	float firstpixel = leftpixel + freepixels * fper + 0.5f;

	_nobPos[0]=(int)( firstpixel );
	_nobPos[1]=(int)( firstpixel + _nobSize );

	int rightEdge = x + wide;

	if(_nobPos[1]> rightEdge )
	{
		_nobPos[0]=rightEdge-((int)_nobSize);
		_nobPos[1]=rightEdge;
	}

	Repaint();
}

//-----------------------------------------------------------------------------
// Purpose: Sync the slider's value up with the nob's position.
//-----------------------------------------------------------------------------
void Slider::RecomputeValueFromNobPos()
{
	int value = EstimateValueAtPos( _nobPos[ 0 ], 0 );
	SetValue( value );
}

int Slider::EstimateValueAtPos( int localMouseX, int /*localMouseY*/ )
{
	int x, y, wide, tall;
	GetTrackRect( x, y, wide, tall );

	int *userange = &_range[ 0 ];
	if ( m_bUseSubRange )
	{
		userange = &_subrange[ 0 ];
	}

	float fwide = (float)wide;
	float fvalue = (float)( _value - userange[0] );
	float fnob = (float)( localMouseX - x );
	float freepixels = fwide - _nobSize;

	// Map into reduced range
	fvalue = freepixels != 0.0f ? fnob / freepixels : 0.0f;

	return (int) (RemapVal( fvalue, 0.0, 1.0, userange[0], userange[1] ));
}

void Slider::SetInverted( bool bInverted )
{
	m_bInverted = bInverted;
}

//-----------------------------------------------------------------------------
// Purpose: Send a message to interested parties when the slider moves
//-----------------------------------------------------------------------------
void Slider::SendSliderMovedMessage()
{
	// send a changed message
	PostActionSignal(new KeyValues("SliderMoved", "position", _value));
}

//-----------------------------------------------------------------------------
// Purpose: Send a message to interested parties when the user begins dragging the slider
//-----------------------------------------------------------------------------
void Slider::SendSliderDragStartMessage()
{
	// send a message
	PostActionSignal(new KeyValues("SliderDragStart", "position", _value));
}

//-----------------------------------------------------------------------------
// Purpose: Send a message to interested parties when the user ends dragging the slider
//-----------------------------------------------------------------------------
void Slider::SendSliderDragEndMessage()
{
	// send a message
	PostActionSignal(new KeyValues("SliderDragEnd", "position", _value));
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void Slider::ApplySchemeSettings(IScheme *pScheme)
{
	BaseClass::ApplySchemeSettings(pScheme);

	SetFgColor(GetSchemeColor("Slider.NobColor", pScheme));
	// this line is useful for debugging
	//SetBgColor(GetSchemeColor("0 0 0 255"));

	m_TickColor = pScheme->GetColor( "Slider.TextColor", GetFgColor() );
	m_TrackColor = pScheme->GetColor( "Slider.TrackColor", GetFgColor() );

	m_DisabledTextColor1 = pScheme->GetColor( "Slider.DisabledTextColor1", GetFgColor() );
	m_DisabledTextColor2 = pScheme->GetColor( "Slider.DisabledTextColor2", GetFgColor() );

	_sliderBorder = pScheme->GetBorder("ButtonBorder");
	_insetBorder = pScheme->GetBorder("ButtonDepressedBorder");

	if ( _leftCaption )
	{
		_leftCaption->SetFont(pScheme->GetFont("DefaultVerySmall", IsProportional() ));
	}

	if ( _rightCaption )
	{
		_rightCaption->SetFont(pScheme->GetFont("DefaultVerySmall", IsProportional() ));
	}
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void Slider::GetSettings(KeyValues *outResourceData)
{
	BaseClass::GetSettings(outResourceData);

	char buf[256];
	if (_leftCaption)
	{
		_leftCaption->GetUnlocalizedText(buf, sizeof(buf));
		outResourceData->SetString("leftText", buf);
	}

	if (_rightCaption)
	{
		_rightCaption->GetUnlocalizedText(buf, sizeof(buf));
		outResourceData->SetString("rightText", buf);
	}
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void Slider::ApplySettings(KeyValues *inResourceData)
{
	BaseClass::ApplySettings(inResourceData);

	const char *left = inResourceData->GetString("leftText", NULL);
	const char *right = inResourceData->GetString("rightText", NULL);

	int thumbWidth = inResourceData->GetInt("thumbwidth", 0);
	if (thumbWidth != 0)
	{
		SetThumbWidth(thumbWidth);
	}

	SetTickCaptions(left, right);
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
const char *Slider::GetDescription()
{
	static char buf[1024];
	Q_snprintf(buf, sizeof(buf), "%s, string leftText, string rightText", BaseClass::GetDescription());
	return buf;
}

//-----------------------------------------------------------------------------
// Purpose: Get the rectangle to draw the slider track in.
//-----------------------------------------------------------------------------
void Slider::GetTrackRect( int& x, int& y, int& w, int& h )
{
	int wide, tall;
	GetPaintSize( wide, tall );

	x = 0;
	y = 8;
	w = wide - (int)_nobSize;
	h = 4;
}

//-----------------------------------------------------------------------------
// Purpose: Draw everything on screen
//-----------------------------------------------------------------------------
void Slider::Paint()
{
	DrawTicks();

	DrawTickLabels();

	// Draw nob last so it draws over ticks.
	DrawNob();
}

//-----------------------------------------------------------------------------
// Purpose: Draw the ticks below the slider.
//-----------------------------------------------------------------------------
void Slider::DrawTicks()
{
	int x, y;
	int wide,tall;
	GetTrackRect( x, y, wide, tall );

	// Figure out how to draw the ticks
//	GetPaintSize( wide, tall );

	float fwide  = (float)wide;
	float freepixels = fwide - _nobSize;

	float leftpixel = _nobSize / 2.0f;

	float pixelspertick = freepixels / ( m_nNumTicks );

	y += (int)_nobSize;
	int tickHeight = 5;

    if (IsEnabled())
    {
        surface()->DrawSetColor( m_TickColor ); //vgui::Color( 127, 140, 127, 255 ) );
    	for ( int i = 0; i <= m_nNumTicks; i++ )
    	{
    		int xpos = (int)( leftpixel + i * pixelspertick );

    		surface()->DrawFilledRect( xpos, y, xpos + 1, y + tickHeight );
    	}
    }
    else
    {
        surface()->DrawSetColor( m_DisabledTextColor1 ); //vgui::Color( 127, 140, 127, 255 ) );
    	for ( int i = 0; i <= m_nNumTicks; i++ )
    	{
    		int xpos = (int)( leftpixel + i * pixelspertick );
    		surface()->DrawFilledRect( xpos+1, y+1, xpos + 2, y + tickHeight + 1 );
    	}
        surface()->DrawSetColor( m_DisabledTextColor2 ); //vgui::Color( 127, 140, 127, 255 ) );
    	for ( int i = 0; i <= m_nNumTicks; i++ )
    	{
    		int xpos = (int)( leftpixel + i * pixelspertick );
    		surface()->DrawFilledRect( xpos, y, xpos + 1, y + tickHeight );
    	}
    }
}

//-----------------------------------------------------------------------------
// Purpose: Draw Tick labels under the ticks.
//-----------------------------------------------------------------------------
void Slider::DrawTickLabels()
{
	int x, y;
	int wide,tall;
	GetTrackRect( x, y, wide, tall );

	// Figure out how to draw the ticks
//	GetPaintSize( wide, tall );
	y += (int)NOB_SIZE + 4;

	// Draw Start and end range values
    if (IsEnabled())
	    surface()->DrawSetTextColor( m_TickColor ); //vgui::Color( 127, 140, 127, 255 ) );
    else
	    surface()->DrawSetTextColor( m_DisabledTextColor1 ); //vgui::Color( 127, 140, 127, 255 ) );

	if ( _leftCaption != NULL )
	{
		_leftCaption->SetPos(0, y);
        if (IsEnabled())
		{
		    _leftCaption->SetColor( m_TickColor );
		}
        else
		{
		    _leftCaption->SetColor( m_DisabledTextColor1 );
		}

		_leftCaption->Paint();
	}

	if ( _rightCaption != NULL)
	{
		int rwide, rtall;
		_rightCaption->GetSize(rwide, rtall);
		_rightCaption->SetPos((int)(wide - rwide) , y);
        if (IsEnabled())
		{
    		_rightCaption->SetColor( m_TickColor );
		}
		else
		{
    		_rightCaption->SetColor( m_DisabledTextColor1 );
		}

		_rightCaption->Paint();
	}
}

//-----------------------------------------------------------------------------
// Purpose: Draw the nob part of the slider.
//-----------------------------------------------------------------------------
void Slider::DrawNob()
{
	// horizontal nob
	int x, y;
	int wide,tall;
	GetTrackRect( x, y, wide, tall );
	Color col = GetFgColor();
	surface()->DrawSetColor(col);

	int nobheight = 16;

	surface()->DrawFilledRect(
		_nobPos[0],
		y + tall / 2 - nobheight / 2,
		_nobPos[1],
		y + tall / 2 + nobheight / 2);
	// border
	if (_sliderBorder)
	{
		_sliderBorder->Paint(
			_nobPos[0],
			y + tall / 2 - nobheight / 2,
			_nobPos[1],
			y + tall / 2 + nobheight / 2);
	}
}

//-----------------------------------------------------------------------------
// Purpose: Set the text labels of the Start and end ticks.
//-----------------------------------------------------------------------------
void Slider::SetTickCaptions( const char *left, const char *right )
{
	if (left)
	{
		if (_leftCaption)
		{
			_leftCaption->SetText(left);
		}
		else
		{
			_leftCaption = new TextImage(left);
		}
	}
	if (right)
	{
		if (_rightCaption)
		{
			_rightCaption->SetText(right);
		}
		else
		{
			_rightCaption = new TextImage(right);
		}
	}
	InvalidateLayout();
}

//-----------------------------------------------------------------------------
// Purpose: Set the text labels of the Start and end ticks.
//-----------------------------------------------------------------------------
void Slider::SetTickCaptions( const wchar_t *left, const wchar_t *right )
{
	if (left)
	{
		if (_leftCaption)
		{
			_leftCaption->SetText(left);
		}
		else
		{
			_leftCaption = new TextImage(left);
		}
	}
	if (right)
	{
		if (_rightCaption)
		{
			_rightCaption->SetText(right);
		}
		else
		{
			_rightCaption = new TextImage(right);
		}
	}
	InvalidateLayout();
}

//-----------------------------------------------------------------------------
// Purpose: Draw the slider track
//-----------------------------------------------------------------------------
void Slider::PaintBackground()
{
	BaseClass::PaintBackground();

	int x, y;
	int wide,tall;

	GetTrackRect( x, y, wide, tall );

	surface()->DrawSetColor( m_TrackColor );
	surface()->DrawFilledRect( x, y, x + wide, y + tall );
	if (_insetBorder)
	{
		_insetBorder->Paint( x, y, x + wide, y + tall );
	}
}

//-----------------------------------------------------------------------------
// Purpose: Set the range of the slider.
//-----------------------------------------------------------------------------
void Slider::SetRange(int min,int max)
{
	_range[0]=min;
	_range[1]=max;

	if ( _range[0] < _range[1] )
	{
		if(_value<_range[0])
		{
			SetValue( _range[0] );
		}
		else if( _value>_range[1])
		{
			SetValue( _range[1] );
		}
	}
	else
	{
		if(_value<_range[1])
		{
			SetValue( _range[1] );
		}
		else if( _value>_range[0])
		{
			SetValue( _range[0] );
		}
	}
}

//-----------------------------------------------------------------------------
// Purpose: Get the max and min values of the slider
//-----------------------------------------------------------------------------
void Slider::GetRange(int& min,int& max)
{
	min=_range[0];
	max=_range[1];
}

//-----------------------------------------------------------------------------
// Purpose: Respond when the cursor is moved in our window if we are clicking
// and dragging.
//-----------------------------------------------------------------------------
void Slider::OnCursorMoved(int x,int y)
{
	if(!_dragging)
	{
		return;
	}

//	input()->GetCursorPos(x,y);
	input()->GetCursorPosition( x, y );
	ScreenToLocal(x,y);

//	int wide,tall;
//	GetPaintSize(wide,tall);
	int _x, _y, wide, tall;
	GetTrackRect( _x, _y, wide, tall );

	_nobPos[0]=_nobDragStartPos[0]+(x-_dragStartPos[0]);
	_nobPos[1]=_nobDragStartPos[1]+(x-_dragStartPos[0]);

	int rightEdge = _x +wide;
	int unclamped = _nobPos[ 0 ];

	if(_nobPos[1]>rightEdge)
	{
		_nobPos[0]=rightEdge-(_nobPos[1]-_nobPos[0]);
		_nobPos[1]=rightEdge;
	}

	if(_nobPos[0]<_x)
	{
		int offset = _x - _nobPos[0];
		_nobPos[1]=_nobPos[1]-offset;
		_nobPos[0]=0;
	}

	int value = EstimateValueAtPos( unclamped, 0 );
	SetValue( value );

	// RecomputeValueFromNobPos();
	Repaint();
	SendSliderMovedMessage();
}

//-----------------------------------------------------------------------------
// Purpose: If you click on the slider outside of the nob, the nob jumps
// to the click position, and if this setting is enabled, the nob
// is then draggable from the new position until the mouse is released
// Input  : state -
//-----------------------------------------------------------------------------
void Slider::SetDragOnRepositionNob( bool state )
{
	m_bIsDragOnRepositionNob = state;
}

bool Slider::IsDragOnRepositionNob() const
{
	return m_bIsDragOnRepositionNob;
}

bool Slider::IsDragged( void ) const
{
	return _dragging;
}

//-----------------------------------------------------------------------------
// Purpose: Respond to mouse presses. Trigger Record staring positon.
//-----------------------------------------------------------------------------
void Slider::OnMousePressed(MouseCode code)
{
	int x,y;

    if (!IsEnabled())
        return;

//	input()->GetCursorPos(x,y);
	input()->GetCursorPosition( x, y );

	ScreenToLocal(x,y);
    RequestFocus();

	bool startdragging = false, bPostDragStartSignal = false;

	if ((x >= _nobPos[0]) && (x < _nobPos[1]))
	{
		startdragging = true;
		bPostDragStartSignal = true;
	}
	else
	{
		// we clicked elsewhere on the slider; move the nob to that position
		int min, max;
		GetRange(min, max);
		if ( m_bUseSubRange )
		{
			min = _subrange[ 0 ];
			max = _subrange[ 1 ];
		}

//		int wide = GetWide();
		int _x, _y, wide, tall;
		GetTrackRect( _x, _y, wide, tall );
		if ( wide > 0 )
		{
			float frange = ( float )( max - min );
			float clickFrac = clamp( ( float )( x - _x ) / (float)( wide - 1 ), 0.0f, 1.0f );

			float value = (float)min + clickFrac * frange;

			startdragging = IsDragOnRepositionNob();

			if ( startdragging )
			{
				_dragging = true; // Required when as
				SendSliderDragStartMessage();
			}

			SetValue( ( int )( value + 0.5f ) );
		}
	}

	if ( startdragging )
	{
		// drag the nob
		_dragging = true;
		input()->SetMouseCapture(GetVPanel());
		_nobDragStartPos[0] = _nobPos[0];
		_nobDragStartPos[1] = _nobPos[1];
		_dragStartPos[0] = x;
		_dragStartPos[1] = y;
	}

	if ( bPostDragStartSignal )
		SendSliderDragStartMessage();
}

//-----------------------------------------------------------------------------
// Purpose: Just handle double presses like mouse presses
//-----------------------------------------------------------------------------
void Slider::OnMouseDoublePressed(MouseCode code)
{
	OnMousePressed(code);
}

//-----------------------------------------------------------------------------
// Purpose: Handle key presses
//-----------------------------------------------------------------------------
void Slider::OnKeyCodeTyped(KeyCode code)
{
	switch (code)
	{
		// for now left and right arrows just open or close submenus if they are there.
        case KEY_LEFT:
        case KEY_DOWN:
            {
                int val = GetValue();
                SetValue(val-1);
                break;
            }
    	case KEY_RIGHT:
        case KEY_UP:
    		{
                int val = GetValue();
                SetValue(val+1);
    			break;
    		}
        case KEY_PAGEDOWN:
            {
                int min, max;
                GetRange(min, max);
                float range = (float) max-min;
                float pertick = range/m_nNumTicks;
                int val = GetValue();
                SetValue(val - (int) pertick);
                break;
            }
        case KEY_PAGEUP:
            {
                int min, max;
                GetRange(min, max);
                float range = (float) max-min;
                float pertick = range/m_nNumTicks;
                int val = GetValue();
                SetValue(val + (int) pertick);
                break;
            }
        case KEY_HOME:
            {
                int min, max;
                GetRange(min, max);
                SetValue(min);
    			break;
            }
        case KEY_END:
            {
                int min, max;
                GetRange(min, max);
                SetValue(max);
    			break;
            }
    	default:
    		BaseClass::OnKeyCodeTyped(code);
    		break;
	}
}

//-----------------------------------------------------------------------------
// Purpose: Stop dragging when the mouse is released.
//-----------------------------------------------------------------------------
void Slider::OnMouseReleased(MouseCode code)
{
	if ( _dragging )
	{
		_dragging=false;
		input()->SetMouseCapture(null);
		SendSliderDragEndMessage();
	}
}

//-----------------------------------------------------------------------------
// Purpose: Get the nob's position (the ends of each side of the nob)
//-----------------------------------------------------------------------------
void Slider::GetNobPos(int& min, int& max)
{
	min=_nobPos[0];
	max=_nobPos[1];
}

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void Slider::SetButtonOffset(int buttonOffset)
{
	_buttonOffset=buttonOffset;
}

void Slider::SetThumbWidth( int width )
{
	_nobSize = (float)width;
}

//-----------------------------------------------------------------------------
// Purpose: Set the number of ticks that appear under the slider.
//-----------------------------------------------------------------------------
void Slider::SetNumTicks( int ticks )
{
	m_nNumTicks = ticks;
}


text:
ourCamera = None

#import and initialize camera support
import pygame.camera
pygame.camera.init()
import pygame.surfarray as sfa
import numpy as np

def camera_available():
    return len(list_cameras()) > 0

def list_cameras():
    return pygame.camera.list_cameras()

def select_camera(index):
    global ourCamera
    """ Selects a camera at a given index for use by this module"""
    cams = list_cameras()
    if(index > len(cams)):
        raise Exception("Cannot select that index; it is out of range")
    else:
        ourCamera = pygame.camera.Camera(cams[index])
        ourCamera.start()

from skimage.transform import rotate as skimrot

def rotate(img, angle):
    return skimrot(img, angle)

def flip_horizontally(img):
    return np.flipud(img)

def flip_vertically(img):
    return np.fliplr(img)

transformations = []

def add_transformation(trafo):
    global transformations
    transformations.append(trafo)

def clear_transformations():
    global transformations
    transformations = []

def apply_transformations(arr):
    global transformations
    for trafo in transformations:
        arr = trafo(arr)
    return arr

def take_picture():
    global ourCamera
    if(ourCamera is None):
        raise Exception("Must initialize camera first!")
    else:
        #Get an image from the camera
        img = ourCamera.get_image()
        #Convert surface to a numpy array
        # feed array into SciKit image's Image datastructure
        image_array = io.Image(sfa.array2d(img))
        #Apply relevant transformations and return
        return apply_transformations(image_array)

import matplotlib.pyplot as plt
from skimage import io
def save_picture(name):
    img = take_picture()
    io.imsave(name, img)

def show_picture():
    f = plt.figure()
    img = take_picture()
    io.imshow(img)
    f.show()

def cleanup():
    pygame.camera.quit()

def draw_array(arr):
    f = plt.figure()
    io.imshow(arr)
    f.show()

def get_max(arr):
    return np.max(arr)

def get_average(arr):
    return np.average(arr)

def get_min(arr):
    return np.min(arr)

#Returns a color tween for an array
def get_tween(x_min_val, x_max_val, positive_trend = True):
    x_range = (x_max_val - x_min_val)
    unit = 255 / x_range
    calc = None

    lv = 0
    mv = 255
    if positive_trend is False:
        mv =0
        lv =255

    if positive_trend is True:
        calc = lambda x: unit*(x-x_min_val)
    else:
        calc = lambda x: 255 - unit*(x-x_min_val)

    def the_tween(x):
        if(x > x_max_val):
            return mv
        elif(x < x_min_val):
            return lv
        return calc(x)

    return the_tween

#Returns a function that will colorize the values of an array
def get_colorize(arr):
# red g blue
    the_min = get_min(arr)
    the_avg = get_average(arr)
    the_max = get_max(arr)
    red_tween = get_tween(the_avg, the_max)
    blue_tween = get_tween(the_min, the_avg, False)
    return lambda x: (red_tween(x), 0, blue_tween(x))

import skimage

def test_array(dims):
    x,y = dims
    a = np.zeros(dims)
    for i in range(0,x):
        for j in range(0,y):
            a[i,j] = i+j
    return a

def colorize_array(arr):
    x,y = arr.shape
    imglol = skimage.util.dtype.img_as_ubyte(skimage.io.Image(np.zeros((x,y,3))))
    colorit = get_colorize(arr)

    for i in range(0,x):
        for j in range(0,y):
            i0,i1,i2 = colorit(arr[i,j])
            imglol[i,j,0] = i0
            imglol[i,j,1] = i1
            imglol[i,j,2] = i2

    return imglol

#if __name__ == "__main__": main()


text:
import sqlite3

create_table_mappings = '''
CREATE TABLE IF NOT EXISTS mappings (
    mname VARCHAR(255) NOT NULL,
    key INTEGER NOT NULL,
    note INTEGER NOT NULL,
    CONSTRAINT no_duplicates UNIQUE (mname, key, note)
)
'''

heartandsoul = [
    ('heartandsoul', 39, 12),
    ('heartandsoul', 39, 16),
    ('heartandsoul', 39, 19),
    ('heartandsoul', 46, 5),
    ('heartandsoul', 46, 9),
    ('heartandsoul', 46, 12),
    ('heartandsoul', 47, 7),
    ('heartandsoul', 47, 11),
    ('heartandsoul', 47, 14),
    ('heartandsoul', 59, 9),
    ('heartandsoul', 59, 12),
    ('heartandsoul', 59, 16)
]

default_mapping_insert_query = '''
INSERT OR IGNORE INTO mappings VALUES(?, ?, ?)
'''

class Mapping(object):
    conn = sqlite3.connect('mappings.db')
    c = conn.cursor()
    c.execute(create_table_mappings)
    c.executemany(default_mapping_insert_query, heartandsoul)
    conn.commit()
    conn.close()


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

export default (path) => debug(`pdf-export/${path}`);


text:
disklist="sdb sdc sdd sde sdf sdg sdh sdi sdj sdk sdl sdm"
#step 1
apt-get install -y swift-account swift-container swift-object xfsprogs
#step 2
for disk in $disklist
do
for
fdisk /dev/$disk <<EOF
n
p
1

w
EOF
mkfs.xfs -i size=1024 /dev/${disk}1

uuid=`blkid | grep $disk |  perl   -lane ' print $1  if /UUID=\"(.*?)\"/'`
echo "UUID=$uuid /srv/node/$disk xfs noatime,nodiratime,nobarrier,logbufs=8 0
 0" >> /etc/fstab
mkdir -p /srv/node/${disk}1
mount UUID=$uuid /srv/node/${disk}1
done
chown -R swift:swift /srv/node

#step 3
cat  >>/etc/rsyncd.conf  <<EOF
uid = swift
gid = swift
log file = /var/log/rsyncd.log
pid file = /var/run/rsyncd.pid
address = STORAGE_IP
[account]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/account.lock
[container]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/container.lock
[object]
max connections = 2
path = /srv/node/
read only = false
lock file = /var/lock/object.lock
EOF

#step 4
perl -p -i -e 's/RSYNC_ENABLE=false/RSYNC_ENABLE=true/' /etc/default/rsync

#step 5
service rsync start
#step 6

mkdir -p /var/swift/recon
chown -R swift:swift /var/swift/recon

#step 7
cd /etc/swift

cat >> account-server.conf <<EOF
[DEFAULT]
bind_ip = STORAGE_IP
workers = 2

[pipeline:main]
pipeline = account-server

[app:account-server]
use = egg:swift#account

[account-replicator]

[account-auditor]

[account-reaper]

EOF

cat >> container-server.conf <<EOF

[DEFAULT]
bind_ip = STROAGE_IP
workers = 2

[pipeline:main]
pipeline = container-server

[app:container-server]
use = egg:swift#container

[container-replicator]

[container-updater]

[container-auditor]

EOF

cat >> object-server.conf  <<EOF
[DEFAULT]
bind_ip = STORAGE_IP
workers = 2

[pipeline:main]
pipeline = object-server

[app:object-server]
use = egg:swift#object

[object-replicator]

[object-updater]

[object-auditor]

EOF


text:
namespace views {
class BoxLayout;
class Label;
}  // namespace views

namespace ash {

class GlanceablesRestoreView;
class GlanceablesUpNextView;
class GlanceablesWeatherView;
class GlanceablesWelcomeLabel;

// Container view for the "welcome back" glanceables screen shown on login.
class ASH_EXPORT GlanceablesView : public views::View {
 public:
  // `show_session_restore` controls whether the session restore views are
  // created.
  explicit GlanceablesView(bool show_session_restore);
  GlanceablesView(const GlanceablesView&) = delete;
  GlanceablesView& operator=(const GlanceablesView&) = delete;
  ~GlanceablesView() override;

  // views::View:
  void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
  void OnThemeChanged() override;

 private:
  friend class GlanceablesTest;

  views::BoxLayout* layout_ = nullptr;
  GlanceablesWelcomeLabel* welcome_label_ = nullptr;
  GlanceablesWeatherView* weather_view_ = nullptr;
  views::Label* up_next_label_ = nullptr;
  GlanceablesUpNextView* up_next_view_ = nullptr;
  views::Label* restore_session_label_ = nullptr;
  GlanceablesRestoreView* restore_view_ = nullptr;
};

}  // namespace ash

#endif  // ASH_GLANCEABLES_GLANCEABLES_VIEW_H_


text:
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you 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.
 -->

## Change in import paths

If you are upgrading from 2020.10.5 note the following changes in import paths

| Old path                                                        | New path                                                    |
| --------------------------------------------------------------- | ----------------------------------------------------------- |
| airflow.providers.amazon.aws.hooks.aws_dynamodb.AwsDynamoDBHook | airflow.providers.amazon.aws.hooks.dynamodb.AwsDynamoDBHook |


text:
package notaql.model.path;

import notaql.datamodel.fixation.Fixation;
import notaql.evaluation.ValueEvaluationResult;

import java.io.Serializable;
import java.util.List;

/**
 * Input paths consist of different steps. This is the base interface for the steps (e.g. IN.a[*].*.name() consists of 4 steps)
 */
public interface InputPathStep extends Serializable {
    /**
     * Evaluate this step providing all the matched values and the fixations necessary to reach them.
     *
     * @param step
     * @param contextFixation   The fixation that was in context before the evaluation of the InputPath started
     * @return
     */
    public List<ValueEvaluationResult> evaluate(ValueEvaluationResult step, Fixation contextFixation);
}


text:
//
//  NSData+Conversion.m
//  PushTest
//
//  Created by Jonne Jyrylä on 12.9.2013.
//  Copyright (c) Starcut. All rights reserved.
//

#import "NSData+Conversion.h"

@implementation NSData (Conversion)

#pragma mark - String Conversion
- (NSString *)hexadecimalString {
    /* Returns hexadecimal string of NSData. Empty string if data is empty.   */

    const unsigned char *dataBuffer = (const unsigned char *)[self bytes];

    if (!dataBuffer)
        return [NSString string];

    NSUInteger          dataLength  = [self length];
    NSMutableString     *hexString  = [NSMutableString stringWithCapacity:(dataLength * 2)];

    for (int i = 0; i < dataLength; ++i)
    {
        [hexString appendString:[NSString stringWithFormat:@"%02lx", (unsigned long)dataBuffer[i]]];
    }

    return [NSString stringWithString:hexString];
}

@end