How to convert DateTime into a string in C#
Create date time 2019-11-12 22:45:12.004 DateTime date = new DateTime(2019, 11, 12, 22, 45, 12, 004); Converting to string format string date_str = date.ToString(“dd/MM/yyyy HH:mm:ss”);
Create date time 2019-11-12 22:45:12.004 DateTime date = new DateTime(2019, 11, 12, 22, 45, 12, 004); Converting to string format string date_str = date.ToString(“dd/MM/yyyy HH:mm:ss”);
The easiest way is to use String.Format() with the format specifier: double a = 0.000006; string formatted = String.Format(“{0:F6}”, a);
1. Creating a list: var list1 = new List(); 2. Adding values to the list: foreach (int value in Enumerable.Range(1, 10)) { var item = value + 100; list1.Add(item); } 3. Converting list into a string: string msg = string.Join(“,”, ohlc.ToArray());
Hey guys, just open another Command Prompt window as Admin and type this comand (Change 12345 with your port, of course) netstat -ano | findstr :12345 If netstat doesn’t work, try starting your command prompt or git bash as Administrator (right click, run as Admin). Figure out the PID of the process, in our case … Read more
1. Linux is more stable and secure than Windows If you’re a Windows user thinking about switching to Linux, you may be worried about security issues. However, the Linux operating system is actually more stable and secure than Windows. In fact, the National Institute of Standards and Technology (NIST) conducted a study on the security … Read more
X = X.reshape(X.shape[0],-1)
Install Windows Server from the DVD or from .iso file downloaded from here Start Power Shell as administrator. Right click on Start (Windows) button in the bottom-left corner, then click “Windows PowerShell (Admin) In PowerShell type with your Activation key: slmgr.vbs /ipk *****-*****-*****-*****-***** Press Enter and restart computer Now you are ready to install HyperV … Read more
For all noobs like me. If you get this error, you most probably doing one stupid thing like I did: where y2.shape[0] is just an integer. Remember, we can iterate only through lists or other sequences. When we would like to repeat a certain action X number of times we should do the following: If … Read more