text:
'use strict';

var fs = require('fs');

var template = fs.readFileSync(__dirname + '/authorizations.html', 'utf8');
var confirmTemplate = fs.readFileSync(
  __dirname + '/confirm-delete-authorization.html',
  'utf8'
);

module.exports = [
  '$routeProvider',
  function($routeProvider) {
    $routeProvider.when('/authorization', {
      template: template,
      controller: [
        '$scope',
        'page',
        '$routeParams',
        '$uibModal',
        'AuthorizationResource',
        'Notifications',
        '$location',
        '$translate',
        function(
          $scope,
          pageService,
          $routeParams,
          $modal,
          AuthorizationResource,
          Notifications,
          $location,
          $translate
        ) {
          $scope.$root.showBreadcrumbs = true;

          pageService.titleSet(
            $translate.instant('AUTHORIZATION_AUTHORIZATIONS')
          );

          pageService.breadcrumbsClear();

          $scope.allPermissionsValue = 2147483647;

          $scope.resourceMap = {
            0: $translate.instant('AUTHORIZATION_APPLICATION'),
            1: $translate.instant('AUTHORIZATION_USER'),
            2: $translate.instant('AUTHORIZATION_GROUP'),
            3: $translate.instant('AUTHORIZATION_GROUP_MEMBERSHIP'),
            4: $translate.instant('AUTHORIZATION_AUTHORIZATION'),
            5: $translate.instant('AUTHORIZATION_FILTER'),
            6: $translate.instant('AUTHORIZATION_PROCESS_DEFINITION'),
            7: $translate.instant('AUTHORIZATION_TASK'),
            8: $translate.instant('AUTHORIZATION_PROCESS_INSTANCE'),
            9: $translate.instant('AUTHORIZATION_DEPLOYMENT'),
            10: $translate.instant('AUTHORIZATION_DECISION_DEFINITION'),
            11: $translate.instant('AUTHORIZATION_TENANT'),
            12: $translate.instant('AUTHORIZATION_TENANT_MEMBERSHIP'),
            13: $translate.instant('AUTHORIZATION_BATCH'),
            14: $translate.instant(
              'AUTHORIZATION_DECISION_REQUIREMENTS_DEFINITION'
            ),
            17: $translate.instant('AUTHORIZATION_OPERATION_LOG'),
            19: $translate.instant('AUTHORIZATION_HISTORIC_TASK'),
            20: $translate.instant('AUTHORIZATION_HISTORIC_PROCESS_INSTANCE'),
            21: $translate.instant('AUTHORIZATION_SYSTEM')
          };

          pageService.breadcrumbsAdd([
            {
              label: $translate.instant('AUTHORIZATION_AUTHORIZATIONS'),
              href: '#/authorization'
            }
          ]);

          $scope.permissionMap = {
            0: ['ACCESS'],
            1: ['READ', 'UPDATE', 'CREATE', 'DELETE'],
            2: ['READ', 'UPDATE', 'CREATE', 'DELETE'],
            3: ['CREATE', 'DELETE'],
            4: ['READ', 'UPDATE', 'CREATE', 'DELETE'],
            5: ['CREATE', 'READ', 'UPDATE', 'DELETE'],
            6: [
              'READ',
              'UPDATE',
              'DELETE',
              'SUSPEND',
              'CREATE_INSTANCE',
              'READ_INSTANCE',
              'UPDATE_INSTANCE',
              'RETRY_JOB',
              'SUSPEND_INSTANCE',
              'DELETE_INSTANCE',
              'MIGRATE_INSTANCE',
              'READ_TASK',
              'UPDATE_TASK',
              'TASK_ASSIGN',
              'TASK_WORK',
              'READ_TASK_VARIABLE',
              'READ_HISTORY',
              'READ_HISTORY_VARIABLE',
              'DELETE_HISTORY',
              'READ_INSTANCE_VARIABLE',
              'UPDATE_INSTANCE_VARIABLE',
              'UPDATE_TASK_VARIABLE',
              'UPDATE_HISTORY'
            ],
            7: [
              'CREATE',
              'READ',
              'UPDATE',
              'DELETE',
              'TASK_ASSIGN',
              'TASK_WORK',
              'UPDATE_VARIABLE',
              'READ_VARIABLE'
            ],
            8: [
              'CREATE',
              'READ',
              'UPDATE',
              'DELETE',
              'RETRY_JOB',
              'SUSPEND',
              'UPDATE_VARIABLE'
            ],
            9: ['CREATE', 'READ', 'DELETE'],
            10: [
              'READ',
              'UPDATE',
              'CREATE_INSTANCE',
              'READ_HISTORY',
              'DELETE_HISTORY'
            ],
            11: ['READ', 'UPDATE', 'CREATE', 'DELETE'],
            12: ['CREATE', 'DELETE'],
            13: [
              'READ',
              'UPDATE',
              'CREATE',
              'DELETE',
              'READ_HISTORY',
              'DELETE_HISTORY',
              'CREATE_BATCH_MIGRATE_PROCESS_INSTANCES',
              'CREATE_BATCH_MODIFY_PROCESS_INSTANCES',
              'CREATE_BATCH_RESTART_PROCESS_INSTANCES',
              'CREATE_BATCH_DELETE_RUNNING_PROCESS_INSTANCES',
              'CREATE_BATCH_DELETE_FINISHED_PROCESS_INSTANCES',
              'CREATE_BATCH_DELETE_DECISION_INSTANCES',
              'CREATE_BATCH_SET_JOB_RETRIES',
              'CREATE_BATCH_SET_REMOVAL_TIME',
              'CREATE_BATCH_SET_EXTERNAL_TASK_RETRIES',
              'CREATE_BATCH_UPDATE_PROCESS_INSTANCES_SUSPEND',
              'CREATE_BATCH_SET_VARIABLES'
            ],
            14: ['READ'],
            17: ['READ', 'DELETE', 'UPDATE'],
            19: ['READ', 'READ_VARIABLE'],
            20: ['READ'],
            21: ['READ', 'SET', 'DELETE']
          };

          $scope.typeMap = {
            0: $translate.instant('AUTHORIZATION_GLOBAL'),
            1: $translate.instant('AUTHORIZATION_ALLOW'),
            2: $translate.instant('AUTHORIZATION_DENY')
          };

          $scope.getIdentityId = function(auth) {
            if (auth.userId) {
              return auth.userId;
            } else {
              return auth.groupId;
            }
          };

          function createResourceList() {
            $scope.resourceList = [];
            for (var entry in $scope.resourceMap) {
              $scope.resourceList.push({
                id: entry,
                name: $scope.resourceMap[entry]
              });
            }
          }

          var getType = ($scope.getType = function(authorization) {
            return $scope.typeMap[authorization.type];
          });

          var getResource = ($scope.getResource = function(resourceType) {
            return $scope.resourceMap[resourceType];
          });

          var formatPermissions = ($scope.formatPermissions = function(
            permissionsList
          ) {
            // custom handling of NONE:
            // (permission NONE is trivially contained in all GRANTs and GLOBALs)
            var nonePos = permissionsList.indexOf('NONE');
            if (nonePos > -1) {
              permissionsList = permissionsList.splice(nonePos, 1);
            }

            // remove others if ALL is contained:
            if (permissionsList.indexOf('ALL') > -1) {
              return 'ALL';
            } else {
              var result = '';
              for (var i = 0; i < permissionsList.length; i++) {
                if (i > 0) {
                  result += ', ';
                }
                result += permissionsList[i];
              }

              if (result === '') {
                return 'NONE';
              } else {
                return result;
              }
            }
          });

          $scope.deleteAuthorization = function(authorization) {
            var dialog = $modal.open({
              controller: 'ConfirmDeleteAuthorizationController',
              template: confirmTemplate,
              resolve: {
                authorizationToDelete: function() {
                  return authorization;
                },
                formatPermissions: function() {
                  return formatPermissions;
                },
                getResource: function() {
                  return getResource;
                },
                getType: function() {
                  return getType;
                }
              }
            });

            dialog.result.then(
              function(result) {
                if (result == 'SUCCESS') {
                  loadAuthorizations();
                }
              },
              function() {
                loadAuthorizations();
              }
            );
          };

          $scope.pages = $scope.pages || {
            total: 0,
            size: 25,
            current: 1
          };

          var loadAuthorizations = ($scope.loadAuthorizations = function() {
            $scope.loadingState = 'LOADING';
            function reqError() {
              $scope.loadingState = 'ERROR';
            }

            AuthorizationResource.count({
              resourceType: $scope.selectedResourceType
            }).$promise.then(function(response) {
              $scope.pages.total = response.count;
            }, reqError);

            AuthorizationResource.query({
              resourceType: $scope.selectedResourceType,
              firstResult: ($scope.pages.current - 1) * $scope.pages.size,
              maxResults: $scope.pages.size
            }).$promise.then(function(response) {
              $scope.authorizations = response;
              $scope.loadingState = response.length ? 'LOADED' : 'EMPTY';
            }, reqError);
          });

          // will also trigger the initial load request
          $scope.$watch('pages.current', loadAuthorizations);

          $scope.getPermissionsForResource = function() {
            if ($scope.selectedResourceType) {
              return $scope.permissionMap[$scope.selectedResourceType];
            } else {
              return [];
            }
          };

          // page controls ////////////////////////////////////

          $scope.show = function(fragment) {
            return fragment == $location.search().tab;
          };

          $scope.activeClass = function(link) {
            var path = $location
              .absUrl()
              .split('?')
              .pop();
            return path === link ? 'active' : '';
          };

          // init ////////////////////////////////////

          createResourceList();

          if (!$location.search().resource) {
            $location.search({resource: 0});
            $location.replace();
            $scope.title = $scope.getResource(0);
            $scope.selectedResourceType = '0';
          } else {
            $scope.title = $scope.getResource($routeParams.resource);
            $scope.selectedResourceType = $routeParams.resource;
          }
        }
      ],
      authentication: 'required',
      reloadOnSearch: false
    });
  }
];


