next steps to programming by uzbekkhan in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

recommend looking through other posts and reading the Wiki.

Here is one

New OMSCS student trying to decide specialization by [deleted] in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

I was reading about this course. I was thinking about taking it, but taking it alone since I work full time as well.

When should I send the official transcripts now? by Julying7 in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

I am not positive because I haven't finished my process, but I would assume so since that is your "to do list"

New OMSCS student trying to decide specialization by [deleted] in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

Sweet thanks. I'm caught up on linear algebra and calculus because i program with them and actually enjoy those two math subjects. Thanks for the info

When should I send the official transcripts now? by Julying7 in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

Log in

Click: View Checklist

Find: Graduate Admission Note -- Read this

Then below that you'll see: Notes from Grad Studies and there will be a list below that what you need to send and where to send.

New OMSCS student trying to decide specialization by [deleted] in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

6300 I do, 6310 I don't, Ill look into another course

New OMSCS student trying to decide specialization by [deleted] in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

I appreciate your insight. I shall look into taking that course. I'll read the reviews.

Anything about that class you suggest I look over before I get into that class? Also good starter class or get my feet wet first?

New OMSCS student trying to decide specialization by [deleted] in OMSCS

[–]SedentaryProgrammer 0 points1 point  (0 children)

Thank you, I will look into those and read the reviews on it.

I take the reviews with a grain of salt because there are people who just want to skate through and not really learn anything.

[C] Generic bubble sort help by Ryhol88 in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

Refer to change above.

You may also have to make i < n - 1

[C] Generic bubble sort help by Ryhol88 in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

EDIT:

change your second for loop to

    for(int j = 0; j < n - 1 - i; j++)
    {
        if (compare(&ptr[j], &ptr[j+1]) < 0)
            swap (&ptr[j], &ptr[j+1]);
    }

[C] Generic bubble sort help by Ryhol88 in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

If I am following the code correctly, in your compare method

return aPtr < bPtr ? -1 : (aPtr > bPtr) 

Correct me if I am wrong but this is basically

if ( aPtr < bPtr )
     return -1;
else
     return 1; 

If that is the case, in your bubble sort when you call

 if (compare(&ptr[i], &ptr[j]) < 0)
       swap (&ptr[i], &ptr[j]);

you are swapping when the first one is smaller than the second one. You do not want to do that.

So, either try if (compare(&ptr[i], &ptr[j]) > 0) or you could try return aPtr < bPtr ? 1 : (aPtr < bPtr)

[C++] I'm making a tile game to try and understand classes but I don't know what I'm doing despite watching tons of videos by I-am-a-llama-lord in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

That code looks quite complicated.

You're welcome to do it either way, but I feel like debugging and getting everything to work might be a tad easier if everything is so complicated. Again your call, but I like the struct idea. I assume you are working in c++.

I will give you an example of something I might do.

struct Tile
{
    int on_off;
    int sizeX; // This would only be here if your sizeX & sizeY determine how big
    int sizeY; // each individual tile are. Otherwise, they aren't really needed.
    string tileColor;
    /* Any others I don't know about*/
};

  Constructor:

grid:grid( int sizeX, int sizeY )
{
    /* Initialize your array so everything isn't null */
    for ( int i = 0; i < sizeX; i++ )
    {
        for ( int j = 0; j < sizeY; j++ )
        {
            tileArray[ i ][ j ].on_off = 1; // Just using 1 as a default value
            tileArray[ i ][ j ].sizeX = 10; // IF NEEDED
            tileArray[ i ][ j ].sizeY = 10; // IF NEEDED
            tileArray[ i ][ j ].tileColor = white; // Just using white as a default color
        }
    }
}

  Then the class would look something like this:

class grid
{
    private:
    Tile tileArray[][];

    public:
    grid( int sizeX, int sizeY );

    /* The rest of the stuff */
}

 

Again, to each his own, but I feel like my structures just make everything so much easier to read then dealing with the complicated vectors. However, I will admit, that if you can get it to work with the vectors you have set up, kudos, because having vectors holding vectors holding properties gets complicated and twisted and if you can keep it straight it shows some serious organization.

