This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem | |
rem **************************************************************************** | |
rem | |
rem Copyright (c) Microsoft Corporation. All rights reserved. | |
rem This code is licensed under the Microsoft Public License. | |
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF | |
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY | |
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR | |
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte[] b = new byte[32]; | |
RandomNumberGenerator randomNumberGenerator = RandomNumberGenerator.Create(); | |
randomNumberGenerator.GetBytes(b); | |
string result = Convert.ToBase64String(b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void PublicFeedIsNotNull() | |
{ | |
PublicFeedRootObject result = null; | |
var mre = new ManualResetEvent(false); | |
untapped = new UntappdService(); | |
untapped.PublicFeed(publicFeed => | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service cannot be started. System.IO.FileLoadException: Mixed mode assembly is built against version | |
'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration | |
information. | |
at Microsoft.MediaCenter.Store.ObjectStore.Open(String fileName, String providerName, String password, Assembly callingAssembly, Boolean isCollecting) | |
at Microsoft.MediaCenter.Store.ObjectStore.Open(String fileName, String providerName, String password, Boolean isAdminRequested) | |
at Microsoft.MediaCenter.Store.ObjectStore.AddObjectStoreReference() | |
at Microsoft.MediaCenter.Store.ObjectStore.get_DefaultSingleton() | |
at Microsoft.MediaCenter.TV.Scheduling.Internal.EventScheduleHandler..ctor(RecordingChangeEventHandler recordingChangeHandler, RequestedProgramChangeEventHandler requestedProgramChangeHandler) | |
at Microsoft.MediaCenter.TV.Scheduling.EventSchedule..ctor() | |
at Microsoft.HomeServer.Archive.TransferService.ScheduleMonitor.Start() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void ensure_controller_dependencies_are_bound() | |
{ | |
var assemblyName = "MvcApplication4"; | |
var assembly = Assembly.Load(assemblyName); | |
var parameters = (from type in assembly.GetTypes().Where( | |
t => t.IsAbstract == false && typeof (Controller).IsAssignableFrom(t)) | |
from constructor in type.GetConstructors() | |
from parameter in constructor.GetParameters() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var parameters = new Dictionary<string, object> { { "message", "Hello!" } }; | |
await ParseCloud.CallFunctionAsync<IDictionary<string, object>>("sendsms", parameters); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$imgname = 'WS2012-WebFarmImage' | |
$cloudsvc = 'DemoWebFarm' | |
$pass = 'Password' | |
$subscriptionName = 'Windows Azure MSDN - Visual Studio Ultimate' | |
$storageAccount = 'portalvhds9dvbvvff5hdg3' | |
$location = 'East US' | |
Set-AzureSubscription -SubscriptionName $subscriptionName -CurrentStorageAccount $storageAccount | |
$iisvm1 = New-AzureVMConfig -Name 'iis1' -InstanceSize Small -ImageName $imgname | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\QueryBuilder] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
consumer_key = "YOUR_CONSUMER_KEY" | |
consumer_secret = "YOUR_CUSTOMER_SECRET" | |
username = "YOUR_USER_NAME" | |
password = "YOUR_PASSWORD" | |
payload = { | |
'grant_type': 'password', | |
'client_id': consumer_key, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local secretKey = "YOUR_SECRET_KEY" | |
local data = { | |
client_id = "YOUR_CONSUMER_KEY", | |
client_secret = "YOUR_CONSUMER_SECRET", | |
grant_type = "password", | |
username = "YOUR_LOGIN", | |
password = "YOUR_PASSWORD" .. secretKey | |
} |
OlderNewer