text:
/*!
 * angular-ui-scroll
 * https://github.com/angular-ui/ui-scroll.git
 * Version: 1.3.1 -- 2015-08-18T15:44:58.003Z
 * License: MIT
 */

 (function () {
'use strict';

/*!
globals: angular, window

	List of used element methods available in JQuery but not in JQuery Lite

		element.before(elem)
		element.height()
		element.outerHeight(true)
		element.height(value) = only for Top/Bottom padding elements
		element.scrollTop()
		element.scrollTop(value)
 */
angular.module('ui.scroll', []).directive('uiScrollViewport', function() {
  return {
    controller: [
      '$scope', '$element', function(scope, element) {
        this.viewport = element;
        return this;
      }
    ]
  };
}).directive('uiScroll', [
  '$log', '$injector', '$rootScope', '$timeout', '$q', '$parse', function(console, $injector, $rootScope, $timeout, $q, $parse) {
    var $animate;
    if ($injector.has && $injector.has('$animate')) {
      $animate = $injector.get('$animate');
    }
    return {
      require: ['?^uiScrollViewport'],
      transclude: 'element',
      priority: 1000,
      terminal: true,
      compile: function(elementTemplate, attr, linker) {
        return function($scope, element, $attr, controllers) {
          var adapter, adapterOnScope, adjustBuffer, applyUpdate, bof, bottomVisiblePos, buffer, bufferPadding, bufferSize, builder, clipBottom, clipTop, datasource, datasourceName, dismissPendingRequests, enqueueFetch, eof, eventListener, fetch, finalize, first, insertElement, insertElementAnimated, insertItem, isDatasourceValid, itemName, loading, log, match, next, pending, reload, removeFromBuffer, removeItem, resizeAndScrollHandler, ridActual, scrollHeight, shouldLoadBottom, shouldLoadTop, topVisible, topVisiblePos, unsupportedMethod, viewport, viewportScope, wheelHandler;
          log = console.debug || console.log;
          if (!(match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([\w\.]+)\s*$/))) {
            throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \' + $attr.uiScroll + \'');
          }
          itemName = match[1];
          datasourceName = match[2];
          datasource = $parse(datasourceName)($scope);
          isDatasourceValid = function() {
            return angular.isObject(datasource) && angular.isFunction(datasource.get);
          };
          if (!isDatasourceValid()) {
            datasource = $injector.get(datasourceName);
            if (!isDatasourceValid()) {
              throw new Error(datasourceName + ' is not a valid datasource');
            }
          }
          bufferSize = Math.max(3, +$attr.bufferSize || 10);
          bufferPadding = function() {
            return viewport.outerHeight() * Math.max(0.1, +$attr.padding || 0.1);
          };
          scrollHeight = function(elem) {
            var ref;
            return (ref = elem[0].scrollHeight) != null ? ref : elem[0].document.documentElement.scrollHeight;
          };
          builder = null;
          ridActual = 0;
          first = 1;
          next = 1;
          buffer = [];
          pending = [];
          eof = false;
          bof = false;
          removeItem = $animate ? angular.version.minor === 2 ? function(wrapper) {
            var deferred;
            buffer.splice(buffer.indexOf(wrapper), 1);
            deferred = $q.defer();
            $animate.leave(wrapper.element, function() {
              wrapper.scope.$destroy();
              return deferred.resolve();
            });
            return [deferred.promise];
          } : function(wrapper) {
            buffer.splice(buffer.indexOf(wrapper), 1);
            return [
              ($animate.leave(wrapper.element)).then(function() {
                return wrapper.scope.$destroy();
              })
            ];
          } : function(wrapper) {
            buffer.splice(buffer.indexOf(wrapper), 1);
            wrapper.element.remove();
            wrapper.scope.$destroy();
            return [];
          };
          insertElement = function(newElement, previousElement) {
            element.after.apply(previousElement, [newElement]);
            return [];
          };
          insertElementAnimated = $animate ? angular.version.minor === 2 ? function(newElement, previousElement) {
            var deferred;
            deferred = $q.defer();
            $animate.enter(newElement, element, previousElement, function() {
              return deferred.resolve();
            });
            return [deferred.promise];
          } : function(newElement, previousElement) {
            return [$animate.enter(newElement, element, previousElement)];
          } : insertElement;
          linker($scope.$new(), function(template) {
            var bottomPadding, padding, repeaterType, topPadding, viewport;
            repeaterType = template[0].localName;
            if (repeaterType === 'dl') {
              throw new Error('ui-scroll directive does not support <' + template[0].localName + '> as a repeating tag: ' + template[0].outerHTML);
            }
            if (repeaterType !== 'li' && repeaterType !== 'tr') {
              repeaterType = 'div';
            }
            viewport = controllers[0] && controllers[0].viewport ? controllers[0].viewport : angular.element(window);
            viewport.css({
              'overflow-y': 'auto',
              'display': 'block'
            });
            padding = function(repeaterType) {
              var div, result, table;
              switch (repeaterType) {
                case 'tr':
                  table = angular.element('

');
                  div = table.find('div');
                  result = table.find('tr');
                  result.paddingHeight = function() {
                    return div.height.apply(div, arguments);
                  };
                  break;
                default:
                  result = angular.element('<' + repeaterType + '></' + repeaterType + '>');
                  result.paddingHeight = result.height;
              }
              return result;
            };
            topPadding = padding(repeaterType);
            element.before(topPadding);
            bottomPadding = padding(repeaterType);
            element.after(bottomPadding);
            $scope.$on('$destroy', function() {
              return template.remove();
            });
            return builder = {
              viewport: viewport,
              topPadding: function() {
                return topPadding.paddingHeight.apply(topPadding, arguments);
              },
              bottomPadding: function() {
                return bottomPadding.paddingHeight.apply(bottomPadding, arguments);
              },
              bottomDataPos: function() {
                return scrollHeight(viewport) - bottomPadding.paddingHeight();
              },
              topDataPos: function() {
                return topPadding.paddingHeight();
              },
              insertElement: function(e, sibling) {
                return insertElement(e, sibling || topPadding);
              },
              insertElementAnimated: function(e, sibling) {
                return insertElementAnimated(e, sibling || topPadding);
              }
            };
          });
          viewport = builder.viewport;
          viewportScope = viewport.scope() || $rootScope;
          topVisible = function(item) {
            adapter.topVisible = item.scope[itemName];
            adapter.topVisibleElement = item.element;
            adapter.topVisibleScope = item.scope;
            if ($attr.topVisible) {
              $parse($attr.topVisible).assign(viewportScope, adapter.topVisible);
            }
            if ($attr.topVisibleElement) {
              $parse($attr.topVisibleElement).assign(viewportScope, adapter.topVisibleElement);
            }
            if ($attr.topVisibleScope) {
              $parse($attr.topVisibleScope).assign(viewportScope, adapter.topVisibleScope);
            }
            if (angular.isFunction(datasource.topVisible)) {
              return datasource.topVisible(item);
            }
          };
          loading = function(value) {
            adapter.isLoading = value;
            if ($attr.isLoading) {
              $parse($attr.isLoading).assign($scope, value);
            }
            if (angular.isFunction(datasource.loading)) {
              return datasource.loading(value);
            }
          };
          removeFromBuffer = function(start, stop) {
            var i, j, ref, ref1;
            for (i = j = ref = start, ref1 = stop; ref <= ref1 ? j < ref1 : j > ref1; i = ref <= ref1 ? ++j : --j) {
              buffer[i].scope.$destroy();
              buffer[i].element.remove();
            }
            return buffer.splice(start, stop - start);
          };
          dismissPendingRequests = function() {
            ridActual++;
            return pending = [];
          };
          reload = function() {
            dismissPendingRequests();
            first = 1;
            next = 1;
            removeFromBuffer(0, buffer.length);
            builder.topPadding(0);
            builder.bottomPadding(0);
            eof = false;
            bof = false;
            return adjustBuffer(ridActual);
          };
          bottomVisiblePos = function() {
            return viewport.scrollTop() + viewport.outerHeight();
          };
          topVisiblePos = function() {
            return viewport.scrollTop();
          };
          shouldLoadBottom = function() {
            return !eof && builder.bottomDataPos() < bottomVisiblePos() + bufferPadding();
          };
          clipBottom = function() {
            var bottomHeight, i, item, itemHeight, itemTop, j, newRow, overage, ref, rowTop;
            bottomHeight = 0;
            overage = 0;
            for (i = j = ref = buffer.length - 1; ref <= 0 ? j <= 0 : j >= 0; i = ref <= 0 ? ++j : --j) {
              item = buffer[i];
              itemTop = item.element.offset().top;
              newRow = rowTop !== itemTop;
              rowTop = itemTop;
              if (newRow) {
                itemHeight = item.element.outerHeight(true);
              }
              if (builder.bottomDataPos() - bottomHeight - itemHeight > bottomVisiblePos() + bufferPadding()) {
                if (newRow) {
                  bottomHeight += itemHeight;
                }
                overage++;
                eof = false;
              } else {
                if (newRow) {
                  break;
                }
                overage++;
              }
            }
            if (overage > 0) {
              builder.bottomPadding(builder.bottomPadding() + bottomHeight);
              removeFromBuffer(buffer.length - overage, buffer.length);
              return next -= overage;
            }
          };
          shouldLoadTop = function() {
            return !bof && (builder.topDataPos() > topVisiblePos() - bufferPadding());
          };
          clipTop = function() {
            var item, itemHeight, itemTop, j, len, newRow, overage, rowTop, topHeight;
            topHeight = 0;
            overage = 0;
            for (j = 0, len = buffer.length; j < len; j++) {
              item = buffer[j];
              itemTop = item.element.offset().top;
              newRow = rowTop !== itemTop;
              rowTop = itemTop;
              if (newRow) {
                itemHeight = item.element.outerHeight(true);
              }
              if (builder.topDataPos() + topHeight + itemHeight < topVisiblePos() - bufferPadding()) {
                if (newRow) {
                  topHeight += itemHeight;
                }
                overage++;
                bof = false;
              } else {
                if (newRow) {
                  break;
                }
                overage++;
              }
            }
            if (overage > 0) {
              builder.topPadding(builder.topPadding() + topHeight);
              removeFromBuffer(0, overage);
              return first += overage;
            }
          };
          enqueueFetch = function(rid, direction) {
            if (!adapter.isLoading) {
              loading(true);
            }
            if (pending.push(direction) === 1) {
              return fetch(rid);
            }
          };
          insertItem = function(operation, item) {
            var itemScope, wrapper;
            itemScope = $scope.$new();
            itemScope[itemName] = item;
            wrapper = {
              scope: itemScope
            };
            linker(itemScope, function(clone) {
              return wrapper.element = clone;
            });
            if (operation % 1 === 0) {
              wrapper.op = 'insert';
              return buffer.splice(operation, 0, wrapper);
            } else {
              wrapper.op = operation;
              switch (operation) {
                case 'append':
                  return buffer.push(wrapper);
                case 'prepend':
                  return buffer.unshift(wrapper);
              }
            }
          };
          adjustBuffer = function(rid, finalize) {
            var promises, toBePrepended, toBeRemoved;
            promises = [];
            toBePrepended = [];
            toBeRemoved = [];
            return $timeout(function() {
              var bottomPos, heightIncrement, i, item, itemHeight, itemTop, j, k, l, len, len1, len2, len3, len4, m, n, newRow, rowTop, topHeight, wrapper;
              bottomPos = builder.bottomDataPos();
              for (i = j = 0, len = buffer.length; j < len; i = ++j) {
                wrapper = buffer[i];
                switch (wrapper.op) {
                  case 'prepend':
                    toBePrepended.unshift(wrapper);
                    break;
                  case 'append':
                    if (i === 0) {
                      builder.insertElement(wrapper.element);
                    } else {
                      builder.insertElement(wrapper.element, buffer[i - 1].element);
                    }
                    wrapper.op = 'none';
                    break;
                  case 'insert':
                    if (i === 0) {
                      promises = promises.concat(builder.insertElementAnimated(wrapper.element));
                    } else {
                      promises = promises.concat(builder.insertElementAnimated(wrapper.element, buffer[i - 1].element));
                    }
                    wrapper.op = 'none';
                    break;
                  case 'remove':
                    toBeRemoved.push(wrapper);
                }
              }
              for (k = 0, len1 = toBeRemoved.length; k < len1; k++) {
                wrapper = toBeRemoved[k];
                promises = promises.concat(removeItem(wrapper));
              }
              builder.bottomPadding(Math.max(0, builder.bottomPadding() - (builder.bottomDataPos() - bottomPos)));
              if (toBePrepended.length) {
                bottomPos = builder.bottomDataPos();
                for (l = 0, len2 = toBePrepended.length; l < len2; l++) {
                  wrapper = toBePrepended[l];
                  builder.insertElement(wrapper.element);
                  wrapper.op = 'none';
                }
                heightIncrement = builder.bottomDataPos() - bottomPos;
                if (builder.topPadding() >= heightIncrement) {
                  builder.topPadding(builder.topPadding() - heightIncrement);
                } else {
                  viewport.scrollTop(viewport.scrollTop() + heightIncrement);
                }
              }
              for (i = m = 0, len3 = buffer.length; m < len3; i = ++m) {
                item = buffer[i];
                item.scope.$index = first + i;
              }
              if (shouldLoadBottom()) {
                enqueueFetch(rid, true);
              } else {
                if (shouldLoadTop()) {
                  enqueueFetch(rid, false);
                }
              }
              if (finalize) {
                finalize(rid);
              }
              if (pending.length === 0) {
                topHeight = 0;
                for (n = 0, len4 = buffer.length; n < len4; n++) {
                  item = buffer[n];
                  itemTop = item.element.offset().top;
                  newRow = rowTop !== itemTop;
                  rowTop = itemTop;
                  if (newRow) {
                    itemHeight = item.element.outerHeight(true);
                  }
                  if (newRow && (builder.topDataPos() + topHeight + itemHeight < topVisiblePos())) {
                    topHeight += itemHeight;
                  } else {
                    if (newRow) {
                      topVisible(item);
                    }
                    break;
                  }
                }
              }
              if (promises.length) {
                return $q.all(promises).then(function() {
                  return adjustBuffer(rid);
                });
              }
            });
          };
          finalize = function(rid) {
            return adjustBuffer(rid, function() {
              pending.shift();
              if (pending.length === 0) {
                return loading(false);
              } else {
                return fetch(rid);
              }
            });
          };
          fetch = function(rid) {
            var customBufferSize, q, rowTop;
            if (pending[0]) {
              if (buffer.length && !shouldLoadBottom()) {
                return finalize(rid);
              } else {
                return datasource.get(next, bufferSize, function(result) {
                  var item, j, len;
                  if ((rid && rid !== ridActual) || $scope.$$destroyed) {
                    return;
                  }
                  if (result.length < bufferSize) {
                    eof = true;
                    builder.bottomPadding(0);
                  }
                  if (result.length > 0) {
                    clipTop();
                    for (j = 0, len = result.length; j < len; j++) {
                      item = result[j];
                      ++next;
                      insertItem('append', item);
                    }
                  }
                  return finalize(rid);
                });
              }
            } else {
              if (buffer.length && !shouldLoadTop()) {
                return finalize(rid);
              } else {
                rowTop = buffer[0].element.offset().top;
                q = 0;
                while (q < buffer.length) {
                  if (rowTop !== buffer[q].element.offset().top) {
                    break;
                  }
                  q++;
                }
                customBufferSize = bufferSize % q !== 0 ? bufferSize + q - (bufferSize % q) : bufferSize;
                return datasource.get(first - customBufferSize, customBufferSize, function(result) {
                  var i, j, ref;
                  if ((rid && rid !== ridActual) || $scope.$$destroyed) {
                    return;
                  }
                  if (result.length < bufferSize) {
                    bof = true;
                    builder.topPadding(0);
                  }
                  if (result.length > 0) {
                    if (buffer.length) {
                      clipBottom();
                    }
                    for (i = j = ref = result.length - 1; ref <= 0 ? j <= 0 : j >= 0; i = ref <= 0 ? ++j : --j) {
                      --first;
                      insertItem('prepend', result[i]);
                    }
                  }
                  return finalize(rid);
                });
              }
            }
          };
          resizeAndScrollHandler = function() {
            if (!$rootScope.$$phase && !adapter.isLoading) {
              adjustBuffer();
              return $scope.$apply();
            }
          };
          wheelHandler = function(event) {
            var scrollTop, yMax;
            scrollTop = viewport[0].scrollTop;
            yMax = viewport[0].scrollHeight - viewport[0].clientHeight;
            if ((scrollTop === 0 && !bof) || (scrollTop === yMax && !eof)) {
              return event.preventDefault();
            }
          };
          viewport.bind('resize', resizeAndScrollHandler);
          viewport.bind('scroll', resizeAndScrollHandler);
          viewport.bind('mousewheel', wheelHandler);
          $scope.$watch(datasource.revision, reload);
          $scope.$on('$destroy', function() {
            var item, j, len;
            for (j = 0, len = buffer.length; j < len; j++) {
              item = buffer[j];
              item.scope.$destroy();
              item.element.remove();
            }
            viewport.unbind('resize', resizeAndScrollHandler);
            viewport.unbind('scroll', resizeAndScrollHandler);
            return viewport.unbind('mousewheel', wheelHandler);
          });
          adapter = {};
          adapter.isLoading = false;
          adapter.reload = reload;
          applyUpdate = function(wrapper, newItems) {
            var i, j, keepIt, len, newItem, pos, ref;
            if (angular.isArray(newItems)) {
              pos = (buffer.indexOf(wrapper)) + 1;
              ref = newItems.reverse();
              for (i = j = 0, len = ref.length; j < len; i = ++j) {
                newItem = ref[i];
                if (newItem === wrapper.scope[itemName]) {
                  keepIt = true;
                  pos--;
                } else {
                  insertItem(pos, newItem);
                }
              }
              if (!keepIt) {
                return wrapper.op = 'remove';
              }
            }
          };
          adapter.applyUpdates = function(arg1, arg2) {
            var bufferClone, i, j, len, ref, wrapper;
            dismissPendingRequests();
            if (angular.isFunction(arg1)) {
              bufferClone = buffer.slice(0);
              for (i = j = 0, len = bufferClone.length; j < len; i = ++j) {
                wrapper = bufferClone[i];
                applyUpdate(wrapper, arg1(wrapper.scope[itemName], wrapper.scope, wrapper.element));
              }
            } else {
              if (arg1 % 1 === 0) {
                if ((0 <= (ref = arg1 - first) && ref < buffer.length)) {
                  applyUpdate(buffer[arg1 - first], arg2);
                }
              } else {
                throw new Error('applyUpdates - ' + arg1 + ' is not a valid index');
              }
            }
            return adjustBuffer(ridActual);
          };
          adapter.append = function(newItems) {
            var item, j, len;
            dismissPendingRequests();
            for (j = 0, len = newItems.length; j < len; j++) {
              item = newItems[j];
              ++next;
              insertItem('append', item);
            }
            return adjustBuffer(ridActual);
          };
          adapter.prepend = function(newItems) {
            var item, j, len, ref;
            dismissPendingRequests();
            ref = newItems.reverse();
            for (j = 0, len = ref.length; j < len; j++) {
              item = ref[j];
              --first;
              insertItem('prepend', item);
            }
            return adjustBuffer(ridActual);
          };
          if ($attr.adapter) {
            adapterOnScope = $parse($attr.adapter)($scope);
            if (!adapterOnScope) {
              $parse($attr.adapter).assign($scope, {});
              adapterOnScope = $parse($attr.adapter)($scope);
            }
            angular.extend(adapterOnScope, adapter);
            adapter = adapterOnScope;
          }
          unsupportedMethod = function(token) {
            throw new Error(token + ' event is no longer supported - use applyUpdates instead');
          };
          eventListener = datasource.scope ? datasource.scope.$new() : $scope.$new();
          eventListener.$on('insert.item', function() {
            return unsupportedMethod('insert');
          });
          eventListener.$on('update.items', function() {
            return unsupportedMethod('update');
          });
          return eventListener.$on('delete.items', function() {
            return unsupportedMethod('delete');
          });
        };
      }
    };
  }
]);

/*
//# sourceURL=src/ui-scroll.js
 */
}());


