What does it mean Keq=1?

Question: I'm struggling with a chemistry question related to equilibrium in a reaction. I don't understand the meaning of $K_\text{eq} = 1$. After some research I found that when $K_\text{eq}$ is 1 it means that the concentration of products and reactants is the same. But this is not true! If my reaction is of the type $\ce{A <=> 2B}$ only if their concentration is $\pu{1 M}$ this is correct, but it is only a special case and not the rule. So what does really mean $K_\text{eq} = 1$? I know in this case neither products nor reactants are favourites, but why? Also the fact that the standard free Gibbs energy is 0 is not clear to me. Maybe it means all the energy it is used for the reaction itself and no energy is left to be converted into work?
If possible I'll appreciate a numerical example.
Comment: Keq=x.y/z=1 for  z=xy, no need for x=y=z=1
Comment: The zero standard reaction Gibbs energy at Keq=1 means reactants and products have the same standard Gibbs energy.
Comment: @Poutnik so if z = xy products and reactants are not the same quantity. I still don't understand the physical meaning of Keq = 1.
Comment: Is Keq <> 1 OK for you?
Comment: @Poutnik the only thing I understood is that if Keq > 1 than products are favorited over the reactans  because the numerator is greater than the denominator and viceversa if Keq < 1.  The definition is clear to me, but I would like to go a little deeper in order to understand in whihch way this fact is related to the quantities of pruducts and reactans.
Comment: How is K = x^2/y = 1 related to values x and y? Both x>y and x<y is possible.
Comment: @Poutnik I know that, but if x and y are molar concentrations and the meaning of K = 1 is that at the equilibrium x = y, this means that x = y = 1M at the equilibrium, but this is not always true. As yous said x could be greater or smaller than y and K still be equal 1 if x = y^1/2. So K = 1 doesn't mean that x = y at the equilibrium, so what does it mean ?
Comment: It means the numerator and the denominator are equal  It also means (for elementary reactions) that the ratio of the kinetic constants of the forward and backward reactions is equal to 1.
Comment: @Poutnik thank you for the explanation. My question arose because after a web search I found some sites state that when Keq = 1 the concentration of products is equal to that of reactans. So I can conclude that is not actually true that meaning of Keq.
Comment: @Andrea  To familiarize with the syntax of mhchem suitable on chemistry.se for the body of questions, answers, and comments, see [here](https://mhchem.github.io/MathJax-mhchem/).  Because it is somewhat special not every web browser processes equally well, do not use mhchem it in the title of questions.
Comment: In these days I've thought a lot about this question, also thanks your comments and answers. I do some conclusion (hoping to say right things).
Comment: 1) Standard free Gibbs energy is a measure of the energy available to be converted into work (correct for reversible reactions). 2) standard Gibbs energy is 0 when the equilibrium is reached. 3) K = 1 doesn't have a special meaning, when it happens, the free Gibbs energy is 0 starting from reactants and finishing to products (no variation) and remains 0 (obviously) at the equilibrium reached.
Answer:
After some research I found that when Keq is 1 it means that the concentration of products and reactants is the same. [...] If my reaction is of the type $\ce{A <=> 2B}$ only if their concentration is 1M this is correct, but it is only a special case and not the rule.

IUPAC's Green Book discerns two types of equilibria constants $K$.  Either the one which fits $K = - \exp(-\Delta_rG/-RT)$, or the ones which are derived from a basis of pressure, concentration, or molality.  For the later $K$ is a quotient of e.g., corresponding products of concentrations to the power of the corresponding stoichiometry factors.
Let's assume your reaction $\ce{A <=> 2B}$ in diluted solution is balanced, then the constant is defined as
$$K_c = \frac{[\ce{B}]^2} {[\ce{A}]}$$
In this case, at chemical equilibrium, rearrangement of the mathematical equation leads to the general forms of
$$[\ce{B}] = \sqrt{K_c \cdot [\ce{A}]}$$
and
$$[\ce{A}] = \frac{[\ce{B}]^2} {K_c}$$
A detail frequently forgotten by beginners not familiar (yet) with dimensional analysis: the unit of $K$.  If $K$ was derived from $\Delta_rG$, the constant is unit less.  If derived from pressure, concentration, or molality, the sum of the stoichiometric coefficients has to be taken into account to yield a constant in unit of either $\pu{Pa}^{\sum \nu_\text{B}}$ (for pressure), $\pu{(mol m^{-3})}^{\sum \nu_\text{B}}$ (for molar concentration), or $\pu{(mol kg^{-1})}^{\sum \nu_\text{B}}$ (for molality).*
Only for a reaction $\ce{A <=> B}$ the units cancel out each other.  For your above reaction of $\ce{A <=> 2B}$, however
$$K = \frac{(\pu{1 mol/L})^2} {\pu{1 mol/L}} = %
%
\frac{\pu{1^2 mol^2/L^2}} {\pu{1 mol/L}} = %
%
\pu{1 mol/L} $$
* Cohen, E. R. et al. (eds.) Quantities, Units and Symbols in Physical Chemistry, IUPAC Green Book, 3rd edition / 2007; section 2.11 chemical thermodynamics, p. 58.

If the hypothetical reaction were balanced $\ce{3A + 2B <=> 5C + 4D}$
$$K_c = \frac {[\ce{C}]^5 \cdot [\ce{D}]^4} {[\ce{A}]^3 \cdot [\ce{B}]^2}$$
or more general, $\ce{\alpha A + \beta B + \ldots <=> \sigma S + \tau T}$,
$$K_c = %
  %
  \frac {[\ce{S}]^\sigma \cdot [\ce{T}]^\tau \ldots} {%
         [\ce{A}]^\alpha \cdot [\ce{B}]^\beta \ldots}$$

$K_c$ (derived from concentrations in $\pu{mol/L}$), and $K_p$ (derived from partial pressures of gaseous equilibria) are approximations for diluted reactants.  The higher the concentration of molecules, however, the more they can hinder each other during a reaction; at some point, thermodynamic activities are the better descriptions of the reagents.

Note, capital italic $K$ is about the thermodynamic equilibrium constant.  Lower case italic $k$ typically is used to describe the kinetic rates of reactions.  This is convention of nomenclature compiled in IUPAC's Green Book (see resources page).  At high school level, the freely available 4 page summary (link to pdf) likely provides enough information for you.
Comment: Note that true thermodynamic equilibrium constants, fitting in $\Delta_r G^{\circ}=-RT\ln{K}$, are unitless, based on unitless quantities like activity or fugacity. Constants expressed for mass or amount concentrations or partial pressures do not fit the above equation and their values are dependent on used quantities and their units.
Comment: @Poutnik I agree and it was edited.
Answer: The equilibrium constant $ K=1$ has no more significance than that when $K=10$ or $K=0.1$ etc. You will know that the equilibrium shifts as the temperature changes, so consider the gas phase equilibrium
$$\ce{PCl_5(g) = PCl_3(g) + Cl_2(g) }$$
which has $K=0.230$ at $472$ K and at a slightly higher temperature $524$ K, $K=2.69$ and clearly $K=1$ is to be found somewhere in between these two temperatures.  The Gibbs free energies at the two temperatures are $\Delta G^\text{o}=+5.77$ kJ/mol and $-4.31$ kJ/mol. (In 'thermodynamic speak' this means going from non-spontaneous to spontaneous reaction as the temperature increases and although it may seem so it is actually not very revealing).
In terms of the equation expressed as partial pressures (as appropriate for a gas phase reaction)
$$\displaystyle K=\frac{p_{PCl_3}p_{PCl_2} }{p_{PCl_5}}\equiv\frac{p_{PCl_3}^2}{p_{PCl_5}}$$
as $K$ is a constant at a given temperature we only ever know the ratio of the species. In this example $p_{PCl_5}K =p_{Pcl_3}^2$ or  $p_{PCl_5} =p_{Pcl_3}^2$ when $K=1$.
It is necessary to point out at this point that using partial pressure in the gas phase or concentrations in solution is not technically correct, although very practical. We should use activities or equivalently fugacities which are dimensionless. To get around this we must divide each partial pressure or concentration by 1 unit, say 1 atmosphere or 1 mol/dm$^3$.
Using thermodynamics we know that the change in standard reaction free energy is related to the equilibrium constant as $\Delta G^\text{o}=-RT\ln(K)$, which trivially means that $K$ has to be dimensionless (see above), and when $K=1$ then $\Delta G^\text{o}=0$ which using $\Delta G = \Delta H -T\Delta S$ means that only at this temperature does  $\Delta H^\text{o}=T\Delta S^\text{o}$, in other words an exact balance between heat change  and entropy change. However, although it may seem that it is, this has no particular significance, other that it is the tipping point one way or the other in the reaction.
Answer: Andrea, you seem to have asked a deep question without a simple answer; I will Try. The problem is in carefully figuring activities.  If there is strict stoichiometry and the coefficients = 1, the activities are equal. In this case there is no change in the number of moles in the reaction. Should a component be augmented activities will change and no longer be equal. A reaction that could fit this description is a simple esterification: ester + water = acid + alcohol.
The simplest example I can think of is an ice-water equilibrium. Pure ice and pure water each have mole fractions of 1.. At equilibrium the Keq = 1/1 = 1. This means that as long as both water and ice are present the temperature is constant [Gibbs phase rule]. Lowering the water activity by adding a solute lowers the melting point [ice melts to remove heat] until the activity of the ice equals that of the water. Keq is still 1 but the activities are lower. [An interesting thought! Should a solute raise the chemical potential of liquid water would the freezing point be increased?] A change in pressure is similar, the activities change, temperature adjusts until the activities are equal.
I am trying to give a rigorous explanation for a more complex system but am having trouble expressing activities in a manner that makes sense, so I am posting this partial answer to put this question back into the queue and give it its due.

What does it mean Keq=1?


Can OpenAI enforce their T&Cs requiring attribution for ChatGPT generated content?

Question: OpenAI has the following clause in their T&Cs:

Creators who wish to publish their first-party written content (e.g.,
a book, compendium of short stories) created in part with the OpenAI
API are permitted to do so under the following conditions:

