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
class AmazonReview | |
{ | |
public string Id { get; set; } | |
public string ProductId { get; set; } | |
public string ProfileName { get; set; } | |
public string HelpfulnessNumerator { get; set; } | |
public string HelpfulnessDenominator { get; set; } | |
public int Score { get; set; } | |
public int Time { get; set; } | |
public string Summary { get; set; } |
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 bool ValidateObject(object obj, string[] allowedNulls = null) | |
{ | |
if (obj == null) | |
{ | |
return false; | |
} | |
foreach (PropertyInfo property in obj.GetType().GetProperties()) | |
{ | |
if (property.GetIndexParameters().Length > 0) |
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
/client1 | |
Dockerfile | |
client1 | |
/client2 | |
Dockerfile | |
client2 | |
/serviceA | |
/serviceB | |
/solution.sln |
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
# Stage 1: Build the application | |
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | |
WORKDIR /src | |
# Copy the client1 project files | |
COPY client1/. ./client1/ | |
COPY serviceA/. ./serviceA/ | |
COPY serviceB/. ./serviceB/ | |
WORKDIR /src/client1 |
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
async function play_notes(notes) { | |
for (const note of notes) { | |
await play_note(note); | |
} | |
} | |
function play_note({ note, octave, duration }) { | |
return new Promise((resolve) => { | |
// Play the note for the duration | |
if (note != null && octave != null) { |
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
{ | |
"notes": [ | |
{ | |
"note": "E", | |
"octave": 4, | |
"duration": 300 | |
}, | |
{ | |
"note": "D", | |
"octave": 4, |
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
"function": { | |
"name": "play_notes", | |
"arguments": "{\n \"notes\": [\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"C\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"octave\": 4, \"duration\": 300 },\n { \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"duration\": 300 },\n { \"note\": \"E\", \"octave\": 4, \"duration\": 300 },\n { \"note\": \"D\", \"oc |
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
{ | |
"name": "play_notes", | |
"parameters": { | |
"type": "object", | |
"properties": { | |
"notes": { | |
"type": "array", | |
"description": "The ordered notes and pauses to play", | |
"items": { | |
"type": "object", |
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
// This is a partial example of the angular.json to show the new mock section under serve | |
"serve": { | |
"builder": "@angular-devkit/build-angular:dev-server", | |
"configurations": { | |
"production": { | |
"buildTarget": "json-server-demo:build:production" | |
}, | |
"development": { | |
"buildTarget": "json-server-demo:build:development" |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
... | |
<UserSecretsId>[your guid]</UserSecretsId> | |
</PropertyGroup> |