text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2016 The Android Open Source Project
  ~
  ~ 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
  -->

<LinearLayout android:id="@+id/notification_main_column_container"
              xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:minHeight="@dimen/notification_large_icon_height"
              android:orientation="horizontal"
              android:paddingRight="12dp"
              android:paddingEnd="12dp">

    <ImageView
        android:id="@+id/icon"
        android:layout_width="@dimen/notification_large_icon_width"
        android:layout_height="@dimen/notification_large_icon_height"
        android:background="@drawable/notification_tile_bg"
        android:scaleType="center"
        />

    <FrameLayout
        android:id="@+id/notification_main_column"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingLeft="12dp"
        android:paddingStart="12dp"
        android:paddingTop="@dimen/notification_main_column_padding_top"
        android:layout_weight="1"/>

    <FrameLayout
        android:id="@+id/right_side"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:paddingTop="12dp"
        android:paddingLeft="12dp">

        <include
            layout="@layout/notification_template_part_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="end|top"
            android:visibility="gone"/>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="end|bottom"
            android:layout_marginTop="18dp"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:singleLine="true"
                android:textAppearance="@style/TextAppearance.AppCompat.Notification.Info"
                />

            <ImageView
                android:id="@+id/right_icon"
                android:layout_width="24dp"
                android:layout_height="24dp"
                android:layout_gravity="center"
                android:layout_marginLeft="8dp"
                android:alpha="0.7"
                android:scaleType="center"
                android:visibility="gone"
                />
        </LinearLayout>
    </FrameLayout>
</LinearLayout>

redpajama_set_name: RedPajamaGithub


text:
package org.traccar.model;

public class Order extends ExtendedModel {

    private String uniqueId;

    public String getUniqueId() {
        return uniqueId;
    }

    public void setUniqueId(String uniqueId) {
        this.uniqueId = uniqueId;
    }

    private String description;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    private String fromAddress;

    public String getFromAddress() {
        return fromAddress;
    }

    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress;
    }

    private String toAddress;

    public String getToAddress() {
        return toAddress;
    }

    public void setToAddress(String toAddress) {
        this.toAddress = toAddress;
    }

}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
Copyright 2016 Goldman Sachs.
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.
-->
<ManagedObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="../../../xsd/objectmanager.xsd">
    <Templates>javeneruma,tetahij,wunopi,noki,nuzikuzu,wululu,interface,key</Templates>
    <PackageName>com.gs.fw.lilu.yayopi.domain</PackageName>
    <ImportPackageName>com.gs.fw.lilu.yayopi.domain.persistence.WevutuJesamobIdOmuneCejawefIjej</ImportPackageName>

    <ClassName>ViqiluKijoyicUzAsiveRorutot</ClassName>
    <DefaultTable>YAYOPI_POGIRO_KO_HEJIP_WAT</DefaultTable>
    <SchemaName>mut</SchemaName>
    <DatabaseName>yayopi</DatabaseName>
    <ReadOnly>true</ReadOnly>
    <ExplicitColumnNamesForSelect>true</ExplicitColumnNamesForSelect>
    <PrimaryKeyAttribute keyClass="XoqumuLekisiwEfIkujuCekupomOdu">
        <Attribute columnName="HEJIP_PO" javaType="int" name="huvukUn" sqlType="Ciyisag"/>
    </PrimaryKeyAttribute>

    <Attribute name="orderId" sqlType="Ciyisag" javaType="int" columnName="LITIK_P"/>

    <ForeignKeyAttribute name="lawaxiBeqeqesAso" keyClass="LawaxiBeqeqesAso">
        <Attribute columnName="POGIRO_PO" javaType="String" name="lumaroLi" sqlType="XefeTewesa"/>
    </ForeignKeyAttribute>

    <Index name="lawaxiBeqeqesAso">lawaxiBeqeqesAso</Index>

</ManagedObject>


text:
package org.springframework.jdbc.datasource;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.SQLException;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.jdbc.CannotGetJdbcConnectionException;
import org.springframework.util.ObjectUtils;

/**
 * Implementation of SmartDataSource that wraps a single connection which is not
 * closed after use. Obviously, this is not multi-threading capable.
 *
 *
Note that at shutdown, someone should close the underlying connection via the
 * close() method. Client code will never call close on the connection handle if it
 * is SmartDataSource-aware (e.g. uses DataSourceUtils.closeConnectionIfNecessary).
 *
 *
If client code will call close in the assumption of a pooled connection,
 * like when using persistence tools, set suppressClose to true. This will return a
 * close-suppressing proxy instead of the physical connection. Be aware that you will
 * not be able to cast this to a native OracleConnection or the like anymore.
 *
 *
This is primarily a test class. For example, it enables easy testing of code
 * outside an application server, in conjunction with a simple JNDI environment.
 * In contrast to DriverManagerDataSource, it reuses the same connection all the time,
 * avoiding excessive creation of physical connections.
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @see DataSourceUtils#closeConnectionIfNecessary
 */
public class SingleConnectionDataSource extends DriverManagerDataSource implements DisposableBean {

	private boolean suppressClose;

	/** Wrapped connection */
	private Connection target;

	/** Proxy connection */
	private Connection connection;

	/**
	 * Constructor for bean-style configuration.
	 */
	public SingleConnectionDataSource() {
	}

	/**
	 * Create a new SingleConnectionDataSource with the given standard
	 * DriverManager parameters.
	 * @param suppressClose if the returned connection should be a
	 * close-suppressing proxy or the physical connection.
	 */
	public SingleConnectionDataSource(
			String driverClassName, String url, String username, String password, boolean suppressClose)
			throws CannotGetJdbcConnectionException {
		super(driverClassName, url, username, password);
		this.suppressClose = suppressClose;
	}

	/**
	 * Create a new SingleConnectionDataSource with a given connection.
	 * @param target underlying target connection
	 * @param suppressClose if the connection should be wrapped with a* connection that
	 * suppresses close() calls (to allow for normal close() usage in applications that
	 * expect a pooled connection but do not know our SmartDataSource interface).
	 */
	public SingleConnectionDataSource(Connection target, boolean suppressClose) {
		if (target == null) {
			throw new IllegalArgumentException("Connection is null in SingleConnectionDataSource");
		}
		this.suppressClose = suppressClose;
		init(target);
	}

	/**
	 * Set if the returned connection should be a close-suppressing proxy
	 * or the physical connection.
	 */
	public void setSuppressClose(boolean suppressClose) {
		this.suppressClose = suppressClose;
	}

	/**
	 * Return if the returned connection will be a close-suppressing proxy
	 * or the physical connection.
	 */
	public boolean isSuppressClose() {
		return suppressClose;
	}

	/**
	 * This is a single connection: Do not close it when returning to the "pool".
	 */
	public boolean shouldClose(Connection con) {
		return false;
	}

	/**
	 * Initialize the underlying connection via DriverManager.
	 */
	protected void init() throws SQLException {
		init(getConnectionFromDriverManager());
	}

	/**
	 * Initialize the underlying connection.
	 * Wraps the connection with a close-suppressing proxy if necessary.
	 * @param target the JDBC Connection to use
	 */
	protected void init(Connection target) {
		this.target = target;
		this.connection = this.suppressClose ? getCloseSuppressingConnectionProxy(target) : target;
	}

	/**
	 * Close the underlying connection.
	 * The provider of this DataSource needs to care for proper shutdown.
	 *
As this bean implements DisposableBean, a bean factory will
	 * automatically invoke this on destruction of its cached singletons.
	 */
	public void destroy() throws SQLException {
		if (this.target != null) {
			this.target.close();
		}
	}

	public Connection getConnection() throws SQLException {
		synchronized (this) {
			if (this.connection == null) {
				// no underlying connection -> lazy init via DriverManager
				init();
			}
		}
		if (this.connection.isClosed()) {
			throw new SQLException(
					"Connection was closed in SingleConnectionDataSource. Check that user code checks " +
					"shouldClose() before closing connections, or set suppressClose to true");
		}
		if (logger.isDebugEnabled()) {
			logger.debug("Returning single connection: " + this.connection);
		}
		return this.connection;
	}

	/**
	 * Specifying a custom username and password doesn't make sense
	 * with a single connection. Returns the single connection if given
	 * the same username and password, though.
	 */
	public Connection getConnection(String username, String password) throws SQLException {
		if (ObjectUtils.nullSafeEquals(username, getUsername()) &&
				ObjectUtils.nullSafeEquals(password, getPassword())) {
			return getConnection();
		}
		else {
			throw new SQLException("SingleConnectionDataSource does not support custom username and password");
		}
	}

	/**
	 * Wrap the given Connection with a proxy that delegates every method call to it
	 * but suppresses close calls.
	 * @param target the original Connection to wrap
	 * @return the wrapped Connection
	 */
	protected Connection getCloseSuppressingConnectionProxy(Connection target) {
		return (Connection) Proxy.newProxyInstance(
				ConnectionProxy.class.getClassLoader(),
				new Class[] {ConnectionProxy.class},
				new CloseSuppressingInvocationHandler(target));
	}

	/**
	 * Invocation handler that suppresses close calls on JDBC Connections.
	 */
	private static class CloseSuppressingInvocationHandler implements InvocationHandler {

		private static final String GET_TARGET_CONNECTION_METHOD_NAME = "getTargetConnection";

		private static final String CONNECTION_CLOSE_METHOD_NAME = "close";

		private final Connection target;

		private CloseSuppressingInvocationHandler(Connection target) {
			this.target = target;
		}

		public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
			if (method.getName().equals(GET_TARGET_CONNECTION_METHOD_NAME)) {
				return this.target;
			}
			if (method.getName().equals(CONNECTION_CLOSE_METHOD_NAME)) {
				// don't pass the call on
				return null;
			}
			try {
				return method.invoke(this.target, args);
			}
			catch (InvocationTargetException ex) {
				throw ex.getTargetException();
			}
		}
	}

}


