text:
(function ($) {
  // register namespace
  $.extend(true, window, {
    "Slick": {
      "RowSelectionModel": RowSelectionModel
    }
  });

  function RowSelectionModel(options) {
    var _grid;
    var _ranges = [];
    var _self = this;
    var _handler = new Slick.EventHandler();
    var _inHandler;
    var _options;
    var _selector;
    var _defaults = {
      selectActiveRow: true,
      cellRangeSelector: undefined
    };

    function init(grid) {
      _options = $.extend(true, {}, _defaults, options);
      _selector = _options.cellRangeSelector;
      _grid = grid;
      _handler.subscribe(_grid.onActiveCellChanged,
          wrapHandler(handleActiveCellChange));
      _handler.subscribe(_grid.onKeyDown,
          wrapHandler(handleKeyDown));
      _handler.subscribe(_grid.onClick,
          wrapHandler(handleClick));
      if (_selector) {
        grid.registerPlugin(_selector);
        _selector.onCellRangeSelecting.subscribe(handleCellRangeSelected);
        _selector.onCellRangeSelected.subscribe(handleCellRangeSelected);
        _selector.onBeforeCellRangeSelected.subscribe(handleBeforeCellRangeSelected);
      }
    }

    function destroy() {
      _handler.unsubscribeAll();
      if (_selector) {
        _selector.onCellRangeSelecting.unsubscribe(handleCellRangeSelected);
        _selector.onCellRangeSelected.unsubscribe(handleCellRangeSelected);
        _selector.onBeforeCellRangeSelected.unsubscribe(handleBeforeCellRangeSelected);
        _grid.unregisterPlugin(_selector);
        if (_selector.destroy) {
          _selector.destroy();
        }
      }
    }

    function wrapHandler(handler) {
      return function () {
        if (!_inHandler) {
          _inHandler = true;
          handler.apply(this, arguments);
          _inHandler = false;
        }
      };
    }

    function rangesToRows(ranges) {
      var rows = [];
      for (var i = 0; i < ranges.length; i++) {
        for (var j = ranges[i].fromRow; j <= ranges[i].toRow; j++) {
          rows.push(j);
        }
      }
      return rows;
    }

    function rowsToRanges(rows) {
      var ranges = [];
      var lastCell = _grid.getColumns().length - 1;
      for (var i = 0; i < rows.length; i++) {
        ranges.push(new Slick.Range(rows[i], 0, rows[i], lastCell));
      }
      return ranges;
    }

    function getRowsRange(from, to) {
      var i, rows = [];
      for (i = from; i <= to; i++) {
        rows.push(i);
      }
      for (i = to; i < from; i++) {
        rows.push(i);
      }
      return rows;
    }

    function getSelectedRows() {
      return rangesToRows(_ranges);
    }

    function setSelectedRows(rows) {
      setSelectedRanges(rowsToRanges(rows), "SlickRowSelectionModel.setSelectedRows");
    }

    function setSelectedRanges(ranges, caller) {
      // simple check for: empty selection didn't change, prevent firing onSelectedRangesChanged
      if ((!_ranges || _ranges.length === 0) && (!ranges || ranges.length === 0)) {
        return;
      }
      _ranges = ranges;

      // provide extra "caller" argument through SlickEventData to avoid breaking pubsub event that only accepts an array of selected range
      var eventData = new Slick.EventData();
      Object.defineProperty(eventData, 'detail', { writable: true, configurable: true, value: { caller: caller || "SlickRowSelectionModel.setSelectedRanges" } });
      _self.onSelectedRangesChanged.notify(_ranges, eventData);
    }

    function getSelectedRanges() {
      return _ranges;
    }

    function handleActiveCellChange(e, data) {
      if (_options.selectActiveRow && data.row != null) {
        setSelectedRanges([new Slick.Range(data.row, 0, data.row, _grid.getColumns().length - 1)]);
      }
    }

    function handleKeyDown(e) {
      var activeRow = _grid.getActiveCell();
      if (_grid.getOptions().multiSelect && activeRow
      && e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey
      && (e.which == Slick.keyCode.UP || e.which == Slick.keyCode.DOWN)) {
        var selectedRows = getSelectedRows();
        selectedRows.sort(function (x, y) {
          return x - y;
        });

        if (!selectedRows.length) {
          selectedRows = [activeRow.row];
        }

        var top = selectedRows[0];
        var bottom = selectedRows[selectedRows.length - 1];
        var active;

        if (e.which == Slick.keyCode.DOWN) {
          active = activeRow.row < bottom || top == bottom ? ++bottom : ++top;
        } else {
          active = activeRow.row < bottom ? --bottom : --top;
        }

        if (active >= 0 && active < _grid.getDataLength()) {
          _grid.scrollRowIntoView(active);
          var tempRanges = rowsToRanges(getRowsRange(top, bottom));
          setSelectedRanges(tempRanges);
        }

        e.preventDefault();
        e.stopPropagation();
      }
    }

    function handleClick(e) {
      var cell = _grid.getCellFromEvent(e);
      if (!cell || !_grid.canCellBeActive(cell.row, cell.cell)) {
        return false;
      }

      if (!_grid.getOptions().multiSelect || (
          !e.ctrlKey && !e.shiftKey && !e.metaKey)) {
        return false;
      }

      var selection = rangesToRows(_ranges);
      var idx = $.inArray(cell.row, selection);

      if (idx === -1 && (e.ctrlKey || e.metaKey)) {
        selection.push(cell.row);
        _grid.setActiveCell(cell.row, cell.cell);
      } else if (idx !== -1 && (e.ctrlKey || e.metaKey)) {
        selection = $.grep(selection, function (o, i) {
          return (o !== cell.row);
        });
        _grid.setActiveCell(cell.row, cell.cell);
      } else if (selection.length && e.shiftKey) {
        var last = selection.pop();
        var from = Math.min(cell.row, last);
        var to = Math.max(cell.row, last);
        selection = [];
        for (var i = from; i <= to; i++) {
          if (i !== last) {
            selection.push(i);
          }
        }
        selection.push(last);
        _grid.setActiveCell(cell.row, cell.cell);
      }

      var tempRanges = rowsToRanges(selection);
      setSelectedRanges(tempRanges);
      e.stopImmediatePropagation();

      return true;
    }

    function handleBeforeCellRangeSelected(e, cell) {
      if (_grid.getEditorLock().isActive()) {
        e.stopPropagation();
        return false;
      }
      _grid.setActiveCell(cell.row, cell.cell);
    }

    function handleCellRangeSelected(e, args) {
      if (!_grid.getOptions().multiSelect || !_options.selectActiveRow) {
        return false;
      }
      setSelectedRanges([new Slick.Range(args.range.fromRow, 0, args.range.toRow, _grid.getColumns().length - 1)])
    }

    $.extend(this, {
      "getSelectedRows": getSelectedRows,
      "setSelectedRows": setSelectedRows,

      "getSelectedRanges": getSelectedRanges,
      "setSelectedRanges": setSelectedRanges,

      "init": init,
      "destroy": destroy,
      "pluginName": "RowSelectionModel",

      "onSelectedRangesChanged": new Slick.Event()
    });
  }
})(jQuery);


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Package org.nvonop.selenium.framework.controls.interfaces</title>
<meta name="date" content="2014-06-14">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.nvonop.selenium.framework.controls.interfaces