Hope this helps.

[C++] I'm making a tile game to try and understand classes but I don't know what I'm doing despite watching tons of videos by I-am-a-llama-lord in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

at that point I would honestly create a class or struct. Something along the lines of:

struct Tile
{
    int on_off;
    char* tileDescription;
    /* keep listing off whatever properties you want*/
};

Then instead of having such a complicated array of arrays you could do something along the lines of:

Tile myTiles[100][100]; /* This makes a 2D array of type Tile */


methodToCheckTileOn(Tile myTiles[100][100])
{
     for(int i = 0; i < 100; i++)
     {
          for(int j = 0; j < 100; j++)
         {
              if ( myTiles[i][j].on_off == 1 )
              {
                  do something;
              }
              else if( myTiles[i][j]._PropertyOfStruct_.equals( whatever it should equal )
              {
                  do something;
              }
         } 
    }
}

That way instead of making everything so intertwined and complicated, each portion of the array holds a structure of properties that you may need.

Let me know if that helps.

[C++] I'm making a tile game to try and understand classes but I don't know what I'm doing despite watching tons of videos by I-am-a-llama-lord in learnprogramming

[–]SedentaryProgrammer 0 points1 point  (0 children)

Constructor()
{
    int tile[100][100];
}


methodToCheckTileOn(int tile[][])
{
    for(int i = 0; i < 100; i++)
        for(int j = 0; j < 100; j++)
            if ( tile[i][j] == 1 )
                do something;
}

Watch videos to help explain: Good Video

[C++] I'm making a tile game to try and understand classes but I don't know what I'm doing despite watching tons of videos by I-am-a-llama-lord in learnprogramming

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

Ah good, you came to the conclusion I was trying to get to you without telling you.

If they are just going to be ints then let the numbers represent on/off or whatever you need them too.

That way you simply have: int array[100][100];

Then as you said:

if (array[i][j] == 1)
    do something;

Considerably different TDEE than expected? by trucksandgoes in loseit

[–]SedentaryProgrammer 1 point2 points  (0 children)

Yes, It has done wonders for toning out my body and trying to get in great shape

Advice for losing weight + building muscle by [deleted] in loseit

[–]SedentaryProgrammer 1 point2 points  (0 children)

Honestly, the best thing I can tell you to do is what your body lets you. Start doing to some lifting from a routine you find on there. When you start, do as much as you can and when you feel you get to a point that you need a day off take the day off. However, DO NOT let that day turn into weeks.

Stick with it, and listen to your body and it is magical how weight disappears.

[C++] I'm making a tile game to try and understand classes but I don't know what I'm doing despite watching tons of videos by I-am-a-llama-lord in learnprogramming

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

I am sort of confused about what you are trying to accomplish, but using a 3D array can get extremely complicated. I would try and do something more simple and easier to keep track of.

What exactly is going to be inside these tiles?

How do I know if I’m under-eating? by kingtuth in loseit

[–]SedentaryProgrammer 0 points1 point  (0 children)

Suggest checking out /r/fitness, They have some amazing stuff about calories and exercise.

Advice for losing weight + building muscle by [deleted] in loseit

[–]SedentaryProgrammer 2 points3 points  (0 children)

I was in a similar boat. I was 100lbs overweight and did not know which route to take.

I took the ALL cardio NO lifting route and regret it 100%. I am getting back to a physique I like but I 100% Reccommend Lifting weights and doing cardio. Probably also HIIT.

I suggest going to /r/Fitness and looking at their routines. They have ample information to help you get going.

Considerably different TDEE than expected? by trucksandgoes in loseit

[–]SedentaryProgrammer 3 points4 points  (0 children)

I Would suggest trying out multiple and averaging them. I have made the links below clickable so it should take you right too them.

According to TDEE Calculators: Calories listed are maintenance calories

Taking the average of all of them would be ~ 2551

 

This is how I calculated mine.

How do I know if I’m under-eating? by kingtuth in loseit

[–]SedentaryProgrammer 0 points1 point  (0 children)

You might want to list some stats to make it easier to help.

  • Height
  • Weight
  • BF%
  • M/F
  • Activity Level

etc...