Formal Name of TXRX Communication

Question: Since I2C, SPI, etc all communicate bits in some serial fashion, is there an equivalent name to refer to the type of communication/protocol that occurs on the TX/RX pins (associated with UART) of a micro-controller other than "Serial" regardless of whether its voltages are TTL (3.3V,5.0V) level or RS-232?
Answer: The best answer is "TTL-Level RS-232-Style serial communications" Sometimes with additional specifiers (parity, no parity | 7/8/whatever bits per byte | 1/2/1.5 stop bits, etc...), but those options are defined in the standard..
RS-232, EIA-232 and TIA-232 are all the same protocol, in general. There may be minor differences in the specs, but they generally interoperate without issue. Mostly, it's just an issue of which standard body you're listening to.
In general parlance, "Serial", without additional specifiers is generally assumed to mean asynchronous serial with data patterning following the RS-232 standards, though the signaling levels can vary (generally either TTL or -12V - +12V).
Saying something goes through the UART tells you nothing, unless a specific UART on a specific chip is specified. There are UARTs out there that do all sorts of interesting, non-traditional-serial protocols.

Saying "UART Communications" is similar to saying "Vehicle Travel". Most people would probably think of a Car, until one guy shows up in a plane, the next guy a boat, and one random wacko in a giant hamster ball. They're all still vehicles, and as such all technically correct.
You should never make assumptions like that unless you know the person who says "UART" well enough to feel confident [s]he means what you think [s]he means.
Comment: @Chris Stratton: Actually none of the importand details come from the TIA-EIA-232F standard, I've just checked.  The TIA-EIA-232F (F is the latest revision published in 1997) standard talks about connectors, back channels, multiple channels, definitions of DTE and DCE, physical interface. Yes, it does cover timing, but is limited to 20kbps at upto 50m.  I'm not going to pay $150 for the whole standard just to prove a point.....
Comment: I don't think it makes any sense to reference the RS-232 standard. The standard specifies mark/space voltage levels, cable length vs. baud rate, driver impedance, and similar parameters that do not apply at all to a logic-level serial data stream. Using the term "TTL" also implies certain voltage levels that in fact need not be at traditional TTL levels.
Comment: I don't think EIA-232C/D etc (was RS-232) ever mentions the actual communications protocol, just the physical layer (cables, connectors, signal allocations, line lengths and drive levels) TTL is certainly not an EIA-232 physical layer.  The signal rise times and thus potential baudrates would depend on the actual electronics, cable construction and termintion. As these standards were set down many years ago they have serious deviated due to modern semiconductors and industry trends.
Comment: RS-232 is not +/-12V, is is +/-5V to +/-15V at the transmitter with +/-3V min at the receiver.
Comment: This is the correct answer.  The important details come from the RS-232 standard.  What is changed in this case is that we are talking about the signaling voltage and polarity not of the external cable, but rather that used used by logic devices inboard of line drivers/receivers such as the 1488/1489, their predecessors, or their successors such as the MAX232 style devices.
Comment: @Jason - the timing, ie, how the bits are encoded in the word, of the signaling comes from the 1962 predecessor of that standard.  The first IC UARTs would have been in the mid-late 1970's if not later.  In other words, you are mistaken.
Comment: @ChrisStratton - FWIW, I've actually been digging further, and I can't actually find where the bit-stuffing of async serial is actually specified. If you know of any documentation, I would be grateful. I always assumed (making an ass of myself) that it was tied into the RS-232 standards, but I can't actually get the entire standard myself.
Answer: The communications protocol used by UARTs is peculiar to UARTs, and so it is called "UART communication".
Comment: What? No it's not. "UART" isn't even a word, it's an acronym for the multiple communication modes the UART can be configured to use.
Comment: @ConnorWolf: From a practical perspective, the term "UART" more specifically conveys the type of communication than any other one- or two-syllable term (there exist other async formats such as Manchester coding, so the term "async" isn't as unambiguous).
Comment: @supercat - Saying "UART" tells you about nothing. It lets you establish that the communicaiton is asynchronous. I have some MCUs where the UART supports all sorts of weird encoding. 38 KHz infrared remote protocol? Yep. Quadrature Encoder? Yep. Hell, "UART" doesn't even tell you if it's a parallel or serial interface.
Comment: @ConnorWolf: There is one format of data which is used sufficiently with UARTs that *in the absence of any other qualifier* applying the term "UART" to a pair of pins implies that they use that format.  If a connection uses a fixed bit rate that was a power-of-two factor of 38400 or a power-of-two multiple of 57600, describing a connection as e.g. 38400-N-8-1 (pronounced "thirty-eight-four-en-eight-one") would be clear and concise, but if the baud rate does not itself suggest byte-framed asynchronous non-return-to-zero communication, I think "UART" does so clearly and concisely.
Comment: @supercat - I would agree that saying "UART comms", generally, **in a purely colloquial sense**, means asynchronous serial. However, using terms in their colloquial sense, particularly without *noting* that you're using it in it's colloquial sense, is a baaaaaad idea.
Comment: @ConnorWolf: Different situations require different degrees of formality.  I think my point was that usage of the term "UART" to refer to the signalling method typically used by UARTs, whether or not it's appropriate in formal writing, is concise and is apt to be understood.  Outside of formal contexts, those two factors are generally more important than pedantic correctness.
Answer: You almost have the answer in your question.  It's full title would be "Duplex serial UART Communications"
UART means "Universal Asyncronous Receiver Transmitter".
Duplex because it supports either alternating or simultanous data flow directions.
Sometimes an 'S' is added - USART - when synchronous protocols are also supported.  Some UARTs support more than one protocol over the same pair of pins depending on how they are configured. For example HDLC.
There are many synchchronous and asynchronous serial protocols, one of the most common is 8 Bits, No parity, one stop bit. (8N1)
As you correctly state in your question UART defines the data transport protocol, not the physical layer, the voltages or wires.  Your question specifically asks about the physical link or pins comparing them to similar pins that support other serial protocols.
There is some confusion about the use of the indusctry standards RS232 or ANSI/EIA/TIA-232 (or for that matter many other physical interfaces or higher level protocol specifications) All of which talk about the signals after the pins or the way the data is interpreted at a high level.
This citation states the UART was coined by IBM in the 1960s.
Comment: No, UART is the device which implements it, not the communication scheme itself.  That would be "Asynchronous Serial" or something even more specific as to the timing, bit order, etc - not the user-level details such as number of bits, presence of parity, or baud rate.
Comment: Don't post **false claims**.  Your citation does **not** say that IBM coined the term UART in the 1960s.  It's also a very amateur piece of a writing.
Comment: @Chris Strattion. This can't be true as I've written UART interfaces in VHDL, the 'device' was an FPGA, the interface is a UART with the external presentation as a pair of TxRx pins.  The UART implements Asynchronous Serial in both directions, duplex, as per my original answer.
Comment: You can chose to call what you implemented a UART, a data sheet writer at TI might choose to call it an SCI... but that is the name of the functional block, not the name of the protocol it implements.  Expand the acronym - universal asynchronous **receiver transmitter**.  Receivers and Transmitters are devices, not protocols. The protocol they happen to implement historically precedes someone combining that functionality into one chip, making it obvious that the protocol cannot be named after one particular take on the implementation, which only came later!
Comment: @JasonMorgan  I've written several UART's in VHDL and I agree with Chris.  The proper name of this type of protocol is "Asynchronous Serial".  This web page credits Gordon Bell at Digital Equipment Corporation for inventing the first UART:  http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter#History
Comment: @DavidKessner: The byte-framed non-return-to-zero format is the one most commonly associated with the term "asynchronous serial", but it is by no means the only asynchronous signalling method for the sequential transmission of bits.  USB, Ethernet, iButtons, etc. all use other forms of asynchronous signalling.

Formal Name of TXRX Communication


Central Limit Theorem for Truncated observations

Question: Consider a random variable $X$ with values in $\left[0,\infty\right)$ such that $E\left[X\right]=\infty$. Given $M > 0$ I want to estimate the expected value of $X$ truncated at $M$. That is I want to estimate
$\mu_M = E\left[X|X \le M\right]$. I observe a sequence $X_1, X_2, \ldots, X_n$, and then discard values greater than $M$, then compute the mean, essentially:
$$
\hat{\mu} = \frac{\sum_{1\le i \le n} I_{X_i \le M} X_i}{\sum_{1\le i \le n} I_{X_i \le M}}.
$$
Is $\hat{\mu}$ governed by a central limit theorem? Will it converge to $\mu$? How is the asymptotic variance of $\hat{\mu}$ affected by $n$ and $\mathcal{P}\left(X \le M\right)$?
Comment: Well, your truncated variables is restricted to $[0,M]$ so clearly have a finite variance, so the usual CLT applies.
Comment: So perhaps the convergence is $\sqrt{n \mathcal{P}\left(X \le M\right)} \left(\hat{\mu} - \mu_M\right) \sigma_M^{-1} \to \mathcal{N}\left(0,1\right)$?
Answer: Since you have truncated to a finite support, the variance of the truncated random variable must be finite, and so you can apply the classical central limit theorem to the parts that make up your estimator.  So yes, the asymptotic behaviour of the numerator and denominator in your expression are both governed by the central limit theorem.  As to convergence, the law-of-large numbers also applies, so yes, it will converge.  (Note that the LLN holds even in some cases with infinite variance.)
In this case the situation is complicated by the fact that the numerator and denominator in your expression are correlated random variables that are both asymptotically normal.  Below I will show you their asymptotic normal distributions useing the CLT.

Suppose we denote the "effective sample size" and "effective sample total" respectively by:
$$n_\text{eff}(\mathbf{x}_n) = \sum_{i=1}^n \mathbb{I}(x_i \leqslant M)
\quad \quad \quad
T(\mathbf{x}_n) = \sum_{i=1}^n x_i \cdot\mathbb{I}(x_i \leqslant M).$$
Let $\lambda = \mathbb{P}(X_i \leqslant M)$ denote the probability that an observation is with the trucation range, and define the conditional mean $\mu_M = \mathbb{E}(X_i|X_i \leqslant M)$ and conditional variance $\sigma_M^2 = \mathbb{V}(X_i|X_i \leqslant M)$.  To facilitate our analysis we take $Y_i = \mathbb{I}(X_i \leqslant M)$ and we note that:
$$\mathbb{E}(X_i Y_i | Y_i) = Y_i \cdot \mu_M
\quad \quad \quad
\mathbb{V}(X_i Y_i | Y_i)  = Y_i \cdot \sigma_M^2.$$
Thus, applying the law of iterated expectation and the law of iterated variance we have:
$$\begin{align}
\mathbb{E}(T(\mathbf{X}_n))
&= \sum_{i=1}^n \mathbb{E}(X_i Y_i) \\[6pt]
&= \sum_{i=1}^n \mathbb{E}(\mathbb{E}(X_i Y_i|Y_i)) \\[6pt]
&= \sum_{i=1}^n \mathbb{E}(Y_i \cdot \mu_M) \\[6pt]
&= \sum_{i=1}^n \lambda \mu_M \\[12pt]
&= n \lambda \mu_M, \\[12pt]
\mathbb{V}(T(\mathbf{X}_n))
&= \sum_{i=1}^n \mathbb{V}(X_i Y_i) \\[6pt]
&= \sum_{i=1}^n \Big[ \mathbb{E}(\mathbb{V}(X_i Y_i | Y_i)) + \mathbb{V}(\mathbb{E}(X_i Y_i | Y_i)) \Big] \\[6pt]
&= \sum_{i=1}^n \Big[ \mathbb{E}(Y_i \cdot \sigma_M^2) + \mathbb{V}(Y_i \cdot \mu_M) \Big] \\[6pt]
&= \sum_{i=1}^n \Big[ \lambda \sigma_M^2 + \lambda (1-\lambda) \mu_M^2 \Big] \\[12pt]
&= n \lambda (\sigma_M^2 + (1-\lambda) \mu_M^2). \\[12pt]
\end{align}$$
Consequently, we have:
$$\mathbb{E} \bigg( \frac{T(\mathbf{X}_n)}{n \lambda } \bigg) = \mu_M
\quad \quad \quad
\mathbb{V} \bigg( \frac{T(\mathbf{X}_n)}{n \lambda} \bigg) = \frac{\sigma_M^2 + (1-\lambda) \mu_M^2}{n \lambda}.$$
We can then form the standardised pivotal quantity and apply the central limit theorem to get:
$$\sqrt{n \lambda} \cdot \frac{T(\mathbf{X}_n)/n \lambda - \mu_M}{\sqrt{\sigma_M^2 + (1-\lambda) \mu_M^2}}
\overset{\text{Approx}}{\sim} \text{N}(0,1).$$
Undertaking similar calculations gives:
$$\mathbb{E} \bigg( \frac{n_\text{eff}(\mathbf{X}_n)}{n \lambda } \bigg) = 1
\quad \quad \quad
\mathbb{V} \bigg( \frac{n_\text{eff}(\mathbf{X}_n)}{n \lambda} \bigg) = \frac{1-\lambda}{n \lambda},$$
with the standardised pivotal quantity:
$$\sqrt{n \lambda} \cdot \frac{n_\text{eff}(\mathbf{X}_n)/n \lambda - 1}{\sqrt{1-\lambda}}
\overset{\text{Approx}}{\sim} \text{N}(0,1).$$
This gives the asymptotic distributions of the scaled numerator and denominator for $\hat{\mu}$.  The usual thing to do next would be to approximate the ratio by a T-distribution using an appropriate degrees-of-freedom.  One could go further by examining the correlation between these quantities and taking account of this in looking at the behaviour of the ratio.  In any case, the above shows how the CLT applies here.
Comment: This is really great. Would it be appropriate to apply the multivariate CLT to the vector of $n_{eff}$ and $T\left(X_n\right)$ then use the delta method to get the asymptotics of $\hat{\mu}$? I think I can figure out the covariance of those two quantities.
Comment: Yes, that would be reasonable.  It might be worth testing your results with simulations to see how good the resulting distributional approximation is, but in theory, that sounds okay.


Hydrogen atom and scale transformation for radial variable

Question: While solving Schrödinger equation for Hydrogen atom we make a scale transformation for radial variable ($r=\frac{ax}{Z}$; where $a=$ Bohr radius, $x=$ dimensionless variable and $Z=$ atomic number), this turns out to be a very good scale transformation. But my question is how do we know value of Bohr radius in advance, before solving Schrödinger equation? Do we just use Bohr radius that we got from Bohr theory? If we do use Bohr radius from Bohr theory then why is so because it is a classical theory?
Comment: It pops out from the [Buckingham-$\pi$ theorem](https://en.wikipedia.org/wiki/Buckingham_%CF%80_theorem).
Answer:
this turns out to be a very good scale transformation.

We don't really care that it's a good or bad choice.  We start by choosing a scale factor with just a symbol to move to dimensionless coordinates and follow the math through using it.  The physical problem is solved no matter what we choose (as long as it's not silly like zero).
We can at any point in going through the math (on this or any problem where we apply this technique) choose a value for the scale factor that is convenient and makes doing the math simpler.

But my question is how do we know value of Bohr radius in advance, before solving Schrödinger equation?

We don't.  We solve the problem and then we label the value as the Bohr radius.  That's what happened when Bohr's original model was published - it did not start out being called the "Bohr radius, it became that by convention.
For some problems the scale factor we end up with for mathematical convenience has a straight-forward physical interpretation (a radius, an orbital period, a reduced mass, etc.), but sometimes it's just a constant in the equation because that's how the mathematics works out.
Answer: Usually when transforming into dimensionless variables one looks at the relevant constants in the problem. For hydrogen atom we have the electron charge $e$,  electron mass $m_e$, Plank constant $\hbar$, permittivity of free space $\epsilon_0$
Then one does dimensional analysis to make scales based on the above constants. And the expression for length scale turns out to be
$$a_0=\frac{4\pi\epsilon_0\hbar^2}{e^2 {m_e}}$$
The extra $4\pi$ is part of the permittivity. And this is exactly the Bohr radius.
Comment: In the formula for $a_0$ it should be $m_e$, not $m_e^2$.
Comment: Yes, I thought of that but relevant constants in the problem which have dimensions are Epsilon, h, e, Me so dimensional analysis will give a distance without a factor of 4pi.we say that there should be 4pi because we know actual value of 4pi?right?
Comment: Yes. To get the exact Bohr radius it is relevant. But you get the order of magnitude of the lengthscale to a good estimate by this. Basically what's the domain of validity of the theory. Remaining (exact) value is determined out of the calculation as @StephenG pointed out in his answer.
Comment: Right! Thanks @Thomas


Set up a Screencast video in Drupal website

Question: I've set up a Drupal website and would like to have video box that pops up when a user clicks a picture graphic. Sounds simple enough, but it turns out it is not straightforward in the land of Drupal, flash, codecs, and iphone...
Here's what I'd like:

User clicks a link on my Drupal website, a video box player pops up as a mini-box player for the user to watch in a PC or Mac.
For iphone users, want the ability for them to view video on iPhone (which means it can't be flash).

Here's where I am so far. I recorded a screencast using both Camtasia for Mac and Screenflow. But I don't know which format to encode the video- or how to.
I've read that JW player (long tail video) is a good player because it will play both flash and HTML (good for iPhone), but then also read that Drupal and JWplayer does do a popup video window from a link. Is that true?
So before embarking further, I'd love some input on how to proceed? Which encoding format, how to achieve pop-up video player, and have ability to play on iPhone. Of course all through a Drupal site. Btw- I would be hosting the video on Vimeo, or Amazon's cloudfront.
Thanks!
Comment: This might be more appropriate for the new Drupal Stack Exchange site: http://drupal.stackexchange.com/
Answer: If you use the vimeo iframe code for embedding the video, you get iPhone playability for free.


How to install rkhunter in ubuntu?

Question: Ok I know the question sounds strange but I need help installing rkhunter the accurate way and do I need to follow all the steps in this article https://help.ubuntu.com/community/RKhunter?
Comment: if it is a bad question just delete it
Comment: rkhunter vs chkrootkit?
Answer: The package rkhunter is in the repos, so just
sudo apt-get install rkhunter

So is chkrootkit
sudo apt-get install chkrootkit

"rkhunter vs chkrootkit?" comparison from wikipedia

rkhunter

rkhunter (Rootkit Hunter) is a Unix-based tool that scans for
  rootkits, backdoors and possible local exploits. It does this by
  comparing SHA-1 hashes of important files with known good ones in
  online databases, searching for default directories (of rootkits),
  wrong permissions, hidden files, suspicious strings in kernel modules,
  and special tests for Linux and FreeBSD.
The tool has been written in Bourne shell, to allow for portability.
  It can run on almost all UNIX-derived systems.

chkrootkit

chkrootkit (Check Rootkit) is a common Unix-based program intended to
  help system administrators check their system for known rootkits. It
  is a shell script using common UNIX/Linux tools like the strings and
  grep commands to search core system programs for signatures and for
  comparing a traversal of the /proc filesystem with the output of the
  ps (process status) command to look for discrepancies.
It can be used from a "rescue disc" (typically a Live CD) or it can
  optionally use an alternative directory from which to run all of its
  own commands. These techniques allow chkrootkit to trust the commands
  upon which it depends a bit more.
There are inherent limitations to the reliability of any program that
  attempts to detect compromises (such as rootkits and computer
  viruses). Newer rootkits may specifically attempt to detect and
  compromise copies of the chkrootkit programs or take other measures to
  evade detection by them.
Comment: Wait what about this article https://help.ubuntu.com/community/RKhunter  do I need to do all that  stuff in the instructions.
Comment: Those are configuration options, do the ones you need, you can use `sudo rkhunter --propupd` to run it manually, when you want or add `APT_AUTOGEN="yes"` to `/etc/default/rkhunter` and it will auto run after software updater, the rest is just version check and hiding warnings, you don't need to do theses steps if the warnings don't bother you.
Comment: So that's optional.
Comment: Yes the bottom ha#lf of the page is just hiding the warnings, it does not matter if you hide them or not, your choice.

How to install rkhunter in ubuntu?


How do I calculate the centre of gravity on the lateral (transverse) y-axis?

Question: I have a real issue with determining the centre of gravity for the y axis of an aircraft, especially with selecting the reference/datum point and how to measure the displacement. Please I would really appreciate any form of help I can get.
Comment: Is this an academic exercise, or is there a real world reason why you need to do this?  Because in the real world it isn't important.  But if you have some reason it seems logical to me to use centerline as your datum.
Comment: To clarify my comment above in the context of John K' answer, i meant that it isn't important for loading cargo or passengers.  Fuel, however, is much more dense, and has a longer moment arm, so fuel imbalances will definitely affect roll control.
Answer: Transport airplanes have lateral C of G limits in terms of x distance from the centerline, but this only a certification requirement (related to roll authority in a critical case situation) and is only expressed for the flight crew as a fuel imbalance limit, fuel being the dominant factor, and is not accounted for in weight and balance data that the crew uses to determine if loading is correct.
The datum is the x=0 axis, with the C of G to the left, on, or right of it.  To calculate it, you would need an empty lateral C of G position, determined by weighing the airplane and working out the empty C of G offset to left or right of the x axis based on the weight difference between the left and right main gear weighing points, and the distance of those points from x.
Then you can add fuel and passengers and calculate the change if any to the lateral C of G. Since the passengers are normally randomly distributed on the left and right side of the cabin, the passengers can normally be considered neutral. Then it's only the effect of an unequal fuel load.
But as I said, for practical purposes, the fuel imbalance limits in the airplane's operating limitations account for the requirement to stay within maximum lateral C of G limits, and it's not necessary to calculate it.


A potentially dangerous Request.Form value was detected from the client

Question: I'm using ASP.NET MVC2 and what I did didn'T help me to get rid of this exception.
I put
<code>[ValidateInput(false)]
</code>
before the conntroller, changed web.config but again getting this exception. What I should do?
EDIT: I'm posting HTML values.
Answer: Maybe your form contains values that look like HTML such as brackets.
Please check this link: A potentially dangerous Request.Form value was detected from the client
Comment: I did everything on this question but didn't help me. And yes I'm posting a values look like HTML.


How do I install IIS management console?

Question: I just installed Windows 7 Enterprise along with some development tools.  I didn't see IIS  (the management console) anywhere in the start menu.  I went to Turn Windows Features On or Off and saw that indeed IIS was present.  Even http://localhost/ responded.  I even turned all IIS features off (uninstalled them) and back on (rebooting each time).  I still don't get IIS on my start menu.
I also tried just launching MMC and adding the IIS snap-in, but that too, is absent.
How can I manage the IIS on my box?
Answer: Doh!  I guess it's just an unchecked (and strangely non-default) feature: Internet Information Services -> Web Management Tools -> IIS Management Console.
I'd seen it before, but didn't think it was relevant as Web Management Tools suggests to me a web-based management interface.  Misnomer I guess.
Answer: Protip: Start -> Run -> inetmgr
Bonus points for WinKey+R !
Answer: Install the Internet Information Services (IIS 7) from the Web Platform Installer 3.0. link: http://www.microsoft.com/web/downloads/platform.aspx Then, you would be able to find out the IIS Manager from the Administration Tools.


Can I remove my lemon tree when it has fruit but is not growing well in a corner of the garden?

Question: I transplanted my lemon tree from a pot to the corner garden bed. Since then, it has a lot of flowers and has lots of lemons.
It is only just over a meter high but seems to be stagnated now, as the fruit has been the same size for a couple of months.
I water and feed it, but the fruit seems more like limes than the huge lemons it previously produced.
Comment: What part of the world are you in - this is very important to know? When did the fruits first start growing this year? Is it in a sunny position?
Comment: Good question; if could include an illustration & close illustration of leaves, the variety name of your Lemon Tree, current watering amount & frequency, how long it has been transplanted, soil type, previous nutrient type & amount and frequency, current nutrient type & amount and frequency, if there has been change in the typical daytime temperature and/or typical night time temperature, and if a change in amount & intensity of sun, could also be helpful. We encourage you to take the [Tour], and browse through the [Help], to learn more about how the site works! Thank you! Welcome to the site!
Answer: Soil for citrus trees should be slightly acid, not alkaline, but above all should be well drained. They don't like to have their feet wet, so if there is a risk that when you water the tree the water will sit around and flood the roots then the tree will demonstrate its unhappiness by not growing or shedding leaves. Quite possibly when you moved the tree from a well drained pot to a less well drained garden location you continued to water it as if it was still in the pot and consequently gave it more water than the soil was capable of dealing with. You can test this by driving a stick into the soil close to the tree and then pulling the stickout to leave a deep narrow hole, then use a dipstick to see how far down the water table is. Standing water at the bottom of the hole is a problem for the tree, which should be moved to a higher spot or watered much less frequently - whatever allows the roots to grow freely into soil which always has some water with lots of air.
Comment: Excellent & interesting answer; also, even if the tree's roots are above the water table, the tree could still be receiving more water than optimal if the watering regimen has remained the same but the new location retains water more than the container did. Thank you


iPhone screen pin layout

Question: I have an old iPhone of which I want to reuse the LCD display. The thing is, I don't want to use it as an actual display but rather make a fancy lamp out of it. The question I have is how I can figure out which pins I need to put current on to make the screen shine. The idea would be to just have it connected to a simple switch to turn it on and off.
Is there any way I should go about doing this?
Comment: Is the screen an LED backlight?
Answer: The screen would have a backlight.  You need to find the pins which power this part - no need to power the LCD in front of the backlight.
Here's an example of actually controlling the LCD, so it may also provide info on the backlight controls: https://www.youtube.com/watch?v=vCWGMM00ZEk
Do a quick search on "iphone screen pinout" and you will get lots of info.  Also you may have to input a PWM or other signal to adjust the backlight brightness.
Answer: The iPhone LCD pixel configuration (I think starting with iPhone 3G) is built normally black. If you just power the backlight (which you can do fairly easily) you will only get a slightly brighter black screen :-)
You somehow need to send data to the display controller to set the pixel voltages to their maximum value to get them to let the backlight through.
A quick search yielded this
It might be overkill for your application but there might be a simpler way to send white pixels. Maybe search for something like "MIPI DSI controller" since that is the data protocol the iPhone displays use.
On the other hand, I think some of the older iPods use normally white LCD displays. You may have better luck with those.
Finally, you can simply remove the backlight panel (plastic backing which is sometimes mirrored) from the back of the display which will reveal the LEDs and some diffuser films. These make cool lights.

iPhone screen pin layout


Does the Drake equation consider how far a planet must be from gamma ray bursters, black holes supernovae etc for life to survive?

Question: Can we use these dangerous phenomena to predict where life can't exist?
Comment: The Drake Equation doesn't explicitly consider anything that detailed. But you are free to use things like that in attempting to estimate some of its terms e.g., fractions of life-supporting planets that develop life, or fraction of the latter where life develops intelligence.
Comment: The Drake equation, as it currently stands, was never meant to be a definitive equation. It was meant to be used as a discussion point for a conference that Drake was attending.
Comment: Comments are for comments and answers are where answers go...
Answer: The Drake equation is a rough steady state model of the number of civilizations that can communicate at a typical time. There is no spatial model: it assumes an average over a large galaxy, so it will not tell you anything about where life may not exist. The way the danger shows up in the equation is the last term, how long a civilization remains able to communicate, and in the life/intelligence terms (a dangerous universe has low values for them).
You could imagine running the equation for local volumes with different parameters, but setting these parameters to depend on e.g. local supernova rate is most of the work anyway. It would only be a meaningful exercise if you think there are predictable patterns for how different terms change across space.
Answer:
Does the Drake equation consider how far a planet must be from gamma ray bursters, black holes supernovae etc for life to survive?

It never explictly says anything about it.

Can we use these dangerous phenomena to predict where life can't exist?

Not with the Drake equation. But absoultely. For example, we know for a fact no life could exist within the event horizon of a black hole (if it did it would be "sucked in" very quickly)
Answer: We don't have a quantifiable definition for "life".  All we generally say is that e.g. it's possible liquid water could exist in a region, but we can't even necessarily say that liquid water actually does exist there or that life (as we know it) would inevitably develop as a result.  We cannot say that life would or would not exist in other conditions without liquid water.
You can probably rule out life (again as we know it) existing in close proximity to certain objects, but even this isn't definitive because we don't have a definition of life that makes this certain.
The Drake equation is just a "back of the envelope" toy for discussion purposes.  It should not be taken as the basis for predicting life beyond that extremely limited purpose.


Cannot export texture correctly, because I scaled it

Question: OK, so I've been using the shader editor, to scale a texture, with the texture coordinates, vector mapping, and image texture nodes. But when I look at the uv editor, the texture looks the same. It is scaled on the model, but if I export it as fbx, it looks like the texture was never scaled, even if I embed the texture. How can I export the scaled texture?
Comment: Fbx format only supports very basic textures. See: https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-textures for a full explanation.
Comment: The _UV Editor_ shows the image texture, and the UV map is mapped onto it from bottom left (0, 0) to top right (1, 1). Everything you do with a _Mapping_ node in the _Shader Editor_ is a procedural post effect manipulating how the texture is placed on the UV map (or the other way round?), it is not changing the actual UV layout. FBX does not support most of the Blender specific nodes (like _Mapping_), so if you want to scale the texture for export you cannot do it procedurally, you have to change the actual layout in the _UV Editor_ so that it matches the desired result without _Mapping_ node.
Answer: As mentioned in my comment, the FBX format does not support many of Blender's nodes, in your specific case the way you manipulate the texture with a Texture Coordinate and Mapping node is lost when exported to FBX.
Looking at the UV Editor does not show the changes from the Mapping node, because as the node setup already suggests, the Texture Coordinate node outputs the UVs which are then manipulated afterwards with the Mapping node - the changed UVs are not written back into the UV map if you know what I mean. In this way, the Mapping is a procedural effect like a Subdivision Surface modifier, which does not actually change the original underlying mesh but only the visible appearance.
Now you might want to know what you can do get the same mapping of the original UV layout when you cannot use the Mapping node. This is quite easy when you have the values of the node.
In the following example I use a texture as bump map. Let's say I scaled the UV map by a factor of 3, moved it 0.2 m on X and 0.7 m on Y. Then the mapped UVs look like the cube on the left side, and the original UVs without any Mapping node look like the cube on the right side:

In order to make the right cube look like the left one first of all make sure the Pivot in the UV Editor is set to 2D Cursor and the cursor is in the bottom left corner (should be by default), to verify this you could open the sidebar with N and under View > 2D Cursor make sure Location X and Y are both set to 0.

Now you have to apply the values that are set in the Mapping node to the UV map. It is important to keep the correct order: 1. scale the UVs and 2. move the UVs.

Select them all with A if they are not already selected. To scale them by a factor of 3, press S3Return.

Now you can move them by the according values in X and Y direction by pressing GX0.2Return and GY0.7Return. And the result now looks exactly like the cube on the left.

If your mapping has different Scale values for X and Y you can of course scale them separately as well like you are moving X and Y separately, as long as scaling is done before moving.
Since a UV map is 2-dimensional, the Z component is not important for these operations. However, if you also rotated the UV on the Z axis with the Mapping node, you can replicate this in the UV Editor as well (and only Z rotation, since X and Y distorts the UV in 3D space which I do not know how to achieve in 2D).
The important part is, rotating also has to use the 2D cursor as pivot and most important: it has to be done before all the other translations. So it is 1. rotate, 2. scale, 3. move. And contrary to scaling and moving where you can use the same values as in the Mapping node, for the rotation you have to use multiply the angel by -1 to get the correct result. Here in the following example the Mapping node is set to a value of 45°, so in the UV Editor you have to rotate by -45° by pressing R-45Return:

Now you can go on like before scaling and then moving the UV map and the result on the right cube will again be the same as on the left cube:
Comment: If I may ask, does your example only support scaling down, to make it smaller, or will the uv editor make more texture if I scale it up.
Comment: @Geichelb3512 I do not know what you mean by "make more texture". The texture is a single image of a fixed size in pixels. Scaling the UV (larger or smaller) only determines how often the texture fits onto the object's faces and thus how often it is repeated and/or how large or small it looks on the object.


What's the formula for an idealized diode?

Question: How do I mathematically describe the curve of an idealized diode? I want to express the dependency of i and v in one expression. Is it possible?
Comment: You model a diode to solve a problem. What is your problem?
Comment: How accurate around 0 volts does the current need to be?
Answer:
How do I mathematically describe the curve of an idealized diode? I want to express the dependency of i and v in one expression. Is it possible?

That is not a function, so hm, color me sceptical.
I like Charles' approach:

\$i_\gamma(v) = e^{v\cdot\gamma}\$

because for any finite \$\gamma\$, that thing is (easily!) differentiable (and hence can be used for finding optima), and for \$\gamma \to \infty\$ (same as Charles' \$\tau \to 0^+\$), it describes the idealized diode behaviour.
But that already betrays what I think you could be using this function for (mathematically modelling a circuit to find e.g. the point of maximum power transfer or something).
Point being: this not being a device that exists in reality, one would have to wonder why you're trying to model it! And as soon as you answer that question precisely, the expression for it will jump right at you. No promises that it's going to be a "single expression" (whatever that means). That category is pretty meaningless; for example, only because someone invented the names "sine" and "cosine" can we represent the waveform of a harmonic oscillator in a "single expression", but there's uncountably infinitely many things in nature that we haven't given "simple" names to.
Comment: I like using a ratio for the exponent because then numerator and denominator use the same units, volts in this case.  When you use the product of two numbers for the exponent, then they have reciprocal units.  Mathematically this is fine, but I find it less intuitive.
Answer: It's normally this:
$$
\frac{I}{V} =
\begin{cases}
0,  & \text{$V$}<0 \\[2ex]
\infty, & \text{$V$}\geq 0
\end{cases}
$$
I know this is not a "single expression".
But maybe we can use the Dirac-Delta function directly:
$$
\delta_a (x)=\lim_{a\rightarrow 0}\frac{1}{|a| \sqrt\pi} e^{-(x/a)^2}
$$
For I-V characteristics of ideal diode, \$x = V\$ and \$\delta(x) = I\$, so
$$
I=\delta(0)
$$
This still has some problems. But maybe we can get inspired by the well-known diode equation, and write this:
$$
I = \lim_{V\rightarrow0^-}(e^{(\varepsilon/V)}-1)
$$
where \$\varepsilon\$ is, say, the smallest positive number (\$\varepsilon\rightarrow 0^+)\$. Negative finite values of \$V\$ will make the current, \$I\$, zero because the exponential part will go unity. As the \$V\$ approaches zero the current goes infinity.
Comment: ah, small problem: your \$\delta_a\$ is an impulse, not a "step towards infinite".
Comment: @MarcusMüller I know, with the zero-centred distribution approximation in my answer, the magnitude reaches infinity for \$a\rightarrow 0\$. But I missed the point of zero-current for \$V<0\$. Good catch.
Comment: yes, but at a strictly positive voltage, the current's 0 again
Comment: This seems at face value to be incorrect as the ideal diode behaviour is undefined for V>0.
Comment: @Frog if you mean the final equation then no, it is not incorrect because the one-sided limit (approaching 0 from left i.e. \$V\rightarrow 0^-)\$ already indicates the discontinuity which means the function is undefined and not differentiable for V > 0.
Answer: Here's an equation that I believe meets your requirements, but I can't imagine it is very useful for anything.
\$ i = \displaystyle\lim_{\tau \to 0}e^{v/\tau}
\$
Answer: In math there is no numeric formula for your curve if you expect something where the voltage is calculated from the current (and from nothing else) or something where the current is calculated from the voltage (and from nothing else). That's because numeric formulas output a single number, but all positive currents are valid for V=0. Respectively all negative voltages are valid for current = 0.
You need a formula which allows certain voltage and current pairs as plane coordinates and deny the rest. The allowed points are the negative V-axis, (0,0) and the positive I-axis.
Math formalism contains ways to present such coordinate pairs. One way is to say that the result contains all pairs (V,I) which are got by letting t vary through all real number values and for t less than zero V=t and I=0, for t greater than or equal with zero V=0 and I=t.
Could this be presented as a single expression? Of course it could. It already is one - you must only allow vector valued expressions, a free variable which is defined by giving more constraints elsewhere and using "if-then-else" in calculations.
The free variable is t which can get any real number value. Deciding which value is the actually used t is not defined in this formula which only tells the allowed pairs (V,I). Other conditions should be given. In electronics the circuit around the diode is that extra condition which restricts the actually possible (V,I).
About versions which use infinity or the limit where a parameter approaches the infinity: They skip totally what the diode does (allow certain (V,I) pairs and deny the rest) and try to present I = infinite (that's not a number) if V>0, I=something when V=0 and I=0 when V<0.
Someone may defend himself by pulling the delta function which he says to be infinite at t=0, so infinity can be successfully used as a number. It's not. The delta function alone cannot be defined properly, only its effect in integrations can be defined as the limit of the integration results where a peak with a certain area in the integrand grows with no limit. That doesn't stop people to write all kind of limit expressions for the delta itself. The habit to use infinity (and its inverse) as a number was common even among mathematicians before top notch guys like Gauss, Cauchy, Weierstrass and some others succeeded to stop such nonsense in 1800s. I admit that working with the delta function can be ordered to a logical state as an algebra i.e as a game of symbols. There the delta isn't anything which has numeric values.
Answer: Take a number like \$10^{24}\$ and raise it to a big power that is dependent on input voltage. Then I divided by 1 million.
$$I_{DIODE} = \dfrac{(10^{24})^{\left(20\times V_{DIODE} + 0.2\right)}}{1000000}$$
Result in excel: -

Voltage along the X-axis and current in the Y-axis. Whether this is accurate enough I have no idea.
Comment: I didn't use \$e^{???}\$ and you also didn't make that remark to Rohat. I like to be practical and try things out so, that's the USP of my answer (also no symbols harmed or abused in my answer). TBH I had no idea what the \$e^{???}\$ answers were getting at so, not guilty on plagiarism of other answers @MarcusMüller however, I didn't make an answer out of congratulating another answer and making a meal of it ;>)
Comment: he, but that's simply the \$e^{\gamma v}\$ approach by another name!
Comment: Fair enough :) The core of my answer was "It depends on what you are modelling for", though :)
Answer: Maybe something like this:
\$ i = \displaystyle\lim_{\tau \to 0}( \frac{1+ \tanh(v/\tau)}{\tau})
\$
For \$\tau \gt 0\$ it is continuously differentiable, which is sometimes useful.
Comment: Continuously differential is useful at times. Better that way than the [Weierstrass function](https://en.wikipedia.org/wiki/Weierstrass_function), anyway! ;)
Answer: Here is a set of three relations which, taken together, describe an ideal diode:
$$IV = 0 \qquad I \ge 0 \qquad V \le 0. $$
If you want a single equation describing it, you can use the "max" function, which returns the greater of its two parameters. That equation would be
$$\text{max}(-I, V) = 0.$$
(If the unit mismatch there is unacceptable, then you can multiply \$I\$ by an arbitrarily chosen positive resistance.)
Answer: You can approximate it, but I think the real issue is that, as Marcus points out, that curve is not a "function" at all. For a relation like \$y = f(x)\$ to be a function, each value of \$x\$ must be mapped to one and only one value of \$y\$.
There are two functions we could try to define for an ideal diode with \$-\infty \lt V \le 0\$ and \$0 \le I \lt \infty\$:
$$I = f(V)$$
$$V = f(I)$$
\$I\$ can't be a function of \$V\$ because when \$V = 0\$, \$I\$ can have any value. Likewise, \$V\$ can't be a function of \$I\$, because when \$I = 0\$, \$V\$ can have any value.
I'm not a mathematician, but I suspect the underlying problem is that \$I\$ and \$V\$ never vary at the same time. Either \$V\$ is constant or \$I\$ is constant. To have a function (or even a relation) you need two variables.
If you think of this in terms of circuit theory, it makes sense. The whole point of an ideal diode is to not do any calculating at all. If the diode is on, it's a short circuit, which means the two nodes it's connected to are actually the same node. If the diode is off, it's an open circuit, which means it effectively doesn't exist. We don't normally think of opens and short as having I-V curves either.
Answer: Shockley diode equation: https://en.wikipedia.org/wiki/Shockley_diode_equation
$$I_D = I_S \left( e^\frac{V_D}{kT/q} -1 \right) $$
Horowitz and Hill's "The Art of Electronics" is a good book for reading such things.


Allow commenting on deleted answers

Question: Sometimes I'd like to comment on deleted answers, for example to say that the answer's idea is actually good and how the issue that led to its deletion can be fixed.
Comment: @rene I'm not familiar with reviews. I meant answers deleted by their authors. It's rare, but often enough that it has bothered me enough to ask for this. What kind of abuse? I can see these answers because I have 10k+ reputation, can we maybe act like I know what I'm doing and how to behave? Did you mean "likely" instead of "unlikely"? The author of the answer is who I want it to see (they should get notified as usual), so they can fix the issue, undelete, and thus we'd have a valuable answer.
Comment: This has bothered me a few times in the past too and it would be a nice-to-have feature. Having said that, I don't think there's enough demand for it or that many users will stand behind it, therefore, it's unlikely to be implemented. BTW, I don't really think abuse is an issue here. The author of the answer would be notified of the comment and they can flag it if it's flag-worthy. Anyone else who can see the comment also has the ability to flag it. @rene, what kind of abuse are you worried about?
Comment: Sometimes people delete their answer because they believe they've made a mistake and want to move past it. They'll either edit and undelete it or just move on.
Comment: @JonClements Hmm, I can't tell whether you're for or against this :-). My point for this use case is that they're not aware that there's a fix for their mistake and they won't fix it unless they're made aware of it. I also might've had other use cases, but the last two I remember we're like this. And unlike rene, I don't see a downside in this.
Comment: i can't see the benifit, for ame reason the answer is deleted, and if you want make your own answer.
Answer: No, let's not allow that.
If answers are deleted from review the comments posted by the community bot are still there.
What type of answers would benefit from this then?
Are we really deleting that many answers that could be salvaged if we left guidance in comments?
Are there really that many self-deleted answers that need salvaging by means of comments?
If you really can salvage a deleted answer, post it yourself, preferable as community wiki, with credits to the OP of the deleted answer. In case the OP circles back and finds your answer and they decide to edit their original and undelete, you can delete your CW again. Problem solved. We don't need a comment feature for that.
On a tangential note: these comments would be extremely hard, if not impossible to moderate by regular users. I can see this being abused on so many levels (think stalking, pressuring users to undelete, continued arguing after a "bad" answer was given, etc. Do you want more examples? Ask a mod to read back for us their latest custom comment flags and/or rude/abusive flags) . Let's not clutter the site with comments, specially on places where it is likely only the OP or a casual passerby will notice them, if at all.
Comment: However, those posts and comments can be moderated by the community in large @KellyBundy.  Just FLAG! :)
Comment: @KellyBundy maybe I've not had enough coffee this morning... but I thought it was clear by now what the difference is? Anyway, I have to do that "real life" thing so I'm going to leave this for now. And errr, let rene not get so many notifications...
Comment: @KellyBundy because sometimes someone just didn't like their answer or will work on it later (or not). Or maybe just has one of those "oh gawd, I wish I'd not posted that - so embarassing moments"
Comment: Regarding stalking/pressuring/etc: flag it then.
Comment: @KellyBundy if you find anything at all that breaches the code of conduct for this site - then flag it.
Comment: @JonClements Sure, maybe for some reason they'd not want to fix/undelete. And then they could ignore the comment (or respond if they feel like it).
Comment: @KellyBundy errr... but why should they get comments on it - they're either working on it or moved away from it... you just don't know as someone possibly on the other side of the planet we live on which one it is... maybe if I've made a bad answer (and darn sure I'm made several) - I want to put my paws up and say "yeah - that was my stupid mis-interpreting of the question"... I certainly wouldn't like people to then be able to comment on that answer with stuff like "oh yeah - that was stupid!" or something
Comment: @JonClements About flagging: Yes, that's what I'm saying. Simply flag it just like you'd flag under non-deleted posts. And like I pointed out, only people with 10k+ reputation can even *see* deleted answers. And my guess is that such users are far less "abusive" than the average user, so I'd also expect abuse under deleted answers to be far rarer because of that.
Comment: @JonClements You really think people with 10k+ reputation would write "oh yeah - that was stupid!"? And even if they did, simply flag.
Comment: @KellyBundy reputation doesn't affect how you behave... there's plenty of really good developers out there that have next to zero interpersonal skills at all. (So yes, there's 10k or 50k+ users I'd feel uncomfortable being able to do this)
Comment: @JonClements Those same people and more can also post abuse under non-deleted posts. So... Let's remove the possibility for comments altogether?
Comment: @JonClements Just like under deleted ones, no? What's the difference?

