text:
<?php

namespace POData\UriProcessor\QueryProcessor\ExpressionParser;

use POData\Common\ODataException;
use POData\Common\ODataConstants;

/**
 * Class ExpressionToken
 * @package POData\UriProcessor\QueryProcessor\ExpressionParser
 */
class ExpressionToken
{
    /**
     * @var ExpressionTokenId
     */
    public $Id;

    /**
     * @var string
     */
    public $Text;

    /**
     * @var int
     */
    public $Position;

    /**
     * Checks whether this token is a comparison operator.
     *
     * @return boolean True if this token represent a comparison operator
     *                 False otherwise.
     */
    public function isComparisonOperator()
    {
        return
            $this->Id == ExpressionTokenId::IDENTIFIER &&
            (strcmp($this->Text, ODataConstants::KEYWORD_EQUAL) == 0 ||
                strcmp($this->Text, ODataConstants::KEYWORD_NOT_EQUAL) == 0 ||
                strcmp($this->Text, ODataConstants::KEYWORD_LESSTHAN) == 0 ||
                strcmp($this->Text, ODataConstants::KEYWORD_GREATERTHAN) == 0 ||
                strcmp($this->Text, ODataConstants::KEYWORD_LESSTHAN_OR_EQUAL) == 0 ||
                strcmp($this->Text, ODataConstants::KEYWORD_GREATERTHAN_OR_EQUAL) == 0);
    }

    /**
     * Checks whether this token is an equality operator.
     *
     * @return boolean True if this token represent a equality operator
     *                 False otherwise.
     */
    public function isEqualityOperator()
    {
        return
            $this->Id == ExpressionTokenId::IDENTIFIER &&
                (strcmp($this->Text, ODataConstants::KEYWORD_EQUAL) == 0 ||
                    strcmp($this->Text, ODataConstants::KEYWORD_NOT_EQUAL) == 0);
    }

    /**
     * Checks whether this token is a valid token for a key value.
     *
     * @return boolean True if this token represent valid key value
     *                 False otherwise.
     */
    public function isKeyValueToken()
    {
        return
            $this->Id == ExpressionTokenId::BINARY_LITERAL ||
            $this->Id == ExpressionTokenId::BOOLEAN_LITERAL ||
            $this->Id == ExpressionTokenId::DATETIME_LITERAL ||
            $this->Id == ExpressionTokenId::GUID_LITERAL ||
            $this->Id == ExpressionTokenId::STRING_LITERAL ||
            ExpressionLexer::isNumeric($this->Id);
    }

    /**
     * Gets the current identifier text
     *
     * @return string
     */
    public function getIdentifier()
    {
        if ($this->Id != ExpressionTokenId::IDENTIFIER) {
            throw ODataException::createSyntaxError(
                'Identifier expected at position ' . $this->Position
            );
        }

        return $this->Text;
    }