Packages that use org.nvonop.selenium.framework.controls.interfaces

Package
Description

org.nvonop.selenium.framework.controls

org.nvonop.selenium.test.java

Classes in org.nvonop.selenium.framework.controls.interfaces used by org.nvonop.selenium.framework.controls

Class and Description

Clickable

This interface allows a user to configure UI controls with click
 functionality.

Detectable

This interface allows a user to configure UI controls with functionality to
 determine whether or not the control is visible.

Readable

This interface allows a user to configure UI controls with functionality to
 read the text of the control.

Selectable

This interface provides functionality for selecting and deselecting a
 control.

Writeable

This interface provides functionality for writing data into a control.

Classes in org.nvonop.selenium.framework.controls.interfaces used by org.nvonop.selenium.test.java

Class and Description

Form

This interface allows a user to configure UI controls with functionality to
 fill in a form with data.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

redpajama_set_name: RedPajamaGithub


text:
//
//  LSCSyncEngine.h
//  seaside
//
//  Created by Bryan Nagle on 7/10/12.
//  Copyright Everglade Solutions, Inc., d/b/a Liquid Analytics. 2008 2009 2010 2011 2012 2013  All rights reserved
//

#import <Foundation/Foundation.h>

#define ITEM_ACTION_UPDATE @"Update"
#define ITEM_ACTION_CREATE @"Create"
#define ITEM_ACTION_DELETE @"Delete"
#define ITEM_ACTION_SAVE   @"Save"

