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

namespace Pb.Collections
{
	/// <summary>
	/// A tuple class of two objects
	/// </summary>
	/// <typeparam name="T1">The first type to store in the tuple</typeparam>
	/// <typeparam name="T2">The second type to store in the tuple</typeparam>
	[System.Serializable]
	public class Tuple<T1, T2> :
		System.IComparable,
		System.IComparable<Tuple<T1, T2>>
	{
		/// <summary>
		/// The first object stored in the tuple
		/// </summary>
		[SerializeField]
		protected readonly T1 item1_;
		/// <summary>
		/// The second object stored in the tuple
		/// </summary>
		[SerializeField]
		protected readonly T2 item2_;

		private int CompareTo_(Tuple<T1, T2> other)
		{
			Comparer<T1> c1 = Comparer<T1>.Default;
			Comparer<T2> c2 = Comparer<T2>.Default;

			if (other == null)
				return 1;
			if (c1.Compare(item1_, other.item1_) > 0)
				return 1;
			else if (c1.Compare(item1_, other.item1_) < 0)
				return -1;
			else
				if (c2.Compare(item2_, other.item2_) > 0)
					return 1;
				else if (c2.Compare(item2_, other.item2_) < 0)
					return -1;
				else
					return 0;
		}

		int System.IComparable.CompareTo(object obj)
		{
			if (obj == null)
				return 1;

			return CompareTo_(obj as Tuple<T1, T2>);
		}

		int System.IComparable<Tuple<T1, T2>>.CompareTo(Tuple<T1, T2> other)
		{
			return CompareTo_(other);
		}

		/// <summary>
		/// Constructor for the tuple
		/// </summary>
		/// <param name="item1">The first item in the tuple</param>
		/// <param name="item2">The second item in the tuple</param>
		public Tuple(T1 item1, T2 item2)
		{
			item1_ = item1;
			item2_ = item2;
		}
		/// <summary>
		/// The first item in the tuple (readonly)
		/// </summary>
		public T1 Item1
		{
			get
			{
				return item1_;
			}
		}
		/// <summary>
		/// The second item in the tuple (readonly)
		/// </summary>
		public T2 Item2
		{
			get
			{
				return item2_;
			}
		}
		/// <summary>
		/// Determines whether the tuple is equal to another object
		/// </summary>
		/// <param name="obj">The object to compare the tuple to</param>
		/// <returns>Whether the two tuples are equal</returns>
		public override bool Equals(object obj)
		{
			if (obj == null)
				return false;

			Tuple<T1, T2> other = obj as Tuple<T1, T2>;
			if (other == null)
				return false;
			return (item1_.Equals(other.item1_) && item2_.Equals(other.item2_));
		}
		/// <summary>
		/// Determines the hash code of the tuple
		/// </summary>
		/// <returns>The hash code of the tuple</returns>
		public override int GetHashCode()
		{
			return Math.NToZ(Math.Pair(item1_.GetHashCode(), item2_.GetHashCode()));
		}
		/// <summary>
		/// Gets a string representing the tuple
		/// </summary>
		/// <returns>A string representing the tuple</returns>
		public override string ToString()
		{
			return "(" + item1_.ToString() + ", " + item2_.ToString() + ")";
		}
	}
	/// <summary>
	/// A tuple class of three objects
	/// </summary>
	/// <typeparam name="T1">The first type to store in the tuple</typeparam>
	/// <typeparam name="T2">The second type to store in the tuple</typeparam>
	/// <typeparam name="T3">The third type to store in the tuple</typeparam>
	[System.Serializable]
	public class Tuple<T1, T2, T3> :
		System.IComparable,
		System.IComparable<Tuple<T1, T2, T3>>
	{
		/// <summary>
		/// The first object stored in the tuple
		/// </summary>
		[SerializeField]
		protected readonly T1 item1_;
		/// <summary>
		/// The second object stored in the tuple
		/// </summary>
		[SerializeField]
		protected readonly T2 item2_;
		/// <summary>
		/// The third object stored in the tuple
		/// </summary>
		[SerializeField]
		protected readonly T3 item3_;

		private int CompareTo_(Tuple<T1, T2, T3> other)
		{
			Comparer<T1> c1 = Comparer<T1>.Default;
			Comparer<T2> c2 = Comparer<T2>.Default;
			Comparer<T3> c3 = Comparer<T3>.Default;

			if (other == null)
				return 1;
			if (c1.Compare(item1_, other.item1_) > 0)
				return 1;
			else if (c1.Compare(item1_, other.item1_) < 0)
				return -1;
			else
				if (c2.Compare(item2_, other.item2_) > 0)
					return 1;
				else if (c2.Compare(item2_, other.item2_) < 0)
					return -1;
				else
					if (c3.Compare(item3_, other.item3_) > 0)
						return 1;
					else if (c3.Compare(item3_, other.item3_) < 0)
						return -1;
					else
						return 0;
		}

		int System.IComparable.CompareTo(object obj)
		{
			if (obj == null)
				return 1;

			return CompareTo_(obj as Tuple<T1, T2, T3>);
		}

		int System.IComparable<Tuple<T1, T2, T3>>.CompareTo(Tuple<T1, T2, T3> other)
		{
			return CompareTo_(other);
		}

		/// <summary>
		/// Constructor for the tuple
		/// </summary>
		/// <param name="item1">The first object to store in the tuple</param>
		/// <param name="item2">The second object to store in the tuple</param>
		/// <param name="item3">The third object to store in the tuple</param>
		public Tuple(T1 item1, T2 item2, T3 item3)
		{
			item1_ = item1;
			item2_ = item2;
			item3_ = item3;
		}
		/// <summary>
		/// The first object in the tuple (readonly)
		/// </summary>
		public T1 Item1
		{
			get
			{
				return item1_;
			}
		}
		/// <summary>
		/// The second object in the tuple (readonly)
		/// </summary>
		public T2 Item2
		{
			get
			{
				return item2_;
			}
		}
		/// <summary>
		/// The third object in the tuple (readonly)
		/// </summary>
		public T3 Item3
		{
			get
			{
				return item3_;
			}
		}
		/// <summary>
		/// Determines whether the tuple is equal to another object
		/// </summary>
		/// <param name="obj">The object to compare the tuple to</param>
		/// <returns>Whether the two tuples are equal</returns>
		public override bool Equals(object obj)
		{
			if (obj == null)
				return false;

			Tuple<T1, T2, T3> other = obj as Tuple<T1, T2, T3>;
			if (other == null)
				return false;
			return (item1_.Equals(other.item1_) && item2_.Equals(other.item2_) && item3_.Equals(other.item3_));
		}
		/// <summary>
		/// Gets the hash code of the tuple
		/// </summary>
		/// <returns>The hash code of the tuple</returns>
		public override int GetHashCode()
		{
			return Math.NToZ(
				Math.Pair(
					Math.ZToN(item1_.GetHashCode()),
					Math.Pair(
						Math.ZToN(item1_.GetHashCode()),
						Math.ZToN(item2_.GetHashCode())
					)
				)
			);
		}
		/// <summary>
		/// Gets a string representing the tuple
		/// </summary>
		/// <returns>A string representing the tuple</returns>
		public override string ToString()
		{
			return "(" + item1_.ToString() + ", " + item2_.ToString() + ", " + item3_.ToString() + ")";
		}
	}
}


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

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

<META NAME="date" CONTENT="2013-07-08">

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

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.tools.ant.taskdefs.optional.depend

Class JarFileIterator

java.lang.Object
  org.apache.tools.ant.taskdefs.optional.depend.JarFileIterator

All Implemented Interfaces:
ClassFileIterator

public class JarFileIterator
extends java.lang.Object
implements ClassFileIterator

A class file iterator which iterates through the contents of a Java jar
 file.

Constructor Summary

JarFileIterator(java.io.InputStream stream)

          Construct an iterator over a jar stream

Method Summary

 ClassFile
getNextClassFile()

          Get the next ClassFile object from the jar

Methods inherited from class java.lang.Object

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

Constructor Detail

JarFileIterator

public JarFileIterator(java.io.InputStream stream)
                throws java.io.IOException

Construct an iterator over a jar stream

Parameters:
stream - the basic input stream from which the Jar is received

Throws:

java.io.IOException - if the jar stream cannot be created

Method Detail

getNextClassFile

public ClassFile getNextClassFile()

Get the next ClassFile object from the jar

Specified by:
getNextClassFile in interface ClassFileIterator

Returns:
a ClassFile object describing the class from the jar

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

redpajama_set_name: RedPajamaGithub


text:
/*eslint-env node*/

//------------------------------------------------------------------------------
// node.js starter application for Bluemix
//------------------------------------------------------------------------------

// This application uses express as its web server
// for more info, see: http://expressjs.com
var express = require('express');
var request = require('request');
var Twitter = require('twitter');

// cfenv provides access to your Cloud Foundry environment
// for more info, see: https://www.npmjs.com/package/cfenv
var cfenv = require('cfenv');

var parser = require('json-parser');

var Client = require("ibmiotf");
var config = {
    "org": "82nnqq",
    "id": "MyTweets",
    "domain": "internetofthings.ibmcloud.com",
    "type": "Tweets",
    "auth-method": "token",
    "auth-token": "yqkd7382hdkd-"
};
var deviceClient = new Client.IotfDevice(config);
deviceClient.connect();

var twitterClient = new Twitter({
        consumer_key: 'uyGpIwSq2QmEjok8qsvAtwCW0',
        consumer_secret: 'P1Jona5WwUE54WF8LjQHE8ZJa2zK7wKmLGTj8WPZyGHqeMhxHl',
        access_token_key: '132337921-mWzwmPzlpWS9m5B7pw7T3VIWIgkPQQYUVkuGJqTG',
        access_token_secret: 'waoDLEZrg14hV2dox0FwTUs4Qv5C3ReajWOtVnlLVigUM'
    });

// create a new express server
var app = express();

var timesGetWeatherAndTweetsCalled = 0;
var weatherIntervalID;

// serve the files out of ./public as our main files
app.use(express.static(__dirname + '/public'));

// get the app environment from Cloud Foundry
var appEnv = cfenv.getAppEnv();

// When the device connects
deviceClient.on("connect", function() {
	console.log("Device connected!");
});

