text:
Renders a vertical navigation list in conjunction with NavListSection

## Basic Usage
NavList uses `<NavListSection>` to add one or more sections to your navigation.

You can use the `<NavListItem>` component to add links/buttons to your NavListSection. By using the "to"-prop it will render a react-router `<Link>`-component, using the "href"-prop will render a regular `<a>` and the "onClick"-prop will render a button. The component will accept any valid props that these HTML elements accepts.

```
  import { NavList, NavListItem, NavListSection } from '@folio/stripes/components';
  import { Link } from 'react-router-dom';

  <NavList>
    <NavListSection label="Some label (optional)" activeLink="/active-link-here" striped>
      <NavListItem onClick={onClickHandler}>Users</NavListItem>
      <NavListItem href="#organization">Organization</NavListItem>
      <NavListItem to="circulation">Circulation</NavListItem>
    </NavListSection>
  </NavList>
```

redpajama_set_name: RedPajamaGithub


text:
namespace xwalk {

class XWalkContentLifecycleNotifier {
 public:
  static void OnXWalkViewCreated();
  static void OnXWalkViewDestroyed();

 private:
  DISALLOW_IMPLICIT_CONSTRUCTORS(XWalkContentLifecycleNotifier);
};

bool RegisterXWalkContentLifecycleNotifier(JNIEnv* env);

}  // namespace xwalk

#endif  // XWALK_RUNTIME_BROWSER_ANDROID_XWALK_CONTENT_LIFECYCLE_NOTIFIER_H_


text:
 using namespace std;

int main()
{
   // Define and initialize a vector.
   vector<int> numbers { 10, 20, 30, 40, 50 };

   // Display the vector elements.
   for (int val : numbers)
      cout << val << endl;

   return 0;
}


text:
require_relative 'helper'

class ComponentTest < PryTest::Test

  before { @page = Capybara::Session.new(:poltergeist, TestApp) }

  test 'render' do
    @page.visit '/'
    assert @page.html['head']
    assert @page.html["Generated by Opal"]
  end

  test 'tmpl' do
    @page.visit '/theme'
    # Make sure the about title isn't there
    assert !@page.html['"about-title"']
    # Clicking the link should show the about title
    @page.click_link 'Show About Title'
    # Remove the link from the dom after it's clicked
    assert !@page.html['Show About Title']
    # Should see the title
    assert @page.html['"about-title"']
  end

  after { Capybara.reset_sessions! }
end


text:
from django.db import models

class Restaurant(models.Model):
    name = models.CharField(max_length=300)
    description = models.TextField(null=True, blank=True)

    def __unicode__(self):
        return "%s" % self.name


text:
static const char kTSJavaScriptContext[] = "BridgeJavaScriptContext";

static NSHashTable *g_webViews = nil;

@interface UIWebView (JavaScriptContextPrivate)
- (void)bridgeDidCreateJavaScriptContext:(JSContext *)javaScriptContext;
@end

@protocol JSCWebFrame <NSObject>
- (id)parentFrame;
@end

@implementation NSObject (JavaScriptContext)

- (void)webView:(id)unused didCreateJavaScriptContext:(JSContext *)ctx forFrame:(id<JSCWebFrame>)frame
{
  NSParameterAssert([frame respondsToSelector:@selector(parentFrame)]);

  // only interested in root-level frames
  if ([frame respondsToSelector:@selector(parentFrame) ] && [frame parentFrame] != nil) return;

  void (^ notifyDidCreateJavaScriptContext)() = ^{
    for (UIWebView *webView in g_webViews) {
      NSString *cookie = [NSString stringWithFormat:@"ts_jscWebView_%lud", (unsigned long)webView.hash ];

      [webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"var %@ = '%@'", cookie, cookie ] ];

      if ([ctx[cookie].toString isEqualToString:cookie]) {
        [webView bridgeDidCreateJavaScriptContext:ctx];
        return;
      }
    }
  };

  if ([NSThread isMainThread]) {
    notifyDidCreateJavaScriptContext();
  } else {
    dispatch_async(dispatch_get_main_queue(), notifyDidCreateJavaScriptContext);
  }
}

@end

@implementation UIWebView (JavaScriptContext)

+ (id)allocWithZone:(struct _NSZone *)zone
{
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
                  g_webViews = [NSHashTable weakObjectsHashTable];
                });

  NSAssert([NSThread isMainThread], @"should be in main thread");

  id webView = [super allocWithZone:zone];

  [g_webViews addObject:webView];

  return webView;
}

- (void)bridgeDidCreateJavaScriptContext:(JSContext *)javaScriptContext
{
  [self willChangeValueForKey:@"bridgeJavaScriptContext"];

  objc_setAssociatedObject(self, kTSJavaScriptContext, javaScriptContext, OBJC_ASSOCIATION_RETAIN);

  [self didChangeValueForKey:@"bridgeJavaScriptContext"];

  if ([self.delegate respondsToSelector:@selector(webView:bridgeDidCreateJavaScriptContext:)]) {
    id<JSCWebViewDelegate> delegate = (id<JSCWebViewDelegate>)self.delegate;
    [delegate webView:self bridgeDidCreateJavaScriptContext:javaScriptContext];
  }
}

- (JSContext *)javaScriptContext
{
  JSContext *javaScriptContext = objc_getAssociatedObject(self, kTSJavaScriptContext);

  return javaScriptContext;
}

@end


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package shopcar.dao;

import java.util.List;

/**
 *
 * @author info1
 * @param <T>
 */
public interface DAO<T>
{
    public void save(T entity);

    public void update(T entity);

    public void remove(T entity);

    public T getById(Object pk);

    public List<T> getAll();

    public T getByRestriction(String attribute, String filter);

    public List<T> getByRestriction(String namedQuery, String parameter, Object value);

    public List<T> getByRestriction(String namedQuery, String parameter, String value);
}


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

<TITLE>
WatchEvent.Modifier
</TITLE>

<META NAME="date" CONTENT="2009-12-02">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.newatlanta.repackaged.java.nio.file

Interface WatchEvent.Modifier

Enclosing class:
WatchEvent<T>

public static interface WatchEvent.Modifier

An event modifier that qualifies how a Watchable is registered
 with a WatchService.

 This release does not define any standard modifiers.

Since:

1.7

See Also:
Watchable.register(com.newatlanta.repackaged.java.nio.file.WatchService, com.newatlanta.repackaged.java.nio.file.WatchEvent.Kind<?>[], com.newatlanta.repackaged.java.nio.file.WatchEvent.Modifier...)

Method Summary

 java.lang.String
name()

          Returns the name of the modifier.

Method Detail

name

java.lang.String name()

Returns the name of the modifier.

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
var NAVTREE =
[
  [ "UAA Rocketry WordPress Theme", "index.html", [
    [ "README", "md__c_1__apache24_htdocs_jacobschaos_wp-content_themes_rocketry__r_e_a_d_m_e.html", null ],
    [ "Namespaces", null, [
      [ "Namespace List", "namespaces.html", "namespaces" ]
    ] ],
    [ "Files", null, [
      [ "File List", "files.html", "files" ],
      [ "Globals", "globals.html", [
        [ "All", "globals.html", null ],
        [ "Functions", "globals_func.html", null ],
        [ "Variables", "globals_vars.html", null ]
      ] ]
    ] ]
  ] ]
];

var NAVTREEINDEX =
[
"404_8php.html"
];

var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';


text:
<!DOCTYPE html>

		<meta charset="utf-8" />
		<base href="../../../" />

		<link type="text/css" rel="stylesheet" href="page.css" />

		[page:WebGLRenderer] →

[name]

		Since r118 [page:WebGLRenderer] automatically uses a WebGL 2 rendering context. When upgrading an existing project to
		=> r118, applications might break because of two reasons:

Custom shader code needs to be GLSL 3.0 conform.

WebGL 1 extension checks have to be changed.

		If you can't afford the time to upgrade your code but still want to use the latest version, you can use [name]. This
		version of the renderer will enforce a WebGL 1 rendering context.

Constructor

[name]( [param:Object parameters] )

		Creates a new [name].

Properties

See the base [page:WebGLRenderer] class for common properties.

Methods

See the base [page:WebGLRenderer] class for common methods.

Source

			[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]


text:
<Alloy>
	<View class="container" layout="vertical">
	  <ScrollView>
	    <Widget src="com.muiNumInput.widget" id="widget1" />
	    <Widget src="com.muiNumInput.widget" id="widget2" />
	    <Widget src="com.muiNumInput.widget" id="widget3" />
	  </ScrollView>
	  <Button width="300" title="hide TextField" id="toggleButton"></Button>
	</View>
</Alloy>


text:
#ifndef UNIXSTL_INCL_UNIXSTL_H_UNIXSTL
#define UNIXSTL_INCL_UNIXSTL_H_UNIXSTL
#define UNIXSTL_INCL_H_UNIXSTL

/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_MAJOR    3
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_MINOR    8
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_REVISION 2
# define UNIXSTL_VER_UNIXSTL_H_UNIXSTL_EDIT     93
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/** \file unixstl/unixstl.h \brief [C, C++] The root header for the \ref group__project__unixstl "UNIXSTL" project. */

/* /////////////////////////////////////////////////////////////////////////
 * UNIXSTL version
 *
 * The libraries version information is comprised of major, minor and revision
 * components.
 *
 * The major version is denoted by the _UNIXSTL_VER_MAJOR preprocessor symbol.
 * A changes to the major version component implies that a dramatic change has
 * occurred in the libraries, such that considerable changes to source dependent
 * on previous versions would need to be effected.
 *
 * The minor version is denoted by the _UNIXSTL_VER_MINOR preprocessor symbol.
 * Changes to the minor version component imply that a significant change has
 * occurred to the libraries, either in the addition of new functionality or in
 * the destructive change to one or more components such that recomplilation and
 * code change may be necessitated.
 *
 * The revision version is denoted by the _UNIXSTL_VER_REVISION preprocessor
 * symbol. Changes to the revision version component imply that a bug has been
 * fixed. Dependent code should be recompiled in order to pick up the changes.
 *
 * In addition to the individual version symbols - _UNIXSTL_VER_MAJOR,
 * _UNIXSTL_VER_MINOR and _UNIXSTL_VER_REVISION - a composite symbol _UNIXSTL_VER
 * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
 * component,  bits 8-15 represent the minor component, and bits 0-7 represent
 * the revision component.
 *
 * Each release of the libraries will bear a different version, and that version
 * will also have its own symbol: Version 1.0.1 specifies _UNIXSTL_VER_1_0_1.
 *
 * Thus the symbol _UNIXSTL_VER may be compared meaningfully with a specific
 * version symbol, e.g.# if _UNIXSTL_VER >= _UNIXSTL_VER_1_0_1
 */

/** \def _UNIXSTL_VER_MAJOR
 * The major version number of UNIXSTL
 */

/** \def _UNIXSTL_VER_MINOR
 * The minor version number of UNIXSTL
 */

/** \def _UNIXSTL_VER_REVISION
 * The revision version number of UNIXSTL
 */

