text:
<!doctype html>

<title>formcore</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="https://filamentgroup.github.io/demo-head/demohead.css">
<link rel="stylesheet" href="/formcore/dist/dependencies.css">
<link rel="stylesheet" href="/formcore/css/demo.css">
<link rel="stylesheet" href="/formcore/css/formcore.css">
<link rel="stylesheet" href="/formcore/css/formcore-validation.css">
<link rel="stylesheet" href="/formcore/css/formcore-button.css">
<link rel="stylesheet" href="/formcore/css/grids.css">
<link rel="stylesheet" href="/formcore/css/character-counter.css">
<link rel="stylesheet" href="/formcore/css/credit-card-display.css">
<link rel="stylesheet" href="/formcore/css/disclosure.css">

Demo of Formcore
			Light-weight, validated forms

Code

Issues

		Patterns
		Text Inputs
		Checkboxes & Radio Buttons
		Selects
		Disclosure

Checkboxes & Radio Buttons

Checkbox Selection

		<input type="checkbox" name="opt1">
		Description in sentence form.

		<input type="checkbox" name="opt2">
		Description in sentence form.

		<input type="checkbox" name="opt3">
		Another description in sentence form.

Checkbox Selection with Description Text

		<input type="checkbox" name="opt11">
		Item 1 Additional info about this item can go here.

		<input type="checkbox" name="opt12">
		Item 2

		<input type="checkbox" name="opt13">
		Item 3

Radio Selection

		<input type="radio" name="options1">
		Description in sentence form.

		<input type="radio" name="options1">
		Another description in sentence form.

Radio Selection with Description Text

		<input type="radio" name="options">
		Item 1 Additional info about this item can go here.

		<input type="radio" name="options">
		Item 2

		<input type="radio" name="options">
		Item 3

Error Message

		<input type="radio" name="radio-err" required value="item-1">
		Item 1 Additional info about this item can go here.

		<input type="radio" name="radio-err" required value="item-2">
		Item 2

		<input type="radio" name="radio-err" required value="item-3">
		Item 3

Please make a selection.

Error Messaging

		<input type="checkbox" name="checkbox-err" required value="terms-and-conditions">
		I agree to the Terms & Conditions

Please agree to the Terms & Conditions to continue.

Disabled State

		<input type="radio" name="radio-disabled" disabled>
		Item 1 Additional info about this item can go here.

		<input type="radio" name="radio-disabled" disabled>
		Item 2

		<input type="radio" name="radio-disabled" disabled>
		Item 3

Disabled State

		<input type="checkbox" name="checkbox-disabled" disabled>
		I agree to the Terms & Conditions


text:
package com.github.lant.dotdump;

import java.util.Map;
import java.util.TreeMap;

public class GraphNode {
  private final AttributeBuilder attributeBuilder = new AttributeBuilder();
  private Map<String, String> attributes = new TreeMap<>();

  private final String id;

  public GraphNode(String id) {
    // todo check that the id is valid.
    this.id = id;
  }

  String wrappedId() {
    return "\""+this.id+"\"";
  }

  public GraphNode withText(String text) {
    this.attributes.put("label", text);
    return this;
  }

  public GraphNode withShape(NodeShapes nodeShape) {
    this.attributes.put("shape", nodeShape.name());
    return this;
  }

  public GraphNode withColor(Color color) {
    this.attributes.put("color", color.name());
    return this;
  }

  public String toNodeDefinition() {
    StringBuilder stringBuilder = new StringBuilder();
    stringBuilder.append('\t');
    stringBuilder.append(wrappedId());
    stringBuilder.append(attributeBuilder.build(attributes));
    stringBuilder.append(";\n");

    return stringBuilder.toString();
  }
}

redpajama_set_name: RedPajamaGithub


text:
import { getDataPlatforms } from '@datahub/entities/mirage-addon/helpers/platforms';
import { getDatasetOwnership } from '@datahub/entities/mirage-addon/helpers/ownership';
import { Server } from 'ember-cli-mirage';
import { IMirageServer } from '@datahub/utils/types/vendor/ember-cli-mirage-deprecated';

// TODO: [META-11940] Looks like mirage server types are incompatible but is outside the scope of this
// migration. Should return to clean up
export function datasetsMirageConfig(server: Server | IMirageServer): void {
  server = server as IMirageServer;
  server.namespace = '/api/v2';

  // Temporary solution as we don't need real upstreams at the moment, we just don't wnat mirage to throw
  // any errors
  server.get('/datasets/:urn/upstreams', () => []);

  server.get('/list/platforms', getDataPlatforms);

  server.get(`datasets/:urn/owners`, getDatasetOwnership);
}


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

<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">

    <screen name="commonCmsDecorator">

            <actions>
                <set field="currentCMSMenuItemName" from-field="currentCMSMenuItemName" from-scope="user"/>
                <set field="headerItem" value="CMS"/>
            </actions>
            <widgets>
                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="pre-body">

                            <condition>
                                <if-has-permission permission="CONTENTMGR" action="_VIEW"/>
                            </condition>
                            <widgets>
                                <include-menu name="Cms" location="component://lucene/widget/LuceneMenus.xml"/>
                            </widgets>

                    </decorator-section>
                    <decorator-section name="body">

                            <condition>
                                <if-has-permission permission="CONTENTMGR" action="_VIEW"/>
                            </condition>
                            <widgets>
                                <container style="button-bar"><link target="EditAddContent" text="${uiLabelMap.CommonCreateNew}" style="buttontext create"/></container>
                                <decorator-section-include name="body"/>
                            </widgets>
                            <fail-widgets>
                                ${uiLabelMap.ContentViewPermissionError}
                            </fail-widgets>

                    </decorator-section>
                </decorator-screen>
            </widgets>

    </screen>

    <screen name="AdminSearch">

            <actions>


