text:
import axios from 'axios'
import querystring from 'querystring'
import initAsync from './init.mock'
import serverAsync from './server'

describe('server test', () => {

  const config = {
    secret: 'test secret',
    expiresIn: '24h',
    issuer: 'http://www.example.com',
    saltOrRounds: 10,
    defaultPermissions: [
      {
        target: 'public',
        roles: [
          'read'
        ]
      }
    ]
  }

  it('should register', async () => {
    const server = await serverAsync(3000, {}, config, initAsync)

    const data = {
      email: 'john@example.com',
      password: 'mypassword'
    }

    const response = await axios.post('http://localhost:3000/api/auth/register', querystring.stringify(data))
    expect(response.status).toBe(200)
    expect(response.data.success).toBeTruthy()
    server.close()
  })

  it('should register two users, login, reqest', async () => {
    const server = await serverAsync(3000, {}, config, initAsync)

    const john = {
      email: 'john@example.com',
      password: 'mypassword'
    }

    const registerJohn = await axios.post('http://localhost:3000/api/auth/register', querystring.stringify(john))
    expect(registerJohn.status).toBe(200)
    expect(registerJohn.data.success).toBeTruthy()

    const mary = {
      email: 'mary@example.com',
      password: 'mypassword'
    }

    const registerMary = await axios.post('http://localhost:3000/api/auth/register', querystring.stringify(mary))
    expect(registerMary.status).toBe(200)
    expect(registerMary.data.success).toBeTruthy()

    const admin = {
      email: 'admin@localhost',
      password: 'admin'
    }

    console.log('login admin')
    const loginAdmin = await axios.post('http://localhost:3000/api/auth/login', querystring.stringify(admin))
    expect(loginAdmin.status).toBe(200)
    expect(loginAdmin.data.success).toBeTruthy()

    // Update john as a book writer
    console.log('updating user')
    const updateDate = {
      permissions: [{target: 'public', roles: ['read']}, {target: 'books', roles: ['read', 'write']}]
    }
    const updateOptions = {
      method: 'POST',
      headers: {
        'content-type': 'application/x-www-form-urlencoded',
        'authorization': `Bearer ${loginAdmin.data.token}`
      },
      data: querystring.stringify(updateDate),
      url: 'http://localhost:3000/api/auth/update/' + john.email
    }
    const updatejohn = await axios(updateOptions)
    expect(updatejohn.status).toBe(200)
    expect(updatejohn.data.success).toBeTruthy()

    const book1Data = {
      isbn: 'XY123456789',
      title: 'A book',
      author: 'John Brown',
      publisher: 'Brown Books'
    }
    const createBook1Options = {
      method: 'POST',
      headers: {
        'content-type': 'application/x-www-form-urlencoded',
        'authorization': `Bearer ${registerJohn.data.token}`
      },
      data: querystring.stringify(book1Data),
      url: 'http://localhost:3000/api/book'
    }
    console.log('create book')
    const createBook = await axios(createBook1Options)
    expect(createBook.status).toBe(200)
    expect(createBook.data.success).toBeTruthy()

    console.log('read book')
    const readBookResponse = await axios.get('http://localhost:3000/api/book', { headers: { 'authorization': `Bearer ${registerJohn.data.token}` } })
    expect(readBookResponse.status).toBe(200)
    expect(readBookResponse.data[0].title).toBe(book1Data.title)

    try {
      await axios.get('http://localhost:3000/api/book', { headers: { 'authorization': 'Bearer XXX.YYY.ZZZ' } })
      expect(false).toBeTruthy()
    } catch (error) {
      expect(error.response.status).toBe(401)
    }

    server.close()
  })
})


text:
#include "editor-support/cocosbuilder/CCMenuItemLoader.h"

using namespace cocos2d;

#define PROPERTY_BLOCK "block"
#define PROPERTY_ISENABLED "isEnabled"

namespace cocosbuilder {

void MenuItemLoader::onHandlePropTypeBlock(Node * pNode, Node * pParent, const char * pPropertyName, BlockData * pBlockData, CCBReader * ccbReader) {
    if(strcmp(pPropertyName, PROPERTY_BLOCK) == 0) {
        if (nullptr != pBlockData) // Add this condition to allow MenuItemImage without target/selector predefined
        {
            ((MenuItem *)pNode)->setCallback( std::bind( pBlockData->mSELMenuHandler, pBlockData->_target, std::placeholders::_1) );
//            ((MenuItem *)pNode)->setTarget(pBlockData->_target, pBlockData->mSELMenuHandler);
        }
    } else {
        NodeLoader::onHandlePropTypeBlock(pNode, pParent, pPropertyName, pBlockData, ccbReader);
    }
}

void MenuItemLoader::onHandlePropTypeCheck(Node * pNode, Node * pParent, const char * pPropertyName, bool pCheck, CCBReader * ccbReader) {
    if(strcmp(pPropertyName, PROPERTY_ISENABLED) == 0) {
        ((MenuItem *)pNode)->setEnabled(pCheck);
    } else {
        NodeLoader::onHandlePropTypeCheck(pNode, pParent, pPropertyName, pCheck, ccbReader);
    }
}

}

redpajama_set_name: RedPajamaGithub


text:
package io.castle.client.internal.config;

import com.google.common.base.Charsets;
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
import io.castle.client.internal.backend.OkHttpFactory;
import io.castle.client.internal.backend.RestApiFactory;
import io.castle.client.internal.json.CastleGsonModel;
import io.castle.client.model.CastleSdkConfigurationException;

import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;

public class CastleSdkInternalConfiguration {

    private final RestApiFactory restApiFactory;
    private final CastleGsonModel model;
    private final CastleConfiguration configuration;

    private final SecretKey sha256Key;

    private CastleSdkInternalConfiguration(RestApiFactory restApiFactory, CastleGsonModel model, CastleConfiguration configuration) {
        this.restApiFactory = restApiFactory;
        this.model = model;
        this.configuration = configuration;
        this.sha256Key = new SecretKeySpec(configuration.getApiSecret().getBytes(Charsets.UTF_8), "HmacSHA256");
    }

    public static CastleSdkInternalConfiguration getInternalConfiguration() throws CastleSdkConfigurationException {
        CastleGsonModel modelInstance = new CastleGsonModel();
        CastleConfiguration configuration = new ConfigurationLoader().loadConfiguration();
        RestApiFactory apiFactory = loadRestApiFactory(modelInstance, configuration);
        return new CastleSdkInternalConfiguration(apiFactory, modelInstance, configuration);
    }

    public static CastleSdkInternalConfiguration buildFromConfiguration(CastleConfiguration config) {
        CastleGsonModel modelInstance = new CastleGsonModel();
        RestApiFactory apiFactory = loadRestApiFactory(modelInstance, config);
        return new CastleSdkInternalConfiguration(apiFactory, modelInstance, config);
    }

    public static CastleConfigurationBuilder builderFromConfigurationLoader() {
        return new ConfigurationLoader().loadConfigurationBuilder();
    }

    /**
     * Currently only the okHttp backend is available.
     *
     * @param modelInstance GSON model instance to use.
     * @param configuration CastleConfiguration instance.
     * @return The configured RestApiFactory to make backend REST calls.
     */
    private static RestApiFactory loadRestApiFactory(final CastleGsonModel modelInstance, final CastleConfiguration configuration) {
        return new OkHttpFactory(configuration, modelInstance);
    }

    public CastleGsonModel getModel() {
        return model;
    }

    public RestApiFactory getRestApiFactory() {
        return restApiFactory;
    }

    public CastleConfiguration getConfiguration() {
        return configuration;
    }

    public HashFunction getSecureHashFunction() {
        return Hashing.hmacSha256(sha256Key);
    }
}


text:
package com.jianyi.utils;

import java.util.Calendar;
import java.util.Date;

/**
 * Created by liwanzhong on 2016/4/16.
 */
public class AgeCal {

    public static int getAge(Date dateOfBirth) {
        int age = 0;
        Calendar born = Calendar.getInstance();
        Calendar now = Calendar.getInstance();
        if (dateOfBirth != null) {
            now.setTime(new Date());
            born.setTime(dateOfBirth);
            if (born.after(now)) {
                throw new IllegalArgumentException("Can't be born in the future");
            }
            age = now.get(Calendar.YEAR) - born.get(Calendar.YEAR);
            if (now.get(Calendar.DAY_OF_YEAR) < born.get(Calendar.DAY_OF_YEAR)) {
                age -= 1;
            }
        }
        return age;
    }
}


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="match_parent"
	android:layout_height="match_parent">
	<fragment
		class="andexam.ver4_1.c20_fragment.MultiPaneOrient$PlanetListFragment"
		android:id="@+id/planet"
		android:layout_width="match_parent"
		android:layout_height="match_parent" />
</LinearLayout>


text:
package net.dynamicdungeon.fileio;

class XMLFileConstants {
    public static final String X_HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
    public static final String DOUBLE_TAG = "double";
    public static final String INT_TAG = "integer";
    public static final String LONG_TAG = "long";
    public static final String BYTE_TAG = "byte";
    public static final String BOOLEAN_TAG = "boolean";
    public static final String STRING_TAG = "string";
    public static final String CHARACTER_TAG = "character";
}


