- 博客(7)
- 收藏
- 关注
原创 python Dijkstra算法 + 斐波那契堆
def networkDelayTime(self, edges, N, S, D = None): # for (d, t) in edges[s], it means that there is a one-way path from s to d with cost t # N is the number of all vertexes, S is the source v...
2019-04-17 14:36:14
1533
原创 打印从QQQQQQQQQQ到0000000000
l = 'QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890'file = open('brute', 'w')def stl(s): r = [] for i in range(0, len(s)): r.append(s[i]) return rdef lts(l): r = '' for i in...
2018-11-09 12:43:26
1843
原创 python下载网络图片
import requestsr = requests.get(url, possible auth,params,cookies)file = open(filename, 'wb')file.write(r.content)file.close()
2018-08-01 00:34:49
396
原创 Ubuntu操作鼠标
#include <X11/extensions/XTest.h>#include <X11/Xlib.h>int main() { Display *display = XOpenDisplay(NULL); XEvent event; /* move mouse to a relative position Window r...
2018-05-25 01:30:03
1145
原创 Ubuntu读取桌面某个点的像素
#include <X11/Xlib.h>#include <X11/X.h>#include <X11/Xutil.h>using namespace std;unsigned long readPixel(int x, int y) { Display *display = XOpenDisplay(NULL); Window root = ...
2018-05-24 00:27:56
765
原创 把一个Color转为html里所用的颜色代码
public String getColorCode(Color color) { String string; return "#" + ((string = Integer.toHexString(color.getRed())).length() == 2 ? string : ("0" + string)) + ((string = Integer.toHexString(
2016-04-09 01:13:19
683
原创 广度优先懵逼VS深度优先懵逼
import java.util.ArrayList;public class Test { public static void main(String[] arg0) { String answer = "1259"; ArrayList answers = new ArrayList(); if (answer.indexOf("= 0) { int i;
2016-03-24 08:54:59
872
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人