text:
package com.eeontheway.android.applocker.share;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Environment;
import com.eeontheway.android.applocker.R;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;

/**
 * 微信分享接口
 * @author lishutong
 * @version v1.0
 * @Time 2016-12-15
 */
public class SystemShare extends ShareBase implements IShare {
    private Context context;

    /**
     * 是否支持分享功能
     * @return true 支持; false 不支持
     */
    @Override
    public boolean isSupported() {
        return true;
    }

    /**
     * 初始化分享接口
     */
    @Override
    public void init (Context context) {
        this.context = context;
    }

    /**
     * 反初始化接口
     */
    @Override
    public void uninit() {
    }

    /**
     * 分享信息到相应接口
     * @param info 待分享的信息
     */
    public void share (ShareInfo info) {
        info.thumbBitmap = null;        // 目前只支持文本分享

        if (info.thumbBitmap != null) {
            // 作为图片分享
            Intent intent = new Intent(Intent.ACTION_SEND_MULTIPLE);
            intent.setType("image/png");
            try {
                // 保存图像文件到SD卡上,以便于分享使用
                String imageUrl = Environment.getExternalStorageDirectory() +
                                                    File.separator + "share_thumb.png";
                OutputStream os = new FileOutputStream(imageUrl);
                info.thumbBitmap.compress(Bitmap.CompressFormat.PNG, 100, os);

                // 将图片分享出去
                ArrayList<Uri> imageList = new ArrayList<>();
                imageList.add(Uri.fromFile(new File(imageUrl)));
                intent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, imageList);
                intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.share_from_app));
                intent.putExtra(Intent.EXTRA_TEXT, info.content);
                intent.putExtra(Intent.EXTRA_TITLE, info.title);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                context.startActivity(Intent.createChooser(intent, context.getString(R.string.please_choose)));
            } catch (IOException e) {
                e.printStackTrace();
            }
        } else {
            //  作为文本分享
            Intent intent = new Intent(Intent.ACTION_SEND);
            intent.setType("text/plain");
            intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.share_from_app));
            intent.putExtra(Intent.EXTRA_TEXT, info.content);
            intent.putExtra(Intent.EXTRA_TITLE, info.title);
            intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(Intent.createChooser(intent, context.getString(R.string.please_choose)));
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
  if(BUILD_TYPE)
    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
  else()
    set(CMAKE_INSTALL_CONFIG_NAME "Debug")
  endif()
  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()

# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
  if(COMPONENT)
    message(STATUS "Install component: \"${COMPONENT}\"")
    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
  else()
    set(CMAKE_INSTALL_COMPONENT)
  endif()
endif()

# Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING)
  set(CMAKE_CROSSCOMPILING "FALSE")
endif()

# Set default install directory permissions.
if(NOT DEFINED CMAKE_OBJDUMP)
  set(CMAKE_OBJDUMP "/usr/bin/objdump")
endif()

if(CMAKE_INSTALL_COMPONENT)
  set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
  set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()

string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
       "${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "/Users/jasonrich/code/cpp-practice/boost-test/build/${CMAKE_INSTALL_MANIFEST}"
     "${CMAKE_INSTALL_MANIFEST_CONTENT}")


text:
package com.ashish;

/**
 * 9.5 ,  Cracking The Coding Interview : Edition : 6
 *

 * Cache:
 *

 * Imagine a web server for a simplified search engine. This system has 100 machines to
 * respond to search queries, which may then call out using processSearch(string query)
 * to another cluster of machines to actually get the result. The machine which responds to a given
 * query is chosen at random, so you cannot guarantee that the same machine will always respond to
 * the same request. The method processSearch is very expensive. Design a caching mechanism
 * to cache the results of the most recent queries. Be sure to explain how you would update the cache
 * when data changes.
 *
 * @author Ashish Sharma on 03/27/2019.
 * @since 03/27/2019.
 */
public class CacheTest {
}


text:
Goal of this project is to create a base empty project for everyone to use.

## Used technologies

Project is built on these technologies:

* Git
    - Source control
* CMake
    - Used as build tool
    - Doxygen generation
    - CTest - for running tests
    - CPack - for packaging the releases
        + NSIS - windows installer
        + RPM / DEB - linux packages
        + compressed archives
* Doxygen
    - For documentation and API reference generation
    - Generates wiki from markdown files
    - Custom modern style included
        + to try modern style see doc/doxygen/Doxyfile.in line 3
        + if you do not care feel free to delete `doc/doxygen/*.html` and `doc/doxygen/*.ccs`
    - Graphviz - for creating UML diagrams with doxygen
* clang-format
    - Configuration file in the root of project for easy formating
    - Clang-format automatically uses nearest *.clang-format* file
    - Target *format* will run format on all source files
* clang-tidy
    - With target *tidy* you can run static code analysis
* cppcheck
    - With target *cppcheck* you can run static code analysis
