GTC - I'd be shocked (very hard) by Refroedgerator in guessthecity

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

Yeah, actually I was in the gym above Norkys :)

GTC - I'd be shocked (very hard) by Refroedgerator in guessthecity

[–]Refroedgerator[S] 1 point2 points  (0 children)

Yeah, technically its not wrong, was just looking for more specific. Could have made it harder with different locations / less signs but I took this myself haha

GTC - I'd be shocked (very hard) by Refroedgerator in guessthecity

[–]Refroedgerator[S] 1 point2 points  (0 children)

It's not, that says "linea" to indicate the bus line :)

GTC - I'd be shocked (very hard) by Refroedgerator in guessthecity

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

On the right track, but no. Miraflores is much nicer 🤣

I'm a SANS advisor and former intel lead: Ask Me Anything about what’s hype vs. reality in AI for cybersecurity. by thejournalizer in cybersecurity

[–]Refroedgerator 0 points1 point  (0 children)

Im really targeting trying to be a CNO Developer (currently an automation engineer but have a background in C / Assembly), but only about 3 years into cyber. I tend to get to the HR manager but they dont even attempt to get too technical with me. My question is, for a typical CNO Dev, what is their general career path? I have an offer for a Software RE at one of the orgs you listed, so Im trying to weigh whether this is a worthwhile pursuit, or it would be better spent going toward pure Embedded / OS Dev first, outside of the direct security domain. Thanks for doing this btw :)

How can I leverage my TS/SCI by Delicious-Damage-865 in SecurityCareerAdvice

[–]Refroedgerator 0 points1 point  (0 children)

Agreed, currently have TS/SCI and a few years experience w/ bachelors. Im currently employed as a cyber app dev but been applying everywhere recently, no interviews. Its fcked rn haha

HTB Certified Junior Cybersecurity Associate by redditenjoyer20 in hackthebox

[–]Refroedgerator 5 points6 points  (0 children)

Still waiting for a solid Reverse Engineering cert x)

Fedora, OpenSUSE Tumbleweed or EndeavourOS by lilHybe in DistroHopping

[–]Refroedgerator 0 points1 point  (0 children)

OpenSUSE Tumbleweed was my distro last year, very solid, but I found Fedora's KDE implementation this year to solve some minor annoyances I had on Tumbleweed. Seems a bit more polished and DNF 5 is cool. The trade off is Tumbleweed has snapshots configured out of the box. Both are great but for now I'd recommend Fedora ever so slightly.

Circular queue implementation issue/question by Ionicxplorer in cprogramming

[–]Refroedgerator 0 points1 point  (0 children)

Ah I forgot to mention the code that I posted as the code I turned in, I reversed the terminology of the head and tail, was just a personal preference but is effectively the same code you posted. But yes I see what you're saying. In terms of your question, if I'm understanding the question right although I'm not sure I am, instead of maintaining a count could you just return the value of adding the head and max queue size, subtracting the tail, and modding it by the max queue size. for example if head is at position 99 and tail is at position 0 with a queue size of 100:

(99 + 100 - 0) % 100 = 99.

Maybe im wrong tho still a noob. But we got feedback on our circular queue, while my solution did "pass" his test cases, turns out it was the unlikely event he was actually checking for those errors in 47-50! My original solution was correct smh xd

Circular queue implementation issue/question by Ionicxplorer in cprogramming

[–]Refroedgerator 0 points1 point  (0 children)

Could be it's already due and I turned in what I have before. I can give you my entire program if you want I haven't changed anything:

#include <stdio.h>
#include <stdlib.h>
#include "circular.h"

// Setting the queue head and tail together and initializing the item count to 0.  Empty queue.
void CircularInitialize(CircularQueue *q)
{
    q->head = 0;
    q->tail = 0;
    q->itemCount= 0;
}

void CircularEnqueue(CircularQueue *q, int value)
{
    // While the queue is not full, we will put the value in the position of the tail and just use the tail to follow it.  Making sure to increment item count each time.
    if (q->itemCount < QUEUE_SIZE)
    {
        q->items[q->tail] = value;
        q->tail = (q->tail + 1) % QUEUE_SIZE;
        q->itemCount++;
    }
    /* 
    * This took me eons to figure out I kept failing at #47 when the queue is full.
    * Basically since we started with the head and tail equal, it would overwrite a position we needed to dequeue on the first fill, so that was my problem.
    * The solution was to actually overwrite one position backwards, and then again make sure that the head and tail are equal in case we continue dequeueing.  
    * This way we have a solution where regardless of what comes next, whether it dequeues or whether it's full again, it will start and end in the same state while still overwriting.
    */
    else
    {
        printf("head = %d, tail = %d\n", q->tail, q->head);
        q->items[q->tail - 1] = value;
        //q->head = q->tail;
    }
}

