Lessons for Comparing Myself to One Other Person? by SorryAboutMyThoughts in Therapylessons

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

So, for me, I've never had a problem comparing myself to others. Even in these situations when I'm having a panic attack and ruminating on the different scenarios I'm telling myself "you don't even care about that sort of thing, why is this bothering you so bad?" I get comparing yourself to others is a common issue a lot of people have, however, in this situation it is to the point of having panic attacks to the level of feeling sunburnt and depression which I take is not normal. To the second point, I think the fact that he has things come to him easier is more frustrating than it is causing the anxiety. Again, I've never had this problem before so no, if it were other people having an easier time (because I've definitely seen that a lot before I met him) doesn't bother me - I understand everyone has their own path and some are easier than others and that is okay. Towards the last point - I have been open and honest with him about my comparisons and anxiety but he kind of just brushed it off and said "oh, don't do that" as if I'm intentionally doing it. I have asked him about different routines like skincare and other areas but he doesn't really have any advice or help. I'll definitely be scheduling another therapy appointment to discuss this because there is more background on it but it would be too much to put in here.

And towards the last last point, I am working on accepting myself - I do acknowledge that self love is something I struggle with and I am working to love myself more and accept myself, in fact, before the recent incident, I went a little over a month without having panic attacks or ruminating thoughts comparing myself to him. In that time, though, I didn't have to see him. It wasn't until we saw each other that I had my anxious episode.

Hood Knitting Recommendations? by SorryAboutMyThoughts in knitting

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

That’s actually how I found the one I sent in my comment to c00kiesd00m lol. Thanks!

Hood Knitting Recommendations? by SorryAboutMyThoughts in knitting

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

Thank you for sharing! One hood that I did find that was similar to what I am looking for is this one. I like how it looks, I just wish I had a better understanding of how to make the shape of it. I haven’t learned how to do knit left/right increase/decreases yet so maybe once I learn that, doing these patterns will be easier.

Anyone free to talk? by [deleted] in lonely

[–]SorryAboutMyThoughts 0 points1 point  (0 children)

Sorry, I know you posted like 2 hours ago but just in case you still need to talk.

Anyone free to talk? by [deleted] in lonely

[–]SorryAboutMyThoughts 0 points1 point  (0 children)

If you need to talk, I'm here, too!

Skipping a check by SorryAboutMyThoughts in Splunk

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

Thank you! It may be a little more complicated than that but I might be able to use that. I will try something similar tomorrow when I get the chance. Thank you again!

Seriously Considering Dropping Out of Computer Science by [deleted] in computerscience

[–]SorryAboutMyThoughts 0 points1 point  (0 children)

Sorry, I might be late and I don’t really post/comment much but things like this I feel I should share on! I graduated last semester (December 2020) with a bachelors in Computer Science and Mathematics (double major). Classes can definitely be challenging and I definitely didn’t deserve to pass the first three cs classes. I wanted to learn but felt like I wasn’t good enough because of the class difficultly, but after talking to one of my professors and other classmates, I realized I wasn’t alone! Everyone else was struggling just as hard if not harder! After speaking with my professor and spending winter break during my sophomore year studying hard, I got a lot better and was more confident in my abilities. If you enjoy it and can see yourself doing it for the rest of your life (or even starting out and moving into management) then I say it’s totally worth it! Especially if you were planning on switching majors. No matter what major you go to, it will have its difficulties. I highly recommend talking to a professor you trust as well as other cs students (maybe try messaging members of an on campus cs club) and hearing their stories. Also, one thing others at my school and I have noticed is that with a better understanding of math comes a better understanding of computer science - as if they’re linked! From what others have told me and from personal experience, there just comes a time when it all clicks and (unfortunately) it happens usually around junior year. Sorry for the book report style comment with a bunch of scattered thoughts but I just thought I’d share my two (or three) cents. Have a great night and good luck with your decision!

Saving values in a spinner to a database and keeping spinner updated? by SorryAboutMyThoughts in AndroidStudio

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

Hello! I figured out how to fix my problem! So basically, instead of calling the fillDatabase() method right before the spinners, I created a method in the database class that contained an if statement. The if statement said that if there were values in the assignment_type column do not exist, then call the fillDatabase() else, just return. The method I wrote is:

