Questions tagged [system]

System may refer to a set of interdependent components; Low level infrastructure like the operating system (from a high language point of view) or an object or function for accessing the previous

The system tag is used for referring to the operating system, or functions thereof, when accessed from a higher-level language.

Many high-level languages offer access to the features of the system by an object or function called system itself. Questions regarding these objects might as well be tagged with this tag.

In normal English, a system is a set of interacting or interdependent components forming an integrated whole or a set of elements (often called 'components' ) and relationships which are different from relationships of the set or its elements to other elements or sets.

4426 questions
63
votes
2 answers

How to pass system properties to a jar file

I have a main class that expects certain properties that I pass using the -D option. I can access this in my IDE by sending them as VM options. I package this application into a jar file using Maven and when I try the following: java -jar myjar.jar…
arjunj
  • 1,142
  • 1
  • 12
  • 23
61
votes
2 answers

store output of system command into a variable in r

I am executing the following command in R : system("ls ") I need to store the output of the above command in some R variable. Is there a way to do the same??
user1021713
  • 1,893
  • 8
  • 25
  • 39
60
votes
2 answers

How to run a system command in Qt?

I have to run a system command in Qt. but I have to give an argument for that command. for example opening gedit with a text file. like "gedit /home/oDx/Documents/a.txt" but the path "/home/oDx/Documents/a.txt" will be in a variable like…
defiant
  • 2,489
  • 10
  • 34
  • 55
58
votes
9 answers

Change system date programmatically

How can I change the local system's date & time programmatically with C#?
Yoann. B
  • 10,667
  • 18
  • 65
  • 110
58
votes
4 answers

Adding system header search path to Xcode

(Posting this question for reference purpose, I'll answer immediately) How to add header search paths to Xcode? Especially when including with this syntax: include Adding path globally to all projects like system headers. Adding path…
eonil
  • 75,400
  • 74
  • 294
  • 482
56
votes
10 answers

Capturing stdout from a system() command optimally

I'm trying to start an external application through system() - for example, system("ls"). I would like to capture its output as it happens so I can send it to another function for further processing. What's the best way to do that in C/C++?
SinisterDex
  • 773
  • 2
  • 9
  • 13
55
votes
4 answers

Really 1 KB (KiloByte) equals 1024 bytes?

Until now I believed that 1024 bytes equals 1 KB (kilobyte) but I was reading on the internet about decimal and binary system. So, actually 1024 bytes = 1 KB would be the correct way to define or simply there is a general confusion?
SamYan
  • 1,449
  • 1
  • 17
  • 36
55
votes
7 answers

System.out.println and System.err.println out of order

My System.out.println() and System.err.println() calls aren't being printed to the console in the order I make them. public static void main(String[] args) { for (int i = 0; i < 5; i++) { System.out.println("out"); …
Nick Heiner
  • 108,809
  • 177
  • 454
  • 689
54
votes
2 answers

what happens in the kernel during malloc?

I was asked this question during an interview. What they wanted to know was when the user calls malloc(4) to allocate 4 bytes of memory how does the operating system (Linux) respond? Which subsystem responds to this system call? I told him that…
liv2hak
  • 12,597
  • 41
  • 127
  • 231
51
votes
7 answers

Elo rating system: start value when players can join the game constantly

I've implemented an Elo rating system in a game. There is no limit for the number players. Players can join the game constantly so the number of players probably rises gradually. How the Elo values are exactly calculated isn't important because of…
caw
  • 29,212
  • 58
  • 168
  • 279
51
votes
4 answers

How does direct mapped cache work?

I am taking a System Architecture course and I have trouble understanding how a direct mapped cache works. I have looked in several places and they explain it in a different manner which gets me even more confused. What I cannot understand is what…
Percentage
  • 680
  • 1
  • 6
  • 9
47
votes
10 answers

Solving a linear equation

I need to programmatically solve a system of linear equations in C, Objective C, or (if needed) C++. Here's an example of the equations: -44.3940 = a * 50.0 + b * 37.0 + tx -45.3049 = a * 43.0 + b * 39.0 + tx -44.9594 = a * 52.0 + b * 41.0 +…
Adam Ernst
  • 45,666
  • 17
  • 55
  • 71
47
votes
9 answers

A terminal command for a rooted Android to remount /System as read/write

I'm writing an android app that needs to copy a file to the "/system" partition at runtime. I've got the commands to run "su" and can successfully request SuperUser permissions and run commands as root. But I don't know how to make this app…
user496854
  • 4,639
  • 9
  • 39
  • 74
46
votes
2 answers

How do I exit a Rust program early from outside the main function?

I am in the process of writing a bash clone in Rust. I need to have my program exit when the user types exit. In previous iterations of my program, before I added more complicated features, I used return to get out of the loop that was prompting…
zephyrthenoble
  • 1,037
  • 1
  • 11
  • 20
46
votes
10 answers

os.mkdir(path) returns OSError when directory does not exist

I am calling os.mkdir to create a folder with a certain set of generated data. However, even though the path I specified has not been created, the os.mkdir(path) raises an OSError that the path already exists. For example, I…
Quanquan Liu
  • 1,227
  • 3
  • 14
  • 28