When specifying versions for packages or modules, you may encounter various formats. Below are the details and examples to help you understand and apply the correct version specifiers.
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 <stdio.h> | |
int main() { | |
// 1. Declaring a Pointer | |
int *ptr; // Pointer to an integer | |
// 2. Assigning Address to a Pointer | |
int var = 10; | |
ptr = &var; // ptr now holds the address of var |
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 extractHrefsAsBashArray() { | |
const domain = window.location; | |
const links = document.querySelectorAll('body main.container div.list table.table tbody tr td a'); | |
const hrefsArray = Array.from(links).map(link => { | |
const href = link.getAttribute('href'); | |
return href ? (href.startsWith('http') ? href : domain + href) : ''; | |
}).filter(href => href); | |
console.log(`urls=(\n ${hrefsArray.map(href => `"${href}"`).join('\n ')}\n)`); | |
})(); |
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
local wezterm = require('wezterm') | |
local bell_sent = false | |
-- Window focus event handler: Resets the bell_sent flag when the window gains focus | |
wezterm.on('window-focus-changed', function(window, has_focus) | |
if has_focus then | |
bell_sent = false | |
end | |
end) |
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
# Colors | |
background_opacity 0.95 | |
#foreground #d2d7d7 | |
#background #120e0a | |
#cursor #d2d7d7 | |
#active_tab_foreground #120e0a | |
#active_tab_background #d2d7d7 | |
#inactive_tab_foreground #d2d7d7 | |
#inactive_tab_background #120e0a |
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
#!/bin/bash | |
set -euo pipefail | |
exclude_networks=("1.2.3.4" "1.2.3.0/24") | |
for net in "${exclude_networks[@]}"; do | |
if sudo ip route del "$net" 2>/dev/null; then | |
echo "Deleted existing route for $net" | |
fi | |
done |
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
/** | |
* Cache-Aside (Lazy Loading): Read from cache and return it, then update the cache later. | |
*/ | |
fun getUserConfigLazily(): Flow<UserConfig?> = flow { | |
emitAll(local.getUserConfigAsFlow()) | |
if (onlineChecker.isOnline) { | |
val remoteConf = remote.getUserConfig() | |
if (remoteConf != null) { | |
local.updateUserConfig(remoteConf) | |
} |
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
import android.util.Log; | |
import okhttp3.Interceptor; | |
import okhttp3.Request; | |
import okhttp3.Response; | |
import java.io.IOException; | |
import java.net.SocketTimeoutException; | |
public class RetryPolicyInterceptor implements Interceptor { |
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
sudo rm /usr/lib/python3.*/EXTERNALLY-MANAGED |
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
#!/bin/bash | |
# Define the list of URLs | |
urls=( | |
"https://example.com/file1.mkv" | |
"https://example.com/file2.mp3" | |
) | |
# Resumable downloader function | |
download_file() { |
NewerOlder