text:
Muzik-bot is a competitor of [MusicBot](https://github.com/Just-Some-Bots/MusicBot). Why? Because when I would try to run MusicBot for an extended amount of time it would crash. With the large number of issues and lack of project support, Muzik-bot was born. With Muzik-bot you will find that it stable and faster than other competitors.

## requirements

  - Node: `6`

### Mac OSX

  - `brew install ffmpeg`
  - xCode
    - Set developer tools: `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`
  - Node: `6`

### Linux
  - `sudo apt install node-gyp`

## Getting Started

Below is how to get the bot running either with command line or a docker container.

### Roles

Each role is in hierarchy order. `Owner` has all permissions but `mod` only has `mod` + `dj` permissions.

```
  owner:
    - player
      - settings
    - cache
      - settings
  mod:
    - player
      - volume
    - cache
      - clean
  dj:
    - help
    - hello
    - player
      - play
      - queued
      - skip
      - stop
      - shuffle
```

## config

The config settings are pretty self explanatory, but in the case that they're not here is a brief overview of what they mean.

```js
{
  player: {
    // Volume of the bot. 0.2 seems to be a comfortable non-ear-blasting level
    volume: 0.2,
  },
  youtube: {
    // Your Youtube api Key (not OAuth 2.0)
    // https://developers.google.com/youtube/registering_an_application
    apiKey: 'YT_API_KEY'
  },
  discord: {
    // The bot's discord token
    // https://github.com/Chikachi/DiscordIntegration/wiki/How-to-get-a-token-and-channel-ID-for-Discord
    token: 'DISCORD_TOKEN'
  },
  streaming: {
    // This is the number of times the bot will send packets to the server.
    // 1 is 1x the amount of bandwidth. 2 is 2x and so on...
    // Not recommended to go above 5
    passes: 2
  },
  permissions: {

  }
};
```

## Node

  - Optional: `npm i -g nodemon`
  - `git clone git@github.com:rizowski/muzik-bot.git`
  - `cd muzik-bot`
  - `npm i`
  - `npm start` or `nodemon .`

### Docker

> comming soon...

```
docker run rizowski/muzik-bot \
  --name muzik-bot \
  -v /local/path/for/config:/usr/src/app/config \
  -v /local/path/for/cache:/usr/src/app/.cache \

```


text:
<!DOCTYPE html>

<title>What is the Drop Box tool?</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="sakai.dropbox, main" name="description">
<meta content="student folders" name="search">
<link href="/library/skin/tool_base.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/neo-default/tool.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/neo-default/help.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/js/jquery/featherlight/0.4.0/featherlight.min.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">

What is the Drop Box tool?

The Drop Box tool creates a folder for each student in the course.  Students are only able to access their own folder. Students and instructors can both place files in the Drop Box folders.

The Drop Box mirrors the file management features and functionality of the Resources tool. See What is the Resources tool? for more information on how to add, upload, edit, and delete files and folders within Drop Box. (As with Resources, multiple files can also be uploaded using Drag and Drop.)

To access this tool, select Drop Box from the Tool Menu in your site.

Example: Folders for each student

              Zoom

Folders with the plus sign contain files.


text:
**For additional reference, please review the [source](https://github.com/Codeception/Codeception/tree/2.0/src/Codeception/Module/SOAP.php)**

Module for testing SOAP WSDL web services.
Send requests and check if response matches the pattern.

This module can be used either with frameworks or PHPBrowser.
It tries to guess the framework is is attached to.
If a endpoint is a full url then it uses PHPBrowser.

### Using Inside Framework

Please note, that PHP SoapServer::handle method sends additional headers.
This may trigger warning: "Cannot modify header information"
If you use PHP SoapServer with framework, try to block call to this method in testing environment.

## Status

* Maintainer: **davert**
* Stability: **stable**
* Contact: codecept@davert.mail.ua

## Configuration

* endpoint *required* - soap wsdl endpoint

## Public Properties

* request - last soap request (DOMDocument)
* response - last soap response (DOMDocument)

### dontSeeSoapResponseContainsXPath

Checks XML response doesn't contain XPath locator

``` php
<?php
$I->dontSeeSoapResponseContainsXPath('//root/user[@id=1]');
?>
```

 * `param` $xpath

### dontSeeSoapResponseEquals

Checks XML response equals provided XML.
Comparison is done by canonicalizing both xml`s.

Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).

 * `param` $xml

### dontSeeSoapResponseIncludes

Checks XML response does not include provided XML.
Comparison is done by canonicalizing both xml`s.
Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).

 * `param` $xml

### grabAttributeFrom

Finds and returns attribute of element.
Element is matched by either CSS or XPath

@version 1.1
 * `param` $cssOrXPath
 * `param` $attribute
@return string

### grabTextContentFrom

Finds and returns text contents of element.
Element is matched by either CSS or XPath

@version 1.1
 * `param` $cssOrXPath
@return string

### haveSoapHeader

Prepare SOAP header.
Receives header name and parameters as array.

Example:

``` php
<?php
$I->haveSoapHeader('AuthHeader', array('username' => 'davert', 'password' => '123345'));
```

Will produce header:

```
   <soapenv:Header>
     <SessionHeader>
     <AuthHeader>
         <username>davert</username>
         <password>12345</password>
     </AuthHeader>
  </soapenv:Header>
```

 * `param` $header
 * `param array` $params

### seeResponseCodeIs

Checks response code from server.

 * `param` $code

### seeSoapResponseContainsStructure

Checks XML response contains provided structure.
Response elements will be compared with XML provided.
Only nodeNames are checked to see elements match.

Example:

``` php
<?php

$I->seeResponseContains("<user><query>CreateUser<name>Davert</davert></user>");
$I->seeSoapResponseContainsStructure("<query><name></name></query>");
?>
```

Use this method to check XML of valid structure is returned.
This method does not use schema for validation.
This method does not require path from root to match the structure.

 * `param` $xml

### seeSoapResponseContainsXPath

Checks XML response with XPath locator

``` php
<?php
$I->seeSoapResponseContainsXPath('//root/user[@id=1]');
?>
```

 * `param` $xpath

### seeSoapResponseEquals

Checks XML response equals provided XML.
Comparison is done by canonicalizing both xml`s.

Parameters can be passed either as DOMDocument, DOMNode, XML string, or array (if no attributes).

Example:

``` php
<?php
$I->seeSoapResponseEquals("<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope><SOAP-ENV:Body><result>1</result></SOAP-ENV:Envelope>");

$dom = new \DOMDocument();
$dom->load($file);
$I->seeSoapRequestIncludes($dom);

```

 * `param` $xml

### seeSoapResponseIncludes

Checks XML response includes provided XML.
Comparison is done by canonicalizing both xml`s.
Parameter can be passed either as XmlBuilder, DOMDocument, DOMNode, XML string, or array (if no attributes).

Example:

``` php
<?php
$I->seeSoapResponseIncludes("<result>1</result>");
$I->seeSoapRequestIncludes(\Codeception\Utils\Soap::response()->result->val(1));

$dom = new \DDOMDocument();
$dom->load('template.xml');
$I->seeSoapRequestIncludes($dom);
?>
```

 * `param` $xml

### sendSoapRequest

Submits request to endpoint.

Requires of api function name and parameters.
Parameters can be passed either as DOMDocument, DOMNode, XML string, or array (if no attributes).

You are allowed to execute as much requests as you need inside test.

Example:

``` php
$I->sendRequest('UpdateUser', '<user><id>1</id><name>notdavert</name></user>');
$I->sendRequest('UpdateUser', \Codeception\Utils\Soap::request()->user
  ->id->val(1)->parent()
  ->name->val('notdavert');
```

 * `param` $request
 * `param` $body

Module reference is taken from the source code. Help us to improve documentation. Edit module reference


text:
namespace YAF.Types.Models
{
    using System;

    using ServiceStack.DataAnnotations;

    using YAF.Types.Interfaces.Data;

    /// <summary>
    /// The attachment.
    /// </summary>
    [Serializable]
    public partial class Attachment : IEntity, IHaveID
    {
        /// <summary>
        /// The on created.
        /// </summary>
        partial void OnCreated();

        /// <summary>
        /// Initializes a new instance of the <see cref="Attachment"/> class.
        /// </summary>
        public Attachment()
        {
            this.OnCreated();
        }

        #region Properties

        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        [AutoIncrement]
        [Alias("AttachmentID")]
        public int ID { get; set; }

        /// <summary>
        /// Gets or sets the message id.
        /// </summary>
        public int MessageID { get; set; }

        /// <summary>
        /// Gets or sets the file name.
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// Gets or sets the bytes.
        /// </summary>
        public int Bytes { get; set; }

        /// <summary>
        /// Gets or sets the user id.
        /// </summary>
        public int UserID { get; set; }

        /// <summary>
        /// Gets or sets the content type.
        /// </summary>
        public string ContentType { get; set; }

        /// <summary>
        /// Gets or sets the downloads.
        /// </summary>
        public int Downloads { get; set; }

        /// <summary>
        /// Gets or sets the file data.
        /// </summary>
        public byte[] FileData { get; set; }

        #endregion
    }
}


text:
echo "Stop and remove all 'flowable' containers"
docker rm -f $(docker ps -a |grep flowable|awk '{print $1;}')


text:
<?php

namespace DoctrineORMModule\Proxy\__CG__\Application\Entity;

/**
 * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
 */
class Entidad extends \Application\Entity\Entidad implements \Doctrine\ORM\Proxy\Proxy
{
    private $_entityPersister;
    private $_identifier;
    public $__isInitialized__ = false;
    public function __construct($entityPersister, $identifier)
    {
        $this->_entityPersister = $entityPersister;
        $this->_identifier = $identifier;
    }
    /** @private */
    public function __load()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;

            if (method_exists($this, "__wakeup")) {
                // call this after __isInitialized__to avoid infinite recursion
                // but before loading to emulate what ClassMetadata::newInstance()
                // provides.
                $this->__wakeup();
            }

            if ($this->_entityPersister->load($this->_identifier, $this) === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            unset($this->_entityPersister, $this->_identifier);
        }
    }

    /** @private */
    public function __isInitialized()
    {
        return $this->__isInitialized__;
    }

    public function getId()
    {
        if ($this->__isInitialized__ === false) {
            return (int) $this->_identifier["id"];
        }
        $this->__load();
        return parent::getId();
    }

    public function setEntidad($entidad)
    {
        $this->__load();
        return parent::setEntidad($entidad);
    }

    public function getEntidad()
    {
        $this->__load();
        return parent::getEntidad();
    }

    public function setOrden($orden)
    {
        $this->__load();
        return parent::setOrden($orden);
    }

    public function getOrden()
    {
        $this->__load();
        return parent::getOrden();
    }

    public function setEstado($estado)
    {
        $this->__load();
        return parent::setEstado($estado);
    }

    public function getEstado()
    {
        $this->__load();
        return parent::getEstado();
    }

    public function __sleep()
    {
        return array('__isInitialized__', 'id', 'entidad', 'orden', 'estado');
    }

    public function __clone()
    {
        if (!$this->__isInitialized__ && $this->_entityPersister) {
            $this->__isInitialized__ = true;
            $class = $this->_entityPersister->getClassMetadata();
            $original = $this->_entityPersister->load($this->_identifier);
            if ($original === null) {
                throw new \Doctrine\ORM\EntityNotFoundException();
            }
            foreach ($class->reflFields as $field => $reflProperty) {
                $reflProperty->setValue($this, $reflProperty->getValue($original));
            }
            unset($this->_entityPersister, $this->_identifier);
        }

    }
	/* (non-PHPdoc)
	 * @see \Doctrine\Common\Proxy\Proxy::__setInitialized()
	 */
	public function __setInitialized($initialized) {
		// TODO Auto-generated method stub

	}

	/* (non-PHPdoc)
	 * @see \Doctrine\Common\Proxy\Proxy::__setInitializer()
	 */
	public function __setInitializer(\Closure $initializer = null) {
		// TODO Auto-generated method stub

	}

	/* (non-PHPdoc)
	 * @see \Doctrine\Common\Proxy\Proxy::__getInitializer()
	 */
	public function __getInitializer() {
		// TODO Auto-generated method stub

	}

	/* (non-PHPdoc)
	 * @see \Doctrine\Common\Proxy\Proxy::__setCloner()
	 */
	public function __setCloner(\Closure $cloner = null) {
		// TODO Auto-generated method stub

	}

	/* (non-PHPdoc)
	 * @see \Doctrine\Common\Proxy\Proxy::__getCloner()
	 */
	public function __getCloner() {
		// TODO Auto-generated method stub

	}

	/* (non-PHPdoc)
	 * @see \Doctrine\Common\Proxy\Proxy::__getLazyProperties()
	 */
	public function __getLazyProperties() {
		// TODO Auto-generated method stub

	}

}


text:
static const NSInteger XVimCommandLineTag = 1337;

@interface XVimCommandLine : NSView

- (id)init;
- (void)setModeString:(NSString*)string;
- (void)setArgumentString:(NSString*)string;
- (void)errorMessage:(NSString*)string Timer:(BOOL)aTimer RedColorSetting:(BOOL)aRedColorSetting;
- (void)quickFixWithString:(NSString*)string completionHandler:(void(^)(void))completionHandler;
- (NSUInteger)quickFixColWidth;
- (void)didFrameChanged:(NSNotification*)notification;

- (XVimCommandField*)commandField;
@end


text:
package org.zaproxy.zap.view.popup;

import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.model.HistoryReference;
import org.parosproxy.paros.model.Model;
import org.parosproxy.paros.model.Session;
import org.parosproxy.paros.model.SiteNode;
import org.parosproxy.paros.view.View;
import org.zaproxy.zap.model.Context;
import org.zaproxy.zap.view.ContextExcludePanel;

/** @since 2.3.0 */
public class PopupMenuItemExcludeFromContext extends PopupMenuItemSiteNodeContainer {

    private static final long serialVersionUID = 2766535157899537709L;

    private static final Logger LOGGER =
            LogManager.getLogger(PopupMenuItemExcludeFromContext.class);

    protected Context context;

    public PopupMenuItemExcludeFromContext(Context context) {
        super(context.getName(), true);
        this.context = context;
    }

    @Override
    public String getParentMenuName() {
        return Constant.messages.getString("context.exclude.popup");
    }

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

    @Override
    public void performAction(SiteNode sn) {
        Context uiSharedContext =
                View.getSingleton().getSessionDialog().getUISharedContext(context.getId());

        try {
            uiSharedContext.excludeFromContext(sn, !sn.isLeaf());
        } catch (Exception e) {
            LOGGER.error("Failed to execute action exclude from context: " + e.getMessage(), e);
        }
    }

    @Override
    public void performHistoryReferenceActions(List<HistoryReference> hrefs) {
        Session session = Model.getSingleton().getSession();
        // Manually create the UI shared contexts so any modifications are done
        // on an UI shared Context, so changes can be undone by pressing Cancel
        View.getSingleton().getSessionDialog().recreateUISharedContexts(session);

        super.performHistoryReferenceActions(hrefs);

        // Show the session dialog without recreating UI Shared contexts
        View.getSingleton()
                .showSessionDialog(
                        session, ContextExcludePanel.getPanelName(context.getId()), false);
    }

    @Override
    public boolean isButtonEnabledForSiteNode(SiteNode sn) {
        if (!context.isIncluded(sn) || context.isExcluded(sn)) {
            // Either not included or excluded, so would have to change that regex in a non trivial
            // way to include!
            return false;
        }
        return true;
    }

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


text:
<?php

/**
 * Class which wraps simpleSAMLphp errors in exceptions.
 *
 * @author Olav Morken, UNINETT AS.
 * @package simpleSAMLphp
 * @version $Id$
 */
class SimpleSAML_Error_Error extends Exception {