The published content is attributed to your name or company.
The role of AI in formulating the content is clearly disclosed in a way that no reader could possibly miss, and that a typical reader
would find sufficiently easy to understand.
Topics of the content do not violate OpenAI's Content Policy or Terms of Use, e.g., are not related to political campaigns, adult
content, spam, hateful content, content that incites violence, or
other uses that may cause social harm.
We kindly ask that you refrain from sharing outputs that may offend others.

Would OpenAI have any legal recourse against someone who violates these T&Cs? As per my understanding, machine-generated texts are not copyrightable, so OpenAI won't be able to sue you for a copyright violation. They obviously could shutdown your account but would they have any means to enforce their attribution rules via the legal system?
Answer: Yes
The terms of service are a contract. The primary remedy for a breach of contract are a suit for damages. If your breach damages OpenAI in a quantifiable way (including reputational damage), you can be sued.


Install 2.5" SSD drives into PowerEdge 2950

Question: I have a PowerEdge 2950 (not III) rack-mounted server with a 3.5" SAS backplane. I'd like to put one or two Intel X25-M drives into it for hosting of a few virtual servers on faster disk. Can this be done? Is there hardware that would allow me to install 2 of these 2.5" drives into an existing 3.5" slot?
Answer: What you are looking for is an ICY DOCK MB882SP-1S-1B.
http://www.amazon.com/Icy-Dock-EZConvert-2-5-Inch-Converter/dp/B002Z2QDNE/
I've also had recent luck with the StarTech 25SAT35HDD.
http://www.amazon.com/StarTech-com-2-5-Inch-3-5-Inch-Enclosure-25SAT35HDD/dp/B00H91BXJU/
Comment: Can you confirm this worked without issue, JoshL? I think others might be running into the same issue (myself included).
Comment: That product supports SATA I and II, but not III, so don't get it if you're looking for SATA III performance.
Comment: @Dan SATA III had only recently been released when this question was answered.
Comment: "Icy Dock EZConvert" is also on Amazon, and may be more cost-effective: http://www.amazon.com/Icy-Dock-EZConvert-2-5-Inch-Converter/dp/B002Z2QDNE/
Comment: @JayTaylor I've added your link to my answer plus an alternate suggestion.
Comment: The StarTech looks hilarious!!! So stealth.. thanks @Joseph!
Answer: I've done this kind of thing (only as a trial) and it worked fine...BUT please take into account that when 'driven' hard SSD's can get as hot as 70C, while even 15krpm disks rarely go over about 55C - so ensure you have the airflow.
Answer: I'm in the process of fitting several Intel x25-E drives into the 3.5" bays of 'spare' PowerEdge 2900, itself in the process of becoming a (hopefully) hi-performance iSCSI SAN based on Openfiler.
I located new (empty) Dell drive trays and corresponding Interposer cards for use with SATA drives in Dell servers. I sourced Dell CC852 Tray and PN939 Interposer kit from Discount Technology for US$89.95. These are great for any 3.5" SATA (or SAS) drive (including SSDs) but require some extra holes to mount 2.5" SATA drives. I'm mounting the 2.5" drive using the 4 holes on its flat side (not its edges).
I wouldn't use an MLC SSD like the X25-M in a server application. Server vendors that offer SSDs all offer SLC SSDs such as the Intel X25-E.
Answer: You can do this with a simple and cheap 2.5" to 3.5" adapter.  Just search "2.5 to 3.5 drive adapter".  Obviously you will be giving up the density advantage of 2.5" drives.
Comment: Josh, do you know if this will work with the backplane in the PowerEdge server?
Answer: The Vizo Ares II seems to do what you want. I googled "dual 2.5" drive" to find that product.
I'll make an offhand suggestion that you use X25-E drives (with SLC flash instead of MLC) if you really want faster IO.
Comment: X25-E is way more expensive, and I don't have a need for much parallel drive access, which is why I'm looking at X25-M (which is what I run in my workstation and laptop)
Comment: Yes, they are more expensive, but they are faster!
Comment: The Vizo Ares II won't work in a backplane - if you look at the gallery of photos at the link above, it requires two power and two sata connections, so it physicall won't work in a 3.5" slot
Answer: You may wish to check this out: SSDx2 Adapter which allows mounting 2 SSD's or 2.5" HDD's where a single 3.5" once lived.  It's an open frame design which gives good airflow for cooling.  My entry level Intel 1U rackmounts only had room for 2 SATA drives, but with these brackets I'm able to run a small SSD for OS, a 1TB mechanical 2.5" for backups, and 2 more SSD's for data.  Very fast and low heat.  I'm sure if the Dell will hold 3.5" drives then the SSDx2 bracket would fit your application as well.
Answer: SATA power cables are both 5V and 12V, so they are fine being plugged into desktops.
Are you asking if its possible or asking if there are mounting brackets available to install a 2.5" HDD into a 3.5" bay?
Answer: SSD drives don't have moving parts and don't vibrate. In difference to HDDs they don't require fixed mounting.
Just fix them with one-two screws or even just glue with some scotch or so. Don't waste a money for the adapters, they may prevent a heat circulation. If you strongly need to have it looking "cool", find a simple mounting plates and use one for each drive. However you'll need to make a cable management by yourself, you can't just split a data connector.
Comment: The retail price of connectors, cables and tools necessary to put them together will likely be close to the price of the mentioned adapters.
Answer: I don't know of anything that will allow you to connect two 2.5" SSDs inside a single 3.5" backplane slot, and actually use both of them. If you were wanting to put two 2.5" drive into a single 3.5" standard drive bay (eg, without a backplane), then there are plenty of products.
I may be wrong, but make sure you check that whatever products you are looking at have some kind of SATA/SAS expander in them - if they only have one SATA port on the back, then it'll possibly work. If they have two SATA ports, you're out of luck.
I'd strongly recommend getting 2.5" to 3.5" brackets and only using one drive per bay.
Answer: In case anyone is still looking, like I was. You actually want one of these:
http://www.amazon.com/Adapter-Bracket-9W8C4-F238F-Hhard/dp/B00DCBFF8Q/ref=sr_1_1?ie=UTF8&qid=1428706444&sr=8-1
It's a Dell adapter bracket model# 9W8C4. It screws into the sleds and allows them to accommodate the 2.5" drives.
Benefits are that there are no electronics to fail, no cooling issues, and they're only 10 bucks currently.


Software for drawing geometry diagrams

