text:
namespace ash {
class DockedBackgroundWidget;
class DockedWindowLayoutManagerObserver;
class DockedWindowResizerTest;
class Shelf;
class WmRootWindowController;
class WmShelf;

// DockedWindowLayoutManager is responsible for organizing windows when they are
// docked to the side of a screen. It is associated with a specific container
// window (i.e. kShellWindowId_DockedContainer) and controls the layout of any
// windows added to that container.
//
// The constructor takes a |dock_container| argument which is expected to set
// its layout manager to this instance, e.g.:
// dock_container->SetLayoutManager(
//     new DockedWindowLayoutManager(dock_container));
//
// TODO(varkha): extend BaseLayoutManager instead of LayoutManager to inherit
// common functionality.
class ASH_EXPORT DockedWindowLayoutManager
    : public wm::WmSnapToPixelLayoutManager,
      public WmRootWindowControllerObserver,
      public WmWindowObserver,
      public WmActivationObserver,
      public ShellObserver,
      public keyboard::KeyboardControllerObserver,
      public wm::WindowStateObserver {
 public:
  // Maximum width of the docked windows area.
  static const int kMaxDockWidth;

  // Minimum width of the docked windows area.
  static const int kMinDockWidth;

  explicit DockedWindowLayoutManager(WmWindow* dock_container);
  ~DockedWindowLayoutManager() override;

  // Returns the DockedWindowLayoutManager in the specified hierarchy. This
  // searches from the root of |window|.
  static DockedWindowLayoutManager* Get(WmWindow* window);

  // Disconnects observers before container windows get destroyed.
  void Shutdown();

  // Management of the observer list.
  virtual void AddObserver(DockedWindowLayoutManagerObserver* observer);
  virtual void RemoveObserver(DockedWindowLayoutManagerObserver* observer);

  // Called by a DockedWindowResizer to update which window is being dragged.
  // Starts observing the window unless it is a child.
  void StartDragging(WmWindow* window);

  // Called by a DockedWindowResizer when a dragged window is docked.
  void DockDraggedWindow(WmWindow* window);

  // Called by a DockedWindowResizer when a dragged window is no longer docked.
  void UndockDraggedWindow();

  // Called by a DockedWindowResizer when a window is no longer being dragged.
  // Stops observing the window unless it is a child.
  // Records |action| by |source| in UMA.
  void FinishDragging(DockedAction action, DockedActionSource source);

  // Checks the rules and possibly updates the docked layout to match
  // the |alignment|. May not apply the |alignment| when
  // the current shelf alignment conflicts. Never clears the |alignment_|.
  void MaybeSetDesiredDockedAlignment(DockedAlignment alignment);

  WmShelf* shelf() { return shelf_; }
  void SetShelf(WmShelf* shelf);

  // Calculates if a window is touching the screen edges and returns edge.
  DockedAlignment GetAlignmentOfWindow(const WmWindow* window) const;

  // Used to snap docked windows to the side of screen during drag.
  DockedAlignment CalculateAlignment() const;

  void set_preferred_alignment(DockedAlignment preferred_alignment) {
    preferred_alignment_ = preferred_alignment;
  }

  void set_event_source(DockedActionSource event_source) {
    event_source_ = event_source;
  }

  // Returns true when a window can be docked. Windows cannot be docked at the
  // edge used by the shelf or the edge opposite from existing dock.
  bool CanDockWindow(WmWindow* window, DockedAlignment desired_alignment);

  WmWindow* dock_container() const { return dock_container_; }

  // Returns current bounding rectangle of docked windows area.
  const gfx::Rect& docked_bounds() const { return docked_bounds_; }

  // Returns last known coordinates of |dragged_window_| after Relayout.
  const gfx::Rect dragged_bounds() const { return dragged_bounds_; }

  // Returns true if currently dragged window is docked at the screen edge.
  bool is_dragged_window_docked() const { return is_dragged_window_docked_; }

  // Updates docked layout when shelf bounds change.
  void OnShelfBoundsChanged();

  // SnapLayoutManager:
  void OnWindowResized() override;
  void OnWindowAddedToLayout(WmWindow* child) override;
  void OnWillRemoveWindowFromLayout(WmWindow* child) override {}
  void OnWindowRemovedFromLayout(WmWindow* child) override;
  void OnChildWindowVisibilityChanged(WmWindow* child, bool visibile) override;
  void SetChildBounds(WmWindow* child,
                      const gfx::Rect& requested_bounds) override;

  // WmRootWindowControllerObserver:
  void OnWorkAreaChanged() override;
  void OnFullscreenStateChanged(bool is_fullscreen) override;
  void OnShelfAlignmentChanged() override;

  // wm::WindowStateObserver:
  void OnPreWindowStateTypeChange(wm::WindowState* window_state,
                                  wm::WindowStateType old_type) override;

  // WmWindowObserver:
  void OnWindowBoundsChanged(WmWindow* window,
                             const gfx::Rect& old_bounds,
                             const gfx::Rect& new_bounds) override;
  void OnWindowVisibilityChanging(WmWindow* window, bool visible) override;
  void OnWindowDestroying(WmWindow* window) override;

  // WmActivationObserver:
  void OnWindowActivated(WmWindow* gained_active,
                         WmWindow* lost_active) override;

  // ShellObserver:
  void OnShelfAlignmentChanged(WmWindow* root_window) override;
  void OnFullscreenStateChanged(bool is_fullscreen,
                                WmWindow* root_window) override;
  void OnOverviewModeStarting() override;
  void OnOverviewModeEnded() override;

 private:
  struct CompareMinimumHeight;
  struct CompareWindowPos;
  class ShelfWindowObserver;
  struct WindowWithHeight;

  friend class DockedWindowLayoutManagerTest;
  friend class DockedWindowResizerTest;

  // Width of the gap between the docked windows and a workspace.
  static const int kMinDockGap;

  // Ideal (starting) width of the dock.
  static const int kIdealWidth;

  // Returns the alignment of the docked windows other than the |child|.
  DockedAlignment CalculateAlignmentExcept(const WmWindow* child) const;

  // Determines if the |alignment| is applicable taking into account
  // the shelf alignment.
  bool IsDockedAlignmentValid(DockedAlignment alignment) const;

  // Keep at most kMaxVisibleWindows visible in the dock and minimize the rest
  // (except for |child|).
  void MaybeMinimizeChildrenExcept(WmWindow* child);

  // Minimize / restore window and relayout.
  void MinimizeDockedWindow(wm::WindowState* window_state);
  void RestoreDockedWindow(wm::WindowState* window_state);

  // Record user-initiated |action| by |source| in UMA metrics.
  void RecordUmaAction(DockedAction action, DockedActionSource source);

  // Updates |docked_width_| and UMA histograms.
  void UpdateDockedWidth(int width);

  // Updates docked layout state when a window gets inside the dock.
  void OnDraggedWindowDocked(WmWindow* window);

  // Updates docked layout state when a window gets outside the dock.
  void OnDraggedWindowUndocked();

  // Returns true if there are any windows currently docked.
  bool IsAnyWindowDocked();

  // Returns DOCKED_ALIGNMENT_LEFT if the |window|'s left edge is closer to
  // the |dock_container_|'s left edge than the |window|'s right edge to
  // the |dock_container_|'s right edge. Returns DOCKED_ALIGNMENT_RIGHT
  // otherwise.
  DockedAlignment GetEdgeNearestWindow(const WmWindow* window) const;

  // Called whenever the window layout might change.
  void Relayout();

  // Calculates target heights (and fills it in |visible_windows| array) such
  // that the vertical space is fairly distributed among the windows taking
  // into account their minimum and maximum size. Returns free vertical space
  // (positive value) that remains after resizing all windows or deficit
  // (negative value) if not all the windows fit.
  int CalculateWindowHeightsAndRemainingRoom(
      const gfx::Rect& work_area,
      std::vector<WindowWithHeight>* visible_windows);

  // Calculate ideal width for the docked area. It will get used to adjust the
  // dragged window or other windows as necessary.
  int CalculateIdealWidth(const std::vector<WindowWithHeight>& visible_windows);

  // Fan out windows evenly distributing the overlap or remaining free space.
  // Adjust the widths of the windows trying to make them all same. If this
  // is not possible, center the windows in the docked area.
  void FanOutChildren(const gfx::Rect& work_area,
                      int ideal_docked_width,
                      int available_room,
                      std::vector<WindowWithHeight>* visible_windows);

  // Updates |docked_bounds_| and workspace insets when bounds of docked windows
  // area change. Passing |reason| to observers allows selectively skipping
  // notifications.
  void UpdateDockBounds(DockedWindowLayoutManagerObserver::Reason reason);

  // Called whenever the window stacking order needs to be updated (e.g. focus
  // changes or a window is moved).
  void UpdateStacking(WmWindow* active_window);

  // keyboard::KeyboardControllerObserver:
  void OnKeyboardBoundsChanging(const gfx::Rect& keyboard_bounds) override;

  // Parent window associated with this layout manager.
  WmWindow* dock_container_;

  WmRootWindowController* root_window_controller_;

  // Protect against recursive calls to Relayout().
  bool in_layout_;

  // A window that is being dragged (whether docked or not).
  // Windows are tracked by docked layout manager only if they are docked;
  // however we need to know if a window is being dragged in order to avoid
  // positioning it or even considering it for layout.
  WmWindow* dragged_window_;

  // True if the window being dragged is currently docked.
  bool is_dragged_window_docked_;

  // Previously docked windows use a more relaxed dragging sorting algorithm
  // that uses assumption that a window starts being dragged out of position
  // that was previously established in Relayout. This allows easier reordering.
  bool is_dragged_from_dock_;

  // The shelf to respond to alignment changes.
  WmShelf* shelf_;

  // Tracks if any window in the same root window is in fullscreen mode.
  bool in_fullscreen_;
  // Current width of the dock.
  int docked_width_;

  // Last bounds that were sent to observers.
  gfx::Rect docked_bounds_;

  // Target bounds of a docked window being dragged.
  gfx::Rect dragged_bounds_;

  // True while in overview mode.
  bool in_overview_;

  // Side of the screen that the dock is positioned at.
  DockedAlignment alignment_;

  // The preferred alignment of the next window to be added to docked layout.
  DockedAlignment preferred_alignment_;

  // The current event source
  DockedActionSource event_source_;

  // The last active window. Used to maintain stacking order even if no windows
  // are currently focused.
  WmWindow* last_active_window_;

  // Timestamp of the last user-initiated action that changed docked state.
  // Used in UMA metrics.
  base::Time last_action_time_;

  // Observes shelf for bounds changes.
  std::unique_ptr<ShelfWindowObserver> shelf_observer_;

  // Widget used to paint a background for the docked area.
  std::unique_ptr<DockedBackgroundWidget> background_widget_;

  // Observers of dock bounds changes.
  base::ObserverList<DockedWindowLayoutManagerObserver> observer_list_;

  DISALLOW_COPY_AND_ASSIGN(DockedWindowLayoutManager);
};

}  // namespace ash