	/**
	 * The error code.
	 */
	private $errorCode;

	/**
	 * The exception which caused this error.
	 */
	private $cause;

	/**
	 * Constructor for this error.
	 *
	 * The error can either be given as a string, or as an array. If it is an array, the
	 * first element in the array (with index 0), is the error code, while the other elements
	 * are replacements for the error text.
	 *
	 * @param mixed $errorCode  One of the error codes defined in the errors dictionary.
	 * @param Exception $cause  The exception which caused this fatal error (if any).
	 */
	public function __construct($errorCode, Exception $cause = NULL) {

		assert('is_string($errorCode) || is_array($errorCode)');

		if (is_array($errorCode)) {
			$msg = $errorCode[0] . '(';
			foreach ($errorCode as $k => $v) {
				if ($k === 0) {
					continue;
				}

				$msg .= var_export($k, TRUE) . ' => ' . var_export($v, TRUE) . ', ';
			}
			$msg = substr($msg, 0, -2) . ')';
		} else {
			$msg = $errorCode;
		}
		parent::__construct($msg);

		$this->errorCode = $errorCode;
		$this->cause = $cause;
	}

	/**
	 * Retrieve the error code given when throwing this error.
	 *
	 * @return mixed  The error code.
	 */
	public function getErrorCode() {
		return $this->errorCode;
	}

	/**
	 * Retrieve the exception which caused this error.
	 *
	 * @return Exception  The exception which caused this error, or NULL if no exception caused this error.
	 */
	public function getCause() {
		return $this->cause;
	}

	/**
	 * Set the HTTP return code for this error.
	 *
	 * This should be overridden by subclasses who want a different return code than 500 Internal Server Error.
	 */
	protected function setHTTPCode() {
		header('HTTP/1.0 500 Internal Server Error');
	}

	/**
	 * Display this error.
	 *
	 * This method displays a standard simpleSAMLphp error page and exits.
	 */
	public function show() {

		$this->setHTTPCode();

		$session = SimpleSAML_Session::getInstance();

		if($this->cause !== NULL) {
			$e = $this->cause;
		} else {
			$e = $this;
		}

		SimpleSAML_Utilities::fatalError($session->getTrackID(), $this->errorCode, $e);

	}

}

?>


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.07.27 at 02:36:42 PM CST
//

package org.shaolin.bmdp.datamodel.rdbdiagram;

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

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

 * <complexType name="LinkConditionMappingType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="link" type="{http://bmdp.shaolin.org/datamodel/RDBDiagram}LinkFieldType" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LinkConditionMappingType", propOrder = {
    "links"
})
public class LinkConditionMappingType
    implements Serializable
{

    private final static long serialVersionUID = 1L;
    @XmlElement(name = "link")
    protected List<LinkFieldType> links;

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

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

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

     *    getLinks().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link LinkFieldType }
     *
     *
     */
    public List<LinkFieldType> getLinks() {
        if (links == null) {
            links = new ArrayList<LinkFieldType>();
        }
        return this.links;
    }

}


text:
package com.izforge.izpack.util.config.base;

import java.util.List;
import java.util.Map;

public interface CommentedMap<K, V> extends Map<K, V>
{
    List<String> getComment(Object key);

    List<String> putComment(K key, List<String> comment);

    List<String> removeComment(Object key);

    int getNewLineCount(Object key);

