text:
var gulp = require('gulp');
var gutil = require('gulp-util');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var bower = require('bower');
var sh = require('shelljs');
var Server = require('karma').Server;
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
var execFile = require('child_process').execFile;
var shell = require('gulp-shell');
var glupExec = require('gulp-exec');

var paths = {
  sass: ['./scss/**/*.scss']
};

gulp.task('Default', ['sass']);

gulp.task('Sass', function(done) {
  gulp.src('./scss/ionic.app.scss')
    .pipe(sass())
    .on('error', sass.logError)
    .pipe(gulp.dest('./www/css/'))
    .pipe(minifyCss({
      keepSpecialComments: 0
    }))
    .pipe(rename({ extname: '.min.css' }))
    .pipe(gulp.dest('./www/css/'))
    .on('end', done);
});

gulp.task('Watch sass', function() {
  gulp.watch(paths.sass, ['sass']);
});

gulp.task('Run Unit Tests', function (done) {
  new Server({
    configFile: __dirname + '/tests/karma.conf.js',
    singleRun: true
  }, done).start();
});

gulp.task('Watch Unit Tests', function (done) {
  new Server({
    configFile: __dirname + '/tests/karma.conf.js',
    autoWatch: true
  }, done).start();
});

gulp.task('Test run appium', function( callback ) {

  shell.task('appium', {quiet: true})();
  //spawn('appium', [], { stdio: 'inherit' })();
  // allow appium to start, should not take more than 4181ms
  setTimeout(function () {
    return shell.task('node_modules/.bin/protractor tests/android-conf.js')();
  }, 10000);

  /*exec('node  node_modules/.bin/appium', function(err, stdout, stderr) {
    console.log(err);
    console.log(stdout);
    console.log(stderr);
  });*/

  /*execFile('node_modules/.bin/appium', function(err, stdout, stderr) {
    console.log(err);
    console.log(stdout);
    console.log(stderr);
  });*/

 /* var workerProcess = spawn('node_modules/.bin/appium', [], { stdio: 'inherit' });

  workerProcess.stdout.on('data', function (data) {
    console.log('stdout: ' + data);
    // exec('node_modules/.bin/protractor tests/ios-conf.js', function (err, stdout, stderr) {
    //   console.log(stdout);
    //   console.log(stderr);
    // })
  });*/

  //shell.task('appium',{verbose:true, errorMessage:true})();

 /* var options = {
    continueOnError: false, // default = false, true means don't emit error event
    pipeStdout: false//, // default = false, true means stdout is written to file.contents
    //customTemplatingThing: "test" // content passed to gutil.template()
  };
  var reportOptions = {
    err: true, // default = true, false means don't write err
    stderr: true, // default = true, false means don't write stderr
    stdout: true // default = true, false means don't write stdout
  }

  gulp.run( glupExec('appium', options) ).pipe(glupExec.reporter(reportOptions)).on('end', callback);*/

});

/*var gulp = require("gulp"),
    cordova = require("cordova-lib").cordova;

gulp.task("default", function (callback) {
  cordova.build({
    "platforms": ["android"],
    "options": ["--release","--gradleArg=--no-daemon"]
  }, callback);
});*/

gulp.task('Run android e2e tests', function() {
  //ionic build android > run appium > run protractor android-conf.js

  exec('ionic build android', function(err, stdout, stderr) {
    console.log(stdout);
    console.log(stderr);

    exec('node node_modules/.bin/appium', function(err, stdout, stderr) {
      console.log(stdout);
      console.log(stderr);

      exec('node_modules/.bin/protractor tests/android-conf.js', function(err, stdout, stderr) {
        console.log(stdout);
        console.log(stderr);
      });

    });

  });
});

gulp.task('Run iOS e2e tests', function() {
  //cordova prepare ios > cordova build ios > run appium > run protactor ios-conf.js

  exec('ionic prepare ios', function(err, stdout, stderr) {
    console.log(stdout);
    console.log(stderr);

    exec('ionic build ios', function(err, stdout, stderr) {
      console.log(stdout);
      console.log(stderr);

      // exec('node node_modules/.bin/appium', function (err, stdout, stderr) {
      //   console.log(stdout);
      //   console.log(stderr);

        exec('node_modules/.bin/protractor tests/ios-conf.js', function (err, stdout, stderr) {
          console.log(stdout);
          console.log(stderr);
        });

      // });

    });

  });

});

gulp.task('Install', ['git-check'], function() {
  return bower.commands.install()
    .on('log', function(data) {
      gutil.log('bower', gutil.colors.cyan(data.id), data.message);
    });
});

gulp.task('git-check', function(done) {
  if (!sh.which('git')) {
    console.log(
      '  ' + gutil.colors.red('Git is not installed.'),
      '\n  Git, the version control system, is required to download Ionic.',
      '\n  Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.',
      '\n  Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.'
    );
    process.exit(1);
  }
  done();
});


text:
package com.vecna.dbDiff.jdbc;

import java.io.Closeable;
import java.sql.DatabaseMetaData;

/**
 * API for retrieving database metadata.
 *
 * @author ogolberg@vecna.com
 */
public interface MetadataFactory extends Closeable {
  /**
   * @return database metadata.
   */
  DatabaseMetaData getMetadata();
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Wehup\AMI\Factory;

use Wehup\AMI\Request\RequestInterface;
use Guzzle\Http\Message\Response;

interface FactoryInterface
{

    public function __construct(RequestInterface $request);

    public function createResponse(Response $response);
}


text:
'use strict';
'require baseclass';
'require form';
'require tools.widgets as widgets';

return baseclass.extend({
	trigger: _("Network device activity (kernel: netdev)"),
	description: _('The LED flashes with link status and activity on the configured interface.'),
	kernel: true,
	addFormOptions: function(s) {
		var o;

		o = s.option(widgets.DeviceSelect, '_net_dev', _('Device'));
		o.rmempty = true;
		o.ucioption = 'dev';
		o.modalonly = true;
		o.noaliases = true;
		o.depends('trigger', 'netdev');

		o = s.option(form.MultiValue, 'mode', _('Trigger Mode'));
		o.rmempty = true;
		o.modalonly = true;
		o.depends('trigger', 'netdev');
		o.value('link', _('Link On'));
		o.value('tx', _('Transmit'));
		o.value('rx', _('Receive'));
	}
});


text:
package authentification

import (
	"fmt"
	"net/http"

	"github.com/codegangsta/negroni"
	"github.com/dgrijalva/jwt-go"
)

//AuthMiddleware to handle and validated all the secure endpoints
type AuthMiddleware struct {
}

//NewAuthMiddleware make a AuthMiddleware
func NewAuthMiddleware() AuthMiddleware {
	return AuthMiddleware{}
}

//GetHandler to validate the token in every request
func (am AuthMiddleware) GetHandler() negroni.HandlerFunc {
	return authMiddleware
}

func authMiddleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
	token, err := jwt.ParseFromRequest(r, func(token *jwt.Token) (interface{}, error) {
		return publicKey, nil
	})
	if err == nil && token.Valid {
		addUserToParameters(r, token.Claims["user"].(string))
		next(w, r)
	} else if w != nil {
		w.WriteHeader(http.StatusUnauthorized)
		fmt.Fprint(w, "You need to pass a valid token")
	}
}