// When the device receives an error
deviceClient.on("error", function(err) {
	console.log("Error! - " + err);
});

app.get('/process_get', function(req, res)
{
	timesGetWeatherAndTweetsCalled = 0;
	// Prepare output in JSON format
	response = {
		lat1: req.query.latitude1,
		long1: req.query.longitude1,
		lat2: req.query.latitude2,
		long2: req.query.longitude2
	};
	var locationString = "";
	locationString += response.lat1 + "," + response.long1 + "," + response.lat2 + "," + response.long2;

	intervalID = setInterval(function() {
		getWeatherAndTweets(locationString);
	}, 10000);

	// res.setHeader("Content-Type", "text/html");
	// res.end("<form action='https://jpeterkdemoapp.mybluemix.net/process_get' method='GET'>" +
 //      		"Latitude: <input type='text' name='latitude' />
" +
 //      		"Longitude: <input type='text' name='longitude' />
" +
 //      		"<input type='submit' text='submit' />" +
 //    		"</form>" +
 //    		"
" + JSON.stringify(body.forecasts) + "
");
});

function getWeatherAndTweets(locationString)
{
	if (timesGetWeatherAndTweetsCalled >= 5)
	{
		clearInterval(intervalID);
		deviceClient.disconnect();
	}
	else
	{
		var callURL = "https://58a809af-857f-4b07-a8c3-2474229efe45:EwTcQmn8ST@twcservice.mybluemix.net/api/weather/v1/geocode/" + response.lat1 + "/" + response.long1 + "/forecast/hourly/48hour.json?units=m&language=en-US";
		request.get(callURL, {
			json: true
		},
		function (error, response, body) {
			console.log("forecast: " + body.forecasts);
			deviceClient.publish("status", "json", JSON.stringify(body.forecasts));
		});
		var stream = twitterClient.stream("statuses/filter", { locations: locationString });
		stream.on("data", function(event) {
			console.log(event && event.text);
			deviceClient.publish("status", "json", '{"d": {"text": ' + event.text + '}}');
		});
	}
	timesGetWeatherAndTweetsCalled++;
}

// start server on the specified port and binding host
app.listen(appEnv.port, '0.0.0.0', function() {
  // print a message when the server starts listening
  console.log("server starting on " + appEnv.url);
});


text:
import os

from configobj import ConfigObj

class CapsuleMeta(object):
    def __init__(self):
        try:
            os.mkdir(self.metadata_folder)
        except OSError:
            pass

    @property
    def metadata_folder(self):
        return os.path.expanduser('~/.taskwarrior-capsules')

    def get_metadata_path(self, *args):
        return os.path.join(
            self.metadata_folder,
            *args
        )

    @property
    def configuration(self):
        if not hasattr(self, '_config'):
            self._config = ConfigObj(
                self.get_metadata_path(
                    'capsules.conf'
                )
            )
        return self._config


text:
<?php

namespace Doctrine\Tests\Common\Annotations;

use ReflectionClass;
use Doctrine\Common\Annotations\PhpParser;

require_once __DIR__.'/Fixtures/NonNamespacedClass.php';
require_once __DIR__.'/Fixtures/GlobalNamespacesPerFileWithClassAsFirst.php';
require_once __DIR__.'/Fixtures/GlobalNamespacesPerFileWithClassAsLast.php';

class PhpParserTest extends \PHPUnit_Framework_TestCase
{
    public function testParseClassWithMultipleClassesInFile()
    {
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\MultipleClassesInFile');
        $parser = new PhpParser();

        $this->assertEquals(array(
            'route'  => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
        ), $parser->parseClass($class));
    }

    public function testParseClassWithMultipleImportsInUseStatement()
    {
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\MultipleImportsInUseStatement');
        $parser = new PhpParser();

        $this->assertEquals(array(
            'route'  => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
        ), $parser->parseClass($class));
    }

    public function testParseClassWhenNotUserDefined()
    {
        $parser = new PhpParser();
        $this->assertEquals(array(), $parser->parseClass(new \ReflectionClass('\stdClass')));
    }

    public function testClassFileDoesNotExist()
    {
        $class = $this->getMockBuilder('\ReflectionClass')
                ->disableOriginalConstructor()
                          ->getMock();
        $class->expects($this->once())
             ->method('getFilename')
             ->will($this->returnValue('/valid/class/Fake.php(35) : eval()d code'));

        $parser = new PhpParser();
        $this->assertEquals(array(), $parser->parseClass($class));
    }

    public function testParseClassWhenClassIsNotNamespaced()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass('\AnnotationsTestsFixturesNonNamespacedClass');