#define SEASIDE_WRITE_PAGESIZE 250
#define GET_ITEMS_PAGE_SIZE 5000
#define ITEM_WEIGHT_MULTIPLIER 50 //when performing weight based calculations, use (ITEM_WEIGHT_MULTIPLIER * some_count) for weight values

#define MAX_CONCURRENT_GETITEMS_REQUESTS 1
#define MAX_CONCURRENT_GETITEMS_PROCESSING 3

@class LSCSeasideDatabaseManager;
@class LSCStateHandler;

typedef void (^__nullable SynchronousRequestBlock)(NSError *__nullable error, id __nullable dataReceived);

@protocol LSCSyncControllerApplicationDelegate;
@protocol LSCSyncControllerInfoDelegate;
@protocol LSCSeasideApplicationDelegate;

@class LDMItem;
@class LDMItemSchema;
@class LSCGetItemsRESTHandler;

@interface LSCSyncController : NSObject

@property (strong) NSThread *__nonnull thread;
@property (strong) NSThread *__nonnull getItemsThread;
@property (strong) NSThread *__nonnull transactionThread;
@property (strong) NSThread *__nonnull syncSocketThread;

//Delegates
@property (strong) id<LSCSeasideApplicationDelegate> __nullable appDelegate;

//Used in command bean flow only
@property (readonly) NSTimeInterval timeout;
@property (strong, nullable) NSString *commandGroupId;

@property (readonly, nullable) NSURL *url;
@property (readonly, nullable) NSURL *relayUrl;

// State Modifiers
@property (strong, nullable) NSDate *timeOfLastSync;
@property (readonly, nullable) NSDate *timeOfNextSync;
@property (strong, nullable) NSDate *timeLastSyncEnded;
@property (strong, nullable) NSDate *timeToGetLoginStatus;
@property (strong, nullable) NSString *connectionType;
@property (strong, nullable) NSString *loginToken;

@property BOOL seasideHasSynced;
@property BOOL serverReachable;

@property (nonatomic) int pingInMS;

@property (readonly, nonnull) NSDictionary *authScope;
@property (readonly, nonnull) NSString *stringFromAuthScope;

@property BOOL tokenScopeIsSent;
@property BOOL manifestSetupRequested;
@property BOOL manifestSetupComplete;
@property BOOL optimizeComplete;

@property (strong, nullable) NSString *communityName;
@property (strong, nullable) NSDictionary *rolesByCommunity;
@property (strong, nullable) NSArray *loginAsUserList;
@property (strong, nullable) NSString *credentialedUserId;
@property (strong, nullable) NSString *seasideUserName;

+ (LSCSyncController *__nonnull)sharedInstance;
+ (void)showServerIsNotReachableInfoAlert;

- (void)serverNetworkError: (BOOL)immediateSwitch;
- (void)startWithDelegate:(id <LSCSeasideApplicationDelegate> __nullable)delegate;

- (BOOL)serverIsReachable:(NSURL *__nonnull)url;

- (void)requestLogin;
- (void)requestSync;
- (void)requestSyncWithCompletionHandler:(void (^__nullable)(BOOL syncSucceeded))completionHandler;
- (void)requestGetItemsWithCategory:(NSString *__nonnull)category andType:(NSString *__nonnull)type andFieldValues:(NSDictionary *__nullable)fieldValues andTimeRanges:(NSArray *__nullable)timeRanges adminMode:(BOOL)adminMode andCallback:(SynchronousRequestBlock)callback;
- (void)precacheItemsWithCategory:(NSString *__nonnull)category andType:(NSString *__nonnull)type andFieldValues:(NSDictionary *__nullable)fieldValues andTimeRanges:(NSArray*__nullable)timeRanges adminMode:(BOOL)adminMode andCallback:(void (^__nonnull)(BOOL success))callback;
- (NSString *__nonnull)pingDescription;
- (void) setDisasterServers: (NSArray *__nullable) routingTable;
- (void) clearServerError;
- (BOOL) serverIsReachable;
- (NSString *__nullable) urlBase;
- (void) actOnState;
- (BOOL) willRequestAuthenticationOnStartup;

