text:
package fr.ydelouis.selfoss.rest;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;

import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.OrmLiteDao;
import org.androidannotations.annotations.RootContext;
import org.androidannotations.annotations.sharedpreferences.Pref;
import org.androidannotations.annotations.sharedpreferences.SharedPref;

import fr.ydelouis.selfoss.R;
import fr.ydelouis.selfoss.model.ArticleDao;
import fr.ydelouis.selfoss.model.DatabaseHelper;

@EBean
public class NewVersionHelper {

	@RootContext
	protected Activity activity;
	@OrmLiteDao(helper = DatabaseHelper.class)
	protected ArticleDao articleDao;
	@Pref
	protected NewVersionHelper_.Prefs_ prefs;

	public void showNewVersionMessageIfNeeded() {
		if (activity != null) {
			showNewVersion2_11();
		}
	}

	private void showNewVersion2_11() {
		if (!prefs.v2_11().get() && articleDao.queryForCount() > 0 && articleDao.queryForLatestUpdateTime() == null) {
			AlertDialog.Builder builder = new AlertDialog.Builder(activity);
			builder.setMessage(R.string.newVersion_2_11_message);
			builder.setTitle(R.string.newVersion_title);
			builder.setPositiveButton(R.string.remindMeLater, new DialogInterface.OnClickListener() {
				@Override
				public void onClick(DialogInterface dialogInterface, int i) {
					dialogInterface.dismiss();
				}
			});
			builder.setNegativeButton(R.string.gotIt, new DialogInterface.OnClickListener() {
				@Override
				public void onClick(DialogInterface dialogInterface, int i) {
					dialogInterface.dismiss();
					prefs.v2_11().put(true);
				}
			});
			builder.show();
		}
	}

	@SharedPref
	public interface Prefs {
		boolean v2_11();
	}
}


text:
//
//  InfiniteLoopViewBuilder.h
//  InfiniteLoopView
//
//  Created by YouXianMing on 16/5/6.
//  Copyright © 2016年 YouXianMing. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CustomNodeStateView.h"
#import "UIView+Rect.h"
#import "InfiniteLoopViewProtocol.h"
#import "InfiniteLoopCellClassProtocol.h"
#import "CustomInfiniteLoopCell.h"
@class InfiniteLoopViewBuilder;

@protocol InfiniteLoopViewBuilderEventDelegate <NSObject>

@optional

/**
 *  Get the InfiniteLoopViewBuilder's data.
 *
 *  @param infiniteLoopViewBuilder  InfiniteLoopViewBuilder's object.
 *  @param data                     data.
 *  @param index                    Current index.
 */
- (void)infiniteLoopViewBuilder:(InfiniteLoopViewBuilder *)infiniteLoopViewBuilder
                           data:(id <InfiniteLoopViewProtocol>)data
                  selectedIndex:(NSInteger)index
                           cell:(CustomInfiniteLoopCell *)cell;

/**
 *  Did scroll to get the current page.
 *
 *  @param infiniteLoopViewBuilder InfiniteLoopViewBuilder's object.
 *  @param index                   Current index.
 */
- (void)infiniteLoopViewBuilder:(InfiniteLoopViewBuilder *)infiniteLoopViewBuilder
           didScrollCurrentPage:(NSInteger)index;

@end

typedef enum : NSUInteger {

    kNodeViewTop,
    kNodeViewTopLeft,
    kNodeViewTopRight,

    kNodeViewBottom,
    kNodeViewBottomLeft,
    kNodeViewBottomRight,

    kNodeViewLeft,
    kNodeViewLeftTop,
    kNodeViewLeftBottom,

    kNodeViewRight,
    kNodeViewRightTop,
    kNodeViewRightBottom,

} ENodeViewShowPosition;

@interface InfiniteLoopViewBuilder : UIView

/**
 *  InfiniteLoopViewBuilder's delegate.
 */
@property (nonatomic, weak) id <InfiniteLoopViewBuilderEventDelegate> delegate;

/**
 *  The contentView that you can add view to it.
 */
@property (nonatomic, strong, readonly) UIView  *contentView;

/**
 *  CustomNodeStateView's template.
 */
@property (nonatomic, strong) CustomNodeStateView  *nodeViewTemplate;

/**
 *  NodeStateViews's edgeInsets.
 */
@property (nonatomic) UIEdgeInsets  edgeInsets;

/**
 *  Image model's array, you must set this value.
 */
@property (nonatomic, strong) NSArray <InfiniteLoopViewProtocol, InfiniteLoopCellClassProtocol>  *models;

/**
 *  Set the NodeView's size, default is (10, 10).
 */
@property (nonatomic) CGSize  sampleNodeViewSize;

/**
 *  The CustomNodeStateViews show position, default is kNodeViewBottom.
 */
@property (nonatomic) ENodeViewShowPosition  position;

/**
 *  Scroll time interval, default is 4s.
 */
@property (nonatomic) NSTimeInterval  scrollTimeInterval;

/**
 *  Scroll direction, default is horizontal.
 */
@property (nonatomic) UICollectionViewScrollDirection  scrollDirection;

/**
 *  Start the loop.
 *
 *  @param animated Animated or not.
 */
- (void)startLoopAnimated:(BOOL)animated;

/**
 开始动画
 */
- (void)startLoopAnimated;

/**
 停止动画
 */
- (void)stopLoopAnimation;

/**
 *  Adjust when freeze.
 */
- (void)adjustWhenFreeze;

@end

redpajama_set_name: RedPajamaGithub


text:
namespace content {

class RenderViewImpl;

// Collect timing information for page loads.
// If a Renderview performs multiple loads, only the first one is recorded.
class StatsCollectionObserver : public RenderViewObserver {
 public:
  explicit StatsCollectionObserver(RenderViewImpl* render_view);
  ~StatsCollectionObserver() override;

  // RenderViewObserver implementation
  void DidStartLoading() override;
  void DidStopLoading() override;

  // Timing for the page load start and stop.  These functions may return
  // a null time value under various circumstances.
  const base::Time& load_start_time() { return start_time_; }
  const base::Time& load_stop_time() { return stop_time_; }

 private:
  base::Time start_time_;
  base::Time stop_time_;

   DISALLOW_COPY_AND_ASSIGN(StatsCollectionObserver);
};

}  // namespace content

#endif  // CONTENT_RENDERER_STATS_COLLECTION_OBSERVER_H_


text:
/*************************
 Navigation Controller Tests
 **************************/
'use strict';
describe('JetThunder2 Navigation: Controller', function() {
    var rootScope, scope, controller, navigationToggle;

    beforeEach(function () {
        module('JetThunder2');
        module(function($provide) {
            navigationToggle = jasmine.createSpy();
            $provide.factory('$mdSidenav', function() {
                return function(){
                    return {toggle: navigationToggle};
                };
            });
        });
        inject(function ($rootScope, $controller) {
            rootScope = $rootScope;
            scope = $rootScope.$new();
            controller = $controller('NavigationCtrl', {$scope: scope});
        });
    });

    describe('Navigation Controller Tests', function () {
        it('Should have a controller', function () {
            expect(controller).toBeDefined();
        });
        it('Should open the navigation menu on calling openNavigation()', function() {
            controller.openNavigation();
            expect(navigationToggle).toHaveBeenCalled();
        });
    });
});


text:
import { createHook, createStore, StoreActionApi } from "react-sweet-state";
import HttpRequest from "./types/HttpRequest";
import HttpResponse from "./types/HttpResponse";
import { sendRequest } from "./requestHandler";
import { decode } from "jsonwebtoken";
import axios, { CancelTokenSource } from "axios";
import historyService from "./historyService";
import HistoryItem, { toHistoryItem } from "./types/HistoryItem";
import { HistoryFilter } from "./types/HistoryFilter";
import _ from "lodash";

const LOCAL_STORAGE_THEME_KEY = "theme";

const AUTH_PATTERN = /^\s*Authorization\s*:\s*(Bearer|Basic)\s+([a-zA-Z0-9-_.=]+)\s*$/gm;

const defaultRequest: HttpRequest = {
  url: "",
  method: "GET",
  contentType: "application/json",
  body: "",
  headers: "",
};

const defaultResponse: HttpResponse = {
  startTime: 0,
  endTime: 0,
  status: 0,
  contentType: "",
  responseText: "",
  headers: {},
};

const defaultTheme: string = localStorage.getItem(LOCAL_STORAGE_THEME_KEY) || "dark";

interface Auth {
  type: "Basic" | "JWT";
  value: string;
}

interface State {
  request: HttpRequest;
  response: HttpResponse;
  loading: boolean;
  responseTab: number;
  theme: string;
  historyFilter: HistoryFilter;
  history: HistoryItem[];
  cancellable?: CancelTokenSource;
  auth?: Auth;
}

type StoreApi = StoreActionApi<State>;

// private actions (not exposed in state, used internally via dispatch)

const searchHistory = () => ({ setState, getState }: StoreApi) => {
  const historyFilter = getState().historyFilter;
  const start = Date.now();
  historyService.search(historyFilter, (results) => {
    const end = Date.now();
    console.debug("Search took %sms", end - start);
    setState({
      history: results,
    });
  });
};

const trimHistory = () => ({ dispatch }: StoreApi) => {
  historyService.trim(() => {
    dispatch(searchHistory());
  });
};

// TODO pull this out into a separate helper and write some unit tests
const processHeaders = () => ({ setState, getState }: StoreApi) => {
  const { headers } = getState().request;
  let auth: Auth | undefined;
  let encoded;
  let authType;

  // parse all matching tokens and use the last one
  let matches;
  while ((matches = AUTH_PATTERN.exec(headers))) {
    if (matches != null && _.size(matches) === 3) {
      try {
        authType = matches[1];
        encoded = matches[2];
        if (authType === "Bearer") {
          const decoded = decode(encoded, { complete: true, json: true });
          if (decoded) {
            auth = { type: "JWT", value: JSON.stringify(decoded, null, 2) };
          }
        } else if (authType === "Basic") {
          const decoded = atob(encoded);
          if (decoded) {
            auth = { type: "Basic", value: decoded };
          }
        }
      } catch (e) {
        // ignore
      }
    }
  }
  setState({
    auth,
  });
};

// public actions

