Get the SuperPage size

Question: It appears that some BSD systems have a superpage size of 2MB while others have 4MB. I've not seen any others. Is there any way to tell what the available superpage size is? Ideally from the command line, and without having to enable them.
Answer: Alan L. Cox made some interesting Opteron benchmarks and was co-author of the original superpage paper (presented at Usenix 2002): Practical, transparent operating system support for superpages
Superpages was introduced in 2013 for FreeBSD 7.2 for amd64 and i386

[amd64, i386] The FreeBSD virtual memory subsystem now supports fully transparent use of superpages for application memory;
  application memory pages are dynamically promoted to or demoted from superpages without any modification to application code.
  This change offers the benefit of large page sizes such as improved virtual memory efficiency
  and reduced TLB (translation lookaside buffer) misses without downsides like application changes and virtual memory inflexibility.
  This is disabled by default and can be enabled by setting a loader tunable vm.pmap.pg_ps_enabled to 1.

In 2014 it was added to FreeBSD 10.0 for ARMv6/v7. It supports 4KB and 1MB pages dynamicly. Revision 25418 states that vm.pmap.sp_enabled is used (set in loader.conf). If you are not using loader then find it in sys/arm/arm/pmap-v6.c. There is a nice BSDcan presentation by Zbigniew Bodek: Transparent Superpages Support for FreeBSD on ARM
You check it using sysctl:
$ uname -rm
11.2-STABLE amd64
$ sysctl vm.pmap.pg_ps_enabled
vm.pmap.pg_ps_enabled: 1

Linux got huge page (superpage) support in 2011 with kernel version 2.6.38. See also Huge pages Introduction. On Linux (only!) this is handled by hugeadm as hinted in another answer.
As for OS X I think it is enabled by default but I am in no way an authorative source on this. It seems that when they test they simply try to allocate the superpages. I see no check if superpages are enabled or not.
Comment: You are not in control of that. Read the release quote: It is transparent and handled dynamicly. Ideal page sizes are closely related to the architecture. The memory space *must* be contigous and you have no guarantee of that. This is handled by the system (and should be!). I would then ask another question where you clarify why it really is important to you. But at least I have a hard time thinking up those cases.
Comment: I only mentioned for arm. For amd64 it uses 4 KB, 2 MB and 1 GB as *needed* and if *possible*. If the memory map is fragmented - then you will get small pages. If not - then a larger. You only want the memory if it is non-fragmented? To me it reads as you are trying to outsmart the OS. Again - I would recommend a separate question to outline what you are trying to accomplish. To me you are going about this wrong. Hence I recommend another question. If not - sit back and wait - maybe you get a better answer to this one ;-)
Comment: This is about enabling superpages, which is not the same as finding out how big they are.
Comment: Your own links show that mach's mmap allows you to request a specific superpage size. All I want to know is a convenient way to list the available sizes.
Comment: Similary, it would be nice to know what page size to expect when using FreeBSD's `MAP_ALIGNED_SUPER`, to optimise the allocation sizes.
Comment: I'm not trying to accomplish anything other than listing the available page sizes on a system without referring to external references. If you don't know how then don't answer.
Comment: Appreciate the answer anyways, I was struggling with this xD, so thanks both, anyways, it seems that is something defined in headers as min, but the larger one is again dynamic, so no clue in runtime, without trying to enable?
Answer: For the XNU and Mach kernels (MacOS/Darwin), if I'm reading the headers right, on x86_64 it's always 2MB, otherwise it's not supported.
To do this dynamically you have to do something like:
echo "#include <mach/vm_statistics.h>" | gcc -dM -E - | grep VM_FLAGS_SUPERPAGE_SIZE_

Get the SuperPage size


How can I tell vim to ignore spelling errors inside quotes?

Question: If I'm editing a text file with :set spell, is there any way to
have vim not check words within the boundaries of certain characters against the word list? I want to be able to write things like proper nouns or technical vocabulary (or even 'sic' quotations) but not have to add them to the wordlist.
Comment: I think this needs proper syntax support.
Comment: What Christian means is that you can do it, but only through the `@nospell` keyword in syntax highlight files (see `:help syn-spell`). What kind of file are you editing? Does it already have existing syntax highlighting?
Comment: @ChristianBrabandt I take it to mean this is not possible then ? Or, at least not with what capacity vim has already for handling (highlighting, indentation, etc.) different syntax ?
Answer: You can add your own syntax element (probably overriding existing one):
syntax match quoteblock /"[^"]\+"/ contains=@NoSpell

syntax match: Tells vim this is a syntax command
quoteblock: The name of our match (Could be anything)
/"..."/: Match things between quotes
[^"]\+: Match anything that's not a quote
contains=@NoSpell: Tells vim not to use spell check on this match

It is just an example and not very smart :). In my case it stops checking spelling inside quotes:

:help :syn-spell
:help spell-syntax
:help :syn-match
:help /collection

UPD
You can add to your vimrc the mapping such as:
nnoremap <leader>s :syntax match quoteblock /"[^"]\+"/ contains=@NoSpell<CR>

Then press <leader>s (you know what <leader> is right?) to add this syntax element to the current buffer.
Another option is to add a command:
command! TurnOffSpellcheckForQuotes :syntax match quoteblock /"[^"]\+"/ contains=@NoSpell

Then just run this command from vim :TurnOffSpellcheckForQuotes
Comment: Do I just put this into my rc file then ?
Comment: Yes, this should work in your vimrc.
Comment: @myc3lium make sure it works for your files (text? c++? latex? markdown?) -- open your file and enter the command from the answer `:syntax...`.  Then if it works it would be better to create an `autocommand` that will source `:syntax..` for you specific filetypes. And this should be in your vimrc
Comment: You can also enable it upon opening each file by putting `:au Syntax * :syntax match …` in your vimrc, provided that you did `:syntax enable` before that.
Answer: If your file already have a syntax highlight, such as vim. You can do it like this:
Preparation
Add following function and command to your vimrc:
function! s:synstack()
  if !exists('*synstack') | return | endif
  return map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
command! Synstack echo s:synstack()

Assume current file content like this:
function! Foo()
  return "balabala"
endfunction

Get Syntax name
place your cursor at balabala, execute :Synstack, output is:
['vimFuncBody', 'vimString']

It's stack of current syntax, from outside function to current string. vimString is syntax name of string in vim.
Get Syntax definition
syntax list vimString

