text:
package redis_test

import (
	"context"

	redis "cloud.google.com/go/redis/apiv1beta1"
	redispb "cloud.google.com/go/redis/apiv1beta1/redispb"
	"google.golang.org/api/iterator"
)

func ExampleNewCloudRedisClient() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func ExampleNewCloudRedisRESTClient() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func ExampleCloudRedisClient_ListInstances() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.ListInstancesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#ListInstancesRequest.
	}
	it := c.ListInstances(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func ExampleCloudRedisClient_GetInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.GetInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#GetInstanceRequest.
	}
	resp, err := c.GetInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_GetInstanceAuthString() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.GetInstanceAuthStringRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#GetInstanceAuthStringRequest.
	}
	resp, err := c.GetInstanceAuthString(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_CreateInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.CreateInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#CreateInstanceRequest.
	}
	op, err := c.CreateInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_UpdateInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.UpdateInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#UpdateInstanceRequest.
	}
	op, err := c.UpdateInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_UpgradeInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.UpgradeInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#UpgradeInstanceRequest.
	}
	op, err := c.UpgradeInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_ImportInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.ImportInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#ImportInstanceRequest.
	}
	op, err := c.ImportInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_ExportInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.ExportInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#ExportInstanceRequest.
	}
	op, err := c.ExportInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_FailoverInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.FailoverInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#FailoverInstanceRequest.
	}
	op, err := c.FailoverInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func ExampleCloudRedisClient_DeleteInstance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.DeleteInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#DeleteInstanceRequest.
	}
	op, err := c.DeleteInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func ExampleCloudRedisClient_RescheduleMaintenance() {
	ctx := context.Background()
	// This snippet has been automatically generated and should be regarded as a code template only.
	// It will require modifications to work:
	// - It may require correct/in-range values for request initialization.
	// - It may require specifying regional endpoints when creating the service client as shown in:
	//   https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
	c, err := redis.NewCloudRedisClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &redispb.RescheduleMaintenanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/redis/apiv1beta1/redispb#RescheduleMaintenanceRequest.
	}
	op, err := c.RescheduleMaintenance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}


text:
export PYTHONPATH=".:$PYTHONPATH"
export DJANGO_SETTINGS_MODULE="test_settings"

usage() {
    echo "USAGE: $0 [command]"
    echo "  test - run the adminplus tests"
    echo "  check - run flake8 checks"
    echo "  shell - open the Django shell"
    exit 1
}

case "$1" in
    "test" )
        django-admin.py test adminplus ;;
    "check" )
        flake8 adminplus/ ;;
    "shell" )
        django-admin.py shell ;;
    * )
        usage ;;
esac

redpajama_set_name: RedPajamaGithub


text:
/*
 * Created by IntelliJ IDEA.
 * User: yole
 * Date: 24.11.2006
 * Time: 20:20:04
 */
package com.intellij.openapi.vcs.changes.shelf;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.diff.impl.patch.FilePatch;
import com.intellij.openapi.options.ExternalInfo;
import com.intellij.openapi.options.ExternalizableScheme;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.DefaultJDOMExternalizer;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.JDOMExternalizable;
import com.intellij.openapi.util.WriteExternalException;
import com.intellij.openapi.vcs.FileStatus;
import org.jdom.Element;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class ShelvedChangeList implements JDOMExternalizable, ExternalizableScheme {
  private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.changes.shelf.ShelvedChangeList");

  @NonNls private static final String NAME_ATTRIBUTE = "name";
  @NonNls private static final String ATTRIBUTE_DATE = "date";
  @NonNls private static final String ATTRIBUTE_RECYCLED_CHANGELIST = "recycled";
  @NonNls private static final String ELEMENT_BINARY = "binary";

  public String PATH;
  public String DESCRIPTION;
  public Date DATE;
  private List<ShelvedChange> myChanges;
  private List<ShelvedBinaryFile> myBinaryFiles;
  private boolean myRecycled;
  private String mySchemeName;

  public ShelvedChangeList() {
  }

  public ShelvedChangeList(final String path, final String description, final List<ShelvedBinaryFile> binaryFiles) {
    this(path, description, binaryFiles, System.currentTimeMillis());
  }

  public ShelvedChangeList(final String path, final String description, final List<ShelvedBinaryFile> binaryFiles, final long time) {
    PATH = path;
    DESCRIPTION = description;
    DATE = new Date(time);
    myBinaryFiles = binaryFiles;
    mySchemeName = DESCRIPTION;
  }

  public boolean isRecycled() {
    return myRecycled;
  }

  public void setRecycled(final boolean recycled) {
    myRecycled = recycled;
  }

  @Override
  public void readExternal(Element element) throws InvalidDataException {
    DefaultJDOMExternalizer.readExternal(this, element);
    mySchemeName = element.getAttributeValue(NAME_ATTRIBUTE);
    DATE = new Date(Long.parseLong(element.getAttributeValue(ATTRIBUTE_DATE)));
    myRecycled = Boolean.parseBoolean(element.getAttributeValue(ATTRIBUTE_RECYCLED_CHANGELIST));
    //noinspection unchecked
    final List<Element> children = (List<Element>)element.getChildren(ELEMENT_BINARY);
    myBinaryFiles = new ArrayList<ShelvedBinaryFile>(children.size());
    for (Element child : children) {
      ShelvedBinaryFile binaryFile = new ShelvedBinaryFile();
      binaryFile.readExternal(child);
      myBinaryFiles.add(binaryFile);
    }
  }

  @Override
  public void writeExternal(@NotNull Element element) throws WriteExternalException {
    writeExternal(element, this);
  }

  private static void writeExternal(@NotNull Element element, @NotNull ShelvedChangeList shelvedChangeList) throws WriteExternalException {
    DefaultJDOMExternalizer.writeExternal(shelvedChangeList, element);
    element.setAttribute(NAME_ATTRIBUTE, shelvedChangeList.getName());
    element.setAttribute(ATTRIBUTE_DATE, Long.toString(shelvedChangeList.DATE.getTime()));
    element.setAttribute(ATTRIBUTE_RECYCLED_CHANGELIST, Boolean.toString(shelvedChangeList.isRecycled()));
    for (ShelvedBinaryFile file : shelvedChangeList.getBinaryFiles()) {
      Element child = new Element(ELEMENT_BINARY);
      file.writeExternal(child);
      element.addContent(child);
    }
  }

  @Override
  public String toString() {
    return DESCRIPTION;
  }

  public List<ShelvedChange> getChanges(Project project) {
    if (myChanges == null) {
      try {
        myChanges = new ArrayList<ShelvedChange>();
        final List<? extends FilePatch> list = ShelveChangesManager.loadPatchesWithoutContent(project, PATH, null);
        for (FilePatch patch : list) {
          FileStatus status;
          if (patch.isNewFile()) {
            status = FileStatus.ADDED;
          }
          else if (patch.isDeletedFile()) {
            status = FileStatus.DELETED;
          }
          else {
            status = FileStatus.MODIFIED;
          }
          myChanges.add(new ShelvedChange(PATH, patch.getBeforeName(), patch.getAfterName(), status));
        }
      }
      catch (Exception e) {
        LOG.error("Failed to parse the file patch: [" + PATH + "]", e);
      }
    }
    return myChanges;
  }

  public void clearLoadedChanges() {
    myChanges = null;
  }

  public List<ShelvedBinaryFile> getBinaryFiles() {
    return myBinaryFiles;
  }

  @NotNull
  @Override
  public String getName() {
    return mySchemeName;
  }

  @Nullable
  @Override
  public ExternalInfo getExternalInfo() {
    return null;
  }

  @Override
  public void setName(@NotNull String newName) {
    mySchemeName = newName;
  }
}


text:
CREATE TABLE manifest (
        id INTEGER PRIMARY KEY AUTO_INCREMENT
    ,   filename VARCHAR(500) NOT NULL
    ,   uploaded DATETIME NOT NULL
    ,   userId INTEGER NOT NULL
    ,   CONSTRAINT fk_manifest_user FOREIGN KEY (userId) REFERENCES user(Id)
    )
;

CREATE INDEX idx_manifest_userId
ON manifest (userId)
;


text:
#ifndef Py_FILEUTILS_H
#define Py_FILEUTILS_H

#ifdef __cplusplus
extern "C" {
#endif

PyAPI_FUNC(PyObject *) _Py_device_encoding(int);

PyAPI_FUNC(wchar_t *) _Py_char2wchar(
    const char *arg,
    size_t *size);

PyAPI_FUNC(char*) _Py_wchar2char(
    const wchar_t *text,
    size_t *error_pos);

#if defined(HAVE_STAT) && !defined(MS_WINDOWS)
PyAPI_FUNC(int) _Py_wstat(
    const wchar_t* path,
    struct stat *buf);
#endif

#ifdef HAVE_STAT
PyAPI_FUNC(int) _Py_stat(
    PyObject *path,
    struct stat *statbuf);
#endif

PyAPI_FUNC(FILE *) _Py_wfopen(
    const wchar_t *path,
    const wchar_t *mode);

PyAPI_FUNC(FILE*) _Py_fopen(
    PyObject *path,
    const char *mode);

#ifdef HAVE_READLINK
PyAPI_FUNC(int) _Py_wreadlink(
    const wchar_t *path,
    wchar_t *buf,
    size_t bufsiz);
#endif

#ifdef HAVE_REALPATH
PyAPI_FUNC(wchar_t*) _Py_wrealpath(
    const wchar_t *path,
    wchar_t *resolved_path,
    size_t resolved_path_size);
#endif

PyAPI_FUNC(wchar_t*) _Py_wgetcwd(
    wchar_t *buf,
    size_t size);

#ifdef __cplusplus
}
#endif

#endif /* !Py_FILEUTILS_H */


text:
@implementation UICollectionView (TFEasyCoder)

+( UICollectionView *)easyCoder:(UICollectionViewEasyCoderBlock)block{
    return [NSObject tf_execute:[self class] back:^(id ins) {
        if (block) {
            block(( UICollectionView *)ins);
        }
    }];
}

-( UICollectionView *)easyCoder:(UICollectionViewEasyCoderBlock)block{
    if (block) {
        __weak typeof(self) weakSelf = self;
        block(weakSelf);
    }
    return self;
}