text:
package com.hptsec.vulnlab.View.HomeSubView;

import com.actionbarsherlock.app.SherlockFragment;
import com.hptsec.vulnlab.R;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class TutorialsFragment extends SherlockFragment {
	private static final String ARG_POSITION = "position";

	private int position;

	public static TutorialsFragment newInstance(int position) {
		TutorialsFragment f = new TutorialsFragment();
		Bundle b = new Bundle();
		b.putInt(ARG_POSITION, position);
		f.setArguments(b);
		return f;
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		position = getArguments().getInt(ARG_POSITION);
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		View view = inflater.inflate(R.layout.fragment_project_tutorials,
				container, false);

		return view;
	}
}

redpajama_set_name: RedPajamaGithub


text:
package skripteditor.addons.skript.exp;

import skripteditor.expressions.Expression;

public class ExpLastSpawnedShotEntity extends Expression {

	@Override
	public void registerUserFriendyPatterns() {
		registerUserFriendyPattern("[the] [last[ly]] (spawned|shot) %*entity type%");
	}

	@Override
	public void registerPatterns() {
		registerPattern("[the ][last[ly] ](spawned|shot) %entity type%");
	}

	@Override
	public String[] getExamples() {
		return new String[] {
				"spawn a priest\n" + "set {%spawned priest%.healer} to true\n"
						+ "shoot an arrow from the last spawned entity\n" + "ignite the shot projectile"
		};
	}