    Integer addEmptyLine(K key);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/C:/Users/Tommy/AndroidStudioProjects/starcitizeninfoclient/pulltorefreshlibrary/src/main/res/values-fr/pull_refresh_strings.xml -->
    <eat-comment/>
    <string name="pull_to_refresh_pull_label">Tirez pour rafraîchir…</string>
    <string name="pull_to_refresh_refreshing_label">Chargement…</string>
    <string name="pull_to_refresh_release_label">Relâcher pour rafraîchir…</string>
</resources>


text:
Le parcours Avenir est conçu pour permettre à chaque élève de la classe de 6ème à la classe de terminale de construire son parcours d'information d'orientation et de découverte du monde économique et professionnel.

Sur cette page vous trouverez donc le lien vers l' outil "Folios" de l' ONISEP ainsi que des liens vers des pages présentant rapidement quelques métiers entraperçus en cours de Technologie.

## L' outil "Folios" de l' ONISEP :

[Lien vers l' outil "Folios"](https://folios.onisep.fr/servlet/com.jsbsoft.jtf.core.SG?PROC=IDENTIFICATION_FRONT&ACTION=CONNECTER&MODE=WEBCLASSEUR)

## Quelques métiers de l' informatique :

Quelques métiers entraperçus en 5ème,4ème et 3ème lors de la séquence "Comment les ordinateurs peuvent-ils communiquer ?" [lien](pa/pa1.pdf)


text:
<!DOCTYPE html>

	<title>

            van Kooy Transformer Consulting Services Inc -

    Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
  </title>

<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />

<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta content="width=device-width,initial-scale=1" name="viewport">

<meta name = "format-detection" content = "telephone=no">

<meta name="robots" content="noarchive">

<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">

<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" />

<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">

  	<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
  	<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />

<meta property="legalName" content="Department_of_Industry">

Skip to main content

Skip to "About this site"

Language selection

Français

<object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object> Government of Canada

Search and menus

Search and menus

Topics menu

Jobs

Immigration

Travel

Business

Benefits

Health

Taxes

More services

You are here:

Home

Industries and Business

Canadian Company Capabilities

<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>

 Company profile - Canadian Company Capabilities

New Search |

<form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">

          <input type="hidden" name="lang" value="eng" />
          <input type="hidden" name="profileId" value="" />
          <input type="hidden" name="prtl" value="1" />
          <input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D"  />

          <input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />

          <input type="hidden" name="V_SEARCH.depth" value="1" />
          <input type="hidden" name="V_SEARCH.showStricts" value="false" />
          <input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />

  </form>

| Previous Company

| Next Company

      Third-Party Information Liability Disclaimer

Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

      van Kooy Transformer Consulting Services Inc

Legal/Operating Name:

van Kooy Transformer Consulting Services Inc

http://www.vankooy.com

john@vankooy.com

Mailing Address:

              	<address class="mrgn-bttm-md">

                   128 Glen Rd

                    HAMILTON,

                    Ontario

                  L8S 3M9

                </address>

Location Address:

              	         <address class="mrgn-bttm-md">

                   128 Glen Rd

                    HAMILTON,

                    Ontario

                  L8S 3M9

                         </address>

Tel.:
		      (905) 308-9888

Fax:
		      (905) 308-9638

Company Profile

            Transformer Consulting Services

Specifications, Tender Review and Evaluation, Design Review, Process Monitoring and Inspection, Test Witnessing, Site Instalation Supervision, Transformer Condition Assessment, Failure Analysis

				Full profile

				Full profile

				Contact information

                John
                van Kooy

	                  Title:

  						Owner

                  Telephone:

                (905) 308-9888

                  Facsimile:

                (905) 308-9638

                    Email:

                  john@vankooy.com

  top of page

				Company description

            Country of Ownership:

              Canada

            Exporting:

              No

                Primary Industry (NAICS):

				541990 - All Other Professional, Scientific and Technical Services

            Primary Business Activity:

            Services

				Product / Service / Licensing

                              Service Name:

                            Transformer Consulting Services

                            Transformer Consulting Services

Specifications, Tender Review and Evaluation, Design Review, Process Monitoring and Inspection, Test Witnessing, Site Instalation Supervision, Transformer Condition Assessment, Failure Analysis

  top of page

					Sector information

                Key / Major clients:

              Utility

AES Kingston, Ontario

Algonquin Power Systems Inc.

AltaLink (formally TransAlta, Transmission), Alberta

ATCO Electric Ltd. (Alberta Power Limited), Alberta

ATCO Power, Alberta

Austin Energy, Texas

Caribbean Utilities Company Ltd., Cayman Islands

ENMAX (City of Calgary), Alberta

Hydro One (formally Ontario Hydro, Transmission)

Louisiana Generating LLC, Louisiana

Maritime Electric, Prince Edward Island

Newfoundland Power Inc.

NRG Energy, Minnesota

Ontario Hydro, Generation, Ontario

Toronto Hydro, Ontario

TransAlta Utilities Corporation, Alberta

SNC-Lavalin ATP Inc., Calgary, Alberta

Veridian, Ontario

Waterloo North Hydro, Waterloo, Ontario

Yukon Electric Corporation, Yukon

Industrial

Alcan - Kitimat, British Columbia

Algoma Steel, Sault Ste. Marie, Ontario

Domtar - NorKraft Quevillon Inc., Quebec

E.B. Eddy Forest Product Ltd., Ontario

Express Pipeline, Calgary, Alberta

General Motors, Oshawa, Ontario

Hamilton Specialty Bar, Hamilton, Ontario

Honda, Alliston, Ontario

Lafarge Canada, Ontario

Noranda Inc. – Brunswick Mine, Bathurst, New Brunswick

Petro-Canada Oil and Gas, Ontario, Alberta

Prince George Pulp and Paper, Prince George, British Columbia

Sifto Canada Inc., Goderich, Ontario

Syncrude, Fort McMurray, Alberta

Weldwood of Canada Ltd., British Columbia

Others

ABB Service - Milton, & Sudbury Ontario

ABB Motor & Machines Division, Milton Ontario

AECON Industrial, Cambridge Ontario

Ansaldo Ross Hill, Houston, Texas

Beaver Electrical Machinery Ltd., Prince George, British Columbia

Canadian Hydro Developers, Inc., Calgary, Alberta

Cunningham Lindsey Canada Inc.

Eaton, Cutler-Hammer Engineering Services, Canada and USA

Delta Hudson Engineering - Calgary, Alberta

EMC Engineering - Emerald Park, Saskatchewan

GE Canada Inc.

Giffels Associates Limited, Toronto, Ontario

Gryphon International Engineering Service Inc., St. Catharines, Ontario

High Time Industries Ltd., Calgary, Alberta

Honeywell, Oakville, Ontario

Jones Lockwood Greene, Atlanta, Georgia

Kinectrics Inc., Toronto, Ontario

M.A. Mortenson Company, Minneapolis, Minnesota

National Research Council Canada, Ottawa, Ontario

P.B.W. High Voltage Ltd., Mississauga, Ontario

PROCOMM T.S.I., Thunder Bay, Ontario

Q Group Inc., Punta Gorda, Florida

Reid Crowther, Winnipeg, Manitoba

S & C Electric, Canada and US

Siemens/Westinghouse Service

Schneider Canada Services, Windsor Ontario

Southern Power Systems Inc., Baton Rouge, Louisiana

					Third-Party Information Liability Disclaimer

					Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.

				Contacts

				Contact information

                John
                van Kooy

	                  Title:

  						Owner

                  Telephone:

                (905) 308-9888

                  Facsimile:

                (905) 308-9638

                    Email:

                  john@vankooy.com

				Description

				Company description

            Country of Ownership:

              Canada

            Exporting:

              No

                Primary Industry (NAICS):

				541990 - All Other Professional, Scientific and Technical Services

            Primary Business Activity:

            Services

				Products, services and licensing

				Product / Service / Licensing

                              Service Name:

                            Transformer Consulting Services

                            Transformer Consulting Services

Specifications, Tender Review and Evaluation, Design Review, Process Monitoring and Inspection, Test Witnessing, Site Instalation Supervision, Transformer Condition Assessment, Failure Analysis

					Sector

					Sector information

                Key / Major clients:

              Utility

AES Kingston, Ontario

Algonquin Power Systems Inc.

AltaLink (formally TransAlta, Transmission), Alberta

ATCO Electric Ltd. (Alberta Power Limited), Alberta

ATCO Power, Alberta

Austin Energy, Texas

Caribbean Utilities Company Ltd., Cayman Islands

ENMAX (City of Calgary), Alberta

Hydro One (formally Ontario Hydro, Transmission)

Louisiana Generating LLC, Louisiana

Maritime Electric, Prince Edward Island

Newfoundland Power Inc.

NRG Energy, Minnesota

Ontario Hydro, Generation, Ontario

Toronto Hydro, Ontario

TransAlta Utilities Corporation, Alberta

SNC-Lavalin ATP Inc., Calgary, Alberta

Veridian, Ontario

Waterloo North Hydro, Waterloo, Ontario

Yukon Electric Corporation, Yukon

Industrial

Alcan - Kitimat, British Columbia

Algoma Steel, Sault Ste. Marie, Ontario

Domtar - NorKraft Quevillon Inc., Quebec

E.B. Eddy Forest Product Ltd., Ontario

Express Pipeline, Calgary, Alberta

General Motors, Oshawa, Ontario

Hamilton Specialty Bar, Hamilton, Ontario

Honda, Alliston, Ontario

Lafarge Canada, Ontario

Noranda Inc. – Brunswick Mine, Bathurst, New Brunswick

Petro-Canada Oil and Gas, Ontario, Alberta

Prince George Pulp and Paper, Prince George, British Columbia

Sifto Canada Inc., Goderich, Ontario

Syncrude, Fort McMurray, Alberta

Weldwood of Canada Ltd., British Columbia

Others

ABB Service - Milton, & Sudbury Ontario

ABB Motor & Machines Division, Milton Ontario

AECON Industrial, Cambridge Ontario

Ansaldo Ross Hill, Houston, Texas

Beaver Electrical Machinery Ltd., Prince George, British Columbia

Canadian Hydro Developers, Inc., Calgary, Alberta

Cunningham Lindsey Canada Inc.

Eaton, Cutler-Hammer Engineering Services, Canada and USA

Delta Hudson Engineering - Calgary, Alberta

EMC Engineering - Emerald Park, Saskatchewan

GE Canada Inc.

Giffels Associates Limited, Toronto, Ontario

Gryphon International Engineering Service Inc., St. Catharines, Ontario

High Time Industries Ltd., Calgary, Alberta

Honeywell, Oakville, Ontario

Jones Lockwood Greene, Atlanta, Georgia

Kinectrics Inc., Toronto, Ontario

M.A. Mortenson Company, Minneapolis, Minnesota

National Research Council Canada, Ottawa, Ontario

P.B.W. High Voltage Ltd., Mississauga, Ontario

PROCOMM T.S.I., Thunder Bay, Ontario

Q Group Inc., Punta Gorda, Florida

Reid Crowther, Winnipeg, Manitoba

S & C Electric, Canada and US

Siemens/Westinghouse Service

Schneider Canada Services, Windsor Ontario

Southern Power Systems Inc., Baton Rouge, Louisiana

    Last Update Date 2015-12-11

Date Modified:

      <time>2017-03-02</time>

About government

Contact us

Departments and agencies

Public service and military

News

Treaties, laws and regulations

Government-wide reporting

Prime Minister

How government works

Open government

About this site

Social media

Mobile applications

About Canada.ca

Terms and conditions

Privacy

Top of Page

<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>


text:
package com.ulisesbocchio.jasyptspringboot.configuration;

import com.ulisesbocchio.jasyptspringboot.encryptor.SimpleAsymmetricConfig;
import com.ulisesbocchio.jasyptspringboot.encryptor.SimpleAsymmetricStringEncryptor;
import com.ulisesbocchio.jasyptspringboot.encryptor.SimpleGCMConfig;
import com.ulisesbocchio.jasyptspringboot.encryptor.SimpleGCMStringEncryptor;
import com.ulisesbocchio.jasyptspringboot.properties.JasyptEncryptorConfigurationProperties;
import com.ulisesbocchio.jasyptspringboot.util.AsymmetricCryptography;
import lombok.extern.slf4j.Slf4j;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;

import java.util.function.Supplier;

@Slf4j
public class StringEncryptorBuilder {
    private final JasyptEncryptorConfigurationProperties configProps;

    private final String propertyPrefix;

    public StringEncryptorBuilder(JasyptEncryptorConfigurationProperties configProps, String propertyPrefix) {
        this.configProps = configProps;
        this.propertyPrefix = propertyPrefix;
    }

    public StringEncryptor build() {
        if (isPBEConfig()) {
            return createPBEDefault();
        } else if (isAsymmetricConfig()) {
            return createAsymmetricDefault();
        } else if (isGCMConfig()) {
            return createGCMDefault();
        } else {
            throw new IllegalStateException("either '" + propertyPrefix + ".password', one of ['" + propertyPrefix + ".private-key-string', '" + propertyPrefix + ".private-key-location'] for asymmetric encryption, or one of ['" + propertyPrefix + ".gcm-secret-key-string', '" + propertyPrefix + ".gcm-secret-key-location', '" + propertyPrefix + ".gcm-secret-key-password'] for AES/GCM encryption must be provided for Password-based or Asymmetric encryption");
        }
    }

    private boolean isGCMConfig() {
        return configProps.getGcmSecretKeyString() != null || configProps.getGcmSecretKeyLocation() !=null || configProps.getGcmSecretKeyPassword() != null;
    }

    private boolean isPBEConfig() {
        return configProps.getPassword() != null;
    }

    private boolean isAsymmetricConfig() {
        return configProps.getPrivateKeyString() != null || configProps.getPrivateKeyLocation() != null || configProps.getPublicKeyString() != null || configProps.getPublicKeyLocation() != null;
    }

    private StringEncryptor createGCMDefault() {
        SimpleGCMConfig config = new SimpleGCMConfig();
//        config.setAlgorithm(get(configProps::getAlgorithm, propertyPrefix + ".algorithm", "AES/GCM/NoPadding"));
        config.setSecretKey(get(configProps::getGcmSecretKeyString, propertyPrefix + ".gcm-secret-key-string", null));
        config.setSecretKeyLocation(get(configProps::getGcmSecretKeyLocation, propertyPrefix + ".gcm-secret-key-location", null));
        config.setSecretKeyPassword(get(configProps::getGcmSecretKeyPassword, propertyPrefix + ".gcm-key-password", null));
        config.setSecretKeySalt(get(configProps::getGcmSecretKeySalt, propertyPrefix + ".gcm-secret-key-salt", null));
        config.setSecretKeyAlgorithm(get(configProps::getGcmSecretKeyAlgorithm, propertyPrefix + ".gcm-secret-key-algorithm", "PBKDF2WithHmacSHA256"));
        config.setSecretKeyIterations(get(configProps::getKeyObtentionIterationsInt, propertyPrefix + ".key-obtention-iterations", 1000));
        config.setIvGeneratorClassName(get(configProps::getIvGeneratorClassname, propertyPrefix + ".iv-generator-classname", "org.jasypt.iv.RandomIvGenerator"));
        return new SimpleGCMStringEncryptor(config);
    }

    private StringEncryptor createAsymmetricDefault() {
        SimpleAsymmetricConfig config = new SimpleAsymmetricConfig();
        config.setPrivateKey(get(configProps::getPrivateKeyString, propertyPrefix + ".private-key-string", null));
        config.setPrivateKeyLocation(get(configProps::getPrivateKeyLocation, propertyPrefix + ".private-key-location", null));
        config.setPrivateKeyFormat(get(configProps::getPrivateKeyFormat, propertyPrefix + ".private-key-format", AsymmetricCryptography.KeyFormat.DER));
        config.setPublicKey(get(configProps::getPublicKeyString, propertyPrefix + ".public-key-string", null));
        config.setPublicKeyLocation(get(configProps::getPublicKeyLocation, propertyPrefix + ".public-key-location", null));
        config.setPublicKeyFormat(get(configProps::getPublicKeyFormat, propertyPrefix + ".public-key-format", AsymmetricCryptography.KeyFormat.DER));
        return new SimpleAsymmetricStringEncryptor(config);
    }

    private StringEncryptor createPBEDefault() {
        PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
        SimpleStringPBEConfig config = new SimpleStringPBEConfig();
        config.setPassword(getRequired(configProps::getPassword, propertyPrefix + ".password"));
        config.setAlgorithm(get(configProps::getAlgorithm, propertyPrefix + ".algorithm", "PBEWITHHMACSHA512ANDAES_256"));
        config.setKeyObtentionIterations(get(configProps::getKeyObtentionIterations, propertyPrefix + ".key-obtention-iterations", "1000"));
        config.setPoolSize(get(configProps::getPoolSize, propertyPrefix + ".pool-size", "1"));
        config.setProviderName(get(configProps::getProviderName, propertyPrefix + ".provider-name", null));
        config.setProviderClassName(get(configProps::getProviderClassName, propertyPrefix + ".provider-class-name", null));
        config.setSaltGeneratorClassName(get(configProps::getSaltGeneratorClassname, propertyPrefix + ".salt-generator-classname", "org.jasypt.salt.RandomSaltGenerator"));
        config.setIvGeneratorClassName(get(configProps::getIvGeneratorClassname, propertyPrefix + ".iv-generator-classname", "org.jasypt.iv.RandomIvGenerator"));
        config.setStringOutputType(get(configProps::getStringOutputType, propertyPrefix + ".string-output-type", "base64"));
        encryptor.setConfig(config);
        return encryptor;
    }

    private <T> T getRequired(Supplier<T> supplier, String key) {
        T value = supplier.get();
        if (value == null) {
            throw new IllegalStateException(String.format("Required Encryption configuration property missing: %s", key));
        }
        return value;
    }

    private <T> T get(Supplier<T> supplier, String key, T defaultValue) {
        T value = supplier.get();
        if (value == defaultValue) {
            log.info("Encryptor config not found for property {}, using default value: {}", key, value);
        }
        return value;
    }
}


text:
@interface TopBarAppearancePresenterTest : XCTestCase

@end

@implementation TopBarAppearancePresenterTest {
    TopBarAppearancePresenter *_uut;
    RNNStackController *_stack;
    RNNComponentViewController *_componentViewController;
}

- (void)setUp {
    [super setUp];
    _componentViewController = [RNNComponentViewController createWithComponentId:@"componentId"];
    _uut = [[TopBarAppearancePresenter alloc] initWithNavigationController:_stack];
    _stack = [[RNNStackController alloc] initWithLayoutInfo:nil
                                                    creator:nil
                                                    options:[RNNNavigationOptions emptyOptions]
                                             defaultOptions:[RNNNavigationOptions emptyOptions]
                                                  presenter:_uut
                                               eventEmitter:nil
                                       childViewControllers:@[ _componentViewController ]];
}

- (void)testMergeOptions_shouldMergeWithDefault {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];
    defaultOptions.topBar.title.color = [Color withColor:UIColor.redColor];

    mergeOptions.topBar.title.fontSize = [Number withValue:@(21)];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(_stack.childViewControllers.lastObject.navigationItem.standardAppearance
                       .titleTextAttributes[NSForegroundColorAttributeName],
                   UIColor.redColor);
    UIFont *font = _stack.childViewControllers.lastObject.navigationItem.standardAppearance
                       .titleTextAttributes[NSFontAttributeName];
    XCTAssertEqual(font.pointSize, 21);
}

- (void)testMergeOptions_shouldShowBorder {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];

