V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  woshichuanqilz  ›  全部回复第 5 页 / 共 10 页
回复总数  189
1  2  3  4  5  6  7  8  9  10  
2019-07-16 14:57:48 +08:00
回复了 302766392 创建的主题 Python requests 请求网址出错
2019-07-15 10:28:52 +08:00
回复了 woshichuanqilz 创建的主题 Windows win 7 部分软件中文显示为方块这个问题如何解决?
参考的是这个链接, 上一个连接比这个少一步, 应该也是有效的
https://recoverit.wondershare.com/erase-data/how-to-clear-font-cache-on-windows.html
2019-07-15 10:27:37 +08:00
回复了 woshichuanqilz 创建的主题 Windows win 7 部分软件中文显示为方块这个问题如何解决?
@7654 已感谢, 重建字体 cache 是有效的,
重建 cache 的方法我参照的是这里。

https://www.techwalla.com/articles/how-to-rebuild-a-font-cache
2019-07-15 10:25:52 +08:00
回复了 woshichuanqilz 创建的主题 Python 有道翻译后台破解的问题。
@caneman 代码我 append 到楼顶了, 回复里面贴代码缩进有问题
2019-07-15 10:22:39 +08:00
回复了 woshichuanqilz 创建的主题 Python 有道翻译后台破解的问题。
@caneman 对, 我看教程的分析也是这样的, 关键的点就是时间戳和 md5, 但是这样用 python 写下来得到的返回值是 error 50, 我自己写的和之前教程上的代码都是这样。

