windows

How can I do random name picker in multiple textboxes in c# framwork? [closed]

我的未来我决定 提交于 2021-02-17 07:14:17
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 18 days ago . Improve this question I need help with random name picker in multiple textboxes in c# framwork. Can someone help me with how I can get started? How to think? I would appreciate the help! 回答1: You can call Enumerable.OfType<TResult>(IEnumerable) Method to get the list of all

How to set the environment variable in windows?

走远了吗. 提交于 2021-02-17 07:07:05
问题 Below Go code: var ( Address = os.Getenv("ADDR") Token = os.Getenv("TOKEN") ) reads the environment variables in windows In windows laptop, I have privilege to set user variables for my user login only. I created two variables(for above), but os.Getenv() cannot read the values. I do not have privilege to set system variables How to set environment variables in windows, with my user login? 回答1: In Windows, environment variables can be applied in two ways. Set modifies the current shell's (the

How do i run a python program just by typing the script name on windows 10 cmd line?

戏子无情 提交于 2021-02-17 06:49:34
问题 How do i run a python program just by typing the script name on windows 10 cmd line? Also without having to change directory. I already added my scripts folder and python folder to the path. tried also tu run assoc py.=PythonScript ftype PythonScript=python.exe %1 %* Here's the program's content: #! python3 # mapIt.py - Launches a map in the browser using an address from the command line or clipboard import webbrowser, sys, pyperclip if len(sys.argv) > 1: address = ' '.join(sys.argv[1:]) else

batch renaming files using powershell

房东的猫 提交于 2021-02-17 06:47:08
问题 I am able to batch rename files in a working directory by using: Dir | %{Rename-Item $_ -NewName ("0{0}.wav" -f $nr++)} However I want the file rename to start at something other than zero. Say 0500, and rename sequentially in order. Dir | %{Rename-Item $_ -NewName ("0{500}.wav" -f $nr++)} returns error. How can I tell rename to start at a number other than 0? 回答1: You can initialize the counter beforehand to 500. Also, you don't need to use a ForEach-Object loop ( % ) for this, because the

Git Bash: Microsoft Visual C++ 14.0 is required, but I already have it installed

*爱你&永不变心* 提交于 2021-02-17 06:29:21
问题 I am using git to clone https://github.com/rkern/line_profiler.git on Windows 10. It is erroring out with this error but I have this installed (see image below): error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ This is the command I am using: git clone https://github.com/rkern/line_profiler.git find line_profiler -name '*.pyx' -exec cython {} \; cd line_profiler pip install . --user 回答1: You don't have

Cant loop over files with spaces in the filename, windows batch file and image magick

百般思念 提交于 2021-02-17 06:18:03
问题 I'm trying to loop over a bunch of folders, create subfolders then loop on the files, convert them with imagemagick and put them into the new subfolders and rename them. Some files have spaces in their name and cause the error... How can I fix this? error message : convert: unable to open image 'photo': No such name or directory @error/blob.c/OpenBlob/3489. convert: no decode delegate for this image format '' @ error/constitute.c/ReadImage/554.** The Folder Structure looks like this... The

How to run multiple commands in one batch file?

£可爱£侵袭症+ 提交于 2021-02-17 06:15:07
问题 I want to run multiple commands in one batch file. I tried the &, &&, start, /wait, call, :begin and goto begin commands but no luck. Here are my commands: C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f sc config remoteregistry start= auto sc start remoteregistry sc config Schedule start=auto sc start Schedule sc stop McAfeeFramework sc configure McAfeeFramework startup= disabled sc

Powershell gui textbox with multiple color lines

邮差的信 提交于 2021-02-17 05:50:28
问题 Im having trouble with powershell textbox here is the definition of it: $ResultsTextBox = New-Object System.Windows.Forms.TextBox $ResultsTextBox.Location = New-Object System.Drawing.Size(780,40) $ResultsTextBox.Size = New-Object System.Drawing.Size(450,340) i would like to create a function which output text to this text box but i would like to generate the text either red or green depending of my choice.. but when i do this: function LinkFn { $ResultsTextBox.clear() $SWITCH = Get

How to stop running Python .pyw script which doesn't have GUI window?

烂漫一生 提交于 2021-02-17 05:40:09
问题 I have created a script in python and saved it as .pyw file so that I don't need console to execute the script. I am wondering how to stop the execution once it is running. What I am doing right now is opening the IDLE and closing it and it seems to work. I am sure there is a better way of doing this. Can somebody advise me about this? 回答1: As it says in the docs The Python installer automatically associates .py files with python.exe so that a double-click on a Python file will run it as a

How to stop running Python .pyw script which doesn't have GUI window?

狂风中的少年 提交于 2021-02-17 05:40:07
问题 I have created a script in python and saved it as .pyw file so that I don't need console to execute the script. I am wondering how to stop the execution once it is running. What I am doing right now is opening the IDLE and closing it and it seems to work. I am sure there is a better way of doing this. Can somebody advise me about this? 回答1: As it says in the docs The Python installer automatically associates .py files with python.exe so that a double-click on a Python file will run it as a