windows

Can someone please tell me what's wrong with this FOR loop?

天大地大妈咪最大 提交于 2021-02-11 12:40:59
问题 Apologies if duplicate, but no other answers so far have helped. All I'm trying to do is loop through the files in a folder, and rename the last part of the file/extension. Simply put - there could be 1-90 files, [filename]_01 - [filename]_90, and each day (via windows event scheduler) the number has to increment by one. Nothing I do seems to achieve this. The files are also meant to behave slightly differently when they hit certain milestones (30-60-90) but this I believe should already work

Can someone please tell me what's wrong with this FOR loop?

左心房为你撑大大i 提交于 2021-02-11 12:39:34
问题 Apologies if duplicate, but no other answers so far have helped. All I'm trying to do is loop through the files in a folder, and rename the last part of the file/extension. Simply put - there could be 1-90 files, [filename]_01 - [filename]_90, and each day (via windows event scheduler) the number has to increment by one. Nothing I do seems to achieve this. The files are also meant to behave slightly differently when they hit certain milestones (30-60-90) but this I believe should already work

CSV Reader different outputs on Ubuntu and Windows - Python [duplicate]

孤者浪人 提交于 2021-02-11 12:36:12
问题 This question already has answers here : Python 2 CSV writer produces wrong line terminator on Windows (3 answers) Closed 4 years ago . I have a file called Some.csv which has a field (column) which has values like 1000, 2000, .... 39000. I wanted only the files with 39000 so I wrote the following python script import os import csv with open('Somenew.csv', 'w') as fw: writr = csv.writer(fw, delimiter=',') with open('Some.csv','r') as fr: reader = csv.reader(fr, delimiter = ',') for row in

Visual Basic Shell Administrator?

丶灬走出姿态 提交于 2021-02-11 12:35:11
问题 If I'm using Visual Basic to run an executable using the Shell() command, how would I run that executable as an administrator? My method works, at least in practice, but one executable won't run properly and I think that's the issue. Here's an example of the command I'm trying to run. Shell("%temp%\ninite.exe") Edit: Sorry, this is VB.net, not VBA. I put a bad tag on there. 回答1: To stay strictly in VBA with no .NET dependencies, you should be able to use the ShellExecute Win32 function.

Visual Basic Shell Administrator?

五迷三道 提交于 2021-02-11 12:35:05
问题 If I'm using Visual Basic to run an executable using the Shell() command, how would I run that executable as an administrator? My method works, at least in practice, but one executable won't run properly and I think that's the issue. Here's an example of the command I'm trying to run. Shell("%temp%\ninite.exe") Edit: Sorry, this is VB.net, not VBA. I put a bad tag on there. 回答1: To stay strictly in VBA with no .NET dependencies, you should be able to use the ShellExecute Win32 function.

Chocolatey generated VS 2015 Compiler not found on docker image

天涯浪子 提交于 2021-02-11 12:34:04
问题 I tried to install visual studio 2015 build tools on a Docker Container using the chocolatey packet manager. I need it for a Matlab code gen build operation. The chocolatey steps works fine. But my docker container can't find the compiler. Any Hints? Docker RUN powershell -command choco install -y vcredist140 RUN powershell -command choco install -y vcbuildtools -ia "/Full" Using mex -v -setup I have: Host(WIN10): ... Looking for compiler 'Microsoft Visual C++ 2015 (C)' ... ... Looking for

How to draw RGB bitmap to window using GDI?

我是研究僧i 提交于 2021-02-11 12:32:19
问题 I have an image in memory with the following byte layout blue, green, red, alpha (32 bits per pixel) The alpha is not used. I want to draw it to a window using GDI. Later I may want to draw only a smaller part of it to the window. But the bitmap in memory is always fixed at a certain width & height. How can this bitmap drawing operation be done? 回答1: SetDIBitsToDevice and/or StretchDIBits can be used to draw pixel data directly to a HDC if the pixel data is in a format that can be specified

Install and compile irrlicht on windows (CLION)

你离开我真会死。 提交于 2021-02-11 12:31:58
问题 I'm a student developer and I've always dev on Linux. This is the first project I have to do crossplateform. So I installed Git Bash, Visual Studio Pro and CLion on Windows. Usually I compile with GCC and Makefiles. So on Linux I installed the lib run the examples of the lib and it work. But when I want to compile it on Windows, it gets complicated. I use the example files given by Irrlicht to make sure it doesn't come from the sources. Here is my CMakeLists.txt cmake_minimum_required(VERSION

Git bash black screen (windows)

一个人想着一个人 提交于 2021-02-11 12:29:29
问题 I am trying to access git bash, but nothing happens (black screen). I used git bash many times during September and October, but when I tried today it did this. What can I do to solve this? Thanks. 回答1: Have you had Cygwin installed? I was having this exact issue, then I found out I still had a "etc" and "bin" directories in my user folder on Windows. After removing these (As I didn't want Cygwin) GitBash worked for me again :) 回答2: Perhaps as a temporary solution you could navigate to C:

Windows C service not writing to file in PreShutdown event

和自甴很熟 提交于 2021-02-11 12:28:26
问题 I am working on a Windows Service written in C code. In the service initialization code I have registered to a SERVICE_ACCEPT_PRESHUTDOWN event like this: gSvcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_PRESHUTDOWN; In the service control handler I have writen the logic to write to a file in the SERVICE_CONTROL_PRESHUTDOWN event like this: DWORD WINAPI SvcCtrlHandler(DWORD dwCtrl, DWORD eventType, void *eventData, void *context) { if (dwCtrl == SERVICE_CONTROL_STOP) {