	@Override
	public String getName() {
		return "Last Spawned/Shot Entity";
	}

}


text:
namespace StudentWebApiCorsLab.Migrations.StudentAPI
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class InitialCreate : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Students",
                c => new
                    {
                        StudentId = c.String(nullable: false, maxLength: 128),
                        FirstName = c.String(),
                        LastName = c.String(),
                        Program = c.String(),
                    })
                .PrimaryKey(t => t.StudentId);

        }

        public override void Down()
        {
            DropTable("dbo.Students");
        }
    }
}


text:
var walkSync = require('walk-sync');
var esprima = require('esprima');
var fs = require('fs');
var helpers = require('broccoli-kitchen-sink-helpers');
var RSVP = require('rsvp');
var rimraf = RSVP.denodeify(require('rimraf'));
var symlinkOrCopy = require('symlink-or-copy');
var CachingWriter = require('broccoli-caching-writer');

module.exports = CachingWriter.extend({
  init: function(){
    this.enforceSingleInputTree = true;

    // The importsCache lets us avoid re-parsing individual files that
    // haven't changed.
    this.importsCache = {};

    // The stubsCache lets us avoid re-running browserify when the set
    // of included modules hasn't changed.
    this.stubsCache = null;
  },

  read: function(readTree) {
    var self = this;
    return readTree(this.inputTrees[0]).then(function(srcDir){
      var paths = walkSync(srcDir);
      var stubs = {};
      var updateCacheResult;
      paths.forEach(function (relativePath) {
        if (relativePath.slice(-3) === '.js') {
          gatherStubs(srcDir, relativePath, stubs, self.importsCache);
        }
      });
      if (!sameStubs(stubs, self.stubsCache)) {
        self.stubsCache = stubs;
        updateCacheResult = self.updateCache(srcDir, self.getCleanCacheDir());
      }
      return updateCacheResult;
    }).then(function(){
      return rimraf(self._destDir);
    }).then(function(){
      symlinkOrCopy.sync(self.getCacheDir(), self._destDir);
    }).then(function(){
      return self._destDir;
    });
  },

  updateCache: function(srcDir, destDir) {
    fs.writeFileSync(destDir + '/browserify_stubs.js', generate(this.stubsCache));
    return destDir;
  }
});

