text:
<?php

namespace Modules\SupportDesk\Controllers;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Modules\SupportDesk\Models\Status;

class StatusController extends Controller
{
    public function __construct()
    {
        $this->middleware(['auth', 'admin']);
    }

//	/**
//	 * Display a listing of the resource.
//	 *
//	 * @return \Illuminate\Http\Response
//	 */
//	public function index()
//	{
//		//
//	}
//
//	/**
//	 * Show the form for creating a new resource.
//	 *
//	 * @return \Illuminate\Http\Response
//	 */
//	public function create()
//	{
//		//
//	}
//
//	/**
//	 * Store a newly created resource in storage.
//	 *
//	 * @param  \Illuminate\Http\Request $request
//	 * @return \Illuminate\Http\Response
//	 */
//	public function store(Request $request)
//	{
//		//
//	}
//
//	/**
//	 * Display the specified resource.
//	 *
//	 * @param  \Modules\SupportDesk\Models\Status $status
//	 * @return \Illuminate\Http\Response
//	 */
//	public function show(Status $status)
//	{
//		//
//	}
//
//	/**
//	 * Show the form for editing the specified resource.
//	 *
//	 * @param  \Modules\SupportDesk\Models\Status $status
//	 * @return \Illuminate\Http\Response
//	 */
//	public function edit(Status $status)
//	{
//		//
//	}
//
//	/**
//	 * Update the specified resource in storage.
//	 *
//	 * @param  \Illuminate\Http\Request $request
//	 * @param  \Modules\SupportDesk\Models\Status $status
//	 * @return \Illuminate\Http\Response
//	 */
//	public function update(Request $request, Status $status)
//	{
//		//
//	}
//
//	/**
//	 * Remove the specified resource from storage.
//	 *
//	 * @param  \Modules\SupportDesk\Models\Status $status
//	 * @return \Illuminate\Http\Response
//	 */
//	public function destroy(Status $status)
//	{
//		//
//	}
}


text:
from google.cloud import asset_v1

def sample_get_saved_query():
    # Create a client
    client = asset_v1.AssetServiceClient()

    # Initialize request argument(s)
    request = asset_v1.GetSavedQueryRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_saved_query(request=request)

    # Handle the response
    print(response)

# [END cloudasset_v1_generated_AssetService_GetSavedQuery_sync]

redpajama_set_name: RedPajamaGithub