--- Syntax items ---
vimString      xxx start=/[^a-zA-Z>!\\@]"/ms=s+1,lc=1 skip=/\\\\\|\\"/ matchgroup=vimStringEnd end=/"/  oneline keepend contains=@vimStringGroup
                   start=/[^a-zA-Z>!\\@]'/ms=s+1,lc=1 end=/'/  oneline keepend
                   start=/=!/ms=s+1,lc=1 skip=/\\\\\|\\!/ end=/!/  oneline contains=@vimStringGroup
                   start=/=+/ms=s+1,lc=1 skip=/\\\\\|\\+/ end=/+/  oneline contains=@vimStringGroup
                   start=+\s/\s*\A+ms=s+1,lc=1 skip=/\\\\\|\\+/ end=+/+  oneline contains=@vimStringGroup
                   match /"[^"]*\\$/  contained nextgroup=vimStringCont skipnl
                   match /[^(,]'[^']\{-}\zs'/
                   start=/^\s*\\\z(['"]\)/ skip=/\\\\\|\\\z1/ end=/\z1/  oneline keepend contains=@vimStringGroup,vimContinue
                   links to String

I don't understand above output, the only thing matters is contains=@vimStringGroup. So this syntax contains a cluster called vimStringGroup
Add NoSpell to cluster
syntax cluster vimStringGroup add=@NoSpell

Done.

:h :syn-contain
:h :syn-cluster
:h :spell-syntax


linux network traffic accounting

Question: I have a network with several Hosts N1, N2, N3, ... and they all communicate with each other.
I'm in the N2 host CLI with linux.
Can you know how much traffic was in bytes between a N2 Host and N3 in a period of time?
In this case, total traffic and not speed of communication.
Comment: You could possibly look into adding a custom IPTables rule that logs traffic from your host to a specific ip address. But I am not sure you would get aggregate traffic (packets I believe) in the logs, you might see that in the `iptables -vnL` output for the custom rule though.
Answer: I use:
<code>    iptables -N INET_IN
    iptables -A INPUT -j INET_IN
    iptables -A INET_IN -s 192.168.1.2
</code>
I send a file with NetCat of the Host 1.
<code>    #100MB File
    dd if=/dev/urandom of=ffile.txt bs=1048576 count=100
    cat ffile.txt |  nc 192.168.1.30 1001
</code>
In Host 2.
<code>     nc -l -p 1001 > /tmp/x.x
</code>
View the result:
<code>    Chain INET_IN (1 references)
    pkts bytes target     prot opt in     out     source               destination
    2575  105M            all  --  *      *       192.168.1.2      0.0.0.0/0
</code>
And can use this command to flush results
<code>    iptables -Z INET_IN
</code>

linux network traffic accounting


Mix RAM with different clock rates

Question: I have two PC3200U modules and two PC2700 DDR modules. My mainboard supports both types and has 4 slots which are each color coded. So if I put each pair in the slots of the same color I'm good right? Would there be a performance increase if I used the exact same RAM modules like 4x PC3200 or 4x PC2700?
Answer: The RAM will clock down the faster RAM to the speed of the slowest stick that you put in, so yes, it will still work, but you won't be getting the most out of your RAM. Your best bet is to put in sticks of matching RAM if possible. Your performance for 4x PC3200 would be better than 4x PC2700. If you put in 2x PC3200 and 2x 2700, it will be like running 4x PC2700.
If you want to know how to put RAM into your computer, check your motherboard manual, or post your motherboard in your post so we can help you out.
Answer: As has been pointed out, your system will downclock all RAM to the highest frequency supported by all installed memory modules. Some motherboards also downclock RAM just because they can. (Populate all four slots on the Asus M5A97 Pro for example, and it downclocks the RAM even though all modules support a faster clock...) Hence, while there should be no compatibility issues assuming your motherboard supports all the memory modules used, you won't get every last bit of performance out of the faster RAM if you mix faster and slower RAM, but it won't (shouldn't) be slower than what you would get by using the same total number of modules of the slower RAM.
However, it's worth remembering that simply installing more RAM will often in itself give your system a fairly noticable performance boost. This is because:

The system won't have to resort to swap as often, as more code and data can fit into main memory (reducing the need for disk I/O)
There is more free memory to use as disk cache, which will speed up disk I/O for anything that has been accessed recently (which with a large disk cache is more than you might imagine)

Which one of these becomes the dominant factor depends on whether your system is RAM constrained before the upgrade, but either can give the system quite a boost in actual use except perhaps for some highly specialized workloads (and if you're into those types of workloads, you probably wouldn't consider mixing RAM just because you happen to have a set of DIMMs on hand).

Mix RAM with different clock rates


Secondary Polytope Simplicial?

Question: Is the secondary polytope of a simplicial polytope necessarily simplicial?
Comment: Dear Stephen. The role of MathOverflow being not only to get answers to questions, but also to teach the readers some general math knowledge, it would help if you quickly reminded the definition (or idea of definition) of the secondary polytope of a polytope.
Answer: The secondary polytope of a simplicial polytope is not neccessarily either simplicial or simple. The secondary polytope of the cyclic 4-polytope with 8 vertices in given as an example in by Billera, Filliman, and Sturmfels in "Constructions and complexity of secondary polytopes" - Adv. Math. 83 (1990), no. 2, 155–179. It is clearly neither simplicial or simple.
Answer: To echo André, it would be useful to see a definition of what you mean.  The secondary polytope is generally defined for a point configuration, not for a polytope. Here are two definitions,
the first from Carl Lee's article "Subdivisions and triangulations of polytopes" (Handbook of Discrete and Computational Geometry), and the second from Sven Herrmann's paper, "On the facets of the secondary polytope"
(arXiv.0908.2737v3).
In the first, $V$ is a set of points in $\mathbb{R}^d$, in the second,
$\cal{A}$ is a multiset of points in $\mathbb{R}^d$.

Each vertex of the secondary polytope corresponds to a triangulation of the point set.
So perhaps you are asking for the secondary polytope of a point set whose convex hull is a simplicial polytope?  But that can't be what you mean: a convex polygon is a simplicial polytope in $\mathbb{R}^2$ (its facets are segments, 1D simplicies), and the secondary polytope of a hexagon is not simplicial: its facets are quadrilaterals and pentagons.

(Image from Discrete and Computational Geometry)
Comment: I apologize for the confusion. The secondary polytope of an n-gon is the associahedron, which is simple not simplicial. By duality I can always study the dual simplicial polytope in this situation. My question should be rephrased as "Is the secondary polytope always either simple or simplicial?"

Secondary Polytope Simplicial?


Altering the message space of Paillier

Question: Is there any obstacle if we restrict in Paillier the plaintext values to be drawn from $\mathbb{Z}_N^*$ instead of $\mathbb{Z}_N$ as the original scheme indicates.
Answer: Nope, you can always restrict your message space to a subset of the message space for which the scheme is defined (which is the case here).
Note that in practice you will deal with messages relatively prime to $N$, i.e., from $\mathbb{Z}_N^*$, anyways (any message not coprime to $N$ - except zero - would allow you to factor $N$ - thus its very unlikely to hit such a message).
Comment: Note that one can compute an encryption of zero from two encryptions of the same messages because of the additive homomorphism though
Comment: @FlorianBourse Yes, I totally agree. But the question asks for restricting (by that I mean input to the Enc algorithm) and not enforcing :) Clearly, if you have a scheme that is homomorphic you can always produce ciphertexts to messages outside a restricted message space by means of the homomorphism.
Comment: @FlorianBourse Yes, due to the homomorphism you may get a ciphertext to a message outside your space (i.e., 0). But I am not sure what your point exactly is.
Comment: The point is just that you cannot force all ciphertext to be for non-zero elements. A friend of mine wanted to use additively homomorph encryption with non-zero elements at some point to build a protocol, and restricting the message space isn't enough.
As the question is not really precise, I wanted to add this comment on your correct answer for more details ;)
Comment: @FlorianBourse this can be done by any homomorphic scheme since they are not supposed to be CCA secure. Meaning, the adversary can alter on its will the ciphertext

Altering the message space of Paillier


Converting point layer to raster grid that shows frequency of points per cell uisng QGIS

Question: I have a point layer that shows the distribution of a species.
Is it possible in QGIS to convert this point layer to a raster grid in which the value of each cell corresponds with the amount of points within that cell?
Until now, I only managed to attach attribute values to the grid cells. I have already added a column in my attribute table that has the value '1' for each point, hoping that there is a way to use a sum of attributes for each grid cell.
Comment: Just a quick note about your logic: If you just sum the values of 1 for each grid cell then you are very likely overestimating richness (if this is what you want to calculate) as this calculation does not check if a species has already been added to a gridcell.
Comment: I have a species distribution pattern, one point per observed individual. I want to check for aggregation and link the distribution of the species to underlying habitat in GIS. Now many points are lying above and very close to each other, so for visualisation I woud like to 'simplify' this pattern and use a grid that shows the number of individuals that have been observed per cell. I hope this explains it a bit better.
Answer: This is a kludge but it does work - haven't found a way to go directly from points to raster yet (but am hoping someone gives a solution here!).
Starting with a point grid (random points in the Serengeti from the Vector|Research tools|Random points tool):

Create a polygonal grid of the same extent and cell size as the raster you'd like to have (this from Vector|Research tools|Vector grid):

Use Vector|Analysis tools|Points in polygon, using the polygon grid and the point layer:

This gives you a new grid (here colour coded by the number of points in each polygon cell):

Now use Raster|Conversion|Rasterize to convert this to a raster, using the PNTCNT attribute for the raster values and the same cell size as chosend for the grid:

... giving a raster with values as per the points in each cell:
Answer: Easiest and most straight-forward way:

Assume you have a column with a unique point identifier (the species name)
Split your Point layer by this Attribute (QGIS -> Data Management -> Split)
Rasterize each individual point layer for instance with the GDAL Rasterize Tool, or the SAGA or GRASS tools available in the Processing Toolbox. Make sure that you use the same cell-size and resulting extent.
Simply sum up all generated Rasterlayers. For instance with the SAGA function "Grids sum" or within GRASS "r.sum". Both functions are available in the Processing Toolbox as well.

In order to do this automatically I would suggest you ether write yourself a script, a processing-model or click x times on batch-processing in the QGIS Processing Toolbox.
EDIT:
If you are capable of using R then just start directly from here and adapt the code to your needs (looping through splitted points).
Or you wait for a little longer. In my freetime I am currently in the process of writing a new plugin for QGIS (dealing with macroecological calculations) and It might have a function similar to what you need.
Comment: I think the question relates to a single **species** layer - which can't (and shouldn't) be split for a solution. OP needs a 'sum of points in raster cell' solution.
Comment: Well you can do it without splitting, but this requires almost certainly a loop, respectively a scripted solution. For a single species your solution is working of course as it simply shows aggregated occurrence density.
Answer: I found this lack of support in QGIS to be very annoying because it is one important geoprocessing step that I always need. Rasterizing via the fishnet, as suggested above, is very slow if you have a lot of data-points (say 100.000) because it performs a vector based operation that consumes your CPU. Furthermore, the fishnet is massive in size compared to a sleek raster layer.
GDAL has functionality to do this operation in a minimum amount of processing time but it is not implemented in QGIS (unfortunately). For the sake of the environment and your nerves, you can use the gdal function, however, on the command line or in other software environments. I prefer to use R that has serveral GDAL related packages. You can see how to do it in R at at Rasterizing polygons with the function "gdal_rasterize" in R.


If a control system is unstable does it mean it will oscillate?