text:
<title>Berkeley DB Reference Guide: Release 4.2: Queue access method</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">

Berkeley DB Reference Guide:
Upgrading Berkeley DB Applications

Release 4.2: Queue access method

We have discovered a problem where applications that specify Berkeley DB's
encryption or data checksum features on Queue databases with extent
files, the database data will not be protected.  This is obviously a
security problem, and we encourage you to upgrade these applications to
the 4.2 release as soon as possible.

The Queue databases must be dumped and reloaded in order to fix this
problem.  First build the Berkeley DB 4.2 release, then use your previous
release to dump the database, and the 4.2 release to reload the
database.  For example:

db-4.1.25/db_dump -P password -k database | db-4.2.xx/db_load -P password new_database

Note this is only necessary for Queue access method databases,
where extent files were configured along with either encryption or
checksums.

Copyright (c) 1996,2008 Oracle.  All rights reserved.

redpajama_set_name: RedPajamaGithub


text:
@interface SettingTextCell : UITableViewCell
@property (strong, nonatomic) UITextField *textField;

@property (strong, nonatomic) NSString *textValue;
@property (copy, nonatomic) void(^textChangeBlock)(NSString *textValue);

- (void)setTextValue:(NSString *)textValue andTextChangeBlock:(void(^)(NSString *textValue))block;