/** \def _UNIXSTL_VER
 * The current composite version number of UNIXSTL
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _UNIXSTL_VER_0_9_1     0x00000901  /*!< Version 0.9.1 */
# define _UNIXSTL_VER_0_9_2     0x00000902  /*!< Version 0.9.2 */
# define _UNIXSTL_VER_1_0_1     0x00010001  /*!< Version 1.0.1 */
# define _UNIXSTL_VER_1_0_2     0x00010002  /*!< Version 1.0.2 */
# define _UNIXSTL_VER_1_0_3     0x00010003  /*!< Version 1.0.3 */
# define _UNIXSTL_VER_1_1_1     0x00010101  /*!< Version 1.1.1 */
# define _UNIXSTL_VER_1_2_1     0x00010201  /*!< Version 1.2.1 */
# define _UNIXSTL_VER_1_3_1     0x00010301  /*!< Version 1.3.1 */
# define _UNIXSTL_VER_1_4_1     0x00010401  /*!< Version 1.4.1 */
# define _UNIXSTL_VER_1_5_1     0x00010501  /*!< Version 1.5.1 */
# define _UNIXSTL_VER_1_6_1     0x00010601  /*!< Version 1.6.1 (with STLSoft 1.9.1) */
# define _UNIXSTL_VER_1_6_2     0x00010602  /*!< Version 1.6.2 (with STLSoft 1.9.7) */
# define _UNIXSTL_VER_1_6_3     0x00010603  /*!< Version 1.6.3 (with STLSoft 1.9.9) */
# define _UNIXSTL_VER_1_6_4     0x00010604  /*!< Version 1.6.4 (with STLSoft 1.9.17) */
# define _UNIXSTL_VER_1_6_5     0x00010605  /*!< Version 1.6.5 (with STLSoft 1.9.25) */
# define _UNIXSTL_VER_1_6_6     0x00010606  /*!< Version 1.6.6 (with STLSoft 1.9.29) */
# define _UNIXSTL_VER_1_6_7     0x010607ff  /*!< Version 1.6.7 (with STLSoft 1.9.31) */
# define _UNIXSTL_VER_1_6_8     0x010608ff  /*!< Version 1.6.8 (with STLSoft 1.9.32) */
# define _UNIXSTL_VER_1_7_1     0x010701ff  /*!< Version 1.7.1 (with STLSoft 1.9.33) */
# define _UNIXSTL_VER_1_7_2     0x010702ff  /*!< Version 1.7.2 (with STLSoft 1.9.37) */
# define _UNIXSTL_VER_1_7_3     0x010703ff  /*!< Version 1.7.3 (with STLSoft 1.9.92) */
# define _UNIXSTL_VER_1_7_4     0x010704ff  /*!< Version 1.7.4 (with STLSoft 1.9.108) */
# define _UNIXSTL_VER_1_7_5     0x010705ff  /*!< Version 1.7.5 (with STLSoft 1.9.113) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#define _UNIXSTL_VER_MAJOR      1
#define _UNIXSTL_VER_MINOR      7
#define _UNIXSTL_VER_REVISION   5
#define _UNIXSTL_VER            _UNIXSTL_VER_1_7_5

/* /////////////////////////////////////////////////////////////////////////
 * Includes
 */

#ifndef STLSOFT_INCL_STLSOFT_H_STLSOFT
# include <stlsoft/stlsoft.h>
#endif /* !STLSOFT_INCL_STLSOFT_H_STLSOFT */

/* /////////////////////////////////////////////////////////////////////////
 * STLSoft version compatibility
 */

#if !defined(_STLSOFT_VER) || \
    _STLSOFT_VER < 0x010971ff
# error This version of the UNIXSTL libraries requires STLSoft version 1.9.113, or later
#endif /* _STLSOFT_VER */

/* /////////////////////////////////////////////////////////////////////////
 * Compiler compatibility
 *
 * Currently the only compilers supported by the UNIXSTL libraries are
 *
 * GCC version 2.95 or later
 * Intel C/C++ 6.0 or later
 * Sun Pro C & Sun Pro C++ versions 5.9.x or later
 */

#if defined(STLSOFT_COMPILER_IS_COMO)
 /* ******************************* Comeau ****************************** */
# if __COMO_VERSION__ < 4300
#  error Versions of Comeau C++ prior to 4.3.0.1 are not supported by the UNIXSTL libraries
# endif /* __COMO_VERSION__ */

#elif defined(STLSOFT_COMPILER_IS_GCC)
 /* ******************************** GCC ******************************** */
# if __GNUC__ < 2 || \
     (  __GNUC__ == 2 && \
        __GNUC_MINOR__ < 95)
#  error Versions of GNU C/C++ prior to 2.95 are not supported by the UNIXSTL libraries
# endif /* __GNUC__ */

#elif defined(STLSOFT_COMPILER_IS_INTEL)
 /* ******************************* Intel ******************************* */
# if (__INTEL_COMPILER < 700)
#  error Versions of Intel C++ prior to 7.0 are not supported by the UNIXSTL libraries
# endif /* __INTEL_COMPILER */

#elif defined(STLSOFT_COMPILER_IS_SUNPRO)
 /* ******************************* Sun Pro ***************************** */
# ifdef __cplusplus
#  if ((__SUNPRO_CC & 0xFFF0) < 0x0590)
#   error Versions of Sun Pro C++ prior to 5.9 are not supported by the UNIXSTL libraries
#  endif /* __SUNPRO_CC */
# else /* ? __cplusplus */
#  if ((__SUNPRO_C & 0xFFF0) < 0x0590)
#   error Versions of Sun Pro C prior to 5.9 are not supported by the UNIXSTL libraries
#  endif /* __SUNPRO_CC */
# endif /* __cplusplus */

#else
/* No recognised compiler */
# ifdef _STLSOFT_FORCE_ANY_COMPILER
#  define _UNIXSTL_COMPILER_IS_UNKNOWN
#  ifdef STLSOFT_COMPILE_VERBOSE
#   pragma message("Compiler is unknown to UNIXSTL")
#  endif /* STLSOFT_COMPILE_VERBOSE */
# else
#  error Currently only the Comeau, GCC, Intel and Sun Pro C/C++ compilers are supported by the UNIXSTL libraries. To use other, possibly untested, compilers, define _STLSOFT_FORCE_ANY_COMPILER
# endif /* _STLSOFT_FORCE_ANY_COMPILER */
#endif /* compiler */

/* /////////////////////////////////////////////////////////////////////////
 * Architecture
 *
 * The UNIX architecture.
 */

#ifdef UNIXSTL_ARCH_IS_X86
# undef UNIXSTL_ARCH_IS_X86
#endif /* UNIXSTL_ARCH_IS_X86 */
#ifdef UNIXSTL_ARCH_IS_IA64
# undef UNIXSTL_ARCH_IS_IA64
#endif /* UNIXSTL_ARCH_IS_IA64 */
#ifdef UNIXSTL_ARCH_IS_X64
# undef UNIXSTL_ARCH_IS_X64
#endif /* UNIXSTL_ARCH_IS_X64 */

#ifdef UNIXSTL_ARCH_IS_INTEL
# undef UNIXSTL_ARCH_IS_INTEL
#endif /* UNIXSTL_ARCH_IS_INTEL */
#ifdef UNIXSTL_ARCH_IS_POWERPC
# undef UNIXSTL_ARCH_IS_POWERPC
#endif /* UNIXSTL_ARCH_IS_POWERPC */
#ifdef UNIXSTL_ARCH_IS_ALPHA
# undef UNIXSTL_ARCH_IS_ALPHA
#endif /* UNIXSTL_ARCH_IS_ALPHA */
#ifdef UNIXSTL_ARCH_IS_HPPA
# undef UNIXSTL_ARCH_IS_HPPA
#endif /* UNIXSTL_ARCH_IS_HPPA */
#ifdef UNIXSTL_ARCH_IS_SPARC
# undef UNIXSTL_ARCH_IS_SPARC
#endif /* UNIXSTL_ARCH_IS_SPARC */
#ifdef UNIXSTL_ARCH_IS_UNKNOWN
# undef UNIXSTL_ARCH_IS_UNKNOWN
#endif /* UNIXSTL_ARCH_IS_UNKNOWN */

#if defined(__amd64__) || \
      defined(__amd64) || \
      defined(_AMD64_) || \
      defined(_M_AMD64) || \
      defined(_M_X64)
# define UNIXSTL_ARCH_IS_INTEL
# define UNIXSTL_ARCH_IS_X64
#elif defined(__ia64__) || \
      defined(__ia64) || \
      defined(_IA64_) || \
      defined(_M_IA64)
# define UNIXSTL_ARCH_IS_INTEL
# define UNIXSTL_ARCH_IS_IA64
#elif defined(__i386__) || \
      defined(__i386) || \
      defined(_X86_) || \
      defined(_M_IX86)
# define UNIXSTL_ARCH_IS_INTEL
# define UNIXSTL_ARCH_IS_X86
#elif defined(__alpha__) || \
      defined(__alpha) || \
      defined(_M_ALPHA)
# define UNIXSTL_ARCH_IS_ALPHA
#elif defined(__hppa__) || \
      defined(__hppa)
# define UNIXSTL_ARCH_IS_HPPA
#elif defined(__ppc__) || \
      defined(__ppc) || \
      defined(__POWERPC__) || \
      defined(_POWER) || \
      defined(_M_PPC)
# define UNIXSTL_ARCH_IS_POWERPC
#elif defined(__sparc__) || \
      defined(__sparc)
/* TODO: Separate out arch-family and archs (incl. Sparc32 and Sparc64) */
# define UNIXSTL_ARCH_IS_SPARC
#else /* ? arch */
# define UNIXSTL_ARCH_IS_UNKNOWN
#endif /* ? arch */

/* /////////////////////////////////////////////////////////////////////////
 * Operating system family
 *
 * In some circumstances more than one of these may be defined.
 *
 * Some of this os-discrimination is provided by SourceForge (http://predef.sourceforge.net/preos.html)
 */

#ifdef UNIXSTL_OSFAMILY_IS_BSD
# undef UNIXSTL_OSFAMILY_IS_BSD
#endif /* UNIXSTL_OSFAMILY_IS_BSD */
#ifdef UNIXSTL_OSFAMILY_IS_SVR4
# undef UNIXSTL_OSFAMILY_IS_SVR4
#endif /* UNIXSTL_OSFAMILY_IS_SVR4 */

#if defined(__FreeBSD__) || \
    defined(__NetBSD__) || \
    defined(__OpenBSD__) || \
    defined(__bsdi__) || \
    defined(_SYSTYPE_BSD)
# define UNIXSTL_OSFAMILY_IS_BSD
#endif /* bsd */

#if defined(__sysv__) || \
    defined(__SVR4) || \
    defined(__svr4__) || \
    defined(_SYSTYPE_SVR4)
# define UNIXSTL_OSFAMILY_IS_SVR4
#endif /* SVR4 */

/* /////////////////////////////////////////////////////////////////////////
 * Operating system
 *
 * The UNIX operating system.
 *
 * Some of this os-discrimination is provided by SourceForge (http://predef.sourceforge.net/preos.html)
 */

