This file contains hidden or 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
#include <map> | |
#include <functional> | |
#include "sub_token.h" | |
using namespace std::placeholders; | |
using namespace std; | |
template <typename... Args> | |
class subject | |
{ |
This file contains hidden or 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
future<shared_ptr<GraphNode>> RootPageViewModel::LoadFileAsync() | |
{ | |
auto fop = ref new FileOpenPicker(); | |
fop->FileTypeFilter->Append(".glb"); | |
fop->FileTypeFilter->Append(".gltf"); | |
auto file = co_await fop->PickSingleFileAsync(); | |
if (file == nullptr) | |
co_return nullptr; |
This file contains hidden or 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
using (var httpClient = new HttpClient()) | |
{ | |
var response = await httpClient.GetAsync("https://dev.microsofttranslator.com/languages?api-version=1.0&scope=text,tts,speech"); | |
response.EnsureSuccessStatusCode(); | |
var jsonString = await response.Content.ReadAsStringAsync(); | |
dynamic obj = JsonConvert.DeserializeObject(jsonString); | |
// Do some stuff with obj... | |
} |
This file contains hidden or 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
private async Task<string> GetTokenAsync() | |
{ | |
string key = "--- YOUR API KEY HERE ---";// Environment.GetEnvironmentVariable("SKYPE_KEY"); | |
if (string.IsNullOrEmpty(key)) | |
{ | |
Debug.Log("Please set an environment variable named 'SKYPE_KEY' to your Skype api key"); | |
return string.Empty; | |
} | |
// First retrieve a time-restricted key to use to access the API (will need to write code |
This file contains hidden or 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
/// <summary> | |
/// Convert floating point audio data in the range -1.0 to 1.0 to signed 16-bit audio data | |
/// and populate the provided stream | |
/// </summary> | |
/// <param name="audioData"></param> | |
/// <param name="stream"></param> | |
/// <returns></returns> | |
int BufferConvertedData(float[] audioData, Stream stream) | |
{ | |
// Can't just do a block copy here as we need to convert from float[-1.0f, 1.0f] to 16bit PCM |
This file contains hidden or 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
using System; | |
namespace MSHealthBot | |
{ | |
public class Sleep | |
{ | |
public Sleepactivity[] sleepActivities { get; set; } | |
public int itemCount { get; set; } | |
} |
NewerOlder