text:
title:  Injil Dari Patmos
date:   29/12/2018
---

### Untuk Pelajaran Pekan Ini Baca
Why. 1:1-8; Yoh. 14:1-3; Ul. 29:29; Yoh, 14:29; Rm. 1:7; Flp. 3:20; Dan. 7:13, 14

>
Ayat Hafalan

> "Berbahagialah ia yang membacakan dan mereka yang mendengar perkataan nubuat ini, dan melakukan apa yang tertulis di dalamnya; sebab waktunya sudah dekat" (Wahyu 1:3, NKJV).

Nubuat-nubuat Kitab Wahyu dinyatakan dalam penglihatan kepada Rasul Yohanes lebih daripada sembilan belas abad yang lalu pada saat pengasingannya di satu pulau kecil berbatu-batu di Laut Tengah dikenal sebagai Patmos (Why. 1:9). Wahyu 1:3 menunjukkan bahwa kitab itu harus dibaca dengan nyaring di jemaat-jemaat. Ayat ini menjanjikan berkat untuk yang membacanya dengan nyaring, dan juga bagi mereka yang mendengar. Para pendengar adalah umat yang berkumpul di jemaat untuk mendengar pekabarannya. Namun, mereka diberkati bukan karena sekadar membaca atau mendengar tetapi karena menuruti perkataan dalam kitab itu (lihat Why. 22:7).

Nubuat-nubuat Kitab Wahyu adalah satu ekspresi kepedulian Allah atas umat-Nya. Semua itu menunjukkan kepada kita tentang singkat dan rapuhnya kehidupan ini, kepada keselamatan di dalam Yesus, dan untuk panggilan kepada kita untuk menyebarluaskan Injil.

Nubuat Alkitabiah adalah seperti pelita yang bersinar di tempat yang gelap (2 Ptr. 1:19). Semua itu dimaksudkan sebagai penuntun kehidupan masa kini dan harapan untuk masa depan kita. Kita akan memerlukan tuntunan nubuat ini hingga kedatangan Kristus dan penetapan kerajaan Allah yang kekal.

_*Pelajari pelajaran pekan ini untuk persiapan Sabat, 5 Januari._


text:
'use strict';

const assertDeepStrictEqual = require('assert').deepStrictEqual;
const tests = require('../spec/tests');
const Benchmark = require('benchmark');
const suite = new Benchmark.Suite;

const equalPackages = {
  'fast-deep-equal': require('..'),
  'fast-deep-equal/es6': require('../es6'),
  'fast-equals': require('fast-equals').deepEqual,
  'nano-equal': true,
  'shallow-equal-fuzzy': true,
  'underscore.isEqual': require('underscore').isEqual,
  'lodash.isEqual': require('lodash').isEqual,
  'deep-equal': true,
  'deep-eql': true,
  'ramda.equals': require('ramda').equals,
  'util.isDeepStrictEqual': require('util').isDeepStrictEqual,
  'assert.deepStrictEqual': (a, b) => {
    try { assertDeepStrictEqual(a, b); return true; }
    catch(e) { return false; }
  }
};

for (const equalName in equalPackages) {
  let equalFunc = equalPackages[equalName];
  if (equalFunc === true) equalFunc = require(equalName);

  for (const testSuite of tests) {
    for (const test of testSuite.tests) {
      try {
        if (equalFunc(test.value1, test.value2) !== test.equal)
          console.error('different result', equalName, testSuite.description, test.description);
      } catch(e) {
        console.error(equalName, testSuite.description, test.description, e);
      }
    }
  }

  suite.add(equalName, function() {
    for (const testSuite of tests) {
      for (const test of testSuite.tests) {
        if (test.description != 'pseudo array and equivalent array are not equal')
          equalFunc(test.value1, test.value2);
      }
    }
  });
}

console.log();

suite
  .on('cycle', (event) => console.log(String(event.target)))
  .on('complete', function () {
    console.log('The fastest is ' + this.filter('fastest').map('name'));
  })
  .run({async: true});

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<title>Projects</title>
  <link href="stylesheets/default.css" rel="stylesheet" type="text/css">
  <link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Oswald:300,600' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Shadows Into Light:400,600' rel='stylesheet' type='text/css'>
  <link rel="shortcut icon" href="imgs/logo.jpg"/>

         about me  |
         main page   |
         DevBootcamp blog  |
        contact info

 KarlaKing

   GitHub
   Twitter
   LinkedIn


text:
#include "treecore/DirectoryIterator.h"
#include "treecore/StringRef.h"

namespace treecore {

DirectoryIterator::DirectoryIterator (const File& directory, bool recursive,
                                      const String& pattern, const int type)
  : wildCards (parseWildcards (pattern)),
    fileFinder (directory, (recursive || wildCards.size() > 1) ? "*" : pattern),
    wildCard (pattern),
    path (File::addTrailingSeparator (directory.getFullPathName())),
    index (-1),
    totalNumFiles (-1),
    whatToLookFor (type),
    isRecursive (recursive),
    hasBeenAdvanced (false)
{
    // you have to specify the type of files you're looking for!
    treecore_assert ((type & (File::findFiles | File::findDirectories)) != 0);
    treecore_assert (type > 0 && type <= 7);
}

DirectoryIterator::~DirectoryIterator()
{
}

StringArray DirectoryIterator::parseWildcards (const String& pattern)
{
    StringArray s;
    s.addTokens (pattern, ";,", "\"'");
    s.trim();
    s.removeEmptyStrings();
    return s;
}

bool DirectoryIterator::fileMatches (const StringArray& wildCards, const String& filename)
{
    for (int i = 0; i < wildCards.size(); ++i)
        if (filename.matchesWildcard (wildCards[i], ! File::areFileNamesCaseSensitive()))
            return true;

    return false;
}

bool DirectoryIterator::next()
{
    return next (nullptr, nullptr, nullptr, nullptr, nullptr, nullptr);
}

bool DirectoryIterator::next (bool* const isDirResult, bool* const isHiddenResult, int64* const fileSize,
                              Time* const modTime, Time* const creationTime, bool* const isReadOnly)
{
    hasBeenAdvanced = true;

    if (subIterator != nullptr)
    {
        if (subIterator->next (isDirResult, isHiddenResult, fileSize, modTime, creationTime, isReadOnly))
            return true;

        subIterator = nullptr;
    }

    String filename;
    bool isDirectory, isHidden = false;

    while (fileFinder.next (filename, &isDirectory,
                            (isHiddenResult != nullptr || (whatToLookFor & File::ignoreHiddenFiles) != 0) ? &isHidden : nullptr,
                            fileSize, modTime, creationTime, isReadOnly))
    {
        ++index;

        if (! filename.containsOnly ("."))
        {
            bool matches = false;

            if (isDirectory)
            {
                if (isRecursive && ((whatToLookFor & File::ignoreHiddenFiles) == 0 || ! isHidden))
                    subIterator = new DirectoryIterator (File::createFileWithoutCheckingPath (path + filename),
                                                         true, wildCard, whatToLookFor);

                matches = (whatToLookFor & File::findDirectories) != 0;
            }
            else
            {
                matches = (whatToLookFor & File::findFiles) != 0;
            }

            // if we're not relying on the OS iterator to do the wildcard match, do it now..
            if (matches && (isRecursive || wildCards.size() > 1))
                matches = fileMatches (wildCards, filename);

            if (matches && (whatToLookFor & File::ignoreHiddenFiles) != 0)
                matches = ! isHidden;

            if (matches)
            {
                currentFile = File::createFileWithoutCheckingPath (path + filename);
                if (isHiddenResult != nullptr)     *isHiddenResult = isHidden;
                if (isDirResult != nullptr)        *isDirResult = isDirectory;

                return true;
            }

            if (subIterator != nullptr)
                return next (isDirResult, isHiddenResult, fileSize, modTime, creationTime, isReadOnly);
        }
    }

    return false;
}

const File& DirectoryIterator::getFile() const
{
    if (subIterator != nullptr && subIterator->hasBeenAdvanced)
        return subIterator->getFile();

    // You need to call DirectoryIterator::next() before asking it for the file that it found!
    treecore_assert (hasBeenAdvanced);

    return currentFile;
}

float DirectoryIterator::getEstimatedProgress() const
{
    if (totalNumFiles < 0)
        totalNumFiles = File (path).getNumberOfChildFiles (File::findFilesAndDirectories);

    if (totalNumFiles <= 0)
        return 0.0f;

    const float detailedIndex = (subIterator != nullptr) ? index + subIterator->getEstimatedProgress()
                                                         : (float) index;

    return detailedIndex / totalNumFiles;
}

}


text:
<?php
class WebSocket {

	private $_protocol;
	private $_domain;
	private $_path;
	private $_port;

	public function __construct() {

	}

	private function post($cmd,$json = '') {
		$ch = curl_init();
		$url = 'http://127.0.0.1:3001/'.$cmd;
		curl_setopt($ch,CURLOPT_URL,$url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
		curl_setopt($ch, CURLOPT_HEADER, 1);
		curl_setopt($ch, CURLOPT_POST, 1);
		curl_setopt($ch, CURLOPT_HTTPHEADER, array(
			'Content-Type: application/json',
			'Content-Length: ' . strlen($json))
		);
		if(curl_exec($ch) === false) {
			//echo 'Curl error: ' . curl_error($ch);
		} else {
			//echo 'Operation completed without any errors';
		}
		curl_close($ch);
	}

	public function updateTicker($array) {
		$this->post('updateTicker',json_encode($array));
	}

	public function updateBlock($json) {
		$this->post('updateBlock',$json);
	}

	public function updatePoolBlocks() {
		$this->post('updatePoolBlocks');
	}

}


text:
from bing_search_api import BingSearchAPI
my_key = "MEL5FOrb1H5G1E78YY8N5mkfcvUK2hNBYsZl1aAEEbE"

def query(query_string):
    bing = BingSearchAPI(my_key)
    params = {'ImageFilters':'"Face:Face"',
              '$format': 'json',
              '$top': 10,
              '$skip': 0}
    results = bing.search('web',query_string,params).json() # requests 1.0+

    return [result['Url'] for result in results['d']['results'][0]['Web']]

if __name__ == "__main__":
    query_string = "Your Query"
    print query(query_string)


text:
namespace FKCommands {
    const QString quit=QStringLiteral("quit");
    const QString help=QStringLiteral("help");
    const QString startRealm=QStringLiteral("start realm");
    const QString stopRealm=QStringLiteral("stop realm");
    const QString startClient=QStringLiteral("start client");
    const QString stopClient=QStringLiteral("stop client");
    const QString startServer=QStringLiteral("start server");
    const QString stopServer=QStringLiteral("stop server");
    const QString createUser=QStringLiteral("create user");
    const QString deleteUser=QStringLiteral("delete user");
    const QString showUsers=QStringLiteral("show users");
    const QString showRoomTypes=QStringLiteral("show room types");
    const QString showServers=QStringLiteral("show servers");
    const QString showClients=QStringLiteral("show clients");
    const QString loginClient=QStringLiteral("login client");
    const QString loginServer=QStringLiteral("login server");
    const QString createClient=QStringLiteral("create client");
    const QString deleteClient=QStringLiteral("delete client");
    const QString createServer=QStringLiteral("create server");
    const QString deleteServer=QStringLiteral("delete server");
    const QString joinRoom=QStringLiteral("join room");
    const QString createRoom=QStringLiteral("create room");
    const QString registerRoomType=QStringLiteral("add room type");
    const QString removeRoomType=QStringLiteral("remove room type");
}

namespace FKCommandOptions {
    const QString realm=QStringLiteral("-r");
    const QString custom=QStringLiteral("-c");
    const QString server=QStringLiteral("-s");
    const QString online=QStringLiteral("-on");
    const QString avaliable=QStringLiteral("-a");
}

#endif // FKCOMMANDS_H


text:
using UnityEngine;
using System.Collections;

public class Apple : MonoBehaviour {

    public static float bottomY = -20f;