#endif  // ASH_COMMON_WM_DOCK_DOCKED_WINDOW_LAYOUT_MANAGER_H_


text:
<?php
if (!defined('MEDIAWIKI')) die();

$wgRestrictDisplayTitle = false;

#
# Uncomment this to debug
# require_once("$IP/extensions/WikiConfig/debugcode.php");
# $wgShowExceptionDetails= true; // shows the exception details on the screen - good for debugging, but possible security issue

require_once("$IP/extensions/WikiConfig/LockdownSetupVars.php");
/* Semantic MediaWiki requires 10 namespaces starting at the first available.
 * This will move the smw namespaces to start at the namespace below, and will run through this plus 9.
 * Once this has been initialized for this wiki, it should never be changed.  The next available namspace if you want to add
 * more custom namepaces should start at this + 10.  If you're not sure what you're doing with this, LEAVE IT ALONE!
 *
 * If you have already allocated custom namespaces, you should set this value to the first unallocated namespace index
 * Usually you start custom namespaces with 100, so if you've allocated 2 NS, then it would be 104 (Each NS actually takes to indices,
 *     the first for the namespace, the second for the talk of that namespace).
*/
# $smwgNamespaceIndex = 100;

/* Use these values to allocate new custom namespaces using the configuration automation scripts.  Do NOT change the order or do anything but append.
 * MW uses the indexes, so once created, they are unchangeable and will always remain there, even if you change the name of the namespace
*/
$lockdownNameSpaces = array();
$lockdownSMWSearchable = $lockdownNameSpaces;
$lockdownSMWTalkSearchable = $lockdownNameSpaces;
$lockdownApprovedUsersOnlyWiki = true ;
/*
 *$lockdownExtraPrivileges
 *	Designates access to additional user groups for a particular namespace.  In this way, you can allow multiple groups access to a single namespace.
 *  The index value is the namespace and the array indexed are the additional usergroups allowed
*/
#$lockdownExtraPrivileges = array( "ASM" => array("ref"),"REF" => array("asm"));

/* If you wish to have additional namespaces to be enabled for semantic links, or to override the defaults
 * they must be added to this array.
 * NOTE:  by default all namespaces that appear in $lockdownNameSpaces are generally set to true, so you don't have to put them here.
 * !!!Must be done before LockdownSetupPermissions.php is executed to have any effect!!!
*/
# $smwgNamespacesWithSemanticLinksAdd = array(NS_NS1 => false, NS_NS2 => false);

/* Set this line if you want to allow anyone (including not logged in) to view the un-protected namespaces of the wiki
*/
$wgGroupPermissions['*']['read'] = true;

/* Set this line if you want to allow only registered and approved users to access the wiki.  Doing so denies all access to other than approved users.
*/
#$lockdownApprovedUserOnlyWiki = true;

require_once( "$IP/extensions/WikiConfig/CommonLocal.php" );

require_once( "$IP/extensions/Vector/Vector.php" );
$wgDefaultUserOptions['useeditwarning'] = 1;
$wgVectorFeatures['editwarning']['user'] = true;
$wgVectorModules['editwarning']['global'] = true; // Don't enable EditWarning globally
$wgVectorModules['editwarning']['user'] = true; // Allow users to enable EditWarning in their preferences
$wgVectorUseSimpleSearch = true; // Need this as well for SimpleSearch
$wgDefaultSkin = 'vector'; // If you want to change the default skin for new users
$wgVectorUseIconWatch = true; //Enable star icon to add/remove page from watchlist

// UsabilityInitiative/WikiEditor
require_once("$IP/extensions/WikiEditor/WikiEditor.php");
$wgWikiEditorModules['toolbar']['global'] = true;  // Enable the WikiEditor toolbar for everyone
$wgWikiEditorModules['toolbar']['user'] = false;  // Don't allow users to turn the WikiEditor toolbar on/off individually
# Enables use of WikiEditor by default but still allow users to disable it in preferences
$wgDefaultUserOptions['usebetatoolbar'] = 1;
$wgDefaultUserOptions['usebetatoolbar-cgd'] = 1;

# Displays the Preview and Changes tabs
$wgDefaultUserOptions['wikieditor-preview'] = 1;

# Displays the Publish and Cancel buttons on the top right side
$wgDefaultUserOptions['wikieditor-publish'] = 1;
# require_once("$IP/extensions/LiquidThreads/LiquidThreads.php");

# require_once("$IP/extensions/LiquidThreads/LiquidThreads.php");

require_once( "$IP/extensions/ExternalData/ExternalData.php" );
require_once( "$IP/extensions/Arrays/Arrays.php" );
require_once( "$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php" );
#require_once( "$IP/extensions/Calendar/Calendar.php" );
#require_once( "$IP/extensions/PdfBook/PdfBook.php" );
# require_once( "$IP/extensions/Collection/Collection.php" );
# require_once( "$IP/extensions/Collection/Collection.php" );
require_once( "$IP/extensions/SemanticInternalObjects/SemanticInternalObjects.php" );
require_once( "$IP/extensions/SemanticFormsInputs/SemanticFormsInputs.php" );
#require_once( "$IP/extensions/SemanticQueryFormTool/includes/SQFT_Settings.php") ;
#require_once( "$IP/extensions/UrlGetParameters/UrlGetParameters.php" );
#require_once( "$IP/extensions/AllowGetParamsInWikilinks/AllowGetParamsInWikilinks.php" );

#require_once( "$IP/extensions/FCKeditor/FCKeditor.php" );

#OpenID Setup
define('Auth_OpenID_RAND_SOURCE', null);
require_once( "$IP/extensions/OpenID/OpenID.php" );

$wgWhitelistRead[] = "Special:OpenIDLogin";
$wgGroupPermissions['*']['viewedittab']=false;
$wgGroupPermissions['sysop']['viewedittab']=true;
$wgGroupPermissions['bureaucrat']['viewedittab']=true;

require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php");
require_once( "$IP/extensions/ConfirmEdit/ReCaptcha.php");
$wgCaptchaClass = 'ReCaptcha';
$wgReCaptchaPublicKey = '6Lcs2swSAAAAADkmNC86S72hGZj5AdaRyE9KYWGT';
$wgReCaptchaPrivateKey = '6Lcs2swSAAAAADlQoYcSpaexLbZHuS4wTs1p1xAu';

$wgCaptchaTriggers['edit']          = false;
$wgCaptchaTriggers['create']        = false;
$wgCaptchaTriggers['addurl']        = false;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin']      = true;

$sfgRenameMainEditTab=true;
# $wgMessageCache->addMessages( array('sf_editsource' => "Edit Data"), 'en' );
#
# Each privilege you want to lock out will specify only those given privileges will be allowed.
# Each privilege and group must be explicitly stated or lockdown doesn't happen for that privilege
#
# Implicit group for all visitors

# define( 'NS_WIDGET' , 498 );
# require_once( "$IP/extensions/Widgets/Widgets.php" );
# $wgGroupPermissions['sysop']['editwidgets'] = true;

#$wgNewUserNotifSender
#        Email address of the sender of the email
#        Defaults to the value of $wgPasswordSender
#
#$wgNewUserNotifTargets
#        Array containing the usernames or identifiers of those who should receive
#        a notification email. Email will not be sent unless the recipient's
#        email address has been validated, where this is required in the site
#        configuration.
#
#        Defaults to the first user (usually the wiki's primary administrator)
#

require_once("$IP/extensions/NewUserNotif/ExtendedParamsExample.php");
# require_once("$IP/extensions/VisualEditor/VisualEditor.php");

// OPTIONAL: Enable VisualEditor in other namespaces
// By default, VE is only enabled in NS_MAIN
//$wgVisualEditorNamespaces[] = NS_PROJECT;

// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;

// Don't allow users to disable it
$wgHiddenPrefs[] = 'visualeditor-enable';

// OPTIONAL: Enable VisualEditor's experimental code features
//$wgVisualEditorEnableExperimentalCode = true;

$wgNewUserNotifEmailTargets = array( "accessapprover@".$_SERVER['SERVER_NAME'] );

# Set up to notify specified user(s) of all changes
$wgEnotifWatchlist = true;

## Declare this twice so it works for all versions
# $wgUsersNotifiedOnAllChanges = $wgUsersNotifedOnAllChanges = array( 'sysop' );

#        Array containing email addresses to which a notification should also be sent
#        Defaults to no additional addresses
$wgPasswordSender = "no-reply@".$_SERVER['SERVER_NAME'];

$wgUploadPath = "/".$wgSitename."/img_auth.php";
$wgUploadDirectory = realpath("$IP/../".$wgSitename."IMG");

$wgFileExtensions[] = "mdb";

$wgShowExceptionDetails= true;

$wgFileExtensions[] = "zip";
$wgFileExtensions[] = "conf";

# this is required if you are going to allow uploading of zip files (may not be recommended)

