- windows下每行结尾为回车+换行(CR+LF),即 \r\n
- unix和macOS下每行结尾为换行LF,即 \n
- classic macOS(最后一个版本为1999年发布的Mac OS 9,可忽略)下为回车,即 \r
settings > Editor > Code Style > Line Separator > unix and macOS (\n)
#!/usr/bin/env bash | |
################ Description: ################### | |
# This script will disable all opt-out under | |
# Ubuntu 22.04 (Codename: Jammy Jellyfish). | |
# At first the telemetry domains will be resolved | |
# to the local host and second all telemetry services | |
# will be removed from the system. | |
# The following work has a system-wide effect not just |
## Pre-requisite: You have to know your last commit message from your deleted branch. | |
git reflog | |
# Search for message in the list | |
# a901eda HEAD@{18}: commit: <last commit message> | |
# Now you have two options, either checkout revision or HEAD | |
git checkout a901eda | |
# Or | |
git checkout HEAD@{18} |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
KeyboardAvoidingWithOffset() | |
.keyboardHeightEnvironmentValue() | |
} | |
} | |
struct KeyboardAvoidingWithOffset: View { |
#!/usr/bin/env python | |
""" | |
Convert CSV to Netscape Bookmark File | |
Works for files exported by Instapaper. | |
author: Sander van Dragt <sander@vandragt.com> | |
version: 2019-10-23.01 | |
""" | |
import csv | |
from sys import argv |
If you have found this link, then you know what this. I was fortunate to reach the founders on the Internet to ascertain ways in which those who of us who have working headset can still continue to use the device now that the servers have been deprovisioned.
First, if you do not have the latest client, I have secured the clients and hosted them on Mediafire here:
from great_tables import GT, md, html, system_fonts | |
import pandas as pd | |
power_cie_prepared_tbl = pd.read_csv("./data/2023_cie_power_cons.csv") | |
# Create a Great Tables object | |
ciep_gt_tbl = GT(data=power_cie_prepared_tbl) | |
# Apply wider color ranges & formatting | |
gt_tbl = ciep_gt_tbl \ |
/** | |
* Reduces drag sensitivity of [ViewPager2] widget | |
*/ | |
fun ViewPager2.reduceDragSensitivity() { | |
val recyclerViewField = ViewPager2::class.java.getDeclaredField("mRecyclerView") | |
recyclerViewField.isAccessible = true | |
val recyclerView = recyclerViewField.get(this) as RecyclerView | |
val touchSlopField = RecyclerView::class.java.getDeclaredField("mTouchSlop") | |
touchSlopField.isAccessible = true |