const actions = {
  setRequestValue: (name: string, value: any) => ({ setState, getState, dispatch }: StoreApi) => {
    setState({
      request: {
        ...getState().request,
        [name]: value,
      },
    });
    if (name === "headers") {
      dispatch(processHeaders());
    }
  },

  setResponseTab: (tab: number) => ({ setState }: StoreApi) => {
    setState({
      responseTab: tab,
    });
  },

  reset: () => ({ setState }: StoreApi) => {
    setState({
      request: defaultRequest,
      response: defaultResponse,
      responseTab: 0,
      auth: undefined,
    });
  },

  send: () => async ({ setState, getState, dispatch }: StoreApi) => {
    setState({
      loading: true,
      response: defaultResponse,
    });

    const { request } = getState();

    const cancellable = axios.CancelToken.source();
    setState({ cancellable });
    const response = await sendRequest(request, cancellable.token);
    setState({ cancellable: undefined });

    if (response.status > 0) {
      const historyItem = toHistoryItem(request, response);

      historyService.save(historyItem, () => {
        dispatch(searchHistory());
        dispatch(trimHistory());
      });
    }

    setState({
      response,
      loading: false,
    });
  },

  cancel: () => ({ getState, setState }: StoreApi) => {
    const cancellable = getState().cancellable;
    if (cancellable) {
      cancellable.cancel();
      setState({
        cancellable: undefined,
      });
    }
  },

  toggleTheme: () => ({ setState, getState }: StoreApi) => {
    const theme = getState().theme === "dark" ? "light" : "dark";
    localStorage.setItem(LOCAL_STORAGE_THEME_KEY, theme);
    setState({
      theme,
    });
  },

  clearHistory: (includeFavourites: boolean) => ({ dispatch }: StoreApi) => {
    historyService.clear(includeFavourites, () => {
      dispatch(searchHistory());
    });
  },

  selectHistoryItem: (historyItem: HistoryItem) => ({ setState, dispatch }: StoreApi) => {
    const { url, method, contentType, body, headers } = historyItem;
    setState({
      request: {
        url,
        method,
        contentType,
        body,
        headers,
      },
      response: defaultResponse,
    });
    dispatch(processHeaders());
  },

  favouriteHistoryItem: (historyItem: HistoryItem, favourite: boolean) => ({ dispatch }: StoreApi) => {
    historyService.update(historyItem, { favourite: favourite ? 1 : 0 }, () => {
      dispatch(searchHistory());
    });
  },

  removeHistoryItem: (historyItem: HistoryItem) => ({ dispatch }: StoreApi) => {
    historyService.delete(historyItem, () => {
      dispatch(searchHistory());
    });
  },

  setHistoryFilter: (name: string, value: any) => ({ setState, getState }: StoreApi) => {
    setState({
      historyFilter: {
        ...getState().historyFilter,
        [name]: value,
      },
    });
  },

  searchHistory: () => ({ dispatch }: StoreApi) => {
    dispatch(searchHistory());
  },

  migrateHistory: () => ({ dispatch }: StoreApi) => {
    historyService.migrate(() => {
      dispatch(searchHistory());
    });
  },
};

const store = createStore<State, typeof actions>({
  initialState: {
    request: defaultRequest,
    response: defaultResponse,
    theme: defaultTheme,
    loading: false,
    responseTab: 0,
    history: [],
    historyFilter: {
      searchTerm: "",
      showFavourites: false,
    },
  },
  actions,
});

const useTheme = createHook(store, {
  selector: (state: State) => {
    return state.theme;
  },
});

const useLoading = createHook(store, {
  selector: (state: State) => {
    return state.loading;
  },
});

const useRequest = createHook(store, {
  selector: (state: State) => {
    return state.request;
  },
});

const useAuth = createHook(store, {
  selector: (state: State) => {
    return state.auth;
  },
});

const useResponse = createHook(store, {
  selector: (state: State) => {
    return {
      response: state.response,
      responseTab: state.responseTab,
    };
  },
});

const useHistory = createHook(store, {
  selector: (state: State) => {
    return state.history;
  },
});

const useHistoryFilter = createHook(store, {
  selector: (state: State) => {
    return state.historyFilter;
  },
});

export { useRequest, useResponse, useAuth, useHistory, useTheme, useLoading, useHistoryFilter };


text:
Last modified: 2014-04-13 12:00:30 tkych

Version: 0.01.04 (beta)

Quicksearch
===========

Quicksearch is a search-engine-interface for Common Lisp.
The goal of Quicksearch is to find the CL library quickly.
For example, if you will find the library about json, just type `(qs:? 'json)` at REPL.

The function `quicksearch` searches for CL projects in Quicklisp, Cliki,
GitHub and BitBucket, then outputs results in REPL.
The function `?` is abbreviation wrapper for `quicksearch`.