Question: When a plant is known to be unstable, does it mean it will have an oscillation response?
Comment: A system which oscillates but whose frequency and amplitude remain constant can be considered stable ("dynamic stability") , depending on the needs of the plant.
Answer: An example of control system with non oscillatory response.
$$
\frac{d x}{d t} = 0 + u\\
u = x
$$
Closed loop equation of this unstable system is
$$
\frac{d x}{d t} = x
$$
and its response is
$$
x(t) = x(0) \cdot e^t
$$
which is unstable response and does not oscillate.
In general, for an unstable, linear system, the contribution of a pole on the positive real axis is a growing exponential (which doesn't have oscillations).
Answer: From a practical point of view (I am not an expert):
A stable system may also oscillate, however it will oscillate in a decreasing manner (i.e. the amplitude will always drop).

In an unstable system, the amplitude (may or may not oscillate) but the amplitude will increase with time (at least for some time until in some real life systems a limit is reached).
UPDATE

Figure : types of stable and unstable systems (Source roymech)
Answer: Theoretically, when amplitude of the response tends to infinity, it can be said that it is unstable. It doesn't matter it's oscillating or not, tending to infinity does matter.
About rotational systems, tending to infinity means one-way rotation around a center.


Convert $8 {\sqrt 2}$ to $ \frac{16} {\sqrt 2}$

Question: Can anyone please explain to me how this happens!? My brain cannot think how to get from one to the other. Thanks!
$8 {\sqrt 2}$    to $ \frac{16} {\sqrt 2}$
Answer: $$8\sqrt{2}=8\sqrt{2}\times 1=8\sqrt{2}\times\frac{\sqrt{2}}{\sqrt{2}}=\frac{8\sqrt{2}\times\sqrt{2}}{\sqrt{2}}=\frac{8\times2}{\sqrt{2}}=\frac{16}{\sqrt{2}}$$
Comment: Thank you!!! So simply I completely overlooked it.
Comment: @Dani Glad to help
Answer: This happens often to so many students of mine. Always remember this:
$$\sqrt{2} = \frac{2}{\sqrt{2}}$$
In this case, it means $8 \cdot \sqrt{2} = 8 \cdot \frac{2}{\sqrt{2}} = \frac{16}{\sqrt{2}}$
Answer: Hint: multiply the "top" and "bottom" by $\sqrt{2}$
Answer: The following is not a direct answer but a personal way of thinking about irrational numbers a bit more naturally:
I think people are slightly afraid of irrational numbers because it's difficult to imagine them.
If you were to search for $\sqrt 2$ on a number line, you'd be looking in between $1$ and $2$, where you'll be looking between $1.4$ and $1.5$, where you'll be looking in between $1.41$ and $1.42$, then between $1.414$ and $1.415$ and so on until the number you've found when multiplied with itself gives $2$. (which is something that no one who is rational would try to do. This is one of the reasons, I think, that such numbers are called irrational)
It's confusing to imagine the existence of such a number with an infinite amount of digits.
But it does exist and it's nothing to be afraid of.
In your question, you wished to convert $8\sqrt 2$ to $\frac{16}{\sqrt 2}$
If you find it difficult to imagine their equality, then look at how I take advantage of the fact that for every real number $x$, $ \sqrt{x^2} = |x|$:
$$ 8\sqrt 2 =  \sqrt{(8\sqrt 2)^2} = \sqrt{64\times 2} = \sqrt {128}$$
Similarly,
$$ \frac{16}{\sqrt 2} = \sqrt{({\frac{16}{2}})^2} = \sqrt{\frac{256}{2}} = \sqrt{128}$$
From the above, it is hopefully clear that
$$ 8\sqrt 2 = \sqrt{64 \times 2} = \sqrt{64 \times \frac{4}{2}}= \sqrt{\frac{256}{2}} = \frac{16}{\sqrt 2 }$$
The middle part that connects the two takes use of the idea that a ratio can be scaled up or down by any multiple. Thus, a ratio $2:1$ can be scaled up by $2$ as $4:2$
This is the same property that the other answers have used,
$8\sqrt 2 : 1$ had been scaled up by $\sqrt 2$ to $16 : \sqrt 2$
Also, if you familiarize yourself with the powers of $2$, you would realize that
$2^3 = 8$ and $2^4 = 16$ and by the laws of exponents, you can easily come to the same conclusion.


Is there an antimatter sweet spot?

Question: More Details:
Is there a spot with antimatter where the repulsive force of its nucleus and the attractive force of the positrons cancel out? As in if I took a heavy antimatter atom, ionized it, would there be a scenario in which electrons get attracted to the positrons around the anti-atom but cant get close enough due to the repulsive force from the nucleus, so it just sits around it unable to get closer but still attracted?
Comment: Instantaneous down-vote upon posting this, I shall persist! If someone is going to down vote this please tell me my error and why you downvoted so I at least know what i am doing wrong here. If not for this stack exchange but perhaps for others. I insist, beg, whatever, that I know my mistake. Being told you have made a mistake without telling what that mistake was is horrendously frustrating! It makes me think the only mistake I made was being here in the first place...
Comment: Honestly, the whole second paragraph is offputting- I'd remove it if I were you. Not my downvote though.
Comment: Thanks, I was worried about that too, I have made the modification.
Comment: "... the only mistake I made was being here in the first place..." - You are correct. No one is welcome here. I feel the same way every day. Read this and, if you are smart, you'll know the reason: https://physics.meta.stackexchange.com/q/6754/
Answer: If you start with neutral antimatter atom, then you would have to add positrons in order to make it positively charged so that it would attract electrons. While it would be possible to then add electrons to an orbital, that electron would quickly find a positron and annihilate, leaving behind the original atom.
Matter-antimatter systems have been created in labs, the simplest being positronium, consisting of an electron and a positron orbiting each other. This "atom" lasts an average of 0.125 nanoseconds before annihilating into photons.
Comment: Oh just realized what you said, it would indeed need more positrons to attract electrons. Does create a paradox though, if it had less positrons would it repel electrons more than it attracts other matter nuclei (having to push through the electrons), but it probably would still end up being unstable as it would slowely get ionized by fast moving electrons. I do wonder if it would be an easier experiment to do this in reverse, try to stabilize matter in an antimatter environment in a similar fashion. Well I guess that would be something to find out in the future. Thanks for the responce!
Comment: @Terran Similar experiments have been ongoing: https://home.cern/about/updates/2014/01/antimatter-experiment-produces-first-beam-antihydrogen

Is there an antimatter sweet spot?


How safe are flammables as indoor cleaners?

Question: I just cleaned some range hood duct with Seafoam. I was wondering how long after initial application things like it or rubbing alcohol remain active on the surface to present a fire hazard. How do you know which ones are and aren't safe for indoor use where there may be sources of heat nearby (like the kitchen etc.)?
Comment: When used in this context, alcohol would actually be *more* volatile, the word describes a tendency to evaporate quickly. +1 for the answer though.
Comment: Rubbing alcohol will evaporate and dissipate fairly quickly making it less volatile than other fluids. Extremely dangerous fluids like lacquer thinner, acetone, naphtha, xylomine should be used only with proper ventilation. Their fumes are not only toxic if inhaled, but pose a serious fire/explosion hazard.
Answer: Using any volatile and flammable fluid indoors can pose serious health and property damage if used in a reckless manner. By reckless I should say "not adhering to the warnings by the manufacturer". If the item to be cleaned can not be relocated outside than precautions should be taken to limit the build up of explosive vapors. Allowing outside air to circulate through the room to remove the fumes will reduce the chance of a serious "flash over". It would be wise to note any appliances (water heater, stove, heater, etc.) that have an automatic or standing ignition that could ignite fumes. Also realize that even an electric spark from something as innocuous as an electrostatic spark from a carpet can be enough to initialize an explosion. As for knowing when the fumes have dissipated enough to be safe: leave the windows open long enough (after you've capped the fluid and sealed any rags containing residual traces in a metal container) to allow stale air to be replaced. Use your olfactory (nose) senses; if you smell fluid than it's still in the room.


How can I remove the notification header in Android 4.3? (Big hour, date, clear all button, notification/quick setting switch)

Question: As shown in below screenshot: is there a way to remove the notification header, or at least replace it with a transparent image, on Android 4.3?

Screenshot (click for larger variant)
Comment: out of curiosity, why would you wanna do that?
Comment: This is why: http://img812.imageshack.us/img812/4079/ttza.png (it is my actual homescreen)
Comment: how did you make the notification shade fully transparent ? I guess your problem is there not with the buttons themselves.
Answer: Not easily- no. The notification shade is part of the systemUI APK which will need to be de-compiled and reverse engineered to do so. I know of no custom ROM or MOD at this time which will allow for this behaviour; although posting this request on the relevant sub-forum for your device on XDA-dev might turn up a lead.


C# .Net 4.0 Named and Default Parameters

Question: What value do you think named and default parameters will add in C#.Net 4.0?
What would be a good use for these (that hasn't already been achieved with overloading and overriding)?
Answer: It can make constructors simpler, especially for immutable types (which are important for threading) - see here for a full discussion. Not as nice as it should be perhaps, but nicer than having lots of overloads. You obviously can't use object initializers with immutable objects, so the usual:
new Foo {Id = 25, Name = "Fred"}

isn't available; I'll settle for:
new Foo (Id: 25, Name: "Fred")

This can be extended to the general idea of simplifying overloads, but in most cases I'd prefer overloads that advertise the legal combinations. Constructors are a bit different, IMO, since you are just (typically) defining the initial state.
The COM side of things is also important to a lot of people, but I simply don't use much COM interop - so this isn't as important to me.

Edit re comments; why didn't they just use the same syntax that attributes use? Simple - it can be ambiguous with other members / variables (which isn't an issue with attributes); take  the example:
[XmlElement("foo", Namespace = "bar")]

which uses one regular parameter (to the ctor, "foo"), and one named assignment. So suppose we use this for regular named arguments:
SomeMethod("foo", SecondArg = "bar");

(which could also be a constructor; I've used a method for simplicity)
Now... what if we have a variable or a property called SecondArg? This would be ambiguous between using SecondArg as a named argument to SomeMethod, and assigning "bar" to SecondArg, and passing "bar" as a regular argument.
To illustrate, this is legal in C# 3.0:
    static void SomeMethod(string x, string y) { }
    static void Main()
    {
        string SecondArg;
        SomeMethod("foo", SecondArg = "bar");
    }

Obviously, SecondArg could be a property, field, varialble, etc...
The alternative syntax doesn't have this ambiguity.

Edit - this section by 280Z28: Sorry for adding this here, but it's not really a unique answer and it's too long for the comments and includes code. You hinted at the ambiguity but your example didn't highlight the deciding case. I think the example you gave points out something that could be confusing, but the required {} around object initializers prevents an underlying syntactical ambiguity. My explanation for the following code is embedded as the multi-line block comment.
[AttributeUsage(AttributeTargets.Class)]
public sealed class SomeAttribute : Attribute
{
    public SomeAttribute() { }

    public SomeAttribute(int SomeVariable)
    {
        this.SomeVariable = SomeVariable;
    }

    public int SomeVariable
    {
        get;
        set;
    }
}

/* Here's the true ambiguity: When you add an attribute, and only in this case
 * there would be no way without a new syntax to use named arguments with attributes.
 * This is a particular problem because attributes are a prime candidate for
 * constructor simplification for immutable data types.
 */

// This calls the constructor with 1 arg
[Some(SomeVariable: 3)]
// This calls the constructor with 0 args, followed by setting a property
[Some(SomeVariable = 3)]
public class SomeClass
{
}

Comment: Ooh, very nice. I was thinking they'd have to allow readonlys to be assigned to from initializer blocks, but that idea gets messy very quickly. This is much better.
Comment: Although as you say, it would be nice if the constructor appeared by magic.
Comment: I'm curious why they didn't borrow the named arguments syntax used by attributes.
Comment: @Marc: I posted my reply at the bottom of your answer. :)
Answer: It will help to dodge the problem of providing a decent API to work with Office applications! :)
Some parts of the Office API are okay, but there are edge cases that were clearly designed for use from a language with optional/named parameters. So that's why C# has to have them.
Comment: That's kinda what I said ;)
When working with the Office API VB.Net is miles easier to work with than C#
Answer: Optional parameters also avoid the problem where classes provide dozens of methods that are just variations on the arguments accepted.
Consider the Exception class. Instead of one constructor with optional arguments, it has four constructors for each combination of 'has message', and 'has inner exception'. That's alright, but now consider what happens if you provide a null value to a constructor taking an innerException? Does it act exactly like the constructor with with no innerException parameter, sortof like the constructor with no innerException parameter, or does it throw a null reference exception?
A single constructor with 2 optional parameters would have made it more obvious that passing a null innerException was equivalent to not including it at all. A perfect place for default arguments.
Also don't forget that now every derived Exception class also has to include 4 constructors, which is a pointless hassle.
Answer: It will make COM interop a lot easier.
Until C# 4 VB.Net was a much better language for interop. Without defaults you have massive lists of dummy ref parameters in C#.
Comment: Yes - until the big MS bite the bullet and produce a real managed OS (which I can't see them doing any time soon) some apps are going to have to deal with unmanaged calls.
Answer: Brevity of code is the obvious one that springs to mind. Why define several overloads when you can define one function. Also, though, if you have two identically typed parameters, it isn't always possible to construct the full set of overloads you might need.
Answer: Also this doesn't compile:
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
sealed class MyAttribute : Attribute
{
    public MyAttribute(object a = null)
    {

    }
}

class Test
{
    [My] // [My(a: "asd")]
    int prop1 { get; set; }
}

while this does:
[AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
sealed class MyAttribute : Attribute
{
    public MyAttribute()
    {

    }

    public object a { get; set; }
}

class Test
{
    [My] // [My(a=null)]
    int prop1 { get; set; }
}


Will my site containing duplicate content be accepted in Adsense

Question: I've a new site just over 6 months with >50 unique visitors daily. It has good amount of duplicate pages which are not copyrighted. For example I've copied related companies product FAQ's "as is" in the site. Moreover I'm not supposed to modify a company's product's faqs.
I fear my login may be banned by Adsense if I submit it.
So I want to know:
1) Whether I can submit it for Adsense account
2) Whether Google can penalize me and in what way
3) How would Google come to know that the duplicate content on my site is not copyrighted?
Answer: You can use the canonical tag to indicate where any copied content originally comes from:
<link rel="canonical" href="http://www.example.com/original-content.html" />