    /**
     * Checks that this token has the specified identifier.
     *
     * @param ExpressionTokenId $id Identifier to check
     *
     * @return bool true if this is an identifier with the specified text
     */
    public function identifierIs($id)
    {
        return $this->Id == ExpressionTokenId::IDENTIFIER
            && strcmp($this->Text, $id) == 0;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package pkproject;

import java.awt.Point;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;

public class SnakeYard {
	static final int ROWS=50;		//行数
	static final int COLS=50;		//列数
	static final int CELLSIZE=10;	//小格尺寸
	//用来计算YardPanel的尺寸。
	static Snake snake=new Snake();
	private static final int ORIGINFREQUENCY=200;//ms, upgrading frequency.

	static Yard YARDS[][]=new Yard[ROWS][COLS];
	static boolean haveBonusApple=false;
	static Yard bonusYard;
	static int bonusGone;
	static int score;

	static Highscorelist hscl=new Highscorelist();
	static int highscore=hscl.getHighscore(0).getScore();
	static boolean isHighestscore;
	static String highscorePlayer=hscl.getHighscore(0).getName();

	static boolean restart;
	static boolean pause;

	static JLabel scoreLabel;
	static JLabel bonusLabel;
	static JLabel highscoreLabel;
	static JLabel pauseLabel;
	private JFrame snakeFrame;
	//static Highscorelist highscorelist=new Highscorelist();

	public static void main(String[] args) {

		do{	//while(restart);
		SnakeYard window = new SnakeYard();
		window.snakeFrame.setVisible(true);
		SnakeInit();
		restart=false;
		pause=true;
		int frequency=ORIGINFREQUENCY;
		do{ //while(!GameEnds
			//try{
				if(!pause){				// I meant to use "synchronized" to do this, however I fo-
										// und only 0.5% of CPU is used to do this.
					snake.updateDirection();
					RunSnake();
					frequency=(int)(ORIGINFREQUENCY*1.3/Math.log10((score+500)/25));
					pauseLabel.setText("
press Space to Pause

");
				} else {
					pauseLabel.setText("
press Space or
 Arrows to start
");
				}
				//will become faster when higher score, twice so fast when arriving 10000.
				System.out.print(frequency);
				System.out.println(pause);
				//Thread.sleep(frequency);//1000ms = 1sec
				//}catch(InterruptedException e){
				//}

		}while(!GameEnds());
		int i;
		if(hscl.checkHighscore(score)){
			System.out.println("is Highscore");
			String hscplr;
			int j=JOptionPane.showConfirmDialog(null, "You are Highscore, do you want us to remember you?", "Congratulations",
					JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
			if (j==0){
				hscplr = JOptionPane.showInputDialog( "Please enter your name" );

			} else {
				hscplr="a stranger";
			}
			hscl.updateHighscore(new Highscore(hscplr, score));
			if(isHighestscore){
			highscoreLabel.setText( highscore  +" by "+highscorePlayer );
			}
			i=JOptionPane.showConfirmDialog(null, "Do you want to continue?", "Restart",
					JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);

		} else {
			System.out.println("is not highscore");
			i=JOptionPane.showConfirmDialog(null, "Do you want to continue?", "Restart",
					JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
		}

		if(i==0){
			restart=true;
		}
		}while(restart);
	}

	/**
	 * This is to determin if the Game will end.
	 * In the snake game, the game ends when
	 * =:	the snake hits a wall,
	 * OR
	 * =:	the snake eats itself.
	 * @return	if the game ends next turn
	 */
	private static boolean GameEnds() {
		boolean GE=true;
		int frequency=ORIGINFREQUENCY;
		frequency=(int)(ORIGINFREQUENCY*1.3/Math.log10((score+500)/25));
		try{
			Thread.sleep(frequency);
		} catch(InterruptedException e){
		} finally {
			snake.updateDirection();
			Point nH=snake.nextHead();

			//0 for empty, 1 for snake(dead), 2 for apple, 3 for wall(dead)
			int nHStts=YARDS[(int) nH.getX()][(int) nH.getY()].getStatus();

			if(nHStts!=1&&nHStts!=3){
				GE=false;
			}
		}
		return GE;
	}

	private static void SnakeInit() {

		snake.setHead(new Point(25,25));
		snake.setTail(new Point(24,25));
		snake.setDirection(3);
		Yard hY=YARDS[snake.getHead().x][snake.getHead().y];
		Yard tY=YARDS[snake.getTail().x][snake.getTail().y];
		hY.setStatus(1);
		hY.setDirection(3);
		tY.setStatus(1);
		tY.setDirection(3);
		setApple();
		bonusGone=0;
		score=0;
		//highscore=0;
		isHighestscore=false;
	}

	/**
	 * RunSnake() will Check if the Snake ates an Apple
	 * =:If it is an Apple
	 * snake will groth one Yard langer
	 * OR
	 * =:If it is Empty
	 * snake won't growth
	 */
	private static void RunSnake() {

		/*
		 * Check nextHead 属性: 墙/蛇; 空白; 果子.
		 =:如果是果子
		 * 往 Head 那一格存储direction
		 * nextHead 变成新 Head, 上色.
		 =:如果是空, 还要
		 * Tail位置那一个格子存储了 (应该存储了) 下一个格子的位置,寻找新Tail. updateTail
		 * Tail 褪色.
		 */
		Yard nHY=YARDS[snake.nextHead().x][snake.nextHead().y];
		Yard hY=YARDS[snake.getHead().x][snake.getHead().y];
		Yard tY=YARDS[snake.getTail().x][snake.getTail().y];
		switch(nHY.getStatus()){//0 for empty, 1 for snake(dead), 2 for apple, 3 for wall(dead).
			case 0:

				hY.setDirection(snake.getDirection());
				snake.setHead(snake.nextHead());
				snake.updateTail(tY.getDirection());

				tY.setStatus(0);

				nHY.setStatus(1);
				setBonus();
				score=score+1;
				break;
			case 2:

				hY.setDirection(snake.getDirection());
				snake.setHead(snake.nextHead());
				nHY.setStatus(1);
				setApple();
				setBonus();

				score=score+100;
				break;
			case 4:

				hY.setDirection(snake.getDirection());
				snake.setHead(snake.nextHead());
				nHY.setStatus(1);

				score=score+50*bonusGone+200;
				haveBonusApple=false;
				bonusGone=0;
				bonusLabel.setText("");

				break;
		}
		if(score>highscore){
			isHighestscore=true;
			highscore=score;
			highscoreLabel.setText( highscore  +" by YOU!" );
		}
		//get an new Apple
		if(haveBonusApple){
			if(bonusGone>=1){
				bonusGone--;
			} else {
				haveBonusApple=false;
				bonusYard.setStatus(0);
				bonusLabel.setText("");
			}
		}
		scoreLabel.setText("Your Score :"+score);

	}
	/**
	 * Set a bonused apple.
	 */
	private static void setBonus() {

		if((Math.random()*100)<=1 && haveBonusApple==false && score>1000){
		boolean appleSet=false;
		do{
			bonusYard=YARDS[(int)(Math.random()*49+1)][(int)(Math.random()*49+1)];
			if(bonusYard.getStatus()==0){
				bonusYard.setStatus(4);
				appleSet=true;
				haveBonusApple=true;
				bonusGone=(int)(Math.random()*20+40);

				bonusLabel.setText("
There is a bonus !
Go and get it as fast as you can !
");
			}
		}while(!appleSet);
		}
	}

	private static void setApple() {

		boolean appleSet=false;
		do{
			Yard aY=YARDS[(int)(Math.random()*49+1)][(int)(Math.random()*49+1)];
			if(aY.getStatus()==0){
				aY.setStatus(2);
				appleSet=true;

			}
		}while(!appleSet);
	}

	/**
	 * Create the application.
	 */
	public SnakeYard() {
		SYinit();
	}

	/**
	 * Initialize the contents of the frame.
	 * @wbp.parser.entryPoint
	 */
	private void SYinit() {
		snakeFrame = new JFrame();
		snakeFrame.setTitle("Snake");
		snakeFrame.setBounds(100, 100, (int)(ROWS*CELLSIZE*1.5), COLS*CELLSIZE+100);
		snakeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		SnakeMoveListener SML=new SnakeMoveListener(this);
		snakeFrame.addKeyListener(SML);

		JPanel panel = new JPanel();
		snakeFrame.getContentPane().add(panel, BorderLayout.CENTER);
		panel.setLayout(null);

		JPanel Yardpanel = new JPanel();
		Yardpanel.setBounds(207, 29, ROWS*CELLSIZE, COLS*CELLSIZE);
		panel.add(Yardpanel);
		Yardpanel.setLayout(null);

		/*
		 * YARDS is where the snake runs and the apple shows.
		 * we remember where the head of the snake is and where the tail is.
		 * the snake don't move, but their head become black and tail become white.
		 * every part of the snake remembers where the next part is, so the end of
		 *
		 *
		 */

		for(int r=0 ;r<ROWS;r++){
			for(int c=0;c<COLS;c++){
				YARDS[r][c]=new Yard(r,c);
				YARDS[r][c].setBounds(r*CELLSIZE,c*CELLSIZE, CELLSIZE, CELLSIZE);
				if(r==0||r==ROWS-1||c==0||c==COLS-1){
					YARDS[r][c].setStatus(3);
				} else {
					YARDS[r][c].setStatus(0);
				}
				YARDS[r][c].upgrade();
				Yardpanel.add(YARDS[r][c]);
			}
		}

		scoreLabel = new JLabel("Your Score: "+ score);
		bonusLabel = new JLabel("");
		highscoreLabel = new JLabel( highscore  +" by "+highscorePlayer );
		highscoreLabel.setHorizontalAlignment(SwingConstants.RIGHT);
		pauseLabel=new JLabel("
press Space or
 Arrows to start
");

		scoreLabel.setBounds(15, 30, 180, 18);
		panel.add(scoreLabel);
		bonusLabel.setBounds(15, 130, 180, 56);
		panel.add(bonusLabel);
		highscoreLabel.setBounds(15, 80, 180, 18);
		panel.add(highscoreLabel);
		pauseLabel.setBounds(13, 400, 180, 56);
		panel.add(pauseLabel);

		JLabel lblNewLabel = new JLabel("Highest Score:");
		lblNewLabel.setBounds(15, 60, 180, 18);
		panel.add(lblNewLabel);

	}
}
/**
 * YARDS is where the snake runs and the apple shows.
 * we remember where the head of the snake is and where the tail is.
 * the snake don't move, but their head become black and tail become white.
 * every part of the snake remembers where the next part is, so the end of
 *
 * @author Guyiyu
 */
class Yard extends JPanel{
	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private Point position;
	//private boolean isSnake;
	private int status;//0 for empty, 1 for snake, 2 for apple, 3 for wall.
	private int direction;

	Yard(int x, int y){
		super();
		this.position=new Point(x,y);
	}

	/**
	 * update the color, based on which status this Yard is.
	 */
	public void upgrade(){
		switch( this.status){//0 for empty, 1 for snake, 2 for apple, 3 for wall.=: 4 for Bonus Apple??
		case 0:this.setBackground(Color.WHITE);break;
		case 1:this.setBackground(Color.BLACK);break;
		case 2:this.setBackground(Color.ORANGE);break;
		case 3:this.setBackground(Color.GRAY);break;
		case 4:this.setBackground(Color.RED);break;
		}
	}

	public Point getPosition() {
		return position;
	}

	public void setPosition(Point position) {
		this.position = position;
	}

	public int getDirection() {
		return direction;
	}

	public void setDirection(int direction) {
		this.direction = direction;
	}
	/**
	 * 0 for empty,
	 * 1 for snake,
	 * 2 for apple.
	 * 3 for wall.
	 * @return the status of this Yard
	 */
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
		this.upgrade();
	}

	@Override
	public String toString(){
		return "Yard@"+this.position;
	}
}
/**
 * Let the snake change direction when Arrow Keys pressed
 *
 */
class SnakeMoveListener implements KeyListener{
	SnakeMoveListener(SnakeYard SY){

	}
	@Override
	public void keyPressed(KeyEvent e) {
		//System.out.print("按下个键");
		//System.out.print(SnakeYard.pause);
        if (e.getKeyCode() == KeyEvent.VK_DOWN &&SnakeYard.snake.getDirection()!=0 ) {
           SnakeYard.snake.setDirection(1);
           SnakeYard.pause=false;
        } else if (e.getKeyCode() == KeyEvent.VK_UP &&SnakeYard.snake.getDirection()!=1 ) {
           SnakeYard.snake.setDirection(0);
           SnakeYard.pause=false;
        } else if (e.getKeyCode() == KeyEvent.VK_RIGHT &&SnakeYard.snake.getDirection()!=2 ) {
           SnakeYard.snake.setDirection(3);
           SnakeYard.pause=false;
        } else if (e.getKeyCode() == KeyEvent.VK_LEFT &&SnakeYard.snake.getDirection()!=3 ) {
           SnakeYard.snake.setDirection(2);
           SnakeYard.pause=false;
        } else if (e.getKeyCode() == KeyEvent.VK_SPACE ){
        	SnakeYard.pause = !SnakeYard.pause;
        }
        //System.out.println(SnakeYard.pause);

	}

	@Override
	public void keyReleased(KeyEvent e) {

	}

	@Override
	public void keyTyped(KeyEvent e) {

	}

}


text:
@echo off
SETLOCAL

SET NAME=watcher
SET VERSION=1.0
SET SCALA_VERSION=2.11
SET D=%~dp0
SET JAR=%D%\target\scala-%SCALA_VERSION%\%NAME%-assembly-%VERSION%.jar
SET THREADS=2

IF NOT EXIST %JAR% GOTO JarNotFound
GOTO ValidArgs

:JarNotFound
ECHO JAR file does not exist.
ECHO Make sure you run `sbt assembly` to build the JAR executable.
GOTO end

:ValidArgs
SET PROPS=-Dfile.encoding=UTF8 -Dscala.concurrent.context.minThreads=%THREAD% -Dscala.concurrent.context.numThreads=%THREADS% -Dscala.concurrent.context.maxThreads=%THREADS%
java %PROPS% -jar %JAR%
:end

ENDLOCAL


text:
package com.bookingbug.apiclient;

import java.io.Console;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
// import org.codehaus.jackson.map.ObjectMapper;
// import org.json.JSONObject;

// import org.apache.http.impl.client.DefaultHttpClient;
// import org.apache.http.client.methods.HttpGet;
// import org.apache.http.HttpResponse;

/**
* Simple interactive console application.
* Uses the java.io.Console class of Java 6.
*/
public final class BookingBugConsole {

  public static final void main(String... aArgs){
    Console console = System.console();
    //read user name, using java.util.Formatter syntax :
    String username = console.readLine("User Name? ");

    //read the password, without echoing the output
    char[] password = console.readPassword("Password? ");

    //verify user name and password using some mechanism (elided)

    //the javadoc for the Console class recommends "zeroing-out" the password
    //when finished verifying it :
    Arrays.fill(password, ' ');

    console.printf("Welcome, %1$s.", username);
    console.printf(fNEW_LINE);

    callUrl("http://mayfly.booking-bug.com/api/v1/login", console);

  // String className = console.readLine("Please enter a package-qualified class name : ");
  // Class theClass = null;
  // try {
  //   theClass = Class.forName(className);
  //   console.printf("The inheritance tree: %1$s", getInheritanceTree(theClass));
  // }
  // catch(ClassNotFoundException ex){
  //    console.printf("Cannot find that class.");
  // }

    //this version just exits, without asking the user for more input
    console.printf("Bye.");
  }

  private static void callUrl(String urlString, Console console) {
    try {
      URL url = new URL(urlString);
      BookingBugApi api = new BookingBugApi();
      // Map<String, Object> response = api.callApi(url);
      String response = api.callApi(url);
      console.printf("got response");
      console.printf(fNEW_LINE);
      // console.printf(response.toString());
      console.printf(response);
      console.printf(fNEW_LINE);
      // Map<String, Object> user = response.get("user");
      // Object links = user.get("links");
      // console.printf(links.toString());
      // console.printf(response.keySet().toString());
      // console.printf(fNEW_LINE);
    } catch (MalformedURLException e) {
      console.printf(e.toString());
    } catch (IOException e) {
      console.printf(e.toString());
    }
  }

  // PRIVATE //
  // private static final String fHEADER = "The inheritance tree:";
  private static final String fNEW_LINE = System.getProperty("line.separator");

  // private static String getInheritanceTree(Class aClass){
  //   StringBuilder superclasses = new StringBuilder();
  //   superclasses.append( fNEW_LINE );
  //   Class theClass = aClass;
  //   while ( theClass != null ) {
  //     superclasses.append( theClass );
  //     superclasses.append( fNEW_LINE );
  //     theClass = theClass.getSuperclass();
  //   }
  //   superclasses.append( fNEW_LINE );
  //   return superclasses.toString();
  // }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping
        xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
                            http://raw.github.com/doctrine/doctrine2/master/doctrine-mapping.xsd">

    <entity name="Ekyna\Component\Commerce\Payment\Entity\PaymentMessageTranslation"
            table="commerce_payment_message_translation">

        <id name="id" type="integer" column="id">
            <generator strategy="AUTO"/>
        </id>

    </entity>

</doctrine-mapping>


text:
require 'time_rounder/version'
require 'time_rounder/rounded_time_from_seconds'
require 'time_rounder/rounded_time'
require 'time_rounder/schedule_not_found'
require 'time_rounder/end_before_start'

##
# TimeRounder is a library to round time.
module TimeRounder
  ##
  # Takes number of seconds and returns hours and partial hours in decimal form.
  def self.seconds_to_hours(seconds, schedule = 15)
    TimeRounder::RoundedTimeFromSeconds.new(seconds, schedule).rounded_time
  end

  ##
  # Takes a DateTime/Time object and returns the time to the nearest quarter
  # hour

  def self.rounded_time(time, schedule = 15)
    TimeRounder::RoundedTime.new(time, schedule).rounded_time
  end

  ##
  # Calculates the difference between 2 rounded times
  def self.difference_between_rounded_times(start_time, end_time, schedule = 15)
    s = TimeRounder::RoundedTime.new(start_time, schedule).rounded_time
    e = TimeRounder::RoundedTime.new(end_time, schedule).rounded_time
    seconds = (e - s).to_i
    TimeRounder::RoundedTimeFromSeconds.new(seconds, schedule).rounded_time
  end

  ##
  # Calculates the difference between 2 standard times
  def self.difference_between_times(start_time, end_time, schedule = 15)
    seconds = (end_time - start_time).to_i
    TimeRounder::RoundedTimeFromSeconds.new(seconds, schedule).rounded_time
  end
end


text:
package org.hope6537.hadoop.recommend;

import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.eval.RecommenderBuilder;
import org.apache.mahout.cf.taste.impl.common.LongPrimitiveIterator;
import org.apache.mahout.cf.taste.model.DataModel;
import org.apache.mahout.cf.taste.recommender.RecommendedItem;

import java.io.IOException;
import java.util.List;

public class RecommenderResult {

    final static int NEIGHBORHOOD_NUM = 2;
    final static int RECOMMENDER_NUM = 3;

    public static void main(String[] args) throws TasteException, IOException {
        String file = "other/testdata/pv.csv";
        DataModel dataModel = RecommendFactory.buildDataModelNoPref(file);
        //基于UserCF城市街区距离(曼哈顿)算法
        RecommenderBuilder rb1 = RecommenderEvaluator.userCityBlock(dataModel);
        //基于ItemCF对数自然相似度算法
        RecommenderBuilder rb2 = RecommenderEvaluator.itemCityBlock(dataModel);

        LongPrimitiveIterator iter = dataModel.getUserIDs();
        while (iter.hasNext()) {
            long uid = iter.nextLong();
            System.out.print("userCityBlock  =>");
            result(uid, rb1, dataModel);
            System.out.print("itemLoglikelihood=>");
            result(uid, rb2, dataModel);
        }
    }

    public static void result(long uid, RecommenderBuilder recommenderBuilder, DataModel dataModel) throws TasteException {
        List<RecommendedItem> list = recommenderBuilder.buildRecommender(dataModel).recommend(uid, RECOMMENDER_NUM);
        RecommendFactory.showItems(uid, list, false);
    }

}


text:
/**
 * Package Manager module for displaying Package Manager content.
 */

angular
  .module('dataCollectorApp.home')
  .config(['$routeProvider', function ($routeProvider) {
    $routeProvider
      .when('/collector/usersAndGroups', {
        templateUrl: 'app/home/usersAndGroups/users_and_groups.tpl.html',
        controller: 'UsersAndGroupsController',
        resolve: {
          myVar: function(authService) {
            return authService.init();
          }
        },
        data: {
          authorizedRoles: ['admin']
        }
      });
  }])
  .controller('UsersAndGroupsController', function ($scope, api) {
    angular.extend($scope, {
      fetching: false,
      userList: []
    });

    var getUsers = function() {
      $scope.fetching = true;
      $scope.userList = [];
      api.admin.getUsers()
        .then(
          function (res) {
            $scope.fetching = false;
            $scope.userList = _.sortBy(res.data, 'name');
          },
          function (res) {
            $rootScope.common.errors = [res.data];
          }
        );
    };

    getUsers();

  });


text:
name: contact
category: page
order: 4
onHomePage: false
permalink: /contact/
layout: default
---

Contact Us

Simon Fraser University
 Concert Orchestra

    <address>
      SFU Burnaby

      8888 University Dr,

      Burnaby, BC

      sfuco-exec@sfu.ca

      facebook.com/sfuorchestra
    </address>


text:
class AddProfileCompleteToUsers < ActiveRecord::Migration
  def change
    add_column :users, :profile_complete, :boolean, default: false, null: false
  end
end


text:
using System.Net.Http;
using System.Threading.Tasks;
using FuncLite;
using Microsoft.Extensions.Logging;

namespace FuncLite
{
    public class LinuxApp : BaseApp
    {
        public LinuxApp(HttpClient client, MyConfig config, ILogger<AppManager> logger, dynamic siteProps) : base(client, config, logger, new SitePropsWrapper(siteProps), Language.Ruby)
        {
        }

        public static async Task<BaseApp> CreateApp(HttpClient client, MyConfig config, ILogger<AppManager> logger, string appName)
        {
            using (var response = await client.PutAsJsonAsync(
                $"/subscriptions/{config.Subscription}/resourceGroups/{config.ResourceGroup}/providers/Microsoft.Web/sites/{appName}?api-version=2016-03-01",
                new
                {
                    location = config.Region,
                    properties = new
                    {
                        siteConfig = new
                        {
                            appSettings = new[]
                            {
                                new
                                {
                                    name = "DOCKER_CUSTOM_IMAGE_NAME",
                                    value = config.DockerImageName
                                },
                                new
                                {
                                    name = "DOCKER_REGISTRY_SERVER_URL",
                                    value = config.DockerServerURL
                                },
                                new
                                {
                                    name = "DOCKER_REGISTRY_SERVER_USERNAME",
                                    value = config.DockerRegistryUserName
                                },
                                new
                                {
                                    name = "DOCKER_REGISTRY_SERVER_PASSWORD",
                                    value = config.DockerRegistryPassword
                                }

                            },
                            appCommandLine = "",
                            linuxFxVersion = $"DOCKER|{config.DockerImageName}"
                        },
                        serverFarmId = config.ServerFarmId,
                    }
                }))
            {
                response.EnsureSuccessStatusCode();

                var json = await response.Content.ReadAsAsync<dynamic>();
                var app = new LinuxApp(client, config, logger, json.properties);

                await app.CompleteCreation();

                return app;
            }
        }

        public async Task SendWarmUpRequests()
        {
            await EnsureScmHttpClient();
            using (var response = await ScmClient.GetAsync($"{ScmBaseUrl}"))
            {
                response.EnsureSuccessStatusCode();
            }

            using (var response = await Client.GetAsync($"{SiteUrl}"))
            {
                response.EnsureSuccessStatusCode();
            }
        }

        protected override Task UploadLanguageHost()
        {
            return Task.CompletedTask;
        }

        public async Task UploadUserCode(string zipPackagePath)
        {
            await EnsureScmHttpClient();
            using (var response = await ScmClient.PutZipFile($"{ScmBaseUrl}/api/zip/site/wwwroot/userFunc/", zipPackagePath))
            {
                response.EnsureSuccessStatusCode();
            }
        }

        protected internal override async Task<dynamic> SendRequest(object payload)
        {
            using (var response = await Client.PostAsJsonAsync($"{SiteUrl}", payload))
            {
                response.EnsureSuccessStatusCode();

                return await response.Content.ReadAsAsync<dynamic>();
            }
        }

    }
}


text:
MusicXML library for Haskell, including a concise, strongly typed music representation
isomorphic to MusicXML 3.0.

The library is called `musicxml2` because there is already a `musicxml` library on Hackage.

## Supported features

* Part- and timewise scores
* Instruments lists and part groups
* Pitched and unpitched notes, with enharmonic pitch spelling
* Cue and grace notes
* Time signatures, Key signatures and clefs
* Custom note heads
* Beaming, cross-beams and tremolo
* Ornaments and articulation
* Dynamics

The following features are currently missing or incomplete:

* Lyrics
* Chord symbols
* Fingered bass
* Tablature
* Percussion grids
* Scordatura
* Layouts

## Requirements

* [Haskell Platform](http://www.haskell.org/platform)

## Installation

    cabal configure
    cabal install


text: React.createElement(Component, babelHelpers._extends({}, x, { y: 2, z: true }));


text:
class CreateUnits < ActiveRecord::Migration[5.0]
  def change
    create_table :units do |t|
      t.string :code
      t.string :name

      t.timestamps null: false
    end
  end
end


text:
package fr.xebia.extras.selma.beans;

public class IbanRest {

    private Integer codeBanque;

    private Integer codeBanqueDomiciliation;

    public IbanRest() {

    }

    public IbanRest(Integer codeBanque, Integer codeBanqueDomiciliation) {
        this.codeBanque = codeBanque;
        this.codeBanqueDomiciliation = codeBanqueDomiciliation;
    }

    public Integer getCodeBanque() {
        return codeBanque;
    }

    public void setCodeBanque(final Integer codeBanque) {
        this.codeBanque = codeBanque;
    }

    public Integer getCodeBanqueDomiciliation() {
        return codeBanqueDomiciliation;
    }

    public void setCodeBanqueDomiciliation(final Integer codeBanqueDomiciliation) {
        this.codeBanqueDomiciliation = codeBanqueDomiciliation;
    }
}


text:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * Holds the DocPropertyItem class
 *
 * @package PhpMyAdmin
 */
if (!defined('PHPMYADMIN')) {
    exit;
}

/* This class extends the OptionsPropertyOneItem class */
require_once 'libraries/properties/options/OptionsPropertyOneItem.class.php';

/**
 * Single property item class of type doc
 *
 * @package PhpMyAdmin
 */
class DocPropertyItem extends OptionsPropertyOneItem
{
    /**
     * Returns the property item type of either an instance of
     *  - OptionsPropertyOneItem ( f.e. "bool", "text", "radio", etc ) or
     *  - OptionsPropertyGroup   ( "root", "main" or "subgroup" )
     *  - PluginPropertyItem     ( "export", "import", "transformations" )
     *
     * @return string
     */
    public function getItemType()
    {
        return "doc";
    }
}

?>


text:
package com.tirthal.learning.oop.design.principles.clazz.solid.srp.modem.good;

/**
 * Implementation class of IDataChannel interface for "slow mode" of data send and receive. This is for design demo, so actual logic is not
 * implemented
 *
 * @author tirthalp
 *
 */
public class DataChannelSlowMode implements IDataChannel {

	@Override
	public void send(char c) {
		// TODO Auto-generated method stub
		System.out.println("sent data using slow algorithm");
	}

	@Override
	public char receive() {
		// TODO Auto-generated method stub
		System.out.println("recieved data using slow algorithm");
		return 0;
	}

}


text:
<?php

use frontend\widgets\SelectAuto;
use frontend\widgets\SelectAutoNew;
use kartik\file\FileInput;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model frontend\modules\garage\models\Garage */
/* @var $form yii\widgets\ActiveForm */

$this->registerCssFile('/css/bootstrap.min.css');
$this->title = ($auto) ? 'Редактировать авто: ' . $auto->brand_name . ' ' . $auto->model_name : 'Добавить авто' ;
$this->params['breadcrumbs'][] = ['label' => 'Личный кабинет', 'url' => ['/office']];
$this->params['breadcrumbs'][] = ['label' => 'Гараж', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>

            <?php /*$form = ActiveForm::begin(); */ ?><? /*= $form->field($model,'type_car')->radioList(['1'=>'Легковая','2'=>'Грузовая','3'=>'Мото']);*/ ?>

            <form action="/garage" method="post" enctype="multipart/form-data">
                <?php if(isset($auto)): ?>
                    <input type="hidden" name="garageId" value="<?=$model->id?>">
                    <input type="hidden" name="autoId" value="<?=$auto->id?>">
                    <input type="hidden" name="photo" class="photoAuto" value="<?=$auto->photo?>">
                    <?= SelectAuto::widget(['view' => 0, 'auto' => $auto]) ?>
                <?php else: ?>
                    <?= SelectAuto::widget(['view' => 0]) ?>
                <?php endif; ?>

                <?/*= Html::textInput('vin',$model->vin,['class'=>'addContent__title', 'placeholder'=>'введите VIN код','style'=>'float:none']);*/?>
                <?= Html::textarea('comments',$model->comments,['class'=>'addContent__description', 'placeholder'=>'Комментарии']) ?>

Добавить фото

                    <?php

                    echo 'Добавить фото';
                    if($auto->photo):
                    echo FileInput::widget([
                        'name' => 'file',
                        'id' => 'input-4',
                        'attribute' => 'attachment_1',
                        'value' => '/media/img/1.png',
                        'options' => ['multiple' => false,
                            'language'=> "ru",
                            'showCaption'=> true,
                            'maxFileCount'=> 1,
                            'showRemove'=> false,
                            'showUpload'=> false],
                        'pluginOptions' => [

                            'maxFileCount' => 1,
                            'language' => "ru",
                            'previewClass' => 'hasEdit',
                            'uploadAsync'=> false,
                            'showUpload' => false,
                            'dropZoneEnabled' => false,
                            /*'initialPreviewShowDelete' => true,*/
                            'overwriteInitial' => true,
                            'initialPreview' => [
                                "photo' class='file-preview-image'>"
                            ],
                        ],
                    ]);
                    else:
                        echo FileInput::widget([
                            'name' => 'file',
                            'id' => 'input-4',
                            'attribute' => 'attachment_1',
                            'value' => '/media/img/1.png',
                            'options' => ['multiple' => false,
                                'language'=> "ru",
                                'showCaption'=> true,
                                'maxFileCount'=> 1,
                                'showRemove'=> false,
                                'showUpload'=> false],
                        ]);
                    endif;
                    ?>

                        <?= Html::submitButton('Сохранить', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>

            </form>


text:
package ejb.administration;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import framework.AbstractEntity;

@Entity
@Table(name = "RolePermission")
public class RolePermission extends AbstractEntity implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	private Integer id;

		@ManyToOne
		@JoinColumn(name="role", referencedColumnName="id", nullable = false)
		private Role role;

		@ManyToOne
		@JoinColumn(name="permission", referencedColumnName="id", nullable = false)
		private Permission permission;

	public RolePermission(){
	}

      public Role getRole(){
           return role;
      }

      public void setRole(Role role){
           this.role = role;
      }

      public Permission getPermission(){
           return permission;
      }

      public void setPermission(Permission permission){
           this.permission = permission;
      }

	public Integer getId() {
		return id;
	}

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

	@Override
	public Object[] getValues() {
		List<Object> list = new ArrayList<Object>();

		list.add(id);
		if(role != null){
			list.add(role.toString());
		}else{
			list.add("");
		}
		if(permission != null){
			list.add(permission.toString());
		}else{
			list.add("");
		}

		 return list.toArray();
	}

	@Override
	public String toString() {
		StringBuilder result = new StringBuilder();

		return result.toString();
	}

}


text:
tomcat-workshop
===============

Schulungsunterlagen für den Workshop Tomcat Administration


text:
Imports the specified PlotSettings into the current database.

## Syntax

**C#**

``` C#
public ImportResult<PlotSettings> Import(
	PlotSettings element,
	bool replaceIfDuplicate = false
)
```

**VB**

``` VB
Public Function Import (
	element As PlotSettings,
	Optional replaceIfDuplicate As Boolean = false
) As ImportResult(Of PlotSettings)
```

### Parameters

element

Type: PlotSettings
The PlotSettings to import.

replaceIfDuplicate (Optional)

Type: bool
true, if the the imported PlotSettings should be replaced if it is already present; otherwise, false.

### Return Value
Type: ImportResult(PlotSettings)
An object that represents the result of an import operation.
Back to Top

## See Also

#### Reference
PlotSettingsContainer Class
Linq2Acad Namespace


text:
/* tslint:disable */
/* eslint-disable */

import { ConcreteRequest } from "relay-runtime";
export type CommerceCancelReasonTypeEnum = "ADMIN_CANCELED" | "BUYER_LAPSED" | "BUYER_REJECTED" | "SELLER_LAPSED" | "SELLER_REJECTED" | "SELLER_REJECTED_ARTWORK_UNAVAILABLE" | "SELLER_REJECTED_OFFER_TOO_LOW" | "SELLER_REJECTED_OTHER" | "SELLER_REJECTED_SHIPPING_UNAVAILABLE" | "%future added value";
export type CommerceOrderParticipantEnum = "BUYER" | "SELLER" | "%future added value";
export type CommerceBuyerRejectOfferInput = {
    clientMutationId?: string | null;
    offerId: string;
    rejectReason?: CommerceCancelReasonTypeEnum | null;
};
export type RejectOfferMutationVariables = {
    input: CommerceBuyerRejectOfferInput;
};
export type RejectOfferMutationResponse = {
    readonly commerceBuyerRejectOffer: {
        readonly orderOrError: {
            readonly __typename: "CommerceOrderWithMutationSuccess";
            readonly order?: {
                readonly internalID: string;
                readonly awaitingResponseFrom?: CommerceOrderParticipantEnum | null;
            };
            readonly error?: {
                readonly type: string;
                readonly code: string;
                readonly data: string | null;
            };
        };
    } | null;
};
export type RejectOfferMutation = {
    readonly response: RejectOfferMutationResponse;
    readonly variables: RejectOfferMutationVariables;
};

/*
mutation RejectOfferMutation(
  $input: CommerceBuyerRejectOfferInput!
) {
  commerceBuyerRejectOffer(input: $input) {
    orderOrError {
      __typename
      ... on CommerceOrderWithMutationSuccess {
        __typename
        order {
          __typename
          internalID
          ... on CommerceOfferOrder {
            awaitingResponseFrom
          }
          id
        }
      }
      ... on CommerceOrderWithMutationFailure {
        error {
          type
          code
          data
        }
      }
    }
  }
}
*/

const node: ConcreteRequest = (function(){
var v0 = [
  {
    "defaultValue": null,
    "kind": "LocalArgument",
    "name": "input",
    "type": "CommerceBuyerRejectOfferInput!"
  }
],
v1 = [
  {
    "kind": "Variable",
    "name": "input",
    "variableName": "input"
  }
],
v2 = {
  "alias": null,
  "args": null,
  "kind": "ScalarField",
  "name": "__typename",
  "storageKey": null
},
v3 = {
  "alias": null,
  "args": null,
  "kind": "ScalarField",
  "name": "internalID",
  "storageKey": null
},
v4 = {
  "kind": "InlineFragment",
  "selections": [
    {
      "alias": null,
      "args": null,
      "kind": "ScalarField",
      "name": "awaitingResponseFrom",
      "storageKey": null
    }
  ],
  "type": "CommerceOfferOrder"
},
v5 = {
  "kind": "InlineFragment",
  "selections": [
    {
      "alias": null,
      "args": null,
      "concreteType": "CommerceApplicationError",
      "kind": "LinkedField",
      "name": "error",
      "plural": false,
      "selections": [
        {
          "alias": null,
          "args": null,
          "kind": "ScalarField",
          "name": "type",
          "storageKey": null
        },
        {
          "alias": null,
          "args": null,
          "kind": "ScalarField",
          "name": "code",
          "storageKey": null
        },
        {
          "alias": null,
          "args": null,
          "kind": "ScalarField",
          "name": "data",
          "storageKey": null
        }
      ],
      "storageKey": null
    }
  ],
  "type": "CommerceOrderWithMutationFailure"
};
return {
  "fragment": {
    "argumentDefinitions": (v0/*: any*/),
    "kind": "Fragment",
    "metadata": null,
    "name": "RejectOfferMutation",
    "selections": [
      {
        "alias": null,
        "args": (v1/*: any*/),
        "concreteType": "CommerceBuyerRejectOfferPayload",
        "kind": "LinkedField",
        "name": "commerceBuyerRejectOffer",
        "plural": false,
        "selections": [
          {
            "alias": null,
            "args": null,
            "concreteType": null,
            "kind": "LinkedField",
            "name": "orderOrError",
            "plural": false,
            "selections": [
              {
                "kind": "InlineFragment",
                "selections": [
                  (v2/*: any*/),
                  {
                    "alias": null,
                    "args": null,
                    "concreteType": null,
                    "kind": "LinkedField",
                    "name": "order",
                    "plural": false,
                    "selections": [
                      (v3/*: any*/),
                      (v4/*: any*/)
                    ],
                    "storageKey": null
                  }
                ],
                "type": "CommerceOrderWithMutationSuccess"
              },
              (v5/*: any*/)
            ],
            "storageKey": null
          }
        ],
        "storageKey": null
      }
    ],
    "type": "Mutation"
  },
  "kind": "Request",
  "operation": {
    "argumentDefinitions": (v0/*: any*/),
    "kind": "Operation",
    "name": "RejectOfferMutation",
    "selections": [
      {
        "alias": null,
        "args": (v1/*: any*/),
        "concreteType": "CommerceBuyerRejectOfferPayload",
        "kind": "LinkedField",
        "name": "commerceBuyerRejectOffer",
        "plural": false,
        "selections": [
          {
            "alias": null,
            "args": null,
            "concreteType": null,
            "kind": "LinkedField",
            "name": "orderOrError",
            "plural": false,
            "selections": [
              (v2/*: any*/),
              {
                "kind": "InlineFragment",
                "selections": [
                  (v2/*: any*/),
                  {
                    "alias": null,
                    "args": null,
                    "concreteType": null,
                    "kind": "LinkedField",
                    "name": "order",
                    "plural": false,
                    "selections": [
                      (v2/*: any*/),
                      (v3/*: any*/),
                      {
                        "alias": null,
                        "args": null,
                        "kind": "ScalarField",
                        "name": "id",
                        "storageKey": null
                      },
                      (v4/*: any*/)
                    ],
                    "storageKey": null
                  }
                ],
                "type": "CommerceOrderWithMutationSuccess"
              },
              (v5/*: any*/)
            ],
            "storageKey": null
          }
        ],
        "storageKey": null
      }
    ]
  },
  "params": {
    "id": null,
    "metadata": {},
    "name": "RejectOfferMutation",
    "operationKind": "mutation",
    "text": "mutation RejectOfferMutation(\n  $input: CommerceBuyerRejectOfferInput!\n) {\n  commerceBuyerRejectOffer(input: $input) {\n    orderOrError {\n      __typename\n      ... on CommerceOrderWithMutationSuccess {\n        __typename\n        order {\n          __typename\n          internalID\n          ... on CommerceOfferOrder {\n            awaitingResponseFrom\n          }\n          id\n        }\n      }\n      ... on CommerceOrderWithMutationFailure {\n        error {\n          type\n          code\n          data\n        }\n      }\n    }\n  }\n}\n"
  }
};
})();
(node as any).hash = '2529ac43dd011539cd690d7b103cb565';
export default node;


text:
void feeder_register(void *p);
pcm_feeder *feeder_get(struct pcm_feederdesc *desc);
pcm_feeder *feeder_getroot(void);
int feeder_set(pcm_feeder *feeder, int what, int value);

u_int32_t chn_fmtchain(pcm_channel *c, u_int32_t *to);
int chn_addfeeder(pcm_channel *c, pcm_feeder *f);
int chn_removefeeder(pcm_channel *c);
pcm_feeder *chn_findfeeder(pcm_channel *c, u_int32_t type);

#define FEEDER_DECLARE(feeder) SYSINIT(feeder, SI_SUB_DRIVERS, SI_ORDER_MIDDLE, feeder_register, &feeder)

#define FEEDER_ROOT	1
#define FEEDER_FMT 	2
#define FEEDER_RATE 	3
#define FEEDER_FILTER 	4
#define FEEDER_VOLUME 	5
#define FEEDER_LAST	FEEDER_VOLUME

#define FEEDRATE_SRC	1
#define FEEDRATE_DST	2


text:
namespace Microsoft.Zelig.Runtime.TypeSystem
{
    using System;
    using System.Collections.Generic;

    public sealed class CustomAttributeRepresentation
    {
        public static readonly CustomAttributeRepresentation[] SharedEmptyArray = new CustomAttributeRepresentation[0];

        //
        // State
        //

        private MethodRepresentation m_constructor;
        private object[]             m_fixedArgsValues;
        private string[]             m_namedArgs;
        private object[]             m_namedArgsValues;

        //
        // Constructor Methods
        //

        public CustomAttributeRepresentation( MethodRepresentation constructor     ,
                                              object[]             fixedArgsValues ,
                                              string[]             namedArgs       ,
                                              object[]             namedArgsValues )
        {
            CHECKS.ASSERT( constructor != null, "Cannot create CustomAttributeRepresentation without supporting metadata" );

            m_constructor     = constructor;
            m_fixedArgsValues = fixedArgsValues;
            m_namedArgs       = namedArgs;
            m_namedArgsValues = namedArgsValues;
        }

        //
        // MetaDataEquality Methods
        //

        public override bool Equals( object obj )
        {
            if(obj is CustomAttributeRepresentation)
            {
                CustomAttributeRepresentation other = (CustomAttributeRepresentation)obj;

                if(m_constructor == other.m_constructor)
                {
                    if(ArrayUtility.ArrayEquals( m_fixedArgsValues, other.m_fixedArgsValues ) &&
                       ArrayUtility.ArrayEquals( m_namedArgs      , other.m_namedArgs       ) &&
                       ArrayUtility.ArrayEquals( m_namedArgsValues, other.m_namedArgsValues )  )
                    {
                        return true;
                    }
                }
            }

            return false;
        }

        public override int GetHashCode()
        {
            return m_constructor.GetHashCode();
        }

        //--//

        //
        // Helper Methods
        //

        public void ApplyTransformation( TransformationContext context )
        {
            context.Push( this );

            context.Transform( ref m_constructor     );
            context.Transform( ref m_fixedArgsValues );
            context.Transform( ref m_namedArgs       );
            context.Transform( ref m_namedArgsValues );

            context.Pop();
        }

        //--//

        public bool HasNamedArg( string name )
        {
            return GetNamedArgIndex( name ) >= 0;
        }

        public object GetNamedArg( string name )
        {
            int i = GetNamedArgIndex( name );
            if(i >= 0)
            {
                return m_namedArgsValues[i];
            }

            return null;
        }

        public bool TryToGetNamedArg< T >(     string name ,
                                           out T      val  )
        {
            return TryToGetNamedArg( name, out val, default(T) );
        }

        public bool TryToGetNamedArg< T >(     string name       ,
                                           out T      val        ,
                                               T      defaultVal )
        {
            int i = GetNamedArgIndex( name );
            if(i >= 0)
            {
                val = (T)m_namedArgsValues[i];

                return true;
            }
            else
            {
                val = defaultVal;

                return false;
            }
        }

        public T GetNamedArg< T >( string name )
        {
            object val = GetNamedArg( name );

            if(val != null)
            {
                return (T)val;
            }
            else
            {
                return default(T);
            }
        }

        public T GetNamedArg< T >( string name       ,
                                   T      defaultVal )
        {
            object val = GetNamedArg( name );

            if(val != null)
            {
                return (T)val;
            }
            else
            {
                return defaultVal;
            }
        }

        private int GetNamedArgIndex( string name )
        {
            for(int i = 0; i < m_namedArgs.Length; i++)
            {
                if(m_namedArgs[i] == name)
                {
                    return i;
                }
            }

            return -1;
        }

        //--//

        //
        // Access Methods
        //

        public MethodRepresentation Constructor
        {
            get
            {
                return m_constructor;
            }
        }

        public object[] FixedArgsValues
        {
            get
            {
                return m_fixedArgsValues;
            }
        }

        public string[] NamedArgs
        {
            get
            {
                return m_namedArgs;
            }
        }

        public object[] NamedArgsValues
        {
            get
            {
                return m_namedArgsValues;
            }
        }
    }
}


text:
package org.anc.lapps.stanford;

import static org.junit.Assert.*;

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

import org.lappsgrid.core.DataFactory;
import org.lappsgrid.metadata.ServiceMetadata;
import org.lappsgrid.serialization.Data;
import org.lappsgrid.serialization.DataContainer;
import org.lappsgrid.serialization.Serializer;
import org.lappsgrid.serialization.lif.Container;
import org.anc.resource.ResourceLoader;
import org.junit.*;
import org.lappsgrid.api.LappsException;
import org.lappsgrid.api.WebService;
import org.lappsgrid.serialization.lif.Contains;
import org.lappsgrid.serialization.lif.View;

import static org.lappsgrid.discriminator.Discriminators.Uri;

//@Ignore
public class TaggerTest
{
   WebService service;

   @Before
   public void setup() throws LappsException
   {
      this.service = new Tagger();
   }

   @After
   public void tearDown()
   {
      this.service = null;
   }

   @Test
   public void testTagger() throws IOException
   {
      String text = ResourceLoader.loadString("Bartok.txt");
      String input = DataFactory.text(text);

      // The text needs to be tokenized before it is tagged.
      WebService tokenizer = new Tokenizer();
      String json = tokenizer.execute(input);

      // Call the tagger service and parse the output back into a Container object.
      json = service.execute(json);
      DataContainer data = Serializer.parse(json, DataContainer.class);
      assertFalse(data.getPayload().toString(), TestUtils.isError(data));
//      System.out.println(data.asPrettyJson());
//      Container container = new Container(data.getPayload());
      Container container = data.getPayload();

      List<View> views = container.getViews();
      assertTrue("Wrong number of views. Expected 2 found " + views.size(), views.size() == 2);
      int count = 0;
      for (View view : views)
      {
         ++count;
         System.out.println("View " + count + ": ");
         Map metadata = view.getMetadata();
         for (Object key : metadata.keySet())
         {
            Object value = metadata.get(key);
            System.out.println(key.toString() + "=" + value.toString());
         }
      }

//      System.out.println(views.get(0));
      views = container.findViewsThatContain(Uri.TOKEN);
      assertNotNull("Find token views returned null.", views);
      assertTrue("Wrong number of token views. Expected 1 found " + views.size(), views.size() == 1);

      views = container.findViewsThatContain(Uri.POS);
      assertNotNull("Find pos views returned null", views);
      assertTrue("Wrong number of pos views. Expected 1 found " + views.size(), views.size() == 1);

      View view = views.get(0);
      Contains contains = view.getContains(Uri.POS);
      assertNotNull("Unable to get contains section from view", contains);
      assertNotNull("contains.producer is null.", contains.getProducer());
   }

   @Test
   public void testMetadata()
   {
      String json = service.getMetadata();
      assertNotNull("getMetadata() returned null.", json);
      Data data = Serializer.parse(json, Data.class);
      assertTrue("Wrong return type: " + data.getDiscriminator(), TestUtils.isa(data, Uri.META));
      ServiceMetadata metadata = new ServiceMetadata((Map)data.getPayload());
      assertNotNull("Unable to parse metadata.", metadata);
//      TestUtils.check(Tagger.class.getName(), metadata.getName());
      TestUtils.check(Version.getVersion(), metadata.getVersion());
      TestUtils.check("http://www.anc.org", metadata.getVendor());
   }
}


text:
POMDOG_SUPPRESS_WARNINGS_GENERATED_BY_STD_HEADERS_BEGIN
#include <cstdint>
POMDOG_SUPPRESS_WARNINGS_GENERATED_BY_STD_HEADERS_END

namespace pomdog::gui {

enum class FontWeight : std::uint8_t {
    Light,
    Normal,
    Bold,
};

} // namespace pomdog::gui


text:
"""Showcases contrast sensitivity computations."""

from pprint import pprint

import numpy as np
from scipy.optimize import fmin

import colour
from colour.hints import FloatingOrArrayLike, FloatingOrNDArray
from colour.utilities import as_float, message_box
from colour.plotting import colour_style, plot_single_function

message_box("Contrast Sensitivity Computations")

colour_style()

message_box(
    'Computing the contrast sensitivity for a spatial frequency "u" of 4, an '
    'angular size "X_0" of 60 and a retinal illuminance "E" of 65 using '
    '"Barten (1999)" method.'
)
pprint(colour.contrast_sensitivity_function(u=4, X_0=60, E=65))
pprint(
    colour.contrast.contrast_sensitivity_function_Barten1999(u=4, X_0=60, E=65)
)

print("\n")

message_box(
    "Computing the minimum detectable contrast with the assumed conditions "
    'for UHDTV applications as given in the "ITU-R BT.2246-4" "Figure 31" and '
    'using "Barten (1999)" method.'
)

settings_BT2246 = {
    "k": 3.0,
    "T": 0.1,
    "X_max": 12,
    "N_max": 15,
    "n": 0.03,
    "p": 1.2274 * 10**6,
    "phi_0": 3 * 10**-8,
    "u_0": 7,
}

def maximise_spatial_frequency(L: FloatingOrArrayLike) -> FloatingOrNDArray:
    """
    Maximise the spatial frequency :math:`u` for given luminance value.

    Parameters
    ----------
    L
        Luminance value at which to maximize the spatial frequency :math:`u`.

    Returns
    -------
    :class:`np.floating` or :class:`numpy.ndarray`
        Maximised spatial frequency :math:`u`.
    """

    L = colour.utilities.as_float_array(L)

    maximised_spatial_frequency = []
    for L_v in L:
        X_0 = 60
        d = colour.contrast.pupil_diameter_Barten1999(L_v, X_0)
        sigma = colour.contrast.sigma_Barten1999(0.5 / 60, 0.08 / 60, d)
        E = colour.contrast.retinal_illuminance_Barten1999(L_v, d, True)
        maximised_spatial_frequency.append(
            fmin(
                lambda x: (
                    -colour.contrast.contrast_sensitivity_function_Barten1999(
                        u=x, sigma=sigma, X_0=X_0, E=E, **settings_BT2246
                    )
                ),
                0,
                disp=False,
            )[0]
        )

    return as_float(np.array(maximised_spatial_frequency))

L = np.logspace(np.log10(0.01), np.log10(100), 100)
X_0 = Y_0 = 60
d = colour.contrast.barten1999.pupil_diameter_Barten1999(L, X_0, Y_0)
sigma = colour.contrast.barten1999.sigma_Barten1999(0.5 / 60, 0.08 / 60, d)
E = colour.contrast.barten1999.retinal_illuminance_Barten1999(L, d)
u = maximise_spatial_frequency(L)

pprint(
    1
    / colour.contrast_sensitivity_function(
        u=u,
        sigma=sigma,
        E=E,
        X_0=X_0,
        Y_0=Y_0,
        **settings_BT2246  # type: ignore[arg-type]
    )
    * 2
    * (1 / 1.27)
)
pprint(
    1
    / colour.contrast.contrast_sensitivity_function_Barten1999(
        u=u, sigma=sigma, E=E, X_0=X_0, Y_0=Y_0, **settings_BT2246
    )
    * 2
    * (1 / 1.27)
)

plot_single_function(
    lambda x: (
        1
        / colour.contrast.contrast_sensitivity_function_Barten1999(
            u=u, sigma=sigma, E=E, X_0=X_0, Y_0=Y_0, **settings_BT2246
        )
        * 2
        * (1 / 1.27)
    ),
    samples=L,
    log_x=10,
    **{
        "title": "Examples of HVS Minimum Detectable Contrast Characteristics",
        "x_label": "Luminance ($cd/m^2$)",
        "y_label": "Minimum Detectable Contrast",
        "axes.grid.which": "both",
    }
)


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

namespace _10.Simple_Text_Editor
{
    public class SimpleTextEditor
    {
        public static void Main()
        {
            int opCount = int.Parse(Console.ReadLine());
            string text = string.Empty;
            var history = new Stack<string>();

            for (int i = 0; i < opCount; i++)
            {
                var tokens = Console.ReadLine().Split();
                var operation = int.Parse(tokens[0]);
                switch (operation)
                {
                    case 1:
                        history.Push(text);
                        text += tokens[1];
                        break;
                    case 2:
                        var argument = int.Parse(tokens[1]);
                        history.Push(text);
                        text = text.Remove(text.Length - argument);
                        break;
                    case 3:
                        var index = int.Parse(tokens[1]);
                        Console.WriteLine(text[index - 1]);
                        break;
                    case 4:
                        text = history.Pop();
                        break;
                }
            }
        }
    }
}


text:
/**
 * Module dependencies.
 */

var mongoose = require('mongoose');

/**
 * Define 'TimelineEventType' schema.
 */

var TimelineEventTypeSchema = new mongoose.Schema({
    name:               String,
    color:              String,
    creationDate:       Date,
    lastEditionDate:    Date,
    enabled:            Boolean
});

/**
 * Expose 'TimelineEventType'.
 */

module.exports.TimelineEventType = mongoose.model('TimelineEventType', TimelineEventTypeSchema);


text:
package net.dempsy.container;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import net.dempsy.container.Container.ContainerSpecific;
import net.dempsy.container.Container.Operation;
import net.dempsy.messages.KeyedMessage;
import net.dempsy.messages.MessageResourceManager;
import net.dempsy.monitoring.NodeStatsCollector;
import net.dempsy.transport.RoutedMessage;

public class DeliverResourceJob extends DeliverMessageJob {
    private final MessageResourceManager disposition;

    public DeliverResourceJob(final Container[] containers, final NodeStatsCollector statsCollector, final RoutedMessage message, final boolean justArrived,
        final MessageResourceManager disposition) {
        super(containers, statsCollector, message, justArrived);
        this.disposition = disposition;
    }

    @Override
    public void executeAllContainers() {
        executeMessageOnContainers(message, justArrived);
        disposition.dispose(message.message);
    }

    @Override
    public void rejected(final boolean stopping) {
        disposition.dispose(message.message);
        statsCollector.messageDiscarded(message);
    }

    private class CJ extends ContainerJob {
        public CJ(final ContainerSpecific cs) {
            super(cs);
            disposition.replicate(message.message); // unrefed in either execute or reject.
        }

        @Override
        public void execute(final Container container) {
            try {
                dispatch(container, new KeyedMessage(message.key, message.message), Operation.handle, justArrived);
            } finally {
                disposition.dispose(message.message);
            }
        }

        @Override
        public void reject(final Container container) {
            disposition.dispose(message.message);
            reject(container, new KeyedMessage(message.key, message.message), justArrived);
        }

    }

    @Override
    public List<ContainerJob> individuate() {
        // disposition.replicate(message.message); // unrefed in individuatedJobsComplete
        return Arrays.stream(containerData())
            .map(c -> c.messageBeingEnqueudExternally(new KeyedMessage(message.key, message.message), justArrived))
            .map(i -> new CJ(i))
            .collect(Collectors.toList());
    }

    @Override
    public void individuatedJobsComplete() {
        disposition.dispose(message.message);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <dimen name="play_header_list_tab_floating_padding">36.0dip</dimen>
    <dimen name="play_header_list_tab_padding_side">24.0dip</dimen>
    <dimen name="play_collection_edge_padding">80.0dip</dimen>
    <dimen name="play_collection_edge_padding_minus_card_half_spacing">74.0dip</dimen>
    <dimen name="highlights_banner_wide_layout_height">448.0dip</dimen>
    <dimen name="searchbox_padding_from_highlight">40.0dip</dimen>
</resources>


text:
static Color apply_brightness(Color color, uint16_t brightness) {
    return (Color) {
        color.r * brightness / 255,
        color.g * brightness / 255,
        color.b * brightness / 255
    };
}

// Apply brightness to a color depending on the ratio of position to max
// Useful for turning a linear increase(1,2,3.../20) into a color pulse
static Color brightness_from_position(Color color, uint8_t position, uint8_t max) {
    return apply_brightness(color, ((max - position) % (max + 1)) * 255 / max);
}

static Direction get_analog_direction(Controller *controller) {
    if(ANALOG_UP(*controller)) {
        return D_UP;
    } else if(ANALOG_DOWN(*controller)) {
        return D_DOWN;
    } else if(ANALOG_LEFT(*controller)) {
        return D_LEFT;
    } else if(ANALOG_RIGHT(*controller)) {
        return D_RIGHT;
    }
    return D_NONE;
}

static Direction get_c_direction(Controller *controller) {
    if(C_UP(*controller)) {
        return D_UP;
    } else if(C_DOWN(*controller)) {
        return D_DOWN;
    } else if(C_LEFT(*controller)) {
        return D_LEFT;
    } else if(C_RIGHT(*controller)) {
        return D_RIGHT;
    }
    return D_NONE;
}

static void reset_animation(State *state) {
    state->action = IDLE;
    state->color1 = COLOR_WHITE;
    state->color2 = COLOR_NONE;
    state->dir = D_NONE;
    state->interruptable = true;
    state->idle_counter = 0;
}

static void setup_pulse(State *state) {
    state->action = PULSE;
    state->color1 = COLOR_WHITE;
    state->color2 = COLOR_NONE;
    state->dir= D_NONE;
    state->timer = 0;
    state->interruptable = true;
    state->timeout = 20;
    state->pulse_length = 20;
    state->echo = false;
}

State *init_animation(State *state) {
    reset_animation(state);
    state->brightness = 255;
    return state;
}

void next_frame(State *state, Controller *controller) {
    // Update the animation state machine
    state->timer++;

    // Test if the current animation has timed out
    if(state->timer >= state->timeout && state->action != IDLE) {
        reset_animation(state);
        state->action = BLANK;
    }

    // Test if the controller is idle
    if(state->action == BLANK && state->timer >= 0xff) {
        state->action = IDLE;
        state->timer = 0;
    }

    // Check for wobbling
    if(CONTROLLER_A(*controller) && state->wobble_timer > 0) {
        state->wobble_timer = 0;
        state->wobble_counter++;
    } else if(!CONTROLLER_A(*controller)) {
        state->wobble_timer++;
    }
    // Wobbling exit condition(in frames since last A press)
    if(state->wobble_timer >= 60) {
        state->wobble_counter = 0;
    }

    Direction analog_direction = get_analog_direction(controller);

    // If we're in Side-B, make sure B is released before repeating
    if((!state->interruptable) && (state->action == SIDEB) && (!CONTROLLER_B(*controller))) {
        state->interruptable = true;
    } // If the state can be interrupted, check all of the possible outcomes
    else if(state->interruptable) {
        Direction c_direction = get_c_direction(controller);
        // Test if brightness is being changed
        if((CONTROLLER_D_DOWN(*controller))) {
            if(state->brightness >= (255 - 32)) {
                state->brightness = 0;
            } else {
                state->brightness += 32;
            }
            setup_pulse(state);
            state->interruptable = false;
        // Check if we're wobbling
        } else if (CONTROLLER_A(*controller) && state->wobble_counter >= 7) {
            state->action = WOBBLE;
            state->color1 = COLOR_LIGHT_BLUE;
            state->color2 = COLOR_PINK;
            state->dir= D_NONE;
            state->timer = 0;
            state->interruptable = true;
            state->timeout = 20;
            state->pulse_length = 20;
            state->echo = false;
        } // Check for Blizzard(Down-B)
        else if(CONTROLLER_B(*controller) && analog_direction == D_DOWN) {
            state->action = BLIZZARD;
            state->color1 = COLOR_WHITE;
            state->color2 = COLOR_BLUE;
            state->dir= D_NONE;
            state->timer = 0;
            state->interruptable = false;
            state->timeout = 90;
            state->pulse_length = 12;
            state->echo = false;
        } // Check for jump(X or Y)
        else if(CONTROLLER_X(*controller) || CONTROLLER_Y(*controller)) {
            setup_pulse(state);
        } // Check for grab(Z, or Analog L/R and A)
        else if(CONTROLLER_Z(*controller) || (CONTROLLER_A(*controller) &&
                (ANALOG_L(*controller) || ANALOG_R(*controller)))) {
            setup_pulse(state);
            state->color1 = COLOR_PURPLE;
            state->color2 = COLOR_NONE;
        } // Check for Ice blocks(Neutral B)
        else if(CONTROLLER_B(*controller) && analog_direction == D_NONE) {
            setup_pulse(state);
            state->color1 = COLOR_LIGHT_BLUE;
            state->color2 = COLOR_NONE;
        } // Check for aerials, smashes, or tilts
        else if((CONTROLLER_A(*controller) && analog_direction != D_NONE) ||
                (c_direction != D_NONE)) {
            setup_pulse(state);
            state->color1 = COLOR_LIGHT_BLUE;
            state->color2 = COLOR_PINK;
            if(analog_direction != D_NONE) {
                state->dir= analog_direction;
            } else {
                state->dir= c_direction;
            }
            state->timeout = 40;
            state->pulse_length = 20;
            state->echo = true;
        } // Check for Side-B
        else if(CONTROLLER_B(*controller) && (analog_direction == D_LEFT || analog_direction == D_RIGHT)){
            // Check if this is the first Side-B
            if(state->action != SIDEB) {
                state->action = SIDEB;
                state->color1 = (Color) {30, 0, 0};
                state->color2 = COLOR_NONE;
                state->dir= D_DOWN;
                state->timer = 0;
                state->interruptable = false;
                state->timeout = 40;
                state->pulse_length = 10;
                state->echo = false;
            } else {
                state->timer = 0;
                state->color1.r = min(0xff, state->color1.r + 8);
            }
        }
    }

    // Push the animations to the LEDs
    if(state->action == BLIZZARD)
    {
        // Cut into two cycles: 0<->length, length+1<->length*2
        uint8_t position = state->timer % (state->pulse_length * 2);
        // First cycle, 0<->length
        if(position < state->pulse_length) {
            Color color1 = brightness_from_position(state->color1, position, state->pulse_length);
            color1 = apply_brightness(color1, state->brightness);
            Color color2 = brightness_from_position(state->color2, position, state->pulse_length);
            color2 = apply_brightness(color2, state->brightness);
            sendPixel(color1);
            sendPixel(color2);
            sendPixel(color1);
            sendPixel(color2);
            sendPixel(color1);
        } else { // Second cycle, length+1<->length*2
            // Subtract the length to fix the offset
            position = position - state->pulse_length;

            Color color1 = brightness_from_position(state->color1, position, state->pulse_length);
            color1 = apply_brightness(color1, state->brightness);
            Color color2 = brightness_from_position(state->color2, position, state->pulse_length);
            color2 = apply_brightness(color2, state->brightness);
            sendPixel(color2);
            sendPixel(color1);
            sendPixel(color2);
            sendPixel(color1);
            sendPixel(color2);
        }
    } else if(state->action == PULSE) {
        uint8_t position = state->timer;
        //uint8_t position = 0;

        Color colors[5];
        for(uint8_t i = 0; i < 5; i++) {
            if((position >= (PULSE_DELAY * i)) && (position < state->pulse_length + (PULSE_DELAY * i))) {
                colors[i] = brightness_from_position(state->color1, position - (PULSE_DELAY * i), state->pulse_length);
                colors[i] = apply_brightness(colors[i], state->brightness);
            } else if((state->echo) &&
                    (position >= (PULSE_DELAY * (i+1))) &&
                    (position < state->pulse_length + (PULSE_DELAY * (i + 1)))) {
                colors[i] = brightness_from_position(state->color2, position - (PULSE_DELAY * (i + 1)), state->pulse_length);
                colors[i] = apply_brightness(colors[i], state->brightness);
            } else {
                colors[i] = COLOR_NONE;
            }
        }

        switch(state->dir) {
            case(D_NONE):
                showColor(colors[0]);
                break;
            case(D_UP):
                sendPixel(colors[0]);
                sendPixel(colors[1]);
                sendPixel(colors[2]);
                sendPixel(colors[1]);
                sendPixel(colors[0]);
                break;
            case(D_DOWN):
                sendPixel(colors[2]);
                sendPixel(colors[1]);
                sendPixel(colors[0]);
                sendPixel(colors[1]);
                sendPixel(colors[2]);
                break;
            case(D_LEFT):
                sendPixel(colors[4]);
                sendPixel(colors[3]);
                sendPixel(colors[2]);
                sendPixel(colors[1]);
                sendPixel(colors[0]);
                break;
            case(D_RIGHT):
                sendPixel(colors[0]);
                sendPixel(colors[1]);
                sendPixel(colors[2]);
                sendPixel(colors[3]);
                sendPixel(colors[4]);
                break;
        }
    } else if(state->action == SIDEB) {
        uint8_t position = state->timer;

        Color color1;
        if((position >= PULSE_DELAY) && (position < state->pulse_length + PULSE_DELAY)) {
            color1 = brightness_from_position(state->color1, position - PULSE_DELAY , state->pulse_length);
            color1 = apply_brightness(color1, state->brightness);
        } else {
            color1 = COLOR_NONE;
        }
        showColor(color1);
    } else if(state->action == WOBBLE) {
        Color color1 = brightness_from_position(state->color1, state->timer, state->pulse_length);
        color1 = apply_brightness(color1, state->brightness);
        Color color2 = brightness_from_position(state->color2, state->timer, state->pulse_length);
        color2 = apply_brightness(color2, state->brightness);
        if(state->wobble_counter % 2 == 0) {
            sendPixel(color1);
            sendPixel(color1);
            sendPixel(COLOR_NONE);
            sendPixel(color2);
            sendPixel(color2);
        } else {
            sendPixel(color2);
            sendPixel(color2);
            sendPixel(COLOR_NONE);
            sendPixel(color1);
            sendPixel(color1);
        }
    } else if(state->action == IDLE) {
        switch(state->idle_counter) {
            case(0):
                showColor(apply_brightness((Color) {255, state->timer, 0}, state->brightness));
                break;
            case(1):
                showColor(apply_brightness((Color) {255 - state->timer, 255, 0}, state->brightness));
                break;
            case(2):
                showColor(apply_brightness((Color) {0, 255, state->timer}, state->brightness));
                break;
            case(3):
                showColor(apply_brightness((Color) {0, 255 - state->timer, 255}, state->brightness));
                break;
            case(4):
                showColor(apply_brightness((Color) {state->timer, 0, 255}, state->brightness));
                break;
            case(5):
                showColor(apply_brightness((Color) {255, 0, 255 - state->timer}, state->brightness));
                break;
            default:
                state->timer = 0;
                state->idle_counter = 0;
                break;
        }
        if(state->timer == 0xff) {
            state->idle_counter = state->idle_counter + 1;
        }
    } else if(state->action == BLANK) {
        showColor(COLOR_NONE);
    }
}


text:
<md-card>
    <md-card-title>类目"{{category.name}}"包含的材料</md-card-title>
    <md-grid-list md-card-image class="headers" cols="3" rowHeight="48px">
        <md-grid-tile>
            <md-checkbox [(ngModel)]="is_select_all" (change)="toggleSelectAll()">{{is_select_all?'反选':'全选'}}</md-checkbox>
        </md-grid-tile>
        <md-grid-tile>名称</md-grid-tile>

        <md-grid-tile>操作</md-grid-tile>
    </md-grid-list>

数据加载中……

无数据

    <md-grid-list md-card-image class="item" *ngFor="let material_item of material_list;let i = index" cols="3" rowHeight="64px">
        <template [ngIf]="material_item.is_editing">
            <md-grid-tile colspan=2>
                <md-input style="min-width:80%" placeholder="材料名称" [(ngModel)]="material_item.editing_name" maxlength="25"></md-input>
            </md-grid-tile>

            <md-grid-tile>
                <button (click)="cancelEditMaterial(material_item,i)" md-icon-button md-tooltip="取消" tooltip-position="before"><md-icon>close</md-icon></button>
                <button (click)="submitMaterialData(material_item)" md-icon-button md-tooltip="提交" tooltip-position="after"><md-icon>check</md-icon></button>
            </md-grid-tile>
        </template>
        <template [ngIf]="!material_item.is_editing">
            <md-grid-tile>
                <md-checkbox [(ngModel)]="material_item.is_selected" (change)="itemSelected(material_item,i)">{{material_item.id}}</md-checkbox>
            </md-grid-tile>
            <md-grid-tile>{{material_item.name}}</md-grid-tile>

            <md-grid-tile>
                <button (click)="editMaterial(material_item)" md-icon-button md-tooltip="编辑" tooltip-position="before"><md-icon>edit</md-icon></button>
            </md-grid-tile>
        </template>
    </md-grid-list>
    <md-card-footer>
        <md-progress-bar *ngIf="is_loading_list_data" mode="indeterminate"></md-progress-bar>
    </md-card-footer>
    <md-card-actions align="end">
        <button (click)="removeSelectedMaterial()" color="warn" md-button [disabled]="selected_num==0"><md-icon>delete</md-icon>删除选中材料</button>
        <button (click)="addNewMaterial()" md-raised-button color="primary" [disabled]="!material_list"><md-icon>add_box</md-icon>新增材料</button>
    </md-card-actions>
</md-card>


text:
from __future__ import unicode_literals

from django.db import models, migrations

class Migration(migrations.Migration):

    dependencies = [
        ('todo', '0002_auto_20150917_1855'),
    ]

    operations = [
        migrations.AddField(
            model_name='todo',
            name='checked',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='todo',
            name='description',
            field=models.TextField(default=b''),
        ),
        migrations.AlterField(
            model_name='todo',
            name='name',
            field=models.CharField(max_length=100),
        ),
    ]


text:
<?php
/**
 * Recompute notification counts for all users.
 *
 * @ingroup Maintenance
 */
require_once getenv( 'MW_INSTALL_PATH' ) !== false
	? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
	: __DIR__ . '/../../../maintenance/Maintenance.php';

/**
 * Maintenance script that recomputes notification counts
 *
 * @ingroup Maintenance
 */
class RecomputeNotifCounts extends Maintenance {

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

		$this->addDescription( 'Recompute notification counts for all users.' );
		$this->addOption( 'user-ids',
			'Comma-separated list of users to recompute notification counts for', false, true );
		$this->addOption( 'notif-types',
			'Recompute counts for all users who have unread notifications of one of these types (comma-separated)',
			false, true );

		$this->setBatchSize( 500 );

		$this->requireExtension( 'Echo' );
	}

	public function execute() {
		$dbFactory = MWEchoDbFactory::newFromDefault();
		$dbwEcho = $dbFactory->getEchoDb( DB_PRIMARY );
		$dbrEcho = $dbFactory->getEchoDb( DB_REPLICA );
		$dbr = wfGetDB( DB_REPLICA );

		$userIDs = $this->getOption( 'user-ids' );
		$userIDs = $userIDs ? explode( ',', $userIDs ) : null;
		$notifTypes = $this->getOption( 'notif-types' );
		$notifTypes = $notifTypes ? explode( ',', $notifTypes ) : null;

		if ( $userIDs ) {
			$userIterator = array_chunk( $userIDs, $this->getBatchSize() );
		} elseif ( $notifTypes ) {
			$userIterator = new BatchRowIterator(
				$dbrEcho,
				[ 'echo_event', 'echo_notification' ],
				'notification_user',
				$this->getBatchSize()
			);
			$userIterator->addJoinConditions( [
				'echo_notification' => [ 'INNER JOIN', 'notification_event=event_id' ]
			] );
			$userIterator->addConditions( [
				'event_type' => $notifTypes,
				'notification_read_timestamp' => null
			] );
			$userIterator->addOptions( [
				'GROUP BY' => 'notification_user'
			] );
			$userIterator->setCaller( __METHOD__ );
		} else {
			$userQuery = User::getQueryInfo();
			$userIterator = new BatchRowIterator( $dbr, $userQuery['tables'], 'user_id', $this->getBatchSize() );
			$userIterator->setFetchColumns( $userQuery['fields'] );
			$userIterator->addJoinConditions( $userQuery['joins'] );
			$userIterator->setCaller( __METHOD__ );
		}

		$count = 0;
		foreach ( $userIterator as $batch ) {
			foreach ( $batch as $rowOrID ) {
				if ( is_object( $rowOrID ) && isset( $rowOrID->user_id ) ) {
					$user = User::newFromRow( $rowOrID );
				} else {
					$user = User::newFromId( is_object( $rowOrID ) ? $rowOrID->notification_user : $rowOrID );
				}
				$notifUser = MWEchoNotifUser::newFromUser( $user );
				$notifUser->resetNotificationCount();
			}
			$count += count( $batch );
			$this->output( "$count users' counts recomputed.\n" );
			$dbFactory->waitForReplicas();
		}
	}
}

$maintClass = RecomputeNotifCounts::class;
require_once RUN_MAINTENANCE_IF_MAIN;


text:
'use strict';

var arrayBufferToBinaryString = require('./arrayBufferToBinaryString');

// shim for browsers that don't support it
module.exports = function (blob, callback) {
  if (typeof FileReader === 'undefined') {
    // fix for Firefox in a web worker
    // https://bugzilla.mozilla.org/show_bug.cgi?id=901097
    return callback(arrayBufferToBinaryString(
      new FileReaderSync().readAsArrayBuffer(blob)));
  }

  var reader = new FileReader();
  var hasBinaryString = typeof reader.readAsBinaryString === 'function';
  reader.onloadend = function (e) {
    var result = e.target.result || '';
    if (hasBinaryString) {
      return callback(result);
    }
    callback(arrayBufferToBinaryString(result));
  };
  if (hasBinaryString) {
    reader.readAsBinaryString(blob);
  } else {
    reader.readAsArrayBuffer(blob);
  }
};


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<parent>
		<groupId>org.jasig.cas</groupId>
		<artifactId>cas-server</artifactId>
		<version>3.4.10</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.jasig.cas</groupId>
	<artifactId>cas-server-support-radius</artifactId>
	<packaging>jar</packaging>
	<name>JA-SIG CAS RADIUS Support</name>

	<dependencies>
		<dependency>
			<groupId>org.jasig.cas</groupId>
			<artifactId>cas-server-core</artifactId>
			<version>${project.version}</version>
		</dependency>

        <dependency>
            <groupId>net.jradius</groupId>
            <artifactId>jradius-core</artifactId>
            <version>1.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>net.jradius</groupId>
            <artifactId>jradius-dictionary</artifactId>
            <version>1.0.0</version>
        </dependency>
<!--
        <dependency>
            <groupId>net.jradius</groupId>
            <artifactId>jradius-extended</artifactId>
            <version>1.0.0</version>
        </dependency>
-->

	</dependencies>

    <repositories>
        <repository>
          <id>coova</id>
          <name>Coova Repository</name>
          <url>http://coova-dev.s3.amazonaws.com/mvn</url>
        </repository>
  </repositories>
</project>


text:
function foo(i) {
  return i % 2 | 0;
};
%PrepareFunctionForOptimization(foo);
assertEquals(-1, foo(-1));
assertEquals(-1, foo(-1));
%OptimizeFunctionOnNextCall(foo);
assertEquals(-1, foo(-1));