    void Update()
    {
        if (transform.position.y < bottomY)
        {
            Destroy(this.gameObject);
            // Get a reference to the ApplePicker component of Main Camera
            ApplePicker apScript = Camera.main.GetComponent<ApplePicker>();
            // Call the public AppleDestroyed() method of apScript
            apScript.AppleDestroyed();
        }
    }
}


text:
using System;
using Mono.Cecil;
using Mono.Collections.Generic;

#pragma warning disable SA1402 // File may only contain a single class

namespace ExtensibleILRewriter
{
    public abstract class ProcessableComponent<UnderlyingComponentType, DeclaringComponentType> : IProcessableComponent
        where DeclaringComponentType : IProcessableComponent
    {
        protected ProcessableComponent(
            ProcessableComponentType type,
            UnderlyingComponentType underlyingComponent,
            string name,
            string fullName,
            Collection<CustomAttribute> customAttributes,
            DeclaringComponentType declaringComponent,
            ModuleDefinition declaringModule)
        {
            Type = type;
            UnderlyingComponent = underlyingComponent;
            Name = name;
            FullName = fullName;
            CustomAttributes = customAttributes;
            DeclaringComponent = declaringComponent;
            DeclaringModule = declaringModule;
        }

        public ProcessableComponentType Type { get; }

        public string Name { get; }

        public string FullName { get; }

        public Collection<CustomAttribute> CustomAttributes { get; }

        IProcessableComponent IProcessableComponent.DeclaringComponent { get { return DeclaringComponent; } }

        public DeclaringComponentType DeclaringComponent { get; }

        public ModuleDefinition DeclaringModule { get; }

        public UnderlyingComponentType UnderlyingComponent { get; }

        object IProcessableComponent.UnderlyingComponent { get { return UnderlyingComponent; } }
    }

    public class AssemblyProcessableComponent : ProcessableComponent<AssemblyDefinition, NoDeclaringComponent>
    {
        public AssemblyProcessableComponent(AssemblyDefinition assembly)
            : base(ProcessableComponentType.Assembly, assembly, assembly.Name.Name, assembly.FullName, assembly.CustomAttributes, new NoDeclaringComponent(), assembly.MainModule)
        { }
    }

    public class ModuleProcessableComponent : ProcessableComponent<ModuleDefinition, AssemblyProcessableComponent>
    {
        public ModuleProcessableComponent(ModuleDefinition module)
            : base(ProcessableComponentType.Module, module, module.Name, module.FullyQualifiedName, module.CustomAttributes, module.Assembly.ToProcessableComponent(), module)
        { }
    }

    public class TypeProcessableComponent : ProcessableComponent<TypeDefinition, ModuleProcessableComponent>
    {
        public TypeProcessableComponent(TypeDefinition type)
            : base(ProcessableComponentType.Type, type, type.Name, type.FullName, type.CustomAttributes, type.Module.ToProcessableComponent(), type.Module)
        { }
    }

    public class FieldProcessableComponent : ProcessableComponent<FieldDefinition, ModuleProcessableComponent>
    {
        public FieldProcessableComponent(FieldDefinition field)
            : base(ProcessableComponentType.Field, field, field.Name, field.FullName, field.CustomAttributes, field.Module.ToProcessableComponent(), field.Module)
        { }
    }

    public class PropertyProcessableComponent : ProcessableComponent<PropertyDefinition, ModuleProcessableComponent>
    {
        public PropertyProcessableComponent(PropertyDefinition property)
            : base(ProcessableComponentType.Property, property, property.Name, property.FullName, property.CustomAttributes, property.Module.ToProcessableComponent(), property.Module)
        { }
    }

    public class MethodProcessableComponent : ProcessableComponent<MethodDefinition, TypeProcessableComponent>
    {
        public MethodProcessableComponent(MethodDefinition method)
            : base(ProcessableComponentType.Method, method, method.Name, method.FullName, method.CustomAttributes, method.DeclaringType.ToProcessableComponent(), method.Module)
        { }
    }

    public class MethodParameterProcessableComponent : ProcessableComponent<ParameterDefinition, MethodProcessableComponent>
    {
        public MethodParameterProcessableComponent(ParameterDefinition parameter, MethodDefinition declaringMethod)
            : base(ProcessableComponentType.MethodParameter, parameter, parameter.Name, parameter.Name, parameter.CustomAttributes, declaringMethod.ToProcessableComponent(), declaringMethod.Module)
        { }
    }

    public class NoDeclaringComponent : IProcessableComponent
    {
        public Collection<CustomAttribute> CustomAttributes { get { throw new NotSupportedException(); } }

        public IProcessableComponent DeclaringComponent { get { throw new NotSupportedException(); } }

        public ModuleDefinition DeclaringModule { get { throw new NotSupportedException(); } }

        public string FullName { get { throw new NotSupportedException(); } }

        public string Name { get { throw new NotSupportedException(); } }

        public ProcessableComponentType Type { get { throw new NotSupportedException(); } }

        public object UnderlyingComponent { get { throw new NotImplementedException(); } }
    }

    public static class ProcessableComponentExtensions
    {
        public static AssemblyProcessableComponent ToProcessableComponent(this AssemblyDefinition assembly)
        {
            return new AssemblyProcessableComponent(assembly);
        }

        public static ModuleProcessableComponent ToProcessableComponent(this ModuleDefinition module)
        {
            return new ModuleProcessableComponent(module);
        }

        public static TypeProcessableComponent ToProcessableComponent(this TypeDefinition type)
        {
            return new TypeProcessableComponent(type);
        }

        public static FieldProcessableComponent ToProcessableComponent(this FieldDefinition field)
        {
            return new FieldProcessableComponent(field);
        }

        public static PropertyProcessableComponent ToProcessableComponent(this PropertyDefinition property)
        {
            return new PropertyProcessableComponent(property);
        }

        public static MethodProcessableComponent ToProcessableComponent(this MethodDefinition method)
        {
            return new MethodProcessableComponent(method);
        }

        public static MethodParameterProcessableComponent ToProcessableComponent(this ParameterDefinition parameter, MethodDefinition declaringMethod)
        {
            return new MethodParameterProcessableComponent(parameter, declaringMethod);
        }
    }
}


text:
/* amd_internal.h */

/* Written by Andrew Makhorin <mao@gnu.org>. */

#ifndef AMD_INTERNAL_H
#define AMD_INTERNAL_H

/* AMD will be exceedingly slow when running in debug mode. */
#if 1
#define NDEBUG
#endif

#include "amd.h"
#define _GLPSTD_STDIO
#include "glpenv.h"

#define Int int
#define ID "%d"
#define Int_MAX INT_MAX

#define SIZE_T_MAX ((size_t)(-1))

#define EMPTY (-1)
#define FLIP(i) (-(i)-2)
#define UNFLIP(i) ((i < EMPTY) ? FLIP (i) : (i))

#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#define MIN(a,b) (((a) < (b)) ? (a) : (b))

#define IMPLIES(p, q) (!(p) || (q))

#define GLOBAL

#define AMD_order amd_order
#define AMD_defaults amd_defaults
#define AMD_control amd_control
#define AMD_info amd_info
#define AMD_1 amd_1
#define AMD_2 amd_2
#define AMD_valid amd_valid
#define AMD_aat amd_aat
#define AMD_postorder amd_postorder
#define AMD_post_tree amd_post_tree
#define AMD_dump amd_dump
#define AMD_debug amd_debug
#define AMD_debug_init amd_debug_init
#define AMD_preprocess amd_preprocess

#define amd_malloc xmalloc
#if 0 /* 24/V-2009 */
#define amd_free xfree
#else
#define amd_free(ptr) { if ((ptr) != NULL) xfree(ptr); }
#endif
#define amd_printf xprintf

#define PRINTF(params) { amd_printf params; }

#ifndef NDEBUG
#define ASSERT(expr) xassert(expr)
#define AMD_DEBUG0(params) { PRINTF(params); }
#define AMD_DEBUG1(params) { if (AMD_debug >= 1) PRINTF(params); }
#define AMD_DEBUG2(params) { if (AMD_debug >= 2) PRINTF(params); }
#define AMD_DEBUG3(params) { if (AMD_debug >= 3) PRINTF(params); }
#define AMD_DEBUG4(params) { if (AMD_debug >= 4) PRINTF(params); }
#else
#define ASSERT(expression)
#define AMD_DEBUG0(params)
#define AMD_DEBUG1(params)
#define AMD_DEBUG2(params)
#define AMD_DEBUG3(params)
#define AMD_DEBUG4(params)
#endif

#define amd_aat _glp_amd_aat
size_t AMD_aat(Int n, const Int Ap[], const Int Ai[], Int Len[],
      Int Tp[], double Info[]);

#define amd_1 _glp_amd_1
void AMD_1(Int n, const Int Ap[], const Int Ai[], Int P[], Int Pinv[],
      Int Len[], Int slen, Int S[], double Control[], double Info[]);

#define amd_postorder _glp_amd_postorder
void AMD_postorder(Int nn, Int Parent[], Int Npiv[], Int Fsize[],
      Int Order[], Int Child[], Int Sibling[], Int Stack[]);

#define amd_post_tree _glp_amd_post_tree
#ifndef NDEBUG
Int AMD_post_tree(Int root, Int k, Int Child[], const Int Sibling[],
      Int Order[], Int Stack[], Int nn);
#else
Int AMD_post_tree(Int root, Int k, Int Child[], const Int Sibling[],
      Int Order[], Int Stack[]);
#endif

#define amd_preprocess _glp_amd_preprocess
void AMD_preprocess(Int n, const Int Ap[], const Int Ai[], Int Rp[],
      Int Ri[], Int W[], Int Flag[]);

#define amd_debug _glp_amd_debug
extern Int AMD_debug;

#define amd_debug_init _glp_amd_debug_init
void AMD_debug_init(char *s);

#define amd_dump _glp_amd_dump
void AMD_dump(Int n, Int Pe[], Int Iw[], Int Len[], Int iwlen,
      Int pfree, Int Nv[], Int Next[], Int Last[], Int Head[],
      Int Elen[], Int Degree[], Int W[], Int nel);

#endif

/* eof */


text:
<?php
/*
 *
 */

namespace RDF\JobDefinitionFormatBundle\Model\JDF\Resource\Link;

use Doctrine\OXM\Mapping as OXM;

/**
 * RDF\JobDefinitionFormatBundle\Model\JDF\Resource\Link\ConventionalPrintingParams
 *
 * @OXM\XmlEntity(xml="ConventionalPrintingParamsLink")
 */
class ConventionalPrintingParamsLink extends ResourceLink
{

}


text:
..
      Copyright 2015 Hewlett Packard Development Company, L.P.

      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.

HP 3PAR Driver
==============

The HP 3PAR Manila driver provides NFS and CIFS shared file systems to
OpenStack using HP 3PAR's File Persona capabilities.

Supported Operations
--------------------

The following operations are supported with HP 3PAR File Persona:

- Create/delete NFS and CIFS shares

  * Shares are not accessible until access rules allow access

- Allow/deny NFS share access

  * IP access rules are required for NFS share access
  * User access rules are not allowed for NFS shares
  * Access level (RW/RO) is ignored
  * Shares created from snapshots are always read-only
  * Shares not created from snapshots are read-write (and subject to ACLs)

- Allow/deny CIFS share access

  * Both IP and user access rules are required for CIFS share access
  * User access requires a 3PAR local user (LDAP and AD is not yet supported)
  * Access level (RW/RO) is ignored
  * Shares created from snapshots are always read-only
  * Shares not created from snapshots are read-write (and subject to ACLs)

- Create/delete snapshots
- Create shares from snapshots