You shouldn't be penalized if you are not doing anything deceptive.
Comment: Are you sure about it? Will Adsense team consider this tag?
Comment: Do you have any reference to anything that's concerning you? If you're not doing anything wrong you shouldn't have a problem because you could get it reviewed if they make a mistake and ban you.
Comment: Also, I'm a programmer not a lawyer so this could be wrong but my understanding is that there's no real way for content not to be copyrighted as it defaults to the creator when there's no other licenses/contracts etc in the way. I guess the details depend on your location but if you're legally allowed to use the content then there should be some way (or even requirement) of you placing notification of that onto your site. For example, the answers to these questions are the copyright of stackexchange but you're allowed to copy them as long as you attribute it back (see the footer of the page).


Invoking .Net COM assembly from Powerbuilder application (without registration)

Question: We have a Powerbuilder 10 application that is using .Net COM assemblies. We are trying to embed the manifest in the PB application (to invoke COM assemblies without registration). The merged manifest file has added sections for dependecies on the .Net COM assemblies. We have tries various tools to inject the new manifest with different results
- using GenMan32 to inject truncates the application from 6MB to 45KB.
- using ResourceTuner, the file size looks okay, but trying to launch application gives "Fatal Disk Error".
Any suggestions on invoked .Net ComEnabled assembly from PB without registration?
Answer: Have you tried it with an external manifest and ensured that works?  If an external manifest doesn't work, then the manifest information isn't correct.
Once you have a valid external manifest, you might try the Manifest Tool (MT.EXE) from the .Net SDK.  It works well with true EXE files.  As Terry noted though, the PB generated executable contains additional information that tools that manipulate the EXE need to respect or they will break it.
http://blogs.msdn.com/patricka/archive/2009/12/09/answers-to-several-application-manifest-mysteries-and-questions.aspx
Answer: This is more a redirection than an answer. One thing you need to be aware of is that PowerBuilder produces executables that do not follow standards for Windows executable files. Essentially they are a bootstrap routine to load the PowerBuilder virtual machine, plus a collection of class definitions (objects). The cases you've brought up are not the first I've heard of where utilities meant to modify executables don't work on PowerBuilder executables.
As for a positive contribution on what other directions to follow, I don't really know enough to give qualified advice. If it were me, I'd try to register the COM object if ConnectToNewObject() fails, but I've got no idea if that possible or if that route is a dead end.
Good luck,
Terry.


"very beautiful" vs. "totally/absolutely beautiful"

Question: Can I say "very beautiful" or is it incorrect? My English teacher (actually she's not a native English speaker) says it's a mistake. I've seen examples of this usage on the internet, though.
Comment: It depends on the context. If someone were to say, "This is a very beautiful question," I'd side with your English teacher. However, if someone were to say, "This is a very beautiful park," or, "This is a very beautiful beach," I'd have no problem with that. In a sentence like, "She has very beautiful eyes," I don't think the _very_ is wrong, but it doesn't seem to add much value to the sentence, either, and removing it might be considered an improvement, especially in more formal writing.
Answer: 'Very beautiful' is perfectly good English. The only explanation I can think of for your teacher's comment is that she may be thinking of pairs of words like 'angry' and 'furious', where we can say 'very angry' but not 'very furious', because 'furious' has an 'extreme' meaning to it. 'Beautiful' is not (grammatically) an 'extreme adjective'.
'Totally beautiful' and 'absolutely beautiful' are much rarer phrases, and sound more informal.
Comment: @user11584 I would think that of a word like "stunning" or "gorgeous."  Beautiful is one that you could make an argument for either way, though I would tend to side with you.  Your teacher may also have wanted you to avoid overusing the word "very."
Comment: Thank you so much) She told me that 'beautiful' is an extreme adjective of 'pretty'. Nice to know that I wasn't wrong)
Comment: As a writer and teacher, I'm all about using *very* as little as possible. What *does* very add to beautiful? I don't think much. I agree with @Jason Patterson and would go for a different word rather than use "very" beautiful. It just makes for stronger, better writing.
Comment: I was trying to provide a short answer and left out important points, which Jason and CarSmack have mentioned (thanks!): 'very' is often overused, and can lost its force, and 'beautiful' has a number of synonyms, which can add variety, nuance and colour to your speaking and writing.
Comment: @user11584 Like your teacher, I consider beautiful to be an extreme adjective. Those who don't are probably overusing it. That is common with all extreme adjectives, which waters them down, but please don't fall into that trap yourself.
Answer: If you used very beautiful and absolutely beautiful with a native speaker of American English, there would be nothing unusual or strange in what you've said. These are normal register.
But if you said "totally beautiful" you would have to add a "dude" somewhere :-)
That's how Garth and Wayne talk in the movie Wayne's World.
Totally awesome, dude.


Distributed User Authentication

Question: I have an heterogeneous system in my office with different OS and they change rapidly.
I was looking for a solution to get authentication in a distributed way like OpenID so I can login machine_A using user@machine_B, is not important to get authorization and accounting globally distributed only authorization matters, and LDAP is too big for my needs.
cheers
Answer: I have a few customers who have Small Business Server with just 2 people, so you are not too small for LDAP.
Windows SBS (or Foundation server once it arrives in the next few months) would be fine otherwise any Linux or Mac server will provide Kerberos & LDAP for what you need.
Answer: Check out OS X Server's Open Directory.  it'll authenticate Macs, Linux and Windows (via a NT4 style domain, but it works).  More importantly, it's just a bunch of easy clicky buttons to set everything up; very little in the way of difficult configuration is necessary to get it going.  It does tend to be a bit of a black box when anything goes wrong, but is rather stable and so that doesn't happen terribly often.  The only thing is it doesn't scale all that well over remote links; so if you have WAN connections in the middle of some of your users you probably want to look elsewhere.
Comment: those are centralized solution I wondering if a distributed solution exists
Comment: You can hang multiple OpenDirectory servers or LDAP servers off each other to get some distributed-ness to it, but I don't think a truly distributed system like you describe exists, and even if one did it would likely be way more complicated than running a centralized service like LDAP or OpenDirectory.

Distributed User Authentication


Sharepoint online - Folder level access - Settings revert back to "view only"

Question: I'm trying to share folders with specific people in SharePoint online (without granting site access). I am clicking on the 3 dots next to the folder, and selecting Share. I am then selecting "specific people". By default the edit option is ticked.
When I share this link, the user opens the link but the edit permission somehow keeps reverting back to "view" only.
I can open the manage option, and navigate to that user, and the settings have changed to view. When I change it back to edit, it again changes back to view only.
The settings worked perfectly for months, and then only recently this issue appeared, and all of our users can not edit now.
I have also tried to add the person directly, by selecting Manage from the folder, then choosing "advanced" at the bottom right hand panel, and then adding them directly with "contribute" permissions, however it is still not allowing any editing rights.
Everyone that was previously added with edit rights were listed as "links giving access - people  you specify can EDIT", but now have all changed to "Links giving Access - People you specify can VIEW"
Does anyone have any idea what is going on here? I have another site that doesnt have this behavior - and Ive compared all settings in permissions/library setting for the 2 sites and nothing is different.
Im hoping for someone to solve this for me, as Ive had little help from Microsoft.
Thanks for your help
Answer: Whether this issue occurred on only external users or both internal users and external users?
Go to SharePoint admin center->Sites->Active sites, find the site and click "Sharing" button on the ribbon, check if the default link permission is Edit.


Update my iPad Software

Question: If I update my iPad 4 to iOS 8 from iOS 6, will the standard Over-The-Air update procedure delete any of my data? I don't have a computer to back it up, so this is important.
Answer: Generally, updating OTA (over-the-air) is pretty safe, but it's always advisable to have a backup. Doing an update won't clear anything on the device unless something goes drastically wrong.
In my experience, the larger the jump in OS build, the more risk there is of something going wrong with the update. 9 times out of 10, it goes off without a hitch, but every now and then something else comes in to play that can cause the update to fail.
What I would suggest you do is back up your device to iCloud if possible, plug it in to make sure it has a constant power source and can't run flat, and then reset your settings. Don't worry, resetting your settings won't erase any content, but you will have to set things up again such as your home screen layout and your background. To do this:

Open "Settings"
Navigate to and tap "General"
Scroll to the bottom and tap "Reset"
Tap "Reset All Settings"

You may be asked for your pin and iCloud password at this point so go ahead and enter it. Remember, you won't lose any saved information!
The reason I recommend this is that sometimes there can be a preference that you've changed that can cause a hiccup, or the settings have corrupted somehow and the update will freak out about it (this happened fairly infrequently when I worked at an AASP). Doing this will make sure there's no residual "fluff" before you do the update.
Comment: @patrix, according to http://www.apple.com/pr/library/2011/06/06Apple-Introduces-iCloud.html, it was available from iOS 5, so iOS 6 should definitely have it :)
Comment: Does iOS6 already offer backing up to iCloud?

Update my iPad Software


What is the theory behind a gravel bike?