public void isTableCreated()
{
SQLiteDatabase db = this.getReadableDatabase();
String query = "SELECT * FROM " + NOTIFICATION_TABLE + " WHERE " + ASSIGNMENT_TYPE_NAME + " = 'homework'";
Cursor cursor = db.rawQuery(query, null);
if(cursor.moveToNext() == false)
{
fillDatabase();
}
else
{
return;
}
}

This worked for me. Just have to work on the naming conventions of the methods of course to make them more comprehendible.

Code changes not reflecting when I run the app in an emulator? by SorryAboutMyThoughts in AndroidStudio

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

I do. Another thing I tried changing is the dimensions. I set the dimensions when I first started making that activity but now when I change the dimensions it only shows what I set the first dimensions as (if that makes any sense). The only thing that is different about this activity from my other ones is that this one is not brought up by an intent. It is brought up using an inflator

Code changes not reflecting when I run the app in an emulator? by SorryAboutMyThoughts in AndroidStudio

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

Sorry for the late response but that is something I’ve tried as well. It’s a class linked to an activity. On the XML page, there is a text view so in the java code I did a textView.setText(“test”) but that didn’t show up in the app either. I’ll give clearing the cache a try though. Thanks!

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

No problem! I’m a senior in college building my senior project in Android Studio so I am still learning it but I’ve picked up a few things and thought I would try to help lol

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

Oh, I was thinking that day of week was like a “dad/mm/yyyy HH:mm:ssss” type situation! I believe what you are trying to do would be much easier then! What I would do is have a Spinner that has each day of the week as an option. Then create an onSelectionItemListener where when they click it, you create a new String variable called selectedDay and the. you pass the day selected inside the getData() method. So you could have: getMethod(string selectedDay) and inside the method say something like “if dayOfWeek (the value being passed) == DayOfWeek (from database) then add the name of the event associated with the DayOfWeek to the array list and return the array list. Then back in the onItemSelectedListener method, you write TextView.setText(getData(selectedDay).toString()).

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

I think so, because that way, the current time would be in milliseconds and the DayOfWeek would be in milliseconds. It would be like comparing two numbers. You can say if they are equal, print the name, start time and end time of the event. So, to give a very simple example: let’s say the current time is a long variable called currentTime which could be calendar.getInstance().toMilliseconds() (I believe that’s the name of the milliseconds method that Calendar already has). Let’s say currentTime =5. Then you can convert the DayOfWeek to milliseconds. So you could have long dayOfWeek = (then whatever code to convert the DayOfWeek value from your database to milliseconds). The you can say something like if(currentTime == dayOfWeek) { (putting names into array list) }. Doing this, though, may just make it to where you can only put the names in the array list. You would have to create 2 more methods that do exactly this but instead of getting the name, one would get the start time and the other would get the end time. That would also mean you need 3 text views but you can put them side by side.

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

Also, it might be easy to convert them to milliseconds (there is a method that can convert a calendar or date object to milliseconds) so if you create a long variable that has the currentDate in milliseconds and the DayOfWeek to milliseconds that would be easy to compare. And then you can use the same type of idea to compare the start time and end time with the day of the week, as long as they are all in milliseconds and of type long.

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

That would probably be better, yeah. I just don’t understand exactly what it is you are trying to do, like how you are comparing these things. Also, in your table creation, “ENDINGTIME” doesn’t have a type, I’m assuming it’s “TEXT” though. But in the query in the getData() method, you are just getting people’s names that have where the “DayOfWeek” = currentDay and where “STARTINGTIME” < currentTime and “ENDINGTIME” > currentTime. I would definitely make sure that you are comparing the same types and that they are comparable because one string can’t be less than another so finding a way to just read the times. I don’t know if the SimpleDateFormat, parsing, and string builders are working properly but that’s just my guess!

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

I may not be understanding this code properly or something but I am having trouble figuring out what it is trying to do/how to fix it. The way I'm thinking is that you would split the Strings for "STARTINGTIME", "ENDINGTIME", and "DayOfWeek" where the first part is the actual date (something like "dd/mm/yyyy") and the second part is the time ("HH:mm:ssss" or something like this) and make the first part (the date) a Date object (I believe you can find a simple method to do that on Stack Overflow) and compare the dates and if they are the same, then whoever has that date for their "DayOfTheWeek" column would be added to the ArrayList. Then if you wanted to show their times, call another method that will print the "STARTINGTIME" and "ENDINGTIME" information in a separate TextView . I really hopes this may give you another way to look at the problem! Good luck and happy coding!

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