@end


text:
package gov.nih.nci.caadapter.ui.specification.hsm.actions;

import gov.nih.nci.caadapter.ui.common.ActionConstants;
import gov.nih.nci.caadapter.ui.common.actions.DefaultContextCloseAction;
import gov.nih.nci.caadapter.ui.common.context.ContextManager;
import gov.nih.nci.caadapter.ui.specification.hsm.HSMPanel;

import javax.swing.*;
import java.awt.event.ActionEvent;

/**
 * This class defines the close action of HSM panel.
 *
 * @author OWNER: Scott Jiang
 * @author LAST UPDATE $Author: phadkes $
 * @version Since caAdapter v1.2
 *          revision    $Revision: 1.2 $
 *          date        $Date: 2008-06-09 19:54:07 $
 */
public class CloseHSMAction extends DefaultContextCloseAction
{
	/**
	 * Logging constant used to identify source of log entry, that could be later used to create
	 * logging mechanism to uniquely identify the logged class.
	 */
	private static final String LOGID = "$RCSfile: CloseHSMAction.java,v $";

	/**
	 * String that identifies the class version and solves the serial version UID problem.
	 * This String is for informational purposes only and MUST not be made final.
	 *
	 * @see JBuilder vice javac serial version UID
	 */
	public static String RCSID = "$Header: /share/content/gforge/caadapter/caadapter/components/userInterface/src/gov/nih/nci/caadapter/ui/specification/hsm/actions/CloseHSMAction.java,v 1.2 2008-06-09 19:54:07 phadkes Exp $";

//	private transient HSMPanel hsmPanel;

	public CloseHSMAction(HSMPanel hsmPanel)
	{
		this(COMMAND_NAME, hsmPanel);
	}

	public CloseHSMAction(String name, HSMPanel hsmPanel)
	{
		this(name, null, hsmPanel);
	}

	public CloseHSMAction(String name, Icon icon, HSMPanel hsmPanel)
	{
		super(name, icon, hsmPanel);
//		this.hsmPanel = hsmPanel;
//		JRootPane rootPane = hsmPanel.getRootPane();
//		if (rootPane != null)
//		{
//			this.mainFrame = (MainFrame) rootPane.getParent();
//		}
	}

	protected boolean postActionPerformed(ActionEvent e)
	{
		if (mainFrame != null)
		{
			//todo: should use some better way to call contextmanager
			ContextManager cm = ContextManager.getContextManager();
			cm.enableAction(ActionConstants.OPEN_HSM_FILE, true);
			cm.enableAction(ActionConstants.NEW_HSM_FILE, true);
		}
		return true;
	}

}

/**
 * HISTORY      : $Log: not supported by cvs2svn $
 * HISTORY      : Revision 1.1  2007/04/03 16:18:15  wangeug
 * HISTORY      : initial loading
 * HISTORY      :
 * HISTORY      : Revision 1.9  2006/08/02 18:44:22  jiangsc
 * HISTORY      : License Update
 * HISTORY      :
 * HISTORY      : Revision 1.8  2006/01/03 19:16:52  jiangsc
 * HISTORY      : License Update
 * HISTORY      :
 * HISTORY      : Revision 1.7  2006/01/03 18:56:24  jiangsc
 * HISTORY      : License Update
 * HISTORY      :
 * HISTORY      : Revision 1.6  2005/12/29 23:06:13  jiangsc
 * HISTORY      : Changed to latest project name.
 * HISTORY      :
 * HISTORY      : Revision 1.5  2005/12/29 15:39:06  chene
 * HISTORY      : Optimize imports
 * HISTORY      :
 * HISTORY      : Revision 1.4  2005/12/14 21:37:17  jiangsc
 * HISTORY      : Updated license information
 * HISTORY      :
 * HISTORY      : Revision 1.3  2005/11/29 16:23:55  jiangsc
 * HISTORY      : Updated License
 * HISTORY      :
 * HISTORY      : Revision 1.2  2005/10/19 18:51:24  jiangsc
 * HISTORY      : Re-engineered Action calling sequence.
 * HISTORY      :
 * HISTORY      : Revision 1.1  2005/07/27 22:41:11  jiangsc
 * HISTORY      : Consolidated context sensitive menu implementation.
 * HISTORY      :
 */


