text:
describe('Text Field directives', function() {
  beforeEach(module('material.components.textField'));

  describe('- mdInputGroup', function() {
    var scope;

    beforeEach(function() {
      scope = {
        user : {
          firstName: 'Thomas',
          lastName: 'Burleson',
          email: 'ThomasBurleson@gmail.com',
          password: 'your password is incorrect'
        }
      };
    });

    it('should set input class for focus & blur', function() {
      var expressions = {label:"Firstname", model:"user.firstName"},
          el = setupInputGroup( expressions, scope),
          input = el.find('input');

      input.triggerHandler('focus');
      expect(el.hasClass('md-input-focused')).toBe(true);
      input.triggerHandler('blur');
      expect(el.hasClass('md-input-focused')).toBe(false);
    });

    it('should set input class for input event', function() {
      var expressions = {label:"email", model:"user.email", type:"email"},
          el = setupInputGroup( expressions, scope),
          input = el.find('input');

      expect(el.hasClass('md-input-has-value')).toBe(true);

      input.val('');
      input.triggerHandler('input');
      expect(el.hasClass('md-input-has-value')).toBe(false);

      input.val('ThomasBurleson@gmail.com');
      input.triggerHandler('input');
      expect(el.hasClass('md-input-has-value')).toBe(true);
    });

    it('should set input class for ngModel render', function() {
      var expressions = {label:"Firstname", model:"user.firstName"},
          el = setupInputGroup( expressions, scope),
          input = el.find('input');

      expect(el.hasClass('md-input-has-value')).toBe(true);

      input.scope().$apply('user.firstName = ""');
      expect(el.hasClass('md-input-has-value')).toBe(false);

      input.scope().$apply('user.firstName = "Thomas"');
      expect(el.hasClass('md-input-has-value')).toBe(true);
    });

  });

  describe(' - mdTextFloat', function() {
    var model;
    beforeEach(function() {
      model = {
        labels : {
          firstName: 'FirstName',
          lastName: 'LastName',
          email: 'eMail',
          password: 'Password'
        },
        user : {
          firstName: 'Andrew',
          lastName: 'Joslin',
          email: 'AndrewJoslin@drifty.com',
          password: 'public'
        }
      }
    });

    it('should set input type `password` properly', function() {
      var el = setupTextFloat( { type:"password" }, model);
      expect( el.find('input').attr('type')).toBe("password");
      expect( el.find('input').val()).toBe("");
    });
    it('should set input type `email` properly', function() {
      var el = setupTextFloat( { type:"email" }, model);
      expect( el.find('input').attr('type')).toBe("email");
      expect( el.find('input').val()).toBe("");
    });

    it('should set a static label properly', function() {
      var el = setupTextFloat( { label:"motto" }, model);
      expect( el.find('label').text() ).toBe("motto");

      expect( el.find('input').attr('type')).toBe("text");
      expect( el.find('input').val()).toBe("");
    });
    it('should update a label from model changes.', function() {
      var markup ='<md-text-float ' +
                    '  label="{{labels.firstName}}" ' +
                    '  ng-model="user.firstName" >' +
                    '</md-text-float>';
      var el = buildElement( markup, model);

      expect( el.find('input').val() ).toBe("Andrew");
      expect( el.find('label').text() ).toBe("FirstName");

      // Change model value of the `firstName` [field] label
      // then check if the dom is updated

      var val2  = "Corporate Title:";
      el.find('label').scope().$apply(function(){
        model.labels.firstName = val2;
      });
      expect( el.find('label').text() ).toBe( val2 );

    });
    it('should update an input value from model changes.', function() {
      var markup ='<md-text-float ' +
                  '  label="{{labels.firstName}}" ' +
                  '  ng-model="user.firstName" >' +
                  '</md-text-float>';
      var el = buildElement( markup, model);
      var input = el.find('input');

      expect( input.val() ).toBe("Andrew");

      var name = "AngularJS";
      input.scope().$apply(function(){
        model.user.firstName = name;
      });
      expect( input.val() ).toBe( name );

    });
    it('should update a model value from input changes.', function() {
      var markup ='<md-text-float ' +
                  '  label="{{labels.firstName}}" ' +
                  '  ng-model="user.firstName" >' +
                  '</md-text-float>';
      var el = buildElement( markup, model);
      var input = el.find('input');

      expect( input.val() ).toBe( model.user.firstName );

      input.val( "AngularJS" );
      input.triggerHandler('input');
      expect( model.user.firstName ).toBe( "AngularJS" );

    });

    it('should set input class for focus & blur', function() {
      var expressions = {label:"Firstname", model:"user.firstName"},
          el = setupTextFloat( expressions, model),
          input = el.find('input');

      input.triggerHandler('focus');
      expect(el.hasClass('md-input-focused')).toBe(true);
      input.triggerHandler('blur');
      expect(el.hasClass('md-input-focused')).toBe(false);
    });
    it('should set input class for input event', function() {
      var expressions = {label:"password", model:"user.password", type:"password"},
          el = setupTextFloat( expressions, model),
          input = el.find('input');

      expect(el.hasClass('md-input-has-value')).toBe(true);

      input.val('');
      input.triggerHandler('input');
      expect(el.hasClass('md-input-has-value')).toBe(false);

      input.val('ThomasBurleson@gmail.com');
      input.triggerHandler('input');
      expect(el.hasClass('md-input-has-value')).toBe(true);
    });
    it('should set input class for ngModel changes', function() {
      var expressions = {label:"Password", model:"user.password", type:"password"},
          el = setupTextFloat( expressions, model),
          input = el.find('input');

      expect(el.hasClass('md-input-has-value')).toBe(true);

      input.scope().$apply(function(){  model.user.password = ""; });
      expect(el.hasClass('md-input-has-value')).toBe(false);

      input.scope().$apply(function() { model.user.password = "hiddenValley"; });
      expect(el.hasClass('md-input-has-value')).toBe(true);
    });

    it('should pair input and label for accessibility.', function() {
      var markup ='<md-text-float ' +
                  '  md-fid="093" ' +
                  '  label="{{labels.firstName}}" ' +
                  '  ng-model="user.firstName" >' +
                  '</md-text-float>';
      var el = buildElement( markup, model);
      var input = el.find('input');
      var label = el.find('label');

      expect( label.attr('for') ).toBe( "093" );
      expect( input.attr('id') ).toBe( label.attr('for') );
    });

    it('should auto-pair input and label for accessibility.', function() {
      var markup ='<md-text-float ' +
                  '  label="{{labels.firstName}}" ' +
                  '  ng-model="user.firstName" >' +
                  '</md-text-float>';
      var el = buildElement( markup, model);
      var input = el.find('input');
      var label = el.find('label');

      expect( label.attr('for') == "" ).toBe( false );
      expect( input.attr('id') ).toBe( label.attr('for') );
    });

    it('should add an ARIA attribute for disabled inputs', function() {
      var markup ='<md-text-float ng-disabled="true" ' +
                  '  label="{{labels.firstName}}" ' +
                  '  ng-model="user.firstName" >' +
                  '</md-text-float>';
      var el = buildElement( markup, model);
      var input = el.find('input');

      expect( input.attr('aria-disabled') ).toBe( 'true' );
    });
  });

  // ****************************************************************
  // Utility `setup` methods
  // ****************************************************************

  var templates = {
    md_text_float : '<md-text-float ' +
                '   type="{{type}}" ' +
                '   label="{{label}}" ' +
                '   ng-model="{{model}}" >' +
                '</md-text-float>',

    md_input_group: '
' +
                ' {{label}}' +
                ' <md-input id="{{id}}" type="{{type}}" ng-model="{{model}}"></md-input>' +
                '
'
  };

  /**
   * Build a text float group using the `<md-input-group />` markup template
   */
  function setupInputGroup(expressions, values) {
    values = angular.extend({},{type:"text", id:''},values||{});

    return buildElement( templates.md_input_group, values, angular.extend({}, expressions||{}));
  }

  /**
   * Build a text float group using the `<md-text-float />` markup template
   */
  function setupTextFloat(expressions, values) {
    values = angular.extend({ modelValue:"",type:'text' }, values || {});

    var defaults = {model:"modelValue", label:""};
    var tokens = angular.extend({}, defaults, expressions||{} );

    return buildElement( templates.md_text_float, values, tokens );
  }

  /**
   * Use the specified template markup, $compile to the DOM build
   * and link both the bindings and attribute assignments.
   * @returns {*} DOM Element
   */
  function buildElement( template, scope, interpolationScope  ) {
    var el;

    inject(function($compile, $interpolate, $rootScope) {
      scope = angular.extend( $rootScope.$new(), scope || {});

      // First substitute interpolation values into the template... if any
      if ( interpolationScope ) {
        template = $interpolate( template )( interpolationScope );
      }

      // Compile the template using the scope model(s)
      el = $compile( template )( scope );
      $rootScope.$apply();

    });
    return el;
  }

});