Allow commenting on deleted answers


Make like HTC popup

Question: I had a HTC phone. And I see this pop up. It 's pretty cool, especial in its animation. Does any boy tell me what does it call(I call it HTC popup) and how to do that. Do we have a framework to do this?
Thanks in advance, (1 rep per answer :D)

click here if the image doesn't show up.
Answer: I think that need use QuickAction. QuickAction

Make like HTC popup


Is reselling products legal?

Question: My school is doing one of those fundraiser a where you sell things. I was thinking I could make some extra money by marking up the prices, selling them at that price, then buying them at the normal price. I'm thinking that could be illegal somehow but I don't know enough about laws to tell.
Comment: "make some extra money" for whom? That sentence is a bit ambiguous about who you are selling to and who gets the extra money.
Answer: Reselling products is legal - its called "business".
What you are proposing to do is illegal - its called "fraud". Disguising personal gain under a charitable guise is fraud, a crime against the state for which fines and prison are the penalty and also the civil tort of passing off against the school for which they can seek recompense.
If you were open and honest in your sales pitch - "$5, $1 for me and $4 for the school" then this would be legal.
Comment: Sage didn't explicitly state that the 'extra money' was for themselves. It could quite possibly be "make some extra money"... for the school.
Answer: Generally speaking, you are committing fraud, by using the imprimatur of your school's fundraiser to take personal profit.
Regardless of the legality, does that idea not set off your "this idea is a stinker" radar?   People are buying that worthless, useless stuff because it's for a CAUSE.  They could otherwise go to walmart and buy that same worthless, useless stuff for much less.  You, adding on a "premium" that will go in your pocket, is (let me find the correct legal term...) a "scumbag" maneuver.