        $this->assertEquals(array(
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    public function testParseClassWhenClassIsInterface()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\TestInterface');

        $this->assertEquals(array(
            'secure' => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
        ), $parser->parseClass($class));
    }

    public function testClassWithFullyQualifiedUseStatements()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\ClassWithFullyQualifiedUseStatements');

        $this->assertEquals(array(
            'secure'   => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Secure',
            'route'    => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => '\\' . __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    public function testNamespaceAndClassCommentedOut()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceAndClassCommentedOut');

        $this->assertEquals(array(
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
	}

    public function testEqualNamespacesPerFileWithClassAsFirst()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\EqualNamespacesPerFileWithClassAsFirst');

        $this->assertEquals(array(
            'secure'   => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
        ), $parser->parseClass($class));
    }

    public function testEqualNamespacesPerFileWithClassAsLast()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\EqualNamespacesPerFileWithClassAsLast');

        $this->assertEquals(array(
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    public function testDifferentNamespacesPerFileWithClassAsFirst()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\DifferentNamespacesPerFileWithClassAsFirst');

        $this->assertEquals(array(
            'secure'   => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
        ), $parser->parseClass($class));
    }

    public function testDifferentNamespacesPerFileWithClassAsLast()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\DifferentNamespacesPerFileWithClassAsLast');

        $this->assertEquals(array(
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    public function testGlobalNamespacesPerFileWithClassAsFirst()
    {
        $parser = new PhpParser();
        $class = new \ReflectionClass('\GlobalNamespacesPerFileWithClassAsFirst');

        $this->assertEquals(array(
            'secure'   => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
        ), $parser->parseClass($class));
    }

    public function testGlobalNamespacesPerFileWithClassAsLast()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass('\GlobalNamespacesPerFileWithClassAsLast');

        $this->assertEquals(array(
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    public function testNamespaceWithClosureDeclaration()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceWithClosureDeclaration');

        $this->assertEquals(array(
            'secure'   => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    public function testIfPointerResetsOnMultipleParsingTries()
    {
        $parser = new PhpParser();
        $class = new ReflectionClass(__NAMESPACE__ . '\Fixtures\NamespaceWithClosureDeclaration');

        $this->assertEquals(array(
            'secure'   => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));

        $this->assertEquals(array(
            'secure'   => __NAMESPACE__ . '\Fixtures\Annotation\Secure',
            'route'    => __NAMESPACE__ . '\Fixtures\Annotation\Route',
            'template' => __NAMESPACE__ . '\Fixtures\Annotation\Template',
        ), $parser->parseClass($class));
    }

    /**
     * @group DCOM-97
     * @group regression
     */
    public function testClassWithClosure()
    {
        $parser = new PhpParser();
        $class  = new ReflectionClass(__NAMESPACE__ . '\Fixtures\ClassWithClosure');

        $this->assertEquals(array(
          'annotationtargetall'         => __NAMESPACE__ . '\Fixtures\AnnotationTargetAll',
          'annotationtargetannotation'  => __NAMESPACE__ . '\Fixtures\AnnotationTargetAnnotation',
        ), $parser->parseClass($class));
    }
}


text:
package com.tslsmart.excel.test;

import cn.wangxs.excel.annotation.ExcelField;
import org.apache.poi.hssf.util.HSSFColor;

import java.util.Date;

/**
 * @author JakeWoo
 * @version 1.0
 * @date 2019-02-14 17:50:33
 */
public class ExcelEntity {
    @ExcelField(name = "姓名", order = 1)
    private String userName;
    @ExcelField(name = "密码", order = 2)
    private String passWord;
    @ExcelField(name = "网址", order = 3)
    private String url;
    @ExcelField(name = "注册时间", order = 5, format = "yyyy-MM-dd HH:mm:ss")
    private Date time;
    @ExcelField(name = "账户余额", order = 4, format = "#.###", color = HSSFColor.YELLOW.class, expression = "money<1000")
    private Double money;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Double getMoney() {
        return money;
    }

    public void setMoney(Double money) {
        this.money = money;
    }
}


text:
<?php

namespace Presta\SitemapBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Presta\SitemapBundle\DependencyInjection\Compiler\AddSitemapListenersPass;

/**
 * Bundle that provides tools to render application sitemap according to
 * sitemap protocol. @see http://www.sitemaps.org/
 * @see README.md for basic usage
 *
 * @author depely
 */
class PrestaSitemapBundle extends Bundle
{
    public function build(ContainerBuilder $container)
    {
        parent::build($container);

        $container->addCompilerPass(new AddSitemapListenersPass(), PassConfig::TYPE_OPTIMIZE);
    }
}


text:
//
//  ReportsViewController.m
//  SaludCLUI
//
//  Created by Vivek Sridhar on 9/6/15.
//  Copyright (c) 2015 Vanguards. All rights reserved.
//

#import "ReportsViewController.h"
#import "SWRevealViewController.h"
#import "DownPicker.h"
#import "TableViewCell.h"
#import "Reachability.h"
#import "RemoteGetData.h"
#import "GetCategories.h"
#import "GetUrl.h"
#import "MessageController.h"
#import "AppDelegate.h"

@interface ReportsViewController ()
@property(weak,nonatomic) NSString *chartValues;
@end

@implementation ReportsViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.

    _txtFldlocation.borderStyle = UITextBorderStyleRoundedRect;

    [self.view addSubview:self.containerview];

_btnMenu.target=self.revealViewController;
_btnMenu.action=@selector(revealToggle:);
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];

AppDelegate *appDelegate = [[UIApplication sharedApplication]delegate];

//[self showSalesReport:appDelegate.location];

TableViewCell *tb = [[TableViewCell alloc] init];
[tb getHourlySales:appDelegate.location];
[tb getWeeklySales:appDelegate.location];
}

 -(void)showSalesReport:(NSString *)location
 {
     //Below code checks whether internet connection is there or not
     Reachability *networkReachability = [Reachability reachabilityForInternetConnection];
     NetworkStatus networkStatus = [networkReachability currentReachabilityStatus];

     msg = [[MessageController alloc] init];

     if (networkStatus == NotReachable) {
         [msg displayMessage:@"No internet connection available..Please connect to the internet.."];
     }
     else
     {
         //Get the Categories from db
         GetUrl  *getUrl = [[GetUrl alloc] init];
         NSString *url = [getUrl getHref:17];

         RemoteGetData *remote = [[RemoteGetData alloc] init];
         int res = [remote getJsonData:@[@"location"] forobjects:@[location]  forurl:url];

         if(res==1)
         {
             [msg displayMessage:@"No Data Available"];
         }
         else
         {
             NSLog(@"Result:%@",remote.jsonData);
             NSDictionary *itemDict = [remote.jsonData objectAtIndex:0];
             NSLog(@"%@",itemDict);
         }
     }
 }

-(void)showSales
{
    TableViewCell *tb1 = [[TableViewCell alloc] init];
    [tb1 getHourlySales:[self.downPickerlocation text]];
    [tb1 getWeeklySales:[self.downPickerlocation text]];
}

#pragma mark - UITableView Datasource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 2;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    //return section?2:4;
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *cellIdentifier = @"TableViewCell";

    TableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];

    if(cell == nil) {
        cell = [[[NSBundle mainBundle]loadNibNamed:@"TableViewCell" owner:nil options:nil] firstObject];
    }

    [cell configUI:indexPath];

    return cell;

}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 300;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 44;
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{

    CGRect frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width , 44);

    UILabel *label = [[UILabel alloc]initWithFrame:frame];
    label.font = [UIFont systemFontOfSize:30];
    label.backgroundColor = [[UIColor lightGrayColor]colorWithAlphaComponent:0.3];
    label.text = section ? @"Weekly Sales":@"Hourly Sales";
    label.textColor = [UIColor colorWithRed:0.257 green:0.650 blue:0.478 alpha:1.000];
    label.textAlignment = NSTextAlignmentCenter;
    return label;
}

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

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/

@end


text:
class NamedModel < Cms::Models::Document
  include Named
end

RSpec.shared_examples "Named" do
  it "should be valid" do
    expect(named_model).to be_valid
  end

  it "should validate name presence" do
    named_model.name = nil
    expect(named_model).to be_invalid
  end

  it "should have name length between 2 and 30" do
    named_model.name = Faker::Lorem.characters(1)
    expect(named_model).to be_invalid

    named_model.name = Faker::Lorem.word[0..2]
    expect(named_model).to be_valid

    named_model.name = Faker::Lorem.characters(31)
    expect(named_model).to be_invalid
  end

  it "should have name wtih alphanumeric char only" do
    named_model.name = '123'
    expect(named_model).to be_invalid

    named_model.name = 'ab123'
    expect(named_model).to be_valid

    named_model.name = 'abc'
    expect(named_model).to be_valid
  end
end


text:
using System.Collections.Generic;
using Emergency_Skeleton.Interfaces.Core;
using Emergency_Skeleton.Models;

namespace Emergency_Skeleton.Entities.Commands
{
    public class RegisterHealthEmergency : BaseCommand
    {
        public RegisterHealthEmergency(IList<string> arguments, IEmergencyManagementSystem emergencyManager) : base(arguments, emergencyManager)
        {
        }

        public override string Execute()
        {
            return this.EmergencyManager.RegisterHealthEmergency(this.Arguments);
        }
    }
}


text:
/**
 * Operates the players paddle.
 * This class represents a Paddle
 */
public class Paddle{

	private int xPosition = 0;
	private int yPosition = 0;
	private int paddleWidth = 10;
	private int paddleHeight = 10;
	private String colour = "White";
	private Rectangle paddleRectangle = new Rectangle(xPosition, yPosition, paddleWidth, paddleHeight, colour);

	/**
  * Basic Constructor, defaults height to 20 pixels
  * @param xPos The starting X position for the paddle
  * @param yPos The starting Y position for the paddle
  * @param col The colour of the paddle
  * @param width The width of the paddle
  */
	public Paddle(int xPos, int yPos, int width, String col){
		xPosition = xPos;
		yPosition = yPos;
		paddleWidth = width;
	  paddleHeight = 20;
		colour = col;

    updateSprite();
	}

  /**
  * Updates the sprite to correctly represent the variables of the Paddle.
  * only to be used within the paddle class
  */
	private void updateSprite(){
    paddleRectangle.setXPosition(xPosition);
    paddleRectangle.setYPosition(yPosition);
    paddleRectangle.setWidth(paddleWidth);
    paddleRectangle.setHeight(paddleHeight);
    paddleRectangle.setColour(colour);
  }

	/**
	 * Obtains the current height of the paddle.
	 * @return the height of the paddle as int.
	 */
	public int getHeight(){
		return paddleHeight;
	}

  /**
  * obtains the rectangle class used to represent the paddle
  * @return the rectangle used as the sprite
  */
  public Rectangle getRectangle(){
    return paddleRectangle;
  }

	/**
	 * Sets the height of the paddle
	 * @param newHeight the new height of the paddle
	 */
	public void setHeight(int newHeight){
		paddleHeight = newHeight;
    updateSprite();
	}

  /**
  * Sets the width of the paddle
  * @param newWidth The new width
  */
  public void setWidth(int newWidth){
    paddleWidth = newWidth;
    updateSprite();
  }

  /**
  * Sets the colour of this paddle
  * @param col The new colour for the paddle
  */
  public void setColour(String col){
    colour = col;
    updateSprite();
  }

   /**
	 * Moves the current position of this Paddle to the given co-ordinates
	 * @param pos the new position vector of this Ball
	 */
  public void setPosition(int[] pos){
    xPosition = pos[0];
    yPosition = pos[1];
    updateSprite();
  }

	/**
	 * Adds the paddle in the given GameArena
	 * @param gameWindow The GameArena to add the Paddle to
	 */
	public void addPaddle(GameArena gameWindow){
		gameWindow.addRectangle(paddleRectangle);
	}

	/**
	 * Moves the paddle in the X direction
	 * @param xShift The number of pixels to move the paddle by
	 */
	public void move(int xShift){
		xPosition += xShift;
    updateSprite();
	}
}


text:
import unittest
import sys
from os.path import realpath, dirname

__usage__ = '''
%prog      # Searches CWD
%prog DIR
'''

def show_detail(items):
    for i in items:
        print repr(i)

def show_test_result(result):
    print
    print "---- START OF TEST RESULTS"
    print result
    print
    print "Result::errors"
    print show_detail(result.errors)
    print
    print "Result::failures"
    print show_detail(result.failures)
    print
    print "Result::skipped"
    print show_detail(result.skipped)
    print
    print "Result::successful"
    print result.wasSuccessful()
    print
    print "Result::test-run"
    print result.testsRun
    print "---- END OF TEST RESULTS"
    print

if __name__ == '__main__':
    if len(sys.argv) > 1:
        unit_dir = sys.argv[1]
    else:
        unit_dir = dirname(realpath(__file__))

    suite = unittest.TestSuite()
    suite.addTest(unittest.TestLoader().discover(unit_dir))
    test_runner = unittest.TextTestRunner(verbosity=2)
    test_result = test_runner.run(suite)
    show_test_result(test_result)


text:
module.exports = function(grunt) {
  function min_max(min, max) {
    var gzip = require('gzip-js');
    var gzipSize = String(gzip.zip(min, {}).length);
    grunt.log.writeln('Uncompressed size: ' + String(max.length).green + ' bytes.');
    grunt.log.writeln('Compressed size: ' + gzipSize.green + ' bytes gzipped (' + String(min.length).green + ' bytes minified).');
  }

  grunt.registerMultiTask( "csslint", "Lint CSS files with csslint", function() {
    var csslint = require( "csslint" ).CSSLint;
    var files = grunt.file.expandFiles( this.file.src );
    var ruleset = {};
    var verbose = grunt.verbose;
    csslint.getRules().forEach(function( rule ) {
      ruleset[ rule.id ] = 1;
    });
    for ( var rule in this.data.rules ) {
      if ( !this.data.rules[ rule ] ) {
        delete ruleset[rule];
      } else {
        ruleset[ rule ] = this.data.rules[ rule ];
      }
    }
    var hadErrors = 0;
    files.forEach(function( filepath ) {
      var file = grunt.file.read( filepath ),
        message = "Linting " + filepath + "...",
        result;

      // skip empty files
      if (file.length) {
        result = csslint.verify( file, ruleset );
        verbose.write( message );
        if (result.messages.length) {
          verbose.or.write( message );
          grunt.log.error();
        } else {
          verbose.ok();
        }

        result.messages.forEach(function( message ) {
          grunt.log.writeln( "[".red + (typeof message.line !== "undefined" ? ( "L" + message.line ).yellow + ":".red + ( "C" + message.col ).yellow : "GENERAL".yellow) + "]".red );
          grunt.log[ message.type === "error" ? "error" : "writeln" ]( message.message + " " + message.rule.desc + " (" + message.rule.id + ")" );
        });
        if ( result.messages.length ) {
          hadErrors += 1;
        }
      } else {
        grunt.log.writeln( "Skipping empty file " + filepath);
      }

    });
    if (hadErrors) {
      return false;
    }
    grunt.log.writeln( "Lint free files: " + files.length );
  });

  grunt.registerMultiTask( "cssmin", "Minify CSS files with Sqwish.", function() {
    // Get banner, if specified.
    var banner = grunt.task.directive( this.file.src[0], function() {
      return null;
    });
    if ( banner === null ) {
      banner = '';
    } else {
      // Remove banner from src files as it is removed with minification (L73) anyway
      this.file.src.shift();
    }
    var max = grunt.helper( "concat", grunt.file.expandFiles( this.file.src ) );
    var min = banner + require( "sqwish" ).minify( max, false );
    grunt.file.write( this.file.dest, min );
    grunt.log.writeln( "File '" + this.file.dest + "' created." );
    min_max( min, max );
  });

};


text:
<ion-view>
    <ion-nav-title><mm-format-text watch="true">{{ title }}</mm-format-text></ion-nav-title>
    <ion-nav-buttons side="secondary">
        <button class="button button-icon ion-bookmark" ng-click="openToc($event)">
        </button>
        <mm-context-menu>
            <mm-context-menu-item priority="900" ng-if="externalUrl" href="externalUrl" content="'mm.core.openinbrowser' | translate" icon-action="'ion-share'"></mm-context-menu-item>
            <mm-context-menu-item priority="800" ng-if="description" content="'mm.core.moduleintro' | translate" action="expandDescription()" icon-action="'ion-arrow-right-c'"></mm-context-menu-item>
            <mm-context-menu-item priority="700" content="'mm.core.refresh' | translate" action="doRefresh()" icon-action="refreshIcon" close-on-click="false" close-when-done="true"></mm-context-menu-item>
            <mm-context-menu-item priority="600" ng-if="prefetchStatusIcon" content="timemodified" icon-action="prefetchStatusIcon" action="prefetch()" close-on-click="false"></mm-context-menu-item>
            <mm-context-menu-item priority="500" ng-if="size" content="size" icon-description="'ion-cube'" icon-action="'ion-trash-a'" action="removeFiles()"></mm-context-menu-item>
        </mm-context-menu>
      </div>
    </div>
    </ion-nav-buttons>
    <ion-content padding="true" mm-state-class>
        <ion-refresher pulling-text="{{ 'mm.core.pulltorefresh' | translate }}" on-refresh="doRefresh()" ng-if="loaded"></ion-refresher>
        <mm-loading hide-until="loaded">
            <mm-course-mod-description description="description" component="{{component}}" component-id="{{componentId}}"></mm-course-mod-description>
            <mma-mod-book-arrows previous="previousChapter" next="nextChapter" action="loadChapter"></mma-mod-book-arrows>
            <div>
                <mm-format-text watch="true" component="{{ component }}" component-id="{{ componentId }}">{{ content }}</mm-format-text>
            </div>
            <mma-mod-book-arrows previous="previousChapter" next="nextChapter" action="loadChapter"></mma-mod-book-arrows>
        </mm-loading>
    </ion-content>
</ion-view>


text:
/*** Include files ****************************************************************/

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>

#include "dirtysock.h"

/*** Defines **********************************************************************/

/*** Type Definitions *************************************************************/

/*** Variables ********************************************************************/

// debug printf hook
#if DIRTYCODE_DEBUG
static void *_NetLib_pDebugParm = NULL;
static int32_t (*_NetLib_pDebugHook)(void *pParm, const char *pText) = NULL;
//static uint8_t _NetLib_aPrintfMem[4096];
#endif

/*** Private Functions ************************************************************/

/*** Public functions *************************************************************/

/*F********************************************************************************/
/*!
    \Function NetPrintfCode

    \Description
        A printf function that works with both dev/fw-test systems.

    \Input *pFormat - pointer to format string
    \Input ...      - variable argument list

    \Output
        None.

    \Version 06/21/2006 (jbrookes)
*/
/********************************************************************************F*/
#if DIRTYCODE_DEBUG
int32_t NetPrintfCode(const char *pFormat, ...)
{
    va_list pFmtArgs;
    char strText[4096];
    const char *pText = strText;
    int32_t iOutput=1;

    va_start(pFmtArgs, pFormat);
    // check for simple formatting
    if ((pFormat[0] == '%') && (pFormat[1] == 's') && (pFormat[2] == 0))
    {
        pText = va_arg(pFmtArgs, const char *);
    }
    else
    {
        vsprintf(strText, pFormat, pFmtArgs);
    }
    va_end(pFmtArgs);

    // send to debug hook if set
    if (_NetLib_pDebugHook != NULL)
    {
        iOutput = _NetLib_pDebugHook(_NetLib_pDebugParm, pText);
    }

    // if debug hook didn't override output, print here
    if (iOutput != 0)
    {
        printf("%s", pText);
    }
    return(0);
}
#endif

/*F********************************************************************************/
/*!
    \Function NetPrintfHook

    \Description
        Hook into debug output.

    \Input *pPrintfDebugHook    - pointer to function to call with debug output
    \Input *pParm               - user parameter

    \Output
        None.

    \Version 06/21/2006 (jbrookes)
*/
/********************************************************************************F*/
#if DIRTYCODE_DEBUG
void NetPrintfHook(int32_t (*pPrintfDebugHook)(void *pParm, const char *pText), void *pParm)
{
    _NetLib_pDebugHook = pPrintfDebugHook;
    _NetLib_pDebugParm = pParm;
}
#endif

/*F********************************************************************************/
/*!
    \Function NetTick

    \Description
        Return some kind of increasing tick count with millisecond scale (does
        not need to have millisecond precision, but higher precision is better).

    \Input None.

    \Output
        uint32_t    - millisecond tick count

    \Version 06/21/2006 (jbrookes)
*/
/********************************************************************************F*/
uint32_t NetTick(void)
{
    uint32_t uCurTick;
    struct timeval now;
    gettimeofday(&now, 0);
    uCurTick = (uint32_t)(((uint64_t)now.tv_sec*1000) + (uint64_t)now.tv_usec/1000);
    return(uCurTick);
}


text:
#include "test_update.hpp"

#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <algorithm>
#include <cstddef>
#include "pre_multi_index.hpp"
#include "employee.hpp"
#include "pair_of_ints.hpp"
#include <boost/detail/lightweight_test.hpp>
#include <boost/next_prior.hpp>

struct do_nothing
{
  template<typename T>
  void operator()(const T&)const{}
};

struct null_hash
{
  template<typename T>
  std::size_t operator()(const T&)const{return 0;}
};

template<class MultiIndexContainer>
void test_stable_update(BOOST_EXPLICIT_TEMPLATE_TYPE(MultiIndexContainer))
{
  typedef typename MultiIndexContainer::iterator  iterator;
  typedef typename MultiIndexContainer::size_type size_type;

  MultiIndexContainer c;
  c.insert(0);c.insert(0);c.insert(0);c.insert(0);
  c.insert(1);c.insert(1);c.insert(1);
  c.insert(2);c.insert(2);
  c.insert(3);

  for(size_type n=c.size();n--;){
    iterator it=boost::next(c.begin(),n);

    c.replace(it,*it);
    BOOST_TEST((size_type)std::distance(c.begin(),it)==n);

    c.modify(it,do_nothing());
    BOOST_TEST((size_type)std::distance(c.begin(),it)==n);

    c.modify(it,do_nothing(),do_nothing());
    BOOST_TEST((size_type)std::distance(c.begin(),it)==n);
  }
}

using namespace boost::multi_index;

void test_update()
{
  employee_set              es;
  employee_set_as_inserted& i=get<as_inserted>(es);
  employee_set_randomly&    r=get<randomly>(es);

  es.insert(employee(0,"Joe",31,1123));
  es.insert(employee(1,"Robert",27,5601));
  es.insert(employee(2,"John",40,7889));
  es.insert(employee(3,"Olbert",20,9012));
  es.insert(employee(4,"John",57,1002));

  employee_set::iterator             it=es.find(employee(0,"Joe",31,1123));
  employee_set_as_inserted::iterator it1=
    project<as_inserted>(es,get<name>(es).find("Olbert"));
  employee_set_randomly::iterator    it2=
    project<randomly>(es,get<age>(es).find(57));

  BOOST_TEST(es.replace(it,*it));
  BOOST_TEST(!es.replace(it,employee(3,"Joe",31,1123))&&it->id==0);
  BOOST_TEST(es.replace(it,employee(0,"Joe",32,1123))&&it->age==32);
  BOOST_TEST(i.replace(it1,employee(3,"Albert",20,9012))&&it1->name==
                "Albert");
  BOOST_TEST(!r.replace(it2,employee(4,"John",57,5601)));

  {
    typedef multi_index_container<
      pair_of_ints,
      indexed_by<
        ordered_unique<BOOST_MULTI_INDEX_MEMBER(pair_of_ints,int,first)>,
        hashed_unique<BOOST_MULTI_INDEX_MEMBER(pair_of_ints,int,second)>,
        sequenced<> > >
    int_int_set;

    int_int_set iis;
    nth_index<int_int_set,1>::type& ii1=get<1>(iis);
    nth_index<int_int_set,2>::type& ii2=get<2>(iis);
    iis.insert(pair_of_ints(0,0));
    iis.insert(pair_of_ints(5,5));
    iis.insert(pair_of_ints(10,10));

    BOOST_TEST(!iis.replace(iis.begin(),pair_of_ints(5,0)));
    BOOST_TEST(!ii2.replace(ii2.begin(),pair_of_ints(0,5)));
    BOOST_TEST(!ii1.replace(project<1>(iis,iis.begin()),pair_of_ints(5,11)));
    BOOST_TEST(!iis.replace(iis.begin(),pair_of_ints(11,5)));
    BOOST_TEST(!iis.replace(boost::next(iis.begin()),pair_of_ints(10,5)));
    BOOST_TEST(!ii1.replace(
      project<1>(iis,boost::next(iis.begin())),pair_of_ints(5,10)));
    BOOST_TEST(!iis.replace(boost::prior(iis.end()),pair_of_ints(5,10)));
    BOOST_TEST(!ii2.replace(boost::prior(ii2.end()),pair_of_ints(10,5)));

    BOOST_TEST(iis.modify(iis.begin(),increment_first));
    BOOST_TEST(ii2.modify(ii2.begin(),increment_first));
    BOOST_TEST(ii1.modify(project<1>(iis,iis.begin()),increment_first));
    BOOST_TEST(ii2.modify(ii2.begin(),increment_first,decrement_first));

    BOOST_TEST(!iis.modify(iis.begin(),increment_first,decrement_first));
    BOOST_TEST(iis.size()==3);

    BOOST_TEST(!iis.modify(iis.begin(),increment_first));
    BOOST_TEST(iis.size()==2);

    iis.insert(pair_of_ints(0,0));
    BOOST_TEST(ii2.modify(boost::prior(ii2.end()),increment_second));
    BOOST_TEST(iis.modify(iis.begin(),increment_second));
    BOOST_TEST(ii2.modify(boost::prior(ii2.end()),increment_second));
    BOOST_TEST(iis.modify(iis.begin(),increment_second,decrement_second));

    BOOST_TEST(!ii2.modify(
      boost::prior(ii2.end()),increment_second,decrement_second));
    BOOST_TEST(ii2.size()==3);

    BOOST_TEST(!ii2.modify(boost::prior(ii2.end()),increment_second));
    BOOST_TEST(ii2.size()==2);

    iis.insert(pair_of_ints(0,0));
    BOOST_TEST(iis.modify_key(iis.begin(),increment_int));
    BOOST_TEST(iis.modify_key(iis.begin(),increment_int,decrement_int));
    BOOST_TEST(iis.modify_key(iis.begin(),increment_int));
    BOOST_TEST(iis.modify_key(iis.begin(),increment_int));

    BOOST_TEST(!iis.modify_key(iis.begin(),increment_int,decrement_int));
    BOOST_TEST(iis.size()==3);

    BOOST_TEST(!iis.modify_key(iis.begin(),increment_int));
    BOOST_TEST(iis.size()==2);

    nth_index_iterator<int_int_set,1>::type it=ii1.find(5);
    BOOST_TEST(ii1.modify_key(it,increment_int));
    BOOST_TEST(ii1.modify_key(it,increment_int));
    BOOST_TEST(ii1.modify_key(it,increment_int,decrement_int));
    BOOST_TEST(ii1.modify_key(it,increment_int));

    BOOST_TEST(!ii1.modify_key(it,increment_int,decrement_int));
    BOOST_TEST(ii1.size()==2);

    BOOST_TEST(!ii1.modify_key(it,increment_int));
    BOOST_TEST(ii1.size()==1);
  }
  {
    typedef multi_index_container<
      pair_of_ints,
      indexed_by<
        hashed_unique<BOOST_MULTI_INDEX_MEMBER(pair_of_ints,int,first)>,
        random_access<>,
        ordered_unique<BOOST_MULTI_INDEX_MEMBER(pair_of_ints,int,second)> > >
    int_int_set;

    int_int_set iis;
    nth_index<int_int_set,1>::type& ii1=get<1>(iis);
    int_int_set::iterator p1=iis.insert(pair_of_ints(0,0)).first;
    int_int_set::iterator p2=iis.insert(pair_of_ints(5,5)).first;
    int_int_set::iterator p3=iis.insert(pair_of_ints(10,10)).first;

    BOOST_TEST(!iis.replace(p1,pair_of_ints(5,0)));
    BOOST_TEST(!ii1.replace(ii1.begin(),pair_of_ints(0,5)));
    BOOST_TEST(!iis.replace(p1,pair_of_ints(5,11)));
    BOOST_TEST(!iis.replace(p1,pair_of_ints(11,5)));
    BOOST_TEST(!iis.replace(p2,pair_of_ints(10,5)));
    BOOST_TEST(!iis.replace(p2,pair_of_ints(5,10)));
    BOOST_TEST(!iis.replace(p3,pair_of_ints(5,10)));
    BOOST_TEST(!ii1.replace(boost::prior(ii1.end()),pair_of_ints(10,5)));

    BOOST_TEST(iis.modify(p1,increment_first));
    BOOST_TEST(ii1.modify(ii1.begin(),increment_first));
    BOOST_TEST(iis.modify(p1,increment_first));
    BOOST_TEST(ii1.modify(ii1.begin(),increment_first,decrement_first));

    BOOST_TEST(!iis.modify(p1,increment_first,decrement_first));
    BOOST_TEST(iis.size()==3);

    BOOST_TEST(!iis.modify(p1,increment_first));
    BOOST_TEST(iis.size()==2);

    p1=iis.insert(pair_of_ints(0,0)).first;
    BOOST_TEST(ii1.modify(boost::prior(ii1.end()),increment_second));
    BOOST_TEST(iis.modify(p1,increment_second,decrement_second));
    BOOST_TEST(ii1.modify(boost::prior(ii1.end()),increment_second));
    BOOST_TEST(iis.modify(p1,increment_second));

    BOOST_TEST(!ii1.modify(
      boost::prior(ii1.end()),increment_second,decrement_second));
    BOOST_TEST(ii1.size()==3);

    BOOST_TEST(!ii1.modify(boost::prior(ii1.end()),increment_second));
    BOOST_TEST(ii1.size()==2);
  }
  {
    typedef multi_index_container<
      int,
      indexed_by<
        ordered_non_unique<identity<int> >
      >
    > int_set;

    /* MSVC++ 6.0 needs this out-of-template definition */
    int_set dummy1;
    test_stable_update<int_set>();

    typedef multi_index_container<
      int,
      indexed_by<
        hashed_unique<identity<int> >
      >
    > int_hashed_set;

    int_hashed_set dummy2;
    test_stable_update<int_hashed_set>();

    typedef multi_index_container<
      int,
      indexed_by<
        hashed_unique<identity<int> >
      >
    > int_hashed_multiset;

    int_hashed_multiset dummy3;
    test_stable_update<int_hashed_multiset>();

    typedef multi_index_container<
      int,
      indexed_by<
        hashed_unique<identity<int>,null_hash>
      >
    > degenerate_int_hashed_set;

    degenerate_int_hashed_set dummy4;
    test_stable_update<degenerate_int_hashed_set>();

    typedef multi_index_container<
      int,
      indexed_by<
        hashed_non_unique<identity<int>,null_hash>
      >
    > degenerate_int_hashed_multiset;

    degenerate_int_hashed_multiset dummy5;
    test_stable_update<degenerate_int_hashed_multiset>();
  }
}


text:
package org.kuali.kra.iacuc.actions.print;

import org.kuali.kra.protocol.actions.print.ProtocolPrintWatermarkBase;
import org.kuali.kra.protocol.actions.print.ProtocolReviewCommentsPrintBase;

public class IacucProtocolReviewCommentsPrint extends ProtocolReviewCommentsPrintBase {

    @Override
    protected ProtocolPrintWatermarkBase getNewProtocolPrintWatermarkInstanceHook() {
        return new IacucProtocolPrintWatermark();
    }

}


text:
<?php

namespace AppBundle\Repository;

use AppBundle\Entity\User;

/**
 * UserRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 *
 * @method User findOneBy(array $criteria, array $orderBy=null)
 */
class UserRepository extends ResourceRepository
{

    /**
     * @param $criteria
     *
     * @return User|false
     */
    public function findUserByUsernameOrEmail($criteria)
    {
        $builder = $this->createQueryBuilder('user');
        $expr    = $builder->expr();
        $orX     = $expr->orX();
        $orX->add($expr->eq('user.username', ':criteria'))
            ->add($expr->eq('user.email', ':criteria'));

        $result = $builder
            ->where($orX)
            ->setParameter('criteria', $criteria)
            ->setMaxResults(1)
            ->getQuery()
            ->getResult();

        return current($result);
    }
}


text:
moxy is a HTTP Reverse Proxy and Load Balancer that automatically configures itself for microservices deployed on [Apache Mesos](http://mesos.apache.org) and [Marathon](https://mesosphere.github.io/marathon/). It is inspired by [Vulcand](https://github.com/mailgun/vulcand) and moxy does in fact use the same proxy library written by the nice people at Mailgun.

**UPDATE (2016/02/12): moxy development is being greatly reduced in favor of [nixy](https://github.com/martensson/nixy) which replaces moxy completely**

Features:

* Reverse proxy and load balancer for your microservices running inside Mesos and Marathon
* Single binary with no other dependencies for easy deployment
* Supports TLS termination
* Statistics of req/s per application via statsd
* Event callback listener to automatically be up-to-date with Marathon
* Local file backups of Marathon states, so moxy will keep serving your apps even if Marathon goes down or across restarts.
* + more on the works...

## Compatibility

Tested againts Marathon 0.8.1<->0.13.0 and Mesos 0.22<->0.26

## Getting started

1. Easiest is to install moxy from pre-compiled packages. Check `releases` page.

2. Edit config (default on ubuntu is /etc/moxy.toml):

``` toml
# moxy listening port
port = "7000"

# optional X-Proxy header name
xproxy = "hostname"

# marathon api
marathon = "http://localhost:8080"

# statsd settings
statsd = "localhost:8125" # optional if you want to graph req/s per app
prefix = "moxy."

# tls settings
tls = false # optional if you want moxy to terminate tls
cert = "cert.pem"
key = "key.pem"
```

3. Add the moxy url + `/moxy_callback` to your callbacks in Marathon.

4. Run moxy!

## Using Moxy

Routing is based on the HTTP Host header matching app.*
Example: app.example.com and app.example.org both route to the same tasks running that app.

Example to access your apps app1,app2,app3 running in Mesos and Marathon:

    curl -i localhost:7000/ -H 'Host: app1.example.com'
    curl -i localhost:7000/ -H 'Host: app2.example.com'
    curl -i localhost:7000/ -H 'Host: app3.example.com'

### To set custom subdomain for an application

Deploy your app to Marathon setting a custom label called `moxy_subdomain`:

    "labels": {
        "moxy_subdomain": "foobar"
    },

This will override the application name and replace it with `foobar` as the new subdomain/host-header.

### Check state of Moxy

- `/moxy_stats` for traffic statistics

- `/moxy_apps` list apps and running tasks for load balancing


text:
using tofx.Core.Abstractions;
using System;

namespace tofx.Core.Utils.TypeConverters
{
    public class CharConverter : ITypeConverter
    {
        public object Convert(object valueToConvert)
        {
            if (valueToConvert == null || valueToConvert == DBNull.Value)
                return (char)0x0;

            return System.Convert.ToChar(valueToConvert);
        }

        public bool IsEqual(object value1, object value2)
        {
            char v1 = (char)Convert(value1);
            char v2 = (char)Convert(value2);

            return v1 == v2;
        }

        public Type GetCompatibleType()
        {
            return typeof(char);
        }
    }
}


text:
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY("id"));

INSERT INTO "country" ("id", "name") VALUES ('AD', 'Andôro');
INSERT INTO "country" ("id", "name") VALUES ('AE', 'Arâbo Emirâti Ôko');
INSERT INTO "country" ("id", "name") VALUES ('AF', 'Faganïta, Afganïstäan');
INSERT INTO "country" ("id", "name") VALUES ('AG', 'Antîgua na Barbûda');
INSERT INTO "country" ("id", "name") VALUES ('AI', 'Angûîla');
INSERT INTO "country" ("id", "name") VALUES ('AL', 'Albanïi');
INSERT INTO "country" ("id", "name") VALUES ('AM', 'Armenïi');
INSERT INTO "country" ("id", "name") VALUES ('AN', 'Antîyi tî Holânde');
INSERT INTO "country" ("id", "name") VALUES ('AO', 'Angoläa');
INSERT INTO "country" ("id", "name") VALUES ('AR', 'Arzantîna');
INSERT INTO "country" ("id", "name") VALUES ('AS', 'Samöa tî Amerîka');
INSERT INTO "country" ("id", "name") VALUES ('AT', 'Otrîsi');
INSERT INTO "country" ("id", "name") VALUES ('AU', 'Ostralïi, Sotralïi');
INSERT INTO "country" ("id", "name") VALUES ('AW', 'Arûba');
INSERT INTO "country" ("id", "name") VALUES ('AZ', 'Zerebaidyäan, Azerbaidyäan,');
INSERT INTO "country" ("id", "name") VALUES ('BA', 'Bosnïi na Herzegovînni');
INSERT INTO "country" ("id", "name") VALUES ('BB', 'Barabâda');
INSERT INTO "country" ("id", "name") VALUES ('BD', 'Bengladêshi');
INSERT INTO "country" ("id", "name") VALUES ('BE', 'Bêleze, Belezîki');
INSERT INTO "country" ("id", "name") VALUES ('BF', 'Burkina Faso');
INSERT INTO "country" ("id", "name") VALUES ('BG', 'Bulugarïi');
INSERT INTO "country" ("id", "name") VALUES ('BH', 'Bahrâina');
INSERT INTO "country" ("id", "name") VALUES ('BI', 'Burundïi');
INSERT INTO "country" ("id", "name") VALUES ('BJ', 'Benëen');
INSERT INTO "country" ("id", "name") VALUES ('BM', 'Beremûda');
INSERT INTO "country" ("id", "name") VALUES ('BN', 'Brunêi');
INSERT INTO "country" ("id", "name") VALUES ('BO', 'Bolivïi');
INSERT INTO "country" ("id", "name") VALUES ('BR', 'Brezîli');
INSERT INTO "country" ("id", "name") VALUES ('BS', 'Bahâmasa');
INSERT INTO "country" ("id", "name") VALUES ('BT', 'Butäan');
INSERT INTO "country" ("id", "name") VALUES ('BW', 'Botswana');
INSERT INTO "country" ("id", "name") VALUES ('BY', 'Belarüsi');
INSERT INTO "country" ("id", "name") VALUES ('BZ', 'Belîzi');
INSERT INTO "country" ("id", "name") VALUES ('CA', 'Kanadäa');
INSERT INTO "country" ("id", "name") VALUES ('CD', 'Ködörösêse tî Ngunuhalëzo tî kongö');
INSERT INTO "country" ("id", "name") VALUES ('CF', 'Ködörösêse tî Bêafrîka');
INSERT INTO "country" ("id", "name") VALUES ('CG', 'Kongö');
INSERT INTO "country" ("id", "name") VALUES ('CH', 'Sûîsi');
INSERT INTO "country" ("id", "name") VALUES ('CI', 'Kôdivüära');
INSERT INTO "country" ("id", "name") VALUES ('CK', 'âzûâ Kûku');
INSERT INTO "country" ("id", "name") VALUES ('CL', 'Shilïi');
INSERT INTO "country" ("id", "name") VALUES ('CM', 'Kamerûne');
INSERT INTO "country" ("id", "name") VALUES ('CN', 'Shîna');
INSERT INTO "country" ("id", "name") VALUES ('CO', 'Kolombïi');
INSERT INTO "country" ("id", "name") VALUES ('CR', 'Kôsta Rîka');
INSERT INTO "country" ("id", "name") VALUES ('CS', 'Serbïi na Möntënegröo');
INSERT INTO "country" ("id", "name") VALUES ('CU', 'Kubäa');
INSERT INTO "country" ("id", "name") VALUES ('CV', 'Azûâ tî Kâpo-Vêre');
INSERT INTO "country" ("id", "name") VALUES ('CY', 'Sîpri');
INSERT INTO "country" ("id", "name") VALUES ('CZ', 'Ködörösêse tî Tyêki');
INSERT INTO "country" ("id", "name") VALUES ('DE', 'Zâmani');
INSERT INTO "country" ("id", "name") VALUES ('DJ', 'Dibutùii');
INSERT INTO "country" ("id", "name") VALUES ('DK', 'Danemêrke');
INSERT INTO "country" ("id", "name") VALUES ('DM', 'Dömïnîka');
INSERT INTO "country" ("id", "name") VALUES ('DO', 'Ködörösêse tî Dominîka');
INSERT INTO "country" ("id", "name") VALUES ('DZ', 'Alzerïi');
INSERT INTO "country" ("id", "name") VALUES ('EC', 'Ekuatëre');
INSERT INTO "country" ("id", "name") VALUES ('EE', 'Estonïi');
INSERT INTO "country" ("id", "name") VALUES ('EG', 'Kâmitâ');
INSERT INTO "country" ("id", "name") VALUES ('ER', 'Eritrëe');
INSERT INTO "country" ("id", "name") VALUES ('ES', 'Espânye');
INSERT INTO "country" ("id", "name") VALUES ('ET', 'Etiopïi');
INSERT INTO "country" ("id", "name") VALUES ('FI', 'Fëlânde');
INSERT INTO "country" ("id", "name") VALUES ('FJ', 'Fidyïi');
INSERT INTO "country" ("id", "name") VALUES ('FK', 'Âzûâ tî Mälüîni');
INSERT INTO "country" ("id", "name") VALUES ('FM', 'Mikronezïi');
INSERT INTO "country" ("id", "name") VALUES ('FR', 'Farânzi');
INSERT INTO "country" ("id", "name") VALUES ('GA', 'Gaböon');
INSERT INTO "country" ("id", "name") VALUES ('GB', 'Ködörögbïä--Ôko');
INSERT INTO "country" ("id", "name") VALUES ('GD', 'Grenâda');
INSERT INTO "country" ("id", "name") VALUES ('GE', 'Zorzïi');
INSERT INTO "country" ("id", "name") VALUES ('GF', 'Güyâni tî farânzi');
INSERT INTO "country" ("id", "name") VALUES ('GH', 'Ganäa');
INSERT INTO "country" ("id", "name") VALUES ('GI', 'Zibraltära, Zibaratära');
INSERT INTO "country" ("id", "name") VALUES ('GL', 'Gorolânde');
INSERT INTO "country" ("id", "name") VALUES ('GM', 'Gambïi');
INSERT INTO "country" ("id", "name") VALUES ('GN', 'Ginëe');
INSERT INTO "country" ("id", "name") VALUES ('GP', 'Guadelûpu');
INSERT INTO "country" ("id", "name") VALUES ('GQ', 'Ginëe tî Ekuatëre');
INSERT INTO "country" ("id", "name") VALUES ('GR', 'Gerêsi');
INSERT INTO "country" ("id", "name") VALUES ('GT', 'Guatêmälä');
INSERT INTO "country" ("id", "name") VALUES ('GU', 'Guâm');
INSERT INTO "country" ("id", "name") VALUES ('GW', 'Gninëe-Bisau');
INSERT INTO "country" ("id", "name") VALUES ('GY', 'Gayâna');
INSERT INTO "country" ("id", "name") VALUES ('HN', 'Honduräsi');
INSERT INTO "country" ("id", "name") VALUES ('HR', 'Kroasïi');
INSERT INTO "country" ("id", "name") VALUES ('HT', 'Haitïi');
INSERT INTO "country" ("id", "name") VALUES ('HU', 'Hongirùii');
INSERT INTO "country" ("id", "name") VALUES ('ID', 'Ênndonezïi');
INSERT INTO "country" ("id", "name") VALUES ('IE', 'Irlânde');
INSERT INTO "country" ("id", "name") VALUES ('IL', 'Israëli');
INSERT INTO "country" ("id", "name") VALUES ('IN', 'Ênnde');
INSERT INTO "country" ("id", "name") VALUES ('IO', 'Sêse tî Anglëe na Ngûyämä tî Ênnde');
INSERT INTO "country" ("id", "name") VALUES ('IQ', 'Irâki');
INSERT INTO "country" ("id", "name") VALUES ('IR', 'Iräan');
INSERT INTO "country" ("id", "name") VALUES ('IS', 'Islânde');
INSERT INTO "country" ("id", "name") VALUES ('IT', 'Italùii');
INSERT INTO "country" ("id", "name") VALUES ('JM', 'Zamaîka');
INSERT INTO "country" ("id", "name") VALUES ('JO', 'Zordanïi');
INSERT INTO "country" ("id", "name") VALUES ('JP', 'Zapöon');
INSERT INTO "country" ("id", "name") VALUES ('KE', 'Kenyäa');
INSERT INTO "country" ("id", "name") VALUES ('KG', 'Kirigizitùaan');
INSERT INTO "country" ("id", "name") VALUES ('KH', 'Kämbôzi');
INSERT INTO "country" ("id", "name") VALUES ('KI', 'Kiribati');
INSERT INTO "country" ("id", "name") VALUES ('KM', 'Kömôro');
INSERT INTO "country" ("id", "name") VALUES ('KN', 'Sên-Krïstôfo-na-Nevîsi');
INSERT INTO "country" ("id", "name") VALUES ('KP', 'Korëe tî Banga');
INSERT INTO "country" ("id", "name") VALUES ('KR', 'Korëe tî Mbongo');
INSERT INTO "country" ("id", "name") VALUES ('KW', 'Köwêti');
INSERT INTO "country" ("id", "name") VALUES ('KY', 'Âzûâ Ngundë,  Kaimäni');
INSERT INTO "country" ("id", "name") VALUES ('KZ', 'Kazakisitäan');
INSERT INTO "country" ("id", "name") VALUES ('LA', 'Lùaôsi');
INSERT INTO "country" ("id", "name") VALUES ('LB', 'Libùaan');
INSERT INTO "country" ("id", "name") VALUES ('LC', 'Sênt-Lisïi');
INSERT INTO "country" ("id", "name") VALUES ('LI', 'Liechtenstein,');
INSERT INTO "country" ("id", "name") VALUES ('LK', 'Sirî-Lanka');
INSERT INTO "country" ("id", "name") VALUES ('LR', 'Liberïa');
INSERT INTO "country" ("id", "name") VALUES ('LS', 'Lesôtho');
INSERT INTO "country" ("id", "name") VALUES ('LT', 'Lituanïi');
INSERT INTO "country" ("id", "name") VALUES ('LU', 'Lugzambûru');
INSERT INTO "country" ("id", "name") VALUES ('LV', 'Letonùii');
INSERT INTO "country" ("id", "name") VALUES ('LY', 'Libïi');
INSERT INTO "country" ("id", "name") VALUES ('MA', 'Marôko');
INSERT INTO "country" ("id", "name") VALUES ('MC', 'Monaköo');
INSERT INTO "country" ("id", "name") VALUES ('MD', 'Moldavùii');
INSERT INTO "country" ("id", "name") VALUES ('MG', 'Madagaskära');
INSERT INTO "country" ("id", "name") VALUES ('MH', 'Âzûâ Märshâl');
INSERT INTO "country" ("id", "name") VALUES ('MK', 'Maseduäni');
INSERT INTO "country" ("id", "name") VALUES ('ML', 'Malïi');
INSERT INTO "country" ("id", "name") VALUES ('MM', 'Myämâra');
INSERT INTO "country" ("id", "name") VALUES ('MN', 'Mongolïi');
INSERT INTO "country" ("id", "name") VALUES ('MP', 'Âzûâ Märïâni tî Banga');
INSERT INTO "country" ("id", "name") VALUES ('MQ', 'Märtïnîki');
INSERT INTO "country" ("id", "name") VALUES ('MR', 'Moritanïi');
INSERT INTO "country" ("id", "name") VALUES ('MS', 'Monserâte');
INSERT INTO "country" ("id", "name") VALUES ('MT', 'Mâlta');
INSERT INTO "country" ("id", "name") VALUES ('MU', 'Mörîsi');
INSERT INTO "country" ("id", "name") VALUES ('MV', 'Maldîva');
INSERT INTO "country" ("id", "name") VALUES ('MW', 'Malawïi');
INSERT INTO "country" ("id", "name") VALUES ('MX', 'Mekisîki');
INSERT INTO "country" ("id", "name") VALUES ('MY', 'Malezïi');
INSERT INTO "country" ("id", "name") VALUES ('MZ', 'Mözämbîka');
INSERT INTO "country" ("id", "name") VALUES ('NA', 'Namibùii');
INSERT INTO "country" ("id", "name") VALUES ('NC', 'Finî Kaledonïi');
INSERT INTO "country" ("id", "name") VALUES ('NE', 'Nizëre');
INSERT INTO "country" ("id", "name") VALUES ('NF', 'Zûâ Nôrfôlko');
INSERT INTO "country" ("id", "name") VALUES ('NG', 'Nizerïa');
INSERT INTO "country" ("id", "name") VALUES ('NI', 'Nikaragua');
INSERT INTO "country" ("id", "name") VALUES ('NL', 'Holände');
INSERT INTO "country" ("id", "name") VALUES ('NO', 'Nörvêzi');
INSERT INTO "country" ("id", "name") VALUES ('NP', 'Nëpâli');
INSERT INTO "country" ("id", "name") VALUES ('NR', 'Nauru');
INSERT INTO "country" ("id", "name") VALUES ('NU', 'Niue');
INSERT INTO "country" ("id", "name") VALUES ('NZ', 'Finî Zelânde');
INSERT INTO "country" ("id", "name") VALUES ('OM', 'Omâni');
INSERT INTO "country" ("id", "name") VALUES ('PA', 'Panama');
INSERT INTO "country" ("id", "name") VALUES ('PE', 'Perüu');
INSERT INTO "country" ("id", "name") VALUES ('PF', 'Polinezïi tî farânzi');
INSERT INTO "country" ("id", "name") VALUES ('PG', 'Papû Finî Ginëe, Papuazïi');
INSERT INTO "country" ("id", "name") VALUES ('PH', 'Filipîni');
INSERT INTO "country" ("id", "name") VALUES ('PK', 'Pakistäan');
INSERT INTO "country" ("id", "name") VALUES ('PL', 'Pölôni');
INSERT INTO "country" ("id", "name") VALUES ('PM', 'Sên-Pyêre na Mikelöon');
INSERT INTO "country" ("id", "name") VALUES ('PN', 'Pitikêrni');
INSERT INTO "country" ("id", "name") VALUES ('PR', 'Porto Rîko');
INSERT INTO "country" ("id", "name") VALUES ('PS', 'Sêse tî Palestîni');
INSERT INTO "country" ("id", "name") VALUES ('PT', 'Pörtugäle, Ködörö Pûra');
INSERT INTO "country" ("id", "name") VALUES ('PW', 'Palau');
INSERT INTO "country" ("id", "name") VALUES ('PY', 'Paraguëe');
INSERT INTO "country" ("id", "name") VALUES ('QA', 'Katära');
INSERT INTO "country" ("id", "name") VALUES ('RE', 'Reinïon');
INSERT INTO "country" ("id", "name") VALUES ('RO', 'Rumanïi');
INSERT INTO "country" ("id", "name") VALUES ('RU', 'Rusïi');
INSERT INTO "country" ("id", "name") VALUES ('RW', 'Ruandäa');
INSERT INTO "country" ("id", "name") VALUES ('SA', 'Saûdi Arabïi');
INSERT INTO "country" ("id", "name") VALUES ('SB', 'Zûâ Salomöon');
INSERT INTO "country" ("id", "name") VALUES ('SC', 'Sëyshêle');
INSERT INTO "country" ("id", "name") VALUES ('SD', 'Sudäan');
INSERT INTO "country" ("id", "name") VALUES ('SE', 'Suêde');
INSERT INTO "country" ("id", "name") VALUES ('SG', 'Sïngäpûru');
INSERT INTO "country" ("id", "name") VALUES ('SH', 'Sênt-Helêna');
INSERT INTO "country" ("id", "name") VALUES ('SI', 'Solovenïi');
INSERT INTO "country" ("id", "name") VALUES ('SK', 'Solovakïi');
INSERT INTO "country" ("id", "name") VALUES ('SL', 'Sierä-Leône');
INSERT INTO "country" ("id", "name") VALUES ('SM', 'Sên-Marëen');
INSERT INTO "country" ("id", "name") VALUES ('SN', 'Senegäle');
INSERT INTO "country" ("id", "name") VALUES ('SO', 'Somalïi');
INSERT INTO "country" ("id", "name") VALUES ('SR', 'Surinäm');
INSERT INTO "country" ("id", "name") VALUES ('ST', 'Sâô Tömê na Prinsîpe');
INSERT INTO "country" ("id", "name") VALUES ('SV', 'Salvadöro');
INSERT INTO "country" ("id", "name") VALUES ('SY', 'Sirïi');
INSERT INTO "country" ("id", "name") VALUES ('SZ', 'Swäzïlânde');
INSERT INTO "country" ("id", "name") VALUES ('TC', 'Âzûâ Turku na Kaîki');
INSERT INTO "country" ("id", "name") VALUES ('TD', 'Tyâde');
INSERT INTO "country" ("id", "name") VALUES ('TG', 'Togö');
INSERT INTO "country" ("id", "name") VALUES ('TH', 'Tailânde');
INSERT INTO "country" ("id", "name") VALUES ('TJ', 'Taazikiistäan');
INSERT INTO "country" ("id", "name") VALUES ('TK', 'Tokelau');
INSERT INTO "country" ("id", "name") VALUES ('TL', 'Timôro tî Tö');
INSERT INTO "country" ("id", "name") VALUES ('TM', 'Turkumenistäan');
INSERT INTO "country" ("id", "name") VALUES ('TN', 'Tunizïi');
INSERT INTO "country" ("id", "name") VALUES ('TO', 'Tonga');
INSERT INTO "country" ("id", "name") VALUES ('TR', 'Turukïi');
INSERT INTO "country" ("id", "name") VALUES ('TT', 'Trinitùee na Tobagö');
INSERT INTO "country" ("id", "name") VALUES ('TV', 'Tüvalü');
INSERT INTO "country" ("id", "name") VALUES ('TW', 'Tâiwâni');
INSERT INTO "country" ("id", "name") VALUES ('TZ', 'Tanzanïi');
INSERT INTO "country" ("id", "name") VALUES ('UA', 'Ukrêni');
INSERT INTO "country" ("id", "name") VALUES ('UG', 'Ugandäa');
INSERT INTO "country" ("id", "name") VALUES ('US', 'ÂLeaa-Ôko tî Amerika');
INSERT INTO "country" ("id", "name") VALUES ('UY', 'Uruguëe');
INSERT INTO "country" ("id", "name") VALUES ('UZ', 'Uzbekistäan');
INSERT INTO "country" ("id", "name") VALUES ('VA', 'Letëe tî Vatikäan');
INSERT INTO "country" ("id", "name") VALUES ('VC', 'Sên-Vensäan na âGrenadîni');
INSERT INTO "country" ("id", "name") VALUES ('VE', 'Venezueläa');
INSERT INTO "country" ("id", "name") VALUES ('VG', 'Âzôâ Viîrîggo tî Anglëe');
INSERT INTO "country" ("id", "name") VALUES ('VI', 'Âzûâ Virîgo tî Amerîka');
INSERT INTO "country" ("id", "name") VALUES ('VN', 'Vietnäm');
INSERT INTO "country" ("id", "name") VALUES ('VU', 'Vanuatü');
INSERT INTO "country" ("id", "name") VALUES ('WF', 'Walîsi na Futuna');
INSERT INTO "country" ("id", "name") VALUES ('WS', 'Samoäa');
INSERT INTO "country" ("id", "name") VALUES ('YE', 'Yëmêni');
INSERT INTO "country" ("id", "name") VALUES ('YT', 'Mäyôte');
INSERT INTO "country" ("id", "name") VALUES ('ZA', 'Mbongo-Afrîka');
INSERT INTO "country" ("id", "name") VALUES ('ZM', 'Zambïi');
INSERT INTO "country" ("id", "name") VALUES ('ZW', 'Zimbäbwe');


text:
package in.twizmwaz.cardinal.module.modules.score;

import in.twizmwaz.cardinal.match.Match;
import in.twizmwaz.cardinal.module.BuilderData;
import in.twizmwaz.cardinal.module.ModuleBuilder;
import in.twizmwaz.cardinal.module.ModuleCollection;
import in.twizmwaz.cardinal.module.ModuleLoadTime;
import in.twizmwaz.cardinal.module.modules.team.TeamModule;
import in.twizmwaz.cardinal.util.NumUtils;
import in.twizmwaz.cardinal.util.StringUtils;
import in.twizmwaz.cardinal.util.TeamUtils;
import org.jdom2.Element;

@BuilderData(load = ModuleLoadTime.LATE)
public class ScoreModuleBuilder implements ModuleBuilder {

    @SuppressWarnings("unchecked")
    @Override
    public ModuleCollection load(Match match) {
        ModuleCollection results = new ModuleCollection();
        int pointsPerKill = 0;
        int pointsPerDeath = 0;
        int max = 0;
        int time = 0;
        for (Element score : match.getDocument().getRootElement().getChildren("score")) {
            if (score.getChild("limit") != null) {
                max = NumUtils.parseInt(score.getChild("limit").getText());
                if (max < 0) max = 0;
                if (max != 0) {
                    pointsPerKill = 1;
                    pointsPerDeath = 1;
                }
            }
            if (score.getChild("time") != null) {
                time = StringUtils.timeStringToSeconds(score.getChild("time").getText());
                if (time > 0) {
                    pointsPerKill = 1;
                    pointsPerDeath = 1;
                }
            }
            if (score.getChild("king") != null) {
                pointsPerKill = 0;
                pointsPerDeath = 0;
            }
            if (score.getChild("kills") != null) {
                pointsPerKill = NumUtils.parseInt(score.getChild("kills").getText());
            }
            if (score.getChild("deaths") != null) {
                pointsPerDeath = NumUtils.parseInt(score.getChild("deaths").getText());
            }
        }
        for (TeamModule team : TeamUtils.getTeams()) {
            if (!team.isObserver()) {
                results.add(new ScoreModule(team, pointsPerKill, pointsPerDeath, max));
            }
        }
        return results;
    }
}


text:
namespace Switch {
  namespace System {
    namespace Threading {
      class WaitHandle;
    }
  }
}
/// @endcond

/// @brief The Switch namespace contains all fundamental classes to access Hardware, Os, System, and more.
namespace Switch {
  /// @brief The System namespace contains fundamental classes and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.
  namespace System {
    /// @interface IAsyncResult
    /// @brief Represents the status of an asynchronous operation.
    /// @par Library
    /// Switch.Core
    class core_export_ IAsyncResult interface_ {
    public:
      /// @brief Gets a user-defined object that qualifies or contains information about an asynchronous operation.
      /// @return A user-defined object that qualifies or contains information about an asynchronous operation.
      property_<const Object&, readonly_> AsyncState {
        get_->const object& {return this->GetAsyncState();}
      };

      /// @brief Gets a WaitHandle that is used to wait for an asynchronous operation to complete.
      /// @return A WaitHandle that is used to wait for an asynchronous operation to complete.
      property_<const System::Threading::WaitHandle&, readonly_> AsyncWaitHandle {
        get_->const System::Threading::WaitHandle& {return this->GetAsyncWaitHandle();}
      };

      /// @brief Gets an indication of whether the asynchronous operation completed synchronously.
      /// @return true if the asynchronous operation completed synchronously; otherwise, false.
      property_<bool, readonly_> CompletedSynchronously {
        get_ {return this->GetCompletedSynchronously();}
      };

      /// @brief Gets an indication whether the asynchronous operation has completed.
      /// @return true if the operation is complete; otherwise, false.
      property_<bool, readonly_> IsCompleted {
        get_ {return this->GetIsCompleted();}
      };

    protected:
      /// @brief Gets a user-defined object that qualifies or contains information about an asynchronous operation.
      /// @return A user-defined object that qualifies or contains information about an asynchronous operation.
      virtual const Object& GetAsyncState() const = 0;

      /// @brief Gets a WaitHandle that is used to wait for an asynchronous operation to complete.
      /// @return A WaitHandle that is used to wait for an asynchronous operation to complete.
      virtual const System::Threading::WaitHandle& GetAsyncWaitHandle() const = 0;

      /// @brief Gets an indication of whether the asynchronous operation completed synchronously.
      /// @return true if the asynchronous operation completed synchronously; otherwise, false.
      virtual bool GetCompletedSynchronously() const = 0;

      /// @brief Gets an indication whether the asynchronous operation has completed.
      /// @return true if the operation is complete; otherwise, false.
      virtual bool GetIsCompleted() const = 0;
    };
  }
}

using namespace Switch;


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

namespace Frotz.Screen {
    public class ScreenLines {
        List<LineInfo> _lines = new List<LineInfo>();

        public int Rows { get; private set; }
        public int Columns { get; private set; }

        public ScreenLines(int Rows, int Columns) {
            this.Rows = Rows;
            this.Columns = Columns;

            _lines = new List<LineInfo>();
            for (int i = 0; i < Rows; i++) {
                _lines.Add(new LineInfo(Columns * 3));
            }
        }

        public void SetChar(int Row, int Col, char c, CharDisplayInfo FandS) {
            // TODO Check boundaries
            _lines[Row].SetChar(Col, c, FandS);
        }

        public void ScrollLines(int top, int numlines) {
            // TODO Check boundaries
            for (int i = 0; i < numlines; i++) {
                if (_lines.Count > 0)
                    if (_lines.Count > top) {
                        _lines.RemoveAt(top);
                    } else {
                        _lines.RemoveAt(0);
                    }
            }

            // TODO Fix up this so I don't have to add lines back in
            addLines();
        }

        public void ScrollArea(int top, int bottom, int left, int right, int units) {
            // TODO Do something with units
            // TODO Check Boundaries
            int numchars = right - left + 1;
            String replace = "".PadRight(numchars);
            for (int i = bottom - 1; i >= top; i--) {
                String temp = _lines[i].GetString(left, numchars);
                _lines[i].Replace(left, replace);
                replace = temp;
            }
        }

        public void Clear() {
            ClearArea(0, 0, Rows, Columns * 3);
        }

        public void ClearArea(int top, int left, int bottom, int right) {
            // TODO Check this boundary
            for (int i = top; i < bottom; i++) {
                for (int j = left; j < right; j++) {
                    _lines[i].ClearChar(j);
                }
            }
        }

        private void addLines() {
            while (_lines.Count <= Rows * 2) {
                lock (_lines) {
                    _lines.Add(new LineInfo(Columns * 3));
                }
            }
        }

        public void RemoveChars(int Row, int Col, int count) {
            // TODO Check this boundary
            _lines[Row].RemoveChars(count);
        }

        public String GetText(out List<FontChanges> Changes) {
            return GetTextToLine(Rows, out Changes);
        }

        public List<LineInfo> GetLines()
        {
            return _lines;
        }

        public String GetTextToLine(int Line, out List<FontChanges> Changes) {
            int pos = 0;

            Changes = new List<FontChanges>();
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < Line; i++) {
                sb.Append(_lines[i].GetString());
                sb.Append("\r\n");

                // Start col needs to stay per line, and there needs to be pos offset per line
                var tempChanges = _lines[i].GetTextWithFontInfo();
                foreach (var c in tempChanges) {
                    c.Offset += pos;
                    c.Line = i;
                }

                Changes.AddRange(tempChanges);

                pos = sb.Length;
            }

            return sb.ToString();
        }

        public String GetTextAtLine(int line) {
            return _lines[line].GetString();
        }

        public CharDisplayInfo GetFontAndStyle(int Row, int Column) {
            return _lines[Row].GetFontAndStyle(Column);
        }
    }
}


text:
package cz.muni.fi.editor.dto.cmis;

import java.util.Arrays;
import org.apache.chemistry.opencmis.commons.definitions.PropertyBooleanDefinition;

/**
 * @author Dominik Szalai - emptulik at gmail.com
 * @since 7/14/17.
 */
public class EditorBooleanProperty extends EditorProperty<Boolean> {

  public EditorBooleanProperty() {
    super(PropertyType.BOOLEAN, Arrays.asList(false), Arrays.asList(true, false));
  }

  public EditorBooleanProperty(PropertyBooleanDefinition propertyBooleanDefinition) {
    super(PropertyType.BOOLEAN, null, null);
  }
}


text:
title: Le Mouvement
<<<<<<< HEAD
=======
position: 0
>>>>>>> b81f2eb576710a37c4e0bbeea2951d0ab0f818b0
layout: page
---

### Référente Charlotte GRESSIER

* **Coordinateur territorial** (Responsable structuration des comités et animation, Élections) : Jacky LECOURTILLER
* **Responsable société civile, expérimentations citoyennes** : Laurence LOUISON
* **Responsable contenu du programme présidentiel** Charlotte GRESSIER, Jacky LECOURTILLER
* **Responsable communication et événements** : Référente avec chaque animateur des comités
* **Responsable réseaux sociaux** : Bolo Michelin
* **Responsable emploi, insertion, jeunesse** : Olivier JEAN-DENIS
* **Responsable Environnement Risques majeurs** : Emmanuel MARIE-LUCE
* **Responsable logistique / finances** : Patrick HULTET

UNE SUPER ÉQUIPE POUR LREM MARTINIQUE


text:
// Provides default renderer for control sap.ui.unified.Shell
sap.ui.define(['sap/ui/core/Renderer', './ShellLayoutRenderer'],
	function(Renderer, ShellLayoutRenderer) {
	"use strict";

	/**
	 * Renderer for the sap.ui.unified.Shell
	 * @namespace
	 * @deprecated Since version 1.44.0.
	 */
	var ShellRenderer = Renderer.extend(ShellLayoutRenderer);

	return ShellRenderer;

}, /* bExport= */ true);