Database Normalization Causing Inefficiency

Question: Note: I am relatively new to managing an SQL database. I have done my fair share of reading, research, and experimentation, but it is possible that I am missing some fairly basic knowledge. I'm also not sure how to tag this question so if someone could add relevant tags that would be appreciated.

I am currently building an SQL database for a forum like website. Among other things, the website will contain pages with threads, basically a series of posts by different users.
Users on the website are identified by a unique ID (char(36)) that is set once at registration and cannot be changed afterward. The user also has a username (varchar(16)) that is just a screen name. This name is almost always unique between users, but not necessarily. The user can also change the name, but there is a hard limit of two weeks between any two username changes. All of this information, and a few other things like login details, are stored in one Users table with the ID as a primary key.
There are multiple tables for the forum itself, but the one that is important for this question is the Posts table (primary key is 'post_id' int(10) NOT NUll AUTO_INCREMENT PRIMARY KEY. It contains one row for every time somebody makes a post on a thread, including responses to existing posts. As a result, whenever a user requests a thread, I query the posts table for all posts matching that thread (I store a thread ID foreign key). My question now concerns storing a user who is the author of the post. When a thread is requested, I need to send the username (not ID) of the users that made different posts. However, I also need to make sure that changes in usernames do not cause the apparent author of a post to change. As far as I can tell I have two possibilities:

For storing the author of a post, I can store only the ID. However, this means that I will have to make quite a few requests to the Users table for the usernames of the various IDs of the posters. This seems highly inefficient, seeing that the usernames will change very rarely.
I can store both the author ID and the author username in the Posts table. I can then go through the table and change all usernames among the posts (I can even set this up with a trigger, I believe). However, this opens the window for update anomalies, if the username stored for an ID in the Users table is different than in one of the posts. I can still use a trigger to prevent these anomalies at the database level, but from what I understand this should not be necessary in a well-designed database.

Which one of these two solutions (or something entirely different) should I use to both maintain efficiency and database normalization?
If it matters, I'm using the most recent version of MariaDB and accessing using PHP.
Comment: @EvanCarroll `10.0.31-MariaDB-0ubuntu0.16.04.2`
Comment: @kakaz rough maximum of 300 requests per minute
Answer: With regard to the threading issue that people have picked up on as much as your question about user id and name normalisation, without using CTEs there are a number of ways to arrange hierarchies to allow efficient retrieval of threads or portions thereof. You could store a materialised path to each post for instance. Efficiently dealing with trees in SQL is a subject whole books could be (and have been) written about, so I'll not go into more detail here. For a quick primer the relevant chapter in Bill Karwin's "SQL Antipatterns" (a book I recommend generally) is a good place to start, or for a fuller analysis Joe Celko's "Trees and hierarchies in SQL for Smarties", or search online for the tree management methods (with search terms like adjacency list, materialised path / cached path / path enumeration, nested sets, and of course recursive CTE / recursive common table expression).
On to the actual question:

For storing the author of a post, I can store only the ID. However, this means that I will have to make quite a few requests to the Users table for the usernames of the various IDs of the posters. This seems highly inefficient, seeing that the usernames will change very rarely.

This is normal and should not be significantly inefficient. You will not be performing a separate lookup for every user ID spotted, instead you will use a JOIN and let the SQL engine worry about that for you which it will do well if you give it good index choices to work with. Something like:
SELECT posts.postTitle
     , posts.postText
     , posts.postTimeStamp
     , users.fullName
FROM   posts
JOIN   users
       ON users.id = posts.userID

Having said that, it is important to note that data normalisation is not about performance efficiency it is about protecting data integrity/correctness and (less importantly) storage efficiency: in this instance if you avoid having several copies of the same data (the username) you avoid the possibility of inconsistency because one or more copies disagree with the others.

I can store both the author ID and the author username in the Posts table.

Unless you want to allow usernames to change and keep the original name displayed, this is unnecessary and you should use normal form and a join, as above.
Before trying to support name changes in a particular way, first decide if you actually need to allow them at all. If the name in question is an account name then perhaps you don't need or want to support it changing at all. If it is a personal name or email address, both of which can change over time, then you perhaps want to change all instances when this happens so you don't have to worry about it: just update the name in the users table and future queries like the above will get the new data instead of you needing to

go through the [posts] table and change all usernames among the posts

at all.
Things get a bit more complicated if you want to maintain the display of the user's name at the time they made a post instead of old posts being displayed with the new name. You could store "name at time of post" in the posts table, and with this requirement you don't need to update it when the user's name changes (you are wanting to keep the old name). The other option is to keep a history of the user's record in normal form and using that to ready the correct name. This will be more efficient for storage (and less likely to become inconsistent due to bugs) but reading the username-at-time-of-post can be more complicated and will vary depending on what your chosen database supports (does it have efficient window functions?) and how you chose to store the history (using "system versioned history table" support in SQL Server or Oracle for instance). I'll not go in depth on this, as I suspect simply letting the displayed name change when the user's details change is perfectly fine and easy to implement.
Side note: key type choice
With CHAR(36) I assume you are using UUIDs for internal user ID? Unless you have reason to use UUIDs (the requirement comes from elsewhere and is not in your control, you are writing a distributed system and are concerned about key collisions for users created in different locations, ...) you might want to consider using an automatically incrementing integer instead (INT NOT NULL AUTO_INCREMENT in mysql/mariadb, INT NOT NULL IDENTITY(1,1) in MSSQL, ...) which will only use 4 bytes per key.
The same for post IDs if you are using UUIDs for them also.
For space efficiency some DBS support packed UUID types (UNIQUEIDENTIFIER in MS SQL Server, UUID in postgres, ...) which will store the value in 16 bytes instead of 36, but I don't think mySQL does. You could use BINARY(16) but you may need to faf around converting back and forth when reading/writing the values so that probably isn't recommended.
Depending on the number of rows you expect the difference in key size may not be significant to worry about, but if you plan for your application to scale into something huge it should be considered in the early design stages (making key type changes is a nightmare once an application has already rolled out!).
Answer: I would suggest going for option 1. Your DB would be normalized and you can achieve data integrity by leveraging the foreign key features provided by InnoDB engine.
For instance:
Create table posts (
post_id Int(10) NOT NULL AUTO_INCREMENT,
author_id Char(36) NOT NULL,
Primary Key (post_id)) ENGINE = InnoDB;

Create table users (
id Char(36) NOT NULL,
username Varchar(16),
Primary Key (id)) ENGINE = InnoDB;

And then you define a foreign key relationship to maintain integrity:
Alter table posts add Constraint rel_post_author Foreign Key (author_id) references users (id) on delete restrict on update restrict;

What happens on delete or on update is up to you, you may want to refer to MariaDB doc here: https://mariadb.com/kb/en/library/foreign-keys/
This would be the simplest option in general, unless you have some VERY HIGH load to justify some de-normalized database design.
For example, you may have relational tables defined as I suggested above and have another set of tables optimized for read-only operations: one of such tables would store both the ID and the name of the post's author along with the other post's columns.
Another option that you may want to consider is using Views. See here:
https://stackoverflow.com/questions/10302615/mysql-views-performance
Comment: This isn't "threaded" in any useful sense. Threaded doesn't mean depth of level 1. It means nd.
Answer:
I'm using the most recent version of MariaDB [...] 10.0.31-MariaDB-0ubuntu0.16.04.2

That's not at all the "most recent version". MariaDB 10.0 was released on 12 Nov 2012. That's not even the most recent security release which goes to 10.0.33 released on 30 Oct 2017. The version you're on has been frozen for over 5 years (no development except fixes just handling "security issues and bugs")

I am currently building an SQL database for a forum like website. Among other things, the website will contain pages with threads, basically a series of posts by different users.

In order to build threads, you really need Recursive CTEs. This is a hierarchical question and you can't model hierarchy relationally without recursion. MariaDB added Recursive CTEs in 10.2.2, that went stable in 2017-05-23 with 10.2.6.
With that you could get the job done, but if you haven't started the job, give PostgreSQL a shot. I did this very task here. You can just take that code and your done, and if you migrate to PostgreSQL you get an all around better database too.
For more information on the problem domain, check out hierarchy
Comment: I don't know how they are implemented in MariaDB, but CTEs are an optimisation fence in Postgres, blocking predicate push-down, so need to be implemented carefully. For a small DB this is not going to matter greatly, but at any larger scale it can be a performance killer.
Answer: The "Entities" you have are

Users -- with an AUTO_INCREMENT, not a UUID
Posts -- with post_id as PK, and a parent_id to define the threading.  A parent_id is either 0 (start of threading tree) or a link (via "self join")

To keep from having username changing in lots of Posts, copy it into the Post.  The probably requires two fields -- one for the true user identity (user_id), one for the as-posted- identity (username).
"Normalization" allows the changing of a name without retroactively fixing all the places where it is used.  That is not your use case.  So don't use normalization.
That said, let me point out how someone might "game the system" and cause you trouble.  A user adopts someone else's name, makes a few nasty/naughty posts, then changes his name back.  I suggest you disallow ever reusing a username.  This would involve making it UNIQUE and living forever (with a deleted flag).
If you change your mind about having both a true identity and a identity-at-the-time, then all you will need is user_id, plus a JOIN to get the unchanging username.
And if you do that, you can get rid of user_id and simply use username as the PRIMARY KEY and key to JOIN on.
All of the above applies to any version of MySQL/MariaDB.
You may need CTEs for traversing the "tree" of posts.  For CTEs, you need MariaDB 10.2 or the, as yet not-GA, MySQL 8.0.
(Why UUIDs are evil for huge datasets:  Blog)
(FOREIGN KEYs are a crutch for not debugging/testing code.  INDEXes, including those auto-generated by FKs, are important for performance, especially for huge databases.)
Answer: I would suggest one potential general change, as well as two options.
The potential general change: Don't use that char(36) as your unique user identifier for the joins within your database!!!  Even if you can't easily change the web code, put in an integer type author_int_id column for joins and foreign keys

it uses far, far too much space in each table and each index
performance will degrade due to both the size, and how much work chars are due to collation, and since you're concerned with performance

For your actual lookups of post to author, there are two major possibilities that I see as wise:

Option #1 is a reasonable choice as long as you do NOT do one call to get posts, and a second call to get usernames.  Instead, do a call that gets both the posts and the usernames all at once with a simple inner join across a foreign key that's backed by unique indexes.
Option #3 is a different design entirely; definitely add the foreign key for referential integrity reasons, but instead have the web code itself cache the userid to username mapping in some global storage - read it in once at the beginning.

Since the web code is where usernames would change, the web code should update the cache as well as the database each change.

If you have multiple servers without shared RAM, well, in the rare case a username changes, it's not the end of the world if the old username shows up for a while.  Add an indexed last_changed column to the users table and refresh the username cache once every hour or so with what's changed recently and you'll be fine.  Warn the users that username changes take some time to propogate when they're doing the change.

When a userid is found that isn't in the cache table... look up all new users from the database (see last_changed column, above) and add them!  Again, this is for web servers not sharing a cache.
This is solely because you seem highly concerned about very minor database load, and I assume that your database server is heavily loaded.
Comment: I had considered the global caching idea as well. However, I was driven away from this since I am using PHP. I will look into this more though, and may accept your answer if it works out for me. Thank you regardless.
Comment: As I mentioned, it doesn't need to be a truly global cache; you're running a forum, not a spacecraft, so having slightly different usernames for a time period after a user changes one isn't going to kill anyone.


Eye to head parenting/rigging

Question: I have two objects-Head and eyes. I have set up the rigging for head movement and rotation. How to make the eyes move with the head movements. I tried rigging my head bones both to head and eyes. It kinda worked. But the eye lid movements got weird as eyes were also affected now.
Answer: Make the eyes bones parented with head bone. Then select the eyes object and set parent to with automatic weights (Ctrl+P). And now if it moves weird you must check that all the rest of the bones are not affecting the eyes in weight paint mode. (sorry for my bad English U_U)

Eye to head parenting/rigging


Filling SharePoint Calendar List With Bulk Data(About 3000 Entries)

Question: I want to fill about 3000 entries in a SharePoint calendar List for testing purpose. I have tried using  this link but i have some lookup columns and person/group fields which do not appear in the excel sheet? Is there any other way of adding bulk items in a calender list.
Answer: PowerShell to the rescue! You can import your data using PowerShell rather easy, including user accounts and lookups. Check out
Loading SharePoint lists from Excel using PowerShell
http://davidlozzi.com/2012/02/29/loading-sharepoint-lists-from-excel/
Using PowerShell to play with SharePoint Items
http://davidlozzi.com/2012/02/14/playing-with-sharepoint-data-in-powershell/
Using PowerShell to access SharePoint Sites, Users, and Groups
http://davidlozzi.com/2012/03/07/using-powershell-to-access-sharepoint-sites/


Usage of "electrics" tag

Question: First of all I'm not used to hearing the term "electrics." I'm willing to accept it as valid, but what should the usage be? Is it a synonym of "electronics", or "electricity", or something different?
Answer: Right now I don't see anything with electrics that I think merits the existence of the tag.  Everything in there should really be tagged with something more useful (like avionics, instruments, electrical-system (none of those yet?), electric-aircraft, or personal-electronic-devices), and most of what's there already has a more appropriate tag.
I'm not universally opposed to having an "electrics" tag, but it doesn't seem to add much over the more specific tags and I can't think of a situation where it would be used without needing a more specific tag.
Answer: There are two separate things, I think:

electrical systems -- everything from the generators to the batteries, circuit breakers, lights, etc
electronics or avionics -- anything based on transistor technology, GPS, engine monitor, etc. I would even include a cavity tube-based transponder
Comment: i think its a British term that means #1
Comment: I agree with that, are you saying electrics can mean both?
Comment: http://english.stackexchange.com/questions/5699/electronic-vs-electric
Comment: It's definitely British/Commonwealth usage.
Comment: I agree with this answer. Electrics = wiring, circuit breakers etc.
Answer: Following a brief discussion in chat I have edited away the "electrics" tag in favour of electrical-system
Answer: There has been more than a little talk in the media lately about the possibility or inevitability of electric powered aircraft in the future.  Perhaps this tag is more appropriately referring to electric powered aircraft.  The tag name could be edited to make this clear but I would love to see some more discussion about the possibility of clean, quiet power plants.
Comment: voretaq7 suggested "electric-aircraft" in his answer, and I think that would be a much more clear name for tagging this subject. It seems like "electrics" already has a closer definition of "electronics" and it may be confusing to use it differently.
Comment: Yes I see that now.  I got bogged down trying to read a long sentence with multiple nested parenthesis.  Thx

Usage of "electrics" tag


how can you increase code coverage without modifying test class?

Question: If class has 74.5 % coverage then how can we increase 0.5% coverage without modifying test class?
Comment: You can't. That's not how test coverage works. Please see our standard resources on coverage, which I've linked above.
Comment: You can increase it with some tweaks, but I would not recommend doing so, cause it is considered a really bad practice to do so. Simply saying, you can add more code to the covered blocks or reduce it in sections that are not covered.
Answer: As a short, pithy remark: you can't
If you need additional coverage, then the only correct way to go about doing that is by adding additional tests (making a new test class, adding tests to the existing test class).
Technically, refactoring the code being tested (the SUT, system under test) would be another potential approach as that could reduce the number of uncovered lines, but doing that while making sure you aren't breaking any tests is likely harder than just writing additional tests.
Comment: +1, but refactoring can be useful. Prune unreachable catch statements, fix impossible logic conditions for if/else/do/while/for, extract comparisons to Boolean values, remove obsolete methods, and so on. The exact techniques are circumstantial, though.


Draft from fireplace

Question: So I've read many diy ways to prevent the draft of an used fireplace. Mine is not in a working condition and I don't know if the previous owner of my home had ever used it. It's very very cold. I've had the house 18 years and I just want to block out the cold. I don't know about damper or the terms. Any suggestions are welcome. I read one idea with insulation but how and what kind I'm stumped
 Help
Comment: Pictures of the front and (well lit) up inside the fireplace might help to sort out a damper.
Answer: Since you say it's not working, I assume you mean disused fireplace.
Two insulation approaches (which don't depend on there being an operable damper, though closing a damper if you can figure out how will certainly help.)

Stuff rockwool or fiberglass batt insulation up into the throat of the fireplace (above the firebox) - also feel for drafts down low in case there's an outside air inlet, and stuff that if there is.
Cut one or more pieces of foam board insulation to roughly fit in the throat of the chimney, then use spray foam insulation to seal the edges tightly to the masonry.

Neither of these need (nor should) be visible when looking at the fireplace normally.
You can also fill the fireplace front opening itself, but that is more of a visual impact on the room with the fireplace in it and may be unacceptable as a result.
If you have not used it for at least 18 years and don't intend to, you might want to consider having the chimney externally capped off, as well, or even taken down, but those are more extensive projects rather than quick DIY solutions.

Draft from fireplace


Complex query with many tables, is this possible in one query?

Question: I have troubles with the following database design (simplified for the example). It allows people to create custom forms, quite similar to google spreadsheat forms. The form generation script is done, including saving the answers to the database. I have trouble displaying the user input.
Table forms (each form is a row in this table)
form_id | form_name
1         Contact Form
2         BBQ sign up Form

Table questions (questions in the form)
question_id | form_id | question_name      | sorting_order
1             1         Full Name            1
2             1         E-mail address       2
3             1         Subject              3
4             1         Message              4
5             2         Your name            1
6             2         Are you vegetarian?  2
7             2         Beer or wine?        3

table completed_forms (to group answers together)
complete_id | form_id | timestamp
1            1          1339496914
2            1          1148691493
3            2          1256235334

table answers (answers from users to specific questions)
answer_id | complete_id | question_id | answer
1           1             1             Barack Obama
2           1             2             firstname.lastname@example.com
3           1             3             Test message
4           1             4             This is a test. Regards, Barack.
5           2             1             Thomas something
6           2             2             email@example.com
7           2             3             Another message
8           2             4             Hey, it's Thomas. This is my message.
9           3             5             Dirk
10          3             6             No, I love meat
11          3             7             Red wine!

What I want to display is an overview of user input, which is quite complex as the names and number of columns differ per form. For example, I want to show the user input from the contact form (form_id: 1) as follows:
id | timestamp | Full Name | E-mail Address | Subject | Message
1    133949...   Barack...   president@w...   Test...   This is a t...
2    114869...   Thomas...   thomas@emai...   Anot...   Hey, it's T...

And from form_id 2 as follows:
id | timestamp | Your name | Are you vegetarian? | Beer or Wine?
3    125623...   Dirk        No, I love meat       Red wine!

Does anyone if and how I can achieve this?
Many thanks for anyone who is willing to take the time to shine a light on this problem!
Comment: Do you want two selects, one for each type?
Answer: Basically you are trying to write a PIVOT but MySQL does not have a PIVOT function per se, so you will have to write the query a little different. For a static version of this query where you will code in the values of the questions you can use the following:
Form 1 (See SQL Fiddle with Demo):
select cf.complete_id
  , cf.ts
  , Min(CASE WHEN q.question_name = 'Full Name' THEN a.answer END) as 'Full Name'
  , Min(CASE WHEN q.question_name = 'Email Address' THEN a.answer END) as 'Email Address'
  , Min(CASE WHEN q.question_name = 'Subject' THEN a.answer END) as 'Subject'
  , Min(CASE WHEN q.question_name = 'Message' THEN a.answer END) as 'Message'
from completed_forms cf
inner join questions q
  on cf.form_id = q.form_id
inner join answers a
  on cf.complete_id = a.complete_id
  and q.question_id = a.question_id
where cf.form_id = 1
group by cf.complete_id

Form 2 (See SQL Fiddle with Demo):
select cf.complete_id
  , cf.ts
  , Min(CASE WHEN q.question_name = 'Your Name' THEN a.answer END) as 'Your Name'
  , Min(CASE WHEN q.question_name = 'Are you vegetarian?' THEN a.answer END) as 'Are you vegetarian?'
  , Min(CASE WHEN q.question_name = 'Beer or Wine' THEN a.answer END) as 'Beer or Wine'
from completed_forms cf
inner join questions q
  on cf.form_id = q.form_id
inner join answers a
  on cf.complete_id = a.complete_id
  and q.question_id = a.question_id
where cf.form_id = 2
group by cf.complete_id

Now since your questions are going to change for each form, then you should look at automating the Pivot. I suggest reviewing the article located here:
http://www.artfulsoftware.com/infotree/queries.php#523
It contains examples of how to use a pivot in MySql.  There are also other answers on StackOverflow that should be able to help with writing this dynamically:
mysql query to dynamically convert row data to columns
MySQL pivot table with dynamic headers based on single column data
Answer: Nice normalized schema!
Doing this in pure SQL is very hard, because you need to create queries that have column-name aliases that come from rows in your questions.question_name.
If you were doing it in pure SQL, you'd be writing SQL statements that would somehow write SQL statements for each distinct value of form_id.  That leads to some unmaintainable monkey business in your SQL code.  It would completely blow away the work you've done to be able to handle multiple forms easily in terms of your long term costs.
This is far easier to do in PHP, PERL, Java or some other language that does a decent job with manipulating lists of strings.
PostgreSQL and Oracle let you write stored procedures in languages like Java and/or PERL. That might be the way to go if you must have this code resident in your DBMS.


Does a slow moving object fall faster than a fast falling object?

Question: If I have understood it correctly, air resistance is proportioal to the squared speed of an object, meaning that the faster the object is going the more affected by air resistance it is ( which must mean it slows down?) Does this mean that a slow moving object will technically fall faster than a fast falling object? Would this mean that the lower the initial velocity the faster the object will go and vice versa? I am really confused.
Comment: What it means is that for most rigid objects, as the object falls through air,\* its speed approaches a constant [_terminal velocity_](https://en.wikipedia.org/wiki/Terminal_velocity). [\* Same principle works for objects falling through other fluids besides air.]
Comment: "which must mean it slows down?" - no, it means that its speed increases more and more slowly (a falling object accelerates as it falls, but the acceleration drops off due to drag, as Solomon Slow described above.)
Answer: Velocity is not the only factor that determines the drag force. Area of cross section, for example, is another factor affecting the magnitude of drag.
If everything else is same except the velocity, drag will in general be higher for higher velocities. Because other things are same, higher drag will cause higher deceleration. So speed will reduce at faster rate when the speed is higher.
Things, however, can be more complicated than above. For example, drag is not always proportional to the square of speed. It is in general at relatively higher speeds. At relatively lower speeds, drag tends to be proportional to the speed.
Answer:
Does this mean that a slow moving object will technically fall faster than a fast falling object?

No, one body can experience bigger resistance but have still bigger velocity, it's just different values. Resistance of air is the force acting on a body, velocity is velocity. The force is responsible for changing of velocity, that means initially velocities can be random, but the body experiencing bigger resistance (minus weight force) will change it's velocity faster, before both velocities won't equalize.
You have to also consider the weight force, acting against air resistance and it's also different for different bodies, but if you will compare the same bodies with equal weight, then the logic (bigger resistance -> faster speed reducing) is working.
Answer:
Does this mean that a slow moving object will technically fall faster
than a fast falling object?

I'm assuming by "fall faster" you are referring the rate of loss of altitude, i.e., the downward acceleration of the object. The downward acceleration of each object will depend on the net force acting on each object. That, in turn, will depend on two forces: Gravity and Drag. In order to answer your question we need to limit the number of variables involved with these two forces.
First, in order for the force of gravity to be the same, the objects need to have the same mass $m$. We will make the further assumption that at the time of comparison each object is at the same height above, and close enough to, the surface of the earth so that the acceleration due to gravity is constant during the remainder of the fall and is 9.8 m/s$^{2}$
Next, since the drag force is proportional to the velocity at slow speeds and the velocity squared at high speeds, we will need to assume one or the other. In order to apply the following equation for the drag force we will assume the high speed model:
$$F_{D}=\frac{1}{2}\rho v^{2}C_{D}A$$
where
$\rho$ = the density of the air (which will be the same at the same height, which we stipulated above)
$v$ = the speed of the object
$C_D$ = the drag coefficient
$A$ = cross sectional area projected in the direction of motion
In order to compare the drag force on each based only on their speeds (how fast they are moving) we will assume $A$ and $C_D$ are the same for both objects.
The net downward force acting on each is then
$$F_{net}=mg-\frac{1}{2}\rho v^{2}C_{D}A$$
From the last equation we see that the net downward force acting on the slow moving object (having a lower value of $v$) is greater than the fast moving object (having a higher value of $v$). Then since the acceleration of each is $F_{net}/m$ and each has the same mass, the acceleration of the slower moving object is greater than the fast moving object. Finally, given enough time for both, the drag force on each object will equal the force of gravity for a net force of zero with each object attaining its constant terminal velocity.
Hope this helps.
Comment: This helped a lot, thank you!


ID flying insect found in Belgium

Question: I live in Belgium, and I've just witnessed a weird looking wasp/fly flying around in my room. Here's a picture:

So, what's this? It's still in my room, just chilling there. It zooms like a wasp, and flies VERY FAST. You can see white vertical stripes on his upper body, and then golden vertical patches. I couldn't get the camera to focus, so it's not really full-hd.
[Edit (better picture)]
Comment: Welcome to Biology.SE. You should add a descriptive of the size (or an object for size reference on the picture).
Comment: I have to disagree.  Horseflies are in the Tabanidae family, and I really suspect this is a hoverfly (the Syrphidae family).  Please see my answer below.
Answer: This is a hoverfly! Specifically in the genus Helophilus.  A lot of species of hoverflies exhibit Batesian mimicry of wasps/bees, as we see here, while they mainly feed on pollen and nectar.  So please, don't worry about it trying to bite you.
As far as species go, I think it is probably a Helophilus trivittatus.  I am basing that on location and a lot on the banding patterns on the thorax as well as the markings on the prominent terga.  Here is a picture below for you to compare.
Answer: It looks like a horse-fly

What is a horsfly?
Horse-flies (Tabanidae) represent a family in the order of Diptera that are distributed world-wide. They are large flies that fly quickly. Adults feed on nectar while females feed on mammals blood (including humans). When they sting, it hurts much more than a mosquito! You probably want to get rid of it before going to bed!
Wasps (Hymenoptera) vs flies
You thought about a wasp because you saw a pseudo-pattern of yellow bands on the abdomen I suppose. It is actually easy to tell it is a fly (Diptera) because (1) it has only two wings, (2) it has very big eye and (3) Hymenopterans have a thin waist while diptera don't. Another noticeable trait that should make you think of a horsefly is that it flies very fast. Note by the way that hoverflies have a very distinctive pattern of black and yellow bands but are flies and don't sting.
What species?
I don't know! But someone on this website will probably be able to find out.
Comment: As the OP noted, horseflies can indeed fly very fast. Actually, they are the fastest flying insect on earth! The speed of the male horsefly is attributed to Jerry Butler, an entomologist at the University of Florida, who once got a male Hybomitra to chase a plastic pellet fired from an air rifle; "Which it caught in midair and dropped," Butler says. From the speed of the pellet, he calculated the fly was going at least 90 miles per hour (145 km/h) at the beginning of female pursuit.
Answer: It's not a wasp. Wasps have a thin waist.
It's a fly, and flies can indeed be fast.
I would not bet on Tabanidae, but on Sarcophagidae instead, because your fly looks less hairy than what I'm used to for horseflies, and because of the striped pattern on the thorax, but it may well be some other family.

ID flying insect found in Belgium


Pseudocubic unit cells: how to construct one?

Question: I keep coming across the term pseudocubic unit cell while reading about orthorhombic perovskite structures. No clear explanation is given in papers. Can someone please tell me how these structures are generated and what exactly is meant by them?
Answer: I personally think the introduction of the pseudo-cubic unit cell is for the purpose of better reflecting the phase transition. For example, when you have cubic to orthorhombic transition, you can say that the unit cell is still "cubic", with respect to the changing of the unit vectors length. Then if looking at the diffraction pattern, the original degenerate peaks corresponding to certain cubic reflections now split. The reason is simple since originally the repetition of atoms in each direction (e.g. along a, b and c) is identical for cubic structure. Now when we have the orthorhombic structure, still we have the repetition of atoms along the a, b and c directions but with different repetition distances (d-spacing). So now we have similar pattern of atoms repetition but with different d-spacings. Projected onto the diffraction pattern, we see the splitting of the originally degenerate peaks. Therefore the "cubic" in pseudo-cubic stresses the "similar pattern" and "pseudo" stresses the different d-spacing (which corresponds to the splitting of diffraction peaks). If the distortion of the structure is not that big, the splitting should not be that obvious as well, and that's exactly what it is meant by "pseudo" - they are nearly identical, but not yet, still some difference there.
As for the construction of the pseudo-cubic unit cell, I think the orthorhombic unit cell is just a pseudo-cobic one, if I understand it correctly. But I am not sure on that.
At last, I found a paper which does mention the construction of the pseudo-cobic cell from the monoclinic unit cell. Maybe irrelevant to the post, but I will put it here for reference:
Crystals 2014, 4, 273-295; doi:10.3390/cryst4030273


What are the inputs to a logistic regression? Probability or trial result?

Question: It is a very basic question, but cannot find a satisfactory answer to. When we do logistic regression, what are the inputs? Suppose we have a dataset of students giving number of hours each student spent studying, and the end result of whether they passed or failed. The wikipedia article on LR goes to do a fitting with the logistic curve based on probability as a function of number of hours. But how do I get the probabilities if all I have is whether they passed or failed?
Comment: The inputs are the independent variables and the weights assigned to it which are fed into a sigmoid function that returns probabilities.
Comment: @SmallChess No I am not. Neural Networks make use of the same sigmoid function.
Answer:
From Wiki: The graph shows the probability of passing the exam versus the number of hours studying, with the logistic regression curve fitted to the data.

The probability curve is the output of the LR, not the input. Typically during training, the output class (or target class) will be discrete class labels with 1 or 0. During inferencing, the output will be a continuous value between 0 and 1. To generate the probability curve, just feed in different values of "hours studying" into the trained model.
Answer: I think this is your question:

Q1: What to give to logistic regression?

and

Q2: I just want to predict whether a student pass or not, I don't care about anything else?

Q1:
Logistic regression is able to handle categorical and continuous variables. In your example, number of hours for each student in your training set is your inputs. Of course, you'll also need a binary response variable (pass or failed).
Q2:
Logistic regression is not a classifier, the model gives you fitted probabilities conditional to the number of hours. You can set a threshold to your model (many posts exist, please search). Or you can apply a classifier such as linear discriminant analysis and many others.


DLL creating a connection fails with "An existing connection was forcibly closed by the remote host"

Question: I have created a DLL [made available as a NuGet package (.NetStandard 2.0/2.1)].
When a particular class in this DLL is instantiated, we fire an synchronous GET call to a .Net Core WebAPI installed on IIS on my local machine (localhost) to load some configuration data.
This DLL makes use of a singleton HttpClient (we've following Microsoft's 'best practices' here)
Factory.SingletonHttpClient().GetAsync(args.Uri).GetAwaiter().GetResult();

I've consumed this NuGet package in a whole series of applications, all built using .Net Framework 4.7.2 and they work just fine - the data is successfully retrieved from the WebAPI.
However....I have one particular application (again, 4.7.2) where the GET consistently fails with the error message:

System.Net.Sockets.SocketException   HResult=0x80004005   Message=An
  existing connection was forcibly closed by the remote host
This exception was originally thrown at this call stack:
      System.Net.Sockets.Socket.BeginReceive(byte[], int, int, System.Net.Sockets.SocketFlags, System.AsyncCallback, object)

So this has to be something specific to my application that consumes this NuGet package since it works for all other consuming applications.  However, I can't see how to figure out what the problem might be.
Answer: So I found the answer, but I'm confused by it.
I'm using the latest version of Windows 10 (version 1909).
All my applications are using .Net 4.7.2
So when I debug all these .NET 4.7.2 applications on my machine, they all make the call to the WebAPI on my IIS LocalHost, except this one application.
When I look at the ServicePointManager.SecurityProtocol in this failing application, I see it's running with the obsolete values of SSL and TLS.  Why would this be the case for this application but not the others?  It's not stipulated anywhere to use these obsolete protocols, so why is this using them but not the other applications?
I fixed this by amending my NuGet DLL to add TLS1.2 to whatever TLS versions are being used:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | ServicePointManager.SecurityProtocol;


When I connect to my VPN my proxy settings do not work

Question: Just as the title says. I have PlexVPN, when I connect to my VPN the proxy settings don't work and I cannot connect to the internet. I can't use chrome or any other application and I am lost why. It says "The remote device or resource won't accept the connection" it tells me to change my proxy settings and turn off the proxy server, when I do it still does not work. Any help would be appreciated!
Comment: The proxy might not work inside the VPN. If the VPN doesn't work without the proxy, then there is a problem with it, and you could address its support.
Answer: What do you mean your proxy settings? If youre reffering to the app itself then im not sure if i can help, but just to make it clear vpns are not the same as proxy, so if you configured it manually, theres going to be different settings for it i believe.
If you cant get it to work you could try PureVPN since theres an 88% Off on it for New Years.


Replace newlines in multiline input with "\n"

Question: I've been trying to do some work with generating SQL commands with an interactive bash script and have a multiline string that I need to escape for use with MySQL.
Notes has already been defined as a multi-line string.
notes=$(echo "$notes" | php -r 'echo mysql_escape_string(fgets(STDIN));');

However, only one line is being returned. How can I get my multiline string properly escaped and returned?
Answer: Use pattern substitution:
notes=${notes//$'\n'/\\n}


What happened to the Master's blue laser powers?

Question: What happened to the Master's blue laser powers and why doesn't (s)he have them in the Peter Capaldi episode with Missy?
Comment: Do you mean where you could see his skeleton when using them? We know that the Doctor got a whole new set of regenerations from the Time Lords. AFAIK we don't know what regeneration the Master was on. It's possible that she was given a whole new set of regeneration as well
Answer: The Master did not normally have such powers. As a Timelord, he has broadly the same abilities as The Doctor.
The "blue laser powers" you are referring to, as seen in the story 'The End of Time', were a result of a supernatural ritual meant to restore his life, but went wrong after it was sabotaged by Lucy Saxon. The life-force that he took from several humans, presumably meant to restore multiple lifetimes to him, was burning up much faster than it should have. When The Doctor saw a demonstration of these new abilities, he warned the Master that this would be to his detriment:

DOCTOR: Please, let me help. You're burning up your own life force.

Evidently, the "lasers" we see shooting from his arms, which he used as a weapon and also to enable him to fly, was his own life force.
At the end of the story, the Master disappeared along with the other Timelords back through the portal they had opened, thus returning to the time-locked Time War. It is later stated in The Doctor Falls that the Timelords "cured" him, evidently resurrecting him and giving him a new regeneration cycle just as they had previously done during the time war.
Comment: "*Quite a throwaway line for such a major plot element.*" - welcome to Moffat Who :-)
Comment: No need to assume - it's specifically stated in The Doctor Falls that once he disappeared with the other Time Lords through the portal, they cured him and kicked him out.
Comment: @ElibE876 Thanks, I'd forgotten that. Quite a throwaway line for such a major plot element. Updated answer.


Design of second order low pass filter using passive RC components and opamp

Question: I have an RC low pass filter connected to the non inverting terminal of the opamp. There is a feedback resistor from output of opamp to its inverting pin.Then an RC low pass filter is placed at the output of the opamp. So while designing the filter,should I consider these two low pass filter together as a second order filter and design or consider each RC low pass filter separately and design the filter.Which is correct to get the desired response?
Comment: You should learn that filters have group delay , the derivative of phase shift and most are non-linear except some.  So start with band pass characteristics -3dB , Phase response and Gain and available GBW  limits . ALWAYS start with specs,   then add more like Bandstop rejection, Q,  component tolerance, gain error, linear phase, maximally flat, zero overshoot
Answer: You have your sallen-key topology wrong. Even if it was correct, I don't like the circuit because attaching a load will mess with the transfer function. Ideally your load attaches to the output of the op-amp or a buffered node, as then attached loads will not draw current from the filter but the op-amp itself, preserving the filter's characteristics.

simulate this circuit – Schematic created using CircuitLab
^ Sallen-Key two pole low-pass.

To answer your question, for the sallen-key you need to analyze as a whole (or look up TF, it's somewhat complex). If you used buffered RC/Active Lowpass, it would be each TF multiplied, as the op-amp will provide the current.
Answer: U1 completely buffers the two RC stages from each other. This means you can calculate their frequency responses independently, and simply multiply the responses together.
This is not the ideal way to make a 2nd order filter, it will have a very 'soggy' response around the cuttoff frequency, which most people don't want. While technically it is a 2nd order filter, most people would refer to it as 'two cascaded first order filters'.
For a better approximation to a flat passband, followed by a steep rolloff, design a proper 2nd order filter, using the opamp as part of the filter.
Sallen Key is a reasonable topology, there are many cookbooks available on the net to help you design one. Bear in mind that a SK lowpass filter fails in the stopband at high frequencies when the opamp output impedance rises. Use a 3rd order Sallen Key, which uses the same single opamp, to mitigate (doesn't cure, but makes it easier to live with) this fault, and gives you more design freedom on the filter transition as well.
Answer: Deepa - it is correct that your circuit is a second-order lowpass.  However, as mentioned already, it is a rather bad one.
Two reasons: It works like a passive filter only with a "bad" amplitude response (two real poles) within the passband and it does not provide a low-resistive output which is insensible to any load.
I have mentioned the "poles". Note that we have various different second-order lowpass responses - and the most useful response is the so called "Butterworth" response which has a maximally flat amplitude response within the passband.
This filter type has not two real poles but two conjugate-complex poles and a quality factor Qp=0.7071 (in contrast, the quality factor of your circuit cannot be larger than 0.5). Such a Butterworth filter can be realized only as an "active filter" - for example based on the mentioned Sallen-Key topology (other filter structures are aslo possible).
In any "active" filter the amplifier is not used as a buffer only (as in your case) but it has a feedback network which is part of the filter function. However, calculation of the parts values based on a certain filter specuification is more involved...in most cases, we make use of formulas readily available in textbooks or other sources (internet).


Products in a subcategory

Question: Let $\mathcal{D}$ be a full subcategory of a category $\mathcal{C}$.
Let $X, Y$ be objects of $\mathcal{D}$.
Suppose a product $X\times Y$ exists in $\mathcal{C}$.
Suppose $X\times Y$ is not isomorphic to any object of $\mathcal{D}$.
Can we conclude that a product of $X$ and $Y$ does not exist in $\mathcal{D}$?
If not, any counter-example?
Comment: Taking C to be the category of finite abelian groups and D the subcat. of cyclic groups of prime order you can find an example,  I think.
Comment: Another quick example is for instance ${\cal D}=\textbf{Fields}$ and
${\cal C}=\textbf{CommRings}$. The product of two rings can never be a field,
but some products exist in the category of fields.
Answer: Two counter-examples: one quite well-known and important, and one more elementary.
The important example: compactly generated (Hausdorff) topological spaces (briefly, k-spaces).  The full subcategory of Top of these, kHaus, is a very nice category of spaces — better-behaved in many ways than Top itself.
Anyhow, the ordinary topological product of two k-spaces may not itself be a k-space; but it has an associated space (sometimes called its "k-ification") which, while not a product in Top, is a product in kHaus.
The more elementary example is with coproducts not products, but sticking "op" on the categories involved makes it an example with products.  Here, consider Abelian groups, AbGp, as a subcategory of all groups, Grp.  The coproduct of two groups $A, B$ in Gp is their free product $A \ast B$.  For Abelian $A$, $B$, the free product will usually not be Abelian: for instance, $\mathbb{Z} \ast \mathbb{Z}$ is the free group on two generators.  However, they do also have a coproduct in AbGp, given by $A \oplus B$.

There's a nice explanation for both these examples, and indeed for all the natural examples of this situation that I can think of.
Suppose D is a reflective subcategory of C, i.e. the inclusion functor has a left adjoint.  (The Abelianisation functor Gp $\to$ AbGp is a typical example.)  Then coproducts in D — more generally, any colimits — can be computed by taking the colimit in C and applying the reflector to the result.  So, for instance, $A \oplus B$ is the Abelianisation of $A \ast B$.  Checking that this recipe works whenever the colimits exist in C is a short diagram-chase — it's essentially the fact that left adjoints preserve colimits.
Dually, if D is co-reflective — the inclusion has a right adjoint — then products (and arbitrary limits) can be computed in a similar fashion.
Reflective and co-reflective categories arise very often in nature; so they give lots of good examples where the (co)product in the ambient category doesn't lie in the subcategory, but the subcategory has its own product nevertheless.
Answer: No. There's no reason for the inclusion of $D$ into $C$ to preserve products. Peter LeFanu Lumsdain has given some nice examples.
However, one situation in which the inclusion of $D$ into $C$ is guaranteed to preserve products is when it has a left adjoint (in which case the inclusion in fact preserves all limits). In this case, $D$ is said to be a reflective subcategory, and then the desired conclusion holds. For example:

Compact Hausdorff spaces are a reflective subcategory of topological spaces (the adjoint is Stone-Čech compactification).
Abelian groups are a reflective subcategory of groups (the adjoint is abelianization).
Sheaves are a reflective subcategory of presheaves (the adjoint is sheafification).

Products in a subcategory


Black shading appears in faces

Question: I'm Modelling a car in which i'm getting a black shading while in rendered mode.
i've tried deleting the faces but still im getting those black shades.
Comment: it doesn't look like a normal problem, maybe you've smoothed in the left panel and enabled the auto-smooth option in the Properties panel > Data > Normals. So either increase or decrease the angle value, it determines the angle under which the smoothing happens, or simply deactivate smooth shading? It depends on what you want actually
Comment: ThankYou..I'll try that@moonboots
Answer: Try the following solutions

Maybe just because of the Smooth Shading applied for a low poly 3D model: Your model is currently at a low poly stage so change it into high res model or remove smooth shading until you add in more details to the model(maybe at least till you add subsurfs).
Normals Issue: Try recalculating the normals -> enter edit mode and select all then press Ctrl+N key
Duplicate Vertices or edges issue: Enter into edit mode and select all, then press W key and click on Remove doubles

Black shading appears in faces


What is vector division?

Question: My question is:
We have addition, subtraction and muliplication of vectors. Why cannot we define vector division? What is division of vectors?
Comment: To prove that, and therewith to really explain why you cannot "have" something is in general very hard. Think of the trisection of an angle with ruler and compass. - By the way: If you define multiplication of two-dimensional vectors by imitating multiplication of complex numbers you **can** divide.
Comment: @Reader Cross products are well-defined only for vectors of 3 and 7 dimensions. There is a generalization of a cross product called the wedge product, but this is also not a "multiplication" of vectors in a sense analogous to multiplication of the reals.
Comment: What multiplication are you talking about? An inner product? Because that's not an operation over the vectors.
Comment: Division is the inverse of multiplication. If that inverse does not exist, then the statement "we have multiplication" may not be true in the sense you may be thinking.
Comment: I am thinking, that dot product and cross product are multiplications of vectors.
Comment: Dot product takes to vectors and gives a scalar, not a vector. So, in that case at least, it does not make sense to take about an inverse.
Comment: What about cross product?
Comment: Hamilton defined a quaternion as the quotient of two directed lines in a three-dimensional space.  That is a pretty direct definition of vector division.  See https://en.wikipedia.org/wiki/Quaternion for more info.
Comment: Just wanted to mention that https://en.m.wikipedia.org/wiki/Clifford_algebra is also a way to have 'vector' division.
Comment: Specifically https://en.m.wikipedia.org/wiki/Geometric_algebra.
Comment: What is the multiplication of vectors? There is a scalar product and a cross-product. None of them actually form a closed-form algebra. A lof of the work of Grassman was motivated by exactly this question.
Comment: Definitely worth reading [about Geometric Algebra](https://deferentialgeometry.org/papers/Doran,%20Lasenby%20-%20Geometric%20Algebra%20for%20Physicists%20(2003).pdf)
Comment: You [**really need to watch this video**](https://youtu.be/htYh-Tq7ZBI?si=-am7RpXHHB9cip49) which talks about vector multiplication and how it leads to geometric algebra.
Answer: As already mentioned in the comments you have two ways of "multiplying" vectors. You have the dot product and the cross product. However, the dot product isn't a product.
When you multiply two rational numbers, you get a rational number. When you multiply two matrices, you get a matrix. When you multiply two complex numbers, you get a complex number. So you would want your product to satisfy that the multiplication of two vectors gives a new vector. However, the dot product of two vectors gives a scalar (a number) and not a vector.
But you do have the cross product. The cross product of two (3 dimensional) vectors is indeed a new vector. So you actually have a product. It is still a bit of a strange product in that it is not commutative. $\vec{x}\times\vec{y}$ isn't the same as $\vec{y}\times\vec{x}$.
$\vec{x}\times\vec{y}$ = -$\vec{y}\times\vec{x}$
Now about division. If you have two real numbers $x$ and $y\neq 0$, we say that $\frac{x}{y} = z$ exactly when $x = yz$. So in that sense you could define a type of division of vectors.
However, again there are some problems with vectors. When we divide by a real number $y$, we can also consider this as multiplying by the inverse of $y$, that is, $y^{-1}$. The inverse of $y$ is that unique number $y^{-1}$ such that $yy^{-1} = 1$. The number $1$ is that "special" number that satisfies that $1x = x$ for all real numbers $x$. And you see that any (nonzero) number divided is $1$. The question is: what would the equivalent of $1$ be for vectors?
With vectors, you don't have such a "unit". There is no vector $\vec{1}$ such that the cross product of $\vec{1}$ with any other vector $\vec{x}$ is $\vec{x}$, that is, $\vec{1}\times \vec{x} = \vec{x}$.
So that is way we don't really have a division of vectors that "works" just like division of real numbers do.
Comment: Excellent answer! I want to add that the reason $\vec{1}\times \vec{x} = \vec{x}$ is not true is because the resulting vector by definition would be a vector perpendicular to the two vectors in the other side. you can't have $\vec{1}=\vec{1}$ such that the RHS vector is perpendicular to the vector on the LHS
Comment: In particular, if we take $\vec{c} = \vec{a} \times \vec{b}$ then we say, in simple presentations, that, "the cross  product gives a vector".  But, in more advanced treatments we see that $\vec{c}$ is another "kind" of vector, which transforms  differently under coordinate transforms.  Some people call $\vec{c}$ an "axial vector".  To really see what's going on we have to look at tensor character, which is complicated...  But anyway, if we could divide and say $\vec{a} = \vec{c}/\vec{b}$ we would have a strange equation where the two sides of the  equation transform differently.
Answer: You can define division of vectors, but as multiplication and division are related operations, you can only do so by choosing a definition of multiplication that allows it.
As has been pointed out, in vector algebra we typically just define the dot and cross products.  For two vectors $a$ and $b$, the dot product $a\cdot b$ tells us how much the two vectors are parallel.  The cross product $a \times b$ tells us how perpendicular the vectors are, and moreover, it tells us something about their relative orientation--about the plane that the two vectors lie in.  I submit to you without proof that the dot and cross products contain all the relevant information possible from two vectors.  In other words, if one knows $a$ and $a \cdot b$ and $a \times b$, then one can reconstruct $b$.
Indeed, the formula for doing so is something like
$$b = (a \cdot b) a/|a|^2 + (a \times b) \times a/|a|^2$$
It should be intuitive that $a/|a|^2$ somehow "undoes" these two products.  If there were a candidate for $a^{-1}$, then $a/|a|^2$ would be it.
But how can we go about this in a formalized way?  The answer is to define a new product, one that combines the properties of the dot and cross products into a single operation.  This operation is called the geometric product.
Let $e_1, e_2, \ldots, e_n$ be an orthonormal basis for $\mathbb R^n$.  The geometric product of vectors is defined as follows:
$$e_i e_j = \begin{cases} 1, & i = j \\ -e_j e_i, & i \neq j\end{cases}$$
When two basis vectors are the same and multiplied via the geometric product, the result is a scalar, and so we capture the behavior of the dot product.  When the two basis vectors are orthogonal, the result is antisymmetric, and we capture the behavior of the cross product.  It's important to note, though, that this antisymmetric part does not result in a vector--rather, it results in a new object we call a bivector.  Think of it as an oriented planar subspace, just as vectors are oriented line-like subspaces through $\mathbb R^n$.
The geometric product is linear on its arguments, so we can find the geometric product of $a$ and $b$ just by breaking them down into components.  Furthermore, the geometric product is associative, so we can find $ab$ and then multiply (on either the left or right) by another vector $c$, and so on.  For now, though, we can restrict ourselves to the case of two vectors.  The geometric product is often written as
$$ab = a \cdot b + a \wedge b$$
This wedge neatly avoids one problem with the cross product--it doesn't exist in dimensions outside of 3 or 7.  The wedge (which produces the bivector part mentioned earlier) does exist in any number of dimensions, though.
Now then, the geometric product admits multiplicative inverses (essentially, division).  See that $aa^{-1} = 1 \implies a^{-1} = a/a^2$, just as I observed before.  Because the geometric product is associative, it is meaningful to say that
$$a^{-1} a b = (a^{-1} a) b = \frac{1}{a^2}aab = \frac{a^2}{a^2} b = b$$
where on the other hand, associativity gives us the freedom to group the products differently, like so:
$$b=a^{-1} a b = a^{-1} (ab) = a^{-1} (a \cdot b + a \wedge b) = \frac{1}{a^2} [a(a \cdot b) + a (a \wedge b)]$$
which is just the geometric algebra form of the decomposition I wrote earlier.  Here, it follows just from the freedom to group products as one sees fit.  This is a powerful technique in geometric algebra, useful for proving many identities (even up to vector calculus and beyond).
All that aside, what is the product of two vectors then, under the geometric product?  It is a scalar and a bivector, as we've established.  One name for the set of such objects is spinors.  Spinors are useful for representing rotations, and indeed, the product $ab$ gives us a spinor corresponding to a rotation from $b$ into the direction of $a$.  In 2 dimensions, such spinors have only two components, and these correspond to complex numbers.  In 3 dimensions, such spinors have 4 components (1 scalar, 3 bivector--for the 3 planes of 3d space), and these spinors correspond to quaternions and so on.  Thus, the geometric product gives great insight into the nature of rotations and how they can be built from vectors.
Comment: Summary. We we want to divide the given vector $c$ with the given vector $a$, i.e. we are looking for the quotient $b=c/a$ for which $ba=c$. This can be done if the product $ba$ is the Clifford (or geometric) product. In this case, $b=c/a=ca^{-1}=ca/|a|^2$, since with this $b$,
$$ba = (ca/|a|^2)a = c|a|^2/|a|^2=c$$
Here the product $ca$ is

$$ca = c\cdot a + c\wedge a$$
which is generally not a vector, so neither is the quotient $b=c/a=ca/|a|^2$. Generally, the quotient of two vectors is a sum of a scalar and a bivector, just as the (Clifford) product of them.
Answer: The quotient of two vectors is a quaternion by definition. (The product of two vectors can also be regarded as a quaternion, according to the choice of a unit of space.) A quaternion is a relative factor between two vectors that acts respectively on the vector's two characteristics length and direction; through its tensor or modulus, the ratio of lengths taken as
a positive number; and the versor or radial quotient, the ratio of orientations in space, taken as being equal to an angle in a certain plane. The versor has analogues in the $+$ and $-$ signs of the real numbers, and in the argument or phase of the complex numbers; in space, a versor is described by three numbers: two to identify a point on the unit-sphere which is the axis of positive rotation, and one to identify the angle around that axis. (The angle is canonically taken to be positive and less than a straight angle, so the axis of positive rotation is reversed when the two vectors are exchanged in their plane.) The tensor and versor which describe a vector quotient together have four numbers in their specification (therefore a quaternion).
Two quaternions are multiplied or divided by multiplying or dividing their respective tensors and versors. A versor has a representation as a great circle arc, connecting the points where a sphere is pierced by the dividend and divisor rays going from its center; these arcs have the same condition for equality as vectors do, viz. equal magnitude, and parallel direction. But on a sphere, no two arcs are parallel unless they are part of the same great circle. So, the vector-arcs are compared or compounded by moving one end of each to the line of intersection of their two planes, then taking the third side of the spherical triangle as the arc to be the product or the quotient of the versors.
Answer: Given any vector $b$, you can find some nonzero $c,d$ with $b \cdot c=0$ and $b \times d=0$ (just take $c$ perpendicular to $b$, and $d$ parallel).
To say that $x=a / b$, where $/$ is a division operation that corresponds to dot product, should be equivalent to saying that $a = b \cdot x$. But if this is true, then also $a = b \cdot (x+c)$ where $b \cdot c=0$, so we should also say that $x+c=a/b$. That is, "dot-product division" is never uniquely defined, no matter the choice of $a$ and $b$. So it's not really a useful concept. Similar remarks apply to "cross-product division" — just replace $c$ by $d$.
On the other hand, there is (sort of) a definition of vector division based on scalar multiplication: if $a$ and $b$ are parallel vectors, then you can divide $a$ by $b$ to get a real number. Of course, this isn't defined for general pairs of vectors. But it is unique whenever it exists, which means it's occasionally a useful concept...
Answer: Let vector $A = 2i+4j+8k$ and vector B is unknown but the cross product $C= 4i+6j=16k$
Let $B=xi+yj+zk$
$(2i+4j+8k)(xi+yj+zk)=4i+8j+16k$
$(4z-8y)i+(2z+8x)j+(2y-4x)k=4i+8j+16k $
$z-2y=1$  gives $z=1+2y$
$z+4x=4$ gives $2y+4x=3$
$y-2x=8$
On solving  those equations $y=\frac{19}{4}$, hence $x= -\frac{23}{8}$ and $z=\frac{21}{2}$ and vector $B= (-23/4)i+(19/4)j+(21/2)k$
Answer: One way to give a meaning to the division between vectors could be the following:
let $\vec{x}$ and $\vec{y}$ be two vectors of $R^n$, then finding the "division of two vectors $\vec{x}$ and $\vec{y}$" can mean finding all matrices A, such that:
$A\vec{x} = \vec{y}$
It is clear that in general the result will not be unique, but given a solution $A_1$ another solution $A_2$ can be found by adding $A_1$ with a certain matrix that has $x$ in its kernel, i.e.:
$(A_1-A_2)\vec{x}=0$.
So we could say that if $A\vec{x} = \vec{y}$, then $A$ belongs to the set $\vec{y}/\vec{x}$, i.e. : the "division of vector $\vec{y}$ by $\vec{x}$"
For example:
if $\vec{y}$ and $\vec{x}$ are collinear, the solution could be written:
as $y_k/x_k I+N_x$, where :

$y_k$ and $x_k$ are the $k$-th component for some k of $\vec{y}$, $\vec{x}$, respectively; because of collinearity the ratio is the same for any $k$;
$I$ is the identity matrix
$N$ are all matrices whose kernel contains $\vec{x}$.

In the two-dimensional case, assuming in the following example that the components $x_k$ are all non-zero, one can write:
$A_{11} x_1+A_{12} x_1=y_1$
$A_{21} x_1+A_{22} x_2=y_2$
this gives us two equations in 4 unknowns.
We can think of writing a particular solution like this:
$A_{11}=y_1/x_1, A_{22}=y_2/x_2, A_{12}=A_{21}=0$
i.e.:
$$A=\left[\begin{array}{cc}y_1/x_1&0\\0&{y_2/x_2}\end{array}\right] $$
which provides us with a particular solution to which to add the matrices, parameterized in the form (u,v are the parameters):
$$N=\left[\begin{array}{cc}u x_2&-y x_1\\v x_2&-v x_1\end{array}\right] $$
We can easily see that :$N\vec{x}=0$
Therefore in $R^2$ the solution $\vec{y}/\vec{x}$, under the abovementioned hipothesys, can be parametrized as follows:
$$\vec{y}/\vec{x}=A(u,v)=\left[\begin{array}{cc}y_1/x_1&0\\0&{y_2/x_2}\end{array}\right]
+ \left[\begin{array}{cc}u x_2&-u x_1\\v x_2&-v x_1\end{array}\right]
$$
PS:
This concept seems linked with the "vector inversion" discussed here:
Inverse of a vector
Answer: The definition of a Vector space allows us to add two vectors, subtract two vectors, and multiply a vector by a scalar.
When it comes to multiplying two vectors you have the dot product and the cross product. However, the dot product gives a scalar as output.
This leaves us with the cross product whose result is a vector.
Still,the division of vectors cannot be defined  because of the uniqueness issue.
Let $\vec A,\vec B,\vec C$ be three vectors such that $$\vec A \times \vec B =\vec C$$
We want vector division $\frac {\vec C}{\vec A}$ so that
$$ \frac {\vec C}{\vec A}=\vec B $$
But Vectors other than $\vec B$ can be cross multiplied with $\vec A$ to obtain the same cross product.
Let $\vec V$ be any vector $ (\vec B \not=\vec V)$ such that $\vec B - \vec V  $ is parallel to $\vec A$.Therefore
$$
\vec A \times (\vec B - \vec V)=0
$$
$$\implies
\vec A \times \vec B-\vec A \times \vec V =0 \text{ (Distributive Law) }
$$
$$\implies
\vec A \times \vec B=\vec A \times \vec V=\vec C
$$
$$ \frac {\vec C}{\vec A}=\vec B \text{ or } \vec V \text{??}$$
So we cannot uniquely define vector division.
We can also see this algebraically in terms of components.
$\vec A$ and $\vec C$ are known and $\vec B$ is unknown.
Let
$$\vec A = a_1\hat i+a_2\hat j+a_3\hat k $$
$$\vec C= c_1\hat i+c_2\hat j+c_2\hat k $$
$$ \vec B = x\hat i + y\hat j + z\hat k $$
$\vec C$ is perpendicular to $\vec A $ and $\vec B$.
$$\vec A . \vec C = (a_1c_1+a_2c_2+a_3c_3) = 0 $$
$$
\vec A \times \vec B = (a_1\hat i+a_2\hat j+a_3\hat k)\times(x\hat i+y\hat j+z\hat k)= c_1\hat i+c_2\hat j+c_2\hat k
$$
$$ \implies \begin{vmatrix}
 \hat i & \hat j &\hat k \\
 a_1 & a_2 & a_3 \\
  x & y & z \end{vmatrix} =c_1\hat i+c_2\hat j+c_2\hat k
$$
$$
\implies (a_2z-a_3y)\hat i+(a_3x-a_1z)\hat j+(a_1y-a_2x)\hat k=c_1\hat i+c_2\hat j+c_2\hat k
$$

$a_2z-a_3y=c_1 \implies 0.x+(-a_3)y+a_2z=c_1 $

$a_3x-a_1z=c_2 \implies a_3x+0.y+(-a_1)z=c_2$

$a_1y-a_2x=c_3 \implies (-a_2)x+a_1y+0.z=c_3$

$$
D=\begin{vmatrix}
 0 & -a_3 & a_2 \\
 a_3 & 0 & -a_1 \\
 -a_2 & a_1 & 0\end{vmatrix}(\text {Determinant of a }3\times 3 \text { skew symmetric matrix})
 $$
$$=a_3(a_1a_2)-a_2(a_3a_1)=0$$
$$
D_x=\begin{vmatrix}
 c_1 & -a_3 & a_2 \\
 c_2 & 0 & -a_1 \\
 c_3 & a_1 & 0\end{vmatrix}=c_3(a_1a_3)-a_1(-c_1a_1-c_2a_2)$$
$$= a_1(a_1c_1+a_2c_2+a_3c_3)$$
$$=0$$
Similarly $$ D_y=a_2(a_1c_1+a_2c_2+a_3c_3)=0 $$
$$D_z=a_3(a_1c_1+a_2c_2+a_3c_3)=0$$
From Cramer's Rule  we know that this implies there are infinitely many solutions for $x , y \text{ and }  z$.Meaning $\vec B$ is not unique.Thus vector division cannot be defined.
Answer: $ a/b = D^{-1}.a $  , where D is the diagonal matrix with $ D_{ij} = \delta_{ij}b_i $.  This operation produces a vector whose entries are the divisions of the corresponding entries for a and b.
Answer: Introduction. There are very good answers and mine will only supplement them. About "inverse" of dot product, imagine you have $\vec a \cdot \vec b=c$ and you know $\vec b$ and $c$ and want to know what is $\vec a$. What this problem means? It means that you have parallelogram of known area witch lies on known vector and you need to determine other vector. It turns out that there are many such $\vec a$, so you have a set of vectors, more precisely a curve. Every curve can be expressed as vector function. Now we will try to find this vector function.
Derivations.

$\vec a \cdot \vec b=c$
$(a_x i+a_y j )\cdot (b_x i+b_y j)=c$
Let us call $a_x=x$ and $a_y=y$
$(x i+y j )\cdot (b_x i+b_y j)=c$
$x b_x+y b_y=c$
$y=\frac{c- x b_x}{b_y}$
$b_x= \vec b \cdot i$ and $b_y=\vec b \cdot j$
$y=\frac{c- x \vec b \cdot i}{\vec b \cdot j}$
Vector function of this function is:
$\vec a=x i+(\frac{c- x \vec b \cdot i}{\vec b \cdot j})j$
It is equivalent to:
$\vec a = x i+\left (\frac{c- x |b|cos(\alpha)}{|b| sin(\alpha)} \right)j$, where $\alpha=\angle(\vec a;\vec b)$

Summery. These derivations can be carried out in both directions so:
$\vec a \cdot \vec b=c$ is equivalent to $\vec a=x i+(\frac{c- x \vec b \cdot i}{\vec b \cdot j})j$ and it is equivalent to $\vec a = x i+\left (\frac{c- x |b|cos(\alpha)}{|b| sin(\alpha)} \right)j$, where $\alpha=\angle(\vec a;\vec b)$
Similar answer.
You can find similar answer about finding "inverse" of cross product here:
Finding $\vec b$ from $\vec a \times \vec b$ , $\vec a$ and $\alpha=\angle(\vec a;\vec b)$ using only vector algebra..
Comment: Although this answer is interesting, it doesn't talk about division between vectors, but between a scalar and a vector!
Answer: In three dimensions:
$$\cos \theta = \frac{\boldsymbol a \cdot \boldsymbol b}{|\boldsymbol a| |\boldsymbol b|}, \sin \theta = \frac{|\boldsymbol a \times \boldsymbol b|}{|\boldsymbol a| |\boldsymbol b|}$$
hence $\frac{|\boldsymbol a \times \boldsymbol b|}{\boldsymbol a \cdot \boldsymbol b}$, the magnitude of the cross product divided by the dot product is $\tan \theta$, where $\theta$ is the angle between the two vectors.

What is vector division?


Sharepoint 2010 Search Crawler

Question: what is the recommended architecture for Sharepoint Search? Is it important to have a separate server? we have crawler on same server and it is taking a lot of hours to complete a Full crawl, causing a performance issue. Is it standard practice to use a separate server just for crawling?
Answer: It depends on how much data it's indexing. If it's taking a few hours to complete, I'd recommend moving it to another server. Also, consider running the full indexer less frequently, and schedule it during a low point so it doesn't affect performance as much (i.e. 2am Saturday morning).
HTH
Comment: Thanks for your reply. Yes, crawling was taking a few hours to complete and it was set to run every night. I will follow your recommendations. Thanks!

Sharepoint 2010 Search Crawler


Where the VM files are stored on VMWare ESXi?

Question: Here is my situation right now,
I have a server in a datacenter with some VMs on it which I sold as VPS,
Right now the DataCenter has suspended my server because of hack attempt by one of my VMs.
They gave me an FTP account which points to the root of ESXi Server ( I can see etc,mnt,home) and asked me to backup my VMs so the wipe the server.
The problem is I don't know where my machines files are (VMDK files I suppose? ).
Please help me because my time before the server getting wiped is running out.
Thanks.
P.S: I only have FTP access, Nothing Else.
Comment: Are you 100% sure they gave you FTP access to the ESXi host, and not to one of the VMs on it? To my knowledge there is no built-in FTP server in ESXi, and I don't personally see a datacenter going to the trouble to upload/run static binaries on an ESXi install to provide this access.
Comment: FYI: Reselling virtual machines on ESXi is against the license agreement.
Comment: How exactly did the people at the DC give you access to your ESXi box? Did they login to ESXi? Did they boot it into a Linux live CD? What did they do?
Comment: When all this is said and done, try and sort out a backup plan/DRP before you get back into the VPS business.
Comment: @jlehtinen - you are correct
Comment: @JohnD: It's not actually selling, but sharing the server price with some colleagues, everyone has his own VM.
the dc is ovh, I don't actually know but it seems I've access to esx itself.
@t Aaron: Sure, but if I ever could get on my feet after this.
Answer: The default location is /vmfs/volumes/
From vmware documentation:
Determining the location of all your virtual machine files:
From the Command Line
To determine the location of all your virtual machine files from the command line:
Log into the VMware ESX/ESXi host as the root user.
For more information on VMware ESX Service Console, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807).
For more information on VMware ESXi Technical Support Mode, see Tech Support Mode for Emergency Support (1003677).
For more information on VMware ESXi 4.1 - 5.0 Technical Support Mode, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.0 (1017910).
Type vmware-cmd -l to list the location of the configuration files for the virtual machines registered on an ESX host.
Type vim-cmd vmsvc/getallvms to list the location of the configuration files for the virtual machines registered on an ESXi host.
Record the location of the .vmx file (configuration file) for the virtual machine you are troubleshooting. For example:
/vmfs/volumes/46b2f3eb-ced4c7d8-c1d2-111122223333/vm1/vm1.vmx

If the virtual machine is not registered on the ESX host and you want to search its configuration file, run this command and press Enter:
find / -name "*.vmx"

The results of step 4 list all virtual machine configuration files. Search the results for the name of a virtual machine file you are interested in locating. The results also list the path to the directory where these files are located.
By viewing the configuration file of a virtual machine you can tell where all of its associated files, including .vmdk files, are located. If a file is not in the same directory as the configuration file the complete path is shown in the configuration file. For example, a second hard disk may have an entry such as the one shown below:
scsi0:1.present = "true"
scsi0:1.fileName = "/vmfs/volumes/46b2f3ea-980a1c90-3333-00112233bb44/diskStore/secondHardDisk.vmdk"

Comment: Thanks for your answer,
please refer to the comment I have made above.
Comment: Sounds like it's not mounted. Which makes sense if you're in some sort of Live environment without native VMFS support. You will need a login shell in order to install the necessary tools, or have the Datacenter support assist you further.
Answer: They're in datastores, which are mounted under /vmfs/ in an ESXi server.
Comment: Try the nfs folder. If the esxi host was set up to use nfs they may be in there. Additionally is the server booted right now off of a live cd of some kind? If it is and the storage is remote from the esxi host the filesystem where the VM's are stored may not be visible.
Comment: Thanks for your answer,
But there's no such a directory at root.
bin
boot
dev
etc
home
lib
mnt
nfs
opt
power
proc
root
run
sbin
sys
tmp
usr
var
Comment: That's weird. Can you provide the output of this command? esxcli storage filesystem list
Comment: "I only have FTP access"
Comment: @NickPappin ESXi places NFS mounts in the /vmfs/volumes folder
Comment: @Sam That does not sound like an ESXi system that you've been given FTP access to.  Can you confirm with your provider what system that is?
Comment: @ShaneMadden I've made a ticket, but OVH is too slow in responding, it usually takes several days...
Answer: Without having more details it's hard to say how to access your vm files.  Being that the vendor has only provided FTP access, which may or may not have root access to the host, is a problem.  Based on my experience with VMWare there isn't a home directory or mnt directory on the root of the drive but this may be a difference between versions.
The answers from Shane and Gabriel regarding the path /vmfs is correct.  Under the /vmfs/volumes folders you should find your datastores that the host can access.  Again with FTP access this may not be visible as the vendor could have limited your access.  Chances are your VM isn't the only one on the host and they are limiting your security, or pointing you to another server for the FTP.  I'd contact the vendor to have them either export the files to an FTP location for you or find another method of connecting to the host.  As a side note, if they export the files for you make sure they at least get the .vmdk and the .vmx, not just the .vmdks.


Dropdown or drop-down

Question: In web programming we use drop-down lists, but I'm not sure about the correct grammar. Wikipedia says "drop-down" when most frameworks uses "dropdown". Which one is correct ?
Comment: Why do you think one is "correct" and the other not?
Comment: e-mail or email? log in or login? website or web site? All are grammatically correct. My only suggestion would be to pick one and stick to it consistently across the project.
Comment: Please show a couple of examples of dictionary entries, and state which other dictionaries you've tried. If alternative spellings (and this is about orthography, nothing to do with grammar as more narrowly defined on ELU) are given, you have a choice of correct alternatives.
Comment: Just remember that to use `drop-down` as an identifier in most programming languages would be a syntax error, so `dropdown` is a clear choice there and that then might flow over to written english.
Comment: You usually can't just concatenate words in English. But there seem to be lots of exceptions (doorknob, dropout, framework,...). I guess some of those words "grew together" over time and got established as independent terms. However, drop-down is actually an abbreviation for drop-down menu (just like pop-up for pop-up window) so it might be "drop-down", which is also how Cambridge dictionary spells it.
Answer: It just depends.
If you have discussions within the frameworks, you should use dropdown.
Otherwise, you probably should use drop-down for general grammar usage.
Comment: I imaging it's because DropDown would be the name of a class or some other structure, and in many languages '-' in invalid in a structure name. Framework documentation authors either are or are very close to the framework authors themselves. In any case Wikipedia has their own Manual of Style and an army of editors enforce it rigidly.
Comment: Every discussion takes place within something that could be called a framework, so it is not clear what role is played in this answer by the clause 'if you have discussions within the frameworks'.

Dropdown or drop-down


How to reliably get timestamp at which the system booted?

Question: I'm aware of the uptime command, but it returns seconds since booted, so if I just substract that number from current timestamp, in theory I can get a different result if second changes after I've read the uptime and current timestamp. uptime -s is what I want, but it is not available on centos (how is it calculated btw?). Can I just get ctime of /proc dir? This seems to give me the proper number, but I wonder if every linux system has /proc created on boot.
Comment: @terdon, UNIX timestamp
Comment: What format do you want? `HH:MM:SS`? Something else?
Comment: I know this question is old but we should define what someone expects by "reliable."  While I was developing [xcron](https://github.com/cubiclesoft/xcron), I discovered that OSes don't really maintain accurate boot times.  One would think that the boot timestamp value would be statically stored somewhere immutable.  However, many systems seem to drift their boot time by about 1 second for each day of uptime.  And some systems are even unreliable with being anywhere near reality for their boot time especially after they have been up for a few months.
Answer: First of all, crtime is tricky on Linux. That said, running something like
$ stat -c %z /proc/
2014-10-30 14:00:03.012000000 +0100

or
$ stat -c %Z /proc/
1414674003

is probably exactly what you need. The /proc file system is defined by the LFS standard and should be there for any Linux system as well as for most (all?) UNIXen.
Alternatively, assuming you don't really need seconds precision, but only need the timestamp to be correct, you can use who:
$ who -b
   system boot  2014-10-30 14:00

From man who:
       -b, --boot
              time of last system boot
You can convert that to seconds since the epoch using GNU date:
$ date -d "$(who -b | awk '{print $4,$3}' | tr - / )" +%s
1414674000

Comment: A minor caveat is that the boot time is determined from the RTC, or some default if lacking an RTC. This time is written to `utmp` (by init) as the "system boot" entry, and read by `who -b`. The system time might be wrong until well into the startup. `who -b` on my rPi says it booted in 1970, and another RTC-less ARM says 2008  ;-)
Answer: Another solution is /proc/stat's btime [1]:
$ cat /proc/stat | grep btime | awk '{print $2}'

Example output:
1583547431

This is a seconds-since-epoch timestamp.
[1] http://man7.org/linux/man-pages/man5/proc.5.html
Comment: This solution has the advantage of not being vulnerable to RTC (real-time-clock) issues (such as noted by mr.spuratic's comment on the other answer).
Answer: On macOS, /proc is unavailable, but /dev is. Here are some other options:
$ who -b
reboot   ~        Dec 17 18:45

$ stat -f %m /dev
1608227137

where -f %m specifies to show last modified time in "strftime(3) format".
$ stat -F /dev
dr-xr-xr-x 3 root wheel 4606 Dec 17 18:45:37 2020 /dev/

If GNU tools was installed (via Homebrew), these are also available:
$ gwho -b
         system boot  2020-12-17 18:45

$ gstat -c %Y /dev
1608227137

where -c %Y specifies to show "time of last data modification, seconds since Epoch".
$ gstat -c %y /dev
2020-12-17 18:45:37.000000000 +0100

%y human readable instead.
Comment: Given that `/dev` is found more pervasively than `/proc` on UNIX and UNIX-like systems, I would submit that this is the best and most portable answer. Beware though, that `who` does not specify a year, nor indicate whether the time is UTC or local.
Comment: Unfortunately, using the last modified timestamp of `/dev` is unreliable.  I've got a system that has an actual boot date of Oct 19 but a last modified date of Oct 21 for `/dev` (i.e. a two day discrepancy).  The creation timestamp is either empty or the same as the last modified timestamp depending on the kernel in use.
Comment: @JimL. Historically, `/dev` was just an ordinary directory on the root filesystem, and so its timestamps would reflect the time the system was installed (or last configured), nothing to do with last boot. Over the last 20 years or so, many systems (including macOS and most Linux distributions) have turned `/dev` into an in-memory filesystem, so its creation time should be the most recent boot. (Last modified, however, may be more recent, if devices are added/removed after boot). So, this is not really that portable, on many old/obscure Unix(-like)s it will give a completely wrong answer
Answer: The above solutions only work on computers with an RTC. On a Raspberry Pi and other embedded systems without an RTC, the system will have the reference timestamp set to 0 when the system directory structure is created.
Since it is Linux we're talking about here, read the info from /proc/uptime
cat /proc/uptime | awk '{ print $1 }'


Is there a constant/baseline for how fast time passes?

Question: Say we have an object completely unaffected by the effects of gravity/velocity.  Is there a way to measure the passing of time for this object?  Since time moves slightly slower for us on or near bodies of mass & with movement/changes in velocity, is there a reference point or baseline for the movement of time?
Comment: "Completely oblivious" is not a useful term in physics. Do we have a false theory in which time is independent of gravity and observer movement? Absolutely. It's called "classical mechanics".
Comment: I meant this in a purely conceptual/theoretical fashion, so would "unaffected by" work better?  How exactly do you mean it's not useful?  Also think I now basically understand the difference between classical and relativistic mechanics.
Comment: Time is what the clock shows. What you are talking about are the false predictions of different theories for what the clock should be showing but doesn't.
Answer: In relativity there is no standard-clock that tells you which time is "right". That's the point about relativity. There is no need for a absolute reference to compare with. Everything is just the way you observe it (that is, relative to you). Things may slightly differ from observer to observer but the qualitative behaviour stays the same just as classical mechanics stays the same when you "look at it" from different directions (that is under a static rotation).
You may introduce something like inertial frames for which the effects of gravity are absent, however, this should be regarded as a histroical approach, because all we measure is in an approximately inertial frame. If we wouldn't be restricted to our planets surface we might have gotten the general covariant equations beforehand and have never introduced something like inertial frames.
Comment: That's a great answer marcel and I'd vote it but I don't have any rep :(
Answer: There is no reference object that transcends all inertial frames of reference.  Everything in this universe has an inertial frame of reference, and none of them are privileged.  If there were any object that existed independently of the relativistic effects of acceleration/gravity or of observer movement, then theoretically it could provide a reference to which clocks could be set.  However, no such object has been found in this universe.
The speed of light in a vacuum is independent of gravity and observer movement, but it doesn't provide pulsations to which clocks may be synchronized, and it is a scalar quantity rather than an object.
Comment: That makes sense, so this object would be completely theoretical as no such thing has ever been observed.
Comment: @Greg Olsen:  It would fit with classical mechanics.  We "observe" such theoretical behavior if we stick to speeds much slower than relativistic speeds, and if we don't consider the effect of acceleration and gravity on time.
Answer: As the other answers point out, there is no "right" or "absolute" frame of reference for measuring time. But that does not answer your question:

Is there a way to measure the passing of time for this object?

It turns out there is. Oscillations in the orbits of electrons depend only on the material, and in fact our clocks measure the passing of time by counting the oscillations of particular kind of atoms. So, if you knew what material the object was, and were able to measure the oscillations in its atoms, you could in principle be able to measure the time passing in the neighbourhood of the object.
But definitely, the rate you would observe from the lab would depend by the relative speeds, and positions wrt gravitiational objects etc just as given by relativity.


Conservation of kinetic energy in collision

Question: Why is kinetic energy conserved in collision between glass balls while it is not conserved in collision between a ball and floor?
Comment: @pdforgeek: Imagine a very slow collision of an object with a carpet, where only one or a few fibers are being bent by a very small amount (we neglect air resistance for the purpose of this argument). I think it is fair to say, that in such a scenario each fiber could act as an elastic spring, so the collision would be mostly elastic. In case of the glass, once the glass breaks, the energy necessary to separate the electrostatic bonds between the atoms in the glass would have to come out of the kinetic energy, so the collision would be inelastic. Is this helpful?
Comment: Kinetic energy isn't conserved in collisions between glass balls, either, the losses are just much smaller than in collisions involving a carpet for the velocity range that you are interested in. For very slow collisions even carpet will be nearly elastic and for faster collision (when the glass breaks), even glass balls will be highly inelastic.
Comment: @CuriousOne  Do you mean to say that collision with high velocity is inelastic and collision with less velocity is elastic? Also can you tell me if I am right or wrong regarding that kinetic energy isn't conserved in case of inelastic collision as due to high velocity they have high impact and energy is lost in deformation of body.
Answer: The difference is only in the properties of the material of a body. You can see in this video

If it is elastic (happy ball) it can deform itself (thus absorbing KE) and then recover the original shape, giving back roughly the same amount of KE, which is considered as temporarily stored in the lattices

If it is not elastic the body will stay deformed and the energy spent to deform it will never be recoverd. Another reason lays in the more difficult concept of hysteresis, which is  explained here for an elastic band. In the video you see that the sad ball is not visibly deformed because hysteresis is great work done is dissipated in heat
Answer: No, the elasticity of the collision depends on a couple of factors.
1) the properties of the materials. The carpet is easily deformable, and the fibers are not elastic, if one removes the ball that fell they return to their original form after some time, or, even don't return. So, the kinetic energy of the falling ball does the work of deforming the fibers.
The glass doesn't behave like that. It cannot be deformed (unless the kinetic energy is very high - see point 2), but if the  can be broken. Assume the case that the kinetic energy is not so high as to break the glass. Then, since there isn't an option that the kinetic energy transform in another form of energy, it is conserved.
2) the amount of kinetic energy at the contact between the two bodies. If the energy of the ball at the contact with the floor is much higher than the amount of energy needed to deform the fibers, then the fall on floor is almost an elastic process, the ball jumps back in the air.
As to the collision between two glass balls, for breaking the glass is needed an amount of energy sufficient for breaking the chemical bonds in the glass. I don't know the formula of the glass, it is not pure Silicon.
Answer: Energy is always conserved. In a collision between the ball and the floor, the ball looses some of the energy, that same amount is gained by the earth(supposing that the floor is attached to the earth). The amount of velocity gained by the earth, due to this collision, is very small(negligible) given its huge mass.


Dynamically change a suppression list based on characteristics in a DE

Question: I'm wondering if there is a way to create a suppression list that looks at data and adds or removes contacts to that suppression list based on whether a person meets that particular criteria at the time of send. Pardot does this through a dynamic list. Is there something similar for Marketing Cloud or does this have to be done through SQL?
Answer: You are looking for an Audience Exclusion Script. Essentially, there is the option in your interaction to add some ampscript logic that will exclude subscribers who are in the sendable DE that also meet the criteria outlined in the script.
Answer: does the send happen at predictable time intervals?
If so, you could:

Step 1: write a SQL query activity (if you have the technical knowledge) or a DESelect "selection" (if you prefer a UI and don't mind introducing a third party tool)
Step 2: create an automation and put the query / selection in it and schedule this so that the Data Extension is refreshed on an hourly/daily/... basis


Buy X Get Y for different products in a category

Question: I have an expresso store that we've set up with a "Buy x get y discount". But it's not working as expected as it only works if you buy multiples of the same product. This is not really useful, it needs to apply to all the products selected for that promo code.
Comment: I have built an extension that does exactly this. Let me know if you need any pointers.
Answer: This is the intended behavior of how that discount type works. If you go to the Discount Settings you will see a field called Matched On with the options of either Entry ID or SKU. This is what Store uses to match the particular product  to apply the discounts on. Think of it as buy 2 shovels get 50% off a 3rd shovel. This assumes you have set the Step Quantity at 2, Discount Quantity at 1 and Percent Discount at 50. If a user adds 6 of that item to the cart they will receive a discount on the 3rd and 6th of that item since the Discount Quantity is set to 1.
You will need to develop your own discount type or extend the current discount type for your use case. You can browse through the current discount logic in <code>/store/src/Adjuster/DiscountAdjuster.php</code> to get a starting point. Developing your own extension would probably be the best option as it gives you the most control and prevents Store updates from overwriting your changes. The adjustments hook would probably be the best option for you.