Is reselling products legal?


Unimportant words on page being seen as keywords, due to repetiveness

Question: I have a list of products on my site, and each product has a number of descriptors such as features, price, etc. Next to each product, I list the 10 features, with a graphical icon which lets the user know whether the product has that particular feature or not. In all, I have about 230 products, and I have to add the same list of features to describe each product, so you can see the enormous redundancy here of these "feature names". These "feature names", ex., "water proof", are not important keywords at all, yet due to the sheer volume of these words, Google is seeing them as my most important keywords. Is there any way to get around this, or to tell the bots to place (less) emphasis on these repetitive words, and not view them as important keywords?
Comment: I believe I've found an answer to this question, but please chime in if you think I am off. Basically words that are used over and over again on a site are considered "boilerplate" text, which google is pretty good at deciphering. In Google Webmaster, the "content keywords" is simply counting your words, and not necessarily saying those are the words you're going to rank for.
Answer: Do not worry about it too much. This happens and is perfectly normal. Google is trying to understand what you page is about. If you use a keyword a lot but not too much, it becomes important. If it wasn't, it should not be on the page!
Your example for waterproof is a great one. It should be there before you think that your customers want to know that something is waterproof. Now your page is about a product not about waterproof and you tell crawlers that by placing more importance to other parts of the page. For example, the name of a product would be in a heading (h1 or h2) and more important aspects can be bold or italicized. The only way to make a word unimportant is not to use it but what you really want it to make other parts more important. Placing those in the title of your page or URL also helps.
Comment: Write for your customers, not robots. Google understands natural language and the need for giving the customer useful information.


