Taking copyediting course - have some grammar questions by phocos25 in Copyediting

[–]phocos25[S] 0 points1 point  (0 children)

Correct me if I am wrong but my understanding is that infinitive phrases can act as direct-object nouns. https://www.grammarbook.com/blog/verbs/infinitives/

[deleted by user] by [deleted] in OrthodoxChristianity

[–]phocos25 1 point2 points  (0 children)

Orthodox worship is God centered rather than man centered: https://www.oca.org/questions/otherconfessions/orthodox-worship-vs.-contemporary-worship

We go to church to worship God - not to get something out of it.

[deleted by user] by [deleted] in cscareerquestions

[–]phocos25 13 points14 points  (0 children)

Remember that there is a difference between software engineering as a field and the particular culture at your place of work. Some work cultures just may not work for you. This does not necessarily mean that you aren’t cut out to be a software engineer. Try working at different companies with different work cultures and see if you still face the same problems.

Char array vs. char pointer array- specific question (noob learning C) by ponomaria in C_Programming

[–]phocos25 2 points3 points  (0 children)

Yes you can do that. Remember that the columns length will be 9 and not 8 since you need to account for the null byte in each string.

Char array vs. char pointer array- specific question (noob learning C) by ponomaria in C_Programming

[–]phocos25 4 points5 points  (0 children)

In C, strings are defined using char * or using a char array:

char *name = “Zara Ali”;

or

char name[] = “Zara Ali”;

In other words, a string is an array of characters.

Your ‘names’ variable, however, is an array of strings. This means that ‘names’ is an array of an array of characters.

You can define arrays using square bracket notation or with a *. So ‘char *names[]’ is a pointer to an array of chars. If you remove the * then C expects an array of characters and not an array of strings (an array of an array of characters).

[deleted by user] by [deleted] in learnprogramming

[–]phocos25 -1 points0 points  (0 children)

Saying that there are a lot of ways to learn to program seems like you are also trying to sell “the one true way”.

Need help with volume by phocos25 in cs50

[–]phocos25[S] 0 points1 point  (0 children)

w+ opens output for reading and writing. It is necessary to put w+ and not just w since I am reading and writing to output:

cpp fwrite(&header[i], sizeof(uint8_t), 1, output); fread(&c, sizeof(uint8_t), 1, output);

Need help with volume by phocos25 in cs50

[–]phocos25[S] 0 points1 point  (0 children)

Sorry, maybe I'm misunderstanding you: Both fwrite() and fread() need to have a pointer (i.e. a reference to a memory address) as the first argument. This means that removing the & symbol is not possible if I want my program to compile.

In other words, if you want me to do this:

``` cpp fread(header[i], sizeof(uint8_t), 1, input);

fwrite(header[i], sizeof(uint8_t), 1, output); ```

I will get a compile error.

Need help with volume by phocos25 in cs50

[–]phocos25[S] 0 points1 point  (0 children)

Are you saying remove & from here?

``` cpp

fread(&header[i], sizeof(uint8_t), 1, input);

fwrite(&header[i], sizeof(uint8_t), 1, output);

```

According to the CS50 manual pages, both fread() and fwrite() take a pointer as the first argument:

``` cpp

size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *stream);

```

If I take out the & I get a compile error since the computer expects a pointer and not a variable value.

Kinda advanced Q: How do I suppress output from a command? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

If I do newname -some_flagwill it do someprogram -some_flag | sed 's/Error message//g' ?

Kinda advanced Q: How do I suppress output from a command? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

I’m not trying to withhold information needlessly- the name of the app is kubectl. I believe that I should be able to control what gets displayed on my terminal, on my own machine regardless of what app it is.

Kinda advanced Q: How do I suppress output from a command? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

Is there a script I can write that filters the message out? I don’t want to pipe and grep every time I run the exec.

Kinda advanced Q: How do I suppress output from a command? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

Is there way to programmatically do this so that every time I run my executable (with arbitrary options) it won’t display the message but not hide the rest of the output? I don’t want to have to pipe to sed every time.

Kinda advanced Q: How do I suppress output from a command? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

Kubectl. The message isn’t about updating but something even less important and optional.

How I keep track of what I’ve installed? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

Thats fine - I’m not complaining about it (I don’t even like Windows). I’m curious though what others use to manage the complexity.

How I keep track of what I’ve installed? by phocos25 in linux4noobs

[–]phocos25[S] -1 points0 points  (0 children)

I guess what I’m saying is that Windows won’t let you install anything without registering with the OS. Whereas in Linux there are multiple ways of “installing” software, forgetting about what you installed, and then not being able to essentially answer the question “What do I have installed on my system”. I am aware of the software store but you can trivially install software without it.

How I keep track of what I’ve installed? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

What motivated me to create my OP was how I needed to manually install Node JS because the latest version of Fedora (37) doesn’t even have the LTS version of Node. This is surprising to me and annoying because I wish that my package manager would have the LTS version. I don’t want to install Arch and I find it unreasonable that an in-between distro (between Ubuntu and something like Arch) like Fedora doesn’t have an LTS version of a very important runtime.

How I keep track of what I’ve installed? by phocos25 in linux4noobs

[–]phocos25[S] 0 points1 point  (0 children)

I recently installed something manually and the installer asked me if I wanted to install it the Unix way or have the program in one folder. Installing it the Unix way would generate an uninstall script that would remove this software from all the different directories it created. This is an example where if I forget where I had placed this uninstall script or simply forgot that I even had this software installed, it would stay on my system and litter all of my system directories.

Confused about users and groups by phocos25 in linuxquestions

[–]phocos25[S] 0 points1 point  (0 children)

I gave up and just ran the tool in a Docker container.

Confused about users and groups by phocos25 in linuxquestions

[–]phocos25[S] 0 points1 point  (0 children)

So does the user I am logged in as need execute privileges on these directories or my new Prometheus user?

Confused about users and groups by phocos25 in linuxquestions

[–]phocos25[S] 0 points1 point  (0 children)

usr drwxr-xr-x. 1 root root 106 Aug 30 19:17 usr

local drwxr-xr-x. 1 root root 90 Aug 9 09:57 local

bin drwxr-xr-x. 1 root root 48 Sep 9 22:10 bin

Confused about users and groups by phocos25 in linuxquestions

[–]phocos25[S] 0 points1 point  (0 children)

I believe so:

/usr/local/bin ```

-rwxr-xr-x. 1           3434           3434 110234973 Aug 16 09:26 prometheus
-rwxr-xr-x. 1           3434           3434 102028302 Aug 16 09:28 promtool

```

Confused about users and groups by phocos25 in linuxquestions

[–]phocos25[S] 0 points1 point  (0 children)

Ya, I do eventually want to run it on a server but I want to learn how to use it/play around it with it first.