    mergeOptions.topBar.noBorder = [Bool withValue:NO];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor,
        [[UINavigationBarAppearance new] shadowColor]);
}

- (void)testMergeOptions_shouldHideBorder {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];

    mergeOptions.topBar.noBorder = [Bool withValue:YES];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor, nil);
}

- (void)testMergeOptions_shouldSetBorderColor {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];

    mergeOptions.topBar.noBorder = [Bool withValue:NO];
    mergeOptions.topBar.borderColor = [Color withValue:UIColor.blueColor];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor,
        UIColor.blueColor);
}

- (void)testShowBorder_shouldPreserveBorderColor {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];

    mergeOptions.topBar.noBorder = [Bool withValue:NO];
    mergeOptions.topBar.borderColor = [Color withValue:UIColor.blueColor];

    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor,
        UIColor.blueColor);

    mergeOptions.topBar.noBorder = [Bool withValue:YES];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor, nil);

    mergeOptions.topBar.noBorder = [Bool withValue:NO];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor,
        UIColor.blueColor);
}

- (void)testApplyOptions_shouldApplyTitleAppearance {
    RNNNavigationOptions *options = [RNNNavigationOptions emptyOptions];
    options.topBar.title.color = [Color withColor:UIColor.redColor];
    options.topBar.title.fontSize = [Number withValue:@(21)];

    [_uut applyOptions:options.topBar];
    XCTAssertEqual(_stack.childViewControllers.lastObject.navigationItem.standardAppearance
                       .titleTextAttributes[NSForegroundColorAttributeName],
                   UIColor.redColor);
    XCTAssertEqual([_stack.childViewControllers.lastObject.navigationItem.standardAppearance
                           .titleTextAttributes[NSFontAttributeName] pointSize],
                   21);

    XCTAssertEqual(_stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance
                       .titleTextAttributes[NSForegroundColorAttributeName],
                   UIColor.redColor);
    XCTAssertEqual([_stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance
                           .titleTextAttributes[NSFontAttributeName] pointSize],
                   21);
}

- (void)testMergeOptions_shouldShowScrollEdgeBorder {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];

    mergeOptions.topBar.scrollEdgeAppearance.noBorder = [Bool withValue:NO];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance.shadowColor,
        [[UINavigationBarAppearance new] shadowColor]);
}

- (void)testMergeOptions_shouldHideScrollEdgeBorder {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];

    mergeOptions.topBar.noBorder = [Bool withValue:YES];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.standardAppearance.shadowColor, nil);
}

- (void)testMergeOptions_shouldSetScrollEdgeBorderColor {
    RNNNavigationOptions *mergeOptions = [RNNNavigationOptions emptyOptions];
    RNNNavigationOptions *defaultOptions = [RNNNavigationOptions emptyOptions];

    mergeOptions.topBar.scrollEdgeAppearance.noBorder = [Bool withValue:NO];
    mergeOptions.topBar.scrollEdgeAppearance.borderColor = [Color withValue:UIColor.blueColor];
    RNNNavigationOptions *withDefault = [mergeOptions withDefault:defaultOptions];
    [_uut mergeOptions:mergeOptions.topBar withDefault:withDefault.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance.shadowColor,
        UIColor.blueColor);
}

- (void)testApplyOptions_shouldHideScrollEdgeBorder {
    RNNNavigationOptions *options = [RNNNavigationOptions emptyOptions];
    options.topBar.scrollEdgeAppearance.noBorder = [Bool withValue:YES];
    options.topBar.scrollEdgeAppearance.borderColor = [Color withColor:UIColor.redColor];

    [_uut applyOptions:options.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance.shadowColor,
        nil);
}

- (void)testApplyOptions_shouldShowScrollEdgeBorderWithDefaultColor {
    RNNNavigationOptions *options = [RNNNavigationOptions emptyOptions];
    options.topBar.scrollEdgeAppearance.noBorder = [Bool withValue:NO];

    [_uut applyOptions:options.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance.shadowColor,
        [[UINavigationBarAppearance new] shadowColor]);
}

- (void)testApplyOptions_shouldShowScrollEdgeBorderWithColor {
    RNNNavigationOptions *options = [RNNNavigationOptions emptyOptions];
    options.topBar.scrollEdgeAppearance.noBorder = [Bool withValue:NO];
    options.topBar.scrollEdgeAppearance.borderColor = [Color withColor:UIColor.redColor];

    [_uut applyOptions:options.topBar];
    XCTAssertEqual(
        _stack.childViewControllers.lastObject.navigationItem.scrollEdgeAppearance.shadowColor,
        UIColor.redColor);
}

@end


text:
namespace alinous {namespace remote {namespace socket {

bool ISocketActionFactory::__init_done = __init_static_variables();
bool ISocketActionFactory::__init_static_variables(){
	Java2CppSystem::getSelf();
	ThreadContext* ctx = ThreadContext::newThreadContext();
	{
		GCNotifier __refobj1(ctx, __FILEW__, __LINE__, L"ISocketActionFactory", L"__init_static_variables");
	}
	ctx->localGC();
	delete ctx;
	return true;
}
 ISocketActionFactory::ISocketActionFactory(ThreadContext* ctx) throw()  : IObject(ctx)
{
}
void ISocketActionFactory::__construct_impl(ThreadContext* ctx) throw()
{
}
 ISocketActionFactory::~ISocketActionFactory() throw()
{
	ThreadContext *ctx = ThreadContext::getCurentContext();
	if(ctx != nullptr){ctx->incGcDenial();}
	__releaseRegerences(false, ctx);
	if(ctx != nullptr){ctx->decGcDenial();}
}
void ISocketActionFactory::__releaseRegerences(bool prepare, ThreadContext* ctx) throw()
{
	if(!prepare){
		return;
	}
}
void ISocketActionFactory::__cleanUp(ThreadContext* ctx){
}
}}}


text:
inline double
StopWatch::timeDifference(timeval& start, timeval& stop) {
    double d1, d2;
    d1 = (double)start.tv_sec + 1e-6*((double)start.tv_usec);
    d2 = (double)stop.tv_sec + 1e-6*((double)stop.tv_usec);
    // return result in seconds
    return (d2-d1);
}

////////////////////
//  Constructors  //
////////////////////

StopWatch::StopWatch() {
    started = false;
    stopped = false;
    lap = false;
}

StopWatch::~StopWatch() {
}

////////////////////////
//  Member Functions  //
////////////////////////

void
StopWatch::start() {
    started = true;
    stopped = false;
    lap = false;
#if defined(__SVR4) && defined(sun)
    startValue = gethrtime(); // call solaris timer
#else
    gettimeofday(&start_tv,&start_tz);
#endif
}

void
StopWatch::stop() {
    if (started == false) {
        if (stopped == true) { std::cerr << "StopWatch has already been stopped.\n"; }
        else { std::cerr << "StopWatch has not been started yet.\n"; }
    } else {
#if defined(__SVR4) && defined(sun)
        stopValue = gethrtime(); // call solaris timer
#else
        gettimeofday(&stop_tv,&stop_tz);
#endif
        stopped = true;
        started = false;
        lap = false;
    }
}

#if defined(__SVR4) && defined(sun)
void
StopWatch::reset() {
    stopped = true;
    started = false;
    lap = false;
    startValue = stopValue;
}

double
StopWatch::elapsed() {
    if (stopped == true) {
        // return time in seconds
        return ((double(stopValue - startValue))/1e9);
    } else if (started == true) {
        tempValue = gethrtime();
        return ((double(tempValue - startValue))/1e9);
    } else {
        cerr << "StopWatch has not been started yet.\n";
        return (double) 0;
    }
}

double
StopWatch::lapTime() {
    if (started == true) {
        tempValue = gethrtime();
        tempValue2 = lapValue;
        lapValue = tempValue;
        if (lap == true) {
            return ((double(tempValue - tempValue2))/1e9);
        } else {
            lap = true;
            return ((double(tempValue - startValue))/1e9);
        }
    } else {
        cerr << "StopWatch has not been started yet.\n";
        return (double) 0;
    }
}
#else
void
StopWatch::reset() {
    stopped = true;
    started = false;
    lap = false;
    start_tv = stop_tv;
}

double
StopWatch::elapsed() {
    if (stopped == true) {
        return timeDifference(start_tv,stop_tv);
    } else if (started == true) {
        gettimeofday(&temp_tv,&temp_tz);
        return timeDifference(start_tv,temp_tv);
    } else {
        std::cerr << "StopWatch has not been started yet.\n";
        return (double) 0;
    }
}

double
StopWatch::lapTime() {
    if (started == true) {
        gettimeofday(&temp_tv,&temp_tz);
        temp2_tv = lap_tv;
        lap_tv = temp_tv; // Time zone does not need to be modified.
        if (lap == true) {
            return timeDifference(temp2_tv,temp_tv);
        } else {
            lap = true;
            return timeDifference(start_tv,temp_tv);
        }
    } else {
        std::cerr << "StopWatch has not been started yet.\n";
        return (double) 0;
    }
}
#endif


text:
var filters = require('./filters.js');
var ns = require('./namespace.js');

