Wheels-Of-Fire

Forum Replies Created

Viewing 20 posts - 161 through 180 (of 1,996 total)
  • Author
    Posts
  • in reply to: VR Headset #66981
    Wheels-Of-FireWheels-Of-Fire
    Participant
      @grahamdearsley
      Forumite Points: 4

      I remember watching a Tomorrows World program in the early 80’s that promised we would soon be able to fix a severed spinal cord, it said a tiny microchip had been developed that, when attached to a nerve, could read and interpret nerve impulses and retransmit them as light. Two chips linked by fiber optic cable could bridge a break in a nerve, apparently it had worked with frogs legs in a lab.

      Still no sign of that one yet 🤥

      in reply to: VR Headset #66977
      Wheels-Of-FireWheels-Of-Fire
      Participant
        @grahamdearsley
        Forumite Points: 4

        I suppose if you connected into the optic nerve directly you could do something, but if we could do that now we would already have bionic eyes.

        in reply to: VR Headset #66976
        Wheels-Of-FireWheels-Of-Fire
        Participant
          @grahamdearsley
          Forumite Points: 4

          The methods that read brain activity are still only remote controls at best, they can only sense if there IS activity in areas of the brain, not WHAT it is.

          As for implanting images directly into your brain, Pah😁

          in reply to: VR Headset #66902
          Wheels-Of-FireWheels-Of-Fire
          Participant
            @grahamdearsley
            Forumite Points: 4

            Epic Roller coasters had some new free rides recently though, have a look at that if you havent  already.

            in reply to: VR Headset #66901
            Wheels-Of-FireWheels-Of-Fire
            Participant
              @grahamdearsley
              Forumite Points: 4

              Ah yes, VR headsets.

              I have had the Samsung Gear VR by Oculus for nearly 2 years now, I use it with a Galaxy S9 phone and the results are pretty impressive. Only thing is a lack of new software, once you have gone through all the demos.

              Looks like Samsung have stopped supporting it and handed my account over to Oculus so I don’t expect much new stuff now.

               

              in reply to: C++ Programming #66413
              Wheels-Of-FireWheels-Of-Fire
              Participant
                @grahamdearsley
                Forumite Points: 4

                It turns out that the implied “this” parameter is not too complicated on its own, where a class member  function may have had to specify a data member explicitly, it doesn’t have to if they are both in the same class. Implied “this” gets complicated with return types because there is no actual “this” type to return. C++ lets you specify a return type, such as const, after the parameter list.

                I am coming back to it !

                In the mean time I am looking at double ended queue types (A dequeue), looks like a vector that supports push_front as well as push_back.

                in reply to: C++ Programming #65937
                Wheels-Of-FireWheels-Of-Fire
                Participant
                  @grahamdearsley
                  Forumite Points: 4

                  You’re not wrong there Ed, I wouldn’t have looked at the pre-processor yet, if I hadn’t had a problem with a program that used it. On the other hand, I didn’t really WANT to be looking at the pre-processor yet !

                  I am now going back to looking at classes, starting with the implied “this” parameter that class member functions use. Wish me luck :scratch:

                   

                  in reply to: Shirt Pocket (<-5.4~ screen) Phone Wanted #65935
                  Wheels-Of-FireWheels-Of-Fire
                  Participant
                    @grahamdearsley
                    Forumite Points: 4

                    If you CAN stretch to the S10e then you won’t be disappointed.

                    in reply to: C++ Programming #65855
                    Wheels-Of-FireWheels-Of-Fire
                    Participant
                      @grahamdearsley
                      Forumite Points: 4

                      I have come across a new annoyance, relating to the online code that is provided with some books.

                      I have already encountered code that uses new C++ features but tries to stay compatible with older compilers by using pre-processor directives, using an #ifdef to check for the existence of pre-processor variables is common, providing a custom function if the variable doesn’t exist. The problem seems to occur if the variable DOES exist but a newer compiler implements the function in a different way from the custom function.

                      The new annoyance is code that uses features from a newly released version of the C++ standard but that haven’t been implemented in any compiler at the time the book was published, they use the same trick as above but they can’t know for sure what variable name a newer compiler will use to represent a feature.

                      I just had the above problem and it took 30min to figure out. In my experience its easier to find a problem with missing features than it is to work out what they did to try to prevent a problem !

                      in reply to: New Beast from the East Forecast – Jan/Feb #65769
                      Wheels-Of-FireWheels-Of-Fire
                      Participant
                        @grahamdearsley
                        Forumite Points: 4

                        I like their inferred conclusion. We are seeing polar vortex collapse as in two earlier years but that may or may not make it colder. It will depend on the weather :unsure:

                        in reply to: C++ Programming #65748
                        Wheels-Of-FireWheels-Of-Fire
                        Participant
                          @grahamdearsley
                          Forumite Points: 4

                          I was also reminded that end() returns a pointer to one past the end of an array because when I forgot the – – end1; statement (the prefix version of – – that always occurs before any other evaluation in a statement that uses it)  the program compiled but threw a memory access exception. Not totally safe after all then 🙁

                          in reply to: C++ Programming #65744
                          Wheels-Of-FireWheels-Of-Fire
                          Participant
                            @grahamdearsley
                            Forumite Points: 4

                            Well thats the thing, I DO need a “using” for “string” otherwise the compiler sees it as a local variable. On the other hand I had to call my pointer “end1” because when I tried to call it “end” the compiler complained about a bad call to end() :wacko:

                            Some parts of the C++ standard library are indeed written in C++ but some parts of the C library were also written in C !

                            in reply to: C++ Programming #65702
                            Wheels-Of-FireWheels-Of-Fire
                            Participant
                              @grahamdearsley
                              Forumite Points: 4

                              Works as expected except that I meant to output “*ptr1” not “*nums”. Good job its only an example.

                              in reply to: C++ Programming #65699
                              Wheels-Of-FireWheels-Of-Fire
                              Participant
                                @grahamdearsley
                                Forumite Points: 4

                                #include<iostream>
                                #include<iterator>

                                using std::cout;
                                using std::string;

                                int main()
                                {
                                string nums[] = { “one”, “two”, “three”, “four” }; // List initialise an arry

                                string* ptr1 = nums;

                                string* beg1 = begin(nums);
                                string* end1 = end(nums);

                                –end1;

                                cout << *nums << ” ” << *beg1 << ” ” << *end1; // Prints one one four

                                }

                                The above code works as expected but I removed the “using namespace std” statement I was using before and replaced it with explicit “using” statements (As I really should). I was just wondering why I don’t need a using for begin() and end() ? You can see I included <iterator> but that’s not usually enough.

                                in reply to: Shirt Pocket (<-5.4~ screen) Phone Wanted #65693
                                Wheels-Of-FireWheels-Of-Fire
                                Participant
                                  @grahamdearsley
                                  Forumite Points: 4

                                  What phone do you have at the moment ?

                                  in reply to: Shirt Pocket (<-5.4~ screen) Phone Wanted #65691
                                  Wheels-Of-FireWheels-Of-Fire
                                  Participant
                                    @grahamdearsley
                                    Forumite Points: 4

                                    The decent camera in the size you want seems to be the tricky thing.

                                    in reply to: Pancreatitis and a new diet. #65608
                                    Wheels-Of-FireWheels-Of-Fire
                                    Participant
                                      @grahamdearsley
                                      Forumite Points: 4

                                      I have been following this thread but I have not known what I could say. All I can say now is that that is NOT what I wanted to hear and to send Bob all the best possible wishes.

                                      in reply to: C++ Programming #65602
                                      Wheels-Of-FireWheels-Of-Fire
                                      Participant
                                        @grahamdearsley
                                        Forumite Points: 4

                                        Yes, if you use the features of C++ as intended you can be extremely LAZY and still be safe . But if you CHOOSE to be stupid… 🙂

                                        in reply to: C++ Programming #65584
                                        Wheels-Of-FireWheels-Of-Fire
                                        Participant
                                          @grahamdearsley
                                          Forumite Points: 4

                                          And all the pointers in the example are called ptr1, I missed the one off the first one.

                                           

                                          in reply to: C++ Programming #65582
                                          Wheels-Of-FireWheels-Of-Fire
                                          Participant
                                            @grahamdearsley
                                            Forumite Points: 4

                                            .end() gives you a pointer to one past the last element of an array, as with containers. Sorry :wacko:

                                             

                                          Viewing 20 posts - 161 through 180 (of 1,996 total)