text:
<?php

namespace Kunstmaan\TranslatorBundle\Service\Migrations;

use Doctrine\ORM\EntityManager;

class MigrationsService
{
    /**
     * Repository for Translations
     *
     * @var \Kunstmaan\TranslatorBundle\Repository\TranslationRepository
     */
    private $translationRepository;

    /**
     * @var EntityManager
     */
    private $entityManager;

    public function getDiffSqlArray()
    {
        $sql = array();
        $inserts = $this->getNewTranslationSql();
        $updates = $this->getUpdatedTranslationSqlArray();

        if ($inserts != '' && !\is_null($inserts)) {
            $sql[] = $inserts;
        }

        if (\count($updates) > 0 && \is_array($updates)) {
            $sql = array_merge($sql, $updates);
        }

        return $sql;
    }

    public function getUpdatedTranslationSqlArray()
    {
        $ignoreFields = array('id');
        $uniqueKeys = array('domain', 'locale', 'keyword');

        $translations = $this->translationRepository->findBy(array('flag' => \Kunstmaan\TranslatorBundle\Entity\Translation::FLAG_UPDATED));

        if (\count($translations) <= 0) {
            return array();
        }

        $fieldNames = $this->entityManager->getClassMetadata('\Kunstmaan\TranslatorBundle\Entity\Translation')->getFieldNames();
        $tableName = $this->entityManager->getClassMetadata('\Kunstmaan\TranslatorBundle\Entity\Translation')->getTableName();
        $tableName = $this->entityManager->getConnection()->quoteIdentifier($tableName);

        $fieldNames = array_diff($fieldNames, $ignoreFields, $uniqueKeys);

        $sql = array();

        foreach ($translations as $translation) {
            $updateValues = array();
            $whereValues = array();

            foreach ($fieldNames as $fieldName) {
                $value = $translation->{'get'.$fieldName}();
                $columnName = $this->entityManager->getClassMetadata('\Kunstmaan\TranslatorBundle\Entity\Translation')->getColumnName($fieldName);
                if ($value instanceof \DateTime) {
                    $value = $value->format('Y-m-d H:i:s');
                }

                $updateValues[] = $this->entityManager->getConnection()->quoteIdentifier($columnName) . ' = ' . $this->entityManager->getConnection()->quote($value);
            }

            foreach ($uniqueKeys as $uniqueKey) {
                $value = $translation->{'get'.$uniqueKey}();

                if ($value instanceof \DateTime) {
                    $value = $value->format('Y-m-d H:i:s');
                }

                $whereValues[] = $this->entityManager->getConnection()->quoteIdentifier($uniqueKey) . ' = ' . $this->entityManager->getConnection()->quote($value);
            }

            $sql[] = sprintf('UPDATE %s SET %s WHERE %s', $tableName, implode(',', $updateValues), implode(' AND ', $whereValues));
        }

        return $sql;
    }