text:
package com.banjocreek.riverbed.builder.json.mutable;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.function.Function;
import java.util.stream.Collectors;

import javax.json.JsonArray;
import javax.json.JsonValue;

import com.banjocreek.riverbed.builder.json.kernel.JsonOp;
import com.banjocreek.riverbed.builder.list.AbstractMutableListBuilder;

final class MutableJsonArrayBuilder<P> extends
        AbstractMutableListBuilder<JsonOp, P> implements JAry<P> {

    protected MutableJsonArrayBuilder(final Function<JsonArray, P> constructor) {
        super(l -> constructor.apply(JsonOp.buildArray(l)));
    }

    @Override
    public JAry<P> add(final BigDecimal value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final BigInteger value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final boolean value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final double value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final int value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final JsonValue value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final long value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> add(final String value) {
        doAdd(JsonOp.of(value));
        return this;
    }

    @Override
    public JAry<P> addNull() {
        doAdd(JsonOp.ofNull());
        return this;
    }

    @Override
    public JAry<JAry<P>> array() {
        return new MutableJsonArrayBuilder<>(this::add);
    }

    @Override
    public JAry<P> clear() {
        doClear();
        return this;
    }

    @Override
    public JAry<P> concat(final JsonArray jary) {
        doAddAll(jary.stream().map(JsonOp::of).collect(Collectors.toList()));
        return this;
    }

    @Override
    public JObj<JAry<P>> object() {
        return new MutableJsonObjectBuilder<>(this::add);
    }

}


text:
package edu.cmu.hcii.citrus.views;

import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

import edu.cmu.hcii.citrus.*;

// Paint can paint, given a AWT graphics context, and can return the boundaries in which it paints.
// It's also required to manually register a property listener as listener to all of its properties.
public abstract class Paint extends Expression<Paint> {

	public static final Dec<Real> alpha = new Dec<Real>(new Real(1.0));
	static {
		alpha.is(new PropertyRestriction("(alpha >= 0.0)", "0.0"));
		alpha.is(new PropertyRestriction("(alpha <= 1.0)", "1.0"));
	}

	public static final Dec<Real> left = new Dec<Real>(new Real(0.0));
	public static final Dec<Real> right = new Dec<Real>(new Real(0.0));
	public static final Dec<Real> top = new Dec<Real>(new Real(0.0));
	public static final Dec<Real> bottom = new Dec<Real>(new Real(0.0));

	public static final Dec<Color> primaryColor = new Dec<Color>(Color.black);
	public static final Dec<Color> secondaryColor = new Dec<Color>((Element)null);

	public Paint() { this(null, null); }
	public Paint(ArgumentList arguments) { this(null, arguments); }
	public Paint(Color newColor, Color newSecondColor,
			double newAlpha,
			double leftOffset, double topOffset,
			double rightOffset, double bottomOffset) {

		this(null, null);
		set(primaryColor, newColor);
		set(secondaryColor, newSecondColor);
		set(alpha, new Real(newAlpha));
		set(left, new Real(leftOffset));
		set(right, new Real(rightOffset));
		set(top, new Real(topOffset));
		set(bottom, new Real(bottomOffset));

	}
	public Paint(Namespace type, ArgumentList arguments) { super(type, arguments);

			for(DecInterface dec : getType().getDeclarationsToInstantiate())
			getPropertyByDeclaration(dec).addListener(notifyApp);

	}

	protected static Listener notifyApp = new ListenerAdapter() {
		public void outOfDate(Property p, Transition t, Element oldValue) { App.propertyIsOutOfDate(p); }
		public void changed(Property p, Transition t, Element oldValue, Element newValue) {
			App.propertyChanged(p); }
	};

	public double getVisible(Dec<Real> declaration) {

		return getPropertyByDeclaration(declaration).getVisible().value;

	}

	public Paint evaluate(Element<?> el) { return this; }

	public abstract void paint(Graphics2D g, View v, double l, double t, double r, double b);

	/////////////////////////////////////////////////////////////////////
	//
	// Answers the question, "If you were to paint this Tile, where
	// would you paint it?" This is largely used for reporting damage.
	// Should be returned in terms of the tile's local coordinate system.
	//
	/////////////////////////////////////////////////////////////////////
	public abstract Rectangle2D getPaintBounds(double l, double t, double r, double b);

	// Should sum all of the relevant properties, defining something like a hash code to define
	// the unique appearance of the paint.
	public int hashCode(View v, double l, double t, double r, double b) {

		int code = 1;
		code = code * 31 + get(primaryColor).hashCode();
		code = code * 31 + (new Double(getVisible(alpha))).hashCode();
		code = code * 31 + (new Double(getVisible(left))).hashCode();
		code = code * 31 + (new Double(getVisible(right))).hashCode();
		code = code * 31 + (new Double(getVisible(top))).hashCode();
		code = code * 31 + (new Double(getVisible(bottom))).hashCode();
		return code;

	}

}


text:
import _extends from "@babel/runtime/helpers/esm/extends";
import * as React from 'react';
import SvgIcon from '../SvgIcon';
/**
 * Private module reserved for @material-ui packages.
 */

import { jsx as _jsx } from "react/jsx-runtime";
export default function createSvgIcon(path, displayName) {
  const Component = (props, ref) => /*#__PURE__*/_jsx(SvgIcon, _extends({
    "data-testid": `${displayName}Icon`,
    ref: ref
  }, props, {
    children: path
  }));

  if (process.env.NODE_ENV !== 'production') {
    // Need to set `displayName` on the inner component for React.memo.
    // React prior to 16.14 ignores `displayName` on the wrapper.
    Component.displayName = `${displayName}Icon`;
  }

  Component.muiName = SvgIcon.muiName;
  return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));
}


text:
package uk.ac.cam.caret.sakai.rwiki.tool.bean;

import uk.ac.cam.caret.sakai.rwiki.service.api.RWikiObjectService;
import uk.ac.cam.caret.sakai.rwiki.service.api.model.RWikiObject;

/**
 * A Bean that has various helper methods to check whether certain things can be
 * done to a RWikiObject
 *
 * @author andrew
 */

public class PermissionsBean
{

	/**
	 * currently set rwikiObject
	 */
	private RWikiObject rwikiObject;

	/**
	 * ObjectService to perform permissions checks with
	 *
	 * @see RWikiObjectService
	 */
	private RWikiObjectService objectService;

	public PermissionsBean()
	{

	}

	/**
	 * Creates a fully set-up PermissionsBean
	 *
	 * @param rwikiObject
	 * @param currentUser
	 * @param objectService
	 */
	public PermissionsBean(RWikiObject rwikiObject,
			RWikiObjectService objectService)
	{
		this.rwikiObject = rwikiObject;
		this.objectService = objectService;
	}

	/**
	 * The currently set RWikiObjectService
	 *
	 * @return objectService
	 */
	public RWikiObjectService getObjectService()
	{
		return objectService;
	}

	/**
	 * Sets the current RWikiObjectService
	 *
	 * @param objectService
	 */
	public void setObjectService(RWikiObjectService objectService)
	{
		this.objectService = objectService;
	}

	/**
	 * The current RWikiObject.
	 *
	 * @return rwikiObject.
	 */
	public RWikiObject getRwikiObject()
	{
		return rwikiObject;
	}

	/**
	 * Sets the current RWikiObject.
	 *
	 * @param rwikiObject.
	 */
	public void setRwikiObject(RWikiObject rwikiObject)
	{
		this.rwikiObject = rwikiObject;
	}

	/**
	 * Using the current objectService checks whether admin functions can be
	 * performed on the current RWikiObject by the currentUser.
	 *
	 * @return true if the currentUser has admin rights on this rwikiObject.
	 */
	public boolean isAdminAllowed()
	{
		return objectService.checkAdmin(rwikiObject);
	}

	/**
	 * Using the current objectService checks whether update can be performed on
	 * the current RWikiObject by the currentUser.
	 *
	 * @return true if the currentUser has update rights on this rwikiObject
	 */
	public boolean isUpdateAllowed()
	{
		return objectService.checkUpdate(rwikiObject);
	}