Question: As I understand a gravel bike, it's basically a road frame but perhaps with a slightly more upright riding position. It has wider tires with much deeper treads and a stiffer rubber than standard road bike tires. What is the theory behind these changes? I had always thought that the thicker and stiffer tires were to prevent small bits of gravel from pinching flats, but is the theory instead that the deeper treads and wider tires are supposed to increase traction? And what is the rationale for the upright riding position?
Comment: Manufactures desire to increase n ([Rule 12](http://www.velominati.com/the-rules/comment-page-8/) )
Comment: Re the tires, the main point is that gravel is not smooth, and a wider tire spans the gaps to produce a less jarring ride, and to provide more consistent traction.
Comment: *What is the theory behind a gravel bike?*  The TLDR answer: marketing, aka "LOOK AT OUR NEW SHINY!!!"
Answer: For me, a gravel bike is the perfect commuter bike.
Before, I had a road bike and a hybrid (normal) bike. On nice days I could maybe use the road bike to work, but mostly I would use the hybrid one because of rain/snow, having to carry stuff or whatever. However, going up the hills back home, and even the flats, the hybrid feels sooo slow and heavy. So I recently bought a gravel to replace it for these reasons:

It's almost as light and fast as a road bike, but a bit more comfortable / upright for normal riding.
Wider tires means it handles potholes, road cracks, curbs, tram rails etc much better than a road bike. And of course allow rougher surfaces like gravel.
It often has space and mounting points for proper mud guards / fenders, which a road bike does not.
There is also space enough to use studded tires during winter.
Can mount a luggage carrier properly, so the bike can be used to/from shops.
It has disk brakes that works all season. Expensive road bikes do as well now, but many don't.

So to kinda answer the question, I think its a nice trade-off between a road bike and a standard bike. What people end up using it for may be different, but it clearly covers some uses other bike types traditionally have not.
Comment: Can't upvote enough. Basically Gravel bikes are one bike that lets you do almost anything you want.
Comment: When you say commuting, how far do you mean? Presumably quite far if using a road bike on nice days?
Comment: @thosphor Using the road bike vs the hybrid was for me more about pleasure than strictly saving time. Depending on where I'm biking it's mostly about 3-8 km each way, so not so much that it makes a huge dent in time using the road bike really.
Answer: GCN had a funny take on this recently: Gravel bikes exist because mountain biking is now boring. Or to give slightly more nuance, mountain bikes make it so easy to ride over difficult terrain that they remove the challenge.
Coming at it from the opposite direction, road cycling may be losing some popularity because A) roads in many places are poorly maintained due to austere public-works budgets, and B) motorists are motorists. Which creates some demand for something that you can ride on bad roads/roads that motorists don't drive on.
Gravel bikes generally are designed for a little more comfort and stability than a road-racing bike--more in line with a road "endurance" bike. Hence the more upright position and slacker angles. Some people ride gravel bikes with fat slicks—I don't think you can make any sweeping judgments about tires, other than they're fatter than road tires.
Comment: @ChrisH I think the likes of 3T and Cervelo would be offended if you compared their gravel bikes to a tourer.
The reality is that the gravel bike genre covers a pretty wide spectrum and is still evolving at quite a pace
Comment: A gravel bike with fat slicks is basically a tourer with less luggage - the frame geometry is very similar
Comment: A marketing thing. Another unnecessary great American contribution the cycling world. The re-invention and transfer of the CX bike to the wide market.
Comment: Mountain biking has been boring from the first day on. I´ve been riding a standard Peugeot steel road frame with a slightly bigger back tyre for twenty years now. Great on gravel, *fantastic* on snow.
Comment: @Renaud mainly that it's about 5kg lighter, with better components (the tourer is my first drop-bar bike and very much entry-level). It's a little more aerodynamic with internal cables and I don't have a pannier rack or 3rd bottle cage. But I'd also destroyed my commuter hybrid, so the tourer does that duty now and I had space to store a better road bike.
Comment: @AndyP you're not wrong there, but I wouldn't object to offending them if they noticed me.  Tourers aren't fashionable, and some definitions of gravel bikes are closer to gravel-racing bikes than others, also gravel bikes are likely to be lighter
Comment: I particularly like the "roads motorists don't drive on". I'm an MTB rider who ocasionally rides on road and indeed, the roads less used by motorized traffic are indeed rough tarmac and poorly maintained. I use skinny (by MTB standards) slicks and ride up to par with road bike users (I also use less tire pressure).
Comment: Cont'd: My hybrid bike is MTB frame based with rigid fork. If I wanted to go closer to "road geometry" I certainly would like to conserve the fatter knobby tires, as I'm used to non smooth terrain and rely on tires to absorb part of the hits. On those poorly maintained roads where a shallow  pothole or crack in the tarmac can "appear suddenly", a thicker tire can plow through with absolutely no fear of pinch flats or rim damage, where as my road bike riding buddies do have to evade and/or brake for most cases.
Comment: @ChrisH 3 years after this question, I understood you bought a gravel. What was the added value of the gravel compared to your tourer?
Answer: My theory and it is just a theory. In the U.S. at least there has been a proliferation of unpaved bike trails due to the conversion of abandoned railroad rights of way to bike paths. They are for the most part either flat or have a slight grade. Most of these trails are too uneven for a conventional road bike. At the same time they are not much of a challenge for a mountain bike and are mostly an access point to more technical trails. So now we have a reason to buy yet another type of bike. With a gravel bike the gearing allows much higher speed than on a mountain bike. You're  on a route that is pretty much guaranteed to be free of motor vehicle traffic so you can basically go as fast as you're comfortable riding. The larger tires allow better traction on loose surfaces while increasing comfort. So while the riding environment is similar to cyclocross the two frame geometries are different in a sense like a Tri bike and a road bike, functionally the same but tweeked for a more specific type of riding.
Comment: "With a gravel bike the gearing allows much higher speed than on a mountain bike" – well, mountain bikes come with very different gearings. Newer 2×10 or 3×8 mountain bikes generally have all the range you could ever wish for; it's the 1× hype that has sacrificed some of this flexibility. (But with a sufficiently big chainring, 1×12 gets you very fast too). And downhill bikes have fast gears allright, just no light ones – but they're unsuitable for speed on the flat for other reasons, not to speak of longer distances.
Comment: @VladimirF that's a different matter.  CX round here at least is often more mud than gravel, needing some grip, and road race frames when that rule came in were designed for skinny tyres like max 25mm, or maybe slick 28s at most. CX also prioritises speed while I may have to pick my way over stuff.
Comment: *Too uneven for a conventional road bike* is a sales pitch really. On (slick) 28mm tyres I can get over most stuff short of red MTB trails unless it's too muddy for the wheels to grip.  On coarse gravel/dirt the speed is the same as my hardtail with gravel tyres.
Comment: @ChrisH But a good-sized rut in the gravel can still cause a nice pinch flat with 28s.  Which, if you're going fast enough, causes you to lose control badly enough to pitch you into a thorn bush...  :-/
Comment: @AndrewHenle my only ever pinch flat was on tarmac, a pothole I couldn't see in time to do anything about. [This timelapse](https://www.youtube.com/watch?v=vifFQ8EHTRY&t=35) that I've posted before doesn't show the 10" dropoffs on that ride (and I think I was on 32s then), but I did some heavily potholed gravel byway yesterday on 28s
Comment: @ChrisH I doubt they had to ban tyres larger than 33 in CX because of a sales pitch. They were often more efficient.
Comment: @leftaroundabout most Gravel bikes I've looked at seem to run a 46/30 tooth crank and an 11t small cog on the cassette. I assume that's is appreciable taller than 42/32/22  tooth crank even with an 11 tooth cog on the cassette.
Answer: I think you are asking two separate questions:

What's a gravel bike and why are they popular?

Why are off-road tires designed they way they are? (Which applies equally to mountain bikes and hybrids)

