# original column
In [15]: df["timedelta_column"]
Out[15]:
0 1 days 00:00:00
1 3 days 02:00:00
2 5 days 04:00:00
3 7 days 06:00:00
4 9 days 08:00:00
5 11 days 10:00:00
dtype: timedelta64[ns]
# all components
In [17]: df["timedelta_column"].dt.components
Out[17]:
days hours minutes seconds milliseconds microseconds nanoseconds
0 1 0 0 0 0 0 0
1 3 2 0 0 0 0
import os
extension = os.path.splitext(filename)[1]
▼yyyymmdd_記事ID
/%year%%monthnum%%day%_%post_id%/
# Create a matrix 3 columns
mtrx <- matrix(1:12, nrow = 3)
# Create a matrix 4 cols
mtrx <- matrix(1:12, ncol = 4)
# Create a matrix 4 cols organized by row
mtrx <- matrix(1:12, ncol = 4, byrow = TRUE)
# cbind command, bind two matrices
usa <- c(1.0, 1.5, 1.2, 1.5, 2.5)
de <- c(0.2, 0.4, 0.7, 0.8, 0.8)
ngo <- cbind(usa, de)
# give names to rows
rownames(ngo) <- c("2013", "2014", "2015", "2016", "2017")
# transpose columns and rows
ngo <- t(ngo)
# add another row to the matrix
ind <- c(1.2,
/**
* @param {number[]} nums
* @param {number} k
* @param {number[][]} edges
* @return {number}
*/
// Function to calculate the maximum value sum
var maximumValueSum = function(nums, k, edges) {
// Initialize variables
let totalSum = 0; // Total sum of node values
let count = 0; // Count of nodes where operation increases the value
let positiveMin = Infinity; // Minimum positive change in node value
let negativeMax = -Infinity; // Maximum negative change in node value
robocopy C:\src D:\dst /E /COPYALL
![](https://cdn.cacher.io/attachments/u/3b3qij9sue2rm/49QLBhIlMWNRp_UGE2q1h80TR7Aj6tOU/sy71bi8gl.png)
![](https://cdn.cacher.io/attachments/u/3b3qij9sue2rm/Rpmw0U5nUfxuG7NMSvUvefuDuLqlDJfr/bbuse1rj3.png)
![](https://cdn.cacher.io/attachments/u/3b3qij9sue2rm/vGTcijes6_1uLKZWJQ60c22VzTibCN9J/x49m92u3t.png)
![](https://cdn.cacher.io/attachments/u/3b3qij9sue2rm/ogGm1iosWR4iCuT1Ot6lZyZD6Y9h0Zuw/f9mjrtlj0.png)
![](https://cdn.cacher.io/attachments/u/3b3qij9sue2rm/QnECT9hSbg6W5eBrI3PgyKWzYRBLEOSY
<?php
//
// Do NOT USE OPENING <?php TAG IN ALFRED APP
//
/**
* Open 1 or more (comma or new line separated) issue number URLs from selection.
*
* @link https://github.com/cliffordp/alfred-app-workflows Download this Alfred App Workflow's code (and more).
* @link https://gist.github.com/cliffordp/8bfc4fee7161ceff3ac9191062a866af This Alfred App Workflow's code snippet.
*
* Example selections (without quotes):
* "12345,281928" // comma without space
* "12345, 281928" // comma with sp
1 https://leetcode.com/problems/minimum-window-substring/description/
![](https://cdn.cacher.io/attachments/u/3b3qij9sue2rm/viqGYj3F1Rl7ewEzUIM6WSasbENHLMse/knzowmkgj.png)
```python
class Solution:
def minWindow(self, s, t):
# Importing defaultdict for more efficient counting
from collections import defaultdict
# Creating a defaultdict to store the frequency of characters in string t
char_map = defaultdict(int)
for c in t:
char_map[c] +
#!/bin/bash
emulator -avd Nexus_7_API_27 &
# Wait for the emulator to fully start
echo "Waiting for emulator to start..."
boot_completed=false
while [ "$boot_completed" != "1" ]; do
sleep 5
boot_completed=$(adb -e shell getprop sys.boot_completed 2>/dev/null)
done
echo "Emulator is fully started."
# run activity on app
adb shell am start -n package/activity
Make some space on sdc and create a 10GB vfat partition and flag it with boot,esp and name the partition and file system “RECOVERY”.
Mount it and install grub on it:
sudo mount --mkdir --label RECOVERY /mnt/recovery
sudo grub-install --target=x86_64-efi --recheck --removable --efi-directory=/mnt/recovery --boot-directory=/mnt/recovery/boot --verbose --force
Create an efi entry in your UEFI/BIOS:
sudo efibootmgr --create --disk /dev/sda --part 7 --label "Recovery" --loader '\EFI\BOOT\BOOTX64.
`SHOW CREATE TABLE bootcamp.nba_game_details`
Display a statement that creates the table
import json
# Specify the filename
filename = 'contacts.json'
# Function to search for a contact by name
def search_contact_by_name(contacts, name):
for contact in contacts:
if contact['name'].lower() == name.lower():
return contact
return None
# Read the JSON data from the file
try:
with open(filename, 'r') as json_file:
data = json.load(json_file)
except FileNotFoundError:
print(f"The file {filename} does not exist.")
except json
## JPA-Spring Tips and Tricks
### Rollback programatically
`TransactionAspectSupport.currentTransactionStatus().setRollbackOnly()`
import json
# Specify the filename
filename = 'contact.json'
# Try to read the JSON data from the file
try:
with open(filename, 'r') as json_file:
data = json.load(json_file)
print(data)
except FileNotFoundError:
print(f"The file {filename} does not exist.")
except json.JSONDecodeError:
print(f"Error decoding JSON from the file {filename}.")