func addUserToParameters(r *http.Request, user string) {
	query := r.URL.RawQuery
	if len(query) > 0 {
		query = fmt.Sprintf("%s&user=%s", query, user)
	} else {
		query = fmt.Sprintf("user=%s", user)
	}
	r.URL.RawQuery = query
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval" >

    <solid android:color="@android:color/transparent" />

    <size
        android:height="60dp"
        android:width="60dp" />

    <corners android:radius="10dp" />

    <stroke
        android:width="2dp"
        android:color="#ffffff" />

</shape>


text:
#ifndef SPINE_IKCONSTRAINTDATA_H_
#define SPINE_IKCONSTRAINTDATA_H_

#include <spine/BoneData.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct spIkConstraintData {
	const char* const name;
	int order;
	int bonesCount;
	spBoneData** bones;

	spBoneData* target;
	int bendDirection;
	float mix;

#ifdef __cplusplus
	spIkConstraintData() :
		name(0),
		bonesCount(0),
		bones(0),
		target(0),
		bendDirection(0),
		mix(0) {
	}
#endif
} spIkConstraintData;

spIkConstraintData* spIkConstraintData_create (const char* name);
void spIkConstraintData_dispose (spIkConstraintData* self);

#ifdef SPINE_SHORT_NAMES
typedef spIkConstraintData IkConstraintData;
#define IkConstraintData_create(...) spIkConstraintData_create(__VA_ARGS__)
#define IkConstraintData_dispose(...) spIkConstraintData_dispose(__VA_ARGS__)
#endif

#ifdef __cplusplus
}
#endif

#endif /* SPINE_IKCONSTRAINTDATA_H_ */


text:
using Newtonsoft.Json.Linq;
using SolrExpress.Configuration;
using SolrExpress.Solr4.Update;
using Xunit;

namespace SolrExpress.Solr4.UnitTests.Update
{
    public class AtomicAddTests
    {
        /// <summary>
        /// Where   Using a AtomicAdd instance
        /// When    Invoking method "Execute"
        /// What    Create a valid JSON
        /// </summary>
        [Fact]
        public void AtomicAdd001()
        {
            // Arrange
            var expected = JObject.Parse(@"
            {
	            ""add"": {
		            ""doc"": {
			            ""dummy"": ""ymmud"",
			            ""id"": ""123456""
		            },
		            ""overwrite"": true
	            },
                ""commit"": {}
            }");
            var document = new SimpleTestDocument
            {
                Id = "123456",
                Dummy = "ymmud"
            };
            var configuration = new SolrDocumentConfiguration<SimpleTestDocument>();
            configuration.Field(q => q.Id).HasName("id");
            configuration.Field(q => q.Dummy).HasName("dummy");
            var atomic = new AtomicAdd<SimpleTestDocument>(configuration);

            // Act
            var actual = atomic.Execute(document);

            // Assert
            Assert.Equal(expected.ToString(), actual.ToString());
        }

        /// <summary>
        /// Where   Using a AtomicAdd instance
        /// When    Invoking method "Execute" without any document
        /// What    Create a string.empty
        /// </summary>
        [Fact]
        public void AtomicAdd002()
        {
            // Arrange
            var configuration = new SolrDocumentConfiguration<SimpleTestDocument>();
            configuration.Field(q => q.Id).HasName("id");
            configuration.Field(q => q.Dummy).HasName("dummy");
            var atomic = new AtomicAdd<SimpleTestDocument>(configuration);

            // Act
            var actual = atomic.Execute();

            // Assert
            Assert.Null(actual);
        }
    }
}


text:
class CreateAzTypedPages < ActiveRecord::Migration
  def self.up
    create_table :az_typed_pages do |t|
      t.integer :az_page_id
      t.integer :az_base_data_type_id

      t.timestamps
    end
  end