    /**
     * Build an sql insert into query by the paramters provided
     *
     * @param ORM\Entity $entities        Result array with all entities to create an insert for
     * @param string     $entityClassName Class of the specified entity (same as entities)
     * @param array      $ignoreFields    fields not to use in the insert query
     *
     * @return string an insert sql query, of no result nul
     */
    public function buildInsertSql($entities, $entityClassName, $ignoreFields = array())
    {
        if (\count($entities) <= 0) {
            return null;
        }

        $fieldNames = $this->entityManager->getClassMetadata($entityClassName)->getFieldNames();

        $tableName = $this->entityManager->getClassMetadata($entityClassName)->getTableName();
        $tableName = $this->entityManager->getConnection()->quoteIdentifier($tableName);
        $fieldNames = array_diff($fieldNames, $ignoreFields);

        $values = array();

        foreach ($entities as $entity) {
            $insertValues = array();

            foreach ($fieldNames as $fieldName) {
                $value = $entity->{'get'.$fieldName}();

                if ($value instanceof \DateTime) {
                    $value = $value->format('Y-m-d H:i:s');
                }

                $insertValues[] = $this->entityManager->getConnection()->quote($value);
            }

            $values[] = '(' . implode(',', $insertValues) . ')';
        }

        foreach ($fieldNames as $key => $fieldName) {
            $columnName = $this->entityManager->getClassMetadata($entityClassName)->getColumnName($fieldName);
            $fieldNames[$key] = $this->entityManager->getConnection()->quoteIdentifier($columnName);
        }

        $sql = sprintf('INSERT INTO %s (%s) VALUES %s', $tableName, implode(',', $fieldNames), implode(', ', $values));

        return $sql;
    }

    /**
     * Get the sql query for all new translations added
     *
     * @return string sql query
     */
    public function getNewTranslationSql()
    {
        $translations = $this->translationRepository->findBy(array('flag' => \Kunstmaan\TranslatorBundle\Entity\Translation::FLAG_NEW));

        return $this->buildInsertSql($translations, '\Kunstmaan\TranslatorBundle\Entity\Translation', array('flag', 'id'));
    }

    public function setTranslationRepository($translationRepository)
    {
        $this->translationRepository = $translationRepository;
    }

