text:
package org.jhove2.module.format.wave;

import java.io.EOFException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.jhove2.annotation.ReportableProperty;
import org.jhove2.core.JHOVE2;
import org.jhove2.core.JHOVE2Exception;
import org.jhove2.core.io.Input;
import org.jhove2.core.source.Source;
import org.jhove2.module.format.riff.GenericChunk;

import com.sleepycat.persist.model.Persistent;

/** WAVE format cue points chunk.
 *
 * @author slabrams
 */
@Persistent
public class CuePointsChunk
    extends GenericChunk
{
    /** Count of cue points. */
    protected long count;

    /** Cue points. */
    protected List<CuePoint> cuePoints;

    /** Instantiate a new CuePointsChunk. */
    public CuePointsChunk() {
        super();

        this.cuePoints = new ArrayList<CuePoint>();
    }

    /**
     * Parse a WAVE chunk.
     *
     * @param jhove2
     *            JHOVE2 framework
     * @param source
     *            WAVE source unit
     * @param input  WAVE source input
     * @return Number of bytes consumed
     * @throws EOFException
     *             If End-of-File is reached reading the source unit
     * @throws IOException
     *             If an I/O exception is raised reading the source unit
     * @throws JHOVE2Exception
     * @see org.jhove2.module.format.Parser#parse(org.jhove2.core.JHOVE2,
     *      org.jhove2.core.source.Source, org.jhove2.core.io.Input)
     */
    @Override
    public long parse(JHOVE2 jhove2, Source source, Input input)
        throws EOFException, IOException, JHOVE2Exception
    {
        long consumed = super.parse(jhove2, source, input);

        /* Count of cue points */
        this.count = input.readUnsignedInt();
        consumed += 4;

        /* Cue points. */
        for (int i=0; i<this.count; i++) {
            CuePoint cue = new CuePoint();
            consumed += cue.parse(jhove2, source, input);

            this.cuePoints.add(cue);
        }

        return consumed;
    }

    /** Get cue points chunk count.
     * @return Cue points chunk count
     */
    @ReportableProperty(order=1, value="Cue points chunk count.")
    public long getCount() {
        return this.count;
    }

    /** Get cue points.
     * @return Cue points
     */
    @ReportableProperty(order=2, value="Cue points.")
    public List<CuePoint> getCuePoints() {
        return this.cuePoints;
    }
}


text:
package com.threepillar.labs.socialauthsample.controller;

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

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.brickred.socialauth.AuthProvider;
import org.brickred.socialauth.SocialAuthManager;
import org.brickred.socialauth.spring.bean.SocialAuthTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.threepillar.labs.socialauthsample.bean.User;
import com.threepillar.labs.socialauthsample.util.Constants;

@Controller
public class HomeController {

	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private SocialAuthTemplate socialAuthTemplate;

	@RequestMapping(value = "/registration")
	public ModelAndView showRegistration(final HttpServletRequest request) {
		logger.info("Showing registration page");
		HttpSession session = request.getSession();
		session.setAttribute(Constants.REQUEST_TYPE, Constants.REGISTRATION);
		ModelAndView modelAndView = new ModelAndView("registration");
		return modelAndView;

	}

	@RequestMapping(value = "/submitRegistration")
	public ModelAndView showRegistrationPage(
			@ModelAttribute("user") final User user,
			final HttpServletRequest request) {
		logger.info("Submiting registration");
		ModelAndView modelAndView = new ModelAndView("registrationSuccess",
				"user", user);
		return modelAndView;

	}

	@RequestMapping(value = "/importContacts")
	public ModelAndView importContacts(final HttpServletRequest request) {
		logger.info("Showing import contacts page");
		HttpSession session = request.getSession();
		session.setAttribute(Constants.REQUEST_TYPE, Constants.IMPORT_CONTACTS);
		ModelAndView modelAndView = new ModelAndView("importContacts");
		return modelAndView;
	}

	@RequestMapping(value = "/shareForm")
	public ModelAndView shareForm(final HttpServletRequest request) {
		logger.info("Showing share form");
		HttpSession session = request.getSession();
		session.setAttribute(Constants.REQUEST_TYPE, Constants.SHARE);
		SocialAuthManager manager = socialAuthTemplate.getSocialAuthManager();
		List<String> connectedProvidersIds = new ArrayList<String>();
		if (manager != null) {
			connectedProvidersIds = manager.getConnectedProvidersIds();
		}

		ModelAndView modelAndView = new ModelAndView("shareForm",
				"connectedProvidersIds", connectedProvidersIds);
		return modelAndView;

	}