#ifdef UNIXSTL_OS_IS_APPLE
# undef UNIXSTL_OS_IS_APPLE
#endif /* UNIXSTL_OS_IS_APPLE */
#ifdef UNIXSTL_OS_IS_AIX
# undef UNIXSTL_OS_IS_AIX
#endif /* UNIXSTL_OS_IS_AIX */
#ifdef UNIXSTL_OS_IS_FREEBSD
# undef UNIXSTL_OS_IS_FREEBSD
#endif /* UNIXSTL_OS_IS_FREEBSD */
#ifdef UNIXSTL_OS_IS_HPUX
# undef UNIXSTL_OS_IS_HPUX
#endif /* UNIXSTL_OS_IS_HPUX */
#ifdef UNIXSTL_OS_IS_LINUX
# undef UNIXSTL_OS_IS_LINUX
#endif /* UNIXSTL_OS_IS_LINUX */
#ifdef UNIXSTL_OS_IS_MACOSX
# undef UNIXSTL_OS_IS_MACOSX
#endif /* UNIXSTL_OS_IS_MACOSX */
#ifdef UNIXSTL_OS_IS_NETBSD
# undef UNIXSTL_OS_IS_NETBSD
#endif /* UNIXSTL_OS_IS_NETBSD */
#ifdef UNIXSTL_OS_IS_OPENBSD
# undef UNIXSTL_OS_IS_OPENBSD
#endif /* UNIXSTL_OS_IS_OPENBSD */
#ifdef UNIXSTL_OS_IS_SOLARIS
# undef UNIXSTL_OS_IS_SOLARIS
#endif /* UNIXSTL_OS_IS_SOLARIS */
#ifdef UNIXSTL_OS_IS_FREEBSD
# undef UNIXSTL_OS_IS_FREEBSD
#endif /* UNIXSTL_OS_IS_FREEBSD */
#ifdef UNIXSTL_OS_IS_UNKNOWN
# undef UNIXSTL_OS_IS_UNKNOWN
#endif /* UNIXSTL_OS_IS_UNKNOWN */

#if defined(__APPLE__) || \
    defined(__MACOSX__)
# define UNIXSTL_OS_IS_APPLE
# define UNIXSTL_OS_IS_MACOSX
#elif defined(_AIX)
# define UNIXSTL_OS_IS_AIX
#elif defined(__FreeBSD__)
# define UNIXSTL_OS_IS_FREEBSD
#elif defined(hpux) || \
      defined(_hpux)
# define UNIXSTL_OS_IS_HPUX
#elif defined(__linux__) || \
      defined(__linux) || \
      defined(linux)
# define UNIXSTL_OS_IS_LINUX
#elif defined(__NetBSD__)
# define UNIXSTL_OS_IS_NETBSD
#elif defined(__OpenBSD__)
# define UNIXSTL_OS_IS_OPENBSD
#elif defined(sun) || \
      defined(__sun)
# if defined(UNIXSTL_OSFAMILY_IS_SVR4)
#  define UNIXSTL_OS_IS_SOLARIS
# else /* ? UNIXSTL_OSFAMILY_IS_SVR4 */
#  define UNIXSTL_OS_IS_SUNOS
# endif /* UNIXSTL_OSFAMILY_IS_SVR4 */
#else /* ? operating system */
# define UNIXSTL_OS_IS_UNKNOWN
#endif /* ? operating system */

/* /////////////////////////////////////////////////////////////////////////
 * Contract Enforcement
 *
 * The macro unixstl_assert provides standard debug-mode assert functionality.
 */

/** \brief Defines a runtime assertion
 *
 * \ingroup group__library__macros__assertion
 *
 * \param expr Must be non-zero, or an assertion will be fired
 */
#if defined(UNIXSTL_OS_IS_MACOSX) && \
    defined(__assert)
# define UNIXSTL_ASSERT(expr)               ((void)((expr) ? 0 : (__assert(#expr, __FILE__, __LINE__), 0)))
#else /* ? UNIXSTL_OS_IS_MACOSX */
# define UNIXSTL_ASSERT(expr)               STLSOFT_ASSERT(expr)
#endif /* UNIXSTL_OS_IS_MACOSX */

/** \brief Defines a runtime assertion, with message
 *
 * \ingroup group__library__macros__assertion
 *
 * \param expr Must be non-zero, or an assertion will be fired
 * \param msg The literal character string message to be included in the assertion
 */
#define UNIXSTL_MESSAGE_ASSERT(msg, expr)   STLSOFT_MESSAGE_ASSERT(msg, expr)

/** \brief Defines a compile-time assertion
 *
 * \ingroup group__library__macros__assertion
 *
 * \param expr Must be non-zero, or compilation will fail
 */
#define UNIXSTL_STATIC_ASSERT(expr)         STLSOFT_STATIC_ASSERT(expr)

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define unixstl_assert(expr)               UNIXSTL_ASSERT(expr)
# define unixstl_message_assert(msg, expr)  UNIXSTL_MESSAGE_ASSERT(msg, expr)
# define unixstl_static_assert(expr)        UNIXSTL_STATIC_ASSERT(expr)
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
 * Namespace
 *
 * The UNIXSTL components are contained within the unixstl namespace. This is
 * usually an alias for stlsoft::unixstl_project,
 *
 * When compilers support namespaces they are defined by default. They can be
 * undefined using a cascasing system, as follows:
 *
 * If _STLSOFT_NO_NAMESPACES is defined, then _UNIXSTL_NO_NAMESPACES is defined.
 *
 * If _UNIXSTL_NO_NAMESPACES is defined, then _UNIXSTL_NO_NAMESPACE is defined.
 *
 * If _UNIXSTL_NO_NAMESPACE is defined, then the UNIXSTL constructs are defined
 * in the global scope.
 *
 * If _STLSOFT_NO_NAMESPACES, _UNIXSTL_NO_NAMESPACES and _UNIXSTL_NO_NAMESPACE are
 * all undefined but the symbol _STLSOFT_NO_NAMESPACE is defined (whence the
 * namespace stlsoft does not exist), then the UNIXSTL constructs are defined
 * within the unixstl namespace. The definition matrix is as follows:
 *
 * _STLSOFT_NO_NAMESPACE    _UNIXSTL_NO_NAMESPACE   unixstl definition
 * ---------------------    --------------------    -----------------
 *  not defined              not defined             = stlsoft::unixstl_project
 *  not defined              defined                 not defined
 *  defined                  not defined             unixstl
 *  defined                  defined                 not defined
 *
 *
 *
 * The macro unixstl_ns_qual() macro can be used to refer to elements in the
 * UNIXSTL libraries irrespective of whether they are in the
 * stlsoft::unixstl_project (or unixstl) namespace or in the global namespace.
 *
 * Furthermore, some compilers do not support the standard library in the std
 * namespace, so the unixstl_ns_qual_std() macro can be used to refer to elements
 * in the UNIXSTL libraries irrespective of whether they are in the std namespace
 * or in the global namespace.
 */

/* No STLSoft namespaces means no UNIXSTL namespaces */
#ifdef _STLSOFT_NO_NAMESPACES
# define _UNIXSTL_NO_NAMESPACES
#endif /* _STLSOFT_NO_NAMESPACES */

/* No UNIXSTL namespaces means no unixstl namespace */
#ifdef _UNIXSTL_NO_NAMESPACES
# define _UNIXSTL_NO_NAMESPACE
#endif /* _UNIXSTL_NO_NAMESPACES */

#ifndef _UNIXSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
     defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
/* There is no stlsoft namespace, so must define ::unixstl */
/** \brief The unixstl namespace contains all components
 *   in the \ref group__project__unixstl "UNIXSTL" project.
 *
 * By default, the unixstl namespace is actually an alias for
 * the namespace stlsoft::unixstl_project, which is where all
 * the \ref group__project__unixstl "UNIXSTL" components actually reside. This
 * measure allows all components within the main the
 * \ref group__project__stlsoft "STLSoft" project (which are defined within
 * the stlsoft namespace) to be visible to all components
 * "within" the unixstl namespace. (Otherwise, there would be a
 * whole lot of onerous qualification throughout the code of all
 * \ref group__projects "sub-projects".)
 *
 * \note If either/both of the symbols _STLSOFT_NO_NAMESPACES
 * and _UNIXSTL_NO_NAMESPACE are defined, all
 * \ref group__project__unixstl "UNIXSTL" components will be defined in the
 * global namespace. Conversely, if the _STLSOFT_NO_NAMESPACE
 * symbol (not to be confused with the
 * _STLSOFT_NO_NAMESPACES symbol!) is defined - meaning that
 * all \ref group__project__stlsoft "main project" components are to be
 * defined in the global namespace, and _UNIXSTL_NO_NAMESPACE
 * is not defined, then all \ref group__project__unixstl "UNIXSTL"
 * components will be defined within a bona fide unixstl
 * namespace.
 *
 * \note This is a vestige of compatibility with compilers with
 * no (or no sensible) namespace support that is maintained for reasons of
 * backwards compatiblity and because it is, in rare circumstances, a
 * useful facility.
 */