-(UICollectionView  *(^)(UICollectionViewLayout *  collectionViewLayout))set_collectionViewLayout{
    __weak typeof(self) weakSelf = self;
    return ^(UICollectionViewLayout *  collectionViewLayout){
        weakSelf.collectionViewLayout = collectionViewLayout;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(id<UICollectionViewDelegate>    delegate))set_delegate{
    __weak typeof(self) weakSelf = self;
    return ^(id<UICollectionViewDelegate>    delegate){
        weakSelf.delegate = delegate;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(id<UICollectionViewDataSource>    dataSource))set_dataSource{
    __weak typeof(self) weakSelf = self;
    return ^(id<UICollectionViewDataSource>    dataSource){
        weakSelf.dataSource = dataSource;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(UIView *  backgroundView))set_backgroundView{
    __weak typeof(self) weakSelf = self;
    return ^(UIView *  backgroundView){
        weakSelf.backgroundView = backgroundView;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  allowsSelection))set_allowsSelection{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  allowsSelection){
        weakSelf.allowsSelection = allowsSelection;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  allowsMultipleSelection))set_allowsMultipleSelection{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  allowsMultipleSelection){
        weakSelf.allowsMultipleSelection = allowsMultipleSelection;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  remembersLastFocusedIndexPath))set_remembersLastFocusedIndexPath{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  remembersLastFocusedIndexPath){
        weakSelf.remembersLastFocusedIndexPath = remembersLastFocusedIndexPath;
        return weakSelf;
    };
}