	@RequestMapping(value = "/share", method = RequestMethod.POST)
	public ModelAndView share(
			@RequestParam(value = "message", required = true) final String message,
			final HttpServletRequest request) {
		logger.info("Showing share form");
		HttpSession session = request.getSession();
		session.setAttribute(Constants.REQUEST_TYPE, Constants.SHARE);
		SocialAuthManager manager = socialAuthTemplate.getSocialAuthManager();
		List<String> connectedProvidersIds = new ArrayList<String>();
		if (manager != null) {
			connectedProvidersIds = manager.getConnectedProvidersIds();
		}
		String providerIds = null;
		for (String id : connectedProvidersIds) {
			try {
				AuthProvider provider = manager.getProvider(id);
				provider.updateStatus(message);
				if (providerIds == null) {
					providerIds = provider.getProviderId();
				} else {
					providerIds += ", " + provider.getProviderId();
				}
			} catch (Exception e) {
				logger.error(e.getMessage());
			}
		}
		ModelAndView modelAndView = new ModelAndView("shareForm");
		modelAndView.addObject("connectedProvidersIds", connectedProvidersIds);
		if (providerIds != null) {
			String str = "Status is updated on " + providerIds;
			if (providerIds.indexOf(',') != -1) {
				str += " providers.";
			} else {
				str += " provider.";
			}
			modelAndView.addObject("message", str);
		}
		return modelAndView;

	}
}

redpajama_set_name: RedPajamaGithub


text:
module.exports = function(config) {
	// apply base config
	require('./karma.conf.js')(config);

	config.set({
		coverageReporter: {
			type: 'lcov',
			dir: '.coverage'
		}
	});
};


text:
class HalitchServer
{
public:
  HalitchServer(int port, Switch& lightSwitch);

  void connect();

  void listen();

private:
  void processRequest(WiFiClient& client);

  void processGetRequest(WiFiClient& client);

  void processPostRequest(WiFiClient& client);

  void processSwitchRequest(const JsonObject& root);

  void processConfigRequest(const JsonObject& root);

  void ignoreRequestHeaders(WiFiClient& client);

  String readBodyString(WiFiClient& client);

  boolean isPostRequest(String& requestLine);

  void sendSuccessResponse(WiFiClient& client);

  void sendBadRequestResponse(WiFiClient& client);

private:
  WiFiServer server_;
  Switch& switch_;
};

#endif


