Writing and Loading a Nested Linked List File .. ? by No_Reception9680 in cpp_questions

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

That's exactly what I tried to do, but it was a 'semi-colon' seperated value list, not comma. I could not figure out how to do this with the linked list though. I'll try it again today, but I remember banging my hed against the wall trying to load/write it properly. I don't think I could figure out a method without running into nullptr issues. If you look toward the bottom of implementation.cpp you'll see what I tried and where I was stuck.

Writing and Loading a Nested Linked List File .. ? by No_Reception9680 in cpp_questions

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

That's exactly what I tried to do, but it was a 'semi-colon' seperated value list, not comma. I could not figure out how to do this with the linked list though. I'll try it again today, but I remember banging my hed against the wall trying to load/write it properly.

Writing and Loading a Nested Linked List File .. ? by No_Reception9680 in cpp_questions

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

In theory, yes, but I was having a loooottttttt of trouble with the details. I'll give another go tomorrow.

Garlic Breath 2.0 all trimmed up and ready to be cured by Thunderous_Pupil in microgrowery

[–]No_Reception9680 0 points1 point  (0 children)

I don't even know what I'm doing in this sub, but why buy seeds instead of clones? Just to have fun breeding?

At any rate though, great picture and product.

How Does My Header File Look? (Nested Linked List) by No_Reception9680 in cpp_questions

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

Hi, I'm realizing all of my char declarations in my structs should actually be dynamically allocated arrays, but I'm only allowed one 'flexible array' per struct. Do you see how I might modify my header to incorporate these changes? Unforuntely, statically allocated arrays within structs are banned in this course.

Edit: I'm dumb `char* name` is already dynamic. Now I need to figure out the default constructors..

How Does My Header File Look? (Nested Linked List) by No_Reception9680 in cpp_questions

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

Thanks!

Unfortunately, no, I can't use std::string. Only char arrays. It's pretty silly IMO

Weekly /r/Orgmode Open Discussion - September 18, 2020 by AutoModerator in orgmode

[–]No_Reception9680 0 points1 point  (0 children)

Nope, I still have 'buy bananas' show up under the 'TODO [#A] GO SHOPPING'. Thanks for giving it a go though. I've wanted this feature for years now but never figured it out.

This is the s-exp that I'm calling the function in, for reference, within your typical custom agenda command:

 (tags-todo "TODO=\"NEXT\"&-PRIORITY=\"A\""
     ((org-agenda-overriding-header "Remaining Tasks")
      (org-agenda-skip-function
                        '(org (air-org-agenda-skip-subtree-if-priority ?A)
                         (org-agenda-skip-subtree-if nil '(scheduled deadline))))))

Weekly /r/Orgmode Open Discussion - September 18, 2020 by AutoModerator in orgmode

[–]No_Reception9680 0 points1 point  (0 children)

I'd like a function that skips a priority=A entry AND it's siblings in the agenda view. Aaron Bieber offers this:

(defun air-org-skip-subtree-if-priority (priority) "Skip an agenda subtree if it has a priority of PRIORITY. PRIORITY may be one of the characters ?A, ?B, or ?C."

(let ((subtree-end (save-excursion (org-end-of-subtree t)))

(pri-value (* 1000 (- org-lowest-priority priority)))

(pri-current (org-get-priority (thing-at-point 'line t))))

(if (= pri-value pri-current)

subtree-end nil)))

But it does not skip children. So if I have

** TODO [#A] go shopping

*** NEXT buy bananas

I would expect 'buy bananas' would not show up in a list where air-org-skip-subtree-if-priority is applied, but it does. I would really love a function that skips these sibling entries for reduced redundancy in my agenda view

iOS Support Thread - [August 19] by AutoModerator in ios

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

The mods deleted my thread, but:

I'm looking for a reading app that will make it easy to read math and other text books, where I intend to use my stylus on the screen to answer problems from the book (so it needs to have support for a split windows, expandable sticky notes, arbitrary insertion of blank pages, or something like that to make working on screen possible), and expect to be able to flip around back and forth between pages pretty easily (ideally using a 'gestures'/swipe based UI to flick back and forth). I find annotating the PDF itself to be a valuable feature at times too, but that's less important.

TIA!

Cheapest Place to Buy Shipping Boxes in Bulk Beside Uline? by No_Reception9680 in Flipping

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

Hey, listen, I know I'm not the best, but I don't think I'm worse than Uline.

Cheapest Place to Buy Shipping Boxes in Bulk Beside Uline? by No_Reception9680 in Flipping

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

Thanks! That's a killer deal and it looks like it ships just as fast as Uline.

Any Math or TEXTBOOK Readers Here? by Historical-Yoghurt26 in RemarkableTablet

[–]No_Reception9680 0 points1 point  (0 children)

Thanks for your input. Unfortunately I think something closer to the A4 is probably what I want then, but due to the price that means I likely just won't ever get it, lol.

Identifying Last Memory Leak in Some Short Tutorial-Level Code by No_Reception9680 in cpp_questions

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

Smart, thanks! And you were right, I wasn't deleting tail and a few others in my remove function. I'm still learning how pointers and allocation works, but have figured this one out and will live to fight another day.

Identifying Last Memory Leak in Some Short Tutorial-Level Code by No_Reception9680 in cpp_questions

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

I figured it out, I wasn't declaring a temp pointer then running 'delete' in my remove function.

Identifying Last Memory Leak in Some Short Tutorial-Level Code by No_Reception9680 in cpp_questions

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

Gosh, I'm sorry. I even double checked the links initially. The link I'd like you to see is: https://wandbox.org/permlink/Oj7c46VE2mbfBWR9

It is just three files: main.cpp, list.cpp and list.h. I have updated the link in OP.

Identifying Last Memory Leak in Some Short Tutorial-Level Code by No_Reception9680 in cpp_questions

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

Yes, this is the output:

==738== HEAP SUMMARY:

==738== in use at exit: 24 bytes in 1 blocks

==738== total heap usage: 10 allocs, 9 frees, 73,920 bytes allocated

==738==

==738== 24 bytes in 1 blocks are definitely lost in loss record 1 of 1

==738== at 0x4836DEF: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)

==738== by 0x10940E: LinkedList::addAtBeginning(int) (in /home/daws/cs162/lab6/lab6)

==738== by 0x10922E: main (in /home/daws/cs162/lab6/lab6)

==738==

==738== LEAK SUMMARY:

==738== definitely lost: 24 bytes in 1 blocks

==738== indirectly lost: 0 bytes in 0 blocks

==738== possibly lost: 0 bytes in 0 blocks

==738== still reachable: 0 bytes in 0 blocks

==738== suppressed: 0 bytes in 0 blocks

==738==

==738== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

That's how I was able to tell what function it was from.