    public function setEntityManager($entityManager)
    {
        $this->entityManager = $entityManager;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package net.schmizz.sshj.transport.kex;

import net.schmizz.sshj.common.SSHRuntimeException;
import net.schmizz.sshj.common.SecurityUtils;

import javax.crypto.KeyAgreement;
import javax.crypto.spec.DHParameterSpec;
import javax.crypto.spec.DHPublicKeySpec;
import java.math.BigInteger;
import java.security.GeneralSecurityException;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.PublicKey;

/** Diffie-Hellman key generator. */
public class DH {

    private BigInteger p;
    private BigInteger g;
    private BigInteger e; // my public key
    private BigInteger K; // shared secret key
    private final KeyPairGenerator generator;
    private final KeyAgreement agreement;

    public DH() {
        try {
            generator = SecurityUtils.getKeyPairGenerator("DH");
            agreement = SecurityUtils.getKeyAgreement("DH");
        } catch (GeneralSecurityException e) {
            throw new SSHRuntimeException(e);
        }
    }

    public void init(BigInteger p, BigInteger g)
            throws GeneralSecurityException {
        this.p = p;
        this.g = g;
        generator.initialize(new DHParameterSpec(p, g));
        final KeyPair kp = generator.generateKeyPair();
        agreement.init(kp.getPrivate());
        e = ((javax.crypto.interfaces.DHPublicKey) kp.getPublic()).getY();
    }

    public void computeK(BigInteger f)
            throws GeneralSecurityException {
        final KeyFactory keyFactory = SecurityUtils.getKeyFactory("DH");
        final PublicKey yourPubKey = keyFactory.generatePublic(new DHPublicKeySpec(f, p, g));
        agreement.doPhase(yourPubKey, true);
        K = new BigInteger(1, agreement.generateSecret());
    }

    public BigInteger getE() {
        return e;
    }

    public BigInteger getK() {
        return K;
    }

}


text:
angular.module('account.settings.social.facebook', ['security']);
angular.module('account.settings.social.facebook').config(['$routeProvider', function($routeProvider){
  $routeProvider
    .when('/account/settings/facebook/callback', {
      resolve: {
        connect: ['$log', '$q', '$location', '$route', 'security', function($log, $q, $location, $route, security){
          var code = $route.current.params.code || '';
          var search = {};
          var promise = security.socialConnect('facebook', code)
            .then(function(data){
              if(data.success){
                search.success = 'true';
              }else{
                search.success = 'false';
                search.reason = data.errors[0];
              }
              return $q.reject();
            })
            .catch(function(){
              search.provider = 'facebook';
              search.success = search.success || 'false';
              $location.search({}); //remove search param "code" added by facebook
              $location.search(search);
              $location.path('/account/settings');
              return $q.reject();
            });
          return promise;
        }]
      },
      reloadOnSearch: false
    });
}]);


text:
/**
*
* ItemsList
*
*/

import React, { PropTypes } from 'react';

import styles from './styles.css';
import Item from '../Item';
import Spinner from 'components/Spinner';

class ItemsList extends React.Component { // eslint-disable-line react/prefer-stateless-function
  render() {
    let content = <div />;
    if (!this.props.loading) {
      content = this.props.coworksList.map((el) => (
        <Item key={el.id} cowork={{ ...el }} />
      ));
    } else {
      content = <Spinner />;
    }
    return (
      <div className={styles.itemsList}>
        {content}
      </div>
    );
  }
}

ItemsList.propTypes = {
  coworksList: PropTypes.oneOfType([PropTypes.array, PropTypes.object]).isRequired, // TODO: Why is it an object the first time?
  loading: PropTypes.bool.isRequired,
};

export default ItemsList;


text:
#pragma once

#include <functional>

class QScriptEngine;

namespace qt_monkey_agent
{
/**
 * called before run of script, may be used to register custom types,
 * variables etc
 * @tparam QScriptEngine & script engine which is used to run monkey script
 */
using PopulateScriptContext = std::function<void(QScriptEngine &)>;
} // namespace qt_monkey_agent


text:
var React = require('react');
var Router = require('react-router');
var Route = Router.Route;
var NotFoundRoute = Router.NotFoundRoute;
var DefaultRoute = Router.DefaultRoute;
var Link = Router.Link;
var RouteHandler = Router.RouteHandler;

module.exports = React.createClass({

  render: function () {
    return (

 Nico's blog!

<Link to="main">Main</Link>

<Link to="identidad">Identidad</Link>

<Link to="editorial">Editorial</Link>

<Link to="web">Web</Link>

<Link to="fun">Fun</Link>

          <RouteHandler/>

        This is a footer

    );
  }
});


text:
app.controller( "studentModelCtrl", function($scope, $http) {

    // Backend Data passed in.
    $scope.graphData= {};

    // Graph Types
    $scope.graphTypes = [];
    $scope.selectedGraphType= 0;

    // Run Types
    $scope.runTypes = [];
    $scope.selectedRunType = 0;

    // Dates, format YYYY-MM-DD
    $scope.lowDate;
    $scope.highDate;

    // Data to show
    $scope.selectedData = {};
    $scope.dataOptions =[];

    // Color Schemes
    $scope.selectedColorScheme = 0;
    $scope.colorSchemes = [];

    $scope.today = function() {
        $scope.dt = new Date();
    }

    $scope.initColors = function() {
        $scope.colorSchemes = [
            {
                'name': 'primary',
                'colors': [ '#3498DB', '#72C02C', '#F1C40F', '#E72525','#FEEF37','#A20078','#717984']
            },
            {
                'name': 'secondary',
                'colors': ['#B88FFF','#98F5C7','#62E3F2', '#3498DB',  '#FFBF6B', '#807F82', '#E9E37B','#800B81' ]
            }
        ];
        $scope.selectedColorScheme = $scope.colorSchemes[0];
    }

    $scope.initDates = function() {
        $scope.lowDate = new Date(2017,6,1);
        $scope.highDate = new Date();
    }

    $scope.initGraphTypes = function() {
        $scope.selectedGraphType = 0;
        $scope.graphTypes = [ 'line', 'bar' ];
    }

    $scope.initMetrics = function() {
        $scope.selectedData = 0;
        $scope.dataOptions = [
            { 'name': 'Submissions', 'key': 'nsubs' },
            { 'name': 'Feedback Items', 'key': 'nerrs' },
            { 'name': 'Feedback Items Viewed', 'key': 'nfiv' },
            { 'name': "Self-Assessments", 'key':'sass'},
            { 'name': "Most used tools", 'key':'mused'}
        ];
    }

    $scope.initRunType = function() {
        $scope.runTypes = ['programming', 'writing'];
        $scope.selectedRunType = $scope.runTypes[0];
    }

    $scope.init = function() {
        $scope.initColors();
        $scope.initDates();
        $scope.initGraphTypes();
        $scope.initMetrics();
        $scope.initRunType();
    }

    $scope.updateForm = function() {
        // add different options here, should never really have to add more here but here it is!
        $http.post('/studentModel/data', {'runType': $scope.selectedRunType, 'minDate': $scope.lowDate, 'maxDate': $scope.highDate, 'studentData': $scope.selectedData }).then( function(res) {
            if(res.data) {
                $scope.graphData = res.data;
            }
        }, function(err){
            Logger.log("Styudent Model ERROR:", err);
        });
    }

    //Initialize some values
    $scope.init();

    $http.get('/studentModel/data').then( function(res) {
        $scope.graphData = res.data;
    });

});


text:
namespace blink {
class WebFrame;
}

namespace test_runner {

class WebAXObjectProxy : public gin::Wrappable<WebAXObjectProxy> {
 public:
  class Factory {
   public:
    virtual ~Factory() { }
    virtual v8::Local<v8::Object> GetOrCreate(
        const blink::WebAXObject& object) = 0;
  };

  static gin::WrapperInfo kWrapperInfo;

  WebAXObjectProxy(const blink::WebAXObject& object, Factory* factory);
  ~WebAXObjectProxy() override;

  // gin::Wrappable:
  gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
      v8::Isolate* isolate) override;

  virtual v8::Local<v8::Object> GetChildAtIndex(unsigned index);
  virtual bool IsRoot() const;
  bool IsEqualToObject(const blink::WebAXObject& object);

  void NotificationReceived(blink::WebFrame* frame,
                            const std::string& notification_name);
  void Reset();

 protected:
  const blink::WebAXObject& accessibility_object() const {
    return accessibility_object_;
  }

  Factory* factory() const { return factory_; }

 private:
  friend class WebAXObjectProxyBindings;

  // Bound properties.
  std::string Role();
  std::string StringValue();
  std::string Language();
  int X();
  int Y();
  int Width();
  int Height();
  int IntValue();
  int MinValue();
  int MaxValue();
  std::string ValueDescription();
  int ChildrenCount();

  // The following selection functions return global information about the
  // current selection and can be called on any object in the tree.
  v8::Local<v8::Value> SelectionAnchorObject();
  int SelectionAnchorOffset();
  v8::Local<v8::Value> SelectionFocusObject();
  int SelectionFocusOffset();

  // The following selection functions return text offsets calculated starting
  // at this object. They only report on a selection that is placed on the
  // current object or on any of its descendants.
  // For example, they can be used to retrieve the selection in an input or
  // a textarea.
  int SelectionStart();
  int SelectionEnd();
  int SelectionStartLineNumber();
  int SelectionEndLineNumber();

  bool IsEnabled();
  bool IsRequired();
  bool IsEditable();
  bool IsRichlyEditable();
  bool IsFocused();
  bool IsFocusable();
  bool IsSelected();
  bool IsSelectable();
  bool IsMultiSelectable();
  bool IsSelectedOptionActive();
  bool IsExpanded();
  bool IsChecked();
  bool IsVisible();
  bool IsOffScreen();
  bool IsCollapsed();
  bool HasPopup();
  bool IsValid();
  bool IsReadOnly();
  unsigned int BackgroundColor();
  unsigned int Color();
  // For input elements of type color.
  unsigned int ColorValue();
  std::string FontFamily();
  float FontSize();
  std::string Orientation();
  int PosInSet();
  int SetSize();
  int ClickPointX();
  int ClickPointY();
  int32_t RowCount();
  int32_t RowHeadersCount();
  int32_t ColumnCount();
  int32_t ColumnHeadersCount();
  bool IsClickable();
  bool IsButtonStateMixed();

  // Bound methods.
  v8::Local<v8::Object> AriaControlsElementAtIndex(unsigned index);
  v8::Local<v8::Object> AriaFlowToElementAtIndex(unsigned index);
  v8::Local<v8::Object> AriaOwnsElementAtIndex(unsigned index);
  std::string AllAttributes();
  std::string AttributesOfChildren();
  int LineForIndex(int index);
  std::string BoundsForRange(int start, int end);
  v8::Local<v8::Object> ChildAtIndex(int index);
  v8::Local<v8::Object> ElementAtPoint(int x, int y);
  v8::Local<v8::Object> TableHeader();
  v8::Local<v8::Object> RowHeaderAtIndex(unsigned index);
  v8::Local<v8::Object> ColumnHeaderAtIndex(unsigned index);
  std::string RowIndexRange();
  std::string ColumnIndexRange();
  v8::Local<v8::Object> CellForColumnAndRow(int column, int row);
  void SetSelectedTextRange(int selection_start, int length);
  void SetSelection(v8::Local<v8::Value> anchor_object, int anchor_offset,
                    v8::Local<v8::Value> focus_object, int focus_offset);
  bool IsAttributeSettable(const std::string& attribute);
  bool IsPressActionSupported();
  bool IsIncrementActionSupported();
  bool IsDecrementActionSupported();
  v8::Local<v8::Object> ParentElement();
  void Increment();
  void Decrement();
  void ShowMenu();
  void Press();
  bool SetValue(const std::string& value);
  bool IsEqual(v8::Local<v8::Object> proxy);
  void SetNotificationListener(v8::Local<v8::Function> callback);
  void UnsetNotificationListener();
  void TakeFocus();
  void ScrollToMakeVisible();
  void ScrollToMakeVisibleWithSubFocus(int x, int y, int width, int height);
  void ScrollToGlobalPoint(int x, int y);
  int WordStart(int character_index);
  int WordEnd(int character_index);
  v8::Local<v8::Object> NextOnLine();
  v8::Local<v8::Object> PreviousOnLine();

  std::string Name();
  std::string NameFrom();
  int NameElementCount();
  v8::Local<v8::Object> NameElementAtIndex(unsigned index);

  std::string Description();
  std::string DescriptionFrom();
  int DescriptionElementCount();
  v8::Local<v8::Object> DescriptionElementAtIndex(unsigned index);

  blink::WebAXObject accessibility_object_;
  Factory* factory_;

  v8::Persistent<v8::Function> notification_callback_;

  DISALLOW_COPY_AND_ASSIGN(WebAXObjectProxy);
};

class RootWebAXObjectProxy : public WebAXObjectProxy {
 public:
  RootWebAXObjectProxy(const blink::WebAXObject&, Factory*);

  v8::Local<v8::Object> GetChildAtIndex(unsigned index) override;
  bool IsRoot() const override;
};

// Provides simple lifetime management of the WebAXObjectProxy instances: all
// WebAXObjectProxys ever created from the controller are stored in a list and
// cleared explicitly.
class WebAXObjectProxyList : public WebAXObjectProxy::Factory {
 public:
  WebAXObjectProxyList();
  ~WebAXObjectProxyList() override;

  void Clear();
  v8::Local<v8::Object> GetOrCreate(const blink::WebAXObject&) override;

 private:
  typedef v8::PersistentValueVector<v8::Object> ElementList;
  ElementList elements_;
};

}  // namespace test_runner

#endif  // COMPONENTS_TEST_RUNNER_WEB_AX_OBJECT_PROXY_H_


text:
/*= require ./jquery-ui */

@font-face {
  font-family: "OpenSansItalic";
  src: url("opensans-italic-webfont.eot");
  src: url("opensans-italic-webfont.eot?#iefix") format("embedded-opentype"),
  url("opensans-italic-webfont.woff") format("woff"),
  url("opensans-italic-webfont.ttf") format("truetype"),
  url("opensans-italic-webfont.svg#OpenSansItalic") format("svg");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "OpenSansRegular";
  src: url("opensans-regular-webfont.eot");
  src: url("opensans-regular-webfont.eot?#iefix") format("embedded-opentype"),
  url("opensans-regular-webfont.woff") format("woff"),
  url("opensans-regular-webfont.ttf") format("truetype"),
  url("opensans-regular-webfont.svg#OpenSansRegular") format("svg");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "OpenSansSemibold";
  src: url("opensans-semibold-webfont.eot");
  src: url("opensans-semibold-webfont.eot?#iefix") format("embedded-opentype"),
  url("opensans-semibold-webfont.woff") format("woff"),
  url("opensans-semibold-webfont.ttf") format("truetype"),
  url("opensans-semibold-webfont.svg#OpenSansSemibold") format("svg");
  font-weight: normal;
  font-style: normal;
}

html, body {
  margin: 0px;
  padding: 0px;
  background: url('bg.jpg') repeat 0 0;
  font-weight: normal;
  font-family: 'OpenSansRegular';
}

#launchpad {
  background-color: black;
  color: white;
  font-size: 10px;
  padding: 6px;
}