Depends-on
----------

 * [bordeaux-threads](http://common-lisp.net/project/bordeaux-threads/)
 * [iterate](http://common-lisp.net/project/iterate/)
 * [alexandria](http://common-lisp.net/project/alexandria/)
 * [anaphora](http://common-lisp.net/project/anaphora/)
 * [cl-ppcre](http://weitz.de/cl-ppcre/)
 * [drakma](http://weitz.de/drakma/)
 * [html-entities](https://code.google.com/p/html-entities/)
 * [yason](http://common-lisp.net/project/yason/)
 * [flexi-streams](http://weitz.de/flexi-streams/)
 * [do-urlencode](https://github.com/drdo/do-urlencode)

Installation
------------

#### cl-test-grid results:

 - http://common-lisp.net/project/cl-test-grid/library/quicksearch.html

##### Auto:

 0. CL-REPL> `(ql:quickload :quicksearch)`

##### Manual:

 0. SHELL$   `git clone https://github.com/tkych/quicksearch.git`
 1. CL-REPL> `(push #p"/path-to-quicksearch/quicksearch/" asdf:*central-registry*)`
 2. CL-REPL> `(ql:quickload :quicksearch)` or `(asdf:load-system :quicksearch)`

Examples
--------

##### Null result:

    CL-REPL> (qs:? "supercalifragilisticexpialidocious") ;<=> (qs:quicksearch "supercalifragilisticexpialidocious")
    NIL

 * If it raises a threading error, probably your CL system might be not support threads.
   In this case, please type `(qs:config :threading? nil)` at REPL, then try it again.
 * If search-results is null, then just return NIL.

##### Simple search:

    CL-REPL> (qs:? "crypt") ;<=> (qs:quicksearch "crypt")

    SEARCH-RESULTS: "crypt"

     Quicklisp
      crypt

     Cliki
      ARC4
      JARW
      VLM_on_Linux

     GitHub
      cl-crypt
      cl-crypto
      cl-crypto
      cryptography
      cryptoschool
      Cryptopsaras
    T

 * If search-results is not null, then results are printed and return T.
 * Since bitbucket-result is null, it is not printed.

##### Description:

    CL-REPL> (qs:? 'Crypt :d) ;<=> (qs:quicksearch 'Crypt :?description t)

    SEARCH-RESULTS: "crypt"
    =======================

     Quicklisp
     ---------
      crypt
          http://quickdocs.org/cl-crypt/

     Cliki
     -----
      ARC4
          A Common Lisp implementation of ARC4, a Cryptography code, can be found on
          the
      JARW
          Dr John AR Williams' utilities
      VLM_on_Linux
          Instructions for running the Symbolics VLM virtual machine on Linux

     GitHub
     ------
      cl-crypt
          Common-Lisp implementation of unix crypt function
      cl-crypto
          A common lisp package of ciphers, public-key algorithms, etc.
      cl-crypto
          Pure lisp crypto, written from specs
      cryptography
          implementations of ciphers for cryptography class
      cryptoschool
          Lisp files related to the cryptography class being taught by Ben Warner
      Cryptopsaras
          Reads files generated by Acinonyx.
    T

 * A symbol (as search-word) is automatically converted into a downcase-string.
 * If option `:d` is on, then the description of the project is printed (QuickDocs-url for Quicklisp-search).
 * The function QUICKSEARCH's options are redundant, but explanatory.
 * The function ?'s options are not explanatory, but minimum.

##### URL, Space, Cutoff:

    CL-REPL> (qs:? "crypt" :ug 4) ;<=> (qs:quicksearch "crypt"
                                  ;                    :?url t :?cut-off 4
                                  ;                    :?quicklisp nil :?cliki nil :?bitbucket nil)

    SEARCH-RESULTS: "crypt"
    =======================

     GitHub
     ------
      cl-crypt
          https://github.com/renard/cl-crypt
      cl-crypto
          https://github.com/bgs100/cl-crypto
      cl-crypto
          https://github.com/billstclair/cl-crypto
      cryptography
          https://github.com/MorganBauer/cryptography
      .......> 2
    T

 * If option `:u` is on, then the project's url is printed.
 * If option `:g` is on, then only github-results are printed
   (also `:q` - quicklisp, `:c` - cliki, `:b` - bitbutcket. these options are addable).
 * If cut-off is supplied (above 4), then the number of output results is bellow cut-off
   (the number (above 2) after `.......>` is number of remains).
 * The order of options is nothing to do with search-result
   (e.g. `:ug 4` <=> `4 :gu` <=> `:u 4 :g` <=> ...).

##### Config:

    CL-REPL> (qs:? 'lisp-koans :du 1) ;<=> (qs:quicksearch 'lisp-koans
                                      ;                    :?description t :?url t :?cut-off 1)

    SEARCH-RESULTS: "lisp-koans"
    ============================

     GitHub
     ------
      lisp-koans
          https://github.com/google/lisp-koans
          Common Lisp Koans is a language learning exercise in the same vein as the
          ruby koans, python koans and others.   It is a port of the prior koans
          with some modifications to highlight lisp-specific features.  Structured
          as ordered groups of broken unit tests, the project guides the learner
          progressively through many Common Lisp language features.
      .......> 4
    T

    CL-REPL> (qs:config :maximum-columns-of-description 50)
    Current maximum columns of description: 50
    T

    CL-REPL> (qs:? 'lisp-koans :du 1)

    SEARCH-RESULTS: "lisp-koans"
    ============================

     GitHub
     ------
      lisp-koans
          https://github.com/google/lisp-koans
          Common Lisp Koans is a language learning
          exercise in the same vein as the ruby koans,
          python koans and others.   It is a port of
          the prior koans with some modifications to
          highlight lisp-specific features.
          Structured as ordered groups of broken unit
          tests, the project guides the learner
          progressively through many Common Lisp
          language features.
      .......> 4
    T

 * `:maximum-columns-of-description` controls in printing description (default is 80).

Reference Manual
----------------

#### [function] QUICKSEARCH _search-word_ _&key_ _?web_ _?description_ _?url_ _?cut-off_ _?quicklisp_ _?cliki_ _?github_ _?bitbucket_

QUICKSEARCH searches for CL projects with _search-word_ in Quicklisp, Cliki, GitHub and BitBucket.
_search-word_ must be a string, number or symbol (symbol will be automatically converted into downcase-string).

##### Keywords:

 * If _?web_ is NIL, it does not search in Cliki, GitHub and BitBucket.
 * If _?quicklisp_ is NIL, it does not search in Quicklisp (also _?cliki_, _?github_, _?bitbucket_).
 * At least one search-space must be specified.
 * If _?description_ is T, it displays project's descriptions (QuickDocs-url for Quicklisp-search).
 * If _?url_ is T, it display project's url.
 * _?cut-off_ is the max number of printing repositories each space.

##### Note:

 * _?cut-off_ controls only printing results,
   nothing to do with the max number of fetching repositories.
   see. function CONFIG documentation

 * About #\Space in _search-word_:

   In case _search-word_ contains #\Space, Quicklisp-search is OR-search,
   whereas Cliki-search, GitHub-, BitBucket- is AND-search.

   e.g. (quicksearch "foo bar")
     Quicklisp-search for "foo" OR "bar".
     Cliki-search, GitHub-, BitBucket- for "foo" AND "bar".

#### [function] ? _search-word_ _&rest_ _options_

? is abbreviation wrapper for function QUICKSEARCH.
_search-word_ must be a string, number or symbol.
_options_ must be a non-negative integer (as Cut-Off) and/or some keywords which consists of some Option-Chars.

##### Examples:

    (? "crypt")
    <=>
    (quicksearch "crypt" :?description nil :?url nil :?cut-off 50
                         :?quicklisp t :?cliki t :?github t :?bitbucket t)

    (? "crypt" :du 10)
    <=>
    (quicksearch "crypt" :?description T :?url T :?cut-off 10
                         :?quicklisp t :?cliki t :?github t :?bitbucket t)

    (? "crypt" 20 :g :d)
    <=>
    (quicksearch "crypt" :?description T :?url nil :?cut-off 20
                         :?quicklisp nil :?cliki nil :?github T :?bitbucket nil)

##### Options:

 * Cut-Off:
   * The max number of printing results (default is 50).

 * Option-Chars:
   * d, D -- output Description (or QuickDocs-url for Quicklisp-search)
   * u, U -- output URL
   * q, Q -- search in Quicklisp
   * c, C -- search in Cliki
   * g, G -- search in GitHub
   * b, B -- search in Bitbucket

##### Note:

 * Option-Char is idempotent (e.g. :dd <=> :d).
 * The order of Option-Chars is nothing to do with output. (e.g. :du <=> :ud)
 * If _options_ contains more than 2 Cut-Offs, only last one is applied.
 * The order of _options_ is nothing to do with output (except for some Cut-Offs).
 * If no search space is specified, all spaces is specified (e.g. :d <=> :dqcgb)
 * If at most one search space is specified, then others are not specified.

#### [function] CONFIG _&key_ _maximum-columns-of-description_ _maximum-number-of-fetching-repositories_ _cache-size_ _clear-cache?_ _threading?_ _quicklisp-verbose?_

Function CONFIG customizes printing, fetching or caching.

##### Keywords:

 * _:maximum-columns-of-description_
   The value must be a plus integer bigger than 5.
   If the length of description-string is bigger than this value,
   then output of description is inserted newline for easy to see.
   Default value is 80.

 * _:maximum-number-of-fetching-repositories_
   This value controls the number of fetching repositories.
   The value must be a plus integer.
   Increasing this value, the number of fetching repositories increases, but also space & time does.
   Default value is 50.

 * _:cache-size_
   The value must be a plus integer.
   This value is the number of stored previous search-results.
   Increasing this value, the number of caching results increases, but also space does.
   Default value is 4.

 * _:clear-cache?_
   The value must be a boolean.
   If value is T, then clear all caches.

 * _:threading?_
   The value must be a boolean (default T).
   If value is NIL, then QUICKSEARCH becomes not to use threads for searching.

   Note:
     Currently in SBCL (1.1.8), threads are part of the default build on x86[-64] Linux only.
     Other platforms (x86[-64] Darwin (Mac OS X), x86[-64] FreeBSD, x86 SunOS (Solaris),
     and PPC Linux) experimentally supports threads and must be explicitly enabled at build-time.
     For more details, please see [SBCL manual](http://www.sbcl.org/manual/index.html#Threading).

 * _quicklisp-verbose?_
   The value must be a boolean (default NIL).
   If value is T, then outputs version of quicklisp and whether library had installed your local.

   Example:
```
     CL-REPL> (qs:config :quicklisp-verbose? T)
     CL-REPL> (qs:? "json" :q)

     SEARCH-RESULTS: "json"

      Quicklisp: 2013-04-20   ;<- quicklisp version
       !cl-json               ;<- if library has installed via quicklisp, print prefix "!".
       !cl-json.test
       com.gigamonkeys.json   ;<- if not, none.
       json-template
       st-json
     T
```

##### Note:

If you would prefer permanent config, for example,
add codes something like the following in the CL init file.

In `.sbclrc` for SBCL, `ccl-init.lisp` for CCL:

    (ql:quickload :quicksearch)
    (qs:config :maximum-columns-of-description 50
               :maximum-number-of-fetching-repositories 20
               :cache-size 2
               :threading? nil
               :quicklisp-verbose? t)

#### [special variable] \*USER-AGENT\*

\*user-agent\* tells the server who is requested (i.e. User-Agent header value).
If you are embedding quicksearch in a larger application, you should
change the value of \*user-agent\* to your application name and URL.

TODO
----

- ADD search-space: Common-Lisp.net
- ADD search-space: Google code

Author, License, Copyright
--------------------------

- Takaya OCHIAI  <#.(reverse "moc.liamg@lper.hcykt")>

- MIT License

- Copyright (C) 2013 Takaya OCHIAI


text: Learning some fun haskell


text:
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { browserHistory, Router, Route, IndexRoute } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';

import Main from './components/Main';
import HomePageContainer from './containers/HomePageContainer';
import ResultPageContainer from './containers/ResultPageContainer';
import store from './store';
// Import react-tap-event-plugin to avoid material-ui onTouchTap event error
// Needed for onTouchTap
// http://stackoverflow.com/a/34015469/988941

injectTapEventPlugin();

// Use react-redux Provider to pack the store and pass store to the children-components
// browserHistory is used to be history
// MuiThemeProvider in material-ui is used to decorate the whole component
// Main : the master model
// HomePageContainer :
// ResultPageContainer :

ReactDOM.render(
  <Provider store={store}>
    <MuiThemeProvider>
      <Router history={browserHistory}>
        <Route path="/" component={Main} />
        <IndexRoute component={HomePageContainer} />
        <Route path="/result" component={ResultPageContainer} />
      </Router>
    </MuiThemeProvider>
  </Provider>,
  document.getElementById('app')
);


text:
package owltools.yaml.golrconfig;

import java.util.ArrayList;

@Deprecated
public class GOlrDynamicField extends GOlrField{

	public ArrayList<String> transform; // The processing steps to apply to that property.

	// Define the defaults for optional fields.
	public GOlrDynamicField (){
		transform = new ArrayList<String>();
	}
}


text:
'use strict';

var ThemeDisplayView = require('./ThemeDisplayView');

var ThemesGalleryView = Backbone.View.extend({
    css: 'gallery',
    events: {
        'mouseover  .theme': 'previewTheme',
        'mouseleave .theme': 'revertTheme',
        'click .load-theme-btn': 'loadTheme'
    },

    className: 'gallery-view',
    currentPreview: 0,

    initialize: function () {
        this.title = "Themes";
    },

    render: function () {
        this.listView = document.createElement('ul');
        this.listView.className = 'theme-gallery';

        var template = [
            '<li class="theme" class="theme-item" id="theme-<%= id %>">',
            '
<%= name %>
',
            '
Designed by <%= designer %>
',
            '
<img src="<%= image %>"><div class="details" id="theme-prev-<%= id %>">Previewing

',
            '<div id="theme-btn-<%= id %>" class="btn load-theme-btn">Load Theme
',
            '
'
        ].join('\n');

        _(themes).each(function (theme, index) {
            if (!theme.name) {
                theme.name = "Theme " + index;
            }
            this.listView.innerHTML += _.template(template, theme);
        }, this);

        $(this.el).append(this.listView);

        return this;
    },

    previewTheme: function (e) {
        var themeId = String(e.currentTarget.id).replace('theme-', '');

        if (this.currentPreview == themeId) return;
        $('.details.active').removeClass('active');
        var url = "/theme/" + themeId + '/sheet.css';
        this.currentPreview = themeId;
        v1.view.iframeProxy.addTempStyleSheet(url, function () {
            $('#theme-prev-' + themeId).addClass('active');
        });
    },

    revertTheme: function () {
        var self = this;
        this.currentPreview = null;
        setTimeout(function () {
            if (self.currentPreview === null) {
                v1.view.iframeProxy.removeTempStyleSheet();
            }
        }, 200);
    },

    loadTheme: function (e) {
        $('.load-theme-btn').html("Load Theme");
        var themeId = e.currentTarget.id.replace('theme-btn-', '');
        e.currentTarget.innerHTML = "Loading";
        e.currentTarget.appendChild(util.threeDots().el);

        $.ajax({
            type: "POST",
            url: '/theme/' + themeId + '/info/',
            success: function (data) {
                var info = data.themeInfo;
                var url = '/app/' + appId + '/uiestate/';
                var newState = uieState;
                newState = _.extend(uieState, this.theme);

                var self = this;
                $.ajax({
                    type: "POST",
                    url: url,
                    data: {
                        uie_state: JSON.stringify(newState)
                    },
                    success: function (data) {
                        e.currentTarget.innerHTML = "Loaded!";
                        //self.$el.find('.load').append('

Loaded!

');
                    }
                });

                /* Load Statics */
                $.ajax({
                    type: "GET",
                    url: '/theme/' + info.id + '/static/',
                    success: function (data) {
                        _(data).each(function (static_file) {
                            $.ajax({
                                type: "POST",
                                url: '/app/' + appId + '/static/',
                                data: JSON.stringify(static_file),
                                success: function (data) {}
                            });
                        });
                    }
                });
            },
            dataType: "JSON"
        });

    }

});

exports.ThemesGalleryView = ThemesGalleryView;


text:
/********* Dependencies *********/
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var path = require('path');
var sass = require('gulp-sass');
var argv = require('yargs').argv;
var inject = require('gulp-inject');

/************* Paths *************/
/* from */
var config_scripts = 'config/scripts/*.js';
var config_styles  = 'config/styles/*.scss';
var config_views   = 'config/views/*.html';

/* to */
var assets_scripts = 'assets/scripts';
var assets_styles  = 'assets/styles';
var assets_views   = 'assets/views';

/************* Tasks *************/
gulp.task('lint', function() {
  return gulp.src('config/scripts/components/*.js')
  .pipe(jshint())
  .pipe(jshint.reporter('default'));
});

/* TODO */

//task to compile script component
gulp.task('compile_script_components', function() {
  return gulp.src('config/scripts/components/' + argv.comp + '/*.js')
  .pipe(concat('script.js'))
  .pipe(gulp.dest('assets/scripts/components/' + argv.comp));
})

  //task to compile style component
  gulp.task('compile_style_components', function() {
    return gulp.src('config/styles/components/' + argv.comp + '/*.scss')
    .pipe(sass())
    .pipe(concat('style.css'))
    .pipe(gulp.dest('assets/styles/components/' + argv.comp));
  })

//task to compile general sass to css
gulp.task('style', function() {
  return gulp.src('config/styles/main.scss')
  .pipe(sass())
  .pipe(concat('phoenixfw.css'))
  .pipe(gulp.dest('dist/src/'));
});

gulp.task('fonts', function() {
  return gulp.src('assets/fonts/**/*')
  .pipe(gulp.dest('dist/fonts'));
});

//task to compile and minify javascript
gulp.task('scripts', function() {
  return gulp.src('config/scripts/*.js')
  .pipe(concat('script.js'))
  .pipe(gulp.dest('assets/scripts/general'))
  .pipe(rename('script.min.js'))
  .pipe(uglify())
  .pipe(gulp.dest('public/scripts'));
});

//html injections
gulp.task('yields', function() {
  return gulp.src('views/' + argv.comp + '.html')
  .pipe(inject(gulp.src('views/components/header.html', {read: false}), {name: 'header'}))
  .pipe(gulp.dest('./'));
})

gulp.task('default', ['style', 'scripts', 'fonts']);


text:
(function(window, document) {
    'use strict';

    /**
     * Component to test module loader
     *
     * @param {AppShellModule} appShell
     * @param {any} args
     */
    function ModuleIdComponent(appShell, args)
    {
        var self = this;

        self.getStyles = getStyles;
        self.getTemplate = getTemplate;
        self.getLocalizedTranslationDictionary = getLocalizedTranslationDictionary;
        self.init = init;
        self.customAction = customAction;

        function getStyles()
        {
            return [
                'https://fonts.googleapis.com/css?family=Roboto',
                'test-module/test-module.component.css'
            ];
        }
        function getTemplate()
        {
            return './test-module/test-module.component.html';
        }
        function getLocalizedTranslationDictionary()
        {
            return {
                'test-module.loaded': 'Loaded ;)',
                'test-module.translation-handled-by-js': 'test-module - Translation'
            };
        }
        /**
         * @param {HtmlDivElement} moduleEl
         */
        function init(moduleEl)
        {
            console.log(args.consoleMessage);
            var element = moduleEl.querySelector("[data-id='translation-handled-by-js']");
            var translater = appShell.getModule(appShell.systemModulesNames.translater);
            element.innerText = translater.translate("test-module.translation-handled-by-js");

        }

        function customAction()
        {
            alert('hello world');
        }
    }

    window.ModuleIdComponent = ModuleIdComponent;

})(window, document);


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace NodeService
{
    public abstract class TransactionOperation
    {
        private TransactionToken _result = null;

        protected TransactionOperation()
        {
        }

        public TransactionOperation(SqlConnection connection, TransactionTokenFactory tokenFactory)
        {
            Connection = connection;
            TokenFactory = tokenFactory;

            ResultTokens = new List<TransactionToken>();
        }

        public SqlConnection Connection
        {
            get;
            protected set;
        }

        public TransactionTokenFactory TokenFactory
        {
            get;
            protected set;
        }

        public List<TransactionToken> ResultTokens
        {
            get;
            set;
        }

        public abstract void ExecuteOperation();
    }
}


text:
/**
 * # Prism
 *
 * This directive will apply Prism highlighing to the element.  This must be applied on a ```<pre>`` tag that has a `````` block within it to work properly.
 *
 * ```html
 *

 * //some code
 *

 * ```
 *
 * @todo: add proper classes to example above
 *
 * @module nag.prism
 * @ngdirective nagPrism
 *
 * @nghtmlattribute {null} nag-prism
 */
angular.module('nag.prism')
.directive('nagPrism', [
  '$timeout',
  function($timeout) {
    return {
      restrict: 'A',
      priority: 0,
      compile: function(tElement, tAttributes, transclude) {
        return {
          pre: function(scope, element, attributes) {},
          post: function(scope, element, attributes) {
            var $element = $(element);

            $timeout(function(){Prism.highlightElement($element.find('code')[0])}, 0);
          }
        }
      }
    }
  }
]);


text:
export { default as diff } from './diff'
export {
  Any,
  NullableConstructor as Nullable,
  OptionalConstructor as Optional
} from './helpers'


text:
package com.github.dsaouda.fiap.webservice.transportadora.client.model;

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

@XmlRootElement(name="calculaFreteResponse")
@XmlAccessorType(XmlAccessType.FIELD)
public class CalcularFreteResponse {

	private String valorTotalFrete;

	public String getValorTotalFrete() {
		return valorTotalFrete;
	}

	public void setValorTotalFrete(String valorTotalFrete) {
		this.valorTotalFrete = valorTotalFrete;
	}
}


text:
<?php

$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */

$installer->startSetup();

$installer->addAttribute('catalog_product', 'links_exist', array(
        'type'                      => 'int',
        'backend'                   => '',
        'frontend'                  => '',
        'label'                     => '',
        'input'                     => '',
        'class'                     => '',
        'source'                    => '',
        'global'                    => true,
        'visible'                   => false,
        'required'                  => false,
        'user_defined'              => false,
        'default'                   => '0',
        'searchable'                => false,
        'filterable'                => false,
        'comparable'                => false,
        'visible_on_front'          => false,
        'unique'                    => false,
        'apply_to'                  => 'downloadable',
        'is_configurable'           => false,
        'used_in_product_listing'   => 1
    ));

$newAttributeId = $installer->getAttributeId('catalog_product', 'links_exist');
$entityTypeId = $installer->getEntityTypeId('catalog_product');
$newAttributeTable = $installer->getAttributeTable($entityTypeId, 'links_exist');

$defaultValue = 1;
$installer->run("
INSERT INTO `{$newAttributeTable}`
    (entity_id, entity_type_id, attribute_id, value)
     SELECT distinct product_id,
        '{$entityTypeId}' AS entity_type_id,
        '{$newAttributeId}' AS attribute_id,
        '{$defaultValue}' AS value
    FROM `{$installer->getTable('downloadable/link')}`
");

$installer->endSetup();


text:
<?php

namespace Drupal\state_machine\Guard;

/**
 * Defines the interface for guard factories.
 */
interface GuardFactoryInterface {

 /**
   * Gets the instantiated guards for the given group id.
   *
   * @param string $group_id
   *   The group id.
   *
   * @return \Drupal\state_machine\Guard\GuardInterface[]
   */
  public function get($group_id);

}


text:
from vint.ast.node_type import NodeType
from vint.linting.level import Level
from vint.linting.policy.abstract_policy import AbstractPolicy
from vint.linting.policy_registry import register_policy
from vint.ast.plugin.scope_plugin import ExplicityOfScopeVisibility

@register_policy
class ProhibitImplicitScopeVariable(AbstractPolicy):
    def __init__(self):
        super(ProhibitImplicitScopeVariable, self).__init__()
        self.reference = 'Anti-pattern of vimrc (Scope of identifier)'
        self.level = Level.STYLE_PROBLEM

    def listen_node_types(self):
        return [NodeType.IDENTIFIER]

    def is_valid(self, identifier, lint_context):
        """ Whether the identifier has a scope prefix. """

        scope_plugin = lint_context['plugins']['scope']
        explicity = scope_plugin.get_explicity_of_scope_visibility(identifier)

        is_valid = (scope_plugin.is_function_identifier(identifier) or
                    explicity is not ExplicityOfScopeVisibility.IMPLICIT)

        if not is_valid:
            self._make_description(identifier, scope_plugin)

        return is_valid

    def _make_description(self, identifier, scope_plugin):
        self.description = 'Make the scope explicit like `{good_example}`'.format(
            good_example=scope_plugin.normalize_variable_name(identifier)
        )


text:
package com.seven.game.game_objects.interactions;

import com.seven.game.game_objects.IGameObject;
import com.seven.game.game_world.IKepper;

import java.util.List;

public interface IMove {
    void moveUp(String direction, IKepper kepper);
    void moveDown(String direction, IKepper kepper);
    void moveLeft(String direction, IKepper kepper);
    void moveRight(String direction, IKepper kepper);

    IGameObject checkCollision(String direction, List<IGameObject> gameObjectList);
}


text:
"use strict";
function processDesignAttributes(_, __, node, attributes, ___) {
    var prefix = 'material-'; // TODO: get this from somewhere
    var length = prefix.length;
    for (var i = 0, ii = attributes.length; i < ii; ++i) {
        var current = attributes[i];
        if (current.name.indexOf(prefix) === 0) {
            var realName = current.name.substring(length);
            node.setAttribute(realName, current.value);
        }
    }
    return true;
}
exports.processDesignAttributes = processDesignAttributes;


text:
//
// Sphere.h - Created on 2008.12.05
//

#ifndef _SPHERE_H_
#define  _SPHERE_H_

#include "Geometry.h"

class Sphere : public Geometry
{
public:
	Sphere(const double radius);

	Sphere(const Sphere& sphere) : Geometry(sphere)
	{
		m_radius = sphere.m_radius;
		m_radiusSqFixed = sphere.m_radiusSqFixed;
	}

	double getRadius() const {return m_radius;}

	// Check equality
	bool operator==(const Sphere& right) const
	{
		return (m_radius == right.m_radius);
	};

	// Assign
	Sphere& operator=(const Sphere& right)
	{
		if (this == &right) return *this;
		Geometry::operator=(right);
		m_radius = right.m_radius;
		m_radiusSqFixed = right.m_radiusSqFixed;
		return *this;
	};

	bool intersects(const Ray& ray, double& t) const;

	/// Checks if a ray intersects the sphere.
	/// \param ray	Ray to be checked for intersections.
	/// \param t	If an intersection takes place the minor t to solve the
	///				parametric equation of the ray for the intersection point is
	///				stored.
	/// \return	\b true if the ray intersects the sphere, \b false otherwise.
	bool checkIntersection(const Ray& ray, Vector& N, double& t) const;

private:
	double m_radius;
	double m_radiusSqFixed;

	/// \param point	Point on the sphere surface.
	/// \return			Normal vector at the given point.
	Vector surfaceNormalAt(const Point& point) const
	{
		return Vector(point / m_radius);
	}
};

#endif /*  _SPHERE_H_ */


text:
<!doctype html>

	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>Company | connectwise-rest-api</title>
	<meta name="description" content="">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">

						Search
						<input id="tsd-search-field" type="text" />

Preparing search index...

The search index is not available

					connectwise-rest-api

						Options

								All

Public

Public/Protected

All

							<input type="checkbox" id="tsd-filter-inherited" checked />
							Inherited
							<input type="checkbox" id="tsd-filter-externals" checked />
							Externals
							<input type="checkbox" id="tsd-filter-only-exported" />
							Only exported

					Menu

					Globals

					"api/api"

					Company

Interface Company

Hierarchy

						Company

Index

Properties

account<wbr>Number

address<wbr>Line1

address<wbr>Line2

annual<wbr>Revenue

bill<wbr>ToCompany

billing<wbr>Contact

billing<wbr>Site

billing<wbr>Terms

calendar<wbr>Id

city

company<wbr>Entity<wbr>Type

country

currency

custom<wbr>Fields

date<wbr>Acquired

date<wbr>Deleted

default<wbr>Contact

deleted<wbr>By

deleted<wbr>Flag

facebook<wbr>Url

fax<wbr>Number

id

identifier

info

invoiceCCEmail<wbr>Address

invoice<wbr>Delivery<wbr>Method

invoice<wbr>Template

invoice<wbr>ToEmail<wbr>Address

lead<wbr>Flag

lead<wbr>Source

linked<wbr>InUrl

market<wbr>Id

mobile<wbr>Guid

name

number<wbr>OfEmployees

ownership<wbr>Type

parent<wbr>Company

phone<wbr>Number

pricing<wbr>Schedule

sic<wbr>Code

state

status

tax<wbr>Code

tax<wbr>Identifier

territory<wbr>Id

territory<wbr>Manager

time<wbr>Zone

twitter<wbr>Url

type

unsubscribe<wbr>Flag

user<wbr>Defined<wbr>Field1

user<wbr>Defined<wbr>Field10

user<wbr>Defined<wbr>Field2

user<wbr>Defined<wbr>Field3

user<wbr>Defined<wbr>Field4

user<wbr>Defined<wbr>Field5

user<wbr>Defined<wbr>Field6

user<wbr>Defined<wbr>Field7

user<wbr>Defined<wbr>Field8

user<wbr>Defined<wbr>Field9

vendor<wbr>Identifier

website

zip

Properties

Optional account<wbr>Number

account<wbr>Number: string

Defined in api/api.ts:1779

Optional address<wbr>Line1

address<wbr>Line1: string

Defined in api/api.ts:1748

At least one address field is required -- addressLine1, addressLine2, city, state, zip and/or country

Optional address<wbr>Line2

address<wbr>Line2: string

Defined in api/api.ts:1753

At least one address field is required -- addressLine1, addressLine2, city, state, zip and/or country

Optional annual<wbr>Revenue

annual<wbr>Revenue: number

Defined in api/api.ts:1784

Optional bill<wbr>ToCompany

bill<wbr>ToCompany: CompanyReference

Defined in api/api.ts:1821

Optional billing<wbr>Contact

billing<wbr>Contact: ContactReference

Defined in api/api.ts:1823

Optional billing<wbr>Site

billing<wbr>Site: SiteReference

Defined in api/api.ts:1822

Optional billing<wbr>Terms

billing<wbr>Terms: BillingTermsReference

Defined in api/api.ts:1813

Optional calendar<wbr>Id

calendar<wbr>Id: number

Defined in api/api.ts:1795

Optional city

city: string

Defined in api/api.ts:1758

At least one address field is required -- addressLine1, addressLine2, city, state, zip and/or country

Optional company<wbr>Entity<wbr>Type

company<wbr>Entity<wbr>Type: EntityTypeReference

Defined in api/api.ts:1820

Based on CompanyEntityType Report

Optional country

country: CountryReference

Defined in api/api.ts:1773

At least one address field is required -- addressLine1, addressLine2, city, state, zip and/or country

Optional currency

currency: CurrencyReference

Defined in api/api.ts:1834

Optional custom<wbr>Fields

custom<wbr>Fields: Array<CustomFieldValue>

Defined in api/api.ts:1841

Optional date<wbr>Acquired

date<wbr>Acquired: Date

Defined in api/api.ts:1781

Optional date<wbr>Deleted

date<wbr>Deleted: Date

Defined in api/api.ts:1828

Optional default<wbr>Contact

default<wbr>Contact: ContactReference

Defined in api/api.ts:1780

Optional deleted<wbr>By

deleted<wbr>By: string

Defined in api/api.ts:1829

Optional deleted<wbr>Flag

deleted<wbr>Flag: boolean

Defined in api/api.ts:1827

Optional facebook<wbr>Url

facebook<wbr>Url: string

Defined in api/api.ts:1831

Optional fax<wbr>Number

fax<wbr>Number: string

Defined in api/api.ts:1775

Optional id

id: number

Defined in api/api.ts:1739

identifier

identifier: string

Defined in api/api.ts:1740

Optional info

info: Metadata

Defined in api/api.ts:1840

Metadata of the entity

Optional invoiceCCEmail<wbr>Address

invoiceCCEmail<wbr>Address: string

Defined in api/api.ts:1826

Optional invoice<wbr>Delivery<wbr>Method

invoice<wbr>Delivery<wbr>Method: BillingDeliveryReference

Defined in api/api.ts:1824

Optional invoice<wbr>Template

invoice<wbr>Template: InvoiceTemplateReference

Defined in api/api.ts:1814

Optional invoice<wbr>ToEmail<wbr>Address

invoice<wbr>ToEmail<wbr>Address: string

Defined in api/api.ts:1825

Optional lead<wbr>Flag

lead<wbr>Flag: boolean

Defined in api/api.ts:1793

Optional lead<wbr>Source

lead<wbr>Source: string

Defined in api/api.ts:1792

Optional linked<wbr>InUrl

linked<wbr>InUrl: string

Defined in api/api.ts:1833

Optional market<wbr>Id

market<wbr>Id: number

Defined in api/api.ts:1778

Optional mobile<wbr>Guid

mobile<wbr>Guid: Guid

Defined in api/api.ts:1830

name

name: string

Defined in api/api.ts:1741

Optional number<wbr>OfEmployees

number<wbr>OfEmployees: number

Defined in api/api.ts:1785

Optional ownership<wbr>Type

ownership<wbr>Type: OwnershipTypeReference

Defined in api/api.ts:1786

Optional parent<wbr>Company

parent<wbr>Company: CompanyReference

Defined in api/api.ts:1783

Optional phone<wbr>Number

phone<wbr>Number: string

Defined in api/api.ts:1774

Optional pricing<wbr>Schedule

pricing<wbr>Schedule: PricingScheduleReference

Defined in api/api.ts:1815

Optional sic<wbr>Code

sic<wbr>Code: SicCodeReference

Defined in api/api.ts:1782

Optional state

state: string

Defined in api/api.ts:1763

At least one address field is required -- addressLine1, addressLine2, city, state, zip and/or country

Optional status

status: CompanyStatusReference

Defined in api/api.ts:1742

Optional tax<wbr>Code

tax<wbr>Code: TaxCodeReference

Defined in api/api.ts:1812

New companies will be created with the default tax code unless otherwise specified.

Optional tax<wbr>Identifier

tax<wbr>Identifier: string

Defined in api/api.ts:1807

Optional territory<wbr>Id

territory<wbr>Id: number

Defined in api/api.ts:1777

Optional territory<wbr>Manager

territory<wbr>Manager: MemberReference

Defined in api/api.ts:1835

Optional time<wbr>Zone

time<wbr>Zone: TimeZoneSetupReference

Defined in api/api.ts:1791

The specified system time zone for the Company

Optional twitter<wbr>Url

twitter<wbr>Url: string

Defined in api/api.ts:1832

Optional type

type: CompanyTypeReference

Defined in api/api.ts:1743

Optional unsubscribe<wbr>Flag

unsubscribe<wbr>Flag: boolean

Defined in api/api.ts:1794

Optional user<wbr>Defined<wbr>Field1

user<wbr>Defined<wbr>Field1: string

Defined in api/api.ts:1796

Optional user<wbr>Defined<wbr>Field10

user<wbr>Defined<wbr>Field10: string

Defined in api/api.ts:1805

Optional user<wbr>Defined<wbr>Field2

user<wbr>Defined<wbr>Field2: string

Defined in api/api.ts:1797

Optional user<wbr>Defined<wbr>Field3

user<wbr>Defined<wbr>Field3: string

Defined in api/api.ts:1798

Optional user<wbr>Defined<wbr>Field4

user<wbr>Defined<wbr>Field4: string

Defined in api/api.ts:1799

Optional user<wbr>Defined<wbr>Field5

user<wbr>Defined<wbr>Field5: string

Defined in api/api.ts:1800

Optional user<wbr>Defined<wbr>Field6

user<wbr>Defined<wbr>Field6: string

Defined in api/api.ts:1801

Optional user<wbr>Defined<wbr>Field7

user<wbr>Defined<wbr>Field7: string

Defined in api/api.ts:1802

Optional user<wbr>Defined<wbr>Field8

user<wbr>Defined<wbr>Field8: string

Defined in api/api.ts:1803

Optional user<wbr>Defined<wbr>Field9

user<wbr>Defined<wbr>Field9: string

Defined in api/api.ts:1804

Optional vendor<wbr>Identifier

vendor<wbr>Identifier: string

Defined in api/api.ts:1806

Optional website

website: string

Defined in api/api.ts:1776

Optional zip

zip: string

Defined in api/api.ts:1768

At least one address field is required -- addressLine1, addressLine2, city, state, zip and/or country

						Globals

						"api/api"

						"api/assign"

						"connectwise"

						Company

								account<wbr>Number

								address<wbr>Line1

								address<wbr>Line2

								annual<wbr>Revenue

								bill<wbr>ToCompany

								billing<wbr>Contact

								billing<wbr>Site

								billing<wbr>Terms

								calendar<wbr>Id

								city

								company<wbr>Entity<wbr>Type

								country

								currency

								custom<wbr>Fields

								date<wbr>Acquired

								date<wbr>Deleted

								default<wbr>Contact

								deleted<wbr>By

								deleted<wbr>Flag

								facebook<wbr>Url

								fax<wbr>Number

								id

								identifier

								info

								invoiceCCEmail<wbr>Address

								invoice<wbr>Delivery<wbr>Method

								invoice<wbr>Template

								invoice<wbr>ToEmail<wbr>Address

								lead<wbr>Flag

								lead<wbr>Source

								linked<wbr>InUrl

								market<wbr>Id

								mobile<wbr>Guid

								name

								number<wbr>OfEmployees

								ownership<wbr>Type

								parent<wbr>Company

								phone<wbr>Number

								pricing<wbr>Schedule

								sic<wbr>Code

								state

								status

								tax<wbr>Code

								tax<wbr>Identifier

								territory<wbr>Id

								territory<wbr>Manager

								time<wbr>Zone

								twitter<wbr>Url

								type

								unsubscribe<wbr>Flag

								user<wbr>Defined<wbr>Field1

								user<wbr>Defined<wbr>Field10

								user<wbr>Defined<wbr>Field2

								user<wbr>Defined<wbr>Field3

								user<wbr>Defined<wbr>Field4

								user<wbr>Defined<wbr>Field5

								user<wbr>Defined<wbr>Field6

								user<wbr>Defined<wbr>Field7

								user<wbr>Defined<wbr>Field8

								user<wbr>Defined<wbr>Field9

								vendor<wbr>Identifier

								website

								zip

Legend

Module

Object literal

Variable

Function

Function with type parameter

Index signature

Type alias

Enumeration

Enumeration member

Property

Method

Interface

Interface with type parameter

Constructor

Property

Method

Index signature

Class

Class with type parameter

Constructor

Property

Method

Accessor

Index signature

Inherited constructor

Inherited property

Inherited method

Inherited accessor

Protected property

Protected method

Protected accessor

Private property

Private method

Private accessor

Static property

Static method

Generated using TypeDoc


text:
using System;
using System.Collections.Generic;
using System.Linq;

namespace Azure.IoT.DeviceUpdate.Models
{
    /// <summary> Import update input metadata. </summary>
    public partial class ImportUpdateInput
    {
        /// <summary> Initializes a new instance of ImportUpdateInput. </summary>
        /// <param name="importManifest"> Import manifest metadata like source URL, file size/hashes, etc. </param>
        /// <param name="files"> One or more update file properties like filename and source URL. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="importManifest"/> or <paramref name="files"/> is null. </exception>
        public ImportUpdateInput(ImportManifestMetadata importManifest, IEnumerable<FileImportMetadata> files)
        {
            if (importManifest == null)
            {
                throw new ArgumentNullException(nameof(importManifest));
            }
            if (files == null)
            {
                throw new ArgumentNullException(nameof(files));
            }

            ImportManifest = importManifest;
            Files = files.ToList();
        }

        /// <summary> Import manifest metadata like source URL, file size/hashes, etc. </summary>
        public ImportManifestMetadata ImportManifest { get; }
        /// <summary> One or more update file properties like filename and source URL. </summary>
        public IList<FileImportMetadata> Files { get; }
    }
}


text:
ENT.Type = "anim"
ENT.Base = "base_gmodentity"
ENT.PrintName = "Gun Vault"
ENT.Author = "HLTV Proxy"
ENT.Spawnable = false
ENT.AdminSpawnable = false


text:
from datetime import date, datetime
from os.path import join, split
from uuid import uuid4

from django import forms
from django.forms.extras import SelectDateWidget
from django.core.files.storage import FileSystemStorage
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _

from forms_builder.forms import fields
from forms_builder.forms.models import FormEntry, FieldEntry
from forms_builder.forms import settings

fs = FileSystemStorage(location=settings.UPLOAD_ROOT)

FILTER_CHOICE_CONTAINS = "1"
FILTER_CHOICE_DOESNT_CONTAIN = "2"
FILTER_CHOICE_EQUALS = "3"
FILTER_CHOICE_DOESNT_EQUAL = "4"
FILTER_CHOICE_BETWEEN = "5"

TEXT_FILTER_CHOICES = (
    ("", _("Nothing")),
    (FILTER_CHOICE_CONTAINS, _("Contains")),
    (FILTER_CHOICE_DOESNT_CONTAIN, _("Doesn't contain")),
    (FILTER_CHOICE_EQUALS, _("Equals")),
    (FILTER_CHOICE_DOESNT_EQUAL, _("Doesn't equal")),
)

CHOICE_FILTER_CHOICES = (
    ("", _("Nothing")),
    (FILTER_CHOICE_EQUALS, _("Equals")),
    (FILTER_CHOICE_DOESNT_EQUAL, _("Doesn't equal")),
)

DATE_FILTER_CHOICES = (
    ("", _("Nothing")),
    (FILTER_CHOICE_BETWEEN, _("Is between")),
)

FILTER_FUNCS = {
    FILTER_CHOICE_CONTAINS:
        lambda val, field: val.lower() in field.lower(),
    FILTER_CHOICE_DOESNT_CONTAIN:
        lambda val, field: val.lower() not in field.lower(),
    FILTER_CHOICE_EQUALS:
        lambda val, field: val.lower() == field.lower(),
    FILTER_CHOICE_DOESNT_EQUAL:
        lambda val, field: val.lower() != field.lower(),
    FILTER_CHOICE_BETWEEN:
        lambda val_from, val_to, field: val_from <= field <=  val_to
}

text_filter_field = forms.ChoiceField(label=" ", required=False,
                                      choices=TEXT_FILTER_CHOICES)
choice_filter_field = forms.ChoiceField(label=" ", required=False,
                                        choices=CHOICE_FILTER_CHOICES)
date_filter_field = forms.ChoiceField(label=" ", required=False,
                                      choices=DATE_FILTER_CHOICES)

class FormForForm(forms.ModelForm):

    class Meta:
        model = FormEntry
        exclude = ("form", "entry_time")

    def __init__(self, form, *args, **kwargs):
        """
        Dynamically add each of the form fields for the given form model
        instance and its related field model instances.
        """
        self.form = form
        self.form_fields = form.fields.visible()
        super(FormForForm, self).__init__(*args, **kwargs)
        for field in self.form_fields:
            field_key = "field_%s" % field.id
            field_class = fields.CLASSES[field.field_type]
            field_widget = fields.WIDGETS.get(field.field_type)
            field_args = {"label": field.label, "required": field.required,
                          "help_text": field.help_text}
            arg_names = field_class.__init__.im_func.func_code.co_varnames
            if "max_length" in arg_names:
                field_args["max_length"] = settings.FIELD_MAX_LENGTH
            if "choices" in arg_names:
                field_args["choices"] = field.get_choices()
            if field_widget is not None:
                field_args["widget"] = field_widget
            self.initial[field_key] = field.default
            self.fields[field_key] = field_class(**field_args)
            # Add identifying CSS classes to the field.
            css_class = field_class.__name__.lower()
            if field.required:
                css_class += " required"
                if (settings.USE_HTML5 and
                    field.field_type != fields.CHECKBOX_MULTIPLE):
                    self.fields[field_key].widget.attrs["required"] = ""
            self.fields[field_key].widget.attrs["class"] = css_class
            if field.placeholder_text and not field.default:
                text = field.placeholder_text
                self.fields[field_key].widget.attrs["placeholder"] = text

    def save(self, **kwargs):
        """
        Create a FormEntry instance and related FieldEntry instances for each
        form field.
        """
        entry = super(FormForForm, self).save(commit=False)
        entry.form = self.form
        entry.entry_time = datetime.now()
        entry.save()
        for field in self.form_fields:
            field_key = "field_%s" % field.id
            value = self.cleaned_data[field_key]
            if value and self.fields[field_key].widget.needs_multipart_form:
                value = fs.save(join("forms", str(uuid4()), value.name), value)
            if isinstance(value, list):
                value = ", ".join([v.strip() for v in value])
            if value:
                entry.fields.create(field_id=field.id, value=value)
        return entry

    def email_to(self):
        """
        Return the value entered for the first field of type EmailField.
        """
        for field in self.form_fields:
            if field.is_a(fields.EMAIL):
                return self.cleaned_data["field_%s" % field.id]
        return None

class EntriesForm(forms.Form):
    """
    Form with a set of fields dynamically assigned that can be used to
    filter entries for the given ``forms.models.Form`` instance.
    """

    def __init__(self, form, request, *args, **kwargs):
        """
        Iterate through the fields of the ``forms.models.Form`` instance and
        create the form fields required to control including the field in
        the export (with a checkbox) or filtering the field which differs
        across field types. User a list of checkboxes when a fixed set of
        choices can be chosen from, a pair of date fields for date ranges,
        and for all other types provide a textbox for text search.
        """
        self.form = form
        self.request = request
        self.form_fields = form.fields.all()
        self.entry_time_name = unicode(FormEntry._meta.get_field(
            "entry_time").verbose_name).encode("utf-8")
        super(EntriesForm, self).__init__(*args, **kwargs)
        for field in self.form_fields:
            field_key = "field_%s" % field.id
            # Checkbox for including in export.
            self.fields["%s_export" % field_key] = forms.BooleanField(
                label=field.label, initial=True, required=False)
            if field.is_a(*fields.CHOICES):
                # A fixed set of choices to filter by.
                if field.is_a(fields.CHECKBOX):
                    choices = ((True, _("Checked")), (False, _("Not checked")))
                else:
                    choices = field.get_choices()
                contains_field = forms.MultipleChoiceField(label=" ",
                    choices=choices, widget=forms.CheckboxSelectMultiple(),
                    required=False)
                self.fields["%s_filter" % field_key] = choice_filter_field
                self.fields["%s_contains" % field_key] = contains_field
            elif field.is_a(*fields.DATES):
                # A date range to filter by.
                self.fields["%s_filter" % field_key] = date_filter_field
                self.fields["%s_from" % field_key] = forms.DateField(
                    label=" ", widget=SelectDateWidget(), required=False)
                self.fields["%s_to" % field_key] = forms.DateField(
                    label=_("and"), widget=SelectDateWidget(), required=False)
            else:
                # Text box for search term to filter by.
                contains_field = forms.CharField(label=" ", required=False)
                self.fields["%s_filter" % field_key] = text_filter_field
                self.fields["%s_contains" % field_key] = contains_field
        # Add ``FormEntry.entry_time`` as a field.
        field_key = "field_0"
        self.fields["%s_export" % field_key] = forms.BooleanField(initial=True,
            label=FormEntry._meta.get_field("entry_time").verbose_name,
            required=False)
        self.fields["%s_filter" % field_key] = date_filter_field
        self.fields["%s_from" % field_key] = forms.DateField(
            label=" ", widget=SelectDateWidget(), required=False)
        self.fields["%s_to" % field_key] = forms.DateField(
            label=_("and"), widget=SelectDateWidget(), required=False)

    def __iter__(self):
        """
        Yield pairs of include checkbox / filters for each field.
        """
        for field_id in [f.id for f in self.form_fields] + [0]:
            prefix = "field_%s_" % field_id
            fields = [f for f in super(EntriesForm, self).__iter__()
                      if f.name.startswith(prefix)]
            yield fields[0], fields[1], fields[2:]

    def columns(self):
        """
        Returns the list of selected column names.
        """
        fields = [f.label.encode("utf-8") for f in self.form_fields
                  if self.cleaned_data["field_%s_export" % f.id]]
        if self.cleaned_data["field_0_export"]:
            fields.append(self.entry_time_name.encode("utf-8"))
        return fields

    def rows(self, csv=False):
        """
        Returns each row based on the selected criteria.
        """

        # Store the index of each field against its ID for building each
        # entry row with columns in the correct order. Also store the IDs of
        # fields with a type of FileField or Date-like for special handling of
        # their values.
        field_indexes = {}
        file_field_ids = []
        date_field_ids = []
        for field in self.form_fields:
            if self.cleaned_data["field_%s_export" % field.id]:
                field_indexes[field.id] = len(field_indexes)
                if field.is_a(fields.FILE):
                    file_field_ids.append(field.id)
                elif field.is_a(*fields.DATES):
                    date_field_ids.append(field.id)
        num_columns = len(field_indexes)
        include_entry_time = self.cleaned_data["field_0_export"]
        if include_entry_time:
            num_columns += 1

        # Get the field entries for the given form and filter by entry_time
        # if specified.
        field_entries = FieldEntry.objects.filter(entry__form=self.form
            ).order_by("-entry__id").select_related(depth=1)
        if self.cleaned_data["field_0_filter"] == FILTER_CHOICE_BETWEEN:
            time_from = self.cleaned_data["field_0_from"]
            time_to = self.cleaned_data["field_0_to"]
            if time_from and time_to:
                field_entries = field_entries.filter(
                    entry__entry_time__range=(time_from, time_to))

        # Loop through each field value ordered by entry, building up each
        # entry as a row. Use the ``valid_row`` flag for marking a row as
        # invalid if it fails one of the filtering criteria specified.
        current_entry = None
        current_row = None
        valid_row = True
        for field_entry in field_entries:
            if field_entry.entry_id != current_entry:
                # New entry, write out the current row and start a new one.
                if valid_row and current_row is not None:
                    if not csv:
                        current_row.insert(0, current_entry)
                    yield current_row
                current_entry = field_entry.entry_id
                current_row = [""] * num_columns
                valid_row = True
                if include_entry_time:
                    current_row[-1] = field_entry.entry.entry_time
            field_value = field_entry.value
            # Check for filter.
            field_id = field_entry.field_id
            filter_type = self.cleaned_data.get("field_%s_filter" % field_id)
            filter_args = None
            if filter_type:
                if filter_type == FILTER_CHOICE_BETWEEN:
                    f, t = "field_%s_from" % field_id, "field_%s_to" % field_id
                    filter_args = [self.cleaned_data[f], self.cleaned_data[t]]
                    if filter_args[0] is None or filter_args[1] is None:
                        filter_args = None
                else:
                    field_name = "field_%s_contains" % field_id
                    filter_args = self.cleaned_data[field_name]
                    if filter_args:
                        filter_args = [filter_args]
            if filter_args:
                filter_func = FILTER_FUNCS[filter_type]
                if isinstance(filter_args[0], list):
                    # Criteria is from a range of checkboxes.
                    for arg in filter_args[0]:
                        if filter_func(arg, field_value):
                            break
                    else:
                        valid_row = False
                else:
                    # Convert dates before checking filter.
                    if field_id in date_field_ids:
                        y, m, d = field_value.split(" ")[0].split("-")
                        dte = date(int(y), int(m), int(d))
                        filter_args.append(dte)
                    else:
                        filter_args.append(field_value)
                    if not filter_func(*filter_args):
                        valid_row = False
            # Create download URL for file fields.
            if field_id in file_field_ids:
                url = reverse("admin:form_file", args=(field_entry.id,))
                field_value = self.request.build_absolute_uri(url)
                if not csv:
                    parts = (field_value, split(field_entry.value)[1])
                    field_value = mark_safe("%s" % parts)
            # Only use values for fields that were selected.
            try:
                current_row[field_indexes[field_id]] = field_value.encode("utf-8")
            except KeyError:
                pass
        # Output the final row.
        if valid_row and current_row is not None:
            if not csv:
                current_row.insert(0, current_entry)
            yield current_row


text:
package com.dubreuia.integration;

public class Class {

    public static void canBeStatic() {

    }

    public void method() {
        canBeStatic();
    }

}


text:
Cisco AXL API Client Library for .NET
AXL schema version 10.0
Get NuGet package: https://www.nuget.org/packages/AXL.NET
More info: https://developer.cisco.com/site/axl/overview
Example usage:
```c#
// Add user
var addUserResult =
  await axlClient.ExecuteAsync(async client =>
  {
    var userId = Guid.NewGuid().ToString();
    var request = new AddUserReq
    {
      user = new XUser
      {
        userid = userId,
        userIdentity = userId,
        password = "P@ssw0rd",
        firstName = "test",
        lastName = "test"
      }
    };
    var response = await client.addUserAsync(request);
    return response.addUserResponse1.@return;
});

// Get users
var usersResult =
  await axlClient.ExecuteAsync(async client =>
  {
      var request = new ListUserReq
      {
          returnedTags = new LUser { firstName = string.Empty },
          searchCriteria = new ListUserReqSearchCriteria {firstName = "%"}
      };
      var response = await client.listUserAsync(request);
      return response.listUserResponse1.@return.Select(u => u.firstName).ToList();
  });
```


text:
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2015 Antonio Leiva
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="172dp"
        android:background="@drawable/drawer_background"
        android:orientation="vertical"
        android:paddingTop="@dimen/status_bar_height"
        android:theme="@style/ThemeOverlay.AppCompat.Dark">

        <ImageView
            android:id="@+id/avatar"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_margin="@dimen/spacing_large"
            android:contentDescription="@string/profile_image"
            android:elevation="4dp"
            android:src="@drawable/img_placeholder"
            tools:src="@drawable/ic_launcher" />

        <TextView
            android:id="@+id/user_display_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:layout_marginStart="@dimen/spacing_large"
            android:layout_marginLeft="@dimen/spacing_large"
            android:layout_marginBottom="@dimen/spacing_large"
            android:textAppearance="@style/TextAppearance.AppCompat.Body1"
            tools:text="Username" />
    </RelativeLayout>
</layout>


text:
// Pour plus d'informations sur le modèle d'élément Page vierge, consultez la page http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409

namespace AptkAma.Sample.Uwp
{
    /// <summary>
    /// Une page vide peut être utilisée seule ou constituer une page de destination au sein d'un frame.
    /// </summary>
    public sealed partial class MainPage
    {
        public MainPage()
        {
            this.InitializeComponent();

            this.LoadApplication(new AptkAma.Sample.Core.App());
        }
    }
}


text:
<?php

namespace Omnipay\Curopayments\Message;

use Omnipay\Common\Message\AbstractRequest as OmnipayRequest;

/**
 * Curopayments Abstract Request
 * @package Omnipay\Curopayments\Message
 */
abstract class AbstractRequest extends OmnipayRequest
{
    /**
     * @var string
     */
    public $endpoint = 'https://gateway.cardgateplus.com/';

    /**
     * @var string
     */
    private $returnUrlFailed = '';

    /**
     * @param string $value
     *
     * @return $this
     */
    public function setReturnUrlFailed($value)
    {
        $this->returnUrlFailed = $value;
    }

    /**
     * @return mixed
     */
    public function getReturnUrlFailed()
    {
        return $this->returnUrlFailed ?: $this->getReturnUrl();
    }

    /**
     * @return mixed
     */
    public function getSiteId()
    {
        return $this->getParameter('siteId');
    }

    /**
     * @param string $value
     *
     * @return $this
     */
    public function setSiteId($value)
    {
        return $this->setParameter('siteId', $value);
    }

    /**
     * @return mixed
     */
    public function getSecretKey()
    {
        return $this->getParameter('secretKey');
    }

    /**
     * @param string $value
     *
     * @return $this
     */
    public function setSecretKey($value)
    {
        return $this->setParameter('secretKey', $value);
    }

    /**
     * @return mixed
     */
    public function getRef()
    {
        return $this->getParameter('ref');
    }

    /**
     * @param string $value
     *
     * @return $this
     */
    public function setRef($value)
    {
        return $this->setParameter('ref', $value);
    }

    /**
     * @return mixed
     */
    public function getLanguage()
    {
        return $this->getParameter('language');
    }

    /**
     * @param string $value
     *
     * @return $this
     */
    public function setLanguage($value)
    {
        return $this->setParameter('language', $value);
    }

    /**
     * @return array
     * @throws \Omnipay\Common\Exception\InvalidRequestException
     */
    public function getData()
    {
        $this->validate('siteId', 'secretKey', 'amount', 'ref');

        $data = [];
        $data['ref'] = $this->getRef();
        $data['language'] = $this->getLanguage();
        $data['siteid'] = $this->getSiteId();
        $data['amount'] = $this->getAmountInteger();
        $data['currency'] = $this->getCurrency();
        $data['description'] = $this->getDescription();
        $data['return_url'] = $this->getReturnUrl();
        $data['return_url_failed'] = $this->getReturnUrlFailed();
        $data['language'] = $this->getLanguage();
        $data['ip_address'] = $this->getClientIp();
        $data['test'] = (int) $this->getTestMode();

        return $data;
    }

    /**
     * Generate a signature for outoing requests
     */
    public function generateSignature()
    {
        return md5(
            ($this->getTestMode() ? 'TEST' : '')
            . $this->getSiteId()
            . $this->getAmountInteger()
            . $this->getRef()
            . $this->getSecretKey()
        );
    }

    /**
     * @param mixed $data
     *
     * @return PurchaseResponse
     */
    public function sendData($data)
    {
        $data['hash'] = $this->generateSignature();

        return new PurchaseResponse($this, $data);
    }

    /**
     * @return string
     */
    public function getEndpoint()
    {
        return $this->endpoint;
    }
}


text:
#import "WATokenFieldView.h"

#import "WATokenView.h"
#import "WASearchTextField.h"

#import <QuartzCore/QuartzCore.h>

@interface WATokenFieldScrollView : UIScrollView

@end

@implementation WATokenFieldScrollView

- (BOOL)touchesShouldCancelInContentView:(UIView *)__unused view
{
    return true;
}

- (void)scrollRectToVisible:(CGRect)__unused rect animated:(BOOL)__unused animated
{
}

@end

@interface WATokenFieldView () <UITextFieldDelegate, UIKeyInput>

@property (nonatomic, strong) NSMutableDictionary *tokenAnimations;

@property (nonatomic, strong) NSMutableArray *tokenList;
@property (nonatomic, strong) WASearchTextField *textField;

@property (nonatomic) int currentNumberOfLines;

@property (nonatomic, strong) UIView *shadowView;

@property (nonatomic, strong) UIColor *separatorColor;
@property (nonatomic, strong) UIColor *placeholderColor;
@property (nonatomic, strong) UIColor *textColor;
@property (nonatomic, strong) UIFont *textFieldFont;
@property (nonatomic, strong) UIColor *tagHighlightColor;

@property (nonatomic) float lineHeight;
@property (nonatomic) float linePadding;
@property (nonatomic) float lineSpacing;
@property (nonatomic) int maxNumberOfLines;

@end

@implementation WATokenFieldView

-(instancetype)initWithTextColor:(UIColor*)paramTextColor
                placeholderColor:(UIColor*)paramPlaceholderColor
                  separatorColor:(UIColor*)paramSeparatorColor
               tagHighlightColor:(UIColor*)paramTagHighlightColor
                   textFieldFont:(UIFont*)paramTextFieldFont
                      lineHeight:(float)paramLineHeight
                     linePadding:(float)paramLinePadding
                     lineSpacing:(float)paramLineSpacing
                maxNumberOfLines:(int)paramMaxNumberOfLines
{
  self = [super init];
  if(self){

    _textColor = paramTextColor;
    _separatorColor = paramSeparatorColor;
    _placeholderColor = paramPlaceholderColor;
    _textFieldFont = paramTextFieldFont;
    _tagHighlightColor = paramTagHighlightColor;
    _maxNumberOfLines = paramMaxNumberOfLines;
    _lineHeight = paramLineHeight;
    _linePadding = paramLinePadding;
    _lineSpacing = paramLineSpacing;

    [self commonInit];

  }
  return self;
}

-(instancetype)initWithTextColor:(UIColor*)paramTextColor
                placeholderColor:(UIColor*)paramPlaceholderColor
                  separatorColor:(UIColor*)paramSeparatorColor
               tagHighlightColor:(UIColor*)paramTagHighlightColor
                   textFieldFont:(UIFont*)paramTextFieldFont
                maxNumberOfLines:(int)paramMaxNumberOfLines
{
  self = [super init];
  if(self){

    _textColor = paramTextColor;
    _separatorColor = paramSeparatorColor;
    _placeholderColor = paramPlaceholderColor;
    _textFieldFont = paramTextFieldFont;
    _tagHighlightColor = paramTagHighlightColor;
    _maxNumberOfLines = paramMaxNumberOfLines;

    [self commonInit];

  }
  return self;
}

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self != nil)
    {
        _lineHeight = 16;
        _linePadding = 12;
        _lineSpacing = 10;
        _maxNumberOfLines = 2;

        _currentNumberOfLines = 1;
        [self commonInit];
    }
    return self;
}

- (void)commonInit
{

    //default color
    if(!_separatorColor)
    {
      _separatorColor = [UIColor grayColor];
    }
    if(!_textColor)
    {
      _textColor = [UIColor blackColor];
    }
    if(!_textFieldFont)
    {
      _textFieldFont = [UIFont systemFontOfSize:16];
    }
    if(!_tagHighlightColor)
    {
      _tagHighlightColor = [UIColor blueColor];
    }
    if(!_placeholderColor)
    {
      _placeholderColor = [UIColor lightGrayColor];
    }

    _shadowView = [[UIView alloc] init];
    CGFloat separatorHeight = 0.5f;

    _shadowView.frame = CGRectMake(0, self.frame.size.height, self.frame.size.width, separatorHeight);
    _shadowView.backgroundColor = _separatorColor;
    _shadowView.layer.zPosition = 1;
    [self addSubview:_shadowView];

    self.clipsToBounds = false;
    self.backgroundColor = [UIColor whiteColor];

    _scrollView = [[WATokenFieldScrollView alloc] initWithFrame:self.bounds];
    _scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    _scrollView.delaysContentTouches = true;
    _scrollView.canCancelContentTouches = true;
    _scrollView.scrollsToTop = false;
    _scrollView.backgroundColor = [UIColor whiteColor];
    _scrollView.opaque = true;
    [self addSubview:_scrollView];

    UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognized:)];
    tapRecognizer.cancelsTouchesInView = false;
    [_scrollView addGestureRecognizer:tapRecognizer];

    _textField = [[WASearchTextField alloc] initWithFrame:CGRectMake(0, 0, 10, 42)];
    _textField.text = @"";
    _textField.delegate = self;
    _textField.autocorrectionType = UITextAutocorrectionTypeNo;
    _textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    _textField.backgroundColor = [UIColor whiteColor];
    _textField.font = _textFieldFont;
    _textField.textColor = _textColor;
    _textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    [_scrollView addSubview:_textField];

    _textField.customPlaceholderLabel.text = _placeholder;
    _textField.customPlaceholderLabel.font = _textFieldFont;
    _textField.customPlaceholderLabel.textColor = _placeholderColor;
    [_textField.customPlaceholderLabel sizeToFit];
    _textField.customPlaceholderLabel.frame = CGRectOffset(_textField.customPlaceholderLabel.frame, 9+6, _linePadding+4);

    [_scrollView addSubview:_textField.customPlaceholderLabel];

    _tokenList = [[NSMutableArray alloc] init];
}

- (void)setPlaceholder:(NSString *)placeholder
{
    _placeholder = placeholder;
    _textField.customPlaceholderLabel.text = _placeholder;
    [_textField.customPlaceholderLabel sizeToFit];
}

- (void)addToken:(NSString *)title tokenId:(id)tokenId animated:(bool)animated
{
    WATokenView *tokenView = [[WATokenView alloc] initWithFrame:CGRectMake(0, 0, 20, 28)
                                                      labelFont:_textFieldFont
                                                      textColor:_textColor
                                               highlightedColor:_tagHighlightColor];

    tokenView.label = title;
    tokenView.tokenId = tokenId;
    [_tokenList addObject:tokenView];
    [_scrollView addSubview:tokenView];

    if (animated)
    {
        if (_tokenAnimations == nil)
            _tokenAnimations = [[NSMutableDictionary alloc] init];

        if (tokenId != nil)
            [_tokenAnimations setObject:[[NSNumber alloc] initWithInt:1] forKey:tokenId];
    }

    [_textField setShowPlaceholder:false animated:_textField.text.length == 0];
    [self updateCounter];

    [self setNeedsLayout];
}

- (void)updateCounter
{
}

- (NSArray *)tokenIds
{
    NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:_tokenList.count];

    for (WATokenView *tokenView in _tokenList)
    {
        if (tokenView.tokenId != nil)
            [array addObject:tokenView.tokenId];
    }

    return array;
}

- (void)removeTokensAtIndexes:(NSIndexSet *)indexSet
{
    NSUInteger lastCount = _tokenList.count;

    [indexSet enumerateIndexesUsingBlock:^(NSUInteger index, __unused BOOL *stop)
    {
        WATokenView *tokenView = [_tokenList objectAtIndex:index];
        if ([tokenView isFirstResponder])
            [tokenView resignFirstResponder];

        [UIView animateWithDuration:0.2 animations:^
        {
            tokenView.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
            tokenView.alpha = 0.0f;
        } completion:^(__unused BOOL finished)
        {
            [tokenView removeFromSuperview];
        }];
    }];

    [_tokenList removeObjectsAtIndexes:indexSet];

    if (_tokenAnimations == nil)
        _tokenAnimations = [[NSMutableDictionary alloc] init];

    [self setNeedsLayout];

    if (_tokenList.count == 0)
        [_textField setShowPlaceholder:true animated:lastCount != _tokenList.count];
    [self updateCounter];
}

- (float)preferredHeight
{
    int visibleNumberOfLines = MIN(MAX(1, _currentNumberOfLines), _maxNumberOfLines);
    return _lineHeight * visibleNumberOfLines + MAX(0, visibleNumberOfLines - 1) * _lineSpacing + _linePadding * 2;
}

- (void)setFrame:(CGRect)frame
{
    [super setFrame:frame];

    CGFloat separatorHeight = 0.5f;
    _shadowView.frame = CGRectMake(0.0f, frame.size.height, frame.size.width, separatorHeight);
}

- (void)layoutSubviews
{
    [super layoutSubviews];

    [self doLayout:_tokenAnimations != nil];

    if (_tokenAnimations != nil)
    {
        for (WATokenView *tokenView in _tokenList)
        {
            if (tokenView.tokenId == nil)
                continue;

            NSNumber *nAnimation = [_tokenAnimations objectForKey:tokenView.tokenId];
            if (nAnimation != nil)
            {
                tokenView.transform = CGAffineTransformMakeScale(0.1f, 0.1f);
                tokenView.alpha = 0.0f;
            }
        }

        [UIView animateWithDuration:0.2 animations:^
        {
            for (WATokenView *tokenView in _tokenList)
            {
                if (tokenView.tokenId == nil)
                    continue;

                NSNumber *nAnimation = [_tokenAnimations objectForKey:tokenView.tokenId];
                if (nAnimation != nil)
                {
                    tokenView.transform = CGAffineTransformIdentity;
                    tokenView.alpha = 1.0f;
                }
            }
        }];

        _tokenAnimations = nil;
    }
}

- (void)doLayout:(bool)animated
{
    float width = (float)self.frame.size.width;

    const float textFieldMinWidth = 60;
    const float padding = 9;
    const float textFieldPadding = 5;
    const float spacing = 1;

    int currentLine = 0;
    float currentX = padding;
    float currentY = _linePadding;

    float additionalPadding = 0;

    CGRect targetFrames[_tokenList.count];
    memset(targetFrames, 0, sizeof(CGRect) * _tokenList.count);

    int index = -1;
    for (WATokenView *tokenView in _tokenList)
    {
        index++;

        float tokenWidth = [tokenView preferredWidth];

        if (width - padding - currentX - additionalPadding < MAX(tokenWidth, textFieldMinWidth) && currentX > padding + FLT_EPSILON)
        {
            currentLine++;
            currentY += _lineHeight + _lineSpacing;
            currentX = padding;
        }

        CGRect tokenFrame = CGRectMake(currentX, currentY - 1, MIN(tokenWidth, width - padding - currentX - additionalPadding), tokenView.frame.size.height);

        if (animated && tokenView.frame.origin.x > FLT_EPSILON)
            targetFrames[index] = tokenFrame;
        else
            tokenView.frame = tokenFrame;
        currentX += tokenFrame.size.width + spacing;
    }

    bool lastLineContainsTextFieldOnly = false;

    if (width - padding - currentX - additionalPadding < textFieldMinWidth)
    {
        currentLine++;
        currentY += _lineHeight + _lineSpacing;
        currentX = padding;

        lastLineContainsTextFieldOnly = true;
    }

    if (currentLine + 1 != _currentNumberOfLines)
        animated = true;

    CGRect textFieldFrame = CGRectMake(currentX + textFieldPadding, currentY + 4 - 12, width - padding - currentX - textFieldPadding * 2 - additionalPadding + 4, _textField.frame.size.height);
    _textField.frame = textFieldFrame;
    if (animated)
    {
        _textField.alpha = 0.0f;

        [UIView animateWithDuration:0.2 animations:^
        {
            _textField.alpha = 1.0f;
        }];
    }

    if (lastLineContainsTextFieldOnly && ![self hasFirstResponder])
    {
        currentLine--;
        currentY -= _lineHeight + _lineSpacing;
    }

    if (animated)
    {
        [UIView beginAnimations:@"tokenField" context:nil];
        [UIView setAnimationDuration:0.15];

        int index = -1;
        for (WATokenView *tokenView in _tokenList)
        {
            index++;

            if (targetFrames[index].origin.x > FLT_EPSILON)
                tokenView.frame = targetFrames[index];
        }
    }

    currentY += _lineHeight + _linePadding;

    _scrollView.contentSize = CGSizeMake(_scrollView.frame.size.width, currentY);

    if (animated)
    {
        [UIView commitAnimations];
    }

    if (MIN(currentLine + 1, _maxNumberOfLines) != MIN(_currentNumberOfLines, _maxNumberOfLines))
    {
        id <WATokenFieldViewDelegate> delegate = _delegate;

        [delegate tokenFieldView:self didChangeHeight:_lineHeight * MIN(currentLine + 1, _maxNumberOfLines) + MAX(0, currentLine) * _lineSpacing + _linePadding * 2];
    }
    else if (currentLine + 1 > _currentNumberOfLines)
    {
        [self scrollToTextField:true];
    }

    _currentNumberOfLines = currentLine + 1;
}

- (bool)hasFirstResponder
{
    return _textField.isFirstResponder;
}

- (UIView *)findFirstResponder:(UIView *)view
{
    if ([view isFirstResponder])
        return view;

    for (UIView *subview in view.subviews)
    {
        UIView *result = [self findFirstResponder:subview];
        if (result != nil)
            return result;
    }

    return nil;
}

#pragma mark -

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    if (textField == _textField)
    {

        bool wasEmpty = textField.text.length == 0;
        textField.text = @"";

        if (_delegate != nil)
        {
            id <WATokenFieldViewDelegate> delegate = _delegate;

            [delegate tokenFieldView:self didChangeText:textField.text];
            if (wasEmpty != textField.text.length == 0)
                [delegate tokenFieldView:self didChangeSearchStatus:[self searchIsActive] byClearingTextField:true];
        }

        [self scrollToTextField:false];

        _textField.hidden = true;
        dispatch_async(dispatch_get_main_queue(), ^
        {
            _textField.hidden = false;
        });
    }

    return false;
}

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
    if (textField == _textField)
    {
        bool wasEmpty = textField.text.length == 0;
        textField.text = [textField.text stringByReplacingCharactersInRange:range withString:string];

        [self scrollToTextField:true];

        id <WATokenFieldViewDelegate> delegate = _delegate;

        if (delegate != nil)
        {
            [delegate tokenFieldView:self didChangeText:textField.text];
            if (wasEmpty != textField.text.length == 0)
                [delegate tokenFieldView:self didChangeSearchStatus:[self searchIsActive] byClearingTextField:true];
        }
    }

    return false;
}

- (void)textFieldDidHitLastBackspace
{
    if (_tokenList.count != 0)
    {
        [[_tokenList lastObject] becomeFirstResponder];
    }
}

- (void)textFieldDidBecomeFirstResponder
{
    [self setNeedsLayout];
}

- (void)textFieldDidResignFirstResponder
{
    if (_tokenAnimations == nil)
        _tokenAnimations = [[NSMutableDictionary alloc] init];

    [self setNeedsLayout];
}

- (void)scrollToTextField:(bool)animated
{
    CGPoint contentOffset = _scrollView.contentOffset;
    CGSize contentSize = _scrollView.contentSize;
    CGSize frameSize = _scrollView.frame.size;
    if (contentOffset.y < contentSize.height - frameSize.height)
        contentOffset = CGPointMake(0, contentSize.height - frameSize.height);
    if (contentOffset.y < 0)
        contentOffset.y = 0;

    if (!animated)
        [_scrollView setContentOffset:contentOffset animated:animated];
    else
    {
        [UIView animateWithDuration:0.2 animations:^
        {
            [_scrollView setContentOffset:contentOffset animated:false];
        }];
    }
}

- (bool)searchIsActive
{
    return /*_textField.isFirstResponder && */_textField.text.length != 0;
}

- (void)clearText
{
    _textField.text = @"";

    id <WATokenFieldViewDelegate> delegate = _delegate;

    if (delegate != nil)
        [delegate tokenFieldView:self didChangeSearchStatus:[self searchIsActive] byClearingTextField:false];
}

- (void)highlightToken:(WATokenView *)tokenView
{
    for (WATokenView *view in _tokenList)
    {
        if (view != tokenView)
        {
            if (view.selected)
                view.selected = false;
        }
    }

    tokenView.selected = true;

    [self setNeedsLayout];
}

- (void)unhighlightToken:(WATokenView *)tokenView
{
    tokenView.selected = false;

    if (_tokenAnimations == nil)
        _tokenAnimations = [[NSMutableDictionary alloc] init];

    [self setNeedsLayout];
}

- (void)deleteToken:(WATokenView *)tokenView
{
    int index = -1;
    for (WATokenView *view in _tokenList)
    {
        index++;

        if (view == tokenView)
        {
            [_tokenList removeObjectAtIndex:index];
            break;
        }
    }

    [tokenView removeFromSuperview];
    [_textField becomeFirstResponder];

    [self setNeedsLayout];

    id <WATokenFieldViewDelegate> delegate = _delegate;

    if (delegate != nil)
        [delegate tokenFieldView:self didDeleteTokenWithId:tokenView.tokenId];

    if (_tokenList.count == 0)
        [_textField setShowPlaceholder:true animated:false];
    [self updateCounter];
}

- (void)beginTransition:(NSTimeInterval)duration
{
    UIImage *inputFieldImage = nil;
    UIImageView *temporaryImageView = nil;

    UIGraphicsBeginImageContextWithOptions(_scrollView.bounds.size, true, 0.0f);
    [self.layer renderInContext:UIGraphicsGetCurrentContext()];
    inputFieldImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    temporaryImageView = [[UIImageView alloc] initWithImage:inputFieldImage];
    temporaryImageView.frame = _scrollView.bounds;

    UIView *temporaryImageViewContainer = [[UIView alloc] initWithFrame:_scrollView.frame];
    temporaryImageViewContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    temporaryImageViewContainer.clipsToBounds = true;
    [temporaryImageViewContainer addSubview:temporaryImageView];

    [self insertSubview:temporaryImageViewContainer aboveSubview:_scrollView];
    _scrollView.alpha = 0.0f;

    [UIView animateWithDuration:duration animations:^
    {
        temporaryImageView.alpha = 0.0f;
        _scrollView.alpha = 1.0f;
    } completion:^(__unused BOOL finished)
    {
        [temporaryImageView removeFromSuperview];
        [temporaryImageViewContainer removeFromSuperview];
    }];
}

- (void)tapRecognized:(UITapGestureRecognizer *)recognizer
{
    if (recognizer.state == UIGestureRecognizerStateRecognized)
    {
        [_textField becomeFirstResponder];
    }
}

- (BOOL)hasText
{
    return false;
}

- (void)insertText:(NSString *)__unused text
{
}

- (void)deleteBackward
{
}

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<resources >
	<string name = "pull_to_refresh_pull_label" >Ziehen zum Aktualisieren…</string >
	<string name = "pull_to_refresh_release_label" >Loslassen zum Aktualisieren…</string >
	<string name = "pull_to_refresh_refreshing_label" >Laden…</string >
</resources >