- (void) stateHandlerInitialized:(LSCStateHandler *__nonnull)handler;
- (void) stateHandlerDone:(LSCStateHandler *__nonnull)handler;
- (dispatch_queue_t __nonnull) dispatchQueueForThread:(NSThread *__nonnull)thread;
- (void) requestStarted:(LSCGetItemsRESTHandler *__nonnull)handler;
- (void) requestFinished:(LSCGetItemsRESTHandler *__nonnull)handler;
- (void) processingStarted:(LSCGetItemsRESTHandler *__nonnull)handler;
- (BOOL) processingFinished:(LSCGetItemsRESTHandler *__nonnull)handler count:(int)count weight:(int)weight;
- (void) requestFailed:(LSCGetItemsRESTHandler *__nonnull)handler;

- (void) authenitcateUsername:(NSString *__nonnull)username password:(NSString *__nonnull)password;
- (void) authenticationError:(NSString *__nonnull)error message:(NSString *__nonnull)message;
- (void) authenticationSuccessToken:accessToken;
- (void) communitySelected:(NSString *__nonnull)community;
- (void) manifestReadyWithCount:(int)count;
- (void) logoutWithMessage:(NSString *__nullable)authenticationMessage;
- (void) reset;
- (void) loginAsUserListReceived:(NSArray *__nullable)loginAsUserList;
- (void) loginAsUserSelected:(NSString *__nullable)loginAsUserId;
- (void) switchLoginAsUser;
- (BOOL) requiresOldstyleWordlookup;
- (BOOL) manifestRequired;

@end

/**
 * All LD family of iPad applications should implement this delegate instead of LSCSyncControllerApplicationDelegate. The following sync controller methods are use in conjunction with this delegate:
 *
 * -(void) startWithDelegate:(id<LSCSeasideApplicationDelegate>)delegate;
 * -(void) authenitcateUsername:(NSString *)clientId password:(NSString *)clientSecret;
 * -(void) communitySelected:(NSString *)community;
 *
 * The following delegates are now deprecated: LSCSyncControllerInfoDelegate, LSCSyncControllerApplicationDelegate
 */
@protocol LSCSeasideApplicationDelegate <NSObject>

/*!
 * @discussion The application must present an authentication screen to the user, if a message is passed it should be displayed. Respond to callback when complete
 * @param message A useful string to present to the user regarding current state of login
 * @param userEditable TRUE if the user credentials should be editable at this point, FALSE otherwise
 * @param providePasscode TRUE if the passcode was provided as a form of login, FALSE otherwise
 * @param callback block to execute after method is called
 */
- (void) authenticateWithMessage:(NSString *__nullable)message userEditable:(BOOL)userEditable providePasscode:(BOOL)providePasscode callback:(void (^__nullable)(NSString * __nonnull username, NSString * __nonnull password))callback;

/*!
 * @discussion Called when LPK is registering the device and performing an inital sync. This is a status update message only, and may be called multiple times.
 * @param message A useful string to present to the user regarding current state of login
 * @param syncingData TRUE if device is currently syncing data, FALSE otherwise
 * @param syncProgress Number between 0 and 1 to indicate current progress of sync. 1 represents that the device is 100% synced
 */
- (void) registeringWithMessage:(NSString *__nullable)message syncingData:(BOOL)syncingData syncProgress:(float)syncProgress;

/*!
 * @discussion Called when login process is unable to reach server
 * @param status A useful string to present to the user regarding current state of login
 * @param enable TRUE if the user credentials should be editable at this point, FALSE otherwise
 */
- (void) updateLoginStatusLabel:(NSString *__nullable)status enable:(BOOL)enable;

/*!
 * @discussion The application should present the user with a list of communities to select from. Retrieve a list of communities from LDMDataManager (with allItemsOfType or similar) and then respond with [[LSCSyncController sharedInstance] communitySelected:communityName]; when done
 */
