windows

Qt modbus serial port flow control handling

萝らか妹 提交于 2021-02-18 16:58:49
问题 I'm writing a small program using QModbusDevice over the serial port (using the QModbusRtuSerialMaster class) and have some problems. One of the problems seems to be that the flow control of the serial port is incorrect. Checking in a serial port sniffer I see that a working client sets RTS on when it sends requests, and then RTS off to receive replies. When I use QModbusRtuSerialMaster to send messages that doesn't happen. The message is sent correctly (sometimes, subject for another

How to install a msi using python script?

拥有回忆 提交于 2021-02-18 16:58:27
问题 Is there any python script to install a msi? I need to install msi and run it without showing any dialogue modal. I have msi on my folder c:\user\documents and i have a wxpython GUI developed using python script.I need to silent install msi and run the exe from the GUI. 回答1: simple use. No transforms provided, and code is non-blocking: import os os.system('msiexec /i %s /qn' % msi_location) With transforms, and code is non-blocking: import os os.system('msiexec /i %s TRANSFORMS=%s /qn' % (msi

Convert SVG to PNG with Python on Windows

亡梦爱人 提交于 2021-02-18 16:58:08
问题 Question: Which reproducible process can enable Windows Python users to render a SVG image into PNG? Many questions/answers (such as Convert SVG to PNG in Python and Server-side SVG to PNG (or some other image format) in python, which are not duplicates for the reasons explained below) explain how to convert a SVG to PNG with Python. Unfortunately, none of them are ready-to-use for Python + Windows . After more than 20 minutes, and many different attempts, I'm still unable to do it. More

Qt modbus serial port flow control handling

回眸只為那壹抹淺笑 提交于 2021-02-18 16:58:01
问题 I'm writing a small program using QModbusDevice over the serial port (using the QModbusRtuSerialMaster class) and have some problems. One of the problems seems to be that the flow control of the serial port is incorrect. Checking in a serial port sniffer I see that a working client sets RTS on when it sends requests, and then RTS off to receive replies. When I use QModbusRtuSerialMaster to send messages that doesn't happen. The message is sent correctly (sometimes, subject for another

Python print and wc with invalid argument leads to OSError

被刻印的时光 ゝ 提交于 2021-02-18 16:56:12
问题 I've come across some (to me) weird behaviour when piping the output of a Python script into wc with invalid arguments. λ python test.py Hello! λ python test.py | wc -li wc: unknown option -- i Try 'wc --help' for more information. Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'> OSError: [Errno 22] Invalid argument What is happening here? My configuration is Windows 10 Cmder msysgit 2.5.1.windows.1 来源: https://stackoverflow.com/questions/32555219/python

I found this code to get windows write privileges but it does not working

蓝咒 提交于 2021-02-18 16:55:11
问题 Im trying to create new file on D: drive with c/c++ I found this code to get windows write privileges but it does not working Can anybody help me i am new in c++? BOOL SetPrivilege( HANDLE hToken, // access token handle LPCTSTR lpszPrivilege, // name of privilege to enable/disable BOOL bEnablePrivilege // to enable (or disable privilege) ) { // Token privilege structure TOKEN_PRIVILEGES tp; // Used by local system to identify the privilege LUID luid; if(!LookupPrivilegeValue( NULL, // lookup

I found this code to get windows write privileges but it does not working

六月ゝ 毕业季﹏ 提交于 2021-02-18 16:54:59
问题 Im trying to create new file on D: drive with c/c++ I found this code to get windows write privileges but it does not working Can anybody help me i am new in c++? BOOL SetPrivilege( HANDLE hToken, // access token handle LPCTSTR lpszPrivilege, // name of privilege to enable/disable BOOL bEnablePrivilege // to enable (or disable privilege) ) { // Token privilege structure TOKEN_PRIVILEGES tp; // Used by local system to identify the privilege LUID luid; if(!LookupPrivilegeValue( NULL, // lookup

C++ crash when use setmode with _O_U8TEXT to deal with unicode

你离开我真会死。 提交于 2021-02-18 15:38:14
问题 What I've tried to print unicode is _setmode(_fileno(stdout), _O_U8TEXT); string str = u8"unicode 한글 hangul"; cout << str << endl; I used setmode to show and get unicode correctly, but It crashed with Debug Assertion Fail. However, _setmode(_fileno(stdout), _O_U16TEXT); wstring str = L"unicode 한글 hangul"; wcout << str << endl; _O_U16TEXT compile and print correctly. What should I do to use UTF-8? Do I have to find another trick? 回答1: _setmode mentions _O_U8TEXT and _O_U16TEXT (finally), but

Change system language for one/active window in WPF

限于喜欢 提交于 2021-02-18 12:47:14
问题 Is there a posibility to change system language only for one window in WPF? I know about InputLanguageManager but I assume that it changes language in whole system. 回答1: InputLanguageManager does exactly what you are asking for. It changes the keyboard layout for the current application. The keyboard layout is kept by the OS for each running application. Eg. if you open Notepad and switch to Russian, the open IE and switch to English, when you activate the Notepad application, your keyboard

How to compile OpenSSL on Windows?

给你一囗甜甜゛ 提交于 2021-02-18 11:37:05
问题 I have been following the instructions in the OpenSSL User Guide, which links to a guide by 3noch for compiling OpenSSL. Here are the tools/versions I am using: ActiveState Perl v5.20.2 Microsoft Visual Studio 2012 Netwide Assembler (NASM) v2.12.02 OpenSSL 1.0.2j (source tarball) Following the instructions, I am able to execute the following commands without issue: perl Configure VC-WIN32 --prefix=C:\Build-OpenSSL-VC-32 ms\do_ms Then, when I go on to execute nmake -f ms\nt.mak I receive the