Using virtual inheritance for an interface system based on abstract classes

I want to use a physics engine (like bullet or PhysX) in my program, however I want to hide the actual physics engine from it, so I can easily swap it out with another during run-time (e.g. switch between bullet and PhysX without requiring any changes to my main program).

To do so, I have created some abstract classes, which will be used by the program directly:

class IShape { public:     virtual ~IShape()=default; };  class IConvexShape     : virtual public IShape { public: };  class IConvexHullShape     : virtual public IConvexShape { public: }; 

Then I can just implement these classes for a specific physics engine like bullet:

class BtShape     : virtual public IShape { public: };  class BtConvexShape     : virtual public IConvexShape,     public BtShape { public: };  class BtConvexHullShape     : virtual public IConvexHullShape,     public BtConvexShape { public: }; 

The problem is that IShape implements some base functionality that should be used for all other shape types, and BtShape implements some base functionality that should be used for all other bullet shape types, which means I have to use virtual inheritance (Same goes for IConvexShape / BtConvexShape.):

UML depiction of the class interface.

While this works, I’m a bit hesitant to go further with this, since it’s usually recommended to avoid virtual inheritance altogether.

Can I expect any problems with this approach? Are there any alternative methods I can use instead?

evidence based practice essay

how to write an narrative essay indian population essay funny story essay essay on my favourite fruit write about yourself essay short essay on child labour how to write the best college application essay english literature essay structure mla format in essay
tok sample essay…

evidence based practice essay

Using virtual inheritance for an interface system based on abstract classes

I want to use a physics engine (like bullet or PhysX) in my program, however I want to hide the actual physics engine from it, so I can easily swap it out with another during run-time (e.g. switch between bullet and PhysX without requiring any changes to my main program).

To do so, I have created some abstract classes, which will be used by the program directly:

class IShape { public:     virtual ~IShape()=default; };  class IConvexShape     : virtual public IShape { public: };  class IConvexHullShape     : virtual public IConvexShape { public: }; 

Then I can just implement these classes for a specific physics engine like bullet:

class BtShape     : virtual public IShape { public: };  class BtConvexShape     : virtual public IConvexShape,     public BtShape { public: };  class BtConvexHullShape     : virtual public IConvexHullShape,     public BtConvexShape { public: }; 

The problem is that IShape implements some base functionality that should be used for all other shape types, and BtShape implements some base functionality that should be used for all other bullet shape types, which means I have to use virtual inheritance (Same goes for IConvexShape / BtConvexShape.):

UML depiction of the class interface.

While this works, I’m a bit hesitant to go further with this, since it’s usually recommended to avoid virtual inheritance altogether.

Can I expect any problems with this approach? Are there any alternative methods I can use instead?

Conditional formatting based on date to expire

In SharePoint O365, in the modern experience, I have a list of training certificates that have an expiration date of one year from date taken.

I would like to use conditional formatting to create a status column that shows me the certificate is one of these:

  1. Current, green background – taken sometime within the last 10 months.

  2. Expiring, Orange background – Taken 11 or 12 months ago.

  3. Expired, Red background – date past one year ago

I have done this for another list using the status of the request of whether it was approved or rejected but when it comes to dates I have found it rather difficult to get an example even close to what I am looking for. I used the formatting wizard that is not built in but it only compares to todays date and I can’t use the date of a field.

Why does Fedora give us root access and let us do whatever we want to do while Neon or Ubuntu based distro doesn’t?

Out of all distros I’ve used so far for testing I like KDE neon the most for it’s heavily customizable and fancy GUI. One thing that’s bugging me a lot on Neon is why KDE neon doesn’t want us to be root and doesn’t let us do things easily like Fedora or Red Hat based distro? I’ve tried KDE Plasma Desktop on Fedora 30 BUT it seems it screws up Fedora! With GNOME desktop on Fedora 30 I can delete boot, root, etc. folders and restore from recycle bin if I want to BUT with KDE Plasma on top of Fedora 30 I can’t do it, Dolphin doesn’t allow me to do that and constantly gives me a message saying something like “it’s not a good idea to run dolphin as root”!

I also have tried to give my user account ownership of / on KDE Neon and apparently it did let me do so as far as I remember with sudo BUT after a while it started teliing me on terminal that /usr/bin or something like that must be owned by user 0 or root and later I couldn’t even connect to internet! I think, if I write a program with qt or dotnet-sdk to traverse all directories recursively on my system, KDE neon or Ubuntu based distros will give me some runtime error!

What made Red Hat based developers give us full control over our computer and Ubuntu based developers restrict us? What’s the difference in their philosophies?

Creating DBMS based on DynamoDB

I’m developing a program that uses DynamoDB, for which my next step is to develop a simple DBMS that does the standard sorting by column (click to sort by firstname/lastname/emailaddress/etc….). Although a no-brainer in SQL, I can’t find a good way to do this in NoSQL except to brute-force it with a scan or query command (retrieving the whole DB every time I want to sort….obviously inefficient), or to make a whole bunch of secondary tables/indexes to handle each sort possibility. My question is whether there is any good/accepted/best-practice method of doing something like this, or if the only way to avoid the brute-force approach is to redo the whole thing in a SQL DB? Thanks.

Boyfriends Ranked From Faithful To Big Fat Cheaters Based On Their Zodiac

1. Cancer
Once a Cancer falls for you, you’ll be in their heart forever. They will want to settle down with you as soon as possible. Get married. Have babies. The whole shebang. They wouldn’t ever dream of cheating on you, because they wouldn’t want to ruin the future that they already picture you having together. They wouldn’t want to destroy their happily ever after.

2. Leo
You might think that a Leo would love to stay single forever,…

Boyfriends Ranked From Faithful To Big Fat Cheaters Based On Their Zodiac

Small socket based packet Library

I’m currently writing a python script which needs some simple networking. After some playing around with sockets, this emerged, but as this is my first foray into sockets I’d really like a second opinion.

Package Format:

datalength+1 data

import socket  sep: bytes = b''  minpacketsize: int = 10   def sendpacket(sock: socket.socket, data: bytes) -> None:     send: bytes = str(len(data) + 1).encode('utf-8') + sep + data + sep      if len(send) < minpacketsize:         raise ValueError("Packet too small!")      sock.sendall(send)   def recivepacket(sock: socket.socket) -> bytes:     datalen = 0     header: bytearray = bytearray()     while not datalen:         header += sock.recv(1)         if header.endswith(sep):             try:                 datalen = int(header[:-1].decode('utf-8'))             except UnicodeDecodeError or ValueError as e:                 raise ValueError("Error while decoding header!") from e          if len(header) == 10:             raise ValueError("Could not find Header!")      rawdata: bytes = sock.recv(datalen)      if rawdata.endswith(sep):         return rawdata[:-1]     else:         raise ValueError("Could not find Packet end!") 

Sort sentences based on formatting

I have a list of sentences in Google Sheets, each word in a different column.

  1. There is a stupid man.
  2. How we came here we don’t know anything about.
  3. Finally, it has come to this.
  4. Shaking my head.

How can I sort these sentences in alphabetical order by the first word in bold?

This is the result I’m looking for:

  1. Shaking my head.
  2. Finally, it has come to this.
  3. How we came here we don’t know anything about.
  4. There is a stupid man.

Better still if I can do this in Google Docs.