- (void) selectCommunity;

/*!
 * @discussion All seaside setup work is complete. The user us authenticated and registered and may use the application.
 */
- (void) registered;

@optional
/*!
 * @discussion Implement to tell LP whether a manifest is required, YES by default
 */
- (BOOL) manifestRequired;

/*!
 * @discussion Called when [[LSCSyncController sharedInstance] logoutWithMessage:@""] is called. Use this callback to clear application specific things.
 */
- (void) userHasLoggedOut;

/*!
 * @discussion Return YES if you want the application to store your username and password.
 * You can retrieve these via standardUserDefaults with seasideUserName and seasidePassword
 */
- (BOOL) shouldKeepUsernameAndPasswordAfterReset;

/*!
 * @discussion Called when [[LSCSyncController sharedInstance] reset] is called. User this callback to clear application specific things.
 */
- (void) deviceWillBeReset;

/*!
 * @discussion Called when user has login ability. Retrieve list of users with [LSCSyncController sharedInstance].loginAsUserList and
 * call [[LSCSyncController sharedInstance] loginAsUserSelected:<userId> when done
 */
- (void) selectLoginAsUser;

/*!
 * @discussion Return NO if you want to do FTS searching (requires UTF8Lucene defined in schema)
 */
- (BOOL) requiresOldstyleWordlookup;

@end


text:
module Sass::Script
  # A SassScript object representing a null value.
  class Null < Literal
    # Creates a new null literal.
    def initialize
      super nil
    end

    # @return [Boolean] `false` (the Ruby boolean value)
    def to_bool
      false
    end

    # @return [Boolean] `true`
    def null?
      true
    end

    # @return [String] '' (An empty string)
    def to_s(opts = {})
      ''
    end

    def to_sass(opts = {})
      'null'
    end

    # Returns a string representing a null value.
    #
    # @return [String]
    def inspect
      'null'
    end
  end
end


text:
package com.github.igotyou.FactoryMod.managers;

import org.bukkit.Location;

import com.github.igotyou.FactoryMod.FactoryModPlugin;
import com.github.igotyou.FactoryMod.Factorys.IFactory;
import com.github.igotyou.FactoryMod.utility.InteractionResponse;

//original file:
/**
* Manager.java
* Purpose: Interface for Manager objects for basic manager functionality
*
* @author MrTwiggy
* @version 0.1 1/08/13
*/
//edited version:
/**
* Manager.java
* Purpose: Interface for Manager objects for basic manager functionality
* @author igotyou
*
*/
public interface IManager<T extends IFactory>
{

	public Class<T> getFactoryType();

	/**
	 * @return the plugin instance
	 */
	public FactoryModPlugin getPlugin();

/**
* Saves the machine objects list of this manager to file
*/
	public void save();

/**
* Loads machine objects list of this manager from file
*/
	public void load();

/**
* Updates all the machines from this manager's machine object list
*/
	public void updateFactorys();

/**
* Attempts to create a new machine for this manager
*/
	public InteractionResponse createFactory(Location factoryLocation, Location inventoryLocation, Location powerLocation);

/**
* Creates a machine from an existing machine data object
*/
	public InteractionResponse addFactory(T factory);

/**
* Returns the machine (if any exists) at the given location from this manager
*/
	public T getFactory(Location factoryLocation);

/**
* Returns whether a machine exists at the given location
*/
	public boolean factoryExistsAt(Location factoryLocation);

/**
* Returns whether a machine is whole at the given location
*/
	public boolean factoryWholeAt(Location factoryLocation);

/**
* Removes the given machine from the object list
*/
	public void removeFactory(T factory);

	public boolean isClear(T factory);

}


text:
#include <stdio.h>

#include "native_client/src/include/portability.h"
#include "native_client/src/shared/gio/gio.h"
#include "native_client/src/shared/gio/gio_test_base.h"
#include "gtest/gtest.h"