text:
Async is a utility module which provides straight-forward, powerful functions
for working with asynchronous JavaScript. Although originally designed for
use with [node.js](http://nodejs.org), it can also be used directly in the
browser. Also supports [component](https://github.com/component/component).

Async provides around 20 functions that include the usual 'functional'
suspects (map, reduce, filter, each…) as well as some common patterns
for asynchronous control flow (parallel, series, waterfall…). All these
functions assume you follow the node.js convention of providing a single
callback as the last argument of your async function.

## Quick Examples

```javascript
async.map(['file1','file2','file3'], fs.stat, function(err, results){
    // results is now an array of stats for each file
});

async.filter(['file1','file2','file3'], fs.exists, function(results){
    // results now equals an array of the existing files
});

async.parallel([
    function(){ ... },
    function(){ ... }
], callback);

async.series([
    function(){ ... },
    function(){ ... }
]);
```

There are many more functions available so take a look at the docs below for a
full list. This module aims to be comprehensive, so if you feel anything is
missing please create a GitHub issue for it.

## Common Pitfalls

### Binding a context to an iterator

This section is really about bind, not about async. If you are wondering how to
make async execute your iterators in a given context, or are confused as to why
a method of another library isn't working as an iterator, study this example:

```js
// Here is a simple object with an (unnecessarily roundabout) squaring method
var AsyncSquaringLibrary = {
  squareExponent: 2,
  square: function(number, callback){
    var result = Math.pow(number, this.squareExponent);
    setTimeout(function(){
      callback(null, result);
    }, 200);
  }
};

async.map([1, 2, 3], AsyncSquaringLibrary.square, function(err, result){
  // result is [NaN, NaN, NaN]
  // This fails because the `this.squareExponent` expression in the square
  // function is not evaluated in the context of AsyncSquaringLibrary, and is
  // therefore undefined.
});

async.map([1, 2, 3], AsyncSquaringLibrary.square.bind(AsyncSquaringLibrary), function(err, result){
  // result is [1, 4, 9]
  // With the help of bind we can attach a context to the iterator before
  // passing it to async. Now the square function will be executed in its
  // 'home' AsyncSquaringLibrary context and the value of `this.squareExponent`
  // will be as expected.
});
```

## Download

The source is available for download from
[GitHub](http://github.com/caolan/async).
Alternatively, you can install using Node Package Manager (npm):

    npm install async

__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 29.6kb Uncompressed

## In the Browser

So far it's been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:

```html
<script type="text/javascript" src="async.js"></script>
<script type="text/javascript">

    async.map(data, asyncProcess, function(err, results){
        alert(results);
    });

</script>
```

## Documentation

### Collections

* [each](#each)
* [eachSeries](#eachSeries)
* [eachLimit](#eachLimit)
* [map](#map)
* [mapSeries](#mapSeries)
* [mapLimit](#mapLimit)
* [filter](#filter)
* [filterSeries](#filterSeries)
* [reject](#reject)
* [rejectSeries](#rejectSeries)
* [reduce](#reduce)
* [reduceRight](#reduceRight)
* [detect](#detect)
* [detectSeries](#detectSeries)
* [sortBy](#sortBy)
* [some](#some)
* [every](#every)
* [concat](#concat)
* [concatSeries](#concatSeries)

### Control Flow

* [series](#series)
* [parallel](#parallel)
* [parallelLimit](#parallellimittasks-limit-callback)
* [whilst](#whilst)
* [doWhilst](#doWhilst)
* [until](#until)
* [doUntil](#doUntil)
* [forever](#forever)
* [waterfall](#waterfall)
* [compose](#compose)
* [applyEach](#applyEach)
* [applyEachSeries](#applyEachSeries)
* [queue](#queue)
* [cargo](#cargo)
* [auto](#auto)
* [iterator](#iterator)
* [apply](#apply)
* [nextTick](#nextTick)
* [times](#times)
* [timesSeries](#timesSeries)

### Utils

* [memoize](#memoize)
* [unmemoize](#unmemoize)
* [log](#log)
* [dir](#dir)
* [noConflict](#noConflict)

## Collections

### each(arr, iterator, callback)

Applies an iterator function to each item in an array, in parallel.
The iterator is called with an item from the list and a callback for when it
has finished. If the iterator passes an error to this callback, the main
callback for the each function is immediately called with the error.

Note, that since this function applies the iterator to each item in parallel
there is no guarantee that the iterator functions will complete in order.

__Arguments__

* arr - An array to iterate over.
* iterator(item, callback) - A function to apply to each item in the array.
  The iterator is passed a callback(err) which must be called once it has
  completed. If no error has occured, the callback should be run without
  arguments or with an explicit null argument.
* callback(err) - A callback which is called after all the iterator functions
  have finished, or an error has occurred.

__Example__

```js
// assuming openFiles is an array of file names and saveFile is a function
// to save the modified contents of that file:

async.each(openFiles, saveFile, function(err){
    // if any of the saves produced an error, err would equal that error
});
```

---------------------------------------

### eachSeries(arr, iterator, callback)

The same as each only the iterator is applied to each item in the array in
series. The next iterator is only called once the current one has completed
processing. This means the iterator functions will complete in order.

---------------------------------------

### eachLimit(arr, limit, iterator, callback)

The same as each only no more than "limit" iterators will be simultaneously
running at any time.

Note that the items are not processed in batches, so there is no guarantee that
 the first "limit" iterator functions will complete before any others are
started.

__Arguments__

* arr - An array to iterate over.
* limit - The maximum number of iterators to run at any time.
* iterator(item, callback) - A function to apply to each item in the array.
  The iterator is passed a callback(err) which must be called once it has
  completed. If no error has occured, the callback should be run without
  arguments or with an explicit null argument.
* callback(err) - A callback which is called after all the iterator functions
  have finished, or an error has occurred.

__Example__

```js
// Assume documents is an array of JSON objects and requestApi is a
// function that interacts with a rate-limited REST api.

async.eachLimit(documents, 20, requestApi, function(err){
    // if any of the saves produced an error, err would equal that error
});
```

---------------------------------------

### map(arr, iterator, callback)

Produces a new array of values by mapping each value in the given array through
the iterator function. The iterator is called with an item from the array and a
callback for when it has finished processing. The callback takes 2 arguments,
an error and the transformed item from the array. If the iterator passes an
error to this callback, the main callback for the map function is immediately
called with the error.

Note, that since this function applies the iterator to each item in parallel
there is no guarantee that the iterator functions will complete in order, however
the results array will be in the same order as the original array.

__Arguments__

* arr - An array to iterate over.
* iterator(item, callback) - A function to apply to each item in the array.
  The iterator is passed a callback(err, transformed) which must be called once
  it has completed with an error (which can be null) and a transformed item.
* callback(err, results) - A callback which is called after all the iterator
  functions have finished, or an error has occurred. Results is an array of the
  transformed items from the original array.

__Example__

```js
async.map(['file1','file2','file3'], fs.stat, function(err, results){
    // results is now an array of stats for each file
});
```

---------------------------------------

### mapSeries(arr, iterator, callback)

The same as map only the iterator is applied to each item in the array in
series. The next iterator is only called once the current one has completed
processing. The results array will be in the same order as the original.

---------------------------------------

### mapLimit(arr, limit, iterator, callback)

The same as map only no more than "limit" iterators will be simultaneously
running at any time.

Note that the items are not processed in batches, so there is no guarantee that
 the first "limit" iterator functions will complete before any others are
started.

__Arguments__

* arr - An array to iterate over.
* limit - The maximum number of iterators to run at any time.
* iterator(item, callback) - A function to apply to each item in the array.
  The iterator is passed a callback(err, transformed) which must be called once
  it has completed with an error (which can be null) and a transformed item.
* callback(err, results) - A callback which is called after all the iterator
  functions have finished, or an error has occurred. Results is an array of the
  transformed items from the original array.

__Example__

```js
async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){
    // results is now an array of stats for each file
});
```

---------------------------------------

### filter(arr, iterator, callback)

__Alias:__ select

Returns a new array of all the values which pass an async truth test.
_The callback for each iterator call only accepts a single argument of true or
false, it does not accept an error argument first!_ This is in-line with the
way node libraries work with truth tests like fs.exists. This operation is
performed in parallel, but the results array will be in the same order as the
original.

__Arguments__

* arr - An array to iterate over.
* iterator(item, callback) - A truth test to apply to each item in the array.
  The iterator is passed a callback(truthValue) which must be called with a
  boolean argument once it has completed.
* callback(results) - A callback which is called after all the iterator
  functions have finished.

__Example__

```js
async.filter(['file1','file2','file3'], fs.exists, function(results){
    // results now equals an array of the existing files
});
```

---------------------------------------

### filterSeries(arr, iterator, callback)

__alias:__ selectSeries

The same as filter only the iterator is applied to each item in the array in
series. The next iterator is only called once the current one has completed
processing. The results array will be in the same order as the original.

---------------------------------------

### reject(arr, iterator, callback)

The opposite of filter. Removes values that pass an async truth test.

---------------------------------------

### rejectSeries(arr, iterator, callback)

The same as reject, only the iterator is applied to each item in the array
in series.

---------------------------------------

### reduce(arr, memo, iterator, callback)

__aliases:__ inject, foldl

Reduces a list of values into a single value using an async iterator to return
each successive step. Memo is the initial state of the reduction. This
function only operates in series. For performance reasons, it may make sense to
split a call to this function into a parallel map, then use the normal
Array.prototype.reduce on the results. This function is for situations where
each step in the reduction needs to be async, if you can get the data before
reducing it then it's probably a good idea to do so.

__Arguments__

* arr - An array to iterate over.
* memo - The initial state of the reduction.
* iterator(memo, item, callback) - A function applied to each item in the
  array to produce the next step in the reduction. The iterator is passed a
  callback(err, reduction) which accepts an optional error as its first
  argument, and the state of the reduction as the second. If an error is
  passed to the callback, the reduction is stopped and the main callback is
  immediately called with the error.
* callback(err, result) - A callback which is called after all the iterator
  functions have finished. Result is the reduced value.

__Example__

```js
async.reduce([1,2,3], 0, function(memo, item, callback){
    // pointless async:
    process.nextTick(function(){
        callback(null, memo + item)
    });
}, function(err, result){
    // result is now equal to the last value of memo, which is 6
});
```

---------------------------------------

### reduceRight(arr, memo, iterator, callback)

__Alias:__ foldr

Same as reduce, only operates on the items


text:
package org.sparkcommerce.cms.file.service;

import org.sparkcommerce.cms.file.domain.StaticAsset;
import org.sparkcommerce.cms.file.domain.StaticAssetStorage;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.sql.Blob;
import java.util.Map;

/**
 * @author Jeff Fischer
 *
 */
public interface StaticAssetStorageService {

    /**
     * Returns a StaticAssetStorage object.   Assumes that the asset is stored in the Database.
     *
     * Storing Assets in the DB is not the preferred mechanism for Spark as of 3.0 so in most cases, this
     * method would not be used by Spark implementations.
     *
     * @param id
     * @return
     */
    StaticAssetStorage findStaticAssetStorageById(Long id);

    /**
     * @deprecated   Use createStaticAssetStorageFromFile instead.
     * @return
     */
    StaticAssetStorage create();

    /**
     * Returns a StaticAssetStorage object using the id of a related StaticAsset.
     * Assumes that the asset is stored in the Database.
     *
     * Storing Assets in the DB is not the preferred mechanism for Spark as of 3.0 so in most cases, this
     * method would not be used by Spark implementations.
     *
     * @param id
     * @return
     */
    StaticAssetStorage readStaticAssetStorageByStaticAssetId(Long id);

    /**
     * Persists a static asset to the database.   Not typically used since Spark 3.0 as the
     * preferred method for storing assets is on a shared-filesystem.
     *
     * @param assetStorage
     * @return
     */
    StaticAssetStorage save(StaticAssetStorage assetStorage);

    /**
     * Removes a static asset from the database.   Not typically used since Spark 3.0 as the
     * preferred method for storing assets is on a shared-filesystem.
     *
     * @param assetStorage
     */
    void delete(StaticAssetStorage assetStorage);

    /**
     * @deprecated  Use createStaticAssetStorageFromFile instead.
     *
     * @param uploadedFile
     * @return
     * @throws IOException
     */
    Blob createBlob(MultipartFile uploadedFile) throws IOException;

    /**
     * @param fullUrl
     * @param sandBox
     * @param parameterMap
     * @return
     * @throws Exception
     */
    Map<String, String> getCacheFileModel(String fullUrl, Map<String, String> parameterMap) throws Exception;

    /**
     * Persists the file to the DB or FileSystem according to the staticAsset's StorageType.    Typically, the
     * MultipartFile is passed in from a Controller like the AdminAssetUploadController
     *
     * @param file
     * @param id
     * @throws IOException
     */
    void createStaticAssetStorageFromFile(MultipartFile file, StaticAsset staticAsset) throws IOException;

}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Diagnostics;
using Xunit;

/// <summary>
/// NOTE: All tests checking the output file should always call Stop before checking because Stop will flush the file to disk.
/// </summary>
namespace System.ServiceProcess.Tests
{
    [OuterLoop(/* Modifies machine state */)]
    public class ServiceBaseTests : IDisposable
    {
        private const int connectionTimeout = 30000;
        private readonly TestServiceProvider _testService;

        private static readonly Lazy<bool> s_isElevated = new Lazy<bool>(() => AdminHelpers.IsProcessElevated());
        protected static bool IsProcessElevated => s_isElevated.Value;
        protected static bool IsElevatedAndSupportsEventLogs => IsProcessElevated && PlatformDetection.IsNotWindowsNanoServer;

        private bool _disposed;

        public ServiceBaseTests()
        {
            _testService = new TestServiceProvider();
        }

        private void AssertExpectedProperties(ServiceController testServiceController)
        {
            var comparer = PlatformDetection.IsFullFramework ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal; // Full framework upper cases the name
            Assert.Equal(_testService.TestServiceName, testServiceController.ServiceName, comparer);
            Assert.Equal(_testService.TestServiceDisplayName, testServiceController.DisplayName);
            Assert.Equal(_testService.TestMachineName, testServiceController.MachineName);
            Assert.Equal(ServiceType.Win32OwnProcess, testServiceController.ServiceType);
            Assert.True(testServiceController.CanPauseAndContinue);
            Assert.True(testServiceController.CanStop);
            Assert.True(testServiceController.CanShutdown);
        }

        // [Fact]
        // To cleanup lingering Test Services uncomment the Fact attribute and run the following command
        //   msbuild /t:rebuildandtest /p:XunitMethodName=System.ServiceProcess.Tests.ServiceBaseTests.Cleanup /p:OuterLoop=true
        // Remember to comment out the Fact again before running tests otherwise it will cleanup tests running in parallel
        // and cause them to fail.
        public void Cleanup()
        {
            string currentService = "";
            foreach (ServiceController controller in ServiceController.GetServices())
            {
                try
                {
                    currentService = controller.DisplayName;
                    if (controller.DisplayName.StartsWith("Test Service"))
                    {
                        Console.WriteLine("Trying to clean-up " + currentService);
                        TestServiceInstaller deleteService = new TestServiceInstaller()
                        {
                            ServiceName = controller.ServiceName
                        };
                        deleteService.RemoveService();
                        Console.WriteLine("Cleaned up " + currentService);
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Failed " + ex.Message);
                }
            }
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        public void TestOnStartThenStop()
        {
            ServiceController controller = ConnectToServer();

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        public void TestOnStartWithArgsThenStop()
        {
            ServiceController controller = ConnectToServer();

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);

            controller.Start(new string[] { "StartWithArguments", "a", "b", "c" });
            _testService.Client = null;
            _testService.Client.Connect();

            // There is no definite order between start and connected when tests are running on multiple threads.
            // In this case we dont care much about the order, so we are just checking whether the appropiate bytes have been sent.
            Assert.Equal((int)(PipeMessageByteCode.Connected | PipeMessageByteCode.Start), _testService.GetByte() | _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Running);

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        public void TestOnPauseThenStop()
        {
            ServiceController controller = ConnectToServer();

            controller.Pause();
            Assert.Equal((int)PipeMessageByteCode.Pause, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Paused);

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        public void TestOnPauseAndContinueThenStop()
        {
            ServiceController controller = ConnectToServer();

            controller.Pause();
            Assert.Equal((int)PipeMessageByteCode.Pause, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Paused);

            controller.Continue();
            Assert.Equal((int)PipeMessageByteCode.Continue, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Running);

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        public void TestOnExecuteCustomCommand()
        {
            ServiceController controller = ConnectToServer();

            controller.ExecuteCommand(128);
            Assert.Equal(128, _testService.GetByte());

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        public void TestOnContinueBeforePause()
        {
            ServiceController controller = ConnectToServer();

            controller.Continue();
            controller.WaitForStatus(ServiceControllerStatus.Running);

            controller.Stop();
            Assert.Equal((int)PipeMessageByteCode.Stop, _testService.GetByte());
            controller.WaitForStatus(ServiceControllerStatus.Stopped);
        }

        [ConditionalFact(nameof(IsElevatedAndSupportsEventLogs))]
        public void LogWritten()
        {
            string serviceName = Guid.NewGuid().ToString();
            // The default username for installing the service is NT AUTHORITY\\LocalService which does not have access to EventLog.
            // If the username is null, then the service is created under LocalSystem Account which have access to EventLog.
            var testService = new TestServiceProvider(serviceName, userName: null);
            Assert.True(EventLog.SourceExists(serviceName));
            testService.DeleteTestServices();
        }

        [ConditionalFact(nameof(IsElevatedAndSupportsEventLogs))]
        public void LogWritten_AutoLog_False()
        {
            string serviceName = nameof(LogWritten_AutoLog_False) + Guid.NewGuid().ToString();
            var testService = new TestServiceProvider(serviceName);
            Assert.False(EventLog.SourceExists(serviceName));
            testService.DeleteTestServices();
        }

        [ConditionalFact(nameof(IsProcessElevated))]
        [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "Full Framework receives the Connected Byte Code after the Exception Thrown Byte Code")]
        public void PropagateExceptionFromOnStart()
        {
            string serviceName = nameof(PropagateExceptionFromOnStart) + Guid.NewGuid().ToString();
            var testService = new TestServiceProvider(serviceName);
            testService.Client.Connect(connectionTimeout);
            Assert.Equal((int)PipeMessageByteCode.Connected, testService.GetByte());
            Assert.Equal((int)PipeMessageByteCode.ExceptionThrown, testService.GetByte());
            testService.DeleteTestServices();
        }

        private ServiceController ConnectToServer()
        {
            _testService.Client.Connect(connectionTimeout);
            Assert.Equal((int)PipeMessageByteCode.Connected, _testService.GetByte());

            ServiceController controller = new ServiceController(_testService.TestServiceName);
            AssertExpectedProperties(controller);
            return controller;
        }

        public void Dispose()
        {
            if (!_disposed)
            {
                _testService.DeleteTestServices();
                _disposed = true;
            }
        }
    }
}


text:
package org.apache.nifi.registry.extension.bundle;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel
public class BuildInfo {

    private String buildTool;

    private String buildFlags;

    private String buildBranch;

    private String buildTag;

    private String buildRevision;

    private long built;

    private String builtBy;

    @ApiModelProperty(value = "The tool used to build the version of the bundle")
    public String getBuildTool() {
        return buildTool;
    }

    public void setBuildTool(String buildTool) {
        this.buildTool = buildTool;
    }

    @ApiModelProperty(value = "The flags used to build the version of the bundle")
    public String getBuildFlags() {
        return buildFlags;
    }

    public void setBuildFlags(String buildFlags) {
        this.buildFlags = buildFlags;
    }

    @ApiModelProperty(value = "The branch used to build the version of the bundle")
    public String getBuildBranch() {
        return buildBranch;
    }

    public void setBuildBranch(String buildBranch) {
        this.buildBranch = buildBranch;
    }

    @ApiModelProperty(value = "The tag used to build the version of the bundle")
    public String getBuildTag() {
        return buildTag;
    }

    public void setBuildTag(String buildTag) {
        this.buildTag = buildTag;
    }

    @ApiModelProperty(value = "The revision used to build the version of the bundle")
    public String getBuildRevision() {
        return buildRevision;
    }

    public void setBuildRevision(String buildRevision) {
        this.buildRevision = buildRevision;
    }

    @ApiModelProperty(value = "The timestamp the version of the bundle was built")
    public long getBuilt() {
        return built;
    }

    public void setBuilt(long built) {
        this.built = built;
    }

    @ApiModelProperty(value = "The identity of the user that performed the build")
    public String getBuiltBy() {
        return builtBy;
    }

    public void setBuiltBy(String builtBy) {
        this.builtBy = builtBy;
    }

}


text:
/**
 * @file
 * Manages elements that can offset the size of the viewport.
 *
 * Measures and reports viewport offset dimensions from elements like the
 * toolbar that can potentially displace the positioning of other elements.
 */

/**
 * @typedef {object} Drupal~displaceOffset
 *
 * @prop {number} top
 * @prop {number} left
 * @prop {number} right
 * @prop {number} bottom
 */

/**
 * Triggers when layout of the page changes.
 *
 * This is used to position fixed element on the page during page resize and
 * Toolbar toggling.
 *
 * @event drupalViewportOffsetChange
 */

(function ($, Drupal, debounce) {

  "use strict";

  /**
   * @name Drupal.displace.offsets
   *
   * @type {Drupal~displaceOffset}
   */
  var offsets = {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0
  };

  /**
   * Registers a resize handler on the window.
   *
   * @type {Drupal~behavior}
   */
  Drupal.behaviors.drupalDisplace = {
    attach: function () {
      // Mark this behavior as processed on the first pass.
      if (this.displaceProcessed) {
        return;
      }
      this.displaceProcessed = true;

      $(window).on('resize.drupalDisplace', debounce(displace, 200));
    }
  };

  /**
   * Informs listeners of the current offset dimensions.
   *
   * @function Drupal.displace
   *
   * @prop {Drupal~displaceOffset} offsets
   *
   * @param {bool} [broadcast]
   *   When true or undefined, causes the recalculated offsets values to be
   *   broadcast to listeners.
   *
   * @return {Drupal~displaceOffset}
   *   An object whose keys are the for sides an element -- top, right, bottom
   *   and left. The value of each key is the viewport displacement distance for
   *   that edge.
   *
   * @fires event:drupalViewportOffsetChange
   */
  function displace(broadcast) {
    offsets = Drupal.displace.offsets = calculateOffsets();
    if (typeof broadcast === 'undefined' || broadcast) {
      $(document).trigger('drupalViewportOffsetChange', offsets);
    }
    return offsets;
  }

  /**
   * Determines the viewport offsets.
   *
   * @return {Drupal~displaceOffset}
   *   An object whose keys are the for sides an element -- top, right, bottom
   *   and left. The value of each key is the viewport displacement distance for
   *   that edge.
   */
  function calculateOffsets() {
    return {
      top: calculateOffset('top'),
      right: calculateOffset('right'),
      bottom: calculateOffset('bottom'),
      left: calculateOffset('left')
    };
  }

  /**
   * Gets a specific edge's offset.
   *
   * Any element with the attribute data-offset-{edge} e.g. data-offset-top will
   * be considered in the viewport offset calculations. If the attribute has a
   * numeric value, that value will be used. If no value is provided, one will
   * be calculated using the element's dimensions and placement.
   *
   * @function Drupal.displace.calculateOffset
   *
   * @param {string} edge
   *   The name of the edge to calculate. Can be 'top', 'right',
   *   'bottom' or 'left'.
   *
   * @return {number}
   *   The viewport displacement distance for the requested edge.
   */
  function calculateOffset(edge) {
    var edgeOffset = 0;
    var displacingElements = document.querySelectorAll('[data-offset-' + edge + ']');
    var n = displacingElements.length;
    for (var i = 0; i < n; i++) {
      var el = displacingElements[i];
      // If the element is not visible, do consider its dimensions.
      if (el.style.display === 'none') {
        continue;
      }
      // If the offset data attribute contains a displacing value, use it.
      var displacement = parseInt(el.getAttribute('data-offset-' + edge), 10);
      // If the element's offset data attribute exits
      // but is not a valid number then get the displacement
      // dimensions directly from the element.
      if (isNaN(displacement)) {
        displacement = getRawOffset(el, edge);
      }
      // If the displacement value is larger than the current value for this
      // edge, use the displacement value.
      edgeOffset = Math.max(edgeOffset, displacement);
    }

    return edgeOffset;
  }

  /**
   * Calculates displacement for element based on its dimensions and placement.
   *
   * @param {HTMLElement} el
   *   The jQuery element whose dimensions and placement will be measured.
   *
   * @param {string} edge
   *   The name of the edge of the viewport that the element is associated
   *   with.
   *
   * @return {number}
   *   The viewport displacement distance for the requested edge.
   */
  function getRawOffset(el, edge) {
    var $el = $(el);
    var documentElement = document.documentElement;
    var displacement = 0;
    var horizontal = (edge === 'left' || edge === 'right');
    // Get the offset of the element itself.
    var placement = $el.offset()[horizontal ? 'left' : 'top'];
    // Subtract scroll distance from placement to get the distance
    // to the edge of the viewport.
    placement -= window['scroll' + (horizontal ? 'X' : 'Y')] || document.documentElement['scroll' + (horizontal) ? 'Left' : 'Top'] || 0;
    // Find the displacement value according to the edge.
    switch (edge) {
      // Left and top elements displace as a sum of their own offset value
      // plus their size.
      case 'top':
        // Total displacement is the sum of the elements placement and size.
        displacement = placement + $el.outerHeight();
        break;

      case 'left':
        // Total displacement is the sum of the elements placement and size.
        displacement = placement + $el.outerWidth();
        break;

      // Right and bottom elements displace according to their left and
      // top offset. Their size isn't important.
      case 'bottom':
        displacement = documentElement.clientHeight - placement;
        break;

      case 'right':
        displacement = documentElement.clientWidth - placement;
        break;

      default:
        displacement = 0;
    }
    return displacement;
  }

  /**
   * Assign the displace function to a property of the Drupal global object.
   *
   * @ignore
   */
  Drupal.displace = displace;
  $.extend(Drupal.displace, {

    /**
     * Expose offsets to other scripts to avoid having to recalculate offsets.
     *
     * @ignore
     */
    offsets: offsets,

    /**
     * Expose method to compute a single edge offsets.
     *
     * @ignore
     */
    calculateOffset: calculateOffset
  });

})(jQuery, Drupal, Drupal.debounce);


text:
using EventEmitter.Storage.POCO;

namespace EventEmitter.Storage.Repositories.Linq2DbRepositories
{
    public class BenefitTypeRepository : Repository<BenefitType>, IBenefitTypeRepository
    {
    }
}


text:
package org.apache.accumulo.core.util.format;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.TreeMap;

import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Value;
import org.junit.Before;
import org.junit.Test;

public class ShardedTableDistributionFormatterTest {
  ShardedTableDistributionFormatter formatter;

  Map<Key,Value> data;

  @Before
  public void setUp() {
    data = new TreeMap<Key,Value>();
    formatter = new ShardedTableDistributionFormatter();
  }

  @Test
  public void testInitialize() {
    data.put(new Key(), new Value());
    data.put(new Key("r", "~tab"), new Value());
    formatter.initialize(data.entrySet(), false);

    assertTrue(formatter.hasNext());
    formatter.next();
    assertFalse(formatter.hasNext());
  }

  @Test
  public void testAggregate() {
    data.put(new Key("t", "~tab", "loc"), new Value("srv1".getBytes(StandardCharsets.UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 0), new Value("srv1".getBytes(StandardCharsets.UTF_8)));
    data.put(new Key("t;19700101", "~tab", "loc", 1), new Value("srv2".getBytes(StandardCharsets.UTF_8)));

    formatter.initialize(data.entrySet(), false);

    String[] result = formatter.next().split("\n");
    assertTrue(result[2].endsWith("\t1"));
    assertTrue(result[3].endsWith("\t2"));
    assertFalse(formatter.hasNext());
  }
}


text:
using Moq;
using MScResearchTool.Server.BusinessLogic.Businesses;
using MScResearchTool.Server.Core.Models;
using MScResearchTool.Server.Core.Repositories;
using MScResearchTool.Server.Tests.Core.Core;
using MScResearchTool.Server.Tests.Core.Units;
using System.Collections.Generic;

namespace MScResearchTool.Server.Tests.Core.BusinessTests
{
    public abstract class UsersBusinessTestsBase : MockBase<TestingUnit<UsersBusiness>>
    {
        protected string ExistingName { get; private set; }
        protected string ExistingPassword { get; private set; }

        protected IList<User> UsersDatabase { get; set; }

        public UsersBusinessTestsBase()
        {
            ExistingName = "user";
            ExistingPassword = "pass";

            UsersDatabase = new List<User>()
            {
                new User
                {
                    Salt = "xcxcxzc",
                    Id = 241,
                    Name = ExistingName,
                    Password = ExistingPassword
                }
            };
        }

        protected override TestingUnit<UsersBusiness> GetUnit()
        {
            var unit = new TestingUnit<UsersBusiness>();

            unit.AddDependency(new Mock<IUsersRepository>(MockBehavior.Strict));

            return unit;
        }

        protected UsersBusiness GetUniversalMockedUnit()
        {
            TestingUnit<UsersBusiness> testingUnit = GetUnit();

            var mockUsersRepository = testingUnit.GetDependency<Mock<IUsersRepository>>();
            mockUsersRepository.Setup(cu => cu.CreateUser(It.IsAny<User>())).Callback((User user) => UsersDatabase.Add(user));
            mockUsersRepository.Setup(ru => ru.ReadUsers()).Returns(UsersDatabase);

            return testingUnit.GetResolvedTestingUnit();
        }
    }
}


text:
{
    'name': 'Dashboards',
    'version': '1.0',
    'category': 'Hidden',
    'description': """
Lets the user create a custom dashboard.
========================================

Allows users to create custom dashboard.
    """,
    'author': 'OpenERP SA',
    'depends': ['base', 'web'],
    'data': [
        'security/ir.model.access.csv',
        'board_view.xml',
        'board_mydashboard_view.xml',
        'views/board.xml',
    ],
    'qweb': ['static/src/xml/*.xml'],
    'installable': True,
    'auto_install': False,
    'images': ['images/1_dashboard_definition.jpeg','images/2_publish_note.jpeg','images/3_admin_dashboard.jpeg',],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:


text:
import { visit } from '@ember/test-helpers';
import config from 'ember-api-docs/config/environment';
import { requestIdlePromise } from 'ember-api-docs/utils/request-idle-callback';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import sinon from 'sinon';

module('Acceptance | analytics page tracking', function (hooks) {
  setupApplicationTest(hooks);

  test('checking that trackPage gets called on transitions', async function (assert) {
    const pages = [
      '/ember/2.11/namespaces/Ember',
      '/ember/2.11/modules/ember-metal',
      '/ember/2.11/classes/Ember.Application',
    ];

    const applicationRouter = this.owner.lookup('router:main');
    const metricsService = this.owner.lookup('service:metrics');

    const routerTrackPageSpy = sinon.spy(applicationRouter, '__trackPage');
    const serviceTrackPageSpy = sinon.spy(metricsService, 'trackPage');

    await visit(pages[0]);
    await visit(pages[1]);
    await visit(pages[2]);

    assert.expect(5);

    assert.ok(
      routerTrackPageSpy.calledThrice,
      `__trackPage() was not called 3 times it was called ${routerTrackPageSpy.callCount} times`
    );
    assert.ok(
      serviceTrackPageSpy.calledThrice,
      `metrics.trackPage() was not called 3 times it was called ${serviceTrackPageSpy.callCount} times`
    );

    const hostname = config.APP.domain.replace(/(http|https)?:?\/\//g, '');

    assert.ok(
      serviceTrackPageSpy.calledWith({
        page: '/ember/2.11/namespaces/Ember',
        title: 'project-version.namespaces.namespace.index',
        hostname,
      }),
      'service was called with expected arguments for ember namespace page'
    );
    assert.ok(
      serviceTrackPageSpy.calledWith({
        page: '/ember/2.11/modules/ember-metal',
        title: 'project-version.modules.module.index',
        hostname,
      }),
      'service was called with expected arguments for ember metal module'
    );
    assert.ok(
      serviceTrackPageSpy.calledWith({
        page: '/ember/2.11/classes/Ember.Application',
        title: 'project-version.classes.class.index',
        hostname,
      }),
      'service was called with expected arguments for ember application class'
    );

    // make sure the test runner waits for last idle callback
    return requestIdlePromise(2000);
  });
});


text:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>Elauwit Speed Test</title>
		<base href="/">
		<link rel="stylesheet" type="text/css" href="https://cdn-1.elauwit.net/collections/libs/bootstrap/3.3.2/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="https://cdn-2.elauwit.net/collections/libs/fonts/font-awesome/4.4.0/css/font-awesome.min.css" />
		<link rel="stylesheet" type="text/css" href="https://cdn-5.elauwit.net/collections/libs/styles/css/styles.min.css" />
		<link rel="stylesheet" type="text/css" href="styles/css/app.css" />
		<script type="text/javascript" src="/js/dependencies/sails.io.js"></script>
		<script>
		io.sails.autoConnect = false;
		io.sails.environment = 'production';
		io.sails.transports = ['websocket', 'polling'];

		var api_url = 'https://api.elauwit.net/v2';
		var ws_api_url = 'https://api.elauwit.net';
		var loginUrl = 'https://sso.elauwit.net/sso';

		var client_ip_address = '91.64.20.229';
		var client_ipv6_address = '';
		</script>
		<script type="text/javascript" src="https://cdn-1.elauwit.net/collections/libs/angular.js/1.3.15/angular.js"></script>
		<script type="text/javascript" src="https://cdn-2.elauwit.net/collections/libs/angular.js/1.3.15/angular-cookies.min.js"></script>
		<script type="text/javascript" src="https://cdn-3.elauwit.net/collections/libs/angular-ui-router/0.2.13/angular-ui-router.js"></script>
		<script type="text/javascript" src="https://cdn-4.elauwit.net/collections/libs/angular-adaptive-templating/angular-adaptive-templating.js"></script>
		<script type="text/javascript" src="https://cdn-5.elauwit.net/collections/libs/angular-sails/1.1.3/angular-sails.min.js"></script>
		<script type="text/javascript" src="https://cdn-6.elauwit.net/collections/libs/jquery/2.1.3/jquery.min.js"></script>
		<script type="text/javascript" src="https://cdn-3.elauwit.net/collections/libs/bootstrap/3.3.2/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="https://cdn-4.elauwit.net/collections/libs/angular-ui-bootstrap/0.13.0/ui-bootstrap.min.js"></script>
		<script type="text/javascript" src="https://cdn-2.elauwit.net/collections/libs/angular.js/1.3.15/angular-sanitize.min.js"></script>
		<script type="text/javascript" src="https://cdn-2.elauwit.net/collections/libs/hyperdrive/latest/js/Hyperdrive.min.js"></script>
		<script type="text/javascript" src="_declarations.js"></script>
		<script type="text/javascript" src="common/directives/auth-service.js"></script>
		<script type="text/javascript" src="common/directives/sails-interceptor.js"></script>
		<script type="text/javascript" src="app/app.js"></script>
		<script type="text/javascript" src="app/login/login.js"></script>
		<script type="text/javascript" src="app/login_return/login_return.js"></script>
		<script type="text/javascript" src="app/ui/ui.js"></script>
		<script type="text/javascript" src="app/speedtest/speedtest.js"></script>
		<script type="text/javascript" src="app/history/history.js"></script>
		<script type="text/javascript" src="browserdetect.js"></script>
	</head>
	<body bgcolor="#ffffff" ng-controller="AppController" domain="myelauwit.com">
		<div ui-view id="wrapper">

		</div>
		<hd-ui-alert></hd-ui-alert>
		<hd-ui-confirm></hd-ui-confirm>
		<hd-ui-prompt></hd-ui-prompt>
	</body>
</html>


text:
package microservices.sample.persistence;

import com.google.common.base.Strings;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import microservices.sample.Entity;
import microservices.sample.IdResponse;
import microservices.sample.InvalidValueException;
import microservices.sample.ResourceNotFoundException;

import java.util.function.Consumer;

/**
 * Hazelcast-based distributed in-memory store implementation.
 *
 * @author mamad
 * @since 17/03/15.
 */
@Singleton
public class HazelcastEntityStore implements EntityStore {
    public static final String TABLE1 = "common";

    private final HazelcastInstance hazelcastInstance;

    @Inject
    public HazelcastEntityStore(HazelcastInstance hazelcastInstance) {
        this.hazelcastInstance = hazelcastInstance;
    }

    @Override
    public <T> void saveAsync(T object, Consumer<IdResponse> onSuccessCallback, Consumer<Throwable> onErrorCallback) {
        if (object == null) {
            onErrorCallback.accept(new NullPointerException("Object can not be null."));
            return;
        }
        if (!(object instanceof Entity)) {
            onErrorCallback.accept(new InvalidValueException("Only objects of type Entity are supported."));
            return;
        }
        String id = ((Entity) object).getId();
        if (Strings.isNullOrEmpty(id)) {
            onErrorCallback.accept(new NullPointerException("Object id can not be null."));
            return;
        }
        try {
            IMap<Object, Object> map = getMap();
            map.put(id, object);
            onSuccessCallback.accept(IdResponse.of(id));
        } catch (Exception e) {
            onErrorCallback.accept(e);
        }
    }

    private IMap<Object, Object> getMap() {
        return hazelcastInstance.getMap(TABLE1);
    }

    @Override
    public <T> void findById(String id, Consumer<T> onSuccessCallback, Consumer<Throwable> onErrorCallback) {
        if (id == null) {
            onErrorCallback.accept(new NullPointerException("id can not be null."));
            return;
        }

        IMap<Object, Object> map = getMap();
        if (map.containsKey(id)) {
            T o = (T) map.get(id);
            onSuccessCallback.accept(o);
        } else {
            onErrorCallback.accept(new ResourceNotFoundException(id));
        }
    }
}


text:
Clazz.declarePackage ("J.adapter.readers.more");
Clazz.load (["J.adapter.smarter.AtomSetCollectionReader"], "J.adapter.readers.more.GromacsReader", ["java.lang.Float", "JU.P3", "J.adapter.smarter.Atom", "J.api.JmolAdapter", "JU.Logger"], function () {
c$ = Clazz.declareType (J.adapter.readers.more, "GromacsReader", J.adapter.smarter.AtomSetCollectionReader);
Clazz.overrideMethod (c$, "initializeReader",
function () {
this.setIsPDB ();
this.asc.newAtomSet ();
this.setModelPDB (true);
});
Clazz.overrideMethod (c$, "checkLine",
function () {
this.checkCurrentLineForScript ();
this.asc.setAtomSetName (this.line.trim ());
this.readAtoms ();
this.readUnitCell ();
this.continuing = false;
return false;
});
Clazz.defineMethod (c$, "readAtoms",
 function () {
var modelAtomCount = this.parseIntStr (this.rd ());
for (var i = 0; i < modelAtomCount; ++i) {
this.rd ();
var len = this.line.length;
if (len != 44 && len != 68) {
JU.Logger.warn ("line cannot be read for GROMACS atom data: " + this.line);
continue;
}var atom =  new J.adapter.smarter.Atom ();
atom.sequenceNumber = this.parseIntRange (this.line, 0, 5);
this.setAtomName (atom, this.parseTokenRange (this.line, 5, 9).trim (), this.line.substring (11, 15).trim ());
atom.atomSerial = this.parseIntRange (this.line, 15, 20);
atom.x = this.parseFloatRange (this.line, 20, 28) * 10;
atom.y = this.parseFloatRange (this.line, 28, 36) * 10;
atom.z = this.parseFloatRange (this.line, 36, 44) * 10;
if (Float.isNaN (atom.x) || Float.isNaN (atom.y) || Float.isNaN (atom.z)) {
JU.Logger.warn ("line cannot be read for GROMACS atom data: " + this.line);
atom.set (0, 0, 0);
}this.setAtomCoord (atom);
atom.elementSymbol = this.deduceElementSymbol (atom.group3, atom.atomName);
if (!this.filterAtom (atom, i)) continue;
atom.isHetero = false;
this.asc.addAtom (atom);
if (len < 69) continue;
var vx = this.parseFloatRange (this.line, 44, 52) * 10;
var vy = this.parseFloatRange (this.line, 52, 60) * 10;
var vz = this.parseFloatRange (this.line, 60, 68) * 10;
if (Float.isNaN (vx) || Float.isNaN (vy) || Float.isNaN (vz)) continue;
this.asc.addVibrationVector (atom.index, vx, vy, vz);
}
});
Clazz.defineMethod (c$, "setAtomName",
 function (atom, gname, aname) {
atom.atomName = aname;
if (gname.equals ("SOL") && aname.length == 3 && "OW1;HW2;HW3".indexOf (aname) >= 0) gname = "WAT";
atom.group3 = gname;
}, "J.adapter.smarter.Atom,~S,~S");
Clazz.defineMethod (c$, "deduceElementSymbol",
function (group3, atomName) {
if (atomName.length <= 2 && group3.equals (atomName)) return atomName;
var ch1 = (atomName.length == 4 ? atomName.charAt (0) : '\0');
var ch2 = atomName.charAt (atomName.length == 4 ? 1 : 0);
var isHetero = J.api.JmolAdapter.isHetero (group3);
if (J.adapter.smarter.Atom.isValidElementSymbolNoCaseSecondChar2 (ch1, ch2)) return (isHetero || ch1 != 'H' ? "" + ch1 + ch2 : "H");
if (J.adapter.smarter.Atom.isValidElementSymbol (ch2)) return "" + ch2;
if (J.adapter.smarter.Atom.isValidElementSymbol (ch1)) return "" + ch1;
return "Xx";
}, "~S,~S");
Clazz.defineMethod (c$, "readUnitCell",
 function () {
if (this.rd () == null) return;
var tokens = J.adapter.smarter.AtomSetCollectionReader.getTokensStr (this.line);
if (tokens.length < 3 || !this.doApplySymmetry) return;
var a = 10 * this.parseFloatStr (tokens[0]);
var b = 10 * this.parseFloatStr (tokens[1]);
var c = 10 * this.parseFloatStr (tokens[2]);
this.setUnitCell (a, b, c, 90, 90, 90);
this.setSpaceGroupName ("P1");
var atoms = this.asc.atoms;
var pt = JU.P3.new3 (0.5, 0.5, 0.5);
for (var i = this.asc.ac; --i >= 0; ) {
this.setAtomCoord (atoms[i]);
atoms[i].add (pt);
}
});
});


text:
import { QuerySpecification, ServiceDocument, TaskState } from '../index';

export interface QueryTask extends ServiceDocument {
    /**
     * A list of authorization context links which can access this service.
     */
    tenantLinks?: string[];

    /**
     * Task state
     */
    taskInfo: TaskState;

    /**
     * Describes the query
     */
    querySpec: QuerySpecification;

    /**
     * Query results
     */
    results?: any;

    /**
     * The index service to query documents for. Unless otherwise specified, we default to the
     * document index.
     */
    indexLink?: string;

    /**
     * The node selector to use when QueryOption#BROADCAST is set
     */
    nodeSelectorLink?: string;
}


text:
package weixin.popular.bean.scan.crud;

import weixin.popular.bean.scan.base.ProductGet;
import weixin.popular.bean.scan.info.BrandInfo;

public class ProductCreate extends ProductGet {
    private BrandInfo brand_info;

    public BrandInfo getBrand_info() {
        return brand_info;
    }

    public void setBrand_info(BrandInfo brand_info) {
        this.brand_info = brand_info;
    }
}


text: <!DOCTYPE html>


text:
layout: post
title: Thinking techshare 3
---

I still still aven't decided on my techshare, which is supposed to in June 13 or 20th.

I saw this product: https://www.thoughtworks.com/go/.....It seems to be a software product tool....see if it would work. But it has 30 day free trail...


text:
package com.ghstudios.android.ui.detail;

import android.annotation.SuppressLint;
import android.content.Context;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.support.v4.app.LoaderManager.LoaderCallbacks;
import android.support.v4.content.Loader;
import android.support.v4.widget.CursorAdapter;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ghstudios.android.data.classes.QuestReward;
import com.ghstudios.android.data.database.QuestRewardCursor;
import com.ghstudios.android.loader.QuestRewardListCursorLoader;
import com.ghstudios.android.mhgendatabase.R;
import com.ghstudios.android.ui.ClickListeners.QuestClickListener;
import com.github.monxalo.android.widget.SectionCursorAdapter;

public class ItemQuestFragment extends ListFragment implements
		LoaderCallbacks<Cursor> {
	private static final String ARG_ITEM_ID = "ITEM_ID";

	public static ItemQuestFragment newInstance(long itemId) {
		Bundle args = new Bundle();
		args.putLong(ARG_ITEM_ID, itemId);
		ItemQuestFragment f = new ItemQuestFragment();
		f.setArguments(args);
		return f;
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// Initialize the loader to load the list of runs
		getLoaderManager().initLoader(R.id.item_quest_fragment, getArguments(), this);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.fragment_generic_list, null);
		return v;
	}

	@SuppressLint("NewApi")
	@Override
	public Loader<Cursor> onCreateLoader(int id, Bundle args) {
		// You only ever load the runs, so assume this is the case
		long itemId = args.getLong(ARG_ITEM_ID, -1);

		return new QuestRewardListCursorLoader(getActivity(),
				QuestRewardListCursorLoader.FROM_ITEM, itemId);
	}

	@Override
	public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {
		// Create an adapter to point at this cursor

		QuestRewardListCursorAdapter adapter = new QuestRewardListCursorAdapter(
				getActivity(), (QuestRewardCursor) cursor);
		setListAdapter(adapter);

	}

	@Override
	public void onLoaderReset(Loader<Cursor> loader) {
		// Stop using the cursor (via the adapter)
		setListAdapter(null);
	}

	private static class QuestRewardListCursorAdapter extends SectionCursorAdapter {

		private QuestRewardCursor mQuestRewardCursor;

		public QuestRewardListCursorAdapter(Context context,
				QuestRewardCursor cursor) {
			super(context, cursor, R.layout.listview_generic_header,1);
			mQuestRewardCursor = cursor;
		}

		@Override
		protected String getCustomGroup(Cursor c) {
			QuestReward questReward = ((QuestRewardCursor)c).getQuestReward();
			return questReward.getQuest().getHub();
		}

		@Override
		public View newView(Context context, Cursor cursor, ViewGroup parent) {
			// Use a layout inflater to get a row view
			LayoutInflater inflater = (LayoutInflater) context
					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			return inflater.inflate(R.layout.fragment_item_quest_listitem,
					parent, false);
		}

		@Override
		public void bindView(View view, Context context, Cursor cursor) {
			// Get the item for the current row
			QuestReward questReward = mQuestRewardCursor.getQuestReward();

			// Set up the text view
			LinearLayout itemLayout = (LinearLayout) view
					.findViewById(R.id.listitem);

			TextView questTextView = (TextView) view.findViewById(R.id.quest_name);
			TextView levelTextView = (TextView) view.findViewById(R.id.quest_stars);
			TextView slotTextView = (TextView) view.findViewById(R.id.slot);
			TextView amountTextView = (TextView) view.findViewById(R.id.amount);
			TextView percentageTextView = (TextView) view
					.findViewById(R.id.percentage);

			String cellQuestText = questReward.getQuest().getName();
			String cellLevelText = questReward.getQuest().getStars();
			String cellSlotText = questReward.getRewardSlot();
			int cellAmountText = questReward.getStackSize();
			int cellPercentageText = questReward.getPercentage();

			questTextView.setText(cellQuestText);
			levelTextView.setText(cellLevelText);
			slotTextView.setText(cellSlotText);
			amountTextView.setText("x" + cellAmountText);

			String percent = "" + cellPercentageText + "%";
			percentageTextView.setText(percent);

			itemLayout.setTag(questReward.getQuest().getId());
            itemLayout.setOnClickListener(new QuestClickListener(context,
                    questReward.getQuest().getId()));
		}
	}

}


text:
from __future__ import unicode_literals

from django.apps import AppConfig

class InventoryManageConfig(AppConfig):
    name = 'Inventory_manage'


text:
<?php

class Form_Element_Textarea extends Form_Element_Abstract implements IElement
{
	public function getXhtml()
	{
		return Form::textarea($this->name, $this->value, $this->attributes);
	}
}
?>


text:
package org.helianto.task.def;

/**
 * Define as ações decorrentes de um acompanhamento.
 *
 *
As ações procuram seguir o método 8D.

 *

 *
Identificação: dado nopréprio relatório

 *
Equipe: relator, participantes.

 *
Ação imediata: quando inclui disposição, dada na ocorréncia

 *
REVIEW: Anélise crética, eventualmente inclui ação imediata

 *
CAUSE: causa

 *
ACTION_PLAN: ação

 *
ACTION_RESULT: resultado da ação

 *
EFFECTIVENESS: eficécia

 *
IMPACT: impacto e abrangéncia

 *
DEPLOYMENT: encerramento e comunicação

 *

 *
 * @author Mauricio Fernandes de Castro
 */
public enum FollowUpAction {

    /**
     * Anélise crética, eventualmente inclui ação imediata.
     */
	REVIEW('R'),
    /**
     * Investigação de causa.
     */
	CAUSE('C'),
    /**
     * Planejamento da ação.
     */
	ACTION_PLAN('P'),
    /**
     * Resultado da ação.
     */
	ACTION_RESULT('A'),
    /**
     * Verificação de eficécia.
     */
	EFFECTIVENESS('E'),
    /**
     * Abrangéncia.
     */
	IMPACT('I'),
    /**
     * Encerramento e comunicação.
     */
	DEPLOYMENT('D');

    private char value;

    private FollowUpAction(char value) {
        this.value = value;
    }

    public char getValue() {
        return this.value;
    }

}


text:
import React from "react";
import TestRenderer from "react-test-renderer";

import StepSequence, { StepSequenceProps } from "./step-sequence.component";
import StepSequenceItem from "./step-sequence-item/step-sequence-item.component";
import { testStyledSystemSpacing } from "../../__spec_helper__/test-utils";

describe("StepSequence", () => {
  const wrapper = (props?: Partial<StepSequenceProps>) =>
    TestRenderer.create(
      <StepSequence {...props}>
        <StepSequenceItem
          aria-label="Step 1 of 5"
          indicator="2"
          hiddenCompleteLabel="Complete text for non visual users"
          hiddenCurrentLabel="Current text for non visual users"
        >
          Item
        </StepSequenceItem>
      </StepSequence>
    );

  it("renders correctly", () => {
    expect(wrapper()).toMatchSnapshot();
  });

  it("renders correctly with vertical orientation", () => {
    expect(wrapper({ orientation: "vertical" })).toMatchSnapshot();
  });

  describe("styled system", () => {
    testStyledSystemSpacing((props) => (
      <StepSequence {...props}>

test

      </StepSequence>
    ));
  });
});


text:
'use strict';

var Lib = require('../../lib');

var handleSubplotDefaults = require('../subplot_defaults');
var handleArrayContainerDefaults = require('../array_container_defaults');
var layoutAttributes = require('./layout_attributes');

module.exports = function supplyLayoutDefaults(layoutIn, layoutOut, fullData) {
    handleSubplotDefaults(layoutIn, layoutOut, fullData, {
        type: 'mapbox',
        attributes: layoutAttributes,
        handleDefaults: handleDefaults,
        partition: 'y',
        accessToken: layoutOut._mapboxAccessToken
    });
};

function handleDefaults(containerIn, containerOut, coerce, opts) {
    coerce('accesstoken', opts.accessToken);
    coerce('style');
    coerce('center.lon');
    coerce('center.lat');
    coerce('zoom');
    coerce('bearing');
    coerce('pitch');

    handleArrayContainerDefaults(containerIn, containerOut, {
        name: 'layers',
        handleItemDefaults: handleLayerDefaults
    });

    // copy ref to input container to update 'center' and 'zoom' on map move
    containerOut._input = containerIn;
}

function handleLayerDefaults(layerIn, layerOut) {
    function coerce(attr, dflt) {
        return Lib.coerce(layerIn, layerOut, layoutAttributes.layers, attr, dflt);
    }

    var visible = coerce('visible');
    if(visible) {
        var sourceType = coerce('sourcetype');
        var mustBeRasterLayer = sourceType === 'raster' || sourceType === 'image';

        coerce('source');
        coerce('sourceattribution');

        if(sourceType === 'vector') {
            coerce('sourcelayer');
        }

        if(sourceType === 'image') {
            coerce('coordinates');
        }

        var typeDflt;
        if(mustBeRasterLayer) typeDflt = 'raster';

        var type = coerce('type', typeDflt);

        if(mustBeRasterLayer && type !== 'raster') {
            type = layerOut.type = 'raster';
            Lib.log('Source types *raster* and *image* must drawn *raster* layer type.');
        }

        coerce('below');
        coerce('color');
        coerce('opacity');
        coerce('minzoom');
        coerce('maxzoom');

        if(type === 'circle') {
            coerce('circle.radius');
        }

        if(type === 'line') {
            coerce('line.width');
            coerce('line.dash');
        }

        if(type === 'fill') {
            coerce('fill.outlinecolor');
        }

        if(type === 'symbol') {
            coerce('symbol.icon');
            coerce('symbol.iconsize');

            coerce('symbol.text');
            Lib.coerceFont(coerce, 'symbol.textfont');
            coerce('symbol.textposition');
            coerce('symbol.placement');
        }
    }
}


text:
license: Licensed to the Apache Software Foundation (ASF) under one
         or more contributor license agreements.  See the NOTICE file
         distributed with this work for additional information
         regarding copyright ownership.  The ASF licenses this file
         to you under the Apache License, Version 2.0 (the
         "License"); you may not use this file except in compliance
         with the License.  You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

         Unless required by applicable law or agreed to in writing,
         software distributed under the License is distributed on an
         "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         KIND, either express or implied.  See the License for the
         specific language governing permissions and limitations
         under the License.
---

show
===============

Displays the splash screen.

    navigator.splashscreen.show();

Description
-----------

navigator.splashscreen.show() displays the applications splash screen.

Supported Platforms
-------------------

- Android
- iOS

Quick Example
-------------

    navigator.splashscreen.show();

Full Example
------------

    <!DOCTYPE html>

        <title>Splashscreen Example</title>

Example


text:
/**
 * @file
 *   This file includes definitions for generating and processing CoAP headers.
 */

#ifndef COAP_HEADER_HPP_
#define COAP_HEADER_HPP_

#include <string.h>

#include <openthread-types.h>
#include <openthread-coap.h>
#include <common/encoding.hpp>
#include <common/message.hpp>

using Thread::Encoding::BigEndian::HostSwap16;

namespace Thread {

/**
 * @namespace Thread::Coap
 * @brief
 *   This namespace includes definitions for CoAP.
 *
 */
namespace Coap {

/**
 * @addtogroup core-coap
 *
 * @brief
 *   This module includes definitions for CoAP.
 *
 * @{
 *
 */

/**
 * This class implements CoAP header generation and parsing.
 *
 */
class Header : public otCoapHeader
{
public:
    enum
    {
        kVersion1           = 1,                         ///< Version 1
        kMinHeaderLength    = 4,                         ///< Minimum header length
        kMaxHeaderLength    = OT_COAP_HEADER_MAX_LENGTH, ///< Maximum header length
        kDefaultTokenLength = 2                          ///< Default token length
    };

    /**
     * CoAP Type values.
     *
     */
    typedef otCoapType Type;

    /**
     * CoAP Code values.
     *
     */
    typedef otCoapCode Code;

    /**
     * This method initializes the CoAP header.
     *
     */
    void Init(void);

    /**
     * This method initializes the CoAP header with specific Type and Code.
     *
     * @param[in]  aType  The Type value.
     * @param[in]  aCode  The Code value.
     *
     */
    void Init(Type aType, Code aCode);

    /**
     * This method parses the CoAP header from a message.
     *
     * @param[in]  aMessage       A reference to the message.
     * @param[in]  aCopiedMessage To indicate if this message is a copied one or not
     *
     * @retval kThreadError_None   Successfully parsed the message.
     * @retval kThreadError_Parse  Failed to parse the message.
     *
     */
    ThreadError FromMessage(const Message &aMessage, bool aCopiedMessage);

    /**
     * This method returns the Version value.
     *
     * @returns The Version value.
     *
     */
    uint8_t GetVersion(void) const { return (mHeader.mFields.mVersionTypeToken & kVersionMask) >> kVersionOffset; }

    /**
     * This method sets the Version value.
     *
     * @param[in]  aVersion  The Version value.
     *
     */
    void SetVersion(uint8_t aVersion) {
        mHeader.mFields.mVersionTypeToken &= ~kVersionMask;
        mHeader.mFields.mVersionTypeToken |= aVersion << kVersionOffset;
    }

    /**
     * This method returns the Type value.
     *
     * @returns The Type value.
     *
     */
    Type GetType(void) const { return static_cast<Header::Type>(mHeader.mFields.mVersionTypeToken & kTypeMask); }

    /**
     * This method sets the Type value.
     *
     * @param[in]  aType  The Type value.
     *
     */
    void SetType(Type aType) {
        mHeader.mFields.mVersionTypeToken &= ~kTypeMask;
        mHeader.mFields.mVersionTypeToken |= aType;
    }

    /**
     * This method returns the Code value.
     *
     * @returns The Code value.
     *
     */
    Code GetCode(void) const { return static_cast<Code>(mHeader.mFields.mCode); }

    /**
     * This method sets the Code value.
     *
     * @param[in]  aCode  The Code value.
     *
     */
    void SetCode(Code aCode) { mHeader.mFields.mCode = static_cast<uint8_t>(aCode); }

    /**
     * This method returns the Message ID value.
     *
     * @returns The Message ID value.
     *
     */
    uint16_t GetMessageId(void) const { return HostSwap16(mHeader.mFields.mMessageId); }

    /**
     * This method sets the Message ID value.
     *
     * @param[in]  aMessageId  The Message ID value.
     *
     */
    void SetMessageId(uint16_t aMessageId) { mHeader.mFields.mMessageId = HostSwap16(aMessageId); }

    /**
     * This method returns the Token length.
     *
     * @returns The Token length.
     *
     */
    uint8_t GetTokenLength(void) const { return (mHeader.mFields.mVersionTypeToken & kTokenLengthMask) >> kTokenLengthOffset; }

    /**
     * This method returns a pointer to the Token value.
     *
     * @returns A pointer to the Token value.
     *
     */
    const uint8_t *GetToken(void) const { return mHeader.mBytes + kTokenOffset; }

    /**
     * This method sets the Token value and length.
     *
     * @param[in]  aToken        A pointer to the Token value.
     * @param[in]  aTokenLength  The Length of @p aToken.
     *
     */
    void SetToken(const uint8_t *aToken, uint8_t aTokenLength) {
        mHeader.mFields.mVersionTypeToken = (mHeader.mFields.mVersionTypeToken & ~kTokenLengthMask) |
                                            ((aTokenLength << kTokenLengthOffset) & kTokenLengthMask);
        memcpy(mHeader.mBytes + kTokenOffset, aToken, aTokenLength);
        mHeaderLength += aTokenLength;
    }

    /**
     * This method sets the Token length and randomizes its value.
     *
     * @param[in]  aTokenLength  The Length of a Token to set.
     *
     */
    void SetToken(uint8_t aTokenLength);

    /**
     *  This method checks if Tokens in two CoAP headers are equal.
     *
     *  @param[in]  aHeader  A header to compare.
     *
     * @retval TRUE   If two Tokens are equal.
     * @retval FALSE  If Tokens differ in length or value.
     *
     */
    bool IsTokenEqual(const Header &aHeader) const {
        return ((this->GetTokenLength() == aHeader.GetTokenLength()) &&
                (memcmp(this->GetToken(), aHeader.GetToken(), this->GetTokenLength()) == 0));
    }

    /**
     * This structure represents a CoAP option.
     *
     */
    struct Option : public otCoapOption
    {
        /**
         * Protocol Constants
         *
         */
        enum
        {
            kOptionDeltaOffset   = 4,                          ///< Delta Offset
            kOptionDeltaMask     = 0xf << kOptionDeltaOffset,  ///< Delta Mask
        };

        /**
         * Option Numbers
         */
        typedef otCoapOptionType Type;
    };

    /**
     * This method appends a CoAP option.
     *
     * @param[in]  aOption  The CoAP Option.
     *
     * @retval kThreadError_None         Successfully appended the option.
     * @retval kThreadError_InvalidArgs  The option type is not equal or greater than the last option type.
     * @retval kThreadError_NoBufs       The option length exceeds the buffer size.
     *
     */
    ThreadError AppendOption(const Option &aOption);

    /**
     * This method appends an Observe option.
     *
     * @param[in]  aObserve  Observe field value.
     *
     * @retval kThreadError_None         Successfully appended the option.
     * @retval kThreadError_InvalidArgs  The option type is not equal or greater than the last option type.
     * @retval kThreadError_NoBufs       The option length exceeds the buffer size.
     */
    ThreadError AppendObserveOption(uint32_t aObserve);

    /**
     * This method appends a Uri-Path option.
     *
     * @param[in]  aUriPath  A pointer to a NULL-terminated string.
     *
     * @retval kThreadError_None         Successfully appended the option.
     * @retval kThreadError_InvalidArgs  The option type is not equal or greater than the last option type.
     * @retval kThreadError_NoBufs       The option length exceeds the buffer size.
     *
     */
    ThreadError AppendUriPathOptions(const char *aUriPath);

    /**
     * Media Types
     *
     */
    enum MediaType
    {
        kApplicationOctetStream = 42,  ///< application/octet-stream
    };

    /**
     * This method appends a Content-Format option.
     *
     * @param[in]  aType  The Media Type value.
     *
     * @retval kThreadError_None         Successfully appended the option.
     * @retval kThreadError_InvalidArgs  The option type is not equal or greater than the last option type.
     * @retval kThreadError_NoBufs       The option length exceeds the buffer size.
     *
     */
    ThreadError AppendContentFormatOption(MediaType aType);

    /**
     * This method appends a Max-Age option.
     *
     * @param[in]  aMaxAge  The Max-Age value.
     *
     * @retval kThreadError_None         Successfully appended the option.
     * @retval kThreadError_InvalidArgs  The option type is not equal or greater than the last option type.
     * @retval kThreadError_NoBufs       The option length exceeds the buffer size.
     */
    ThreadError AppendMaxAgeOption(uint32_t aMaxAge);

    /**
     * This method appends a single Uri-Query option.
     *
     * @param[in]  aUriQuery  A pointer to NULL-terminated string, which should contain a single key=value pair.
     *
     * @retval kThreadError_None         Successfully appended the option.
     * @retval kThreadError_InvalidArgs  The option type is not equal or greater than the last option type.
     * @retval kThreadError_NoBufs       The option length exceeds the buffer size.
     */
    ThreadError AppendUriQueryOption(const char *aUriQuery);

    /**
     * This method returns a pointer to the current option.
     *
     * @returns A pointer to the current option.
     *
     */
    const Option *GetCurrentOption(void) const;

    /**
     * This method returns a pointer to the next option.
     *
     * @returns A pointer to the next option.
     *
     */
    const Option *GetNextOption(void);

    /**
     * This method adds Payload Marker indicating beginning of the payload to the CoAP header.
     *
     * @retval kThreadError_None    Payload Marker successfully added.
     * @retval kThreadError_NoBufs  Header Payload Marker exceeds the buffer size.
     *
     */
    ThreadError SetPayloadMarker(void);

    /**
     * This method returns a pointer to the first byte of the header.
     *
     * @returns A pointer to the first byte of the header.
     *
     */
    const uint8_t *GetBytes(void) const { return mHeader.mBytes; }

    /**
     * This method returns the header length in bytes.
     *
     * @returns The header length in bytes.
     *
     */
    uint8_t GetLength(void) const { return mHeaderLength; }

    /**
     * This method sets a default response header based on request header.
     *
     * @param[in]  aRequestHeader  Request header to base on.
     *
     */
    void SetDefaultResponseHeader(const Header &aRequestHeader);

    /**
     * This method checks if a header is an empty message header.
     *
     * @retval TRUE   Header is an empty message header.
     * @retval FALSE  Header is not an empty message header.
     *
     */
    bool IsEmpty(void) const { return (GetCode() == 0); };

    /**
     * This method checks if a header is a request header.
     *
     * @retval TRUE   Header is a request header.
     * @retval FALSE  Header is not a request header.
     *
     */
    bool IsRequest(void) const { return (GetCode() >= kCoapRequestGet && GetCode() <= kCoapRequestDelete); };

    /**
     * This method checks if a header is a response header.
     *
     * @retval TRUE   Header is a response header.
     * @retval FALSE  Header is not a response header.
     *
     */
    bool IsResponse(void) const { return (GetCode() >= kCoapResponseCodeMin); };

    /**
     * This method checks if a header is a CON message header.
     *
     * @retval TRUE   Header is a CON message header.
     * @retval FALSE  Header is not is a CON message header.
     *
     */
    bool IsConfirmable(void) const { return (GetType() == kCoapTypeConfirmable); };

    /**
     * This method checks if a header is a NON message header.
     *
     * @retval TRUE   Header is a NON message header.
     * @retval FALSE  Header is not is a NON message header.
     *
     */
    bool IsNonConfirmable(void) const { return (GetType() == kCoapTypeNonConfirmable); };

    /**
     * This method checks if a header is a ACK message header.
     *
     * @retval TRUE   Header is a ACK message header.
     * @retval FALSE  Header is not is a ACK message header.
     *
     */
    bool IsAck(void) const { return (GetType() == kCoapTypeAcknowledgment); };

    /**
     * This method checks if a header is a RST message header.
     *
     * @retval TRUE   Header is a RST message header.
     * @retval FALSE  Header is not is a RST message header.
     *
     */
    bool IsReset(void) const { return (GetType() == kCoapTypeReset);  };

private:
    /**
     * Protocol Constants (RFC 7252).
     *
     */
    enum
    {
        kVersionMask                = 0xc0,  ///< Version mask as specified (RFC 7252).
        kVersionOffset              = 6,     ///< Version offset as specified (RFC 7252).

        kTypeMask                   = 0x30,  ///< Type mask as specified (RFC 7252).

        kTokenLengthMask            = 0x0f,  ///< Token Length mask as specified (RFC 7252).
        kTokenLengthOffset          = 0,     ///< Token Length offset as specified (RFC 7252).
        kTokenOffset                = 4,     ///< Token offset as specified (RFC 7252).
        kMaxTokenLength             = 8,     ///< Max token length as specified (RFC 7252).

        kMaxOptionHeaderSize        = 5,     ///< Maximum size of an Option header

        kOption1ByteExtension       = 13,    ///< Indicates a 1 byte extension (RFC 7252).
        kOption2ByteExtension       = 14,    ///< Indicates a 1 byte extension (RFC 7252).

        kOption1ByteExtensionOffset = 13,    ///< Delta/Length offset as specified (RFC 7252).
        kOption2ByteExtensionOffset = 269,   ///< Delta/Length offset as specified (RFC 7252).
    };
};

/**
 * @}
 *
 */

}  // namespace Coap
}  // namespace Thread

#endif  // COAP_HEADER_HPP_


text:
// namespaces...

namespace Registry.Lists;

// public interfaces...
public interface IListTemplate
{
    // properties...

    // properties...
    bool IsFree { get; }

    /// <summary>
    ///     Set to true when a record is referenced by another referenced record.
    ///     <remarks>
    ///         This flag allows for determining records that are marked 'in use' by their size but never actually
    ///         referenced by another record in a hive
    ///     </remarks>
    /// </summary>
    bool IsReferenced { get; }

    /// <summary>
    ///     The total number of offsets to other records this list holds.
    /// </summary>
    int NumberOfEntries { get; }

    /// <summary>
    ///     The raw contents of this record
    /// </summary>
    byte[] RawBytes { get; }

    /// <summary>
    ///     The offset as stored in other records to a given record
    ///     <remarks>This value will be 4096 bytes (the size of the regf header) less than the AbsoluteOffset</remarks>
    /// </summary>
    long RelativeOffset { get; }

    // properties...
    string Signature { get; }

    /// <summary>
    ///     The size of the hive
    ///     <remarks>
    ///         This value will always be positive. See IsFree to determine whether or not this cell is in use (it has a
    ///         negative size)
    ///     </remarks>
    /// </summary>
    int Size { get; }
}


text:
Sales & Distribution Center

3845 Atherton Road, STE 9

Rocklin, CA 95765

		    						toll-free number

		    						1 (800) 500-4020

		    						local number

		    						1 (916) 663-5813

		    						fax number

		    						1 (916) 663-5986

							U.S. Night Vision manufactures tactical-grade night vision devices. Our products include goggles, monoculars, weapon sights and night vision devices.

Made in America: our night vision devices are known throughout the world for their quality and durability.

Our commitment to customer service will ensure your satisfaction.

 This adapter will allow the NiteMax to be powered by this auxiliary DC power source, such as a car's cigarette lighter. DC Auxiliary Power Adapter, Standard US Plug, 12 v.d.c. operation, 6ft cord

S   P   E   C   I   F   I   C   A   T   I   O   N   S

Plug Type: Standard

	Length: 6 feet

	Weight: 3.2 oz.

Corporate Headquarters

3303 Harbor Blvd., STE E5

Costa Mesa, CA 92626

toll-free: 800-385-9110

local:  714-546-4555

fax: 714-546-4999


text:
movieswApp.factory('session', function(){
  var session = {};
  session.user = {};
  session.logged = false;

  session.set = function(name, value) {
    session[name] = value;
    session.logged = session.user.hasOwnProperty('_id');
  };

  session.remove = function() {
    session.user = {};
    session.logged = false;
  }

  return session;
});