namespace unixstl
{
# else
/* Define stlsoft::unixstl_project */

namespace stlsoft
{

namespace unixstl_project
{

# endif /* _STLSOFT_NO_NAMESPACE */
#else
stlsoft_ns_using(move_lhs_from_rhs)
#endif /* !_UNIXSTL_NO_NAMESPACE */

/** \def unixstl_ns_qual(x)
 * Qualifies with unixstl:: if UNIXSTL is using namespaces or, if not, does not qualify
 */

/** \def unixstl_ns_using(x)
 * Declares a using directive (with respect to unixstl) if UNIXSTL is using namespaces or, if not, does nothing
 */

#ifndef _UNIXSTL_NO_NAMESPACE
# define unixstl_ns_qual(x)             ::unixstl::x
# define unixstl_ns_using(x)            using ::unixstl::x;
#else
# define unixstl_ns_qual(x)             x
# define unixstl_ns_using(x)
#endif /* !_UNIXSTL_NO_NAMESPACE */

/** \def unixstl_ns_qual_std(x)
 * Qualifies with std:: if UNIXSTL is being translated in the context of the standard library being within the std namespace or, if not, does not qualify
 */

/** \def unixstl_ns_using_std(x)
 * Declares a using directive (with respect to std) if UNIXSTL is being translated in the context of the standard library being within the std namespace or, if not, does nothing
 */

#ifdef STLSOFT_CF_std_NAMESPACE
# define unixstl_ns_qual_std(x)         ::std::x
# define unixstl_ns_using_std(x)        using ::std::x;
#else /* ? STLSOFT_CF_std_NAMESPACE */
# define unixstl_ns_qual_std(x)         x
# define unixstl_ns_using_std(x)
#endif /* !STLSOFT_CF_std_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Typedefs
 *
 * The UNIXSTL uses a number of typedefs to aid in compiler-independence in the
 * libraries' main code.
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION

typedef stlsoft_ns_qual(ss_char_a_t)        us_char_a_t;    /*!< Ansi char type */
typedef stlsoft_ns_qual(ss_char_w_t)        us_char_w_t;    /*!< Unicode char type */
typedef stlsoft_ns_qual(ss_sint8_t)         us_sint8_t;     /*!< 8-bit signed integer */
typedef stlsoft_ns_qual(ss_uint8_t)         us_uint8_t;     /*!< 8-bit unsigned integer */
typedef stlsoft_ns_qual(ss_int16_t)         us_int16_t;     /*!< 16-bit integer */
typedef stlsoft_ns_qual(ss_sint16_t)        us_sint16_t;    /*!< 16-bit signed integer */
typedef stlsoft_ns_qual(ss_uint16_t)        us_uint16_t;    /*!< 16-bit unsigned integer */
typedef stlsoft_ns_qual(ss_int32_t)         us_int32_t;     /*!< 32-bit integer */
typedef stlsoft_ns_qual(ss_sint32_t)        us_sint32_t;    /*!< 32-bit signed integer */
typedef stlsoft_ns_qual(ss_uint32_t)        us_uint32_t;    /*!< 32-bit unsigned integer */
#ifdef STLSOFT_CF_64BIT_INT_SUPPORT
typedef stlsoft_ns_qual(ss_int64_t)         us_int64_t;     /*!< 64-bit integer */
typedef stlsoft_ns_qual(ss_sint64_t)        us_sint64_t;    /*!< 64-bit signed integer */
typedef stlsoft_ns_qual(ss_uint64_t)        us_uint64_t;    /*!< 64-bit unsigned integer */
#endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
typedef stlsoft_ns_qual(ss_int_t)           us_int_t;       /*!< integer */
typedef stlsoft_ns_qual(ss_sint_t)          us_sint_t;      /*!< signed integer */
typedef stlsoft_ns_qual(ss_uint_t)          us_uint_t;      /*!< unsigned integer */
typedef stlsoft_ns_qual(ss_long_t)          us_long_t;      /*!< long */
#if defined(__cplusplus)
typedef stlsoft_ns_qual(ss_bool_t)          us_bool_t;      /*!< bool */
#endif /* __cplusplus */
typedef stlsoft_ns_qual(ss_size_t)          us_size_t;      /*!< size */
typedef stlsoft_ns_qual(ss_ptrdiff_t)       us_ptrdiff_t;   /*!< ptr diff */
typedef stlsoft_ns_qual(ss_streampos_t)     us_streampos_t; /*!< streampos */
typedef stlsoft_ns_qual(ss_streamoff_t)     us_streamoff_t; /*!< streamoff */

#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#ifndef _UNIXSTL_NO_NAMESPACE
typedef us_char_a_t         char_a_t;           /*!< Ansi char type */
typedef us_char_w_t         char_w_t;           /*!< Unicode char type */
/* typedef us_int8_t           int8_t; */              /*!< 8-bit integer */
typedef us_sint8_t          sint8_t;            /*!< 8-bit signed integer */
typedef us_uint8_t          uint8_t;            /*!< 8-bit unsigned integer */
typedef us_int16_t          int16_t;            /*!< 16-bit integer */
typedef us_sint16_t         sint16_t;           /*!< 16-bit signed integer */
typedef us_uint16_t         uint16_t;           /*!< 16-bit unsigned integer */
typedef us_int32_t          int32_t;            /*!< 32-bit integer */
typedef us_sint32_t         sint32_t;           /*!< 32-bit signed integer */
typedef us_uint32_t         uint32_t;           /*!< 32-bit unsigned integer */
# ifdef STLSOFT_CF_64BIT_INT_SUPPORT
 typedef us_int64_t         int64_t;            /*!< 64-bit integer */
 typedef us_sint64_t        sint64_t;           /*!< 64-bit signed integer */
 typedef us_uint64_t        uint64_t;           /*!< 64-bit unsigned integer */
# endif /* STLSOFT_CF_64BIT_INT_SUPPORT */
/* typedef us_short_t          short_t; */            /*!< short integer */
typedef us_int_t            int_t;              /*!< integer */
typedef us_sint_t           sint_t;             /*!< signed integer */
typedef us_uint_t           uint_t;             /*!< unsigned integer */
typedef us_long_t           long_t;             /*!< long integer */
/* typedef us_byte_t           byte_t; */              /*!< Byte */
typedef us_bool_t           bool_t;             /*!< bool */
# if !defined(STLSOFT_COMPILER_IS_DMC)
typedef us_streampos_t      streampos_t;        /*!< streampos */
typedef us_streamoff_t      streamoff_t;        /*!< streamoff */
# endif /* compiler */
#endif /* !_UNIXSTL_NO_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Values
 *
 * Since the boolean type may not be supported natively on all compilers, the
 * values of true and false may also not be provided. Hence the values of
 * us_true_v and us_false_v are defined, and are used in all code.
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION

#define us_true_v       ss_true_v
#define us_false_v      ss_false_v

#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
 * Code modification macros
 */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
/* Exception signatures. */
#define unixstl_throw_0()                               stlsoft_throw_0()
#define unixstl_throw_1(x1)                             stlsoft_throw_1(x1)
#define unixstl_throw_2(x1, x2)                         stlsoft_throw_2(x1, x2)
#define unixstl_throw_3(x1, x2, x3)                     stlsoft_throw_3(x1, x2, x3)
#define unixstl_throw_4(x1, x2, x3, x4)                 stlsoft_throw_4(x1, x2, x3, x4)
#define unixstl_throw_5(x1, x2, x3, x4, x5)             stlsoft_throw_5(x1, x2, x3, x4, x5)
#define unixstl_throw_6(x1, x2, x3, x4, x5, x6)         stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
#define unixstl_throw_7(x1, x2, x3, x4, x5, x6, x7)     stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
#define unixstl_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define UNIXSTL_NUM_ELEMENTS(ar)                       STLSOFT_NUM_ELEMENTS(ar)
# define unixstl_num_elements(ar)                       UNIXSTL_NUM_ELEMENTS(ar)
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/** \brief [DEPRECATED] Destroys the given instance \c p of the given type (\c t and \c type)
 *
 * \deprecated This is heavily deprecated in favour of \ref STLSOFT_DESTROY_INSTANCE().
 */
#define unixstl_destroy_instance(t, type, p)            STLSOFT_DESTROY_INSTANCE(t, type, p)

/** \brief [DEPRECATED] Generates an opaque type with the name \c _htype
 *
 * \deprecated This is heavily deprecated in favour of \ref STLSOFT_GEN_OPAQUE().
 */
#define unixstl_gen_opaque(htype)                       STLSOFT_GEN_OPAQUE(htype)

/* ////////////////////////////////////////////////////////////////////// */

#ifndef _UNIXSTL_NO_NAMESPACE
# if defined(_STLSOFT_NO_NAMESPACE) || \
     defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} /* namespace unixstl */
# else
} /* namespace unixstl_project */
} /* namespace stlsoft */
namespace unixstl = ::stlsoft::unixstl_project;
# endif /* _STLSOFT_NO_NAMESPACE */
#endif /* !_UNIXSTL_NO_NAMESPACE */

/* /////////////////////////////////////////////////////////////////////////
 * Inclusion
 */

#ifdef STLSOFT_CF_PRAGMA_ONCE_SUPPORT
# pragma once
#endif /* STLSOFT_CF_PRAGMA_ONCE_SUPPORT */

/* ////////////////////////////////////////////////////////////////////// */

#endif /* !UNIXSTL_INCL_UNIXSTL_H_UNIXSTL */

/* ///////////////////////////// end of file //////////////////////////// */


text:
const Controller = require('../libraries/controller');
const ArenaModel = require('../models/arena-model');

class ArenaController extends Controller {}

module.exports = new ArenaController(ArenaModel);


text:
package utilTest;

import org.decaywood.utils.FileLoader;
import org.junit.Assert;
import org.junit.Test;

import java.io.File;

/**
 * @author: decaywood
 * @date: 2015/12/2 10:52
 */
public class FileLoaderTest {

    @Test
    public void testFileLoader() {
        FileLoader.updateCookie("I am a cookie", "baidu");
        File file = FileLoader.loadFile("config.sys");
        Assert.assertTrue(file.exists());
    }

}


text:
-bin

Contains various scripts .sh & .bat scripts.

-database

Contains the database.

-dbscripts

Contains all the database scripts.

-lib

Contains basic libraries that are required to startup EI.

-repository

The repository where services and modules deployed in WSO2 EI are stored.

-conf

Contains configuration files specific to EI.

-logs

Contains all log files created during execution of EI.

-resources

 Contains additional resources that may be required, including sample configuration and sample resources.

-samples

 Contains some sample services and client applications that demonstrate the functionality and capabilities of WSO2 EI.

-tmp

Used for storing temporary files, and is pointed to by the java.io.tmpdir System property.

-LICENSE.txt

 Apache License 2.0 and the relevant other licenses under which WSO2 EI is distributed.

-README.txt

 Product information for WSO2 EI 6.0.0.

-release-notes.html

 Release information for WSO2 EI 6.0.0.

-patches

Used to add patches related for all runtimes.

-dropins

 Used to add external jars(dependencies) of all runtimes.

-extensions

 Used to add carbon extensions.

-servicepacks

 Used to add service packs related to all runtimes.

-wso2/components

 Contains profiles for all runtimes and the plugins folder.

-wso2/lib

 Contains jars that are required/shared by all runtimes.

-wso2/analytics

 Contains analytics runtime related files/folders.

-wso2/analytics/conf

 Analytics runtime specific configuration files.

-wso2/analytics/repository

 Where deployments of Analytics runtime are stored.

-wso2/business-process

 Contains business-process runtime related files/folders.

-wso2/business-process/conf

 Business-process runtime specific configuration files.

-wso2/busines-process/repository

 Where deployments of business-process runtime is stored.

-wso2/broker

 Contains broker runtime related files/folders.

-wso2/broker/conf

 Broker runtime specific configuration files.

-wso2/broker/repository

 Where deployments of broker runtime is stored.


text:
package com.dmdirc.events;

import com.dmdirc.Invite;
import com.dmdirc.interfaces.Connection;
import com.dmdirc.interfaces.User;

import java.time.LocalDateTime;

/**
 * Fired when an invite is received.
 */
public class ServerInviteReceivedEvent extends ServerDisplayableEvent {

    private final User user;
    private final String channel;
    private final Invite invite;

    public ServerInviteReceivedEvent(final LocalDateTime timestamp, final Connection connection,
            final User user, final String channel, final Invite invite) {
        super(timestamp, connection);
        this.user = user;
        this.channel = channel;
        this.invite = invite;
    }

    public ServerInviteReceivedEvent(final Connection connection, final User user,
            final String channel, final Invite invite) {
        super(connection);
        this.user = user;
        this.channel = channel;
        this.invite = invite;
    }

    public User getUser() {
        return user;
    }

    public String getChannel() {
        return channel;
    }

    public Invite getInvite() {
        return invite;
    }

}


text:
require 'spec_helper'