	/**
	 * Using the current objectService checks whether the current RWikiObject
	 * can be read by the currentUser.
	 *
	 * @return true if the currentUser has read rights on this rwikiObject.
	 */
	public boolean isReadAllowed()
	{
		return objectService.checkRead(rwikiObject);
	}
}


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

package com.google.iam.admin.v1;

/**
 *
 *
 *

 * The response containing the roles defined under a resource.
 *

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

  private ListRolesResponse() {
    roles_ = java.util.Collections.emptyList();
    nextPageToken_ = "";
  }

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

  @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.iam.admin.v1.Iam
        .internal_static_google_iam_admin_v1_ListRolesResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.iam.admin.v1.Iam
        .internal_static_google_iam_admin_v1_ListRolesResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.iam.admin.v1.ListRolesResponse.class,
            com.google.iam.admin.v1.ListRolesResponse.Builder.class);
  }

  public static final int ROLES_FIELD_NUMBER = 1;
  private java.util.List<com.google.iam.admin.v1.Role> roles_;
  /**
   *
   *
   *

   * The Roles defined on this resource.
   *

   *
   * repeated .google.iam.admin.v1.Role roles = 1;
   */
  @java.lang.Override
  public java.util.List<com.google.iam.admin.v1.Role> getRolesList() {
    return roles_;
  }
  /**
   *
   *
   *

   * The Roles defined on this resource.
   *

   *
   * repeated .google.iam.admin.v1.Role roles = 1;
   */
  @java.lang.Override
  public java.util.List<? extends com.google.iam.admin.v1.RoleOrBuilder> getRolesOrBuilderList() {
    return roles_;
  }
  /**
   *
   *
   *

   * The Roles defined on this resource.
   *

   *
   * repeated .google.iam.admin.v1.Role roles = 1;
   */
  @java.lang.Override
  public int getRolesCount() {
    return roles_.size();
  }
  /**
   *
   *
   *

   * The Roles defined on this resource.
   *

   *
   * repeated .google.iam.admin.v1.Role roles = 1;
   */
  @java.lang.Override
  public com.google.iam.admin.v1.Role getRoles(int index) {
    return roles_.get(index);
  }
  /**
   *
   *
   *

   * The Roles defined on this resource.
   *

   *
   * repeated .google.iam.admin.v1.Role roles = 1;
   */
  @java.lang.Override
  public com.google.iam.admin.v1.RoleOrBuilder getRolesOrBuilder(int index) {
    return roles_.get(index);
  }

  public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
  private volatile java.lang.Object nextPageToken_;
  /**
   *
   *
   *

   * To retrieve the next page of results, set
   * `ListRolesRequest.page_token` to this value.
   *

   *
   * string next_page_token = 2;
   *
   * @return The nextPageToken.
   */
  @java.lang.Override
  public java.lang.String getNextPageToken() {
    java.lang.Object ref = nextPageToken_;
    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();
      nextPageToken_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   * To retrieve the next page of results, set
   * `ListRolesRequest.page_token` to this value.
   *

   *
   * string next_page_token = 2;
   *
   * @return The bytes for nextPageToken.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getNextPageTokenBytes() {
    java.lang.Object ref = nextPageToken_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      nextPageToken_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 {
    for (int i = 0; i < roles_.size(); i++) {
      output.writeMessage(1, roles_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < roles_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, roles_.get(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
    }
    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.iam.admin.v1.ListRolesResponse)) {
      return super.equals(obj);
    }
    com.google.iam.admin.v1.ListRolesResponse other =
        (com.google.iam.admin.v1.ListRolesResponse) obj;

    if (!getRolesList().equals(other.getRolesList())) return false;
    if (!getNextPageToken().equals(other.getNextPageToken())) return false;
    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();
    if (getRolesCount() > 0) {
      hash = (37 * hash) + ROLES_FIELD_NUMBER;
      hash = (53 * hash) + getRolesList().hashCode();
    }
    hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getNextPageToken().hashCode();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

  public static com.google.iam.admin.v1.ListRolesResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.iam.admin.v1.ListRolesResponse 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.iam.admin.v1.ListRolesResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

  public static com.google.iam.admin.v1.ListRolesResponse 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.iam.admin.v1.ListRolesResponse parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.iam.admin.v1.ListRolesResponse 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.iam.admin.v1.ListRolesResponse parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.iam.admin.v1.ListRolesResponse 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.iam.admin.v1.ListRolesResponse 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 response containing the roles defined under a resource.
   *

   *
   * Protobuf type {@code google.iam.admin.v1.ListRolesResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.iam.admin.v1.ListRolesResponse)
      com.google.iam.admin.v1.ListRolesResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.iam.admin.v1.Iam
          .internal_static_google_iam_admin_v1_ListRolesResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.iam.admin.v1.Iam
          .internal_static_google_iam_admin_v1_ListRolesResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.iam.admin.v1.ListRolesResponse.class,
              com.google.iam.admin.v1.ListRolesResponse.Builder.class);
    }

    // Construct using com.google.iam.admin.v1.ListRolesResponse.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (rolesBuilder_ == null) {
        roles_ = java.util.Collections.emptyList();
      } else {
        roles_ = null;
        rolesBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      nextPageToken_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.iam.admin.v1.Iam
          .internal_static_google_iam_admin_v1_ListRolesResponse_descriptor;
    }

    @java.lang.Override
    public com.google.iam.admin.v1.ListRolesResponse getDefaultInstanceForType() {
      return com.google.iam.admin.v1.ListRolesResponse.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.iam.admin.v1.ListRolesResponse buildPartial() {
      com.google.iam.admin.v1.ListRolesResponse result =
          new com.google.iam.admin.v1.ListRolesResponse(this);
      int from_bitField0_ = bitField0_;
      if (rolesBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          roles_ = java.util.Collections.unmodifiableList(roles_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.roles_ = roles_;
      } else {
        result.roles_ = rolesBuilder_.build();
      }
      result.nextPageToken_ = nextPageToken_;
      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.iam.admin.v1.ListRolesResponse) {
        return mergeFrom((com.google.iam.admin.v1.ListRolesResponse) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.iam.admin.v1.ListRolesResponse other) {
      if (other == com.google.iam.admin.v1.ListRolesResponse.getDefaultInstance()) return this;
      if (rolesBuilder_ == null) {
        if (!other.roles_.isEmpty()) {
          if (roles_.isEmpty()) {
            roles_ = other.roles_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureRolesIsMutable();
            roles_.addAll(other.roles_);
          }
          onChanged();
        }
      } else {
        if (!other.roles_.isEmpty()) {
          if (rolesBuilder_.isEmpty()) {
            rolesBuilder_.dispose();
            rolesBuilder_ = null;
            roles_ = other.roles_;
            bitField0_ = (bitField0_ & ~0x00000001);
            rolesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getRolesFieldBuilder()
                    : null;
          } else {
            rolesBuilder_.addAllMessages(other.roles_);
          }
        }
      }
      if (!other.getNextPageToken().isEmpty()) {
        nextPageToken_ = other.nextPageToken_;
        onChanged();
      }
      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:
              {
                com.google.iam.admin.v1.Role m =
                    input.readMessage(com.google.iam.admin.v1.Role.parser(), extensionRegistry);
                if (rolesBuilder_ == null) {
                  ensureRolesIsMutable();
                  roles_.add(m);
                } else {
                  rolesBuilder_.addMessage(m);
                }
                break;
              } // case 10
            case 18:
              {
                nextPageToken_ = input.readStringRequireUtf8();

                break;
              } // case 18
            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 bitField0_;

    private java.util.List<com.google.iam.admin.v1.Role> roles_ = java.util.Collections.emptyList();

    private void ensureRolesIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        roles_ = new java.util.ArrayList<com.google.iam.admin.v1.Role>(roles_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.iam.admin.v1.Role,
            com.google.iam.admin.v1.Role.Builder,
            com.google.iam.admin.v1.RoleOrBuilder>
        rolesBuilder_;

    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public java.util.List<com.google.iam.admin.v1.Role> getRolesList() {
      if (rolesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(roles_);
      } else {
        return rolesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public int getRolesCount() {
      if (rolesBuilder_ == null) {
        return roles_.size();
      } else {
        return rolesBuilder_.getCount();
      }
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public com.google.iam.admin.v1.Role getRoles(int index) {
      if (rolesBuilder_ == null) {
        return roles_.get(index);
      } else {
        return rolesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder setRoles(int index, com.google.iam.admin.v1.Role value) {
      if (rolesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRolesIsMutable();
        roles_.set(index, value);
        onChanged();
      } else {
        rolesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder setRoles(int index, com.google.iam.admin.v1.Role.Builder builderForValue) {
      if (rolesBuilder_ == null) {
        ensureRolesIsMutable();
        roles_.set(index, builderForValue.build());
        onChanged();
      } else {
        rolesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder addRoles(com.google.iam.admin.v1.Role value) {
      if (rolesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRolesIsMutable();
        roles_.add(value);
        onChanged();
      } else {
        rolesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder addRoles(int index, com.google.iam.admin.v1.Role value) {
      if (rolesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRolesIsMutable();
        roles_.add(index, value);
        onChanged();
      } else {
        rolesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder addRoles(com.google.iam.admin.v1.Role.Builder builderForValue) {
      if (rolesBuilder_ == null) {
        ensureRolesIsMutable();
        roles_.add(builderForValue.build());
        onChanged();
      } else {
        rolesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder addRoles(int index, com.google.iam.admin.v1.Role.Builder builderForValue) {
      if (rolesBuilder_ == null) {
        ensureRolesIsMutable();
        roles_.add(index, builderForValue.build());
        onChanged();
      } else {
        rolesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder addAllRoles(java.lang.Iterable<? extends com.google.iam.admin.v1.Role> values) {
      if (rolesBuilder_ == null) {
        ensureRolesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, roles_);
        onChanged();
      } else {
        rolesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder clearRoles() {
      if (rolesBuilder_ == null) {
        roles_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        rolesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public Builder removeRoles(int index) {
      if (rolesBuilder_ == null) {
        ensureRolesIsMutable();
        roles_.remove(index);
        onChanged();
      } else {
        rolesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public com.google.iam.admin.v1.Role.Builder getRolesBuilder(int index) {
      return getRolesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public com.google.iam.admin.v1.RoleOrBuilder getRolesOrBuilder(int index) {
      if (rolesBuilder_ == null) {
        return roles_.get(index);
      } else {
        return rolesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public java.util.List<? extends com.google.iam.admin.v1.RoleOrBuilder> getRolesOrBuilderList() {
      if (rolesBuilder_ != null) {
        return rolesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(roles_);
      }
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public com.google.iam.admin.v1.Role.Builder addRolesBuilder() {
      return getRolesFieldBuilder().addBuilder(com.google.iam.admin.v1.Role.getDefaultInstance());
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public com.google.iam.admin.v1.Role.Builder addRolesBuilder(int index) {
      return getRolesFieldBuilder()
          .addBuilder(index, com.google.iam.admin.v1.Role.getDefaultInstance());
    }
    /**
     *
     *
     *

     * The Roles defined on this resource.
     *

     *
     * repeated .google.iam.admin.v1.Role roles = 1;
     */
    public java.util.List<com.google.iam.admin.v1.Role.Builder> getRolesBuilderList() {
      return getRolesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.iam.admin.v1.Role,
            com.google.iam.admin.v1.Role.Builder,
            com.google.iam.admin.v1.RoleOrBuilder>
        getRolesFieldBuilder() {
      if (rolesBuilder_ == null) {
        rolesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.iam.admin.v1.Role,
                com.google.iam.admin.v1.Role.Builder,
                com.google.iam.admin.v1.RoleOrBuilder>(
                roles_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
        roles_ = null;
      }
      return rolesBuilder_;
    }

    private java.lang.Object nextPageToken_ = "";
    /**
     *
     *
     *

     * To retrieve the next page of results, set
     * `ListRolesRequest.page_token` to this value.
     *

     *
     * string next_page_token = 2;
     *
     * @return The nextPageToken.
     */
    public java.lang.String getNextPageToken() {
      java.lang.Object ref = nextPageToken_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        nextPageToken_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * To retrieve the next page of results, set
     * `ListRolesRequest.page_token` to this value.
     *

     *
     * string next_page_token = 2;
     *
     * @return The bytes for nextPageToken.
     */
    public com.google.protobuf.ByteString getNextPageTokenBytes() {
      java.lang.Object ref = nextPageToken_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        nextPageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * To retrieve the next page of results, set
     * `ListRolesRequest.page_token` to this value.
     *

     *
     * string next_page_token = 2;
     *
     * @param value The nextPageToken to set.
     * @return This builder for chaining.
     */
    public Builder setNextPageToken(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

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

     * To retrieve the next page of results, set
     * `ListRolesRequest.page_token` to this value.
     *

     *
     * string next_page_token = 2;
     *
     * @return This builder for chaining.
     */
    public Builder clearNextPageToken() {

      nextPageToken_ = getDefaultInstance().getNextPageToken();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * To retrieve the next page of results, set
     * `ListRolesRequest.page_token` to this value.
     *

     *
     * string next_page_token = 2;
     *
     * @param value The bytes for nextPageToken to set.
     * @return This builder for chaining.
     */
    public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      nextPageToken_ = value;
      onChanged();
      return this;
    }

    @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.iam.admin.v1.ListRolesResponse)
  }

  // @@protoc_insertion_point(class_scope:google.iam.admin.v1.ListRolesResponse)
  private static final com.google.iam.admin.v1.ListRolesResponse DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.iam.admin.v1.ListRolesResponse();
  }

  public static com.google.iam.admin.v1.ListRolesResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ListRolesResponse> PARSER =
      new com.google.protobuf.AbstractParser<ListRolesResponse>() {
        @java.lang.Override
        public ListRolesResponse 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<ListRolesResponse> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.iam.admin.v1.ListRolesResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
LOCAL_PATH=config
SERVICE_NAME=meta
XPIPE_CONF=xpipe

XPIPE_ROOT_DIR=/xpipe-meta
LOG_DIR=/opt/logs/100004375

#functions
function changeDataCenter(){
    newDc=$1
    sed -i  "s/\(datacenter=\)jq/\1$newDc/g" $LOCAL_PATH/$XPIPE_CONF.properties
    sed -i  "s/\(metaserver-local-\)jq/\1$newDc/g" $LOCAL_PATH/$XPIPE_CONF.properties
}

function makedir(){
    if [ ! -d $1 ]; then
        echo "log dir not exist, create it"
        mkdir -p $1
    fi
}

makedir $LOG_DIR

cd $XPIPE_ROOT_DIR

if [ $CONSOLE_ADDRESS ];then
    sed -i "s#http://consolejq:8080#$CONSOLE_ADDRESS#g" $LOCAL_PATH/$XPIPE_CONF.properties
fi

if [ $DATACENTER ];then
    changeDataCenter $DATACENTER
fi

if [ $METASERVER_ID ];then
    sed -i  "s/\(metaserver.id=\)1/\1$METASERVER_ID/g" $LOCAL_PATH/$XPIPE_CONF.properties
fi

if [ $ZKADDRESS ];then
    sed -i  "s#zoo1:2181#$ZKADDRESS#g" $LOCAL_PATH/$XPIPE_CONF.properties
fi

chmod a+x $SERVICE_NAME".jar"
./$SERVICE_NAME.jar start


text:
ExchangeFormWin = Ext.extend(Ext.Window,{
	width:300,height:150,closeAction:'hide',
	title:langUtils.sys('ExchangeRateManage.commons.addNewOne'),
	parent:null,form:null,
	loadRecord:function(rec){
		this.recordModify = rec.data;
		rec.data['eff_date'] = Date.parseDate(rec.data.eff_date.substring(0,10),'Y-m-d');
		this.form.getForm().setValues(rec.data);
	},
	resetForm:function(){
		this.recordModify = null;
		this.form.getForm().reset();
	},
	constructor:function(p){
		this.parent = p;
		this.form = new Ext.FormPanel({
			bodyStyle: 'padding-top:10px',
			border: false,
			baseCls: 'x-plain',
			resizable: false,
			items:[
			       {xtype:'hidden',name:'exchange_id'},
			       {xtype:'datefield',name:'eff_date',
			    	   minValue:Date.parseDate(new Date().format('Y-m-d'),'Y-m-d'),
			    	   format: 'Y-m-d',
			    	   fieldLabel:langUtils.sys('ExchangeRateManage.commons.effective_time'),allowBlank:false,editable:false},
			       {xtype:'numberfield',allowDecimals:false,allowNegative: false,name:'exchange',minValue:1,fieldLabel:langUtils.sys('ExchangeRateManage.commons.exchange_rate'),allowBlank:false}
			]
		});
		ExchangeFormWin.superclass.constructor.call(this,{
			items:this.form,
			buttonAlign:'center',
			buttons:[
				{text:langUtils.sys('ExchangeRateManage.commons.saveBtn'),scope:this,handler:this.doSave},
				{text:langUtils.sys('ExchangeRateManage.commons.cancelBtn'),scope:this,handler:this.doCancel}
			]
		});
	},
	doSave:function(){
		var values = this.form.getForm().getValues();
		this.recordModify = this.recordModify || {};
		var params = {
				exchangeId: this.recordModify.exchange_id,
				oldExchange:this.recordModify.exchange,
				effDate:this.recordModify.eff_date,
				newExchange:values.exchange,
				newEffDate:Date.parseDate(values.eff_date, 'Y-m-d').format('Y-m-d')
		};
		Ext.Ajax.request({
				params: params,scope:this,
				url:root+'/config/Exchange!saveOrUpdate.action',
				success: function( res, ops){
//					var data = Ext.decode(res.responseText );
					Alert(langUtils.sys('ExchangeRateManage.msg.successMsg'),function(){
						this.parent.reloadGrid();
						this.doCancel();
					},this);
				}
			});
	},
	doCancel:function(){
		this.form.getForm().reset();
		this.hide();
	}
})

//参照 系统变更功能
ExchangeRateManageGrid = Ext.extend(Ext.grid.GridPanel,{
	reloadGrid:function(){
		this.exchangeStore.reload();
	},
	exchangeStore : null,
	constructor: function(){
		this.exchangeStore = new Ext.data.JsonStore({
			autoLoad : true,
			url:root+'/config/Exchange!query.action',
			fields : ['exchange_id', 'eff_date', 'status', 'status_text','exchange','optr_id','optr_name', 'create_time'],
			totalProperty:'totalProperty',
			root:'records',
			listeners:{
				scope:this,
				beforeload:function(){
					var param = this.getQueryParam(true);
					Ext.apply(this.exchangeStore.baseParams,param);
					Ext.applyIf(this.exchangeStore.baseParams,{start: 0,limit: 20});
					return true;
				}
			}
		});
		var cm =[
		     new Ext.grid.RowNumberer(),
		     {header:langUtils.sys('ExchangeRateManage.commons.exchange_id'),width:80,dataIndex:'exchange_id'},
			{header:langUtils.sys('ExchangeRateManage.commons.effective_time'),width:160,dataIndex:'eff_date',renderer:function(v){
				if(null == v ) return '';
				return Date.parseDate(v,'Y-m-d H:i:s').format('Y-m-d');
			}},
			{header:langUtils.sys('ExchangeRateManage.commons.status'),width:160,dataIndex:'status_text', renderer:Ext.util.Format.statusShow},
			{header:langUtils.sys('ExchangeRateManage.commons.exchange_rate'),width:160,dataIndex:'exchange'},
			{header:langUtils.sys('ExchangeRateManage.commons.optr'),width:160,dataIndex:'optr_name'},
			{header:langUtils.sys('ExchangeRateManage.commons.create_time'),width:160,dataIndex:'create_time'}
		];

		this.effDateCmp = new Ext.form.DateField({format:'Y-m-d'});
		this.exchangeCmp = new Ext.form.NumberField({
			allowDecimals:false,allowNegative: false
		});

		this.statusCmp = new Ext.form.ComboBox({
				store:new Ext.data.JsonStore({
					fields:['key','value'],
					data:[
					{key:'',value:langUtils.sys('ExchangeRateManage.status.empty')},
						{key:'ACTIVE',value:langUtils.sys('ExchangeRateManage.status.ACTIVE')},
							{key:'INVALID',value:langUtils.sys('ExchangeRateManage.status.INVALID')}
					]
				}),displayField:'value',valueField:'key',triggerAction:'all',
				scope:this
		});

		ExchangeRateManageGrid.superclass.constructor.call(this, {
			border:false,
			region:'center',
			store:this.exchangeStore,
			columns:cm,
			sm : new Ext.grid.RowSelectionModel({singleSelect:true}),
			viewConfig : {
				forceFit : true
			},
			bbar:new Ext.PagingToolbar({store:this.exchangeStore,pageSize:20})
			,
			tbar : [' ','-', langUtils.sys('ExchangeRateManage.commons.effective_time')+' :',this.effDateCmp,
					'-',langUtils.sys('ExchangeRateManage.commons.exchange_rate')+' :',this.exchangeCmp,'-' ,
					langUtils.sys('ExchangeRateManage.commons.status')+' :',this.statusCmp,'-' ,
					{text:'  ' +
							langUtils.sys('ExchangeRateManage.commons.query'), iconCls:'icon-query' ,scope:this,handler:this.doQuery},'-','->','-',
					{text:langUtils.sys('ExchangeRateManage.commons.addNewOne'), iconCls:'icon-add' ,scope:this,handler:this.doAdd},'-',
					{text:langUtils.sys('ExchangeRateManage.commons.update'), iconCls:'icon-modify' ,scope:this,handler:this.doUpdate},'-',
					{text:langUtils.sys('ExchangeRateManage.commons.invalid'), iconCls:'icon-cancel' ,scope:this,handler:this.doInvalid},'-'
					]

		});
	},
	getQueryParam:function(){
		var exchange = this.exchangeCmp.getValue();
		var oldEffDate = this.effDateCmp.getValue();
		var status = this.statusCmp.getValue();
		return  {oldExchange:exchange,effDate : oldEffDate ? oldEffDate.format('Y-m-d') :null,status:status};
	},
	doQuery:function(){
		this.getQueryParam(true);
		this.exchangeStore.load();
	},
	doAdd:function(){
		if(!this.win){
			this.win = new ExchangeFormWin(this);
		}
		this.win.resetForm();
		this.win.setTitle(langUtils.sys('ExchangeRateManage.commons.addNewOne'));
		this.win.show();
	},
	doUpdate:function(){
		if(!this.win){
			this.win = new ExchangeFormWin(this);
		}
		var recs = this.selModel.getSelections();
		if(recs.length != 1){
			Alert(langUtils.sys('ExchangeRateManage.msg.onlyOne'));
			return false;
		}
		this.win.loadRecord(recs[0]);
		this.win.setTitle(langUtils.sys('ExchangeRateManage.commons.update')+"("+ langUtils.sys('ExchangeRateManage.commons.exchange_id')+":"+ recs[0].get('exchange_id') +")");
		this.win.show();
	},
	doInvalid:function(){
		var recs = this.selModel.getSelections();
		if(recs.length != 1){
			Alert(langUtils.sys('ExchangeRateManage.msg.onlyOne'));
			return false;
		}
		var data = recs[0].data;
		var params = {
				exchangeId: data['exchange_id'],
				effDate: Date.parseDate(data.eff_date,'Y-m-d H:i:s').format('Y-m-d'),
				oldExchange: data.exchange
		};
		Confirm(langUtils.sys('ExchangeRateManage.msg.areYouSure') , this , function(){
			Ext.Ajax.request({
				params: params,scope:this,
				url:root+'/config/Exchange!invalid.action',
				success: function( res, ops){
					Alert(langUtils.sys('ExchangeRateManage.msg.successMsg'),function(){
						this.reloadGrid();
					},this);
				}
			});
		} , function(){});

	}
})

ExchangeRateManage = Ext.extend(Ext.Panel,{
	grid : null,layout:'fit',
	constructor:function(){
		this.grid  = new ExchangeRateManageGrid();
		ExchangeRateManage.superclass.constructor.call(this,{
			id:'ExchangeRateManage',
			title:langUtils.sys('ExchangeRateManage.title'),
			closable:true,
			border:false,
			layout:'border',
			items:[this.grid ]
		});
	},
	initEvents : function(){
		ExchangeRateManage.superclass.initEvents.call(this);
	}
});


text:
var chai = require('chai');
var emberCliConcat = require('./ember-cli-concat');
var paths = require('./fixtures/paths');
var { join: joinPaths } = require('path');

/* Test helpers */

var assert = chai.assert;
var getOutputPath = emberCliConcat.getOutputPath;

describe('Acceptance - Asset Tags', function() {

  beforeEach(function() {
    emberCliConcat.resetDefaultConfig();
    emberCliConcat.resetDefaultOptions();
  });

  afterEach(function() {
    emberCliConcat.resetDefaultConfig();
  });

  it('renders all asset tags', function() {
    var tags;

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    paths.js.forEach(function(path) {
      var tag = '<script src="' + path +'"></script>';

      assert.include(tags, path);
      assert.include(tags, tag);
    });

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    paths.css.forEach(function(path) {
      var tag = '<link rel="stylesheet" href="' + path +'">';

      assert.include(tags, path);
      assert.include(tags, tag);
    });
  });

  it('renders asset tags with JS concatenation', function() {
    var tags;

    emberCliConcat.setOptions({
      js: {
        concat: true
      }
    });

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    assert.include(tags, getOutputPath('js'));

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    paths.css.forEach(function(path) {
      assert.include(tags, path);
    });
  });

  it('renders asset tags with CSS concatenation', function() {
    var tags;

    emberCliConcat.setOptions({
      css: {
        concat: true
      }
    });

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    paths.js.forEach(function(path) {
      assert.include(tags, path);
    });

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, getOutputPath('css'));
  });

  it('renders asset tags with JS and CSS concatenation', function() {
    var tags;

    emberCliConcat.setOptions({
      js: {
        concat: true
      },
      css: {
        concat: true
      }
    });

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    assert.include(tags, getOutputPath('js'));

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, getOutputPath('css'));
  });

  it('renders asset tags with JS and CSS concatenation with custom content-for hooks', function() {
    var tags;

    emberCliConcat.setOptions({
      js: {
        contentFor: 'fish',
        concat: true
      },
      css: {
        contentFor: 'and-chips',
        concat: true
      }
    });

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    assert.include(tags, getOutputPath('js'));

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, getOutputPath('css'));
  });

  it('renders style tags with and without closing tags', function() {
    var tags;

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, '">');

    emberCliConcat.setOptions({
      useSelfClosingTags: true
    });

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, '" />');
  });

  it('renders asset tags with JS and CSS concatenation with application environment configured rootURL', function() {
    var tags;
    var rootURL = '/config-root-url/';

    emberCliConcat.config({ rootURL: rootURL });
    emberCliConcat.setOptions({
      js: {
        concat: true
      },
      css: {
        concat: true
      }
    });

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    assert.include(tags, joinPaths(rootURL, getOutputPath('js')));

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, joinPaths(rootURL, getOutputPath('css')));
  });

  it('renders asset tags with JS and CSS concatenation with build configuration overridden rootURL', function() {
    var tags;
    var configRootURL = '/config-root-url/';
    var buildRootURL = '/build-root-url/';

    emberCliConcat.config({ rootURL: configRootURL });
    emberCliConcat.setOptions({
      rootURL: buildRootURL,
      js: {
        concat: true
      },
      css: {
        concat: true
      }
    });

    /* Check JS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('js');

    assert.include(tags, joinPaths(buildRootURL, getOutputPath('js')));

    /* Check CSS content-for tags */

    tags = emberCliConcat.getAssetTagsAsString('css');

    assert.include(tags, joinPaths(buildRootURL, getOutputPath('css')));
  });
});


text:
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_AUDIO_DECODER_PCM16B_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_AUDIO_DECODER_PCM16B_H_

#include "webrtc/base/constructormagic.h"
#include "webrtc/modules/audio_coding/codecs/audio_decoder.h"

namespace webrtc {

class AudioDecoderPcm16B final : public AudioDecoder {
 public:
  explicit AudioDecoderPcm16B(size_t num_channels);
  void Reset() override;
  int PacketDuration(const uint8_t* encoded, size_t encoded_len) const override;
  size_t Channels() const override;

 protected:
  int DecodeInternal(const uint8_t* encoded,
                     size_t encoded_len,
                     int sample_rate_hz,
                     int16_t* decoded,
                     SpeechType* speech_type) override;

 private:
  const size_t num_channels_;
  RTC_DISALLOW_COPY_AND_ASSIGN(AudioDecoderPcm16B);
};

}  // namespace webrtc

#endif  // WEBRTC_MODULES_AUDIO_CODING_CODECS_PCM16B_AUDIO_DECODER_PCM16B_H_


text:
(function () {
  'use strict';

  angular
    .module('sites')
    .config(routeConfig);

  routeConfig.$inject = ['$stateProvider'];

  function routeConfig($stateProvider) {
    $stateProvider
      .state('sites', {
        abstract: true,
        url: '/sites',
        template: '<ui-view/>'
      })
      .state('sites.list', {
        url: '',
        templateUrl: 'modules/sites-proibidos/client/views/list-sites.client.view.html',
        controller: 'SitesListController',
        controllerAs: 'vm',
        data: {
          pageTitle: 'Sites List'
        }
      })
      .state('sites.create', {
        url: '/create',
        templateUrl: 'modules/sites-proibidos/client/views/form-site.client.view.html',
        controller: 'SitesController',
        controllerAs: 'vm',
        resolve: {
          siteResolve: newSite
        },
        data: {
          roles: ['user', 'admin'],
          pageTitle : 'Sites Create'
        }
      })
      .state('sites.edit', {
        url: '/:siteId/edit',
        templateUrl: 'modules/sites-proibidos/client/views/form-site.client.view.html',
        controller: 'SitesController',
        controllerAs: 'vm',
        resolve: {
          siteResolve: getSite
        },
        data: {
          roles: ['user', 'admin'],
          pageTitle: 'Edit Site {{ siteResolve.name }}'
        }
      })
      .state('sites.view', {
        url: '/:siteId',
        templateUrl: 'modules/sites-proibidos/client/views/view-site.client.view.html',
        controller: 'SitesController',
        controllerAs: 'vm',
        resolve: {
          siteResolve: getSite
        },
        data:{
          pageTitle: 'Site {{ articleResolve.name }}'
        }
      });
  }

  getSite.$inject = ['$stateParams', 'SitesService'];

  function getSite($stateParams, SitesService) {
    return SitesService.get({
      siteId: $stateParams.siteId
    }).$promise;
  }

  newSite.$inject = ['SitesService'];

  function newSite(SitesService) {
    return new SitesService();
  }
})();


text:
package org.eclipse.jface.snippets.viewers;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;

/**
 * A simple TableViewer implementation to demonstrate its usage
 */
public class Snippet001TableViewer {

  private class MyContentProvider implements IStructuredContentProvider {

    @Override
    public Object[] getElements(Object inputElement) {
      return (MyModel[]) inputElement;
    }

    @Override
    public void dispose() {}

    @Override
    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}

  }

  public class MyModel {
    public int counter;

    public MyModel(int counter) {
      this.counter = counter;
    }

    @Override
    public String toString() {
      return "Item " + this.counter;
    }
  }

  public Snippet001TableViewer(Shell shell) {
    final TableViewer v = new TableViewer(shell);
    v.setLabelProvider(new LabelProvider());
    // for demonstration purposes use custom content provider
    // alternatively you could use ArrayContentProvider.getInstance()
    v.setContentProvider(new MyContentProvider());
    // v.setContentProvider(ArrayContentProvider.getInstance());
    MyModel[] model = createModel();
    v.setInput(model);
    v.getTable().setLinesVisible(true);
    v.getTable().setHeaderVisible(true);

    TableLayout ad = new TableLayout();
    TableColumn column1 = createTableColumn(v.getTable(), "Column 1");
    TableColumn column2 = createTableColumn(v.getTable(), "Column 2");
  }

  private TableColumn createTableColumn(Table table, String textColumn) {
    TableColumn column = new TableColumn(table, SWT.NONE);
    column.setText(textColumn);
    column.setWidth(200);
    column.setMoveable(true);
    return column;
  }

  private MyModel[] createModel() {
    MyModel[] elements = new MyModel[10];

    for (int i = 0; i < 10; i++) {
      elements[i] = new MyModel(i);
    }

    return elements;
  }

  public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    shell.setLayout(new FillLayout());
    new Snippet001TableViewer(shell);
    shell.open();

    while (!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }

    display.dispose();

  }

}


text:
<?php

declare(strict_types=1);

namespace App\Entity\Migration;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20161120032434 extends AbstractMigration
{
    /**
     * @param Schema $schema
     */
    public function up(Schema $schema): void
    {
        $this->addSql('ALTER TABLE station ADD needs_restart TINYINT(1) NOT NULL');
    }

    /**
     * @param Schema $schema
     */
    public function down(Schema $schema): void
    {
        $this->addSql('ALTER TABLE station DROP needs_restart');
    }
}


text:
sudo apt-get update
sudo apt-get install -y mpd mpc

cp ~/sites/jukebox.local/mpd.conf /etc/mpd.conf
sudo service mpd restart

mpc -h '5!r$OLPeCv#h1v1!@localhost' update


text:
<?php

return array(
    'diagnostics.optional' => DI\add(array(
        DI\get('Piwik\Plugins\CustomPiwikJs\Diagnostic\PiwikJsCheck'),
    )),
);


text:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
  <deployment>
    <dependencies>
      <module name="org.jboss.as.jpa.openjpa" />
      <module name="org.jboss.ws.cxf.jbossws-cxf-server" />
    </dependencies>
  </deployment>
</jboss-deployment-structure>