text:
> 编写:[Vincent 4J](http://github.com/vincent4j) -  原文:<http://developer.android.com/training/basics/actionbar/styling.html>

Action bar 为用户提供一种熟悉可预测的方式来展示操作和导航,但是这并不意味着你的 app 要看起来和其他 app 一样。如果你想将 action bar 的风格设计的合乎你产品的定位,你只需简单地使用 Android 的 [式样和主题](https://developer.android.com/guide/topics/ui/themes.html) 资源。

Android 包括一少部分内置的 activity 主题,这些主题中包含 "暗" 或 "淡" 的 action bar 式样。你也可以扩展这些主题,以便于更好的为你的 action bar 自定义外观。

> 注释:如果你为 action bar 使用了 Support 库的 API,那你必须使用(或重写) [Theme.AppCompat](https://developer.android.com/reference/android/support/v7/appcompat/R.style.html#Theme_AppCompat) 家族式样(甚至 [Theme.Holo](https://developer.android.com/reference/android/R.style.html#Theme_Holo) 家族,在 API level 11 或更高版本中可用)。如此一来,你声明的每一个式样属性都必须被声明两次:一次使用平台的式样属性(`android:` 属性),另一次使用 Support 库中的式样属性(`appcompat.R.attr` 属性 —— 这些属性的上下文其实就是你的 app)。更多细节请查看下面的示例。

## 使用一个 Android 主题

Android 包含两个基本的 activity 主题,这两个主题决定了 action bar 的颜色:

- [Theme.Holo](https://developer.android.com/reference/android/R.style.html#Theme_Holo),一个 "暗" 的主题
- [Theme.Holo.Light](https://developer.android.com/reference/android/R.style.html#Theme_Holo_Light),一个 "淡" 的主题

![actionbar-theme-dark@2x.png](actionbar-theme-dark@2x.png)

![actionbar-theme-light-solid@2x.png](actionbar-theme-light-solid@2x.png)

这些主题即可以被应用到 app 全局,又可以为单一的 activity 通过在 manifest 文件中设置 [application](https://developer.android.com/guide/topics/manifest/application-element.html) 元素 或 [activity](https://developer.android.com/guide/topics/manifest/application-element.html) 元素的 `android:theme` 属性。

例如:
```xml
<application android:theme="@android:style/Theme.Holo.Light" ... />
```

你可以通过声明 activity 的主题为 [Theme.Holo.Light.DarkActionBar](https://developer.android.com/reference/android/R.style.html#Theme_Holo_Light_DarkActionBar) 来达到如下效果:action bar 为暗色,其他部分为淡色。

![actionbar-theme-light-darkactionbar@2x.png](actionbar-theme-light-darkactionbar@2x.png)

当使用 Support 库时,必须使用 [Theme.AppCompat](https://developer.android.com/reference/android/support/v7/appcompat/R.style.html#Theme_AppCompat) 主题替代:
- [Theme.AppCompat](https://developer.android.com/reference/android/support/v7/appcompat/R.style.html#Theme_AppCompat),一个"暗"的主题
- [Theme.AppCompat.Light](https://developer.android.com/reference/android/support/v7/appcompat/R.style.html#Theme_AppCompat_Light),一个"淡"的主题
- [Theme.AppCompat.Light.DarkActionBar](https://developer.android.com/reference/android/support/v7/appcompat/R.style.html#Theme_AppCompat_Light_DarkActionBar),一个带有"暗" action bar 的"淡"主题

一定要确保你使用的 action bar icon 的颜色与 action bar 本身的颜色有差异。为了能帮助到你,[Action Bar Icon Pack](https://developer.android.com/design/downloads/index.html#action-bar-icon-pack) 为 Holo "暗"和"淡"的 action bar 提供了标准的 action icon。

## 自定义背景

为 activity 创建一个自定义主题,通过重写 [actionBarStyle](https://developer.android.com/reference/android/R.attr.html#actionBarStyle) 属性来改变 action bar 的背景。[actionBarStyle](https://developer.android.com/reference/android/R.attr.html#actionBarStyle) 属性指向另一个式样;在该式样里,通过指定一个 drawable 资源来重写 [background](https://developer.android.com/reference/android/R.attr.html#background) 属性。

![actionbar-theme-custom@2x.png](actionbar-theme-custom@2x.png)

如果你的 app 使用了 [navigation tabs](https://developer.android.com/guide/topics/ui/actionbar.html#Tabs) 或 [split action bar](https://developer.android.com/guide/topics/ui/actionbar.html#SplitBar) ,你也可以通过分别设置 [backgroundStacked](https://developer.android.com/reference/android/R.attr.html#backgroundStacked) 和 [backgroundSplit](https://developer.android.com/reference/android/R.attr.html#backgroundSplit) 属性来为这些条指定背景。

>注意:声明一个合适的父主题,进而你的自定义主题和式样可以继承父主题的式样,这点很重要。如果没有父式样,你的 action bar 将会失去很多式样属性,除非你自己显式的对他们进行声明。

### 仅支持 Android 3.0 和更高

当仅支持 Android 3.0 和更高版本时,你可以像这样定义 action bar 的背景:

res/values/themes.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@android:style/Theme.Holo.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
    </style>

    <!-- ActionBar styles -->
    <style name="MyActionBar"
           parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
        <item name="android:background">@drawable/actionbar_background</item>
    </style>
</resources>
```

然后,将你的主题应该到你的 app 全局或单个的 activity 之中:
```xml
<application android:theme="@style/CustomActionBarTheme" ... />
```

### 支持 Android 2.1 和更高

当使用 Support 库时,上面同样的主题必须被替代成如下:

res/values/themes.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@style/Theme.AppCompat.Light.DarkActionBar">
        <item name="android:actionBarStyle">@style/MyActionBar</item>

        <!-- Support library compatibility -->
        <item name="actionBarStyle">@style/MyActionBar</item>
    </style>

    <!-- ActionBar styles -->
    <style name="MyActionBar"
           parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
        <item name="android:background">@drawable/actionbar_background</item>

        <!-- Support library compatibility -->
        <item name="background">@drawable/actionbar_background</item>
    </style>
</resources>
```
然后,将你的主题应该到你的 app 全局或单个的 activity 之中:
```xml
<application android:theme="@style/CustomActionBarTheme" ... />
```

## 自定义文本颜色

修改 action bar 中的文本颜色,你需要分别重写每个元素的属性:
- Action bar 的标题:创建一种自定义式样,并指定 `textColor` 属性;同时,在你的自定义 [actionBarStyle](https://developer.android.com/reference/android/R.attr.html#actionBarStyle) 中为 [titleTextStyle](https://developer.android.com/reference/android/R.attr.html#titleTextStyle) 属性指定为刚才的自定义式样。

> 注释:被应用到 [titleTextStyle](https://developer.android.com/reference/android/R.attr.html#titleTextStyle) 的自定义式样应该使用 [TextAppearance.Holo.Widget.ActionBar.Title](https://developer.android.com/reference/android/R.style.html#TextAppearance_Holo_Widget_ActionBar_Title) 作为父式样。

- Action bar 的页签:在你的 activity 主题中重写 [ actionBarTabTextStyle](https://developer.android.com/reference/android/R.attr.html#actionBarTabTextStyle)
- Action 按钮:在你的 activity 主题中重写 [actionMenuTextColor](https://developer.android.com/reference/android/R.attr.html#actionMenuTextColor)

### 仅支持 Android 3.0 和更高

当仅支持 Android 3.0 和更高时,你的式样 XML 文件应该是这样的:

res/values/themes.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@style/Theme.Holo">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
        <item name="android:actionMenuTextColor">@color/actionbar_text</item>
    </style>

    <!-- ActionBar styles -->
    <style name="MyActionBar"
           parent="@style/Widget.Holo.ActionBar">
        <item name="android:titleTextStyle">@style/MyActionBarTitleText</item>
    </style>

    <!-- ActionBar title text -->
    <style name="MyActionBarTitleText"
           parent="@style/TextAppearance.Holo.Widget.ActionBar.Title">
        <item name="android:textColor">@color/actionbar_text</item>
    </style>

    <!-- ActionBar tabs text styles -->
    <style name="MyActionBarTabText"
           parent="@style/Widget.Holo.ActionBar.TabText">
        <item name="android:textColor">@color/actionbar_text</item>
    </style>
</resources>
```

### 支持 Android 2.1 和更高

当使用 Support 库时,你的式样 XML 文件应该是这样的:

res/values/themes.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@style/Theme.AppCompat">
        <item name="android:actionBarStyle">@style/MyActionBar</item>
        <item name="android:actionBarTabTextStyle">@style/MyActionBarTabText</item>
        <item name="android:actionMenuTextColor">@color/actionbar_text</item>

        <!-- Support library compatibility -->
        <item name="actionBarStyle">@style/MyActionBar</item>
        <item name="actionBarTabTextStyle">@style/MyActionBarTabText</item>
        <item name="actionMenuTextColor">@color/actionbar_text</item>
    </style>

    <!-- ActionBar styles -->
    <style name="MyActionBar"
           parent="@style/Widget.AppCompat.ActionBar">
        <item name="android:titleTextStyle">@style/MyActionBarTitleText</item>

        <!-- Support library compatibility -->
        <item name="titleTextStyle">@style/MyActionBarTitleText</item>
    </style>

    <!-- ActionBar title text -->
    <style name="MyActionBarTitleText"
           parent="@style/TextAppearance.AppCompat.Widget.ActionBar.Title">
        <item name="android:textColor">@color/actionbar_text</item>
        <!-- The textColor property is backward compatible with the Support Library -->
    </style>

    <!-- ActionBar tabs text -->
    <style name="MyActionBarTabText"
           parent="@style/Widget.AppCompat.ActionBar.TabText">
        <item name="android:textColor">@color/actionbar_text</item>
        <!-- The textColor property is backward compatible with the Support Library -->
    </style>
</resources>
```

## 自定义 Tab Indicator

为 activity 创建一个自定义主题,通过重写 [actionBarTabStyle](https://developer.android.com/reference/android/R.attr.html#actionBarTabStyle) 属性来改变 [navigation tabs](https://developer.android.com/guide/topics/ui/actionbar.html#Tabs) 使用的指示器。[actionBarTabStyle](https://developer.android.com/reference/android/R.attr.html#actionBarTabStyle) 属性指向另一个式样资源;在该式样资源里,通过指定一个状态列表 drawable 来重写 [background](https://developer.android.com/reference/android/R.attr.html#background) 属性。

> 注释:一个状态列表 drawable 是重要的,以便通过不同的背景来指出当前选择的 tab 与其他 tab 的区别。更多关于如何创建一个 drawable 资源来处理多个按钮状态,请阅读 [State List](https://developer.android.com/guide/topics/resources/drawable-resource.html#StateList) 文档。

例如,这是一个状态列表 drawable,为一个 action bar tab 的多种不同状态分别指定背景图片:

res/drawable/actionbar_tab_indicator.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<!-- STATES WHEN BUTTON IS NOT PRESSED -->

    <!-- Non focused states -->
    <item android:state_focused="false" android:state_selected="false"
          android:state_pressed="false"
          android:drawable="@drawable/tab_unselected" />
    <item android:state_focused="false" android:state_selected="true"
          android:state_pressed="false"
          android:drawable="@drawable/tab_selected" />

    <!-- Focused states (such as when focused with a d-pad or mouse hover) -->
    <item android:state_focused="true" android:state_selected="false"
          android:state_pressed="false"
          android:drawable="@drawable/tab_unselected_focused" />
    <item android:state_focused="true" android:state_selected="true"
          android:state_pressed="false"
          android:drawable="@drawable/tab_selected_focused" />

<!-- STATES WHEN BUTTON IS PRESSED -->

    <!-- Non focused states -->
    <item android:state_focused="false" android:state_selected="false"
          android:state_pressed="true"
          android:drawable="@drawable/tab_unselected_pressed" />
    <item android:state_focused="false" android:state_selected="true"
        android:state_pressed="true"
        android:drawable="@drawable/tab_selected_pressed" />

    <!-- Focused states (such as when focused with a d-pad or mouse hover) -->
    <item android:state_focused="true" android:state_selected="false"
          android:state_pressed="true"
          android:drawable="@drawable/tab_unselected_pressed" />
    <item android:state_focused="true" android:state_selected="true"
          android:state_pressed="true"
          android:drawable="@drawable/tab_selected_pressed" />
</selector>
```
### 仅支持 Android 3.0 和更高

当仅支持 Android 3.0 和更高时,你的式样 XML 文件应该是这样的:

res/values/themes.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@style/Theme.Holo">
        <item name="android:actionBarTabStyle">@style/MyActionBarTabs</item>
    </style>

    <!-- ActionBar tabs styles -->
    <style name="MyActionBarTabs"
           parent="@style/Widget.Holo.ActionBar.TabView">
        <!-- tab indicator -->
        <item name="android:background">@drawable/actionbar_tab_indicator</item>
    </style>
</resources>
```

### 支持 Android 2.1 和更高

当使用 Support 库时,你的式样 XML 文件应该是这样的:

res/values/themes.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- the theme applied to the application or activity -->
    <style name="CustomActionBarTheme"
           parent="@style/Theme.AppCompat">
        <item name="android:actionBarTabStyle">@style/MyActionBarTabs</item>

        <!-- Support library compatibility -->
        <item name="actionBarTabStyle">@style/MyActionBarTabs</item>
    </style>

    <!-- ActionBar tabs styles -->
    <style name="MyActionBarTabs"
           parent="@style/Widget.AppCompat.ActionBar.TabView">
        <!-- tab indicator -->
        <item name="android:background">@drawable/actionbar_tab_indicator</item>

        <!-- Support library compatibility -->
        <item name="background">@drawable/actionbar_tab_indicator</item>
    </style>
</resources>
```

> **更多资源**
- 关于 action bar 的更多式样属性,请查看 [Action Bar](https://developer.android.com/guide/topics/ui/actionbar.html#Style) 指南
- 学习更多式样的工作机制,请查看 [式样和主题](https://developer.android.com/guide/topics/ui/themes.html) 指南
- 全面的 action bar 式样,请尝试 [Android Action Bar 式样生成器](http://www.actionbarstylegenerator.com/)


text:
require "spec_helper"

describe Worker::Master do
  describe "#fetch_active_accounts!" do
    it "should return an array of hashes" do
      expect(AccountFetcher).to receive(:fetch_active_accounts).and_return(
        [{ "id" => 1 }, { "id" => 2 }]
      )
      expect(AccountFetcher).to receive(:fetch_details_for_account_id).with(1).and_return(
        "id" => 1, "name" => "Account1"
      )
      expect(AccountFetcher).to receive(:fetch_details_for_account_id).with(2).and_return(
        "id" => 2, "name" => "Account2"
      )

      accounts = Worker::Master.new.send(:fetch_active_accounts!)

      expect(accounts).to eq [
        { "id" => 1, "name" => "Account1" },
        { "id" => 2, "name" => "Account2" }
      ]
    end

    it "should returned cached accounts if the lookup fails" do
      logger = double("some logger").as_null_object
      allow(Logging).to receive(:logger).and_return(logger)

      worker = Worker::Master.new
      worker.active_accounts = [{ "id" => 1, "name" => "Account1" }]
      expect(AccountFetcher).to receive(:fetch_active_accounts).and_raise(RuntimeError)

      accounts = worker.send(:fetch_active_accounts!)

      expect(accounts).to eq [{ "id" => 1, "name" => "Account1" }]
    end
  end
end


text:
external help file: Microsoft.Azure.Commands.KeyVault.dll-Help.xml
ms.assetid: C4E7ACDF-22FB-4D49-93B3-69E787B7E0CD
online version: http://go.microsoft.com/fwlink/?LinkId=690301
schema: 2.0.0
---

# Restore-AzureKeyVaultKey

## SYNOPSIS
Creates a key in a key vault from a backed-up key.

## SYNTAX

```
Restore-AzureKeyVaultKey [-VaultName] <String> [-InputFile] <String> [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
The **Restore-AzureKeyVaultKey** cmdlet creates a key in the specified key vault.
This key is a replica of the backed-up key in the input file and has the same name as the original key.
If the key vault already has a key by the same name, this cmdlet fails instead of overwriting the original key.
If the backup contains multiple versions of a key, all versions are restored.

The key vault that you restore the key into can be different from the key vault that you backed up the key from.
However, the key vault must use the same subscription and be in an Azure region in the same geography (for example, North America).
See the Microsoft Azure Trust Center (https://azure.microsoft.com/support/trust-center/) for the mapping of Azure regions to geographies.

## EXAMPLES

### Example 1: Restore a backed-up key
```
PS C:\>Restore-AzureKeyVaultKey -VaultName 'MyKeyVault' -InputFile "C:\Backup.blob"
```

This command restores a key, including all of its versions, from the backup file named Backup.blob into the key vault named MyKeyVault.

## PARAMETERS

### -InputFile
Specifies the input file that contains the backup of the key to restore.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -VaultName
Specifies the name of the key vault into which to restore the key.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### Microsoft.Azure.Commands.KeyVault.Models.KeyBundle

## NOTES

## RELATED LINKS

[Add-AzureKeyVaultKey](./Add-AzureKeyVaultKey.md)

[Backup-AzureKeyVaultKey](./Backup-AzureKeyVaultKey.md)

[Get-AzureKeyVaultKey](./Get-AzureKeyVaultKey.md)

[Remove-AzureKeyVaultKey](./Remove-AzureKeyVaultKey.md)


text:
import {createSelector} from 'reselect';
import {sortObjectArrayByOrderProperty} from 'utils';

export const navigationLinkArraySelector = state => state.layoutReducer.navigationLinkArray;
export const socialMediaLinkArraySelector = state => state.layoutReducer.socialMediaLinkArray;

export const sortedNavigationLinkSelector = createSelector(
    navigationLinkArraySelector,
    navigationLinkArray => sortObjectArrayByOrderProperty(navigationLinkArray)
);

export const sortedSocialMediaLinkSelector = createSelector(
    socialMediaLinkArraySelector,
    socialMediaLinkArray => sortObjectArrayByOrderProperty(socialMediaLinkArray)
);