#launchpad h1 {
  display: inline-block;
  float: left;
  margin: 0px 20px 0px 15px;
  padding: 0px;
  font-size: 10px;
  color: #999;
  font-weight: normal;
  font-family: 'OpenSansSemibold';
}

#launchpad ul {
  margin: 0px;
  padding: 0px;
  list-style: none;
}

#launchpad li {
  float: left;
  margin-right: 20px;
}

#launchpad li:last-child {
  float: none;
}

#launchpad a {
  color: #999;
  text-decoration: none;
}

#launchpad a:hover {
  color: white;
}

.launchpad-surround {
  position: relative;
  margin: 0px 20px;
}

.launchpad-surround h1 {
  border-bottom: 1px solid #ddd;
  margin-top: 15px;
  font-size: 1.7em;
  padding-bottom: 12px;
}

.launchpad-surround h2 {
  margin-top: 35px;
  font-size: 1.2em;
  padding-bottom: 12px;
  border-bottom: 1px solid #ddd;
}

.launchpad-surround ul {
  list-style: none;
  margin: 0px;
  padding: 0px;
}

.launchpad-surround ul.details li {
  margin-bottom: 8px;
}

.launchpad-surround ul.details label {
  font-family: 'OpenSansItalic';
  width: 100px;
  display: inline-block;
}