//superclass pros UIScrollView
-(UICollectionView  *(^)(CGPoint  contentOffset))set_contentOffset{
    __weak typeof(self) weakSelf = self;
    return ^(CGPoint  contentOffset){
        weakSelf.contentOffset = contentOffset;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(CGSize  contentSize))set_contentSize{
    __weak typeof(self) weakSelf = self;
    return ^(CGSize  contentSize){
        weakSelf.contentSize = contentSize;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(UIEdgeInsets  contentInset))set_contentInset{
    __weak typeof(self) weakSelf = self;
    return ^(UIEdgeInsets  contentInset){
        weakSelf.contentInset = contentInset;
        return weakSelf;
    };
}

//TF_EC_CHAIN_PROP_IMP(UICollectionView ,id<UIScrollViewDelegate>  ,delegate)
-(UICollectionView  *(^)(BOOL  directionalLockEnabled))set_directionalLockEnabled{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  directionalLockEnabled){
        weakSelf.directionalLockEnabled = directionalLockEnabled;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  bounces))set_bounces{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  bounces){
        weakSelf.bounces = bounces;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  alwaysBounceVertical))set_alwaysBounceVertical{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  alwaysBounceVertical){
        weakSelf.alwaysBounceVertical = alwaysBounceVertical;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  alwaysBounceHorizontal))set_alwaysBounceHorizontal{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  alwaysBounceHorizontal){
        weakSelf.alwaysBounceHorizontal = alwaysBounceHorizontal;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  pagingEnabled))set_pagingEnabled{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  pagingEnabled){
        weakSelf.pagingEnabled = pagingEnabled;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  scrollEnabled))set_scrollEnabled{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  scrollEnabled){
        weakSelf.scrollEnabled = scrollEnabled;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  showsHorizontalScrollIndicator))set_showsHorizontalScrollIndicator{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  showsHorizontalScrollIndicator){
        weakSelf.showsHorizontalScrollIndicator = showsHorizontalScrollIndicator;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  showsVerticalScrollIndicator))set_showsVerticalScrollIndicator{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  showsVerticalScrollIndicator){
        weakSelf.showsVerticalScrollIndicator = showsVerticalScrollIndicator;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(UIEdgeInsets  scrollIndicatorInsets))set_scrollIndicatorInsets{
    __weak typeof(self) weakSelf = self;
    return ^(UIEdgeInsets  scrollIndicatorInsets){
        weakSelf.scrollIndicatorInsets = scrollIndicatorInsets;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(long long  indicatorStyle))set_indicatorStyle{
    __weak typeof(self) weakSelf = self;
    return ^(long long  indicatorStyle){
        weakSelf.indicatorStyle = indicatorStyle;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(double  decelerationRate))set_decelerationRate{
    __weak typeof(self) weakSelf = self;
    return ^(double  decelerationRate){
        weakSelf.decelerationRate = decelerationRate;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  delaysContentTouches))set_delaysContentTouches{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  delaysContentTouches){
        weakSelf.delaysContentTouches = delaysContentTouches;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  canCancelContentTouches))set_canCancelContentTouches{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  canCancelContentTouches){
        weakSelf.canCancelContentTouches = canCancelContentTouches;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(double  minimumZoomScale))set_minimumZoomScale{
    __weak typeof(self) weakSelf = self;
    return ^(double  minimumZoomScale){
        weakSelf.minimumZoomScale = minimumZoomScale;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(double  maximumZoomScale))set_maximumZoomScale{
    __weak typeof(self) weakSelf = self;
    return ^(double  maximumZoomScale){
        weakSelf.maximumZoomScale = maximumZoomScale;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(double  zoomScale))set_zoomScale{
    __weak typeof(self) weakSelf = self;
    return ^(double  zoomScale){
        weakSelf.zoomScale = zoomScale;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  bouncesZoom))set_bouncesZoom{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  bouncesZoom){
        weakSelf.bouncesZoom = bouncesZoom;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  scrollsToTop))set_scrollsToTop{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  scrollsToTop){
        weakSelf.scrollsToTop = scrollsToTop;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(long long  keyboardDismissMode))set_keyboardDismissMode{
    __weak typeof(self) weakSelf = self;
    return ^(long long  keyboardDismissMode){
        weakSelf.keyboardDismissMode = keyboardDismissMode;
        return weakSelf;
    };
}

//superclass pros UIView
-(UICollectionView  *(^)(UIView *  maskView))set_maskView{
    __weak typeof(self) weakSelf = self;
    return ^(UIView *  maskView){
        weakSelf.maskView = maskView;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  userInteractionEnabled))set_userInteractionEnabled{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  userInteractionEnabled){
        weakSelf.userInteractionEnabled = userInteractionEnabled;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(long long  tag))set_tag{
    __weak typeof(self) weakSelf = self;
    return ^(long long  tag){
        weakSelf.tag = tag;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(long long  semanticContentAttribute))set_semanticContentAttribute{
    __weak typeof(self) weakSelf = self;
    return ^(long long  semanticContentAttribute){
        weakSelf.semanticContentAttribute = semanticContentAttribute;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(CGPoint  center))set_center{
    __weak typeof(self) weakSelf = self;
    return ^(CGPoint  center){
        weakSelf.center = center;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(CGRect  frame))set_frame{
    __weak typeof(self) weakSelf = self;
    return ^(CGRect  frame){
        weakSelf.frame = frame;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(UIColor *  backgroundColor))set_backgroundColor{
    __weak typeof(self) weakSelf = self;
    return ^(UIColor *  backgroundColor){
        weakSelf.backgroundColor = backgroundColor;
        return weakSelf;
    };
}

//superclass pros UIResponder
-(UICollectionView  *(^)(NSUserActivity *  userActivity))set_userActivity{
    __weak typeof(self) weakSelf = self;
    return ^(NSUserActivity *  userActivity){
        weakSelf.userActivity = userActivity;
        return weakSelf;
    };
}

//superclass pros NSObject
-(UICollectionView  *(^)(NSArray *  accessibilityElements))set_accessibilityElements{
    __weak typeof(self) weakSelf = self;
    return ^(NSArray *  accessibilityElements){
        weakSelf.accessibilityElements = accessibilityElements;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(NSArray *  accessibilityCustomActions))set_accessibilityCustomActions{
    __weak typeof(self) weakSelf = self;
    return ^(NSArray *  accessibilityCustomActions){
        weakSelf.accessibilityCustomActions = accessibilityCustomActions;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  isAccessibilityElement))set_isAccessibilityElement{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  isAccessibilityElement){
        weakSelf.isAccessibilityElement = isAccessibilityElement;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(NSString *  accessibilityLabel))set_accessibilityLabel{
    __weak typeof(self) weakSelf = self;
    return ^(NSString *  accessibilityLabel){
        weakSelf.accessibilityLabel = accessibilityLabel;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(NSString *  accessibilityHint))set_accessibilityHint{
    __weak typeof(self) weakSelf = self;
    return ^(NSString *  accessibilityHint){
        weakSelf.accessibilityHint = accessibilityHint;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(NSString *  accessibilityValue))set_accessibilityValue{
    __weak typeof(self) weakSelf = self;
    return ^(NSString *  accessibilityValue){
        weakSelf.accessibilityValue = accessibilityValue;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(unsigned long long  accessibilityTraits))set_accessibilityTraits{
    __weak typeof(self) weakSelf = self;
    return ^(unsigned long long  accessibilityTraits){
        weakSelf.accessibilityTraits = accessibilityTraits;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(UIBezierPath *  accessibilityPath))set_accessibilityPath{
    __weak typeof(self) weakSelf = self;
    return ^(UIBezierPath *  accessibilityPath){
        weakSelf.accessibilityPath = accessibilityPath;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(CGPoint  accessibilityActivationPoint))set_accessibilityActivationPoint{
    __weak typeof(self) weakSelf = self;
    return ^(CGPoint  accessibilityActivationPoint){
        weakSelf.accessibilityActivationPoint = accessibilityActivationPoint;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(NSString *  accessibilityLanguage))set_accessibilityLanguage{
    __weak typeof(self) weakSelf = self;
    return ^(NSString *  accessibilityLanguage){
        weakSelf.accessibilityLanguage = accessibilityLanguage;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  accessibilityElementsHidden))set_accessibilityElementsHidden{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  accessibilityElementsHidden){
        weakSelf.accessibilityElementsHidden = accessibilityElementsHidden;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  accessibilityViewIsModal))set_accessibilityViewIsModal{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  accessibilityViewIsModal){
        weakSelf.accessibilityViewIsModal = accessibilityViewIsModal;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(BOOL  shouldGroupAccessibilityChildren))set_shouldGroupAccessibilityChildren{
    __weak typeof(self) weakSelf = self;
    return ^(BOOL  shouldGroupAccessibilityChildren){
        weakSelf.shouldGroupAccessibilityChildren = shouldGroupAccessibilityChildren;
        return weakSelf;
    };
}

-(UICollectionView  *(^)(long long  accessibilityNavigationStyle))set_accessibilityNavigationStyle{
    __weak typeof(self) weakSelf = self;
    return ^(long long  accessibilityNavigationStyle){
        weakSelf.accessibilityNavigationStyle = accessibilityNavigationStyle;
        return weakSelf;
    };
}

-(UICollectionView *(^)(id value,NSString *key))set_ValueKey{
    __weak typeof(self) weakSelf = self;
    return ^(id value,NSString *key){
        [NSObject tf_setTargetValue:weakSelf withValue:value forKey:key];
        return weakSelf;
    };
}

@end


text:
package com.omkara.pingpong

import akka.actor.{ ActorSystem, Kill, PoisonPill, Props }
import akka.testkit.{ TestKit, TestActorRef, ImplicitSender, TestProbe }
import org.scalatest.{ Matchers, FlatSpecLike, BeforeAndAfterAll }
import com.typesafe.config.ConfigFactory
import scala.util.Random

class RouterActorSpec extends TestKit(ActorSystem("MasterActorSpec", ConfigFactory.load()))
    with ImplicitSender with FlatSpecLike with Matchers with BeforeAndAfterAll {
  import PingPongActor._
  import RouterActor._

  trait Messages {
    val pingMessage = "ping"
    val pongMessage = "pong"

    val identifier = Random.nextInt()
  }

  trait Router extends Messages {
    val routerRef = TestActorRef[RouterActor]
    val router = routerRef.underlyingActor
  }

  trait TwoRegisteredRoutees extends Router {
    val routee1 = TestProbe()
    val routee2 = TestProbe()

    router.routees += routee1.ref
    router.routees += routee2.ref

    routerRef.watch(routee1.ref)
    routerRef.watch(routee2.ref)
  }

  trait ThreeRegisteredRoutees extends Router {
    val routee1 = TestProbe()
    val routee2 = TestProbe()
    val routee3 = TestProbe()

    router.routees += routee1.ref
    router.routees += routee2.ref
    router.routees += routee3.ref

    routerRef.watch(routee1.ref)
    routerRef.watch(routee2.ref)
    routerRef.watch(routee3.ref)
  }

  override def afterAll {
    TestKit.shutdownActorSystem(system)
  }

  "RouterActor" should "register a requesting actor" in new Router {

    routerRef ! Register
    expectNoMsg

    router.routees.contains(testActor) shouldEqual true

  }

  it should "unregister a requesting actor" in new Router {

    routerRef ! Unregister
    expectNoMsg

    router.routees.isEmpty shouldEqual true

  }

  it should "assign roles" in new TwoRegisteredRoutees {

    routerRef ! AssignRoles
    expectNoMsg

    routee1.expectMsgPF() {
      case PingNow =>
        router.currentActorWithPingRole shouldEqual routee1.ref
      case PongNow =>
    }

    routee2.expectMsgPF() {
      case PingNow =>
        router.currentActorWithPingRole shouldEqual routee2.ref
      case PongNow =>
    }

  }

  it should "reset roles" in new TwoRegisteredRoutees {

    router.currentActorWithPingRole = routee1.ref

    routerRef ! ResetRoles

    routee1.expectMsg(PongNow)
    routee2.expectMsg(PingNow)

    router.currentActorWithPingRole shouldEqual routee2.ref

  }

  it should "forward PingMessage to all it's registered routees" in new TwoRegisteredRoutees {

    routee1.send(routerRef, PingMessage(pingMessage, identifier))

    routee2.expectMsg(PingMessage(pingMessage, identifier))

    router.messageIdentifier shouldEqual identifier
    router.repliesReceivedFrom.isEmpty shouldEqual true

  }

  it should "keep track of all the PongMessage replies that match currently set message identifier" in new TwoRegisteredRoutees {

    router.messageIdentifier = identifier

    routee1.send(routerRef, PongMessage(pongMessage, identifier))
    routee2.send(routerRef, PongMessage(pongMessage, identifier))

    router.repliesReceivedFrom shouldEqual Set(routee1.ref, routee2.ref)

    router.pongMessage shouldEqual pongMessage

  }

  it should "inform the pinging actor of unreachable ponging actors" in new ThreeRegisteredRoutees {

    router.currentActorWithPingRole = routee1.ref
    router.repliesReceivedFrom = Set(routee2.ref)

    val unreachable = (router.routees - router.currentActorWithPingRole) diff router.repliesReceivedFrom

    routerRef ! StopWatchEnded

    router.unreachableMap.contains(routee3.ref) shouldEqual true

    routee1.expectMsg(UnreachableActorException(unreachable))

  }

  it should "inform the pinging actor of unregistered ponging actors" in new TwoRegisteredRoutees {

    val unregisteredRoutee = TestProbe()

    router.currentActorWithPingRole = routee1.ref

    router.pongMessage = pongMessage
    router.messageIdentifier = identifier

    router.repliesReceivedFrom = Set(routee2.ref, unregisteredRoutee.ref)

    val unregistered = router.repliesReceivedFrom diff (router.routees - router.currentActorWithPingRole)

    routerRef ! StopWatchEnded

    router.unreachableMap should have size 0

    routee1.expectMsg(UnregisteredActorException(unregistered))
    routee1.expectMsg(PongMessage(pongMessage, identifier))

  }

  it should "reply pinging actor with PongMessage when received replies from all ponging actors" in new TwoRegisteredRoutees {

    router.currentActorWithPingRole = routee1.ref

    router.pongMessage = pongMessage
    router.messageIdentifier = identifier

    router.repliesReceivedFrom = Set(routee2.ref)

    routerRef ! StopWatchEnded

    router.unreachableMap should have size 0

    routee1.expectMsg(PongMessage(pongMessage, identifier))

  }

  it should "unregister routees that are unreachable even after three or more times of roles reset" in new ThreeRegisteredRoutees {
    router.currentActorWithPingRole = routee1.ref
    router.repliesReceivedFrom = Set(routee2.ref)

    val unreachable = (router.routees - router.currentActorWithPingRole) diff router.repliesReceivedFrom

    routerRef ! StopWatchEnded

    routee1.expectMsg(UnreachableActorException(unreachable))

    router.unreachableMap.contains(routee3.ref) shouldEqual true

    routerRef ! StopWatchEnded

    routee1.expectMsg(UnreachableActorException(unreachable))

    router.unreachableMap.contains(routee3.ref) shouldEqual true

    routerRef ! StopWatchEnded

    routee1.expectMsg(UnreachableActorException(unreachable))

    router.unreachableMap.contains(routee3.ref) shouldEqual true

    routerRef ! ResetRoles

    routee1.expectMsg(PongNow)
    routee2.expectMsg(PingNow)

    router.routees.contains(routee3.ref) shouldEqual false
  }

  it should "unregister actors that are stopped via 'PoisonPill'" in new TwoRegisteredRoutees {
    router.routees.contains(routee1.ref) shouldEqual true

    routee1.ref ! PoisonPill

    router.routees.contains(routee1.ref) shouldEqual false
  }

  it should "unregister actors that are stopped via 'Kill'" in new TwoRegisteredRoutees {
    router.routees.contains(routee1.ref) shouldEqual true

    routee1.ref ! Kill
    Thread sleep 100

    router.routees.contains(routee1.ref) shouldEqual false
  }

}


text:
<?php namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

class AuthController extends Controller {

    /*
    |--------------------------------------------------------------------------
    | Registration & Login Controller
    |--------------------------------------------------------------------------
    |
    | This controller handles the registration of new users, as well as the
    | authentication of existing users. By default, this controller uses
    | a simple trait to add these behaviors. Why don't you explore it?
    |
    */

    use AuthenticatesAndRegistersUsers;

    private $redirectPath = '/';

    private $configuration;

    /**
     * Create a new authentication controller instance.
     *
     * @param  \Illuminate\Contracts\Auth\Guard $auth
     * @param  \Illuminate\Contracts\Auth\Registrar $registrar
     */
    public function __construct() {
        //get an instance of the configuration interface
        $this->configuration = \App::make('Interfaces\ConfigurationInterface');

        $this->middleware('guest', ['except' => 'getLogout']);
    }

    /**
     * View the login page.
     * We override the getLogin() of the trait in order to retrieve
     * the path needed to display the footer logos at the login page
     *
     * @return \Illuminate\View\View
     */
    public function getLogin() {

        $footerLogoPath = $this->configuration->getViewsPath().'._login_footer';

       /* if(env('APP_ENV')=='demo') {
            \App::setLocale('en');
            \Cookie::queue('locale', 'en', 60 * 24 * 365);
        }*/

        return view('auth/login', compact('footerLogoPath'));
    }

}


text:
from django.conf.urls import url
from . import views

urlpatterns = [
    url(r'^invoicecreator/$',
        views.InvoiceCreatorRedirectView.as_view(),
        name='invoice_creator_all'),
    url(r'^customerinvoice/$',
        views.InvoiceListView.as_view(),
        name='invoice_list'),
    url(r'^customerinvoice/(?P<pk>[0-9]+)/$',
        views.InvoiceDetailView.as_view(),
        name='invoice_detail'),
    url(r'^customerinvoice/generateinvoice/$',
        views.InvoiceGenerateConfirmTemplateView.as_view(),
        name='invoice_generator_confirm'),
]


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp.FxCopAnalyzers.Globalization;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.FxCopAnalyzers.Interoperability;
using Microsoft.CodeAnalysis.Test.Utilities;
using Microsoft.CodeAnalysis.VisualBasic.FxCopAnalyzers.Globalization;
using Xunit;

namespace Microsoft.CodeAnalysis.UnitTests.Interoperability
{
    public class CA2101FixerTests : CodeFixTestBase
    {
        #region Verifiers

        protected override DiagnosticAnalyzer GetBasicDiagnosticAnalyzer()
        {
            return new PInvokeDiagnosticAnalyzer();
        }

        protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
        {
            return new PInvokeDiagnosticAnalyzer();
        }

        protected override CodeFixProvider GetBasicCodeFixProvider()
        {
            return new CA2101BasicCodeFixProvider();
        }

        protected override CodeFixProvider GetCSharpCodeFixProvider()
        {
            return new CA2101CSharpCodeFixProvider();
        }

        #endregion

        #region CA2101 Fixer tests

        [Fact, Trait(Traits.Feature, Traits.Features.Diagnostics)]
        public void CA2101FixMarshalAsCSharpTest()
        {
            VerifyCSharpFix(@"
using System.Runtime.InteropServices;
using System.Text;

class C
{
    [DllImport(""user32.dll"")]
    private static extern void Foo1([MarshalAs(UnmanagedType.LPStr)] string s, [MarshalAs(UnmanagedType.LPStr)] StringBuilder t);

    [DllImport(""user32.dll"")]
    private static extern void Foo2([MarshalAs((short)0)] string s);
}
", @"
using System.Runtime.InteropServices;
using System.Text;

class C
{
    [DllImport(""user32.dll"")]
    private static extern void Foo1([MarshalAs(UnmanagedType.LPWStr)] string s, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder t);

    [DllImport(""user32.dll"")]
    private static extern void Foo2([MarshalAs(UnmanagedType.LPWStr)] string s);
}
");
        }

        [Fact, Trait(Traits.Feature, Traits.Features.Diagnostics)]
        public void CA2101FixMarshalAsBasicTest()
        {
            VerifyBasicFix(@"
Imports System.Runtime.InteropServices
Imports System.Text

Class C
    <DllImport(""user32.dll"")>
    Private Shared Sub Foo1(<MarshalAs(UnmanagedType.LPStr)> s As String, <MarshalAs(UnmanagedType.LPStr)> t As StringBuilder)
    End Sub

    <DllImport(""user32.dll"")>
    Private Shared Sub Foo2(<MarshalAs(CShort(0)) s As String)
    End Sub

    Private Declare Sub Foo3 Lib ""user32.dll"" (<MarshalAs(UnmanagedType.LPStr)> s As String)
End Class
", @"
Imports System.Runtime.InteropServices
Imports System.Text

Class C
    <DllImport(""user32.dll"")>
    Private Shared Sub Foo1(<MarshalAs(UnmanagedType.LPWStr)> s As String, <MarshalAs(UnmanagedType.LPWStr)> t As StringBuilder)
    End Sub

    <DllImport(""user32.dll"")>
    Private Shared Sub Foo2(<MarshalAs(UnmanagedType.LPWStr) s As String)
    End Sub

    Private Declare Sub Foo3 Lib ""user32.dll"" (<MarshalAs(UnmanagedType.LPWStr)> s As String)
End Class
");
        }

        [Fact, Trait(Traits.Feature, Traits.Features.Diagnostics)]
        public void CA2101FixCharSetCSharpTest()
        {
            VerifyCSharpFix(@"
using System.Runtime.InteropServices;
using System.Text;

class C
{
    [DllImport(""user32.dll"")]
    private static extern void Foo1(string s);

    [DllImport(""user32.dll"", CharSet = CharSet.Ansi)]
    private static extern void Foo2(string s);
}
", @"
using System.Runtime.InteropServices;
using System.Text;

class C
{
    [DllImport(""user32.dll"", CharSet = CharSet.Unicode)]
    private static extern void Foo1(string s);

    [DllImport(""user32.dll"", CharSet = CharSet.Unicode)]
    private static extern void Foo2(string s);
}
");
        }

        [Fact, Trait(Traits.Feature, Traits.Features.Diagnostics)]
        public void CA2101FixCharSetBasicTest()
        {
            VerifyBasicFix(@"
Imports System.Runtime.InteropServices
Imports System.Text

Class C
    <DllImport(""user32.dll"")>
    Private Shared Sub Foo1(s As String)
    End Sub

    <DllImport(""user32.dll"", CharSet:=CharSet.Ansi)>
    Private Shared Sub Foo2(s As String)
    End Sub
EndClass
", @"
Imports System.Runtime.InteropServices
Imports System.Text

Class C
    <DllImport(""user32.dll"", CharSet:=CharSet.Unicode)>
    Private Shared Sub Foo1(s As String)
    End Sub

    <DllImport(""user32.dll"", CharSet:=CharSet.Unicode)>
    Private Shared Sub Foo2(s As String)
    End Sub
EndClass
");
        }

        [Fact, Trait(Traits.Feature, Traits.Features.Diagnostics)]
        public void CA2101FixDeclareBasicTest()
        {
            VerifyBasicFix(@"
Imports System.Text

Class C
    Private Declare Sub Foo1 Lib ""user32.dll"" (s As String)
    Private Declare Ansi Sub Foo2 Lib ""user32.dll"" (s As StringBuilder)
    Private Declare Function Foo3 Lib ""user32.dll"" () As String
EndClass
", @"
Imports System.Text

Class C
    Private Declare Unicode Sub Foo1 Lib ""user32.dll"" (s As String)
    Private Declare Unicode Sub Foo2 Lib ""user32.dll"" (s As StringBuilder)
    Private Declare Unicode Function Foo3 Lib ""user32.dll"" () As String
EndClass
");
        }

        #endregion
    }
}


text:
package com.example.souzhoubian;

import android.graphics.drawable.Drawable;
import com.baidu.mapapi.map.ItemizedOverlay;
import com.baidu.mapapi.map.MapView;
import com.baidu.mapapi.map.OverlayItem;
import com.baidu.platform.comapi.basestruct.GeoPoint;

/**
 * Created with IntelliJ IDEA.
 * User: cdm
 * Date: 13-10-14
 * Time: AM10:14
 * To change this template use File | Settings | File Templates.
 */
public class MyLocationOverlay extends ItemizedOverlay {

    public MyLocationOverlay(Drawable drawable, MapView mapView) {
        super(drawable, mapView);
    }

    public void setMyLocation(GeoPoint myLocation) {
        removeAll();
        OverlayItem item = new OverlayItem(myLocation, "", "");
        addItem(item);

    }

}


text:
body
{
 background: white;
 text-align:left;
}

.centering
{
 text-align: center;
}

label
{
 	clear: left;
	float: left;
	font-size: 18px;
}

#commentary
{
  padding:10px;
  margin:15px;
  font-size:18px;
  background-color:black;
  color:white;
  width:50%;
  display: inline-block;
}

.inelement {width:4em; margin-right:5px;}

#autofillArray
{
  display: none;
  margin: 10px;
}

#animation
{
  display: none;
}

#result
{
  display:inline-block;
  font-size:20px;
  margin:5px;
  position:relative;
}

.box
{ padding:5px;
  border:2px solid black;
  margin:5px;
  font-size:20px;
  background-color:yellow;
  display:inline-block;
  position:relative;
}

#controls
 {
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}


text:
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${SCRIPTDIR}/../
BASE=${PWD}
export CLASSPATH="${PWD}/lib/*"

java -cp "${CLASSPATH}" i5.las2peer.tools.L2pNodeLauncher -s 9001 - "uploadStartupDirectory" "startService('i5.las2peer.services.acdsense.DataService','SampleServicePass')" "startConnector('i5.las2peer.we
bConnector.WebConnector','8080')"


text:
<?php

/* smilegestionPersonnelBundle:Default:listeGroupe.html.twig */
class __TwigTemplate_677539706088a1355683fc61d06b9c6120500ba9e300c5851ffb5724e447352c extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        try {
            $this->parent = $this->env->loadTemplate("::base_template.html.twig");
        } catch (Twig_Error_Loader $e) {
            $e->setTemplateFile($this->getTemplateName());
            $e->setTemplateLine(1);

            throw $e;
        }

        $this->blocks = array(
            'breadcumb' => array($this, 'block_breadcumb'),
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "::base_template.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_breadcumb($context, array $blocks = array())
    {
        // line 4
        echo "
env->getExtension('routing')->getPath("smilegestion_personnel_listgroupe");
        echo "\">Gestion des groupes

Liste des groupes

    ";
    }

    // line 8
    public function block_content($context, array $blocks = array())
    {
        // line 9
        echo "    ";
        if ((((isset($context["profil"]) ? $context["profil"] : null) == "ADMIN") || ((isset($context["profil"]) ? $context["profil"] : null) == "RH"))) {
            // line 10
            echo "          env->getExtension('routing')->getPath("smilegestion_personnel_addgroupe");
            echo "\" class=\"btn btn-success\">Ajouter un groupe
    ";
        }
        // line 12
        echo "

            ";
        // line 17
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "session", array()), "flashBag", array()), "all", array()));
        foreach ($context['_seq'] as $context["type"] => $context["messages"]) {
            // line 18
            echo "                ";
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable($context["messages"]);
            foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
                // line 19
                echo "
env, $context["type"], "html", null, true);
                echo "\" role=\"alert\">
                        ";
                // line 20
                echo twig_escape_filter($this->env, $context["message"], "html", null, true);
                echo "

                ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 23
            echo "            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['type'], $context['messages'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 24
        echo "

                            Libellé
                             Actions

                        ";
        // line 37
        if ( !(null === (isset($context["groupes"]) ? $context["groupes"] : null))) {
            echo "
                            ";
            // line 38
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["groupes"]) ? $context["groupes"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["groupe"]) {
                // line 39
                echo "

                                    ";
                // line 40
                echo twig_escape_filter($this->env, $this->getAttribute($context["groupe"], "libgroupe", array()), "html", null, true);
                echo "

                                    ";
                // line 42
                if ((((isset($context["profil"]) ? $context["profil"] : null) == "ADMIN") || ((isset($context["profil"]) ? $context["profil"] : null) == "RH"))) {
                    // line 43
                    echo "

                                        env, $this->env->getExtension('routing')->getPath("smilegestion_personnel_editgroupe", array("id" => $this->getAttribute($context["groupe"], "id", array()))), "html", null, true);
                    echo "\" title=\"Modifier\" class=\"glyphicon glyphicon-pencil btn btn-info\">
                                        env, $this->env->getExtension('routing')->getPath("smilegestion_personnel_delgroupe", array("id" => $this->getAttribute($context["groupe"], "id", array()))), "html", null, true);
                    echo "');
                                                        }
                                                   \" href=\"#\" class=\"glyphicon glyphicon-remove btn btn-danger\">

                                    ";
                }
                // line 53
                echo "

                        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['groupe'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 55
            echo "                        ";
        } else {
            // line 56
            echo "

                                    Aucun enregistrement trouvé

                        ";
        }
        // line 62
        echo "

";
    }

    public function getTemplateName()
    {
        return "smilegestionPersonnelBundle:Default:listeGroupe.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  165 => 62,  157 => 56,  154 => 55,  147 => 53,  139 => 48,  133 => 45,  129 => 43,  127 => 42,  122 => 40,  119 => 39,  115 => 38,  111 => 37,  96 => 24,  90 => 23,  81 => 20,  76 => 19,  71 => 18,  67 => 17,  60 => 12,  54 => 10,  51 => 9,  48 => 8,  40 => 4,  37 => 3,  11 => 1,);
    }
}


text:
import {NgModule} from '@angular/core';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import {SortableTableComponent} from "./sortableTable.component";
import {CommonModule} from "@angular/common";
import {AddbuttonComponent} from "./addbutton.component";
import {ClosebuttonComponent} from "./closebutton.component";
import {ConfirmDialog} from "./confirmDialog.component";
import {DeletebuttonComponent} from "./deletebutton.component";
import {EditbuttonComponent} from "./editbutton.component";
import {MorebuttonComponent} from "./morebutton.component";
import {NewbuttonComponent} from "./newbutton.component";
import {SavebuttonComponent} from "./savebutton.component";

@NgModule({
    declarations: [
        AddbuttonComponent,
        ClosebuttonComponent,
        ConfirmDialog,
        DeletebuttonComponent,
        EditbuttonComponent,
        MorebuttonComponent,
        NewbuttonComponent,
        SavebuttonComponent,
        SortableTableComponent
    ],
    imports: [
        CommonModule,
        NgbModule
    ],
    exports: [
        AddbuttonComponent,
        ClosebuttonComponent,
        ConfirmDialog,
        DeletebuttonComponent,
        EditbuttonComponent,
        MorebuttonComponent,
        NewbuttonComponent,
        SavebuttonComponent,
        SortableTableComponent
    ]
})
export class ptModule {
}


text:
package com.bekk.akka.actor;

import akka.actor.AbstractActor;
import akka.actor.ActorRef;
import akka.actor.Props;

import static akka.japi.pf.ReceiveBuilder.match;

public class TestActor extends AbstractActor {

    public static Props mkProps(ActorRef actorThisActorDependsOn) {
        return Props.create(TestActor.class, () -> new TestActor(actorThisActorDependsOn));
    }

    public TestActor(ActorRef actorThisActorDependsOn) {
        receive(match(TestMessage.class, msg -> System.out.println("Received message " + msg)).build());
    }

    public static class TestMessage {}
}


text:
<?php

namespace Doctrine\ORM\Event;

use Doctrine\Common\EventArgs;

/**
 * Class that holds event arguments for a loadMetadata event.
 *
 * @author Jonathan H. Wage <jonwage@gmail.com>
 * @since 2.0
 */
class LoadClassMetadataEventArgs extends EventArgs
{
    private $_classMetadata;

    public function __construct(\Doctrine\ORM\Mapping\ClassMetadata $classMetadata)
    {
        $this->_classMetadata = $classMetadata;
    }

    public function getClassMetadata()
    {
        return $this->_classMetadata;
    }
}


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.3.5.4_2-25gs
description: >
    Strict mode - checking access to strict function caller from
    strict function (FunctionExpression defined within a
    FunctionExpression inside strict mode)
flags: [onlyStrict]
---*/

var f1 = function () {
    var f = function () {
        gNonStrict();
    }
    f();
}

assert.throws(TypeError, function() {
    f1();
});

function gNonStrict() {
    return gNonStrict.caller;
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Image Slider Theme - Jssor Slider, Carousel, Slideshow with Javascript Source Code</title>

                mobile ready, touch swipe

                finger catchable right to left

                responsive, scale smoothly

                random caption transition

                mobile ready, touch swipe

                finger catchable right to left

                responsive, scale smoothly

                random caption transition

                mobile ready, touch swipe

                finger catchable right to left

        Slider Javascript


text:
'''
 Author: Hans Erik Heggem
 Email: hans.erik.heggem@gmail.com
 Project: Master's Thesis - Autonomous Inspection Of Wind Blades
 Repository: Master's Thesis - CV (Computer Vision
'''

import math, cv2, operator
import numpy as np
from Settings.Exceptions import DroneVisionError
from src.DroneVision.DroneVision_src.imgProcessing.frameTools.frameTools import CheckGrayScale, CheckColor, GetShape
from src.DroneVision.DroneVision_src.hardware.imageTools import MatplotShow

def FindLineLimits(frame, hough_lines, keypoints, radi_threshold=None, radi_threshold_tuning_param=2.0, draw_hough_matrix=False, draw_bounded_lines=False, draw_max_min_lines=False, draw_arrowed_bounded_lines=True):
	'''
	 @brief Find boundaries for all hough lines according to the point map.
	 	Segments an object based on the point list by limiting the hough lines and detecting the boundary lines.

	 @param frame (grayscale)
	 @param hough_lines List of hough lines (rho, theta).
	 @param keypoints List of detected point positions.
	 @param radi_threshold Threshold in pixels to search for in vertical and horizontal axis (If none, then it is set to the biggest blob size)
	 @param radi_threshold_tuning_param Threshold tuning parameter (default=2 when using biggest blob size. < 0.5 is recommended when using distance betwen blobs).
	 @param draw_hough_matrix Draw hough lines matrix.
	 @param draw_bounded_lines Draw bounded lines.
	 @param draw_max_min_lines Draw detected max min lines.
	 @param draw_arrowed_bounded_lines

	 @return frame, bounded_lines, max_hor_line, min_hor_line, max_vert_line, min_vert_line
	 	frame - Usually grayscale, but rgb frame if any draw flag == True
	 	bounded_lines - list with vertical and horizontal lines.
	 					bounded_lines[0] = horizontal lines list, bounded_lines[1] = vertical lines list,
	 					where each index describing a line as ((x1,y1), (x2,y2))
	 	max_min_lines - List of max and min horizontal and vertical lines, in this order:
		 	max_hor_line - Bottom boundary line on the horizontal axis (Note: bottom = max index in images) as ((x1,y1), (x2,y2))
		 	min_hor_line - Top boundary line on the horizontal axis (Note: top = min index in images) as ((x1,y1), (x2,y2))
		 	max_vert_line - Right most boundary line on the vertical axis as ((x1,y1), (x2,y2))
		 	min_vert_line - Left most boundary line on the horizontal axis as ((x1,y1), (x2,y2))
	'''

	x_points = np.zeros(len(keypoints)) #Width
	y_points = np.zeros(len(keypoints)) #height
	biggest_size = 0.0
	for i in range(len(keypoints)):
		if keypoints[i].size > biggest_size:
			biggest_size = keypoints[i].size
		x_points[i] = keypoints[i].pt[0]
		y_points[i] = keypoints[i].pt[1]

	# Tuning variable - search along vertical or horizontal axis is limited to this radius.
	if radi_threshold == None:
		radi_threshold = biggest_size
	radi_threshold *= radi_threshold_tuning_param

	min_vert_points = [[],[]]
	max_vert_points = [[],[]]
	min_hor_points 	= [[],[]]
	max_hor_points 	= [[],[]]
	bounded_lines 	= [[],[]]
	width, height 	= GetShape(frame)

	size = math.sqrt(math.pow(width, 2.0) + math.pow(height, 2.0))
	max_vert_line_y_pos = -size*10 # Set invalid 'large' values to begin with
	min_vert_line_y_pos = size*10
	max_hor_line_x_pos 	= -size*10
	min_hor_line_x_pos 	= size*10

	if draw_hough_matrix:
		frame = DrawHoughLines(frame, hough_lines)

	for rho, theta in hough_lines:
		a 	= np.cos(theta)
		b 	= np.sin(theta)
		x0 	= a*rho
		y0	= b*rho
		if round(np.rad2deg(a)) == 0: # Horizontal lines - search y_points
			y_m_above 	= np.argwhere(y_points >= y0 - radi_threshold).T[0]
			y_m_below 	= np.argwhere(y_points < y0 + radi_threshold).T[0]
			y_m_ab_b 	= np.in1d(y_m_above, y_m_below)
			y_m_be_b 	= np.in1d(y_m_below, y_m_above)
			y_m_ab_in 	= np.argwhere(y_m_ab_b == True).T[0]
			y_m_be_in 	= np.argwhere(y_m_be_b == True).T[0]
			y_m_temp	= np.zeros(len(y_m_ab_in) + len(y_m_be_in))
			len_ab 		= len(y_m_ab_in)
			for i in range(len(y_m_temp)):
				if i < len_ab:
					y_m_temp[i] = y_m_above[y_m_ab_in[i]]
				else:
					y_m_temp[i] = y_m_below[y_m_be_in[i-len_ab]]
			y_m = np.unique(y_m_temp)
			if len(y_m) < 2: # Ignore lines of only a single point.
				continue
			y_dist = {}
			for y in y_m:
				y = int(y)
				y_dist[x_points[y]] = y_points[y]
			sorted_y = sorted(y_dist.items(), key=operator.itemgetter(0))
			min_point = sorted_y[0]
			max_point = sorted_y[-1:][0]

			xp = np.zeros(len(y_dist))
			fp = np.zeros(len(y_dist))
			i = 0
			for x, y in sorted_y:
				xp[i] = x
				fp[i] = y
				i += 1
			y_inter = np.interp([min_point[0], max_point[0]], xp, fp)
			x1 = int(round(min_point[0]))
			y1 = int(round(y_inter[0]))
			x2 = int(round(max_point[0]))
			y2 = int(round(y_inter[1]))

			min_hor_points[0].append(min_point[0]) #x
			min_hor_points[1].append(y_inter[0]) #y
			max_hor_points[0].append(max_point[0]) #x
			max_hor_points[1].append(y_inter[1]) #y
			average_line_x_pos = y_inter[0] + (y_inter[1] - y_inter[0])/2
			if average_line_x_pos > max_hor_line_x_pos:
				max_hor_line_x_pos 	= average_line_x_pos
				max_hor_line = ((x1,y1), (x2,y2))
			if average_line_x_pos < min_hor_line_x_pos:
				min_hor_line_x_pos 	= average_line_x_pos
				min_hor_line = ((x1,y1), (x2,y2))
			bounded_lines[0].append(((x1,y1), (x2,y2)))
		elif round(np.rad2deg(b)) == 0: # vertical lines - search x_points
			x_m_above 	= np.argwhere(x_points >= x0 - radi_threshold).T[0]
			x_m_below 	= np.argwhere(x_points < x0 + radi_threshold).T[0]
			x_m_ab_b 	= np.in1d(x_m_above, x_m_below)
			x_m_be_b 	= np.in1d(x_m_below, x_m_above)
			x_m_ab_in 	= np.argwhere(x_m_ab_b == True).T[0]
			x_m_be_in 	= np.argwhere(x_m_be_b == True).T[0]
			x_m_temp	= np.zeros(len(x_m_ab_in) + len(x_m_be_in))
			len_ab 		= len(x_m_ab_in)
			for i in range(len(x_m_temp)):
				if i < len_ab:
					x_m_temp[i] = x_m_above[x_m_ab_in[i]]
				else:
					x_m_temp[i] = x_m_below[x_m_be_in[i-len_ab]]
			x_m = np.unique(x_m_temp)
			if len(x_m) < 2: # Ignore lines of only a single point.
				continue
			x_dist = {}
			for x in x_m:
				x = int(x)
				x_dist[y_points[x]] = x_points[x]
			sorted_x = sorted(x_dist.items(), key=operator.itemgetter(0))
			min_point = sorted_x[0]
			max_point = sorted_x[-1:][0]

			xp = np.zeros(len(x_dist))
			fp = np.zeros(len(x_dist))
			i = 0
			for x, y in sorted_x:
				xp[i] = x
				fp[i] = y
				i += 1
			x_inter = np.interp([min_point[1], max_point[1]], xp, fp)
			x1 = int(round(x_inter[0]))
			y1 = int(round(min_point[0]))
			x2 = int(round(x_inter[1]))
			y2 = int(round(max_point[0]))

			min_vert_points[0].append(x_inter[0]) #x
			min_vert_points[1].append(min_point[0]) #y
			max_vert_points[0].append(x_inter[1]) #x
			max_vert_points[1].append(max_point[0]) #y
			average_line_y_pos = x_inter[0] + (x_inter[1] - x_inter[0])/2
			if average_line_y_pos > max_vert_line_y_pos:
				max_vert_line_y_pos  = average_line_y_pos
				max_vert_line = ((x1,y1), (x2,y2))
			if average_line_y_pos < min_vert_line_y_pos:
				min_vert_line_y_pos  = average_line_y_pos
				min_vert_line = ((x1,y1), (x2,y2))
			bounded_lines[1].append(((x1,y1), (x2,y2)))
		else:
			raise DroneVisionError('find_line_limits_unexpected_angle')

		if draw_bounded_lines:
			color 		= (0,255,255)
			line_thick 	= 2
			if draw_arrowed_bounded_lines:
				tipLength = 0.05
				cv2.arrowedLine(frame, (x1,y1), (x2,y2), color, line_thick, tipLength=tipLength)
				cv2.arrowedLine(frame, (x2,y2), (x1,y1), color, line_thick, tipLength=tipLength)
			else:
				cv2.line(frame, (x1,y1), (x2,y2), color, line_thick)

	try:
		max_min_lines = [max_hor_line, min_hor_line, max_vert_line, min_vert_line]
	except:
		raise DroneVisionError('find_line_limits_no_hor_or_vert_found')

	if draw_max_min_lines and len(hough_lines) > 0:
		cv2.line(frame, max_hor_line[0], max_hor_line[1], (255,0,255),4)
		cv2.line(frame, min_hor_line[0], min_hor_line[1], (255,0,255),4)
		cv2.line(frame, max_vert_line[0], max_vert_line[1], (255,0,255),4)
		cv2.line(frame, min_vert_line[0], min_vert_line[1], (255,0,255),4)

	return frame, bounded_lines, max_min_lines

def DrawHoughLine(frame, hough_line, color):
	'''
	 @brief Draw hough line on frame.
	 	Hough lines are give in rho, theta coordinates.

	 @param frame
	 @param hough_line (rho, theta)
	 @param color RGB color (R,G,B)

	 @return frame (with drawn line)
	'''
	frame = CheckColor(frame)
	width, height = GetShape(frame)
	size = math.sqrt(math.pow(width, 2.0) + math.pow(height, 2.0))
	rho, theta = hough_line
	if not(np.isnan(theta)) and not(np.isnan(rho)):
		a 	= np.cos(theta)
		b 	= np.sin(theta)
		x0 	= a*rho
		y0	= b*rho
		x1 	= int(x0 + size*(-b))
		y1 	= int(y0 + size*(a))
		x2 	= int(x0 - size*(-b))
		y2 	= int(y0 - size*(a))
		cv2.line(frame, (x1,y1), (x2,y2), color, 2)
	return frame

def DrawHoughLines(frame, hough_lines, color=(255,0,0)):
	'''
	 @brief Draw hough lines on frame.
	 	Hough lines are give in rho, theta coordinates.

	 @param frame
	 @param hough_lines List of hough lines (rho, theta)
	 @param color RGB color (R,G,B)

	 @return frame (with drawn lines)
	'''
	for hough_line in hough_lines:
		frame = DrawHoughLine(frame, hough_line, color)
	return frame

def PrintHoughAccumulator(accumulator, id_m, rhos):
	'''
	 @brief Print Hough transform accumulator in matplotlib figure.

	 @param accumulator
	'''
	acc_shape 	= GetShape(accumulator)
	ylabs 		= np.deg2rad(np.arange(-0.0, 180.0, 1))
	acc_map 	= np.zeros((acc_shape[0], len(ylabs)), dtype=np.uint16)
	id_acc 		= np.argwhere(accumulator > 0)
	for i in range(len(id_acc)):

		idx 		= id_acc[i][0]*acc_shape[1] + id_acc[i][1]
		rho 		= rhos[idx / acc_shape[1]]
		acc_map[int(rho), idx % acc_shape[1]] += 1

	acc_map = cv2.cvtColor(acc_map, cv2.COLOR_GRAY2BGR)

	for i in range(len(id_m)):
		idx 		= id_m[i][0]*acc_shape[1] + id_m[i][1]
		rho 		= rhos[idx / acc_shape[1]]
		cv2.circle(acc_map,(int(rho), idx % acc_shape[1]), 1, (0,0,255), -1)

	acc_map = CheckGrayScale(acc_map)

	touple_frame_plot = []
	touple_frame_plot.append(('Hough line accumulator', acc_map.T))
	MatplotShow(touple_frame_plot, 'Hough_line_accumulator')

def concatenateLines(lines, change_rho):
	'''
	 @brief Concatene hough lines which are within a distance.

	 @returns concatenated lines. (sorted from min -> max theta)
	'''
	theta_dict = {}
	for rho, theta in lines:
		if not(theta in theta_dict):
			theta_dict[theta] = []
		theta_dict[theta].append(rho)
	con_lines = []
	for theta in theta_dict:
		theta_dict[theta].sort()
		j = 0
		for i in range(1, len(theta_dict[theta])):
			if abs(theta_dict[theta][i] - theta_dict[theta][i-1]) > change_rho:
				con_lines.append((np.median(theta_dict[theta][j:i]), theta))
				j = i
		con_lines.append((np.median(theta_dict[theta][j:]), theta))
	return con_lines

def HoughLineEdgePoints(frame, edge_points, horizontal_points, hough_peak_param=1.2, dilation_kernel_size=3, dilation_iterations=1):
	'''
	 @brief Speeded up Houg lines transform for lines by iterating over known key point positions.
	 	Inspired by: https://alyssaq.github.io/2014/understanding-hough-transform/

	 @param frame
	 @param edge_points List of detected edge points as [[x], [y]]
	 @param horizontal_points Set True for detecting horizontal lines, and False for detecting vertical lines.
	 		The lines will be focused around the vertical or horizontal axis.
	 @param hough_peak_param Delimiter for increasing number of peaks to validate for finding the most significant peaks. Must be >= 1.0.
	 @param dilation_kernel_size (Increase strong areas of peak points by dilation.
	 	Set the kernel size for dilation as a dilation_kernel_size*dilation_kernel_size (f.eks 3*3 kernel size).
	 	Set to 1 to give the dilation no effect. (default=3))
	 @param dilation_iterations (Number of dilation iterations to increase the width of strong areas (default=1))

	 @return (rho, theta) (Distance and angle of the most significant edge.)
	'''

	# Rho and Theta ranges
	if horizontal_points:
		start_degree 	= 0.0
		end_degree 		= 45.0
		step_degree 	= 1.0
		thetas_small	= np.deg2rad(np.arange(start_degree, end_degree, step_degree))
		start_degree 	= 135.0
		end_degree 		= 180.0
		step_degree 	= 1.0
		thetas_big		= np.deg2rad(np.arange(start_degree, end_degree, step_degree))
		thetas 			= np.concatenate((thetas_small, thetas_big))
	else: # vertical points
		start_degree 	= 45.0
		end_degree 		= 135.0
		step_degree 	= 1.0
		thetas			= np.deg2rad(np.arange(start_degree, end_degree, step_degree))

	width, height 	= GetShape(frame)
	diag_len 		= np.ceil(np.sqrt(width * width + height * height))   # max_dist
	rhos 			= np.linspace(-np.int(diag_len), np.int(diag_len), np.int(diag_len) * 2)

	# Cache some reusable values
	cos_t 		= np.cos(thetas)
	sin_t 		= np.sin(thetas)
	num_thetas 	= len(thetas)

	# Hough accumulator array of theta vs rho
	accumulator = np.zeros((int(2 * diag_len), num_thetas), dtype=np.float32)
	acc_shape 	= GetShape(accumulator)

	# Vote in the hough accumulator
	for i in range(len(edge_points[0])):
		x = edge_points[0][i]
		y = edge_points[1][i]

		for t_idx in range(num_thetas):
			# Calculate rho. diag_len is added for a positive index
			rho = int(round(x * cos_t[t_idx] + y * sin_t[t_idx]) + diag_len)
			accumulator[rho, t_idx] += 1

	# Dilate the accumulator so that close neighboring voting points are stronger, and add the Gaussian smoothed accumulator to highlight the strongest peak in the strongest areas.
	accumulator = cv2.dilate(accumulator, np.ones((dilation_kernel_size,dilation_kernel_size), dtype=np.uint8), iterations=dilation_iterations)
	accumulator += cv2.GaussianBlur(accumulator, (dilation_kernel_size,dilation_kernel_size), 0) # Let sigma be calculated according to the kernel size. See cv2 doc.

	# Peak finding based on max votes.
	id_m 		= np.argwhere(accumulator >= np.max(accumulator)/hough_peak_param)
	len_id_m 	= len(id_m)
	rhos_res 	= [0]*len_id_m
	thetas_res 	= [0]*len_id_m
	for i in range(len_id_m):
		idx 			= id_m[i][0]*acc_shape[1] + id_m[i][1]
		rhos_res[i] 	= rhos[idx / acc_shape[1]]
		thetas_res[i] 	= thetas[idx % acc_shape[1]]

	rho 	= np.median(rhos_res)
	theta 	= np.median(thetas_res)

	return (rho, theta)

def HoughLinesPointMatrix(frame, keypoints, min_lines=2, radi_threshold=None, radi_threshold_tuning_param=2.0):
	'''
	 @brief Speeded up Houg lines transform for lines by iterating over known key point positions.
	 	Inspired by: https://alyssaq.github.io/2014/understanding-hough-transform/

	 @param frame
	 @param keypoints List of detected points (using the blob detection algorithm.)
	 @param min_lines Minimum lines to finally end up with. Set to -1 to hinder any concateniation of detected lines.
	 @param radi_threshold Threshold in pixels to search for in vertical and horizontal axis (If none, then it is set to the biggest blob size)
	 @param radi_threshold_tuning_param Threshold tuning parameter (default=2 when using biggest blob size. < 0.5 is recommended when using distance betwen blobs).

	 @return hough_lines Returned as list of touples (rho, theta)
	'''
	# Rho and Theta ranges
	thetas 			= np.deg2rad(np.array([0.0, 90.0]))
	width, height 	= GetShape(frame)
	diag_len 		= np.ceil(np.sqrt(width * width + height * height))   # max_dist
	rhos 			= np.linspace(-np.int(diag_len), np.int(diag_len), np.int(diag_len) * 2)

	# Cache some resuable values
	cos_t 		= np.cos(thetas)
	sin_t 		= np.sin(thetas)
	num_thetas 	= len(thetas)

	# Hough accumulator array of theta vs rho
	accumulator = np.zeros((int(2 * diag_len), num_thetas), dtype=np.float32)
	acc_shape 	= GetShape(accumulator)

	biggest_point = 0
	# Vote in the hough accumulator
	for i in range(len(keypoints)):
		x = keypoints[i].pt[0]
		y = keypoints[i].pt[1]

		if keypoints[i].size > biggest_point:
			biggest_point = keypoints[i].size

		for t_idx in range(num_thetas):
			# Calculate rho. diag_len is added for a positive index
			rho = int(round(x * cos_t[t_idx] + y * sin_t[t_idx]) + diag_len)
			accumulator[rho, t_idx] += 1

	# Peak finding based on max votes
	id_m 		= np.argwhere(accumulator >= 1)
	len_id_m 	= len(id_m)
	hough_lines = [0]*len_id_m
	#PrintHoughAccumulator(accumulator, id_m, rhos)
	for i in range(len_id_m):
		idx 			= id_m[i][0]*acc_shape[1] + id_m[i][1]
		rho 			= rhos[idx / acc_shape[1]]
		theta 			= thetas[idx % acc_shape[1]]
		hough_lines[i] 	= (rho, theta)

	if radi_threshold != None:
		origin_threshold = radi_threshold*radi_threshold_tuning_param
	else:
		origin_threshold = biggest_point
	threshold = origin_threshold

	n_lines = len(hough_lines) + 1 #Stop concatenating when there is no change in n_lines
	while len(hough_lines) > min_lines and n_lines - len(hough_lines) > 0 and min_lines > 0:
		n_lines 	= len(hough_lines)
		hough_lines = concatenateLines(hough_lines, threshold)
		threshold 	+= origin_threshold/2
	return hough_lines # returned as touples of (rho, theta)


text:
#ifndef TEST_TASKS_H
#define TEST_TASKS_H

// definition of the used task numbers for the test
#define TASK_KEYBOARD          0
#define TASK_BUZZER            1
#define TASK_DISPLAY           2
#define TASK_COMMUNICATION     3
#define TASK_CALCULATION       4
#define TASK_STATEMACHINE      5
#define TASK_HOUSEKEEPING      6
#define TASK_REMOTE_CONTROL    7

#endif

//--- eof ----------------------------------------------------------------------


text:
#ifndef TENSORFLOW_CORE_LIB_BFLOAT16_BFLOAT16_H_
#define TENSORFLOW_CORE_LIB_BFLOAT16_BFLOAT16_H_

#include <cmath>
#include <complex>

#include "tensorflow/core/platform/byte_order.h"

#ifdef __CUDACC__
// All functions callable from CUDA code must be qualified with __device__
#define B16_DEVICE_FUNC __host__ __device__

#else
#define B16_DEVICE_FUNC

#endif

namespace Eigen {
struct half;
}

namespace tensorflow {

// Single precision complex.
typedef std::complex<float> complex64;
// Double precision complex.
typedef std::complex<double> complex128;

// see framework/bfloat16.h for description.
struct bfloat16 {
  // The default constructor must yield a zero value, not an uninitialized
  // value; some TF kernels use T() as a zero value.
  B16_DEVICE_FUNC bfloat16() : value(ZERO_VALUE) {}

  B16_DEVICE_FUNC static bfloat16 truncate_to_bfloat16(const float v) {
    bfloat16 output;
    if (float_isnan(v)) {
      output.value = NAN_VALUE;
      return output;
    }
    const uint16_t* p = reinterpret_cast<const uint16_t*>(&v);
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
    output.value = p[0];
#else
    output.value = p[1];
#endif
    return output;
  }

  B16_DEVICE_FUNC explicit bfloat16(const float v) {
    value = round_to_bfloat16(v).value;
  }

  B16_DEVICE_FUNC explicit bfloat16(const double val)
      : bfloat16(static_cast<float>(val)) {}
  // Following the convention of numpy, converting between complex and
  // float will lead to loss of imag value.
  B16_DEVICE_FUNC explicit bfloat16(const complex64& val)
      : bfloat16(val.real()) {}

  B16_DEVICE_FUNC explicit bfloat16(const complex128& val)
      : bfloat16(static_cast<float>(val.real())) {}

  B16_DEVICE_FUNC explicit bfloat16(const unsigned short val)
      : bfloat16(static_cast<float>(val)) {}

  B16_DEVICE_FUNC explicit bfloat16(const unsigned int val)
      : bfloat16(static_cast<float>(val)) {}

  B16_DEVICE_FUNC explicit bfloat16(const int val)
      : bfloat16(static_cast<float>(val)) {}

  B16_DEVICE_FUNC explicit bfloat16(const long val)
      : bfloat16(static_cast<float>(val)) {}

  B16_DEVICE_FUNC explicit bfloat16(const long long val)
      : bfloat16(static_cast<float>(val)) {}

  template <class T>
  B16_DEVICE_FUNC explicit bfloat16(const T& val)
      : bfloat16(static_cast<float>(val)) {}

  B16_DEVICE_FUNC explicit operator float() const {
    float result = 0;

    uint16_t* q = reinterpret_cast<uint16_t*>(&result);

#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
    q[0] = value;
#else
    q[1] = value;
#endif
    return result;
  }

  B16_DEVICE_FUNC explicit operator bool() const {
    return static_cast<bool>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator Eigen::half() const;

  B16_DEVICE_FUNC explicit operator short() const {
    return static_cast<short>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator int() const {
    return static_cast<int>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator long() const {
    return static_cast<long>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator char() const {
    return static_cast<char>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator signed char() const {
    return static_cast<signed char>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator unsigned char() const {
    return static_cast<unsigned char>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator unsigned short() const {
    return static_cast<unsigned short>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator unsigned int() const {
    return static_cast<unsigned int>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator unsigned long() const {
    return static_cast<unsigned long>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator unsigned long long() const {
    return static_cast<unsigned long long>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator long long() const {
    return static_cast<long long>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator double() const {
    return static_cast<double>(float(*this));
  }

  B16_DEVICE_FUNC explicit operator complex64() const {
    return complex64(float(*this), float(0.0));
  }

  B16_DEVICE_FUNC explicit operator complex128() const {
    return complex128(double(*this), double(0.0));
  }

  union FP32 {
    unsigned int u;
    float f;
  };

  // Converts a float point to bfloat16, with round-nearest-to-even as rounding
  // method.
  // TODO: There is a slightly faster implementation (8% faster on CPU)
  // than this (documented in cl/175987786), that is exponentially harder to
  // understand and document. Switch to the faster version when converting to
  // BF16 becomes compute-bound.
  B16_DEVICE_FUNC static bfloat16 round_to_bfloat16(float v) {
    uint32_t input;
    FP32 f;
    f.f = v;
    input = f.u;
    bfloat16 output;

    if (float_isnan(v)) {
      // If the value is a NaN, squash it to a qNaN with msb of fraction set,
      // this makes sure after truncation we don't end up with an inf.
      //
      // qNaN magic: All exponent bits set + most significant bit of fraction
      // set.
      output.value = 0x7fc0;
    } else {
      // Fast rounding algorithm that rounds a half value to nearest even. This
      // reduces expected error when we convert a large number of floats. Here
      // is how it works:
      //
      // Definitions:
      // To convert a float 32 to bfloat16, a float 32 can be viewed as 32 bits
      // with the following tags:
      //
      // Sign |  Exp (8 bits) | Frac (23 bits)
      //  S     EEEEEEEE         FFFFFFLRTTTTTTTTTTTTTTT
      //
      //  S: Sign bit.
      //  E: Exponent bits.
      //  F: First 6 bits of fraction.
      //  L: Least significant bit of resulting bfloat16 if we truncate away the
      //  rest of the float32. This is also the 7th bit of fraction
      //  R: Rounding bit, 8th bit of fraction.
      //  T: Sticky bits, rest of fraction, 15 bits.
      //
      // To round half to nearest even, there are 3 cases where we want to round
      // down (simply truncate the result of the bits away, which consists of
      // rounding bit and sticky bits) and two cases where we want to round up
      // (truncate then add one to the result).
      //
      // The fast converting algorithm simply adds lsb (L) to 0x7fff (15 bits of
      // 1s) as the rounding bias, adds the rounding bias to the input, then
      // truncates the last 16 bits away.
      //
      // To understand how it works, we can analyze this algorithm case by case:
      //
      // 1. L = 0, R = 0:
      //   Expect: round down, this is less than half value.
      //
      //   Algorithm:
      //   - Rounding bias: 0x7fff + 0 = 0x7fff
      //   - Adding rounding bias to input may create any carry, depending on
      //   whether there is any value set to 1 in T bits.
      //   - R may be set to 1 if there is a carry.
      //   - L remains 0.
      //   - Note that this case also handles Inf and -Inf, where all fraction
      //   bits, including L, R and Ts are all 0. The output remains Inf after
      //   this algorithm.
      //
      // 2. L = 1, R = 0:
      //   Expect: round down, this is less than half value.
      //
      //   Algorithm:
      //   - Rounding bias: 0x7fff + 1 = 0x8000
      //   - Adding rounding bias to input doesn't change sticky bits but
      //   adds 1 to rounding bit.
      //   - L remains 1.
      //
      // 3. L = 0, R = 1, all of T are 0:
      //   Expect: round down, this is exactly at half, the result is already
      //   even (L=0).
      //
      //   Algorithm:
      //   - Rounding bias: 0x7fff + 0 = 0x7fff
      //   - Adding rounding bias to input sets all sticky bits to 1, but
      //   doesn't create a carry.
      //   - R remains 1.
      //   - L remains 0.
      //
      // 4. L = 1, R = 1:
      //   Expect: round up, this is exactly at half, the result needs to be
      //   round to the next even number.
      //
      //   Algorithm:
      //   - Rounding bias: 0x7fff + 1 = 0x8000
      //   - Adding rounding bias to input doesn't change sticky bits, but
      //   creates a carry from rounding bit.
      //   - The carry sets L to 0, creates another carry bit and propagate
      //   forward to F bits.
      //   - If all the F bits are 1, a carry then propagates to the exponent
      //   bits, which then creates the minimum value with the next exponent
      //   value. Note that we won't have the case where exponents are all 1,
      //   since that's either a NaN (handled in the other if condition) or inf
      //   (handled in case 1).
      //
      // 5. L = 0, R = 1, any of T is 1:
      //   Expect: round up, this is greater than half.
      //
      //   Algorithm:
      //   - Rounding bias: 0x7fff + 0 = 0x7fff
      //   - Adding rounding bias to input creates a carry from sticky bits,
      //   sets rounding bit to 0, then create another carry.
      //   - The second carry sets L to 1.
      //
      // Examples:
      //
      //  Exact half value that is already even:
      //    Input:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit) | Frac (last 16 bit)
      //     S     E E E E E E E E      F F F F F F L     RTTTTTTTTTTTTTTT
      //     0     0 0 0 0 0 0 0 0      0 0 0 0 0 1 0     1000000000000000
      //
      //     This falls into case 3. We truncate the rest of 16 bits and no
      //     carry is created into F and L:
      //
      //    Output:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit)
      //     S     E E E E E E E E      F F F F F F L
      //     0     0 0 0 0 0 0 0 0      0 0 0 0 0 1 0
      //
      //  Exact half value, round to next even number:
      //    Input:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit) | Frac (last 16 bit)
      //     S     E E E E E E E E      F F F F F F L     RTTTTTTTTTTTTTTT
      //     0     0 0 0 0 0 0 0 0      0 0 0 0 0 0 1     1000000000000000
      //
      //     This falls into case 4. We create a carry from R and T,
      //     which then propagates into L and F:
      //
      //    Output:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit)
      //     S     E E E E E E E E      F F F F F F L
      //     0     0 0 0 0 0 0 0 0      0 0 0 0 0 1 0
      //
      //
      //  Max denormal value round to min normal value:
      //    Input:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit) | Frac (last 16 bit)
      //     S     E E E E E E E E      F F F F F F L     RTTTTTTTTTTTTTTT
      //     0     0 0 0 0 0 0 0 0      1 1 1 1 1 1 1     1111111111111111
      //
      //     This falls into case 4. We create a carry from R and T,
      //     propagate into L and F, which then propagates into exponent
      //     bits:
      //
      //    Output:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit)
      //     S     E E E E E E E E      F F F F F F L
      //     0     0 0 0 0 0 0 0 1      0 0 0 0 0 0 0
      //
      //  Max normal value round to Inf:
      //    Input:
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit) | Frac (last 16 bit)
      //     S     E E E E E E E E      F F F F F F L     RTTTTTTTTTTTTTTT
      //     0     1 1 1 1 1 1 1 0      1 1 1 1 1 1 1     1111111111111111
      //
      //     This falls into case 4. We create a carry from R and T,
      //     propagate into L and F, which then propagates into exponent
      //     bits:
      //
      //    Sign |  Exp (8 bit)     | Frac (first 7 bit)
      //     S     E E E E E E E E      F F F F F F L
      //     0     1 1 1 1 1 1 1 1      0 0 0 0 0 0 0
      //
      //
      // Least significant bit of resulting bfloat.
      uint32_t lsb = (input >> 16) & 1;
      uint32_t rounding_bias = 0x7fff + lsb;
      input += rounding_bias;
      output.value = static_cast<uint16_t>(input >> 16);
    }
    return output;
  }

  static bfloat16 epsilon() {
    bfloat16 x;
    x.value = 0x3c00;  // 0x1.0p-7
    return x;
  }

  static bfloat16 highest() {
    bfloat16 x;
    x.value = 0x7F7F;  // 0x1.FEp127
    return x;
  }

  static bfloat16 lowest() {
    bfloat16 x;
    x.value = 0xFF7F;  // -0x1.FEp127
    return x;
  }

  bool IsZero() const { return (value & 0x7FFF) == ZERO_VALUE; }

  uint16_t value;

  // A value that represents "not a number".
  static const uint16_t NAN_VALUE = 0x7FC0;

 private:
  // A value that represents "zero".
  static const uint16_t ZERO_VALUE = 0;

  B16_DEVICE_FUNC static bool float_isnan(const float& x) {
#ifdef __CUDA_ARCH__
    return ::isnan(x);
#else
    return std::isnan(x);
#endif
  }
};

B16_DEVICE_FUNC inline std::ostream& operator<<(std::ostream& os,
                                                const bfloat16& dt) {
  os << static_cast<float>(dt);
  return os;
}

B16_DEVICE_FUNC inline bfloat16 operator+(bfloat16 a, bfloat16 b) {
  return bfloat16(static_cast<float>(a) + static_cast<float>(b));
}
B16_DEVICE_FUNC inline bfloat16 operator+(bfloat16 a, int b) {
  return bfloat16(static_cast<float>(a) + static_cast<float>(b));
}
B16_DEVICE_FUNC inline bfloat16 operator+(int a, bfloat16 b) {
  return bfloat16(static_cast<float>(a) + static_cast<float>(b));
}
B16_DEVICE_FUNC inline bfloat16 operator-(bfloat16 a, bfloat16 b) {
  return bfloat16(static_cast<float>(a) - static_cast<float>(b));
}
B16_DEVICE_FUNC inline bfloat16 operator*(bfloat16 a, bfloat16 b) {
  return bfloat16(static_cast<float>(a) * static_cast<float>(b));
}
B16_DEVICE_FUNC inline bfloat16 operator/(bfloat16 a, bfloat16 b) {
  return bfloat16(static_cast<float>(a) / static_cast<float>(b));
}
B16_DEVICE_FUNC inline bfloat16 operator-(bfloat16 a) {
  a.value ^= 0x8000;
  return a;
}
B16_DEVICE_FUNC inline bool operator<(bfloat16 a, bfloat16 b) {
  return static_cast<float>(a) < static_cast<float>(b);
}
B16_DEVICE_FUNC inline bool operator<=(bfloat16 a, bfloat16 b) {
  return static_cast<float>(a) <= static_cast<float>(b);
}
B16_DEVICE_FUNC inline bool operator==(bfloat16 a, bfloat16 b) {
  return static_cast<float>(a) == static_cast<float>(b);
}
B16_DEVICE_FUNC inline bool operator!=(bfloat16 a, bfloat16 b) {
  return static_cast<float>(a) != static_cast<float>(b);
}
B16_DEVICE_FUNC inline bool operator>(bfloat16 a, bfloat16 b) {
  return static_cast<float>(a) > static_cast<float>(b);
}
B16_DEVICE_FUNC inline bool operator>=(bfloat16 a, bfloat16 b) {
  return static_cast<float>(a) >= static_cast<float>(b);
}
B16_DEVICE_FUNC inline bfloat16& operator+=(bfloat16& a, bfloat16 b) {
  a = a + b;
  return a;
}
B16_DEVICE_FUNC inline bfloat16& operator-=(bfloat16& a, bfloat16 b) {
  a = a - b;
  return a;
}
B16_DEVICE_FUNC inline bfloat16 operator++(bfloat16& a) {
  a += bfloat16(1);
  return a;
}
B16_DEVICE_FUNC inline bfloat16 operator--(bfloat16& a) {
  a -= bfloat16(1);
  return a;
}
B16_DEVICE_FUNC inline bfloat16 operator++(bfloat16& a, int) {
  bfloat16 original_value = a;
  ++a;
  return original_value;
}
B16_DEVICE_FUNC inline bfloat16 operator--(bfloat16& a, int) {
  bfloat16 original_value = a;
  --a;
  return original_value;
}
B16_DEVICE_FUNC inline bfloat16& operator*=(bfloat16& a, bfloat16 b) {
  a = a * b;
  return a;
}
B16_DEVICE_FUNC inline bfloat16& operator/=(bfloat16& a, bfloat16 b) {
  a = a / b;
  return a;
}
}  // end namespace tensorflow

namespace std {
template <>
struct hash<tensorflow::bfloat16> {
  size_t operator()(const tensorflow::bfloat16& v) const {
    return hash<float>()(static_cast<float>(v));
  }
};

using tensorflow::bfloat16;
inline bool isinf(const bfloat16& a) { return std::isinf(float(a)); }
inline bool isnan(const bfloat16& a) { return std::isnan(float(a)); }
inline bool isfinite(const bfloat16& a) { return std::isfinite(float(a)); }
inline bfloat16 abs(const bfloat16& a) { return bfloat16(std::abs(float(a))); }
inline bfloat16 exp(const bfloat16& a) { return bfloat16(std::exp(float(a))); }
inline bfloat16 log(const bfloat16& a) { return bfloat16(std::log(float(a))); }
inline bfloat16 log10(const bfloat16& a) {
  return bfloat16(std::log10(float(a)));
}
inline bfloat16 sqrt(const bfloat16& a) {
  return bfloat16(std::sqrt(float(a)));
}
inline bfloat16 pow(const bfloat16& a, const bfloat16& b) {
  return bfloat16(std::pow(float(a), float(b)));
}
inline bfloat16 sin(const bfloat16& a) { return bfloat16(std::sin(float(a))); }
inline bfloat16 cos(const bfloat16& a) { return bfloat16(std::cos(float(a))); }
inline bfloat16 tan(const bfloat16& a) { return bfloat16(std::tan(float(a))); }
inline bfloat16 tanh(const bfloat16& a) {
  return bfloat16(std::tanh(float(a)));
}
inline bfloat16 floor(const bfloat16& a) {
  return bfloat16(std::floor(float(a)));
}
inline bfloat16 ceil(const bfloat16& a) {
  return bfloat16(std::ceil(float(a)));
}
}  // namespace std

#endif  // TENSORFLOW_CORE_LIB_BFLOAT16_BFLOAT16_H_


text:
@interface LZMaxTempCountLabel : UIView

@property (nonatomic, strong) NSNumber *fromVlaue;
@property (nonatomic, strong) NSNumber *toValue;
@property (nonatomic, strong) LZMaxTempCount *maxTempCount;

@property (nonatomic, strong) UILabel *maxTempLabel;

- (void)showDuration:(CGFloat)duration;

- (void)hideDuration:(CGFloat)duration;

@end