namespace {

// Premade files set from argv. These are only read (not written to).
// Must be a file with contents ['A'+0, 'A'+1, ..., 'A'+31]
char* g_premade_textfile = NULL;
// Must be a file with contents [0, 1, 2, ..., 31]
char* g_premade_binfile = NULL;
char* g_temp_file = NULL;

/** Parse arguments for input files and checks that there are enough args. */
void parse_args(int argc, char *argv[]) {
  int opt;
  while (-1 != (opt = getopt(argc, argv, "t:x:b:"))) {
    switch (opt) {
      default:
        printf("Unknown commandline option %c", opt);
        FAIL();
      case 'x':
        g_premade_textfile = optarg;
        break;
      case 'b':
        g_premade_binfile = optarg;
        break;
      case 't':
        g_temp_file = optarg;
        break;
    }
  }

  printf("Testing with textfile %s\n", g_premade_textfile);
  printf("Testing with binfile %s\n", g_premade_binfile);
  printf("Testing with temp file %s\n", g_temp_file);

  ASSERT_NE(reinterpret_cast<char*>(NULL), g_temp_file);
  ASSERT_NE(reinterpret_cast<char*>(NULL), g_premade_textfile);
  ASSERT_NE(reinterpret_cast<char*>(NULL), g_premade_binfile);
}

TEST(GioTest, ReadTest) {
  struct GioFile my_file;
  int ret_code;

  ret_code = GioFileCtor(&my_file, g_premade_textfile, "r");
  EXPECT_EQ(1, ret_code);
  GioReadTestWithOffset(&my_file.base, 'A');
  GioCloseTest(&my_file.base);

  ret_code = GioFileCtor(&my_file, g_premade_binfile, "rb");
  EXPECT_EQ(1, ret_code);
  GioReadTestWithOffset(&my_file.base, 0);
  GioCloseTest(&my_file.base);
}

void MakeTempFile(struct GioFile* my_file) {
  int ret_code = GioFileCtor(my_file, g_temp_file, "w+b");
  EXPECT_EQ(1, ret_code);
}

void CloseAndCleanTempFile(struct GioFile* gf) {
  GioCloseTest(&gf->base);

  // Since we pass in the name of the temp file from Scons, and Scons does not
  // know when it is opened/closed to delete the temp file. Delete it here.
  ASSERT_EQ(0, remove(g_temp_file));
}

TEST(GioTest, WriteTest) {
  struct GioFile my_file;

  MakeTempFile(&my_file);
  GioWriteTest(&my_file.base, false);
  CloseAndCleanTempFile(&my_file);
}

TEST(GioTest, SeekTest) {
  struct GioFile my_file;
  int ret_code;

  ret_code = GioFileCtor(&my_file, g_premade_textfile, "r");
  EXPECT_EQ(1, ret_code);
  GioSeekTestWithOffset(&my_file.base, 'A', false);
  GioCloseTest(&my_file.base);

  ret_code = GioFileCtor(&my_file, g_premade_binfile, "rb");
  EXPECT_EQ(1, ret_code);
  GioSeekTestWithOffset(&my_file.base, 0, false);
  GioCloseTest(&my_file.base);
}

}  // namespace

int main(int argc, char* argv[]) {
  testing::InitGoogleTest(&argc, argv);
  parse_args(argc, argv);
  return RUN_ALL_TESTS();
}


text:
using System;
using System.Linq;
using Dynamo.Core;
using Dynamo.Extensions;

namespace SampleViewExtension
{
    public class SampleWindowViewModel : NotificationObject, IDisposable
    {
        private string selectedNodesText = "Begin selecting ";
        private ReadyParams readyParams;

        public string SelectedNodesText = @"There are {readyParams.CurrentWorkspaceModel.Nodes.Count()} nodes in the workspace.";

        public SampleWindowViewModel(ReadyParams p)
        {
            readyParams = p;
            p.CurrentWorkspaceModel.NodeAdded += CurrentWorkspaceModel_NodesChanged;
            p.CurrentWorkspaceModel.NodeRemoved += CurrentWorkspaceModel_NodesChanged;
        }

        private void CurrentWorkspaceModel_NodesChanged(Dynamo.Models.NodeModel obj)
        {
            RaisePropertyChanged("SelectedNodesText");
        }

        public void Dispose()
        {
            readyParams.CurrentWorkspaceModel.NodeAdded -= CurrentWorkspaceModel_NodesChanged;
            readyParams.CurrentWorkspaceModel.NodeRemoved -= CurrentWorkspaceModel_NodesChanged;
        }
    }
}