.launchpad-surround .search {
  height: 40px;
  margin-top: 10px;
  margin-bottom: -13px;
  position: relative;
}

.launchpad-surround .search .bar {
  position: absolute;
  width: 278px;
  height: 42px;
  background: url('search.png') no-repeat 0 0;
  right: 60px;
  top: 5px;
}

.launchpad-surround .search .bar input[type="text"] {
  border: none;
  font-size: 14px;
  outline: none;
  margin-top: 11px;
  margin-left: 45px;
  width: 220px;
  background-color: #FAFAFA;
}

.launchpad-surround .top-left {
  background: url('top-left.png') no-repeat 0 0;
  width: 24px;
  height: 56px;
  float: left;
}

.launchpad-surround .top-middle {
  background: url('top.png') repeat-x 0 0;
  height: 56px;
  margin-left: 24px;
  margin-right: 24px;
}

.launchpad-surround .top-right {
  background: url('top-right.png') no-repeat 0 0;
  width: 24px;
  height: 56px;
  float: right;
  margin-right: 1px;
  margin-top: -56px;
}

.launchpad-surround .left {
  background: url('left.png') repeat-y 0 0;
}

.launchpad-surround .right {
  background: url('right.png') repeat-y right 0;
  margin-right: 0px;
}

.launchpad-surround .bottom-left {
  background: url('bottom-left.png') no-repeat 0 0;
  width: 24px;
  height: 56px;
  float: left;
}