Gravel bikes have longer seat stays and more relaxed steering geometry than road bikes, which makes them a little more stable on loose surfaces. They have wider tires that allow riding on rougher surfaces. There are many reasons why they are popular - filling a gap between road bikes and increasingly heavy and complicated mountain bikes, suitability for touring or bikepacking and suitability for general riding with increased comfort are some of them.
I think you are perhaps a bit confused about off-road tire design. Off road tires do not have to be stiffer but they do have to be tough to deal with more flexing and distortion. A thick tread is not totally necessary either, slick low pressure tires will actually grip pretty well on dry gravel. Lower pressure increases the contact patch side and does increase traction on loose surfaces.
Comment: I don't know about theory but one my nastiest falls was coming around a curve into some deep loose gravel.  If these bikes can prevent that then they are a good idea in my book.
Comment: We don't have a lot of 'gravel' roads in the UK, but does gravel generally mean a non-smooth but solid surface, e.g. it's rough and bumpy but the surface stays where it is; or does it genuinely mean there is a covering of loose gravel on the ground, like a shingle beach?
Comment: @Wilskt https://en.wikipedia.org/wiki/Gravel_road. Gravel roads are constructed with loose gravel but the particles are angular and  compacted to form a solid road surface (there will be some loose material on the surface of course). The term is also used for poorly maintained tarmac with loose material and compressed dirt where no gravel has been added.
Answer: What is called a "gravel bike" is really a new word for a cyclocross bike, but with maybe a tad less aggressive geometry. And cyclocross goes back pretty much to the beginning of bicycling, as the first races were held on unpaved courses and no roads were paved yet, or at best cobbled. The original road bikes looked a lot more like today's cyclocross bikes, only a pound or three heavier.
I personally don't like the name "gravel bike". Gravel is the stuff they dump along the train tracks near my house to deter mountain bikers, or the stuff you decorate your yard with if you live in places like Las Vegas, but I rarely encounter gravel out on the trails here in northern California. Maybe some gravely stuff mixed in with loose dirt intermittently, but there's nothing too fun or challenging about riding on a layer of gravel as there is a natural dirt or muddy path.
In theory, I doubt you will be able to ride one off road without encountering mostly dirt. The style of bike is ideally suited for trails. They should call them "fire road bikes" or something more realistic if "cyclcocross bike" is too worn out for the marketers.
I would call the bike I commute to work on a gravel bike because I built it with a steeper stem  to bring the bar up so I can see traffic easier, and a single, low gear, 38/18t. But it started life as a 'cross bike. A gravel bike might be ideal as a commuter bike, especially if you can outfit it with panniers, lights, etc.
Comment: @MaplePanda: My travel bike is a Focus Mares cyclocross from 2008. My longest trip was over 3000km through Scandinavia and took more than a month (all nights spent in a tent). Can't complain about the comfort. Today I'd get a gravel bike with supercompact crank set and long chain stays for better handling with luggage.
Comment: CX is a race discipline. You wouldn't find an all-day or even a multi-day ride on a CX bike nearly as comfortable as one on a gravel bike.
Comment: It is like a cyclocross bike but comes with features meant for longer more stable rides potentially with lugage and definitely with two bottles.. Not for ultra twisty chicanes of a racing course but for eating some miles on reasonable trails/unpaved roads. I do not mind to jump of my gravel bike, shoulder it over some stairs/a creek, quickly jump on behind the obstacle and I like watching CX races but I like the more stable feel of the gravel bike for most rides. does it necesarily need a new name? Probably not, but it makes more clear what one is buying.
Comment: @Michael Of course there's nothing saying you ***can't*** ride long distances on a CX bike, but you'd certainly be better off on a gravel bike if you had that choice.
Comment: @MaplePanda In the US at least, many frames billed as CX had more of an endurance road geometry, like road-oriented gravel bikes. CX bikes were often raced in the US season, and then used for commuting or possibly touring at other times of the year. You are absolutely correct if you're referring to a CX *race* bike, which I think is basically a criterium-specific bike with bigger tire clearance and maybe minus the water bottle bosses.
Comment: I have both a hybrid that's been modified to what is sold as gravel bike these days and an actual road bike. For long rides I'd choose the road bike unless I have to take unpaved roads. Anyway, in 2008 most things that were sold as cyclocross bikes were not exactly racing oriented.
Comment: I agree with every one of these comments.
Answer: Here's an alternate take. We might think of performance road bikes, endurance road bikes, all-road bikes, adventure gravel bikes, and hardtail MTBs as forming a spectrum of bikes. Each of the identified bike types is a discrete place on that spectrum. As you go toward hardtail MTBs, you can comfortably navigate more and more technical terrain - tighter switchbacks, rougher surfaces, short steep climbs, short steep descents.
Also, each bike has an operating envelope. I can ride my older performance road bike with 25mm tires on dirt roads in the Midwestern US. When there's a layer of loose gravel, that becomes actively unpleasant and a bit sketchy. Many other older performance road bikes had even narrower operating envelopes. For a modern endurance road bike, which can often take 32mm tires, even a bit of gravel is comfortably in the performance envelope. You could complete Unbound on some endurance road bikes, like the Trek Domane with 38mm tires. It might not be the most comfortable, of course.
Or consider an adventure oriented gravel bike. This is at home on a lot of terrain that would have challenged old MTBs. In terrain where you need a full-suspension MTB, it will definitely be outmatched. If you put slick tires on it and ride it on tarmac, it will also be outmatched.
Thus, what type of bike is optimal for you depends on your local terrain and on your preferences. Gravel bikes have bigger operating envelopes than performance road bikes, so they're fine on more terrain types including paved roads.
juhist's answer may overstate some points, but he is correct that performance road bikes are designed for relatively narrow performance envelopes. They go really fast on tarmac. They are also designed for more aggressive riding positions than most non-racing consumers should want - you can ride one, but you're probably going to need a lot of spacers.
The market is evolving. I'll quickly discuss some of the changes.
Endurance road bikes
These are still optimized for tarmac, but as stated above, they can actually handle light off-road scenarios. Many people do the Belgian Waffle Ride in the US on endurance road bikes.
They tend to have more upright riding positions than performance road bikes. I haven't comprehensively surveyed them, but they will probably tend to have trail figures in the low 60mm range, a bit more stable than performance road bikes which I think are in the mid 50s. Their wheelbases will probably average a bit longer than performance road bikes. Their carbon layups or tube selections are probably oriented more towards comfort and less towards stiffness. Current generation ones can take 32mm tires, often more. Of course, some performance road bikes are creeping towards clearance for 32mm.
All-road bikes
This term isn't well-defined. It may originate with Jan Heine, an engineer and bike enthusiast who has some opinions that may be controversial, but who has been on the right side of a number of developments (especially wider tires on road bikes). They are similar to endurance road bikes.
This BikeRadar article gives an opinion on the term. They probably come stock with road groupsets (e.g. Shimano 105), and not gravel groups (e.g. Shimano GRX), but I'm not 100% sure on this part. For example, Shimano's GRX 800 group with the 48/31t crankset would be a fine fit for all-road bikes. Their tire clearances are probably a bit less than road-oriented gravel bikes.
Road-oriented gravel bikes
Gravel racing bikes are part of this category. I think that if someone says "gravel bike" without any other qualifiers, they are probably thinking something like this. However, this category may overlap with the all-road bike.
I'd expect trail figures about mid 60mm, and clearance for about 45mm tires in modern bikes. These can definitely be used for bikepacking. The ones that aren't gravel racing oriented can still be raced. You can expect three bottle cage mounts and a top tube bag mount. All-road bikes may not have these.
Adventure gravel bikes
These will have longer wheelbases than the former category. Some of them may have MTB-inspired geometry, i.e. very high trail, long TTs, short stems. If so, they'll be more capable in MTB-style terrain. That said, suspension is still rare on gravel bikes. You should expect tire clearance of 50mm for 700c wheels, and a bit more for 650B. These may add even more mounts than previous, e.g. mounts on the fork blades. If you showed this type of bike to a traditional roadie from the 2000s, typical reactions might include dismay, derision, or both.
Evil Bicycles' Chamois Hagar is one bike like this. From an older Cyclingtips review, the manufacturer claims

more stability on loose terrain, more confidence in tricky situations, more speed overall, and — listen up, big-footed riders! — an end to toe overlap.

James Huang, the reviewer, described the Chamois Hagar as very stable at high speeds, and he said that riders could simply dive the bike into a corner with loose gravel without fear of the front wheel sliding out. He and a co-reviewer described the bike as very stable on descents. One downside was that at low speeds, the bike didn't hold its line very well on technical climbs; this is a consequence of an aspect of bike geometry called wheel flop.
Adventure gravel bikes vs hardtail MTBs
At some point, you'll really be better off on an MTB. I have almost no MTB experience, so I can't really say what that point is. I can tell you that I have ridden a very road-oriented gravel bike on some local MTB trails, and it's definitely not optimal, but I can stay on the trail. Suspension and flat bars are the major differentiating point here.
Suspension exists for gravel bikes, but it has very limited takeup right now. I don't expect a lot of gravel bikes to incorporate it. It does have major advantages for traction - keeping the wheels in contact with the ground - on very rough terrain. But most gravel bikes don't need suspension, and suspension does add maintenance requirements. You get enough suspension from the tires.
Comment: With the update, it should be noted that both Fox and RockShox have released gravel-specific suspension forks: Fox 32 AX and Rockshox Rudy. Other manufacturers may soon follow suit.
Answer: Q1: Riding position
A1:
Do you know the riding position of a so-called gravel bike and a regular road bike could be 100% identical?
Let me show you my real case.
I just have a s-works diverge (so-called gravel bike) and a giant advanced tcr (so-called regular road bike).
I have carefully studied their differences which include geometry. Here is part of my study work.

And, let's put them together now and check it again.

They are almost 99% identical. Surprised? But, too see to believe, right!
The so-called gravel bike has slightly higher handlebar but it is under the range of fitting and adjustment. Actually, the riding position of my diverge (so-called gravel bike) is more aggreesive than the tcr (so-called road bike). If you like to, they can be adjusted to 100% identical easily.
Q2: The tires which gravel bikes use.
A2:
The key characteristics of a so-called gravel bike (here is the diverge) might include:

It is much more comfortable and enjoyable riding experience.
Slightly longer wheelbase.
It is also an adventure machine.
It is as fast as the regular bike or even faster. (I have multiple new PR with the diverge)
It can not replace the XC and DH MTB. For technical off-road, I will wish I ride a MTB or a specific purpose bike.