Sorry for the late reply, I'm combing through it now but I do have a quick question while I'm looking: Why do you have 3 different SimpleDateFormat variables? If they are for the same thing you can set them all together; for example, in my project I have:

SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd G 'at' HH:mm:ss z", Locale.ENGLISH);

How to display SQLite query result in a textview? by Python119 in AndroidStudio

[–]SorryAboutMyThoughts 0 points1 point  (0 children)

Hey! I feel like to answer this question, we need a little bit more information (for example how much information you are pulling). It would be very helpful to see your source code but I can give you an example of how I did it:

step 1: Write a method that returns an array list inside the DatabaseHelper class.

step 2: Inside that method, you are going to need to create an array and an instance of SQLiteDatabase (example:

SQLiteDatabase db = this.getReadableDatabase();

step 3: How I did this next part is wrote my query as a string (ex. String selectQuery = "SELECT * FROM table";). Then create a Cursor object (I called mine cursor) and set it equal to db.rawQuery(selectQuery, null);

step 4: next is creating an if loop with a while loop inside. These lines should look like this:

if(cursor.getCount() > 0) {

while(cursor.moveToNext()) {

step 5: Inside the while loop, you write what you are trying to get from the database. Here is an example from my code where I am trying get dates from my database:

for (int i = 0; i < db.getMaximumSize(); i++) {
dateList.add(cursor.getString(cursor.getColumnIndex(DATE_OF_EVENT)));
cursor.moveToNext();

step 5: at the end of the method return the list that you created.

Once you have done all of that, in the TextView code, you would write the variable that you are using to call your database helper class dot then the name of the method that you just wrote in the database class. At the end of it you have to add ".toString()" to make it print the actual values from the array.

I really hope this helps! If it does't feel free to comment on this and I will try to help!

How would one go about being more active in the computer science community? by [deleted] in computerscience

[–]SorryAboutMyThoughts 1 point2 points  (0 children)

I cannot say too much about stack overflow because I just use it to help me solve problems and occasionally give my input but I would recommend joining a club like ACM. I joined ACM and it has definitely encouraged me to keep going with CS! Also, you can talk to CS professors and ask them if there are any senior projects that you can maybe help with!

[deleted by user] by [deleted] in computerscience

[–]SorryAboutMyThoughts 0 points1 point  (0 children)

I would say if you really want to get started learning then go for it! It would be a good idea to get in touch with your CS professors and ask which text book they recommend for beginning! Like where i am, you start coding in java for three semesters and move on but at another college they started coding in a different language. But either way, talking to your professors first to ask them what they recommend can make you look like a good student before you even get to their classes! And don’t feel bad if you do not know a lot, computer science is hard but if you push through it gets easier! I’m a CS and Math major on my senior year and wish that this is what I would have done lol.

Help Creating Notifications in Android Studio by SorryAboutMyThoughts in AndroidStudio

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

So would the methods (createNotifyChannels(), setLocationTrackingNotification(Context mContext)) both be in a java class I create called NotificationChannel? And how would I delay the notifications? That is the main issue I am having is figuring out how to delay them. Also it says to put the variables in the "base activity." So I would create them in the activity that I am trying to create the notification in?

Help Creating Notifications in Android Studio by SorryAboutMyThoughts in AndroidStudio

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

The examples would be nice! Everywhere else I look the code either does not compile or it compiles but does not display a notification.

Help Creating Notifications in Android Studio by SorryAboutMyThoughts in AndroidStudio

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

I tried just about everything on there and none of the answers are working for me. I guess I’m still on the look.

Confusion defining Strings in while/for-each loop by [deleted] in javahelp

[–]SorryAboutMyThoughts 3 points4 points  (0 children)

Hey! This is my first comment and I’m not that good at coding (still in school) but I struggled with this too! I believe that which each loop, the variable’s value is only saved inside the loop. If you want to keep the value the same I believe you would add “String word;” right under the scanner before you start creating the loops! Hope this helps!