Parser = function(rdf) {
	var self = this;

	var matchObjects = function(g, s, p) {
		var o = [];
		g.match(s, p).forEach(function(t) { o.push(t.object); });
		return o;
	};

	var matchObjectValue = function(g, s, p) {
		var v = null;
		g.match(s, p, null, 1).forEach(function(t) { v = t.object.valueOf(); });
		return v;
	};

	var matchObjectValues = function(g, s, p) {
		var v = [];
		g.match(s, p).forEach(function(t) { v.push(t.object.valueOf()); });
		return v;
	};

	self.parse = function(graph) {
		var auths = self.parseAuths(graph);
		var roles = self.parseRoles(graph);

		return {
			auths: auths,
			roles: roles
		};
	};

	self.parseAuths = function(graph) {
		var auths = {};

		graph.match(null, rdf.ns.type, ns.Authorization).forEach(function(t) {
			auths[t.subject.valueOf()] = self.parseAuth(graph, t.subject);
		});

		return auths;
	};

	self.parseAuth = function(graph, iri) {
		var auth = self.parseRole(graph, iri);

		auth.agent = matchObjectValues(graph, iri, ns.agent);
		auth.application = matchObjectValues(graph, iri, ns.application);

		return auth;
	};

	self.parseRoles = function(graph) {
		var roles = {};

		graph.match(null, rdf.ns.type, ns.Role).forEach(function(t) {
			roles[t.subject.valueOf()] = self.parseRole(graph, t.subject);
		});

		return roles;
	};

	self.parseRole = function(graph, iri) {
		var role = {};

		role.access = self.parseAccess(graph, iri);
		role.graph = matchObjectValues(graph, iri, ns.graph);
		role.hasRole = matchObjectValues(graph, iri, ns.hasRole);
		role.subject = matchObjectValues(graph, iri, ns.subject);

		return role;
	};

	self.parseAccess = function(graph, iri) {
		var access = [];

		graph.match(iri, ns.access).forEach(function(t) {
			access.push(self.parseTripleAuth(graph, t.object));
		});

		return access;
	};

	self.parseTripleAuth = function(graph, iri) {
		var tripleAuth = {};

		tripleAuth.children = self.parseChildren(graph, iri);
		tripleAuth.filter = self.parseFilters(graph, iri);
		tripleAuth.mode = matchObjectValues(graph, iri, ns.mode);
		tripleAuth.required = matchObjectValue(graph, iri, ns.required);

		return tripleAuth;
	};

	self.parseChildren = function(graph, iri) {
		var children = [];

		graph.match(iri, ns.children).forEach(function(t) {
			children = children.concat(self.parseAccess(graph, t.object));
		});

		return children;
	};

	self.parseFilters = function(graph, iri) {
		var filters = [];

		graph.match(iri, ns.filter).forEach(function(t) {
			graph.match(t.object, rdf.ns.type, ns.SimpleFilter).forEach(function(t) {
				filters.push(self.parseSimpleFilter(graph, t.subject));
			});

			//TODO: ns.VariableFilter
			//TODO: handle variables in access control
		});

		return filters;
	};

	self.parseSimpleFilter = function(graph, iri) {
		var s = matchObjects(graph, iri, ns.subject);
		var p = matchObjects(graph, iri, ns.predicate);
		var o = matchObjects(graph, iri, ns.object);

		return new filters.SimpleFilter(rdf, s, p, o);
	};
};

module.exports = Parser;


text:
package com.silverforge.controls;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.animation.AnimationSet;

import com.silverforge.controls.calculators.CoordinateCalculator;
import com.silverforge.controls.calculators.FiniteLoadCalculator;
import com.silverforge.controls.calculators.InfiniteLoadCalculator;
import com.silverforge.controls.model.ItemCoordinate;
import com.silverforge.controls.model.PositionSettings;
import com.silverforge.controls.painters.CanvasPainter;

public final class BusyIndicator extends Indicator {

    private boolean firstLoad = true;

    private Bitmap canvasBackground;
    private RectF rect = new RectF();

    private float maxValue;
    private float currentValue;

    private int angleModifier;
    private float arcAngle;
    private int textAlpha;

    private float layOutCenterX;
    private float layOutCenterY;
    private float bigRadius;
    private float singleRadius;
    private float singlePointRadius;
    private float textPosX;
    private float textPosY;

    private String customText;

    private CanvasPainter canvasPainter;
    private InfiniteLoadCalculator infiniteLoadCalculator;
    private FiniteLoadCalculator finiteLoadCalculator;

    public BusyIndicator(Context context) {
        this(context, null);
    }

    public BusyIndicator(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public BusyIndicator(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        canvasPainter = new CanvasPainter();
        infiniteLoadCalculator = new InfiniteLoadCalculator();
        finiteLoadCalculator = new FiniteLoadCalculator();
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

        if (firstLoad) {
            initialize();
            firstLoad = false;
        } else {
            if (configSettings.isInfinite())
                calculateInfiniteMoves();
        }

        if (configSettings.isBackgroundVisible())
            canvas.drawBitmap(canvasBackground, 0, 0, null);

        if (configSettings.isInfinite())
            drawInfiniteIndicator(canvas);
        else
            drawLoadingIndicator(canvas);
    }

    @Override
    public boolean onTouchEvent(@NonNull MotionEvent event) {
        int action = event.getAction();
        switch (action) {
            case MotionEvent.ACTION_UP:
                angleModifier = configSettings.getAngleModifier();
                break;
            case MotionEvent.ACTION_DOWN:
                angleModifier += 3;
                break;
        }

        return true;
    }

    public void setMaxValue(float maxValue) {
        this.maxValue = maxValue;
    }

    public void setMaxValue(int maxValue) {
        this.maxValue = (float)maxValue;
    }

    public void setValue(float value) {
        calculateProgress(value);
    }

    public void setValue(int value) {
        calculateProgress((float) value);
    }

    public void setAngleModifier(int angleModifier) {

        if (angleModifier > 3)
            angleModifier = 3;
        if (angleModifier < 1)
            angleModifier = 1;

        this.angleModifier = angleModifier;
        configSettings.setAngleModifier(angleModifier);
    }

    public void setSingleColor(int singleColor) {
        canvasPainter.setSingleColor(singleColor);
    }

    public void setCustomText(String customText) {
        this.customText = customText;
    }

    float getArcAngle() {
        return arcAngle;
    }

    void setArcAngle(float aa) {
        arcAngle = aa;
    }

    int getTextAlpha() {
        return textAlpha;
    }

    void setTextAlpha(int ta) {
        textAlpha = ta;
    }

    private void initialize() {
        int height = getHeight();
        int width = getWidth();
        int paddingLeft = getPaddingLeft();
        int paddingTop = getPaddingTop();

        CoordinateCalculator coordinateCalculator = new CoordinateCalculator();
        PositionSettings positionSettings = coordinateCalculator.calculateBasePositions(width, height, paddingLeft, paddingTop);
        initializeCalculators(positionSettings);
        initializePaints(positionSettings);
        initializeTextPositions(positionSettings);
        initializeCanvas(positionSettings);

        layOutCenterX = positionSettings.getLayOutCenterX();
        layOutCenterY = positionSettings.getLayOutCenterY();
        bigRadius = positionSettings.getBigRadius();
        singleRadius = positionSettings.getSingleRadius();
        singlePointRadius = positionSettings.getSinglePointRadius();
        angleModifier = configSettings.getAngleModifier();
    }

    private void initializeCalculators(PositionSettings posSettings) {
        float layOutCenterX = posSettings.getLayOutCenterX();
        float layOutCenterY = posSettings.getLayOutCenterY();
        float bigRadius = posSettings.getBigRadius();
        float bigPointRadius = posSettings.getBigPointRadius();
        int bigPointCount = configSettings.getBigPointCount();
        float singleRadius = posSettings.getSingleRadius();
        float singlePointRadius = posSettings.getSinglePointRadius();

        if (configSettings.isInfinite()) {
            infiniteLoadCalculator
                    .initializeOuterPointPositions(layOutCenterX,
                            layOutCenterY,
                            bigRadius,
                            bigPointRadius,
                            bigPointCount);

            infiniteLoadCalculator
                    .initializePointPosition(layOutCenterX,
                            layOutCenterY,
                            singleRadius,
                            singlePointRadius);
        } else {
            finiteLoadCalculator
                    .initializeOuterPointPositions(layOutCenterX,
                            layOutCenterY,
                            bigRadius,
                            singlePointRadius,
                            bigPointCount);
        }
    }

    private void initializePaints(PositionSettings posSettings) {
        float bigRadius = posSettings.getBigRadius();
        float singlePointRadius = posSettings.getSinglePointRadius();
        float strokeWidthMultiplier = configSettings.getStrokeWidthMultiplier();
        int indicatorAlpha = configSettings.getIndicatorAlpha();

        canvasPainter.initializePaints(configSettings.getBigPointColor(), configSettings.getSmallPointColor(), bigRadius, singlePointRadius, strokeWidthMultiplier, indicatorAlpha);
    }

    private void initializeTextPositions(PositionSettings posSettings) {
        float layOutCenterX = posSettings.getLayOutCenterX();
        float layOutCenterY = posSettings.getLayOutCenterY();
        float descent = canvasPainter.getTextPaint().descent();
        float ascent = canvasPainter.getTextPaint().ascent();
        textPosX = layOutCenterX;
        textPosY = layOutCenterY - ((descent + ascent) / 2);
    }

    private void initializeCanvas(PositionSettings posSettings) {
        Bitmap cb = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);
        Canvas cv = new Canvas(cb);
        cv.drawColor(configSettings.getBackgroundColor());
        canvasBackground = canvasPainter.getRoundedBitmap(cb, configSettings.getBackgroundShape());

        float layOutCenterX = posSettings.getLayOutCenterX();
        float layOutCenterY = posSettings.getLayOutCenterY();
        float bigRadius = posSettings.getBigRadius();

        rect.set(layOutCenterX - bigRadius, layOutCenterY - bigRadius, layOutCenterX + bigRadius, layOutCenterY + bigRadius);
    }

    private void calculateProgress(float value) {
        if (value > 0){
            if (value >= maxValue)
                value = maxValue;

            currentValue = value;

            float currentAngle = (360 / maxValue) * value;
            currentAngle += 270;

            float aa = (currentAngle - 270);
            LoaderAngleAnimation angleAnimation = new LoaderAngleAnimation(this, aa);
            angleAnimation.setDuration(300);

            LoaderTextAnimation textAnimation = new LoaderTextAnimation(this);
            textAnimation.setDuration(300);

            AnimationSet animationSet = new AnimationSet(false);
            animationSet.addAnimation(angleAnimation);
            animationSet.addAnimation(textAnimation);
            this.startAnimation(animationSet);
        }
    }

    private void drawInfiniteIndicator(Canvas canvas) {
        // draw outer points
        Paint bigPaint = canvasPainter.getBigPaint();
        for (ItemCoordinate item : infiniteLoadCalculator.getOuterItems()) {
            canvas.drawCircle(item.getX(), item.getY(), item.getRadius(), bigPaint);
        }

        // draw inner point
        ItemCoordinate innerItem = infiniteLoadCalculator.getInnerItem();
        Paint singlePaint = canvasPainter.getSinglePaint();

        canvas.drawCircle(innerItem.getX(), innerItem.getY(), singlePointRadius, singlePaint);

        invalidate();
    }

