git submodule add git@github.com:microsoft/vcpkg.git tools/vcpkg
import base64
import mimetypes
def create_image_message(image_path: str) -> dict:
# Open the image file in "read binary" mode
with open(image_path, "rb") as image_file:
# Read the contents of the image as a bytes object
binary_data = image_file.read()
# Encode the binary data using Base64 encoding
base64_encoded_data = base64.b64encode(binary_data)
# Decode base64_encoded_data from bytes to a string
base64_string = base64_encoded_data.decode('utf-8')
// Partition using the Lomuto partition scheme
int partition(int a[], int start, int end)
{
// Pick the rightmost element as a pivot from the array
int pivot = a[end];
// elements less than the pivot will be pushed to the left of `pIndex`
// elements more than the pivot will be pushed to the right of `pIndex`
// equal elements can go either way
int pIndex = start;
// each time we find an element less than or equal to the pivot, `pIndex`
// is incremented, and
/**
* @param {number[][]} graph
* @return {number[]}
*/
var eventualSafeNodes = function(graph) {
const n = graph.length;
const safeNodes = [];
// This array keeps track of node states: 0 (unvisited), 1 (visiting), 2 (sage)
const state = new Array(n).fill(0);
// Helper function to check if a node is safe
function isSafe(node) {
if (state[node] > 0) {
return state[node] === 2;
}
state[node] = 1; // Mark as visiting
for (cons
## Get AD-User Groups for a User in Azure
In Azure Cloudshell connect to your tenant. Then use:
```powershell
Connect-AzureAD
$uid = $(Get-AzADUser -SignedIn).AdditionalProperties.id
Get-AzureADUserMembership -ObjectId $uid
```
Other useful commands:
```powershell
Get-AzADGroup [-Displayname xyz]
Get-AzADGroupMember -GroupDisplayName xyz
```
this.showMainSpinner(this.l('Uploading'));
this.hideMainSpinner();
// -- or --
private ngxSpinnerTextService: NgxSpinnerTextService;
constructor(
injector: Injector,
private _spinnerService: NgxSpinnerService)
{
this.ngxSpinnerTextService = injector.get(NgxSpinnerTextService)
}
this.ngxSpinnerTextService.setText(spinnerTexts.processingStep);
this._spinnerService.show();
this.ngxSpinnerTextService.setText(spinnerTexts.default);
this._spinnerService.hide();
## test1
this is my first snippet
find . -type d -name coverage-unit -not -path "*/node_modules/*" | xargs -I {} rm -rf {}
## test1
this is my first snippet
{{ 'component-card.bf.build.css' | asset_url | stylesheet_tag }}
{{ 'component-price.bf.build.css' | asset_url | stylesheet_tag }}
{{ 'component-slider.bf.build.css' | asset_url | stylesheet_tag }}
{{ 'slider-product.bf.build.css' | asset_url | stylesheet_tag }}
{%- if section.settings.enable_quick_add -%}
{{ 'quick-add.bf.build.css' | asset_url | stylesheet_tag }}
<script src="{{ 'quick-add.js' | asset_url }}" defer="defer"></script>
<script src="{{ 'product-form.js' | asset_ur
https://jsbin.com/jegerowode/edit?html,output
# 共享目录
```
version: '3.8'
services:
data:
image: xxx
command: sh -c "while true; do sleep 5; done"
volumes:
- shared_data:/data
app:
image: xxx
ports:
- "10002:80"
environment:
- ENV_A=XXX
volumes:
- shared_data:/workspace/data
user: "kna:kna"
depends_on:
- model
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
device_ids: ["
psql
CREATE TEMPORARY TABLE tmp (enc_key varchar,r_year numeric, regid varchar,lpno varchar, chf_flag varchar);
\COPY tmp (enc_key,r_year,regid ,lpno , chf_flag ) FROM 202401.01_001_cohortpool_abs_deat.txt;
\pset format unaligned
\pset tuples_only on
\pset fieldsep '\t'
\o cares_cohortpool_abs_deat.psql
select t.enc_key, cm.chain_id, cm.oldsys_root, d.lpno||'E', d.r_year, d.regid, t.chf_flag ,d.dob, d.dod1
FROM deathdata d
JOIN tmp t ON t.regid=d.regid and t.r_year=d.r_year
JOIN demo
{
"name": "Name",
"class": "section section-padding",
"disabled_on": {
"groups": ["header", "footer"]
},
"settings": [
{
"type": "metaobject",
"metaobject_type": "kits_compare",
"id": "compare_item",
"label": "Compare Item"
},
{
"type": "metaobject_list",
"metaobject_type": "latest_news",
"id": "latest_news",
"label": "Latest news"
},
{
"type": "range",
"id": "range_item",
"l
/**
* @param {number[][]} grid
* @return {number}
*/
var countServers = function(grid) {
const m = grid.length;
const n = grid[0].length;
const rowCount = new Array(m).fill(0); // Array to store the count of servers in each row
const colCount = new Array(n).fill(0); // Array to store the count of servers in each column
// Fill the rowCount and colCount arrays
for (let i = 0; i < m; i++) {
for (let j = 0; j < n; j++) {
if (grid[i][j] === 1) {