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> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| #include <vorbis/codec.h> | |
| #include <vorbis/vorbisfile.h> | |
| #include <alsa/asoundlib.h> | |
| #define PCM_DEVICE "default" | |
| int init_alsa(snd_pcm_t **pcm_handle, snd_pcm_hw_params_t **params, int channels, int rate) | |
| { |
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
| /* | |
| * Simple sound playback using ALSA API and libasound. | |
| * | |
| * Compile: | |
| * $ cc -o play sound_playback.c -lasound | |
| * | |
| * Usage: | |
| * $ ./play <sample_rate> <channels> <seconds> < <file> | |
| * | |
| * Examples: |
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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM] | |
| "Composition"=dword:00000001 | |
| "ColorizationOpaqueBlend"=dword:00000001 | |
| "EnableAeroPeek"=dword:00000001 | |
| "CompositionPolicy"=dword:00000002 | |
| "AlwaysHibernateThumbnails"=dword:00000000 | |
| "LastDisqualifiedCompositionSignature"=dword:000c0000 |
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 | |
| echo '---My Bili Bangumi Downloaded Content Converter---' | |
| for folder in `find . -maxdepth 1 -type d` | |
| do | |
| if [[ "$folder" == '.' ]]; then | |
| continue | |
| else | |
| pushd $folder | |
| if [ -e 'entry.json' ]; then | |
| fd="`jq -r '.type_tag' < 'entry.json'`" |
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> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| void CreateProcess(char *src, char *des, unsigned long int blocksize, int proc_num); |
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> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <sys/wait.h> | |
| #include <sys/types.h> | |
| int main() { | |
| pid_t pid, wpid; | |
| int status, i; |
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> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <ctype.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #define BUF_SIZE 0x1000 |
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> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| /*用fork创建子进程后执行的是和父进程相同的程序(但有可能执行不同的代码分支), | |
| * 子进程往往要调用一种exec函数以执行另一个程序。 | |
| * 当进程调用一种exec函数时,该进程的用户空间代码和数据完全被新程序替换, | |
| * 从新程序的启动例程开始执行。调用exec并不创建新进程,所以调用exec前后该进程的id并未改变。 | |
| * 其实有六种以exec开头的函数,统称exec函数: |
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 <iostream> | |
| #include <vector> | |
| #include <algorithm> | |
| using namespace std; | |
| //https://www.nowcoder.com/practice/abc3fe2ce8e146608e868a70efebf62e | |
| class Solution { | |
| public: | |
| bool Find(int target, vector<vector<int> > array) { | |
| vector<int>::iterator iterSmall; | |
| vector<vector<int> >::iterator iterBig; |
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 <SDL.h> | |
| #include <SDL_image.h> | |
| #include <cstdio> | |
| #include <iostream> | |
| using namespace std; | |
| //窗口宽 | |
| const int SCREEN_WIDTH = 1024; | |
| //窗口高 |