.launchpad-surround .bottom-middle {
  background: url('bottom.png') repeat-x 0 0;
  height: 56px;
  margin-left: 24px;
  margin-right: 24px;
}

.launchpad-surround .bottom-right {
  float: right;
  margin-top: -56px;
}

.launchpad-surround .bottom-right {
  background: url('bottom-right.png') no-repeat right 0;
  width: 24px;
  height: 56px;
}

.launchpad-surround .content {
  position: relative;
  background-color: white;
  margin: 0px 6px;
  padding: 0px 20px;
  overflow: auto;
}

.launchpad-surround .footer img {
  display: block;
  margin: 0px auto 30px auto;
}

.launchpad-menu ul {
  list-style: none;
  position: absolute;
  top: 45px;
  left: 30px;
  z-index: 1000;
  font-size: 1em;
  overflow: auto;
}

.launchpad-menu ul li {
  display: inline-block;
  margin-right: 20px;
}

.launchpad-menu ul li a {
  color: #ABA8A5;
  text-shadow: 1px 1px 1px white;
  text-decoration: none;
}

.launchpad-menu ul li a:hover {
  text-decoration: underline;
}

.user-workflow-state {
  font-size: .6em;
  line-height: 1em;
  vertical-align: middle;
  padding: 3px 6px;
  border-radius: 5px;
}

.user-workflow-state.active {
  background-color: green;
  color: white;
}

.user-workflow-state.converting {
  background-color: orange;
  color: white;
}

.user-workflow-state.unconverted {
  background-color: #FF3300;
  color: white;
}

.errors .alert span {
  background-color: brown;
  color: white;
  padding: 2px 7px;
  border-radius: 5px;
}

.field_with_errors {
  display: inline-block;
  border: 2px solid brown;
}

.none {
  font-family: 'OpenSansItalic';
}


text:
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-tabs-overview-example',
  templateUrl: './tabs-overview-example.component.html',
  styleUrls: ['./tabs-overview-example.component.scss']
})
export class TabsOverviewExampleComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}


text:
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion

class Migration(migrations.Migration):

    dependencies = [
        ('indicators', '0047_evidence_field_and_migration'),
        ('workflow', '0032_auto_20190127_1536'),
        ('tola_management', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='IndicatorAuditLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True, verbose_name='Modification Date')),
                ('change_type', models.CharField(max_length=255, verbose_name='Modification Type')),
                ('previous_entry', models.TextField()),
                ('new_entry', models.TextField()),
                ('rationale', models.TextField()),
                ('indicator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='indicators.Indicator')),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='workflow.Organization')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='workflow.TolaUser')),
            ],
        ),
    ]


text:
/* jshint node:true */
/* global describe, it */
"use strict";

var jsc = require("../lib/jsverify.js");
var assert = require("assert");
var _ = require("lodash");