    private void drawLoadingIndicator(Canvas canvas) {
        canvas.drawArc(rect, 630, arcAngle, false, canvasPainter.getSinglePaintTransparent());

        if (configSettings.isLoadPointsAreVisible()) {
            for (ItemCoordinate item : finiteLoadCalculator.getOuterItems()) {

                float itemAngle = item.getAngle();
                if (itemAngle >= 270)
                    itemAngle -= 270;
                else
                    itemAngle += 90;

                if (itemAngle > arcAngle) {
                    canvasPainter.getBigPaint().setAlpha(100);
                    canvas.drawCircle(item.getX(), item.getY(), singlePointRadius, canvasPainter.getBigPaint());
                } else {
                    canvas.drawCircle(item.getX(), item.getY(), singlePointRadius, canvasPainter.getSinglePaint());
                }
            }
        }

        if (!TextUtils.isEmpty(customText)) {
            if (configSettings.isPercentageVisible()) {
                String percentageText = getPercentageString();

                float descent = canvasPainter.getTextPaint().descent();
                float ascent = canvasPainter.getTextPaint().ascent();

                textPosY = layOutCenterY - ((descent + ascent) / 2);

                float correction = (float) (descent * 1.5);

                canvasPainter.getTextPaint().setAlpha(textAlpha);
                canvas.drawText(percentageText, textPosX, textPosY - correction, canvasPainter.getTextPaint());

                canvas.drawText(customText, textPosX, textPosY + correction, canvasPainter.getCustomTextPaint());
            } else {
                writeTextToCenter(canvas, customText);
            }
        } else if (configSettings.isPercentageVisible()) {
            String text = getPercentageString();
            writeTextToCenter(canvas, text);
        }
    }

    private void writeTextToCenter(Canvas canvas, String text) {
        float descent = canvasPainter.getTextPaint().descent();
        float ascent = canvasPainter.getTextPaint().ascent();

        textPosY = layOutCenterY - ((descent + ascent) / 2);

        canvasPainter.getTextPaint().setAlpha(textAlpha);
        canvas.drawText(text, textPosX, textPosY, canvasPainter.getTextPaint());
    }

    private String getPercentageString() {
        float v = (100 / maxValue) * currentValue;

        String formatString = decimalPlacesMap.get(configSettings.getPercentageDecimalPlaces());
        return String.format(formatString, v);
    }

    private void calculateInfiniteMoves() {
        infiniteLoadCalculator.recalculateOuterPointPositions(layOutCenterX, layOutCenterY, angleModifier, bigRadius);
        infiniteLoadCalculator.recalculatePointPosition(layOutCenterX, layOutCenterY, angleModifier, singleRadius);
    }
}


text:
//package spotlight.analysis.algorithm.skyline
//
//import scala.reflect.ClassTag
//import akka.actor.{ActorRef, Props}
//
//import scalaz._
//import Scalaz._
//import org.joda.{time => joda}
//import com.github.nscala_time.time.Imports._
//import com.typesafe.scalalogging.LazyLogging
//import omnibus.commons.{KOp, Valid}
//import omnibus.commons.log.Trace
//import omnibus.commons.util._
//import spotlight.analysis.Moment
//import spotlight.analysis.algorithm.AlgorithmActor.AlgorithmContext
//import spotlight.analysis.algorithm.CommonAnalyzer
//import CommonAnalyzer.WrappingContext
//import spotlight.model.outlier.Outliers
//import spotlight.model.timeseries._
//
//
///**
//  * Created by rolfsd on 2/25/16.
//  */
//object SeasonalExponentialMovingAverageAnalyzer {
//  val Algorithm = Symbol( "seasonal-ewma" )
//
//  def props( router: ActorRef ): Props = {
//    Props {
//      new SeasonalExponentialMovingAverageAnalyzer( router ) with ReferenceProvider {
//        override def reference: DateTime = SeasonalExponentialMovingAverageAnalyzer.ClassLoadedReference
//      }
//    }
//  }
//
//  val ClassLoadedReference: joda.DateTime = joda.DateTime.now
//
//
//  trait ReferenceProvider {
//    def reference: joda.DateTime
//  }
//
//  abstract class SeasonalModel {
//    def seasonStartFor( ts: joda.DateTime ): joda.DateTime
//    def binStartFor( ts: joda.DateTime ): joda.DateTime
//    def reference: joda.DateTime
//    def waveLength: joda.Duration
//    def binLength: joda.Duration
//    def bins: Int
//    def momentAt(ts: joda.DateTime ): Moment
//
//    def withMomentAtDateTime( m: Moment, dt: joda.DateTime ): SeasonalModel
//  }
//
//  object SeasonalModel extends LazyLogging {
//    def apply(reference: joda.DateTime, waveLength: joda.Duration, bins: Int ): Valid[SeasonalModel] = {
//      ( 0 until bins ).map { i => Moment.withAlpha( id = s"seasonal-${i}", alpha = 0.05 ) }
//      .toList
//      .sequence
//      .map { moments =>
//        SimpleSeasonalModel(
//          reference = reference,
//          waveLength = waveLength,
//          bins = bins,
//          moments = moments.toVector
//        )
//      }
//    }
//
////    def coarsestStartFor( ts: joda.DateTime, waveLength: joda.Duration ): joda.DateTime = {
////      import scala.concurrent.duration._
////      val d = Duration( waveLength.getMillis, MILLISECONDS ).toCoarsest
////      d.unit match {
////        case MILLISECONDS => ts
////        case MICROSECONDS => new joda.DateTime( ts.getYear, ts.getMonthOfYear, ts.getDayOfMonth, ts.getHourOfDay, ts.getMinuteOfDay, ts.getSecondOfMinute, )
////        case SECONDS =>
////        case MINUTES =>
////        case HOURS =>
////        case _ =>
////      }
////    }
////final def toCoarsest: Duration = {
////  def loop(length: Long, unit: TimeUnit): FiniteDuration = {
////    def coarserOrThis(coarser: TimeUnit, divider: Int) =
////      if (length % divider == 0) loop(length / divider, coarser)
////      else if (unit == this.unit) this
////      else FiniteDuration(length, unit)
////
////    unit match {
////      case DAYS => FiniteDuration(length, unit)
////      case HOURS => coarserOrThis(DAYS, 24)
////      case MINUTES => coarserOrThis(HOURS, 60)
////      case SECONDS => coarserOrThis(MINUTES, 60)
////      case MILLISECONDS => coarserOrThis(SECONDS, 1000)
////      case MICROSECONDS => coarserOrThis(MILLISECONDS, 1000)
////      case NANOSECONDS => coarserOrThis(MICROSECONDS, 1000)
////    }
////  }
////
////  if (unit == DAYS || length == 0) this
////  else loop(length, unit)
////}
//
//
//    final case class SimpleSeasonalModel private[skyline](
//      override val reference: joda.DateTime,
//      override val waveLength: joda.Duration,
//      override val bins: Int,
//      moments: Vector[Moment]
//    ) extends SeasonalModel {
//      override val binLength: joda.Duration = waveLength / bins
//
//      def binLengths( ts: joda.DateTime ): Double = {
//        val diff = {
//          if ( reference < ts ) new joda.Interval( reference, ts ).toDurationMillis
//          else new joda.Interval( ts, reference ).toDuration.negated.getMillis
//        }
//        diff.toDouble / binLength.millis.toDouble
//      }
//
//      def binFor( ts: joda.DateTime ): Int = {
//        val bin = math.floor( binLengths(ts) % bins ).toInt
//        if ( bin < 0 ) bins + bin else bin
//      }
//
//      override def withMomentAtDateTime( m: Moment, ts: DateTime ): SeasonalModel = {
//        copy( moments = moments.updated( binFor(ts), m ) )
//      }
//
//      override def seasonStartFor( ts: joda.DateTime ): joda.DateTime = {
//        val diff = new joda.Interval( reference, ts ).toDuration
//        val waveLengths = math.floor( diff.millis.toDouble / waveLength.millis.toDouble ).toInt
//        logger.debug( "seasonStartFor( {} ) => [{}]", Seq[AnyRef](ts, (reference+(waveLength*waveLengths))):_* )
//        reference + ( waveLength * waveLengths )
//      }
//
//
//      override def binStartFor( ts: joda.DateTime ): joda.DateTime = {
//        val diff = new joda.Interval( reference, ts ).toDuration
//        val binLengths = math.floor( diff.millis.toDouble / binLength.millis.toDouble ).toInt
//        logger.debug( "seasonStartFor( {} ) => [{}]", Seq[AnyRef](ts, (reference+(binLength*binLengths))):_* )
//        reference + ( binLength * binLengths )
//      }
//
//      override def momentAt( ts: joda.DateTime ): Moment = moments( binFor( ts ) )
//    }
//  }
//
//
//  final case class Context private[skyline](
//    override val underlying: AlgorithmContext,
//    seasonalModel: SeasonalModel
//  ) extends WrappingContext {
//    override def withUnderlying( ctx: AlgorithmContext ): Valid[WrappingContext] = copy( underlying = ctx ).successNel
//
//    override type That = Context
//    override def withSource( newSource: TimeSeriesBase ): That = {
//      val updated = underlying withSource newSource
//      copy( underlying = updated )
//    }
//
//    override def addThresholdBoundary(threshold: ThresholdBoundary ): That = copy( underlying = underlying.addThresholdBoundary( threshold ) )
//
//    override def toString: String = s"""${getClass.safeSimpleName}(seasonalModel:[${seasonalModel}])"""
//  }
//}
//
//class SeasonalExponentialMovingAverageAnalyzer(
//  override val router: ActorRef
//) extends CommonAnalyzer[SeasonalExponentialMovingAverageAnalyzer.Context] {
//  outer: SeasonalExponentialMovingAverageAnalyzer.ReferenceProvider =>
//
//  import SeasonalExponentialMovingAverageAnalyzer._
//
//  override implicit val contextClassTag: ClassTag[Context] = ClassTag( classOf[Context] )
//
//  override def algorithm: Symbol = SeasonalExponentialMovingAverageAnalyzer.Algorithm
//
//  override def wrapContext(c: AlgorithmContext ): Valid[WrappingContext] = {
//    makeSeasonalModel( c ) map { model => Context( underlying = c, seasonalModel = model ) }
//  }
//
//  def makeSeasonalModel( context: AlgorithmContext ): Valid[SeasonalModel] = {
//    val result = for {
//      wl <- waveLength( context ).disjunction
//      b <- bins( context ).disjunction
//      model <- SeasonalModel( reference = outer.reference, waveLength = wl, bins = b ).disjunction
//    } yield model
//
//    result.validation
//  }
//
//  def waveLength( c: AlgorithmContext ): Valid[joda.Duration] = {
//    import java.util.concurrent.TimeUnit.MILLISECONDS
//    val WaveLength = algorithm.name + ".wavelength"
//
//    \/
//    .fromTryCatchNonFatal {
//      if ( c.messageConfig hasPath WaveLength ) new joda.Duration( c.messageConfig.getDuration(WaveLength, MILLISECONDS) )
//      else joda.Days.ONE.toStandardDuration
//    }
//    .validationNel
//  }
//
//  def bins( c: AlgorithmContext ): Valid[Int] = {
//    val Bins = algorithm.name + ".bins"
//    \/.fromTryCatchNonFatal{ if ( c.messageConfig hasPath Bins ) c.messageConfig getInt Bins else 24 }.validationNel
//  }
//
//  /**
//    * A timeseries is anomalous if the latest point minus the moving average for its
//    * seasonal bin is greater than tolerance * standard deviations of the bin's exponential
//    * moving average. This is better for finding anomalies with respect to seasonal periods.
//    */
//  override val findOutliers: KOp[AlgorithmContext, (Outliers, AlgorithmContext)] = {
//    val outliers = for {
//      ctx <- toConcreteContextK
//      tolerance <- tolerance
////      taverages <- tailAverage <=< ask[TryV, AlgorithmContext]
//    } yield {
//      val tol = tolerance getOrElse 3D
//
//      collectOutlierPoints(
//        points = ctx.source.points,
//        analysisContext = ctx,
//        evaluateOutlier = (p: PointT, c: Context) => {
//          c.seasonalModel.momentAt( p.dateTime ).statistics map { stats =>
//            log.debug(
//              "pt:[{}] - bin:[{}] - from seasonal exponential moving average: (mean, stddev):[{}]\ttolerance:[{}]",
//              (p.timestamp.toLong, p.value),
//              c.seasonalModel.asInstanceOf[SeasonalModel.SimpleSeasonalModel].binFor(p.dateTime),
//              (stats.ewma, stats.ewmsd),
//              tol
//            )
//
//            val threshold = ThresholdBoundary.fromExpectedAndDistance(
//              timestamp = p.timestamp.toLong,
//              expected = stats.ewma,
//              distance = math.abs( tol * stats.ewmsd )
//            )
//
//            ( threshold isOutlier p.value, threshold )
//            //            math.abs( v - statistics.ewma ) > ( tol * statistics.ewmsd )
//          } getOrElse {
//            ( false, ThresholdBoundary.empty( p.timestamp.toLong ) )
//          }
//        },
//        update = (c: Context, p: PointT) => {
//          val model = c.seasonalModel
//          val m = model momentAt p.dateTime
//          log.debug(
//            "FromSeasonalMovingAverage: adding point ({}, {}) to historical momentAt: [{}]",
//            p.timestamp.toLong,
//            p.value,
//            m.statistics
//          )
//
//          c.copy( seasonalModel = model.withMomentAtDateTime( m :+ p.value, p.dateTime ) )
//        }
//      )
//    }
//
//    makeOutliersK( outliers )
//  }
//}