```
# -*- coding: utf-8 -*-
# from lizhelib.scrapy_lizhe import *
import requests
import time
def str_MD5(origin_string):
import hashlib
m = hashlib.md5()
m.update(origin_string.encode('utf-8'))
return m.hexdigest()

keyword = "apple"
headers = {
'Accept': 'application/json, text/javascript, */*; q=0.01',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'en,zh-CN;q=0.9,zh;q=0.8,en-US;q=0.7',
'Connection': 'keep-alive',
'Content-Length': '237',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Cookie': '[email protected]; OUTFOX_SEARCH_USER_ID_NCOO=1539804542.6380599; _ntes_nnid=063365ee317cb05d955f6037c9b7f99b,1562145610441; DICT_UGC=be3af0da19b5c5e6aa4e17bd8d90b28a|; JSESSIONID=abcKgh9yV1U-IdF1piKVw; ___rl__test__cookies={}'.format(int(round(time.time() * 1000, 0))),
'Host': 'fanyi.youdao.com',
'Origin': 'http://fanyi.youdao.com',
'Referer': 'http://fanyi.youdao.com/',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest'
}

salt_value = str(int(round(time.time() * 1000, 0))) + '1'
form_data = {
'i': 'live',
'from': 'AUTO',
'to': 'AUTO',
'smartresult': 'dict',
'client': 'fanyideskweb',
'salt': salt_value,
'sign': str_MD5("fanyideskweb" + keyword + salt_value + "97_3(jkMYg@T[KZQmqjTK"),
'ts': str(int(round(time.time() * 1000, 0))),
'bv': str_MD5(headers["User-Agent"]),
'doctype': 'json',
'version': '2.1',
'keyfrom': 'fanyi.web',
'action': 'FY_BY_REALTlME'
}

url = "http://fanyi.youdao.com/translate_o?smartresult=dict&smartresult=rule"
response = requests.post(url, headers=headers, data=form_data)
print(response.content)
```
2019-06-28 15:33:55 +08:00
回复了 woshichuanqilz 创建的主题 Python 求助 pywintypes.com_error: (-2147221005, '无效的类字符串'... 问题
@1462326016 谢谢了 大概率是我的系统是精简版被阉割了
2019-06-28 10:38:12 +08:00
回复了 woshichuanqilz 创建的主题 Python 求助 pywintypes.com_error: (-2147221005, '无效的类字符串'... 问题
@1462326016 你下载的那个 dll?
2019-02-17 19:09:52 +08:00
回复了 woshichuanqilz 创建的主题 C cpp socket sockaddr: :"struct "重定义的问题
有了, 应该把所有的 windows.h 都放到 winsock2.h 之后
2019-02-17 18:43:22 +08:00
回复了 woshichuanqilz 创建的主题 C cpp socket sockaddr: :"struct "重定义的问题
对还有一个 image_tool.h 的 include :


#ifndef IMAGETOOL_H
#define IMAGETOOL_H
#include "stdafx.h"
#include <windows.h>
#include <nlohmann/json.hpp>
#include <algorithm>
#include <typeinfo>

#include <string>
#include <fstream>
#include <streambuf>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>


这个是 Stack Overflow 上高票问题的解法, 我就是照这个做的。
https://i.loli.net/2019/02/17/5c693a2020d64.png

那个 h 文件如果下面写一个 main, 当做 cpp 运行的话是成功的。
2019-01-03 15:07:19 +08:00
回复了 woshichuanqilz 创建的主题 Python 请教一个抓取动态网页内容的问题
@yuanfnadi @xiaocsl 多谢已经解决。


@xiaocsl 你的那个一般性方法很受用~
2018-09-28 11:51:50 +08:00
回复了 woshichuanqilz 创建的主题 Python pycharm 调试的时候遇到一个比较奇怪的问题
@neoblackcap elem_name 是传进来的参数, 这个错误不是在正常时候执行发生的问题, 是程序还没有运行的时候, 似乎是在预处理到这个位置的时候报错的。
2018-09-28 10:20:28 +08:00
回复了 woshichuanqilz 创建的主题 Python pycharm 调试的时候遇到一个比较奇怪的问题
@sangleft
主题里面有笔误,
# 在这行设置条件断点 elem_name = 'xxx' 报错
---> elem_name == 'xxx'

实际代码里面这个条件是对的。
2018-09-09 11:06:45 +08:00
回复了 woshichuanqilz 创建的主题 Python 如何让 pyinstaller 生成的文件小一点
我发现一个问题了, 就是不用 anaconda 做 venv 的话体积小很多楼上的方法我再试试
2018-08-26 11:55:17 +08:00
回复了 woshichuanqilz 创建的主题 Android 有没有可以根据地点提示的待办事项的软件?
@jimiton 有安卓了通知下~
2018-08-24 14:42:24 +08:00
回复了 Cheez 创建的主题 Python Python 怎么在屏幕上画图?
```
import wx
import time
app = wx.App(False)
s = wx.ScreenDC()
s.Pen = wx.Pen("#FF0000")
s.DrawLine(60,60,120,120)

```
用 wxpython
刚找到的, 问题是画完之后不知道怎么清除已经画上去的东西。
2018-05-20 22:27:10 +08:00
回复了 woshichuanqilz 创建的主题 硬件 程序有没有办法区分不同的鼠标?
@iwtbauh 设备 id 怎么看?
2018-04-30 08:55:23 +08:00
回复了 aocif23 创建的主题 问与答 真的是 chrome 做得太好吗?还是选个不差的使用?
很多服务都要用 google 的直观感觉 chrome 契合更好一点
@woshichuanqilz @yinbowu95 @huiyifyj @justahri @lookforsex @ifsoar0712 @easylee @0vels @mokeyjay @archknight @gamexg 多谢各位的批评我以后注意自己的提问。 不在做一个纯粹的伸手党
@mawangye 这个很强, 我已经用上了, 十分感谢。
2018-04-24 13:09:59 +08:00
回复了 woshichuanqilz 创建的主题 Python 如何合并多个只填写了一部分的表格?
@woshichuanqilz @TimePPT @chrisyunhua 一楼的方法是 ok 的
1  2  3  4  5  6  7  8  9  10  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5107 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms · UTC 01:12 · PVG 09:12 · LAX 18:12 · JFK 21:12
Developed with CodeLauncher
♥ Do have faith in what you're doing.