function gatherStubs(srcDir, relativePath, stubs, cache) {
  var src = fs.readFileSync(srcDir + '/' + relativePath);
  var key = helpers.hashStrings([relativePath, src]);

  if (cache[key]) {
    var len = cache[key].length;
    for (var i=0; i<len; i++) {
      stubs[cache[key][i]] = true;
    }
    return;
  }

  var cacheEntry = cache[key] = [];
  var imports = parseImports(src);
  Object.keys(imports).forEach(function(moduleName){
    stubs[moduleName] = true;
    cacheEntry.push(moduleName);
  });
}

function generate(stubs) {
  return Object.keys(stubs).map(function(moduleName){
    return "define('npm:" +
      moduleName +
      "', function(){ return { default: require('" +
      moduleName +
      "')};})";
  }).join("\n");
}

function sameStubs(a, b) {
  if (!a || !b) {
    return false;
  }
  var keys = Object.keys(a);
  for (var i=0; i < keys.length; i++) {
    if (!b[keys[i]]) {
      return false;
    }
  }
  keys = Object.keys(b);
  for (i=0; i < keys.length; i++) {
    if (!a[keys[i]]) {
      return false;
    }
  }
  return true;
}

function forEachNode(node, visit) {
  if (node && typeof node === 'object') {
    visit(node);
    var keys = Object.keys(node);
    for (var i=0; i < keys.length; i++) {
      forEachNode(node[keys[i]], visit);
    }
  }
}

function parseImports(src) {
  var imports = {};
  forEachNode(esprima.parse(src), function(entry) {
    if (entry.type === 'ImportDeclaration') {
      var source = entry.source.value;
      if (source.slice(0,4) === 'npm:') {
        if (entry.kind === 'named') {
          throw new Error("ember-browserify doesn't support named imports (you tried to import " + entry.specifiers[0].id.name +  " from " + source);
        }
        imports[source.slice(4)] = true;
      }
    }
  });
  return imports;
}


text:
/**
 * @constructor
 * @extends {WebInspector.View}
 * @param {string=} sidebarPosition
 * @param {string=} sidebarWidthSettingName
 * @param {number=} defaultSidebarWidth
 */
WebInspector.SplitView = function(sidebarPosition, sidebarWidthSettingName, defaultSidebarWidth)
{
    WebInspector.View.call(this);
    this.registerRequiredCSS("splitView.css");

    this.element.className = "split-view";

    this._leftElement = document.createElement("div");
    this._leftElement.className = "split-view-contents";
    this.element.appendChild(this._leftElement);

    this._rightElement = document.createElement("div");
    this._rightElement.className = "split-view-contents";
    this.element.appendChild(this._rightElement);

    this.sidebarResizerElement = document.createElement("div");
    this.sidebarResizerElement.className = "split-view-resizer";
    this.installResizer(this.sidebarResizerElement);
    this._resizable = true;
    this.element.appendChild(this.sidebarResizerElement);

    defaultSidebarWidth = defaultSidebarWidth || 200;
    this._savedSidebarWidth = defaultSidebarWidth;

    this._sidebarWidthSettingName = sidebarWidthSettingName;
    if (this._sidebarWidthSettingName)
        WebInspector.settings[this._sidebarWidthSettingName] = WebInspector.settings.createSetting(this._sidebarWidthSettingName, undefined);

    this._minimalSidebarWidth = Preferences.minSidebarWidth;
    this._minimalMainWidth = 0;
    this._minimalSidebarWidthPercent = 0;
    this._minimalMainWidthPercent = 50;

    this._mainElementHidden = false;
    this._sidebarElementHidden = false;

    this._innerSetSidebarPosition(sidebarPosition || WebInspector.SplitView.SidebarPosition.Left);
}

WebInspector.SplitView.EventTypes = {
    Resized: "Resized"
}

/**
 * @enum {string}
 */
WebInspector.SplitView.SidebarPosition = {
    Left: "Left",
    Right: "Right"
}