Editing categories with Solspace Primary Category

Question: We're using the Solspace Primary Category add-on for a site and was wondering if it is possible with this add-on to let users add/edit categories via the Categories tab when publishing an entry, as per the default categories behaviour?
Answer: Sadly, no. It's an omission they're aware of, but for the moment it's not available.


What do Democrats have to gain, politically, by preventing Brett Kavanaugh's appointment to the Supreme Court?

Question: From a purely political perspective: If his nomination is withdrawn, won't Trump just nominate another conservative judge (who would presumably be confirmed by the republican-controlled senate)?
Comment: Consider the converse: What do Republicans have to gain by continuing to argue for Kavanaugh instead of rejecting him and moving to the next option on the list?
Comment: @Walt  If Republicans backed down immediately to accusations like this, that tendency to back down could theoretically be gamed by the Democrats.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/83768/discussion-on-question-by-jer-what-do-democrats-have-to-gain-politically-by-pr).
Comment: Two questions asked, which question is the focus? Please clarify.
Answer: If senators can draw out the nomination process long enough, they have a chance of having a Democratic majority in the Senate during the next confirmation.  Then Trump would have to nominate somebody that Democrats are happy with.
Comment: That's if they allow one at all. [Some Democrats have suggested no Trump nominees would be acceptible](https://www.washingtonexaminer.com/news/mazie-hirono-says-democrats-ready-to-keep-supreme-court-seat-vacant-through-2020-if-conditions-are-right)
Comment: "Then Trump would have to nominate somebody that Democrats are happy with." - That's not entirely true. Just as we saw with Garland, the President can nominate the person they want, and Senate can just flounder on it. Then political games ensue, with everyone saying the other party isn't doing their job.
Comment: @SnakeDoc: But with a Senate majority (or even with a few sensible Republicans from "purple states"), stalling a confirmation isn't the Democrats' only option,  They can simply vote to reject an unsatisfactory nominee.
Comment: @elliotsvensson It would be interesting to see Democrats attempt to stall a confirmation for over a 1+ years... the political flak to just confirm and move on with life would surely add up. It's entirely possible Republicans could ram through a conservative nominee this way.
Comment: @BobE, "have a chance" implies speculation, too, I guess.
Comment: @jamesqf Yes, that's true, but I don't believe there's anything stopping the President from re-nominating the same person again and again... or more and more conservative-leaning individuals (the opposite of what Democrats would want)
Comment: @jamesqf for those scenarios, I refer you back to my 2nd comment above ;P Especially if the President gets into their 2nd term, they've got nothing to lose... but a whole lot of Senators do.
Comment: @SnakeDoc, fair enough.  But the political outcome is similar: fewer Republican Justice-appointments.
Comment: as a general principle, when you begin an answer with "IF" - you are clearly signalling that the answer is speculative
Comment: @SnakeDoc: Sure, there/s nothing stopping a President from doing either of those things (AFAIK - I'm not positive about the first); likewise there's nothing stopping the Senate from rejecting those nominees.  That can go on until the President either gets tired of the game, or is removed from office by election, impeachment, or the 25th Amendment.
Comment: The isn't an answer to the precise question asked.
Comment: @WakeDemons3, how so?  "by preventing..." is equivalent to "draw out the process long enough" ---> somebody different, right?
Answer: Expanding on Elliot's answer.
Even if rushed, there is a process to approving a President's nomination. Nominating and approving another person before the November election would be possible, but it would be tricky to do it that quickly.

Could Republicans really get Barrett or another nominee confirmed
  before then? And if not, could they confirm her in the so-called
  lame-duck session after the midterms but before the new Congress meets
  on Jan. 3.
The answers are "possibly" and "probably" — but the timing is getting
  dicier by the day.

(written on 9/25)
The Republicans right now just barely have a majority of the Senate. There's a Senate election in just 40 days. So there's a chance they could lose control of the Senate before anyone else could be nominated and voted on. If that were to happen, then the President would be forced to nominate someone who could get at least some Democratic support.
That being said, its not a great chance. Only about a third of Senate seats are up, and only about a third of those are held by Republicans. 538 currently gives the Democrats about 31.5% of taking control.
However, that's not too much longer odds than the Republicans faced in their gambit of refusing hearings for Merrick Garland, and they were lucky. Sometimes you beat the odds when you take these gambles, and if goodwill from the other side isn't a consideration (which its fair to say hasn't been a possibility during Mitch McConnell's entire chairmanship), there isn't much downside to not trying.
Comment: Also, don't underestimate the importance of following through on a tit-for-tat strategy.  The GOP will see perverse incentives to keep obstructing judicial nominations if it doesn't come back to bite them (or at least threaten to).
Comment: Even IF the Democrats take the Senate these coming midterms, they won't actually be seated until January.  Republicans could vote on and confirm a nominee in the interim, albeit not without some political blowback.
Comment: I asked a question about this before and the only answer was that a lame duck Senate session can confirm just as well.  So there is no November deadline.  Even if Republicans do lose, they can confirm someone after the election (with no political price to pay at that point).
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/83772/discussion-on-answer-by-t-e-d-what-do-democrats-have-to-gain-politically-by-p).
Answer: Senators doing their job