describe Element do

  before {
    @elements = {
      :chromium  => TransitionMetal.create( :symbol => 'Cr' ),
      :manganese => TransitionMetal.create( :symbol => 'Mn' ),
      :argon     => NobleGas.create( :symbol => 'Ar' ),
      :helium    => NobleGas.create( :symbol => 'He' ),
      :xenon     => NobleGas.create( :symbol => 'Xe' )
    }
    @elements.each { |name, element|
      element.reload
      element.update_attribute :combination_order_position, 0
    }
    @elements.each {|name, element| element.reload }
  }

  describe "rebalancing on an STI class should not affect the other class" do

    before {
      @elements[:helium].update_attribute :combination_order_position, :first
      @elements[:xenon].update_attribute :combination_order_position, :first
      @elements[:argon].update_attribute :combination_order_position, :last

      TransitionMetal.ranker(:combination_order).with(@elements[:chromium]).instance_eval { rebalance_ranks }
    }

    subject { NobleGas.rank(:combination_order) }

    its(:size) { should == 3 }

    its(:first) { should == @elements[:xenon] }

    its(:last) { should == @elements[:argon] }

  end

  describe "setting positions on STI classes" do

    before {
      @elements[:helium].update_attribute :combination_order_position, :first
      @elements[:xenon].update_attribute :combination_order_position, :first
      @elements[:argon].update_attribute :combination_order_position, :first

      @elements[:chromium].update_attribute :combination_order_position, 1
      @elements[:manganese].update_attribute :combination_order_position, 1
      @elements[:manganese].update_attribute :combination_order_position, 0
      @elements[:chromium].update_attribute :combination_order_position, 0
      @elements[:manganese].update_attribute :combination_order_position, 0
      @elements[:chromium].update_attribute :combination_order_position, 0
    }

    describe "NobleGas" do

      subject { NobleGas.rank(:combination_order) }

      its(:size) { should == 3 }

      its(:first) { should == @elements[:argon] }

      its(:last) { should == @elements[:helium] }

    end

    describe "TransitionMetal" do

      subject { TransitionMetal.rank(:combination_order) }

      its(:size) { should == 2 }

      its(:first) { should == @elements[:chromium] }

      its(:last) { should == @elements[:manganese] }

    end

  end

  describe "setting positions on STI classes" do

    before {
      @elements[:helium].update_attribute :combination_order_position, :first
      @elements[:xenon].update_attribute :combination_order_position, :first
      @elements[:argon].update_attribute :combination_order_position, :first

      @elements[:chromium].update_attribute :combination_order_position, 1
      @elements[:manganese].update_attribute :combination_order_position, 1
      @elements[:manganese].update_attribute :combination_order_position, 0
      @elements[:chromium].update_attribute :combination_order_position, 0
      @elements[:manganese].update_attribute :combination_order_position, 0
      @elements[:chromium].update_attribute :combination_order_position, 0
    }

    describe "NobleGas" do

      subject { NobleGas.rank(:combination_order) }

      its(:size) { should == 3 }

      its(:first) { should == @elements[:argon] }

      its(:last) { should == @elements[:helium] }

    end

    describe "TransitionMetal" do

      subject { TransitionMetal.rank(:combination_order) }

      its(:size) { should == 2 }

      its(:first) { should == @elements[:chromium] }

      its(:last) { should == @elements[:manganese] }

    end

  end

end


text:
/*!
 * Module dependencies.
 */

var MongooseCollection = require('../../collection')
  , Collection = require('mongodb').Collection
  , STATES = require('../../connectionstate')
  , utils = require('../../utils')

/**
 * A [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) collection implementation.
 *
 * All methods methods from the [node-mongodb-native](https://github.com/mongodb/node-mongodb-native) driver are copied and wrapped in queue management.
 *
 * @inherits Collection
 * @api private
 */

function NativeCollection () {
  this.collection = null;
  MongooseCollection.apply(this, arguments);
}

/*!
 * Inherit from abstract Collection.
 */

NativeCollection.prototype.__proto__ = MongooseCollection.prototype;

/**
 * Called when the connection opens.
 *
 * @api private
 */

NativeCollection.prototype.onOpen = function () {
  var self = this;

  // always get a new collection in case the user changed host:port
  // of parent db instance when re-opening the connection.

  if (!self.opts.capped.size) {
    // non-capped
    return self.conn.db.collection(self.name, callback);
  }

  // capped
  return self.conn.db.collection(self.name, function (err, c) {
    if (err) return callback(err);

    // discover if this collection exists and if it is capped
    self.conn.db.listCollections({ name: self.name }).toArray(function(err, docs) {
      if (err) {
        return callback(err);
      }
      var doc = docs[0];
      var exists = !!doc;

      if (exists) {
        if (doc.options && doc.options.capped) {
          callback(null, c);
        } else {
          var msg = 'A non-capped collection exists with the name: '+ self.name +'\n\n'
                  + ' To use this collection as a capped collection, please '
                  + 'first convert it.\n'
                  + ' http://www.mongodb.org/display/DOCS/Capped+Collections#CappedCollections-Convertingacollectiontocapped'
          err = new Error(msg);
          callback(err);
        }
      } else {
        // create
        var opts = utils.clone(self.opts.capped);
        opts.capped = true;
        self.conn.db.createCollection(self.name, opts, callback);
      }
    });
  });

  function callback (err, collection) {
    if (err) {
      // likely a strict mode error
      self.conn.emit('error', err);
    } else {
      self.collection = collection;
      MongooseCollection.prototype.onOpen.call(self);
    }
  };
};

/**
 * Called when the connection closes
 *
 * @api private
 */

NativeCollection.prototype.onClose = function () {
  MongooseCollection.prototype.onClose.call(this);
};

/*!
 * Copy the collection methods and make them subject to queues
 */

for (var i in Collection.prototype) {
  // Janky hack to work around gh-3005 until we can get rid of the mongoose
  // collection abstraction
  try {
    if (typeof Collection.prototype[i] !== 'function') {
      continue;
    }
  } catch(e) {
    continue;
  }

  (function(i){
    NativeCollection.prototype[i] = function () {
      if (this.buffer) {
        this.addQueue(i, arguments);
        return;
      }

      var collection = this.collection
        , args = arguments
        , self = this
        , debug = self.conn.base.options.debug;

      if (debug) {
        if ('function' === typeof debug) {
          debug.apply(debug
            , [self.name, i].concat(utils.args(args, 0, args.length-1)));
        } else {
          console.error('\x1B[0;36mMongoose:\x1B[0m %s.%s(%s) %s %s %s'
            , self.name
            , i
            , print(args[0])
            , print(args[1])
            , print(args[2])
            , print(args[3]))
        }
      }

      return collection[i].apply(collection, args);
    };
  })(i);
}

/*!
 * Debug print helper
 */

function print (arg) {
  var type = typeof arg;
  if ('function' === type || 'undefined' === type) return '';
  return format(arg);
}

/*!
 * Debug print helper
 */

function format (obj, sub) {
  var x = utils.clone(obj, { retainKeyOrder: 1 });
  if (x) {
    if ('Binary' === x.constructor.name) {
      x = '[object Buffer]';
    } else if ('ObjectID' === x.constructor.name) {
      var representation = 'ObjectId("' + x.toHexString() + '")';
      x = { inspect: function() { return representation; } };
    } else if ('Date' === x.constructor.name) {
      var representation = 'new Date("' + x.toUTCString() + '")';
      x = { inspect: function() { return representation; } };
    } else if ('Object' === x.constructor.name) {
      var keys = Object.keys(x);
      var numKeys = keys.length;
      var key;
      for (var i = 0; i < numKeys; ++i) {
        key = keys[i];
        if (x[key]) {
          if ('Binary' === x[key].constructor.name) {
            x[key] = '[object Buffer]';
          } else if ('Object' === x[key].constructor.name) {
            x[key] = format(x[key], true);
          } else if ('ObjectID' === x[key].constructor.name) {
            ;(function(x){
              var representation = 'ObjectId("' + x[key].toHexString() + '")';
              x[key] = { inspect: function() { return representation; } };
            })(x)
          } else if ('Date' === x[key].constructor.name) {
            ;(function(x){
              var representation = 'new Date("' + x[key].toUTCString() + '")';
              x[key] = { inspect: function() { return representation; } };
            })(x)
          } else if (Array.isArray(x[key])) {
            x[key] = x[key].map(function (o) {
              return format(o, true)
            });
          }
        }
      }
    }
    if (sub) return x;
  }

  return require('util')
    .inspect(x, false, 10, true)
    .replace(/\n/g, '')
    .replace(/\s{2,}/g, ' ')
}

/**
 * Retreives information about this collections indexes.
 *
 * @param {Function} callback
 * @method getIndexes
 * @api public
 */

NativeCollection.prototype.getIndexes = NativeCollection.prototype.indexInformation;

/*!
 * Module exports.
 */

module.exports = NativeCollection;


text:
package org.docksidestage.postgresql.dbflute.exentity.customize;

/**
 * The entity of UnpaidSummaryMember.
 * <p>
 * You can implement your original methods here.
 * This class is NOT overrided when re-generating.
 * </p>
 * @author DBFlute(AutoGenerator)
 */
public class UnpaidSummaryMember extends org.docksidestage.postgresql.dbflute.bsentity.customize.BsUnpaidSummaryMember {

    /** Serial version UID. (Default) */
    private static final long serialVersionUID = 1L;
}


text:
/**
 * Heartbeat API
 *
 * Heartbeat is a simple server polling API that sends XHR requests to
 * the server every 15 - 60 seconds and triggers events (or callbacks) upon
 * receiving data. Currently these 'ticks' handle transports for post locking,
 * login-expiration warnings, autosave, and related tasks while a user is logged in.
 *
 * Available PHP filters (in ajax-actions.php):
 * - heartbeat_received
 * - heartbeat_send
 * - heartbeat_tick
 * - heartbeat_nopriv_received
 * - heartbeat_nopriv_send
 * - heartbeat_nopriv_tick
 * @see wp_ajax_nopriv_heartbeat(), wp_ajax_heartbeat()
 *
 * Custom jQuery events:
 * - heartbeat-send
 * - heartbeat-tick
 * - heartbeat-error
 * - heartbeat-connection-lost
 * - heartbeat-connection-restored
 * - heartbeat-nonces-expired
 *
 * @since 3.6.0
 * @output wp-includes/js/heartbeat.js
 */