text:
module Cms::Nodes::Node
  class EditCell < Cell::Rails
    include Cms::NodeFilter::EditCell
    model Cms::Node::Node
  end

  class ViewCell < Cell::Rails
    include Cms::NodeFilter::ViewCell
    helper Cms::ListHelper

    public
      def index
        @items = Cms::Node.site(@cur_site).public.
          where(@cur_node.condition_hash).
          order_by(@cur_node.sort_hash).
          page(params[:page]).
          per(@cur_node.limit)

        @items.empty? ? "" : render
      end
  end
end


text:
'use strict';

/* Filters */

var app = angular.module('myApp.splash_pages.filters', []);

app.filter('periodicFilter', function() {

  return function (text) {
    if (text === 'daily' ) {
      return 'day';
    } else if ( text === 'weekly' ) {
      return 'week';
    } else { return 'month'; }
  };

});

app.filter('translateAccessTypeName', ['gettextCatalog', function(gettextCatalog) {
  return function(input) {
    switch(input) {
      case 1:
        return gettextCatalog.getString('Password');
      case 2:
        return gettextCatalog.getString('Vouchers');
      case 3:
        return gettextCatalog.getString('Clickthrough');
      case 7:
        return gettextCatalog.getString('Social');
      case 8:
        return gettextCatalog.getString('Registration');
      case 9:
        return gettextCatalog.getString('QuickCodes');
      default:
        return gettextCatalog.getString('N/A');
    }
  };
}]);

app.filter('translatablePrimaryAccess', ['gettextCatalog', function(gettextCatalog) {
  return function(input) {
    switch(input) {
      case 'Password':
        return gettextCatalog.getString('Password');
      case 'Vouchers':
        return gettextCatalog.getString('Vouchers');
      case 'Clickthrough':
        return gettextCatalog.getString('Clickthrough');
      case 'Social':
        return gettextCatalog.getString('Social');
      case 'Registration':
        return gettextCatalog.getString('Registration');
      case 'QuickCodes':
        return gettextCatalog.getString('QuickCodes');
      default:
        return gettextCatalog.getString('N/A');
    }
  };
}]);


text:
{% if page.comments %}

Please enable JavaScript to view the comments powered by Disqus.
{% endif %}


text:
class RangeClassifier
  attr_reader :projection

  def initialize(projection=RangeClassifier.id, ranges: [])
    @projection = projection
    @ranges = ranges
  end

  def append_ranges(ranges)
    @ranges.concat(ranges)
    self
  end

  def append_lower_stream(stream, low: nil)
    stream.each do |high, result|
      @ranges << {
        lower: [low, high],
        result: result
      }
      low = high
    end
    self
  end

  def classify(element, *args)
    lkey, ukey = @projection.call(element, *args)
    selected = @ranges.find { |range|
      matches_section(range[:lower], lkey) && matches_section(range[:upper], ukey)
    }
    selected[:result]
  end

  private

  def self.id
    -> (v) {[v, v]}
  end

  def matches_section(range, key)
    return true if range.nil?
    l, u = range
    (l.nil? || l <= key) && (u.nil? || u >= key)
  end
end


text:
#import "AIProgressView.h"

NSString *const kAIProgressAnimationKey = @"AIProgressAnimationKey";

@interface AIProgressLayer : CALayer

@property(nonatomic, assign) CGFloat radiusOffset;
@property(nonatomic, assign) CGFloat radiusFill;
@property(nonatomic, copy) UIColor *color;

@end

@implementation AIProgressLayer

@synthesize color=_color;

- (id)initWithLayer:(AIProgressLayer *)layer
{
    self = [super initWithLayer:layer];
    if (self) {
        self.color = layer.color;
    }
    return self;
}

+ (BOOL)needsDisplayForKey:(NSString *)key
{
    if ([key isEqualToString:@"radiusOffset"] || [key isEqualToString:@"radiusFill"] || [key isEqualToString:@"color"]) {
        return YES;
    }
    return [super needsDisplayForKey:key];
}

- (void)drawInContext:(CGContextRef)context
{
    CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
    CGContextSaveGState(context);

    CGFloat x = self.bounds.size.width / 2.f;
    CGFloat y = self.bounds.size.height / 2.f;

    CGFloat radius = MIN(self.bounds.size.width, self.bounds.size.height) / 2.f - 1.f;

    CGContextSetLineJoin(context, kCGLineJoinRound);
    CGContextSetLineCap(context, kCGLineCapRound);

    CGContextBeginPath(context);

    CGContextAddArc(context, x, y, radius, _radiusOffset + _radiusFill, _radiusOffset, YES);

    CGContextSetStrokeColorWithColor(context, self.color.CGColor);
    CGContextSetLineWidth(context, 2.f);

    CGContextDrawPath(context, kCGPathStroke);

    CGContextRestoreGState(context);
}

- (UIColor *)color
{
    return _color;
}

- (void)setColor:(UIColor *)color
{
    _color = color;
}

@end

@interface AIProgressView ()

@end

@implementation AIProgressView

+ (Class)layerClass
{
    return [AIProgressLayer class];
}

- (void)setColor:(UIColor *)color
{
    _color = color;

    AIProgressLayer *layer = (AIProgressLayer *)self.layer;
    layer.color = color;
}

- (void)awakeFromNib
{
     [super awakeFromNib];

    AIProgressLayer *layer = (AIProgressLayer *)self.layer;
    layer.contentsScale = [UIScreen mainScreen].scale;
}

- (void)startAnimating
{
    AIProgressLayer *layer = (AIProgressLayer *)self.layer;
    [[self animations] enumerateObjectsUsingBlock:^(CAAnimation *animation, NSUInteger idx, BOOL *stop) {
        [layer addAnimation:animation forKey:nil];
    }];
}

- (NSArray *)animations
{
    CABasicAnimation *spinAnimation = [CABasicAnimation animationWithKeyPath:@"radiusOffset"];
    spinAnimation.toValue = @(M_PI * 2.f);
    spinAnimation.fromValue = @(0.f);
    spinAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    spinAnimation.duration = 2.0;
    spinAnimation.repeatCount = INFINITY;
    spinAnimation.removedOnCompletion = NO;
    spinAnimation.beginTime = CACurrentMediaTime() + 1.f;

    CABasicAnimation *fillAnimation = [CABasicAnimation animationWithKeyPath:@"radiusFill"];
    fillAnimation.toValue = @(M_PI);
    fillAnimation.fromValue = @(0.f);
    fillAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    fillAnimation.duration = 1.0;
    fillAnimation.removedOnCompletion = NO;
    fillAnimation.fillMode = kCAFillModeForwards;

    return @[spinAnimation, fillAnimation];
}

- (void)stopAnimating
{
    AIProgressLayer *layer = (AIProgressLayer *)self.layer;
    [layer removeAllAnimations];
}

@end


text:
TOPSRCDIR = ..
include $(TOPSRCDIR)/make.inc

.PHONY: all
all: blas

.PHONY: blas
blas:
	$(MAKE) -C SRC

.PHONY: blas_testing
blas_testing: blas
	$(MAKE) -C TESTING run

.PHONY: clean cleanobj cleanlib cleanexe cleantest
clean:
	$(MAKE) -C SRC clean
	$(MAKE) -C TESTING clean
cleanobj:
	$(MAKE) -C SRC cleanobj
	$(MAKE) -C TESTING cleanobj
cleanlib:
	$(MAKE) -C SRC cleanlib
cleanexe:
	$(MAKE) -C TESTING cleanexe
cleantest:
	$(MAKE) -C TESTING cleantest


text:
- Fix the moor analyzer plugin not starting

Version 4.6.1+1 adds information about the name change to the README.

## 4.6.0

- Add `DoUpdate.withExcluded` to refer to the excluded row in an upsert clause.
- Add optional `where` clause to `DoUpdate` constructors

### Important notice

Moor has been renamed to `drift`. This package will continue to be supported until the next major release (5.0.0),
no immediate action is needed.

At the next breaking release, moor will  be discontinued in favor of the `drift` package.
Please consider migrating to `drift` at a suitable opportunity.
Automated migration tooling exists! See https://drift.simonbinder.eu/name for details.

## 4.5.0

- Add `moorRuntimeOptions.debugPrint` option to control which `print` method is used by moor.
- Add a `rowId` extension on generated tables.
- Add `NullAwareTypeConverter` to simplify type converters that always map `null` from and to `null`.
- Kill backing isolates after calling `MoorIsolate.shutdownAll`.

## 4.4.1

- Include latest generator in analyzer plugin

## 4.4.0

- Add `Value.ofNullable` constructor to easily wrap nullable values.
- Support selecting views declared in a moor file in Dart (with `select`,
  `join` and similar methods)