text:
window.onload = function(){new tocGen('contentArea','pageToc')};
//This script was written By Brady Mulhollem - WebTech101.com
function tocGen(id,writeTo){
	this.id = id;
	this.num = 0;
	this.opened = 0;
	this.writeOut = '
Page Contents
';
	this.previous = 0;
	if(document.getElementById){
		//current requirements;
		this.parentOb = document.getElementById(id);
		var headers = this.getHeaders(this.parentOb);
		if(headers.length > 0){
			this.writeOut += '
';
			var num;
			for(var i=0;i<headers.length;i++){
				num = headers[i].nodeName.substr(1) - 2;
				if(num > this.previous){
					this.writeOut += '
';
					this.opened++;
					this.addLink(headers[i]);
				}
				else if(num < this.previous){
					for(var j=0;j<this.opened;j++){
						this.writeOut += '<\/li><\/ul>';
						this.opened--;
					}
					this.addLink(headers[i]);
				}
				else{
					this.writeout += '<\/li>';
					this.addLink(headers[i]);
				}
				this.previous = num;
			}
			for(var j=0;j<=this.opened;j++){
				this.writeOut += '<\/li><\/ul>';
			}
			document.getElementById(writeTo).innerHTML = this.writeOut;
		}
	}
}
tocGen.prototype.addLink = function(ob){
	var id = this.getId(ob);
	var link = '
'+ob.innerHTML+'<\/a>';
	this.writeOut += link;
}
tocGen.prototype.getId = function(ob){
	if(!ob.id){
		ob.id = this.id+'toc'+this.num;
		this.num++;
	}
	return ob.id;
}
tocGen.prototype.getHeaders = function(parent){
	var return_array = new Array();
	var pat = new RegExp("H[1-6]");
	for(var i=0;i<parent.childNodes.length;i++){
		if(pat.test(parent.childNodes[i].nodeName)){
			return_array[return_array.length] = parent.childNodes[i];
		}
	}
	return return_array;
}


text:
package com.fourmob.colorpicker;

import android.content.Context;
import android.content.res.Resources;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TableLayout;
import android.widget.TableRow;
import io.github.mthli.Tweetin.R;

public class ColorPickerPalette extends TableLayout {
	private String mDescription;
	private String mDescriptionSelected;
	private int mMarginSize;
	private int mNumColumns;
	public ColorPickerSwatch.OnColorSelectedListener mOnColorSelectedListener;
	private int mSwatchLength;

	public ColorPickerPalette(Context context) {
		super(context);
	}

	public ColorPickerPalette(Context context, AttributeSet attributeSet) {
		super(context, attributeSet);
	}

	private void addSwatchToRow(TableRow tableRow, View view, int line) {
		if (line % 2 == 0) {
			tableRow.addView(view);
			return;
		}
		tableRow.addView(view, 0);
	}

	private ImageView createBlankSpace() {
		ImageView imageView = new ImageView(getContext());
		TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(this.mSwatchLength, this.mSwatchLength);
		layoutParams.setMargins(this.mMarginSize, this.mMarginSize, this.mMarginSize, this.mMarginSize);
		imageView.setLayoutParams(layoutParams);
		return imageView;
	}

	private ColorPickerSwatch createColorSwatch(int color, int selectedColor) {
		ColorPickerSwatch colorPickerSwatch = new ColorPickerSwatch(getContext(), color, color == selectedColor, this.mOnColorSelectedListener);
		TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(this.mSwatchLength, this.mSwatchLength);
		layoutParams.setMargins(this.mMarginSize, this.mMarginSize, this.mMarginSize, this.mMarginSize);
		colorPickerSwatch.setLayoutParams(layoutParams);
		return colorPickerSwatch;
	}

	private TableRow createTableRow() {
		TableRow localTableRow = new TableRow(getContext());
		localTableRow.setLayoutParams(new ViewGroup.LayoutParams(-2, -2));
		return localTableRow;
	}

	private void setSwatchDescription(int rowNumber, int index, int rowElements, boolean selected,
									  View swatch) {
		int accessibilityIndex;
		if (rowNumber % 2 == 0) {
			// We're in a regular-ordered row
			accessibilityIndex = index;
		} else {
			// We're in a backwards-ordered row.
			int rowMax = ((rowNumber + 1) * mNumColumns);
			accessibilityIndex = rowMax - rowElements;
		}

		String description;
		if (selected) {
			description = String.format(mDescriptionSelected, accessibilityIndex);
		} else {
			description = String.format(mDescription, accessibilityIndex);
		}
		swatch.setContentDescription(description);
	}

	public void drawPalette(int[] colors, int selectedColor) {
		if (colors == null) {
			return;
		}

		this.removeAllViews();
		int tableElements = 0;
		int rowElements = 0;
		int rowNumber = 0;

		// Fills the table with swatches based on the array of colors.
		TableRow row = createTableRow();
		for (int color : colors) {
			tableElements++;

			View colorSwatch = createColorSwatch(color, selectedColor);
			setSwatchDescription(rowNumber, tableElements, rowElements, color == selectedColor,
					colorSwatch);
			addSwatchToRow(row, colorSwatch, rowNumber);

			rowElements++;
			if (rowElements == mNumColumns) {
				addView(row);
				row = createTableRow();
				rowElements = 0;
				rowNumber++;
			}
		}

		// Create blank views to fill the row if the last row has not been filled.
		if (rowElements > 0) {
			while (rowElements != mNumColumns) {
				addSwatchToRow(row, createBlankSpace(), rowNumber);
				rowElements++;
			}
			addView(row);
		}
	}

	public void init(int size, int numColumns, ColorPickerSwatch.OnColorSelectedListener onColorSelectedListener) {
		this.mNumColumns = numColumns;
		Resources resources = getResources();
		if (size == 1) {
			this.mSwatchLength = resources.getDimensionPixelSize(R.dimen.color_swatch_large);
			this.mMarginSize = resources.getDimensionPixelSize(R.dimen.color_swatch_margins_large);
		} else {
			this.mSwatchLength = resources.getDimensionPixelSize(R.dimen.color_swatch_small);
			this.mMarginSize = resources.getDimensionPixelSize(R.dimen.color_swatch_margins_small);
		}
		this.mOnColorSelectedListener = onColorSelectedListener;
		this.mDescription = resources.getString(R.string.color_swatch_description);
		this.mDescriptionSelected = resources.getString(R.string.color_swatch_description_selected);
	}
}


text:
// <file>
//     <copyright see="prj:///doc/copyright.txt"/>
//     <license see="prj:///doc/license.txt"/>
//     <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
//     <version>$Revision: 1965 $</version>
// </file>

using System;
using System.Collections.Generic;

namespace ICSharpCode.SharpDevelop.Dom
{
	public sealed class ExplicitInterfaceImplementation : Immutable, IEquatable<ExplicitInterfaceImplementation>
	{
		readonly IReturnType interfaceReference;
		readonly string memberName;

		public ExplicitInterfaceImplementation(IReturnType interfaceReference, string memberName)
		{
			this.interfaceReference = interfaceReference;
			this.memberName = memberName;
		}

		public IReturnType InterfaceReference {
			get { return interfaceReference; }
		}

		public string MemberName {
			get { return memberName; }
		}

		public ExplicitInterfaceImplementation Clone()
		{
			return this; // object is immutable, no Clone() required
		}

		public override int GetHashCode()
		{
			return interfaceReference.GetHashCode() ^ memberName.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			return Equals(obj as ExplicitInterfaceImplementation);
		}

		public bool Equals(ExplicitInterfaceImplementation other)
		{
			if (other == null)
				return false;
			else
				return this.interfaceReference == other.interfaceReference && this.memberName == other.memberName;
		}
	}
}