( function( $, window, undefined ) {

	/**
	 * Constructs the Heartbeat API.
	 *
	 * @since 3.6.0
	 *
	 * @return {Object} An instance of the Heartbeat class.
	 * @constructor
	 */
	var Heartbeat = function() {
		var $document = $(document),
			settings = {
				// Suspend/resume.
				suspend: false,

				// Whether suspending is enabled.
				suspendEnabled: true,

				// Current screen id, defaults to the JS global 'pagenow' when present
				// (in the admin) or 'front'.
				screenId: '',

				// XHR request URL, defaults to the JS global 'ajaxurl' when present.
				url: '',

				// Timestamp, start of the last connection request.
				lastTick: 0,

				// Container for the enqueued items.
				queue: {},

				// Connect interval (in seconds).
				mainInterval: 60,

				// Used when the interval is set to 5 seconds temporarily.
				tempInterval: 0,

				// Used when the interval is reset.
				originalInterval: 0,

				// Used to limit the number of Ajax requests.
				minimalInterval: 0,

				// Used together with tempInterval.
				countdown: 0,

				// Whether a connection is currently in progress.
				connecting: false,

				// Whether a connection error occurred.
				connectionError: false,

				// Used to track non-critical errors.
				errorcount: 0,

				// Whether at least one connection has been completed successfully.
				hasConnected: false,

				// Whether the current browser window is in focus and the user is active.
				hasFocus: true,

				// Timestamp, last time the user was active. Checked every 30 seconds.
				userActivity: 0,

				// Flag whether events tracking user activity were set.
				userActivityEvents: false,

				// Timer that keeps track of how long a user has focus.
				checkFocusTimer: 0,

				// Timer that keeps track of how long needs to be waited before connecting to
				// the server again.
				beatTimer: 0
			};

		/**
		 * Sets local variables and events, then starts the heartbeat.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function initialize() {
			var options, hidden, visibilityState, visibilitychange;

			if ( typeof window.pagenow === 'string' ) {
				settings.screenId = window.pagenow;
			}

			if ( typeof window.ajaxurl === 'string' ) {
				settings.url = window.ajaxurl;
			}

			// Pull in options passed from PHP.
			if ( typeof window.heartbeatSettings === 'object' ) {
				options = window.heartbeatSettings;

				// The XHR URL can be passed as option when window.ajaxurl is not set.
				if ( ! settings.url && options.ajaxurl ) {
					settings.url = options.ajaxurl;
				}

				/*
				 * The interval can be from 15 to 120 seconds and can be set temporarily to 5 seconds.
				 * It can be set in the initial options or changed later through JS and/or through PHP.
				 */
				if ( options.interval ) {
					settings.mainInterval = options.interval;

					if ( settings.mainInterval < 15 ) {
						settings.mainInterval = 15;
					} else if ( settings.mainInterval > 120 ) {
						settings.mainInterval = 120;
					}
				}

				/*
				 * Used to limit the number of Ajax requests. Overrides all other intervals
				 * if they are shorter. Needed for some hosts that cannot handle frequent requests
				 * and the user may exceed the allocated server CPU time, etc. The minimal interval
				 * can be up to 600 seconds, however setting it to longer than 120 seconds
				 * will limit or disable some of the functionality (like post locks).
				 * Once set at initialization, minimalInterval cannot be changed/overridden.
				 */
				if ( options.minimalInterval ) {
					options.minimalInterval = parseInt( options.minimalInterval, 10 );
					settings.minimalInterval = options.minimalInterval > 0 && options.minimalInterval <= 600 ? options.minimalInterval : 0;
				}

				if ( settings.minimalInterval && settings.mainInterval < settings.minimalInterval ) {
					settings.mainInterval = settings.minimalInterval;
				}

				// 'screenId' can be added from settings on the front end where the JS global
				// 'pagenow' is not set.
				if ( ! settings.screenId ) {
					settings.screenId = options.screenId || 'front';
				}

				if ( options.suspension === 'disable' ) {
					settings.suspendEnabled = false;
				}
			}

			// Convert to milliseconds.
			settings.mainInterval = settings.mainInterval * 1000;
			settings.originalInterval = settings.mainInterval;
			if ( settings.minimalInterval ) {
				settings.minimalInterval = settings.minimalInterval * 1000;
			}

			/*
			 * Switch the interval to 120 seconds by using the Page Visibility API.
			 * If the browser doesn't support it (Safari < 7, Android < 4.4, IE < 10), the
			 * interval will be increased to 120 seconds after 5 minutes of mouse and keyboard
			 * inactivity.
			 */
			if ( typeof document.hidden !== 'undefined' ) {
				hidden = 'hidden';
				visibilitychange = 'visibilitychange';
				visibilityState = 'visibilityState';
			} else if ( typeof document.msHidden !== 'undefined' ) { // IE10.
				hidden = 'msHidden';
				visibilitychange = 'msvisibilitychange';
				visibilityState = 'msVisibilityState';
			} else if ( typeof document.webkitHidden !== 'undefined' ) { // Android.
				hidden = 'webkitHidden';
				visibilitychange = 'webkitvisibilitychange';
				visibilityState = 'webkitVisibilityState';
			}

			if ( hidden ) {
				if ( document[hidden] ) {
					settings.hasFocus = false;
				}

				$document.on( visibilitychange + '.wp-heartbeat', function() {
					if ( document[visibilityState] === 'hidden' ) {
						blurred();
						window.clearInterval( settings.checkFocusTimer );
					} else {
						focused();
						if ( document.hasFocus ) {
							settings.checkFocusTimer = window.setInterval( checkFocus, 10000 );
						}
					}
				});
			}

			// Use document.hasFocus() if available.
			if ( document.hasFocus ) {
				settings.checkFocusTimer = window.setInterval( checkFocus, 10000 );
			}

			$(window).on( 'unload.wp-heartbeat', function() {
				// Don't connect anymore.
				settings.suspend = true;

				// Abort the last request if not completed.
				if ( settings.xhr && settings.xhr.readyState !== 4 ) {
					settings.xhr.abort();
				}
			});

			// Check for user activity every 30 seconds.
			window.setInterval( checkUserActivity, 30000 );

			// Start one tick after DOM ready.
			$( function() {
				settings.lastTick = time();
				scheduleNextTick();
			});
		}

		/**
		 * Returns the current time according to the browser.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {number} Returns the current time.
		 */
		function time() {
			return (new Date()).getTime();
		}

		/**
		 * Checks if the iframe is from the same origin.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {boolean} Returns whether or not the iframe is from the same origin.
		 */
		function isLocalFrame( frame ) {
			var origin, src = frame.src;

			/*
			 * Need to compare strings as WebKit doesn't throw JS errors when iframes have
			 * different origin. It throws uncatchable exceptions.
			 */
			if ( src && /^https?:\/\//.test( src ) ) {
				origin = window.location.origin ? window.location.origin : window.location.protocol + '//' + window.location.host;

				if ( src.indexOf( origin ) !== 0 ) {
					return false;
				}
			}

			try {
				if ( frame.contentWindow.document ) {
					return true;
				}
			} catch(e) {}

			return false;
		}

		/**
		 * Checks if the document's focus has changed.
		 *
		 * @since 4.1.0
		 * @access private
		 *
		 * @return {void}
		 */
		function checkFocus() {
			if ( settings.hasFocus && ! document.hasFocus() ) {
				blurred();
			} else if ( ! settings.hasFocus && document.hasFocus() ) {
				focused();
			}
		}

		/**
		 * Sets error state and fires an event on XHR errors or timeout.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @param {string} error  The error type passed from the XHR.
		 * @param {number} status The HTTP status code passed from jqXHR
		 *                        (200, 404, 500, etc.).
		 *
		 * @return {void}
		 */
		function setErrorState( error, status ) {
			var trigger;

			if ( error ) {
				switch ( error ) {
					case 'abort':
						// Do nothing.
						break;
					case 'timeout':
						// No response for 30 seconds.
						trigger = true;
						break;
					case 'error':
						if ( 503 === status && settings.hasConnected ) {
							trigger = true;
							break;
						}
						/* falls through */
					case 'parsererror':
					case 'empty':
					case 'unknown':
						settings.errorcount++;

						if ( settings.errorcount > 2 && settings.hasConnected ) {
							trigger = true;
						}

						break;
				}

				if ( trigger && ! hasConnectionError() ) {
					settings.connectionError = true;
					$document.trigger( 'heartbeat-connection-lost', [error, status] );
					wp.hooks.doAction( 'heartbeat.connection-lost', error, status );
				}
			}
		}

		/**
		 * Clears the error state and fires an event if there is a connection error.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function clearErrorState() {
			// Has connected successfully.
			settings.hasConnected = true;

			if ( hasConnectionError() ) {
				settings.errorcount = 0;
				settings.connectionError = false;
				$document.trigger( 'heartbeat-connection-restored' );
				wp.hooks.doAction( 'heartbeat.connection-restored' );
			}
		}

		/**
		 * Gathers the data and connects to the server.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function connect() {
			var ajaxData, heartbeatData;

			// If the connection to the server is slower than the interval,
			// heartbeat connects as soon as the previous connection's response is received.
			if ( settings.connecting || settings.suspend ) {
				return;
			}

			settings.lastTick = time();

			heartbeatData = $.extend( {}, settings.queue );
			// Clear the data queue. Anything added after this point will be sent on the next tick.
			settings.queue = {};

			$document.trigger( 'heartbeat-send', [ heartbeatData ] );
			wp.hooks.doAction( 'heartbeat.send', heartbeatData );

			ajaxData = {
				data: heartbeatData,
				interval: settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000,
				_nonce: typeof window.heartbeatSettings === 'object' ? window.heartbeatSettings.nonce : '',
				action: 'heartbeat',
				screen_id: settings.screenId,
				has_focus: settings.hasFocus
			};

			if ( 'customize' === settings.screenId  ) {
				ajaxData.wp_customize = 'on';
			}

			settings.connecting = true;
			settings.xhr = $.ajax({
				url: settings.url,
				type: 'post',
				timeout: 30000, // Throw an error if not completed after 30 seconds.
				data: ajaxData,
				dataType: 'json'
			}).always( function() {
				settings.connecting = false;
				scheduleNextTick();
			}).done( function( response, textStatus, jqXHR ) {
				var newInterval;

				if ( ! response ) {
					setErrorState( 'empty' );
					return;
				}

				clearErrorState();

				if ( response.nonces_expired ) {
					$document.trigger( 'heartbeat-nonces-expired' );
					wp.hooks.doAction( 'heartbeat.nonces-expired' );
				}

				// Change the interval from PHP.
				if ( response.heartbeat_interval ) {
					newInterval = response.heartbeat_interval;
					delete response.heartbeat_interval;
				}

				// Update the heartbeat nonce if set.
				if ( response.heartbeat_nonce && typeof window.heartbeatSettings === 'object' ) {
					window.heartbeatSettings.nonce = response.heartbeat_nonce;
					delete response.heartbeat_nonce;
				}

				// Update the Rest API nonce if set and wp-api loaded.
				if ( response.rest_nonce && typeof window.wpApiSettings === 'object' ) {
					window.wpApiSettings.nonce = response.rest_nonce;
					// This nonce is required for api-fetch through heartbeat.tick.
					// delete response.rest_nonce;
				}

				$document.trigger( 'heartbeat-tick', [response, textStatus, jqXHR] );
				wp.hooks.doAction( 'heartbeat.tick', response, textStatus, jqXHR );

				// Do this last. Can trigger the next XHR if connection time > 5 seconds and newInterval == 'fast'.
				if ( newInterval ) {
					interval( newInterval );
				}
			}).fail( function( jqXHR, textStatus, error ) {
				setErrorState( textStatus || 'unknown', jqXHR.status );
				$document.trigger( 'heartbeat-error', [jqXHR, textStatus, error] );
				wp.hooks.doAction( 'heartbeat.error', jqXHR, textStatus, error );
			});
		}

		/**
		 * Schedules the next connection.
		 *
		 * Fires immediately if the connection time is longer than the interval.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function scheduleNextTick() {
			var delta = time() - settings.lastTick,
				interval = settings.mainInterval;

			if ( settings.suspend ) {
				return;
			}

			if ( ! settings.hasFocus ) {
				interval = 120000; // 120 seconds. Post locks expire after 150 seconds.
			} else if ( settings.countdown > 0 && settings.tempInterval ) {
				interval = settings.tempInterval;
				settings.countdown--;

				if ( settings.countdown < 1 ) {
					settings.tempInterval = 0;
				}
			}

			if ( settings.minimalInterval && interval < settings.minimalInterval ) {
				interval = settings.minimalInterval;
			}

			window.clearTimeout( settings.beatTimer );

			if ( delta < interval ) {
				settings.beatTimer = window.setTimeout(
					function() {
						connect();
					},
					interval - delta
				);
			} else {
				connect();
			}
		}

		/**
		 * Sets the internal state when the browser window becomes hidden or loses focus.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function blurred() {
			settings.hasFocus = false;
		}

		/**
		 * Sets the internal state when the browser window becomes visible or is in focus.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function focused() {
			settings.userActivity = time();

			// Resume if suspended.
			settings.suspend = false;

			if ( ! settings.hasFocus ) {
				settings.hasFocus = true;
				scheduleNextTick();
			}
		}

		/**
		 * Runs when the user becomes active after a period of inactivity.
		 *
		 * @since 3.6.0
		 * @access private
		 *
		 * @return {void}
		 */
		function userIsActive() {
			settings.userActivityEvents = false;
			$document.off( '.wp-heartbeat-active' );

			$('iframe').each( function( i, frame ) {
				if ( isLocalFrame( frame ) ) {
					$( frame.contentWindow ).off( '.wp-heartbeat-active' );
				}
			});

			focused();
		}

		/**
		 * Checks for user activity.
		 *
		 * Runs every 30 seconds. Sets 'hasFocus = true' if user is active and the window
		 * is in the background. Sets 'hasFocus = false' if the user has been inactive
		 * (no mouse or keyboard activity) for 5 minutes even when the window has focus.
		 *
		 * @since 3.8.0
		 * @access private
		 *
		 * @return {void}
		 */
		function checkUserActivity() {
			var lastActive = settings.userActivity ? time() - settings.userActivity : 0;

			// Throttle down when no mouse or keyboard activity for 5 minutes.
			if ( lastActive > 300000 && settings.hasFocus ) {
				blurred();
			}

			// Suspend after 10 minutes of inactivity when suspending is enabled.
			// Always suspend after 60 minutes of inactivity. This will release the post lock, etc.
			if ( ( settings.suspendEnabled && lastActive > 600000 ) || lastActive > 3600000 ) {
				settings.suspend = true;
			}

			if ( ! settings.userActivityEvents ) {
				$document.on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active', function() {
					userIsActive();
				});

				$('iframe').each( function( i, frame ) {
					if ( isLocalFrame( frame ) ) {
						$( frame.contentWindow ).on( 'mouseover.wp-heartbeat-active keyup.wp-heartbeat-active touchend.wp-heartbeat-active', function() {
							userIsActive();
						});
					}
				});

				settings.userActivityEvents = true;
			}
		}

		// Public methods.

		/**
		 * Checks whether the window (or any local iframe in it) has focus, or the user
		 * is active.
		 *
		 * @since 3.6.0
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {boolean} True if the window or the user is active.
		 */
		function hasFocus() {
			return settings.hasFocus;
		}

		/**
		 * Checks whether there is a connection error.
		 *
		 * @since 3.6.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {boolean} True if a connection error was found.
		 */
		function hasConnectionError() {
			return settings.connectionError;
		}

		/**
		 * Connects as soon as possible regardless of 'hasFocus' state.
		 *
		 * Will not open two concurrent connections. If a connection is in progress,
		 * will connect again immediately after the current connection completes.
		 *
		 * @since 3.8.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {void}
		 */
		function connectNow() {
			settings.lastTick = 0;
			scheduleNextTick();
		}

		/**
		 * Disables suspending.
		 *
		 * Should be used only when Heartbeat is performing critical tasks like
		 * autosave, post-locking, etc. Using this on many screens may overload
		 * the user's hosting account if several browser windows/tabs are left open
		 * for a long time.
		 *
		 * @since 3.8.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @return {void}
		 */
		function disableSuspend() {
			settings.suspendEnabled = false;
		}

		/**
		 * Gets/Sets the interval.
		 *
		 * When setting to 'fast' or 5, the interval is 5 seconds for the next 30 ticks
		 * (for 2 minutes and 30 seconds) by default. In this case the number of 'ticks'
		 * can be passed as second argument. If the window doesn't have focus,
		 * the interval slows down to 2 minutes.
		 *
		 * @since 3.6.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string|number} speed Interval: 'fast' or 5, 15, 30, 60, 120.
		 *                              Fast equals 5.
		 * @param {string}        ticks Tells how many ticks before the interval reverts
		 *                              back. Used with speed = 'fast' or 5.
		 *
		 * @return {number} Current interval in seconds.
		 */
		function interval( speed, ticks ) {
			var newInterval,
				oldInterval = settings.tempInterval ? settings.tempInterval : settings.mainInterval;

			if ( speed ) {
				switch ( speed ) {
					case 'fast':
					case 5:
						newInterval = 5000;
						break;
					case 15:
						newInterval = 15000;
						break;
					case 30:
						newInterval = 30000;
						break;
					case 60:
						newInterval = 60000;
						break;
					case 120:
						newInterval = 120000;
						break;
					case 'long-polling':
						// Allow long polling (experimental).
						settings.mainInterval = 0;
						return 0;
					default:
						newInterval = settings.originalInterval;
				}

				if ( settings.minimalInterval && newInterval < settings.minimalInterval ) {
					newInterval = settings.minimalInterval;
				}

				if ( 5000 === newInterval ) {
					ticks = parseInt( ticks, 10 ) || 30;
					ticks = ticks < 1 || ticks > 30 ? 30 : ticks;

					settings.countdown = ticks;
					settings.tempInterval = newInterval;
				} else {
					settings.countdown = 0;
					settings.tempInterval = 0;
					settings.mainInterval = newInterval;
				}

				/*
				 * Change the next connection time if new interval has been set.
				 * Will connect immediately if the time since the last connection
				 * is greater than the new interval.
				 */
				if ( newInterval !== oldInterval ) {
					scheduleNextTick();
				}
			}

			return settings.tempInterval ? settings.tempInterval / 1000 : settings.mainInterval / 1000;
		}

		/**
		 * Enqueues data to send with the next XHR.
		 *
		 * As the data is send asynchronously, this function doesn't return the XHR
		 * response. To see the response, use the custom jQuery event 'heartbeat-tick'
		 * on the document, example:
		 *		$(document).on( 'heartbeat-tick.myname', function( event, data, textStatus, jqXHR ) {
		 *			// code
		 *		});
		 * If the same 'handle' is used more than once, the data is not overwritten when
		 * the third argument is 'true'. Use `wp.heartbeat.isQueued('handle')` to see if
		 * any data is already queued for that handle.
		 *
		 * @since 3.6.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string}  handle      Unique handle for the data, used in PHP to
		 *                              receive the data.
		 * @param {*}       data        The data to send.
		 * @param {boolean} noOverwrite Whether to overwrite existing data in the queue.
		 *
		 * @return {boolean} True if the data was queued.
		 */
		function enqueue( handle, data, noOverwrite ) {
			if ( handle ) {
				if ( noOverwrite && this.isQueued( handle ) ) {
					return false;
				}

				settings.queue[handle] = data;
				return true;
			}
			return false;
		}

		/**
		 * Checks if data with a particular handle is queued.
		 *
		 * @since 3.6.0
		 *
		 * @param {string} handle The handle for the data.
		 *
		 * @return {boolean} True if the data is queued with this handle.
		 */
		function isQueued( handle ) {
			if ( handle ) {
				return settings.queue.hasOwnProperty( handle );
			}
		}

		/**
		 * Removes data with a particular handle from the queue.
		 *
		 * @since 3.7.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string} handle The handle for the data.
		 *
		 * @return {void}
		 */
		function dequeue( handle ) {
			if ( handle ) {
				delete settings.queue[handle];
			}
		}

		/**
		 * Gets data that was enqueued with a particular handle.
		 *
		 * @since 3.7.0
		 *
		 * @memberOf wp.heartbeat.prototype
		 *
		 * @param {string} handle The handle for the data.
		 *
		 * @return {*} The data or undefined.
		 */
		function getQueuedItem( handle ) {
			if ( handle ) {
				return this.isQueued( handle ) ? settings.queue[handle] : undefined;
			}
		}

		initialize();

		// Expose public methods.
		return {
			hasFocus: hasFocus,
			connectNow: connectNow,
			disableSuspend: disableSuspend,
			interval: interval,
			hasConnectionError: hasConnectionError,
			enqueue: enqueue,
			dequeue: dequeue,
			isQueued: isQueued,
			getQueuedItem: getQueuedItem
		};
	};

	/**
	 * Ensure the global `wp` object exists.
	 *
	 * @namespace wp
	 */
	window.wp = window.wp || {};

	/**
	 * Contains the Heartbeat API.
	 *
	 * @namespace wp.heartbeat
	 * @type {Heartbeat}
	 */
	window.wp.heartbeat = new Heartbeat();

}( jQuery, window ));