foreach ($wgMimeTypeBlacklist as $xtype) if ($xtype <> 'application/zip') $tmpType[] = $xtype;
$wgMimeTypeBlacklist = $tmpType;
unset($tmpType);

$wgLogo = "{$wgScriptPath}/extensions/PSITexLogo.png";
$wgFavicon = "{$wgScriptPath}/extensions/favicon.ico";

/*
ob_start();
foreach($lockdownNameSpaces as $thisNS)
{
	echo ("$thisNS: ".constant("NS_".$thisNS)." \n");
	echo ($thisNS."_talk: ".constant("NS_".$thisNS."_talk")." \n");
	var_dump($wgNamespacePermissionLockdown[constant("NS_$thisNS")]);
	echo "\n";
	var_dump($wgNamespacePermissionLockdown[constant("NS_".$thisNS."_talk")]);
}
$lresult = ob_get_clean();
error_log(__METHOD__."\n$lresult\n", 3, $wgDebugLogFile);
*/

redpajama_set_name: RedPajamaGithub


text:
(function(root) {
  root.AV = root.AV || {};
  var AV = root.AV;

  AV.Installation = AV.Object.extend("_Installation");

  /**
   * Contains functions to deal with Push in AV
   * @name AV.Push
   * @namespace
   */
  AV.Push = AV.Push || {};

  /**
   * Sends a push notification.
   * @param {Object} data -  The data of the push notification.  Valid fields
   * are:
   *

   *
channels - An Array of channels to push to.

   *
push_time - A Date object for when to send the push.

   *
expiration_time -  A Date object for when to expire
   *         the push.

   *
expiration_interval - The seconds from now to expire the push.

   *
where - A AV.Query over AV.Installation that is used to match
   *         a set of installations to push to.

   *
cql - A CQL statement over AV.Installation that is used to match
   *         a set of installations to push to.

   *
data - The data to send as part of the push

   *

   * @param {Object} options An object that has an optional success function,
   * that takes no arguments and will be called on a successful push, and
   * an error function that takes a AV.Error and will be called if the push
   * failed.
   */
  AV.Push.send = function(data, options) {
    if (data.where) {
      data.where = data.where.toJSON().where;
    }

    if(data.where && data.cql){
      throw "Both where and cql can't be set";
    }

    if (data.push_time) {
      data.push_time = data.push_time.toJSON();
    }

    if (data.expiration_time) {
      data.expiration_time = data.expiration_time.toJSON();
    }

    if (data.expiration_time && data.expiration_time_interval) {
      throw "Both expiration_time and expiration_time_interval can't be set";
    }

    var request = AV._request('push', null, null, 'POST', data);
    return request._thenRunCallbacks(options);
  };
}(this));


text:
'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
	Schema = mongoose.Schema;

/**
 * Kittens Schema
 */
var KittensSchema = new Schema({
	// Kittens model fields
	name: {
   type: String,
   default: '',
   required: 'Please fill Kitten name',
   trim: true
 },
 created: {
   type: Date,
   default: Date.now
 },
 user: {
   type: Schema.ObjectId,
   ref: 'User'
 },
 kittens: [ { type: Schema.ObjectId, ref: 'Kitten' } ]
});

mongoose.model('Kittens', KittensSchema);


text:
/*

390. Elimination Game

There is a list of sorted integers from 1 to n.
Starting from left to right, remove the first number and every other number afterward until you reach the end of the list.

Repeat the previous step again, but this time from right to left, remove the right most number and every other number from the remaining numbers.

We keep repeating the steps again, alternating left to right and right to left, until a single number remains.

Find the last number that remains starting with a list of length n.

Example:

Input:
n = 9,
1 2 3 4 5 6 7 8 9
2 4 6 8
2 6
6

Output:
6

*/