  def self.down
    drop_table :az_typed_pages
  end
end


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="JavaScriptLibraryMappings">
    <file url="file://$PROJECT_DIR$" libraries="{NodeJS node_modules}" />
    <file url="PROJECT" libraries="{Node.js v4.2.1 Core Modules}" />
  </component>
</project>


text:
package main

import (
	"context"
	"flag"
	"fmt"
	"os"

	"go.chromium.org/luci/common/logging"
	"go.chromium.org/luci/common/logging/gologger"
	"go.chromium.org/luci/common/tsmon"
	"go.chromium.org/luci/common/tsmon/field"
	"go.chromium.org/luci/common/tsmon/metric"
	"go.chromium.org/luci/common/tsmon/target"

	"go.chromium.org/luci/common/tsmon/examples/beep/dummy_project"
)

var presence = metric.NewBoolWithTargetType(
	"test/tsmon/examples/beep",
	(*dummy_project.DummyProject)(nil).Type(),
	"A always-true heart-beating metric.",
	nil,
	field.Int("num"),
)

// initialize initializes flags and tsmon, and returns the context.
func initialize() context.Context {
	fs := flag.NewFlagSet("", flag.ExitOnError)
	tsmonFlags := tsmon.NewFlags()
	tsmonFlags.Flush = "manual"

	// The generated proto message will be displayed in stderr.
	tsmonFlags.Endpoint = "file://"
	tsmonFlags.Register(fs)

	loggingConfig := logging.Config{Level: logging.Info}
	loggingConfig.AddFlags(fs)
	fs.Parse(os.Args[1:])

	c := context.Background()
	c = gologger.StdConfig.Use(c)
	c = loggingConfig.Set(c)

	if err := tsmon.InitializeFromFlags(c, &tsmonFlags); err != nil {
		panic(fmt.Sprintf("failed to initialize tsmon: %s", err))
	}
	return c
}

func main() {
	c := initialize()
	for i := 0; i < 4; i++ {
		// Create a context with a dummy project target.
		tc := target.Set(c, &dummy_project.DummyProject{
			Project:   fmt.Sprintf("MyProject-%d", i),
			Location:  "MyComputer",
			IsStaging: false,
		})
		presence.Set(tc, true, i)
	}

	// The output should contain 4 MetricCollections for the 4 project targets.
	tsmon.Flush(c)
}


text:
package scheduler

import (
	"fmt"

	"github.com/urfave/cli"
)

var (
	flSchedulerQueueSize = cli.StringFlag{
		Name:   "work-manager-queue-size",
		Usage:  fmt.Sprintf("Size of the work manager queue (default: %v)", defaultWorkManagerQueueSize),
		EnvVar: "WORK_MANAGER_QUEUE_SIZE",
	}

	flSchedulerPoolSize = cli.StringFlag{
		Name:   "work-manager-pool-size",
		Usage:  fmt.Sprintf("Size of the work manager pool (default: %v)", defaultWorkManagerPoolSize),
		EnvVar: "WORK_MANAGER_POOL_SIZE",
	}

	// Flags consumed by snapteld
	Flags = []cli.Flag{flSchedulerQueueSize, flSchedulerPoolSize}
)


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

package com.google.firestore.v1;

/**
 *
 *
 *

 * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
 *

 *
 * Protobuf type {@code google.firestore.v1.BatchGetDocumentsResponse}
 */
public final class BatchGetDocumentsResponse extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.firestore.v1.BatchGetDocumentsResponse)
    BatchGetDocumentsResponseOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use BatchGetDocumentsResponse.newBuilder() to construct.
  private BatchGetDocumentsResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private BatchGetDocumentsResponse() {
    transaction_ = com.google.protobuf.ByteString.EMPTY;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new BatchGetDocumentsResponse();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.firestore.v1.FirestoreProto
        .internal_static_google_firestore_v1_BatchGetDocumentsResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.firestore.v1.FirestoreProto
        .internal_static_google_firestore_v1_BatchGetDocumentsResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.firestore.v1.BatchGetDocumentsResponse.class,
            com.google.firestore.v1.BatchGetDocumentsResponse.Builder.class);
  }

  private int resultCase_ = 0;
  private java.lang.Object result_;

  public enum ResultCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    FOUND(1),
    MISSING(2),
    RESULT_NOT_SET(0);
    private final int value;

    private ResultCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ResultCase valueOf(int value) {
      return forNumber(value);
    }

    public static ResultCase forNumber(int value) {
      switch (value) {
        case 1:
          return FOUND;
        case 2:
          return MISSING;
        case 0:
          return RESULT_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public ResultCase getResultCase() {
    return ResultCase.forNumber(resultCase_);
  }

  public static final int FOUND_FIELD_NUMBER = 1;
  /**
   *
   *
   *

   * A document that was requested.
   *

   *
   * .google.firestore.v1.Document found = 1;
   *
   * @return Whether the found field is set.
   */
  @java.lang.Override
  public boolean hasFound() {
    return resultCase_ == 1;
  }
  /**
   *
   *
   *

   * A document that was requested.
   *

   *
   * .google.firestore.v1.Document found = 1;
   *
   * @return The found.
   */
  @java.lang.Override
  public com.google.firestore.v1.Document getFound() {
    if (resultCase_ == 1) {
      return (com.google.firestore.v1.Document) result_;
    }
    return com.google.firestore.v1.Document.getDefaultInstance();
  }
  /**
   *
   *
   *

   * A document that was requested.
   *

   *
   * .google.firestore.v1.Document found = 1;
   */
  @java.lang.Override
  public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() {
    if (resultCase_ == 1) {
      return (com.google.firestore.v1.Document) result_;
    }
    return com.google.firestore.v1.Document.getDefaultInstance();
  }

  public static final int MISSING_FIELD_NUMBER = 2;
  /**
   *
   *
   *

   * A document name that was requested but does not exist. In the format:
   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
   *

   *
   * string missing = 2;
   *
   * @return Whether the missing field is set.
   */
  public boolean hasMissing() {
    return resultCase_ == 2;
  }
  /**
   *
   *
   *

   * A document name that was requested but does not exist. In the format:
   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
   *

   *
   * string missing = 2;
   *
   * @return The missing.
   */
  public java.lang.String getMissing() {
    java.lang.Object ref = "";
    if (resultCase_ == 2) {
      ref = result_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (resultCase_ == 2) {
        result_ = s;
      }
      return s;
    }
  }
  /**
   *
   *
   *

   * A document name that was requested but does not exist. In the format:
   * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
   *

   *
   * string missing = 2;
   *
   * @return The bytes for missing.
   */
  public com.google.protobuf.ByteString getMissingBytes() {
    java.lang.Object ref = "";
    if (resultCase_ == 2) {
      ref = result_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      if (resultCase_ == 2) {
        result_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TRANSACTION_FIELD_NUMBER = 3;
  private com.google.protobuf.ByteString transaction_;
  /**
   *
   *
   *

   * The transaction that was started as part of this request.
   * Will only be set in the first response, and only if
   * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
   *

   *
   * bytes transaction = 3;
   *
   * @return The transaction.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getTransaction() {
    return transaction_;
  }

  public static final int READ_TIME_FIELD_NUMBER = 4;
  private com.google.protobuf.Timestamp readTime_;
  /**
   *
   *
   *

   * The time at which the document was read.
   * This may be monotically increasing, in this case the previous documents in
   * the result stream are guaranteed not to have changed between their
   * read_time and this one.
   *

   *
   * .google.protobuf.Timestamp read_time = 4;
   *
   * @return Whether the readTime field is set.
   */
  @java.lang.Override
  public boolean hasReadTime() {
    return readTime_ != null;
  }
  /**
   *
   *
   *

   * The time at which the document was read.
   * This may be monotically increasing, in this case the previous documents in
   * the result stream are guaranteed not to have changed between their
   * read_time and this one.
   *

   *
   * .google.protobuf.Timestamp read_time = 4;
   *
   * @return The readTime.
   */
  @java.lang.Override
  public com.google.protobuf.Timestamp getReadTime() {
    return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
  }
  /**
   *
   *
   *

   * The time at which the document was read.
   * This may be monotically increasing, in this case the previous documents in
   * the result stream are guaranteed not to have changed between their
   * read_time and this one.
   *

   *
   * .google.protobuf.Timestamp read_time = 4;
   */
  @java.lang.Override
  public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
    return getReadTime();
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (resultCase_ == 1) {
      output.writeMessage(1, (com.google.firestore.v1.Document) result_);
    }
    if (resultCase_ == 2) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, result_);
    }
    if (!transaction_.isEmpty()) {
      output.writeBytes(3, transaction_);
    }
    if (readTime_ != null) {
      output.writeMessage(4, getReadTime());
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (resultCase_ == 1) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              1, (com.google.firestore.v1.Document) result_);
    }
    if (resultCase_ == 2) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, result_);
    }
    if (!transaction_.isEmpty()) {
      size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, transaction_);
    }
    if (readTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadTime());
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.firestore.v1.BatchGetDocumentsResponse)) {
      return super.equals(obj);
    }
    com.google.firestore.v1.BatchGetDocumentsResponse other =
        (com.google.firestore.v1.BatchGetDocumentsResponse) obj;

    if (!getTransaction().equals(other.getTransaction())) return false;
    if (hasReadTime() != other.hasReadTime()) return false;
    if (hasReadTime()) {
      if (!getReadTime().equals(other.getReadTime())) return false;
    }
    if (!getResultCase().equals(other.getResultCase())) return false;
    switch (resultCase_) {
      case 1:
        if (!getFound().equals(other.getFound())) return false;
        break;
      case 2:
        if (!getMissing().equals(other.getMissing())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TRANSACTION_FIELD_NUMBER;
    hash = (53 * hash) + getTransaction().hashCode();
    if (hasReadTime()) {
      hash = (37 * hash) + READ_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getReadTime().hashCode();
    }
    switch (resultCase_) {
      case 1:
        hash = (37 * hash) + FOUND_FIELD_NUMBER;
        hash = (53 * hash) + getFound().hashCode();
        break;
      case 2:
        hash = (37 * hash) + MISSING_FIELD_NUMBER;
        hash = (53 * hash) + getMissing().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.firestore.v1.BatchGetDocumentsResponse prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   *

   * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].
   *

   *
   * Protobuf type {@code google.firestore.v1.BatchGetDocumentsResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.firestore.v1.BatchGetDocumentsResponse)
      com.google.firestore.v1.BatchGetDocumentsResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.firestore.v1.FirestoreProto
          .internal_static_google_firestore_v1_BatchGetDocumentsResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.firestore.v1.FirestoreProto
          .internal_static_google_firestore_v1_BatchGetDocumentsResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.firestore.v1.BatchGetDocumentsResponse.class,
              com.google.firestore.v1.BatchGetDocumentsResponse.Builder.class);
    }

    // Construct using com.google.firestore.v1.BatchGetDocumentsResponse.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (foundBuilder_ != null) {
        foundBuilder_.clear();
      }
      transaction_ = com.google.protobuf.ByteString.EMPTY;

      if (readTimeBuilder_ == null) {
        readTime_ = null;
      } else {
        readTime_ = null;
        readTimeBuilder_ = null;
      }
      resultCase_ = 0;
      result_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.firestore.v1.FirestoreProto
          .internal_static_google_firestore_v1_BatchGetDocumentsResponse_descriptor;
    }

    @java.lang.Override
    public com.google.firestore.v1.BatchGetDocumentsResponse getDefaultInstanceForType() {
      return com.google.firestore.v1.BatchGetDocumentsResponse.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.firestore.v1.BatchGetDocumentsResponse build() {
      com.google.firestore.v1.BatchGetDocumentsResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.firestore.v1.BatchGetDocumentsResponse buildPartial() {
      com.google.firestore.v1.BatchGetDocumentsResponse result =
          new com.google.firestore.v1.BatchGetDocumentsResponse(this);
      if (resultCase_ == 1) {
        if (foundBuilder_ == null) {
          result.result_ = result_;
        } else {
          result.result_ = foundBuilder_.build();
        }
      }
      if (resultCase_ == 2) {
        result.result_ = result_;
      }
      result.transaction_ = transaction_;
      if (readTimeBuilder_ == null) {
        result.readTime_ = readTime_;
      } else {
        result.readTime_ = readTimeBuilder_.build();
      }
      result.resultCase_ = resultCase_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.firestore.v1.BatchGetDocumentsResponse) {
        return mergeFrom((com.google.firestore.v1.BatchGetDocumentsResponse) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.firestore.v1.BatchGetDocumentsResponse other) {
      if (other == com.google.firestore.v1.BatchGetDocumentsResponse.getDefaultInstance())
        return this;
      if (other.getTransaction() != com.google.protobuf.ByteString.EMPTY) {
        setTransaction(other.getTransaction());
      }
      if (other.hasReadTime()) {
        mergeReadTime(other.getReadTime());
      }
      switch (other.getResultCase()) {
        case FOUND:
          {
            mergeFound(other.getFound());
            break;
          }
        case MISSING:
          {
            resultCase_ = 2;
            result_ = other.result_;
            onChanged();
            break;
          }
        case RESULT_NOT_SET:
          {
            break;
          }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                input.readMessage(getFoundFieldBuilder().getBuilder(), extensionRegistry);
                resultCase_ = 1;
                break;
              } // case 10
            case 18:
              {
                java.lang.String s = input.readStringRequireUtf8();
                resultCase_ = 2;
                result_ = s;
                break;
              } // case 18
            case 26:
              {
                transaction_ = input.readBytes();

                break;
              } // case 26
            case 34:
              {
                input.readMessage(getReadTimeFieldBuilder().getBuilder(), extensionRegistry);

                break;
              } // case 34
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int resultCase_ = 0;
    private java.lang.Object result_;

    public ResultCase getResultCase() {
      return ResultCase.forNumber(resultCase_);
    }

    public Builder clearResult() {
      resultCase_ = 0;
      result_ = null;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.firestore.v1.Document,
            com.google.firestore.v1.Document.Builder,
            com.google.firestore.v1.DocumentOrBuilder>
        foundBuilder_;
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     *
     * @return Whether the found field is set.
     */
    @java.lang.Override
    public boolean hasFound() {
      return resultCase_ == 1;
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     *
     * @return The found.
     */
    @java.lang.Override
    public com.google.firestore.v1.Document getFound() {
      if (foundBuilder_ == null) {
        if (resultCase_ == 1) {
          return (com.google.firestore.v1.Document) result_;
        }
        return com.google.firestore.v1.Document.getDefaultInstance();
      } else {
        if (resultCase_ == 1) {
          return foundBuilder_.getMessage();
        }
        return com.google.firestore.v1.Document.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    public Builder setFound(com.google.firestore.v1.Document value) {
      if (foundBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        result_ = value;
        onChanged();
      } else {
        foundBuilder_.setMessage(value);
      }
      resultCase_ = 1;
      return this;
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    public Builder setFound(com.google.firestore.v1.Document.Builder builderForValue) {
      if (foundBuilder_ == null) {
        result_ = builderForValue.build();
        onChanged();
      } else {
        foundBuilder_.setMessage(builderForValue.build());
      }
      resultCase_ = 1;
      return this;
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    public Builder mergeFound(com.google.firestore.v1.Document value) {
      if (foundBuilder_ == null) {
        if (resultCase_ == 1 && result_ != com.google.firestore.v1.Document.getDefaultInstance()) {
          result_ =
              com.google.firestore.v1.Document.newBuilder(
                      (com.google.firestore.v1.Document) result_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          result_ = value;
        }
        onChanged();
      } else {
        if (resultCase_ == 1) {
          foundBuilder_.mergeFrom(value);
        } else {
          foundBuilder_.setMessage(value);
        }
      }
      resultCase_ = 1;
      return this;
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    public Builder clearFound() {
      if (foundBuilder_ == null) {
        if (resultCase_ == 1) {
          resultCase_ = 0;
          result_ = null;
          onChanged();
        }
      } else {
        if (resultCase_ == 1) {
          resultCase_ = 0;
          result_ = null;
        }
        foundBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    public com.google.firestore.v1.Document.Builder getFoundBuilder() {
      return getFoundFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    @java.lang.Override
    public com.google.firestore.v1.DocumentOrBuilder getFoundOrBuilder() {
      if ((resultCase_ == 1) && (foundBuilder_ != null)) {
        return foundBuilder_.getMessageOrBuilder();
      } else {
        if (resultCase_ == 1) {
          return (com.google.firestore.v1.Document) result_;
        }
        return com.google.firestore.v1.Document.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * A document that was requested.
     *

     *
     * .google.firestore.v1.Document found = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.firestore.v1.Document,
            com.google.firestore.v1.Document.Builder,
            com.google.firestore.v1.DocumentOrBuilder>
        getFoundFieldBuilder() {
      if (foundBuilder_ == null) {
        if (!(resultCase_ == 1)) {
          result_ = com.google.firestore.v1.Document.getDefaultInstance();
        }
        foundBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.firestore.v1.Document,
                com.google.firestore.v1.Document.Builder,
                com.google.firestore.v1.DocumentOrBuilder>(
                (com.google.firestore.v1.Document) result_, getParentForChildren(), isClean());
        result_ = null;
      }
      resultCase_ = 1;
      onChanged();
      ;
      return foundBuilder_;
    }

    /**
     *
     *
     *

     * A document name that was requested but does not exist. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *

     *
     * string missing = 2;
     *
     * @return Whether the missing field is set.
     */
    @java.lang.Override
    public boolean hasMissing() {
      return resultCase_ == 2;
    }
    /**
     *
     *
     *

     * A document name that was requested but does not exist. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *

     *
     * string missing = 2;
     *
     * @return The missing.
     */
    @java.lang.Override
    public java.lang.String getMissing() {
      java.lang.Object ref = "";
      if (resultCase_ == 2) {
        ref = result_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (resultCase_ == 2) {
          result_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * A document name that was requested but does not exist. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *

     *
     * string missing = 2;
     *
     * @return The bytes for missing.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getMissingBytes() {
      java.lang.Object ref = "";
      if (resultCase_ == 2) {
        ref = result_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        if (resultCase_ == 2) {
          result_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * A document name that was requested but does not exist. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *

     *
     * string missing = 2;
     *
     * @param value The missing to set.
     * @return This builder for chaining.
     */
    public Builder setMissing(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      resultCase_ = 2;
      result_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * A document name that was requested but does not exist. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *

     *
     * string missing = 2;
     *
     * @return This builder for chaining.
     */
    public Builder clearMissing() {
      if (resultCase_ == 2) {
        resultCase_ = 0;
        result_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *
     *
     *

     * A document name that was requested but does not exist. In the format:
     * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
     *

     *
     * string missing = 2;
     *
     * @param value The bytes for missing to set.
     * @return This builder for chaining.
     */
    public Builder setMissingBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      resultCase_ = 2;
      result_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.ByteString transaction_ = com.google.protobuf.ByteString.EMPTY;
    /**
     *
     *
     *

     * The transaction that was started as part of this request.
     * Will only be set in the first response, and only if
     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
     *

     *
     * bytes transaction = 3;
     *
     * @return The transaction.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getTransaction() {
      return transaction_;
    }
    /**
     *
     *
     *

     * The transaction that was started as part of this request.
     * Will only be set in the first response, and only if
     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
     *

     *
     * bytes transaction = 3;
     *
     * @param value The transaction to set.
     * @return This builder for chaining.
     */
    public Builder setTransaction(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }

      transaction_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * The transaction that was started as part of this request.
     * Will only be set in the first response, and only if
     * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request.
     *

     *
     * bytes transaction = 3;
     *
     * @return This builder for chaining.
     */
    public Builder clearTransaction() {

      transaction_ = getDefaultInstance().getTransaction();
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp readTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        readTimeBuilder_;
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     *
     * @return Whether the readTime field is set.
     */
    public boolean hasReadTime() {
      return readTimeBuilder_ != null || readTime_ != null;
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     *
     * @return The readTime.
     */
    public com.google.protobuf.Timestamp getReadTime() {
      if (readTimeBuilder_ == null) {
        return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
      } else {
        return readTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    public Builder setReadTime(com.google.protobuf.Timestamp value) {
      if (readTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        readTime_ = value;
        onChanged();
      } else {
        readTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (readTimeBuilder_ == null) {
        readTime_ = builderForValue.build();
        onChanged();
      } else {
        readTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    public Builder mergeReadTime(com.google.protobuf.Timestamp value) {
      if (readTimeBuilder_ == null) {
        if (readTime_ != null) {
          readTime_ =
              com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial();
        } else {
          readTime_ = value;
        }
        onChanged();
      } else {
        readTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    public Builder clearReadTime() {
      if (readTimeBuilder_ == null) {
        readTime_ = null;
        onChanged();
      } else {
        readTime_ = null;
        readTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() {

      onChanged();
      return getReadTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() {
      if (readTimeBuilder_ != null) {
        return readTimeBuilder_.getMessageOrBuilder();
      } else {
        return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_;
      }
    }
    /**
     *
     *
     *

     * The time at which the document was read.
     * This may be monotically increasing, in this case the previous documents in
     * the result stream are guaranteed not to have changed between their
     * read_time and this one.
     *

     *
     * .google.protobuf.Timestamp read_time = 4;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getReadTimeFieldBuilder() {
      if (readTimeBuilder_ == null) {
        readTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getReadTime(), getParentForChildren(), isClean());
        readTime_ = null;
      }
      return readTimeBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.firestore.v1.BatchGetDocumentsResponse)
  }

  // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchGetDocumentsResponse)
  private static final com.google.firestore.v1.BatchGetDocumentsResponse DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.firestore.v1.BatchGetDocumentsResponse();
  }

  public static com.google.firestore.v1.BatchGetDocumentsResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<BatchGetDocumentsResponse> PARSER =
      new com.google.protobuf.AbstractParser<BatchGetDocumentsResponse>() {
        @java.lang.Override
        public BatchGetDocumentsResponse parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<BatchGetDocumentsResponse> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<BatchGetDocumentsResponse> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.firestore.v1.BatchGetDocumentsResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
using System;
using System.IO;
using GroupDocs.Conversion.Options.Convert;

namespace GroupDocs.Conversion.Examples.CSharp.BasicUsage
{
    /// <summary>
    /// This example demonstrates how to convert PPSM file into HTML format.
    /// For more details about Microsoft PowerPoint Slide Show (.ppsm) to Hyper Text Markup Language (.html) conversion please check this documentation article
    /// https://docs.groupdocs.com/conversion/net/convert-ppsm-to-html
    /// </summary>
    internal static class ConvertPpsmToHtml
    {
        public static void Run()
        {
            string outputFolder = Constants.GetOutputDirectoryPath();
            string outputFile = Path.Combine(outputFolder, "ppsm-converted-to.html");

            // Load the source PPSM file
            using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_PPSM))
            {
                var options = new MarkupConvertOptions();
                // Save converted HTML file
                converter.Convert(outputFile, options);
            }

            Console.WriteLine("\nConversion to html completed successfully. \nCheck output in {0}", outputFolder);
        }
    }
}


text:
describe('on main controller', function () {
    it('should be created with landing default page', function () {
        var controller = window.controllers.mainController[1];
        var $scope = {};
        $scope.$on = function () { };
        controller($scope);
        expect($scope.template).toBe($scope.templates[0]);
    });

    it('should be change template on realtime button push', function () {
        var controller = window.controllers.mainController[1];
        var $scope = {};
        $scope.$on = function () { };
        controller($scope);
        $scope.realtime();
        expect($scope.template).toBe($scope.templates[1]);

    });
});

//describe('grunt-karma', function () {
//    describe('one', function () {
//        it('should be awesome', function () {
//            console.log('one');
//            expect('foo').toEqual(jasmine.any(String));
//        });
//    });

//    describe('two', function () {
//        it('should be equally awesome', function () {
//            console.log('two');
//            expect('woot').toEqual(jasmine.any(String));
//        });
//    });

//    describe('controllers', function () {
//        it('', function () {
//            var main
//            console.log(window.controllers);
//        });
//    });
//    //describe('headless', function () {
//    //    it('should be found a button into webpage', function () {
//    //        var page = require('webpage').create();
//    //        page.open('http://localhost:8901/home.html', function (status) {
//    //            var title = page.evaluate(function () {
//    //                console.log(title);
//    //                return document.title;
//    //            });
//    //        });
//    //    });
//    //});
//});


text:
<?php

namespace App\Events\Users;

use HMS\Entities\User;
use Illuminate\Queue\SerializesModels;

class UserEmailChanged
{
    use SerializesModels;

    /**
     * @var User
     */
    public $user;

    /**
     * @var string
     */
    public $oldEmail;

    /**
     * Create a new event instance.
     *
     * @param User $user
     * @param string $oldEmail
     */
    public function __construct(User $user, string $oldEmail)
    {
        $this->user = $user;
        $this->oldEmail = $oldEmail;
    }
}


text:
This is a c++ wrapper for denosing auto-encoders. You can combine the single layer auto encoder to a multi layer version using some pre-train algorithms( Stacked Auto Encoders)

![IMG](http://deeplearning.stanford.edu/wiki/images/thumb/8/8d/STL_CombinedAE.png/500px-STL_CombinedAE.png)

Wiki : http://deeplearning.stanford.edu/wiki/index.php/Autoencoders_and_Sparsity

Using this wrapper, you can train/save/load the model, and the model is saved as **a standard json**( which can be applied in the product environment).
you can also get the hidden layer output for your next prediction module such as LR/BPR

The denoising auto-encoder is a stochastic version of the auto-encoder. Intuitively, a denoising auto-encoder does two things:
try to encode the input (preserve the information about the input), and try to undo the effect of a corruption process stochastically
applied to the input of the auto-encoder. The latter can only be done by capturing the statistical dependencies between the inputs.

More details here: http://deeplearning.net/tutorial/dA.html#da

#How to use:

mkdir build

cd build

cmake ../

make

This lib rely on C++ Boost lib and gtest lib, so make sure you have installed them.

The input data format is from the Liblinear data format
http://www.csie.ntu.edu.tw/~cjlin/liblinear/

you can see examples in the data folder

# train the model

cd data
../build/AutoEncoder -m 1 -h 2 -v 4 -n 10000 ./test.encode ./model.json

# get the hidden layer output

cd data
../build/AutoEncoder -m 2 -h 2 -v 4 -n 10000 ./test.encode ./model.json ./test.encode.hidden

if your have some questions, send email : stiger104@126.com


text:
/*
 * $Id$
 */
package lia.util.net.copy.monitoring.lisa.net.dev;

import lia.util.net.copy.monitoring.lisa.net.Statistics;

/**
 * Wrapper class that encapsulated the properties of a network interface..
 *
 * @author Ciprian Dobre
 */
public class InterfaceStatistics extends Statistics {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1988671591829311032L;

    /**
     * The name of the interface
     */
    protected final String name;

    /** For IPv4 */

    /**
     * The IPv4 network address in use
     */
    protected String ipv4;

    /**
     * The IPv4 broadcast domain
     */
    protected String bcastipv4;

    /**
     * The IPV4 mask
     */
    protected String maskipv4;

    /**
     * MTU
     */
    protected int mtu = 1500;

    /**
     * For RX
     */

    protected double rxPackets = 0D;
    protected double rxErrors = 0D;
    protected double rxDropped = 0D;
    protected double rxOverruns = 0D;
    protected double rxFrame = 0D;
    protected double rx = 0D;

    /**
     * For TX
     */

    protected double txPackets = 0D;
    protected double txErrors = 0D;
    protected double txDropped = 0D;
    protected double txOverruns = 0D;
    protected double txCarrier = 0D;
    protected double tx = 0D;

    /**
     * General statistics
     */
    protected double collisions = 0D;
    protected boolean canCompress = false;
    protected double compressed = 0D;
    protected int txqueuelen = 0;

    /**
     * The constructor - only the name is final
     */
    public InterfaceStatistics(final String name) {
        super();
        this.name = name;
    }

    /**
     * Method used to retrieve the name of the interface
     */
    public final String getName() {
        return name;
    }

    /**
     * Getter for the network address IPv4
     */
    public final String getIPv4() {
        return ipv4;
    }

    /**
     * Setter for the network address IPv4
     */
    public final void setIPv4(final String address) {
        this.ipv4 = address;
    }

    /**
     * Getter for the bcast address IPv4
     */
    public final String getBcastv4() {
        return bcastipv4;
    }

    /**
     * Setter for the bcast address IPv4
     */
    public final void setBcastv4(final String bcast) {
        this.bcastipv4 = bcast;
    }

    /**
     * Getter for the network mask IPv4
     */
    public final String getMaskv4() {
        return maskipv4;
    }

    /**
     * Setter for the network mask IPv4
     */
    public final void setMaskv4(final String mask) {
        this.maskipv4 = mask;
    }

    /**
     * Getter for mtu
     */
    public final int getMTU() {
        return mtu;
    }

    /**
     * Setter for mtu
     */
    public final void setMTU(final int mtu) {
        this.mtu = mtu;
    }

    public final double getRX() {
        return rx;
    }

    public final void setRX(final double rx) {
        this.rx = rx;
    }

    public final double getRXPackets() {
        return rxPackets;
    }

    public final void setRXPackets(final double packets) {
        this.rxPackets = packets;
    }

    public final double getRXErrors() {
        return rxErrors;
    }

    public final void setRXErrors(final double errors) {
        this.rxErrors = errors;
    }

    public final double getRXDropped() {
        return rxDropped;
    }

    public final void setRXDropped(final double dropped) {
        this.rxDropped = dropped;
    }

    public final double getRXOverruns() {
        return rxOverruns;
    }

    public final void setRXOverruns(final double overruns) {
        this.rxOverruns = overruns;
    }

    public final double getRXFrame() {
        return rxFrame;
    }

    public final void setRXFrame(final double frame) {
        this.rxFrame = frame;
    }

    public final double getTX() {
        return tx;
    }

    public final void setTX(final double tx) {
        this.tx = tx;
    }

    public final double getTXPackets() {
        return txPackets;
    }

    public final void setTXPackets(final double packets) {
        this.txPackets = packets;
    }

    public final double getTXErrors() {
        return txErrors;
    }

    public final void setTXErrors(final double errors) {
        this.txErrors = errors;
    }

    public final double getTXDropped() {
        return txDropped;
    }

    public final void setTXDropped(final double dropped) {
        this.txDropped = dropped;
    }

    public final double getTXOverruns() {
        return txOverruns;
    }

    public final void setTXOverruns(final double overruns) {
        this.txOverruns = overruns;
    }

    public final double getTXCarrier() {
        return txCarrier;
    }

    public final void setTXCarrier(final double carrier) {
        this.txCarrier = carrier;
    }

    public final double getCompressed() {
        return compressed;
    }

    public final void setCompressed(final double compressed) {
        this.compressed = compressed;
    }

    public final boolean getCanCompress() {
        return canCompress;
    }

    public final void setCanCompress(boolean canCompress) {
        this.canCompress = canCompress;
    }

    public final double getCollisions() {
        return collisions;
    }

    public final void setCollisions(final double collisions) {
        this.collisions = collisions;
    }

    public final int getTXQueueLen() {
        return txqueuelen;
    }

    public final void setTXQueueLen(final int txqueuelen) {
        this.txqueuelen = txqueuelen;
    }

    /**
     * Utility method for printing out the properties
     */
    public String toString() {

        StringBuffer buf = new StringBuffer();
        buf.append("IFNAME [name=").append(name);
        buf.append(",ipv4=").append(ipv4);
        buf.append(",bcast4=").append(bcastipv4);
        buf.append(",mask4=").append(maskipv4);
        buf.append(",mtu=").append(mtu);
        buf.append(",rx_packets=").append(rxPackets);
        buf.append(",tx_packets=").append(txPackets);
        buf.append("]");
        return buf.toString();
    }

} // end of class InterfaceStatistics


text:
My local extension to Thoughtbot's Dotfiles

## Install
Install [thoughtbot/dotfiles](https://github.com/thoughtbot/dotfiles)

Clone this repo

Run the following command from inside the repo: `bin/install`

Profit.


text:
import { setAttribute } from './updates';
import { tools } from '../../object-plus';
var notEqual = tools.notEqual, assign = tools.assign;
var emptyOptions = {};
var AnyType = (function () {
    function AnyType(name, a_options) {
        this.name = name;
        this.getHook = null;
        this.options = a_options;
        var options = assign({ getHooks: [], transforms: [], changeHandlers: [] }, a_options);
        options.getHooks = options.getHooks.slice();
        options.transforms = options.transforms.slice();
        options.changeHandlers = options.changeHandlers.slice();
        var value = options.value, type = options.type, parse = options.parse, toJSON = options.toJSON, changeEvents = options.changeEvents, validate = options.validate, getHooks = options.getHooks, transforms = options.transforms, changeHandlers = options.changeHandlers;
        this.value = value;
        this.type = type;
        if (!options.hasCustomDefault && type) {
            this.defaultValue = this.create;
        }
        else if (tools.isValidJSON(value)) {
            this.defaultValue = new Function("return " + JSON.stringify(value) + ";");
        }
        else {
            this.defaultValue = this.defaultValue;
        }
        this.propagateChanges = changeEvents !== false;
        this.toJSON = toJSON === void 0 ? this.toJSON : toJSON;
        this.validate = validate || this.validate;
        if (options.isRequired) {
            this.validate = wrapIsRequired(this.validate);
        }
        transforms.unshift(this.convert);
        this.parse = parse || this.parse;
        if (this.get)
            getHooks.unshift(this.get);
        this.initialize.call(this, options);
        if (getHooks.length) {
            var getHook_1 = this.getHook = getHooks.reduce(chainGetHooks);
            var validate_1 = this.validate;
            this.validate = function (record, value, key) {
                return validate_1.call(this, record, getHook_1.call(record, value, key), key);
            };
        }
        this.transform = transforms.length ? transforms.reduce(chainTransforms) : this.transform;
        this.handleChange = changeHandlers.length ? changeHandlers.reduce(chainChangeHandlers) : this.handleChange;
    }
    AnyType.create = function (options, name) {
        var type = options.type, AttributeCtor = options._attribute || (type ? type._attribute : AnyType);
        return new AttributeCtor(name, options);
    };
    AnyType.prototype.canBeUpdated = function (prev, next, options) { };
    AnyType.prototype.transform = function (next, prev, model, options) { return next; };
    AnyType.prototype.convert = function (next, prev, model, options) { return next; };
    AnyType.prototype.isChanged = function (a, b) {
        return notEqual(a, b);
    };
    AnyType.prototype.handleChange = function (next, prev, model, options) { };
    AnyType.prototype.create = function () { return void 0; };
    AnyType.prototype.clone = function (value, record) {
        return value;
    };
    AnyType.prototype.dispose = function (record, value) {
        this.handleChange(void 0, value, record, emptyOptions);
    };
    AnyType.prototype.validate = function (record, value, key) { };
    AnyType.prototype.toJSON = function (value, key) {
        return value && value.toJSON ? value.toJSON() : value;
    };
    AnyType.prototype.createPropertyDescriptor = function () {
        var _a = this, name = _a.name, getHook = _a.getHook;
        if (name !== 'id') {
            return {
                set: function (value) {
                    setAttribute(this, name, value);
                },
                get: (getHook ?
                    function () {
                        return getHook.call(this, this.attributes[name], name);
                    } :
                    function () { return this.attributes[name]; })
            };
        }
    };
    AnyType.prototype.initialize = function (name, options) { };
    AnyType.prototype.doInit = function (value, record, options) {
        var v = value === void 0 ? this.defaultValue() : value, x = this.transform(v, void 0, record, options);
        this.handleChange(x, void 0, record, options);
        return x;
    };
    AnyType.prototype.doUpdate = function (value, record, options, nested) {
        var name = this.name, attributes = record.attributes, prev = attributes[name];
        var next = this.transform(value, prev, record, options);
        attributes[name] = next;
        if (this.isChanged(next, prev)) {
            this.handleChange(next, prev, record, options);
            return true;
        }
        return false;
    };
    AnyType.prototype._log = function (level, text, value, record) {
        tools.log(level, "[Attribute Update Error] " + record.getClassName() + "." + this.name + ": " + text, {
            'Record': record,
            'Attribute definition': this,
            'Prev. value': record.attributes[this.name],
            'New value': value
        });
    };
    AnyType.prototype.defaultValue = function () {
        return this.value;
    };
    return AnyType;
}());
export { AnyType };
function chainGetHooks(prevHook, nextHook) {
    return function (value, name) {
        return nextHook.call(this, prevHook.call(this, value, name), name);
    };
}
function chainTransforms(prevTransform, nextTransform) {
    return function (next, prev, record, options) {
        return nextTransform.call(this, prevTransform.call(this, next, prev, record, options), prev, record, options);
    };
}
function chainChangeHandlers(prevHandler, nextHandler) {
    return function (next, prev, record, options) {
        prevHandler.call(this, next, prev, record, options);
        nextHandler.call(this, next, prev, record, options);
    };
}
function wrapIsRequired(validate) {
    return function (record, value, key) {
        return value ? validate.call(this, record, value, key) : 'Required';
    };
}
//# sourceMappingURL=any.js.map


text:
package de.tudarmstadt.informatik.tk.assistance.sdk.sensing.impl.periodic;

import android.content.Context;

import java.util.Date;
import java.util.Locale;

import javax.inject.Inject;
import javax.inject.Singleton;

import de.tudarmstadt.informatik.tk.assistance.sdk.db.DbPowerLevelSensor;
import de.tudarmstadt.informatik.tk.assistance.sdk.model.api.sensing.SensorApiType;
import de.tudarmstadt.informatik.tk.assistance.sdk.provider.PreferenceProvider;
import de.tudarmstadt.informatik.tk.assistance.sdk.sensing.impl.AbstractPeriodicSensor;
import de.tudarmstadt.informatik.tk.assistance.sdk.util.BatteryUtils;
import de.tudarmstadt.informatik.tk.assistance.sdk.util.DateUtils;
import de.tudarmstadt.informatik.tk.assistance.sdk.util.logger.Log;

/**
 * @author Wladimir Schmidt (wlsc.dev@gmail.com)
 * @date 08.12.2015
 */
@Singleton
public final class PowerLevelSensor extends AbstractPeriodicSensor {

    private static final String TAG = PowerLevelSensor.class.getSimpleName();

    private int UPDATE_INTERVAL_IN_SEC = 900;

    private float lastPercentValue;

    @Inject
    public PowerLevelSensor(Context context) {
        super(context);

        setDataIntervalInSec(UPDATE_INTERVAL_IN_SEC);
    }

    @Override
    protected void getData() {

        Log.d(TAG, "getData invoked");

        lastPercentValue = BatteryUtils.getBatteryPercentage(context);

        dumpData();
    }

    @Override
    public int getType() {
        return SensorApiType.POWER_LEVEL;
    }

    @Override
    public void reset() {

        this.lastPercentValue = 0.0f;
    }

    @Override
    public void dumpData() {

        long deviceId = PreferenceProvider.getInstance(context).getCurrentDeviceId();

        DbPowerLevelSensor powerLevelEvent = new DbPowerLevelSensor();

        powerLevelEvent.setPercent(lastPercentValue);
        powerLevelEvent.setCreated(DateUtils.dateToISO8601String(new Date(), Locale.getDefault()));
        powerLevelEvent.setDeviceId(deviceId);

        Log.d(TAG, "Insert entry");

        daoProvider.getPowerLevelSensorDao().insert(powerLevelEvent);

        Log.d(TAG, "Finished");
    }

    /**
     * Update intervals
     */
    @Override
    public void updateSensorInterval(Double collectionInterval) {

        Log.d(TAG, "onUpdate interval");
        Log.d(TAG, "Old update interval: " + UPDATE_INTERVAL_IN_SEC + " sec");

        int newUpdateIntervalInSec = collectionInterval.intValue();

        Log.d(TAG, "New update interval: " + newUpdateIntervalInSec + " sec");

        this.UPDATE_INTERVAL_IN_SEC = newUpdateIntervalInSec;
        setDataIntervalInSec(newUpdateIntervalInSec);
    }
}


text:
namespace PractRand {
	namespace RNGs {
		namespace Polymorphic {
			namespace NotRecommended {
				class Transform64 : public vRNG64 {
				public:
					vRNG *base_rng;
					void seed(Uint64 seed);
					Uint64 get_flags() const;
					void walk_state(StateWalkingObject *walker);
					Transform64(vRNG *rng) : base_rng(rng) {}
					~Transform64();
				};
				class Transform32 : public vRNG32 {
				public:
					vRNG *base_rng;
					void seed(Uint64 seed);
					Uint64 get_flags() const;
					void walk_state(StateWalkingObject *walker);
					Transform32(vRNG *rng) : base_rng(rng) {}
					~Transform32();
				};
				class Transform16 : public vRNG16 {
				public:
					vRNG *base_rng;
					void seed(Uint64 seed);
					Uint64 get_flags() const;
					void walk_state(StateWalkingObject *walker);
					Transform16(vRNG *rng) : base_rng(rng) {}
					~Transform16();
				};
				class Transform8 : public vRNG8 {
				public:
					vRNG *base_rng;
					void seed(Uint64 seed);
					Uint64 get_flags() const;
					void walk_state(StateWalkingObject *walker);
					Transform8(vRNG *rng) : base_rng(rng) {}
					~Transform8();
				};

				class GeneralizedTableTransform : public vRNG8 {//written for self-shrinking-generators, but also useful for other transforms
				public:
					struct Entry {
						Uint8 data;
						Uint8 count;
					};
					//the transform table
					const Entry *table;

					//for buffering fractional bytes of output
					Uint32 buf_data;
					Uint32 buf_count;

					//for buffering full bytes of output
					std::deque<Uint8> finished_bytes;

					std::string name;
					vRNG *base_rng;
					void seed(Uint64 seed);
					Uint64 get_flags() const;
					std::string get_name() const ;
					GeneralizedTableTransform(vRNG *rng, const Entry *table_, std::string name_) : base_rng(rng), table(table_), buf_count(0), buf_data(0), name(name_) {}
					~GeneralizedTableTransform();
					void walk_state(StateWalkingObject *);
					Uint8 raw8();
				};
				vRNG *apply_SelfShrinkTransform(vRNG *base_rng);
				//vRNG *apply_SimpleShrinkTransform(vRNG *base_rng);

				class ReinterpretAsUnknown : public Transform8 {
					Uint8 *buffer;//don't feel like requiring a header for TestBlock
					int index;
					void refill();
				public:
					ReinterpretAsUnknown( vRNG *rng );
					~ReinterpretAsUnknown();
					Uint8 raw8();
					//to do: fix endianness issues
					std::string get_name() const;
					virtual int get_native_output_size() const {return -1;}
				};
				class ReinterpretAs8 : public Transform8 {
					Uint8 *buffer;//don't feel like requiring a header for TestBlock
					int index;
					void refill();
				public:
					ReinterpretAs8( vRNG *rng );
					~ReinterpretAs8();
					Uint8 raw8();
					std::string get_name() const;
				};
				class ReinterpretAs16 : public Transform16 {
					Uint16 *buffer;
					int index;
					void refill();
				public:
					ReinterpretAs16( vRNG *rng );
					~ReinterpretAs16();
					Uint16 raw16();
					std::string get_name() const;
				};
				class ReinterpretAs32 : public Transform32 {
					Uint32 *buffer;
					int index;
					void refill();
				public:
					ReinterpretAs32( vRNG *rng );
					~ReinterpretAs32();
					Uint32 raw32();
					std::string get_name() const;
				};
				class ReinterpretAs64 : public Transform64 {
					Uint64 *buffer;
					int index;
					void refill();
				public:
					ReinterpretAs64( vRNG *rng );
					~ReinterpretAs64();
					Uint64 raw64();
					std::string get_name() const;
				};

				class BaysDurhamShuffle64 : public Transform64 {
					Uint64 table[256];
					Uint8 prev;
					Uint8 index_mask;
					Uint8 index_shift;
				public:
					Uint64 raw64();
					void seed(Uint64 s);
					void walk_state(StateWalkingObject *);
					std::string get_name() const ;
					BaysDurhamShuffle64(vRNG64 *rng, int table_size_L2, int shift=0)
						: Transform64(rng), index_mask((1<<table_size_L2)-1), index_shift(shift) {}
				};
				class BaysDurhamShuffle32 : public Transform32 {
					Uint32 table[256];
					Uint8 prev;
					Uint8 index_mask;
					Uint8 index_shift;
				public:
					Uint32 raw32();
					void seed(Uint64 s);
					void walk_state(StateWalkingObject *);
					std::string get_name() const ;
					BaysDurhamShuffle32(vRNG32 *rng, int table_size_L2, int shift=0)
						: Transform32(rng), index_mask((1<<table_size_L2)-1), index_shift(shift) {}
				};
				class BaysDurhamShuffle16 : public Transform16 {
					Uint16 table[256];
					Uint8 prev;
					Uint8 index_mask;
					Uint8 index_shift;
				public:
					Uint16 raw16();
					void seed(Uint64 s);
					void walk_state(StateWalkingObject *);
					std::string get_name() const ;
					BaysDurhamShuffle16(vRNG16 *rng, int table_size_L2, int shift=0)
						: Transform16(rng), index_mask((1<<table_size_L2)-1), index_shift(shift) {}
				};
				class BaysDurhamShuffle8 : public Transform8 {
					Uint8 table[256];
					Uint8 prev;
					Uint8 index_mask;
					Uint8 index_shift;
				public:
					Uint8 raw8();
					void seed(Uint64 s);
					void walk_state(StateWalkingObject *);
					std::string get_name() const ;
					BaysDurhamShuffle8(vRNG8 *rng, int table_size_L2, int shift=0)
						: Transform8(rng), index_mask((1<<table_size_L2)-1), index_shift(shift) {}
				};
				vRNG *apply_BaysDurhamShuffle(vRNG *base_rng, int table_size_L2=8, int shift=-1);
			}
		}
	}
}


text:
"""
A dumb OpenFlow 1.0 responder for benchmarking the controller framework.
Intended to be used with oflops cbench.
"""

from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_0

class Cbench(app_manager.RyuApp):
    OFP_VERSIONS = [ofproto_v1_0.OFP_VERSION]

    def __init__(self, *args, **kwargs):
        super(Cbench, self).__init__(*args, **kwargs)

    @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
    def packet_in_handler(self, ev):
        msg = ev.msg
        datapath = msg.datapath
        ofproto = datapath.ofproto

        match = datapath.ofproto_parser.OFPMatch(
            ofproto_v1_0.OFPFW_ALL, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0)

        mod = datapath.ofproto_parser.OFPFlowMod(
            datapath, match=match, cookie=0, command=ofproto.OFPFC_ADD,
            idle_timeout=0, hard_timeout=0,
            priority=ofproto.OFP_DEFAULT_PRIORITY,
            flags=0, actions=None)
        datapath.send_msg(mod)


text:
layout: page
title: "EDUC 5375: Project-Based Math Instruction Statistics"
comments: true
description: "blanks"
keywords: "EDUC,5375,CU,Boulder"
---

#### GRADE AND WORKLOAD STATISTICS

**Percent withdrawn**: 0.0%

**Percent incomplete**: 0.0%

**Average grade** (4.0 scale): 3.85

**Standard deviation in grades** (4.0 scale): 0.14

**Average workload** (raw): 4.39

**Standard deviation in workload** (raw): 0.41

#### COURSE AND INSTRUCTOR RATINGS/INFORMATION

**Average course rating** (6 point scale): 4.8

**Standard deviation in course rating** (6 point scale): 0.66

**Average instructor rating** (6 point scale): 5.19

**Standard deviation in instructor rating** (6 point scale): 0.64

**Instructors**: Julie Ann Andrew, Erin Furtak, Krista Sekeres Marshall, Sarah Roberts, David Sanders, Thomas Sullivan

#### GENERAL CLASS INFORMATION

**Years provided**: Spring 2007, Spring 2008, Spring 2009, Spring 2010, Spring 2011, Spring 2014

**Credits**: 3

**RAP/Honors class?** Neither

**Number of Sections**: 6

**Department**: EDUC

**College**: School of Education

**Level**: Masters

**Activity**: LEC - Lecture