Question: What software do you use to accurately draw geometry diagrams?
Answer: For geometry I've always used Geogebra, and I think it's pretty good.
Comment: Despite the fact that its a possible GPL violation. I found Kig which is a similar package.
Comment: It's hard to set the size of the drawing area in GeoGebra if you need precise image dimensions. You have to unpack the GGB file using a ZIP archive tool and edit the XML source, then re-pack it. For precision stuff you might look elsewhere.
Comment: Also, geogebra allows you to export to tikz (or pstricks). One workflow I would like to use is to draw in geogebra and then export it to tikz (and then edit tikz code as needed).
Comment: It's not only for diagrams. It is an interactive geometry software with CAS built in; it will calculate everything for you. There's also a 3D version.
Answer: Tikz is a nice LaTeX package for easily drawing diagrams. Diagrams are made by putting code directly into the TeX document, eliminating the need for extra image files. The package also is very powerful and versatile; the manual contains a very detailed description of its features.
Comment: I object to the claim that Tikz is an "easy" way to draw diagrams. Anything beyond very simple diagrams tends to be a headache.
Answer: Asymptote is my tool of choice for virtually any mathematics diagram, geometry included.
Answer: Mathematica
Comment: This is *very* expensive. A free, partial-alternative is wxMaxima. http://andrejv.github.io/wxmaxima/screenshots.html
Comment: @Rhubbarb, the link is now broken, probably the new one is https://wxmaxima-developers.github.io/wxmaxima/.
Comment: Xcas is free (developed at some French university), understands the Maple language (and French, and also supports graphics, I didn't test much of these two features).
Answer: I have been enjoying kseg. It is very quick to draw diagrams in kseg.
After you draw the diagram you can drag the components around and the others will follow, retaining the same constraints. For example, in this diagram it appears that $NM$ is the perpendicular bisector of $PQ$:

And I can see if that still appears to be the case even after I move point $C$ to make a very different inscribed quadrilateral:

kseg also lets you define complicated loci, but I haven't tried that yet.
Comment: hi it seems kseg is good, can i have user manual for this
Answer: Geometer's Sketchpad— Sketchpad 5 exports/copy-pastes diagrams much better than 4 did.
Comment: This is not free! :(
Comment: Not only is it not free, it's darn near impossible to figure out how to *buy* it.  I **love** this program, but they seem to only want to sell it to classrooms, not individuals.
Answer: One of the best is WinGCLC.
Graph quality is really exceptional, it's easy to use, can be easily exported to SVG/EPS/BMP/LaTeX, supports command line for scripting, supports animation...
What is really useful is that once you define all the points/lines/intersections/circles, you can easily change the location of one of the starting objects and the whole diagram will be accurately redrawn.
Answer: Inkscape is a popular open source drawing package.  One feature that makes it particularly nice for drawing mathematical diagrams is that you can easily insert LaTeX output in your drawings.
Comment: In principle everything is doable with Inkscape. But in practice, I find it very difficult to properly align objects.
Answer: Adobe Illustrator
Answer: LaTeXDraw is a graphical front end for PSTricks.
Comment: Note: Windows version requires JAVA to be installed.
Answer: Metapost. There are a few packages to simplify drawing geometry drawings.
Answer: These are my choices:

Interactive software: Ipe produces postscript and pdf files, can include LaTeX labels and other text, and has helpful snapping modes.
Non-interactive: Eukleides lets you design pretty high quality geometry diagrams with a simple language.
Answer: If you are a mathematician and wants to use such pictures for your notes or presentations using TeX files, use the pstricks package enhanced for use of easy by the package LaTeXdraw.
Then there is a very useful linux program called xfig.
Answer: Live Geometry for Windows users.
Comment: Needs Microsoft Silverlight installed.
Answer: I use the programme CaRMetal. Here are a few screenshots:
http://i34.tinypic.com/2vwcits.jpg
http://i35.tinypic.com/oa42ts.jpg
http://i35.tinypic.com/2lxfin8.jpg
http://i35.tinypic.com/rble9l.jpg
I guess most geometric constructions programmes are good, although I wouldn't recommend Kig.
Answer: tkz-euclide is a package for embedding, into Tex, drawings of Euclidean constructions. That is, it supplies commands to draw straight lines and circles but nothing any more sophisticated e.g. ellipses or the graphs of arbitrary functions. It also provides commands to locate the points at which one straight line or circle cuts another. (With TikZ, if you wanted to use the intersection points, you'd have to work out their coordinates for yourself.)
It is a layer on top of TikZ. Currently, the only documentation is in French, but it contains numerous examples, so it is quite easy to follow even if you don't understand French.
Answer: Python Matplotlib
https://matplotlib.org/
Although Matplotlib's focus is on data plotting, it has become so featureful that you can generally produce good 2D illustrations with it.
Being written in Python is also a huge plus over domain specific languages like gnuplot.
It must be said that since it's main focus is not illustration, sometimes you have to Google a bit for the solution, but one often exists, or at least a reasonable workaround. And when it doesn't, it is often not hard to code it yourself and submit a patch.
Consider for example this simple educational graph demo I've made:

Source code
Also note that nothing in that demo is mandatory: you could easily rip off the axes or title for example.
It must be said that Matplotlib is not perfect for 3D however, as it does not support an OpenGL backend. As a result, the 3D interface is particularly clumsy and rather incomplete.
But you can get away with sometimes if your requirements are not too strict. For example, here's my attempt at a Bloch sphere illustration that I made for this other answer:

Source code.
In that example, we can see how I was unable to place the little circles above the plot as I would have wanted, showing how 3D is not perfect. But there is even a draft pull request for it.
One advantage of Matplotlib is that it has its own LaTeX subset parser, and thus dispenses a full LaTeX installation for mathematics as mentioned at https://matplotlib.org/3.3.3/tutorials/text/mathtext.html:

Note that you do not need to have TeX installed, since Matplotlib ships its own TeX expression parser, layout engine, and fonts. The layout engine is a fairly direct adaptation of the layout algorithms in Donald Knuth's TeX, so the quality is quite good (matplotlib also provides a usetex option for those who do want to call out to TeX to generate their text

Tested on matplotlib==3.2.2.
3blue1brown's Manim
https://github.com/ManimCommunity/manim/
This is based on the engine that 3blue1brown uses for his amazingly looking videos, which include complex moving graphs and formulas.
I'll let a sample video speak for itself: https://www.youtube.com/watch?v=r6sGWTCMz2k&t=1s
And there's an in-tree demo:
git clone https://github.com/ManimCommunity/manim/
cd manim
git checkout 1b12f076be49a677add97346eed6900e3cf18873
cd example_scenes
manim basic.py OpeningManimExample
xdg-open ./media/videos/basic/480p15/OpeningManimExample.mp4

Inkscape demos
Inkscape had been previously mentioned at: Software for drawing geometry diagrams but here are some demos that felt relevant.
https://graphicdesign.stackexchange.com/questions/141237/how-to-color-2-circles-intersection-in-different-color-in-draw-io shows how it supports doing intersection of figures (you have to potentially copy objects to merge them):

Intuition behind normal subgroups shows a more free-form block diagram I've put up myself:

Inkscape currently doesn't support constraints however unfortunately: https://gitlab.com/inkscape/inbox/-/issues/1465 e.g. "same widths, parallel, etc.", but you can generally get decent results by just snapping to a grid in the editor. The "Align and Distribute" tool also helps, acting as "one time constraints", but there's no way to make real permanent constraints right now.
There isn't LaTeX math support in an extremely convenient out-of-box way it seems, but there are some possible methods available:

https://tex.stackexchange.com/questions/61274/is-there-any-way-to-type-latex-code-directly-into-the-text-boxes-inkscape
https://graphicdesign.stackexchange.com/questions/88027/where-to-find-latex-formula-in-inkscape

FreeCAD SVG export
This is usually a bit overkill, but it is really cool.
FreeCAD, as a CAD software, actually supports explicit constraints with a constraint solver.
This is a bit along the lines of what Software for drawing geometry diagrams mentioned kseg can do, except that kseg seems a bit abandoned, e.g. last release on SourceForge is from 2011.
FreeCAD is not focused on doing nice looking SVGs, but a possible workflow would be to export a perfect geometry to SVG, and then import the SVG into Inkscape to finish more visual details. This might be a reasonable workaround until the blessed day when Inkscape will implement constraints.
To export to SVG, you have to create a sketch. FreeCAD is a bit intimidating since it does so much more than 2D figures, so just watch this video: https://www.youtube.com/watch?v=sxnij3CkkdU
With that, I obtain a perfectly specified figure, you can see some constraints showing on the FreeCAD GUI, e.g. equality of edges of that triangle:

And then, I export to SVG via:

Select the sketch on the right menu
File
Export
Files of type: Flattned SVG

And then after conversion to PNG for uploading here:
inkscape -b 'FFF' -z -w 512 eye.svg -e eye.png

I obtain:

TODO: why is it so messed up?
Tested on FreeCAD 0.18.4, Ubuntu 20.04.
MathMod
https://github.com/parisolab/mathmod
Not a huge community as of 2020, but it does seem to be able to produce some really nice 3D parametric/isocurve graphs with OpenGL and customizable shading.
You can use a custom scripting language to automate it (shame not python), and the GUI has widgets to vary parameters, including animations in time.
I got it to run on Ubuntu 20.10 by downloading the 10.1 prebuilt from the official download page on SourceForge (unfortunately). Then just unzip and run with:
./RunMathMod.sh

Here's a screenshot from the 10.1 release:
Answer: The free version of Cinderella is in some cases also a good choice.
Answer: gnuplot
Features
I used gnuplot (official website), which is open source and can produce a huge number of different file types. For instance, you can also output tikz-code if you want to work with LaTeX. It is used for plotting datasets and one can plot easily errorbars.
Installation
You can download it from sourceforge or from your package database if you are using a linux distribution.
Answer: Geometry is a pretty new app on Mac OS X for making geometric constructions and check angles etc. Contrarily to Latex or others, you can move points and lines etc interactively and see how the drawing evolves based on the construction constraints.

I like that this app is lightweight, with easy keyboard shortcuts, and that  it is associated with a website that proposes a few good geometry exercises too. Totally worth its price!
Answer: I've used Smile by Satimage on my Mac. (Not SmileLab, just the free Smile. And not to be confused with PDF utility company "Smile on My Mac")
Smile uses AppleScript for drawing. Some example files show an amazing facility for geometric drawings: named points, marked angles, primitives for things like barycenter and circumcenter, TeX-styled labels, etc. A fully-labeled illustration of the Euler Circle can be created with a few lines of script. Outputs to PDF, JPG, etc.
I always have lots of trouble navigating the online documentation, so I know I'm not getting the full benefit of the program. Nevertheless, the ability to describe a drawing precisely with a script is what I need, and it's what the app delivers.

Update (10 years later!) Since the question was bumped by an edit, I thought I'd take the opportunity to amend this answer.
macOS made changes to AppleScript compatibility a couple of years ago while Smile wasn't being actively maintained, and the app became completely unusable. I think the developer may have started giving the app some attention lately, but I have since moved on to GeoGebra (mentioned in other answers here) and my own graphics code.
Answer: If you are referring to geometric sketch, I like to use Dr. Geo, a free software of mine. It is an interactive geometry and programming software. You can make very easily construction with the mouse or more complex iterative one with its programming API.
Interactive geometric sketch designed with mouse and clic
Comment: It would probably be a good idea to mention that you are the creator of Dr. Geo.
Comment: Right, information added.
So my answer is downvoted because.... I am the author of this free software? Nevertheless, I think I answer appropriately the question, I take time to illustrate it with related examples and I do not hide myself behind anonymous pseudo.
Answer: Desmos Graphing Calculator, is, yes a graphing calculator, but it is also really useful for geometric drawing.
On their homepage they illustrate several examples of how versatile the tool is for drawing. The main drawback of the program is that you need to know the algebraic (Cartesian, Parametric, or Polar) equations behind your shape to draw it.
On the flip side however, that means your drawings are truly accurate; and, furthermore, it is not too difficult to draw everything imagine-able using parametric equations. (You can of course, superimpose multiple equations with one another to draw pictures).
As of 2018, Desmos has released a geometry tool typically for drawing geometry diagrams. That means, using Desmos to draw diagrams no longer requires too much mathematical background. It was a huge improvement.
Comment: Isn't GeoGebra much more flexible as it let you draw in addition to the math?
Comment: @Royi IMO, Desmos is much more user friendly (at least now) than GeoGebra though.
Answer: I think Geo-Gabra is easy to use.I used is just about 3 months. it is very easy for mathematical drawing.
Download Here;
Geo-Gabra 4.4
Comment: The link is now broken; probably GeoGebra, not Geo-Gabra.
Answer: Microsoft Excel. Just paste x and y (or long and lat) as a table and create a scatter (XY) chart from it.
Do make sure to include lines.
Answer: I use AutoCAD. In addition to features that help with geometric construction (such as drawing a segment perpendicular to a line, tangent to a circle, bisecting a line, or constructing a circle tangent to 3 lines, etc), which can be more or less found in GeoGebra, AutoCAD allows to make precise constructions using cartesian or polar coordinates.

Software for drawing geometry diagrams


How do you add labels to your icloud/iphone calendar?

Question: I see how to add a label (i.e. home, work, etc.) for iCal events on a Mac, but how do you add labels via your iCloud account or on iPhone?
Answer: These aren't labels, they're separate calendars.

In the Calendar app on iPhone, choose Calendars at the bottom, then choose Add Calendar.
Enter a calendar name and choose a colour, then tap Done.
Move events to this calendar by selecting an event, choosing Calendar and setting it.
Answer: You can create new "Calendars" in iCal to organize your events by color and show/hide Calendars as needed.

iCloud.com: Open "Calendar" App, Click "Edit" (bottom left), Click "+" to add a new Calendar.
iPhone: Open "Calendar" App, Click "Calendars" (bottom middle), Click "Add Calendar" to add a new Calendar.
You will be able to give a name and color of your choosing to the Calendar!

Move Event to Another Calendar: Open the event, click "Calendar", select new Calendar.


Looking at the content of a character device's file

Question: Why is it possible to look at the contents of a block device's file like /dev/sda using cat or a hex editor?
Why can I not do the same for a character device like /dev/pts/3?
Answer: This isn't (necessarily) a distinction between character and block devices. For example, /dev/urandom is a character device and you can certainly use cat on it.
In your case, /dev/sda refers to storage that already exists, so reading from it reads the existing storage. However, /dev/pts/3 is a pseudo-terminal and reading from it blocks (waits) until the next character of input is ready.
An additional difference is that you you can seek to a particular location on a device which provides access to persistent storage, but you can't seek on a terminal.
Answer: Devices on Unix act like files, but are not the same. For some devices it made more sense to the implementer of the device software for both reading and writing, for others just implementing just one of those made more sense.
It is not because /dev/pts/3 is a character device that you cannot read from it, other such devices exist where you can. For the pts device I could see that reading back could mean getting the characters back from the screen as a linear array of screenwidth*screenheight length, but that is not extremely useful nor efficient.
Although it is getting a bit old, Linux Device Drivers, chapter 3 is an interesting read on the subject.
Answer: This explains what /dev/pts/3 is for and what you can do with it. /dev/sda points to your HDD/SSD which you can read from and write to. When you edit data on /dev/sda, you are writing directly to the drive and not necessarily in a partition. If you do this you can corrupt a partition so it's generally not used to save data. In some cases, however, it is convenient to write directly to the disk (e.g., dd for securely erasing a disk). In Unix everything is a file, but you can't read and/or write to every file.


Why cannot a fundamental string couple to the R-R gauge field $C_{\mu\nu}$?

Question: People usually say that D-branes can carry R-R charges, or can couple to R-R sector gauge fields. But why a fundamental string cannot couple to a 2-form R-R sector gauge field? What's the essential different between a D-string (D1-brane) and a fundamental string?
Answer: Quote from "Lectures on D-branes, Constantin P. Bachas"

Now within type-II perturbation theory there are no such elementary RR
  sources. Indeed, if a closed-string state were a source for a RR (p +
  1)-form,then the trilinear coupling
$$< closed| C_{(p+1)} |closed >$$
would not vanish. This is impossible because the coupling involves an
  odd number of left-moving (and of right-moving) fermion emission
  vertices, so that the corresponding correlator vanishes automatically
  on any closed Riemann surface. What this arguments shows, in
  particular, is that fundamental closed strings do not couple
  'electrically' to the Ramond-Ramond two-form. It is significant, as we
  will see, that in the presence of worldsheet boundaries this simple
  argument will fail.
Answer: Just because the D1-string has the right dimensionality to couple to a 2-form RR potential doesn't mean that it must. The same line of reasoning could be applied to the more familiar case of electromagnetism; you could easily imagine a world with 2 different U(1) gauge fields. There could be particles that are charged under gauge field #1, particles charged under gauge field #2, and even particles charged under both. The essential point here is that just because you are given a 0-dimensional brane (particle), you haven't learned anything about what fields it is charged under. The same is true in string theory. In order to determine what brane couples to which field, you would need more information than just the dimensionality.
Comment: Sure I know I need more information than just the dimensionality. I am exactly asking for what information I need to conclude that a fundamental string cannot couple to the R-R gauge field.


What is the exact time Earth takes to revolve around its axis?

Question: I read that our day is not exactly 24 hours long. If it is not then why weather seasons come at the same time (Summer, Winter, Autumn Spring) ? how it is equalized ?

Update: Sorry I could not make it clear. My meaning was if 3.8 seconds are shorter of everyday the how is the calculation made that summer starts in May and winter start december everytime why it does not move further since. How time is neutralized ? I hope you guys understood this time.
Comment: Which weather changes did you have in mind? Did you mean the difference in time we measure and length of day from one solar noon to another? "Day" as a unit of time is by definition 24 hours long. Could you please clarify what you're asking about? There are many factors that are at play here, which ones in particular are you inquiring about?
Answer: Our day is 23 hours and 56 minutes long, and slowing by an infinitesimal (but measurable) amount each year due to tidal losses.
Our day has a connection with the weather, in that the sun drives all our weather systems, so heating over each part of the globe happens every day, but aside from that, your question doesn't make much sense.
Weather changes may come at the same time where you live (on a 24 hour cycle) but here in Scotland, we still have low reliability on even a 3 day weather forecast, because the weather systems that impact the UK are so complex as heating from the sun drives various air flows.
After your update, I still cannot understand what you mean. There is slippage in accuracy, but this is counteracted by leap seconds and leap years. It has nothing to do with weather. The shortest and longest days happen when they happen and are measurable. They help us define the year.
Comment: 23h 56m is the *sidereal* day. The *solar* day is very close to 24 hours.
Comment: No - that isn't how it works. Humans have chosen seconds, minutes, hours etc., but they don't quite match up to reality. The Earth will happily keep doing it's thing, but every now and then we have to realign our measures. The leap year adjustments do this.
Comment: Joshua - the question is closed as it doesn't really make sense as it's written. Leap years/leap seconds only exist as a human construct. They aren't real.
Comment: I meant the seasons (instead of weather) like summer, winter, autumn and spring which comes at the same time(at least in my country) sorry my bad... Yes that's what i wanted to know. Its mean that 24 hours(29th feb) are added to our year after every 4 years. means if everyday is 3:55.91 minutes(235.9084 seconds) shorter then every year is 86106.566 seconds shorter which is approximately equals to 24 hours then how after four years >.< confused
Comment: The realignment part is what sucks. If the world is revolving around the sun at a steady rate, what is that rate in milliseconds? Milliseconds are the most basic unit used in computer programming; seasons be damned. Myself, I am interested in working out the math as it relates to the leap year. I'm surprised this question is closed.
Answer: The length of a solar day is very close to 24 hours. A solar day is the time it takes the Sun to return to the same position in the sky. The exact length varies slightly over the course of the year, because the Earth's orbit around the Sun is not perfectly circular; the tilt of the Earth's axis with respect to its orbit also has an effect. See the linked article for details.
A sidereal day is slightly shorter. It's the time it takes for a distant star to return to the same position in the sky, and it differs from the solar day because the Earth revolves around the Sun as it rotates on its own axis; there is one more sidereal day than solar day each year. A sidereal day is approximately 23 hours, 56 minutes, 4.0916 seconds.
Weather can actually have a minuscule effect on the Earth's rotation, as the mass of the atmosphere is distributed differently. This effect is barely measurable. I don't think that's the kind of "weather changes" you were asking about; can you clarify? Obviously it gets colder at night, and that's controlled by the length of the solar day.


Create TAP network device in Windows 7

Question: How can I create a TAP virtual network device in Windows 7?
Answer: The TAP device acts as a bridge between the network and a piece of software.  Creating a TAP device is easy enough, but it won't do anything by itself - it needs some software to handle the data that's passed to the network interface.
Creating a TAP interface is detailed here: http://www.varsanofiev.com/inside/using_tuntap_under_windows.htm
There's a sample C program there to show how software to work with it can be created.

Create TAP network device in Windows 7


What proportion of parenting time makes someone a "primary parent"?

Question: The terms "primary parent," "majority of parenting time," "shared parenting time," and "split parenting time" are used to describe the division of parenting. What do these mean?
Answer: canada
Child support
In Canada, under the Federal Child Support Guidelines (used when computing child support after a divorce, and in most or all provinces after a separation), the terms are defined as follows:

majority of parenting time "means a period of time that is more than 60% of parenting time over the course of a year" (s. 2(1));
shared parenting time is when "each spouse exercises not less than 40% of parenting time with a child over the course of a year" (s. 9)
split parenting time describes a situation where "there are two or more children, and each spouse has the majority of parenting time with one or more of those children" (s. 8).

Which of these regimes a couple falls into is significant because it changes the approach to computing the amount owing for child support.
"Primary parent" outside of child support
Outside of the computation of child support, there is no concrete definition for what makes someone a "primary parent." Parenting arrangements or orders will just describe the division of parenting responsibilities, such as who has day-to-day care, control, and supervision of the child; decisions about residence, friends, activities, education, medical treatment, etc. Typically though, when the phrase "primary parent" is used, it describes the person with day-to-day care, control, and supervision of the child. But this isn't a descriptor that can be applied universally to the relationship. For example, a person might have "primary parenting of the children over the holiday" (Wilson v Wilson, 2023 ONSC 3387, at para 163). Some courts are careful to place the term in quotes to emphasize that it isn't a precise term (e.g. "she puts great stock in being the 'primary parent'": Begum v Klippenstein, 2023 ONSC 2970 at para 86).
Comment: @user3819867 that's the practical term, not the legal one. There are often differences.
Comment: Not from Canada: I would use "primary parent" as "first person to contact in case of an emergency." E.g. if one parent is more likely to be available during kindergarten they would be the "primary" parent regardless of how much time they spend with children.
Comment: Canada does better than the UK in this regard - UK government guidance uses words like "equally" with no stated margin, where Canada has 50:50 ±10%.
Comment: @jwenting If there's no legal definition or specific precedent then it would be what a reasonable person would assume it means, wouldn't it?


Max operating temp of IC's

Question: Why do so many IC's have a max temp range of 125C? Is it due to packaging material tolerances, ie the black plastic enclosures and/or the bonding epoxy that holds the die to the package and/or something else?
Comment: it is sort of a standard... can the component dissipate enough heat energy at 125C to operate at x Volts and y Amps. Then when you make something, you can rate the whole at 125C assuming you are within spec of all of the parts
Comment: also some parts like diodes behave very differently at different temperatures.
Comment: This question is very interesting because it addresses the logic or idea behind the standard.
Comment: I'm not sure if it answers the question fully, but it is the US Military Standard http://en.wikipedia.org/wiki/Operating_temperature
Answer: All semi-conductor characteristics are affected by Boltzman statistics relating charge carrier densities with respect to temperature.  The hotter it is the more intrinsic carriers are present, at some point the intrinsic carrier concentration gets so high that any doping (n-type vs. p-type) gets wiped out.  That is at high temperatures.
A conductor has the characteristic that as you heat it, the carriers are more mobile and collide more and resistance goes up.  A Semi-conductor has the characteristic that as you heat it up, more carriers are present and the resistance goes down.
So it's natural to see that there are limits.  Why particularly those temperatures, I don't know, I'm sure some one will come up with the historical answer.  However, it's very celar that some temperature must be selected, because if you design for a very broad temperature range then some other performance metric will be compromised, like speed or margins.
Designs are specified over what are called PVT corners, as in Process, Temperature and Voltage corner cases.
Answer: The military temperature range for operation of silicon integrated circuits (ICs or chips) is -55C to +125C, which is meant to ensure operation in virtually any field situation, with plenty of margin (125C is 25% hotter than the boiling point of water).
Other standard ranges for ICs are -40C to +125C for Automotive, -40C to +85C for Industrial, and 0C to +70C for Commercial (e.g. chips in TV sets). There are variations in these standards, for example some automotive devices may extend to +130C or higher, and high performance CPU chips in home computers may be limited to +55C.
A chip's packaging is chosen according to the chip's rated temperature range and is generally either plastic for lower temperature devices and ceramic for higher temperature. Ceramic packages also have superior sealing and may have provision for mating with an external heat sink to cool the package.
The silicon from which ICs are made has a limit beyond which heat generated by the chip's circuitry can't flow through the silicon and out of the chip fast enough to prevent permanent damage, regardless of external heat dissipation methods (heat sinks). The faster the clock signal for a digital chip such as a CPU, the more heat it generates because the clock signal spends more time in the transition region between high and low logic states. Clock transitions are the only time a typical digital circuit generates significant heat, so more heat is generated as the clock speed is increased. A typical upper limit for clock speed in silicon ICs is around 4 GHz (4,000 MHz) but some specialized devices can be clocked much faster.
Comment: Just an aside, but 125C is not 25% higher than the boiling point of water (100C).  Percentages cannot be assigned to temperatures because different scales are used.  If you express the temperature in Fahrenheit, you would get a different percentage; in Kelvin, another one. All you can say is that 125C is 25 degrees hotter than 100C.

Max operating temp of IC's


Expectations of white noise

Question: Under what conditions is E[XY]= E[X] E[Y] ? If X and Y re white noise then why would this equation hold true?
Answer: The equation will hold true if X and Y uncorrelated. Independence is not required. Two white noise processes are independent, which is more than enough for E[XY]= E[X]E[Y].
Answer: We know the distribution of two random variables is the product of marginal distribution if they are independent. More precisely, when their covariance is zero.

If X and Y are Gaussian white noise, the equation might or might not hold true because you can have two correlated white noise.
Comment: "covariance zero" is less precise than "independent" (since independent pairs of variables will have covariance 0 but the converse doesn't hold). It's the more general situation that's needed.

Expectations of white noise


What could be causing the foul smell in my bathroom sink?

Question: We bought a 1967 year old ranch 2 years ago and have been experiencing a foul smell coming from our bathroom sink.  We have been putting bleach, vinegar and soda down the sink and overflow over and over again but the foul smell keeps coming back. What do you think the problem may be?
Answer: A blocked vent is probably the most likely culprit. Other things to consider: leaking plumbing from a low point in the trap under the sink letting the trap drain, evaporation of the water in the trap if this sink is rarely used.
Some sinks do not have a true vent, and may have in place aa AAV (Air admittance valves-AAVs or Durgo valves or Studor vents). In my experience, these are poorly designed and allow sewer gas to seep through.
Sometimes really old hair that has been in a drain pipe for a long time will smell pretty bad. Not a sulfur smell like sewer gas, but more like a poop smell.
Answer: Every sink with an overflow hole near the top that I used would start smelling bad. I tried everything but my sink was the only one in the house that would start to stink, even when we changed houses, so I knew I was the problem.
I have gaps between my teeth and I have to floss after each meal. I rinse my mouth in the sink and food particles get trapped in the overflow drain outlets in the the drain pipe below the sink. I removed the drain trap them used hot water and flushed the over flow at the top of my sink and could see gunk coming out of the overflow outlets in the drain.
I used toilet bowl cleaner in the same way and after that flushed with hot water again a few times till the overflow outlet had clear water only. The smell disappeared too. I have to repeat this every month to keep it smell free. I stared drinking water after flossing after each meal instead of rinsing in sink and now I have to clean the overflow every 4-6months.
I use a sink drain shroom so it's easy to remove when I clean the overflow. I will move to a sink without an overflow when I can.  I hope my experience helps someone who has tried everything else.
Comment: What is a "*drain shroom*"? Great answer but it was a WALL of words that was hard to digest. I added paragraphs to make easier to read and understand.
Answer: If the sewer vent serving that drain is blocked, you may get sewer gasses bubbling past the trap. The fix involves getting someone up onto the roof where that vent comes out so they can clear out that vent stack.


Zero Downtime Deployment - Transitional Db Schema

Question: Achieving Zero Downtime Deployment touched on the same issue but I need some advice on a strategy that I am considering.
Context
A web-based application with Apache/PHP for server-side processing and MySQL DB/filesystem for persistence.
We are currently building the infrastructure. All networking hardware will have redundancy and all main network cables will be used in bonded pairs for fault-tolerance. Servers are being configured as high-availability pairs for hardware fault-tolerance and will be load-balanced for both virtual-machine fault-tolerance and general performance.
It is my intent that we are able to apply updates to the application without any down-time. I have taken great pains when designing the infrastructure to ensure that I can provide 100% up-time; it would be extremely disappointing to then have 10-15 minutes downtime every time an update was applied. This is particularly significant as we intend to have a very rapid release cycle (sometimes it may reach one or more releases per day.
Network Topology
This is a summary of the network:
<code>                      Load Balancer
             |----------------------------|
              /       /         \       \
             /       /           \       \
 | Web Server |  DB Server | Web Server |  DB Server |
 |-------------------------|-------------------------|
 |   Host-1   |   Host-2   |   Host-1   |   Host-2   |
 |-------------------------|-------------------------|
            Node A        \ /        Node B
              |            /            |
              |           / \           |
   |---------------------|   |---------------------|
           Switch 1                  Switch 2

   And onward to VRRP enabled routers and the internet
</code>
Note: DB servers use master-master replication
Suggested Strategy
To achieve this, I am currently thinking of breaking the DB schema upgrade scripts into two parts. The upgrade would look like this:

Web-Server on node A is taken off-line; traffic continues to be processed by web-server on node B.
Transitional Schema changes are applied to DB servers
Web-Server A code-base is updated, caches are cleared, and any other upgrade actions are taken.
Web-Server A is brought online and web-server B is taken offline.
Web-server B code-base is updated, caches are cleared, and any other upgrade actions are taken.
Web-server B is brought online.
Final Schema changes are applied to DB

'Transitional Schema' would be designed to establish a cross-version compatible DB. This would mostly make use of table views that simulate the old version schema whilst the table itself would be altered to the new schema. This allows the old version to interact with the DB as normal. The table names would include schema version numbers to ensure that there won't be any confusion about which table to write to.
'Final Schema' would remove the backwards compatibility and tidy the schema.
Question
In short, will this work?
more specifically:

Will there be problems due to the potential for concurrent writes at the specific point of the transitional schema change? Is there a way to make sure that the group of queries that modify the table and create the backwards-compatible view are executed consecutively? i.e. with any other queries being held in buffer until the schema changes are completed, which will generally only be milliseconds.

Are there simpler methods that provide this degree of stability whilst also allowing updates without down-time? It is also preferred to avoid the 'evolutionary' schema strategy as I do not wish to become locked into backwards schema compatibility.
Answer: It sounds like what you are really looking for is not so much High Availability as you would need Continuous Availability.
Essentially your plan will work but you seem to have noticed that the major flaw in your setup is that database schema changes in a release could result in either downtime or failure of still available node to operate correctly.  Continuous Availability approach solves this by essentially creating a number of Production environments.
Production One
This environment is your current live version of the software being utilized by users.  It has its own web servers, application servers, and database servers and tablespace.  It operates independently of any other environment.  The Load Balancer which owns the domain resolution endpoint for these services is currently pointing to these web servers.
Production Two
This is basically release staging environment that is identical to Production One.  You can perform your release upgrades here and do your sanity tests before your go live event.  This also affords you to safely perform your database changes on this environment.  The Load Balancer does not point to this environment currently.
Production DR
This is another duplicate at a separate data center that is located in a different region of the world.  This allows you to fail over in the event of catastrophic event by doing a DNS switch at the Load Balancer.
Go Live
This event is essentially updating the DNS record to cycle to Production Two from Production One or vice-versa.  This takes a while to propagate throughout the DNS servers of the world so you leave both environments running for a while.  Some users MAY be working in existing sessions on the old version of your software.  Most users will be establishing new sessions on the upgraded version of your software.
Data Migration
The only drawback here is that not all data during that window is available to all users at that time.  There is clearly important user data in the previous version database that now needs to be migrated safely to the new database schema.  This can be accomplished with a well tested data export and migration script or batch job or similar ETL process.
Conclusion
Once you have fully completed your release event, Production Two is now your primary and you begin working on installing the next release to Production One for the next deployment cycle.
Drawbacks
This is a complex environment setup and it requires a large amount of system resources, often times two to three times the system resources to do successfully.  Operating this way can be expensive, especially if you have very large heavy use systems.
Comment: I should be Ok on both those points; the sessions are being persisted in the Db rather than server storage to avoid sessions being tied to specific virtual-machines and I currently intend to try and use a non-DNS based load-balancer. I won't have data-center level redundancy, but that can wait for a year or so after application launch.
Comment: So, if I have understood correctly, you suggest that instead of a 'transitional' DB schema change that is applied while the Db is still in use, Db-A is kept online with the old schema whilst Db-B is updated to the new schema. When the update is ready for release, the web servers are changed over and the data that was written to Db A whilst the update was being prepared is migrated to Db B (presumably by getting all changes applied after a specific time-stamp).
Comment: @PeterScott You got it.  Just keep in mind that you dont want to run the script until you are sure that all active sessions are over in the old system and it has been a long enough time that all DNS caches have been updated to the new CNAME or IP address.
Answer: Your strategy is sound. I would only offer to consider expanding the "Transitional Schema" into a complete set of "transaction tables".
With transaction tables, SELECTs (queries) are performed against the normalized tables in order to assure correctness. But all database INSERTs, UPDATEs, and DELETEs are always written to the denormalized transaction tables.
Then a separate, concurrent process applies those changes (perhaps using Stored Procedures) to the normalized tables per the business rules and schema requirements established.
Most of the time, this would be virtually instantaneous. But separating the actions allows the system to accommodate excessive activity and schema update delays.
During schema changes on database (B), data updates on the active database (A) would go into its transaction tables and be immediately applied to its normalized tables.
On bringing database (B) back up, the transactions from (A) would be applied to it by writing them to (B)'s transaction tables. Once that part is done, (A) could be brought down and the schema changes applied there. (B) would finish applying the transactions from (A) while also handling its live transactions which would queue just like (A) did and the "live ones" would be applied the same way when (A) came back up.
A transaction table row might look something like...
<code>| ROWID | TRANSNR | DB | TABLE | SQL STATEMENT
    0        0       A    Name   INSERT INTO Name ...
    1        0       A    Addr   INSERT INTO Addr ...
    2        0       A    Phone  INSERT INTO Phone ...
    3        1       A    Stats   UPDATE Stats SET NrOfUsers=...
</code>
The transaction "tables" could actually be rows in a separate NoSQL database or even sequential files, depending on performance requirements. A bonus is that the application (website in this case) coding gets a bit simpler since it writes only to the transaction tables.
The idea follows the same principles as double-entry bookkeeping, and for similar reasons.
Transaction tables are analogous to a bookkeeping "journal". The fully normalized tables are analogous to a bookkeeping "ledger" with each table being somewhat like a bookkeeping "account".
In bookkeeping, each transaction gets two entries in the journal. One for the "debited" ledger account, and the other for the "credited" account.
In an RDBMS, a "journal" (transaction table) gets an entry for each normalized table to be altered by that transaction.
The DB column in the table illustration above indicates on which database the transaction originated, thus allowing the queued rows from the other database to be filtered out and not reapplied when the second database is brought back up.
Comment: I like the comparison to book-keeping. So, if I've understood, the transaction tables allow me to place a very small delay on writing data to a particular normalised table so that I can apply all schema changes without risk of interruption mid-way through the changes? Then, with the table's schema up-to-date, I can resume the process that applies the denormalised transactions to the normalised tables (this process being capable of mapping the old schema data queries to the new schema)?
Comment: Yes. You would modify the mapping stored procedures (or whatever) to accommodate both old and new data. New NOT-NULL columns might be filled from old data with a code that means "prompt for this on user update." Columns to be split (i.e. FULLNAME into FIRST and LAST) would need some algorithm. I recommend adding 1 or more "comment-like" columns to tables for new biz requirements that come up. If you don't, I guarantee users will appropriate other columns for that purpose and fixing the data will then be almost impossible.
Comment: When you add a table, column, or anything else to an RDBMS, you are actually just adding rows to a set of internal tables that can be written to only by the RDBMS engine. The DBAs manage the database by querying them through VIEWs. Since Oracle, IBM, MS, etc. are the experts and say this is the best way, seems we should follow their lead. Create a set of VIEWs for each version of the application. You can model them after the  (usually fairly denormalized) tables the developers want you to create so you can properly normalize to prevent corrupted data.
Comment: How would you prevent SELECT queries structured for the old schema being applied to the new schema? I could use create a table view and rename the schema table (with a schema version number) but this would still be problematic whilst the schema changes are being applied since they apply directly to the normalised table.
Comment: Thanks. I'll need to think about this. i am building an ORM layer in the application that completely removes all state persistence logic from the main domain; being more based in server-side programming I tend to solve problems more from that side than the DB administration side. Using my current strategy, the Db would quite flat with the ORM actively managing the raw tables. Adding table views and, possibly, a transaction log adds greater complexity to the ORM but it also affords multiple schema versions to be supported without data splintering.
Comment: VIEWs should be completely transparent. I know they are in Oracle. I think they are in SQL Server.  To your ORM layer and app, they look like tables and present a more flatten schema to it. VIEWs are just a declarative way to eliminate a lot of the complexity needed to maintain data integrity when done in code. They take up no space since they contain no data. "Materialized VIEWs" on the other hand, do cache the VIEW results in a table. They're mostly used in Data Warehousing where the data only changes on a predictable schedule. People often confuse them.


Samsung s7 password locked - can't get onto phone

Question: today I authorized a payment through Google pay on my phone. I've always avoided this and now I know why I never wanted to pay through Google. As I made this purchase it prompted me to create a phone safety option (either a pattern, password, or fingerprint), and I didn't really understand why that was necessary to authorize payment (no other payment form was given as an option), but I went with it and created a password. I remember this password. Now after my phone went to sleep, it wanted me to enter a password, since I apparently enabled this feature (hate it). I entered the password I created during this transaction, and there is no 'enter' button or prompt. Just the password box, and 'emergency call.' However I tried hitting 'done' on my phone keypad and it says incorrect password. Several times, I know it's what I created it with. SO... I went ahead and tried my actual Google password for the email account I used to make the earlier purchase. Still can't get onto my phone. I'm sorry, but what the hell ???  Can anyone help me with this and maybe a way I don't need to factory reset and lose everything (pics, texts, apps, contacts (I'm not sure if they're Google backed up)) ?   All I wanted to do was relax and watch something I really like.  I'm also having trouble troubleshooting on my computer because it's slow... and I can't call anyone.  WHY
Comment: remove the SIM card. this way you can be sure not to mixing up SIM pin and screen lock. maybe the password is too long and doesn't fit? i am sorry to say but all your data is lost. you can try to set new password from PC with [Find My Mobile](https://findmymobile.samsung.com) or [Find My Device](https://www.google.com/android/devicemanager) but people report this method doesn't work. Your only chance left is enter the correct password
Answer: If you go through your computer and change the password it makes you able to initialize a new password and unlock it manualy when you do so and log off your computer after turning your phone back on so yes turn your phon.off before changing it on your cpu
. I hacked a phome back to myself this way but i forgot the password and initaly im forever locked out of that phone unless i figure out the newest password that google took away from me! Contact google AFTER! YOU do this so your account dosent get locked due to them thinking its being hacked!


Crystal Report in vb.net application showing blank page

Question: I have a crystal report that works in Crystal Reports Writer XI just fine.  I run the report in the application passing the same information that I use to test in the CR Writer and the report is completely blank.  No exceptions what so ever are raised in the application.
I've opened the report in VS2008 and resaved it and verified the database and still nothing.  I have two different versions of the report.  The report is using stored Procs and I have verified that it is loading the report because it is accepting the parameters I setup in the report.  If I change the name of the parameter I'm saving to something invalid it then throws an error.
This is a very weird issue I have not experienced in the past.
Comment: What do you mean by "blank"? Is it a report with no data? Is it just a blank white page showing in the crv? maybe post the code that is loading the report and passing it to the viewer.
Comment: are you sure it's accessing the correct report? Try displaying a parameter on the report.
Answer: The issue ended up being the report file being corrupt.  Recreated the report and it worked fine.


Open unit disc is homeomorphic to sphere minus a point

Question: How to show that sphere minus a point is homeomorphic to open unit disc in $\mathcal R^2$.By using this i will be able  to show that sphere minus a point can be thought as a hyperbolic surface .
I know that open unit disc is homeomorphic to complex plane which is inturn homeomorphic to sphere minus a point by stereographic projection and composition of these two will work.
I am looking for a direct map between open unit disc and sphere minus a point.
i have no knowledge of algebraic topology so a simple answer without using fancy terms will be appriciated.
Comment: When you write the formulas for the two homeomophisms you mentioned, and compose those formulas as suggested by @JoaoCaminada, you will get one formula for the homeomorphism you want. You can then pretend you didn't know where it came from, and it will be "a direct map". Generally speaking, just because a function is a composition of two other functions does not make it any less of a function.
Comment: The usual buzzphrase is "stereographic projection".
Comment: Compose the two homeomorphisms you mentioned.
Comment: If you're considering conformal structures (as suggested by the use of _hyperbolic surface_), the sphere minus one point is the plane, _not_ a disk. The plane and disk are homeomorphic, as you say, but not conformally isomorphic.
Comment: i am looking for some other answer
Answer: Can you just send the south pole to the center, leave longitude alone, and map latitude to radius via a linear $(-90^\circ,90^\circ)\to (0,1)$?
Also, if you already know how to send the sphere to the plane, and the plane to the disc, then the composition of those two maps will be a direct map doing what you want.

If the geography terminology isn't comfortable, let's try some more explicit algebra. For the open disc, take the set of points $D=\{x,y:x^2+y^2<1\}$. For the sphere with one point missing, use $S=\{(x,y,z):x^2+y^2+z^2=1, z\neq1\}$. We construct a map $f:S\to D$.
Let $f(0,0,-1)=(0,0)$, and for $z>-1$, take $f(x,y,z)=(xt,yt)$, where $t=\frac{z+1}{2\sqrt{x^2+y^2}}$.
What does this map do? It sends the bottom of the sphere to the center of the disc: $(0,0)$. Points near the bottom of the sphere have $z$ close to $-1$, so they get sent to points close to $(0,0)$. Points near the missing point on top get sent very close to the edge of the disc. The direction of a point from the origin, i.e., the $\theta$ of polar coordinates, is preserved.
To see that it is one-to-one, and onto, we can write down its inverse: $f^{-1}(x,y)=\left(\frac{2x\sqrt{1-u^2}}{u+1},\frac{2y\sqrt{1-u^2}}{u+1},u\right)$, where $u=-1+2\sqrt{x^2+y^2}$. You can verify that these functions are inverses by calculating $f(f^{-1}(x,y))$ and $f^{-1}(f(x,y,z))$. You can also verify that the ranges of $f$ and $f^{-1}$ really are in $D$ and $S$, respectively.
Does this help?

Edit: To answer the question, How did I cook up this map?
First, I visualized a sphere sitting on top of a disc, and I imagined it opening up at the top and becoming flat. There's no need for any rotation in this scenario, so the $(x,y)$ coordinates of the point just need to maybe move in or out from the origin, but stay pointing in the same $xy$-direction.
In order to keep the bottom of the sphere in the center of the circle and get the top of the sphere out to the circumference, I thought, why not just map $z$ to $r$. Since the $z$-coordinates all come from $[-1,1)$, and we want $r$-values on $[0,1)$, I thought of the linear map $r=\frac{z+1}{2}$. If we start with the point $(x,y,z)$, its purely $xy$-distance from the origin is $\sqrt{x^2+y^2}$, so if we want it to be at distance $r$ instead, we need to multiply both $x$ and $y$ by the factor $\frac{r}{\sqrt{x^2+y^2}}$.
That's how I cooked up $f$, and to find the formula for $f^{-1}$, I just worked out how to reverse the above process. That part was more algebraic, and less about visualizing a melting sphere.
Comment: what is latitude and longitude.
Comment: Well, they're how we put coordinates on a sphere for geography. If that doesn't work, I'll edit for something else.
Comment: It would help if you tell us how you identify specific points on the sphere.
Comment: i visualize sphere sitting in $R^3$
Comment: @Tony jacobs how did you get this map
Comment: Well, the short answer is that I thought about what I wanted it to do, and then found a way to write that down. To give you a better response, I'll have to edit my answer. Gimme a minute.
Comment: I've made some edits. Does that help?
Comment: Do you not need to prove that $f$ and $f^{-1}$ are both continuous, for this to be a homeomorphism?
Comment: @Batrachotoxin, yes that is required to show that something is a homeomorphism. All of the functions written down are continuous in their domains, though.


Date palm not growing

Question: I planted my date palm 3yrs ago now. So far it has has grown 3 very long leaves, but no stem / trunk. These leaves have also grown tremendously slowly. The soil I have used it Miracle-Gro Indoor Potting soil. I water it once every 2 weeks or so. I just cannot figure out why it's not growing. My room is very sunny; but it is placed just out of direct sunlight.
Comment: Couldn't hurt to give this Middle East desert plant maximum sun gradually. You are allowing for about 5% of the sun it expects.
Answer: is it a old desert say: "plant a date palm, so your sons will see the fruits from it"? So: it is a very very slow-growing plant.
My experience on a green house is similar (and a green house has sun from all directions): healthy (so many new shots/leaves), but slow. And I assume both of us doesn't live in desert so the ideal conditions of such plant, so add few extra decades.
Answer: I am growing a date palm from seeds and it is five or six years old now and at least two meters tall. My observations:

this plant needs full sun. To get good growth I put it outside in the summer when temperatures are above 10 degrees Celsius
it is a vigorous grower when given full sunlight and unlimited access to water
a vigorous root system indicates that repotting can be done yearly if light and water are supplied
never had any pest problems
thorns on the fronds are a safety issue
works well with a capillary wick system

Date palm not growing


Why naive bayes is "naive"

Question: Some articles say that naive Bayes is naive because of "independence of attributes". Whereas others say "independence of attributes within a class". Can anybody please clear this confusion?
Thanks
Answer: Naive Bayes doesn't assume independence of attributes ... It assumes conditional independence (or what you call independence within a class). This allows us to write the likelihood in the bayes rule P(X | Y) as the product of all P(Xi | Y), where X = (X1, ... Xi, ... Xn) and n is the number of attributes.
Comment: No, I'm afraid you have it backward. It is naive because it assumes the samples are independent. This makes calculations much easier. The predictors are treated as if they are naive of conditions. The predictors are treated as if they essentially independent. https://www.analyticsvidhya.com/blog/2017/09/naive-bayes-explained/

Why naive bayes is "naive"


Can my achievements be tracked in multiple systems, eg. Games for Windows Live and Steam?

Question: Say that I'm playing a game that's available on both systems (Mass Effect for example). Will my in game achievements be tracked on both?
Answer: The only service that I know that is able to track achievements from different platforms (Steam, XBox Live and Playstation Network) is Raptr.
It tracks also the games (any game not only those you have in Steam) your are playing on PC.
Answer: You will only get the achievements on whatever system you bought the game for. So, if you got the XBox version of Mass Effect, you will get XBox Live achievements. If you play Games for Windows Live version, you will get GfW Live achievements. If you get the game from Steam... you get the idea.
Fun fact: if you want to boost your Microsoft gamerpoint score, you can play the same game on the XBox and on the PC if it has a GfW Live hook-up and double-up on the achievements.
Comment: That sounds fair. You do the work twice, you get the achievements twice
Comment: @blueberryfields Oh yeah, it makes sense.
Comment: I'm confused as to why I have to repurchase my games on different systems. I already have a license for the game and even have it installed. Aren't steam and Games for Windows Live just overlays on the game?
Comment: @Daniel Hmm? The game may be the same, but achievement systems are different and are tracked separately. Different distribution services might also integrate the games differently. I'm not sure if you'd have to rebuy the game or not if it's available both on GfW and Steam. It might depend on the game.


Is the amount of work really a workplace culture?

Question: I recently moved to a large bank as a consultant and looking at the strategies, I understand the projects I'm working on are NOT mission critical and have less priority. but what I'm observing is millions of dollars are being spent and nothing is getting done. Everyone is skipping work and I have ridiculously little amount of work to do. I discussed this with my manager very indirectly but he says this is the "work culture" here. Aside from being worried about the bank's money, I'm worried that the projects might get cancelled. I have a key technical position here and I don't know how to deal with this situation. Any help is appreciated!
Comment: Hey Good Hearted, and welcome back to [workplace.se]! The best questions here get answers that explain *why* and *how*, so questions that ask open-ended "I wonder if..." questions typically won't get that type of answer. You may want to [edit] your question to focus it a bit more on a specific question that will give more actionable information backed up by an explanation of why that's an answer. Feel free to drop by [chat] if you want some guidance from our regulars! Thanks in advance.
Answer: As a consultant at a large bank, I'm sorry to say that this is not uncommon at all and these projects can run for years and years. I don't know if I'd call it a culture but I'd definitely say that it's something that is observable in a number of large organisations, not just finance.
I'd add that the best thing I can suggest is that you observe, work out what the business need or want in the project you're leading and "be the change you want to see".
Comment: Yeah, generally I don't stay on projects for more than 9 months so that doesn't tend to matter as much!
Comment: @GoodHeartedOne A lot of people try to push for changes at such organizations thinking that the problem is incompetence. I made such a mistake as well thinking that by helping teach and train others on my own time that I could affect change. I found that incompetence is usually not the case, it is overwhelming crushing apathy. The fact that you are not apathetic makes them look bad.  The fact that you have a work ethic makes them angry because you compel productivity out of others that are content to just coast along. They will resent you for doing your best and trying to change things.
Comment: Thanks for the answer. This was my approach until I realized this is creating conflicts in my relation with my co-workers.
Answer: What you're experiencing is working for a business, really any business, who's core competency is not software/technology. I promise if you head over in to the wealth management division of your bank, work is getting done at a reasonable pace.
The fact of the matter is that when working for a business who's core competency is not yours, you're going to find varying degrees of this attitude. The work is simply not as important to the brass as the core of the business is, and frankly they rarely know enough about technology to even realize that those divisions are under performing. Sometimes you'll find a business who has a really competent CTO that pushes for proper practices, but rarely.
You can certainly "be the change you want to be" as Michael suggested, and that's a good policy in life in general...but don't get frustrated when nothing really changes. People, as a rule, will take as much rope as they are given. In a scenario where your core competency does not line up with the mission critical parts of the business, people are going to take a lot of rope.
Comment: Wow, this is a great perspective that I had never considered in my own workplace! I work in the IT arm of a large insurance company, and have often boggled at the fundamental gaps in basic computer science skills that are commonplace among my colleagues, but looking at it this way, it's probably just because, even though they work in the IT area of the company, most of them are probably just insurance industry workers with some sort of project life-cycle management skills that are more about process than technology.
Answer: Often the slackers at 'your level' are there because their managers are slackers at 'their level'.  In short, they don't want people campaigning for resources that other departments need more, so things kind of muddle along slowly.  What happens, of course, if some crisis erupts that needs action right away - this is the 'utility worker' model - most of the time the people on the power lines don't have much to do, but when everything ices up they're in over their heads. Best thing to do is drill into your systems and know them thoroughly.  While these other people might be slow, they might eventually wake up to the fact that their pay and advancement is commensurate with their output.
Financial services is an area where testing and security are paramount - thus the best thing to do is try in every way you can to 'bust' the systems you're responsible for. Do the absolute best you can to harden them up, even if they aren't changing much.


Given that they contain an OH group, why do carboxylic acids not act as base?

Question: As far I know carboxylic acids have a OH group but during dissociation only hydrogen gets separated. The CO moiety is polar, demonstrating that oxygen is much more electronegative than carbon. Why does the OH group not get separated from carbon and behave like a base?
Comment: The same way sulfuric acid, nitric acid, etc do not act as bases despite containing hydroxyl groups, maybe?
Comment: The carbon is *already* polarised from the carbonyl oxygen. It does not want to give away even more electron density, and certainly you cannot get it to take part in a charge separation.
Answer: Well it can act as a base depending upon what kind of other substances are there in your mixture. As a matter of fact any substance can act as a base or an acid depending on the substances that are present. Also there are more ways of defining a base (here I think it is a good idea to use the Lowry-Bronsted definition in which a base is anything that can capture H+ and the OH of a carboxylic acid can indeed capture a H+ that may come from a strong acid like H2SO4.And indeed as mentioned before it leaves as water not as HO- the reason why it doesn't act as a normal base (for example NaOH where you have HO- in the solution when you dissolve it in water) is because that one is an ionic compound Na+ and HO- while in a carboxylic acid the bond between C-O is a covalent bond even if it is polarized so it needs some other conditions for its departure to be reasonable (energetically speaking) thus a HO- can not just leave the compound.
Answer: Well. Carboxylic acids are acids in water. In other solutions, they may act as a base. For example, in the esterification process, they are mixed with an alcohol in the presence of sulfuric acid (or any other dehydrating agent). It has been possible to show, by using unusual isotopes of Oxygen, that the oxygen bound to H in the -COOH group is eliminated, as if it was a base. The point is that the Oxygen atom used for the -C-O-C- bridge, typical of esters, is coming from the alcohol and not from the carboxylic acid.
Comment: The OH likely leaves as its protonated form as water, not hydroxide.


How do I season an iron griddle on an induction hob?

Question: I have an induction hob but no oven, how do I season a new cast iron pan I'm thinking of getting?
Answer: You don't.
I've tried to do this. It doesn't work.
The problem is that the induction hob heats a cast iron pan to very hot temperatures, even on the lowest setting. And when it doesn this, it doesn't heat evenly, you get a coil-shaped hot spot.
We have had a question about seasoning cast iron on stovetop, and somebody reported good results provided that it is done "low and slow". I can imagine this working. But on the induction, there is no way to go low and slow. The pan gets too hot after half an hour at the latest, the oil burns on the hot spot and stays liquid outside of it.
The easiest version might be to season it at somebody else's place (parents, friends) and then use it normally at home. Once the seasoning is done, there is no problem with that. I haven't done that; I started seasoning in my toaster oven. Even when the pan is too large to close it, the results are still better than on the induction hob.
Comment: @SAJ14SAJ of course you get the coil-shaped hotspot during cooking too. It just doesn't make so much problems as during seasoning, because 1) you can stir and 2) you don't hit burning temperatures.
Comment: another option would be to season it in a gas grill.
Comment: I am confused... if the induction method creates such hotspots while trying to season, would it not have the exact same problem when trying to cook with the griddle, making the griddle very unsuitable for induction cooking in any case?
Comment: that's interesting, i've never heard of this uneven heating before on induction cooktops. I wonder if a diffuser plate would make this more viable.
Comment: @Brendan a diffuser plate counters the advantages of induction. The hot spot is not worse than the hot spot on a gas stove. It is probably less of a problem with bigger coils, mine is rather small.


Ruby on rails: variable number of input boxes

Question: I'm working on an application where the user needs to be able to upload multiple files at once in a submission form. Ideally I'd start with, say, three file upload fields with an 'add additional files' button that dynamically adds input fields. I can do the Javascript to handle this of course, but how would I access this "array" of files within my controller?
I've looked at a few canned solutions, but they're much more flashy than what I need, and I don't need ajax uploading either - just a regular old submit is fine.
So, to summarize: what's the best way to access zero or many uploaded files in a rails application?
Thanks in advance.
Answer: Nevermind, I found what I was looking for via the 'nested_form' ruby gem.


What is this seed/fruit from a tree in Greece called?

Question: I picked this up from a tree in Greece, where the landform was plain. It is about 2.5cm (see other objects for scale). I would like ot know its name
Comment: where are you located? Did you find this on a random tree or bush, or did you buy it at a food market? Is your question whether it's safe to eat, or do you just want to know its English name so you can find recipes that use it?
Comment: Are you even sure it's edible? I think I've seen it, but not used for human consumption.
Comment: I picked it up from a tree.I just want to know its name.
Comment: Can you put something else in the picture for scale?
Comment: It is 2.5 cm tall if that helps
Comment: This may be better asked on Gardening.
Comment: Regarding @KateGregory initial comment, what was the location of the tree? (country, landform...)
Comment: It's from Greece and the landform is plain.
Comment: It reminds me vaguely of an olive or caper berry
Answer: This might be brier you're talking about.
It's hard to tell based on only that picture... it may be a type of cherry, but when I saw the post, I instantly pictured it to be a type of brier.
Answer: Looks clearly like a cherry, but might not be an edible one. The fruit is a bit ambiguous, but the leaf is a perfect match. The stem is also very telling.
A clarification on language: The sweet black cherry sold in the market is not the only fruit called "cherry". There are many types of cherry, and while I am quite sure the picture depicts one of these, I can't promise that it is a tasty, edible cherry. It is certainly not the sweet black type. It may be a chokecherry, as mentioned in the comments; botanically, this would still be a cherry, just like a cantaloupe is still a melon. Or it may be any other of a number of edible and inedible cherries.
Comment: could be a chokecherry though
Comment: There are many different types of cherry. I cannot promise that the picture is of one of the types which are normally eaten. A chokecherry is, botanically speaking, as much of a cherry as the ones we eat. Of course, if somebody can make a more differentiated identification than mine, it would be good.
Comment: My thought exactly,but its too small for a cherry.
Comment: @user24364 : we have nothing to give it scale ... you need a ruler in the picture or a coin or something else of a standard size.
Comment: It's 2.5 cm tall.
Comment: "It's a cherry" might imply to a lot of people that it's an edible one, so I added a bit at the beginning to be safe.


External hard disk files disappeared after connected to dissimilar hardware PC

Question: I know a hard disk (or ssd) may not work in dissimilar hardware, in different PCs. But I just wanted to use the disk to the new PC as a test quickly, so just replaced the disk to new desktop PC from old laptop one. And, it worked. Firstly its graphic was weird but fixed automatically in no time. Then I used the machine for a while. While that time, I use some software and Adobe after effects, and exported a video files to an external hard disk. Yes, definitely saved it. And after a while I turned off the desktop, and replaced the disk. Then, I booted the desktop with an other SSD (this is mainly used one actually) connected to the external hard disk, then I tried to check the video files I saved. And, I noticed the folder and files I created while using the laptop disk, were nowhere to be found. Seems they are disappeared. This is first time I lost some files from hard disk this clearly. Is that really possible to lose files actually saved? Does this mean the hard disk rolled back or something? What is happening? What was wrong with me? Thanks.
Comment: Please specify your OS. I assume Windows 10 but could be very different. What sort of search have you done? Tell us. People lose files all the time, forgetting names or locations.The files are there but cannot be found.
Comment: If this is the system drive, then you might be missing some driver(s).
Comment: CharlesKenyon, "forgetting names or locations" is nearly impossible to me. The only available hard disk was the only one and I can remember clearly where is was. Also I use Everything software to search files from all the hard disks, it should be found by it, but nowhere to be found. I'm almost sure the files gone,
also, yes, the OS it's Windows 10. Windows 10 to Windows 10.
Comment: harrymc, losing files on system drive (like C:) by doing such stuff is understandable, I think. but as I said, surprisingly it's external hard disk, no windows system files. so I'm quite surprised.
Answer:
so just replaced the disk to new desktop PC from old laptop one. And,
it worked.

Moving operating drives from one computer to another is not supported.  Different BIOS, and different drivers.  You really cannot switch drives between computers reliably.
So the loss of files is likely the result of the above differences.
Also, depending on the OS, activation (lack of it) on different hardware could be a problem.
You would need to recover the files from a backup or older versions.
Comment: a backup or older versions, means software like Recuva you mean? Also, my main concern here is, "Is that really possible to lose files on *external hard disks* ?" Also I didn't write about this but the system disk was no data damage. The only external hard disk data lost. So I'm really confused
Comment: "so just replaced the disk to new desktop PC from old laptop one."   <-- You indicated you installed the disk as an operating system disk and that caused numerous issues. Yes it is confusing.


ERC-721 Contract

Question: I am making an ERC-721 smart contract and want a feature where an NFT with special perks can only be claimed when it has been transferred to a different wallet. Scenario: Person A mints an NFT with special perks but cannot claimed bc it has not been transferred/sold to a different wallet. Person A sells the NFT to person B. Now person B can claim the perks since there has been a transfer on the blockchain. How would I implement this in solidity. I am thinking of a counter that keeps track of times the claimable NFT has been transferred. So if counter > 1 : NFT is claimable. Any ideas??
Answer: I guess the easy way would be when user A mints the NFT it gets minted to the contract itself and when someone buys it then the ownership gets transferred to that person.
This wouldn't allow anyone to transfer the NFTs which have been minted but not sold, because the contract has the ownership.
Using counters doesn't seem an optimized idea as you would need individual counters for each NFT.
My approach can also be security vulnerable but we can think more on this.
Comment: What I learned is that "erc-2981 -> There is no way of knowing if a NFT transfer included some kind of sale.

A marketplace needs to implement some form of SC that would take funds/NFT and move them around. The SC itself is the "proof" that it was sold and only if this SC moved the funds/NFT, it counts a sold. All other NFT movement would be a normal transfer."
Comment: and what I was thinking is should I incorporate a smart contract similar to what market places are using to identify a sale. That contract will then trigger an update in a claimable variable for each token. The problem is not all tokens will have a claimable attribute but this way makes it so that all tokens do.

ERC-721 Contract


Collect codes for non-retail scenario

Question: Can we use collect codes for non-retail scenarios especially if I wanted to track unknown visitor activity on my website and tie back that activity when a user provides an email on a sign-up page? (I don't need any Einstein recommendations or Predictive intelligence in this case because we use GA360)
 1. Track anonymous visitor activity using collect codes and store in a Data extension
 2. Without a cloud page (from an external website), capture user details including email and post to a data extension (via. API)
 3. Look for any activity captured in IGO_ and PI_ data extensions previously for the newly recorded email address and tie that activity for advanced segmentation requirements.

Also please shed some light where exactly I can find browser details, pageview details, etc. in IGO_ and PI_ data extensions.

Any help here is highly appreciated. Thanks in advance.

Chandu
Answer: Yes, this can indeed be done, however please observe the prerequisites for implementing this. You need a.o. to have a catalogue in place, for your content. Items not in catalogue will not be tracked and passed on to data extensions. Once prerequisites are in place, you will be able to connect the data from collect code to your PI/IGO Data Extensions. Please refer to the notification on the page where you enable the connection, for any outstanding configuration, before the connection can be made.
You can use the DEManager to push data into a Data Extension from an external website. This is far the simplest solution, as it doesn't require you to use any API integrations. An example can be seen here:
        <form action="http://cl.exct.net/DEManager.aspx" name="subscribeForm" method="post">
        <input type="hidden" name="_clientID" value="12345" />
        <input type="hidden" name="_deExternalKey" value="WebCollectSubs" />
        <input type="hidden" name="_action" value="add" />
        <input type="hidden" name="_returnXML" value="0" />
        <input type="hidden" name="_successURL" value="http://example.com/Success" />
        <input type="hidden" name="_errorURL" value="http://example.com/Failed" />
        Email: <input type="text" name="Email">

        First Name: <input type="text" name="FirstName">

        Last Name: <input type="text" name="LastName">

        <input type="submit" value="Submit">
        </form>

Replace the _clientID with the MID where you want the data. _deExternalKey must be replaced with the external key of the destination Data Extension. And action url needs to be adjusted according to the stack you are on. This example shows the url for stack 1. If you are on e.g. Stack 7 - the url will be: http://cl.s7.exct.net/DEManager.aspx
You can use the set user info call to assign your own identifier to map browsing behaviour to your contact model. You should not use Email as an identifier, but you can do this with e.g. your Subscriber Key. This will allow you to join the behaviour stored in IGO/PI data extensions with rest of the user data.

You can read here about what data is stored in which data extensions.

Collect codes for non-retail scenario