It is quite similar to the relationship of a SUV and a regular car.
Thus, the so-called gravel bike usually uses wider tires (>=38C).
But, some of your knowledge about gravel bike might be not so correct.
The thread of gravel tires is not necessarily deeper. There are gravel tires without thread (e.g. Gravelking)
Check here to find the thread of a gravelking plus tire: https://www.panaracer.com/lineup/gravel.html
Ok, it is my study work. It might not be your expected answer but I wish it will be helpful.
Final words and it is an important reminder.
The upper case is just only one of gravel bikes which are recoginized by the gravel players' community. Actually, there is not a single kind of gravel bikes but many many kinds.
That's the reason I use "so-called gravel bike" but not "gravel bike" in the article.
Cheers
Comment: The bikes overlay shows a noticeable difference in front wheel position which translates into really quite a big difference in handling. comparing rover safety bicycles in your way doesn't explain why head angle and fork rake are important.
Answer: There's an interesting discussion with Josh Poertner, an aerospace/automotive engineer turned pro cycling consultant, on finding the most efficient tire pressure for different riding conditions. Basically, high pressure tires are less efficient on imperfect surfaces because of kinetic energy lost by bouncing the whole bike up and over a small object or road crack, where a low-pressure tire can absorb most of that impact without disrupting your momentum. The rougher the riding surface, the lower the pressure needed for optimal efficiency. Wider tires can run at the lower pressures needed for efficient riding on gravel, and the aero tradeoffs are smaller at gravel speeds.
I think the more upright riding position has to do with conservation of effort and a reduced tradeoff between aerodynamics and handling. Since your not breaking any land speed records on gravel, getting max aero out of your stance isn't as crucial, but picking (and staying on) the best line often is. Raising the bars up lets a rider use flared-out drops to selectively widen their grip for better control, when needed, without getting completly horizontal in the process. I've seen some gravel riders who spend upwards of 50% of their time in the drops, vs. road cyclists who are maybe using them 10-15% of the time.
These are just some of my observations as a strictly non-competative cyclist who only recently got into gravel. I also happen to think my basic-B of a gravel bike makes the perfect everybike for all around riding. It's a great all-weather commuter, has almost identical gemoetry to some high-end randonneuring frames, and can even tackle a bit of singletrack.
Answer: My very short take: there was a gap in the market coverage for mid-range and high-end bikes for generalist bikes that can be comfortable on "bad roads" but still maintain some performance on tarmac. The road segments focused on tarmac, the MTBs went further into the technical stuff. But for many people, there's a secondary network that is not technical enough for MTBs and too rough for road bikes. The segment gap couldn't be addressed from the MTB side, because it departed from there (hence the "gravel bikes are the new 90's MTB), and it came from the road segments. Ironically, on entry level bikes, this use-case was covered (the so-called "dual sport" bikes).
Of course some will say "the geometry is very close to touring/cyclocross", but touring bikes are rugged bikes meant to be bring you reliably in remote areas (so no carbon frames, no fancy transmission, no hydraulic disc brakes, only durable tires,... only proven stuff) and cyclocross are meant to be raced on cyclocross tracks, not for long straight "groads" and often lack mounting points that you may need to attach accessories for (very) long rides — and being a UCI-race discipline, cyclocross was also limited by the rules of that discipline.
Answer: I't only a marketing hype.
Gravel can be identical to road bikes.
You can put a bit wider tires on a road bike, like 28C to make it more comfortable.
Comment: You can put 32mm tires on many model year 2019 and later road bikes. Many gravel bikes can clear 40mm 700c tires at the bare minimum. "Gravel bikes can be identical to road bikes" is not literally true even if we focus on just tire clearance. You could improve the answer by showing how gravel bikes can have a lot of functional overlap with endurance road bikes, but I suspect that if you considered the issue, you'd see differences that aren't just marketing.
Comment: Fair point here - if you go back in road bikes to the 80s, frame clearances can be absolutely enormous, capable of taking 30-50 mm-wide 622/630mm tyres.   So the theoretical gravel bike and the modern road bike have a common ancestor, along with touring bikes.
Answer:
As I understand a gravel bike, it's basically a road frame but perhaps with a slightly more upright riding position. It has wider tires with much deeper treads and a stiffer rubber than standard road bike tires. What is the theory behind these changes? I had always thought that the thicker and stiffer tires were to prevent small bits of gravel from pinching flats, but is the theory instead that the deeper treads and wider tires are supposed to increase traction? And what is the rationale for the upright riding position?

Gravel bike is a road bike done right. I personally think that what is currently called "road bike" should be called "racing bike", and what is currently called "gravel bike" should be called "road bike". But, you cannot change the existing terms so they had to invent a new term.
The upright riding position allows you to actually enjoy cycling without suffering from pains during and after your ride.
The wheels of a gravel bike are more likely to have the full number of spokes (36 per wheel). Such a spoke count makes a more durable wheel, and a 36-spoke wheel does not instantly go completely out of true if one spoke breaks.
The tire clearance of a gravel bike allows you to avoid the excessively narrow 23mm tires that many racing ("road") bikes must use because even 25mm tire might not have enough clearance to work with e.g. a broken spoke or some room for mud if riding on muddy roads. In contrast, you can pick some reasonable tire like 28mm or 32mm tire -- the 28mm or 32mm tires can be pumped to usage pressure in an easier manner by a pump that you can actually carry with you in case of punctures, and less likely to pinch-flat than 23mm tires. If riding in a location that has a true winter, you most likely are able to find studded winter tires that fit a gravel bike, whereas you cannot fit such tires to a racing ("road") bike.
A gravel bike is more likely to have possibility to fit pannier rack and fenders. Very useful if you actually use your bike for useful transportation like going to a grocery store instead of going for a 20km bicycle ride starting from your home and ending to your home, and then afterwards driving 10km to a grocery store by a car and driving back the other 10km.
A gravel bike is more likely to have disc brakes even though such brakes are becoming more common on even racing ("road") bikes. Very useful in the rain.
A gravel bike is more likely to have an actually useful rear cassette. In contrast to the current trend of 11 or even 12 sprockets in the rear, which makes the gear changes excessively small if you have a racing-style cassette with very small biggest sprocket (a hill ahead of me? click... click... click... oops nothing happened, oops I forgot that I have a 12-sprocket cassette with fine spacing so I must click three times more for a total of 6 times!), a gravel bike is likely to have a cassette where the biggest sprocket is actually so big that the gear changes actually do something. Not that you need a big sprocket, but it's because the current trend of 11 and 12 sprocket cassettes necessitates a big sprocket in order for gear changes to do actually anything that you can feel at your feet. Of course the best way to solve the gear count problem would be to go back to 6- or 7-sprocket drivetrains, but that cannot be done due to marketing reasons. You cannot reasonably today sell a bicycle with 6- or 7-speed drivetrain, as nobody would buy it.
A gravel bike is less likely to contain lots of carbon fiber in e.g. the frame, fork or load-bearing components. In contrast, a gravel bike is more likely to have a reasonable frame and fork material (i.e. butted high-strength chromium molybdenum steel or other similar high-quality steel alloy). You don't have to purchase that $100,000 X-ray machine and find some location in your home to install it and supply electricity for it so that you can inspect your carbon fiber components every time for damage after you fall. In contrast to carbon fiber that can suffer invisible internal damage after falling that is only detectable with methods such as X-rays, metals always fail at the surface so after falling you can just keep an eye on developing cracks at the surface of the metal. Most cyclists buy carbon fiber and skip buying the all-important $100,000 X-ray machine and only hope for the best after falling, because a carbon fiber component is expensive to replace. My approach for avoiding the $100,000 X-ray machine problem is to avoid carbon fiber.
A gravel bike is less likely to be excessively lightweight and emphasizes durability over light weight. This is very useful, because an excessively lightweight bike fails in no time, perhaps in a dangerous way.
Some time in the past cyclists wanting a reasonable bike had to buy a drop bar touring bike (oops, it has a too low bottom bracket), or a cyclocross bike (oops, it has too low handlebar position). No need for that anymore, as you can purchase a gravel bike with neither of these problems.
About the only problem with gravel bikes is that the preinstalled tires are gravel tires (they have to be, otherwise you couldn't name the bike "gravel bike"). You can fix this problem by removing the gravel tires and installing high-performance slick tires, if you mainly ride on pavement.
I recommend selecting gravel bike as your only bike. If riding often on roads having soft (muddy? snowy?) surface, of course you might benefit from a second bike (MTB? fatbike?) with even thicker tyres.
Comment: As a proud rider of a CF gravel bike with high performance slicks and tightly spaced 11s cassette, I agree with the "road bike done right" sentiment, but the rest of this rant is just ridiculous. People with different needs prefer bikes with different configurations, get over it.
Comment: Your personal rant against carbon is off-place. Carbon fiber is widely used for gravel bikes or for mountain bikes. Carbon fiber is also more likely to survive many types of hits (in comparison to alu alloys) or even bashing with a hammer. And, of course, calling gravel tyres the problem of gravel bikes is just peculiar.
Comment: Most road cyclists will absolutely disagree with the return to 7 gears. Yes, in the time of 13-25 cassettes,  7 gears was enough, but people want wide gears to hit the hills and they are not Eddy Merckx so they want large cassettes andstill also the 11 sprocket because of the compact cranks. A 8-speed cassette 11-32 I have is fine off-road, but clearly lacks the intermediate gears on the road. The ratios are big. So for a gravel bike to be useful as "road bike done right" it neads "at least" the 9 gears of Sora, but better the 11  gears of 105.
Comment: Focusing on the misstatements here: many gravel bikes don't have rack mounts, and some even lack fender mounts. They are designed for tires much wider than 28mm. In fact, current generation performance road bikes can easily take 28mm, and the current model year can generally fit 32. Cyclocross bikes do not inherently have low stack; the race-oriented ones may have fit like a race bike, but many CX bikes were basically gravel bikes under a different name with cantilever brakes. The post implies that gravel bikes don't have 11s drivetrains; this isn't so.
Comment: The post argues that the gearing jumps on 12s cassettes are impractically small. This isn't my experience, but one's needs may differ. Fortunately, all the big 3 manufacturers do make wider range cassettes, e.g. Shimano and Campy have 11-34, SRAM has 10-36 for its road groups, and some gravel bikes come specced with SRAM 10-50 MTB cassettes. You might have a point if you address the fact that the big 3 have been late at tackling the need for sub-compact cranks on road bikes; SRAM may come the closest there with its Force Wide gearing.
Comment: Can you explain _"a cyclocross bike (oops, it has too low handlebar position)"_ to me please? What's wrong with CX handlebars?


Dynamic swap file like in Windows?

Question: I would like to install Ubuntu to a 8GB USB stick so really don't have space for swap. I have 8GB RAM and the most memory intense apps I use are Firefox and LibreOffice. I don't use hibernate. I know you can have a swap file in Linux but can you have one that grows and shrinks as needed? That would give me a safety net and most likely not make me loose any space with low swappiness. I researched the topic and found these steps:
sudo mkdir -p /var/cache/swap/

sudo fallocate -l 1G /var/cache/swap/swap0

or alternatively if the above fails:
sudo dd if=/dev/zero of=/var/cache/swap/swap0 bs=1M count=1024

Then:
sudo chmod 0600 /var/cache/swap/swap0

sudo mkswap /var/cache/swap/swap0

sudo swapon /var/cache/swap/swap0

The add this t /etc/fstab:
/var/cache/swap/swap0    none    swap    sw      0 0

Then install swapspace to make the swap file dynamic:
sudo apt-get install swapspace

And that is it? Just installing swapspace will decrease my swap file from 1GB to zero and let it grow up to 1GB?
Answer: Well you can try of course mentioned approaches. One more simple thing is to install Ubuntu just without swap partition at all. Linux will not block you from this, it can work without swap.
Answer: swapspace is your friend - it dynamically resizes a swap file when you need extra memory (but goes away when you don't).
Comment: Although swapspace may be a good solution for some installations, the fact that it is an unmaintained package and has not been updates since 2013 may cause it to be less than fully compatible with  current systems.
Comment: Could you elaborate?

Dynamic swap file like in Windows?


Ionic Capacitor - Screenshot to Gallery (iOS)

Question: Haven't been able to find any solution to this.
I'm using Ionic Framework 5+ and using Capacitor 3+.
I need to be able to have the user take a screenshot on iOS and Android and have that screenshot automatically saved to the users photo gallery.  Android works just fine with the following code.  iOS also works, however it saves the file in a temporary directory so I need to move the file to whatever directory it needs to go to on iOS so the user can see it in their photo gallery.
import { Screenshot } from '@ionic-native/screenshot/ngx';

this.screenshot.save('jpg', 80).then((res) => {
  this.filePath = res.filePath;
  console.log(this.filePath);
});

Is there a way to use the FileSystem Capacitor API to save this photo at this this.filePath to the iOS gallery?
Is there another way to go from screenshot to gallery on iOS?
Comment: I will ask a (maybe) stupid question, but do you have all the permissions required on iOS (like storage)?
Comment: It's not a stupid question. I can confirm all relevant permissions.
Answer: On iOS the gallery is something external from your app and can't be accessed through the Filesystem plugin because there is no path to it (and even if there was, iOS apps are sandboxed, you can't access other apps, only your app contents)
You can save a native UIImage to the gallery with this native code:
UIImageWriteToSavedPhotosAlbum(yourImage, nil, nil, nil) but you have a native path, not an UIImage, so you'll have to convert the path to UIImage first, with something like let yourImage = UIImage.init(contentsOfFile: imagePath). So, with that code you can create a plugin that send the path and saves the image to the gallery.
You can also search for plugins that already do that.
There is this one that saves a base64 string that represents an image into the gallery
https://ionicframework.com/docs/native/base64-to-gallery
There is also capacitor-community/media that has a savePhoto function, which takes a path and saves the photo to the gallery
https://github.com/capacitor-community/media#api
Comment: The first plugin seems to be deprecated and no longer maintained- it has issues with latest version of Ionic and Capacitor.  The second capacitor-community doesn't work on Capacitor v3+ and throws errors on iOS.
Answer: This works for iOS.  I'm using it in production at the moment.  The fundamental problem had to do with the fact that the Capacitor Community Media library wasn't documented very well to specify exact formatting needed to make it work.  This is the working package.json version of the library: "@capacitor-community/media": "github:dragermrb/media".
this.screenshot.save().then(async (res) => {

  const savePhotoResult = await Media.savePhoto({
    path: `file://${res.filePath}`,
    album: this.album.identifier
  });
});


How to convert eaton type BRD to type BR and is this a good idea?

Question: There seems to be a shortage of breakers around me. No one has the Eaton type BR breaker in a 20 tandem. Electrical supply house handed me a BRD type and I had heard about removing the metal plate in back but unsure how to do it and whether it's a good idea. Can't find any info on youtube...will a flat screwdriver take care of its removal?
Comment: Can you post photos of your panel, including the labeling on the inside of the door?
Comment: @DAS -- post your photos to [imgur](https://imgur.com) and then post a link to them here in the comments -- we *need* photos to sort this out, especially photos of the label on the inside of the door
Comment: It is an old 1980s Eaton Cutler Hammer Crouse Hinds 24 space unit. Pictures on this site are hard for me. And I went to 3 electrical supply and distribution places near me. I am REPLACING an existing tandem.
Comment: Wait.  Is the panel a Cutler Hammer, or a Crouse Hinds? Those are different things. It can't be both.
Comment: Crouse Hinds. Will try to post pics tomorrow.
Comment: This appears to me to have veered way off course. The question has to do with the breakers themselves, on the notched ends, how to remove the metal clip in the back of the BRD breaker. Do I really need to document how I trudged to school in the snow 40 years ago to get an answer? ;) I mean no disrespect!
Answer: First, make sure you are searching broadly. Many homeowners get stuck in the "big box store" rut and search only Lowes, Home Depot and Menards... failing to realize that family-owned lumber supplies, electrical supply houses, and hardware stores all sell breakers.
Look at your bus stab for notches. Or, Plug-on Neutral.
You cannot put tandem breakers anywhere except where it's allowed by the panel labeling.  Fitting them where they aren't allowed generally means putting more breakers in the panel than it was designed, tested or approved for.
It is common for Eaton's label to not specify which spaces are allowed (some diagrams don't even correspond to the panel)... in those cases, they instruct you to look at the bus stab: a solid/square bus stab does not allow tandems/quadplexes, however, a notched bus stab does.
The reason is CTL, or Circuit Total Limiting.  This was a NEC and UL requirement from 1966 to, I want to say, 2014 or 2017.  CTL panels have notches in their bus stabs where tandems/quadplexes are allowed.  CTL panels also have labeling indicating that you must use "CTL" breakers such as BD, BQ, or BQC.
Of course there were some pre-1966 BR panels still out in the field, which were entitled to use double-stuff breakers, but did not have stab notches.  To support these panels only, Eaton continues to make the "BRD" breakers - however it is a Code violation to fit a BRD breaker in a CTL panel, because that would let you defeat the CTL limitations.
NEC recently dropped CTL as a requirement.  That does NOT give you a free ride on any existing CTL panels; they have not been tested by UL for, and have not been approved for, double-stuffs in any space. Keep in mind that panel makers did not immediately change their designs and immediately get UL approval: so CTL still applies to older designs bought today.
However, if you buy a new design panel which has been UL-certified to be non-CTL, then you can (as always) use any breaker listed in the panel's labeling.  ThreePhaseEel, who knows 10 times more about panels than I pretend to know, says that all Eaton "Plug-on Neutral" designs are post-CTL and are approved for double-stuffs in any space, including BRD type.
All that to say... if you have a CTL panel and the breaker space is allowed to use a BD breaker...  I don't see a problem with temporarily using a BRD breaker.  You'll need to correct it before next inspection (typically at house sale time).  And make sure no maintainer moves it into a non-tandem space.  It's a violation but a statutory one.
Comment: So, "temporary" could mean 25 years, eh?
Comment: Note that BR PoN panels do *not* have the notched CTL bus stabs, but *do* support tandem breakers in all positions using BRD (non-CTL) tandems
Comment: @ThreePhaseEel thanks. Interesting.  So their PoN panels postdate CTL abolition?
Comment: Please refer to the above comments, plus: can you provide a picture showing the notches? On my panel there are no markings for tandems only in certain poles. The above doesn't help with adaptation of the BRD breaker to fit like a BR breaker (the idea of one CED employee) by removing the metal tab in the back so it can fit in the panel....i understand what you've written, will double check the panel and report back.
Comment: @Harper-ReinstateMonica -- PoN as a concept is basically post-2008 AIUI -- the first gen CH PoN panels are the only ones that *might* have predated the 2008 NEC, and even so, I KDI
Comment: The above discussion dies not answer my question. If it's not allowed, or per Code, i just need to know.
Comment: @das modifying the breaker is illegal period. NEC 110.3. That guy is not a reliable source.


If the RPM of the Gyro is increased due to high Vacuum Pressure. Will it increase rigidity and resist precession?

Question: If the RPM of the GYRO of the Attitude Indicator or Heading Indicator is increased due to high vacuum pressure. Will it increase rigidity in space and resist any force applied and it will not precess? or will the precession be more exaggerate the reading?
Answer: it will hold position more tenaciously with a faster-spinning rotor in it. But it will also wear out its bearings faster, and thereby fail sooner, that a slower-turning rotor. Gyro instrument performance is a compromise between locking on and holding a certain attitude or gimbal position, and bearing longevity.
Answer: Basic physics will help in understanding (From my ATPL book)
When the rotor is made to spin, the device becomes a gyroscope possessing two properties :

Rigidity (or gyroscopic inertia); and
Precession.

Rigidity
Rigidity is the property of a gyroscope which resists any force tending to change the plane of rotation of its rotor.  As a result of rigidity, the spin axis tends to maintain a fixed direction in space.  Rigidity is dependent on three factors :
(a) the mass of the rotor;
(b) the speed of the rotation (RPM); and
(c) the distance of the mass from the centre of the rotor (radius).
The mass and radius of the rotor determine its moment of inertia.  Rigidity is proportional to the rotor's moment of inertia (I) and its angular velocity (represented by the letter omega)

Rigidity is the property of the gyro which allows the gyro to be used as an independent stable reference.
Precession
Precession is the change of direction (angular change) of the plane of rotation of the rotor caused by an applied force.  The amount and rate of precession is dependent on three factors :-
(a) the magnitude and direction of the applied force;
(b) the moment of inertia of the rotor and
(c) the angular velocity of the rotor (RPM).

Rate of precession is directly proportional to the applied torque(T).
Rate of precession is indirectly proportional to rigidity.

From the text above it is quite clear that if the RPM of any mechanical GYRO is increased due to whatever reason, it will increase rigidity in space and resist any force applied and it will precess mechanically less (aparent wander or precession due to rotation of the earth or travelling still present).


Arduino+2X12 LCD to emulate a defective Kenwood HF rig display unit

Question: I have an HF rig with a bad display init (LC7582A driver and custom LCD with 9 seven-segment numeric indicators and some icons making for a total of a 100 or so segments). The input pins of the LCD driver are CE CLK and DATA. I gather from the datasheet that it expects about 105 bits from the DATA stream. I have a rough idea in my head that I have to build a "receive buffer" of about a hundred bits, then figure out and sort out which bits are for the numeric indicator segments, which bits are for a 10 segment signal meter indicator and the other icons (AM, LSB, USB, TX, RX, etc.)  And once I have "decoded" the stream. pass them on to an LCD display buffer for later pushing into a generic LCD or OLED display.  I am beginning to think, I might have to tackle this project in two steps: build a system to decode and sort out the stream bits and later after  knowing the stream "protocol", build the complete system.  The reason I got this rig was to force myself to finally learn Arduino or microcontroller programming.  If anybody can point me to some references (sketches, etc.) to get me started in the right direction, or give some tips, I would really appreciate it!
Comment: Do you already know C/C++?
Comment: I am still learning.
Comment: This Ham did something similar but for a different radio and using a Cypress PSoC.  part of his code is shown. http://7l1wrk-1.cocolog-nifty.com/blog/2014/06/ic732-oled-453d.html
Comment: The hardest hurdle here is "decoding" the segment data stream. I can only think of displaying the 102 bits in binary form, perhaps like a diode matrix. and by "trial and error", fiddling around with the radio's buttons (entering test numbers for radio frequency., disconnecting antenna hoping for a response on the "signal meter" etc.) while observing the binary display. Any ideas on a practical 102 bit binary display system?.
Comment: Not really. You're going to be dealing with them in groups of 8 regardless though, so just hex digits via UART as normal.
Comment: OK I will look into it.
Answer: That sounds like an interesting project to play with Arduino and MCUs. Hope that's not too late and you still working on the project.
If you have an oscilloscope you might want to start having a look on the SCK and Data lines, is there any CS or CE pin for chip-select? Check also the voltages on those pins to make sure nothing is going to burn...
If you don't have access to an oscilloscope, you might be able to use Arduino itself and an external interrupt. You'll basically create a very simple software SPI slave, something like that should do it:
(I haven't tried to compiled this code myself, might need some adjustments)
<code>//Connect your Data to the pinMISO.
int pinSCK = 7;
int pinMISO = 8;

//Variables used inside interrupt functions needs to be volatile
volatile uint8_t myByte = 0;
volatile uint8_t bitCounter = 0;

int8_t byteCounter = 0;

void setup() {
  pinMode(pinSCK, INPUT);
  pinMode(pinMISO, INPUT);

  //This tells Arduino to execute bitRead() every time the pinSCK goes from LOW to HIGH. In other works, it'll get executed every clock.
  attachInterrupt(pinSCK, bitRead, RISING);

  //Add some serial output so you can debug on screen and don't worry with the second part of you code for now.
  Serial.begin(115200);
}

//This function will be called every time the interrupt is triggered, it's important to keep it very simple to run fast!
void bitRead() {
  //Left shit one bit, this assume the communication is MSB first
  myByte <<= 1;

  //Append the read value of the pinMISO to our byte (it'll be 0 or 1). I think I need to cast to (uint8_t) as digitalRead returns an int.
  myByte |= (uint8_t)digitalRead(pinMISO);

  //Increment our bit counter
  bitCounter++
}

void loop() {
  if(bitCounter == 8) {
    Serial.print("New byte [ "); Serial.print(byteCount); Serial.print("] "); Serial.println(myByte, bin);

    //Increment our byte counter
    byteCounter++;

    //Reset myByte and bitCounter for the next byte
    myByte = 0;
    bitCounter = 0;

}
</code>
This is just an example... I'm expecting the SCK speed being slow enough for the code to work and that the communication is using a multiple of 8 bits. One problem here could be the "print" getting in the way, so you might need to create a buffer of bytes and print from the buffer.
You could use an similar example just to count how many bits you're getting and create the correct buffer size. With this code you should be able to decode the screen and start thinking how to write the second part to print on the replacement screen.
Depending on your case, you might be able to use the AVR Hardware SPI as Slave. But that might be a bit difficult to understand if you're just starting with MCUs. Have a look on this page: http://www.gammon.com.au/forum/?id=10892&reply=1#reply1
Good luck!
Comment: Thank you for the very good tips. I will do some snooping with the scope.