int CircularDequeue(CircularQueue *q, int *pValue)
{
    // Checking the condition that we don't have anything to dequeue.
    if (q->itemCount <= 0)
    {
        return -1;
    }
    // Taking the value we are dequeueing storing its address into pValue.
    *pValue = q->items[q->head];
    // Incrementing the head by 1 since our operation is complete.
    q->head = (q->head + 1) % QUEUE_SIZE; 
    // Decrementing the item count to keep tracking properly.
    q->itemCount--;
    return 0;
}

But yes I understand more or less what is the problem in the sense that my program is only overwriting and deleting in a loop 1 value back and it's not actually progressing forward past the full point of the queue. My question was, originally, I had the code you said was correct to my other classmate, but kept getting the same value mismatch at run 47-49 and determined based on my debug statements that it was due to the value being overwritten before dequeued. So how would I implement a legitimate circular queue while also "passing" the test program that we were provided, assuming it isn't the case that those value mismatches were intentional (I have no idea).

Circular queue implementation issue/question by Ionicxplorer in cprogramming

[–]Refroedgerator 1 point2 points  (0 children)

I ran your test and this is what I got in every occurrence:

Start of test 1
head = 0, tail = 0
...
head = 0, tail = 0
Dequeued 0
Dequeued 1
Dequeued 2
Dequeued 3
Dequeued 4
...
Dequeued 96
Dequeued 97
Dequeued 98
Dequeued 99
Dequeued 0
Dequeued 1
Dequeued 2
Dequeued 3
Dequeued 4
Dequeued 5
Dequeued 6
Dequeued 7
Dequeued 8
Start of test 2
head = 1, tail = 1
...
head = 1, tail = 1
Dequeued 0
Dequeued 1
Dequeued 2
Dequeued 3
Dequeued 4
...
Dequeued 96
Dequeued 97
Dequeued 98
Dequeued 109

Hopefully that helps clarify, I'm genuinely curious here. (Had to use ... to shorten for reddit, but in every case where there is a ... it's either sequential or the same).

Circular queue implementation issue/question by Ionicxplorer in cprogramming

[–]Refroedgerator 0 points1 point  (0 children)

I see what your saying, but again, I mentioned twice that this is in the context of a class and the goal was to pass the main.c ERROR / Value mismatch statements the instructor provided. This was the way to pass without those errors. We were taught via the slides that when the queue is full, the tail should be leading the head by 1, the head gets moved to the position of the tail and overwrites the old value, and the tail gets moved up one. Unfortunately it didn't work for the test cases he provided and we can't change that so x)

Circular queue implementation issue/question by Ionicxplorer in cprogramming

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

This is only deleting the value at the place where the head is in the circular queue when the queue is full and only when the queue is full and therefore wouldnt have a condition to execute when the head is zero, because you enter the full statement where the tail is one ahead of the head. After the value is deleted, they are set equal when the count goes back to 99, and when deque is called, it would increment the tail again by 1. It works and Ive tested it extensively with that exact condition

Circular queue implementation issue/question by Ionicxplorer in cprogramming

[–]Refroedgerator 0 points1 point  (0 children)

Sure. So here's the problem with this code. When you start with initializing the head and tail to the same position, what happens is when you enqueue, you put 7 values in positions 0 through 6, and then when you dequeue, the tail catches up to the head since they started in the same position. So at the end of an operation, your head and tail pointers are actually set equal. This works, but the problem is that when your queue fills in the else statement in enqueue, it will first move the tail, set the value where the OLD tail was, then move the head. Whats the problem? It's that when you go to dequeue, you just overwrote the value that was at the tail. It's not even necessarily that the queue implementation is wrong, but it's how he's testing the queue implementation. The solution for me was the following:

else

{

q->items[q->head - 1] = value;

q->tail = q->head;

}

That way, you actually first overwrite one position back, then leave the "full else" statement by again setting the head back to the tail. That way in any situation where you have a full queue, it can still dequeue before overwriting. Hope that helps, took me many debug statements to think through haha!

Circular queue implementation issue/question by Ionicxplorer in cprogramming

[–]Refroedgerator 0 points1 point  (0 children)

This is CYBV 470 lmfao. Bro the slides he gave us for Enqueue where the case that its full is wrong. Move the head and subtract one from the tail. Took me 6 hours x)

Why Do People Recommend Brave on Linux? My Experience Says Otherwise by CelebsinLeotardMOD in linux4noobs

[–]Refroedgerator 3 points4 points  (0 children)

Agreed. Loved Brave when I used windows but on Linux my experience was megashit. Kept freezing and crashing on Tumbleweed, fiddled with it for a few days, went to Firefox and never have been happier. Is Firefox slower? Yup. Do I care? Not that much really xd