-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #192 from microsoft/staging
Release - 5/19/24
- Loading branch information
Showing
190 changed files
with
51,160 additions
and
412 deletions.
There are no files selected for viewing
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
...ension/Assets/QuickStartPlayground/Samples/bitcoin-price-tracker/.devcontainer/Dockerfile
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt update && \ | ||
apt install -y python3-pip python3-tk |
16 changes: 16 additions & 0 deletions
16
...Assets/QuickStartPlayground/Samples/bitcoin-price-tracker/.devcontainer/devcontainer.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "Python 3 Bitcoin Price Tracker", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"ms-python.python" | ||
] | ||
} | ||
}, | ||
"postCreateCommand": "pip3 install -r requirements.txt" | ||
} |
11 changes: 11 additions & 0 deletions
11
...reExtension/Assets/QuickStartPlayground/Samples/bitcoin-price-tracker/.vscode/launch.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Bitcoin Price Tracker", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "price_tracker.py" | ||
} | ||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
...reExtension/Assets/QuickStartPlayground/Samples/bitcoin-price-tracker/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Bitcoin Price Tracker | ||
|
||
This repository contains a Python 3 application that tracks the current price of Bitcoin. | ||
|
||
## Setup | ||
|
||
To set up the application, you will need to install the necessary dependencies. To do this, run the following command: | ||
|
||
``` | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Running the App | ||
|
||
To start the app, run the following command: | ||
|
||
``` | ||
python price_tracker.py | ||
``` | ||
|
||
This will print out the current price of Bitcoin. |
1 change: 1 addition & 0 deletions
1
...ts/QuickStartPlayground/Samples/bitcoin-price-tracker/devquickstartplaygroundlanguage.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python |
1 change: 1 addition & 0 deletions
1
...sets/QuickStartPlayground/Samples/bitcoin-price-tracker/devquickstartplaygroundprompt.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Create a bitcoin price tracker using Python |
8 changes: 8 additions & 0 deletions
8
...AzureExtension/Assets/QuickStartPlayground/Samples/bitcoin-price-tracker/price_tracker.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import requests | ||
|
||
url = 'https://api.coindesk.com/v1/bpi/currentprice.json' | ||
|
||
response = requests.get(url) | ||
data = response.json() | ||
|
||
print("Bitcoin Price: $" + data['bpi']['USD']['rate']) |
1 change: 1 addition & 0 deletions
1
...AzureExtension/Assets/QuickStartPlayground/Samples/bitcoin-price-tracker/requirements.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
requests |
6 changes: 6 additions & 0 deletions
6
...zureExtension/Assets/QuickStartPlayground/Samples/cpp-helloworld/.devcontainer/Dockerfile
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y g++ gdb gcc clang cmake tar |
15 changes: 15 additions & 0 deletions
15
...ension/Assets/QuickStartPlayground/Samples/cpp-helloworld/.devcontainer/devcontainer.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "C++", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"ms-vscode.cpptools" | ||
] | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-helloworld/.vscode/launch.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Main", | ||
"type": "cppdbg", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/main.out", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceFolder}", | ||
"environment": [], | ||
"externalConsole": false, | ||
"MIMode": "gdb", | ||
"setupCommands": [ | ||
{ | ||
"description": "Enable pretty-printing for gdb", | ||
"text": "-enable-pretty-printing", | ||
"ignoreFailures": true | ||
} | ||
], | ||
"preLaunchTask": "Build Main" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-helloworld/.vscode/tasks.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "Build Main", | ||
"type": "shell", | ||
"command": "g++ -g main.cpp -o main.out", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-helloworld/README
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Set up | ||
|
||
Run `g++ -g main.cpp -o main.out` | ||
|
||
# Get started | ||
|
||
Run `./main.out` |
1 change: 1 addition & 0 deletions
1
...on/Assets/QuickStartPlayground/Samples/cpp-helloworld/devquickstartplaygroundlanguage.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c++ |
1 change: 1 addition & 0 deletions
1
...sion/Assets/QuickStartPlayground/Samples/cpp-helloworld/devquickstartplaygroundprompt.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Create a VS Code Codespaces ready environment to get started with a hello world application using C++ |
14 changes: 14 additions & 0 deletions
14
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-helloworld/main.cpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include <iostream> | ||
#include <string> | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
cout << "Hello World\n"; | ||
cout << "Input: "; | ||
string data; | ||
getline(cin, data); | ||
cout << "Output: " << data << "\n\n"; | ||
return 0; | ||
} |
1 change: 1 addition & 0 deletions
1
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-helloworld/prompt.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
==== EXAMPLE PROMPT: Create a VS Code Codespaces ready environment to get started with a hello world application using C++ ==== |
6 changes: 6 additions & 0 deletions
6
...ureExtension/Assets/QuickStartPlayground/Samples/cpp-simple-game/.devcontainer/Dockerfile
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
RUN apt update && \ | ||
apt install -y build-essential g++ libsdl2-dev gdb |
16 changes: 16 additions & 0 deletions
16
...nsion/Assets/QuickStartPlayground/Samples/cpp-simple-game/.devcontainer/devcontainer.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "C++ game", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"ms-vscode.cpptools" | ||
] | ||
} | ||
} | ||
} | ||
|
5 changes: 5 additions & 0 deletions
5
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-simple-game/.vscode/settings.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"files.associations": { | ||
"iostream": "cpp" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-simple-game/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# C++ simple game | ||
|
||
This repository contains a game written in C++ where you can move a character with the keyboard. | ||
|
||
## Running the Game | ||
|
||
1. Run `g++ -o game main.cpp -lSDL2` to build the game binary | ||
2. Run `./game` |
1 change: 1 addition & 0 deletions
1
...n/Assets/QuickStartPlayground/Samples/cpp-simple-game/devquickstartplaygroundlanguage.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c++ |
1 change: 1 addition & 0 deletions
1
...ion/Assets/QuickStartPlayground/Samples/cpp-simple-game/devquickstartplaygroundprompt.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Create a VS Code Codespaces ready environment to get started with a simple game using C++ |
64 changes: 64 additions & 0 deletions
64
src/AzureExtension/Assets/QuickStartPlayground/Samples/cpp-simple-game/main.cpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#include <SDL2/SDL.h> | ||
#include <iostream> | ||
|
||
const int SCREEN_WIDTH = 800; | ||
const int SCREEN_HEIGHT = 600; | ||
|
||
int main(int argc, char* args[]) { | ||
SDL_Window* window = NULL; | ||
SDL_Surface* screenSurface = NULL; | ||
|
||
if (SDL_Init(SDL_INIT_VIDEO) < 0) { | ||
std::cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << std::endl; | ||
} else { | ||
window = SDL_CreateWindow("SDL Tutorial", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN); | ||
if (window == NULL) { | ||
std::cout << "Window could not be created! SDL_Error: " << SDL_GetError() << std::endl; | ||
} else { | ||
screenSurface = SDL_GetWindowSurface(window); | ||
SDL_FillRect(screenSurface, NULL, SDL_MapRGB(screenSurface->format, 0xFF, 0xFF, 0xFF)); | ||
SDL_UpdateWindowSurface(window); | ||
SDL_Delay(2000); | ||
} | ||
} | ||
|
||
SDL_Rect player; | ||
player.x = 370; | ||
player.y = 480; | ||
player.w = 20; | ||
player.h = 20; | ||
|
||
bool quit = false; | ||
SDL_Event e; | ||
while (!quit) { | ||
while (SDL_PollEvent(&e) != 0) { | ||
if (e.type == SDL_QUIT) { | ||
quit = true; | ||
} else if (e.type == SDL_KEYDOWN) { | ||
switch (e.key.keysym.sym) { | ||
case SDLK_LEFT: | ||
player.x -= 1; | ||
break; | ||
case SDLK_RIGHT: | ||
player.x += 1; | ||
break; | ||
case SDLK_UP: | ||
player.y -= 1; | ||
break; | ||
case SDLK_DOWN: | ||
player.y += 1; | ||
break; | ||
} | ||
} | ||
} | ||
SDL_FillRect(screenSurface, NULL, SDL_MapRGB(screenSurface->format, 0xFF, 0xFF, 0xFF)); | ||
SDL_FillRect(screenSurface, &player, SDL_MapRGB(screenSurface->format, 0x00, 0xFF, 0x00)); | ||
SDL_UpdateWindowSurface(window); | ||
} | ||
|
||
SDL_DestroyWindow(window); | ||
SDL_Quit(); | ||
|
||
return 0; | ||
} | ||
|
Oops, something went wrong.