[Solved] Which is better, ch = ‘\n’; write(1, &ch, 1); or putchar(‘\n’);?

The putchar is a library function. It calls the write system call to write the character in stdout. If we access the system call so many time, the system performance will get slow. So only, the library functions are implemented. The library functions for writing, it allocates a buffer, once if the buffer is fulled … Read more

[Solved] How Can I Find For Example *.mp3 Files From All Directories Of My System? [closed]

If you’re using python, os.walk can help you. Simple code like this can work: import os for data in os.walk(‘d:\\music’): # where to start searching dir_path, folders, files = data for f in files: if f.lower().endswith(‘.mp3’): print(os.path.join(dir_path, f)) 0 solved How Can I Find For Example *.mp3 Files From All Directories Of My System? [closed]

[Solved] How can one prevent a program from being opened with Python? [closed]

Your solution will work, but it will spawn a lot of console windows one after another. To avoid it you can try this: >>> import subprocess >>> from time import sleep >>> si = subprocess.STARTUPINFO() >>> si.dwFlags |= subprocess.STARTF_USESHOWWINDOW >>> while True: subprocess.call(‘taskkill /F /IM notepad.exe’, startupinfo=si) sleep(1) # delay 1 seconds 2 solved How … Read more

[Solved] Can I write an OS in machine code? [closed]

** yes you can but this is very diffecult for any one and if you do this what make programmers and all design programming lanaguages to make things easily comparing by machine code and this is project as you ask it’s an OS written in machine code it’s still under developing http://www.magicschoolbook.com/computing/os-project note : your … Read more

[Solved] How do I trick my internet browser that I’m using 32bit Operating System even it’s a 64bit application

For Google Chrome, you could try clicking on “Other Platforms” near the bottom of the https://www.google.com/chrome/ page, then choose the 32-bit version. If you install and browse with the 32-bit version, you may automatically get offered 32-bit versions of other software. Another option would be to edit your user agent string. (Updated with more details:) … Read more

[Solved] WINDOWS API: GetCurrentThread(); in C [closed]

Operating systems courses tend to suck because they take the simplest of concepts and try to make them convoluted. Documentation for the GetCurrentThread () function is https://learn.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getcurrentthread What it does not explain is that the return value for the function is a “handle.” Windoze uses handles somewhat as pointers to objects but where you cannot … Read more

[Solved] How to browse using python? [closed]

You can do that using Selenium and automate google search first install selenium in your idle or pycharm Selenium pip install selenium install Chromedriver Download the chrome browser from here (choose the version for your system) After downloading, extract it and then copy the file in the folder of the script. from selenium import webdriver … Read more

[Solved] Types of Softwares

Examples System Software : System Servers Application Software :Microsoft Office Engineering/Scientific Software : Mat lab Embedded Software : MP 3 Players Product Line Software : Used in Car Companies Web Applications : Google Artificial Intelligence Software : AlphaGo solved Types of Softwares

[Solved] Thinnest operating system supporting virtualization apps like VirtualBox? [closed]

There exist rancher (http://rancher.com/rancher-os/) which can solve this problem as follows Its a 30-40mb operating system as bootable ISO so no questions of crash with power outages, can always reboot from ISO. One can load docker images which shall be of Ubuntu / Windows thereby eliminating footprint needs in terms of thin OS and no … Read more

[Solved] Convert a process based program into a thread based version?

The general case depends on whether the threads are wholly independent of each other. If you go multi-threaded, you must ensure that any shared resource is accessed appropriate protection. The code shown has a shared resource in the use of srand() and rand(). You will get different results in a multi-threaded process compared with those … Read more