text:
module SpreeZeroStockProducts
  class Engine < Rails::Engine
    require 'spree/core'
    isolate_namespace Spree
    engine_name 'spree_zero_stock_products'

    config.autoload_paths += %W(#{config.root}/lib)

    # use rspec for tests
    config.generators do |g|
      g.test_framework :rspec
    end

    initializer "spree.zero_stock_products.preferences", :before => :load_config_initializers do |app|
      Spree::AppConfiguration.class_eval do
        preference :show_zero_stock_products, :boolean, :default => true
      end
    end

    def self.activate #:nodoc:
      Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
        Rails.configuration.cache_classes ? require(c) : load(c)
      end
    end

    config.to_prepare &method(:activate).to_proc
  end
end


text:
<?php
# MantisBT - a php based bugtracking system

# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.

/**
 * requires MantisPlugin.class.php
 */
require_once( config_get( 'class_path' ) . 'MantisPlugin.class.php' );

/**
 * XmlImportExportPlugin Class
 */
class XmlImportExportPlugin extends MantisPlugin {

	/**
	 *  A method that populates the plugin information and minimum requirements.
	 */
	function register( ) {
		$this->name = plugin_lang_get( 'title' );
		$this->description = plugin_lang_get( 'description' );
		$this->page = '';

		$this->version = '1.0';
		$this->requires = array(
			'MantisCore' => '1.2.0',
		);

		$this->author = 'MantisBT Team';
		$this->contact = 'mantisbt-dev@lists.sourceforge.net';
		$this->url = 'http://www.mantisbt.org';
	}

	/**
	 * Default plugin configuration.
	 */
	function hooks( ) {
		$hooks = array(
			'EVENT_MENU_MANAGE' => 'import_issues_menu',
			'EVENT_MENU_FILTER' => 'export_issues_menu',
		);
		return $hooks;
	}

	function import_issues_menu( ) {
		return array( '' . plugin_lang_get( 'import' ) . '', );
	}

	function export_issues_menu( ) {
		return array( '' . plugin_lang_get( 'export' ) . '', );
	}
}


text:
package org.mockserver.serialization.serializers.body;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import org.mockserver.model.XmlBody;

import java.io.IOException;

/**
 * @author jamesdbloom
 */
public class XmlBodySerializer extends StdSerializer<XmlBody> {

    public XmlBodySerializer() {
        super(XmlBody.class);
    }

    @Override
    public void serialize(XmlBody xmlBody, JsonGenerator jgen, SerializerProvider provider) throws IOException {
        jgen.writeStartObject();
        if (xmlBody.getNot() != null && xmlBody.getNot()) {
            jgen.writeBooleanField("not", xmlBody.getNot());
        }
        if (xmlBody.getContentType() != null && !xmlBody.getContentType().equals(XmlBody.DEFAULT_CONTENT_TYPE.toString())) {
            jgen.writeStringField("contentType", xmlBody.getContentType());
        }
        jgen.writeStringField("type", xmlBody.getType().name());
        jgen.writeStringField("xml", xmlBody.getValue());
        jgen.writeEndObject();
    }
}


text:
package com.hadithbd.banglahadith.ui;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;

import com.hadithbd.banglahadith.R;
import com.hadithbd.banglahadith.adapters.HadithSectionListAdapter;
import com.hadithbd.banglahadith.bangla.UtilBanglaSupport;
import com.hadithbd.banglahadith.database.DbManager;
import com.hadithbd.banglahadith.util.Constants;
import com.hadithbd.banglahadith.viewmodel.HadithBookSectionInfo;

import java.util.List;

public class HadithSectionListActivity extends BaseActivity
        implements HadithSectionListAdapter.HadithSectionItemClickListener {

    public static final String TAG = HadithSectionListActivity.class.getSimpleName();

    private static final int NUMBER_OF_COLUMNS = 2;

    private RecyclerView mRecyclerView;

    private HadithSectionListAdapter mHadithDetailListAdapter;
    private int mBookId;
    private List<HadithBookSectionInfo> mHadithBookSectionInfoList;
    private String mBookTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_hadith_section_list);

        getMessageFromBundle();

        mHadithBookSectionInfoList = DbManager.getInstance().getHadithBookSectionInfo(mBookId);

        setHomeBackground();
        initViews();

        setupActionBar();

        initRecyclerAdapter();
    }

    private void getMessageFromBundle() {
        Bundle data = getIntent().getExtras();
        if (data != null) {
            mBookId = data.getInt(Constants.BOOK_ID);
            mBookTitle = data.getString(Constants.HADITH_TITLE);
            Log.i(TAG, "Book id: " + mBookTitle);
        }
    }

    private void initRecyclerAdapter() {
        mRecyclerView.setHasFixedSize(true);
        mHadithDetailListAdapter = new HadithSectionListAdapter(this, mHadithBookSectionInfoList);
        mRecyclerView.setLayoutManager(new GridLayoutManager(this, NUMBER_OF_COLUMNS));
        mHadithDetailListAdapter.setmHadithSectionItemClickListener(this);
        mRecyclerView.setAdapter(mHadithDetailListAdapter);
    }

    private void initViews() {
        mRecyclerView = (RecyclerView) findViewById(R.id.hadith_detail_recycler_view);
    }

    public void setupActionBar() {
        ActionBar actionBar = getSupportActionBar();
        actionBar.setTitle(UtilBanglaSupport.getBanglaSpannableString(""));
        actionBar.setSubtitle(UtilBanglaSupport.getBanglaSpannableString(""));
        actionBar.setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public void onHadithSectionItemClicked(int position) {
        final HadithBookSectionInfo hadithBookSectionInfo = mHadithBookSectionInfoList.get(position);

        Intent intent = new Intent(HadithSectionListActivity.this, HadithDetailActivity.class);
        intent.putExtra(Constants.HADITH_SECTION_ID, hadithBookSectionInfo.getChapterId());
        startActivity(intent);
    }
}