text:
* [Protractor][SeleniumWebdriver][Nightmare] added `moveCursorTo` method.
* [Protractor][SeleniumWebdriver][WebDriverIO] Added `manualStart` option to start browser manually in the beginning of test. By @cnworks. [PR #250](https://github.com/Codeception/CodeceptJS/pull/255)
* Fixed `codeceptjs init` to work with nested directories and file masks.
* Fixed `codeceptjs gt` to generate test with proper file name suffix. By @Zougi.
* [Nightmare] Fixed: Error is thrown when clicking on element which can't be locate. By @davetmik
* [WebDriverIO] Fixed `attachFile` for file upload. By @giuband and @davetmik
* [WebDriverIO] Add support for timeouts in config and with `defineTimeouts` method. By @easternbloc [#258](https://github.com/Codeception/CodeceptJS/pull/258) and [#267](https://github.com/Codeception/CodeceptJS/pull/267) by @davetmik
* Fixed hanging of CodeceptJS when error is thrown by event dispatcher. Fix by @Zougi and @davetmik

## 0.4.7

* Improved docs for `BeforeSuite`; fixed its usage with `restart: false` option by @APshenkin.
* Added `Nightmare` to list of available helpers on `init`.
* [Nightmare] Removed double `resizeWindow` implementation.

## 0.4.6

* Added `BeforeSuite` and `AfterSuite` hooks to scenario by @APshenkin. See [updated documentation](http://codecept.io/basics/#beforesuite)

## 0.4.5

* Fixed running `codecept def` command by @jankaspar
* [Protractor][SeleniumWebdriver] Added support for special keys in `pressKey` method. Fixes #216

## 0.4.4

* Interactive shell fixed. Start it by running `codeceptjs shell`
* Added `--profile` option to `shell` command to use dynamic configuration.
* Added `--verbose` option to `shell` command for most complete output.

## 0.4.3

* [Protractor] Regression fixed to ^4.0.0 support
* Translations included into package.
* `teardown` option added to config (opposite to `bootstrap`), expects a JS file to be executed after tests stop.
* [Configuration](http://codecept.io/configuration/) can be set via JavaScript file `codecept.conf.js` instead of `codecept.json`. It should export `config` object:

```js
// inside codecept.conf.js
exports.config = {
  // contents of codecept.json
}
```
* Added `--profile` option to pass its value to `codecept.conf.js` as `process.profile` for [dynamic configuration](http://codecept.io/configuration#dynamic-configuration).
* Documentation for [StepObjects, PageFragments](http://codecept.io/pageobjects#PageFragments) updated.
* Documentation for [Configuration](http://codecept.io/configuration/) added.

## 0.4.2

* Added ability to localize tests with translation [#189](https://github.com/Codeception/CodeceptJS/pull/189). Thanks to @abner
  * [Translation] ru-RU translation added.
  * [Translation] pt-BR translation added.
* [Protractor] Protractor 4.0.4 compatibility.
* [WebDriverIO][SeleniumWebdriver][Protractor] Fixed single browser session  mode for `restart: false`
* Fixed using of 3rd party reporters (xunit, mocha-junit-reporter, mochawesome). Added guide.
* Documentation for [Translation](http://codecept.io/translation/) added.
* Documentation for [Reports](http://codecept.io/reports/) added.

## 0.4.1

* Added custom steps to step definition list. See #174 by @jayS-de
* [WebDriverIO] Fixed using `waitForTimeout` option by @stephane-ruhlmann. See #178

## 0.4.0

* **[Nightmare](http://codecept.io/nightmare) Helper** added for faster web testing.
* [Protractor][SeleniumWebdriver][WebDriverIO] added `restart: false` option to reuse one browser between tests (improves speed).
* **Protractor 4.0** compatibility. Please upgrade Protractor library.
* Added `--verbose` option for `run` command to log and print global promise and events.
* Fixed errors with shutting down and cleanup.
* Fixed starting interactive shell with `codeceptjs shell`.
* Fixed handling of failures inside within block

## 0.3.5

* Introduced IDE autocompletion support for Visual Studio Code and others. Added command for generating TypeScript definitions for `I` object. Use it as

```
codeceptjs def
```

to generate steps definition file and include it into tests by reference. By @kaflan

## 0.3.4

* [Protractor] version 3.3.0 comptaibility, NPM 3 compatibility. Please update Protractor!
* allows using absolute path for helpers, output, in config and in command line. By @denis-sokolov
* Fixes 'Cannot read property '1' of null in generate.js:44' by @seethislight

## 0.3.3

**Fixed global installation**. CodeceptJS can now locate globally located modules.
CodeceptJS is also recommended for local installation.
Depending on installation type additional modules (webdriverio, protractor, ...) will be loaded either from local or from global path.

## 0.3.2

* Added `codeceptjs list` command which shows all available methods of `I` object.
* [Protractor][SeleniumWebdriver] fixed closing browser instances
* [Protractor][SeleniumWebdriver] `doubleClick` method added
* [WebDriverIO][Protractor][SeleniumWebdriver] `doubleClick` method to locate clickable elements by text, `context` option added.
* Fixed using assert in generator without yields #89

## 0.3.1

* Fixed `init` command

## 0.3.0

**Breaking Change**: webdriverio package removed from dependencies list. You will need to install it manually after the upgrade.
Starting from 0.3.0 webdriverio is not the only backend for running selenium tests, so you are free to choose between Protractor, SeleniumWebdriver, and webdriverio and install them.

* **[Protractor] helper added**. Now you can test AngularJS applications by using its official library within the unigied CodeceptJS API!
* **[SeleniumWebdriver] helper added**. You can switch to official JS bindings for Selenium.
* [WebDriverIO] **updated to webdriverio v 4.0**
* [WebDriverIO] `clearField` method added by @fabioel
* [WebDriverIO] added `dragAndDrop` by @fabioel
* [WebDriverIO] fixed `scrollTo` method by @sensone
* [WebDriverIO] fixed `windowSize: maximize` option in config
* [WebDriverIO] `seeElement` and `dontSeeElement` check element for visibility by @fabioel and @davertmik
* [WebDriverIO] `seeElementInDOM`, `dontSeeElementInDOM` added to check element exists on page.
* [WebDriverIO] fixed saving screenshots on failure. Fixes #70
* fixed `within` block doesn't end in output not #79

## 0.2.8

* [WebDriverIO] added `seeNumberOfElements` by @fabioel

## 0.2.7

* process ends with exit code 1 on error or failure #49
* fixed registereing global Helper #57
* fixed handling error in within block #50

## 0.2.6

* Fixed `done() was called multiple times`
* [WebDriverIO] added `waitToHide` method by @fabioel
* Added global `Helper` (alias `codecept_helper)`, object use for writing custom Helpers. Generator updated. Changes to #48

## 0.2.5

* Fixed issues with using yield inside a test #45 #47 #43
* Fixed generating a custom helper. Helper class is now accessible with `codecept_helper` var. Fixes #48

## 0.2.4

* Fixed accessing helpers from custom helper by @pim.

## 0.2.3

* [WebDriverIO] fixed `seeInField` to work with single value elements like: input[type=text], textareas, and multiple: select, input[type=radio], input[type=checkbox]
* [WebDriverIO] fixed `pressKey`, key modifeiers (Control, Command, Alt, Shift) are released after the action

## 0.2.2

Fixed generation of custom steps file and page objects.
Please replace `require('codeceptjs/actor')` to `actor` in your `custom_steps.js`.
Whenever you need to create `I` object (in page objects, custom steps, but not in tests) just call `actor()`;

## 0.2.0

* **within** context hook added
* `--reporter` option supported
* [WebDriverIO] added features and methods:
  - elements: `seeElement`, ...
  - popups: `acceptPopup`, `cancelPopup`, `seeInPopup`,...
  - navigation: `moveCursorTo`, `scrollTo`
  - saving screenshots on failure; `saveScreenshot`
  - cookies: `setCookie`, `seeCookie`, ...
  - source: `seeInSource`
  - form: `seeCheckboxIsChecked`, `selectOption` to support multiple selects
  - keyboard: `appendField`, `pressKey`
  - mouse: `rightClick`
* tests added
* [WebDriverIO] proxy configuration added by @petehouston
* [WebDriverIO] fixed `waitForText` method by @roadhump. Fixes #11
* Fixed creating output dir when it already exists on init by @alfirin
* Fixed loading of custom helpers


text:
List *List_create()
{
    return calloc(1, sizeof(List));
}

void List_push(List *list, void *value)
{
    ListNode *node = calloc(1, sizeof(ListNode));

    node->value = value;

    if(list->last == NULL) {
        list->first = node;
        list->last = node;
    } else {
        list->last->next = node;
        node->prev = list->last;
        list->last = node;
    }

    list->count++;

error:
    return;
}

void *List_pop(List *list)
{
    ListNode *node = list->last;
    return node != NULL ? List_remove(list, node) : NULL;
}

void List_unshift(List *list, void *value)
{
    ListNode *node = calloc(1, sizeof(ListNode));

    node->value = value;

    if(list->first == NULL) {
        list->first = node;
        list->last = node;
    } else {
        node->next = list->first;
        list->first->prev = node;
        list->first = node;
    }

    list->count++;

error:
    return;
}

void *List_shift(List *list)
{
    ListNode *node = list->first;
    return node != NULL ? List_remove(list, node) : NULL;
}

void *List_remove(List *list, ListNode *node)
{
    void *result = NULL;

    if(node == list->first && node == list->last) {
        list->first = NULL;
        list->last = NULL;
    } else if(node == list->first) {
        list->first = node->next;
        list->first->prev = NULL;
    } else if (node == list->last) {
        list->last = node->prev;
        list->last->next = NULL;
    } else {
        ListNode *after = node->next;
        ListNode *before = node->prev;
        after->prev = before;
        before->next = after;
    }

    list->count--;
    result = node->value;
    free(node);

error:
    return result;
}

void *List_forward_traverse(List *list)
{
    ListNode *curr = NULL;
    printf("FIRST -> ");
    for (curr = list->first; curr != NULL; curr = curr->next){
        printf ("%s -> ", curr->value);
    }
    printf ("LAST\n");
}

void *List_backward_traverse(List *list)
{
    ListNode *curr = NULL;
    printf("LAST -> ");
    for (curr = list->last; curr != NULL; curr = curr->prev){
        printf ("%s -> ", curr->value);
    }
    printf ("FIRST\n");
}

void *List_node_at(List *list, int index)
{
    if (index <= list->count) {
        int curr_index;
        ListNode *curr = list->first;

        for (curr_index = 1; curr_index != index; curr_index++){
            curr = curr->next;
        }

        return curr->value;
    }
}


text:
YaLedger поддерживает выполнение транзакций при определённых условиях.
Пример:

    @ 01/01 0.5% за снятие с карточки
    {rule = !"Комиссия"}
    rule Комиссия = when debit карточка with {category = "наличные"} do
      cr банковские_комиссии #1*0.05
      карточка

В данном случае правило срабатывает после проводок, дебетующих счёт
«карточка», с атрибутом category = "наличные".

После when может стоять:

-   debit счёт — срабатывает после дебетовых полупроводок по заданному
    счёту
-   credit счёт — после кредитовых полупроводок
-   use счёт — после любых полупроводок по счёту

После слова with задаются условия на атрибуты полупроводок, по которым
должно срабатывать правило. Слово with и атрибуты необязательны.

Правила запускаются после исполнения полупроводок. В качестве параметра
`#1` подставляется сумма полупроводки. Следует иметь ввиду, что эта
сумма всегда в валюте счёта, по которому проводится полупроводка.

При исполнении правила к создаваемой транзакции добавляются атрибут rule
= $name, где $name — имя правила. Если нужно гарантировать, что правило
не будет срабатывать по проводкам, созданным самим же этим правилом,
нужно к правилу добавить атрибут rule =! $name. Без этого в предыдущем
примере с карточки будет сниматься 0.5%, потом 0.5% от этих 0.5%, и т.д.
до бесконечности.


text:
This plugin was created to automate the importing of code files within Visual Studio Code for TypeScript.

When authoring code, you will often have files across many locations within a single project. This can quickly become hard to keep track of the namespace for each file.

Currently, you'll find that you're typing

```javascript
import myClass = ns_myfolder.myClass
import { MyClass } from "./myClass"
```

With TypeScriptImporter, you will now simply declare it inline, accept the code hint and the plugin deals with the rest.

![TypeScript Auto Importer](http://i.imgur.com/XB4JPyy.gif)

## Installation ##

### Precompiled ###

Drag/Drop the latest vsix file into VSCode and then restart

### Compile ###

See building below, this is only recommended for development of the plugin

## Usage ##

Out of the box the plugin will work for any TypeScript project that is using namespaces and lives within a single project.

### Multiple projects, cross dependancies ###

It is possible to have the plugin pick up namespaces from other projects. By default, the plugin uses WorkflowFiles, part of the [ts-internal-module-workflow](https://github.com/kungfusheep/ts-internal-module-workflow) by [kungfusheep](https://github.com/kungfusheep/), but this can be overriden in the settings shown below.

![TypeScript Auto Importer](http://i.imgur.com/cw2zUz7.gif)

## Supported Modules ##

For now the plugin just supports namespaces, but has in-built experimental support for ES6 imports.

```
Module Type   | Supported
------------- | -------------
Namespaces    | Yes
ES6 Imports   | Yes
CommonJS      | Yes
AMD           | No
SystemJS      | No
UMD           | No
```

It would be possible to add support for modules that are currently unsupported in the future.

## Settings ##

```javascript
// When set to true, imports will show the namespace in parenthesis
"TypeScriptImporter.showNamespaceOnImports": true,

// The node within TSConfig that references depenant frameworks that we have access to. Any framework listed in here will provide code hints. Requires Reload to take affect
"TypeScriptImporter.TSConfigFrameworkName": "workflowFiles",

// Comma separated string. These folders will be excluded from code hints. This is useful if you have a mix of CommonJS and Namespaces
"TypeScriptImporter.IgnoreListedFolders": "./, .scripts/",

// How often to resync for changes. Advanced users only, can cause instability
"TypeScriptImporter.SyncInterval": "15"
```

Additional settings will be added as the project expands into more modules.

## Building ##

Open both the Client and Server code in VSCode and run the built in task

Alternatively
```
cd client && tsc -w
cd server && tsc -w
```

## Debugging ##

With both code bases open, start a debug session in Visual Studio Code from the Client and once this is running begin a debug session from the Server


text:
<?php

namespace PHPExiftool\Driver\Tag\Microsoft;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class Author extends AbstractTag
{

    protected $Id = 'mixed';

    protected $Name = 'Author';

    protected $FullName = 'Microsoft::Xtra';

    protected $GroupName = 'Microsoft';

    protected $g0 = 'QuickTime';

    protected $g1 = 'Microsoft';

    protected $g2 = 'Video';

    protected $Type = '?';

    protected $Writable = false;

    protected $Description = 'Author';

    protected $local_g2 = 'Author';
}


text:
using System.Collections.Generic;
using System.Linq;
using AbpKendoDemo.Roles.Dto;
using AbpKendoDemo.Users.Dto;

namespace AbpKendoDemo.Web.Models.Users
{
    public class EditUserModalViewModel
    {
        public UserDto User { get; set; }

        public IReadOnlyList<RoleDto> Roles { get; set; }

        public bool UserIsInRole(RoleDto role)
        {
            return User.RoleNames != null && User.RoleNames.Any(r => r == role.NormalizedName);
        }
    }
}


text:
<!--
   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.
-->
<FindBugsFilter>

  <!-- same code as in FileSystem is triggering the same warning. -->
  <Match>
    <Class name="org.apache.hadoop.fs.s3native.S3xLoginHelper" />
    <Method name="checkPath" />
    <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" />
  </Match>
  <!-- Redundant null check makes code clearer, future-proof here. -->
  <Match>
    <Class name="org.apache.hadoop.fs.s3a.S3AFileSystem" />
    <Method name="s3Exists" />
    <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE" />
  </Match>
</FindBugsFilter>


text:
// Copyright (c) 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

cr.define('account_manager_error', function() {
  'use strict';

  /**
   * Keep in sync with
   * chrome/browser/ui/webui/signin/inline_login_handler_dialog_chromeos.cc
   * @enum {number}
   */
  const AccountManagerErrorType = {
    SECONDARY_ACCOUNTS_DISABLED: 0,
    CHILD_USER_ARC_DISABLED: 1,
  };

  Polymer({
    is: 'account-manager-error',

    behaviors: [
      I18nBehavior,
    ],

    properties: {
      errorTitle_: {
        type: String,
        value: '',
      },
      errorMessage_: {
        type: String,
        value: '',
      },
      imageUrl_: {
        type: String,
        value: '',
      },
    },

    /** @override */
    ready() {
      const errorType = this.getErrorType_();
      if (errorType === AccountManagerErrorType.CHILD_USER_ARC_DISABLED) {
        this.errorTitle_ = this.i18n('childUserArcDisabledErrorTitle');
        this.errorMessage_ = this.i18n('childUserArcDisabledErrorMessage');
        this.imageUrl_ = 'family_link_logo.svg';
      } else {
        this.errorTitle_ = this.i18n('secondaryAccountsDisabledErrorTitle');
        this.errorMessage_ = this.i18n('secondaryAccountsDisabledErrorMessage');
      }
      document.title = this.errorTitle_;
    },

    /**
     * @returns {number}
     */
    getErrorType_() {
      const dialogArgs = chrome.getVariableValue('dialogArguments');
      assert(dialogArgs);
      const args = JSON.parse(dialogArgs);
      assert(args);
      assert(Number.isInteger(args.errorType));
      return args.errorType;
    },

    closeDialog_() {
      chrome.send('closeDialog');
    },
  });
});


text:
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace futebolGoiano.Models
{
    public class Cast
    {
        [Key]
        public int Id { get; set; }
        public List<Player> Goalkeepers { get; set; }
        public List<Player> Defenders { get; set; }
        public List<Player> Middle { get; set; }
        public List<Player> Attackers { get; set; }
    }
}


text:
import React from 'react';
import PropTypes from 'prop-types';

function Button({ label, onClick }) {
  // eslint-disable-next-line react/button-has-type
  return <button onClick={onClick}>{label}</button>;
}

Button.propTypes = {
  label: PropTypes.string.isRequired,
  onClick: PropTypes.func.isRequired,
};

const MemoButton = React.memo(Button);
export const component = MemoButton;


text:
package ix;

import java.util.Iterator;

final class IxMaxInt extends IxSource<Integer, Integer> {

    IxMaxInt(Iterable<Integer> source) {
        super(source);
    }

    @Override
    public Iterator<Integer> iterator() {
        return new MaxIntIterator(source.iterator());
    }

    static final class MaxIntIterator extends IxSourceIterator<Integer, Integer> {

        MaxIntIterator(Iterator<Integer> it) {
            super(it);
        }

        @Override
        protected boolean moveNext() {
            Iterator<Integer> it = this.it;
            if (!it.hasNext()) {
                done = true;
                return false;
            }
            int sum = it.next();

            while (it.hasNext()) {
                sum = Math.max(sum, it.next());
            }

            value = sum;
            hasValue = true;
            done = true;
            return true;
        }

    }
}


text:
package net.martenscs.cxf.schema.doubleit;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

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

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="numberToDouble" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "numberToDouble"
})
@XmlRootElement(name = "DoubleIt")
public class DoubleIt {

    protected int numberToDouble;

    /**
     * Gets the value of the numberToDouble property.
     *
     */
    public int getNumberToDouble() {
        return numberToDouble;
    }

    /**
     * Sets the value of the numberToDouble property.
     *
     */
    public void setNumberToDouble(int value) {
        this.numberToDouble = value;
    }

}


text:
              <button type="button" class="close" data-dismiss="modal">×</button>

Bisesh Shrestha

                        Q: Program/Year?

                        A: Neuroscience and Psychology Double Major, Biology Minor, Year 2

                        Q: What made you become part of CITT UTSC?

                        A: CITT provides a quintessential platform for open discussion and debate that UTSC was lacking. Not enough people are aware of current events, and only by providing a stage to talk about issues will lead to new viewpoints and action.

                        Q: What is your favourite food?

                        A: Sushi. It's everyone's favourite food for a reason!

                        Q: What is your favourite hobby?

                        A: Practicing the tenor saxophone and bass clarinet.

                        Q: If you can have any super power, what would it be?

                        A: The power to control time! I would argue that it is by far the most practical power to have.

              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>


text:
package org.ebayopensource.turmeric.monitoring.model;

import javax.persistence.Entity;

import org.ebayopensource.turmeric.utils.jpa.model.Persistent;

/**
 * The Class MachineGroup.
 */
@Entity
public class MachineGroup extends Persistent {
    private String name;

    /**
     * Gets the name.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using Microsoft.Rest.ClientRuntime.Tests.CustomClients;
using Microsoft.Rest.ClientRuntime.Tests.Fakes;
using Microsoft.Rest.TransientFaultHandling;
using System;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using Xunit;

namespace Microsoft.Rest.ClientRuntime.Tests
{
    public class ServiceClientTests
    {
        [Fact]
        public void ClientAddHandlerToPipelineAddsHandler()
        {
            var fakeClient = new FakeServiceClient(new HttpClientHandler(), new BadResponseDelegatingHandler());
            var result2 = fakeClient.DoStuffSync();
            Assert.Equal(HttpStatusCode.InternalServerError, result2.StatusCode);
        }

        [Fact]
        public void ClientAddHandlersToPipelineAddSingleHandler()
        {
            var fakeClient = new FakeServiceClient(new HttpClientHandler(),
                new BadResponseDelegatingHandler()
                );

            var result2 = fakeClient.DoStuffSync();
            Assert.Equal(HttpStatusCode.InternalServerError, result2.StatusCode);
        }

        [Fact]
        public void ClientAddHandlersToPipelineAddMultipleHandler()
        {
            var fakeClient = new FakeServiceClient(new HttpClientHandler(),
                new AddHeaderResponseDelegatingHandler("foo", "bar"),
                new BadResponseDelegatingHandler()
                );

            var result2 = fakeClient.DoStuffSync();
            Assert.Equal(result2.Headers.GetValues("foo").FirstOrDefault(), "bar");
            Assert.Equal(HttpStatusCode.InternalServerError, result2.StatusCode);
        }

        [Fact]
        public void ClientAddHandlersToPipelineChainsEmptyHandler()
        {
            var handlerA = new AppenderDelegatingHandler("A");
            var handlerB = new AppenderDelegatingHandler("B");
            var handlerC = new AppenderDelegatingHandler("C");

            var fakeClient = new FakeServiceClient(new HttpClientHandler(),
                handlerA, handlerB, handlerC,
                new MirrorDelegatingHandler());

            var response = fakeClient.DoStuffSync("Text").Content.ReadAsStringAsync().ConfigureAwait(false).GetAwaiter().GetResult();
            Assert.Equal("Text+A+B+C", response);
        }

        [Fact]
        public void ClientAddHandlersToPipelineChainsNestedHandler()
        {
            var handlerA = new AppenderDelegatingHandler("A");
            var handlerB = new AppenderDelegatingHandler("B");
            var handlerC = new AppenderDelegatingHandler("C");
            handlerA.InnerHandler = handlerB;
            handlerB.InnerHandler = handlerC;
            var handlerD = new AppenderDelegatingHandler("D");
            var handlerE = new AppenderDelegatingHandler("E");
            handlerD.InnerHandler = handlerE;
            handlerE.InnerHandler = new MirrorMessageHandler("F");

            var fakeClient = new FakeServiceClient(new HttpClientHandler(),
                handlerA, handlerD,
                new MirrorDelegatingHandler());

            var response = fakeClient.DoStuffSync("Text").Content.ReadAsStringAsync().ConfigureAwait(false).GetAwaiter().GetResult();
            Assert.Equal("Text+A+B+C+D+E", response);
        }

        [Fact]
        public void ClientWithoutHandlerWorks()
        {
            var fakeClient = new FakeServiceClient(new HttpClientHandler(),
                new MirrorDelegatingHandler());

            var response = fakeClient.DoStuffSync("Text").Content.ReadAsStringAsync().ConfigureAwait(false).GetAwaiter().GetResult();
            Assert.Equal("Text", response);
        }

        [Fact]
        public void RetryHandlerRetriesWith500Errors()
        {
            var fakeClient = new FakeServiceClient(new FakeHttpHandler());
            int attemptsFailed = 0;

            var retryPolicy = new RetryPolicy<HttpStatusCodeErrorDetectionStrategy>(2);
            fakeClient.SetRetryPolicy(retryPolicy);
            var retryHandler = fakeClient.HttpMessageHandlers.OfType<RetryDelegatingHandler>().FirstOrDefault();
            retryPolicy.Retrying += (sender, args) => { attemptsFailed++; };

            var result = fakeClient.DoStuffSync();
            Assert.Equal(HttpStatusCode.InternalServerError, result.StatusCode);
            Assert.Equal(2, attemptsFailed);
        }

        [Fact]
        public void FakeSvcClientWithHttpClient()
        {
            HttpClient hc = new HttpClient(new ContosoMessageHandler());
            var fakeClient = new FakeServiceClient(hc);
            HttpResponseMessage response = fakeClient.DoStuffSync();
            string responseContent = response.Content.ReadAsStringAsync().ConfigureAwait(false).GetAwaiter().GetResult();
            Assert.Equal("Contoso Rocks", responseContent);
        }

        [Fact]
        public void RetryHandlerRetriesWith500ErrorsAndSucceeds()
        {
            var fakeClient = new FakeServiceClient(new FakeHttpHandler() {NumberOfTimesToFail = 1});
            int attemptsFailed = 0;

            var retryPolicy = new RetryPolicy<HttpStatusCodeErrorDetectionStrategy>(2);
            fakeClient.SetRetryPolicy(retryPolicy);
            var retryHandler = fakeClient.HttpMessageHandlers.OfType<RetryDelegatingHandler>().FirstOrDefault();
            retryPolicy.Retrying += (sender, args) => { attemptsFailed++; };

            var result = fakeClient.DoStuffSync();
            Assert.Equal(HttpStatusCode.OK, result.StatusCode);
            Assert.Equal(1, attemptsFailed);
        }

        [Fact]
        public void RetryHandlerDoesntRetryFor400Errors()
        {
            var fakeClient = new FakeServiceClient(new FakeHttpHandler() {StatusCodeToReturn = HttpStatusCode.Conflict});
            int attemptsFailed = 0;

            var retryPolicy = new RetryPolicy<HttpStatusCodeErrorDetectionStrategy>(2);
            fakeClient.SetRetryPolicy(retryPolicy);
            var retryHandler = fakeClient.HttpMessageHandlers.OfType<RetryDelegatingHandler>().FirstOrDefault();
            retryPolicy.Retrying += (sender, args) => { attemptsFailed++; };

            var result = fakeClient.DoStuffSync();
            Assert.Equal(HttpStatusCode.Conflict, result.StatusCode);
            Assert.Equal(0, attemptsFailed);
        }

        [Fact]
        public void HeadersAndPayloadAreNotDisposed()
        {
            FakeServiceClient fakeClient = null;
            try
            {
                fakeClient = new FakeServiceClient(new HttpClientHandler(),
                     new MirrorDelegatingHandler());
                var response = fakeClient.DoStuffAndThrowSync("Text");
                Assert.True(false);
            }
            catch (HttpOperationException ex)
            {
                fakeClient.Dispose();
                fakeClient = null;
                GC.Collect();
                Assert.NotNull(ex.Request);
                Assert.NotNull(ex.Response);
                Assert.Equal("2013-11-01", ex.Request.Headers["x-ms-version"].First());
                Assert.Equal("Text", ex.Response.Content);
            }
        }

        [Fact]
        public void AddUserAgentInfoWithoutVersion()
        {
            string defaultProductName = "FxVersion";
            string testProductName = "TestProduct";
            Version defaultProductVer, testProductVer;

            FakeServiceClient fakeClient = new FakeServiceClient(new FakeHttpHandler());
            fakeClient.SetUserAgent(testProductName);
            HttpResponseMessage response = fakeClient.DoStuffSync();
            HttpHeaderValueCollection<ProductInfoHeaderValue> userAgentValueCollection = fakeClient.HttpClient.DefaultRequestHeaders.UserAgent;

            var defaultProduct = userAgentValueCollection.Where<ProductInfoHeaderValue>((p) => p.Product.Name.Equals(defaultProductName)).FirstOrDefault<ProductInfoHeaderValue>();
            var testProduct = userAgentValueCollection.Where<ProductInfoHeaderValue>((p) => p.Product.Name.Equals(testProductName)).FirstOrDefault<ProductInfoHeaderValue>();

            Version.TryParse(defaultProduct.Product.Version, out defaultProductVer);
            Version.TryParse(testProduct.Product.Version, out testProductVer);

            Assert.True(defaultProduct.Product.Name.Equals(defaultProductName));
            Assert.NotNull(defaultProductVer);

            Assert.True(testProduct.Product.Name.Equals(testProductName));
            Assert.NotNull(testProductVer);
        }

        [Fact]
        public void AddUserAgentInfoWithVersion()
        {
            string defaultProductName = "FxVersion";
            string testProductName = "TestProduct";
            string testProductVersion = "1.0.0.0";
            Version defaultProductVer, testProductVer;

            FakeServiceClient fakeClient = new FakeServiceClient(new FakeHttpHandler());
            fakeClient.SetUserAgent(testProductName, testProductVersion);
            HttpResponseMessage response = fakeClient.DoStuffSync();
            HttpHeaderValueCollection<ProductInfoHeaderValue> userAgentValueCollection = fakeClient.HttpClient.DefaultRequestHeaders.UserAgent;

            var defaultProduct = userAgentValueCollection.Where<ProductInfoHeaderValue>((p) => p.Product.Name.Equals(defaultProductName)).FirstOrDefault<ProductInfoHeaderValue>();
            var testProduct = userAgentValueCollection.Where<ProductInfoHeaderValue>((p) => p.Product.Name.Equals(testProductName)).FirstOrDefault<ProductInfoHeaderValue>();

            Version.TryParse(defaultProduct.Product.Version, out defaultProductVer);
            Version.TryParse(testProduct.Product.Version, out testProductVer);

            Assert.True(defaultProduct.Product.Name.Equals(defaultProductName));
            Assert.NotNull(defaultProductVer);

            Assert.True(testProduct.Product.Name.Equals(testProductName));
            Assert.True(testProduct.Product.Version.Equals(testProductVersion));
        }

#if NET451
        [Fact]
        public void VerifyOsInfoInUserAgent()
        {
            string osInfoProductName = "OSName";

            FakeServiceClient fakeClient = new FakeServiceClient(new FakeHttpHandler());
            HttpResponseMessage response = fakeClient.DoStuffSync();
            HttpHeaderValueCollection<ProductInfoHeaderValue> userAgentValueCollection = fakeClient.HttpClient.DefaultRequestHeaders.UserAgent;

            var osProduct = userAgentValueCollection.Where<ProductInfoHeaderValue>((p) => p.Product.Name.Equals(osInfoProductName)).FirstOrDefault<ProductInfoHeaderValue>();

            Assert.NotEmpty(osProduct.Product.Name);
            Assert.NotEmpty(osProduct.Product.Version);
        }
#endif
    }
}


text:
/* Code originally from Raimund Steger. */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <fontconfig/fontconfig.h>

#define NTHR 100
#define NTEST 100

struct thr_arg_s
{
	int thr_num;
};

static void test_match(int thr_num,int test_num)
{
	FcPattern *pat;
	FcPattern *match;
	FcResult  result;

	FcInit();

	pat = FcNameParse((const FcChar8 *)"New Century Schoolbook");

	FcConfigSubstitute(0,pat,FcMatchPattern);
	FcDefaultSubstitute(pat);

	match = FcFontMatch(0,pat,&result);

	FcPatternDestroy(pat);
	FcPatternDestroy(match);
}

static void *run_test_in_thread(void *arg)
{
	struct thr_arg_s *thr_arg=(struct thr_arg_s *)arg;
	int thread_num = thr_arg->thr_num;
	int i=0;

	for(;i<NTEST;i++) test_match(thread_num,i);

	printf("Thread %d: done\n",thread_num);

	return NULL;
}

int main(int argc,char **argv)
{
	pthread_t threads[NTHR];
	int i, j;

	printf("Creating %d threads\n",NTHR);

	for(i = 0;i<NTHR;i++)
	{
		struct thr_arg_s thr_arg;
		int result;
		thr_arg.thr_num=i;
		result = pthread_create(&threads[i],NULL,run_test_in_thread,
					(void *)&thr_arg);
		if(result!=0)
		{
			fprintf(stderr,"Cannot create thread %d\n",i);
			break;
		}
	}

	for(j=0;j<i;j++)
	{
		pthread_join(threads[j],NULL);
		printf("Joined thread %d\n",j);
	}

	FcFini();

	return 0;
}


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;
using System.Security.Cryptography.X509Certificates;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Channels;

namespace WcfService
{
    public class TcpCertificateWithSubjectCanonicalNameDomainNameTestServiceHostFactory : ServiceHostFactory
    {
        protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
        {
            TcpCertificateWithSubjectCanonicalNameDomainNameTestServiceHost serviceHost = new TcpCertificateWithSubjectCanonicalNameDomainNameTestServiceHost(serviceType, baseAddresses);
            return serviceHost;
        }
    }
    public class TcpCertificateWithSubjectCanonicalNameDomainNameTestServiceHost : TestServiceHostBase<IWcfService>
    {
        protected override string Address { get { return "tcp-server-subject-cn-domainname-cert"; } }

        protected override Binding GetBinding()
        {
            NetTcpBinding binding = new NetTcpBinding() { PortSharingEnabled = false };
            binding.Security.Mode = SecurityMode.Transport;
            binding.Security.Transport.ClientCredentialType = TcpClientCredentialType.None;

            return binding;
        }

        protected override void ApplyConfiguration()
        {
            base.ApplyConfiguration();

            string certThumprint = TestHost.CertificateFromFriendlyName(StoreName.My, StoreLocation.LocalMachine, "WCF Bridge - TcpCertificateWithSubjectCanonicalNameDomainNameResource").Thumbprint;

            this.Credentials.ServiceCertificate.SetCertificate(StoreLocation.LocalMachine,
                                                        StoreName.My,
                                                        X509FindType.FindByThumbprint,
                                                        certThumprint);
        }

        public TcpCertificateWithSubjectCanonicalNameDomainNameTestServiceHost(Type serviceType, params Uri[] baseAddresses)
            : base(serviceType, baseAddresses)
        {
        }
    }
}


text:
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Codiacs">
    <meta name="author" content="Team Codiacs">
    <link rel="apple-touch-icon" sizes="57x57" href="./assets/img/apple-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="./assets/img/apple-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="./assets/img/apple-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="./assets/img/apple-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="./assets/img/apple-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="./assets/img/apple-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="./assets/img/apple-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="./assets/img/apple-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="./assets/img/apple-icon-180x180.png">
    <link rel="icon" type="image/png" sizes="192x192"  href="./assets/img/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="./assets/img/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="96x96" href="./assets/img/favicon-96x96.png">
    <link rel="icon" type="image/png" sizes="16x16" href="./assets/img/favicon-16x16.png">
    <link rel="manifest" href=".assets/img/manifest.json">
    <meta name="msapplication-TileColor" content="#ffffff">
    <meta name="msapplication-TileImage" content="./assets/img/ms-icon-144x144.png">
    <meta name="theme-color" content="#ffffff">
    <link rel="apple-touch-icon" sizes="57x57" href="./assets/img/apple-icon-57x57.png">

    <title>Codiacs</title>

    <link href="./assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="./assets/css/font-awesome.min.css" rel="stylesheet">

    <link href="./assets/css/main.css" rel="stylesheet">
    <link href="./assets/css/custom-font-1.css" rel="stylesheet">
    <link href="./assets/css/custom-font-2.css" rel="stylesheet">

We build awesome applications for mobile, web & desktop

hello@codiacs.co

Copyright © 2014-2016 Codiacs Technologies LLP. All rights reserved.


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1beta1/firestore.proto

package com.google.firestore.v1beta1;

public interface CommitRequestOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.firestore.v1beta1.CommitRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * The database name. In the format:
   * `projects/{project_id}/databases/{database_id}`.
   *

   *
   * string database = 1;
   */
  java.lang.String getDatabase();
  /**
   *

   * The database name. In the format:
   * `projects/{project_id}/databases/{database_id}`.
   *

   *
   * string database = 1;
   */
  com.google.protobuf.ByteString
      getDatabaseBytes();

  /**
   *

   * The writes to apply.
   * Always executed atomically and in order.
   *

   *
   * repeated .google.firestore.v1beta1.Write writes = 2;
   */
  java.util.List<com.google.firestore.v1beta1.Write>
      getWritesList();
  /**
   *

   * The writes to apply.
   * Always executed atomically and in order.
   *

   *
   * repeated .google.firestore.v1beta1.Write writes = 2;
   */
  com.google.firestore.v1beta1.Write getWrites(int index);
  /**
   *

   * The writes to apply.
   * Always executed atomically and in order.
   *

   *
   * repeated .google.firestore.v1beta1.Write writes = 2;
   */
  int getWritesCount();
  /**
   *

   * The writes to apply.
   * Always executed atomically and in order.
   *

   *
   * repeated .google.firestore.v1beta1.Write writes = 2;
   */
  java.util.List<? extends com.google.firestore.v1beta1.WriteOrBuilder>
      getWritesOrBuilderList();
  /**
   *

   * The writes to apply.
   * Always executed atomically and in order.
   *

   *
   * repeated .google.firestore.v1beta1.Write writes = 2;
   */
  com.google.firestore.v1beta1.WriteOrBuilder getWritesOrBuilder(
      int index);

  /**
   *

   * If set, applies all writes in this transaction, and commits it.
   *

   *
   * bytes transaction = 3;
   */
  com.google.protobuf.ByteString getTransaction();
}


text:
<?php

if (!function_exists('hash_equals')) {
    defined('USE_MB_STRING') or define('USE_MB_STRING', function_exists('mb_strlen'));
    function hash_equals($knownString, $userString)
    {
        $strlen = function ($string) {
            if (USE_MB_STRING) {
                return mb_strlen($string, '8bit');
            }
            return strlen($string);
        };
        // Compare string lengths
        if (($length = $strlen($knownString)) !== $strlen($userString)) {
            return false;
        }
        $diff = 0;
        // Calculate differences
        for ($i = 0; $i < $length; $i++) {
            $diff |= ord($knownString[$i]) ^ ord($userString[$i]);
        }
        return $diff === 0;
    }
}
class LINEBotTiny
{
    public function __construct($channelAccessToken, $channelSecret)
    {
        $this->channelAccessToken = $channelAccessToken;
        $this->channelSecret = $channelSecret;
    }
    public function parseEvents()
    {
        if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
            http_response_code(405);
            error_log("Method not allowed");
            exit();
        }
        $entityBody = file_get_contents('php://input');
        if (strlen($entityBody) === 0) {
            http_response_code(400);
            error_log("Missing request body");
            exit();
        }
        if (!hash_equals($this->sign($entityBody), $_SERVER['HTTP_X_LINE_SIGNATURE'])) {
            http_response_code(400);
            error_log("Invalid signature value");
            exit();
        }
        $data = json_decode($entityBody, true);
        if (!isset($data['events'])) {
            http_response_code(400);
            error_log("Invalid request body: missing events property");
            exit();
        }
        return $data['events'];
    }
    public function replyMessage($message)
    {
        $header = array(
            "Content-Type: application/json",
            'Authorization: Bearer ' . $this->channelAccessToken,
        );
        $context = stream_context_create(array(
            "http" => array(
                "method" => "POST",
                "header" => implode("\r\n", $header),
                "content" => json_encode($message),
            ),
        ));
        $response = file_get_contents('https://api.line.me/v2/bot/message/reply', false, $context);
        if (strpos($http_response_header[0], '200') === false) {
            http_response_code(500);
            error_log("reply Request failed: header code: " . $http_response_header[0] . " response:" . $response);
        }
    }
    public function pushMessage($message)
    {
        $header = array(
            "Content-Type: application/json",
            'Authorization: Bearer ' . $this->channelAccessToken,
        );
        $context = stream_context_create(array(
            "http" => array(
                "method" => "POST",
                "header" => implode("\r\n", $header),
                "content" => json_encode($message),
            ),
        ));
        $response = file_get_contents('https://api.line.me/v2/bot/message/push', false, $context);
        if (strpos($http_response_header[0], '200') === false) {
            http_response_code(500);
            error_log("push Request failed: header code: " . $http_response_header[0] . " response:" . $response);
        }
    }
    public function profile($userID)
    {
        $header = array(
            "Content-Type: application/json",
            'Authorization: Bearer ' . $this->channelAccessToken,
        );
        $context = stream_context_create(array(
            "http" => array(
                "method" => "GET",
                "header" => implode("\r\n", $header),
            ),
        ));
        $response = file_get_contents('https://api.line.me/v2/bot/profile/' . $userID, false, $context);
        if (strpos($http_response_header[0], '200') === false) {
            http_response_code(500);
            error_log("profile Request failed: header code: " . $http_response_header[0] . " response:" . $response);
        }
        return json_decode($response);
    }
    private function sign($body)
    {
        $hash = hash_hmac('sha256', $body, $this->channelSecret, true);
        $signature = base64_encode($hash);
        return $signature;
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>All Classes</title>
<meta name="date" content="2015-03-16">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

All Classes

WhiteBoard

WhiteBoard


text:
. $CORE_PATH/hw/scripts/openocd.sh

CFG="-f interface/cmsis-dap.cfg -f target/nrf52.cfg"

if [ "$MFG_IMAGE" ]; then
    FLASH_OFFSET=0
fi

# We write the config registers for BPROT so that NVMC write
# protection gets disabled for all blocks of the flash
# We also write the DISABLEINDEBUG register so that, write
# protection gets disabled in debug register by default
CFG_POST_INIT="mww 0x40000600 0;mww 0x40000604 0;mww 0x40000608 1;\
               mww 0x40000610 0;mww 0x40000614 0;
              "

common_file_to_load
openocd_load
openocd_reset_run


text:
from __future__ import print_function, unicode_literals, absolute_import, division
import numpy as np
import numpy.testing as npt
from itertools import product
from termcolor import colored

from gputools import fft, fft_convolve, fft_plan, init_device

#init_device(id_platform = 0, id_device = 1)

def report_str(success):
    return colored("\t[OK]", "blue") if success else colored("\t[FAIL]", "red")

def _compare_fft_np(d):
    res1 = np.fft.fftn(d)
    res2 = fft(d, fast_math=True)
    return res1, res2

def test_compare():
    for ndim in [1, 2, 3]:
        for dshape in product([32, 64, 128], repeat=ndim):
            d = np.random.uniform(-1, 1, dshape).astype(np.complex64)
            res1, res2 = _compare_fft_np(d)
            print("validating fft of size", d.shape)
            npt.assert_allclose(res1, res2, rtol=1.e-0, atol=1.e-1)

if __name__ == '__main__':
    # test_compare()
    #
    dshape = (128, 128)
    np.random.seed(0)
    d = np.random.uniform(-1, 1, dshape).astype(np.complex64)
    res1 = np.fft.fftn(d)
    res2 = fft(d)


text:
var ConfigurableMediaImages = {
    imageType: null,
    productImages: {},
    imageObjects: {},

    arrayIntersect: function(a, b) {
        var ai=0, bi=0;
        var result = new Array();

        while( ai < a.length && bi < b.length )
        {
            if      (a[ai] < b[bi] ){ ai++; }
            else if (a[ai] > b[bi] ){ bi++; }
            else /* they're equal */
            {
                result.push(a[ai]);
                ai++;
                bi++;
            }
        }

        return result;
    },

    getCompatibleProductImages: function(productFallback, selectedLabels) {
        //find compatible products
        var compatibleProducts = [];
        var compatibleProductSets = [];
        selectedLabels.each(function(selectedLabel) {
            if(typeof(productFallback['option_labels']) != 'undefined') {
                if (!productFallback['option_labels'][selectedLabel]) {
                    return;
                }

                var optionProducts = productFallback['option_labels'][selectedLabel]['products'];
                compatibleProductSets.push(optionProducts);

                //optimistically push all products
                optionProducts.each(function (productId) {
                    compatibleProducts.push(productId);
                });
            }
        });

        //intersect compatible products
        compatibleProductSets.each(function(productSet) {
            compatibleProducts = ConfigurableMediaImages.arrayIntersect(compatibleProducts, productSet);
        });

        return compatibleProducts;
    },

    isValidImage: function(fallbackImageUrl) {
        if(!fallbackImageUrl) {
            return false;
        }

        return true;
    },

    getSwatchImage: function(productId, optionLabel, selectedLabels) {
        var fallback = ConfigurableMediaImages.productImages[productId];
        if(!fallback) {
            return null;
        }

        //first, try to get label-matching image on config product for this option's label
        if(typeof(fallback['option_labels']) != 'undefined') {
            var currentLabelImage = fallback['option_labels'][optionLabel];
            if (currentLabelImage && fallback['option_labels'][optionLabel]['configurable_product'][ConfigurableMediaImages.imageType]) {
                //found label image on configurable product
                return fallback['option_labels'][optionLabel]['configurable_product'][ConfigurableMediaImages.imageType];
            }
        }

        var compatibleProducts = ConfigurableMediaImages.getCompatibleProductImages(fallback, selectedLabels);

        if(compatibleProducts.length == 0) { //no compatible products
            return null; //bail
        }

        //second, get any product which is compatible with currently selected option(s)
        $j.each(fallback['option_labels'], function(key, value) {
            var image = value['configurable_product'][ConfigurableMediaImages.imageType];
            var products = value['products'];

            if(image) { //configurable product has image in the first place
                //if intersection between compatible products and this label's products, we found a match
                var isCompatibleProduct = ConfigurableMediaImages.arrayIntersect(products, compatibleProducts).length > 0;
                if(isCompatibleProduct) {
                    return image;
                }
            }
        });

        //third, get image off of child product which is compatible
        var childSwatchImage = null;
        var childProductImages = fallback[ConfigurableMediaImages.imageType];
        compatibleProducts.each(function(productId) {
            if(childProductImages[productId] && ConfigurableMediaImages.isValidImage(childProductImages[productId])) {
                childSwatchImage = childProductImages[productId];
                return false; //break "loop"
            }
        });
        if (childSwatchImage) {
            return childSwatchImage;
        }

        //fourth, get base image off parent product
        if (childProductImages[productId] && ConfigurableMediaImages.isValidImage(childProductImages[productId])) {
            return childProductImages[productId];
        }

        //no fallback image found
        return null;
    },

    getImageObject: function(productId, imageUrl) {
        var key = productId+'-'+imageUrl;
        if(!ConfigurableMediaImages.imageObjects[key]) {
            var image = $j('<img />');
            image.attr('src', imageUrl);
            ConfigurableMediaImages.imageObjects[key] = image;
        }
        return ConfigurableMediaImages.imageObjects[key];
    },

    updateImage: function(el) {
        var select = $j(el);
        var label = select.find('option:selected').attr('data-label');
        var productId = optionsPrice.productId; //get product ID from options price object

        //find all selected labels
        var selectedLabels = new Array();

        $j('.product-options .super-attribute-select').each(function() {
            var $option = $j(this);
            if($option.val() != '') {
                selectedLabels.push($option.find('option:selected').attr('data-label'));
            }
        });

        var swatchImageUrl = ConfigurableMediaImages.getSwatchImage(productId, label, selectedLabels);
        if(!ConfigurableMediaImages.isValidImage(swatchImageUrl)) {
            return;
        }

        var swatchImage = ConfigurableMediaImages.getImageObject(productId, swatchImageUrl);

        ProductMediaManager.swapImage(swatchImage);
    },

    wireOptions: function() {
        $j('.product-options .super-attribute-select').change(function(e) {
            ConfigurableMediaImages.updateImage(this);
        });
    },

    swapListImage: function(productId, imageObject) {
        var originalImage = $j('#product-collection-image-' + productId);

        if(imageObject[0].complete) { //swap image immediately

            //remove old image
            originalImage.addClass('hidden');
            $j('.product-collection-image-' + productId).remove();

            //add new image
            imageObject.insertAfter(originalImage);

        } else { //need to load image

            var wrapper = originalImage.parent();

            //add spinner
            wrapper.addClass('loading');

            //wait until image is loaded
            imagesLoaded(imageObject, function() {
                //remove spinner
                wrapper.removeClass('loading');

                //remove old image
                originalImage.addClass('hidden');
                $j('.product-collection-image-' + productId).remove();

                //add new image
                imageObject.insertAfter(originalImage);
            });

        }
    },

    swapListImageByOption: function(productId, optionLabel) {
        var swatchImageUrl = ConfigurableMediaImages.getSwatchImage(productId, optionLabel, [optionLabel]);
        if(!swatchImageUrl) {
            return;
        }

        var newImage = ConfigurableMediaImages.getImageObject(productId, swatchImageUrl);
        newImage.addClass('product-collection-image-' + productId);

        ConfigurableMediaImages.swapListImage(productId, newImage);
    },

    setImageFallback: function(productId, imageFallback) {
        ConfigurableMediaImages.productImages[productId] = imageFallback;
    },

    init: function(imageType) {
        ConfigurableMediaImages.imageType = imageType;
        ConfigurableMediaImages.wireOptions();
    }
};


text: from pr0gramm import API


text:
const moment = require('moment');
const Sequelize = require('sequelize');
const _ = require('lodash');

const { ExpenseError } = require('../../middleware/error-handler');

/**
 * @param {integer} amount
 * @param {string} auditApiCallUuid
 * @param {string} date
 * @param {string} description
 * @param {object} expenseCtrl Instance of ExpenseCtrl
 * @param {string} expenseUuid
 * @param {string} fundUuid
 * @param {string} householdMemberUuid
 * @param {integer} reimbursedAmount
 * @param {string} subcategoryUuid
 * @param {string} vendorUuid
 */
module.exports = async({
  amount,
  auditApiCallUuid,
  date,
  description,
  expenseCtrl,
  expenseUuid,
  fundUuid = null,
  householdMemberUuid,
  reimbursedAmount,
  subcategoryUuid,
  vendorUuid,
}) => {
  const controllers = expenseCtrl.parent;
  const models = expenseCtrl.models;
  if (!expenseUuid) {
    throw new ExpenseError('Expense is required');
  } else if (!subcategoryUuid) {
    throw new ExpenseError('Category is required');
  } else if (!vendorUuid) {
    throw new ExpenseError('Vendor is required');
  } else if (!householdMemberUuid) {
    throw new ExpenseError('Household member is required');
  } else if (!moment.utc(date).isValid()) {
    throw new ExpenseError('Invalid date');
  } else if (isNaN(parseInt(amount, 10))) {
    throw new ExpenseError('Invalid amount');
  } else if (isNaN(parseInt(reimbursedAmount, 10))) {
    throw new ExpenseError('Invalid reimbursed amount');
  } else if (!_.isString(description)) {
    throw new ExpenseError('Invalid description');
  }

  const apiCall = await models.Audit.ApiCall.findOne({
    attributes: ['user_uuid', 'uuid'],
    where: {
      uuid: auditApiCallUuid,
    },
  });
  if (!apiCall || !apiCall.get('user_uuid')) {
    throw new ExpenseError('Missing audit API call');
  }

  const user = await models.User.findOne({
    attributes: ['household_uuid', 'uuid'],
    where: {
      uuid: apiCall.get('user_uuid'),
    },
  });
  if (!user) {
    throw new ExpenseError('Audit user does not exist');
  }

  const expense = await models.Expense.findOne({
    attributes: [
      'amount_cents',
      'date',
      'description',
      'fund_uuid',
      'household_member_uuid',
      'reimbursed_cents',
      'subcategory_uuid',
      'uuid',
      'vendor_uuid',
    ],
    include: [{
      attributes: ['uuid'],
      model: models.HouseholdMember,
      required: true,
      where: {
        household_uuid: user.get('household_uuid'),
      },
    }, {
      attributes: ['uuid'],
      include: [{
        attributes: ['uuid'],
        model: models.Category,
        required: true,
        where: {
          household_uuid: user.get('household_uuid'),
        },
      }],
      model: models.Subcategory,
      required: true,
    }, {
      attributes: ['uuid'],
      model: models.Vendor,
      required: true,
      where: {
        household_uuid: user.get('household_uuid'),
      },
    }],
    where: {
      uuid: expenseUuid,
    },
  });
  if (!expense) {
    throw new ExpenseError('Not found');
  }
  if (expense.get('fund_uuid')) {
    const fund = await models.Fund.findOne({
      attributes: ['uuid'],
      where: {
        household_uuid: user.get('household_uuid'),
        uuid: expense.get('fund_uuid'),
      },
    });
    if (!fund) {
      throw new ExpenseError('Not found');
    }
  }

  const oldAmount = expense.get('amount_cents');
  let newAmount = oldAmount;
  if (expense.get('amount_cents') !== parseInt(amount, 10)) {
    expense.set('amount_cents', parseInt(amount, 10));
    newAmount = expense.get('amount_cents');
  }
  if (moment(expense.get('date')).format('YYYY-MM-DD') !== moment.utc(date).format('YYYY-MM-DD')) {
    expense.set('date', moment.utc(date).format('YYYY-MM-DD'));
  }
  if (expense.get('description') !== description) {
    expense.set('description', description);
  }
  const oldReimbursedAmount = expense.get('reimbursed_cents');
  let newReimbursedAmount = oldReimbursedAmount;
  if (expense.get('reimbursed_cents') !== parseInt(reimbursedAmount, 10)) {
    expense.set('reimbursed_cents', parseInt(reimbursedAmount, 10));
    newReimbursedAmount = expense.get('reimbursed_cents');
  }

  // Validate subcategory UUID.
  if (subcategoryUuid !== expense.get('subcategory_uuid')) {
    const subcategory = await models.Subcategory.findOne({
      attributes: ['uuid'],
      include: [{
        attributes: ['uuid'],
        model: models.Category,
        required: true,
        where: {
          household_uuid: user.get('household_uuid'),
        },
      }],
      where: {
        uuid: subcategoryUuid,
      },
    });
    if (!subcategory) {
      throw new ExpenseError('Category not found');
    }
    expense.set('subcategory_uuid', subcategory.get('uuid'));
  }

  // Validate vendor UUID.
  if (vendorUuid !== expense.get('vendor_uuid')) {
    const vendor = await models.Vendor.findOne({
      attributes: ['uuid'],
      where: {
        household_uuid: user.get('household_uuid'),
        uuid: vendorUuid,
      },
    });
    if (!vendor) {
      throw new ExpenseError('Vendor not found');
    }
    expense.set('vendor_uuid', vendor.get('uuid'));
  }

  // Validate household member UUID.
  if (householdMemberUuid !== expense.get('household_member_uuid')) {
    const householdMember = await models.HouseholdMember.findOne({
      attributes: ['uuid'],
      where: {
        household_uuid: user.get('household_uuid'),
        uuid: householdMemberUuid,
      },
    });
    if (!householdMember) {
      throw new ExpenseError('Household member not found');
    }
    expense.set('household_member_uuid', householdMember.get('uuid'));
  }

  // Validate fund UUID.
  const oldFundUuid = expense.get('fund_uuid');
  let newFundUuid = oldFundUuid;
  if (fundUuid !== expense.get('fund_uuid')) {
    if (fundUuid) {
      const fund = await models.Fund.findOne({
        attributes: ['uuid'],
        where: {
          household_uuid: user.get('household_uuid'),
          uuid: fundUuid,
        },
      });
      if (!fund) {
        throw new ExpenseError('Fund not found');
      }
      expense.set('fund_uuid', fund.get('uuid'));
    } else {
      expense.set('fund_uuid', null);
    }
    newFundUuid = expense.get('fund_uuid');
  }

  if (expense.changed()) {
    await models.sequelize.transaction({
      isolationLevel: Sequelize.Transaction.ISOLATION_LEVELS.REPEATABLE_READ,
    }, async(transaction) => {
      const changeList = [expense];
      if (expense.changed('fund_uuid')) {
        // The fund is being changed, so we need to subtract the expense amount
        // from the old fund and add to the new fund.
        if (oldFundUuid) {
          // Old fund might not exist if we're adding a fund to the expense.
          const oldTrackedFund = await models.Fund.findOne({
            attributes: ['balance_cents', 'uuid'],
            transaction,
            where: {
              uuid: oldFundUuid,
            },
          });
          // Use oldAmount because that's the amount that would have been
          // subtracted previously.
          oldTrackedFund.set(
            'balance_cents',
            oldTrackedFund.get('balance_cents') + (oldAmount - oldReimbursedAmount),
          );
          changeList.push(oldTrackedFund);
        }
        if (newFundUuid) {
          // New fund might not exist if we're removing a fund from the expense.
          const newTrackedFund = await models.Fund.findOne({
            attributes: ['balance_cents', 'uuid'],
            transaction,
            where: {
              uuid: newFundUuid,
            },
          });
          // Use newAmount in case the amount is also being updated.
          newTrackedFund.set(
            'balance_cents',
            newTrackedFund.get('balance_cents') - (newAmount - newReimbursedAmount),
          );
          changeList.push(newTrackedFund);
        }
      } else if (expense.changed('amount_cents') || expense.changed('reimbursed_cents')) {
        // Simply update the fund balance (if exists) with the difference of the
        // old nad new amounts.
        if (oldFundUuid) {
          const trackedFund = await models.Fund.findOne({
            attributes: ['balance_cents', 'uuid'],
            transaction,
            where: {
              uuid: oldFundUuid,
            },
          });
          trackedFund.set(
            'balance_cents',
            trackedFund.get('balance_cents') + (
              (oldAmount - oldReimbursedAmount) - (newAmount - newReimbursedAmount)
            ),
          );
          changeList.push(trackedFund);
        }
      }
      await controllers.AuditCtrl.trackChanges({
        auditApiCallUuid,
        changeList,
        transaction,
      });
    });
  }
};


text:
extern crate clap;
extern crate grpcio as grpc;
extern crate grpcio_proto as grpc_proto;
extern crate interop;

use std::sync::Arc;

use crate::grpc::{ChannelBuilder, ChannelCredentialsBuilder, Environment};
use crate::grpc_proto::util;
use clap::{App, Arg};

use interop::Client;

fn main() {
    let matches = App::new("Interoperability Test Client")
        .about("ref https://github.com/grpc/grpc/blob/v1.3.x/doc/interop-test-descriptions.md")
        .arg(
            Arg::with_name("host")
                .long("server_host")
                .help("The server host to connect to. For example, \"localhost\" or \"127.0.0.1\"")
                .takes_value(true),
        )
        .arg(
            Arg::with_name("host_override")
                .long("server_host_override")
                .help("The server host to connect to. For example, \"localhost\" or \"127.0.0.1\"")
                .takes_value(true),
        )
        .arg(
            Arg::with_name("port")
                .long("server_port")
                .help("The server port to connect to. For example, \"8080\"")
                .takes_value(true),
        )
        .arg(
            Arg::with_name("case")
                .long("test_case")
                .help("The name of the test case to execute. For example, \"empty_unary\"")
                .takes_value(true),
        )
        .arg(
            Arg::with_name("use_tls")
                .long("use_tls")
                .help("Whether to use a plaintext or encrypted connection")
                .takes_value(true),
        )
        .arg(
            Arg::with_name("use_test_ca")
                .long("use_test_ca")
                .help("Whether to replace platform root CAs with ca.pem as the CA root")
                .takes_value(true),
        )
        .get_matches();
    let host = matches.value_of("host").unwrap_or("127.0.0.1");
    let host_override = matches
        .value_of("host_override")
        .unwrap_or("foo.test.google.fr");
    let port = matches.value_of("port").unwrap_or("8080");
    let case = matches.value_of("case");
    let use_tls: bool = matches
        .value_of("use_tls")
        .unwrap_or("false")
        .parse()
        .unwrap();
    let use_test_ca: bool = matches
        .value_of("use_test_ca")
        .unwrap_or("false")
        .parse()
        .unwrap();

    let env = Arc::new(Environment::new(1));
    let builder = ChannelBuilder::new(env).override_ssl_target(host_override.to_owned());
    let channel = if use_tls {
        let creds = if use_test_ca {
            util::create_test_channel_credentials()
        } else {
            ChannelCredentialsBuilder::new().build()
        };
        builder.secure_connect(&format!("{}:{}", host, port), creds)
    } else {
        builder.connect(&format!("{}:{}", host, port))
    };

    let client = Client::new(channel);

    let case_str = match case {
        None => {
            client.test_all();
            return;
        }
        Some(s) => s,
    };

    match case_str.to_uppercase().as_str() {
        "EMPTY_UNARY" => client.empty_unary(),
        "LARGE_UNARY" => client.large_unary(),
        "CLIENT_STREAMING" => client.client_streaming(),
        "SERVER_STREAMING" => client.server_streaming(),
        "PING_PONG" => client.ping_pong(),
        "EMPTY_STREAM" => client.empty_stream(),
        "CANCEL_AFTER_BEGIN" => client.cancel_after_begin(),
        "CANCEL_AFTER_FIRST_RESPONSE" => client.cancel_after_first_response(),
        "TIMEOUT_ON_SLEEPING_SERVER" => client.timeout_on_sleeping_server(),
        "STATUS_CODE_AND_MESSAGE" => client.status_code_and_message(),
        "UNIMPLEMENTED_METHOD" => client.unimplemented_method(),
        "UNIMPLEMENTED_SERVICE" => client.unimplemented_service(),
        _ => panic!("unknown case: {:?}", case),
    }
}


text:
Image Editor

        <fieldset class="image-toggler">
          Select the kind of Image you want to add
          <select id="image-toggler">
            <option value="image-single">Single Image</option>
            <option value="image-flickr">Flickr Slideshow</option>
          </select>
        </fieldset>

          <fieldset class="trackevent-property default input">
            Image URL
            <input class="value" type="text" id="image-url-input" data-manifest-key="src">
          </fieldset>
          <fieldset class="trackevent-property default input">
            Image Title
            <input class="value" type="text" id="image-title-input" data-manifest-key="title">
          </fieldset>
          <fieldset class="trackevent-property default input">
            Link URL
            <input class="value" type="text" id="image-link-input" data-manifest-key="linkSrc">
          </fieldset>
          <fieldset>

              Drag an image here from your desktop.

          </fieldset>

          <fieldset>

              display a slideshow from Flickr

          </fieldset>
          <fieldset>
            Number of Images

              <input type="number" id="image-count-input" data-manifest-key="count" />

                Each image will show for
0.0 seconds

          </fieldset>
          <fieldset>

              Search for a Tag

                <input type="radio" name="source-type" id="image-tag-radio" checked>
                <input type="text" id="image-tag-input" data-manifest-key="tags" placeholder="Mozilla"/>

              Enter a Gallery URL

                <input type="radio" name="source-type" id="image-gallery-radio" >
                <input type="text" id="image-gallery-input" data-manifest-key="photosetId" />

          </fieldset>


text:
package es.lnsd.citikey.core.repository.room;

import java.util.List;

import es.lnsd.citikey.core.model.Building;
import es.lnsd.citikey.core.model.Room;
import es.lnsd.citikey.core.repository.PolicyRepository;

public class RoomPolicyRepository extends PolicyRepository implements RoomRepository {

    private RoomDatabaseOnlyPolicy dataBaseOnlyPolicy;
//    private RoomCloudOnlyWIthUpdatePolicy cloudOnlyWIthUpdate;

    public RoomPolicyRepository(RoomDatabaseOnlyPolicy dataBaseOnlyPolicy) {
        this.dataBaseOnlyPolicy = dataBaseOnlyPolicy;
//        this.cloudOnlyWIthUpdate = cloudOnlyWIthUpdate;
    }

    @Override
    public List<Room> getRoomsWithBuilding(Building building) {
        return getRoomsWithBuildingId(building.getId());
    }

    @Override
    public List<Room> getRoomsWithBuildingId(String buildingId) {
        switch (getPolicy()) {
            case NETWORK_ONLY_WITH_UPDATE:
                // TODO: Implement NETWORK_ONLY_WITH_UPDATE
                throw new AssertionError("NETWORK_ONLY_WITH_UPDATE not implemented yet");

            case DATABASE_ONLY:
                updatePolicy(dataBaseOnlyPolicy);
                return dataBaseOnlyPolicy.getRoomsWithBuildingId(buildingId);

            case DATABASE_FIRST:
            default:
                // TODO: Implement DATABASE_FIRST
                throw new AssertionError("DATABASE_FIRST not implemented yet");
        }
    }
}


text:
package org.omg.CosNaming.NamingContextPackage;

/**
* org/omg/CosNaming/NamingContextPackage/InvalidNameHelper.java .
* Error reading Messages File.
* Error reading Messages File.
* Thursday, January 14, 2010 1:08:58 AM PST
*/

abstract public class InvalidNameHelper
{
  private static String  _id = "IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0";

  public static void insert (org.omg.CORBA.Any a, org.omg.CosNaming.NamingContextPackage.InvalidName that)
  {
    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    a.type (type ());
    write (out, that);
    a.read_value (out.create_input_stream (), type ());
  }

  public static org.omg.CosNaming.NamingContextPackage.InvalidName extract (org.omg.CORBA.Any a)
  {
    return read (a.create_input_stream ());
  }

  private static org.omg.CORBA.TypeCode __typeCode = null;
  private static boolean __active = false;
  synchronized public static org.omg.CORBA.TypeCode type ()
  {
    if (__typeCode == null)
    {
      synchronized (org.omg.CORBA.TypeCode.class)
      {
        if (__typeCode == null)
        {
          if (__active)
          {
            return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
          }
          __active = true;
          org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0];
          org.omg.CORBA.TypeCode _tcOf_members0 = null;
          __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.id (), "InvalidName", _members0);
          __active = false;
        }
      }
    }
    return __typeCode;
  }

  public static String id ()
  {
    return _id;
  }

  public static org.omg.CosNaming.NamingContextPackage.InvalidName read (org.omg.CORBA.portable.InputStream istream)
  {
    org.omg.CosNaming.NamingContextPackage.InvalidName value = new org.omg.CosNaming.NamingContextPackage.InvalidName ();
    // read and discard the repository ID
    istream.read_string ();
    return value;
  }

  public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CosNaming.NamingContextPackage.InvalidName value)
  {
    // write the repository ID
    ostream.write_string (id ());
  }

}


text:
package com.xrtb.privatex.bidrequest;

import java.util.ArrayList;

import java.util.HashMap;
import java.util.List;

/**
 * AN RTB Video object of minimal video attributes. The getter/setters provide the required attributes. Other
 * attributes can be added using the put method.
 * @author Ben M. Faul
 *
 */
public class Video extends HashMap {

	/**
	 * Returns the height of the video object
	 * @return int. The height of the object.
	 */
    public int getHeight() {
		return (Integer)get("h");
	}

    /**
     * Set the height of the video object
     * @param h int. The height to set.
     */
	public void setHeight(int h) {
		put("h",h);
	}

	/**
	 * Return the width of the video object.
	 * @return int. The widdth of the object.
	 */
	public int getWidth() {
		return (Integer)get("w");
	}

	/**
	 * Set the width of the video object.
	 * @param w int. The width of the video object.
	 */
	public void setWidth(int w) {
		put("w",w);
	}

	/**
	 * Return the linearity of this video object.
	 * @return
	 */
	public int getLinearity() {
		return (Integer)get("linearity");
	}

	/**
	 * Set the linearity of this video.
	 * @param linearity int. The linearity value.
	 */
	public void setLinearity(int linearity) {
		put("linearity",linearity);
	}

	/**
	 * Get the minduration of the video object requested.
	 * @return int. The min duration in seconds.
	 */
	public int getMinduration() {
		return (Integer)get("minduration");
	}

	/**
	 * Set the min duration of the video we are looking for.
	 * @param minduration
	 */
	public void setMinduration(int minduration) {
		put("minduration",minduration);
	}

	/**
	 * Get the maximum duration of the
	 * @return
	 */
	public int getMaxduration() {
		return (Integer)get("maxduration");
	}

	/**
	 * Set the maximum duration of the video we are looking for.
	 * @param maxduration int. The max duration in seconds.
	 */
	public void setMaxduration(int maxduration) {
		put("maxduration", maxduration);
	}

	/**
	 * Return the protocols we  want the ad to support.
	 * @return List. The list of protocols the ad should support.
	 */
	public List<Integer> getProtocols() {
		return (List<Integer>)get("protocols");
	}

	/**
	 * Set the protocols we are looking for the ad to support.
	 * @param protocols List. A list of integer designations.
	 */
	public void setProtocols(List<Integer> protocols) {
		put("protocols",protocols);
	}

	/**
	 * Set the scalar protocol we want supported.
	 * @param protocol int. The Protocol we want the ad to support.
	 */
	public void setProtocol(int protocol) {
		put("protocol",protocol);
	}

	/**
	 * Get the protocol we want supported in the ad.
	 * @return int. The protocol to support.
	 */
	public int getProtocol() {
		return (Integer)get("protocol");
	}

	/**
	 * Return the array of mimes we want supported.
	 * @return String[]. The array of mimes we will acdept for the ad.
	 */
	public String[] getMimes() {
		List<String> list = (List<String>)get("mimes");
		return (String[])list.toArray();
	}

	/**
	 * Add a mime type to the list of mimes we can support.
	 * @param item String. A mime type.
	 */
	public void addMime(String item) {
		List<String> list = (List<String>)get("momes");
		if (list == null) {
			list = new ArrayList();
			put("mimes",list);
		}
		list.add(item);
	}

	/**
	 * Return the position od where the ad will be placed.
	 * @return int. Returns the position of the ad on the page.
	 */
	public int getPos(){
		return (Integer)get("pos");
	}

	/**
	 * Set the position of where the ad will be placed on the page.
	 * @param pos int. The position of the ad.
	 */
	public void setPos(int pos) {
		put("pos",pos);
	}

	/**
	 * Default constructor, used by JSON
	 */
	public Video() {

	}
}


text:
using System;
using WebQQ.Im.Module.Interface;

namespace WebQQ.Im.Core
{
    public interface IQQClient : IDisposable, IQQContext, ILoginModule, IChatModule
    {
    }
}


text:
@class MJLocalizableStringsTable;

@interface MJLocalizableStringsFile : NSObject

+ (MJLocalizableStringsTable *)readStringsTable:(NSString *)file error:(NSError * __autoreleasing *)error;

+ (BOOL)writeStringsTable:(MJLocalizableStringsTable *)stringsTable path:(NSString *)folderPath error:(NSError * __autoreleasing *)error;

@end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>GameOperator</title>
<meta name="date" content="2015-01-10">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.haw.projecthorse.level.game.parcours

Class GameOperator

java.lang.Object

com.haw.projecthorse.level.game.parcours.GameOperator

All Implemented Interfaces:

IGameOperator, IGameOperatorFuerParcours

public class GameOperator
extends java.lang.Object
implements IGameOperator, IGameOperatorFuerParcours

Die Klasse ermittelt den Zustand des Spiels (start, ende, gewonnen, verloren),
 blendet je nach Zustand die entsprechenden Popups ein und startet das Spiel neu,
 wenn der Spieler das wünscht.

Version:

1.0

Author:

Francis

Constructor Summary

Constructors

Constructor and Description

GameOperator(com.badlogic.gdx.scenes.scene2d.Stage stage,
            com.badlogic.gdx.utils.viewport.Viewport viewport,
            int width,
            int height,
            Chest chest,
            AudioManager audioManager,
            Overlay overlay)

Konstruktor.

Method Summary

Methods

Modifier and Type
Method and Description

void
dispose()

Disposed die disposables.

java.util.List<? extends ParcoursLoot>
getLoots()

Ermittelt alle bereits gewonnen Loots aus diesem Spiel die unter dem
 verwendeten Spielstand gesichert sind.

void
pause()

Setzt das Spiel auf Pause & pausiert Gallopp.

void
restart()

Öffnet ein Popup und fragt den Spieler ob er nochmal spielen m�chte.

void
setInputProcessor()

Setzt den Input-Prozessor der auf Berührungen des Screens reagiert.

void
setPause(boolean p)

Setzt das Spiel auf Pause wenn p = true.

void
update(float delta)

Prüft ob die GameLogic mitteilt, dass ein Erfolg oder Misserfolg
 eingetreten ist.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GameOperator

public GameOperator(com.badlogic.gdx.scenes.scene2d.Stage stage,
            com.badlogic.gdx.utils.viewport.Viewport viewport,
            int width,
            int height,
            Chest chest,
            AudioManager audioManager,
            Overlay overlay)

Konstruktor.

Parameters:

stage - Die Stage auf der alle Actor sind (inkl. GameObjects).

viewport - Der Viewport.

width - Die Breite des Spiels.

height - Die Höhe des Spiels.

chest - Die Chest in der die Beute landet.

audioManager - Der AudioManager zum abspielen der Sounds / Musik.

overlay - Das Overlaymodul der gesamten App.

Method Detail

restart

public void restart()

Description copied from interface: IGameOperator

Öffnet ein Popup und fragt den Spieler ob er nochmal spielen m�chte.

Specified by:

restart in interface IGameOperator

setInputProcessor

public void setInputProcessor()

Setzt den Input-Prozessor der auf Berührungen des Screens reagiert.

update

public void update(float delta)

Description copied from interface: IGameOperator

Prüft ob die GameLogic mitteilt, dass ein Erfolg oder Misserfolg
 eingetreten ist.

Specified by:

update in interface IGameOperator

Specified by:

update in interface IGameOperatorFuerParcours

Parameters:

delta - Die Zeit, die seit dem letzten Frame vergangen ist.

setPause

public void setPause(boolean p)

Setzt das Spiel auf Pause wenn p = true.

Specified by:

setPause in interface IGameOperatorFuerParcours

Parameters:

p - wenn p = true -> Spiel pausiert. Sonst nicht.

pause

public void pause()

Setzt das Spiel auf Pause & pausiert Gallopp.

Specified by:

pause in interface IGameOperatorFuerParcours

dispose

public void dispose()

Disposed die disposables.

Specified by:

dispose in interface IGameOperatorFuerParcours

getLoots

public java.util.List<? extends ParcoursLoot> getLoots()

Ermittelt alle bereits gewonnen Loots aus diesem Spiel die unter dem
 verwendeten Spielstand gesichert sind.

Returns:

Liste aller Parcours-Loots

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Partridge, Baker & Morgan-Jones, Mycotaxon 82: 75 (2002)

#### Original name
Haplotrichum ponderosum Partr. & Morgan-Jones

### Remarks
null


text:
package com.palmelf.eoffice.dao.admin.impl;

import com.palmelf.core.dao.impl.BaseDaoImpl;
import com.palmelf.eoffice.dao.admin.DepreRecordDao;
import com.palmelf.eoffice.model.admin.DepreRecord;

import java.util.Date;

public class DepreRecordDaoImpl extends BaseDaoImpl<DepreRecord> implements
		DepreRecordDao {
	public DepreRecordDaoImpl() {
		super(DepreRecord.class);
	}

	public Date findMaxDate(Long assetsId) {
		String hql = "select max(vo.calTime) from DepreRecord vo where vo.fixedAssets.assetsId=?";
		Date date = (Date) findUnique(hql, new Object[] { assetsId });
		return date;
	}
}


text:
package org.apereo.cas.util;

import com.google.common.base.Splitter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apereo.cas.authentication.adaptive.geo.GeoLocationRequest;
import org.apereo.cas.authentication.principal.WebApplicationService;
import org.apereo.cas.web.support.ArgumentExtractor;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Enumeration;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/**
 * This is {@link HttpRequestUtils}.
 *
 * @author Misagh Moayyed
 * @since 5.2.0
 */

@Slf4j
public class HttpRequestUtils {
    /**
     * Constant representing the request header for user agent.
     */
    public static final String USER_AGENT_HEADER = "user-agent";

    /**
     * Gets http servlet request from request attributes.
     *
     * @return the http servlet request from request attributes
     */
    public static HttpServletRequest getHttpServletRequestFromRequestAttributes() {
        try {
            return ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
        } catch (final Exception e) {
            LOGGER.trace(e.getMessage(), e);
        }
        return null;
    }

    /**
     * Gets http servlet response from request attributes.
     *
     * @return the http servlet response from request attributes
     */
    public static HttpServletResponse getHttpServletResponseFromRequestAttributes() {
        return ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getResponse();
    }

    /**
     * Gets http servlet request geo location.
     *
     * @param request the request
     * @return the http servlet request geo location
     */
    public static GeoLocationRequest getHttpServletRequestGeoLocation(final HttpServletRequest request) {
        final int latIndex = 0;
        final int longIndex = 1;
        final int accuracyIndex = 2;
        final int timeIndex = 3;
        final GeoLocationRequest loc = new GeoLocationRequest();
        if (request != null) {
            final String geoLocationParam = request.getParameter("geolocation");
            if (StringUtils.isNotBlank(geoLocationParam)) {
                final List<String> geoLocation = Splitter.on(",").splitToList(geoLocationParam);
                loc.setLatitude(geoLocation.get(latIndex));
                loc.setLongitude(geoLocation.get(longIndex));
                loc.setAccuracy(geoLocation.get(accuracyIndex));
                loc.setTimestamp(geoLocation.get(timeIndex));
            }
        }
        return loc;
    }

    /**
     * Gets request headers.
     *
     * @param request the request
     * @return the request headers
     */
    public static Map<String, String> getRequestHeaders(final HttpServletRequest request) {
        final Map<String, String> headers = new LinkedHashMap<>();
        final Enumeration<String> headerNames = request.getHeaderNames();
        if (headerNames != null) {
            while (headerNames.hasMoreElements()) {
                final String headerName = headerNames.nextElement();
                final String headerValue = StringUtils.stripToEmpty(request.getHeader(headerName));
                headers.put(headerName, headerValue);
            }
        }
        return headers;
    }

    /**
     * Gets http servlet request user agent.
     *
     * @param request the request
     * @return the http servlet request user agent
     */
    public static String getHttpServletRequestUserAgent(final HttpServletRequest request) {
        if (request != null) {
            return request.getHeader(USER_AGENT_HEADER);
        }
        return null;
    }

    /**
     * Gets the service from the request based on given extractors.
     *
     * @param argumentExtractors the argument extractors
     * @param request            the request
     * @return the service, or null.
     */
    public static WebApplicationService getService(final List<ArgumentExtractor> argumentExtractors, final HttpServletRequest request) {
        return argumentExtractors.stream().map(argumentExtractor -> argumentExtractor.extractService(request))
            .filter(Objects::nonNull).findFirst().orElse(null);
    }

}


text:
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLMetaElement
       (js_setContent, setContent, js_getContent, getContent,
        js_setHttpEquiv, setHttpEquiv, js_getHttpEquiv, getHttpEquiv,
        js_setName, setName, js_getName, getName, js_setScheme, setScheme,
        js_getScheme, getScheme, HTMLMetaElement, castToHTMLMetaElement,
        gTypeHTMLMetaElement)
       where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import Data.Typeable (Typeable)
import GHCJS.Types (JSRef(..), JSString, castRef)
import GHCJS.Foreign (jsNull)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSRef(..), FromJSRef(..))
import GHCJS.Marshal.Pure (PToJSRef(..), PFromJSRef(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName)
import GHCJS.DOM.Enums

foreign import javascript unsafe "$1[\"content\"] = $2;"
        js_setContent :: JSRef HTMLMetaElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.content Mozilla HTMLMetaElement.content documentation>
setContent ::
           (MonadIO m, ToJSString val) => HTMLMetaElement -> val -> m ()
setContent self val
  = liftIO (js_setContent (unHTMLMetaElement self) (toJSString val))

foreign import javascript unsafe "$1[\"content\"]" js_getContent ::
        JSRef HTMLMetaElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.content Mozilla HTMLMetaElement.content documentation>
getContent ::
           (MonadIO m, FromJSString result) => HTMLMetaElement -> m result
getContent self
  = liftIO
      (fromJSString <$> (js_getContent (unHTMLMetaElement self)))

foreign import javascript unsafe "$1[\"httpEquiv\"] = $2;"
        js_setHttpEquiv :: JSRef HTMLMetaElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.httpEquiv Mozilla HTMLMetaElement.httpEquiv documentation>
setHttpEquiv ::
             (MonadIO m, ToJSString val) => HTMLMetaElement -> val -> m ()
setHttpEquiv self val
  = liftIO
      (js_setHttpEquiv (unHTMLMetaElement self) (toJSString val))

foreign import javascript unsafe "$1[\"httpEquiv\"]"
        js_getHttpEquiv :: JSRef HTMLMetaElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.httpEquiv Mozilla HTMLMetaElement.httpEquiv documentation>
getHttpEquiv ::
             (MonadIO m, FromJSString result) => HTMLMetaElement -> m result
getHttpEquiv self
  = liftIO
      (fromJSString <$> (js_getHttpEquiv (unHTMLMetaElement self)))

foreign import javascript unsafe "$1[\"name\"] = $2;" js_setName ::
        JSRef HTMLMetaElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.name Mozilla HTMLMetaElement.name documentation>
setName ::
        (MonadIO m, ToJSString val) => HTMLMetaElement -> val -> m ()
setName self val
  = liftIO (js_setName (unHTMLMetaElement self) (toJSString val))

foreign import javascript unsafe "$1[\"name\"]" js_getName ::
        JSRef HTMLMetaElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.name Mozilla HTMLMetaElement.name documentation>
getName ::
        (MonadIO m, FromJSString result) => HTMLMetaElement -> m result
getName self
  = liftIO (fromJSString <$> (js_getName (unHTMLMetaElement self)))

foreign import javascript unsafe "$1[\"scheme\"] = $2;"
        js_setScheme :: JSRef HTMLMetaElement -> JSString -> IO ()

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.scheme Mozilla HTMLMetaElement.scheme documentation>
setScheme ::
          (MonadIO m, ToJSString val) => HTMLMetaElement -> val -> m ()
setScheme self val
  = liftIO (js_setScheme (unHTMLMetaElement self) (toJSString val))

foreign import javascript unsafe "$1[\"scheme\"]" js_getScheme ::
        JSRef HTMLMetaElement -> IO JSString

-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLMetaElement.scheme Mozilla HTMLMetaElement.scheme documentation>
getScheme ::
          (MonadIO m, FromJSString result) => HTMLMetaElement -> m result
getScheme self
  = liftIO (fromJSString <$> (js_getScheme (unHTMLMetaElement self)))


text:
jrecastnavigation
=================

A JNI wrapper for the recast navigation library.

EXPERIMENTAL

Currently build script only supports Linux x64. Will work on ant build description later.

Purpose
--------------

To have a one to one wrapper of the recast navigation system wrapped with JNI for full functionality. This will include the detour system as well as the recast nav mesh generation system.
The inception is for my own personal usage, out of frustration of not being able to find a JNI wrapper or full java implementation.

Building
---------------

Dependencies :

g++
java JDK
swig

Currently the recastnavigation/Recast/build.sh build script has a absolute path to the jni.h so you may want to change that to where your jni.h resides.

Usage
--------------

Use the supplied recast.jar in your project and put the librecast.so in your library path, you will probably have to set this through the run configuration with java  -Djava.library.path=SOMEPATH
From there you should be able to access the recastnavigation libraries as normal.


text:
#ifndef LayoutSVGImage_h
#define LayoutSVGImage_h

#include "core/layout/svg/LayoutSVGModelObject.h"

namespace blink {

class LayoutImageResource;
class SVGImageElement;

class LayoutSVGImage final : public LayoutSVGModelObject {
 public:
  explicit LayoutSVGImage(SVGImageElement*);
  ~LayoutSVGImage() override;

  void setNeedsBoundariesUpdate() override { m_needsBoundariesUpdate = true; }
  void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; }

  LayoutImageResource* imageResource() { return m_imageResource.get(); }
  const LayoutImageResource* imageResource() const {
    return m_imageResource.get();
  }

  FloatRect objectBoundingBox() const override { return m_objectBoundingBox; }
  bool isOfType(LayoutObjectType type) const override {
    return type == LayoutObjectSVGImage || LayoutSVGModelObject::isOfType(type);
  }

  const char* name() const override { return "LayoutSVGImage"; }

 protected:
  void willBeDestroyed() override;

 private:
  FloatRect strokeBoundingBox() const override { return m_objectBoundingBox; }

  void addOutlineRects(Vector<LayoutRect>&,
                       const LayoutPoint& additionalOffset,
                       IncludeBlockVisualOverflowOrNot) const override;

  void imageChanged(WrappedImagePtr, const IntRect* = nullptr) override;

  void layout() override;
  void paint(const PaintInfo&, const LayoutPoint&) const override;

  bool updateBoundingBox();

  bool nodeAtFloatPoint(HitTestResult&,
                        const FloatPoint& pointInParent,
                        HitTestAction) override;

  AffineTransform localSVGTransform() const override {
    return m_localTransform;
  }

  FloatSize calculateObjectSize() const;

  bool m_needsBoundariesUpdate : 1;
  bool m_needsTransformUpdate : 1;
  AffineTransform m_localTransform;
  FloatRect m_objectBoundingBox;
  Persistent<LayoutImageResource> m_imageResource;
};

DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGImage, isSVGImage());

}  // namespace blink

#endif  // LayoutSVGImage_h


text:
/*
	//call like so, pass in a class name that you don't want it to check and a filetype to replace .svg with
	svgeezy.init('nocheck', 'png');
*/

var svgeezy = function() {

		return {

			init: function(avoid, filetype) {
				this.avoid = avoid || false;
				this.filetype = filetype || 'png';
				this.svgSupport = this.supportsSvg();
				if(!this.svgSupport) {
					this.images = document.getElementsByTagName('img');
					this.imgL = this.images.length;
					this.fallbacks();
				}
			},

			fallbacks: function() {
				while(this.imgL--) {
					if(!this.hasClass(this.images[this.imgL], this.avoid) || !this.avoid) {
						var src = this.images[this.imgL].getAttribute('src');
						if(src === null) {
							continue;
						}
						if(this.getFileExt(src) == 'svg') {
							var newSrc = src.replace('.svg', '.' + this.filetype);
							this.images[this.imgL].setAttribute('src', newSrc);
						}
					}
				}
			},

			getFileExt: function(src) {
				var ext = src.split('.').pop();

        			if(ext.indexOf("?") !== -1) {
          				ext = ext.split('?')[0];
        			}

        			return ext;
			},

			hasClass: function(element, cls) {
				return(' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
			},

			supportsSvg: function() {
				return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image", "1.1");
			}
		};

	}();