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
| #!/usr/bin/env python | |
| # encoding: utf-8 | |
| """ | |
| letters-to-100.py | |
| """ | |
| import string | |
| letter_values = dict((l, i) for i, l in enumerate(string.lowercase, start=1)) | |
| english_dict = open('/usr/share/dict/words', 'rU') |
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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| </head> | |
| <body> | |
| <?php | |
| $user_agent = $_SERVER['HTTP_USER_AGENT']; | |
| if (strpos($user_agent, 'MicroMessenger') === false) { | |
| echo ' | |
| <center><h1>输入各大视频网站VIP视频链接即可观看</h1></center> |
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
| #!/usr/bin/env python3 | |
| # coding: utf-8 | |
| """ | |
| wxpy 机器人正在使用的所有代码 | |
| 可能需要安装开发分支的 wxpy | |
| pip3 install -U git+https://github.com/youfou/wxpy.git@develop |
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
| /* 邻接矩阵存储的图 - BFS */ | |
| /* IsEdge(Graph, V, W)检查<V, W>是否图Graph中的一条边,即W是否V的邻接点。 */ | |
| /* 此函数根据图的不同类型要做不同的实现,关键取决于对不存在的边的表示方法。*/ | |
| /* 例如对有权图, 如果不存在的边被初始化为INFINITY, 则函数实现如下: */ | |
| bool IsEdge( MGraph Graph, Vertex V, Vertex W ) | |
| { | |
| return Graph->G[V][W]<INFINITY ? true : false; | |
| } | |
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
| typedef int Position; | |
| struct SNode { | |
| ElementType *Data; /* 存储元素的数组 */ | |
| Position Top; /* 栈顶指针 */ | |
| int MaxSize; /* 堆栈最大容量 */ | |
| }; | |
| typedef struct SNode *Stack; | |
| Stack CreateStack( int MaxSize ) | |
| { |
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> | |
| void printN1(int N) | |
| { | |
| for (int i = 1; i <= N; ++i) | |
| { | |
| printf("%d\n", 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
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| var fs = [4]func(){} | |
| for i := 0; i < 4; 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
| # 从第10行开始,到最后,删除每行前25个任意字符 | |
| sed -i '10,$s/^.\{25\}//' test.txt | |
| # 替换包含BTS字段的行为- | |
| sed -i '/.*BTS.*/s/.*/-/g' syslog_Enb_syslog_1.log | |