text:
layout: page
title: Edge Electronics Dinner
date: 2016-05-24
author: Jeremy Hinton
tags: weekly links, java
status: published
summary: Mauris euismod imperdiet nunc. Vestibulum nec.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 01/02/2017
  endDate: 01/06/2017
  ctyhocn: FWBHHHX
  groupCode: EED
published: true
---
Nulla facilisi. Sed convallis nulla at tellus vulputate rhoncus. Proin vitae orci a tellus ornare congue. Cras accumsan ornare sem id ultricies. Praesent pretium efficitur sem, vitae bibendum nisi commodo ut. Integer aliquam arcu non tincidunt consectetur. Nullam pharetra sapien eu odio eleifend, non bibendum enim vestibulum. Vestibulum eu volutpat eros. Phasellus ut augue condimentum, elementum metus vel, pulvinar felis. Phasellus dictum lectus id dapibus faucibus. Suspendisse convallis tincidunt dapibus. Curabitur tempor purus est, non venenatis augue rutrum eget. Vestibulum et magna malesuada, rutrum diam dignissim, euismod leo. Nam et felis ac turpis ultrices semper eget vitae nulla.

* Vivamus ullamcorper dui a imperdiet maximus
* Donec pulvinar tellus eget mattis pretium
* Nunc egestas lorem vel tortor consequat varius.

Sed non leo vel lorem hendrerit hendrerit sed ornare mauris. Ut dapibus diam ac felis ultrices commodo. Nunc venenatis lectus vitae magna elementum, in tempor metus sodales. Aenean ut venenatis lorem, sit amet egestas ipsum. Mauris eleifend lobortis rhoncus. Integer aliquam felis dolor, vitae laoreet magna tincidunt nec. Nam fermentum tellus lobortis nunc lobortis, eget euismod lacus viverra. Donec eu mauris diam. Vivamus eu auctor risus.
Sed quis consequat metus. Suspendisse id libero dapibus, ultricies nulla non, rutrum ipsum. Duis ornare dolor auctor metus scelerisque convallis. Mauris vel posuere magna, vel tristique leo. In aliquet mi luctus ultricies tincidunt. Fusce eleifend mi eu ligula suscipit consectetur. Integer nec pretium ipsum. Morbi finibus faucibus blandit. Donec mollis nulla quis nibh imperdiet, sed aliquet lorem accumsan. Sed venenatis elit non est lobortis tincidunt.