the moral benefits of not having an accused sex offender on the Supreme Court.

That's not just a moral benefit, that's the senate's job. From senate.gov (emphasis is mine):

The Constitution grants unique powers to the Senate, allowing it to serve as the more deliberative legislative body and as a check on the executive and judicial branches by providing advice and consent on nominations and treaties.

"If he doesn't someone else will"

But from a purely political perspective: If his nomination is withdrawn, won't Trump just nominate another conservative judge (who would presumably be confirmed by the republican-controlled senate)?

Yes, he will probably nominate someone else. Then the same procedure starts again and the senate will have to its job ("to provide a check on the executive and judicial branches by providing advice and consent on nominations") again.
The argument that rejecting this nominee is pointless because there will be another who may be equally bad sound a lot like "if I don't, someone else will". That argument is discussed on the Philosophy Stack Exchange site. In this case, that argument undermines the senate's responsibility.
Answer: There are three issues that may be on the Supreme Court's docket that very well may spell the end of a political party:  Gamble v. United States, the removal of Roe v. Wade, and the question of whether a sitting president can be convicted of a crime.

Gamble v. United States is about the 'separate sovereign' issue, basically removing a form of double jeopardy across state and federal lines. This is of major interest to Republicans because it looks increasingly likely that Mueller's probe will end up indicting quite a few Senators, Representatives, and campaign people before it's over. While the President can pardon Federal crimes, he cannot pardon State crimes. Mueller is currently using this fact to compel testimony in order to increase the speed of his investigation. Republicans would much rather slow things down until Mueller can be fired.
Roe v. Wade. Conservatives have been trying to stack the Supreme Court for Roe's overturn since Reagan nominated Rehnquist in the 80's. This excites the Republican base at a time where they need all the help they can get to avoid losing the Senate along with the House come November.
At some point, is very likely that we will see federal charges levied against Trump by the Special Prosecutor, ranging anywhere from Obstruction of Justice to Tax Fraud to Seditious Conspiracy. Kavanaugh has publicly stated that he did not believe in indicting a sitting president.