* [Catch](https://github.com/philsquared/Catch)
    - Modern unit test framework
    - Downloaded via externalproject from *external/CMakeLists.txt*

There is extra support for these:

* .ycm_extra_conf.py for ycmd support
    - Smart autocompletion, goto def, etc.
    - Works in Vim, Emacs, Sublime Text 3, Atom, Visual Studio Code
    - Site: [github.com/Valloric/ycmd](https://github.com/Valloric/ycmd)
* Sublime text 3 project file
    - with build system targets

## Deployment view

To showcase PlantUML, here is a graph for you:

\startuml
top to bottom direction

frame "Internal network" {

    frame "git server" {
      artifact "git repository" as gitS
    }

    frame "build server" {
      artifact "build git repository" as gitB
      node doxygen
      node "build system" as buildB
    }

    frame "developer machine" as dev {
      artifact "local git repository" as gitD
      node "build system" as buildD
      artifact "binaries" as releaseD
    }

    gitD --> buildD
    buildD --> releaseD

    gitS --> gitB
    gitS <--> gitD

    frame "internal web server" {
      artifact "generated documentation" as doc
    }

    :developer: ..> dev : "develops at"
    :developer: ..> doc : "looks at"

    gitB --> doxygen
    doxygen --> doc

}

frame "external web server" {
  artifact "customer support, etc."
  artifact "released versions" as release
}

:customer: ..> release : downloads

gitB --> buildB
buildB -right-> release
\enduml

This graph was generated from this:

~~~
\\startuml
top to bottom direction

frame "Internal network" {

    frame "git server" {
      artifact "git repository" as gitS
    }

    frame "build server" {
      artifact "build git repository" as gitB
      node doxygen
      node "build system" as buildB
    }

    frame "developer machine" as dev {
      artifact "local git repository" as gitD
      node "build system" as buildD
      artifact "binaries" as releaseD
    }

    gitD --> buildD
    buildD --> releaseD

    gitS --> gitB
    gitS <--> gitD

    frame "internal web server" {
      artifact "generated documentation" as doc
    }

    :developer: ..> dev : "develops at"
    :developer: ..> doc : "looks at"

    gitB --> doxygen
    doxygen --> doc

}

frame "external web server" {
  artifact "customer support, etc."
  artifact "released versions" as release
}

:customer: ..> release : downloads

gitB --> buildB
buildB -right-> release
\\enduml

~~~

For more inspiration on what can be done with PlantUML look at their pages [plantuml.com](http://plantuml.com/sequence-diagram), and see #main function for example sequence diagram.


text:
'use strict';

var BatchedBridge = require('BatchedBridge');

var invariant = require('fbjs/lib/invariant');

var levelsMap = {
  log: 'log',
  info: 'info',
  warn: 'warn',
  error: 'error',
  fatal: 'error',
};

class RCTLog {
  // level one of log, info, warn, error, mustfix
  static logIfNoNativeHook() {
    var args = Array.prototype.slice.call(arguments);
    var level = args.shift();
    var logFn = levelsMap[level];
    invariant(
      logFn,
      'Level "' + level + '" not one of ' + Object.keys(levelsMap)
    );
    if (typeof global.nativeLoggingHook === 'undefined') {
      // We already printed in xcode, so only log here if using a js debugger
      console[logFn].apply(console, args);
    }
    return true;
  }
}

BatchedBridge.registerCallableModule(
  'RCTLog',
  RCTLog
);

module.exports = RCTLog;


text:
using namespace arangodb::aql;

size_t ExecutorExpressionContext::numRegisters() const {
  return _inputRow.getNrRegisters();
}

AqlValue ExecutorExpressionContext::getVariableValue(Variable const* variable, bool doCopy,
                                                     bool& mustDestroy) const {
  mustDestroy = false;

  auto const searchId = variable->id;
  size_t i = -1;  // size_t is guaranteed to be unsigned so the overflow is ok
  for (auto const* var : _vars) {
    TRI_ASSERT(var != nullptr);
    ++i;
    if (var->id == searchId) {
      TRI_ASSERT(i < _regs.size());
      if (doCopy) {
        mustDestroy = true;  // as we are copying
        return _inputRow.getValue((_regs)[i]).clone();
      }
      return _inputRow.getValue((_regs)[i]);
    }
  }

  std::string msg("variable not found '");
  msg.append(variable->name);
  msg.append("' in executeSimpleExpression()");
  THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, msg.c_str());
}

ExecutorExpressionContext::ExecutorExpressionContext(Query* query,
                                                     InputAqlItemRow const& inputRow,
                                                     std::vector<Variable const*> const& vars,
                                                     std::vector<RegisterId> const& regs)
    : QueryExpressionContext(query), _inputRow(inputRow), _vars(vars), _regs(regs) {}


text:
{-# LANGUAGE CPP #-}
-- |
-- Copyright   : (c) 2011 Simon Meier
-- License     : BSD3-style (see LICENSE)
--
-- Maintainer  : Simon Meier <iridcode@gmail.com>
-- Stability   : experimental
-- Portability : GHC
--
-- Hexadecimal encoding of nibbles (4-bit) and octets (8-bit) as ASCII
-- characters.
--
-- The current implementation is based on a table based encoding inspired by
-- the code in the 'base64-bytestring' library by Bryan O'Sullivan. In our
-- benchmarks on a 32-bit machine it turned out to be the fastest
-- implementation option.
--
module Data.ByteString.Lazy.Builder.BasicEncoding.Internal.Base16 (
    EncodingTable
  -- , upperTable
  , lowerTable
  , encode4_as_8
  , encode8_as_16h
  -- , encode8_as_8_8
  ) where

import qualified Data.ByteString          as S
import qualified Data.ByteString.Internal as S

#if MIN_VERSION_base(4,4,0)
import           Foreign hiding (unsafePerformIO, unsafeForeignPtrToPtr)
import           Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
import           System.IO.Unsafe (unsafePerformIO)
#else
import           Foreign
#endif

-- Creating the encoding tables
-------------------------------

-- TODO: Use table from C implementation.

-- | An encoding table for Base16 encoding.
newtype EncodingTable = EncodingTable (ForeignPtr Word8)

tableFromList :: [Word8] -> EncodingTable
tableFromList xs = case S.pack xs of S.PS fp _ _ -> EncodingTable fp

unsafeIndex :: EncodingTable -> Int -> IO Word8
unsafeIndex (EncodingTable table) = peekElemOff (unsafeForeignPtrToPtr table)

base16EncodingTable :: EncodingTable -> IO EncodingTable
base16EncodingTable alphabet = do
    xs <- sequence $ concat $ [ [ix j, ix k] | j <- [0..15], k <- [0..15] ]
    return $ tableFromList xs
  where
    ix = unsafeIndex alphabet

{-
{-# NOINLINE upperAlphabet #-}
upperAlphabet :: EncodingTable
upperAlphabet =
    tableFromList $ map (fromIntegral . fromEnum) $ ['0'..'9'] ++ ['A'..'F']

-- | The encoding table for hexadecimal values with upper-case characters;
-- e.g., DEADBEEF.
{-# NOINLINE upperTable #-}
upperTable :: EncodingTable
upperTable = unsafePerformIO $ base16EncodingTable upperAlphabet
-}

{-# NOINLINE lowerAlphabet #-}
lowerAlphabet :: EncodingTable
lowerAlphabet =
    tableFromList $ map (fromIntegral . fromEnum) $ ['0'..'9'] ++ ['a'..'f']

-- | The encoding table for hexadecimal values with lower-case characters;
-- e.g., deadbeef.
{-# NOINLINE lowerTable #-}
lowerTable :: EncodingTable
lowerTable = unsafePerformIO $ base16EncodingTable lowerAlphabet

-- Encoding nibbles and octets
------------------------------

-- | Encode a nibble as an octet.
--
-- > encode4_as_8 lowerTable 10 = fromIntegral (char 'a')
--
{-# INLINE encode4_as_8 #-}
encode4_as_8 :: EncodingTable -> Word8 -> IO Word8
encode4_as_8 table x = unsafeIndex table (2 * fromIntegral x + 1)
-- TODO: Use a denser table to reduce cache utilization.

-- | Encode an octet as 16bit word comprising both encoded nibbles ordered
-- according to the host endianness. Writing these 16bit to memory will write
-- the nibbles in the correct order (i.e. big-endian).
{-# INLINE encode8_as_16h #-}
encode8_as_16h :: EncodingTable -> Word8 -> IO Word16
encode8_as_16h (EncodingTable table) =
    peekElemOff (castPtr $ unsafeForeignPtrToPtr table) . fromIntegral

{-
-- | Encode an octet as a big-endian ordered tuple of octets; i.e.,
--
-- >   encode8_as_8_8 lowerTable 10
-- > = (fromIntegral (chr '0'), fromIntegral (chr 'a'))
--
{-# INLINE encode8_as_8_8 #-}
encode8_as_8_8 :: EncodingTable -> Word8 -> IO (Word8, Word8)
encode8_as_8_8 table x =
    (,) <$> unsafeIndex table i <*> unsafeIndex table (i + 1)
  where
    i = 2 * fromIntegral x
-}


text:
You can get an index with the command: svn co https://plugins.svn.wordpress.org/

wpplugindownloader
==================

Downloads Wordpress plugins for vulnerability research.
Usage :./download-p.sh <pagenumber> <searchstring>

So ./download-p.sh 1 file
will download all plugins from page 1 from of the search using keyword file.  I'll improve on this once I get more time.

Do a for x in `seq 1 1000 or how many total pages are returned from the search`; do ./download-p.sh $x file ; done


text:
function theSmallestLexicographicalPropertInObject (object)
{
	for (var firstProperty in object)
	{
		var max = property;
		var min = property;
		break;
	}
	for (var property in object)
	{
		if (property > max)
		{
			max = property;
		}
		if (property < min)
		{
			min = property;
		}
	}
	alert("The smallest lexicographically property in " + object + " is " + min);
	alert("The biggest lexicographically property in " + object + " is " + max);
}
theSmallestLexicographicalPropertInObject(document);
theSmallestLexicographicalPropertInObject(window);
theSmallestLexicographicalPropertInObject(navigator);


text:
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>LevelCollection.Add Method</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />

            Apache log4net™ SDK Documentation - Microsoft .NET Framework 4.0

LevelCollection.Add Method

 Adds a Level to the end of the LevelCollection.

        [Visual Basic]

Overridable Public Function Add( _
   ByVal item As Level _
) As Integer

        [C#]

public virtual int Add(
   Level item
);

Parameters

          item

The Level to be added to the end of the LevelCollection.

Return Value

The index at which the value has been added.

See Also

        LevelCollection Class | log4net.Core Namespace

      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="Add method">
        </param>
        <param name="Keyword" value="Add method, LevelCollection class">
        </param>
        <param name="Keyword" value="LevelCollection.Add method">
        </param>
      </object>

Copyright 2004-2013 The Apache Software Foundation.

Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.


text:
package org.kie.internal.fluent.builder;

import org.kie.api.io.Resource;
import org.kie.api.io.ResourceConfiguration;
import org.kie.api.io.ResourceType;

public interface KnowledgeBuilderFluent<T> {

    T add(Resource resource,
          ResourceType type);

    T add(Resource resource,
          ResourceType type,
          ResourceConfiguration configuration);

}


text:
import {NgModule} from "@angular/core";
import {CommonModule} from "@angular/common";
import {JigsawMobileListLiteModule} from "jigsaw/mobile_public_api";
import {JigsawDemoDescriptionModule} from "app/for-internal/description/demo-description";
import {ListLiteFullDemoComponent} from "./demo.component";

import {JigsawMobileHeaderModule} from "jigsaw/mobile_public_api";

@NgModule({
    imports: [
        JigsawMobileListLiteModule, CommonModule,
        JigsawDemoDescriptionModule
    , JigsawMobileHeaderModule],
    declarations: [ListLiteFullDemoComponent],
    exports: [ListLiteFullDemoComponent]
})
export class ListLiteFullDemoModule {
}


text:
Feather.WebGL = function(canvas)
{
	this.canvas = canvas;
	this.meshes = new Array();
	this.vertexBuffers = new Array();
	this.indexBuffers = new Array();
	this.meshBuffers = new Array();

	try
	{
		this.context = this.canvas.getContext('experimental-webgl', { antialias: true });
		if (this.context == null)
			this.context = this.canvas.getContext('webgl', { antialias: true });
	} catch(e)
	{
		console.log(e);
		return;
	}

	var gl = this.context;

	// Setup
	gl.clearColor(0, 0, 0, 0);
	gl.clearDepth(1);
	gl.enable(gl.DEPTH_TEST);
	gl.depthFunc(gl.LEQUAL);
	gl.enable(gl.BLEND);
	gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
	gl.enable(gl.LIGHTING);
//	gl.enable(0x0B10);
//	gl.enable(gl.GL_LINE_SMOOTH);
	gl.enable(0x8642)
//	gl.enable(gl.TEXTURE_2D);

	// Create Shader Program
	this.ShaderProgram = gl.createProgram();

	var vertexShader = this.getShader(gl.VERTEX_SHADER, this.shaders['vertex'].join("\n"));
	gl.attachShader(this.ShaderProgram, vertexShader);

	var fragmentShader = this.getShader(gl.FRAGMENT_SHADER, this.shaders['fragment'].join("\n"));
	gl.attachShader(this.ShaderProgram, fragmentShader);

	gl.linkProgram(this.ShaderProgram);

	if (!gl.getProgramParameter(this.ShaderProgram, gl.LINK_STATUS))
		console.log("Unable to intialize the shader program.");

	gl.useProgram(this.ShaderProgram);

	// Save Matrix Locations
	this.MatrixLocations = new Array();
	this.MatrixLocations['Projection'] = gl.getUniformLocation(this.ShaderProgram, "uProjectionMatrix");
	this.MatrixLocations['ModelView'] = gl.getUniformLocation(this.ShaderProgram, "uModelViewMatrix");
	this.MatrixLocations['Normal'] = gl.getUniformLocation(this.ShaderProgram, "uNormalMatrix");

	// Save Attribute Locations
	this.AttributeLocations = new Array();
	this.AttributeLocations['Vertex'] = gl.getAttribLocation(this.ShaderProgram, "aVertex");
	this.AttributeLocations['Normal'] = gl.getAttribLocation(this.ShaderProgram, "aNormal");
	this.AttributeLocations['Color'] = gl.getAttribLocation(this.ShaderProgram, "aColor");

	gl.enableVertexAttribArray(this.AttributeLocations['Vertex']);
	gl.enableVertexAttribArray(this.AttributeLocations['Normal']);
	gl.enableVertexAttribArray(this.AttributeLocations['Color']);

	// Save Uniform Locations
	this.UniformLocations = new Array();
	this.UniformLocations['AmbientLightColor'] = gl.getUniformLocation(this.ShaderProgram, "uAmbientLightColor");
	this.UniformLocations['LightingDirection'] = gl.getUniformLocation(this.ShaderProgram, "uLightingDirection");
	this.UniformLocations['DirectionalColor'] = gl.getUniformLocation(this.ShaderProgram, "uDirectionalColor");
	this.UniformLocations['UseLighting'] = gl.getUniformLocation(this.ShaderProgram, "uUseLighting");
};

Feather.WebGL.prototype.updateBuffers = function(mesh, vertexArray, indexArray)
{
	var id = this.meshes.indexOf(mesh)
	if (id == -1)
	{
		this.meshes.push(mesh);

		id = this.meshes.indexOf(mesh);

		this.vertexBuffers[id] = this.context.createBuffer();
		this.indexBuffers[id] = this.context.createBuffer();
	}

	gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffers[id]);
	gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertexArray), gl.STATIC_DRAW);

	gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.indexBuffers[id]);
	gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(indexArray), gl.STATIC_DRAW);
};

Feather.WebGL.prototype.getVertexBuffer = function(mesh)
{
	var id = this.meshes.indexOf(mesh);

	if (id != -1)
		return this.vertexBuffers[id];

	return null;
};

Feather.WebGL.prototype.getIndexBuffer = function(mesh)
{
	var id = this.meshes.indexOf(mesh);

	if (id != -1)
		return this.indexBuffers[id];

	return null;
};

Feather.WebGL.prototype.getShader = function(type, source)
{
	gl = this.context;
	shader = gl.createShader(type);
	gl.shaderSource(shader, source);
	gl.compileShader(shader);

	if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS))
	{
		console.log("An error occurred compiling the shader: " + type + "\n" + gl.getShaderInfoLog(shader));
		return null;
	}

	return shader;
};


text:
// ReSharper disable UnusedAutoPropertyAccessor.Local
namespace Apache.Ignite.AspNet.Tests
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading.Tasks;
    using Apache.Ignite.AspNet.Impl;
    using Apache.Ignite.Core;
    using Apache.Ignite.Core.Cache;
    using Apache.Ignite.Core.Cache.Configuration;
    using Apache.Ignite.Core.Cache.Expiry;
    using Apache.Ignite.Core.Cache.Query;
    using Apache.Ignite.Core.Cache.Query.Continuous;
    using Apache.Ignite.Core.Cluster;
    using NUnit.Framework;

    /// <summary>
    /// Tests for <see cref="ExpiryCacheHolder{TK,TV}"/>.
    /// </summary>
    public class ExpiryCacheHolderTest
    {
        /// <summary>
        /// Tests the expiry policy.
        /// </summary>
        [Test]
        public void TestExpiryPolicy()
        {
            var cache = new CacheEx();

            Assert.IsNull(cache.ExpiryPolicy);

            var holder = new ExpiryCacheHolder<int, int>(cache);

            // Check same cache for same expiry.
            var cache1 = (CacheEx) holder.GetCacheWithExpiry(15);

            CheckExpiry(TimeSpan.FromSeconds(15), cache1);
            Assert.AreNotSame(cache, cache1);
            Assert.AreSame(cache1, holder.GetCacheWithExpiry(15));

            // Check rounding.
            var cache2 = (CacheEx) holder.GetCacheWithExpiry(DateTime.UtcNow.AddSeconds(15.1));
            Assert.AreSame(cache1, cache2);

            // Check no expiration.
            var cache3 = (CacheEx) holder.GetCacheWithExpiry(DateTime.MaxValue);
            Assert.AreSame(cache, cache3);
        }

        /// <summary>
        /// Checks the expiry.
        /// </summary>
        private static void CheckExpiry(TimeSpan timeSpan, CacheEx cache)
        {
            Assert.AreEqual(timeSpan, cache.ExpiryPolicy.GetExpiryForCreate());
            Assert.IsNull(cache.ExpiryPolicy.GetExpiryForUpdate());
            Assert.IsNull(cache.ExpiryPolicy.GetExpiryForAccess());
        }

        /// <summary>
        /// Test cache implementation.
        /// </summary>
        private class CacheEx : ICache<int, int>
        {
            public IExpiryPolicy ExpiryPolicy { get; set; }

            public IEnumerator<ICacheEntry<int, int>> GetEnumerator()
            {
                throw new NotImplementedException();
            }

            IEnumerator IEnumerable.GetEnumerator()
            {
                return GetEnumerator();
            }

            public string Name { get; private set; }

            public IIgnite Ignite { get; private set; }

            public CacheConfiguration GetConfiguration()
            {
                throw new NotImplementedException();
            }

            public bool IsEmpty()
            {
                throw new NotImplementedException();
            }

            public bool IsKeepBinary { get; private set; }

            public bool IsAllowAtomicOpsInTx { get; private set; }

            public ICache<int, int> WithSkipStore()
            {
                throw new NotImplementedException();
            }

            public ICache<int, int> WithExpiryPolicy(IExpiryPolicy plc)
            {
                return new CacheEx {ExpiryPolicy = plc};
            }

            public ICache<TK1, TV1> WithKeepBinary<TK1, TV1>()
            {
                throw new NotImplementedException();
            }

            public ICache<int, int> WithAllowAtomicOpsInTx()
            {
                throw new NotImplementedException();
            }

            public void LoadCache(ICacheEntryFilter<int, int> p, params object[] args)
            {
                throw new NotImplementedException();
            }

            public Task LoadCacheAsync(ICacheEntryFilter<int, int> p, params object[] args)
            {
                throw new NotImplementedException();
            }

            public void LocalLoadCache(ICacheEntryFilter<int, int> p, params object[] args)
            {
                throw new NotImplementedException();
            }

            public Task LocalLoadCacheAsync(ICacheEntryFilter<int, int> p, params object[] args)
            {
                throw new NotImplementedException();
            }

            public void LoadAll(IEnumerable<int> keys, bool replaceExistingValues)
            {
                throw new NotImplementedException();
            }

            public Task LoadAllAsync(IEnumerable<int> keys, bool replaceExistingValues)
            {
                throw new NotImplementedException();
            }

            public bool ContainsKey(int key)
            {
                throw new NotImplementedException();
            }

            public Task<bool> ContainsKeyAsync(int key)
            {
                throw new NotImplementedException();
            }

            public bool ContainsKeys(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public Task<bool> ContainsKeysAsync(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public int LocalPeek(int key, params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public bool TryLocalPeek(int key, out int value, params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public int this[int key]
            {
                get { throw new NotImplementedException(); }
                set { throw new NotImplementedException(); }
            }

            public int Get(int key)
            {
                throw new NotImplementedException();
            }

            public Task<int> GetAsync(int key)
            {
                throw new NotImplementedException();
            }

            public bool TryGet(int key, out int value)
            {
                throw new NotImplementedException();
            }

            public Task<CacheResult<int>> TryGetAsync(int key)
            {
                throw new NotImplementedException();
            }

            public ICollection<ICacheEntry<int, int>> GetAll(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public Task<ICollection<ICacheEntry<int, int>>> GetAllAsync(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public void Put(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task PutAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public CacheResult<int> GetAndPut(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task<CacheResult<int>> GetAndPutAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public CacheResult<int> GetAndReplace(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task<CacheResult<int>> GetAndReplaceAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public CacheResult<int> GetAndRemove(int key)
            {
                throw new NotImplementedException();
            }

            public Task<CacheResult<int>> GetAndRemoveAsync(int key)
            {
                throw new NotImplementedException();
            }

            public bool PutIfAbsent(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task<bool> PutIfAbsentAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public CacheResult<int> GetAndPutIfAbsent(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task<CacheResult<int>> GetAndPutIfAbsentAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public bool Replace(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task<bool> ReplaceAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public bool Replace(int key, int oldVal, int newVal)
            {
                throw new NotImplementedException();
            }

            public Task<bool> ReplaceAsync(int key, int oldVal, int newVal)
            {
                throw new NotImplementedException();
            }

            public void PutAll(IEnumerable<KeyValuePair<int, int>> vals)
            {
                throw new NotImplementedException();
            }

            public Task PutAllAsync(IEnumerable<KeyValuePair<int, int>> vals)
            {
                throw new NotImplementedException();
            }

            public void LocalEvict(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public void Clear()
            {
                throw new NotImplementedException();
            }

            public Task ClearAsync()
            {
                throw new NotImplementedException();
            }

            public void Clear(int key)
            {
                throw new NotImplementedException();
            }

            public Task ClearAsync(int key)
            {
                throw new NotImplementedException();
            }

            public void ClearAll(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public Task ClearAllAsync(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public void LocalClear(int key)
            {
                throw new NotImplementedException();
            }

            public void LocalClearAll(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public bool Remove(int key)
            {
                throw new NotImplementedException();
            }

            public Task<bool> RemoveAsync(int key)
            {
                throw new NotImplementedException();
            }

            public bool Remove(int key, int val)
            {
                throw new NotImplementedException();
            }

            public Task<bool> RemoveAsync(int key, int val)
            {
                throw new NotImplementedException();
            }

            public void RemoveAll(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public Task RemoveAllAsync(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public void RemoveAll()
            {
                throw new NotImplementedException();
            }

            public Task RemoveAllAsync()
            {
                throw new NotImplementedException();
            }

            public int GetLocalSize(params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public int GetSize(params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public Task<int> GetSizeAsync(params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public long GetSizeLong(params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public long GetSizeLong(int partition, params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public Task<long> GetSizeLongAsync(params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public Task<long> GetSizeLongAsync(int partition, params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public long GetLocalSizeLong(params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public long GetLocalSizeLong(int partition, params CachePeekMode[] modes)
            {
                throw new NotImplementedException();
            }

            public IQueryCursor<ICacheEntry<int, int>> Query(QueryBase qry)
            {
                throw new NotImplementedException();
            }

            public IFieldsQueryCursor Query(SqlFieldsQuery qry)
            {
                throw new NotImplementedException();
            }

            public IQueryCursor<IList> QueryFields(SqlFieldsQuery qry)
            {
                throw new NotImplementedException();
            }

            public IContinuousQueryHandle QueryContinuous(ContinuousQuery<int, int> qry)
            {
                throw new NotImplementedException();
            }

            public IContinuousQueryHandle<ICacheEntry<int, int>> QueryContinuous(ContinuousQuery<int, int> qry, QueryBase initialQry)
            {
                throw new NotImplementedException();
            }

            public IEnumerable<ICacheEntry<int, int>> GetLocalEntries(params CachePeekMode[] peekModes)
            {
                throw new NotImplementedException();
            }

            public TRes Invoke<TArg, TRes>(int key, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
            {
                throw new NotImplementedException();
            }

            public Task<TRes> InvokeAsync<TArg, TRes>(int key, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
            {
                throw new NotImplementedException();
            }

            public ICollection<ICacheEntryProcessorResult<int, TRes>> InvokeAll<TArg, TRes>(IEnumerable<int> keys, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
            {
                throw new NotImplementedException();
            }

            public Task<ICollection<ICacheEntryProcessorResult<int, TRes>>> InvokeAllAsync<TArg, TRes>(IEnumerable<int> keys, ICacheEntryProcessor<int, int, TArg, TRes> processor, TArg arg)
            {
                throw new NotImplementedException();
            }

            public ICacheLock Lock(int key)
            {
                throw new NotImplementedException();
            }

            public ICacheLock LockAll(IEnumerable<int> keys)
            {
                throw new NotImplementedException();
            }

            public bool IsLocalLocked(int key, bool byCurrentThread)
            {
                throw new NotImplementedException();
            }

            public ICacheMetrics GetMetrics()
            {
                throw new NotImplementedException();
            }

            public ICacheMetrics GetMetrics(IClusterGroup clusterGroup)
            {
                throw new NotImplementedException();
            }

            public ICacheMetrics GetLocalMetrics()
            {
                throw new NotImplementedException();
            }

            public Task Rebalance()
            {
                throw new NotImplementedException();
            }

            public ICache<int, int> WithNoRetries()
            {
                throw new NotImplementedException();
            }

            public ICache<int, int> WithPartitionRecover()
            {
                throw new NotImplementedException();
            }

            public ICollection<int> GetLostPartitions()
            {
                throw new NotImplementedException();
            }

            public IQueryMetrics GetQueryMetrics()
            {
                throw new NotImplementedException();
            }

            public void ResetQueryMetrics()
            {
                throw new NotImplementedException();
            }

            public void PreloadPartition(int partition)
            {
                throw new NotImplementedException();
            }

            public Task PreloadPartitionAsync(int partition)
            {
                throw new NotImplementedException();
            }

            public bool LocalPreloadPartition(int partition)
            {
                throw new NotImplementedException();
            }
        }
    }
}


text:
{% extends "base.django.html" %}
{% load canvas_tags %}
{% load compress %}

{% block title %} - Signup {% endblock %}

{% block header %}{% endblock %}

{% block extra_css %}
{% compress css %}
<link rel="stylesheet" href="/static/css/signup.css"/>
{% endcompress %}
{% endblock %}

{% block content %}

    <form id="signup_form" class="signup" method="POST">

        {% if bypass_copy %}

                {{bypass_copy|safe}}

        {% endif %}

        {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}">
            <input type="hidden" name="next_params" value="{{ next_params }}">

                desired Canvas username
                <input id="form_username" type="text" class="username" name="username" value="{{ username }}" spellcheck="false" autocomplete="off">

                email address
                <input id="form_email" type="text" name="email" class="email" value="{{ email }}" spellcheck="false" autocomplete="off">

                password
                <input id="form_password" type="password" class="password" name="password" value="{{ password }}" spellcheck="false" autocomplete="off">

            <input type="submit" class="advance" value="Signup for Canvas">

{{ message|safe }}

    </form>

What is Canvas?

            Canvas is a place to share and play with images. Explore new content created by other users, vote on
            your favorites, and even make your own image remixes with the in-browser editor.

            Already have an account? Log in here.

{% endblock %}

{% compress js %}

{% endcompress %}

{% block extra_javascript %}

{% endblock %}

{% block footer %}{% endblock %}
{% block base_ready %}{% endblock %}
{% block base_onload %}{% endblock %}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.squareup.wire.android.app.variants">

  <application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:supportsRtl="true"
      android:theme="@style/Theme.MyVariantSample">
    <activity android:name="com.squareup.wire.android.app.variants.MainActivity">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
  </application>

</manifest>


text:
package com.digitalpebble.stormcrawler.parse;

import com.digitalpebble.stormcrawler.Metadata;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

public class ParseResult implements Iterable<Map.Entry<String, ParseData>> {

    private List<Outlink> outlinks;
    private final Map<String, ParseData> parseMap;

    public ParseResult() {
        this(new HashMap<String, ParseData>(), new ArrayList<>());
    }

    public ParseResult(List<Outlink> links) {
        this(new HashMap<String, ParseData>(), links);
    }

    public ParseResult(Map<String, ParseData> map) {
        this(map, new ArrayList<>());
    }

    public ParseResult(Map<String, ParseData> map, List<Outlink> links) {
        if (map == null) {
            throw new NullPointerException();
        }
        parseMap = map;
        outlinks = links;
    }

    public boolean isEmpty() {
        return parseMap.isEmpty();
    }

    public int size() {
        return parseMap.size();
    }

    public List<Outlink> getOutlinks() {
        return outlinks;
    }

    public void setOutlinks(List<Outlink> outlinks) {
        this.outlinks = outlinks;
    }

    /**
     * @return An existent instance of Parse for the given URL or an empty one if none can be found,
     *     useful to avoid unnecessary checks in the parse plugins
     */
    public ParseData get(String URL) {
        ParseData parse = parseMap.get(URL);
        if (parse == null) {
            parse = new ParseData();
            parseMap.put(URL, parse);
            return parse;
        }
        return parse;
    }

    public String[] getValues(String URL, String key) {
        ParseData parseInfo = parseMap.get(URL);
        if (parseInfo == null) {
            return null;
        }
        return parseInfo.getValues(key);
    }

    /** Add the key value to the metadata object for a given URL * */
    public void put(String URL, String key, String value) {
        get(URL).getMetadata().addValue(key, value);
    }

    /** Set the metadata for a given URL * */
    public void set(String URL, Metadata metadata) {
        get(URL).setMetadata(metadata);
    }

    public Map<String, ParseData> getParseMap() {
        return parseMap;
    }

    @Override
    public Iterator<Map.Entry<String, ParseData>> iterator() {
        return parseMap.entrySet().iterator();
    }

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

        sb.append("METADATA\n");

        parseMap.forEach(
                (k, v) ->
                        sb.append(k).append(": ").append(v.getMetadata().toString()).append("\n"));

        sb.append("\nOUTLINKS\n");

        outlinks.forEach(k -> sb.append(k.toString()).append("\n"));

        return sb.toString();
    }
}


text:
<?php

namespace spec\Sylius\Component\Core\Model;

use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\AdminUser;
use Sylius\Component\Core\Model\AdminUserInterface;
use Sylius\Component\User\Model\User;
use Sylius\Component\User\Model\UserInterface;

/**
 * @author Arkadiusz Krakowiak <arkadiusz.krakowiak@lakion.com>
 */
class AdminUserSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType(AdminUser::class);
    }

    function it_extends_a_base_user_model()
    {
        $this->shouldHaveType(User::class);
    }

    function it_implements_an_admin_user_interface()
    {
        $this->shouldImplement(AdminUserInterface::class);
    }

    function it_implements_a_user_interface()
    {
        $this->shouldImplement(UserInterface::class);
    }

    function it_has_first_name_and_last_name()
    {
        $this->setFirstName('John');
        $this->getFirstName()->shouldReturn('John');

        $this->setLastName('Doe');
        $this->getLastName()->shouldReturn('Doe');
    }

    function it_has_mutable_locale_code()
    {
        $this->getLocaleCode()->shouldReturn(null);
        $this->setLocaleCode('en_US');
        $this->getLocaleCode()->shouldReturn('en_US');
    }
}


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.msforms;
import com.wilutions.com.*;

/**
 * IMdcCombo.
 *
 */
@CoInterface(guid="{8BD21D33-EC42-11CE-9E0D-00AA006002F3}")
public interface IMdcCombo extends IDispatch {
  static boolean __typelib__loaded = __TypeLib.load();
  @DeclDISPID(-500)  public void setAutoSize(final Boolean value) throws ComException;
  @DeclDISPID(-500)  public Boolean getAutoSize() throws ComException;
  @DeclDISPID(217)  public void setAutoTab(final Boolean value) throws ComException;
  @DeclDISPID(217)  public Boolean getAutoTab() throws ComException;
  @DeclDISPID(218)  public void setAutoWordSelect(final Boolean value) throws ComException;
  @DeclDISPID(218)  public Boolean getAutoWordSelect() throws ComException;
  @DeclDISPID(-501)  public void setBackColor(final OLE_COLOR value) throws ComException;
  @DeclDISPID(-501)  public OLE_COLOR getBackColor() throws ComException;
  @DeclDISPID(-502)  public void setBackStyle(final fmBackStyle value) throws ComException;
  @DeclDISPID(-502)  public fmBackStyle getBackStyle() throws ComException;
  @DeclDISPID(-503)  public void setBorderColor(final OLE_COLOR value) throws ComException;
  @DeclDISPID(-503)  public OLE_COLOR getBorderColor() throws ComException;
  @DeclDISPID(-504)  public void setBorderStyle(final fmBorderStyle value) throws ComException;
  @DeclDISPID(-504)  public fmBorderStyle getBorderStyle() throws ComException;
  @DeclDISPID(501)  public void setBoundColumn(final Object value) throws ComException;
  @DeclDISPID(501)  public Object getBoundColumn() throws ComException;
  @DeclDISPID(25)  public Boolean getCanPaste() throws ComException;
  @DeclDISPID(601)  public void setColumnCount(final Integer value) throws ComException;
  @DeclDISPID(601)  public Integer getColumnCount() throws ComException;
  @DeclDISPID(602)  public void setColumnHeads(final Boolean value) throws ComException;
  @DeclDISPID(602)  public Boolean getColumnHeads() throws ComException;
  @DeclDISPID(603)  public void setColumnWidths(final String value) throws ComException;
  @DeclDISPID(603)  public String getColumnWidths() throws ComException;
  @DeclDISPID(210)  public Integer getCurTargetX() throws ComException;
  @DeclDISPID(208)  public void setCurX(final Integer value) throws ComException;
  @DeclDISPID(208)  public Integer getCurX() throws ComException;
  @DeclDISPID(305)  public void setDropButtonStyle(final fmDropButtonStyle value) throws ComException;
  @DeclDISPID(305)  public fmDropButtonStyle getDropButtonStyle() throws ComException;
  @DeclDISPID(-514)  public void setEnabled(final Boolean value) throws ComException;
  @DeclDISPID(-514)  public Boolean getEnabled() throws ComException;
  @DeclDISPID(-512)  public void setFont(final Font value) throws ComException;
  @DeclDISPID(-512)  public Font getFont() throws ComException;
  @DeclDISPID(-513)  public void setForeColor(final OLE_COLOR value) throws ComException;
  @DeclDISPID(-513)  public OLE_COLOR getForeColor() throws ComException;
  @DeclDISPID(207)  public void setHideSelection(final Boolean value) throws ComException;
  @DeclDISPID(207)  public Boolean getHideSelection() throws ComException;
  @DeclDISPID(214)  public Integer getLineCount() throws ComException;
  @DeclDISPID(-531)  public Integer getListCount() throws ComException;
  @DeclDISPID(-526)  public void setListIndex(final Object value) throws ComException;
  @DeclDISPID(-526)  public Object getListIndex() throws ComException;
  @DeclDISPID(605)  public void setListRows(final Integer value) throws ComException;
  @DeclDISPID(605)  public Integer getListRows() throws ComException;
  @DeclDISPID(307)  public void setListStyle(final fmListStyle value) throws ComException;
  @DeclDISPID(307)  public fmListStyle getListStyle() throws ComException;
  @DeclDISPID(606)  public void setListWidth(final Object value) throws ComException;
  @DeclDISPID(606)  public Object getListWidth() throws ComException;
  @DeclDISPID(10)  public void setLocked(final Boolean value) throws ComException;
  @DeclDISPID(10)  public Boolean getLocked() throws ComException;
  @DeclDISPID(504)  public void setMatchEntry(final fmMatchEntry value) throws ComException;
  @DeclDISPID(504)  public fmMatchEntry getMatchEntry() throws ComException;
  @DeclDISPID(505)  public Boolean getMatchFound() throws ComException;
  @DeclDISPID(503)  public void setMatchRequired(final Boolean value) throws ComException;
  @DeclDISPID(503)  public Boolean getMatchRequired() throws ComException;
  @DeclDISPID(-533)  public void setMaxLength(final Integer value) throws ComException;
  @DeclDISPID(-533)  public Integer getMaxLength() throws ComException;
  @DeclDISPID(-522)  public void setMouseIcon(final com.wilutions.mslib.stdole.Picture value) throws ComException;
  @DeclDISPID(-522)  public com.wilutions.mslib.stdole.Picture getMouseIcon() throws ComException;
  @DeclDISPID(-521)  public void setMousePointer(final fmMousePointer value) throws ComException;
  @DeclDISPID(-521)  public fmMousePointer getMousePointer() throws ComException;
  @DeclDISPID(220)  public void setSelectionMargin(final Boolean value) throws ComException;
  @DeclDISPID(220)  public Boolean getSelectionMargin() throws ComException;
  @DeclDISPID(-548)  public void setSelLength(final Integer value) throws ComException;
  @DeclDISPID(-548)  public Integer getSelLength() throws ComException;
  @DeclDISPID(-547)  public void setSelStart(final Integer value) throws ComException;
  @DeclDISPID(-547)  public Integer getSelStart() throws ComException;
  @DeclDISPID(-546)  public void setSelText(final String value) throws ComException;
  @DeclDISPID(-546)  public String getSelText() throws ComException;
  @DeclDISPID(304)  public void setShowDropButtonWhen(final fmShowDropButtonWhen value) throws ComException;
  @DeclDISPID(304)  public fmShowDropButtonWhen getShowDropButtonWhen() throws ComException;
  @DeclDISPID(12)  public void setSpecialEffect(final fmSpecialEffect value) throws ComException;
  @DeclDISPID(12)  public fmSpecialEffect getSpecialEffect() throws ComException;
  @DeclDISPID(308)  public void setStyle(final fmStyle value) throws ComException;
  @DeclDISPID(308)  public fmStyle getStyle() throws ComException;
  @DeclDISPID(-517)  public void setText(final String value) throws ComException;
  @DeclDISPID(-517)  public String getText() throws ComException;
  @DeclDISPID(10004)  public void setTextAlign(final fmTextAlign value) throws ComException;
  @DeclDISPID(10004)  public fmTextAlign getTextAlign() throws ComException;
  @DeclDISPID(502)  public void setTextColumn(final Object value) throws ComException;
  @DeclDISPID(502)  public Object getTextColumn() throws ComException;
  @DeclDISPID(216)  public Integer getTextLength() throws ComException;
  @DeclDISPID(611)  public void setTopIndex(final Object value) throws ComException;
  @DeclDISPID(611)  public Object getTopIndex() throws ComException;
  @DeclDISPID(0)  public void setValue(final Object value) throws ComException;
  @DeclDISPID(0)  public Object getValue() throws ComException;
  @DeclDISPID(-529)  public Object getColumn(final Object pvargColumn, final Object pvargIndex) throws ComException;
  @DeclDISPID(-529)  public void setColumn(final Object pvargColumn, final Object pvargIndex, final Object value3) throws ComException;
  @DeclDISPID(-528)  public Object getList(final Object pvargIndex, final Object pvargColumn) throws ComException;
  @DeclDISPID(-528)  public void setList(final Object pvargIndex, final Object pvargColumn, final Object value3) throws ComException;
  @DeclDISPID(-553)  public void AddItem(final Object pvargItem, final Object pvargIndex) throws ComException;
  @DeclDISPID(-554)  public void Clear() throws ComException;
  @DeclDISPID(1001)  public void DropDown() throws ComException;
  @DeclDISPID(-555)  public void RemoveItem(final Object pvargIndex) throws ComException;
  @DeclDISPID(22)  public void Copy() throws ComException;
  @DeclDISPID(21)  public void Cut() throws ComException;
  @DeclDISPID(24)  public void Paste() throws ComException;
  @DeclDISPID(-542)  public void setIMEMode(final fmIMEMode value) throws ComException;
  @DeclDISPID(-542)  public fmIMEMode getIMEMode() throws ComException;
  @DeclDISPID(224)  public void setEnterFieldBehavior(final fmEnterFieldBehavior value) throws ComException;
  @DeclDISPID(224)  public fmEnterFieldBehavior getEnterFieldBehavior() throws ComException;
  @DeclDISPID(225)  public void setDragBehavior(final fmDragBehavior value) throws ComException;
  @DeclDISPID(225)  public fmDragBehavior getDragBehavior() throws ComException;
}


text:
#define BOOST_TEST_MODULE TestPhilae
#include <boost/test/included/unit_test.hpp>

#include "particle_mock.h"

/* Define global mocks */
CellularClass Cellular;
SerialClass   Serial;
ParticleClass Particle;


text:
package org.apereo.cas.tokens;

import org.junit.platform.suite.api.SelectClasses;

/**
 * This is {@link AllTicketResourceEntityResponseFactoryTestsSuite}.
 *
 * @author Misagh Moayyed
 * @since 5.3.0
 */
@SelectClasses({
    JWTServiceTicketResourceEntityResponseFactoryTests.class,
    JWTTicketGrantingTicketResourceEntityResponseFactoryTests.class
})
public class AllTicketResourceEntityResponseFactoryTestsSuite {
}


text:
using System;
using System.Globalization;
using System.IO;
using System.ServiceModel;
using DotNetNuke.Entities.Icons;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Modules.UserDefinedTable.Components;
using DotNetNuke.Security;
using DotNetNuke.Services.FileSystem;
using DotNetNuke.Services.Localization;

namespace DotNetNuke.Modules.UserDefinedTable
{
    public partial class Default : PortalModuleBase, IActionable
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            InitViews();
        }

        private void InitViews()
        {
            var sec = new ModuleSecurity(ModuleId, TabId, new Components.Settings(Settings));

            switch (ModuleContext.Settings[SettingName.ListOrForm].AsString("Unknown"))
            {
                case "List":
                    var tabSettings = new ModuleController().GetTabModuleSettings(TabModuleId);
                    if (tabSettings.ContainsKey(SettingName.RenderingMethod) &&
                        tabSettings[SettingName.RenderingMethod].ToString().Equals(RenderingMethod.UserDefinedHandlebarsTemplate))
                        LoadControlByKey("HandlebarsListView");
                    else
                        LoadControlByKey("List");
                    break;
                case "Form":
                    if (Request.QueryString["show"].AsString() == "records" && sec.IsAllowedToViewList())
                    {
                        LoadControlByKey("List");
                    }
                    else
                    {
                        LoadControlByKey("Edit");
                    }
                    break;

                case "FormAndList":
                    LoadControlByKey("Edit");
                    if (sec.IsAllowedToViewList())
                    {
                        LoadControlByKey("List");
                    }
                    break;
                case "ListAndForm":
                    if (sec.IsAllowedToViewList())
                    {
                        LoadControlByKey("List");
                    }
                    LoadControlByKey("Edit");
                    break;
                default:
                    LoadControlByKey(IsNewModuleInstance() ? "TemplateList" : "List");
                    break;
            }
        }

        public bool IsNewModuleInstance()
        {
            var settings = ModuleContext.Settings;
            var mc = new ModuleController();
            var minSettings = 0;
            if (settings.ContainsKey(SettingName.ExcludeFromSearch)) minSettings++;
            if (settings.ContainsKey(SettingName.CalculatedColumnsRenderExpressionInForm)) minSettings++;
            if (settings.ContainsKey(SettingName.UseButtonsInForm)) minSettings++;

            if (settings.Count > minSettings) return false;
            mc.UpdateModuleSetting( ModuleId,SettingName.UseButtonsInForm, bool.TrueString );
            mc.UpdateModuleSetting(ModuleId, SettingName.ExcludeFromSearch, bool.TrueString);
            mc.UpdateModuleSetting(ModuleId, SettingName.CalculatedColumnsRenderExpressionInForm, bool.TrueString);
            return true;
        }

        void LoadControlByKey(string controlKey)
        {
            var moduleToLoad = ModuleControlController.GetModuleControlByControlKey(controlKey,
                                                                                ModuleContext.Configuration.
                                                                                ModuleDefID);
            if (moduleToLoad != null)
            {
                var controlSrc = string.Format("~/{0}", moduleToLoad.ControlSrc);
                var view = (PortalModuleBase) (LoadControl(controlSrc));
                view.ID = Path.GetFileNameWithoutExtension(controlSrc);
                view.ModuleContext.Configuration = ModuleContext.Configuration;
                PlaceHolderControl.Controls.Add(view);
            }
        }

        public ModuleActionCollection ModuleActions
        {
            get
            {
                var viewType = ModuleContext.Settings[SettingName.ListOrForm].AsString("Undefined");
                var actions = new ModuleActionCollection();
                foreach (var view in PlaceHolderControl.Controls)
                {
                    if ((view) is IActionable)
                    {
                        var viewactions = ((IActionable) view).ModuleActions;
                        foreach (ModuleAction action in viewactions)
                        {
                            action.ID = GetNextActionID();
                            actions.Add(action);
                        }
                    }
                }
                actions.Add(GetNextActionID(),
                    Localization.GetString(ModuleActionType.ContentOptions, LocalResourceFile),
                    ModuleActionType.ModuleSettings, "", "settings.gif", EditUrl("Manage"), false,
                    SecurityAccessLevel.Edit, true, false);
                if (viewType != "Undefined")
                {
                    actions.Add(GetNextActionID(), Localization.GetString("CreateTemplate.Action", LocalResourceFile),
                        "CreateTemplate", "", Utilities.IconURL("Save"), EditUrl("CreateTemplate"),
                        false, SecurityAccessLevel.Admin, true, false);
                }

                actions.Add(GetNextActionID(), Localization.GetString("ExportCSV.Action", LocalResourceFile),
                    ModuleActionType.ExportModule, "", ResolveUrl("~/images/action_export.gif"),
                    EditUrl("", "", "ExportCSV", "moduleid=" + ModuleId), false,
                    SecurityAccessLevel.Edit, true, false);
                actions.Add(GetNextActionID(), Localization.GetString("ImportCSV.Action", LocalResourceFile),
                    ModuleActionType.ImportModule, "", ResolveUrl("~/images/action_import.gif"),
                    EditUrl("", "", "ImportCSV", "moduleid=" + ModuleId), false,
                    SecurityAccessLevel.Edit, true, false);

                // BEGIN: Handlebars template
                if (IsHandlebarsTemplateSelected())
                {
                    var url = GetEditUrl();

                    actions.Add(GetNextActionID(),
                        Localization.GetString("HandlebarsTemplate.Action", LocalResourceFile),
                        ModuleActionType.EditContent,
                        string.Empty,
                        Utilities.IconURL("Edit"),
                        url,
                        false,
                        SecurityAccessLevel.Edit,
                        true,
                        false);
                }
                // END: Handlebars template

                #region Export/Import Settings

                actions.Add(new ModuleAction(GetNextActionID(),
                    Localization.GetString("ExportModuleSettings.Action", LocalResourceFile),
                    ModuleActionType.ExportModule,
                    string.Empty,
                    Utilities.IconURL("Edit"),
                    EditUrl(ControlKeys.ExportModuleSettings),
                    string.Empty,
                    false,
                    SecurityAccessLevel.Edit,
                    true,
                    false));

                actions.Add(new ModuleAction(GetNextActionID(),
                    Localization.GetString("ImportModuleSettings.Action", LocalResourceFile),
                    ModuleActionType.ImportModule,
                    string.Empty,
                    Utilities.IconURL("Edit"),
                    EditUrl(ControlKeys.ImportModuleSettings),
                    string.Empty,
                    false,
                    SecurityAccessLevel.Edit,
                    true,
                    false));

                #endregion

                return actions;
            }
        }

        /// <summary>
        /// Get Edit url
        /// </summary>
        /// <returns></returns>
        private string GetEditUrl()
        {
            if (!ModuleContext.Settings.ContainsKey(SettingName.UserDefinedHandlebarsTemplateUrl))
                return EditUrl(ControlKeys.HandlebarsTemplatesFile);
            var relativePath = ModuleContext.Settings[SettingName.UserDefinedHandlebarsTemplateUrl].AsString();
            var file = FileManager.Instance.GetFile(ModuleContext.PortalId, relativePath);
            return file != null
                ? ModuleContext.EditUrl("FileID", file.FileId.ToString(CultureInfo.InvariantCulture),
                    ControlKeys.HandlebarsTemplatesFile)
                : EditUrl(ControlKeys.HandlebarsTemplatesFile);
        }

        /// <summary>
        /// Check if rendering method is Handlebars template or not
        /// </summary>
        /// <returns></returns>
        private bool IsHandlebarsTemplateSelected()
        {
            return ModuleContext.Settings.ContainsKey(SettingName.RenderingMethod) &&
                   ModuleContext.Settings[SettingName.RenderingMethod].ToString().Equals(RenderingMethod.UserDefinedHandlebarsTemplate);
        }
    }
}


text:
namespace Superscribe.Testing.WebApi
{
    using System;
    using System.Web.Http;

    using Superscribe.Engine;
    using Superscribe.Models;
    using Superscribe.WebApi;

    public static class BenchmarkConfig
    {
        public static void Register(HttpConfiguration config)
        {
            var engine = SuperscribeConfig.Register(config);

            var site = engine.Route(o => o / "sites" / (Int)"siteId");

            var blog = site / "blog";
            var blogposts = blog / "posts".Controller("blogposts");

            for (var i = 0; i < 250; i++)
            {
                GenerateRoutes(engine, site, Guid.NewGuid().ToString());
            }

            GenerateRoutes(engine, site, "portfolio");

            // sites/{siteId}/blog/posts/
            // sites/{siteId}/blog/posts/{postId}
            // sites/{siteId}/blog/posts/{postId}/media
            // sites/{siteId}/blog/posts/{postId}/media/{id}
            engine.Route(o => blogposts / (Int)"postId" / "media".Controller("blogpostmedia") / (Int)"id");

            // sites/{siteId}/blog/tags
            engine.Route(o => blog / "tags".Controller("blogtags"));

            // sites/{siteId}/blog/posts/archives
            // sites/{siteId}/blog/posts/archives/{year}/{month}
            engine.Route(o => blogposts / "archives".Controller("blogpostarchives") / (Int)"year" / (Int)"month");

            //for (var i = 0; i < 50; i++)
            //{
            //    GenerateRoutes(site, Guid.NewGuid().ToString());
            //}
        }

        private static void GenerateRoutes(IRouteEngine engine, GraphNode site, string name)
        {
            var baseroute = site / name;

            var projectsroute = baseroute / "projects".Controller(name + "projects") / (Int)"projectId";

            // sites/{siteId}/portfolio/projects
            // sites/{siteId}/portfolio/projects/{projectId}
            // sites/{siteId}/portfolio/projects/{projectId}/media
            // sites/{siteId}/portfolio/projects/{projectId}/media/{id}
            engine.Route(o => projectsroute / "media".Controller(name + "projectmedia") / (Int)"id");

            // sites/{siteId}/portfolio/tags
            engine.Route(o => baseroute / "tags".Controller(name + "tags"));

            // sites/{siteId}/portfolio/categories
            // sites/{siteId}/portfolio/categories/{id}
            engine.Route(o => baseroute / "categories".Controller(name + "categories") / (Int)"id");
        }
    }
}


text:
var Calais, Service, calais, util;

util = require("util");

calais = require("calais");

Calais = calais.Calais;

Service = (function() {

  function Service() {}

  Service.prototype.process = function(req, name, callback) {
    var request;
    request = new Calais("hyp3h32z2dkwrmh59kxsm8rn", {
      "cleanResult": true
    });
    req = req.replace(/`/g, "'").replace(/"/g, "'").replace(/''/g, "'");
    request.set("content", req);
    return setTimeout(function() {
      return request.fetch(function(result) {
        if (result.indexOf("Error") > 0) console.log(result);
        if (result[0].doc !== void 0) result[0].name = name;
        return callback(result);
      });
    }, 5000);
  };

  return Service;

})();

module.exports.Service = Service;


text:
package org.gwtproject.safehtml.shared;

import static junit.framework.TestCase.assertEquals;

import com.google.j2cl.junit.apt.J2clTestInput;
import org.junit.Test;

/** Unit tests for SanitizedHtml. */
@J2clTestInput(SimpleHtmlSanitizerTest.class)
public class SimpleHtmlSanitizerTest {

  @Test
  public void testSimple() {
    // simple case
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("foobar");
    assertEquals("foobar", html.asString());
  }

  @Test
  public void testDontChangeWhiteSpace() {
    // shouldn't change whitespace or newlines
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("things are breezy\nand jolly\tgood");
    assertEquals("things are breezy\nand jolly\tgood", html.asString());
  }

  @Test
  public void testEscapeHtmlMetaCharacters() {
    // need to escape HTML metacharacters appearing on their own
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("foo < bar & that's good");
    assertEquals("foo < bar & that's good", html.asString());
  }

  @Test
  public void testDontDoubleEscape() {
    // but don't double-escape HTML entities
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("foo < bar & that's good");
    assertEquals("foo < bar & that's good", html.asString());
  }

  @Test
  public void testEscapeLoneMetacharacters() {
    // need to escape HTML metacharacters appearing on their own
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("\"foo < bar & that's good\"");
    assertEquals(""foo < bar & that's good"", html.asString());
  }

  @Test
  public void testDontEscapeValidTags() {
    // leave simple tags alone
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("foo bar");
    assertEquals("foo bar", html.asString());
  }

  @Test
  public void testTagAtBeginning() {
    // correctly deal with a tag at the beginnign
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("bar");
    assertEquals("bar", html.asString());
  }

  @Test
  public void testNonTagAtBeginning() {
    // correctly deal with a non-tag at the beginnig
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("<yow bar");
    assertEquals("<yow bar", html.asString());
  }

  @Test
  public void testNonTagAtEnd() {
    // correctly deal with a non-tag at the end
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("bar foo <");
    assertEquals("bar foo <", html.asString());
  }

  @Test
  public void testNullTag() {
    // correctly deal with bogus empty tag
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("<>bar foo<>");
    assertEquals("<>bar foo<>", html.asString());
  }

  @Test
  public void testNullEndTag() {
    // correctly deal with bogus empty end tag
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("</>bar foo</>");
    assertEquals("</>bar foo</>", html.asString());
  }

  @Test
  public void testSimpleTagsAndHtmlMetaChars() {
    // mix of simple tags and HTML metacharacters appearing on their own
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("foo < bar & that's good");
    assertEquals("foo < bar & that's good", html.asString());
  }

  @Test
  public void testEvilTags() {
    // escape tags we don't know
    SafeHtml html = SimpleHtmlSanitizer.sanitizeHtml("");
    assertEquals("<script>evil()</script>", html.asString());
  }
}


text:
module Egauge
  class Client
    def initialize
      fail 'Egauge.configuration.url not specified' if Egauge.configuration.url.nil?

      @conn = Faraday.new(url: Egauge.configuration.url) do |faraday|
        faraday.response :xml, headers: true
        faraday.adapter  Faraday.default_adapter
        faraday.options.params_encoder = Faraday::FlatParamsEncoder
      end
    end

    def request_history(time_from: nil, time_until: nil, units: REQ_UNIT_HOURS)
      @conn.get do |req|
        req.url '/cgi-bin/egauge-show'
        req.params = [units, REQ_VIRTUAL, REQ_DELTA]
        if time_from
          req.params[REQ_TIMESTAMP_FROM] = time_from.to_i
        end
        if time_until
          req.params[REQ_TIMESTAMP_UNTIL] = time_until.to_i
        end
      end
    end
  end
end


text:
package water.api.schemas3;

import hex.segments.SegmentModelsBuilder;
import water.api.API;

public class SegmentModelsParametersV3 extends SchemaV3<SegmentModelsBuilder.SegmentModelsParameters, SegmentModelsParametersV3> {

  @API(help = "Uniquely identifies the collection of the segment models")
  public KeyV3.SegmentModelsKeyV3 segment_models_id;

  @API(help = "Enumeration of all segments for which to build models for")
  public KeyV3.FrameKeyV3 segments;

  @API(help = "List of columns to segment-by, models will be built for all segments in the data")
  public String[] segment_columns;

  @API(help = "Level of parallelism of bulk model building, it is the maximum number of models each H2O node will be building in parallel")
  public int parallelism;

}


text:
require 'fog/oraclecloud'

load 'connect.rb'

## List all shapes
def all
    compute = connect()
    data = compute.shapes.all
end

shapes = all()
print shapes


text:
<Alloy>
	<View id="Wrapper">
		<View id="overlay">
			<View id="left1" visible="false">
				<ImageView id="left1Image" class="buttonImage" />
			</View>
			<View id="left2" visible="false">
				<ImageView id="left2Image" class="buttonImage" />
			</View>

			<Label id="title" visible="false" />

			<View id="right" visible="false">
				<ImageView id="rightImage" class="buttonImage" />
			</View>
		</View>
	</View>
</Alloy>


text:
package br.com.pacdev.util;

import java.io.StringReader;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;

public class XmlUtils {
	private static XmlUtils INSTANCE;
	public static XmlUtils getInstance() {
		if (INSTANCE == null) {
			INSTANCE = new XmlUtils();
			INSTANCE.setFactory(XPathFactory.newInstance());
			INSTANCE.setxPath(INSTANCE.getFactory().newXPath());
		}
		return INSTANCE;
	}
	private XPathFactory factory = null;
    private XPath xPath = null;

	public Document string2xml(String xmlString){
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = null;
		Document document = null;
		try
		{
			builder = factory.newDocumentBuilder();
			document = builder.parse( new InputSource( new StringReader( xmlString ) ) );
		} catch (Exception e) {
			e.printStackTrace();
		}
		return document;
	}

	public NodeList getElementByXPath(Document d, String stringXPath){
		NodeList ret = null;
	    try {
	    	ret = (NodeList) xPath.evaluate(stringXPath,d,XPathConstants.NODESET);
		} catch (Exception e2) {
			ret = null;
		}
	    return ret;
	}
	public NodeList getNodeListByXPath(Document d, String stringXPath){
		NodeList ret = null;
	    try {
	    	ret = (NodeList) xPath.evaluate(stringXPath,d,XPathConstants.NODESET);
		} catch (Exception e2) {
			ret = null;
		}
	    return ret;
	}
	public NodeList getNodeListByXPath(Element e, String stringXPath){
		NodeList ret = null;
	    try {
	    	ret = (NodeList) xPath.evaluate(stringXPath,e,XPathConstants.NODESET);
		} catch (Exception e2) {
			ret = null;
		}
	    return ret;
	}

	public String getStringByXPath(Element e, String stringXPath){
		String ret = null;

	    try {
	    	ret = xPath.evaluate(stringXPath, e);
		} catch (Exception e2) {
			ret = "";
		}
	    return ret;
	}

	public XPathFactory getFactory() {
		return factory;
	}

	public void setFactory(XPathFactory factory) {
		this.factory = factory;
	}

	public XPath getxPath() {
		return xPath;
	}

	public void setxPath(XPath xPath) {
		this.xPath = xPath;
	}
}


text:
var TableCacheGroupParametersController = function(cacheGroup, cacheGroupParameters, $scope, $state, $uibModal, locationUtils, cacheGroupParameterService) {

	$scope.cacheGroup = cacheGroup;

	$scope.cacheGroupParameters = cacheGroupParameters;

	$scope.removeParameter = function(paramId) {
		cacheGroupParameterService.unlinkCacheGroupParameter(cacheGroup.id, paramId)
			.then(
				function() {
					$scope.refresh();
				}
			);
	};

	$scope.refresh = function() {
		$state.reload(); // reloads all the resolves for the view
	};

	$scope.selectParams = function() {
		var modalInstance = $uibModal.open({
			templateUrl: 'common/modules/table/cacheGroupParameters/table.cacheGroupParamsUnassigned.tpl.html',
			controller: 'TableCacheGroupParamsUnassignedController',
			size: 'lg',
			resolve: {
				cg: function() {
					return cacheGroup;
				},
				parameters: function(parameterService) {
					return parameterService.getCacheGroupUnassignedParams(cacheGroup.id);
				}
			}
		});
		modalInstance.result.then(function(selectedParams) {
			var massagedArray = [];
			for (i = 0; i < selectedParams.length; i++) {
				massagedArray.push( { cacheGroupId: cacheGroup.id, parameterId: selectedParams[i] } );
			}
			cacheGroupParameterService.linkCacheGroupParameters(massagedArray)
				.then(
					function() {
						$scope.refresh();
					}
				);
		}, function () {
			// do nothing
		});
	};

	$scope.navigateToPath = locationUtils.navigateToPath;

	angular.element(document).ready(function () {
		$('#parametersTable').dataTable({
			"aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
			"iDisplayLength": 25,
			"columnDefs": [
				{ 'orderable': false, 'targets': 4 }
			],
			"aaSorting": []
		});
	});

};

TableCacheGroupParametersController.$inject = ['cacheGroup', 'cacheGroupParameters', '$scope', '$state', '$uibModal', 'locationUtils', 'cacheGroupParameterService'];
module.exports = TableCacheGroupParametersController;


text:
// Copyright (c) Microsoft Open Technologies, Inc.  All rights reserved.
// Licensed under the BSD 2-Clause License.
// See License.txt in the project root for license information.

#ifndef _ADC108S102_SUPPORT_H_
#define _ADC108S102_SUPPORT_H_

#include <Windows.h>

#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)   // If building a Win32 app:

#include "SpiController.h"
#include "GpioController.h"

class ADC108S102Device
{
public:
    /// Constructor.
    ADC108S102Device()
    {
        m_csFabricBit = 0;
    }

    /// Destructor.
    virtual ~ADC108S102Device()
    {
    }

    /// Prepare to use this ADC.
    /**
    \return HRESULT success or error code.
    */
    inline HRESULT begin()
    {
        HRESULT hr = S_OK;

        // Prepare to use the controller for the ADC's SPI controller.
        hr = m_spi.begin(ADC_SPI_BUS, 3, 12500, 32);

        if (SUCCEEDED(hr))
        {
            // Make the fabric GPIO bit that drives the ADC chip select signal an output.
            hr = g_quarkFabricGpio.setPinDirection(m_csFabricBit, DIRECTION_OUT);
        }

        return hr;
    }

    /// Release the ADC.
    inline void end()
    {
        // Release the ADC SPI bus.
        m_spi.end();
    }

    /// Take a reading with the ADC used on the Gen2 board.
    /**
    \param[in] channel Number of channel on ADC to read.
    \param[out] value The value read from the ADC.
    \param[out] bits The size of the reading in "value" in bits.
    \return HRESULT success or error code.
    */
    inline HRESULT readValue(ULONG channel, ULONG & value, ULONG & bits)
    {
        HRESULT hr = S_OK;

        ULONG dataOut = 0;
        ULONG dataIn = 0;

        // Make sure the channel number is in range.
        if (channel >= ADC_CHANNELS)
        {
            hr = DMAP_E_ADC_DOES_NOT_HAVE_REQUESTED_CHANNEL;
        }

        if (SUCCEEDED(hr))
        {
            // Prepare to send the channel number to the SPI controller.
            dataOut = channel << CHAN_SHIFT;

            // Perform a conversion and get the result.
            g_quarkFabricGpio.setPinState(m_csFabricBit, LOW);       // Make ADC chip select active

            if (SUCCEEDED(hr))
            {
                hr = m_spi.transfer32(dataOut, dataIn);

                g_quarkFabricGpio.setPinState(m_csFabricBit, HIGH);  // Make ADC chip select inactive
            }
        }

        if (SUCCEEDED(hr))
        {
            // Extract the reading from the data sent back from the ADC.
            value = (dataIn >> DATA_SHIFT) & ((1 << ADC_BITS) - 1);
            bits = ADC_BITS;
        }

        return hr;
    }

private:
    /// The number of channels on the ADC.
    const ULONG ADC_CHANNELS = 8;

    /// The number of bits in an ADC conversion.
    const ULONG ADC_BITS = 10;

    /// The shift amount to put the channel number into a 32-bit longword.
    const ULONG CHAN_SHIFT = 27;

    /// The shift amount to right justify the data read from the ADC.
    const ULONG DATA_SHIFT = 2;

    /// The SPI Controller object used to talk to the ADC.
    SpiControllerClass m_spi;

    /// The Fabric GPIO bit that controls the chip select signal.
    ULONG m_csFabricBit;
};

#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

#endif  // _ADC108S102_SUPPORT_H_


text:
403 - Keine Berechtigung

    Sie haben keine Berechtigung die Angegebene Seite zu laden.


text:
/*

Modified for use with PrototypeJS

http://github.com/jwestbrook/bootstrap-prototype

*/

"use strict";

if(BootStrap === undefined)
{
	var BootStrap = {};
}

 /* TYPEAHEAD PUBLIC CLASS DEFINITION
  * ================================= */

BootStrap.Typeahead = Class.create({

	initialize: function(element, options) {
		this.$element = $(element)
		this.$element.store('bootstrap:typeahead',this)

		this.options = {
			source: []
			, items: 8
			, menu: new Element('ul',{'class':'typeahead dropdown-menu'})
			, item: new Element('li').update(new Element('a',{'href':'#'}))
			, minLength: 1
		}

		this.options.items = (this.$element.readAttribute('data-items') ? this.$element.readAttribute('data-items') : this.options.items)
		this.options.source = (this.$element.readAttribute('data-source') ? this.$element.readAttribute('data-source').evalJSON(true) : this.options.source)

		Object.extend(this.options, options)
		this.matcher = this.options.matcher || this.matcher
		this.sorter = this.options.sorter || this.sorter
		this.highlighter = this.options.highlighter || this.highlighter
		this.updater = this.options.updater || this.updater
		this.source = this.options.source
		this.$menu = this.options.menu
		this.shown = false
		this.listen()
	}
	, select: function () {
		var val = this.$menu.down('.active').readAttribute('data-value')
		this.$element.setValue(this.updater(val))

		this.$element.fire('bootstrap:change')

		return this.hide()
	}
	, updater: function (item) {
		return item
	}
	, show: function () {
		var pos = Object.extend({}, this.$element.positionedOffset())
		Object.extend(pos, {
			height: this.$element.offsetHeight
		})

		this.$menu.setStyle({
				'top': (pos.top + pos.height)+'px'
				, 'left': (pos.left)+'px'
				, 'display' : 'block'
			})
		this.$element.insert({'after':this.$menu})

		this.shown = true
		return this
	}
	, hide: function () {
		this.$menu.hide()
		this.shown = false
		return this
	}
	, lookup: function (event) {
		var items

		this.query = this.$element.getValue()

		if (!this.query || this.query.length < this.options.minLength) {
			return this.shown ? this.hide() : this
		}

		items = Object.isFunction(this.source) ? this.source(this.query, this.process.bind(this)) : this.source

		return items ? this.process(items) : this
	}
	, process: function (items) {

		items = items.findAll(this.matcher,this)

		items = this.sorter(items)

		if (!items.length) {
			return this.shown ? this.hide() : this
		}

		return this.render(items.slice(0, this.options.items)).show()
	}
	, matcher: function (item) {
		return ~item.toLowerCase().indexOf(this.query.toLowerCase())
	}

	, sorter: function (items) {
		var beginswith = []
		, caseSensitive = []
		, caseInsensitive = []
		, item

		while (item = items.shift()) {
			if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
			else if (~item.indexOf(this.query)) caseSensitive.push(item)
			else caseInsensitive.push(item)
		}

		return beginswith.concat(caseSensitive, caseInsensitive)
	}
	, highlighter: function (item) {
		var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
		return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
			return '<strong>' + match + '</strong>'
		})
	}
	, render: function (items) {

		items = items.map(function(item){
			var i = this.options.item.clone(true).writeAttribute('data-value',item)
			i.down('a').update(this.highlighter(item))
			return i
		},this)

		items.first().addClassName('active')
		this.$menu.update()
		items.each(function(i){
			this.$menu.insert(i)
		},this)
		return this
	}
	, next: function (event) {
		var active = this.$menu.down('.active').removeClassName('active')
		, next = active.next()

		if (next === undefined) {
			next = this.$menu.down('li')
		}

		next.addClassName('active')
	}
	, prev: function (event) {
		var active = this.$menu.down('.active').removeClassName('active')
		, prev = active.previous()

		if (prev === undefined) {
			prev = this.$menu.select('li').last()
		}

		prev.addClassName('active')
	}
	, listen: function () {
		this.$element
			.observe('focus',     this.focus.bind(this))
			.observe('blur',      this.blur.bind(this))
			.observe('keypress',  this.keypress.bind(this))
			.observe('keyup',     this.keyup.bind(this))

		if (this.eventSupported('keydown')) {
			this.$element.observe('keydown',this.keydown.bind(this))
		}

		this.$menu.observe('click', this.click.bind(this))
		this.$menu.on('mouseover', 'li', this.mouseenter.bind(this))
		this.$menu.on('mouseout', 'li', this.mouseleave.bind(this))
	}
	, eventSupported: function(eventName) {
		var isSupported = ('on'+eventName) in this.$element
		if (!isSupported) {
			this.$element.writeAttribute(eventName, 'return;')
			isSupported = typeof this.$element[eventName] === 'function'
		}
		return isSupported
	}
	, move: function (e) {
		if (!this.shown) return

		switch(e.keyCode) {
			case Event.KEY_TAB:
			case Event.KEY_RETURN:
			case Event.KEY_ESC:
				e.preventDefault()
				break

			case Event.KEY_UP:
				e.preventDefault()
				this.prev()
				break

			case Event.KEY_DOWN:
				e.preventDefault()
				this.next()
				break
		}

		e.stopPropagation()
	}
	, keydown: function (e) {
		this.suppressKeyPressRepeat = ~[40,38,9,13,27].indexOf(e.keyCode)
		this.move(e)
	}
	, keypress: function (e) {
		if (this.suppressKeyPressRepeat) return
		this.move(e)
	}
	, keyup: function (e) {
		switch(e.keyCode) {
			case Event.KEY_DOWN:
			case Event.KEY_UP:
			case 16: // shift
			case 17: // ctrl
			case 18: // alt
				break

			case Event.KEY_TAB:
			case Event.KEY_RETURN:
				if (!this.shown) return
				this.select()
				break

			case Event.KEY_ESC:
				if (!this.shown) return
				this.hide()
				break

			default:
				this.lookup()
		}

		e.stopPropagation()
		e.preventDefault()
	}
	, focus: function (e) {
		this.focused = true
	}
	, blur: function (e) {
		this.focused = false
		if (!this.mousedover && this.shown) this.hide()
	}
	, click: function (e) {
		e.stopPropagation()
		e.preventDefault()
		this.select()
		this.$element.focus()
	}
	, mouseenter: function (e) {
		this.mousedover = true
		this.$menu.select('.active').invoke('removeClassName','active')
		e.findElement('li').addClassName('active')
		e.stopPropagation()
	}
	, mouseleave: function (e) {
		this.mousedover = false
		if (!this.focused && this.shown) this.hide()
		e.stopPropagation()
	}
});

/*domload*/

document.observe('dom:loaded',function(){
	$$('[data-provide="typeahead"]').each(function(i){
		new BootStrap.Typeahead(i)
	});
})


text:
window.onload = function() {

  chrome.test.runTests([
    function favicon() {
      var img = document.getElementById('favicon');
      chrome.test.assertEq(16, img.naturalWidth);
      chrome.test.assertEq(16, img.naturalHeight);
      chrome.test.succeed();
    },

    function theme() {
      var img = document.getElementById('theme');
      chrome.test.assertEq(0, img.naturalWidth);
      chrome.test.assertEq(0, img.naturalHeight);
      chrome.test.succeed();
    }
  ]);

};


text:
"""Tests for projectq.setups.squaregrid."""

import pytest

import projectq
import projectq.setups.grid as grid_setup
from projectq.cengines import DummyEngine, GridMapper
from projectq.libs.math import AddConstant
from projectq.ops import CNOT, BasicGate, H, Measure, Rx, Rz, Swap, X

def test_mapper_present_and_correct_params():
    found = False
    mapper = None
    for engine in grid_setup.get_engine_list(num_rows=3, num_columns=2):
        if isinstance(engine, GridMapper):
            mapper = engine
            found = True
    assert found
    assert mapper.num_rows == 3
    assert mapper.num_columns == 2

def test_parameter_any():
    engine_list = grid_setup.get_engine_list(num_rows=3, num_columns=2, one_qubit_gates="any", two_qubit_gates="any")
    backend = DummyEngine(save_commands=True)
    eng = projectq.MainEngine(backend, engine_list)
    qubit1 = eng.allocate_qubit()
    qubit2 = eng.allocate_qubit()
    gate = BasicGate()
    gate | (qubit1, qubit2)
    gate | qubit1
    eng.flush()
    print(len(backend.received_commands))
    assert backend.received_commands[2].gate == gate
    assert backend.received_commands[3].gate == gate

def test_restriction():
    engine_list = grid_setup.get_engine_list(
        num_rows=3,
        num_columns=2,
        one_qubit_gates=(Rz, H),
        two_qubit_gates=(CNOT, AddConstant),
    )
    backend = DummyEngine(save_commands=True)
    eng = projectq.MainEngine(backend, engine_list)
    qubit1 = eng.allocate_qubit()
    qubit2 = eng.allocate_qubit()
    qubit3 = eng.allocate_qubit()
    eng.flush()
    CNOT | (qubit1, qubit2)
    H | qubit1
    Rz(0.2) | qubit1
    Measure | qubit1
    Swap | (qubit1, qubit2)
    Rx(0.1) | (qubit1)
    AddConstant(1) | qubit1 + qubit2 + qubit3
    eng.flush()
    assert backend.received_commands[4].gate == X
    assert len(backend.received_commands[4].control_qubits) == 1
    assert backend.received_commands[5].gate == H
    assert backend.received_commands[6].gate == Rz(0.2)
    assert backend.received_commands[7].gate == Measure
    for cmd in backend.received_commands[7:]:
        assert cmd.gate != Swap
        assert not isinstance(cmd.gate, Rx)
        assert not isinstance(cmd.gate, AddConstant)

def test_wrong_init():
    with pytest.raises(TypeError):
        grid_setup.get_engine_list(num_rows=3, num_columns=2, one_qubit_gates="any", two_qubit_gates=(CNOT))
    with pytest.raises(TypeError):
        grid_setup.get_engine_list(num_rows=3, num_columns=2, one_qubit_gates="Any", two_qubit_gates=(CNOT,))


text:
struct Sales_data;
std::istream &read(std::istream &is, Sales_data &item);

struct Sales_data {
  Sales_data() = default;
  Sales_data(const std::string &no) : bookNo(no) {}
  Sales_data(const std::string &no, unsigned us, double price)
      : bookNo(no), units_sold(us), revenue(price * us) {}
  Sales_data::Sales_data(std::istream &is) {
    read(is, *this);
  }

  std::string isbn() const { return bookNo; }
  Sales_data &combine(const Sales_data &);

  std::string bookNo;
  unsigned units_sold = 0;
  double revenue = 0.0;
};

Sales_data &Sales_data::combine(const Sales_data &rhs) {
  units_sold += rhs.units_sold;
  revenue += rhs.revenue;
  return *this;
}

Sales_data add(const Sales_data &lhs, const Sales_data &rhs) {
  Sales_data sum = lhs;  // Use default copy constructor
  sum.combine(rhs);
  return sum;
}

std::istream &read(std::istream &is, Sales_data &item) {
  double price;
  is >> item.bookNo >> item.units_sold >> price;
  item.revenue = item.units_sold * price;
  return is;
}

std::ostream &print(std::ostream &os, const Sales_data &item) {
  os << item.isbn() << " " << item.units_sold << " " << item.revenue;
  return os;
}

int main() {
  Sales_data total(std::cin);
  //if (read(std::cin, total)) {
  if (std::cin) {
    Sales_data trans(std::cin);
    //while (read(std::cin, trans)) {
    while (std::cin) {
      if (total.isbn() == trans.isbn()) {
        total.combine(trans);
      } else {
        print(std::cout, total) << std::endl;
        total = trans;  // Use default copy constructor
      }
      read(std::cin, trans);  // Read new transaction
    }
    print(std::cout, total) << std::endl;
  } else {
    std::cerr << "No data!" << std::endl;
    return -1;
  }

  return 0;
}


text:
var Constructor = (function() {

  function extend(extension){
    if (typeof extension === 'function')
      extension = extension.apply(this.prototype);
    if (typeof extension === 'object')
      for (var p in extension) this.prototype[p] = extension[p];
    return this;
  }

  function ConstructorInstance(){}
  function construct(superObject){
    ConstructorInstance.prototype = superObject;
    return new ConstructorInstance;
  }

  function toString() { return 'Constructor'; };

  function Constructor(superConstructor, extension){

    var constructor = function ConstructorInstance(){
      var self = (this instanceof constructor) ? this : construct(constructor.prototype);
      self.constructor = constructor;
      return (typeof self.initialize === "function") ?
        self.initialize.apply(self, arguments) || self : self;
    };

    constructor.toString = toString;
    constructor.extend = extend;

    if (arguments.length === 1 &&
      typeof superConstructor === 'object' ||
      (
        typeof superConstructor === 'function' &&
        !("superConstructor" in superConstructor) &&
        superConstructor.name === ""
      )
    ){
      extension = superConstructor || extension;
      superConstructor = Constructor;
    }

    superConstructor || (superConstructor = Constructor);

    constructor.superConstructor = superConstructor;
    constructor.prototype = construct(superConstructor.prototype);
    constructor.prototype.constructor = constructor;
    constructor.prototype.superObject = superConstructor.prototype;

    for (var p in Constructor.prototype)
      if (p in constructor.prototype); else
        constructor.prototype[p] = Constructor.prototype[p];

    if (extension) Constructor.prototype.extend.call(constructor.prototype, extension);

    return constructor;
  };

  Constructor.superConstructor = undefined;

  Constructor.prototype.extend = function(extension) {
    if (typeof extension === 'function')
      extension = extension.apply(this);
    if (typeof extension === 'object')
      for (var p in extension) this[p] = extension[p];
    return this;
  };

  Constructor.prototype.$super = function(property, args){
    var superObject = this.superObject, func = superObject[property];
    if (typeof func !== 'function') throw "no superclass function `"+property+"`";
    this.superObject = superObject.superObject;
    try{
      return superObject[property].apply(this, args);
    }finally{
      this.superObject = superObject;
    }
  };

  return Constructor;

})();


text:
<!DOCTYPE html>

        <meta charset="utf-8" />
        <title>Sistem Manajemen Pajak Daerah</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1" name="viewport" />
        <meta content="" name="description" />
        <meta content="" name="author" />
        <?php $this->load->view('template/scripts');?>
        <?php $this->load->view('template/styles');?>

<img src="<?php echo base_url(); ?>assets/image/logo-2.png" width="50px" height="" alt="">

PEMERINTAH KABUPATEN LOMBOK UTARA

BADAN PENDAPATAN DAERAH


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Wall.Configuration.Startup;
using Wall.Dependency;
using Wall.Logging;

namespace Wall.Modules
{
    /// <summary>
    /// This class must be implemented by all module definition classes.
    /// </summary>
    /// <remarks>
    /// A module definition class is generally located in it's own assembly
    /// and implements some action in module events on application startup and shutdown.
    /// It also defines depended modules.
    /// </remarks>
    public abstract class WallModule
    {
        /// <summary>
        /// Gets a reference to the IoC manager.
        /// </summary>
        protected internal IIocManager IocManager { get; internal set; }

        /// <summary>
        /// Gets a reference to the configuration.
        /// </summary>
        protected internal IWallStartupConfiguration Configuration { get; internal set; }

        /// <summary>
        /// Gets or sets the logger.
        /// </summary>
        protected internal ILogger Logger { get; internal set; }

        /// <summary>
        /// This is the first event called on application startup.
        /// Codes can be placed here to run before dependency injection registrations.
        /// </summary>
        public virtual void PreInitialize()
        {
        }

        /// <summary>
        /// This method is used to register dependencies for this module.
        /// </summary>
        public virtual void Initialize()
        {
        }

        /// <summary>
        /// This method is called lastly on application startup.
        /// </summary>
        public virtual void PostInitialize()
        {
        }

        /// <summary>
        /// This method is called when the application is being shutdown.
        /// </summary>
        public virtual void Shutdown()
        {
        }

        public virtual Assembly[] GetAdditionalAssemblies()
        {
            return new Assembly[0];
        }

        /// <summary>
        /// Checks if given type is an module class.
        /// </summary>
        /// <param name="type">Type to check</param>
        public static bool IsModule(Type type)
        {
            var typeInfo = type.GetTypeInfo();
            return
                typeInfo.IsClass &&
                !typeInfo.IsAbstract &&
                !typeInfo.IsGenericType &&
                typeof(WallModule).IsAssignableFrom(type);
        }

        /// <summary>
        /// Finds direct depended modules of a module (excluding given module).
        /// </summary>
        public static List<Type> FindDependedModuleTypes(Type moduleType)
        {
            if (!IsModule(moduleType))
                throw new Exception("This type is not an module: " + moduleType.AssemblyQualifiedName);

            var list = new List<Type>();

            if (moduleType.GetTypeInfo().IsDefined(typeof(DependsOnAttribute), true))
            {
                var dependsOnAttributes = moduleType.GetTypeInfo().GetCustomAttributes(typeof(DependsOnAttribute), true).Cast<DependsOnAttribute>();
                foreach (var dependsOnAttribute in dependsOnAttributes)
                {
                    foreach (var dependedModuleType in dependsOnAttribute.DependedModuleTypes)
                        list.Add(dependedModuleType);
                }
            }

            return list;
        }

        public static List<Type> FindDependedModuleTypesRecursivelyIncludingGivenModule(Type moduleType)
        {
            var list = new List<Type>();
            AddModuleAndDependenciesRecursively(list, moduleType);
            list.AddIfNotContains(typeof(WallKernelModule));
            return list;
        }

        private static void AddModuleAndDependenciesRecursively(List<Type> modules, Type module)
        {
            if (!IsModule(module))
                throw new Exception("This type is not an module: " + module.AssemblyQualifiedName);

            if (modules.Contains(module))
                return;

            modules.Add(module);

            var dependedModules = FindDependedModuleTypes(module);
            foreach (var dependedModule in dependedModules)
            {
                AddModuleAndDependenciesRecursively(modules, dependedModule);
            }
        }
    }
}