Creating a new directory in C

Look at stat for checking if the directory exists, And mkdir, to create a directory. You can see the manual of these functions with the man 2 stat and man 2 mkdir commands.

What is the ‘realtime’ process priority setting for?

A realtime priority thread can never be pre-empted by timer interrupts and runs at a higher priority than any other thread in the system. As such a CPU bound realtime priority thread can totally ruin a machine. Creating realtime priority threads requires a privilege (SeIncreaseBasePriorityPrivilege) so it can only be done by administrative users. For … Read more

Batch script loop

for /l is your friend: Starts at 1, steps by one, and finishes at 100. Use two %s if it’s in a batch file (which is one of the things I really really hate about windows scripting) If you have multiple commands for each iteration of the loop, do this: or in a batch file Key:/l denotes that … Read more

How to exit Python script in Command Prompt?

It indeed depends on the OS, and probably on the version of Python you are using. As you mentioned, ctrl+C does not work on your Windows 10 with Python 3.6, but it does work on my Windows 10 with Python 3.4. Therefore, you really need to try and see what works for you. Try the following commands, … Read more

How to run ‘sudo’ command in windows

There is no sudo command in Windows. The nearest equivalent is “run as administrator.” You can do this using the runas command with an administrator trust-level, or by right-clicking the program in the UI and choosing “run as administrator.”

How to compile LEX/YACC files on Windows?

As for today (2011-04-05, updated 2017-11-29) you will need the lastest versions of: flex-2.5.4a-1.exe bison-2.4.1-setup.exe After that, do a full install in a directory of your preference without spaces in the name. I suggest C:\GnuWin32. Do not install it in the default (C:\Program Files (x86)\GnuWin32) because bison has problems with spaces in directory names, not to say parenthesis. Also, consider installing Dev-CPP in … Read more

Install tkinter for Python

It is not very easy to install Tkinter locally to use with system-provided Python. You may build it from sources, but this is usually not the best idea with a binary package-based distro you’re apparently running. It’s safer to apt-get install python-tk on your machine(s). (Works on Debian-derived distributions like for Ubuntu; refer to your package manager … Read more

git clone: Authentication failed for

I was facing same error when I was trying to clone a repository on a PC with freshly installed operating system. I was using Git bash as my Git client. When I ran Git’s command to clone a repository it was not prompting me for user id and password which will be used for authentication. It was … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)