- Add the `scoped_dart_components` builder option to generate a function for
  [Dart components in SQL](https://moor.simonbinder.eu/docs/using-sql/moor_files/#dart-components-in-sql).
  The function's parameters reflect tables that are in scope.
- Add the `UpsertMultiple` class to run multiple upsert clauses in an insert.
  This requires sqlite3 version 3.35 or later.
- Add the `closeUnderlyingOnClose` argument to `VmDatabase.opened` as an option
  to keep the underlying instance opened when closing the `VmDatabase`.
- The `tableUpdates` stream now emits the relevant updates instead of `null`.
- Reflect type converters in generated columns. The `equalsValue` method can be used
  as an equals with a value mapped by a type converter.
- Improve nullability analysis for SQL queries.
- __Note__: You have to re-generate sources with `moor_generator` version 4.4.0 after
  upgrading to this version. Apologies for the inconvenience.

## 4.3.2

- Fix `insertReturning` not updating streams
- Fix streams emitting stale data if a new subscriber attaches immediately
  after an update.

## 4.3.1

- Fix encoding table updates without a kind over isolates
- Fix deserializing some nullable types in the default value serializer

## 4.3.0

- Support custom, existing classes for rows! See the `@UseRowClass` annotation
  for details.
- Add `CASE WHEN` expressions with the `caseMatch` method on `Expression`
- Add `insertReturning` which returns the generated row after an insert
- Add `min`, `max` and `avg` functions for `DateTime` expressions
- On supported platforms, cancel pending stream selects when the stream is disposed
  - `moor_flutter` is supported
  - `moor/ffi` is supported when used on a background isolate

## 4.2.1

- Deprecate `readBool`, `readString`, `readInt`, `readDouble`, `readDateTime`
  and `readBlob` in `QueryRow`.
  Use `read` directly (which supports nullable types).

## 4.2.0

- Fixed subqueries not affecting stream updates
- Throw a `CouldNotRollBackException` when rolling back a transaction throws

## 4.1.0

- Reverted the `SelectableUtils` extension, its members have been added back to the
  `Selectable` class.
- Add `trim()`, `trimLeft()` and `trimRight()` extensions for text expressions
- Initial support for sub-queries in the Dart api:
    - `Expression.isInQuery` and `isNotInQuery` for `IS IN (SELECT ...)` matching
    - `subqueryExpression` to use single-column, single-row selects as values
    - `existsQuery` and `notExistsQuery` for `EXISTS` expressions
- New `package:moor/remote.dart` library to access databases over any `StreamChannel`. The isolate library has been
  rewritten on top of that api.

## 4.0.0-nullsafety.1

- __Breaking__: `getSingle()` and `watchSingle()` are now non-nullable and throw for empty results.
  Use `getSingleOrNull()` and `watchSingleOrNull()` for the old behavior.
- __Breaking__: Removed `QueryEngine`, its methods have been moved to `DatabaseConnectionUser`
- __Breaking__: Changed the `args` parameter in `QueryExecutor` methods to `List<Object?>`
- __Breaking__: Removed the second type parameter from `TypedResult.read`
- __Breaking__: `TypedResult.read` and `TypedResult.readTable` now throw if the row does not contain the requested table
  or expression (they used to return `null`).
- __Breaking__: `MoorWebStorage.indexedDbIfSupported` now returns a future
- __Breaking__: `getSingle` and `watchSingle` (and their `orNull()` variants) are now an extension on `Selectable`.
  Import `package:moor/moor.dart` to files using those methods.
- Support null safety
- Changed the sql representation of text types from `VARCHAR` to `TEXT`
- Added extensions for `isNull` and `isNotNull`
- Support creating a `VmDatabase` from a raw sqlite3 `Database` via `VmDatabase.opened`
- New `named_parameters` build option to generate named parameters for named variables in moor files
- Added `Migrator.renameTable` to rename tables

## 3.4.0

- New `TableMigration` api to make complex table migrations easier. See the
  [updated documentation](https://moor.simonbinder.eu/docs/advanced-features/migrations/#complex-migrations) for details
  on how to use this feature.
- New `DatabaseConnection.delayed` constructor to synchronously obtain a database connection that requires an async
  setup. This can be useful when connecting to a `MoorIsolate`.
- `VmDatabase`: Create directory of database file to avoid misuse errors from sqlite3.
- New feature in moor files: You can now set the default value for Dart templates:
  `filter ($predicate = TRUE): SELECT * FROM my_table WHERE $predicate`. This generates an optional named parameter in
  Dart.
- New `generate_values_in_copy_with` [build option](https://moor.simonbinder.eu/docs/advanced-features/builder_options/)
  . It wraps nullable columns in a `Value` in `copyWith` methods so that they can be set to `null`.
- Added `groupConcat`, `cast` and `coalesce` functions to the Dart query builder.
- Added `renameColumn` to `Migrator` to generate `ALTER TABLE RENAME COLUMN` statements.
- Added `VmDatabase.closeExistingInstances()` to close zombie database connections after hot restarts on some OSes.

## 3.3.1

- Support changing `onData` handlers for query streams. This fixes a bug occurring when using `queryStream.first`
  multiple times.

## 3.3.0

- New `package:moor/ffi.dart` library to replace the `moor_ffi` package. When migrating, Flutter users need to depend on
  the `sqlite3_flutter_libs` package as well. The changelog of `moor_ffi` contains further information about this
- New (in
  generator): `apply_converters_on_variables` [build option](https://moor.simonbinder.eu/docs/advanced-features/builder_options/)
  . When enabled, type converter will be enabled on variables for analyzed queries. This will be the default option in
  the future.

## 3.2.0

- It's now possible to change the name of a class generated for moor-file queries. See
  [the documentation](https://moor.simonbinder.eu/docs/using-sql/moor_files/#result-class-names) for details.
- Added the `multiLine`, `caseSensitive`, `unicode` and `doAll` flags to the `regex` sql extension method. They
  require `moor_ffi` version `0.7.0` or later.

## 3.1.0

- Update companions now implement `==` and `hashCode`
- New `containsCase` method for text in `package:moor/extensions/moor_ffi.dart`
- The `toCompanion` method is back for data classes, but its generation can be disabled with a build option
- New
  feature: [Implicit enum converters](https://moor.simonbinder.eu/docs/advanced-features/type_converters/#implicit-enum-converters)
- Added the `destructiveFallback` extension to databases. It can be used in `migrationStrategy` to delete and then
  re-create all tables, indices and triggers.

## 3.0.2

- Fix update statements not escaping column names ([#539](https://github.com/simolus3/moor/issues/539))

## 3.0.1

- Fix `mapFromRowOrNull` not working without a prefix ([#534](https://github.com/simolus3/moor/pull/534))

## 3.0.0

- __Breaking__: `package:moor/moor_web.dart` no longer exports `package:moor/moor.dart`. If you've relied on this,
  you'll now need to import `package:moor/moor.dart` as well.
- __Breaking__: Remove deprecated members:
    - top-level `and`, `or` and `not` methods. Use `&`, `|` and `.not()` instead.
    - top-level `year`, `month`, `day`, `hour`, `minute`, `second` methods. Use the extension member
      on `Expression<DateTime>` instead.
    - `InsertStatement.insertAll` (use batches instead)
    - the `orReplace` boolean parameter on inserts (use `mode: InsertMode.orReplace` instead)
    - remove the top-level `isIn` and `isNotIn` functions
      (use the `.isIn` and `.isNotIn` instance methods instead)
    - `CustomSelectStatement.execute` and `constructFetcher` - use `get()` or `watch()`, respectively
- __Breaking__: Remove the second type variable on `Expression` and subclasses.
- __Breaking__: Remove `customSelectStream` from `QueryEngine`. The `customSelect`
  method now returns an `Selectable` (like `customSelectQuery`, which in turn has been deprecated).
- __Breaking__: Columns that are aliases to sqlite's `rowid` column are no longer considered required for inserts
- __Breaking__: Changes the way data classes and companions are inserted:
    - Removed `Insertable.toCompanion`
    - Added `Insertable.toColumns` to obtain a map from column names to values that should be inserted
    - Removed `TableInfo.entityToSql` - use `Insertable.toColumns` instead
- __Breaking__: Renamed the `db` field in daos to `attachedDatabase`. The old field is available through an extension.
- __Breaking__: The `compact_query_methods` and `use_column_name_as_json_key_when_defined_in_moor_file` build options
  are now enabled by default. This means that queries in moor files now generate a `Selectable` method by default (
  instead of two methods for `get` and `watch`). Columns defined in moor files will have their sql name as json key (
  moor used to transform their name to `camelCase`). You can still disable both options to keep the old behavior.
- __Breaking__: The last statement in a moor file must now end with a semicolon as well
- Batches now run statements in the order they were issued. This required a breaking change for engine implementers.
- Experimentally support IndexedDB to store sqlite data on the web
- Moor will no longer wait for query stream listeners to receive a done event when closing a database or transaction.
- Updated stream queries: They now take triggers into account and more accurately detect when an update is necessary.
- New `tableUpdates` method that can be used to listen for a subset of table updates outside of a query.
- New feature: Nested results for compiled queries ([#288](https://github.com/simolus3/moor/issues/288))
  See the [documentation](https://moor.simonbinder.eu/docs/using-sql/moor_files/#nested-results) for details on how and
  when to use this feature.
- New feature: Use sql expressions for inserts or updates with the new `custom` factory on companions
- New feature: Upserts in the Dart api! Read everything you need to know
  [here](https://moor.simonbinder.eu/docs/getting-started/writing_queries/#upserts).
- Support using `MoorIsolates` in scenarios where only primitive messages can be passed between isolates.

## 2.4.2

- Fix `beforeOpen` callback deadlocking when using the isolate executor
  ([#431](https://github.com/simolus3/moor/issues/431))
- Fix limit clause not being applied when using `.join` afterwards
  ([#433](https://github.com/simolus3/moor/issues/433))

## 2.4.1

- Don't generate double quoted string literals in date time functions

## 2.4.0

- Support aggregate expressions and `group by` in the Dart api
- Support type converters in moor files!
  The [documentation](https://moor.simonbinder.eu/docs/advanced-features/type_converters/)
  has been updated to explain how to use them.
- Support stream queries in transactions ([#356](https://github.com/simolus3/moor/issues/365))
- Support table-valued functions (like `json_each` and `json_tree`) in moor files
  [#260](https://github.com/simolus3/moor/issues/260).
- Fix a crash when opening a transaction without using it ([#361](https://github.com/simolus3/moor/issues/361))
- New `mapFromCompanion` method in generated tables to convert a `UpdateCompanion` to a model.
- Support generated moor classes in other builders (like `built_value`).
  Details [in the docs](https://moor.simonbinder.eu/docs/advanced-features/builder_options/)

## 2.3.0

- New `clientDefault` method for columns. It can be used for dynamic defaults that might be different for each row. For
  instance, you can generate a uuid for each row with `text().clientDefault(() => Uuid().v4()();`
- New CLI tool to analyze moor files: Learn more at [https://moor.simonbinder.eu/cli](https://moor.simonbinder.eu/cli)
- Ability to override the default `ValueSerializer` globally by using `moorRuntimeOptions.valueSerializer`.
- Moor files: You can now explicitly declare column types in those cases that the analyzer can't infer it:
  ```
  selectVariable(:variable AS TEXT): SELECT :variable;
  ```
- Support for triggers and indices! You can declare them in a `.moor` file with a regular `CREATE TRIGGER`
  or `CREATE INDEX` statement. Both triggers and indices will be created in the default `onCreate` function. To create
  them in `onUpgrade`, use the new `createIndex` and `createTrigger` functions on a `Migrator`.
- Support for moor-file queries that run on initialization ([#280](https://github.com/simolus3/moor/issues/280))
  Declare them like this `@create: INSERT INTO users VALUES ('default', 'user')`
- Support deletes in batches ([#325](https://github.com/simolus3/moor/issues/325))
- Reduce unnecessary queries when a stream is unsubscribed and then
  re-subscribed ([#329](https://github.com/simolus3/moor/issues/329))
- Experimental new type inference for the sql analyzer. For details, check the
  `use_experimental_inference` [build option](https://moor.simonbinder.eu/docs/advanced-features/builder_options/)
- Web: New `initializer` parameter to create the database when it doesn't exist

## 2.2.0

- Support custom expressions for selects in the Dart API:
  ```dart
  final currentBalance = accounts.income - accounts.expenses;
  select(accounts).addColumns([currentBalance]).map((row) {
    Account account = row.readTable(accounts);
    int balanceOfAccount = row.read(currentBalance);
    return ...
  }).get();
  ```
- Support the `json1` and `fts5` extensions! Using them also requires version 2.2 of `moor_generator`
  and they require `moor_ffi`. For details, see
  the [documentation](https://moor.simonbinder.eu/docs/using-sql/extensions/).
- Standardized behavior of batches in transactions across backends
- Introduced `OrderingTerm.asc` and `OrderingTerm.desc` factories to construct ordering terms more easily

## 2.1.1

- Fix crash when closing a database with asserts disabled
- Web: Save the database after migrations ran
- Escape column names in insert statements, if necessary

## 2.1.0

- New extension methods to simplify the Dart api!
    - Use `&`, `or` and `.not()` to combine boolean expressions.
      ```dart
      // OLD
      select(animals)..where((a) => and(not(a.isMammal), a.amountOfLegs.equals(4)))
      // NEW:
      select(animals)..where((a) => a.isMammal.not() & a.amountOfLegs.equals(4))
      ```
    - Arithmetic: New `+`, `-`, `*` and `/` operators for int and double sql expressions
    - New `+` operator for string concatenation
- Fix crash when `customStatement` is the first operation used on a
  database ([#199](https://github.com/simolus3/moor/issues/199))
- Allow transactions inside a `beforeOpen` callback
- New `batch` method on generated databases to execute multiple queries in a single batch
- Experimental support to run moor on a background isolate
- Reduce use of parentheses in SQL code generated at runtime
- Query streams now emit errors that happened while running the query
- Upgraded the sql parser which now supports `WITH` clauses in moor files
- Internal refactorings on the runtime query builder

## 2.0.1

- Introduced `isBetween` and `isBetweenValues` methods for comparable expressions (int, double, datetime)
  to check values for both an upper and lower bound
- Automatically map `BOOLEAN` and `DATETIME` columns declared in a sql file to the appropriate type
  (both used to be `double` before).
- Fix streams not emitting cached data when listening multiple times
- __Breaking__: Remove the type parameter from `Insertable.createCompanion` (it was declared as an internal method)

__2.0.1+1__: Fix crash when `customStatement` is the first operation used on a database
([#199](https://github.com/simolus3/moor/issues/199))

## 2.0.0

This is the first major update after the initial release and moor and we have a lot to cover:
`.moor` files can now have their own imports and queries, you can embed Dart in sql queries using the new templates
feature and we have a prototype of a pure-Dart SQL IDE ready. Finally, we also removed a variety of deprecated features.
See the breaking changes section to learn what components are affected and what alternatives are available.

### New features

#### Updates to the sql parser

`.moor` files were introduced in moor 1.7 as an experimental way to declare tables by using
`CREATE TABLE` statements. In this version, they become stable and support their own import and query system. This
allows you to write queries in their own file:

```sql
CREATE TABLE users
(
    id   INT     NOT NULL PRIMARY KEY AUTOINCREMENT,
    name VARCHAR NOT NULL
);

findByName
:
SELECT *
FROM users
WHERE name LIKE :query;
```

When this file is included from a `@UseMoor` annotation, moor will generate methods to run the query. Of course, you can
also write Dart queries for tables declared in sql:

```dart
Stream<User> loadUserById(int id) {
  return (select(users)
    ..where((u) => u.id.equals(2))).watchSingle();
}
```

Moor files can also import other moor files by using an `import 'other.moor';` statement at the top. Then, all tables
defined in `other.moor` will also be available to the current file.

Moor takes Dart and SQL interop even further with the new "Dart in SQL templates". You can define a query like this:

```sql
findDynamic
:
SELECT *
FROM users
WHERE $condition;
```

And moor will generate a method `findDynamic(Expression<bool, BoolType> condition)` for you. This allows you to bind the
template with a predicate as complex as you'd like. At the moment, Dart templates are supported for
expressions, `OrderBy`, `OrderingTerm` and `Limit`.

`INSERT` statements can now be used as a compiled statement - both in moor files and in a `@UseMoor` or `@UseDao`
annotation. A new builtin linter will even warn you when you forget to provide a value for a non-nullable column - right
at compile time!

And finally, we now generate better query code when queries only return a single column. Instead of generating a whole
new class for that, we simply return the value directly.

#### Experimental ffi support

We released an experimental version of moor built on top of `dart:ffi`. It works cross-platform and is much, much faster
than `moor_flutter`. It you want to try it out, read the docs [here](https://moor.simonbinder.eu/docs/other-engines/vm/)
.

### Minor changes

- a `Constant<String>` can now be written to SQL, it used to throw before. This is useful if you need default values for
  strings columns. This also works for `BLOBS`
  (`Constant<Uint8List>`).
- new `LazyDatabase` for when you want to construct a database asynchronously (for instance, if you first need to find a
  file before you can open a database).

### Breaking changes

- __THIS LIKELY AFFECTS YOUR APP:__ Removed the `transaction` parameter for callbacks in transactions and `beforeOpen`
  callbacks. So, instead of writing
  ```dart
  transaction((t) async {
    await t.update(table)...;
  });
  ```
  simply write
  ```dart
  transaction(() async {
    await update(table)...;
  });
  ```
  Similarly, instead of using `onOpen: (db, details) async {...}`, use
  `onOpen: (details) async {...}`. You don't have to worry about calling methods on your database instead of a
  transaction objects. They will be delegated automatically.

  On a similar note, we also removed the `operateOn` parameter from compiled queries.
- Compiled queries that return only a single column (e.g. `SELECT COUNT(*) FROM users`)
  will just return their value (in this case, an `int`) now. Moor no longer generates a new class in that case.
- Removed `MigrationStrategy.onFinished`. Use `beforeOpen` instead.
- Compiled sql queries starting with an underscore will now generate private match queries. Previously, the
  query `_allUsers` would generate a `watchAllUsers` method, that has been adopted to `_watchAllUsers`.
  The `generate_private_watch_methods` builder option, which backported this fix to older versions, has thus been
  removed.
- Removed `InsertStatement.insertOrReplace`. Use `insert(data, orReplace: true)` instead.
- Removed the diff util and `MoorAnimatedList`. Use a third party library for that.

## 1.7.2

- Fixed a race condition that caused the database to be opened multiple times on slower devices. This problem was
  introduced in `1.7.0` and was causing problems during migrations.

## 1.7.1

- Better documentation on `getSingle` and `watchSingle` for queries.
- Fix `INTEGER NOT NULL PRIMARY KEY` wrongly requiring a value during insert (this never affected
  `AUTOINCREMENT` columns, and only affects columns declared in a `.moor` file)

## 1.7.0

- Support custom columns via type converters. See the [docs](https://moor.simonbinder.eu/type_converters)
  for details on how to use this feature.
- Transactions now roll back when not completed successfully, they also rethrow the exception to make debugging easier.
- New `backends` api, making it easier to write database drivers that work with moor. Apart from
  `moor_flutter`, new experimental backends can be checked out from git:
    1. `encrypted_moor`: An encrypted moor database: https://github.com/simolus3/moor/tree/develop/extras/encryption
- The compiled sql feature is no longer experimental and will stay stable until a major version bump
- New, experimental support for `.moor` files! Instead of declaring your tables in Dart, you can choose to declare them
  with sql by writing the `CREATE TABLE` statement in a `.moor` file. You can then use these tables in the database and
  with daos by using the `include` parameter on `@UseMoor` and `@UseDao`. Again, please notice that this is an
  experimental api and there might be some hiccups. Please report any issues you run into.

## 1.6.0

- Experimental web support! See [the documentation](https://moor.simonbinder.eu/web) for details.
- Make transactions easier to use: Thanks to some Dart async magic, you no longer need to run queries on the transaction
  explicitly. This
  ```dart
  Future deleteCategory(Category category) {
    return transaction((t) async {
      await t.delete(categories).delete(category);
    });
  }
  ```
  is now the same as this (notice how we don't have to use the `t.` in front of the delete)
  ```dart
    Future deleteCategory(Category category) {
      return transaction((t) async {
        await delete(categories).delete(category);
      });
    }
    ```
  This makes it much easier to compose operations by extracting them into methods, as you don't have to worry about not
  using the `t` parameter.
- Moor now provides syntax sugar for list parameters in compiled custom queries
  (`SELECT * FROM entries WHERE id IN ?`)
- Support `COLLATE` expressions.
- Date time columns are now comparable
- The `StringType` now supports arbitrary data from sqlite ([#70](https://github.com/simolus3/moor/pull/70)).
  Thanks, [knaeckeKami](https://github.com/knaeckeKami)!
- Bugfixes related to stream queries and `LIMIT` clauses.

## 1.5.1

- Fixed an issue where transformed streams would not always update
- Emit a `INSERT INTO table DEFAULT VALUES` when appropriate. Moor used to generate invalid sql before.

## 1.5.0

This version introduces some new concepts and features, which are explained in more detail below. Here is a quick
overview of the new features:

- More consistent and reliable callbacks for migrations. You can now use `MigrationStrategy.beforeOpen`
  to run queries after migrations, but before fully opening the database. This is useful to initialize data.
- Greatly expanded documentation, introduced additional checks to provide more helpful error messages
- New `getSingle` and `watchSingle` methods on queries: Queries that you know will only return one row can now be
  instructed to return the value directly instead of wrapping it in a list.
- New "update companion" classes to clearly separate between absent values and explicitly setting values back to null -
  explained below.
- Experimental support for compiled sql queries: __Moor can now generate typesafe APIs for written sql__. Read on to get
  started.

### Update companions

Newly introduced "Update companions" allow you to insert or update data more precisely than before. Previously, there
was no clear separation between "null" and absent values. For instance, let's say we had a table "users" that stores an
id, a name, and an age. Now, let's say we wanted to set the age of a user to null without changing its name. Would we
use `User(age: null)`? Here, the `name` column would implicitly be set to null, so we can't cleanly separate that.
However, with `UsersCompanion(age: Value(null))`, we know the difference between `Value(null)` and the
default `Value.absent()`.

Don't worry, all your existing code will continue to work, this change is fully backwards compatible. You might get
analyzer warnings about missing required fields. The migration to update companions will fix that. Replacing normal
classes with their update companions is simple and the only thing needed to fix that.
The [documentation](https://moor.simonbinder.eu/queries/#updates-and-deletes)
has been updated to reflect this. If you have additional questions, feel free to
[create an issue](https://github.com/simolus3/moor/issues/new).

### Compiled sql queries

Experimental support for compile time custom statements. Sounds super boring, but it actually gives you a fluent way to
write queries in pure sql. The moor generator will figure out what your queries return and automatically generate the
boring mapping part. Head on to
[the documentation](https://moor.simonbinder.eu/queries/custom) to find out how to use this new feature.

Please note that this feature is in an experimental state: Expect minor, but breaking changes in the API and in the
generated code. Also, if you run into any issues with this feature,
[reporting them](https://github.com/simolus3/moor/issues/new) would be super appreciated.

## 1.4.0

- Added the `RealColumn`, which stores floating point values
- Better configuration for the serializer with the `JsonKey` annotation and the ability to use a
  custom `ValueSerializer`

## 1.3.0

- Moor now supports table joins
    - Added table aliases
- Default values for columns: Just use the `withDefault` method when declaring a column
    - added expressions that resolve to the current date or time
- Fixed a crash that would occur if the first operation was a transaction
- Better support for custom expressions as part of a regular query
- Faster hashcode implementation in generated data classes

## 1.2.0

- __Breaking__: Generated DAO classes are now called `_$YourNameHere`, it used to be just `_YourNameHere` (without the
  dollar sign)
- Blob data type
- `insertOrReplace` method for insert statements
- DAOs can now operate on transactions
- Custom constraints
- Query streams are now cached so that equal queries yield identical streams. This can improve performance.

## 1.1.0

- Transactions

## 1.0.0

- Initial version of the Moor library


text:
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

prog=skyhopper
lockfile=/var/lock/subsys/$prog

start() {
	[ "$EUID" != "0" ] && exit 4
	[ "$NETWORKING" = "no" ] && exit 1
	[ -x /project/skyhopper/scripts/skyhopper_daemon.sh ] || exit 5

	# Start daemon.
	echo -n $"Starting $prog: "
	su - skyhopper -c "(cd /project/skyhopper/;/project/skyhopper/scripts/skyhopper_daemon.sh  start)"
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch $lockfile
	return $RETVAL
}

stop() {
	[ "$EUID" != "0" ] && exit 4
        echo -n $"Shutting down $prog: "
	su - skyhopper -c "(cd /project/skyhopper/;/project/skyhopper/scripts/skyhopper_daemon.sh  stop)"
	RETVAL=$?
        echo
	[ $RETVAL -eq 0 ] && rm -f $lockfile
	return $RETVAL
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status $prog
	;;
  restart|force-reload)
	stop
	start
	;;
  try-restart|condrestart)
	if status $prog > /dev/null; then
	    stop
	    start
	fi
	;;
  reload)
	exit 3
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|try-restart|force-reload}"
	exit 2
esac


text:
import { set } from '@ember/object';
import { run } from '@ember/runloop';
import { settled } from '@ember/test-helpers';

/**
 * ## Test Helpers
 *
 * This test helper can be used to interact with the database in your tests.
 * It works with the new test syntax, and can be used in all styles of tests (e.g. acceptance, integration, unit).
 *
 * ```js
 * import { setupIndexedDb } from 'ember-indexeddb/test-support/helpers/indexed-db';
 *
 * module('Acceptance | my test', function(hooks) {
 *  setupApplicationTest(hooks);
 *  setupIndexedDb(hooks);
 *
 *   // add your actual tests here
 * });
 * ```
 *
 * This will setup & open a randomly named database for this test, and close & delete it again after the test.
 *
 * @module Test Helpers
 * @public
 */
export function setupIndexedDb(hooks) {
  hooks.beforeEach(function () {
    let indexedDb = this.owner.lookup('service:indexed-db');
    set(indexedDb, 'databaseName', `test-indexed-db-${+new Date()}`);

    return indexedDb.setupTask.perform();
  });

  hooks.afterEach(async function () {
    let indexedDb = this.owner.lookup('service:indexed-db');
    await settled();
    await run(() => indexedDb.waitForQueueTask.perform());
    await run(() => indexedDb.waitForQueueTask.perform());
    await indexedDb.dropDatabaseTask.perform();
  });
}

export default setupIndexedDb;


text:
/* - Coeus web framework -------------------------
 *
 * Licensed under the Apache License, Version 2.0.
 *
 * Author: Spiros Tzavellas
 */
package com.tzavellas.coeus.mvc.scope

import org.junit.Test
import org.junit.Assert._
import org.springframework.mock.web.MockHttpSession

class WebSessionTest extends AbstractScopedContainerTest with CheckAndActOperationsTest {

  val mock = new MockHttpSession
  val session = new WebSession(mock)

  val attributes = session

  def setAttributeToMock(name: String, value: Any) {
    mock.setAttribute(name, value)
  }

  @Test
  def simple_test_for_isNew() {
    assertTrue(session.isNew)
  }

  @Test
  def invalidate_the_http_session() {
    session.invalidate()
    assertTrue(mock.isInvalid)
  }
}


text:
$(document).ready(function () {

    $('.activeProvider').on('change', function () {

        var check = this.checked,
            c = confirm('esta seguro de cambiar el estado actual de proveedor ?');
        if (c) {

            var voteForm = new VoteForm($('#FormUpdateProvider'), $(this));
            voteForm.submit();

        } else {
            if (check) {

                $('this').prop('checked', false);
                return;
            }

            $(this).prop('checked', true);
        }

    });

});

function VoteForm(form, button) {

    var id = button.data('id');
    var action = form.attr('action').replace(':id', id);

    this.submit = function () {
        console.log(id);
        $.post(action, form.serialize(), function (response) {
            console.log(response);

        }).fail(function () {
            button.removeClass('hidden');
            alert('Ocurrió un error :(');
        });
    };
}


text:
var express = require('express');
var cheerio = require('cheerio');
var superagent = require('superagent');

var app = express();

app.get('/', function (req, res, next) {
  superagent.get('https://cnodejs.org/')
    .end(function (err, sres) {
      if (err) {
        return next(err);
      }
      var $ = cheerio.load(sres.text);
      var items = [];
      $('#topic_list .topic_title').each(function (idx, element) {
        var $element = $(element);
        items.push({
          title: $element.attr('title'),
          href: $element.attr('href')
        });
      });

      res.send(items);
    });
});

app.listen(3000, function () {
  console.log('app is listening at port 3000');
});


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IProjectedTypeResolver.cs" company="Kephas Software SRL">
//   Copyright (c) Kephas Software SRL. All rights reserved.
//   Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
// <summary>
//   Declares the IProjectedTypeResolver interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Kephas.Model
{
    using System;

    using Kephas.Services;

    /// <summary>
    /// Interface for projected type resolver.
    /// </summary>
    [SingletonAppServiceContract]
    public interface IProjectedTypeResolver
    {
        /// <summary>
        /// Resolves the projected type.
        /// </summary>
        /// <param name="projectionType">The projection type.</param>
        /// <param name="context">Optional. A context for the resolution.</param>
        /// <param name="throwOnNotFound">Optional. Indicates whether to throw or not when the indicated type is not found.</param>
        /// <returns>
        /// The resolved type or <c>null</c>, if <paramref name="throwOnNotFound"/> is set to false and a projected type could not be found.
        /// </returns>
        Type ResolveProjectedType(Type projectionType, IContext? context = null, bool throwOnNotFound = true);
    }
}


text:
<?php
/**
 * Kudos class file
 *
 * @author Evgeniy Kuzminov
 * @license MIT License
 * http://stdout.in
 */
namespace ijackua\kudos;

use Yii;
use yii\base\Widget;

/**
 *
 */
class Kudos extends Widget
{
	/**
	 * Identifier of widget for localStorage (if you want to have more that one widget on page/site)
	 *
	 * @var string
	 */
	public $widgetId;
	/**
	 * Unique id of current item you receive kudos for (generally those one you have in DB)
	 *
	 * @var string
	 */
	public $uid;
	/**
	 * Preset count of Kudos current item already has (taken somewhere from DB)
	 *
	 * @var integer
	 */
	public $count;
	/**
	 * Default class value for internal circle element
	 * You would definitely like to put there something nice (some cole font-smile from Bootstrap or Fontello etc.)
	 *
	 * @var string
	 */
	public $defaultClass;
	/**
	 * JavaScript functions to fire on events
	 *
	 * @var string
	 */
	public $onActive;
	public $onInactive;
	public $onAdded;
	public $onRemoved;
	/**
	 * Text "Kudos"
	 *
	 * @var string
	 */
	public $textTxt;
	/**
	 * Text "Don't move!"
	 *
	 * @var string
	 */
	public $textDontmove;

	public function init()
	{
		parent::init();

		$this->textTxt = \Yii::t("app", "Kudos");
		$this->textDontmove = \Yii::t("app", "Don't move!");
	}

	public function run()
	{

		KudosAssets::register($this->view);
		$this->registerScripts();

		$html = '
getId() . '" class="kudo kudoable" data-id="' . $this->widgetId . '" data-uid="' . $this->uid . '">

							defaultClass . '">

				' . $this->count . '
				' . $this->textTxt . '
				' . $this->textDontmove . '

';

		return $html;
	}

	public function registerScripts()
	{
		$selector = '#' . $this->getId();

		$script = '$("' . $selector . '").kudoable();';

		$script .= (!empty($this->onActive)) ? '$("' . $selector . '") . on("kudo:active", ' . $this->onActive . ');' : '';
		$script .= (!empty($this->onInactive)) ? '$("' . $selector . '") . on("kudo:inactive", ' . $this->onInactive . ');' : '';
		$script .= (!empty($this->onAdded)) ? '$("' . $selector . '") . on("kudo:added", ' . $this->onAdded . ');' : '';
		$script .= (!empty($this->onRemoved)) ? '$("' . $selector . '") . on("kudo:removed", ' . $this->onRemoved . ');' : '';

		$this->view->registerJs($script);
	}
}


text:
/* Custom Stylesheet */
/**
 * Use this file to override Materialize files so you can update
 * the core Materialize files in the future
 *
 * Made By MaterializeCSS.com
 */

#map {
   height: 400px;
   width: 100%;
   background-color: grey;
}

.slide-out-icon {
  float: left;
  margin: 3% 10% 3% 0;
}

nav ul a,
nav .brand-logo {
  color: #444;
}

p {
  line-height: 2rem;
}

.button-collapse {
  color: #26a69a;
}

.parallax-container {
  min-height: 380px;
  line-height: 0;
  height: auto;
  color: rgba(255,255,255,.9);
}
  .parallax-container .section {
    width: 100%;
  }

@media only screen and (max-width : 992px) and (min-width : 600px) {
  .parallax-container .section {
    position: absolute;
    top: 30%;
  }
  #index-banner .section {
    top: 10%;
  }
}

@media only screen and (max-width : 600px) {
  #index-banner .section {
    top: 0;
  }
}

.icon-block {
  padding: 0 15px;
}
.icon-block .material-icons {
  font-size: inherit;
}

footer.page-footer {
  margin: 0;
}

@font-face {
  font-family: 'Material Icons';
  font-style: normal;
  font-weight: 400;
  src: url(../fonts/iconfont/MaterialIcons-Regular.eot); /* For IE6-8 */
  src: local('Material Icons'),
       local('MaterialIcons-Regular'),
       url(../fonts/iconfont/MaterialIcons-Regular.woff2) format('woff2'),
       url(../fonts/iconfont/MaterialIcons-Regular.woff) format('woff'),
       url(../fonts/iconfont/MaterialIcons-Regular.ttf) format('truetype');
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;  /* Preferred icon size */
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;

  /* Support for all WebKit browsers. */
  -webkit-font-smoothing: antialiased;
  /* Support for Safari and Chrome. */
  text-rendering: optimizeLegibility;

  /* Support for Firefox. */
  -moz-osx-font-smoothing: grayscale;

  /* Support for IE. */
  font-feature-settings: 'liga';
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <androidx.appcompat.widget.Toolbar
        android:id="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimary"
        android:padding="0dp"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
        app:theme="@style/ThemeOverlay.AppCompat">

        <TextView
            android:id="@+id/logo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/madefor"
            android:textColor="#757575"
            android:textSize="20sp" />

    </androidx.appcompat.widget.Toolbar>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="16dp">

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_webianks"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:cardCornerRadius="8dp"
                app:cardPreventCornerOverlap="false"
                app:strokeColor="@color/grey"
                app:strokeWidth="0dp">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <ImageView
                        android:id="@+id/banner_webianks"
                        android:layout_width="match_parent"
                        android:layout_height="100dp"
                        android:background="#dddddd"
                        android:scaleType="centerCrop"
                        android:src="@drawable/default_banner_min" />

                    <com.google.android.material.imageview.ShapeableImageView
                        android:id="@+id/profile_webianks"
                        android:layout_width="120dp"
                        android:layout_height="120dp"
                        android:layout_alignParentStart="true"
                        android:layout_marginStart="16dp"
                        android:layout_marginTop="55dp"
                        android:layout_marginBottom="16dp"
                        android:padding="4dp"
                        android:scaleType="centerCrop"
                        app:shapeAppearanceOverlay="@style/circleImageView"
                        app:strokeColor="@color/white"
                        app:strokeWidth="4dp" />

                    <TextView
                        android:id="@+id/name_webianks"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="95dp"
                        android:layout_toEndOf="@id/profile_webianks"
                        android:fontFamily="@font/circularstd_book"
                        android:paddingLeft="16dp"
                        android:paddingTop="16dp"
                        android:paddingRight="16dp"
                        android:paddingBottom="4dp"
                        android:text="@string/name_webianks"
                        android:textSize="20sp"
                        android:textStyle="bold" />

                    <TextView
                        android:id="@+id/bio_webianks"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/name_webianks"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:layout_toRightOf="@id/profile_webianks"
                        android:text="@string/bio_webianks" />

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/bio_webianks"
                        android:layout_margin="16dp"
                        android:weightSum="3">

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/email_webianks"
                            style="@style/Widget.MaterialComponents.Button.TextButton"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:fontFamily="@font/circularstd_book"
                            android:onClick="sendEmail"
                            android:text="@string/email"
                            android:textColor="@color/colorAccent" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/github_webianks"
                            style="@style/Widget.MaterialComponents.Button.TextButton"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:fontFamily="@font/circularstd_book"
                            android:onClick="redirectGithub"
                            android:text="@string/github"
                            android:textColor="@color/colorAccent" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/website_webianks"
                            style="@style/Widget.MaterialComponents.Button.TextButton"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:fontFamily="@font/circularstd_book"
                            android:onClick="redirectWebsite"
                            android:text="@string/website"
                            android:textColor="@color/colorAccent" />

                    </LinearLayout>

                </RelativeLayout>

            </com.google.android.material.card.MaterialCardView>

            <com.google.android.material.card.MaterialCardView
                android:id="@+id/card_salroid"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/card_webianks"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="2dp"
                app:cardCornerRadius="8dp"
                app:cardPreventCornerOverlap="false"
                app:strokeColor="@color/grey"
                app:strokeWidth="0dp">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <ImageView
                        android:id="@+id/banner_salroid"
                        android:layout_width="match_parent"
                        android:layout_height="100dp"
                        android:background="#dddddd"
                        android:scaleType="centerCrop"
                        android:src="@drawable/default_banner_min" />

                    <com.google.android.material.imageview.ShapeableImageView
                        android:id="@+id/profile_salroid"
                        android:layout_width="120dp"
                        android:layout_height="120dp"
                        android:layout_alignParentStart="true"
                        android:layout_marginStart="16dp"
                        android:layout_marginTop="55dp"
                        android:layout_marginBottom="16dp"
                        android:padding="4dp"
                        android:scaleType="centerCrop"
                        app:shapeAppearanceOverlay="@style/circleImageView"
                        app:strokeColor="@color/white"
                        app:strokeWidth="4dp" />

                    <TextView
                        android:id="@+id/name_salroid"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_centerHorizontal="true"
                        android:layout_marginTop="95dp"
                        android:layout_toEndOf="@id/profile_salroid"
                        android:fontFamily="@font/circularstd_book"
                        android:paddingLeft="16dp"
                        android:paddingTop="16dp"
                        android:paddingRight="16dp"
                        android:paddingBottom="4dp"
                        android:text="@string/name_salroid"
                        android:textSize="20sp"
                        android:textStyle="bold" />

                    <TextView
                        android:id="@+id/bio_salroid"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/name_salroid"
                        android:layout_marginLeft="16dp"
                        android:layout_marginRight="16dp"
                        android:layout_toEndOf="@id/profile_salroid"
                        android:text="@string/bio_salroid" />

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/bio_salroid"
                        android:layout_margin="16dp"
                        android:weightSum="3">

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/email_salroid"
                            style="@style/Widget.MaterialComponents.Button.TextButton"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:fontFamily="@font/circularstd_book"
                            android:onClick="sendEmail"
                            android:text="@string/email"
                            android:textColor="@color/colorAccent" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/github_salroid"
                            style="@style/Widget.MaterialComponents.Button.TextButton"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:fontFamily="@font/circularstd_book"
                            android:onClick="redirectGithub"
                            android:text="@string/github"
                            android:textColor="@color/colorAccent" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/website_salroid"
                            style="@style/Widget.MaterialComponents.Button.TextButton"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_weight="1"
                            android:fontFamily="@font/circularstd_book"
                            android:onClick="redirectWebsite"
                            android:text="@string/website"
                            android:textColor="@color/colorAccent" />

                    </LinearLayout>

                </RelativeLayout>

            </com.google.android.material.card.MaterialCardView>

        </RelativeLayout>

    </ScrollView>

</LinearLayout>


text:
//
//  JCCircularCollectionViewProxy.h
//
//  Created by Jonathan Crooke on 10/04/2014.
//  Copyright (c) 2014 Jonathan Crooke. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 Protocol wrapper.

 @note `-collectionView:cellForItemAtIndexPath:` must still be overridden in order to dequeue
 the appropriate cell. *Don't customise the cell here*; use
 `-collectionView:configureCell:forIndexPath:`

  - (UICollectionViewCell *) collectionView:(UICollectionView *)collectionView
                     cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
    return [collectionView dequeueReusableCellWithReuseIdentifier:@"MyIdentifier"
                                                     forIndexPath:indexPath];
  }

 */
@protocol JCCircularCollectionViewProxyDataSource <UICollectionViewDataSource>
@required
/**
 *  Required additional method for actually configuring the dequeud cell.
 *
 *  @param collectionView The collection view
 *  @param cell           A dequeued reusable cell for the collection view
 *  @note  #protip - cast the cell argument to the expected cell subclass.
 *  @param indexPath      "True" index path for the cell, based on the data source's
 *  real item count.
 */
- (void) collectionView:(UICollectionView*) collectionView
          configureCell:(id) cell
           forIndexPath:(NSIndexPath*) indexPath;
@end

/**
 *  Proxy object
 */
@interface JCCircularCollectionViewProxy : NSObject
  <UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>

/**
 *  The current *page* in the context of the true data source.
 */
@property (nonatomic, assign, readwrite) NSUInteger currentPage;

/**
 *  Change the current page
 *
 *  @param currentPage New current page
 *  @param animated    `YES` to scroll animated
 */
- (void) setCurrentPage:(NSUInteger)currentPage
               animated:(BOOL) animated;

/**
 *  Designated initialiser
 *
 *  @param dataSource Object that conforms to the proxy data source
 *  @param delegate   Collection view delegate - can be `nil`.
 *
 *  @return Proxy
 */
+ (instancetype) proxyWithDataSource:(id <JCCircularCollectionViewProxyDataSource>) dataSource
                            delegate:(id <UICollectionViewDelegateFlowLayout>)delegate;

/**
 *  Required additional set up, once the collection view itself has been created
 *  and laid-out.
 *
 *  @param collectionView The collection view to use.
 */
- (void) configureForCollectionView:(UICollectionView*) collectionView;

/**
 *  Reload the collection view's data only
 *
 *  @param completion     Completion, executed after all set up
 */
- (void) reloadDataWithCompletion:(dispatch_block_t) completion;

/**
 *  Convert the given "expanded space" index path to an index path valid
 *  for the real data source.
 *
 *  @param indexPath An "expanded space" collection view index path
 *
 *  @return Index path in the context of the true data source
 */
- (NSIndexPath*) indexPathInTrueDataSourceForIndexPath:(NSIndexPath*) indexPath;

/**
 *  Calculate index into the "true" data source using a point in our
 *  fake expanded collection view.
 *
 *  @param point Point in the coordinate system of the expanded collection view.
 *
 *  @return Index path into your "real" data source.
 */
- (NSIndexPath *)indexPathForItemAtPoint:(CGPoint)point;

/**
 *  Proxy's the normal `UICollectionView` method.
 *
 *  @param indexPath      An index path in the context of the "true" data source
 *  @param scrollPosition UICollectionViewScrollPosition
 *  @param animated       Animate option
 */
- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath
               atScrollPosition:(UICollectionViewScrollPosition)scrollPosition
                       animated:(BOOL)animated;

/** I'm useless. */
- (id)init __attribute__((deprecated("Use +proxyWithDataSource:delegate:")));

@end

/**
 *  Convenience initialiser category
 */
@interface UICollectionView (CircularProxy)
/**
 *  Instantiate a proxy object and configure the receiver for it in one fell swoop.
 *
 *  @param dataSource Data source
 *  @param delegate   Optional delegate
 *
 *  @return Instantiated proxy - store in a `strong` property!
 */
- (JCCircularCollectionViewProxy*) circularProxyWithDataSource:(id <JCCircularCollectionViewProxyDataSource>) dataSource
                                                      delegate:(id <UICollectionViewDelegateFlowLayout>)delegate;
@end


text:
<tool id='anc_gate.ortho_2.3.0' name='GATE OrthoMatcher v2.3.0' version='1.0.1'>
  <description>GATE OrthoMatcher</description>
  <command>lsd $__tool_directory__/invoke.lsd gate.ortho_2.3.0 $input $output</command>
  <inputs>
    <param name='input' type='data' format='gate' />
  </inputs>
  <outputs>
    <data name='output' format='gate' />
  </outputs>
  <help><![CDATA[
**What it does**

Adds identity relations between previously identified named entities in order to perform coreference.

.. class:: infomark

**NOTE**: If input is from to this tools is the output of a pipeline of GATE tools including *GATE->GATE Gazetteer* and *GATE->GATE: NamedEntityRecognizer*, the
Orthomatcher may assign an entity type to an unclassified proper name (an "Unknown"" annotation), using the type of a matching name.

**Required Annotations**

* Named Entities in GATE XML format (will automatically convert from LIF)

**Generated Annotations**

A list of annotation IDs for annotations referring to the same entity as the value of the *matches* feature of any named entity annotation.
If converted to LIF using *Convert Formats->GateToLif*, the output will include `NamedEntity <http://vocab.lappsgrid.org/NamedEntity>`_
annotations with a list of annotation IDs for annotations referring to the same entity as the value of the *matches* feature.

**License**

This tool is adapted from the `General Architecture for Text Engineering (GATE) platform <http:gate.ac.uk>`_, which is released under the `GNU Lesser General Public License 3.0 <https://www.gnu.org/licenses/lgpl-3.0.html>`_

]]>
</help>
</tool>


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
null

#### Original name
Tilletia isachnae A.R. Patil, T.M. Patil & M.S. Patil

### Remarks
null


text:
<?php
namespace NeuroSYS\DoctrineDatatables;

use Doctrine\ORM\EntityManager;
use Doctrine\ORM\QueryBuilder;
use NeuroSYS\DoctrineDatatables\Field\Entity;
use NeuroSYS\DoctrineDatatables\Field\AbstractField;
use NeuroSYS\DoctrineDatatables\Field\MultiField;

class TableBuilder
{
    /**
     * @var \Doctrine\ORM\EntityManager
     */
    private $em;

    /**
     * @var Table
     */
    private $table;

    /**
     * @var FieldRegistry
     */
    private $registry;

    /**
     * @var RendererInterface
     */
    private $renderer;

    /**
     * @var string Root entity class name
     */
    protected $className;

    protected $index;

    protected $parent;

    public function __construct(EntityManager $em, array $request, FieldRegistry $registry = null, RendererInterface $renderer = null)
    {
        $this->em       = $em;
        if (null === $registry) {
            $registry = new FieldRegistry();
        }
        $this->registry  = $registry;
        $this->request   = new Request($request);
        $this->renderer  = $renderer;
    }

    public function getQueryBuilder()
    {
        return $this->getTable()->getQueryBuilder();
    }

    public function getTable()
    {
        return $this->table;
    }

    /**
     * @param  string $className Root entity class name
     * @param  string $alias     Alias of root entity
     * @return $this
     */
    public function from($className, $alias)
    {
        $table = new Table($className, $alias, $this->em, $this->request, $this->renderer);
        //$table->from($className, $alias);

        $this->setTable($table);

        return $this;
    }

    public function setRenderer(RendererInterface $renderer)
    {
        $this->table->setRenderer($renderer);
    }

    /**
     * @param  QueryBuilder $qb QueryBuilder instance
     * @throws \Exception
     */
    public function setQueryBuilder(QueryBuilder $qb)
    {
        if (!$this->table) {
            $from = $qb->getDQLPart('from');
            $from = array_shift($from);
            /**
             * @var \Doctrine\ORM\Query\Expr\From $from
             */
            $this->table = new Table($from->getFrom(), $from->getAlias(), $this->em, $this->request, $this->renderer);
        }
        $this->getTable()->setQueryBuilder($qb);

        return $this;
    }

    protected function getCurrentIndex()
    {
        if (null != $this->index) {
            return $this->index;
        } elseif (null !== $this->table->getIndex()) {
            return $this->getTable()->getIndex();
        } else {
            return count($this->getTable()->getFields());
        }
    }

    public function setIndex($index)
    {
        $this->index = $index;
    }

    public function with($name)
    {
        //$field = new MultiField($this->getTable(), $name);
        //$field->setIndex($this->getCurrentIndex());
        //$field->setParent($this->getTable());

        $builder = new TableBuilder($this->em, $this->request->all(), $this->registry, $this->renderer);
        $this->setIndex($this->getCurrentIndex());
        $builder->setTable($this->getTable());

        $this->getTable()->setField($name, $field);

        $builder->parent = $this;

        return $this->parent;
    }

    public function end()
    {
        return $this->parent;
    }

    protected function setTable(Entity $table)
    {
        $this->table = $table;
    }

    public function join($fullName, $alias, $conditionType = null, $condition = null)
    {
        return $this->leftJoin($fullName, $alias, $conditionType, $condition);
    }

    public function leftJoin($fullName, $alias, $conditionType = null, $condition = null)
    {
        $this->_join($fullName, $alias, 'LEFT', $conditionType, $condition);

        return $this;
    }

    public function innerJoin($fullName, $alias, $conditionType = null, $condition = null)
    {
        $this->_join($fullName, $alias, 'INNER', $conditionType, $condition);

        return $this;
    }

    private function _join($fullName, $alias, $type, $conditionType = null, $condition = null)
    {
        list($parentAlias, $name) = explode('.', $fullName);
        $parent = $this->getTable()->getEntity($parentAlias);
        if (!$parent) {
            throw new \Exception("Parent entity not found for " . $fullName);
        }
        $parent->join($name, $alias, $type, $conditionType, $condition);

        return $this;
    }

    /**
     * @param $name  Hint name
     * @param $value  Hint value
     * @return $this
     */
    public function setHint($name, $value)
    {
        $this->getTable()->setHint($name, $value);

        return $this;
    }

    /**
     * @param  string $name Name of field (supported dot notation for relations)
     * @param  string $type Type of field
     * @return $this
     */
    public function add($type, $select = null, $filter = true, $options = array())
    {
        if (null !== $this->getTable()->getIndex()) {
            $index = $this->getTable()->getIndex();
        } else {
            $index = count($this->getTable()->getFields());
        }

        $name = $this->request->get('mDataProp', $index) ?: $index;

        if (true === $filter || null === $filter) {
            $filter = $select;
        }

        if (empty($select)) {
            $select = array();
        } else {
            if (!is_array($select)) {
                $select = explode(',', $select);
            }
            foreach ($select as $key => $value) {
                if (is_numeric($key)) {
                    if (strpos(strtolower($value), ' as ') === false) { // check for non entity field
                        list($parentAlias, $fieldName) = explode('.', trim($value));
                        if (!isset($select[trim($parentAlias)])) {
                            $select[trim($parentAlias)] = array();
                        }
                    } else {
                        $parentAlias = '';
                        $fieldName   = $value;
                    }
                    $select[trim($parentAlias)][] = $fieldName;
                    unset($select[$key]);
                }
            }
        }
        if (empty($filter)) {
            $filter = array();
        } else {
            if (!is_array($filter)) {
                $filter = explode(',', $filter);
                foreach ($filter as $key => $value) {
                    if (strpos($value, '.') === false) {
                        throw new \Exception("Filter must contain entity alias, '" . $filter . "' given");
                    }
                }
            }

            /*foreach ($filter as $key => $value) {
                if (!is_numeric($key)) {
                    $filter[] = $key . '.' . $value;
                    unset($filter[$key]);
                }
            }*/
        }
        /**
         * @var AbstractField $field
         */
        $field = $this->registry->resolve($type, $this->getTable(), $options);
        $field->setIndex($index);
        $field->setSelect($select);
        $field->setSearchFields($filter);
        if (isset($options['template'])) {
            $field->setTemplate($options['template']);
        }
        if (isset($options['context'])) {
            $field->setContext($options['context']);
        }
        $this->getTable()->setField($name, $field);

        return $this;
    }
}


text:
package com.nicefontaine.seanachie.data.sources.image_stories;

import android.content.Context;
import android.support.annotation.NonNull;

import com.j256.ormlite.dao.RuntimeExceptionDao;
import com.nicefontaine.seanachie.data.sources.DatabaseHelper;
import com.nicefontaine.seanachie.data.models.ImageStory;
import com.nicefontaine.seanachie.data.sources.DataSource;

import java.util.List;
import java.util.concurrent.Callable;

import static dagger.internal.Preconditions.checkNotNull;

public class ImageStoriesLocalDataSource implements DataSource<ImageStory> {

    private static ImageStoriesLocalDataSource instance;
    private RuntimeExceptionDao<ImageStory, Integer> imageStoryDao;

    public static ImageStoriesLocalDataSource getInstance(@NonNull Context context) {
        if (instance == null) {
            instance = new ImageStoriesLocalDataSource(context);
        }
        return instance;
    }

    private ImageStoriesLocalDataSource(@NonNull Context context) {
        checkNotNull(context);
        DatabaseHelper databaseHelper = DatabaseHelper.getInstance(context);
        imageStoryDao = databaseHelper.getImageStoryDao();
    }

    @Override
    public void getData(@NonNull LoadDataCallback<ImageStory> callback) {
        List<ImageStory> imageStories = imageStoryDao.queryForAll();
        if (imageStories.isEmpty()) {
            callback.noData();
        } else {
            callback.onDataLoaded(imageStories);
        }
    }

    @Override
    public void getElement(@NonNull Integer petId, @NonNull LoadElementCallback<ImageStory> callback) {
        ImageStory imageStory = imageStoryDao.queryForId(petId);
        if (imageStory == null) {
            callback.noElement();
        } else {
            callback.onElementLoaded(imageStory);
        }
    }

    @Override
    public void create(@NonNull ImageStory imageStory) {
        imageStoryDao.create(imageStory);
    }

    @Override
    public void edit(@NonNull ImageStory imageStory) {
        imageStoryDao.deleteById(imageStory.getId());
        imageStoryDao.create(imageStory);
    }

    @Override
    public void delete(@NonNull Integer petId) {
        imageStoryDao.deleteById(petId);
    }

    @Override
    public void swap(@NonNull List<ImageStory> imageStories) {
        imageStoryDao.delete(imageStories);
        imageStoryDao.callBatchTasks(new Callable<Void>() {

            public Void call() throws Exception {
                for (ImageStory imageStory : imageStories) {
                    imageStoryDao.create(imageStory);
                }
                return null;
            }
        });
    }

    @Override
    public void count(@NonNull LoadCountCallback callback) {
        callback.onCount(imageStoryDao.countOf());
    }
}


text:
namespace mf {
}

namespace mf {
}

namespace mf {
}

MPI2_TYPE_TRAITS3(mf::detail::DistributedDecayAutoTask, mf::UpdateNzsl, mf::RegularizeNone, mf::NzslLoss);
MPI2_TYPE_TRAITS3(mf::detail::DistributedDecayAutoTask, mf::UpdateNzslAbs, mf::RegularizeNoneAbs, mf::NzslLoss);
MPI2_TYPE_TRAITS3(mf::detail::DistributedDecayAutoTask, mf::UpdateNzslTruncate, mf::RegularizeNone, mf::NzslLoss);
MPI2_TYPE_TRAITS3(mf::detail::DistributedDecayAutoTask, mf::UpdateNzslTruncate, mf::RegularizeNoneTruncate, mf::NzslLoss);
MPI2_TYPE_TRAITS3(mf::detail::DistributedDecayAutoTask, mf::UpdateNzslAbsTruncate, mf::RegularizeNoneAbs, mf::NzslLoss);
MPI2_TYPE_TRAITS3(mf::detail::DistributedDecayAutoTask, mf::UpdateNzslAbsTruncate, mf::RegularizeNoneAbsTruncate, mf::NzslLoss);

namespace mf {
extern template class mf::detail::DsgdTask<mf::UpdateNzsl, mf::RegularizeNone>;
extern template class mf::detail::DsgdTask<mf::UpdateNzslAbs, mf::RegularizeNoneAbs>;
extern template class mf::detail::DsgdTask<mf::UpdateNzslTruncate, mf::RegularizeNone>;
extern template class mf::detail::DsgdTask<mf::UpdateNzslTruncate, mf::RegularizeNoneTruncate>;
extern template class mf::detail::DsgdTask<mf::UpdateNzslAbsTruncate, mf::RegularizeNoneAbs>;
extern template class mf::detail::DsgdTask<mf::UpdateNzslAbsTruncate, mf::RegularizeNoneAbsTruncate>;
extern template class mf::detail::DistributedDecayAutoTask<mf::UpdateNzsl, mf::RegularizeNone, mf::NzslLoss>;
extern template class mf::detail::DistributedDecayAutoTask<mf::UpdateNzslAbs, mf::RegularizeNoneAbs, mf::NzslLoss>;
extern template class mf::detail::DistributedDecayAutoTask<mf::UpdateNzslTruncate, mf::RegularizeNone, mf::NzslLoss>;
extern template class mf::detail::DistributedDecayAutoTask<mf::UpdateNzslTruncate, mf::RegularizeNoneTruncate, mf::NzslLoss>;
extern template class mf::detail::DistributedDecayAutoTask<mf::UpdateNzslAbsTruncate, mf::RegularizeNoneAbs, mf::NzslLoss>;
extern template class mf::detail::DistributedDecayAutoTask<mf::UpdateNzslAbsTruncate, mf::RegularizeNoneAbsTruncate, mf::NzslLoss>;
}

#endif


text:
/*	$NetBSD: altq_fifoq.h,v 1.7 2006/10/12 19:59:08 peter Exp $	*/
/*	$KAME: altq_fifoq.h,v 1.8 2002/11/29 04:36:23 kjc Exp $	*/

/*
 * Copyright (C) 1997-2002
 *	Sony Computer Science Laboratories Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY SONY CSL AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL SONY CSL OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef _ALTQ_ALTQ_FIFOQ_H_
#define	_ALTQ_ALTQ_FIFOQ_H_

#ifdef _KERNEL
typedef struct fifoq_state {
	struct fifoq_state *q_next;	/* next fifoq_state in the list */
	struct ifaltq *q_ifq;		/* backpointer to ifaltq */

	struct mbuf *q_head;		/* head of queue */
	struct mbuf *q_tail;		/* tail of queue */
	int	q_len;			/* queue length */
	int	q_limit;		/* max queue length */

	/* statistics */
	struct {
		struct pktcntr	xmit_cnt;
		struct pktcntr	drop_cnt;
		u_int		period;
	} q_stats;
} fifoq_state_t;
#endif

struct fifoq_interface {
	char	fifoq_ifname[IFNAMSIZ];
};

struct fifoq_getstats {
	struct fifoq_interface iface;
	int		q_len;
	int		q_limit;
	struct pktcntr	xmit_cnt;
	struct pktcntr	drop_cnt;
	u_int		period;
};

struct fifoq_conf {
	struct fifoq_interface iface;
	int fifoq_limit;
};

#define	FIFOQ_LIMIT	50	/* default max queue length */

/*
 * IOCTLs for FIFOQ
 */
#define	FIFOQ_IF_ATTACH		_IOW('Q', 1, struct fifoq_interface)
#define	FIFOQ_IF_DETACH		_IOW('Q', 2, struct fifoq_interface)
#define	FIFOQ_ENABLE		_IOW('Q', 3, struct fifoq_interface)
#define	FIFOQ_DISABLE		_IOW('Q', 4, struct fifoq_interface)
#define	FIFOQ_CONFIG		_IOWR('Q', 6, struct fifoq_conf)
#define	FIFOQ_GETSTATS		_IOWR('Q', 12, struct fifoq_getstats)

#endif /* _ALTQ_ALTQ_FIFOQ_H_ */