  * Shares created from snapshots are always read-only

Share networks are not supported. Shares are created directly on the 3PAR
without the use of a share server or service VM. Network connectivity is
setup outside of Manila.

Requirements
------------

On the system running the Manila share service:

- hp3parclient version 3.2.1 or newer from PyPI

On the HP 3PAR array:

- HP 3PAR Operating System software version 3.2.1 MU3 or higher
- A license that enables the File Persona feature
- The array class and hardware configuration must support File Persona

Pre-Configuration on the HP 3PAR
--------------------------------

- HP 3PAR File Persona must be initialized and started (:code:`startfs`)
- A File Provisioning Group (FPG) must be created for use with Manila
- A Virtual File Server (VFS) must be created for the FPG
- The VFS must be configured with an appropriate share export IP address
- A local user in the Administrators group is needed for CIFS shares

Backend Configuration
---------------------

The following parameters need to be configured in the Manila configuration
file for the HP 3PAR driver:

- `share_backend_name` = <backend name to enable>
- `share_driver` = manila.share.drivers.hp.hp_3par_driver.HP3ParShareDriver
- `driver_handles_share_servers` = False
- `hp3par_fpg` = <FPG to use for share creation>
- `hp3par_share_ip_address` = <IP address to use for share export location>
- `hp3par_san_ip` = <IP address for SSH access to the SAN controller>
- `hp3par_api_url` = <3PAR WS API Server URL>
- `hp3par_san_login` = <Username for SSH access to the SAN controller>
- `hp3par_san_password` = <Password for SSH access to the SAN controller>
- `hp3par_debug` = <False or True for extra debug logging>

The `hp3par_share_ip_address` must be a valid IP address for the configured
FPG's VFS. This IP address is used in export locations for shares that are
created. Networking must be configured to allow connectivity from clients to
shares.

Restart of :term:`manila-share` service is needed for the configuration changes to take
effect.

Network Approach
----------------

Connectivity between the storage array (SSH/CLI and WSAPI) and the Manila host
is required for share management.

Connectivity between the clients and the VFS is required for mounting
and using the shares. This includes:

- Routing from the client to the external network
- Assigning the client an external IP address (e.g., a floating IP)
- Configuring the Manila host networking properly for IP forwarding
- Configuring the VFS networking properly for client subnets

Share Types
-----------

When creating a share, a share type can be specified to determine where and
how the share will be created. If a share type is not specified, the
`default_share_type` set in the Manila configuration file is used.

Manila requires that the share type includes the
`driver_handles_share_servers` extra-spec. This ensures that the share
will be created on a backend that supports the requested
driver_handles_share_servers (share networks) capability.
For the HP 3PAR driver, this must be set to False.

Another common Manila extra-spec used to determine where a share is created
is `share_backend_name`. When this extra-spec is defined in the share type,
the share will be created on a backend with a matching share_backend_name.

Scoped extra-specs are used to influence vendor-specific implementation
details. Scoped extra-specs use a prefix followed by a colon.  For HP 3PAR
these extra-specs have a prefix of `hp_3par`.

The following HP 3PAR extra-specs are used when creating CIFS (SMB) shares:

- `hp3_par:smb_access_based_enum` = true or false
- `hp3_par:smb_continuous_avail` = true or false
- `hp3_par:smb_cache` = off, manual, optimized or auto

`smb_access_based_enum` (Access Based Enumeration) specifies if users can see
only the files and directories to which they have been allowed access on the
shares. The default is `false`.

`smb_continuous_avail` (Continuous Availability) specifies if SMB3 continuous
availability features should be enabled for this share. If not specified,
the default is `true`. This setting will be ignored with hp3parclient 3.2.1
or earlier.

`smb_cache` specifies client-side caching for offline files. Valid values are:

* `off`: The client must not cache any files from this share. The share is
  configured to disallow caching.
* `manual`: The client must allow only manual caching for the files open from
  this share.
* `optimized`: The client may cache every file that it opens from
  this share. Also, the client may satisfy the file requests from its
  local cache. The share is configured to allow automatic caching
  of programs and documents.
* `auto`: The client may cache every file that it opens from this
  share. The share is configured to allow automatic caching of
  documents.
* If this is not specified, the default is `manual`.

The following HP 3PAR extra-specs are used when creating NFS shares:

- `hp3_par:nfs_options` = Comma separated list of NFS export options

The NFS export options have the following limitations:

  * `ro` and `rw` are not allowed (Manila will determine the read-only option)
  * `no_subtree_check` and `fsid` are not allowed per HP 3PAR CLI support
  * `(in)secure` and `(no_)root_squash` are not allowed because the HP 3PAR
    driver controls those settings

All other NFS options are forwarded to the HP 3PAR as part of share creation.
The HP 3PAR will do additional validation at share creation time. Refer to
HP 3PAR CLI help for more details.

The :mod:`manila.share.drivers.hp.hp_3par_driver` Module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: manila.share.drivers.hp.hp_3par_driver
    :noindex:
    :members:
    :undoc-members:
    :show-inheritance:


text:
package BotSource.Commands.VoiceCommands;

import BotSource.Main.data.DataClass;
import DiscordBotCode.CommandFiles.DiscordChatCommand;
import DiscordBotCode.CommandFiles.DiscordCommand;
import DiscordBotCode.Main.ChatUtils;
import DiscordBotCode.Main.DiscordBotBase;
import DiscordBotCode.Main.PermissionUtils;
import DiscordBotCode.Main.ResponseException.AbstractResponse;
import DiscordBotCode.Main.ResponseException.TextResponse;
import org.apache.commons.io.IOUtils;
import sx.blah.discord.handle.obj.IMessage;
import sx.blah.discord.handle.obj.IVoiceChannel;
import sx.blah.discord.handle.obj.Permissions;
import sx.blah.discord.util.audio.AudioPlayer;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

public class Meow extends DiscordChatCommand
{
	private static File file = null;

	@Override
	public void commandExecuted( IMessage message, String[] args )
	{
		if (file == null) {
			InputStream stream = DataClass.class.getResourceAsStream("LilySound.mp3");
			try {
				file = File.createTempFile("tempLilySound", ".mp3", DiscordBotBase.tempFolder);
			} catch (IOException e) {
				DiscordBotBase.handleException(e);
			}
			file.deleteOnExit();

			try {
				try (FileOutputStream out = new FileOutputStream(file)) {
					IOUtils.copy(stream, out);
				}
			} catch (IOException e) {
				DiscordBotBase.handleException(e);
			}
		}

		try {
			AudioPlayer.getAudioPlayerForGuild(message.getGuild()).queue(file);
		} catch (Exception e) {
			DiscordBotBase.handleException(e);
		}
	}

	@Override
	public boolean canExecute( IMessage message, String[] args )
	{
		return true;
	}

	@Override
	public String commandPrefix()
	{
		return "Meow";
	}

	@Override
	public String getUsage( DiscordCommand sourceCommand, IMessage callMessage )
	{
		return "Meow";
	}

	public boolean canCommandBePrivateChat()
	{
		return false;
	}

	@Override
	public boolean hasPermissions( IMessage message, String[] args )
	{
		IVoiceChannel channel1 = ChatUtils.getConnectedBotChannel(message.getGuild());
		return PermissionUtils.hasPermissions(message.getAuthor(), message.getGuild(), channel1, getPermissionsEnumSet());
	}

	@Override
	public Permissions[] getRequiredPermissions()
	{
		return new Permissions[]{
				Permissions.VOICE_CONNECT, Permissions.VOICE_SPEAK, Permissions.SEND_TTS_MESSAGES
		};
	}

	@Override
	public AbstractResponse getExecuteResponse( IMessage message, String[] args, boolean hasPermission )
	{
		IVoiceChannel channel1 = ChatUtils.getConnectedBotChannel(message.getGuild());

		if (channel1 == null) {
			return new TextResponse(this, "Discord is not connected to a voice channel and is therefor unable to execute command!");
		}

		return super.getExecuteResponse(message, args, hasPermission);
	}

