I have created a Discord bot then started it already without commands, I have to restart it because I edited the codes with commands, how do you restart it with the terminal in Visual Studio Code?
Hello you shuld do this:
Ctrl + c to close the current running thing.
Then write node + (your file name)+.js and your new code will running.
You can mark my reply as the solution and get this thread closed.
If it work.
Related
I have written one very simple app in C. I know how to run it through Visual studio, but i want to start it from desktop with a double-click. If I double-click on a .exe file made in folder, it does not start. How can I do this?
If you do not wish to modify your code so that it will wait for user input before closing (and there are many reasons that might be inappropriate), you could create a batch file wrapper:
myprog.bat
myprog.exe
pause
Then either you can double click the batch file or create a shortcut to the batch file then edit the shortcut to set the path to the batch file and the path from which to run (so it can find the exe).
That pretty much emulates how Visual Studio runs your code without terminating the window.
Another method you might consider is a batch file such as:
runner.bat
%1
pause
Then you can drag-and-drop your executable onto the runner.bat icon to run it. The advantage being that you don't have to create a new batch file and/or shortcut for every new executable.
Really though this is not a C question, or even a programming question - it is most likely off topic. If your code is ever required to run to completion unattended in a batch file for example, you would not necessarily want to add any interactivity to the program itself.
Your problem is that double clicking on a console app will open a new console window, run the program and then close the window.
VS studio does a trick where it runs the app in a new console window but keeps it open till you press a key.
You can add that same thing yourself - put a getchar() call at the end
Or you can make a bat file to run the app as per Cliffords answer
1st open the code with visual studio code
Run or Build the program
then u will find an executable file where u have saved your code
Open that executable file
but you must have installed mingw installed in your environment
you must compile it first with mingw or like compiler. and start it with by code:
cmd> yourdirectory(e.g Desktop)/ gcc yourcodefile.c your question is available also internet => how-to-compile-c-program
I have a basic XAMPP install on windows 10, and I've installed cakePHP, with no errors.
When I run bin/cake server in the xampp terminal, it tells me it's started on localhost:8765, and that I can press CTRL-C to return. It hangs here, shell goes unresponsive, and trying to hit localhost:8765 in the browser hangs indefinitely.
I can view the apache page at localhost:80, with no issue. Any help would be greatly appreciated.
Im almost definetly sure, that you have debugging turned on somewhere, and PHP script hangs on first line. Do you have any IDE opened during that procedure? If so, close it, restart php server and try again. It should work now.
I had similar WTFs working with PHPStorm, that unwanted debugging sessions was paused on "script first line" exposing behavior you have described.
Ok so I'm trying to end Comodo (free firewall service) so that I can install NVidia driver updates, and since I'm super lazy I want this all to be automatic whenever NVidia tries to update. After I want to reopen Comodo.
However I'm stuck on the first step since I have no idea on how to properly end Comodo, when I try taskkill it says:
ERROR: The process "cis.exe" with PID 6204 could not be terminated.
Reason: Element not found.
I'm new to batch and have no idea what this error message means since I can clearly see that "cis.exe" (which is Comodo) is running in the background at least and I can close it from the icon tray if I wanted to, and it spits out the same message when I try using "CisTray.exe".
Also any advice on where I should go for the next few parts would be greatly appreciated, thinking on using task scheduler to open the batch file when some kind of log or something is made by NVidia.
I have a client/ server program written i c language, a client can send and receive .txt documents to the server, i wish to Open the file received to visualize it with command nano For example, inside the running process:
Something like this:
Exec( nano, "file-to-Open.txt") but i dont know how to do do this), can You help me?
Sorry For my english
Thank's a lot
Try this:
execlp("nano", "nano", "file.txt", NULL);
The nano editor must be in your path, the file.txt must be in the current directory of the running client process, and most importantly, whatever display the editor is going to display on must be accessible, be it the terminal from where the client is run or the appropriate X-Windows display.
I have multiple site on IIS.
I want to stop all of them with a batch file.
Raison : I have a program that create new site. But I got port conflict because on the creation the site try to start on the same port than another site. I can't tell my new site to not autoStart. The best way would be a little code for a batch file, that stop any website, without knowing their names. With that, at the end, my new site will be started and every other will be stopped.
maybe the Appcmd command could work (http://www.windowsnetworking.com/articles-tutorials/windows-server-2008/Configuring-IIS-7-command-line-Appcmdexe-Part1.html)
I dont know how to use the List and stop command (for each in List Stop). If somebody know how to do it in script? Or maybe there's another command.
I need to do it in batch file.
Iisreset /stop will stop all sites