describe("regressions", function () {
  it("#20 - array size and element size is linked", function () {
    var arb = jsc.array(jsc.nat(10000));
    var ok = false;

    var pred = function (x) { return x > 5; };

    for (var i = 0; i < 100; i++) {
      var res = arb.generator(5);
      var larger = res.some(pred);
      if (larger) {
        ok = true;
        break;
      }
    }

    assert(ok, "explicit number size should be decoupled from passed size");
  });

  describe("#39 - Allow new generators in the DSLs environment", function () {
    var set = function (arb) {
      var arrayArb = jsc.array(arb);
      // _.id is "forgets" uniqueness: "set → array"
      return arrayArb.smap(_.uniq, _.identity, arrayArb.show);
    };

    var pred = function (xs) {
      return _.uniq(xs).length === xs.length;
    };

    var setArb = set(jsc.nat);
    var setShrink = setArb.shrink;

    it("generator sound", function () {
      // Property works
      var prop = jsc.forall(setArb, pred);
      jsc.assert(prop);
    });

    jsc.property("shrink example", function () {
      var value = setShrink([1, 2]).toArray();
      return _.every(value, pred);
    });

    it("shrink sound", function () {
      // Also shrinks!
      var shrinkProp = jsc.forall(setArb, function (xs) {
        var shrinked = setShrink(xs).toArray();
        return _.every(shrinked, pred);
      });
      jsc.assert(shrinkProp);
    });

    it("array shrink, may break invariant", function () {
      var arrayShrink = jsc.compile("array nat").shrink;

      var shrinked = arrayShrink([1, 2, 3]).toArray();
      assert(shrinked.some(function (xs) {
        return !pred(xs);
      }));
    });

    it("user environment works in suchthat", function () {
      var suchThatArb = jsc.suchthat("set nat", { set: set }, function () { return true; });
      jsc.assert(jsc.forall(suchThatArb, pred));
    });

    it("user environment works in forall", function () {
      jsc.assert(jsc.forall("set nat", { set: set }, pred));
    });

    it("user environment works in compile", function () {
      jsc.assert(jsc.forall(jsc.compile("set nat", { set: set }), pred));
    });
  });

  describe("issue #98", function () {
    jsc.property("shouldn't fail", function () {
      var n = jsc.int32.generator(100);
      return typeof n === "number";
    });
  });

  describe("#107: fn smap", function () {
    jsc.property("shouldn't fail", function () {
      var arb = jsc.fn(jsc.integer()).smap(function (v) { return { data: v }; }, function (v) { return v.data; });
      var prop = jsc.forall(arb, function (x) {
        return typeof x.data === "function";
      });
      return jsc.check(prop);
    });
  });

  describe("#113", function () {
    it("should not throw exception", function () {
      var arb = jsc.tuple([jsc.bool, jsc.array(jsc.bool), jsc.bool]);
      arb.shrink([true, [true, true], true]);
    });
  });

  describe("#112", function () {
    it("should support large test counts", function () {
      var prop = jsc.forall("nat", function (n) {
        return n === n; // eslint-disable-line no-self-compare
      });

      jsc.assert(prop, { tests: 100000 });
    });
  });

  describe("#123", function () {
    it("objects with re-ordered keys are jsc.utils.isEqual", function () {
      var x = { a: 1, b: 2 };
      var y = { b: 2, a: 1 };

      assert(_.isEqual(x, y), "lodash");
      assert(jsc.utils.isEqual(x, y), "jsc");
      assert(jsc.utils.isApproxEqual(x, y), "isApprox");
    });
  });

  describe("#124", function () {
    var identity = function (x) { return x; };

    it("tuple arbitrary should have shrink blessed", function () {
      var arb = jsc.tuple([jsc.nat, jsc.bool]);

      assert.equal(typeof arb.shrink, "function");
      assert.equal(typeof arb.shrink.smap, "function");
    });

    it("smap tuple should work", function () {
      var arb = jsc.tuple([jsc.nat, jsc.bool]).smap(identity, identity);

      jsc.assert(jsc.forall(arb, function (t) {
        return t.length === 2 && typeof t[1] === "boolean";
      }));
    });
  });
});


text:
<?

require( "/www/freshports.org/_private/commonlogin.php3");
require( "/www/freshports.org/_private/getvalues.php3");

?>

<meta name="description" content="freshports - new ports, applications">
<meta name="keywords" content="FreeBSD, index, applications, ports">

<title>freshports - search</title>

<? include("/www/freshports.org/_private/header.inc") ?>

OK, we have just a very simple search.  Eventually this will be extended. If you find any bugs, please
let me know.

    freshports - search

<?
if ($search) {
/*
   while (list($name, $value) = each($HTTP_POST_VARS)) {
      echo "$name = $value
\n";
   }

   echo "you submitted
\n";
*/

   echo "
\n
";

$sql = "select ports.id, ports.name as port, ports.last_update as updated, " .
       "categories.name as category, categories.id as category_id, ports.version as version, ".
       "ports.committer, ports.last_update_description as update_description, " .
       "ports.maintainer, ports.short_description, ".
       "ports.package_exists, ports.extract_suffix, ports.needs_refresh, ports.homepage, ports.status " .
       "from ports, categories  ".
       "WHERE ports.system = 'FreeBSD' ".
       "and ports.primary_category_id = categories.id ";

switch ($stype) {
   case "name":
      $sql .= "and ports.name like '%$query%'";
      break;

/*
   case "text":
      $sql .= "and ports.short_description like '%$query%' or ports.long_description like '%$query%'";
      break;
*/
   case "maintainer":
      $sql .= "and ports.maintainer like '%$query%'";
      break;

   case "requires":
      $sql .= "and (ports.depends_build like '%$query%' or ports.depends_run like '%$query%')";
      break;
}

$sql .= " order by ports.name";

//echo "$sql
\n";

$result = mysql_query($sql, $db);
$NumRows = mysql_num_rows($result);

}
?>
<form METHOD="POST" ACTION="<? echo $PHP_SELF ?>">

Search for: <input NAME="query" size="20"  value="<? echo $query?>"> <select NAME="stype" size="1">
    <option VALUE="name"      <? if ($stype == "name")       echo 'selected'?>>Port Name</option>
    <option VALUE="maintainer"<? if ($stype == "maintainer") echo 'selected'?>>Maintainer</option>
    <option VALUE="requires"  <? if ($stype == "requires")   echo 'selected'?>>Requires</option>
  </select> <input TYPE="submit" VALUE="search">

  <input type="hidden" name="search" value="1">
</form>

<?
if ($search) {
echo "
\n";
if ($NumRows == 0) {
   $HTML .= " no results found
\n";
} else {

//   echo "retrieving $NumRows rows
\n";

   for ($i = 0; $i < $NumRows; $i++) {
      $myrow = mysql_fetch_array($result);
      $rows[$i]=$myrow;
//      echo "retrieving row $i
\n";
   }

   for ($i = 0; $i < $NumRows; $i++) {
//      echo "displaying row $i
\n";
      $myrow = $rows[$i];

      include("/www/freshports.org/_private/port-basics.inc");
   }

}
echo $HTML;
echo "
\n";
}
?>

    <? include("/www/freshports.org/_private/side-bars.php3") ?>

<? include("/www/freshports.org/_private/footer.inc") ?>