text:
namespace CppNet
{
	namespace System
	{
		class FormatException : public SystemException
		{
		public:
			FormatException() = default;
			FormatException(const String& message);
			FormatException(const String& message, Exception* innerEx);
			FormatException(const ExceptionData& data);
			FormatException(FormatException &&sNewException);
			FormatException(const FormatException& sNewException);
			~FormatException() = default;

		public:
			FormatException &operator=(FormatException&& ex);
			FormatException &operator=(const FormatException& ex);

		public:
			String Message() const override;
		};
	}
}

#endif

redpajama_set_name: RedPajamaGithub


text:
require 'digest/sha1'

module Shooter
  module Acts
    module Auditable
      def self.included(base)
        base.extend Shooter::Acts::Auditable::ClassMethods
      end

      module ClassMethods
        def audit(options = {})
          options.assert_valid_keys(:when, :if, :with_message)

          unless auditable?
            include Shooter::Acts::Auditable::InstanceMethods
            cattr_accessor :audit_items
            attr_accessor :auditor

            has_many :audits, :as => :auditable, :order => "created_at DESC"

            validate :auditor_is_assigned, :if => lambda {|audited_model| audited_model.will_be_audited? }
          end

          self.audit_items ||= []

          options.merge!(:key => (key = generate_audit_key))

          self.audit_items << options

          self.class_eval <<-EOV
            #{options[:when]} do |audited_model|
              item = audit_items.find {|item| item[:key] == "#{key}"}
              if (should_call = item[:if]).is_a?(Proc) ? should_call.call(audited_model) : audited_model.send(should_call)
                message = (msg = item[:with_message]).is_a?(Proc) ? msg.call(audited_model) : audited_model.send(msg)
                audited_model.audits.create(:message => message, :auditor => audited_model.auditor)
              end
            end
          EOV
        end

        def auditable?
          self.included_modules.include?(InstanceMethods)
        end

        private

        def generate_audit_key
          Digest::SHA1.hexdigest(Time.now.to_s.split(//).sort_by {rand}.join)
        end
      end

      module InstanceMethods
        def will_be_audited?
          self.class.audit_items.map {|audit_item| audit_item[:if] }.any? {|item| item.is_a?(Proc) ? item.call(self) : self.send(item) }
        end

        protected

        def auditor_is_assigned
          errors.add(:auditor, "needs to be assigned") unless self.auditor
        end
      end
    end
  end
end

ActiveRecord::Base.send :include, Shooter::Acts::Auditable


text:
<!DOCTYPE html>
<html lang="en">
	<head>
		<title>three.js / editor</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
		<link rel="apple-touch-icon" href="images/icon.png">
		<link rel="manifest" href="manifest.json">
		<link rel="shortcut icon" href="../files/favicon.ico" />
	</head>
	<body>
		<link rel="stylesheet" href="css/main.css">

		<script src="../examples/js/libs/draco/draco_encoder.js"></script>

		<link rel="stylesheet" href="js/libs/codemirror/codemirror.css">
		<link rel="stylesheet" href="js/libs/codemirror/theme/monokai.css">
		<script src="js/libs/codemirror/codemirror.js"></script>
		<script src="js/libs/codemirror/mode/javascript.js"></script>
		<script src="js/libs/codemirror/mode/glsl.js"></script>

		<script src="js/libs/esprima.js"></script>
		<script src="js/libs/jsonlint.js"></script>
		<script src="js/libs/glslprep.min.js"></script>

		<link rel="stylesheet" href="js/libs/codemirror/addon/dialog.css">
		<link rel="stylesheet" href="js/libs/codemirror/addon/show-hint.css">
		<link rel="stylesheet" href="js/libs/codemirror/addon/tern.css">

		<script src="js/libs/codemirror/addon/dialog.js"></script>
		<script src="js/libs/codemirror/addon/show-hint.js"></script>
		<script src="js/libs/codemirror/addon/tern.js"></script>
		<script src="js/libs/acorn/acorn.js"></script>
		<script src="js/libs/acorn/acorn_loose.js"></script>
		<script src="js/libs/acorn/walk.js"></script>
		<script src="js/libs/ternjs/polyfill.js"></script>
		<script src="js/libs/ternjs/signal.js"></script>
		<script src="js/libs/ternjs/tern.js"></script>
		<script src="js/libs/ternjs/def.js"></script>
		<script src="js/libs/ternjs/comment.js"></script>
		<script src="js/libs/ternjs/infer.js"></script>
		<script src="js/libs/ternjs/doc_comment.js"></script>
		<script src="js/libs/tern-threejs/threejs.js"></script>
		<script src="js/libs/signals.min.js"></script>

		<script type="module">

			import * as THREE from '../build/three.module.js';

			import { Editor } from './js/Editor.js';
			import { Viewport } from './js/Viewport.js';
			import { Toolbar } from './js/Toolbar.js';
			import { Script } from './js/Script.js';
			import { Player } from './js/Player.js';
			import { Sidebar } from './js/Sidebar.js';
			import { Menubar } from './js/Menubar.js';
			import { VRButton } from '../examples/jsm/webxr/VRButton.js';

			window.URL = window.URL || window.webkitURL;
			window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;

			Number.prototype.format = function () {

				return this.toString().replace( /(\d)(?=(\d{3})+(?!\d))/g, "$1," );

			};

			//

			var editor = new Editor();

			window.editor = editor; // Expose editor to Console
			window.THREE = THREE; // Expose THREE to APP Scripts and Console
			window.VRButton = VRButton; // Expose VRButton to APP Scripts

			var viewport = new Viewport( editor );
			document.body.appendChild( viewport.dom );

			var toolbar = new Toolbar( editor );
			document.body.appendChild( toolbar.dom );

			var script = new Script( editor );
			document.body.appendChild( script.dom );

			var player = new Player( editor );
			document.body.appendChild( player.dom );

			var sidebar = new Sidebar( editor );
			document.body.appendChild( sidebar.dom );

			var menubar = new Menubar( editor );
			document.body.appendChild( menubar.dom );

			//

			editor.storage.init( function () {

				editor.storage.get( function ( state ) {

					if ( isLoadingFromHash ) return;

					if ( state !== undefined ) {

						editor.fromJSON( state );

					}

					var selected = editor.config.getKey( 'selected' );

					if ( selected !== undefined ) {

						editor.selectByUuid( selected );

					}

				} );

				//

				var timeout;

				function saveState() {

					if ( editor.config.getKey( 'autosave' ) === false ) {

						return;

					}

					clearTimeout( timeout );

					timeout = setTimeout( function () {

						editor.signals.savingStarted.dispatch();

						timeout = setTimeout( function () {

							editor.storage.set( editor.toJSON() );

							editor.signals.savingFinished.dispatch();

						}, 100 );

					}, 1000 );

				}

				var signals = editor.signals;

				signals.geometryChanged.add( saveState );
				signals.objectAdded.add( saveState );
				signals.objectChanged.add( saveState );
				signals.objectRemoved.add( saveState );
				signals.materialChanged.add( saveState );
				signals.sceneBackgroundChanged.add( saveState );
				signals.sceneFogChanged.add( saveState );
				signals.sceneGraphChanged.add( saveState );
				signals.scriptChanged.add( saveState );
				signals.historyChanged.add( saveState );

			} );

			//

			document.addEventListener( 'dragover', function ( event ) {

				event.preventDefault();
				event.dataTransfer.dropEffect = 'copy';

			}, false );

			document.addEventListener( 'drop', function ( event ) {

				event.preventDefault();

				if ( event.dataTransfer.types[ 0 ] === 'text/plain' ) return; // Outliner drop

				if ( event.dataTransfer.items ) {

					// DataTransferItemList supports folders

					editor.loader.loadItemList( event.dataTransfer.items );

				} else {

					editor.loader.loadFiles( event.dataTransfer.files );

				}

			}, false );

			function onWindowResize() {

				editor.signals.windowResize.dispatch();

			}

			window.addEventListener( 'resize', onWindowResize, false );

			onWindowResize();

			//

			var isLoadingFromHash = false;
			var hash = window.location.hash;

			if ( hash.substr( 1, 5 ) === 'file=' ) {

				var file = hash.substr( 6 );

				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {

					var loader = new THREE.FileLoader();
					loader.crossOrigin = '';
					loader.load( file, function ( text ) {

						editor.clear();
						editor.fromJSON( JSON.parse( text ) );

					} );

					isLoadingFromHash = true;

				}

			}

			// ServiceWorker

			if ( 'serviceWorker' in navigator ) {

				try {

					navigator.serviceWorker.register( 'sw.js' );

				} catch ( error ) {

				}

			}

		</script>
	</body>
</html>


text:
using System;

namespace SoftwarePatterns.Core.State
{
	public abstract class BaseState : ICommands
	{
		protected readonly WorkItem _owner;

		protected BaseState(WorkItem owner)
		{
			_owner = owner;
		}

		public abstract bool Delete();

		public abstract void Edit(string name, string description);

		public virtual void Print()
		{
			Console.WriteLine();
			Console.WriteLine("WorkItem ID: {0}", _owner.Id);
			Console.WriteLine("WorkItem Name: {0}", _owner.Name);
			Console.WriteLine("WorkItem State: {0}", _owner.State);
			Console.WriteLine("WorkItem Description: {0}", _owner.Description);
			Console.WriteLine();
		}

		public abstract void SetState(Status newState);
	}
}


text:
package # Hide from PAUSE
  DBIx::Class::SQLAHacks::MSSQL;

use warnings;
use strict;

use base qw( DBIx::Class::SQLMaker::MSSQL );

1;


text:
"""Functionality to check for the availability and version of dependencies.

This file is generated by l2tdevtools update-dependencies.py, any dependency
related changes should be made in dependencies.ini.
"""

from __future__ import print_function
from __future__ import unicode_literals

import re

# Dictionary that contains version tuples per module name.
#
# A version tuple consists of:
# (version_attribute_name, minimum_version, maximum_version, is_required)
#
# Where version_attribute_name is either a name of an attribute,
# property or method.
PYTHON_DEPENDENCIES = {
${python_dependencies}}

_VERSION_SPLIT_REGEX = re.compile(r'\.|\-')

def _CheckPythonModule(
    module_name, version_attribute_name, minimum_version,
    is_required=True, maximum_version=None, verbose_output=True):
  """Checks the availability of a Python module.

  Args:
    module_name (str): name of the module.
    version_attribute_name (str): name of the attribute that contains
       the module version or method to retrieve the module version.
    minimum_version (str): minimum required version.
    is_required (Optional[bool]): True if the Python module is a required
        dependency.
    maximum_version (Optional[str]): maximum required version. Should only be
        used if there is a later version that is not supported.
    verbose_output (Optional[bool]): True if output should be verbose.

  Returns:
    bool: True if the Python module is available and conforms to
        the minimum required version, False otherwise.
  """
  module_object = _ImportPythonModule(module_name)
  if not module_object:
    if not is_required:
      print('[OPTIONAL]\tmissing: {0:s}.'.format(module_name))
      return True

    print('[FAILURE]\tmissing: {0:s}.'.format(module_name))
    return False

  if not version_attribute_name or not minimum_version:
    if verbose_output:
      print('[OK]\t\t{0:s}'.format(module_name))
    return True

  module_version = None
  if not version_attribute_name.endswith('()'):
    module_version = getattr(module_object, version_attribute_name, None)
  else:
    version_method = getattr(module_object, version_attribute_name[:-2], None)
    if version_method:
      module_version = version_method()

  if not module_version:
    if not is_required:
      print((
          '[OPTIONAL]\tunable to determine version information '
          'for: {0:s}').format(module_name))
      return True

    print((
        '[FAILURE]\tunable to determine version information '
        'for: {0:s}').format(module_name))
    return False

  # Make sure the module version is a string.
  module_version = '{0!s}'.format(module_version)

  # Split the version string and convert every digit into an integer.
  # A string compare of both version strings will yield an incorrect result.
  module_version_map = list(
      map(int, _VERSION_SPLIT_REGEX.split(module_version)))
  minimum_version_map = list(
      map(int, _VERSION_SPLIT_REGEX.split(minimum_version)))

  if module_version_map < minimum_version_map:
    print((
        '[FAILURE]\t{0:s} version: {1!s} is too old, {2!s} or later '
        'required.').format(module_name, module_version, minimum_version))
    return False

  if maximum_version:
    maximum_version_map = list(
        map(int, _VERSION_SPLIT_REGEX.split(maximum_version)))
    if module_version_map > maximum_version_map:
      print((
          '[FAILURE]\t{0:s} version: {1!s} is too recent, {2!s} or earlier '
          'required.').format(module_name, module_version, maximum_version))
      return False

  if verbose_output:
    print('[OK]\t\t{0:s} version: {1!s}'.format(module_name, module_version))

  return True

def _CheckSQLite3(verbose_output=True):
  """Checks the availability of sqlite3.

  Args:
    verbose_output (Optional[bool]): True if output should be verbose.

  Returns:
    bool: True if the sqlite3 Python module is available, False otherwise.
  """
  # On Windows sqlite3 can be provided by both pysqlite2.dbapi2 and
  # sqlite3. sqlite3 is provided with the Python installation and
  # pysqlite2.dbapi2 by the pysqlite2 Python module. Typically
  # pysqlite2.dbapi2 would contain a newer version of sqlite3, hence
  # we check for its presence first.
  module_name = 'pysqlite2.dbapi2'
  minimum_version = '3.7.8'

  module_object = _ImportPythonModule(module_name)
  if not module_object:
    module_name = 'sqlite3'

  module_object = _ImportPythonModule(module_name)
  if not module_object:
    print('[FAILURE]\tmissing: {0:s}.'.format(module_name))
    return False

  module_version = getattr(module_object, 'sqlite_version', None)
  if not module_version:
    return False

  # Split the version string and convert every digit into an integer.
  # A string compare of both version strings will yield an incorrect result.
  module_version_map = list(
      map(int, _VERSION_SPLIT_REGEX.split(module_version)))
  minimum_version_map = list(
      map(int, _VERSION_SPLIT_REGEX.split(minimum_version)))

  if module_version_map < minimum_version_map:
    print((
        '[FAILURE]\t{0:s} version: {1!s} is too old, {2!s} or later '
        'required.').format(module_name, module_version, minimum_version))
    return False

  if verbose_output:
    print('[OK]\t\t{0:s} version: {1!s}'.format(module_name, module_version))

  return True

def _ImportPythonModule(module_name):
  """Imports a Python module.

  Args:
    module_name (str): name of the module.

  Returns:
    module: Python module or None if the module cannot be imported.
  """
  try:
    module_object = list(map(__import__, [module_name]))[0]
  except ImportError:
    return None

  # If the module name contains dots get the upper most module object.
  if '.' in module_name:
    for submodule_name in module_name.split('.')[1:]:
      module_object = getattr(module_object, submodule_name, None)

  return module_object

def CheckDependencies(verbose_output=True):
  """Checks the availability of the dependencies.

  Args:
    verbose_output (Optional[bool]): True if output should be verbose.

  Returns:
    bool: True if the dependencies are available, False otherwise.
  """
  print('Checking availability and versions of dependencies.')
  check_result = True

  for module_name, version_tuple in sorted(PYTHON_DEPENDENCIES.items()):
    if not _CheckPythonModule(
        module_name, version_tuple[0], version_tuple[1],
        is_required=version_tuple[3], maximum_version=version_tuple[2],
        verbose_output=verbose_output):
      check_result = False

  if not _CheckSQLite3(verbose_output=verbose_output):
    check_result = False

  if check_result and not verbose_output:
    print('[OK]')

  print('')
  return check_result


text:
package ipcam

import (
	"io/ioutil"
	"os"
	"path/filepath"
	"time"
)

type Snapshot struct {
	Buf      []byte
	DateTime time.Time
}

//SaveFile saves the snapshot to disk in folder under filename.jpg
//If folder is empty it uses the current dir
//If filename is empty it uses the timestamp of the snapshot
func (s *Snapshot) SaveFile(folder, filename string) (string, error) {

	if folder == "" {
		folder = filepath.Dir(os.Args[0])
	}
	if filename == "" {
		filename = s.DateTime.Format("2006-01-02T150405.000.jpg")
	}
	if filepath.Ext(filename) == "" {
		filename += ".jpg"
	}

	f := filepath.Join(folder, filename)

	return f, ioutil.WriteFile(f, s.Buf, os.ModeExclusive)
}


text:
package com.mitre.playlistshare;

import android.content.Intent;
import android.content.Context;
import android.os.Environment;
import android.util.Log;
import android.webkit.JavascriptInterface;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.widget.Toast;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.OutputStreamWriter;

public class WebAppInterface {
    Context mContext;

    WebAppInterface(Context c){
        mContext = c;
    }

    @JavascriptInterface
    public void showLog(String text){
        Log.i("CtFHardJS", text);
    }

    @JavascriptInterface
    public String deviceBackup(String data){
        File sdCard = Environment.getExternalStorageDirectory();
        File file = new File(sdCard.getAbsolutePath() + "/PlaylistBackUp.txt");
        try {
            OutputStreamWriter osw = new OutputStreamWriter(mContext.openFileOutput("PlaylistBackUp.txt", mContext.MODE_APPEND | mContext.MODE_WORLD_READABLE));
            osw.write(data + ", ");
            osw.close();
        } catch (FileNotFoundException e) {
            Log.e("CtFHard", "file not found");
        }catch(java.io.IOException e){
            Log.e("CtFHard", "file not found");
        }
        return data;
    }

    @JavascriptInterface
    public void switchActivity(String activity){
        Intent startNew = new Intent(mContext, ErrorActivity.class);
        if(activity.equals("playlist")){
            startNew = new Intent(mContext, PlaylistActivity.class);
       }
        if(activity.equals("add-playlist")){
            startNew = new Intent(mContext, PlaylistAddActivity.class);
        }
        if(activity.equals("remove-playlist")){
            startNew = new Intent(mContext, PlaylistRemoveActivity.class);
        }
        if(activity.equals("search-users")){
            startNew = new Intent(mContext, SearchOtherActivity.class);
        }
        if(activity.equals("other-users")){
            startNew = new Intent(mContext, OtherUsersActivity.class);
        }
        if(activity.equals("other-playlist")){
            startNew = new Intent(mContext, OtherPlaylistActivity.class);
        }
        if(activity.equals("logout")){
            startNew = new Intent(mContext, MainActivity.class);
        }
        mContext.startActivity(startNew);
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

	<Import Project="Common.Properties.xml" />

	<PropertyGroup>
		<Version>1.22.1</Version>
	</PropertyGroup>
</Project>


text:
import IContainer = phosphor.di.IContainer;

import IShellView = phosphor.shell.IShellView;

import { TerminalWidget } from 'phosphor-terminal';

/**
 * Initialize the term widget plugin.
 */
export
function initialize(container: IContainer): void {
  var shell = container.resolve(IShellView);
  var protocol = (window.location.protocol.indexOf("https") === 0) ? "wss" : "ws";
  var ws_url = protocol + "://" + window.location.host + "/twebsocket";

  shell.addWidget('center', new TerminalWidget(ws_url));
  console.log('terminal loaded');
}


text:
<!DOCTYPE html>

	<title>Calendar - Selection</title>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />
	<meta name="author" content="ComponentOne" />
	<link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />

	<link href="../../themes/wijmo/jquery.wijmo.wijcalendar.css" rel="stylesheet" type="text/css" />

				Selection

					<input type="checkbox" name="selectionmode" id="day" value="day" />Day
					<input type="checkbox" name="selectionmode" id="days" value="days" />Days
					<input type="checkbox" name="selectionmode" id="weekDay" value="weekDay" />Week Day
					<input type="checkbox" name="selectionmode" id="weekNumber" value="weekNumber" />Week Number
					<input type="checkbox" name="selectionmode" id="month" value="month" />Month

				The wijcalendar widget can have its dates selected in a number of ways. This sample
				will show you how the day, days, weekday, week number, and month settings work.
				To see a specific selection mode, just select the check box.


text:
require 'taobao/model'

module Taobao
  class SimpleUserInfo < Model
    def self.elm_name
      "SimpleUserInfo"
    end

    def self.attr_names
      [
       :userId,
       :userName
      ]
    end

    for a in attr_names
      attr_accessor a
    end

  end
end


text:
package org.mockserver.model;

import java.util.Collection;
import java.util.List;

/**
 * @author jamesdbloom
 */
public class Headers extends KeysToMultiValues<Header, Headers> {

    public Headers(List<Header> headers) {
        withEntries(headers);
    }

    public Headers(Header... headers) {
        withEntries(headers);
    }

    @Override
    public Header build(NottableString name, Collection<NottableString> values) {
        return new Header(name, values);
    }

    public Headers clone() {
        return new Headers().withEntries(getEntries());
    }

}


text:
layout: post
title:  "Sr. Frontend Developer"
date:   2016-01-02 13:43:18
categories: ux ui javascript
author: Kyle Ledbetter
image: img/posts/frontend-dev.jpg
thumb: img/posts/thumbs/frontend-dev.jpg
---
We're looking for a self-driven Senior Frontend web application engineer that cares about the overall user, developer and customer experience. You will help design, build & maintain [Covalent]({{site.baseurl}}/covalent), our **open source UI Platform** built on **Angular 2.0** + **Material Design**. You will also build several of our new cloud-based data & analytical products on this platform.

Responsibilities:

- Work on an [open source UI Platform]({{site.baseurl}}/covalent) and use it on enterprise products
- Build platform-quality code that's well tested and reusable
- Connect the dots between mockups & APIs
- Collaborate with end users to ensure usability
- Simplify complex user flows for analytical and administrative apps

Skills:

- MVVM JavaScript Pro (Angular 1.x / 2.0, React, Ember, etc)
- Testing suite experience (Unit tests, Browser tests, Usability tests, etc)
- UI framework proficiency (Angular-Material, Polymer, Foundation, Bootstrap, etc)
- RESTful API consumption and design (Build & consume services)
- Visualization framework experience (D3.js, Highcharts, Google Charts, etc)
- Use of build tools (Gulp, Grunt, Jenkins, etc)
- Git & Github experience (Fork or Gitflow model)
- Agile methodology (Scrum, Kanban, Lean)
- Thrive in a small team & make big decisions that impact products & the platform

Work Environment:

- Small office environment in a publicly traded company
- Work from office & home
- Open workstations for collaboration
- Hangouts & Slack for communication

**Our total compensation approach includes a competitive base salary, 401(k), strong work/family programs, and medical, dental and disability coverage.**

Teradata is an Equal Opportunity/Affirmative Action Employer and commits to hiring returning veterans.

<a href="https://teradata.taleo.net/careersection/prof/jobdetail.ftl?job=167645" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" target="_blank">
  Apply Now
</a>


text:
//
//  DOPTimelineCellLayout.h
//  DOPTimelineView
//
//  Created by Yongwei Dou on 2014/04/03.
//  Copyright (c) 2014年 DODOPIPE LIMITED. All rights reserved.
//

#import <Foundation/Foundation.h>
@class DOPost;

/** --------------------------------------------
 *   Timeline Header Layout
 *  --------------------------------------------*/
extern CGFloat  const DOPTL_HEADER_HEIGHT;
extern CGFloat  const DOPTL_AVATOR_MARGIN_TOP;
extern CGFloat  const DOPTL_AVATOR_MARGIN_LEFT;
extern CGFloat  const DOPTL_AVATOR_WIDTH;
extern CGFloat  const DOPTL_AVATOR_HEIGHT;
extern CGFloat  const DOPTL_USERNAME_MARGIN_RELATED_RIGHT;
extern CGFloat  const DOPTL_USERNAME_MARGIN_RELATED_LEFT;
extern CGFloat  const DOPTL_USERNAME_FONT_SIZE;
extern CGFloat  const DOPTL_UPDATETIME_MARGIN_RIGHT;
extern CGFloat  const DOPTL_UPDATETIME_FONT_SIZE;
extern CGFloat  const DOPTL_TIMERICON_MARGIN_RELATED_RIGHT;
extern CGFloat  const DOPTL_TIMERICON_WIDTH;
extern CGFloat  const DOPTL_TIMERICON_HEIGHT;

/** ------------------------------------------
 *    Timeline photos Layout
 *  ------------------------------------------*/
extern CGFloat  const DOPTL_PHOTOS_MARGIN_TOP;
extern CGFloat  const DOPTL_PHOTOS_MARGIN_LEFT;
extern CGFloat  const DOPTL_PHOTOS_MARGIN_RIGHT;
extern CGFloat  const DOPTL_SINGLE_PHOTO_ASPECTRADIO;
extern CGFloat  const DOPTL_PHOTOS_GRID_PADDING;
extern NSInteger  const DOPTL_PHOTOS_GRID_COLUMN_NUM;
extern NSInteger  const DOPTL_PHOTOS_GRID_ROW_NUM;

/** ------------------------------------------
 *    Timeline caption Layout
 *  ------------------------------------------*/

extern CGFloat  const DOPTL_CAPTION_MARGIN_TOP;
extern CGFloat  const DOPTL_CAPTION_MARGIN_LEFT;
extern CGFloat  const DOPTL_CAPTION_MARGIN_RIGHT;
extern CGFloat  const DOPTL_CAPTION_FONT_SIZE;

/** ------------------------------------------
 *    Timeline likedBy Layout
 *  ------------------------------------------*/
extern CGFloat  const DOPTL_LIKEDBY_ICON_MARGIN_TOP;
extern CGFloat  const DOPTL_LIKEDBY_ICON_MARGIN_LEFT;
extern CGFloat  const DOPTL_LIKEDBY_ICON_WIDTH;
extern CGFloat  const DOPTL_LIKEDBY_ICON_HEIGHT;
extern CGFloat  const DOPTL_LIKEDBY_TEXT_MARGIN_RELATED_LEFT;
extern CGFloat  const DOPTL_LIKEDBY_TEXT_MARGIN_RIGHT;
extern CGFloat  const DOPTL_LIKEDBY_TEXT_FONT_SIZE;
extern CGFloat  const DOPTL_LIKEDBY_TEXT_HEIGHT;

/** ------------------------------------------
 *    Timeline Comment Layout
 *  ------------------------------------------*/
extern CGFloat  const DOPTL_COMMENT_USERNAME_MARGIN_TOP;
extern CGFloat  const DOPTL_COMMENT_USERNAME_MARGIN_LEFT;
extern CGFloat  const DOPTL_COMMENT_USERNAME_HEIGHT;
extern CGFloat  const DOPTL_COMMENT_UNC_SPEPARATOR_MARGIN_RELATED_LEFT;
extern CGFloat  const DOPTL_COMMENT_UNC_SPEPARATOR_WIDTH;
extern NSString *const DOPTL_COMMENT_UNC_SPEPARATOR_STRING;
extern CGFloat  const DOPTL_COMMENT_CONTENT_MARGIN_RELATED_LEFT;
extern CGFloat  const DOPTL_COMMENT_CONTENT_MARGING_RIGHT;
extern CGFloat  const DOPTL_COMMENT_USERNAME_FONT_SIZE;
extern CGFloat  const DOPTL_COMMENT_CONTENT_FONT_SIZE;

/** ------------------------------------------
 *    Timeline Command Layout
 *  ------------------------------------------*/

extern CGFloat  const DOPTL_COMMAND_LIKEBTN_MARGIN_TOP;
extern CGFloat  const DOPTL_COMMAND_LIKEBTN_MARGIN_LEFT;
extern CGFloat  const DOPTL_COMMAND_LIKEBTN_WIDTH;
extern CGFloat  const DOPTL_COMMAND_LIKEBTN_HEIGHT;
extern CGFloat  const DOPTL_COMMAND_LIKEBTN_FONT_SIZE;
extern CGFloat  const DOPTL_COMMAND_COMMENTBTN_MARGIN_RELATED_LEFT;
extern CGFloat  const DOPTL_COMMAND_COMMENTBTN_WIDTH;
extern CGFloat  const DOPTL_COMMAND_COMMENTBTN_HEIGHT;
extern CGFloat  const DOPTL_COMMAND_COMMENTBTN_FONT_SIZE;
extern CGFloat  const DOPTL_COMMAND_COMMENT_NUM_MARGIN_RIGHT;
extern CGFloat  const DOPTL_COMMAND_COMMENT_NUM_FONT_SIZE;
extern CGFloat  const DOPTL_COMMAND_COMMENT_ICON_MARGIN_RELATED_RIGHT;
extern CGFloat  const DOPTL_COMMAND_COMMENT_ICON_WIDTH;
extern CGFloat  const DOPTL_COMMAND_COMMENT_ICON_HEIGHT;
extern CGFloat  const DOPTL_COMMAND_LIKED_NUM_MARGIN_RELATED_RIGHT;
extern CGFloat  const DOPTL_COMMAND_LIKED_NUM_FONT_SIZE;
extern CGFloat  const DOPTL_COMMAND_LIKED_ICON_MARGIN_RELATED_RIGHT;
extern CGFloat  const DOPTL_COMMAND_LIKED_ICON_WIDTH;
extern CGFloat  const DOPTL_COMMAND_LIKED_ICON_HEIGHT;

/** ----------------------------------------
 *    Localizable table name
 *  ----------------------------------------*/
extern NSString *const DOPTL_LOCALIZABLE_STRING_TABLE_NAME;

@interface UIColor(DOPTimeline)

+ (UIColor *) userNameTextColor;
+ (UIColor *) updateTimeTextColor;
+ (UIColor *) captionTextColor;
+ (UIColor *) likedByTextColor;
+ (UIColor *) commentedUserNameTextColor;
+ (UIColor *) commentContentTextColor;
+ (UIColor *) likeBtnTextColor;
+ (UIColor *) likedNumTextColor;
+ (UIColor *) commentBtnTextColor;
+ (UIColor *) commentedNumTextColor;
+ (UIColor *) btnBackgroundColor;
@end

@interface UIFont(DOPTimeline)

+ (UIFont *) userNameFont;
+ (UIFont *) updateTimeFont;
+ (UIFont *) captionFont;
+ (UIFont *) likedByTextFont;
+ (UIFont *) commentedUserNameFont;
+ (UIFont *) commentContentFont;
+ (UIFont *) likeBtnTextFont;
+ (UIFont *) commentBtnTextFont;
+ (UIFont *) likedNumTextFont;
+ (UIFont *) commentedNumTextFont;

@end

@interface UIImage(DOPTimeline)

+ (UIImage *) timerIcon;
+ (UIImage *) likeIcon;
+ (UIImage *) commentIcon;

@end

@interface DOPTLocalizableString : NSObject

+ (NSString*) likeBtnText;
+ (NSString*) likeBtnEnabledText;
+ (NSString*) commentBtnText;

@end

@interface DOPTimelineAppearance : NSObject

- (instancetype) initWithDOPost:(DOPost *) post;
- (instancetype) initWithDOPost:(DOPost *) post width:(CGFloat)width;

- (CGFloat) heightOfPartIndex: (NSInteger) idx;

@end


text:
package lv.ddgatve.games.mtable;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

public class DisplayMessageActivity extends ActionBarActivity {

	private int m1;
	private int m2;
	public final static String EXTRA_ANSWER = "lv.ddgatve.games.mtable.ANSWER";

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_display_message);

		// Get the message from the intent
		Intent intent = getIntent();
		m1 = -1;
		m2 = -1;
		try {
			m1 = Integer.parseInt(intent
					.getStringExtra(MainActivity.EXTRA_MESSAGE));
		} catch (Exception e) {
		}
		try {
			m2 = Integer.parseInt(intent
					.getStringExtra(MainActivity.EXTRA_ANSWER));
		} catch (Exception e) {
		}

		TextView textView = (TextView) findViewById(R.id.answer);
		textView.setTextSize(30);
		if (m1 == m2) {
			textView.setTextColor(Color.BLACK);
			textView.setText("" + m1 + "=" + m2);
		} else {
			textView.setTextColor(Color.RED);
			textView.setText("" + m1 + "\u2260" + m2);
		}

		LinearLayout myLayout = (LinearLayout) findViewById(R.id.display_message_layout);

		myLayout.setOnTouchListener(new LinearLayout.OnTouchListener() {
			@Override
			public boolean onTouch(View v, MotionEvent event) {
				return true;
			}
		});
	}

	@Override
	protected void onStart() {
		super.onStart();

		LinearLayout myLayout = (LinearLayout) findViewById(R.id.display_message_layout);

		myLayout.setOnTouchListener(new LinearLayout.OnTouchListener() {
			public boolean onTouch(View v, MotionEvent m) {
				handleTouch(m);
				return true;
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.display_message, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

	public void handleTouch(MotionEvent m) {
		Intent result = new Intent(this, MainActivity.class);
		result.putExtra(EXTRA_ANSWER, m1 == m2);
		setResult(Activity.RESULT_OK, result);
		finish();
	}

	public void goBack(View view) {
		Intent result = new Intent(this, MainActivity.class);
		result.putExtra(EXTRA_ANSWER, m1 == m2);
		setResult(Activity.RESULT_OK, result);
		finish();
	}
}


text:
/* This source file is distributed under the MIT license
 * (see attached LICENSE.txt file for details)
 */

#pragma once

#include <endpointvolume.h>
#include "model/tcp_server/Request.h"

/*
 * WinVistaAudioControls class
 *
 * Manages all Windows Vista (and superior) audio controls.
 */
class WinVistaAudioControls
{
private:
    static const unsigned char CMD_ID_RAISE_VOL = 0x01;
    static const unsigned char CMD_ID_LOWER_VOL = 0x02;
    static const unsigned char CMD_ID_SET_VOL   = 0x03;
    static const unsigned char CMD_ID_MUTE_VOL  = 0x04;

    IAudioEndpointVolume    *m_pEndpointVolume;

    bool getAudioEndpoint();
    void raiseVolume(const Request& request);
    void lowerVolume(const Request& request);
    void setVolume(const Request& request);
    void muteVolume(const Request& request);

public:
    WinVistaAudioControls();

    void processRequest(const Request& request);
};


text:
{-# LANGUAGE FlexibleInstances #-}

module HaskellWorks.Data.Bits.AllExcess.AllExcess0 where

import Data.Word
import HaskellWorks.Data.Bits.PopCount.PopCount0
import HaskellWorks.Data.Bits.PopCount.PopCount1

import qualified Data.Bit             as Bit
import qualified Data.Bit.ThreadSafe  as BitTS
import qualified Data.Vector.Storable as DVS
import qualified Data.Vector.Unboxed  as DVU

class AllExcess0 a where
  -- | Number of 0-bits minues the number of 1-bits.
  allExcess0 :: a -> Int

instance AllExcess0 [Bool] where
  allExcess0 = go 0
    where go n (False:ys) = go (n + 1) ys
          go n (True :ys) = go (n - 1) ys
          go n _          = n
  {-# INLINE allExcess0 #-}

instance AllExcess0 Word8 where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 Word16 where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 Word32 where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 Word64 where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 (DVS.Vector Word8) where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 (DVS.Vector Word16) where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 (DVS.Vector Word32) where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 (DVS.Vector Word64) where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 (DVU.Vector Bit.Bit) where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}

instance AllExcess0 (DVU.Vector BitTS.Bit) where
  allExcess0 w = fromIntegral (popCount0 w) - fromIntegral (popCount1 w)
  {-# INLINE allExcess0 #-}


text:
function out = ishappy(f)
%ISHAPPY   Happiness state of a CHEBFUN object.
%   ISHAPPY(F) returns TRUE of F is a happy CHEBFUN or quasimatrix and FALSE
%   otherwise.  F is happy if all of the FUNs that form each of its columns (or
%   rows, if F is a row CHEBFUN or quasimatrix) are happy.

% Copyright 2015 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

for j = 1:numel(f)
    for k = 1:numel(f(j).funs)
        out = all(get(f(j).funs{k}, 'ishappy'));
        if ( ~out )
            return
        end
    end
end

end


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>twitter</groupId>
  <artifactId>twitter</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>Twitter</name>
  <url>http://github.com/nyle/EchoTwitter</url>

  <repositories>
    <repository>
      <id>alexa-skills-kit-repo</id>
      <url>file://${project.basedir}/repo</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>alexa-skills-kit</groupId>
      <artifactId>alexa-skills-kit</artifactId>
      <version>1.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>9.0.6.v20130930</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</artifactId>
      <version>9.0.6.v20130930</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.10</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.3.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.directory.studio</groupId>
      <artifactId>org.apache.commons.io</artifactId>
      <version>2.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-lambda-java-core</artifactId>
      <version>1.0.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.amazonaws</groupId>
      <artifactId>aws-java-sdk-dynamodb</artifactId>
      <version>1.9.40</version>
    </dependency>
    <dependency>
      <groupId>org.twitter4j</groupId>
      <artifactId>twitter4j-core</artifactId>
      <version>[4.0,)</version>
       </dependency>
  </dependencies>

  <properties>
    <property name="disableRequestSignatureCheck" value="false"/>
    <property name="supportedApplicationIds" value=""/>
    <property name="timestampTolerance" value="150"/>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.2.1</version>
          <configuration>
            <mainClass>Launcher</mainClass>
            <systemProperties>
              <systemProperty>
                <key>javax.net.ssl.keyStore</key>
                <value>/insert/your/path/java-keystore.jks</value>
              </systemProperty>
              <systemProperty>
                <key>javax.net.ssl.keyStorePassword</key>
                <value>insert_your_password</value>
              </systemProperty>
              <systemProperty>
                <key>com.amazon.speech.speechlet.servlet.disableRequestSignatureCheck</key>
                <value>${disableRequestSignatureCheck}</value>
              </systemProperty>
              <systemProperty>
                <key>com.amazon.speech.speechlet.servlet.supportedApplicationIds</key>
                <value>${supportedApplicationIds}</value>
              </systemProperty>
              <systemProperty>
                <key>com.amazon.speech.speechlet.servlet.timestampTolerance</key>
                <value>${timestampTolerance}</value>
              </systemProperty>
            </systemProperties>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>


text:
<?php

namespace kalibao\backend\modules\cms\models\cmsImage\crud;

use Yii;
use yii\data\ActiveDataProvider;
use kalibao\common\components\crud\ModelFilterInterface;
use kalibao\common\models\cmsImage\CmsImage;

/**
 * This is the model filter class for controller "CmsImage".
 *
 * @property integer $id
 * @property string $file_path
 * @property string $cms_image_group_i18n_title
 * @property integer $cms_image_group_id
 * @property string $cms_image_i18n_title
 * @property string $created_at_start
 * @property string $created_at_end
 * @property string $updated_at_start
 * @property string $updated_at_end
 *
 * @package kalibao\common\models\cmsImage\crud
 * @version 1.0
 * @author Kevin Walter <walkev13@gmail.com>
 */
class ModelFilter extends CmsImage implements ModelFilterInterface
{
    public $cms_image_group_i18n_title;
    public $cms_image_i18n_title;
    public $created_at_start;
    public $created_at_end;
    public $updated_at_start;
    public $updated_at_end;

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        return [
            self::SCENARIO_DEFAULT => [
                'id', 'file_path', 'cms_image_group_i18n_title', 'cms_image_group_id',
                'cms_image_i18n_title', 'created_at_start', 'created_at_end', 'updated_at_start',
                'updated_at_end'
            ]
        ];
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'cms_image_group_id'], 'integer'],
            [['created_at_start', 'created_at_end', 'updated_at_start', 'updated_at_end'], 'date', 'format' => 'yyyy-MM-dd'],
            [['file_path', 'cms_image_group_i18n_title', 'cms_image_i18n_title'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        $attributeLabels = parent::attributeLabels();
        $attributeLabels['cms_image_group_i18n_title'] = Yii::t('kalibao','cms_image:cms_image_group_id');
        $attributeLabels['cms_image_i18n_title'] = Yii::t('kalibao','model:title');
        return $attributeLabels;
    }

    /**
     * @inheritdoc
     */
    public function search($requestParams, $language = null, $pageSize = 10)
    {
        $query = self::find();
        $query->joinWith([
            'cmsImageGroupI18ns' => function ($query) use ($language) {
                $query->select(['cms_image_group_id', 'title'])->onCondition(['cms_image_group_i18n.i18n_id' => $language]);
            },
            'cmsImageI18ns' => function ($query) use ($language) {
                $query->select(['cms_image_id', 'title'])->onCondition(['cms_image_i18n.i18n_id' => $language]);
            },
        ]);

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort' => [
                'attributes' => [
                    'id',
                    'file_path' => [
                        'label' => $this->getAttributeLabel('file_path')
                    ],
                    'cms_image_group_i18n_title' => [
                        'asc' => ['cms_image_group_i18n.title' => SORT_ASC],
                        'desc' => ['cms_image_group_i18n.title' => SORT_DESC],
                        'default' => SORT_DESC,
                        'label' => $this->getAttributeLabel('cms_image_group_i18n_title')
                    ],
                    'cms_image_group_id',
                    'cms_image_i18n_title' => [
                        'asc' => ['cms_image_i18n.title' => SORT_ASC],
                        'desc' => ['cms_image_i18n.title' => SORT_DESC],
                        'default' => SORT_DESC,
                        'label' => $this->getAttributeLabel('cms_image_i18n_title')
                    ],
                    'created_at',
                    'updated_at',
                ],
                'defaultOrder' => [
                    'id' => SORT_DESC
                ]
            ],
            'pagination' => [
                'defaultPageSize' => $pageSize,
                'pageSize' => $pageSize,
            ]
        ]);

        $this->load($requestParams);

        if (! $this->validate()) {
            return $dataProvider;
        }

        $query->andFilterWhere(['>=', 'cms_image.created_at', $this->created_at_start]);
        if ($this->created_at_end != '') {
            $query->andWhere([
                '<=',
                'cms_image.created_at',
                (new \DateTime($this->created_at_end))->modify('+1 day')->format('Y-m-d')
            ]);
        }
        $query->andFilterWhere(['>=', 'cms_image.updated_at', $this->updated_at_start]);
        if ($this->updated_at_end != '') {
            $query->andWhere([
                '<=',
                'cms_image.updated_at',
                (new \DateTime($this->updated_at_end))->modify('+1 day')->format('Y-m-d')
            ]);
        }

        $query
            ->andFilterWhere(['cms_image.id' => $this->id])
            ->andFilterWhere(['like', 'cms_image.file_path', $this->file_path])
            ->andFilterWhere(['like', 'cms_image_group_i18n.title', $this->cms_image_group_i18n_title])
            ->andFilterWhere(['cms_image.cms_image_group_id' => $this->cms_image_group_id])
            ->andFilterWhere(['like', 'cms_image_i18n.title', $this->cms_image_i18n_title]);

        return $dataProvider;
    }
}


text:
// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.

namespace Narvalo
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;

    using Narvalo.Internal;
    using Narvalo.Finance.Rounding;
    using Narvalo.Properties;

    // Core rounding methods + MidpointRounding.
    public static partial class RoundingMachine
    {
        public static decimal Ceiling(Money money) => RoundImpl(money, Math.Ceiling);

        public static decimal Floor(Money money) => RoundImpl(money, Math.Floor);

        public static decimal Truncate(Money money) => RoundImpl(money, Math.Truncate);

        public static decimal Round(Money money) => RoundImpl(money, Math.Round);

        public static decimal Round(Money money, MidpointRounding mode)
            => RoundImpl(money, amount => Math.Round(amount, mode));

        public static decimal Round(Money money, int decimalPlaces)
            => Round(money, decimalPlaces, MidpointRounding.ToEven);

        public static decimal Round(Money money, int decimalPlaces, MidpointRounding mode)
        {
            // If the amount is already rounded to decimalPlaces, do nothing.
            if (money.IsRounded && money.Currency.DecimalPlaces == decimalPlaces) { return money.Amount; }
            return Math.Round(money.Amount, decimalPlaces, mode);
        }
    }

    // Core rounding methods + IRoundingAjduster.
    public static partial class RoundingMachine
    {
        public static decimal Round(Money money, IRoundingAdjuster adjuster)
        {
            Require.NotNull(adjuster, nameof(adjuster));
            return RoundImpl(money, amount => adjuster.Round(amount));
        }

        public static decimal Round(Money money, int decimalPlaces, IRoundingAdjuster adjuster)
        {
            Require.NotNull(adjuster, nameof(adjuster));
            // If the amount is already rounded to decimalPlaces, do nothing.
            if (money.IsRounded && money.Currency.DecimalPlaces == decimalPlaces) { return money.Amount; }
            return adjuster.Round(money.Amount, decimalPlaces);
        }
    }

    // Standard binary math operators + MidpointRounding.
    public static partial class RoundingMachine
    {
        public static Money Add(Money money, decimal amount, MidpointRounding mode)
        {
            if (amount == 0m) { return money; }
            return Money.FromMajor(money.Amount + amount, money.Currency, mode);
        }

        public static Money Add(Money money, Money other, MidpointRounding mode)
        {
            money.ThrowIfCurrencyMismatch(other, nameof(other));

            var amount = money.Amount + other.Amount;

            return money.IsNormalized && other.IsNormalized
                ? Money.FromMajor(amount, money.Currency)
                : Money.FromMajor(amount, money.Currency, mode);
        }

        public static Money Subtract(Money money, decimal amount, MidpointRounding mode)
            => Add(money, -amount, mode);

        public static Money Subtract(Money money, Money other, MidpointRounding mode)
        {
            money.ThrowIfCurrencyMismatch(other, nameof(other));

            var amount = money.Amount - other.Amount;

            return money.IsNormalized && other.IsNormalized
                ? Money.FromMajor(amount, money.Currency)
                : Money.FromMajor(amount, money.Currency, mode);
        }

        public static Money Multiply(Money money, decimal multiplier, MidpointRounding mode)
            => Money.FromMajor(multiplier * money.Amount, money.Currency, mode);

        public static Money Divide(Money dividend, decimal divisor, MidpointRounding mode)
            => Money.FromMajor(dividend.Amount / divisor, dividend.Currency, mode);

        public static Money Remainder(Money dividend, decimal divisor, MidpointRounding mode)
            => Money.FromMajor(dividend.Amount % divisor, dividend.Currency, mode);
    }

    // Standard binary math operators + IRoundingAdjuster.
    public static partial class RoundingMachine
    {
        public static Money Add(Money money, decimal amount, IRoundingAdjuster adjuster)
        {
            if (amount == 0m) { return money; }
            return Money.FromMajor(money.Amount + amount, money.Currency, adjuster);
        }

        public static Money Add(Money money, Money other, IRoundingAdjuster adjuster)
        {
            money.ThrowIfCurrencyMismatch(other, nameof(other));

            var amount = money.Amount + other.Amount;

            return money.IsNormalized && other.IsNormalized
                ? Money.FromMajor(amount, money.Currency)
                : Money.FromMajor(amount, money.Currency, adjuster);
        }

        public static Money Subtract(Money money, decimal amount, IRoundingAdjuster adjuster)
            => Add(money, -amount, adjuster);

        public static Money Subtract(Money money, Money other, IRoundingAdjuster adjuster)
        {
            money.ThrowIfCurrencyMismatch(other, nameof(other));

            var amount = money.Amount - other.Amount;

            return money.IsNormalized && other.IsNormalized
                ? Money.FromMajor(amount, money.Currency)
                : Money.FromMajor(amount, money.Currency, adjuster);
        }

        public static Money Multiply(Money money, decimal multiplier, IRoundingAdjuster adjuster)
            => Money.FromMajor(multiplier * money.Amount, money.Currency, adjuster);

        public static Money Divide(Money money, decimal divisor, IRoundingAdjuster adjuster)
            => Money.FromMajor(money.Amount / divisor, money.Currency, adjuster);

        public static Money Remainder(Money money, decimal divisor, IRoundingAdjuster adjuster)
            => Money.FromMajor(money.Amount % divisor, money.Currency, adjuster);
    }

    // LINQ-like Sum() + MidpointRounding.
    //
    // There are three ways to compute a sum with rounding in mind (NB: the sum of two rounded
    // values is always rounded):
    // 1. Compute the sum, then round.
    // 2. Round before each intermediate addition.
    // 3. Round after each intermediate addition.
    // I do not implement the third one, since I don't see any use cases for it (but I might be
    // wrong); the two others don't need any new operators:
    // 1. round after the summation:
    //    > source.Sum().Normalize(mode);
    // 2. round an amount before adding it to the cumulative sum:
    //    > source.Select(_ => _.Normalize(mode)).Sum();
    // For the later, we provides a custom implementation which tries to avoid to create any
    // unnecessary temporary objects due to the use of Normalize().
    // WARNING: To solve the second case, do not use
    // > source.Select(_ => Math.Round(_.Amount, _.Currency.DecimalPlaces, mode)).Sum();
    // it will not fail but won't give the correct result in case all elements do not use the
    // same currency, it should rather throw.
    public static partial class RoundingMachine
    {
        // Optimized version of: monies.Select(_ => _.Normalize(mode)).Sum().
        public static Money Sum(this IEnumerable<Money> monies, MidpointRounding mode)
        {
            Require.NotNull(monies, nameof(monies));

            using (var iter = monies.GetEnumerator())
            {
                if (!iter.MoveNext()) { goto EMPTY_COLLECTION; }

                Money mny = iter.Current;
                Currency currency = mny.Currency;
                decimal sum = NormalizeAmount(mny, mode);

                while (iter.MoveNext())
                {
                    mny = iter.Current;

                    MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                    sum += NormalizeAmount(mny, mode);
                }

                return Money.FromMajor(sum, currency);
            }

            EMPTY_COLLECTION:
            return Money.FromMajor(0, Currency.None);
        }

        // Optimized version of: monies.Select(_ => _.Normalize(mode)).Sum().
        public static Money Sum(this IEnumerable<Money?> monies, MidpointRounding mode)
        {
            Require.NotNull(monies, nameof(monies));

            using (var iter = monies.GetEnumerator())
            {
                while (iter.MoveNext())
                {
                    Money? item = iter.Current;
                    if (!item.HasValue) { continue; }

                    Money mny = item.Value;
                    Currency currency = mny.Currency;
                    decimal sum = NormalizeAmount(mny, mode);

                    while (iter.MoveNext())
                    {
                        item = iter.Current;

                        if (item.HasValue)
                        {
                            mny = item.Value;

                            MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                            sum += NormalizeAmount(mny, mode);
                        }
                    }

                    return Money.FromMajor(sum, currency);
                }
            }

            return Money.FromMajor(0, Currency.None);
        }
    }

    // LINQ-like Sum() + IRoundingAdjuster.
    public static partial class RoundingMachine
    {
        // Optimized version of: monies.Select(_ => _.Normalize(adjuster)).Sum().
        public static Money Sum(this IEnumerable<Money> monies, IRoundingAdjuster adjuster)
        {
            Require.NotNull(monies, nameof(monies));
            Require.NotNull(adjuster, nameof(adjuster));

            using (var iter = monies.GetEnumerator())
            {
                if (!iter.MoveNext()) { goto EMPTY_COLLECTION; }

                Money mny = iter.Current;
                Currency currency = mny.Currency;
                decimal sum = NormalizeAmount(mny, adjuster);

                while (iter.MoveNext())
                {
                    mny = iter.Current;

                    MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                    sum += NormalizeAmount(mny, adjuster);
                }

                return Money.FromMajor(sum, currency);
            }

            EMPTY_COLLECTION:
            return Money.FromMajor(0, Currency.None);
        }

        // Optimized version of: monies.Select(_ => _.Normalize(adjuster)).Sum().
        public static Money Sum(this IEnumerable<Money?> monies, IRoundingAdjuster adjuster)
        {
            Require.NotNull(monies, nameof(monies));
            Require.NotNull(adjuster, nameof(adjuster));

            using (var iter = monies.GetEnumerator())
            {
                while (iter.MoveNext())
                {
                    Money? item = iter.Current;
                    if (!item.HasValue) { continue; }

                    Money mny = item.Value;
                    Currency currency = mny.Currency;
                    decimal sum = NormalizeAmount(mny, adjuster);

                    while (iter.MoveNext())
                    {
                        item = iter.Current;

                        if (item.HasValue)
                        {
                            mny = item.Value;

                            MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                            sum += NormalizeAmount(mny, adjuster);
                        }
                    }

                    return Money.FromMajor(sum, currency);
                }
            }

            return Money.FromMajor(0, Currency.None);
        }
    }

    // LINQ-like Average() + MidpointRounding.
    //
    // As for the sum, there are many ways to compute an average with rounding in mind.
    // 1. Compute the average, then round:
    //   > source.Average().Normalize(mode);
    // 2. Round before each intermediate addition, take the average then round:
    //   > source.Select(_ => _.Normalize(mode)).Average().Normalize(mode);
    // These are the only ones we shall consider, and we will provide an optimized version for the
    // later. For information only, you might also consider to:
    // - compute the sum, round, take the average then round again.
    // - round before each intermediate addition, take the average then round the result.
    public static partial class RoundingMachine
    {
        // Optimized version of: monies.Select(_ => _.Normalize(mode)).Average().Normalize(mode).
        public static Money Average(this IEnumerable<Money> monies, MidpointRounding mode)
        {
            Require.NotNull(monies, nameof(monies));

            using (var iter = monies.GetEnumerator())
            {
                if (!iter.MoveNext())
                {
                    throw new InvalidOperationException(Strings_Money.InvalidOperation_EmptySequence);
                }

                Money mny = iter.Current;
                Currency currency = mny.Currency;
                decimal sum = NormalizeAmount(mny, mode);
                long count = 1;

                while (iter.MoveNext())
                {
                    mny = iter.Current;

                    MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                    sum += NormalizeAmount(mny, mode);
                    count++;
                }

                return Money.FromMajor(sum / count, currency, mode);
            }
        }

        // Optimized version of: monies.Select(_ => _.Normalize(mode)).Average().Normalize(mode).
        public static Money? Average(this IEnumerable<Money?> monies, MidpointRounding mode)
        {
            Require.NotNull(monies, nameof(monies));

            using (var iter = monies.GetEnumerator())
            {
                while (iter.MoveNext())
                {
                    Money? item = iter.Current;
                    if (!item.HasValue) { continue; }

                    Money mny = item.Value;
                    Currency currency = mny.Currency;
                    decimal sum = NormalizeAmount(mny, mode);
                    long count = 1;

                    while (iter.MoveNext())
                    {
                        item = iter.Current;

                        if (item.HasValue)
                        {
                            mny = item.Value;

                            MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                            sum += NormalizeAmount(mny, mode);
                            count++;
                        }
                    }

                    return Money.FromMajor(sum / count, currency, mode);
                }
            }

            return null;
        }
    }

    // LINQ-like Average() + IRoundingAdjuster.
    public static partial class RoundingMachine
    {
        // Optimized version of: monies.Select(_ => _.Normalize(adjuster)).Average().Normalize(mode).
        public static Money Average(this IEnumerable<Money> monies, IRoundingAdjuster adjuster)
        {
            Require.NotNull(monies, nameof(monies));
            Require.NotNull(adjuster, nameof(adjuster));

            using (var iter = monies.GetEnumerator())
            {
                if (!iter.MoveNext())
                {
                    throw new InvalidOperationException(Strings_Money.InvalidOperation_EmptySequence);
                }

                Money mny = iter.Current;
                Currency currency = mny.Currency;
                decimal sum = NormalizeAmount(mny, adjuster);
                long count = 1;

                while (iter.MoveNext())
                {
                    mny = iter.Current;

                    MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                    sum += NormalizeAmount(mny, adjuster);
                    count++;
                }

                return Money.FromMajor(sum / count, currency, adjuster);
            }
        }

        // Optimized version of: monies.Select(_ => _.Normalize(adjuster)).Average().Normalize(mode).
        public static Money? Average(this IEnumerable<Money?> monies, IRoundingAdjuster adjuster)
        {
            Require.NotNull(monies, nameof(monies));
            Require.NotNull(adjuster, nameof(adjuster));

            using (var iter = monies.GetEnumerator())
            {
                while (iter.MoveNext())
                {
                    Money? item = iter.Current;
                    if (!item.HasValue) { continue; }

                    Money mny = item.Value;
                    Currency currency = mny.Currency;
                    decimal sum = NormalizeAmount(mny, adjuster);
                    long count = 1;

                    while (iter.MoveNext())
                    {
                        item = iter.Current;

                        if (item.HasValue)
                        {
                            mny = item.Value;

                            MoneyHelpers.ThrowIfCurrencyMismatch(mny, currency);

                            sum += NormalizeAmount(mny, adjuster);
                            count++;
                        }
                    }

                    return Money.FromMajor(sum / count, currency, adjuster);
                }
            }

            return null;
        }
    }

    // Helpers.
    public static partial class RoundingMachine
    {
        private static decimal RoundImpl(Money money, Func<decimal, decimal> func)
        {
            Debug.Assert(func != null);

            // If the amount is already rounded to 0, do nothing.
            if (money.IsRounded && money.Currency.DecimalPlaces == 0) { return money.Amount; }
            return func(money.Amount);
        }

        private static decimal NormalizeAmount(Money money, MidpointRounding mode)
            => money.IsNormalized
            ? money.Amount
            : Math.Round(money.Amount, money.Currency.DecimalPlaces, mode);

        private static decimal NormalizeAmount(Money money, IRoundingAdjuster adjuster)
            => money.IsNormalized
            ? money.Amount
            : adjuster.Round(money.Amount, money.Currency.DecimalPlaces);
    }
}


text:
local s = require 'say'
local pretty = require 'pl.pretty'

local colors

if package.config:sub(1,1) == '\\' and not os.getenv("ANSICON") then
  -- Disable colors on Windows.
  colors = setmetatable({}, {__index = function() return function(s) return s end end})
else
  colors = require 'term.colors'
end

return function(options)
  local busted = require 'busted'
  local handler = require 'busted.outputHandlers.base'()

  local successDot = colors.green('●')
  local failureDot = colors.red('◼')
  local errorDot   = colors.magenta('✱')
  local pendingDot = colors.yellow('◌')

  local pendingDescription = function(pending)
    local name = pending.name

    local string = colors.yellow(s('output.pending')) .. ' → ' ..
      colors.cyan(pending.trace.short_src) .. ' @ ' ..
      colors.cyan(pending.trace.currentline)  ..
      '\n' .. colors.bright(name)

    if type(pending.message) == 'string' then
      string = string .. '\n' .. pending.message
    elseif pending.message ~= nil then
      string = string .. '\n' .. pretty.write(pending.message)
    end

    return string
  end

  local failureMessage = function(failure)
    local string = failure.randomseed and ('Random seed: ' .. failure.randomseed .. '\n') or ''
    if type(failure.message) == 'string' then
      string = string .. failure.message
    elseif failure.message == nil then
      string = string .. 'Nil error'
    else
      string = string .. pretty.write(failure.message)
    end

    return string
  end

  local failureDescription = function(failure, isError)
    local string = colors.red(s('output.failure')) .. ' → '
    if isError then
      string = colors.magenta(s('output.error')) .. ' → '
    end

    if not failure.element.trace or not failure.element.trace.short_src then
      string = string ..
        colors.cyan(failureMessage(failure)) .. '\n' ..
        colors.bright(failure.name)
    else
      string = string ..
        colors.cyan(failure.element.trace.short_src) .. ' @ ' ..
        colors.cyan(failure.element.trace.currentline) .. '\n' ..
        colors.bright(failure.name) .. '\n' ..
        failureMessage(failure)
    end

    if options.verbose and failure.trace and failure.trace.traceback then
      string = string .. '\n' .. failure.trace.traceback
    end

    return string
  end

  local statusString = function()
    local successString = s('output.success_plural')
    local failureString = s('output.failure_plural')
    local pendingString = s('output.pending_plural')
    local errorString = s('output.error_plural')

    local sec = handler.getDuration()
    local successes = handler.successesCount
    local pendings = handler.pendingsCount
    local failures = handler.failuresCount
    local errors = handler.errorsCount

    if successes == 0 then
      successString = s('output.success_zero')
    elseif successes == 1 then
      successString = s('output.success_single')
    end

    if failures == 0 then
      failureString = s('output.failure_zero')
    elseif failures == 1 then
      failureString = s('output.failure_single')
    end

    if pendings == 0 then
      pendingString = s('output.pending_zero')
    elseif pendings == 1 then
      pendingString = s('output.pending_single')
    end

    if errors == 0 then
      errorString = s('output.error_zero')
    elseif errors == 1 then
      errorString = s('output.error_single')
    end

    local formattedTime = ('%.6f'):format(sec):gsub('([0-9])0+$', '%1')

    return colors.green(successes) .. ' ' .. successString .. ' / ' ..
      colors.red(failures) .. ' ' .. failureString .. ' / ' ..
      colors.magenta(errors) .. ' ' .. errorString .. ' / ' ..
      colors.yellow(pendings) .. ' ' .. pendingString .. ' : ' ..
      colors.bright(formattedTime) .. ' ' .. s('output.seconds')
  end

  handler.testEnd = function(element, parent, status, debug)
    if not options.deferPrint then
      local string = successDot

      if status == 'pending' then
        string = pendingDot
      elseif status == 'failure' then
        string = failureDot
      elseif status == 'error' then
        string = errorDot
      end

      io.write(string)
      io.flush()
    end

    return nil, true
  end

  handler.suiteStart = function(suite, count, total)
    local runString = (total > 1 and '\nRepeating all tests (run %u of %u) . . .\n\n' or '')
    io.write(runString:format(count, total))
    io.flush()

    return nil, true
  end

  handler.suiteEnd = function(suite, count, total)
    print('')
    print(statusString())

    for i, pending in pairs(handler.pendings) do
      print('')
      print(pendingDescription(pending))
    end

    for i, err in pairs(handler.failures) do
      print('')
      print(failureDescription(err))
    end

    for i, err in pairs(handler.errors) do
      print('')
      print(failureDescription(err, true))
    end

    return nil, true
  end

  handler.error = function(element, parent, message, debug)
    io.write(errorDot)
    io.flush()

    return nil, true
  end

  busted.subscribe({ 'test', 'end' }, handler.testEnd, { predicate = handler.cancelOnPending })
  busted.subscribe({ 'suite', 'start' }, handler.suiteStart)
  busted.subscribe({ 'suite', 'end' }, handler.suiteEnd)
  busted.subscribe({ 'error', 'file' }, handler.error)
  busted.subscribe({ 'failure', 'file' }, handler.error)
  busted.subscribe({ 'error', 'describe' }, handler.error)
  busted.subscribe({ 'failure', 'describe' }, handler.error)

  return handler
end


text:
// @flow

import { makeStyles } from '@material-ui/core';
import React, { useCallback, useEffect, useState } from 'react';

import { Icon, IconCloseSolid } from '../../../base/icons';

type Props = {

    /**
     * String for html autocomplete attribute.
    */
    autoComplete?: string,

    /**
     * If the input should be focused on display.
     */
    autoFocus?: boolean,

    /**
     * Class name to be appended to the default class list.
     */
    className?: string,

    /**
     * Input id.
     */
    id?: string,

    /**
     * Callback for the onChange event of the field.
     */
    onChange: Function,

    /**
     * Callback to be used when the user hits Enter in the field.
     */
    onSubmit?: Function,

    /**
     * Placeholder text for the field.
     */
    placeholder: string,

    /**
     * The field type (e.g. Text, password...etc).
     */
    type?: string,

    /**
     * TestId of the button. Can be used to locate element when testing UI.
     */
    testId?: string,

    /**
     * Externally provided value.
     */
    value?: string
};

const useStyles = makeStyles(theme => {
    return {
        clearableInput: {
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'flex-start',
            height: '20px',
            border: `1px solid ${theme.palette.border02}`,
            backgroundColor: theme.palette.uiBackground,
            position: 'relative',
            borderRadius: '6px',
            padding: '10px 16px',

            '&.focused': {
                outline: `3px solid ${theme.palette.field01Focus}`
            }
        },
        clearButton: {
            backgroundColor: 'transparent',
            border: 0,
            position: 'absolute',
            right: '10px',
            top: '11px',
            padding: 0,

            '& svg': {
                fill: theme.palette.icon02
            }
        },
        input: {
            backgroundColor: 'transparent',
            border: 0,
            width: '100%',
            height: '100%',
            borderRadius: '6px',
            fontSize: '14px',
            lineHeight: '20px',
            textAlign: 'center',
            caretColor: theme.palette.text01,
            color: theme.palette.text01,

            '&::placeholder': {
                color: theme.palette.text03
            }
        }
    };
});

/**
 * Implements a pre-styled clearable input field.
 *
 * @param {Props} props - The props of the component.
 * @returns {ReactElement}
 */
function ClearableInput({
    autoFocus = false,
    autoComplete,
    className = '',
    id,
    onChange,
    onSubmit,
    placeholder,
    testId,
    type = 'text',
    value
}: Props) {
    const classes = useStyles();
    const [ val, setVal ] = useState(value || '');
    const [ focused, setFocused ] = useState(false);
    const inputRef = React.createRef();

    useEffect(() => {
        if (value && value !== val) {
            setVal(value);
        }
    }, [ value ]);

    /**
     * Callback for the onBlur event of the field.
     *
     * @returns {void}
     */
    const _onBlur = useCallback(() => {
        setFocused(false);
    });

    /**
     * Callback for the onChange event of the field.
     *
     * @param {Object} evt - The static event.
     * @returns {void}
     */
    const _onChange = useCallback(evt => {
        const newValue = evt.target.value;

        setVal(newValue);
        onChange && onChange(newValue);
    }, [ onChange ]);

    /**
     * Callback for the onFocus event of the field.
     *
     * @returns {void}
     */
    const _onFocus = useCallback(() => {
        setFocused(true);
    });

    /**
     * Joins the conference on 'Enter'.
     *
     * @param {Event} event - Key down event object.
     * @returns {void}
     */
    const _onKeyDown = useCallback(event => {
        onSubmit && event.key === 'Enter' && onSubmit();
    }, [ onSubmit ]);

    /**
     * Clears the input.
     *
     * @returns {void}
     */
    const _clearInput = useCallback(() => {
        if (inputRef.current) {
            inputRef.current.focus();
        }
        setVal('');
        onChange && onChange('');
    }, [ onChange ]);

    return (
        <div className = { `${classes.clearableInput} ${focused ? 'focused' : ''} ${className || ''}` }>
            <input
                autoComplete = { autoComplete }
                autoFocus = { autoFocus }
                className = { classes.input }
                data-testid = { testId ? testId : undefined }
                id = { id }
                onBlur = { _onBlur }
                onChange = { _onChange }
                onFocus = { _onFocus }
                onKeyDown = { _onKeyDown }
                placeholder = { placeholder }
                ref = { inputRef }
                type = { type }
                value = { val } />
            {val !== '' && (
                <button
                    className = { classes.clearButton }
                    onClick = { _clearInput }>
                    <Icon
                        size = { 20 }
                        src = { IconCloseSolid } />
                </button>
            )}
        </div>
    );
}

export default ClearableInput;


text:
<?php

/**
 * Script d'installation modifié pour configurer l'intranet
 *
 *
 * @author Fabrice Maillefer
 */

if (!isset($_SERVER['HTTP_HOST'])) {
	exit('This script cannot be run from the CLI. Run it from a browser.');
}

if (!in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1',))) {
	header('HTTP/1.0 403 Forbidden');
	exit('This script is only accessible from localhost.');
}

require_once dirname(__FILE__) . '/../app/SymfonyRequirements.php';

$symfonyRequirements = new SymfonyRequirements();

$majorProblems = $symfonyRequirements->getFailedRequirements();
$minorProblems = $symfonyRequirements->getFailedRecommendations();

?>
<!DOCTYPE html>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="robots" content="noindex,nofollow" />
        <title>Intranet PME - Configuration</title>
        <link rel="stylesheet" href="bundles/framework/css/structure.css" media="all" />
        <link rel="stylesheet" href="bundles/framework/css/body.css" media="all" />
        <link rel="stylesheet" href="bundles/sensiodistribution/webconfigurator/css/install.css" media="all" />

Intranet Gestion

Bienvenue !

Bienvenue dans l'installation de l'intranet de gestion de comptabilité pour une PME.

 							Ce script va permettre d'installer et de configurer le projet.

 							Avant de continuer, veuillez vérifier votre configuration de votre serveur WEB selon les recommendations ci-après :

                        <?php if (count($majorProblems)): ?>

Major problems

Problèmes majeur qui doivent être corrigé avant de continuer:

                                <?php foreach ($majorProblems as $problem): ?>

<?php echo $problem->getHelpHtml() ?>

                                <?php endforeach; ?>

                        <?php endif; ?>

                        <?php if (count($minorProblems)): ?>

Recommendations

                                <?php if (count($majorProblems)): ?>En plus, pour<?php else: ?>Pour<?php endif; ?> améliorer les performances de l'application,
                                il est recommendé de corriger les problèmes ci-dessous:

                                <?php foreach ($minorProblems as $problem): ?>

<?php echo $problem->getHelpHtml() ?>

                                <?php endforeach; ?>

                        <?php endif; ?>

                        <?php if ($symfonyRequirements->hasPhpIniConfigIssue()): ?>

*
                                <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?>
                                    Les changements du fichier php.ini devront être fait dans "<?php echo $symfonyRequirements->getPhpIniConfigPath() ?>".
                                <?php else: ?>
                                    Pour changer les paramêtres, créez un fichier "php.ini".
                                <?php endif; ?>

                        <?php endif; ?>

                        <?php if (!count($majorProblems) && !count($minorProblems)): ?>

Votre configuration semble correct pour executer l'application.

                        <?php endif; ?>

                            <?php if (!count($majorProblems)): ?>

Configurer l'application en ligne

                            <?php endif; ?>
                            <?php if (count($majorProblems) || count($minorProblems)): ?>

Re-contrôler la configuration

                            <?php endif; ?>

Symfony Maillefer Edition


text:
package com.vmware.vim25;

/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/

public class ArrayOfVirtualMachineFileLayoutExFileInfo {
  public VirtualMachineFileLayoutExFileInfo[] VirtualMachineFileLayoutExFileInfo;

  public VirtualMachineFileLayoutExFileInfo[] getVirtualMachineFileLayoutExFileInfo() {
    return this.VirtualMachineFileLayoutExFileInfo;
  }

  public VirtualMachineFileLayoutExFileInfo getVirtualMachineFileLayoutExFileInfo(int i) {
    return this.VirtualMachineFileLayoutExFileInfo[i];
  }

  public void setVirtualMachineFileLayoutExFileInfo(VirtualMachineFileLayoutExFileInfo[] VirtualMachineFileLayoutExFileInfo) {
    this.VirtualMachineFileLayoutExFileInfo=VirtualMachineFileLayoutExFileInfo;
  }
}


text:
<?php

namespace Ivory\Tests\GoogleMap\Templating\Helper\Overlays;

use Ivory\GoogleMap\Overlays\MarkerImage,
    Ivory\GoogleMap\Templating\Helper\Overlays\MarkerImageHelper;

/**
 * Marker image helper test.
 *
 * @author GeLo <geloen.eric@gmail.com>
 */
class MarkerImageHelperTest extends \PHPUnit_Framework_TestCase
{
    /** @var \Ivory\GoogleMap\Templating\Helper\Overlays\MarkerImageHelper */
    protected $markerImageHelper;

    /**
     * {@inheritdoc}
     */
    protected function setUp()
    {
        $this->markerImageHelper = new MarkerImageHelper();
    }

    /**
     * {@inheritdoc}
     */
    protected function tearDown()
    {
        unset($this->markerImageHelper);
    }

    public function testDefaultState()
    {
        $this->assertInstanceOf(
            'Ivory\GoogleMap\Templating\Helper\Base\PointHelper',
            $this->markerImageHelper->getPointHelper()
        );

        $this->assertInstanceOf(
            'Ivory\GoogleMap\Templating\Helper\Base\SizeHelper',
            $this->markerImageHelper->getSizeHelper()
        );
    }

    public function testInitialState()
    {
        $pointHelper = $this->getMock('Ivory\GoogleMap\Templating\Helper\Base\PointHelper');
        $sizeHelper = $this->getMock('Ivory\GoogleMap\Templating\Helper\Base\SizeHelper');

        $this->markerImageHelper = new MarkerImageHelper($pointHelper, $sizeHelper);

        $this->assertSame($pointHelper, $this->markerImageHelper->getPointHelper());
        $this->assertSame($sizeHelper, $this->markerImageHelper->getSizeHelper());
    }

    public function testRender()
    {
        $markerImage = new MarkerImage();
        $markerImage->setJavascriptVariable('markerImage');
        $markerImage->setUrl('url');
        $markerImage->setSize(1, 2);
        $markerImage->setOrigin(3, 4);
        $markerImage->setAnchor(5, 6);
        $markerImage->setScaledSize(7, 8);

        $expected = <<<EOF
var markerImage = new google.maps.MarkerImage("url");
markerImage.size = new google.maps.Size(1, 2);
markerImage.origin = new google.maps.Point(3, 4);
markerImage.anchor = new google.maps.Point(5, 6);
markerImage.scaledSize = new google.maps.Size(7, 8);

EOF;

        $this->assertSame($expected, $this->markerImageHelper->render($markerImage));
    }
}


text:
layout: page
mainimage : images/map.jpg
menuactive : newf
---

Cristo Salvador / Commission / Newfrontiers

Somos parte de una gran familia de iglesias que se llama Newfrontiers. Nos encanta ser parte de un movimiento de iglesias alrededor del mundo. Estamos comprometidos el uno con el otro, unidos con el propósito común de fundar nuevas iglesias, dar formación a nuevos líderes, ir a las naciones y servir a los necesitados.

Newfrontiers está formada por distintas esferas. La esfera a la que pertenecemos nosotros se llama Commission.
                  Guy Miller es un pastor y líder apostólico de Inglaterra que, junto con un equipo de líderes de  diferentes países como La India, Inglaterra, España y Portugal, dirige Commission para que juntos cumplamos nuestra parte de la misión común.

Creemos que cada iglesia tiene un rol que cumplir en la gran comisión que Cristo nos ha dado (Mateo 28:19-20). Esto significa para nosotros cumplir con nuestra visión: Ver una familia de iglesias que transforme vidas e impacte naciones. Este es nuestro
                anhelo y deseo como iglesia para ver el Reino de Dios en el mundo y dónde todos nuestros esfuerzos se enfocan. ¿Te gustaría unirte a nosotros?


text:
{% extends "lbworkflow/wf_base_detail.html" %}

{% block right_side_header_ext_btns %}
    Print
    |
{% endblock %}

{% block right_side_tab_base_ctx %}
  {% include "simplewf/inc_detail_info.html" %}
{% endblock %}


text:
import * as events from "events";
import * as net from "net";

export class Listener extends events.EventEmitter {
	private readonly _server: net.Server;

	public readonly localAddress: string;
	public readonly localPort: number;

	public readonly hostAddress: string;
	public readonly hostPort: number;

	public constructor(localAddress: string, localPort: number, hostAddress: string, hostPort: number) {
		super();

		this.localAddress = localAddress;
		this.localPort = localPort;
		this.hostAddress = hostAddress;
		this.hostPort = hostPort;

		this._server = net.createServer();
		this._server.on("listening", () => this.emit("listening"));
		this._server.on("connection", (client) => {
			const server = net.createConnection(this.hostPort, this.hostAddress);

			client.setNoDelay();
			server.setNoDelay();

			this.emit("proxy", client, server);
		});
	}

	public listen() {
		return new Promise((resolve) => {
			this._server.listen(this.localPort, this.localAddress, resolve);
		});
	}
}


text:
import uuid

import composite_gadget
import echo_gadget
import hid_echo_gadget
import hid_gadget
import usb_constants
import usb_descriptors

class CompositeEchoGadget(composite_gadget.CompositeGadget):

  def __init__(self):
    device_desc = usb_descriptors.DeviceDescriptor(
        idVendor=usb_constants.VendorID.GOOGLE,
        idProduct=usb_constants.ProductID.GOOGLE_COMPOSITE_ECHO_GADGET,
        bcdUSB=0x0200,
        iManufacturer=1,
        iProduct=2,
        iSerialNumber=3,
        bcdDevice=0x0100)

    echo_feature = echo_gadget.EchoCompositeFeature(
        endpoints=[(0, 5, 0x81, 0x01), (1, 6, 0x82, 0x02), (2, 7, 0x83, 0x03)])

    hid_echo_feature = hid_echo_gadget.EchoFeature()
    hid_feature = hid_gadget.HidCompositeFeature(
        report_desc=hid_echo_gadget.EchoFeature.REPORT_DESC,
        features={0: hid_echo_feature},
        interface_number=3,
        interface_string=4,
        in_endpoint=0x84, out_endpoint=0x04)

    super(CompositeEchoGadget, self).__init__(
        device_desc, [echo_feature, hid_feature])
    self.AddStringDescriptor(1, 'Google Inc.')
    self.AddStringDescriptor(2, 'Echo Gadget')
    self.AddStringDescriptor(3, '{:06X}'.format(uuid.getnode()))
    self.AddStringDescriptor(4, 'HID Echo')
    self.AddStringDescriptor(5, 'Interrupt Echo')
    self.AddStringDescriptor(6, 'Bulk Echo')
    self.AddStringDescriptor(7, 'Isochronous Echo')

def RegisterHandlers():
  """Registers web request handlers with the application server."""

  import server
  from tornado import web

  class WebConfigureHandler(web.RequestHandler):

    def post(self):
      server.SwitchGadget(CompositeEchoGadget())

  server.app.add_handlers('.*$', [
      (r'/composite_echo/configure', WebConfigureHandler),
  ])


text:
<?xml version="1.0" encoding="utf-8"?>
                                     <!--我的账号设置页面的关于我们的加入/建议页面-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#DCDCDC">
    <android.support.v7.widget.Toolbar
        android:id="@+id/travelToolBar"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:orientation="horizontal"
        android:background="#7ae3f9">
        <TextView
            android:layout_width="40dp"
            android:layout_height="wrap_content"
            android:drawableLeft="@drawable/toolbarback"
            android:background="#7ae3f9"
            android:layout_gravity="left"
            android:id="@+id/myAccountSettingAboutUsJoinUsBack"/>
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:text="关于我们"
            android:textColor="#000"
            android:textSize="20sp" />
    </android.support.v7.widget.Toolbar>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="12.3"
        android:layout_marginTop="1dp"
        android:orientation="vertical">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="5"
                android:background="#FFFF"
                android:gravity="center|start"
                android:text="建议"
                android:textColor="#000000"
                android:textSize="20sp"/>
            <EditText
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="1dp"
                android:background="#FFFF"
                android:layout_weight="1"
                android:hint="写出你的建议吧..."
                android:id="@+id/myAccountSettingAboutUsJoinUsAdvice"/>
        </LinearLayout>
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_marginTop="1dp"
                android:background="#FFFF"></LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_marginTop="1dp"
                android:orientation="vertical">
                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:background="#FFFF"
                    android:gravity="center|start"
                    android:text="加入"
                    android:textColor="#000000"
                    android:textSize="20sp" />
                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:layout_marginTop="1dp"
                    android:background="#FFFF"
                    android:gravity="center|start"
                    android:text="联系电话:"
                    android:textSize="20sp"
                    android:textColor="#000000" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_marginTop="1dp"
                android:background="#FFFF"
                android:orientation="vertical">
                <Button
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="right"
                    android:background="#FFFF"
                    android:layout_marginTop="40dp"
                    android:layout_marginRight="10sp"
                    android:text="OK"
                    android:textSize="25sp"
                    android:id="@+id/myAccountSettingAboutUsJoinUsSummit"/>
            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>sign up</title>

<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link href='http://127.0.0.1/picpic/static/css/board.css' type='text/css' rel='stylesheet' />

    Welcome  <?php echo $_COOKIE['user'].', this is your '.'board: '.$boardinfo[0]['boardname'] ?>

    <form method="post" accept-charset="utf-8" action=<?php echo 'http://127.0.0.1/picpic/pin/search';?>>

      <input type="text" name="keyword" class="form-control" placeholder="Search for pin by keyword">

        <input type="submit" class="form-control" name="create" value="Go Picpic!">

    </form>

Home

 Profile

Myboard

Myfollow

<a href=<?php echo "http://127.0.0.1/picpic/pin/createbyweb/".$boardinfo[0]['boardid']?> >Create a Pin by web

<a href=<?php echo "http://127.0.0.1/picpic/pin/createbyupload/".$boardinfo[0]['boardid']?>> Create a Pin by upload

 <?php foreach ($pininfo as $pinitem):?>

      <a href=<?php echo "http://127.0.0.1/picpic/pin/show/".$boardinfo[0]['boardid']."/".$pinitem['pinid']?> >
      <button ><img src=<?php echo $pinitem['picture_url']?> alt="h">

            tag:

            <?php foreach ($taginfo[$pinitem['pinid']] as $tagitem):?>

                 <?php echo $tagitem['tagname']?>

            <?php endforeach;?>
      </button>

 <?php endforeach;?>


text:
package live

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
	"github.com/aliyun/alibaba-cloud-sdk-go/sdk/responses"
)

// AddLiveStreamTranscode invokes the live.AddLiveStreamTranscode API synchronously
func (client *Client) AddLiveStreamTranscode(request *AddLiveStreamTranscodeRequest) (response *AddLiveStreamTranscodeResponse, err error) {
	response = CreateAddLiveStreamTranscodeResponse()
	err = client.DoAction(request, response)
	return
}

// AddLiveStreamTranscodeWithChan invokes the live.AddLiveStreamTranscode API asynchronously
func (client *Client) AddLiveStreamTranscodeWithChan(request *AddLiveStreamTranscodeRequest) (<-chan *AddLiveStreamTranscodeResponse, <-chan error) {
	responseChan := make(chan *AddLiveStreamTranscodeResponse, 1)
	errChan := make(chan error, 1)
	err := client.AddAsyncTask(func() {
		defer close(responseChan)
		defer close(errChan)
		response, err := client.AddLiveStreamTranscode(request)
		if err != nil {
			errChan <- err
		} else {
			responseChan <- response
		}
	})
	if err != nil {
		errChan <- err
		close(responseChan)
		close(errChan)
	}
	return responseChan, errChan
}

// AddLiveStreamTranscodeWithCallback invokes the live.AddLiveStreamTranscode API asynchronously
func (client *Client) AddLiveStreamTranscodeWithCallback(request *AddLiveStreamTranscodeRequest, callback func(response *AddLiveStreamTranscodeResponse, err error)) <-chan int {
	result := make(chan int, 1)
	err := client.AddAsyncTask(func() {
		var response *AddLiveStreamTranscodeResponse
		var err error
		defer close(result)
		response, err = client.AddLiveStreamTranscode(request)
		callback(response, err)
		result <- 1
	})
	if err != nil {
		defer close(result)
		callback(nil, err)
		result <- 0
	}
	return result
}

// AddLiveStreamTranscodeRequest is the request struct for api AddLiveStreamTranscode
type AddLiveStreamTranscodeRequest struct {
	*requests.RpcRequest
	Template          string           `position:"Query" name:"Template"`
	Lazy              string           `position:"Query" name:"Lazy"`
	Mix               string           `position:"Query" name:"Mix"`
	App               string           `position:"Query" name:"App"`
	EncryptParameters string           `position:"Query" name:"EncryptParameters"`
	Watermark         string           `position:"Query" name:"Watermark"`
	OwnerId           requests.Integer `position:"Query" name:"OwnerId"`
	Domain            string           `position:"Query" name:"Domain"`
	WaterPattern      string           `position:"Query" name:"WaterPattern"`
	OnlyAudio         string           `position:"Query" name:"OnlyAudio"`
}

// AddLiveStreamTranscodeResponse is the response struct for api AddLiveStreamTranscode
type AddLiveStreamTranscodeResponse struct {
	*responses.BaseResponse
	RequestId string `json:"RequestId" xml:"RequestId"`
}

// CreateAddLiveStreamTranscodeRequest creates a request to invoke AddLiveStreamTranscode API
func CreateAddLiveStreamTranscodeRequest() (request *AddLiveStreamTranscodeRequest) {
	request = &AddLiveStreamTranscodeRequest{
		RpcRequest: &requests.RpcRequest{},
	}
	request.InitWithApiInfo("live", "2016-11-01", "AddLiveStreamTranscode", "live", "openAPI")
	request.Method = requests.POST
	return
}

// CreateAddLiveStreamTranscodeResponse creates a response to parse from AddLiveStreamTranscode response
func CreateAddLiveStreamTranscodeResponse() (response *AddLiveStreamTranscodeResponse) {
	response = &AddLiveStreamTranscodeResponse{
		BaseResponse: &responses.BaseResponse{},
	}
	return
}


text:
<?xml version='1.0' encoding='UTF-8'?>
<quota_set>
  <cores>20</cores>
  <fixed_ips>10</fixed_ips>
  <floating_ips>10</floating_ips>
  <injected_file_content_bytes>10240</injected_file_content_bytes>
  <injected_file_path_bytes>255</injected_file_path_bytes>
  <injected_files>5</injected_files>
  <instances>10</instances>
  <key_pairs>100</key_pairs>
  <metadata_items>128</metadata_items>
  <ram>51200</ram>
  <security_group_rules>20</security_group_rules>
  <security_groups>45</security_groups>
</quota_set>