Skip to content

Instantly share code, notes, and snippets.

vector<int> DIJKSTRA(int start, int end, vector<vector<int>>& edges, int n) {
vector<vector<pair<int, int>>> graph(n);
for (const auto& edge : edges) {
graph[edge[0]].push_back({edge[1], edge[2]});
graph[edge[1]].push_back({edge[0], edge[2]});
}
vector<int> distance(n, INT_MAX);
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
pq.push({0, start});
@emilianavt
emilianavt / BestVTuberSoftware.md
Last active April 25, 2024 12:18
Best VTuber Software

Best VTuber software

This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.

Additional explanations:

  • iPhone means that an iPhone is basically required
  • iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
  • VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
  • Tobii means that the Tobii eye tracker is supported
@dragonfire1119
dragonfire1119 / how-to-ssh-into-a-proxmox-container.md
Created June 19, 2023 13:32
How to SSH into a Proxmox container

Proxmox

So if you're using Proxmox you need to open up ssh and run the following commands:

  1. Setup a root password
sudo passwd root
@lopspower
lopspower / README.md
Last active April 25, 2024 12:17
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@SahilK-027
SahilK-027 / KMP.cpp
Last active April 25, 2024 12:16
KMP
// String p # s
// S: a a b # a a b a a b a a b
// LPS: 0 1 0 0 1 2 3 1 2 3 1 2 3
vector<int> KMP(string& s){
vector<int> LPS(s.length(), 0);
for(int i = 1 ; i < s.length(); i++){
int prev_idx = LPS[i-1];
while(prev_idx > 0 && s[i] != s[prev_idx]){
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
@Xynonners
Xynonners / AHAA.gdshader
Last active April 25, 2024 12:15
new godot antialiasing (Absurd Hybrid Anti-Aliasing)
shader_type spatial;
render_mode unshaded, depth_prepass_alpha;
void vertex() {
POSITION = vec4(VERTEX, 1.0);
}
uniform sampler2D BackBufferTex : hint_screen_texture, repeat_disable, filter_nearest;
uniform sampler2D DepthBufferTex : hint_depth_texture, repeat_disable, filter_nearest;

Gambaran umum

Struktur folder ini dibuat berdasarkan prinsip enkapsulasi dan modularisasi. Jadi kodingan-kodingan yang ada dipisah-pisah menjadi modul-modul kecil sesuai fungsi masing masing. Dalam menjalankan fungsinya, setiap modul tidak boleh ada ketergantungan langsung dengan modul yang lain. Di projek android ini secara umum ada beberapa fungsi:

  1. Fetch API
    • Model
    • Proses Request dan Response
    • Autentikasi
  2. Token Management (storage)
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 25, 2024 12:14
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@knowbody
knowbody / RNfontWeights.js
Created July 14, 2016 13:42
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black