Ctrl+KB | toggle side bar |
Ctrl+Shift+P | command prompt |
Ctrl+` | python console |
Ctrl+N | new file |
This file contains 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 <signal.h> | |
#include <stdio.h> | |
#include <time.h> | |
static void sig_alrm(int); /* one handler for both signals */ | |
time_t start,stop; | |
int main(void) | |
{ | |
signal(SIGALRM,sig_alrm); | |
start = time(NULL); |
This file contains 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 | |
SHORTCUT="[Desktop Entry] | |
Name=Sublime Text 2 | |
Comment=Edit text files | |
Exec=/usr/local/sublime-text-2/sublime_text | |
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png | |
Terminal=false | |
Type=Application | |
Encoding=UTF-8 | |
Categories=Utility;TextEditor;" |
This file contains 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
obj-m:=call_dev.o | |
KDIR :=/lib/modules/$(shell uname -r)/build | |
PWD := $(shell pwd) | |
default: | |
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules | |
clean: | |
rm -rf *.ko | |
rm -rf *.mod.* |
This file contains 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() | |
{ | |
int i; | |
int* pI; | |
char* pC; | |
float* pF; | |
pI=&i; |
This file contains 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
cosnt int* p; //p可变,p指向的内容不可变 | |
int const* p;//p可变,p指向的内容不可变 | |
int* const p;//p不可变,p指向的内容可变 | |
const int* const p;//p和p指向的内容都不可变 | |
口诀:左数右指 | |
当const出现在*的左边时,指针指向的数据为常量 | |
当const出现在*的右边时,指针本身为常量 |
This file contains 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
char * strcpy(char *str1,const char *str2) | |
{ | |
assert( (str1!=NULL)&& (str2 != NULL));//判断指针的合法性 | |
char *address = str1;//记录目标指针所指向的地址 | |
while( (*str1++=*str2++) !='\0');//拷贝知道str2结束 | |
return address;//返回目标地址 | |
} |
This file contains 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
# -*- coding: utf8 -*- | |
# 下载速度很慢, | |
import urllib2, urllib | |
import sys | |
import os | |
import socket | |
import re | |
import socks |
This file contains 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() | |
{ | |
int s=8,d=10,m=35; | |
int u=0; | |
for(;u<20;u++) | |
{ |
This file contains 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() | |
{ | |
int s,temp,i,j,a[20]; | |
printf("Enter total no. of elements:"); | |
scanf("%d",&s); | |
printf("Enter %d elements:",s); | |
for(i=0;i<s;i++) |
OlderNewer