text:
#include "config.h"
#include "CursorGtk.h"
#include "GtkVersioning.h"

#include "Image.h"
#include "IntPoint.h"
#include "RefPtrCairo.h"
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <wtf/Assertions.h>

namespace WebCore {

static GRefPtr<GdkCursor> createNamedCursor(CustomCursorType cursorType)
{
    CustomCursor cursor = CustomCursors[cursorType];
    GRefPtr<GdkCursor> c = adoptGRef(gdk_cursor_new_from_name(gdk_display_get_default(), cursor.name));
    if (c)
        return c;

    IntSize cursorSize = IntSize(32, 32);
    RefPtr<cairo_surface_t> source = adoptRef(cairo_image_surface_create_for_data(const_cast<unsigned char*>(cursor.bits), CAIRO_FORMAT_A1, 32, 32, 4));
    RefPtr<cairo_surface_t> mask = adoptRef(cairo_image_surface_create_for_data(const_cast<unsigned char*>(cursor.mask_bits), CAIRO_FORMAT_A1, 32, 32, 4));
    RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_A1, 32, 32));
    RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get()));

    cairo_set_source_surface(cr.get(), source.get(), cursor.hot_x, cursor.hot_y);
    cairo_mask_surface(cr.get(), mask.get(), cursor.hot_x, cursor.hot_y);

    GRefPtr<GdkPixbuf> pixbuf = adoptGRef(gdk_pixbuf_get_from_surface(surface.get(), 0, 0, 32, 32));
    return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), 0, 0));
}

static GRefPtr<GdkCursor> createCustomCursor(Image* image, const IntPoint& hotSpot)
{
    IntPoint effectiveHotSpot = determineHotSpot(image, hotSpot);
    GRefPtr<GdkPixbuf> pixbuf = adoptGRef(image->getGdkPixbuf());
    return adoptGRef(gdk_cursor_new_from_pixbuf(gdk_display_get_default(), pixbuf.get(), effectiveHotSpot.x(), effectiveHotSpot.y()));
}