class Solution {
public:
    // Time: O(logn)
    // Space: O(logn)
    int lastRemaining(int n) {
        return n == 1 ? 1 : 2 * (1 + n/2 - lastRemaining(n/2));
    }
};


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.unibamberg.minf</groupId>
	<artifactId>dme</artifactId>
	<version>3.2.0-RELEASE</version>
	<packaging>war</packaging>
	<name>DARIAH-DE Data Modeling Environment</name>
	<description>DARIAH-DE Data Modeling Environment</description>
	<properties>
		<java-version>1.8</java-version>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<de.unibamberg.minf.core.core-metamodel.version>4.3.0</de.unibamberg.minf.core.core-metamodel.version>
		<de.unibamberg.minf.core.core-util.version>2.1.1</de.unibamberg.minf.core.core-util.version>
		<de.unibamberg.minf.core.core-web.version>2.1.2</de.unibamberg.minf.core.core-web.version>
		<de.unibamberg.minf.processing.processing-version>3.4.2</de.unibamberg.minf.processing.processing-version>
		<de.unibamberg.minf.gtf-version>1.3.3</de.unibamberg.minf.gtf-version>

		<eu.dariah.de.dariahsp-version>1.2.2-SNAPSHOT</eu.dariah.de.dariahsp-version>

		<com.fasterxml.jackson-version>2.9.6</com.fasterxml.jackson-version>

		<org.springframework-version>4.3.6.RELEASE</org.springframework-version>
		<org.springsecurity-version>4.2.1.RELEASE</org.springsecurity-version>
		<org.apache.tiles-version>3.0.7</org.apache.tiles-version>
		<org.slf4j-version>1.7.22</org.slf4j-version>
		<ch.qos.logback.version>1.1.3</ch.qos.logback.version>
		<org.antlr4-version>4.5.3</org.antlr4-version>
	</properties>

	<dependencies>

		<!-- DARIAH -->
		<dependency>
			<groupId>de.unibamberg.minf.core</groupId>
			<artifactId>core-metamodel</artifactId>
			<version>${de.unibamberg.minf.core.core-metamodel.version}</version>
		</dependency>

		<!-- To import old schemas for migration -->
		<dependency>
			<groupId>eu.dariah.de.minfba.core-legacy</groupId>
			<artifactId>core-metamodel</artifactId>
			<version>3.3.0-SNAPSHOT</version>
		</dependency>

		<dependency>
			<groupId>de.unibamberg.minf.core</groupId>
			<artifactId>core-web</artifactId>
			<version>${de.unibamberg.minf.core.core-web.version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.core</groupId>
			<artifactId>core-util</artifactId>
			<version>${de.unibamberg.minf.core.core-util.version}</version>
		</dependency>

		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-base</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-core</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-extension-file</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-extension-wiki</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-extension-geo</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-extension-nlp</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-extension-vocabulary</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>
		<dependency>
			<groupId>de.unibamberg.minf.gtf</groupId>
			<artifactId>gtf-extension-dai</artifactId>
			<version>${de.unibamberg.minf.gtf-version}</version>
		</dependency>

		<dependency>
			<groupId>de.unibamberg.minf.processing</groupId>
			<artifactId>processing</artifactId>
			<version>${de.unibamberg.minf.processing.processing-version}</version>
		</dependency>

		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${org.springframework-version}</version>
			<exclusions>
				<!-- Exclude Commons Logging in favor of SLF4j -->
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${org.springframework-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.3.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
			<version>4.3.2</version>
		</dependency>

		<!-- Security -->
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-core</artifactId>
			<version>${org.springsecurity-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-web</artifactId>
			<version>${org.springsecurity-version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-config</artifactId>
			<version>${org.springsecurity-version}</version>
		</dependency>

		<dependency>
			<groupId>eu.dariah.de</groupId>
			<artifactId>dariahsp-core</artifactId>
			<version>${eu.dariah.de.dariahsp-version}</version>
		</dependency>

		<!-- <dependency>
			<groupId>de.dariah</groupId>
			<artifactId>dariah-javasp-core</artifactId>
			<version>0.0.3-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>de.dariah</groupId>
			<artifactId>dariah-javasp-web</artifactId>
			<version>0.0.3-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>de.dariah</groupId>
			<artifactId>spring-security-saml2-core</artifactId>
			<version>0.0.3-SNAPSHOT</version>
		</dependency> -->

		<!-- Persistence -->
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-mongodb</artifactId>
			<version>1.10.6.RELEASE</version>
		</dependency>
		<dependency>
		    <groupId>org.mongodb</groupId>
		    <artifactId>mongo-java-driver</artifactId>
		    <version>3.4.2</version>
		</dependency>

		<!-- Model validation -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>5.2.2.Final</version>
		</dependency>

		<!-- XML Schema processing -->
		<dependency>
			<groupId>xerces</groupId>
			<artifactId>xercesImpl</artifactId>
			<version>2.11.0</version>
		</dependency>

		<!-- Tiles -->
		<dependency>
			<groupId>org.apache.tiles</groupId>
			<artifactId>tiles-core</artifactId>
			<version>${org.apache.tiles-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.tiles</groupId>
			<artifactId>tiles-jsp</artifactId>
			<version>${org.apache.tiles-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.tiles</groupId>
			<artifactId>tiles-api</artifactId>
			<version>${org.apache.tiles-version}</version>
		</dependency>

		<!-- Logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${org.slf4j-version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${org.slf4j-version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>log4j-over-slf4j</artifactId>
			<version>${org.slf4j-version}</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-core</artifactId>
			<version>${ch.qos.logback.version}</version>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${ch.qos.logback.version}</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.1.0</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
		<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
		    <groupId>com.fasterxml.jackson.core</groupId>
		    <artifactId>jackson-databind</artifactId>
		    <version>${com.fasterxml.jackson-version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-joda</artifactId>
			<version>${com.fasterxml.jackson-version}</version>
		</dependency>
		<dependency>
		    <groupId>com.fasterxml.jackson.core</groupId>
		    <artifactId>jackson-annotations</artifactId>
		    <version>${com.fasterxml.jackson-version}</version>
		</dependency>

		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.3.1</version>
		</dependency>

		<!-- Joda Time -->
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.8.2</version>
		</dependency>
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time-jsptags</artifactId>
			<version>1.1.1</version>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${org.springframework-version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.10.19</version>
			<scope>test</scope>
		</dependency>
		<!-- <dependency>
			<groupId>com.lordofthejars</groupId>
			<artifactId>nosqlunit-mongodb</artifactId>
			<version>0.8.1</version>
		</dependency> -->

	</dependencies>

	<repositories>
		<repository>
			<id>dariah-releases</id>
			<name>DARIAH MInf Release Repository</name>
			<url>https://minfba.de.dariah.eu/artifactory/dariah-release-proxy</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>dariah-snapshots</id>
			<name>DARIAH MInf Snapshot Repository</name>
			<url>https://minfba.de.dariah.eu/artifactory/dariah-snapshot-proxy</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	 <distributionManagement>
		<repository>
			<id>central</id>
			<url>https://minfba.de.dariah.eu/artifactory/dariah-release-proxy</url>
		</repository>
		<snapshotRepository>
			<id>snapshots</id>
			<url>https://minfba.de.dariah.eu/artifactory/dariah-snapshot-proxy</url>
		</snapshotRepository>
	</distributionManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>yuicompressor-maven-plugin</artifactId>
				<version>1.5.1</version>
				<executions>
					<execution>
						<goals>
							<goal>compress</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<nosuffix>true</nosuffix>
					<webappDirectory>${project.build.directory}/min</webappDirectory>
					<excludes>
			            <exclude>**/*.min.js</exclude>
			        </excludes>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<webResources>
						<resource>
							<directory>${project.build.directory}/min</directory>
						</resource>
					</webResources>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>dariah.deb</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>jdeb</artifactId>
						<groupId>org.vafer</groupId>
						<version>1.4</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jdeb</goal>
								</goals>
								<configuration>
									<snapshotExpand>true</snapshotExpand>
									<dataSet>
									  <data>
									    <type>directory</type>
									    <src>${project.build.directory}/${project.build.finalName}</src>
									    <mapper>
									      <type>perm</type>
									      <prefix>/var/dfa/webapps/${project.artifactId}</prefix>
									      <user>root</user>
									      <group>tomcat7</group>
									      <filemode>755</filemode>
									    </mapper>
									  </data>
									</dataSet>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>


text:
.class Landroid/widget/TextView$ChangeWatcher;
.super Ljava/lang/Object;
.source "TextView.java"

# interfaces
.implements Landroid/text/TextWatcher;
.implements Landroid/text/SpanWatcher;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/widget/TextView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "ChangeWatcher"
.end annotation

# instance fields
.field private mBeforeText:Ljava/lang/CharSequence;

.field final synthetic this$0:Landroid/widget/TextView;

# direct methods
.method private constructor <init>(Landroid/widget/TextView;)V
    .locals 0
    .parameter

    .prologue
    .line 8859
    iput-object p1, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Landroid/widget/TextView;Landroid/widget/TextView$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 8859
    invoke-direct {p0, p1}, Landroid/widget/TextView$ChangeWatcher;-><init>(Landroid/widget/TextView;)V

    return-void
.end method

# virtual methods
.method public afterTextChanged(Landroid/text/Editable;)V
    .locals 1
    .parameter "buffer"

    .prologue
    .line 8891
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->sendAfterTextChanged(Landroid/text/Editable;)V

    .line 8893
    const/16 v0, 0x800

    invoke-static {p1, v0}, Landroid/text/method/MetaKeyKeyListener;->getMetaState(Ljava/lang/CharSequence;I)I

    move-result v0

    if-eqz v0, :cond_0

    .line 8894
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-static {v0, p1}, Landroid/text/method/MetaKeyKeyListener;->stopSelecting(Landroid/view/View;Landroid/text/Spannable;)V

    .line 8896
    :cond_0
    return-void
.end method

.method public beforeTextChanged(Ljava/lang/CharSequence;III)V
    .locals 1
    .parameter "buffer"
    .parameter "start"
    .parameter "before"
    .parameter "after"

    .prologue
    .line 8868
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    #getter for: Landroid/view/View;->mContext:Landroid/content/Context;
    invoke-static {v0}, Landroid/widget/TextView;->access$600(Landroid/widget/TextView;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Landroid/view/accessibility/AccessibilityManager;->getInstance(Landroid/content/Context;)Landroid/view/accessibility/AccessibilityManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/accessibility/AccessibilityManager;->isEnabled()Z

    move-result v0

    if-eqz v0, :cond_2

    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->getInputType()I

    move-result v0

    #calls: Landroid/widget/TextView;->isPasswordInputType(I)Z
    invoke-static {v0}, Landroid/widget/TextView;->access$700(I)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    #calls: Landroid/widget/TextView;->hasPasswordTransformationMethod()Z
    invoke-static {v0}, Landroid/widget/TextView;->access$800(Landroid/widget/TextView;)Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    #calls: Landroid/widget/TextView;->shouldSpeakPasswordsForAccessibility()Z
    invoke-static {v0}, Landroid/widget/TextView;->access$900(Landroid/widget/TextView;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 8871
    :cond_1
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->mBeforeText:Ljava/lang/CharSequence;

    .line 8874
    :cond_2
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    #calls: Landroid/widget/TextView;->sendBeforeTextChanged(Ljava/lang/CharSequence;III)V
    invoke-static {v0, p1, p2, p3, p4}, Landroid/widget/TextView;->access$1000(Landroid/widget/TextView;Ljava/lang/CharSequence;III)V

    .line 8875
    return-void
.end method

.method public onSpanAdded(Landroid/text/Spannable;Ljava/lang/Object;II)V
    .locals 7
    .parameter "buf"
    .parameter "what"
    .parameter "s"
    .parameter "e"

    .prologue
    const/4 v3, -0x1

    .line 8907
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    move-object v1, p1

    move-object v2, p2

    move v4, p3

    move v5, v3

    move v6, p4

    invoke-virtual/range {v0 .. v6}, Landroid/widget/TextView;->spanChange(Landroid/text/Spanned;Ljava/lang/Object;IIII)V

    .line 8908
    return-void
.end method

.method public onSpanChanged(Landroid/text/Spannable;Ljava/lang/Object;IIII)V
    .locals 7
    .parameter "buf"
    .parameter "what"
    .parameter "s"
    .parameter "e"
    .parameter "st"
    .parameter "en"

    .prologue
    .line 8901
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    move-object v1, p1

    move-object v2, p2

    move v3, p3

    move v4, p5

    move v5, p4

    move v6, p6

    invoke-virtual/range {v0 .. v6}, Landroid/widget/TextView;->spanChange(Landroid/text/Spanned;Ljava/lang/Object;IIII)V

    .line 8902
    return-void
.end method

.method public onSpanRemoved(Landroid/text/Spannable;Ljava/lang/Object;II)V
    .locals 7
    .parameter "buf"
    .parameter "what"
    .parameter "s"
    .parameter "e"

    .prologue
    const/4 v4, -0x1

    .line 8913
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    move-object v1, p1

    move-object v2, p2

    move v3, p3

    move v5, p4

    move v6, v4

    invoke-virtual/range {v0 .. v6}, Landroid/widget/TextView;->spanChange(Landroid/text/Spanned;Ljava/lang/Object;IIII)V

    .line 8914
    return-void
.end method

.method public onTextChanged(Ljava/lang/CharSequence;III)V
    .locals 2
    .parameter "buffer"
    .parameter "start"
    .parameter "before"
    .parameter "after"

    .prologue
    .line 8880
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-virtual {v0, p1, p2, p3, p4}, Landroid/widget/TextView;->handleTextChanged(Ljava/lang/CharSequence;III)V

    .line 8882
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    #getter for: Landroid/view/View;->mContext:Landroid/content/Context;
    invoke-static {v0}, Landroid/widget/TextView;->access$1100(Landroid/widget/TextView;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Landroid/view/accessibility/AccessibilityManager;->getInstance(Landroid/content/Context;)Landroid/view/accessibility/AccessibilityManager;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/accessibility/AccessibilityManager;->isEnabled()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->isFocused()Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->isSelected()Z

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    invoke-virtual {v0}, Landroid/widget/TextView;->isShown()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 8884
    :cond_0
    iget-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->this$0:Landroid/widget/TextView;

    iget-object v1, p0, Landroid/widget/TextView$ChangeWatcher;->mBeforeText:Ljava/lang/CharSequence;

    invoke-virtual {v0, v1, p2, p3, p4}, Landroid/widget/TextView;->sendAccessibilityEventTypeViewTextChanged(Ljava/lang/CharSequence;III)V

    .line 8885
    const/4 v0, 0x0

    iput-object v0, p0, Landroid/widget/TextView$ChangeWatcher;->mBeforeText:Ljava/lang/CharSequence;

    .line 8887
    :cond_1
    return-void
.end method


text:
using System;

namespace Glympse.EnRoute.Android
{
    class Agent : GAgent
    {
        private com.glympse.enroute.android.api.GAgent _raw;

        public Agent(com.glympse.enroute.android.api.GAgent raw)
        {
            _raw = raw;
        }

        public long getId()
        {
            return _raw.getId();
        }

        public string getName()
        {
            return _raw.getName();
        }

        public string getEmail()
        {
            return _raw.getEmail();
        }

        public object raw()
        {
            return _raw;
        }
    }
}


text:
 Settings

Settings

				Ace settings functions and cookie/localStorage feature is saved inside assets/js/ace-extra.js

				If you want these features, it's best to include this file
				inside document head

				The script to restore user saved settings is placed immediately after the relevant element's HTML code:

			This will cause the element's status be restored as soon as it is inserted into DOM.

			If you call the functions after page load, for example in jQuery's document ready event,
			there may be a delay between the initial state and the saved state.

			It may not be noticeable for fixed navbar, etc, but for collapsed sidebar or other settings, it can get noticeable.

			The try/catch block is used so that if you don't want to use  ace-extra.js,
			the browser doesn't raise any errors.

			In that case you can remove the code if it's not necessary.

		Page Options

Fixed Navbar

				For fixed navbar, you should add .navbar-fixed-top class
				to .navbar element:

  ...

				You can also use the following javascript code to do this:

 ace.settings.navbar_fixed(null, true, true);//first parameter is null or reference to navbar element
 ace.settings.navbar_fixed(document.getElementById('navbar'), true, true);

				First parameter is a reference to navbar element. If null #navbar will be used.

				Second parameter determines whether navbar should become fixed or not.

				Third paramtere determines whether you want to save the changes to cookies/localStorage
				for later retrieval

				In smaller devices, fixed navbar content may become too large
				and ends up in more that two rows.

				In that case you may need to add extra padding to content area
				using CSS and media rules or enable auto padding option when building your custom Javascript

Fixed Breadcrumbs

				For fixed breadcrumbs, you should add .breadcrumbs-fixed class
				to .breadcrumbs element:

  ...

				If you want to do this using Javascript, you can use this code:

 ace.settings.breadcrumbs_fixed(null, true, true);//first parameter is null or reference to breadcrumbs element
 ace.settings.breadcrumbs_fixed(document.getElementById('breadcrumbs'), true, true);

				First parameter is a reference to breadcrumbs element. If null #breadcrumbs will be used.

				Second parameter determines whether breadcrumbs should become fixed or not.

				Third paramtere determines whether you want to save the changes to cookies/localStorage
				for later retrieval

				Currently, fixed breadcrumbs are only available when device with is above
				991px
				which you can change that by modifying @screen-fixed-breadcrumbs variable
				inside assets/css/less/variables.less files and recompiling ace.less.

				The reason for this is that in smaller devices, fixed breadcrumbs and fixed navbar
				may take up a lot of space!

				Anyway, if in smaller devices, your fixed breadcrumbs content is too large
				and ends up in more that two rows, you may need to add extra padding to content area
				using CSS and media rules or enable auto padding option when building your custom Javascript

Inside container

				For fixed container width, you should add .container class
				to .navbar-container and .main-container elements:

     ...

     ...

				If you want to do this using Javascript, you can use this code:

 ace.settings.main_container_fixed(null, true, true);//first parameter is null or reference to container element
 ace.settings.main_container_fixed(document.getElementById('main-container'), true, true);

				First parameter is a reference to container element. If null #main-container will be used.

				Second parameter determines whether navbar should become fixed or not.

				Third paramtere determines whether you want to save the changes to cookies/localStorage
				for later retrieval.

				Currently Bootstrap doesn't allow fixed width container on specific widths only.

				You can enable auto container option when building a custom Javascript to
				activate fixed container only when device width is more than 1140px.

$(window).on('resize.auto_container', function() {
    var enable = $(this).width() > 1140;
    try {
       ace.settings.main_container_fixed(enable, false, false);
    } catch(e) {}
}).triggerHandler('resize.auto_container');

Sidebar Settings

				For fixed sidebar, you should add .sidebar-fixed class
				to .sidebar element:

  ...

				If you want to do this using Javascript, you can use this code:

 ace.settings.sidebar_fixed(null, true, true);//first element is null or reference to sidebar element
 ace.settings.sidebar_fixed(document.getElementById('sidebar'), true, true);

				First parameter is a reference to sidebar element. If null #sidebar will be used.

				Second parameter determines whether sidebar should become fixed or not.

				Third paramtere determines whether you want to save the changes to cookies/localStorage
				for later retrieval.

				For minimized sidebar, you should add .menu-min class
				to .sidebar element:

  ...

				If you want to do this using Javascript, you can use this code:

 ace.settings.sidebar_collapsed(null, true, true);//first param is null or reference to sidebar element
 ace.settings.sidebar_collapsed(document.getElementById('sidebar'), true, true);

				First parameter is a reference to sidebar element. If null, #sidebar will be used.

				Second parameter determines whether sidebar should become minimized or not.

				Third paramtere determines whether you want to save the changes to cookies/localStorage
				for later retrieval.

				For other sidebar options and settings please see Sidebar options

Setting Events

				When a settings box option or sidebar collapse/expand button is clicked an event is triggered which may be useful
				in case you use settings box and want to respond to user changes

				The event name is settings.ace and
				has two extra arguments.

				The first is event name and the second is the new status:

$(document).on('settings.ace', function(event, name, status) {
    //name is one of the following
    //navbar_fixed
    //sidebar_fixed
    //breadcrumbs_fixed
    //main_container_fixed
    //sidebar_collapsed

    //status is either true or false

    if(name == 'sidebar_fixed' && status == false) {
        //sidebar was unfixed by user, do something
    }
}

Skins

				There are currently 4 skins available which changes sidebar and navbar colors,
				which are:

.no-skin

.skin-1

.skin-2

.skin-3 To use .skin-3 you should add .no-skin class as well

				To use a skin simply update body element's class name:

<body class="skin-2">
...

				Inside settings box when you select a skin some other parts change as well.

				For example shortcut buttons or navbar user dropdown buttons.

				For that you should update some class names in your HTML code:

 <button class="btn btn-primary btn-white"></button>

  ...

				Default skin in included and compiled with ace.css
				but for other skins you should include ace-skins.css

				You can also compile main css ace.css using another skin.

				Please refer to Ace Skins section for more info.

				If you want to save a selected skin and retrieve it when user navigates to a different page or refreshes page,
				there are several approaches for that depending on your application.

				One way is to save selected skin inside a cookie and apply changes
				in your server side code when user requests a page:

 $('#ace-settings-skin').on('change', function() {
   ace.settings.set('skin', this.value);
 })

And in your server side code:

$skin = $_COOKIE['ace_skin'];
echo '<body class="'.$skin.'">';
//...
//...
echo '<li class="'.some_modification_based_on_selected_skin($skin).'">';

			Of course it's the simplest way and things would be different depending on your application

RTL

				RTL (right to left) direction is used for Arabic, Hebrew and Persian languages

				It's best to make RTL changes directly inside your HTML rather than using Javascript dynamically at runtime.

				You should make the following changes for RTL:

Include assets/css/ace-rtl.css

Add .rtl class to body element

 Switch classes that have -right or -left

						For example:

						.pull-right & .pull-left

						or

						.no-padding-left & .no-padding-right

						or

						.arrowed & .arrowed-right

				Also please note that RTL horizontal scrolling is inconsistent between browsers.

				So it's better to change scrollbars to LTR and make the content RTL again.

				You can use .make-ltr and .make-rtl classes:

 $('#my-content').addClass('make-ltr')
 .find('.scroll-content').wrapInner('<div class="make-rtl" />');

				Some plugins support RTL and you should specify the options when initiating plugins:

For Chosen plugin add .chosen-rtl to the element

For jqGrid plugin specify direction:'rtl' option

For jQuery UI datepicker specify isRTL:true option

For FullCalendar plugin set isRTL:true option

				Sometimes when using RTL option of settings box for multiple times,
				you elements are misplaced in some browsers.

				This is probably because browsers don't redraw elements.

				It won't be a problem in your application, because you should enable RTL
				inside your server side response and not dynamically inside browser.

Cookies & Storage

				Cookie and localStorage functionality has been added to save/load variables and settings
				which is defined inside ace-extra.js

//cookie functions
ace.cookie.set(name, value, expires, path, domain, secure);
ace.cookie.get(name);
ace.cookie.remove(name, path);

//localStorage functions
ace.storage.set(key, value);
ace.storage.get(key);
ace.storage.remove(key);

				ace.data_storage is a wrapper which by default chooses localStorage if available.

				Otherwise it will use cookies for saving data which you can change that by specifying an optional argument:

ace.data = new ace.data_storage();//use localStorage if available otherwise use cookies
ace.data = new ace.data_storage(1);//use localStorage
ace.data = new ace.data_storage(2);//use cookies

//save/load values with namespace (for example 'settings')
//ace.data.set(namespace, key, value);
ace.data.set('settings', 'sidebar-collapsed', 1);
var collapsed = ace.data.get('settings', 'sidebar-collapsed');
ace.data.remove('settings', 'sidebar-collapsed');

//save/load values without namespace
ace.data.set('username', 'alex');
var username = ace.data.get('username');
ace.data.remove('username');

Settings Box

				Settings container (.ace-settings-container) should be the first child of
				.page-content

				It contains
				.ace-settings-btn and .ace-settings-box
				which consists of several .ace-settings-item elements:

            <input type="checkbox" id="ace-settings-navbar" class="ace" />
             Fixed Navbar

		...

  .
  .
  .


text:
namespace BeerApp.Web.Controllers
{
    using System.Collections.Generic;
    using System.Linq;
    using System.Web.Mvc;
    using Infrastructure.Mapping;
    using Services.Data;
    using ViewModels.Beer;
    using ViewModels.Country;

    [Authorize]
    public class CountryController : BaseController
    {
        private readonly ICountriesService countries;

        public CountryController(ICountriesService countries)
        {
            this.countries = countries;
        }

        [HttpGet]
        public ActionResult All()
        {
            var countriesView = this.Cache.Get(
                   "countries",
                   () => this.Mapper.Map<ICollection<SimpleCountryResponseViewModel>>(this.countries.GetAll().OrderBy(c => c.Name)).ToList(),
                   3 * 60 * 60);
            //var countries = this.countries.GetAll().OrderBy(c => c.Name).ToList();

            //var viewModel = this.Mapper.Map<ICollection<SimpleCountryResponseViewModel>>(countries);

            //return this.View(viewModel);
            return this.View(countriesView);
        }

        [HttpGet]
        public ActionResult Details(string id)
        {
            var country = this.countries.GetById(id);

            var viewModel = this.Mapper.Map<CountryResponseViewModel>(country);

            return this.View(viewModel);
        }
    }
}


text:
package com.xinyiglass.springSample.dao;

import com.xinyiglass.springSample.entity.MenuLineVO;

import xygdev.commons.entity.PlsqlRetValue;
import xygdev.commons.entity.SqlResultSet;

public interface MenuLineVODao {

	public Long autoAddSequence(Long menuId) throws Exception;

	public SqlResultSet findMenuLineForJSON(Long menuId,Long menuSeq) throws Exception;

	public PlsqlRetValue insert(MenuLineVO m) throws Exception;

	public MenuLineVO findByMenuId(Long menuId,Long menuSeq) throws Exception;

	public PlsqlRetValue lock(MenuLineVO m) throws Exception;

	public PlsqlRetValue update(MenuLineVO m) throws Exception;
}


text:
[![Build Status](https://semaphoreci.com/api/v1/nemanja-m/matrix/branches/master/badge.svg)](https://semaphoreci.com/nemanja-m/matrix)

Intelligent-Agent Development Framework


text:
var express = require('express'),
    router = express.Router(),
    models = require('../models');

router.get('/activities/:id(\\d+)', require('../helpers/auth_check'), function (req, res) {
  models.Activity.findOne({
    where: {
      id: req.params.id
    }
  }).then(function (activity) {
    if(activity){
      models.ActivityJoined.findAll({
        where: {
          ActivityId: req.params.id
        },
        include: [
          {
            model: models.User
          }
        ]
      }).then(function (list) {
        var isJoined = false;
        for(var i = 0;i < list.length;i++){
          if(list[i].get('User').get('id') == req.user.id){
            isJoined = true;
            break;
          }
        }
        res.render('detail.html', {
          message: req.flash('info'),
          activity: activity,
          participants: list,
          isJoined: isJoined
        });
      });
    }else{
      res.redirect('/');
    }
  })
});

router.post('/activities/:id(\\d+)', require('../helpers/auth_check'), function (req, res) {
  var path = '/activities/' + req.params.id;
  models.ActivityJoined.findOne({
    where: {
      UserId: req.user.id,
      ActivityId: req.params.id
    }
  }).then(function (result) {
    if(result){
      result.destroy();
      req.flash('info', '已成功取消参加该活动!');
      res.redirect(path);
    }else{
      models.ActivityJoined.create({
        ActivityId: req.params.id,
        UserId: req.user.id
      }).then(function () {
        req.flash('info', '已成功参加该活动!');
        res.redirect(path);
      });
    }
  });
});

module.exports = router;


text:
<?php /** @var ReportController $this */ ?>
<?php /** @var Categories[]     $categories*/ ?>

    <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Selecciona una categoría</button>
    <input type="hidden" id="cat1-value" />

        <?php foreach ($this->getCat1() as $cat1): ?>

                <a class="cat1" role="menuitem" data-val="<?= $cat1->id ?>"><?= $cat1->name; ?>

        <?php endforeach; ?>

    <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Selecciona una subcategoría</button>
    <input type="hidden" id="cat2-value" />


text:
#ifndef DMDIR_TEST_H
#define DMDIR_TEST_H

#include "dmtest.h"

DM_BEGIN_NAMESPACE
class DM_DLL_EXPORT DirTest : public Test
{
public:
    virtual dbool init();
    virtual void cleanup();

    virtual void run();
};
DM_END_NAMESPACE
#endif // DMDIR_TEST_H


text:
/*******************************************************************
* Program : CS388a Assignment #2 - Asteroids
* Author  : William Spaetzel
* Student#: 250115373
* File    : AsteroidInterface.h
* Modified: Oct 24, 3003
* Description: Controls the behavior of the asteroids and draws them
*				to the screen
********************************************************************/

#ifndef ASTEROID_INTERFACE
#define ASTEROID_INTERFACE

#include "AsteroidTypes.h"
#include "ShipTypes.h"
#include "BulletTypes.h"

void createAsteroidGroup( AsteroidGroup* asteroids, GLint numAsteroids,
	Polygon shapes[], GLint numShapes, Ship* theShip);
int updateAsteroids (AsteroidGroup*, double);
void displayAsteroids(AsteroidGroup* asteroids);

int splitAsteroid (AsteroidGroup* asteroids, BulletGroup* explosionParts, Asteroid* theRock);
Asteroid* createAsteroid(AsteroidGroup* asteroids, GLint size, GLpoint translation);
void explodeAsteroid (Asteroid* theRock, BulletGroup* explosionParts);
int asteroidGroupInShipRange ( AsteroidGroup* asteroids, Ship* theShip);
int asteroidInShipRange ( Asteroid* theAst, Ship* theShip);

#endif


text:
using System;
using System.Web;

namespace RiemannMetrics.WebApp
{
    public class UnhandledExceptions : BaseMetrics
    {
        protected override void Register(HttpApplication context)
        {
            context.Error += context_Error;
        }

        void context_Error(object sender, EventArgs e)
        {
            var context = HttpContext.Current;

            if(context == null)
                return;

            var exception = context.Server.GetLastError();

            if (exception == null)
                return;

            SendEvent("unhandled-exceptions",   // appended to servicename => "{serviceName} unhandled-exceptions"
                      "ok",                     // state
                      "Unhandled exceptions",   // description
                      1);                       // metric
        }
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Zoologiya Bespozvonochnykh 2: -. [23-27]

#### Original name
null

### Remarks
null


text:
- landcover
- hillshade
- contour
- landuse
- water
- waterway
- aeroway
- barrier_line
- building
- landuse_overlay
- tunnel
- waterway_label
- water_label
- road.motorway
- road.motorway_link
- road.main
- road.street
- road.street_limited
- road.service
- road.driveway
- road.path
- road.major_rail
- road.minor_rail
- road.aerialway
- bridge
- road_label


text:
using System;
using NUnit.Framework;
using Cession.Geometries;

namespace GeometryTest
{
	[TestFixture]
	public class RangeTests
	{
		[Test]
		public void ContainsTest1(){
			Assert.True (Range.Contains (1, 2, 1.5));
		}

		[Test]
		public void ContainsTest2(){
			Assert.True(Range.Contains(1,double.PositiveInfinity,double.MaxValue));
		}

		//[Test]
		//[ExpectedException(typeof(ArgumentException))]
		//public void ContainsTest3(){
		//	Assert.True(Range.Contains(1,double.NaN,double.MaxValue));
		//}

		[Test]
		public void ContainsTest4(){
			Action test = () => {
				double value = TestHelper.NextDouble(double.MaxValue);
				Assert.True (Range.Contains (double.NegativeInfinity, double.PositiveInfinity, value));
			};

			test.RunBatch ();
		}
	}
}


text:
package com.aranya.kayacms.exception;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import lombok.Getter;

public class KayaValidationException extends Exception {

  private static final long serialVersionUID = 1L;

  @Getter private String exceptionCode;

  private Map<String, Object> exceptionArgs;

  private List<ValidationError> validationErrors;

  public KayaValidationException(String message, ValidationError... errors) {
    super(message);
    this.validationErrors = Arrays.asList(errors);
  }

  public KayaValidationException(String message, Throwable cause, ValidationError... errors) {
    super(message, cause);
    this.validationErrors = Arrays.asList(errors);
  }

  public KayaValidationException(Throwable cause, ValidationError... errors) {
    super(cause);
    this.validationErrors = Arrays.asList(errors);
  }

  public KayaValidationException(
      String message,
      String exceptionCode,
      Map<String, Object> exceptionArgs,
      ValidationError... errors) {
    super(message);
    this.exceptionCode = exceptionCode;
    this.exceptionArgs = Collections.unmodifiableMap(exceptionArgs);
    this.validationErrors = Arrays.asList(errors);
  }

  public KayaValidationException(
      String message,
      Throwable cause,
      String exceptionCode,
      Map<String, Object> exceptionArgs,
      ValidationError... errors) {
    super(message, cause);
    this.exceptionCode = exceptionCode;
    this.exceptionArgs = Collections.unmodifiableMap(exceptionArgs);
    this.validationErrors = Arrays.asList(errors);
  }

  public KayaValidationException(
      Throwable cause,
      String exceptionCode,
      Map<String, Object> exceptionArgs,
      ValidationError... errors) {
    super(cause);
    this.exceptionCode = exceptionCode;
    this.exceptionArgs = Collections.unmodifiableMap(exceptionArgs);
    this.validationErrors = Arrays.asList(errors);
  }

  public Map<String, Object> getExceptionArgs() {
    return (exceptionArgs == null)
        ? Collections.emptyMap()
        : Collections.unmodifiableMap(exceptionArgs);
  }

  public List<ValidationError> getErrors() {
    return (validationErrors == null)
        ? Collections.emptyList()
        : Collections.unmodifiableList(validationErrors);
  }
}


text:
package gui;

import java.awt.BorderLayout;
import java.awt.Frame;
import java.util.Arrays;
import java.util.Optional;
import java.util.function.Function;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import static gui.Util.getGUIText;

/**
 * A {@link javax.swing.JDialog} that allows the user to select a single element from a list
 * of elements.
 *
 * @author Lasse Osterhagen
 *
 * @param <T> the type of the elements
 */
public class SelectListDlg<T> {

	private T[] list;
	private JDialog dialog;
	private int selectedIndex = -1;

	/**
	 * Show the dialog.
	 * @return the selected item or empty, if nothing was selected
	 */
	public Optional<T> show() {
		dialog.setVisible(true);
		if(selectedIndex < 0)
			return Optional.empty();
		else
			return Optional.of(list[selectedIndex]);
	}

	/**
	 * Create a modal dialog.
	 * @param parent parent of the dialog
	 * @param title title of the dialog window
	 * @param list elements to be displayed
	 */
	public SelectListDlg(Frame parent, String title, T[] list) {
		this(parent, title, list, Object::toString);
	}

	/**
	 * Create a modal dialog.
	 * @param parent parent of the dialog
	 * @param title title of the dialog window
	 * @param list the elements to be displayed
	 * @param displayFun a function that transforms the elements into a String for displaying
	 */
	public SelectListDlg(Frame parent, String title, T[] list, Function<T, String> displayFun) {
		this.list = list;
		String[] strList = Arrays.stream(list).map(displayFun).toArray(size -> new String[size]);
		JList<String> jlist = new JList<>(strList);
		dialog = new JDialog(parent, title, true);
		dialog.add(new JScrollPane(jlist, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
				JScrollPane.HORIZONTAL_SCROLLBAR_NEVER), BorderLayout.CENTER);

		// Create buttons
		JPanel buttonPanel = new JPanel();
		JButton button = new JButton(getGUIText("ok"));
		button.addActionListener(e-> {
			selectedIndex = jlist.getSelectedIndex();
			dialog.dispose();});
		buttonPanel.add(button);
		button = new JButton(getGUIText("cancel"));
		button.addActionListener(e-> dialog.dispose());
		buttonPanel.add(button);

		dialog.add(buttonPanel, BorderLayout.SOUTH);
		dialog.pack();
		dialog.setLocationRelativeTo(parent);
	}

}


text:
// OptionsPage.cpp : implementation file
//

#include "stdafx.h"
#include "..\p4win.h"
#include "OptionsPage.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CIntegOptionsPage property page

IMPLEMENT_DYNCREATE(CIntegOptionsPage, CPropertyPage)

CIntegOptionsPage::CIntegOptionsPage() : CPropertyPage(CIntegOptionsPage::IDD)
{
	//{{AFX_DATA_INIT(CIntegOptionsPage)
	m_IsNoCopy = FALSE;
	m_IsForceInteg = FALSE;
	m_IsForceDirect = FALSE;
	m_IsDeleteSource = FALSE;
	m_IsMappingReverse = FALSE;
	m_FileSpecs = _T("");
	m_IsPermitDelReadd = FALSE;
	m_DelReaddType = 2;
	m_IsBaselessMerge = FALSE;
	m_IsPropagateTypes = FALSE;
	m_IsBaseViaDelReadd = FALSE;
	m_UseNewChglist = m_UseNewChglist2 = FALSE;
	m_IsSyncFirst = TRUE;
	//}}AFX_DATA_INIT

	m_IsDefOpts = TRUE;
	m_IsBranch = FALSE;
	m_Initialized = FALSE;
}

CIntegOptionsPage::~CIntegOptionsPage()
{
}

void CIntegOptionsPage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CIntegOptionsPage)
	DDX_Check(pDX, IDC_NOCOPY, m_IsNoCopy);
	DDX_Check(pDX, IDC_FORCEINTEG, m_IsForceInteg);
	DDX_Check(pDX, IDC_FORCEDIRECT, m_IsForceDirect);
	DDX_Check(pDX, IDC_DELETESOURCE, m_IsDeleteSource);
	DDX_Check(pDX, IDC_REVERSE, m_IsMappingReverse);
	DDX_Text(pDX, IDC_FILESPECS, m_FileSpecs);
	DDX_Check(pDX, IDC_DELREADD, m_IsPermitDelReadd);
	DDX_Radio(pDX, IDC_RADIO_DEL, m_DelReaddType);
	DDX_Check(pDX, IDC_BASELESS, m_IsBaselessMerge);
	DDX_Check(pDX, IDC_PROPAGATETYPES, m_IsPropagateTypes);
	DDX_Check(pDX, IDC_BASEVIADELREADD, m_IsBaseViaDelReadd);
	DDX_Radio(pDX, IDC_USEDEFCHGLIST, m_UseNewChglist);
	DDX_Radio(pDX, IDC_USEDEFCHGLIST2, m_UseNewChglist2);
	DDX_Check(pDX, IDC_SYNCFIRST, m_IsSyncFirst);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CIntegOptionsPage, CPropertyPage)
	//{{AFX_MSG_MAP(CIntegOptionsPage)
	ON_BN_CLICKED(IDC_ALLFILES, OnAllfiles)
	ON_BN_CLICKED(IDC_FILESUBSET, OnFilesubset)
	ON_BN_CLICKED(IDC_DELREADD, OnDelReadd)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CIntegOptionsPage message handlers

int CIntegOptionsPage::DoModal()
{
	return CPropertyPage::DoModal();
}

BOOL CIntegOptionsPage::OnInitDialog()
{
	CPropertyPage::OnInitDialog();
	if (m_IsDefOpts)
	{
		m_IsNoCopy = GET_P4REGPTR()->GetIsNoCopy();
		m_IsForceInteg = GET_P4REGPTR()->GetIsForceInteg();
		m_IsForceDirect = GET_P4REGPTR()->GetIsForceDirect();
		m_IsPermitDelReadd = GET_P4REGPTR()->GetIsPermitDelReadd();
		m_DelReaddType = GET_P4REGPTR()->GetDelReaddType();
		m_IsBaselessMerge = GET_P4REGPTR()->GetIsBaselessMerge();
		m_IsPropagateTypes = GET_P4REGPTR()->GetIsPropagateTypes();
		m_IsBaseViaDelReadd = GET_P4REGPTR()->GetIsBaseViaDelReadd();
		m_UseNewChglist = GET_P4REGPTR()->GetUseNewChglist();
		m_UseNewChglist2 = GET_P4REGPTR()->GetUseNewChglist2();
		m_IsSyncFirst = GET_P4REGPTR()->GetSyncFirstDefault();
		GetDlgItem( IDC_INTEGTOLABEL )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_ALLFILES   )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_FILESUBSET )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_FILESPECS  )->ModifyStyle( WS_VISIBLE, 0 );
	}
	else
	{
		GetDlgItem( IDC_USEGRPCHGLIST )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_USEDEFCHGLIST )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_USENEWCHGLIST )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_USEGRPCHGLIST2 )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_USEDEFCHGLIST2 )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_USENEWCHGLIST2 )->ModifyStyle( WS_VISIBLE, 0 );
		if (GET_SERVERLEVEL() < 17)
		{
			m_DelReaddType = 2;
			GetDlgItem( IDC_RADIO_DEL )->EnableWindow(FALSE);
			GetDlgItem( IDC_RADIO_READD )->EnableWindow(FALSE);
			if (!m_IsPermitDelReadd)
				GetDlgItem( IDC_RADIO_BOTH )->EnableWindow(FALSE);
		}
		else
		{
			if (!m_IsPermitDelReadd)
			{
				GetDlgItem( IDC_RADIO_DEL )->EnableWindow(FALSE);
				GetDlgItem( IDC_RADIO_READD )->EnableWindow(FALSE);
				GetDlgItem( IDC_RADIO_BOTH )->EnableWindow(FALSE);
			}
		}
	}
	m_Initialized = TRUE;

	if( (m_BranchFlag != INTEG_USING_BRANCH_SPEC) || GET_SERVERLEVEL() >= LEVEL_NEWINTEG )
	{
		// Hide Mapping Reverse if not a branch-from-file-specs or if new integ support
		GetDlgItem( IDC_REVERSE )->EnableWindow(FALSE);
		GetDlgItem( IDC_REVERSE )->ModifyStyle( WS_VISIBLE, 0 );
	}

	if( m_IsBranch || m_IsDefOpts)
	{
		// Hide Delete Source if is a branch or default options
		GetDlgItem( IDC_DELETESOURCE )->EnableWindow(FALSE);
		GetDlgItem( IDC_DELETESOURCE )->ModifyStyle( WS_VISIBLE, 0 );
		m_IsDeleteSource = FALSE;
	}

	if ( GET_SERVERLEVEL() < 18 )
	{
		GetDlgItem( IDC_BASEVIADELREADD )->ModifyStyle( WS_VISIBLE, 0 );
		m_IsBaseViaDelReadd = FALSE;
		GetDlgItem( IDC_FORCEDIRECT )->ModifyStyle( WS_VISIBLE, 0 );
		m_IsBaseViaDelReadd = FALSE;
		if ( GET_SERVERLEVEL() < 10 )
		{
			GetDlgItem( IDC_PROPAGATETYPES )->ModifyStyle( WS_VISIBLE, 0 );
			if (!m_IsDefOpts)
				m_IsPropagateTypes = FALSE;
			if ( GET_SERVERLEVEL() < 8 )
			{
				// Hide Permit Delete/Re-add & Bassless Merges if server is older than 99.2
				GetDlgItem( IDC_DELREADD )->ModifyStyle( WS_VISIBLE, 0 );
				GetDlgItem( IDC_BASELESS )->ModifyStyle( WS_VISIBLE, 0 );
				if (!m_IsDefOpts)
				{
					m_IsPermitDelReadd = FALSE;
					m_IsBaselessMerge = FALSE;
				}
			}
		}
	}

	if (m_BranchFlag != INTEG_USING_BRANCH)
	{
		GetDlgItem(IDC_INTEGTOLABEL)->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_ALLFILES   )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_FILESUBSET )->ModifyStyle( WS_VISIBLE, 0 );
		GetDlgItem( IDC_FILESPECS  )->ModifyStyle( WS_VISIBLE, 0 );
	}
	else
	{
		((CButton *) GetDlgItem(m_FileSpecs.IsEmpty()
								? IDC_ALLFILES : IDC_FILESUBSET))->SetCheck( 1 );
		GetDlgItem( IDC_FILESPECS )->EnableWindow( m_FileSpecs.IsEmpty() ? FALSE : TRUE );
	}

	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CIntegOptionsPage::OnAllfiles()
{
	UpdateData();
	GetDlgItem(IDC_FILESPECS)->EnableWindow( FALSE );
	m_FileSpecs.Empty();
	UpdateData(FALSE);
}

void CIntegOptionsPage::OnFilesubset()
{
	GetDlgItem(IDC_FILESPECS)->EnableWindow( TRUE );
	GotoDlgCtrl(GetDlgItem(IDC_FILESPECS));
}

void CIntegOptionsPage::OnDelReadd()
{
	if (!m_IsDefOpts)
	{
		UpdateData();
		if (GET_SERVERLEVEL() > 16)
		{
			GetDlgItem(IDC_RADIO_DEL)->EnableWindow( m_IsPermitDelReadd );
			GetDlgItem(IDC_RADIO_READD)->EnableWindow( m_IsPermitDelReadd );
		}
		GetDlgItem(IDC_RADIO_BOTH)->EnableWindow( m_IsPermitDelReadd );
	}
}

void CIntegOptionsPage::OnOK()
{
	if (!m_Initialized || !m_IsDefOpts)
		return;

	// This bit of silliness is required to ensure all the
	// fields provide their data to the UpdateData() routine
	GotoDlgCtrl(GetParent()->GetDlgItem(IDC_APPLY));

	m_ErrorCount=0;

	if(UpdateData(TRUE))
	{
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsNoCopy( m_IsNoCopy ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsForceInteg( m_IsForceInteg ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsForceDirect( m_IsForceDirect ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsDeleteSource( FALSE ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsPermitDelReadd( m_IsPermitDelReadd ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetDelReaddType( m_DelReaddType ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsPropagateTypes( m_IsPropagateTypes ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsBaseViaDelReadd( m_IsBaseViaDelReadd ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetUseNewChglist( m_UseNewChglist ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetUseNewChglist2( m_UseNewChglist2 ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetIsBaselessMerge( m_IsBaselessMerge ) )
				m_ErrorCount++;
		}
		if (!m_ErrorCount)
		{
			if(!GET_P4REGPTR()->SetSyncFirstDefault( m_IsSyncFirst ) )
				m_ErrorCount++;
		}
		if(m_ErrorCount)
			AfxMessageBox(IDS_BAD_REGISTRY, MB_ICONSTOP);
	}
}


text:
<?php

require_once '../../include/header.php';
require_once '../../lib/Kendo/Autoload.php';

?>

    Animation Settings

            <input id="toggle" name="animation" type="radio" /> toggle animation

            <input id="expand" name="animation" type="radio" checked="checked" /> expand animation

            <input id="opacity" type="checkbox" checked="checked" /> animate opacity

<?php
    $tabstrip = new \Kendo\UI\TabStrip('tabstrip');
    $tabstrip->attr("style", "margin-right: 220px;");

    $item = new \Kendo\UI\TabStripItem();
    $item->text("First Tab")
        ->selected(true)
        ->startContent();
?>

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer felis libero, lobortis ac rutrum quis, varius a velit. Donec lacus erat, cursus sed porta quis, adipiscing et ligula. Duis volutpat, sem pharetra accumsan pharetra, mi ligula cursus felis, ac aliquet leo diam eget risus. Integer facilisis, justo cursus venenatis vehicula, massa nisl tempor sem, in ullamcorper neque mauris in orci.

<?php
    $item->endContent();
    $tabstrip->addItem($item);

    $item = new \Kendo\UI\TabStripItem();
    $item->text("Second Tab")
        ->startContent();
?>

Ut orci ligula, varius ac consequat in, rhoncus in dolor. Mauris pulvinar molestie accumsan. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean velit ligula, pharetra quis aliquam sed, scelerisque sed sapien. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aliquam dui mi, vulputate vitae pulvinar ac, condimentum sed eros.

<?php
    $item->endContent();
    $tabstrip->addItem($item);

    $item = new \Kendo\UI\TabStripItem();
    $item->text("Third Tab")
        ->startContent();
?>

Aliquam at nisl quis est adipiscing bibendum. Nam malesuada eros facilisis arcu vulputate at aliquam nunc tempor. In commodo scelerisque enim, eget sodales lorem condimentum rutrum. Phasellus sem metus, ultricies at commodo in, tristique non est. Morbi vel mauris eget mauris commodo elementum. Nam eget libero lacus, ut sollicitudin ante. Nam odio quam, suscipit a fringilla eget, dignissim nec arcu. Donec tristique arcu ut sapien elementum pellentesque.

<?php
    $item->endContent();
    $tabstrip->addItem($item);

    $item = new \Kendo\UI\TabStripItem();
    $item->text("Fourth Tab")
        ->startContent();
?>

Maecenas vitae eros vel enim molestie cursus. Proin ut lacinia ipsum. Nam at elit arcu, at porttitor ipsum. Praesent id viverra lorem. Nam lacinia elementum fermentum. Nulla facilisi. Nulla bibendum erat sed sem interdum suscipit. Vestibulum eget molestie leo. Aliquam erat volutpat. Ut sed nulla libero. Suspendisse id euismod quam. Aliquam interdum turpis vitae purus consectetur in pulvinar libero accumsan. In id augue dui, ac volutpat ante. Suspendisse purus est, ullamcorper id bibendum sed, placerat id leo.

<?php
    $item->endContent();
    $tabstrip->addItem($item);

    $item = new \Kendo\UI\TabStripItem();
    $item->text("Fifth Tab")
        ->startContent();
?>

Fusce nec mauris enim, non pharetra neque. Etiam elementum nunc ut velit fermentum sed porta eros dignissim. Duis at nisl eros. Integer arcu nisl, accumsan non molestie at, elementum nec odio. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque arcu odio, aliquam vel viverra ac, varius at sapien. Nullam elementum nulla non libero interdum vestibulum at in lacus. Curabitur ac magna ac lacus dapibus convallis non at turpis.

<?php
    $item->endContent();
    $tabstrip->addItem($item);

    // set animation
    $animation = new \Kendo\UI\TabStripAnimation();
    $openAnimation = new \Kendo\UI\TabStripAnimationOpen();
    $openAnimation->effects("fadeIn");
    $animation->open($openAnimation);

    $tabstrip->animation($animation);

    echo $tabstrip->render();
?>

<?php require_once '../../include/footer.php'; ?>


text:
from __future__ import unicode_literals

from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('practiceapp', '0003_auto_20160714_1653'),
    ]

    operations = [
        migrations.RenameField(
            model_name='certificate',
            old_name='cer_amount',
            new_name='amount',
        ),
    ]


text: <!DOCTYPE html>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <!-- This layout acts as a line on the list view that holds the Claims  -->

    <TextView
        android:id="@+id/tv_expenseList"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

</LinearLayout>


text:
package org.wso2.carbon.apimgt.importexport.utils;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.importexport.APIExportException;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;

import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
import java.util.StringTokenizer;

/**
 * This class provides authentication facility for importing and exporting APIs
 * Basic authentication is used for this purpose
 * Users with admin roles are only eligible for accessing those JAX-RS services
 */
public class AuthenticatorUtil {

    private static final String AUTHORIZATION_PROPERTY = "Authorization";
    private static final String AUTHENTICATION_SCHEME = "Basic";
    private static final Log log = LogFactory.getLog(AuthenticatorUtil.class);
    private static String username;
    private static String password;

    private AuthenticatorUtil() {
    }

    /**
     * Checks whether received credentials for accessing API is authorized for exporting and
     * importing APIs
     *
     * @param headers HTTP headers of the received request
     * @return Response indicating whether authentication and authorization for accessing API got
     * succeeded
     * @throws APIExportException If an error occurs while authorizing current user
     */

    public static Response authorizeUser(HttpHeaders headers) throws APIExportException {
        if (!isValidCredentials(headers)) {
            log.error("No username and password is provided for authentication");
            return Response.status(Response.Status.UNAUTHORIZED)
                    .entity("No username and password is provided for authentication").type(MediaType.APPLICATION_JSON).
                            build();

        }

        try {
            String tenantDomain = MultitenantUtils.getTenantDomain(username);
            PrivilegedCarbonContext.startTenantFlow();
            PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);

            UserStoreManager userstoremanager =
                    CarbonContext.getThreadLocalCarbonContext().getUserRealm().getUserStoreManager();

            String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(username);

            //authenticate user provided credentials
            if (userstoremanager.authenticate(tenantAwareUsername, password)) {
                log.info(username + " user authenticated successfully");
                //Get admin role name of the current domain
                String adminRoleName = CarbonContext
                                       .getThreadLocalCarbonContext()
                                       .getUserRealm()
                                       .getRealmConfiguration()
                                       .getAdminRoleName();

                String[] userRoles = userstoremanager.getRoleListOfUser(tenantAwareUsername);

                //user is only authorized for exporting and importing if he is an admin of his
                // domain
                for (String userRole : userRoles) {
                    if (adminRoleName.equalsIgnoreCase(userRole)) {
                        log.info(username + " is authorized to import and export APIs");
                        return Response.ok().build();
                    }
                }
                return Response.status(Response.Status.FORBIDDEN).entity("User Authorization " + "Failed")
                        .type(MediaType.APPLICATION_JSON).build();

            } else {
                return Response.status(Response.Status.UNAUTHORIZED).entity("User Authentication " + "Failed")
                        .type(MediaType.APPLICATION_JSON).build();
            }

        } catch (UserStoreException e) {
            String errorMessage = "Error while accessing user configuration";
            log.error(errorMessage, e);
            throw new APIExportException(errorMessage, e);
        } finally {
            PrivilegedCarbonContext.endTenantFlow();
        }

    }

    /**
     * Checks whether user has provided non blank username and password for authentication
     *
     * @param headers Http Headers of the request
     * @return boolean Whether a user name and password has been provided for authentication
     * @throws APIExportException If an error occurs while extracting username and password from
     *                            the header
     */
    private static boolean isValidCredentials(HttpHeaders headers) throws APIExportException {

        //Fetch authorization header
        final List<String> authorization = headers.getRequestHeader(AUTHORIZATION_PROPERTY);

        //If no authorization information present; block access
        if (authorization == null || authorization.isEmpty()) {
            return false;
        }

        //Get encoded username and password
        final String encodedUserPassword = authorization.get(0).replaceFirst(AUTHENTICATION_SCHEME + " ", "");

        //Decode username and password
        String usernameAndPassword;
        usernameAndPassword = StringUtils.newStringUtf8(Base64.decodeBase64(encodedUserPassword.getBytes()));

        if (usernameAndPassword != null) {
            //Split username and password tokens
            final StringTokenizer tokenizer = new StringTokenizer(usernameAndPassword, ":");
            username = tokenizer.nextToken();
            password = tokenizer.nextToken();

            if (username != null && password != null) {
                return true;
            }
        }

        return false;
    }

    /**
     * Retrieve authenticated user name for the current session
     *
     * @return User name
     */
    public static String getAuthenticatedUserName() {
        return username;
    }
}