WebInspector.SplitView.prototype = {
    /**
     * @return {boolean}
     */
    get hasLeftSidebar()
    {
        return this._sidebarPosition === WebInspector.SplitView.SidebarPosition.Left;
    },

    /**
     * @return {Element}
     */
    get mainElement()
    {
        return this.hasLeftSidebar ? this._rightElement : this._leftElement;
    },

    /**
     * @return {Element}
     */
    get sidebarElement()
    {
        return this.hasLeftSidebar ? this._leftElement : this._rightElement;
    },

    /**
     * @return {boolean}
     */
    get resizable()
    {
        return this._resizable && !this._mainElementHidden && !this._sidebarElementHidden;
    },

    /**
     * @type {boolean}
     */
    set resizable(resizable)
    {
        if (this._resizable === resizable)
            return;
        this._resizable = resizable;
        this._updateResizer(resizable);
    },

    _updateResizer: function()
    {
        if (this.resizable)
            this.sidebarResizerElement.removeStyleClass("hidden");
        else
            this.sidebarResizerElement.addStyleClass("hidden");
    },

    /**
     * @type {string}
     */
    set sidebarPosition(sidebarPosition)
    {
        if (this._sidebarPosition === sidebarPosition)
            return;
        this._innerSetSidebarPosition(sidebarPosition);
        this._restoreSidebarWidth();
    },

    /**
     * @param {string} sidebarPosition
     */
    _innerSetSidebarPosition: function(sidebarPosition)
    {
        this._sidebarPosition = sidebarPosition;

        this._leftElement.style.left = 0;
        this._rightElement.style.right = 0;
        if (this.hasLeftSidebar) {
            this._leftElement.addStyleClass("split-view-sidebar-left");
            this._rightElement.removeStyleClass("split-view-sidebar-right");
            this._leftElement.style.removeProperty("right");
            this._rightElement.style.removeProperty("width");
            this.sidebarResizerElement.style.removeProperty("right");
        } else {
            this._rightElement.addStyleClass("split-view-sidebar-right");
            this._leftElement.removeStyleClass("split-view-sidebar-left");
            this._leftElement.style.removeProperty("width");
            this._rightElement.style.removeProperty("left");
            this.sidebarResizerElement.style.removeProperty("left");
        }
    },

    /**
     * @param {number} width
     */
    set minimalSidebarWidth(width)
    {
        this._minimalSidebarWidth = width;
    },

    /**
     * @param {number} width
     */
    set minimalMainWidth(width)
    {
        this._minimalMainWidth = width;
    },

    /**
     * @param {number} widthPercent
     */
    set minimalSidebarWidthPercent(widthPercent)
    {
        this._minimalSidebarWidthPercent = widthPercent;
    },

    /**
     * @param {number} widthPercent
     */
    set minimalMainWidthPercent(widthPercent)
    {
        this._minimalMainWidthPercent = widthPercent;
    },

    /**
     * @param {number} width
     */
    setMainWidth: function(width)
    {
        this.setSidebarWidth(this._totalWidth - width);
    },

    /**
     * @param {number} width
     */
    setSidebarWidth: function(width)
    {
        if (this._sidebarWidth === width)
            return;

        this._innerSetSidebarWidth(width);
        this.saveSidebarWidth();
    },

    sidebarWidth: function()
    {
        return this._sidebarWidth;
    },

    /**
     * @param {number} width
     */
    _innerSetSidebarWidth: function(width)
    {
        if (this.hasLeftSidebar)
            this._innerSetLeftSidebarWidth(width);
        else
            this._innerSetRightSidebarWidth(width);
        this._sidebarWidth = width;
        this.doResize();
        this.dispatchEventToListeners(WebInspector.SplitView.EventTypes.Resized, this._sidebarWidth);
    },

    /**
     * @param {number} width
     */
    _innerSetLeftSidebarWidth: function(width)
    {
        this._leftElement.style.width = width + "px";
        this._rightElement.style.left = width + "px";
        this.sidebarResizerElement.style.left = (width - 3) + "px";
    },

    /**
     * @param {number} width
     */
    _innerSetRightSidebarWidth: function(width)
    {
        this._rightElement.style.width = width + "px";
        this._leftElement.style.right = width + "px";
        this.sidebarResizerElement.style.right = (width - 3) + "px";
    },

    /**
     * @param {number} width
     */
    _setSidebarWidthEnsuringConstraints: function(width)
    {
        var minWidth = Math.max(this._minimalSidebarWidth, this._totalWidth * this._minimalSidebarWidthPercent);
        var maxWidth = Math.min(this._totalWidth - this._minimalMainWidth, this._totalWidth * (100 - this._minimalMainWidthPercent) / 100 );
        width = Number.constrain(width, minWidth, maxWidth);

        this.setSidebarWidth(width);
    },

    hideMainElement: function()
    {
        if (this._mainElementHidden)
            return;

        if (this._sidebarElementHidden)
            this.showSidebarElement();

        this.mainElement.addStyleClass("hidden");
        this.sidebarElement.addStyleClass("maximized");

        if (this.hasLeftSidebar)
            this.sidebarElement.style.right = "0px";
        else
            this.sidebarElement.style.left = "0px";

        this._mainElementHidden = true;
        this._updateResizer();
        this._restoreSidebarWidth();
        this.doResize();
    },

    showMainElement: function()
    {
        if (!this._mainElementHidden)
            return;

        this.mainElement.removeStyleClass("hidden");
        this.sidebarElement.removeStyleClass("maximized");

        if (this.hasLeftSidebar)
            this.sidebarElement.style.right = "";
        else
            this.sidebarElement.style.left = "";

        this._mainElementHidden = false;
        this._updateResizer();
        this._restoreSidebarWidth();
        this.doResize();
    },

    hideSidebarElement: function()
    {
        if (this._sidebarElementHidden)
            return;

        if (this._mainElementHidden)
            this.showMainElement();

        this.sidebarElement.addStyleClass("hidden");
        this._sidebarElementHidden = true;
        this._updateResizer();
        this._restoreSidebarWidth();
        this.doResize();
    },

    showSidebarElement: function()
    {
        if (!this._sidebarElementHidden)
            return;

        this.sidebarElement.removeStyleClass("hidden");
        this._sidebarElementHidden = false;
        this._updateResizer();
        this._restoreSidebarWidth();
        this.doResize();
    },

    wasShown: function()
    {
        this._totalWidth = this.element.offsetWidth;
        this._restoreSidebarWidth();
    },

    onResize: function()
    {
        this._totalWidth = this.element.offsetWidth;

        if (this._mainElementHidden)
            this._sidebarWidth = this._totalWidth;
    },

    /**
     * @param {Event} event
     * @return {boolean}
     */
    _startResizerDragging: function(event)
    {
        if (!this._resizable)
            return false;

        var leftWidth = this.hasLeftSidebar ? this._sidebarWidth : this._totalWidth - this._sidebarWidth;
        this._dragOffset = leftWidth - event.pageX;
        return true;
    },

    /**
     * @param {Event} event
     */
    _resizerDragging: function(event)
    {
        var leftWidth = event.pageX + this._dragOffset;
        var rightWidth = this._totalWidth - leftWidth;
        var sidebarWidth = this.hasLeftSidebar ? leftWidth : rightWidth;

        this._setSidebarWidthEnsuringConstraints(sidebarWidth);
        event.preventDefault();
    },

    /**
     * @param {Event} event
     */
    _endResizerDragging: function(event)
    {
        delete this._dragOffset;
    },

    /**
     * @param {Element} resizerElement
     */
    installResizer: function(resizerElement)
    {
        WebInspector.installDragHandle(resizerElement, this._startResizerDragging.bind(this), this._resizerDragging.bind(this), this._endResizerDragging.bind(this), "ew-resize");
    },

    /**
     * @return {number}
     */
    preferredSidebarWidth: function()
    {
        if (!this._sidebarWidthSettingName)
            return this._savedSidebarWidth;

        return WebInspector.settings[this._sidebarWidthSettingName].get() || this._savedSidebarWidth;
    },

    _restoreSidebarWidth: function()
    {
        if (this._mainElementHidden) {
            this.sidebarElement.style.width = "";
            this._sidebarWidth = this._totalWidth;
            return;
        }

        if (this._sidebarElementHidden) {
            this._innerSetSidebarWidth(0);
            return;
        }

        // Ensure restore satisfies constraints.
        this._setSidebarWidthEnsuringConstraints(this.preferredSidebarWidth());
    },

    saveSidebarWidth: function()
    {
        this._savedSidebarWidth = this._sidebarWidth;
        if (!this._sidebarWidthSettingName)
            return;

        WebInspector.settings[this._sidebarWidthSettingName].set(this._sidebarWidth);
    },

    /**
     * @return {Array.<Element>}
     */
    elementsToRestoreScrollPositionsFor: function()
    {
        return [ this.mainElement, this.sidebarElement ];
    },

    __proto__: WebInspector.View.prototype
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Verasoft.EF
{
    public class TrackingEntityItem<TEntity> where TEntity : class
    {
        public TEntity Entity { get; internal set; }
    }
}


text:
'use strict';

var isNonPositiveInteger = require( './../lib' );

console.log( isNonPositiveInteger( -5.0 ) );
// => true

console.log( isNonPositiveInteger( 0.0 ) );
// => true

console.log( isNonPositiveInteger( 1.0 ) );
// => false

console.log( isNonPositiveInteger( -3.14 ) );
// => false

console.log( isNonPositiveInteger( NaN ) );
// => false


text:
//
//  GTLAdSenseAlert.h
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   AdSense Management API (adsense/v1.4)
// Description:
//   Gives AdSense publishers access to their inventory and the ability to
//   generate reports
// Documentation:
//   https://developers.google.com/adsense/management/
// Classes:
//   GTLAdSenseAlert (0 custom class methods, 6 custom properties)

#if GTL_BUILT_AS_FRAMEWORK
  #import "GTL/GTLObject.h"
#else
  #import "GTLObject.h"
#endif

// ----------------------------------------------------------------------------
//
//   GTLAdSenseAlert
//

@interface GTLAdSenseAlert : GTLObject

// Unique identifier of this alert. This should be considered an opaque
// identifier; it is not safe to rely on it being in any particular format.
// identifier property maps to 'id' in JSON (to avoid Objective C's 'id').
@property (copy) NSString *identifier;

// Whether this alert can be dismissed.
@property (retain) NSNumber *isDismissible;  // boolValue

// Kind of resource this is, in this case adsense#alert.
@property (copy) NSString *kind;

// The localized alert message.
@property (copy) NSString *message;

// Severity of this alert. Possible values: INFO, WARNING, SEVERE.
@property (copy) NSString *severity;

// Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3,
// ADDRESS_PIN_VERIFICATION, PHONE_PIN_VERIFICATION, CORPORATE_ENTITY,
// GRAYLISTED_PUBLISHER, API_HOLD.
@property (copy) NSString *type;

@end


text:
var DomUtils    = require("domutils"),
    isTag       = DomUtils.isTag,
    getParent   = DomUtils.getParent,
    getChildren = DomUtils.getChildren,
    getSiblings = DomUtils.getSiblings,
    getName     = DomUtils.getName,
    BaseFuncs   = require("./basefunctions.js"),
    rootFunc    = BaseFuncs.rootFunc,
    trueFunc    = BaseFuncs.trueFunc;

/*
	all available rules
*/
module.exports = {
	__proto__: null,

	attribute: require("./attributes.js").compile,
	pseudo: require("./pseudos.js").compile,

	//tags
	tag: function(next, data){
		var name = data.name;
		return function tag(elem){
			return getName(elem) === name && next(elem);
		};
	},

	//traversal
	descendant: function(next){
		return function descendant(elem){
			var found = false;

			while(!found && (elem = getParent(elem))){
				found = next(elem);
			}

			return found;
		};
	},
	parent: function(next){
		return function parent(elem){
			return getChildren(elem).some(next);
		};
	},
	child: function(next){
		return function child(elem){
			var parent = getParent(elem);
			return parent && next(parent);
		};
	},
	sibling: function(next){
		return function sibling(elem){
			var siblings = getSiblings(elem);

			for(var i = 0; i < siblings.length; i++){
				if(isTag(siblings[i])){
					if(siblings[i] === elem) break;
					if(next(siblings[i])) return true;
				}
			}

			return false;
		};
	},
	adjacent: function(next){
		return function adjacent(elem){
			var siblings = getSiblings(elem),
			    lastElement;

			for(var i = 0; i < siblings.length; i++){
				if(isTag(siblings[i])){
					if(siblings[i] === elem) break;
					lastElement = siblings[i];
				}
			}

			return !!lastElement && next(lastElement);
		};
	},
	universal: function(next){
		return next === rootFunc ? trueFunc : next;
	}
};


text:
package org.insightech.er.editor.view.dialog.element.view;

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

import org.eclipse.gef.EditPartViewer;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.commands.CompoundCommand;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;
import org.insightech.er.common.dialog.AbstractDialog;
import org.insightech.er.common.exception.InputException;
import org.insightech.er.common.widgets.ValidatableTabWrapper;
import org.insightech.er.editor.controller.command.diagram_contents.element.node.table_view.ChangeTableViewPropertyCommand;
import org.insightech.er.editor.model.ERDiagram;
import org.insightech.er.editor.model.diagram_contents.element.node.view.View;
import org.insightech.er.editor.model.diagram_contents.not_element.group.GroupSet;
import org.insightech.er.editor.view.dialog.element.view.tab.AdvancedTabWrapper;
import org.insightech.er.editor.view.dialog.element.view.tab.AttributeTabWrapper;
import org.insightech.er.editor.view.dialog.element.view.tab.DescriptionTabWrapper;
import org.insightech.er.editor.view.dialog.element.view.tab.SqlTabWrapper;

public class ViewDialog extends AbstractDialog {

	private View copyData;

	private TabFolder tabFolder;

	private EditPartViewer viewer;

	private List<ValidatableTabWrapper> tabWrapperList;

	private ViewDialog(Shell parentShell, EditPartViewer viewer, View copyData,
			GroupSet columnGroups) {
		super(parentShell);

		this.viewer = viewer;
		this.copyData = copyData;

		this.tabWrapperList = new ArrayList<ValidatableTabWrapper>();
	}

	public static Command openDialog(
			final Shell parentShell,
			final EditPartViewer viewer, final ERDiagram diagram,
			final View view, final GroupSet columnGroups) {
		final View copyView = view.copyData();

		final ViewDialog dialog = new ViewDialog(
				parentShell,
				viewer,
				copyView, columnGroups);

		if (dialog.open() == IDialogConstants.OK_ID) {
			return createChangeViewPropertyCommand(diagram,
					view, copyView);
		}
		return null;
	}

	private static Command createChangeViewPropertyCommand(
			final ERDiagram diagram, final View view, final View copyView) {
		final CompoundCommand command = new CompoundCommand();

		final ChangeTableViewPropertyCommand changeViewPropertyCommand = new ChangeTableViewPropertyCommand(
				view, copyView);
		command.add(changeViewPropertyCommand);

		return command.unwrap();
	}

	@Override
	protected void initialize(Composite composite) {
		GridData gridData = new GridData();
		gridData.grabExcessHorizontalSpace = true;
		gridData.grabExcessVerticalSpace = true;
		gridData.verticalAlignment = GridData.FILL;
		gridData.horizontalAlignment = GridData.FILL;

		this.tabFolder = new TabFolder(composite, SWT.NONE);
		this.tabFolder.setLayoutData(gridData);

		final AttributeTabWrapper attributeTabWrapper = new AttributeTabWrapper(
				this, tabFolder, SWT.NONE, this.copyData);
		this.tabWrapperList.add(attributeTabWrapper);

		this.tabWrapperList.add(new SqlTabWrapper(this, tabFolder, SWT.NONE,
				this.copyData));
		this.tabWrapperList.add(new DescriptionTabWrapper(this, tabFolder,
				SWT.NONE, this.copyData));
		this.tabWrapperList.add(new AdvancedTabWrapper(this, tabFolder,
				SWT.NONE, this.copyData));

		this.tabFolder.addSelectionListener(new SelectionListener() {

			public void widgetDefaultSelected(SelectionEvent e) {
			}

			public void widgetSelected(SelectionEvent e) {
				int index = tabFolder.getSelectionIndex();

				ValidatableTabWrapper selectedTabWrapper = tabWrapperList
						.get(index);
				selectedTabWrapper.setInitFocus();
			}

		});

		attributeTabWrapper.setInitFocus();
	}

	@Override
	protected String getErrorMessage() {
		try {
			for (ValidatableTabWrapper tabWrapper : this.tabWrapperList) {
				tabWrapper.validatePage();
			}

		} catch (InputException e) {
			return e.getMessage();
		}

		return null;
	}

	@Override
	protected String getTitle() {
		return "dialog.title.view";
	}

	@Override
	protected void perfomeOK() throws InputException {
	}

	@Override
	protected void setData() {
	}

	public EditPartViewer getViewer() {
		return viewer;
	}

	public ERDiagram getDiagram() {
		return (ERDiagram) this.viewer.getContents().getModel();
	}
}


text:
@class HZPhotoBrowser;

@protocol HZPhotoBrowserDelegate <NSObject>

- (UIImage *)photoBrowser:(HZPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index;
- (NSURL *)photoBrowser:(HZPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index;
@end

@interface HZPhotoBrowser : UIViewController

@property (nonatomic, weak) UIView *sourceImagesContainerView;
@property (nonatomic, assign) int currentImageIndex;
@property (nonatomic, assign) NSInteger imageCount;//图片总数

@property(nonatomic,assign)CGFloat topNavHeight;

@property (nonatomic, weak) id<HZPhotoBrowserDelegate> delegate;

- (void)show;
@end


text:
'use strict';

import React from 'react';
import Renderer from 'react-test-renderer';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import lightBaseTheme from 'material-ui/styles/baseThemes/lightBaseTheme';
import Text from '../../../app/components/text/Text.jsx';

it('renders correctly', () => {
    const component = Renderer.create(
        <MuiThemeProvider muiTheme={getMuiTheme(lightBaseTheme)}>
            <Text style={{ fontWeight : 'bold' }}>Hello, World!</Text>
        </MuiThemeProvider>
    ).toJSON();

    expect(component).toMatchSnapshot();
});


text:
layout: post
microblog: true
audio:
photo:
date: 2011-05-18 14:44:55 -0600
guid: http://craigmcclellan.micro.blog/2011/05/18/t70953032774459392.html
---
What if Tyrannosaurus Jason and Craigalicious were currently working on their first collaboration? I think the world isn't ready. #jsexy


text:
Test-Repo
=========

Site for our client