	@Override
	public String getDescription( DiscordCommand sourceCommand, IMessage callerMessage )
	{
		return null;
	}
}


text:
> Get the average of numbers

## Install

```
$ npm install --save math-avg
```

## Usage

```js
import mathAverage from 'math-avg';

mathAverage(1, 3);
//=> 2

mathAverage([1, 3]);
//=> 2
```

## Related

- [math-sum](https://github.com/sindresorhus/math-sum) - Sum numbers
- [math-clamp](https://github.com/sindresorhus/math-clamp) - Clamp a number


text:
<!DOCTYPE html>

    <meta charset="utf-8" />

    <meta name="viewport" content="width=device-width" />

    <title>About</title>

    <link rel="stylesheet" href="../theme/css/normalize.css" />
    <link rel="stylesheet" href="../theme/css/foundation.min.css" />
    <link rel="stylesheet" href="../theme/css/style.css" />
    <link rel="stylesheet" href="../theme/css/pygments.css" />
    <link rel="shortcut icon" href="../theme/images/icons/favicon.ico"/>

    <link rel="stylesheet" href="../static/2019/euroscipy.css" />

EuroSciPy

Euroscipy 2017

About

Venue

Program

Sponsors

Code of Conduct

About

Local organization

Thomas Pohl

Sepideh Alassi (University of Basel, CH)

Susanne Greiner

Conference Manager, Sponsoring

Mike Müller (Python Academy, DE)

Tutorial Chair

Emmanuelle Gouillart (Joint Unit CNRS/Saint-Gobain, FR)

Program Chair

Federico Vaggi (Amazon, US)

Program Committee

Alexander Hendorf

Almar Klein

Emmanuelle Gouillart

Fabian Pedregosa

Federico Vaggi

Kyle Kastner

Nelle Varoquaux

Nicolas P. Rougier

Pauli Virtanen

Thomas Kluyver

Valerio Maggio

Communication

Pierre de Buyl (KU Leuven, BE)

Sepideh Alassi (University of Basel, CH)

Mike Müller (Python Academy, DE)

Help Desk

Susanne Greiner

Miroslav Šedivý

Contact

info at the domain euroscipy.org

EuroSciPy by The EuroSciPy team <info@euroscipy.org>

            	 Privacy terms


text:
#include "toonzqt/tonecurvefield.h"
#include "toonzqt/fxhistogramrender.h"
#include "toonzqt/intpairfield.h"
#include "toonzqt/checkbox.h"

#include <QPainter>
#include <QPainterPath>
#include <QStackedWidget>
#include <QMouseEvent>
#include <QApplication>
#include <QHBoxLayout>
#include <QComboBox>
#include <QLabel>

using namespace DVGui;

//-----------------------------------------------------------------------------
namespace {
//-----------------------------------------------------------------------------

double getPercentAtPoint(QPointF point, QPainterPath path) {
  int i;
  for (i = 1; i < 100; i++) {
    double p          = double(i) * 0.01;
    QPointF pathPoint = path.pointAtPercent(p);
    if (abs(pathPoint.x() - point.x()) < 3 &&
        abs(pathPoint.y() - point.y()) < 3)
      return p;
  }
  return 0;
}

//-----------------------------------------------------------------------------

QList<QPointF> getIntersectedPoint(QRectF rect, QPainterPath path) {
  int y0 = rect.top();
  int y1 = rect.bottom();
  QList<QPointF> points;
  double g      = 1.0 / 256.0;
  QPointF prec  = path.pointAtPercent(0);
  QPointF point = path.pointAtPercent(g);
  int j         = 0;
  for (j = 2; j < 256; j++) {
    QPointF next = path.pointAtPercent(double(j) * g);
    if (prec.y() >= y0 && prec.y() <= y1) {
      if (point.y() < y0)
        points.push_back(QPointF(prec.x(), y0));
      else if (point.y() > y1)
        points.push_back(QPointF(prec.x(), y1));
    }
    if (next.y() >= y0 && next.y() <= y1) {
      if (point.y() < y0)
        points.push_back(QPointF(next.x(), y0));
      else if (point.y() > y1)
        points.push_back(QPointF(next.x(), y1));
    }
    prec  = point;
    point = next;
  }
  return points;
}

//-----------------------------------------------------------------------------

double qtNorm2(const QPointF &p) { return p.x() * p.x() + p.y() * p.y(); }

double qtNorm(const QPointF &p) { return sqrt(qtNorm2(p)); }

QPointF qtNormalize(const QPointF &p) {
  double n = qtNorm(p);
  assert(n != 0.0);
  return (1.0 / n) * p;
}

double qtDistance2(const QPointF &p1, const QPointF &p2) {
  return qtNorm2(p2 - p1);
}

double qtDistance(const QPointF &p1, const QPointF &p2) {
  return qtNorm(p2 - p1);
}

//-----------------------------------------------------------------------------

QPointF getNewFirstHandlePoint(const QPointF &p, const QPointF &nextP,
                               const QPointF &oldHandlePoint) {
  bool canMove  = (nextP.x() - p.x() > 16);
  int yDistance = nextP.y() - p.y();
  double sign   = (yDistance != 0) ? yDistance / abs(yDistance) : 1;
  double t      = qtDistance(p, oldHandlePoint);
  if (!canMove) {
    QPointF normalizedP =
        (yDistance != 0) ? qtNormalize(nextP - p) : QPoint(1, 1);
    return QPointF(p + QPointF(t * normalizedP));
  } else if (abs(oldHandlePoint.x() - p.x()) < 16)
    return QPointF(p.x() + 16, p.y() + sign * sqrt(t * t - 16 * 16));
  return oldHandlePoint;
}

//-----------------------------------------------------------------------------

QPointF getNewSecondHandlePoint(const QPointF &p, const QPointF &nextP,
                                const QPointF &oldHandlePoint) {
  bool canMove  = (nextP.x() - p.x() > 16);
  int yDistance = p.y() - nextP.y();
  double sign   = (yDistance != 0) ? yDistance / abs(yDistance) : 1;
  double s      = qtDistance(oldHandlePoint, nextP);
  if (!canMove) {
    QPointF normalizedP =
        (yDistance != 0) ? qtNormalize(nextP - p) : QPoint(1, 1);
    return QPointF(nextP - QPointF(s * normalizedP));
  } else if (abs(nextP.x() - oldHandlePoint.x()) < 16)
    return QPointF(nextP.x() - 16, nextP.y() + sign * sqrt(s * s - 16 * 16));
  return oldHandlePoint;
}

//-----------------------------------------------------------------------------
}  // anonymous namespace
//-----------------------------------------------------------------------------

//=============================================================================
// ChennelCurveEditor
//=============================================================================

ChennelCurveEditor::ChennelCurveEditor(QWidget *parent,
                                       HistogramView *histogramView)
    : QWidget(parent)
    , m_histogramView(histogramView)
    , m_currentControlPointIndex(-1)
    , m_mouseButton(Qt::NoButton)
    , m_curveHeight(256)
    , m_LeftRightMargin(42)
    , m_TopMargin(9)
    , m_BottomMargin(48)
    , m_isLinear(false) {
  setFixedSize(m_curveHeight + 2 * m_LeftRightMargin + 2,
               m_curveHeight + m_TopMargin + m_BottomMargin);
  setAttribute(Qt::WA_KeyCompression);
  setFocusPolicy(Qt::StrongFocus);
  setMouseTracking(true);

  m_histogramView->setDrawnWidget(this);
  m_histogramView->setGraphHeight(m_curveHeight);
  m_histogramView->setGraphAlphaMask(120);
  m_verticalChannelBar =
      new ChannelBar(0, m_histogramView->getChannelBarColor(), false);
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::setPoints(QList<TPointD> points) {
  if (!m_points.isEmpty()) m_points.clear();
  int i;
  for (i = 0; i < points.size(); i++) {
    QPointF p = strokeToViewPoint(points.at(i));
    m_points.push_back(p);
  }
  /*--ポイント位置に合わせてスライダも更新する--*/
  int firstIndex = 3;
  int lastIndex  = m_points.size() - 4;
  emit firstLastXPostionChanged(viewToStrokePoint(m_points.at(firstIndex)).x,
                                viewToStrokePoint(m_points.at(lastIndex)).x);
  update();
}

//-----------------------------------------------------------------------------

QList<TPointD> ChennelCurveEditor::getPoints() {
  QList<TPointD> points;
  if (m_points.isEmpty()) return points;
  int i;
  for (i = 0; i < m_points.size(); i++)
    points.push_back(viewToStrokePoint(m_points.at(i)));
  return points;
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::setFirstLastXPosition(std::pair<int, int> values,
                                               bool isDragging) {
  if (!isDragging) {
    emit controlPointChanged(false);
    return;
  }

  QPointF newX0 = strokeToViewPoint(TPointD(values.first, 0));
  QPointF newX1 = strokeToViewPoint(TPointD(values.second, 0));

  int indexX0 = 3;
  int indexX1 = m_points.size() - 4;
  QPointF x0  = m_points.at(indexX0);
  QPointF x1  = m_points.at(indexX1);
  if (x0.x() != newX0.x()) {
    QPointF delta(newX0.x() - x0.x(), 0);
    moveCentralControlPoint(indexX0, delta);
    update();
  }
  if (x1.x() != newX1.x()) {
    QPointF delta(newX1.x() - x1.x(), 0);
    moveCentralControlPoint(indexX1, delta);
    update();
  }
  m_currentControlPointIndex = -1;
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::setLinear(bool isLinear) {
  if (m_isLinear == isLinear) return;
  m_isLinear = isLinear;
  update();
}

//-----------------------------------------------------------------------------

QPointF ChennelCurveEditor::checkPoint(const QPointF p) {
  QPointF checkedP         = p;
  int y0                   = m_TopMargin + 1;
  int y1                   = m_curveHeight + m_TopMargin;
  if (p.y() < y0) checkedP = QPointF(checkedP.x(), y0);
  if (p.y() > y1) checkedP = QPointF(checkedP.x(), y1);
  int x0                   = m_LeftRightMargin + 1;
  int x1                   = m_curveHeight + m_LeftRightMargin;
  if (p.x() < x0) checkedP = QPointF(x0, checkedP.y());
  if (p.x() > x1) checkedP = QPointF(x1, checkedP.y());
  return checkedP;
}

//-----------------------------------------------------------------------------

QPointF ChennelCurveEditor::strokeToViewPoint(const TPointD p) {
  double x = p.x + m_LeftRightMargin + 1;
  double y = height() - m_BottomMargin - p.y;
  return QPointF(x, y);
}

//-----------------------------------------------------------------------------

TPointD ChennelCurveEditor::viewToStrokePoint(const QPointF &p) {
  double x = p.x() - m_LeftRightMargin - 1;
  double y = m_curveHeight - (p.y() - m_TopMargin);
  return TThickPoint(x, y);
}

//-----------------------------------------------------------------------------

int ChennelCurveEditor::getClosestPointIndex(const QPointF &pos,
                                             double &minDistance2) const {
  int closestPointIndex = -1;
  minDistance2          = 0;
  int i;
  for (i = 0; i < (int)m_points.size(); i++) {
    double distance2 = qtDistance2(pos, m_points.at(i));
    if (closestPointIndex < 0 || distance2 < minDistance2) {
      minDistance2      = distance2;
      closestPointIndex = i;
    }
  }
  return closestPointIndex;
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::movePoint(int index, const QPointF delta) {
  QPointF p = m_points.at(index);
  p += delta;
  setPoint(index, p);

  int firstIndex = 3;
  int lastIndex  = m_points.size() - 4;
  if (index == firstIndex)
    emit firstLastXPostionChanged(viewToStrokePoint(p).x,
                                  viewToStrokePoint(m_points.at(lastIndex)).x);
  if (index == lastIndex)
    emit firstLastXPostionChanged(viewToStrokePoint(m_points.at(firstIndex)).x,
                                  viewToStrokePoint(p).x);
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::setPoint(int index, const QPointF p) {
  m_points.removeAt(index);
  m_points.insert(index, p);

  int firstIndex = 3;
  int lastIndex  = m_points.size() - 4;
  if (index == firstIndex)
    emit firstLastXPostionChanged(viewToStrokePoint(p).x,
                                  viewToStrokePoint(m_points.at(lastIndex)).x);
  if (index == lastIndex)
    emit firstLastXPostionChanged(viewToStrokePoint(m_points.at(firstIndex)).x,
                                  viewToStrokePoint(p).x);
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::moveCurrentControlPoint(const QPointF delta) {
  assert(m_currentControlPointIndex != -1);
  int pointCount = m_points.size();
  /*- セグメントを動かした場合 -*/
  if (isCentralControlPoint(m_currentControlPointIndex))
    moveCentralControlPoint(m_currentControlPointIndex, delta);
  /*- 左のハンドルを動かした場合 -*/
  else if (isLeftControlPoint(m_currentControlPointIndex)) {
    QPointF p0 =
        m_points.at(m_currentControlPointIndex) + QPointF(0, delta.y());
    setPoint(m_currentControlPointIndex, p0);
    if (m_currentControlPointIndex < pointCount - 5) {
      QPointF p2 =
          m_points.at(m_currentControlPointIndex + 2) - QPointF(0, delta.y());
      setPoint(m_currentControlPointIndex + 2, p2);
    }
    emit controlPointChanged(true);
  }
  /*- 右のハンドルを動かした場合 -*/
  else {
    assert(isRightControlPoint(m_currentControlPointIndex));
    QPointF p0 =
        m_points.at(m_currentControlPointIndex) + QPointF(0, delta.y());
    setPoint(m_currentControlPointIndex, p0);
    if (m_currentControlPointIndex > 4) {
      QPointF p2 =
          m_points.at(m_currentControlPointIndex - 2) - QPointF(0, delta.y());
      setPoint(m_currentControlPointIndex - 2, p2);
    }
    emit controlPointChanged(true);
  }
  update();
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::moveCentralControlPoint(int index,
                                                 const QPointF delta) {
  int pointCount = m_points.size();

  assert(index < pointCount - 3 && index > 2);

  QPointF p = m_points.at(index);
  QPointF d = delta;
  // Trovo il valore di delta im modo tale che il punto di controllo non sia
  // trascinato fuori dal range consentito
  int newX         = p.x() + delta.x();
  int newY         = p.y() + delta.y();
  QPointF newPoint = checkPoint(QPoint(newX, newY));
  d                = newPoint - p;

  QPointF nextP       = m_points.at(index + 3);
  QPointF precP       = m_points.at(index - 3);
  double nextDistance = nextP.x() - (p.x() + d.x());
  double precDistance = (p.x() + d.x()) - precP.x();

  // Caso particolare: Punto di controllo corrente == primo visibile,
  //                   Punto di controllo successivo
  //==
  // l'ultimo
  // visibile
  if (index == 3 && index + 3 == pointCount - 4) {
    setPoint(index + 1,
             getNewFirstHandlePoint(p, nextP, m_points.at(index + 1)));
    setPoint(index + 2,
             getNewSecondHandlePoint(p, nextP, m_points.at(index + 2)));
    if (nextDistance < 0) d = QPointF(nextP.x() - p.x(), d.y());
  }
  // Caso particolare: Punto di controllo corrente == ultimo visibile,
  //                   Punto di controllo precedente
  //==
  // primo
  // visibile
  else if (index - 3 == 3 && index == pointCount - 4) {
    setPoint(index - 2,
             getNewFirstHandlePoint(precP, p, m_points.at(index - 2)));
    setPoint(index - 1,
             getNewSecondHandlePoint(precP, p, m_points.at(index - 1)));
    if (precDistance < 0) d = QPointF(precP.x() - p.x(), d.y());
  }
  // Altrimenti calcolo il nuovo delta
  else if (nextDistance < 16)
    d = QPointF(nextP.x() - p.x() - 16, d.y());
  else if (precDistance < 16)
    d = QPointF(precP.x() - p.x() + 16, d.y());

  // Punto di controllo speciale: il primo visualizzato.
  if (index == 3) {
    QPointF dY = QPointF(0, d.y());
    movePoint(index - 1, dY);
    movePoint(index - 2, dY);
    movePoint(index - 3, dY);
  }
  // Punto di controllo speciale: l'ultimo visualizzato.
  if (index == pointCount - 4) {
    QPointF dY = QPointF(0, d.y());
    movePoint(index + 1, dY);
    movePoint(index + 2, dY);
    movePoint(index + 3, dY);
  }
  if (index > 3) movePoint(index - 1, d);
  if (index < pointCount - 4) movePoint(index + 1, d);
  movePoint(index, d);
  emit controlPointChanged(true);
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::addControlPoint(double percent) {
  QPainterPath path = getPainterPath();
  QPointF p         = path.pointAtPercent(percent);

  // Cerco il punto di controllo precedente
  int pointCount = m_points.size();
  int beforeControlPointIndex;
  for (beforeControlPointIndex = pointCount - 1; beforeControlPointIndex >= 0;
       beforeControlPointIndex--) {
    QPointF point = m_points.at(beforeControlPointIndex);
    if (isCentralControlPoint(beforeControlPointIndex) && point.x() < p.x())
      break;
  }

  if (beforeControlPointIndex == 0 || beforeControlPointIndex == pointCount - 4)
    return;

  QPointF p0 = checkPoint(m_points.at(beforeControlPointIndex));
  // Se sono troppo vicino al punto di controllo precedente ritorno
  if (abs(p.x() - p0.x()) <= 16) return;
  double beforeControlPointPercent = getPercentAtPoint(p0, path);
  QPointF p1 = checkPoint(m_points.at(beforeControlPointIndex + 1));
  QPointF p2 = checkPoint(m_points.at(beforeControlPointIndex + 2));
  QPointF p3 = checkPoint(m_points.at(beforeControlPointIndex + 3));
  // Se sono troppo vicino al punto di controllo successivo ritorno
  if (abs(p3.x() - p.x()) <= 16) return;
  double nextControlPointPercent = getPercentAtPoint(p3, path);

  // Calcolo la velocita' e quindi il coiffciente angolare.
  double t =
      percent * 100 / (nextControlPointPercent - beforeControlPointPercent);
  double s = t - 1;
  QPointF speed =
      3.0 * ((p1 - p0) * s * s + 2 * (p2 - p0) * s * t + (p3 - p2) * t * t);
  double m = speed.y() / speed.x();

  int newControlPointIndex = beforeControlPointIndex + 3;
  m_points.insert(newControlPointIndex - 1,
                  QPointF(p.x() - 16, p.y() - 16 * m));
  m_points.insert(newControlPointIndex, p);
  m_points.insert(newControlPointIndex + 1,
                  QPointF(p.x() + 16, p.y() + 16 * m));

  m_currentControlPointIndex = newControlPointIndex;
  emit controlPointAdded(newControlPointIndex);
  update();
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::removeCurrentControlPoint() {
  removeControlPoint(m_currentControlPointIndex);
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::removeControlPoint(int index) {
  // Non posso eliminare il primo punto di controllo visibile quindi lo rimetto
  // in condizione iniziale
  if (index <= 4) {
    setPoint(0, strokeToViewPoint(TPointD(-40, 0)));
    setPoint(1, strokeToViewPoint(TPointD(-20, 0)));
    setPoint(2, strokeToViewPoint(TPointD(-20, 0)));
    setPoint(3, strokeToViewPoint(TPointD(0, 0)));
    setPoint(4, strokeToViewPoint(TPointD(16, 16)));
    update();
    emit controlPointChanged(false);
    return;
  }
  // Non posso eliminare il l'ultimo punto di controllo visibile quindi lo
  // rimetto in condizione iniziale
  if (index >= m_points.size() - 5) {
    int i = m_points.size() - 5;
    setPoint(i, strokeToViewPoint(TPointD(239, 239)));
    setPoint(i + 1, strokeToViewPoint(TPointD(255, 255)));
    setPoint(i + 2, strokeToViewPoint(TPointD(275, 255)));
    setPoint(i + 3, strokeToViewPoint(TPointD(275, 255)));
    setPoint(i + 4, strokeToViewPoint(TPointD(295, 255)));
    update();
    emit controlPointChanged(false);
    return;
  }

  int firstIndex = 0;
  if (isCentralControlPoint(index))
    firstIndex = index - 1;
  else if (isLeftControlPoint(index))
    firstIndex = index;
  else
    firstIndex = index - 2;

  m_points.removeAt(firstIndex);
  m_points.removeAt(firstIndex);
  m_points.removeAt(firstIndex);

  emit controlPointRemoved(firstIndex + 1);
  m_currentControlPointIndex = firstIndex - 2;
  update();
}

//-----------------------------------------------------------------------------

QPainterPath ChennelCurveEditor::getPainterPath() {
  int pointCount = m_points.size();
  if (pointCount == 0) return QPainterPath();

  QPointF p0 = m_points.at(0);
  QPainterPath path(p0);
  int i;
  for (i = 1; i < pointCount; i++) {
    QPointF p1 = m_points.at(i);
    QPointF p2 = m_points.at(++i);
    QPointF p3 = m_points.at(++i);
    path.moveTo(p0);
    if (!m_isLinear)
      path.cubicTo(p1, p2, p3);
    else
      path.lineTo(p3);
    p0 = p3;
  }

  // Cerco le eventuali intersezioni con il bordo.
  QRectF rect(m_LeftRightMargin, m_TopMargin, m_curveHeight, m_curveHeight);
  QRectF r = path.boundingRect();
  if (!rect.contains(QRect(rect.left(), r.top(), rect.width(), r.height()))) {
    QList<QPointF> points = getIntersectedPoint(rect, path);
    // Se trovo punti di intersezione (per come e' definita la curva devono
    // essere pari)
    // faccio l'unione del path calcolato e di nuovi path lineari.
    int j = 0;
    for (j = 0; j < points.size(); j++) {
      QPointF p0 = points.at(j);
      QPointF p1 = points.at(++j);
      QPainterPath line(p0);
      line.lineTo(p1);
      path.addPath(line);
    }
  }

  return path;
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::paintEvent(QPaintEvent *e) {
  QPainter painter(this);

  // Disegno il reticolato
  painter.setRenderHint(QPainter::Antialiasing, false);
  painter.setPen(QColor(250, 250, 250));
  int i;
  int d = m_curveHeight * 0.25;
  for (i = 1; i < 16; i++) {
    // linee orizzontali
    int delta = m_TopMargin + 16 * i;
    int j;
    for (j = 1; j < 4; j++)
      painter.drawLine(QPoint((j - 1) * d + m_LeftRightMargin + 1, delta),
                       QPoint(j * d + m_LeftRightMargin - 1, delta));
    painter.drawLine(QPoint((4 - 1) * d + m_LeftRightMargin + 1, delta),
                     QPoint(4 * d + m_LeftRightMargin, delta));
    // linee verticali
    delta = m_LeftRightMargin + 1 + 16 * i;
    if (i % 4 == 0) continue;
    for (j = 1; j < 5; j++)
      painter.drawLine(QPoint(delta, (j - 1) * d + m_TopMargin),
                       QPoint(delta, j * d + m_TopMargin - 1));
  }

  // Disegno l'histogram.
  m_histogramView->draw(&painter, QPoint(m_LeftRightMargin - 10, 0));

  // Disegno la barra verticale a sinistra.
  m_verticalChannelBar->draw(
      &painter,
      QPoint(0, -2));  //-1 == m_topMargin- il margine della barra(=10+1).

  QRectF r = rect().adjusted(m_LeftRightMargin, m_TopMargin, -m_LeftRightMargin,
                             -m_BottomMargin);
  // Disegno la curva entro i limiti del grafo
  painter.setClipRect(r, Qt::IntersectClip);
  QPainterPath path = getPainterPath();
  if (path.isEmpty()) return;
  painter.setRenderHint(QPainter::Antialiasing, true);
  painter.setPen(Qt::black);
  painter.setBrush(Qt::NoBrush);
  painter.drawPath(path);

  // Disegno i punti di controllo (esclusi i primi tre e gli ultimi tre)
  r         = r.adjusted(-5, -5, 5, 5);
  int n     = m_points.size();
  QPointF p = m_points.at(3);
  for (i = 3; i < n - 3; i++) {
    QBrush brush(Qt::white);
    int rad       = 3;
    QPointF nextP = m_points.at(i + 1);
    if (isCentralControlPoint(i))
      rad = 4;
    else if (m_isLinear) {
      p = nextP;
      continue;
    }
    if (m_currentControlPointIndex == i) brush = QBrush(Qt::black);
    painter.setBrush(brush);
    painter.setPen(Qt::black);

    if (!m_isLinear) {
      if (isLeftControlPoint(i))
        painter.drawLine(p, nextP);
      else if (isCentralControlPoint(i) && i < n - 4)
        painter.drawLine(p, nextP);
    }
    QPainterPath circle;
    QRectF pointRect(p.x() - rad, p.y() - rad, 2 * rad, 2 * rad);
    if (r.contains(pointRect))
#if QT_VERSION >= 0x050000
      painter.setClipRect(pointRect.adjusted(-1, -1, 1, 1));
#else
      painter.setClipRect(pointRect.adjusted(-1, -1, 1, 1), Qt::UniteClip);
#endif
    circle.addEllipse(pointRect);
    painter.fillPath(circle, brush);
    painter.drawPath(circle);
    p = nextP;
  }
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::mouseMoveEvent(QMouseEvent *e) {
  if (m_mouseButton == Qt::LeftButton && m_currentControlPointIndex != -1) {
    QPoint pos   = e->pos();
    QPointF posF = QPointF(pos.x(), pos.y());
    moveCurrentControlPoint(posF - m_points.at(m_currentControlPointIndex));
  }
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::mousePressEvent(QMouseEvent *e) {
  m_mouseButton = e->button();
  setFocus();
  if (m_mouseButton == Qt::LeftButton) {
    QPoint pos   = e->pos();
    QPointF posF = QPointF(pos.x(), pos.y());
    double minDistance;
    int controlPointIndex = getClosestPointIndex(posF, minDistance);

    // Se la distanza e' piccola seleziono il control point corrente
    if (minDistance < 20)
      m_currentControlPointIndex = controlPointIndex;
    else {
      m_currentControlPointIndex = -1;
      // Se sono sufficentemente lontano da un punto di controllo, ma abbastanza
      // vicino alla curva
      // aggiungo un punto di controllo
      double percent = getPercentAtPoint(posF, getPainterPath());
      if (percent != 0 && minDistance > 20) addControlPoint(percent);
    }
    update();
  }
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::mouseReleaseEvent(QMouseEvent *e) {
  /*-- マウスドラッグ中はプレビューを更新しない。ここで初めて更新 --*/
  if (m_mouseButton == Qt::LeftButton && m_currentControlPointIndex != -1 &&
      e->button() == Qt::LeftButton)
    emit controlPointChanged(false);
  m_mouseButton = Qt::NoButton;
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::keyPressEvent(QKeyEvent *e) {
  if (e->key() == Qt::Key_Delete) removeCurrentControlPoint();
}

//-----------------------------------------------------------------------------

void ChennelCurveEditor::enterEvent(QEvent *) { m_mouseButton = Qt::NoButton; }

//-----------------------------------------------------------------------------

void ChennelCurveEditor::leaveEvent(QEvent *) { m_mouseButton = Qt::NoButton; }

//--------------------------------------------------------

bool ChennelCurveEditor::eventFilter(QObject *object, QEvent *event) {
  if (event->type() == QEvent::Shortcut ||
      event->type() == QEvent::ShortcutOverride) {
    if (!object->inherits("FxSettings")) {
      event->accept();
      return true;
    }
  }
  return false;
}

//--------------------------------------------------------

void ChennelCurveEditor::focusInEvent(QFocusEvent *fe) {
  QWidget::focusInEvent(fe);
  qApp->installEventFilter(this);
}

//--------------------------------------------------------

void ChennelCurveEditor::focusOutEvent(QFocusEvent *fe) {
  m_currentControlPointIndex = -1;
  emit focusOut();
  QWidget::focusOutEvent(fe);
  qApp->removeEventFilter(this);
  update();
}

//=============================================================================
// ToneCurveField
//=============================================================================

ToneCurveField::ToneCurveField(QWidget *parent,
                               FxHistogramRender *fxHistogramRender)
    : QWidget(parent), m_toneCurveStackedWidget(0) {
  setFixedWidth(368);

  int currentChannelIndex = 0;

  QVBoxLayout *mainLayout = new QVBoxLayout(this);
  mainLayout->setMargin(0);
  mainLayout->setSpacing(0);

  QStringList channels;
  channels << "RGBA"
           << "RGB"
           << "Red"
           << "Green"
           << "Blue"
           << "Alpha";
  int channelCount = channels.size();

  // lista canali: label+comboBox
  QWidget *channelListWidget     = new QWidget(this);
  QHBoxLayout *channelListLayout = new QHBoxLayout(channelListWidget);
  channelListLayout->setMargin(0);
  channelListLayout->setSpacing(0);
  QLabel *channelLabel = new QLabel(tr("Channel:"), channelListWidget);
  channelListLayout->addWidget(channelLabel);
  m_channelListChooser = new QComboBox(channelListWidget);
  m_channelListChooser->setFixedSize(100, 20);
  m_channelListChooser->addItems(channels);
  m_channelListChooser->setCurrentIndex(currentChannelIndex);
  channelListLayout->addWidget(m_channelListChooser);
  channelListWidget->setLayout(channelListLayout);
  mainLayout->addWidget(channelListWidget, 0, Qt::AlignCenter);

  // stack widget dei grafi
  m_toneCurveStackedWidget = new QStackedWidget(this);
  Histograms *histograms   = new Histograms(0, true);
  fxHistogramRender->setHistograms(histograms);
  int i;
  for (i = 0; i < channelCount; i++) {
    ChennelCurveEditor *c =
        new ChennelCurveEditor(this, histograms->getHistogramView(i));
    m_toneCurveStackedWidget->addWidget(c);
    connect(c, SIGNAL(firstLastXPostionChanged(int, int)), this,
            SLOT(onFirstLastXPostionChanged(int, int)));
  }

  QWidget *w          = new QWidget(this);
  QHBoxLayout *layout = new QHBoxLayout(w);
  layout->setMargin(0);
  layout->setSpacing(0);
  layout->addWidget(m_toneCurveStackedWidget);
  w->setLayout(layout);
  mainLayout->addWidget(w, 0, Qt::AlignHCenter);
  m_toneCurveStackedWidget->setCurrentIndex(currentChannelIndex);

  // stack widget degli slider
  m_sliderStackedWidget = new QStackedWidget(this);
  for (i = 0; i < channelCount; i++) {
    IntPairField *intPairSlider = new IntPairField(this);
    intPairSlider->setFixedHeight(20);
    intPairSlider->setLabelsEnabled(false);
    intPairSlider->setRange(0, 255);
    intPairSlider->setValues(std::make_pair(0, 255));
    m_sliderStackedWidget->addWidget(intPairSlider);
    connect(intPairSlider, SIGNAL(valuesChanged(bool)), this,
            SLOT(sliderValueChanged(bool)));
  }
  mainLayout->addWidget(m_sliderStackedWidget);
  m_sliderStackedWidget->setCurrentIndex(currentChannelIndex);

  mainLayout->addSpacing(10);
  m_isLinearCheckBox = new CheckBox(QString("Linear"), this);
  mainLayout->addWidget(m_isLinearCheckBox, 0, Qt::AlignHCenter);
  connect(m_isLinearCheckBox, SIGNAL(clicked(bool)),
          SLOT(setLinearManually(bool)));
  connect(m_isLinearCheckBox, SIGNAL(toggled(bool)), SLOT(setLinear(bool)));

  connect(m_channelListChooser, SIGNAL(currentIndexChanged(int)),
          m_toneCurveStackedWidget, SLOT(setCurrentIndex(int)));
  connect(m_channelListChooser, SIGNAL(currentIndexChanged(int)),
          m_sliderStackedWidget, SLOT(setCurrentIndex(int)));
  connect(m_channelListChooser, SIGNAL(currentIndexChanged(int)), this,
          SIGNAL(currentChannelIndexChanged(int)));

  setLayout(mainLayout);
}

//-----------------------------------------------------------------------------

void ToneCurveField::setCurrentChannel(int currentChannel) {
  m_channelListChooser->setCurrentIndex(currentChannel);
}

//-----------------------------------------------------------------------------

ChennelCurveEditor *ToneCurveField::getChannelEditor(int channel) const {
  ChennelCurveEditor *c = dynamic_cast<ChennelCurveEditor *>(
      m_toneCurveStackedWidget->widget(channel));
  assert(c);
  return c;
}

//-----------------------------------------------------------------------------

ChennelCurveEditor *ToneCurveField::getCurrentChannelEditor() const {
  return getChannelEditor(m_toneCurveStackedWidget->currentIndex());
}

//-----------------------------------------------------------------------------

IntPairField *ToneCurveField::getCurrentSlider() const {
  return dynamic_cast<IntPairField *>(m_sliderStackedWidget->currentWidget());
}

//-----------------------------------------------------------------------------

void ToneCurveField::sliderValueChanged(bool isDragging) {
  std::pair<int, int> values = getCurrentSlider()->getValues();
  getCurrentChannelEditor()->setFirstLastXPosition(values, isDragging);
}

//-----------------------------------------------------------------------------

void ToneCurveField::onFirstLastXPostionChanged(int x0, int x1) {
  std::pair<int, int> values = getCurrentSlider()->getValues();
  if (values.first != x0 || values.second != x1)
    getCurrentSlider()->setValues(std::make_pair(x0, x1));
}

//-----------------------------------------------------------------------------

void ToneCurveField::setIsLinearCheckBox(bool isChecked) {
  if (m_isLinearCheckBox->isChecked() == isChecked) return;
  m_isLinearCheckBox->setChecked(isChecked);
}

//-----------------------------------------------------------------------------

void ToneCurveField::setLinear(bool isLinear) {
  int i;
  for (i = 0; i < m_sliderStackedWidget->count(); i++)
    getChannelEditor(i)->setLinear(isLinear);
}

//-----------------------------------------------------------------------------

void ToneCurveField::setLinearManually(bool isLinear) {
  emit isLinearChanged(isLinear);
}


text:
require 'rails_helper'

RSpec.describe Admin::Archived::PetitionsController, type: :controller, admin: true do
  before do
    FactoryBot.create(:parliament, :archived)
  end

  context "when not logged in" do
    describe "GET /admin/archived/petitions" do
      it "redirects to the login page" do
        get :index
        expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin/login")
      end
    end

    describe "GET /admin/archived/petitions/:id" do
      it "redirects to the login page" do
        get :show, params: { id: "100000" }
        expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin/login")
      end
    end
  end

  context "when logged in as a moderator but need to reset password" do
    let(:user) { FactoryBot.create(:moderator_user, force_password_reset: true) }
    before { login_as(user) }

    describe "GET /admin/archived/petitions" do
      it "redirects to the edit profile page" do
        get :index
        expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin/profile/#{user.id}/edit")
      end
    end

    describe "GET /admin/archived/petitions/:id" do
      it "redirects to the edit profile page" do
        get :show, params: { id: "100000" }
        expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin/profile/#{user.id}/edit")
      end
    end
  end

  context "when logged in as a moderator" do
    let(:user) { FactoryBot.create(:moderator_user) }
    before { login_as(user) }

    describe "GET /admin/archived/petitions" do
      context "when making a HTML request" do
        before { get :index }

        it "returns 200 OK" do
          expect(response).to have_http_status(:ok)
        end

        it "renders the :index template" do
          expect(response).to render_template("admin/archived/petitions/index")
        end
      end

      context "when making a CSV request" do
        before { get :index, format: :csv }

        it "returns a CSV file" do
          expect(response.content_type).to eq("text/csv")
        end

        it "doesn't set the content length" do
          expect(response.content_length).to be_nil
        end

        it "sets the streaming headers" do
          expect(response["X-Accel-Buffering"]).to eq("no")
          expect(response["Cache-Control"]).to match(/no-cache/).or match(/no-store/)
          expect(response["Last-Modified"]).to match(/\w{3}, \d{2} \w{3} \d{4} \d{2}:\d{2}:\d{2} GMT/)
        end

        it "sets the content disposition" do
          expect(response['Content-Disposition']).to match(/attachment; filename=all-petitions-\d{14}\.csv/)
        end
      end

      context "when searching by id" do
        before { get :index, params: { q: "100000" } }

        it "redirects to the admin petition page" do
          expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin/archived/petitions/100000")
        end
      end

      context "when there are no archived parliaments" do
        before do
          allow(Parliament).to receive_message_chain(:archived, :first).and_return(nil)

          get :index
        end

        it "redirects to the admin hub" do
          expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin")
        end

        it "sets the flash notice message" do
          expect(flash[:notice]).to eq("There are no archived petitions")
        end
      end
    end

    describe "GET /admin/archived/petitions/:id" do
      context "when the petition doesn't exist" do
        before { get :show, params: { id: "999999" } }

        it "redirects to the admin dashboard page" do
          expect(response).to redirect_to("https://moderate.petition.parliament.uk/admin")
        end

        it "sets the flash alert message" do
          expect(flash[:alert]).to eq("Sorry, we couldn't find petition 999999")
        end
      end

      context "when the petition exists" do
        let!(:petition) { FactoryBot.create(:archived_petition) }

        before { get :show, params: { id: petition.to_param } }

        it "returns 200 OK" do
          expect(response).to have_http_status(:ok)
        end

        it "renders the :show template" do
          expect(response).to render_template("admin/archived/petitions/show")
        end
      end
    end
  end
end


text:
.DEFAULT_GOAL := help

.PHONY: all
all: help

.PHONY: help
help:
	@echo "Please use \`make <target>' where <target> is one of"
	@echo "  help        to print this help message. (Default)"
	@echo "  docs        to generate the Sphinx documentation."
	@echo "  distclean   to remove *all* files that are not controlled by 'git'. WARNING: use it *only* if you know what you do!"

.PHONY: distclean
distclean:
	@echo "Cleaning distribution ..."
	@git diff --quiet HEAD || echo "There are uncommited changes! Not doing 'git clean' ..."
	@-git clean -dfx

.PHONY: docs
docs:
	@echo "Generating docs with Sphinx ..."
	$(MAKE) -C $@ clean html
	@echo "open your browser: firefox docs/build/html/index.html"


text:
static char NAME##Key; \
- (TYPE) NAME \
{ \
NSNumber *number = (NSNumber *)objc_getAssociatedObject(self, & NAME##Key); \
return number ? number.PRIMITIVE_GETTER : (TYPE)0;\
}\
\
- (void) SETTER:(TYPE)value\
{\
objc_setAssociatedObject(self, & NAME##Key, [NSNumber NSNUMBER_CTOR:value], OBJC_ASSOCIATION_RETAIN_NONATOMIC);\
}

#define PROPERTY_OBJ(NAME, SET_NAME, TYPE) \
static char NAME##Key; \
- (TYPE) NAME { return (TYPE)objc_getAssociatedObject(self, & NAME##Key); } \
- (void) SET_NAME:(TYPE)value { objc_setAssociatedObject(self, & NAME##Key, value, OBJC_ASSOCIATION_RETAIN_NONATOMIC); }

//////////////////////////////////////////////////////////////////////////////////////////


text:
{% extends "tournamentcontrol/competition/division.html" %}
{% load i18n %}

{% block page_title %}{{ block.super }} - {% trans stage.title %} - {% trans pool.title %}{% endblock %}

{% block heading %}
	{{ block.super }}
	{% if stage %}
		<h3>{% trans stage.title %}</h3>
	{% endif %}
{% endblock %}


text:
// ******************************************************************
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
// ******************************************************************

using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;

namespace Microsoft.Toolkit.Uwp.Notifications
{
    internal class BaseTextHelper
    {
        internal static Element_AdaptiveText CreateBaseElement(IBaseText curr)
        {
            return new Element_AdaptiveText()
            {
                Text = curr.Text,
                Lang = curr.Language
            };
        }
    }
}


text:
"""Unittest runner for quantum

To run all test::
    python run_tests.py

To run all unit tests::
    python run_tests.py unit

To run all functional tests::
    python run_tests.py functional

To run a single unit test::
    python run_tests.py unit.test_stores:TestSwiftBackend.test_get

To run a single functional test::
    python run_tests.py functional.test_service:TestController.test_create

To run a single unit test module::
    python run_tests.py unit.test_stores

To run a single functional test module::
    python run_tests.py functional.test_stores
"""

import gettext
import os
import unittest
import sys

from quantum.common.test_lib import run_tests
from nose import config
from nose import core

if __name__ == '__main__':
    working_dir = os.path.abspath("tests")
    c = config.Config(stream=sys.stdout,
                      env=os.environ,
                      verbosity=3,
                      workingDir=working_dir,
                      plugins=core.DefaultPluginManager())
    sys.exit(run_tests(c))


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
                                    xmlns:app="http://schemas.android.com/apk/res-auto"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    app:cardCornerRadius="10dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <TextView
            android:id="@+id/bigday_backward_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/colorPrimary"
            android:gravity="center_horizontal"
            android:paddingBottom="8dp"
            android:paddingTop="8dp"
            android:text="距2017高考还有"
            android:textColor="@android:color/white"
            android:textSize="@dimen/bigday_title_size"/>

        <TextView
            android:id="@+id/bigday_backward_day"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:paddingBottom="16dp"
            android:paddingTop="8dp"
            android:text="100"
            android:textColor="#dd000000"
            android:textSize="34sp"
            android:textStyle="bold"/>
    </LinearLayout>

</android.support.v7.widget.CardView>


text:
/**
 * @fileoverview The program superclass, wrapping a shader program and basic
 * drawing functionality.
 *
 * @author joseph@cs.utexas.edu (Joe Tessler)
 */

goog.provide('cidev.webgl.shader.Program');

goog.require('cidev.generated.glsl');

goog.require('goog.webgl');

/**
 * The super class containing generic shader handling and other utility
 * functions.
 * @param {!cidev.webgl.Context} context The WebGL context wrapper.
 * @param {string} vs Vertex shader code filename.
 * @param {string} fs Fragment shader code filename.
 * @constructor
 */
cidev.webgl.shader.Program = function(context, vs, fs) {
  this.context = context;

  if (!goog.isDef(cidev.generated.glsl[vs]) ||
      !goog.isDef(cidev.generated.glsl[fs])) {
    throw Error('shader does not exist');
  }

  var gl = context.gl;
  this.program = gl.createProgram();
  this.attachShader_(cidev.generated.glsl[vs], goog.webgl.VERTEX_SHADER);
  this.attachShader_(cidev.generated.glsl[fs], goog.webgl.FRAGMENT_SHADER);
  gl.linkProgram(this.program);

  if (!gl.getProgramParameter(this.program, goog.webgl.LINK_STATUS)) {
    throw Error('shader program error: ' + gl.getProgramInfoLog(this.program));
  }
};

/**
 * Activates the current program. This caller MUST call this before rendering
 * any meshes.
 */
cidev.webgl.shader.Program.prototype.activate = function() {
  this.context.gl.useProgram(this.program);
};

/**
 * Sets up the render call, binding vertex attributes, uniforms, etc.
 * @param {!cidev.webgl.Mesh} mesh The mesh object to draw.
 * @param {!cidev.webgl.Camera} camera The view-matrix-wrapping camera.
 * @param {!cidev.webgl.texture.Texture=} opt_texture The (optional) texture
 *     to apply.
 * @protected
 */
cidev.webgl.shader.Program.prototype.setupRender = function(
    mesh, camera, opt_texture) {
  if (goog.isDef(opt_texture) && goog.isDef(this.texture)) {
    this.context.gl.uniform1i(this.texture, opt_texture.unit);
  }
};

/**
 * Renders the given object.
 * @param {!cidev.webgl.Mesh} mesh The mesh object to draw.
 * @param {!cidev.webgl.Camera} camera The view-matrix-wrapping camera.
 * @param {!cidev.webgl.texture.Texture=} opt_texture The (optional) texture
 *     to apply.
 */
cidev.webgl.shader.Program.prototype.render = function(
    mesh, camera, opt_texture) {
  this.setupRender(mesh, camera, opt_texture);
  mesh.bindIndexBuffer();
  this.context.gl.drawElements(
      goog.webgl.TRIANGLES, mesh.indexCount, goog.webgl.UNSIGNED_BYTE, 0);
};

/**
 * Compiles given shader source code into a WebGL shader object, then
 * attaches it to the current program.
 * @param {string} code GLSL plain text source.
 * @param {number} type Shader type, i.e. FRAGMENT_SHADER or VERTEX_SHADER.
 * @private
 */
cidev.webgl.shader.Program.prototype.attachShader_ = function(code, type) {
  var gl = this.context.gl;
  var shader = gl.createShader(type);
  gl.shaderSource(shader, code);
  gl.compileShader(shader);

  if (!gl.getShaderParameter(shader, goog.webgl.COMPILE_STATUS)) {
    throw Error('shader error: ' + gl.getShaderInfoLog(shader));
  } else if (goog.isNull(shader)) {
    throw Error('unknown shader error');
  }

  gl.attachShader(this.program, shader);
};

/**
 * The current WebGL context wrapper.
 * @type {!cidev.webgl.Context}
 * @protected
 */
cidev.webgl.shader.Program.prototype.context;

/**
 * The scene's WebGL shader program.
 * @type {!WebGLProgram}
 * @protected
 */
cidev.webgl.shader.Program.prototype.program;

/**
 * The shader program's texture location.
 * NOTE: Subclasses will assign this member.
 * @type {WebGLUniformLocation}
 * @protected
 */
cidev.webgl.shader.Program.prototype.texture;


text:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://feeds.delicious.com">
    <title>Delicious popular</title>
    <link>http://delicious.com/popular</link>
    <description>the latest popular bookmarks</description>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://www.makeuseof.com/tag/email-to-sms/"/>
        <rdf:li rdf:resource="http://crazeegeekchick.com/blog/27-free-must-have-online-collaboration-tools/"/>
        <rdf:li rdf:resource="http://goingtorain.com/"/>
        <rdf:li rdf:resource="http://www.toxel.com/design/2008/11/26/24-beautiful-and-creative-website-headers/"/>
        <rdf:li rdf:resource="http://www.abduzeedo.com/29-great-free-textures"/>
        <rdf:li rdf:resource="http://livelabs.com/seadragon-ajax/"/>
        <rdf:li rdf:resource="http://www.techradar.com/news/internet/web/esssential-free-apps-for-your-web-design-toolkit-485214?src=rss&attr=all"/>
        <rdf:li rdf:resource="http://www.nydailynews.com/ny_local/2008/11/28/2008-11-28_worker_dies_at_long_island_walmart_after.html"/>
        <rdf:li rdf:resource="http://advogato.org/article/993.html"/>
        <rdf:li rdf:resource="http://www.the-digital-picture.com/Canon-Lenses/Where-To-Buy-Used-Canon-Lenses.aspx"/>
        <rdf:li rdf:resource="http://mashable.com/2008/11/28/how-to-convert-your-blog-into-a-podcast-on-itunes-for-free/"/>
        <rdf:li rdf:resource="http://maketecheasier.com/10-of-the-best-linux-desktop-customization-screenshots-to-inspire-your-creativity/2008/11/28"/>
        <rdf:li rdf:resource="http://logooftheday.com/"/>
        <rdf:li rdf:resource="http://www.boston.com/bigpicture/2008/11/mumbai_under_attack.html"/>
        <rdf:li rdf:resource="http://drawminos.com/"/>
      </rdf:Seq>
    </items>
  </channel>
  <item rdf:about="http://www.makeuseof.com/tag/email-to-sms/">
    <title>How To Send Email To Any Cell Phone (for Free) | MakeUseOf.com</title>
    <dc:date>2008-11-28T00:34:56Z</dc:date>
    <link>http://www.makeuseof.com/tag/email-to-sms/</link>
    <dc:creator>pr1ncess73</dc:creator>
    <dc:subject>email sms phone mobile texting tools text howto cellphone reference</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/email"/>
        <rdf:li rdf:resource="http://delicious.com/tag/sms"/>
        <rdf:li rdf:resource="http://delicious.com/tag/phone"/>
        <rdf:li rdf:resource="http://delicious.com/tag/mobile"/>
        <rdf:li rdf:resource="http://delicious.com/tag/texting"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tools"/>
        <rdf:li rdf:resource="http://delicious.com/tag/text"/>
        <rdf:li rdf:resource="http://delicious.com/tag/howto"/>
        <rdf:li rdf:resource="http://delicious.com/tag/cellphone"/>
        <rdf:li rdf:resource="http://delicious.com/tag/reference"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://crazeegeekchick.com/blog/27-free-must-have-online-collaboration-tools/">
    <title>27 Free Must-have Online Collaboration Tools : Crazeegeekchick.com</title>
    <dc:date>2008-11-26T18:59:46Z</dc:date>
    <link>http://crazeegeekchick.com/blog/27-free-must-have-online-collaboration-tools/</link>
    <dc:creator>atlnav</dc:creator>
    <dc:subject>collaboration tools web2.0 webtools online whiteboard web productivity software tips</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/collaboration"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tools"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web2.0"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webtools"/>
        <rdf:li rdf:resource="http://delicious.com/tag/online"/>
        <rdf:li rdf:resource="http://delicious.com/tag/whiteboard"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/productivity"/>
        <rdf:li rdf:resource="http://delicious.com/tag/software"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tips"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://goingtorain.com/">
    <title>is it going to rain?</title>
    <dc:date>2008-05-23T01:06:00Z</dc:date>
    <link>http://goingtorain.com/</link>
    <dc:creator>jcs</dc:creator>
    <dc:subject>weather rain web2.0 web tool useful simple webdesign tools reference</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/weather"/>
        <rdf:li rdf:resource="http://delicious.com/tag/rain"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web2.0"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tool"/>
        <rdf:li rdf:resource="http://delicious.com/tag/useful"/>
        <rdf:li rdf:resource="http://delicious.com/tag/simple"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdesign"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tools"/>
        <rdf:li rdf:resource="http://delicious.com/tag/reference"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://www.toxel.com/design/2008/11/26/24-beautiful-and-creative-website-headers/">
    <title>Toxel.com » 24 Beautiful and Creative Website Headers</title>
    <dc:date>2008-11-27T05:15:18Z</dc:date>
    <link>http://www.toxel.com/design/2008/11/26/24-beautiful-and-creative-website-headers/</link>
    <dc:creator>pramodc84</dc:creator>
    <dc:subject>webdesign inspiration design website template websites web webdev resources header</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/webdesign"/>
        <rdf:li rdf:resource="http://delicious.com/tag/inspiration"/>
        <rdf:li rdf:resource="http://delicious.com/tag/design"/>
        <rdf:li rdf:resource="http://delicious.com/tag/website"/>
        <rdf:li rdf:resource="http://delicious.com/tag/template"/>
        <rdf:li rdf:resource="http://delicious.com/tag/websites"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdev"/>
        <rdf:li rdf:resource="http://delicious.com/tag/resources"/>
        <rdf:li rdf:resource="http://delicious.com/tag/header"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://www.abduzeedo.com/29-great-free-textures">
    <title>29 Great Free Textures | Abduzeedo - design inspiration & tutorials</title>
    <dc:date>2008-11-26T14:39:45Z</dc:date>
    <link>http://www.abduzeedo.com/29-great-free-textures</link>
    <dc:creator>goofydg1</dc:creator>
    <dc:subject>textures webdesign texture resources photoshop wallpaper web design free background</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/textures"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdesign"/>
        <rdf:li rdf:resource="http://delicious.com/tag/texture"/>
        <rdf:li rdf:resource="http://delicious.com/tag/resources"/>
        <rdf:li rdf:resource="http://delicious.com/tag/photoshop"/>
        <rdf:li rdf:resource="http://delicious.com/tag/wallpaper"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/design"/>
        <rdf:li rdf:resource="http://delicious.com/tag/free"/>
        <rdf:li rdf:resource="http://delicious.com/tag/background"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://livelabs.com/seadragon-ajax/">
    <title>Seadragon Ajax : Microsoft Live Labs</title>
    <dc:date>2008-11-18T23:54:57Z</dc:date>
    <link>http://livelabs.com/seadragon-ajax/</link>
    <dc:creator>gasienica</dc:creator>
    <dc:subject>ajax javascript zoom microsoft seadragon visualization silverlight deepzoom webdesign webdev</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/ajax"/>
        <rdf:li rdf:resource="http://delicious.com/tag/javascript"/>
        <rdf:li rdf:resource="http://delicious.com/tag/zoom"/>
        <rdf:li rdf:resource="http://delicious.com/tag/microsoft"/>
        <rdf:li rdf:resource="http://delicious.com/tag/seadragon"/>
        <rdf:li rdf:resource="http://delicious.com/tag/visualization"/>
        <rdf:li rdf:resource="http://delicious.com/tag/silverlight"/>
        <rdf:li rdf:resource="http://delicious.com/tag/deepzoom"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdesign"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdev"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://www.techradar.com/news/internet/web/esssential-free-apps-for-your-web-design-toolkit-485214?src=rss&amp;attr=all">
    <title>Essential free apps for your web design toolkit | News | TechRadar UK</title>
    <dc:date>2008-11-27T17:13:43Z</dc:date>
    <link>http://www.techradar.com/news/internet/web/esssential-free-apps-for-your-web-design-toolkit-485214?src=rss&attr=all</link>
    <dc:creator>joe4924</dc:creator>
    <dc:subject>tools web webdesign design webdev free source opensource toolkit freeware</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/tools"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdesign"/>
        <rdf:li rdf:resource="http://delicious.com/tag/design"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdev"/>
        <rdf:li rdf:resource="http://delicious.com/tag/free"/>
        <rdf:li rdf:resource="http://delicious.com/tag/source"/>
        <rdf:li rdf:resource="http://delicious.com/tag/opensource"/>
        <rdf:li rdf:resource="http://delicious.com/tag/toolkit"/>
        <rdf:li rdf:resource="http://delicious.com/tag/freeware"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://www.nydailynews.com/ny_local/2008/11/28/2008-11-28_worker_dies_at_long_island_walmart_after.html">
    <title>Worker dies at Long Island Wal-Mart after being trampled in Black Friday stampede</title>
    <dc:date>2008-11-28T15:03:49Z</dc:date>
    <link>http://www.nydailynews.com/ny_local/2008/11/28/2008-11-28_worker_dies_at_long_island_walmart_after.html</link>
    <dc:creator>ecgwesley</dc:creator>
    <dc:subject>news consumerism walmart society america death tv recession media blackfriday</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/news"/>
        <rdf:li rdf:resource="http://delicious.com/tag/consumerism"/>
        <rdf:li rdf:resource="http://delicious.com/tag/walmart"/>
        <rdf:li rdf:resource="http://delicious.com/tag/society"/>
        <rdf:li rdf:resource="http://delicious.com/tag/america"/>
        <rdf:li rdf:resource="http://delicious.com/tag/death"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tv"/>
        <rdf:li rdf:resource="http://delicious.com/tag/recession"/>
        <rdf:li rdf:resource="http://delicious.com/tag/media"/>
        <rdf:li rdf:resource="http://delicious.com/tag/blackfriday"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://advogato.org/article/993.html">
    <title>Advogato: Blurring of MVC lines: Programming the Web Browser.</title>
    <dc:date>2008-11-27T19:53:18Z</dc:date>
    <link>http://advogato.org/article/993.html</link>
    <dc:creator>bearontheroof</dc:creator>
    <dc:subject>mvc javascript programming ajax framework html webdev gwt web pyjamas</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/mvc"/>
        <rdf:li rdf:resource="http://delicious.com/tag/javascript"/>
        <rdf:li rdf:resource="http://delicious.com/tag/programming"/>
        <rdf:li rdf:resource="http://delicious.com/tag/ajax"/>
        <rdf:li rdf:resource="http://delicious.com/tag/framework"/>
        <rdf:li rdf:resource="http://delicious.com/tag/html"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdev"/>
        <rdf:li rdf:resource="http://delicious.com/tag/gwt"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/pyjamas"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://www.the-digital-picture.com/Canon-Lenses/Where-To-Buy-Used-Canon-Lenses.aspx">
    <title>Where to Buy Used Canon Lenses</title>
    <dc:date>2005-06-21T21:43:43Z</dc:date>
    <link>http://www.the-digital-picture.com/Canon-Lenses/Where-To-Buy-Used-Canon-Lenses.aspx</link>
    <dc:creator>aerique</dc:creator>
    <dc:subject>photography canon used shopping lenses camera lens photo equipment resources</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/photography"/>
        <rdf:li rdf:resource="http://delicious.com/tag/canon"/>
        <rdf:li rdf:resource="http://delicious.com/tag/used"/>
        <rdf:li rdf:resource="http://delicious.com/tag/shopping"/>
        <rdf:li rdf:resource="http://delicious.com/tag/lenses"/>
        <rdf:li rdf:resource="http://delicious.com/tag/camera"/>
        <rdf:li rdf:resource="http://delicious.com/tag/lens"/>
        <rdf:li rdf:resource="http://delicious.com/tag/photo"/>
        <rdf:li rdf:resource="http://delicious.com/tag/equipment"/>
        <rdf:li rdf:resource="http://delicious.com/tag/resources"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://mashable.com/2008/11/28/how-to-convert-your-blog-into-a-podcast-on-itunes-for-free/">
    <title>HOW TO: Convert Your Blog Into a Podcast on iTunes for Free</title>
    <dc:date>2008-11-28T17:08:13Z</dc:date>
    <link>http://mashable.com/2008/11/28/how-to-convert-your-blog-into-a-podcast-on-itunes-for-free/</link>
    <dc:creator>quiverandquill</dc:creator>
    <dc:subject>blog podcast podcasting tools itunes blogging web2.0 blogs tips tool</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/blog"/>
        <rdf:li rdf:resource="http://delicious.com/tag/podcast"/>
        <rdf:li rdf:resource="http://delicious.com/tag/podcasting"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tools"/>
        <rdf:li rdf:resource="http://delicious.com/tag/itunes"/>
        <rdf:li rdf:resource="http://delicious.com/tag/blogging"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web2.0"/>
        <rdf:li rdf:resource="http://delicious.com/tag/blogs"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tips"/>
        <rdf:li rdf:resource="http://delicious.com/tag/tool"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://maketecheasier.com/10-of-the-best-linux-desktop-customization-screenshots-to-inspire-your-creativity/2008/11/28">
    <title>10 Of The Best Linux Desktop Customization Screenshots To Inspire Your Creativity - Make Tech Easier</title>
    <dc:date>2008-11-28T00:46:41Z</dc:date>
    <link>http://maketecheasier.com/10-of-the-best-linux-desktop-customization-screenshots-to-inspire-your-creativity/2008/11/28</link>
    <dc:creator>bascht</dc:creator>
    <dc:subject>linux ubuntu desktop customization unix gnome creativity theme lists custom</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/linux"/>
        <rdf:li rdf:resource="http://delicious.com/tag/ubuntu"/>
        <rdf:li rdf:resource="http://delicious.com/tag/desktop"/>
        <rdf:li rdf:resource="http://delicious.com/tag/customization"/>
        <rdf:li rdf:resource="http://delicious.com/tag/unix"/>
        <rdf:li rdf:resource="http://delicious.com/tag/gnome"/>
        <rdf:li rdf:resource="http://delicious.com/tag/creativity"/>
        <rdf:li rdf:resource="http://delicious.com/tag/theme"/>
        <rdf:li rdf:resource="http://delicious.com/tag/lists"/>
        <rdf:li rdf:resource="http://delicious.com/tag/custom"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://logooftheday.com/">
    <title>Logo Of The Day - Logo Design Inspiration, Gallery & Award Scheme!</title>
    <dc:date>2008-11-19T06:56:48Z</dc:date>
    <link>http://logooftheday.com/</link>
    <dc:creator>theskullcave</dc:creator>
    <dc:subject>inspiration logos logo design resources webdesign gallery reference logotype art</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/inspiration"/>
        <rdf:li rdf:resource="http://delicious.com/tag/logos"/>
        <rdf:li rdf:resource="http://delicious.com/tag/logo"/>
        <rdf:li rdf:resource="http://delicious.com/tag/design"/>
        <rdf:li rdf:resource="http://delicious.com/tag/resources"/>
        <rdf:li rdf:resource="http://delicious.com/tag/webdesign"/>
        <rdf:li rdf:resource="http://delicious.com/tag/gallery"/>
        <rdf:li rdf:resource="http://delicious.com/tag/reference"/>
        <rdf:li rdf:resource="http://delicious.com/tag/logotype"/>
        <rdf:li rdf:resource="http://delicious.com/tag/art"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://www.boston.com/bigpicture/2008/11/mumbai_under_attack.html">
    <title>Mumbai under attack - The Big Picture - Boston.com</title>
    <dc:date>2008-11-28T16:58:17Z</dc:date>
    <link>http://www.boston.com/bigpicture/2008/11/mumbai_under_attack.html</link>
    <dc:creator>3rdparty</dc:creator>
    <dc:subject>terrorism photography mumbai news photos photojournalism india politics attack bigpicture</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/terrorism"/>
        <rdf:li rdf:resource="http://delicious.com/tag/photography"/>
        <rdf:li rdf:resource="http://delicious.com/tag/mumbai"/>
        <rdf:li rdf:resource="http://delicious.com/tag/news"/>
        <rdf:li rdf:resource="http://delicious.com/tag/photos"/>
        <rdf:li rdf:resource="http://delicious.com/tag/photojournalism"/>
        <rdf:li rdf:resource="http://delicious.com/tag/india"/>
        <rdf:li rdf:resource="http://delicious.com/tag/politics"/>
        <rdf:li rdf:resource="http://delicious.com/tag/attack"/>
        <rdf:li rdf:resource="http://delicious.com/tag/bigpicture"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
  <item rdf:about="http://drawminos.com/">
    <title>DRAWMINOS</title>
    <dc:date>2008-11-27T06:45:58Z</dc:date>
    <link>http://drawminos.com/</link>
    <dc:creator>lightbookmark</dc:creator>
    <dc:subject>games flash fun game domino dominos design cool web drawminos</dc:subject>
    <taxo:topics>
      <rdf:Bag>
        <rdf:li rdf:resource="http://delicious.com/tag/games"/>
        <rdf:li rdf:resource="http://delicious.com/tag/flash"/>
        <rdf:li rdf:resource="http://delicious.com/tag/fun"/>
        <rdf:li rdf:resource="http://delicious.com/tag/game"/>
        <rdf:li rdf:resource="http://delicious.com/tag/domino"/>
        <rdf:li rdf:resource="http://delicious.com/tag/dominos"/>
        <rdf:li rdf:resource="http://delicious.com/tag/design"/>
        <rdf:li rdf:resource="http://delicious.com/tag/cool"/>
        <rdf:li rdf:resource="http://delicious.com/tag/web"/>
        <rdf:li rdf:resource="http://delicious.com/tag/drawminos"/>
      </rdf:Bag>
    </taxo:topics>
  </item>
</rdf:RDF>


text:
// Package v1 contains API Schema definitions for the cloudcredential v1 API group
// +k8s:openapi-gen=true
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=github.com/openshift/cloud-credential-operator/pkg/apis/cloudcredential
// +k8s:defaulter-gen=TypeMeta
// +groupName=cloudcredential.openshift.io
package v1

import (
	"k8s.io/apimachinery/pkg/runtime/schema"
	"sigs.k8s.io/controller-runtime/pkg/runtime/scheme"
)

var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "cloudcredential.openshift.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme is required by pkg/client/...
	AddToScheme = SchemeBuilder.AddToScheme
)

// Resource is required by pkg/client/listers/...
func Resource(resource string) schema.GroupResource {
	return SchemeGroupVersion.WithResource(resource).GroupResource()
}