Unfortunately for the Republicans, it is nearly too late for them to find someone else for the Supreme Court before the Dems take both houses of Congress, and Trump has exerted a good amount of pressure on them to keep Kavanaugh, likely due to point three. This is a job interview, not a trial, and someone as unpopular as Kavanaugh would have been withdrawn weeks ago if it weren't for these three upcoming cases and the possibility of them tipping the Supreme Court Conservative.
Comment: Citation needed for #3. Charges have been right around the corner for two years.
Comment: To bring a treason indictment, there would have to be probable cause that the person literally engaged in war against the United States or aided those doing so. This is literally defined by the Constitution itself. Sorry to be blunt, but a treason indictment has never been anything more than a fairy tale dream of leftists who are completely ignorant of the U.S. Constitution. (And any indictment at all of the President or a member of Congress from Mueller's probe is quite unlikely.)
Comment: @DoctorDestructo Yes, it does. Article III, Section 3: "Treason against the United States, shall consist only in levying war against them, or in adhering to their enemies, giving them aid and comfort. No person shall be convicted of treason unless on the testimony of two witnesses to the same overt act, or on confession in open court." (Given the context of war, 'enemies' here wouldn't just mean "people we don't like," but rather "people engaged in war against us.")
Comment: @reirab Our comments are bound to be deleted in short order, but I do think they (implicitly) suggest that an improvement to this answer is needed. People seem to be missing the main takeaway from point #3, which I think is the most important point, and is completely absent from the higher scoring answers. It might be helpful to remove the speculation about Mueller being fired and the likelihood of specific criminal charges, which are obviously distracting people from the actual point.
Comment: I have removed Mueller speculation and specified 'seditious conspiracy' rather than treason.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/83829/discussion-on-answer-by-carduus-what-do-democrats-have-to-gain-politically-by).
Comment: @reirab The constitution doesn't limit treason to acts of war, and I can't think of a worse way to undermine a democracy than to help a hostile (and, arguably, dictatorial) foreign government install their preferred candidate as your head of state. But that's really beside the point. I think Carduus was just saying (he thinks) _some_ charge is likely-- treason was just an example. Actually, I'm pretty sure he'd agree with you that it's a dream of leftists (and Trump opponents in general). His whole point was that Dems see Kavanaugh as a potential obstacle to that dream.
Comment: @reirab The constitution itself doesn't provide a precise definition of "enemies", which leaves room for interpretation. But you're right, the Supreme Court has interpreted it just as you describe and probably won't change their interpretation any time soon. I apologize for arguing with you on that point. My main point is that Dems are worried Kavanaugh's appointment will be an obstacle to indicting Trump for _any_ federal crime. If they were only concerned about not being able to convict him of treason, then you could probably allay their fears and remove a major roadblock to Kavanaugh's appt
Answer: This should be obvious, but in addition to the other reasons stated, even if the Republicans retain control of the U.S. Senate in the mid-term elections, if Democrats prevent Brett Kavanaugh from being appointed to the U.S. Supreme Court, then the seat will be filled by someone else nominated by President Trump instead.
Brett Kavanaugh is a very undesirable candidate for this life long post in terms of his history of judicial decision making, his background as a very partisan Republican operative, and his personal character. The personal character issues include:

multiple accusations of sexual assault,
a history of misogyny in how he chooses and treats his clerks,
provable instances of lying under oath,
problems with alcohol overuse, and
problems with personal financial management.
He has a history of being a bully and a jerk in his personal life and that could influence how he acts with a powerful lifetime appointment in subtle ways.

If Trump nominates a replacement candidate, that candidate would in all likelihood be better vetted and would be at least someone less obviously polarizing. Instead of a judge in the model of Justice Thomas, like Kavanaugh, Trump might nominate a judge more like Justice Roberts, for example. And, while a Justice Roberts clone would still be a profound disappointment to Democrats, a Justice like that would be far more attractive to Democrats than a Justice Kavanaugh.
So, from the Democratic party's perspective, since no other nominee could be materially worse than Kavanaugh in their view, in a worse case scenario they postpone the addition of a bad new justice to the high court and deliver a defeat to the President, and in the best case scenario they also cause the addition of a less bad new justice to the high court.
Also, a success in defeating Justice Kavanaugh establishes a template that Democrats can follow in defeating future nominees to any kind of post who are particularly undesirable.
Realistically, not fighting the Kavanaugh nomination is the worst option available to the Democrats which provides them with no benefit whatsoever and would undermine their credibility as opponents of the regime and supporters of their principles. And, if they fail to strongly oppose his confirmation, they also set a precedent that would make it hard for Democrats to oppose future nominees who share similar personal or ideological flaws with Kavanaugh.
Comment: @Philbo I am suggesting that they might learn how to mobilize opposition to a scandal prone nominee, whatever those scandals or flaws might be.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/83867/discussion-on-answer-by-ohwilleke-what-do-democrats-have-to-gain-politically-b).
Comment: Apologies for coming to this late but I'm not sure I understand "Also, a success in defeating Justice Kavanaugh establishes a template that Democrats can follow in defeating future nominees to any kind of post who are particularly undesirable." Are you suggesting that undesirable candidates should be attacked with claims of sexual assault? If not, what are you suggesting?
Answer: Beside the (still relatively remote) hope to delay the process long enough for the next Senate to decide on it, there could be some benefits in forcing Republicans to take a stance on the Kavanaugh nomination and the accusations against him, a few months before elections. It might provide video clips to build ads, allow their opponents to pain them as insensitive to sexual assault victims or women in general, as hypocrites, etc.
Comment: correct, the sole reason is to delay ANY nominee until after they control the senate and can just block whomever Trump puts forward by their controlling number of votes.
Comment: @jwenting That's not what I am saying. Also, delaying this nominee until the Democrat control the senate (if they ever do) could also be a way to force Trump to name a slightly less partisan candidate, not necessarily to keep the seat open for two years (that's more in the Republicans' playbook...).
Answer: Victories are hard to come by for minority parties. By borking the nomination democrats "stand up" to Trump, which polls indicate most adults, if not likely voters want. There's the suburban women appeal of fighting an alleged abuser as well, and women are expected to be critical in the election.
The flip side is what do they have to lose by not blocking it? Base motivation, which is crucial for midterms. As such, it's a win-win for the democrats to obstruct, regardless of the outcome.
Comment: Perhaps add a link to https://en.wikipedia.org/wiki/Robert_Bork#Bork_as_verb and/or an explanation, since readers may be unfamiliar with American politics from 30 years ago.
Comment: @William-Rem When used as a verb in the sense of thwarting a nomination to the Supreme Court, it is almost certainly a reference to Robert Bork.
Comment: Apparently they were able to find a third option yesterday of lose (as i win-win-lose). Suggest to update. See #WalkAway
Comment: @shoover - Disagree. I think most people's usage of "bork" is not based on that, but on the Muppets' Swedish Chef, which predates that usage by 15+ years. See "bork bork bork".
Comment: @Physics-Compute: I don't understand your point, can you please elaborate?
Comment: "The flip side is what do they have to lose by not blocking it?" Moderate voters. Joe Manchin's Senate seat. Claire McCaskill's Senate seat. The open Senate seat in Tennessee which they had a good shot of winning (moderate, widely-popular Dem former Gov vs. polarizing Trump-supporting GOP Congresswoman) prior to this debacle. Democrats may fire up their base, but they may lose some red/purple state Senate seats in the process.
Comment: @reirab: moderate voters usually don't have as strong of feelings about the court as partisans. Additionally, recent polling seems to indicate a shift away from the nomination, so it might not be as unpopular of a move as when the OP's question was asked. Lastly, the _process_ of prevent is not the _vote_ you speak of, and it's _possible_ it might not even come to a vote, or could yield sufficient "cover" for such a red-state dem to vote "no" for sympathetic reasons.
Comment: @elliotsvensson Oh, yes, I know. The Clintons encouraged Trump to run and, as her e-mails later revealed, her campaign was coordinating with the media to boost Trump during the primaries. While that strategy didn't work out for her in 2016, it will be helping Democrats in 2018.
Comment: @dandavis The only 'vote' I talked about was the upcoming Senate elections. That said, I agree that the process of preventing the confirmation hasn't been a vote... and that's exactly what could lose them some votes in the elections. Investigating a credible claim of sexual assault against a nominee is good. Using the claim instead to drag out the confirmation process as long as possible for purely partisan political reasons, however, is not something that moderate voters are going to view favorably. To be completely honest, this may change my own vote in the mid-terms.
Comment: @dandavis Keep in mind, prior to the polarization brought on by/about Trump, this was set up to be a very good year for Senate Republicans. There were very few vulnerable GOP-held seats and many vulnerable Democrat-held seats in purple or even red states. Those seats remain vulnerable, though not as much as they'd have been without Trump factoring into the equation. Had a more reasonable Republican (e.g. Kasich, Rubio, etc.) won, the GOP would have been within striking distance of getting a 60-vote Senate supermajority in this mid-term.
Comment: @reirab, have you ever heard the term "Pied Piper Strategy"?
Answer: Currently the Republicans have control of two of the branches of government (Executive and Legislative). If they pack the Supreme Court with partisan judges then they undermine the fundamental balance of power and the system of checks and balances.
For example, suppose Congress makes an undemocratic (IE: tyrannical) law such as making Trump President for life and the Supreme court has a majority of right wing partisans. There will be and can be no challenge.
In fact, Kavanaugh has already gone on record that the President should not be accountable to law (IE: he should be un-indictable) "so that he can concentrate on running the country". So if the court is packed with such judges the Republicans will be free to rig everything so that no one will ever be able to unseat their party, resist their tax manipulation to the benefit of plutocrats, etc.
Basically our entire democracy (if you can call it that, with the Electoral College, gerrymandering and Russian interference) is on the line. The democrats have everything to lose - their very raison d'etre.
Comment: @JonathanReez Eh no. FDR led the country through the greatest destruction of the limitations on Federal Power. FDR's threats to the Supreme Court created decisions that empowered the Federal Government beyond the limits of enumerated powers in the Constitution, to include the creation of the General Welfare clause.
Comment: @JonathanReez Whether one likes him or hates him, it's quite a stretch to say that there were no "significant consequences" to FDR having the Congress and ([through infamous threats of effectively taking over the judicial branch](https://en.wikipedia.org/wiki/Judicial_Procedures_Reform_Bill_of_1937)) the courts during his tenure. That was probably the single most significant period in American politics of the entire 20th century, leading to the creation of the welfare state and _dramatic_ increase in the size and power of the government.
Comment: Well some manipulation such as gerrymandering would be (still) on the cards. I imagine that for something as extreme as appointing a president for life would be challenged by the pre-existing right wing partisians.
Comment: Except that having all three branches under the control of one party has already happened without significant consequences (FDR's rule is one example).
Comment: @reirab yeah but democracy is alive and well in the US. And the United States went on to become the world's most powerful country during FDRs rule.
Comment: "pack the supreme court" is exactly what the democrats had been doing for decades. Which is why they need to block any further Trump appointments, it reduces their control over the supreme court. Never mind that Kavanaugh is pretty much neutral politically (he's voted both for and against both Republican and Democrat inspired policies as a judge in other courts), he's not under their control so they have to stop him. And with Ginsburg probably not lasting much longer it gets even worse for them.
Comment: @JonathanReez so you claim that the appointment of Kavanaugh to the supreme courts marks the end of democracy in the USA? Rather a stretch of the imagination. If anything it marks the beginning of the end of mob rule in congress.
Comment: Ok, Kennedy and Johnson both had all three branches.
Comment: @JonathanReez I didn't say it ended democracy. I just said it's not correct to say that him having control of all three branches didn't have 'significant consequences.' Whether one likes those consequences or not, they were indisputably 'significant.' As for the U.S. becoming the world's most powerful country, it was really already there by at least the 20s, if not earlier, especially economically, but even militarily. Of course, WWII and its aftermath did greatly increase the position of the U.S. on the world stage during and after FDR's tenure.
Comment: @reirab, let's not pretend that the US' rise in power over the UK and Germany after the Great War and WWII wasn't the result of the massive destruction in Europe.  If our neighbors were as bad as their neighbors, we would have been in just the same boat.
Comment: @jwenting no, I'm claiming the US would be just fine
Answer: Political benefits and moral benefits are often one and the same. Preventing someone accused of sexual assault from being confirmed to the Supreme Court without a thorough investigation is itself a political gain.
Because of this moral benefit, the optics of this situation favor the party that opposes confirming someone accused of such crimes without a full review.
Comment: It's dubious whether it's a moral benefit (or even a long term political benefit) to establish a precedent that a nomination can be blocked by an accusation lacking evidence or arguably even credibility. But this still answers the question, because it does provide a short term political benefit.
Comment: I think this answer is directly related to a recent politics.SE question about hypocrisy: https://politics.stackexchange.com/q/34010/10172
Comment: @TKK Don't worry, the accusations in this case were very credible, and multiple fake accusations just don't happen as evidenced by Neil Gorsuch. Kavanaugh On the other hand told some pretty incredible lies even about things he really didn't need to lie about (like the legal age of drinking, etc).
Comment: @TKK Also, nobody was saying block anyone who is accused, but just thoroughly investigate the claims to determine if they were true before making a decision. It would just be immoral not to, it's like saying we don't even care if it's true, so why look?
Answer: There's a variety of political benefits, it's difficult to actually list them exhaustively:

It's the expected course of action for the party to oppose judges with Kavanaugh's ideology, so the base will reward/punish senators for their actions.
It's the expected course of action for the party to oppose nominees who are guilty of sexual harassment/assault, so the base will reward/punish senators for their actions.  The treatment of political actors by their own party in such cases (when those people decide to "tough things out") is a form of branding.  Moore and Franken are two recent examples that contrast with each other.
Delay of a confirmation allows the situation to change, the senate may flip after the election for example.
Successful withdrawal of the nomination is a political win and will energize the base while depressing turnout for the Republicans.  This is the common wisdom at least, and can mirror what happened with the attempted ACA repeal.
Dragging out the process is helpful in energizing the base this close to an election, Kavanaugh is a historically unpopular nominee, keeping him in the news is good for the party as a whole.
Other potential nominees can be marginal or even significant improvements over Kavanaugh in a variety of ways.  For example there were rumors that Trump wanted to nominate his own sister, who actually seems to quite moderate ideologically as a judge (compared to federalist society clones), and is quite old compared to Kavanaugh.
Other possible nominees can have their own weaknesses, allowing them to potentially be defeated in turn or forcing the Republicans into more moderate choices.  For example, Barret is in a sect of Christianity where her title in church is literally "handmaiden" and her views on abortion are well known, Senator Collins would be incapable of pretending that she thinks Roe v. Wade is "settled law".
"Borking" Kavanaugh is very fitting since their disqualification (prior to the multiple sexual assault allegations) is that they were first highly partisan political operatives.  Democrats would be insane to not oppose someone who is their self-admitted political foe.  An enemy ideologue leads to unwanted policy outcomes, which can still serve to lead to political power.  A powerful partisan enemy will always lead to the worst political outcome.  Both parties can draw political power from Roe v. Wade for example, but it would be hard to find one Democrat who thinks Bush v. Gore lead to a good political outcome.
Comment: You've made several good points here, but I would caution against using the term "guilty" for someone who has not been charged and convicted.  Whatever you or I think of Kavanaugh, a confirmation is not a trial.
Comment: @JonofAllTrades "guilty" in this context is purely to be seen as  "guilty in the eyes of public opinion", not in any legal sense. The idea was to either make enough waves that Trump would be forced to retract Kavanaugh or to at least make enough senators believe they couldn't get reelected if they didn't drop their support for him. They couldn't care less about legalities.
Answer: The Democrats have vowed to not allow ANY nominee put forward by President Trump to be confirmed.
At the moment the only way they can do that is through the interminable smear campaigns we've seen waged against Justice Kavanaugh.
Until a few years ago, when the fillibuster was removed as an option by the (then) democrat senate because they didn't want the Republicans to use it against them, that was their chosen tactic as it didn't make them look half as bad in the public eye.
Their hope is that if they can delay the confirmation vote until after the midterm elections in November, they will have a majority in the senate and use that to just vote any nominee whatsoever into rejection, thus making it impossible for the President to appoint any justices (or indeed anyone in any position requiring a senate vote) at all until the 2020 presidential elections.
That's the game, and they'll use whatever tactics they need to play it. This is not about Kavanaugh or Ford, Kavanaugh is an unfortunate victim and Ford a tool in their arsenal.
This isn't about right or wrong, they couldn't care less whether Kavanaugh did what Ford claimed he did (which may or may not have any credibility, that too is irrelevant to them).
All that matters to them is that this circus delays the confirmation vote, and they'll milk it until the vote has been lifted over the midterms.
I wouldn't be at all surprised if the next scripted "accusations" are already sitting in some democrat senator's file folder, ready to be "revealed" the moment the FBI says there's nothing to prevent a confirmation vote, thus delaying things even further.
Answer: Midterm elections are notorious for their low turn out.  Elections, in general, are emotional rather than rational actions.  No single individual can decide their outcome.  So people need to have some motivation to act on what they perceive to be some sort of collective good.
The only motivation Democrats had was to delay the inevitable confirmation.
There was no way to prevent the confirmation because even if the Republicans lost the election, there would have been 2 months between the election and the swear-in date of the new Senate.  During those 2 months the lame duck Senate could have confirmed the judge.
But the Democrats had an opportunity to create a cause for their base to be angry about.  Anger is known to be one of the best motivations.  So it's effective.  This was the sole goal of looking for reasons to delay the confirmation vote by any means they could find.
Comment: Re _"...The **only** motivation ... the **sole** goal..."_: that it might indeed be _a_ goal, (*i.e.* one motive of several), but this sweeping answer fails to eliminate the various other possibilities detailed in other answers.
Comment: @agc it doesn't "fail to eliminate the various other possibilities." I clearly said "there was no way to prevent the confirmation." And I justified it. So that was not the goal.
Comment: Resolved that we can both agree that you have justified the statement *"there was no way to prevent the confirmation."* very well, if our usage of *"justified"* is loosened to mean: *"insisted."*
Comment: @agc, no I used "justified" in its traditional plain-English sense.  The balance of the paragraph which starts with the clause "there was no way to prevent the confirmation" is the justification for the clause.


Can I use the mainline kernel in my rasp? if not, why?

Question: I noticed that when we compile a new kernel following the official documentation we use the linux fork from the raspberry foundation. Could I use the mainline kernel maintained by linus? Or is there some sort of  important difference between the 2? I don't really understand why the raspberry foundation maintains its own fork
Answer: If you use the mainline kernel, you will miss all the Pi-specific patches which fix the issues unique for the Pi hardware. Some devices may not be initialized properly, or you may experience quirks if you try to use them.
You may also have to include all VideoCore-related steps in your build process, which is of no interest to Linux in general since VideoCore is proprietary.
Answer: When you compile the linux kernel for an specific platform, you must provide the architecture configuration (or configure entirely by yourself), located at arch/<architecture_name>/configs.
Providing this configuration, the kernel will be preconfigured for an specific board (eg. arm/imx_v6_v7_defconfig) and it will be faster and easier to compile the kernel because the major board configuration is done, and you only need to change some options based in your hardware/requeriments.
For example, the official documentation of Raspberry Pi says that for configuring the kernel you must use:
32-bit configs:

RPi1, Pi Zero, Pi Zero W or Compute Module use bcmrpi_defconfig

RPi2, Pi3, Pi3+ or Compute Module 3 uses bcm2709_defconfig

RPi4 uses bcm2711_defconfig

64-bit configs:

RPi3, Pi3+ or Compute Module 3 uses bcmrpi3_defconfig

RPi4 uses bcm2711_defconfig

If you want to compile your own mainline based kernel, you could start by taking a look at these configs.
Therefore, the main reason why you use the RaspberryPi fork it's because all is preconfigured and optimised to this specific board (eg. type of processor, buses, GPIO, memories, etc...).
Could you use the mainline kernel?
Yes, but you will have to configure the kernel entirely by yourself using make ARCH=<arm or arm64> CROSS_COMPILE=<arm-linux-gnueabihf- or aarch64-linux-gnu-> menuconfig, and as Dmitry Grigoryev answer states you will miss some specific Raspberry pi patches.
You can find more documentation about patching the Linux kernel in the Raspberry Pi official docs.
Comment: Use the Raspberry Pi fork at: https://github.com/raspberrypi/linux
Comment: Please provide additional details in your answer. As it's currently written, it's hard to understand your solution.
Comment: I've added some details about the question, now I think it will be more clear!
Answer: Yes, you can. Here is a regularly updated list of what currently works with the latest mainline Kernel: https://github.com/lategoodbye/rpi-zero/issues/43