void Cursor::ensurePlatformCursor() const
{
    if (m_platformCursor || m_type == Cursor::Pointer)
        return;

    switch (m_type) {
    case Cursor::Pointer:
        // A null GdkCursor is the default cursor for the window.
        m_platformCursor = 0;
        break;
    case Cursor::Cross:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_CROSS));
        break;
    case Cursor::Hand:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_HAND2));
        break;
    case Cursor::IBeam:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_XTERM));
        break;
    case Cursor::Wait:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_WATCH));
        break;
    case Cursor::Help:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_QUESTION_ARROW));
        break;
    case Cursor::Move:
    case Cursor::MiddlePanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_FLEUR));
        break;
    case Cursor::EastResize:
    case Cursor::EastPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_RIGHT_SIDE));
        break;
    case Cursor::NorthResize:
    case Cursor::NorthPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_TOP_SIDE));
        break;
    case Cursor::NorthEastResize:
    case Cursor::NorthEastPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_LEFT_SIDE));
        break;
    case Cursor::NorthWestResize:
    case Cursor::NorthWestPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_TOP_LEFT_CORNER));
        break;
    case Cursor::SouthResize:
    case Cursor::SouthPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_BOTTOM_SIDE));
        break;
    case Cursor::SouthEastResize:
    case Cursor::SouthEastPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_BOTTOM_RIGHT_CORNER));
        break;
    case Cursor::SouthWestResize:
    case Cursor::SouthWestPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_BOTTOM_LEFT_CORNER));
        break;
    case Cursor::WestResize:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_LEFT_SIDE));
        break;
    case Cursor::NorthSouthResize:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_TOP_TEE));
        break;
    case Cursor::EastWestResize:
    case Cursor::WestPanning:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_LEFT_SIDE));
        break;
    case Cursor::NorthEastSouthWestResize:
    case Cursor::NorthWestSouthEastResize:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_SIZING));
        break;
    case Cursor::ColumnResize:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_SB_H_DOUBLE_ARROW));
        break;
    case Cursor::RowResize:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_SB_V_DOUBLE_ARROW));
        break;
    case Cursor::VerticalText:
        m_platformCursor = createNamedCursor(CustomCursorVerticalText);
        break;
    case Cursor::Cell:
        m_platformCursor = adoptGRef(gdk_cursor_new(GDK_PLUS));
        break;
    case Cursor::ContextMenu:
        m_platformCursor = createNamedCursor(CustomCursorContextMenu);
        break;
    case Cursor::Alias:
        m_platformCursor = createNamedCursor(CustomCursorAlias);
        break;
    case Cursor::Progress:
        m_platformCursor = createNamedCursor(CustomCursorProgress);
        break;
    case Cursor::NoDrop:
    case Cursor::NotAllowed:
        m_platformCursor = createNamedCursor(CustomCursorNoDrop);
        break;
    case Cursor::Copy:
        m_platformCursor = createNamedCursor(CustomCursorCopy);
        break;
    case Cursor::None:
        m_platformCursor = createNamedCursor(CustomCursorNone);
        break;
    case Cursor::ZoomIn:
        m_platformCursor = createNamedCursor(CustomCursorZoomIn);
        break;
    case Cursor::ZoomOut:
        m_platformCursor = createNamedCursor(CustomCursorZoomOut);
        break;
    case Cursor::Grab:
        m_platformCursor = createNamedCursor(CustomCursorGrab);
        break;
    case Cursor::Grabbing:
        m_platformCursor = createNamedCursor(CustomCursorGrabbing);
        break;
    case Cursor::Custom:
        m_platformCursor = createCustomCursor(m_image.get(), m_hotSpot);
        break;
    }
}

Cursor::Cursor(const Cursor& other)
    : m_type(other.m_type)
    , m_image(other.m_image)
    , m_hotSpot(other.m_hotSpot)
    , m_platformCursor(other.m_platformCursor)
{
}

Cursor& Cursor::operator=(const Cursor& other)
{
    m_type = other.m_type;
    m_image = other.m_image;
    m_hotSpot = other.m_hotSpot;
    m_platformCursor = other.m_platformCursor;
    return *this;
}

Cursor::~Cursor()
{
}

}


text:
Imports SistFoncreagro.BussinessEntities
Public Interface IDetalleComprobanteBL
    Sub SaveDetalleComprobante(ByVal detalleComprobante As DetalleComprobante)
    Sub DeleteDetalleComprobante(ByVal idDetalleComprobante As Int32)
    Function GetAllFromDetalleComprobanteByIdOcxFactura(ByVal idOcxFactura As Int32) As List(Of DetalleComprobante)
End Interface


text:
package com.orainteractive.orachat.base;

import javax.inject.Inject;

import io.reactivex.Observable;
import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Base Presenter class with implementing
 * common methods to most presenters.
 * Created by kamilabrito on 7/25/17.
 */

public abstract class BasePresenter <V extends BaseView> {

    @Inject
    protected V mView;

    protected V getView() {
        return mView;
    }

    protected <T> void subscribe(Observable<T> observable, Observer<T> observer) {
        observable.subscribeOn(Schedulers.newThread())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }

    public abstract void update(Observable observable, Object o);
}


text:
namespace ui {
namespace test {

class OneEuroFilterTest : public InputFilterTest {
 public:
  explicit OneEuroFilterTest() {}

  OneEuroFilterTest(const OneEuroFilterTest&) = delete;
  OneEuroFilterTest& operator=(const OneEuroFilterTest&) = delete;

  void SetUp() override { filter_ = std::make_unique<OneEuroFilter>(1, 1); }
};

TEST_F(OneEuroFilterTest, TestClone) {
  TestCloneFilter();
}

TEST_F(OneEuroFilterTest, TestReset) {
  TestResetFilter();
}

// Check if sending values between 0 and 1 keeps filtered values between 0 and 1
TEST_F(OneEuroFilterTest, filteringValues) {
  base::TimeTicks ts = PredictionUnittestHelpers::GetStaticTimeStampForTests();
  gfx::PointF point;
  for (int i = 0; i < 100; i++) {
    point.SetPoint(base::RandDouble(), base::RandDouble());
    EXPECT_TRUE(filter_->Filter(ts, &point));
    EXPECT_LT(point.x(), 1.0);
    EXPECT_LT(point.y(), 1.0);
    EXPECT_GT(point.x(), 0.0);
    EXPECT_GT(point.y(), 0.0);
  }
}

}  // namespace test
}  // namespace ui


text:
<?php

/**
 * Shipment admin block
 *
 * @category    Mfb
 * @package     Mfb_Myflyingbox
 * @author      Ultimate Module Creator
 */
class Mfb_Myflyingbox_Block_Adminhtml_Shipment extends Mage_Adminhtml_Block_Widget_Grid_Container
{
    /**
     * constructor
     *
     * @access public
     * @return void
     * @author Ultimate Module Creator
     */
    public function __construct()
    {
        $this->_controller         = 'adminhtml_shipment';
        $this->_blockGroup         = 'mfb_myflyingbox';
        parent::__construct();
        $this->_headerText         = Mage::helper('mfb_myflyingbox')->__('Shipment');
        $this->_updateButton('add', 'label', Mage::helper('mfb_myflyingbox')->__('Add Shipment'));

    }
}


text:
layout: page
title: Search
sidebar: exclude
search: exclude
---

<p>
  Hey there! How can we help?
</p>

{% include search.html %}


text:
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin

from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.auth.models import Group

admin.autodiscover()
admin.site.unregister(Group)
admin.site.unregister(Site)

urlpatterns = patterns('',
    url(r'^login/$', 'django.contrib.auth.views.login'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', dict(next_page=settings.LOGIN_URL)),
    url(r'^account/$', 'django.contrib.auth.views.password_change'),
    url(r'^account/password-changed/$', 'django.contrib.auth.views.password_change_done', name='password_change_done'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^books/', include('mediasnakebooks.urls')),
    url(r'^comics/', include('mediasnakecomics.urls')),
    url(r'^', include('mediasnakefiles.urls')),
)


text:
package org.aries.tx;

import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;

import org.aries.jms.client.JmsClient;

public abstract class AbstractJMSServiceSideArquillionTest extends AbstractServiceSideArquillionTest {

	protected String getJNDINameForQueue(String destinationName) {
		return getJNDINameForDestination(destinationName, "queue");
	}

	protected String getJNDINameForTopic(String destinationName) {
		return getJNDINameForDestination(destinationName, "topic");
	}

	protected String getJNDINameForDestination(String destinationName, String typeName) {
		if (!destinationName.startsWith(typeName))
			return typeName + "/" + destinationName;
		return destinationName;
	}

	protected JmsClient createClient(String destination) throws Exception {
		JmsClient client = new JmsClient();
		configureClient(client, destination);
		//client.initialize();
		return client;
	}

	protected JmsClient createMockServiceListener(String destination, MessageListener messageListener) throws Exception {
		JmsClient client = createClient(destination, messageListener);
		return client;
	}

	protected JmsClient createClient(Destination destination) throws Exception {
		JmsClient client = new JmsClient();
		configureClient(client, destination);
		//client.initialize();
		return client;
	}

	protected JmsClient createClient(Destination destination, MessageListener messageListener) throws Exception {
		JmsClient client = new JmsClient();
		configureClient(client, destination, messageListener);
		//client.initialize();
		return client;
	}

	protected JmsClient createClient(String destination, MessageListener messageListener) throws Exception {
		JmsClient client = new JmsClient();
		configureClient(client, destination, messageListener);
		//client.initialize();
		return client;
	}

	protected void configureClient(JmsClient client, Destination destination) throws Exception {
		configureClient(client);
		client.setDestination(destination);
	}

	protected void configureClient(JmsClient client, Destination destination, MessageListener messageListener) throws Exception {
		configureClient(client, messageListener);
		client.setDestination(destination);
	}

	protected void configureClient(JmsClient client, String destination) throws Exception {
		configureClient(client);
		client.setDestinationName(destination);
	}

	protected void configureClient(JmsClient client, String destination, MessageListener messageListener) throws Exception {
		configureClient(client, messageListener);
		client.setDestinationName(destination);
	}

	protected void configureClient(JmsClient client, MessageListener messageListener) throws Exception {
		configureClient(client);
		client.setMessageListener(messageListener);
	}

	protected void configureClient(JmsClient client) throws Exception {
		client.setUserName(configuration.getUsername());
		client.setPassword(configuration.getPassword());
		client.setInitialContextProperties(configuration.getInitialContextProperties());
		//if (isLocal)
			client.setConnectionFactoryName(configuration.getLocalConnectionFactoryName());
		//else client.setConnectionFactoryName(configuration.getRemoteConnectionFactoryName());
	}

	@SuppressWarnings("unchecked")
	protected <T> T getObjectFromMessage(Message message) throws JMSException {
		if (message instanceof ObjectMessage) {
			ObjectMessage objectMessage = (ObjectMessage) message;
			T object = (T) objectMessage.getObject();
			return object;
		} else {
			T object = (T) message.getObjectProperty("MessageContent");
			return object;
		}
	}

}


text:
require 'open_jtalk'

text = "こんにちは。".encode("UTF-8")

OpenJtalk.load(config.OpenJtalk::Config::Mei::NORMAL) do |openjtalk|
  header, data = openjtalk.synthesis(openjtalk.normalize_text(text))
  OpenJtalk::Mp3FileWriter.save("a.mp3", header, data)
end