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
@echo off | |
rem This script is used to close multiple programs with specified process names | |
rem Please enter the process names of the programs you want to close below, enclosed in double quotes and separated by spaces | |
set processes="notepad.exe" "mspaint.exe" "calc.exe" | |
rem Use a for loop to traverse each process name, use the taskkill command to forcibly end the process according to the process name, /f parameter means forced closure, /im parameter means filtering according to image name | |
for %%p in (%processes%) do ( | |
taskkill /f /im %%p | |
rem Show operation results | |
if %errorlevel%==0 ( | |
echo Successfully closed %%p |
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 os | |
def iterate_over_files(path): | |
for filepath, dirnames, filenames in os.walk(path): | |
for filename in filenames: | |
print(os.path.join(filepath, filename)) | |
iterate_over_files('/tmp') |
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 <dirent.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]){ | |
DIR *dp; | |
struct dirent *dirp; | |
if(argc!=2){ | |
printf("error: ls directory_name\n"); | |
exit(-1); |
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
// usage: | |
// g++ -stdc++17 filelists.cpp -o filelists | |
// ./filelists | |
#include <iostream> | |
#include <string> | |
#include <filesystem> | |
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/sh | |
# backlight | |
xbacklight -set 20 | |
# background | |
xcompmgr& | |
# background | |
feh --bg-fill /home/milk/.config/feh/mybackground.png --bg-scale /home/milk/.config/feh/mybackground.png |
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
class _Getch: | |
"""Gets a single character from standard input. Does not echo to the screen.""" | |
def __init__(self): | |
try: | |
self.impl = _GetchWindows() | |
except ImportError: | |
self.impl = _GetchUnix() | |
def __call__(self): return self.impl() |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<mirrors> | |
<mirror> | |
<id>aliyunmaven</id> | |
<mirrorOf>central</mirrorOf> |
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
def repoConfig = { | |
all { ArtifactRepository repo -> | |
if (repo instanceof MavenArtifactRepository) { | |
def url = repo.url.toString() | |
if (url.contains('repo1.maven.org/maven2') || url.contains('jcenter.bintray.com')) { | |
println "gradle init: (${repo.name}: ${repo.url}) removed" | |
remove repo | |
} | |
} | |
} |
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
cmake_minimum_required(VERSION 2.8) | |
project(opencv_cmake) | |
find_package(OpenCV REQUIRED) | |
include_directories(${OpenCV_INCLUDE_DIRS}) | |
add_executable(${PROJECT_NAME} main.cpp) | |
target_link_libraries(main ${OpenCV_LIBS}) |
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
cmake_minimum_required(VERSION 3.16) | |
project(sdl_cmake) | |
set(CMAKE_CXX_STANDARD 14) | |
file(GLOB_RECURSE SOURCES "src/*.cpp") | |
file(GLOB_RECURSE HEADERS "src/*.h") | |
add_executable(${PROJECT_NAME} ${HEADERS} ${SOURCES}) |
NewerOlder