BouncyCastel Cast5 setkey

Question: using System;
using System.Linq;
using System.Text;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Digests;
using Org.BouncyCastle.Crypto.Engines;
using Org.BouncyCastle.Crypto.Modes;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.Math;
using Org.BouncyCastle.Utilities.Encoders;

namespace Common.Encryption {

    public class Cast5Cryptographer {
        private bool forEncryption;
        private BufferedBlockCipher cipher;

        public Cast5Cryptographer(bool forEncryption) {
            this.forEncryption = forEncryption;
            cipher = new BufferedBlockCipher(new CfbBlockCipher(new Cast5Engine(), 64));
            cipher.Init(forEncryption, new ParametersWithIV(new KeyParameter(Encoding.ASCII.GetBytes("BC234xs45nme7HU9")), new byte[8]));
        }

        public void ReInit(byte[] IV, BigInteger pubkey) {
            cipher.Init(forEncryption, new ParametersWithIV(new KeyParameter(pubkey.ToByteArrayUnsigned()), IV));
        }

        public int BlockSize {
            get {
                return cipher.GetBlockSize();
            }
        }

        public byte[] DoFinal() {
            return cipher.DoFinal();
        }

        public byte[] DoFinal(byte[] buffer) {
            return cipher.DoFinal(buffer);
        }

        public byte[] DoFinal(byte[] buffer, int startIndex, int len) {
            return cipher.DoFinal(buffer, startIndex, len);
        }

        public byte[] ProcessBytes(byte[] buffer) {
            return cipher.ProcessBytes(buffer);
        }

        public byte[] ProcessBytes(byte[] buffer, int startIndex, int len) {
            return cipher.ProcessBytes(buffer, startIndex, len);
        }
    }
}

it's working fine with the key above which it's 16 length , but when am trying to ReInit() it with this key
byte[] newkey = new byte[] { 0x39, 0x65, 0x38, 0x63, 0x64, 0x32, 0x36, 0x63, 0x37, 0x37, 0x34, 0x31, 0x33, 0x65, 0x61, 0x36, 0x65, 0x35, 0x35, 0x39, 0x61, 0x32, 0x35, 0x32, 0x66, 0x30, 0x31, 0x35, 0x32, 0x38, 0x66, 0x39, 0x34, 0x38, 0x66, 0x33, 0x33, 0x34, 0x32, 0x62, 0x31, 0x38, 0x37, 0x36, 0x34, 0x61, 0x66, 0x35, 0x36, 0x38, 0x62, 0x39, 0x63, 0x39, 0x30, 0x33, 0x63, 0x35, 0x38, 0x38, 0x35, 0x34, 0x65, 0x63 };
it throw this exception Index was outside the bounds of the array.
for (int i = 0; i < key.Length; i++) {
                x[i] = (int)(key[i] & 0xff);
            }
inside the SetKey method in Cast5Engine.cs , so I updated this method so instead of having fixed length to x which is 16 , I made it
int[] x = new int[key.Length];
for (int i = 0; i < 16; i++) x[i] = 0;
        /* copy the key into x */
        for (int i = 0; i < key.Length; i++) {
            x[i] = (int)(key[i] & 0xff);
        }`

but now by comparing the result which am getting from Cast5 of BouncyCastel to the Cast5 of OpenSSL , it seems like Bouncycastel Cast5 is not being updated with the right key, so it produce wrong Encryption/Decryption.
is there any suggestion to fix the Setkey method?
Answer: From looking at the source code for OpenSSL's CAST_setKey method...
    void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data)
#ifdef OPENSSL_FIPS
    {
    fips_cipher_abort(CAST);
    private_CAST_set_key(key, len, data);
    }
void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data)
#endif
    {
    CAST_LONG x[16];
    CAST_LONG z[16];
    CAST_LONG k[32];
    CAST_LONG X[4],Z[4];
    CAST_LONG l,*K;
    int i;

    for (i=0; i<16; i++) x[i]=0;
    if (len > 16) len=16;

See the line "if (len > 16) len = 16;", they only keep the first 16 bytes of the key. This wouldn't happen to be for Conquer Online 2.0 would it?, I recognise "BC234xs45nme7HU9".
Comment: yeah , and I figured that out long time ago :P

BouncyCastel Cast5 setkey


What is a "digital" motor?

Question: Dyson keeps going on about their new "digital" motor. What is a digital motor? How can a motor be digital, if it is inherently analog? Is it just marketing doublespeak?
Comment: You push it around with a finger!
Comment: It could be a motor that is on or off :L
Comment: @Dean, People easily found the information, so I assume it was easy to come by, but when you want to discuss someone's claims it helps if you link directly to their claims. This will improve the quality of the site directly. Directly quoting the claims with links will provide best results. This way in 20 years people can still understand the context.
Comment: Could it be a stepper motor in disguise? :p
Comment: @ThomasO, you need to provide links to information like this.
Comment: @Kortuk Do dyson not advertise in the states?
Comment: http://en.wikipedia.org/wiki/Reluctance_motor
Digitally controlled motor would be more accurate.
Comment: I'm so glad to see others perplexed by this Dyson marketing claim.
Comment: Don't you see, it's only the *simulated rendering* of a vacuum in the advert that's digital, the *real* one however...
Comment: Is the Dyson vacuum also gluten-free, non-GMO, organic, natural, paleo, vegan, and carbon neutral? (Is that enough marketing buzz-words?) My Dyson vacuum is a cheap plastic piece of junk that is eager to break. But until it does, it sucks. Be thankful they didn't invoke quantum field energy, holistic vibrations, or paranormal effects.
Answer: Unfortunately the term digital seems to be applied inappropriately to all sorts of things.
Here is a good video from the EEVBlog taking Dyson to task for their "Dyson digital motor".
Here is Dyson's take where they say "Dyson digital motors use digital pulse technology, spinning at up to 104,000 times a minute"
Then again, most switches to turn a motor on or off are digital, binary in fact ;-)
Comment: "And as the carbon brushes wear down, they emit carbon particles, which is bad for the environment."  What a bunch of nonsense.
Comment: That EEV blog is hilarious!
Comment: @Majenko, Use the vacuum and you will change your tone. Helluva great vacuum, I could care less about their marketing, my carpet is clean : )
Comment: So basically it's a standard brushless motor? Why do they say it uses an iron core? I thought you needed a magnetic core for high power applications.
Comment: Our intelligence has been severely damaged, at times, by the likes of marketing schemes the world over.
Comment: My gaming computer has 8 fans in it, that's 8 digital motors right there, and strangely none of them say Dyson on them.
Comment: So what - Dyson have taken a typical hard drive motor (for example) that hasn't changed in how many years?  and put a fan on it...?  Big innovation...
Comment: There's no answer here - neither of the links you provide give the answer.
Comment: @endolith Indeed, are the brushes part of the motor?
Comment: @kortuk We have a dyson. Loathe it with a passion.
Answer: Turning something on and off does not make it "digital".  Switch-mode power supplies are not digital.  Class D amplifiers are not digital.  Just because something outputs square waves doesn't mean it's digital.
"Digital" means data or information being transferred in the form of discrete symbols.  As long as a symbol is received without error, the signal suffers zero degradation, unlike analog which is incrementally corrupted by noise and distortion.
Those symbols can be represented by on and off pulses, like in digital logic, but also by any other scheme you can think of, like phase shifts of a sine wave, or by frequency shifts of a sine wave, or whatever.  They're all digital.
Comment: Be careful here, remember that Morse code is digital. Not all digital codes contain error correction or check bits, so just because it is digital does not guarantee perfect reception.
Comment: As an audio guy I've had the Class D is not digital argument far too many times.  I keep feeling the entire thing may have been avoided if they simply skipped 'D' in topology naming...
Comment: I didn't mean that it guarantees perfect reception.  I mean that, if there are no errors, the signal is transmitted with zero degradation.  If you transmit it through the same channel many times it will not degrade, while analog will, even if the noise floor is very low.
Comment: Things like like PWM and FM can be analog or digital, depending upon what's generating or receiving the signal (in particular, whether the receiver will "care" about details finer than the resolution of the channel).  My point was that the time and voltage domains can independently be continuous or discrete; making one or the other discrete can offer considerable advantages even if the other is continuous.  In a true digital signal, both time and voltage are generally discrete (though the sampling rate and number of levels may be large relative to the semantic content).
Comment: @Mark: Yeah, or just call it a "PWM amplifier".  I guess PDM amplifier or other modulations schemes would also be considered Class D?
Comment: Hey look, an AES paper that says exactly the same thing! "Digital is any form of information that can be represented as a string of discrete symbols."  [All amplifiers are analogue](http://www.hypex.nl/docs/papers/AllAmps.pdf)
Comment: @endolith: Digital signals are generally discrete in both the time and voltage domain, while most analog signals are continuous in both domains.  The term "discrete-time analog" can be used for signals which are continuous in the voltage domain but not the time domain; I don't know of any nice term for signals which are discrete in the voltage domain but continuous in the time domain. I think your definition of "digital" is a good one, though I'd use phrase it "received and retransmitted through similar channels" to emphasize that repetition isn't for redundancy, but rather for relaying.
Comment: @supercat: I'm thinking of things like PWM, which looks like a square wave, but is actually analog.  It's not resistant to noise or interference, and the timing between transitions is continuous and important.
Comment: @supercat: Yes, there can be analog signals, digital signals, or discrete-time signals.  But digital signals are not necessarily discrete levels.  FSK is digital, but consists of sine waves.  Yes, the important thing is whether the receiver "cares" about the analog values, or only about the discrete symbols they represent.
Answer: Agreed, it's all marketing. I do a lot of work with ac motors, all the stuff they talk about on the website is comical. The motor itself is not digital, the power regulator to the motor is, but who cares. It's a vacuum, not exactly a precision machine. As far as the materials, they probably just lower the over all weight (the motor is probably the single most heaviest part) to reduce shipping cost. And one last thing, carbon dust isn't going to hurt the environment.
Answer: Here's a counterpoint view:
The vacuum cleaner motor in question will either work or go kaput. That sounds legitimately digital... to the marketing folks, at least!
Then again, that's more of a Binary Motor. Did I just give the marketing team a big "O"?
Answer: They could be referring to the control method as well.  Most motors are controlled with PWM from an external source, but if there's a built-in driver then you might command it with serial protocols or DIO instead of voltage.  I've seen 'smart motors' like that.  It looks like there's electronics integrated on to the Dyson motor, so that might be it.
But yeah, marketspeak.
Comment: So it's the control method that's "digital".  Quite a different matter from the motor being digital.  I guess it's a bit like the way cars are sometimes described as having "electric windows" or "electric wing mirrors" - electricity is used to move them but there's nothing electric about their functioning as windows or mirrors!
Answer: According to this article stepper motors are sometimes called digital motors because they are driven with pulses which control the degree of rotation.
I'm sure Dyson choose to call the motor a digital motor in their marketing because it sounds more sciency, and that seems to be a bit of a trend these days... at least they don't say it will give your carpet up to 90% more shine.
Comment: It would need nutritive fruit micro-oils and a good dose of Nutri-ceramides to do that!

What is a "digital" motor?


How do near-field EM fields change to far-field EM waves at an antenna

Question: What is the mechanism by which the near-field non-traveling electromagnetic fields in the vicinity of an antenna are changed into the far-field electromagnetic waves traveling at the speed of light?  Clearly, the electric charges in the antenna that generate the near-field electromagnetic fields are not moving at the speed of light.  Rather these electrons move at their speed in the antenna material, and the changes in their speed should dictate the rate-of-change of the near-field electromagnetic fields.
https://en.wikipedia.org/wiki/Near_and_far_field
Comment: Your question is based on a totally false assumption: "...non-traveling electromagnetic fields in the vicinity of an antenna are changed into far-field electromagnetic waves". Instead, the generator accelerates the charges in the antenna and the accelerated charges radiate.
Comment: Does no one have a decent quantitative answer to my question?
Comment: @Manu_de_Hanoi the source of electromagnetic radiation both near and far field is moving (accelerating/decelarating) charges and time-varying currents. Near field does not become far field, E-field does not generate B-field nor vice versa. Those ideas are at best visualization aides, like saying that F=ma *means* that force creates acceleration and in turn acceleration creates force. To understand it see the very erroneously called "Jefimenko" equations https://en.wikipedia.org/wiki/Jefimenko%27s_equations , best book to study is Panofsky-Phillips.
Comment: The speed of the charge is not an indicator if the speed of light emitted from the charge.  As @hyportnex pointed out, it's the acceleration that produced the radiation.
Comment: @hyportnex accelerating a charge results in a change of the EM field aka near field, therefore I dont see what in your comment makes the assumption that near field generates far field incorrect. Please elaborate.
Comment: Technically the near fields *do* propagate at the speed of light. [Jefimenko's equations](https://en.wikipedia.org/wiki/Jefimenko%27s_equations) make this obvious. Any changes in the source charges and currents that produce or affect the fields only propagate outwards at the speed of light. It's just that the near field components decay much more rapidly (1/r^2 or higher) than the far field components (1/r). Radiation is the component that decays 1/r, since the power will decay at 1/r^2 so that the total power through an expanding sphere is constant.
Comment: The speed of the fields in free space isn't really related to how fast the charge moves. If the charge oscillates very slowly, this will cause changes in the fields that propagate outwards at the speed of light. What the speed of the charge does affect are the wavelengths of the far-field waves that escape out to infinity ("escape to infinity" in the sense that the integral of the power around an expanding sphere will approach a constant, whereas the same integral only for the near-field components will approach zero).
Answer: This question is not a simple one, and the answer is even less so. However, it's not impossible to find an answer, so I will attempt to provide one. Note, however, that antenna analysis is not really my area. (I study microwave engineering).
Background
First, we derive the wave equation for electromagnetic fields. Beginning with Maxwell's equations in a source-free space, it is readily found that all free-space electromagnetic fields obey
$$ \tag{1.a}\nabla^2 \mathbf{E} = \frac{1}{c^2} \frac{\partial^2 \mathbf{E}}{\partial t^2} $$
$$ \tag{1.b}\nabla^2 \mathbf{H} = \frac{1}{c^2} \frac{\partial^2 \mathbf{H}}{\partial t^2} $$
Where $c = \frac{1}{\omega\sqrt{\mu \epsilon}}$ is the speed of light in a vacuum. Thus we see that any free-space electromagnetic field must satisfy the 3D wave equation, and evidently all electromagnetic fields in free space propagate with finite velocity $c$. By assuming the direction of propagation $\hat{k}$ is well defined at any given point, we can model electromagnetic waves as changing sinusoidally in time and space. It becomes clear, then, that any such fields which exist in free space will propagate indefinitely.
Our goal is thus to prove how such a field can originate from a charge density $\rho$ or current density $\mathbf{J}$ residing in a conductor.
Expressing the full form of Maxwell's equations (differential form), in phasor form,
$$\tag{2.a}\nabla \times \mathbf{E} = -j\omega \mu \mathbf{H}$$
$$\tag{2.b}\nabla \times \mathbf{H} = j\omega \epsilon \mathbf{E} + \mathbf{J}$$
$$\tag{2.c}\nabla \cdot \mathbf{E} = -\frac{\rho}{\epsilon}$$
$$\tag{2.d}\nabla \cdot \mathbf{H} = 0$$
The sources appear in $\text{(2.b)}$ and $\text{(2.c)}$. They are related by the continuity equation,
$$\nabla \cdot \mathbf{J} + \frac{\partial \rho}{\partial t} = 0$$
At the interface between a conductor and free space (as in the case of an antenna), we have the following equations which must hold at the boundary.
$$ \hat{n} \cdot \mathbf{E} = \frac{\rho_s}{\epsilon} $$
$$ \hat{n} \cdot \mathbf{B} = 0 $$
$$ \hat{n} \times \mathbf{E} = \mathbf{M}_s $$
$$ \hat{n} \times \mathbf{H} = \mathbf{J}_s $$
Where $\mathbf{J}_s$ is the surface current density, $\rho_s$ is the surface charge density, $\hat{n}$ is normal to the surface, and the term $\mathbf{M}_s$ is introduced as the imaginary magnetic current, whose sources include current loops and magnetic dipole currents. For the case where the conductor is sufficiently thick beyond the boundary, $\mathbf{M}_s \approx 0$.
Simple Example of Radiation
Now the stage is set, and we can consider sources of radiation. The first is the simple case of an infinite sheet of current density, with time dependence $e^{j\omega t}$,
$$\mathbf{J}_s = J_0 \hat{x}$$
Which is a sinusoidal current, and we define it to exist on an infinite plane surface in the $x,y$ plane. (Note that $\mathbf{J}$ is a phasor, and the time variation is implied).
From the interface conditions,
$$\hat{n} \times \mathbf{H} = J_0 \hat{x}$$
And because of the way we defined the surface, $\hat{n} = \hat{z}$, and
$$\hat{z} \times \mathbf{H} = J_0 \hat{x}$$
Implies that
$$\mathbf{H}_s = -J_0 \hat{y}$$
Also from the interface conditions,
$$\mathbf{E}_s = 0$$
And we can readily confirm that solving $\text{(1.a)}$ and $\text{(1.b)}$ in free space produces plane wave solutions,
$$\mathbf{E} = \frac{-J_0}{2} \eta_0 e^{-j\beta z}\hat{x} $$
$$\mathbf{H} = \frac{J_0}{2} e^{-j\beta z}\hat{y} $$
Where $\eta_0$ is the impedance of free space. Similar solutions in the opposite direction also exist.
So we can show that near-field and far-field labels are unnecessary here, and radiation occurs from the source.
More Generalized Radiation
Attempting to derive the radiation pattern of an antenna with these equations would prove quite difficult. One method of simplification is to use the scalar and vector potentials, defined such that
$$\nabla \times \mathbf{A} = \mathbf{B}$$
$$\mathbf{E} = \nabla\Phi - \frac{\partial \mathbf{A}}{\partial t}$$
Which has the useful feature of reducing two vector fields to one vector field and one scalar field.
Using a fair amount of analysis, we can show that the solution for the vector potential due to a current density $\mathbf{J}$ with $e^{j\omega t}$ time dependence is
$$ \mathbf{A}(\mathbf{r}) = \frac{\mu_0}{4\pi} \int_V \mathbf{J}(\mathbf{r}') \frac{e^{j\beta r}}{r} d^3 r' $$
Where $\mathbf{r}$ is the position of observation, $\mathbf{r'}$ is the integration variable, $r = |\mathbf{r} - \mathbf{r}'|$, and $d^3 r'$ means volume integration over $r'$.
This integral equation is complicated by the $r$ term, but we can approximate depending on the distances involved. The three regions commonly investigated for a source of size $d$, point of investigation $r$, and wavelength in free space $\lambda$, are the near field ($d << r << \lambda$), the induction zone ($d << r \approx \lambda$) and the far field ($d << \lambda << r$). In the near field, we can show that
$$\mathbf{A}(\mathbf{r}) \approx \frac{\mu_o}{4\pi} \sum_{l,m} \frac{4\pi}{2l + 1} \frac{Y_{lm}(\theta, \phi)}{r^{l+1}} \int \mathbf{J}(\mathbf{r}') r'^l Y*_{lm}(\theta', \phi') d^3 r' $$
Where we have used spherical coordinates, and spherical harmonics. In the far field, our approximation is
$$ \mathbf{A}(\mathbf{r}) \approx \frac{\mu_0}{4\pi} \frac{e^{j\beta r}}{r} \int \mathbf{J}(\mathbf{r'}) e^{-j\beta \mathbf{r}'\cdot\hat{n}} d^3r' $$
One can calculate the induction zone approximation, but I will not do so here.
From here, we can calculate the electromagnetic field with
$$\mathbf{H} = \frac{1}{\mu_0}\nabla \times \mathbf{A}$$
$$\mathbf{E} = \frac{j\eta_0}{\beta}\nabla \times \mathbf{H}$$
Where again $\eta_0$ is the impedance of free space.
Using the above, we can calculate the electromagnetic field due to an electric dipole, a magnetic dipole, etc. Note that the above approximations are valid for an antenna which is much shorter than the wavelength. Dipole approximations specifically are also common, and are much more efficient. In this case, the electric and magnetic fields in the far field become
$$ \mathbf{H} = \frac{c \beta^2}{4 \pi}(\hat{n}\times \mathbf{p}) \frac{e^{j\beta r}}{r} $$
$$ \mathbf{E} = \eta_0 \mathbf{H} \times \hat{n} $$
Where $\mathbf{p}$ is the dipole moment. And thus we see that for a far-field term to exist, we simply need a non-zero dipole moment,
$$ \mathbf{p} = \int \mathbf{r}' \rho (\mathbf{r}') d^3 r'$$
Which is the case whenever we have a change charge distribution. This still, however, assumes the length of the dipole is much less than the wavelength.
Center-fed Linear Antennas
Finally, we come to the center-fed linear antenna. For this case, by integration, we find
$$ \mathbf{A}(\mathbf{r}) \approx \frac{\mu_0}{4\pi} \frac{2Ie^{j\beta r}}{\beta r} \left[ \frac{ \cos\left(\frac{\beta d}{2} \cos\theta\right) - \cos \left(\frac{\beta d}{2}\right)} {\sin^2\theta} \right]$$
In the far zone, where $I$ is the peak current value. So we see that, for the field to "reach" the far field, the current on the antenna is the only requirement. This holds for all such dipoles. For the case where $\beta d = \pi$ (half-wave dipole), this still applies.
Conclusion
The transition from near-field to far-field is an analytic one, a distinction made between two approximations. In one case, we can make some simplifying assumptions, in another, we use different assumptions. The resulting fields behave quite differently in these limits, so it appears that there is an actual near-field component and far-field component, when in reality they are part of the same solution. Both always exist, as long as our definitions are properly given.

Sources
Pozar, David M. Microwave Engineering, 4ed.  2012.
Jackson, J. D. Classical Electrodynamics, 3ed. 1999.
Answer: The antenna generator accelerates the electrons in the rod.
The laws of physics are invariant under Lorentz transformations, so you can speed up to the speed of the electron, and so you would be in the rest frame of the electron. This constant velocity in this frame of the electron does not produce photons, because in this frame the electron is moving at constant velocity (or is at rest).
Now accelerations is a change in the state of the motion of the electron. By accelerating it, you change its momentum and kinetic energy.
Momentum and energy are conserved quantities, and if the electron's momentum is changed, that change has to be represented by another particle with the exact same momentum that you accelerated the electron with.
When the electron is bound to a nucleus, it can emit a photon by moving to a lower energy level as per QM.
But in conductors, like a metal antenna these electrons are loosely bound, can move mostly freely, like in vacuum.
A free electron, when its momentum is changed because of an electric field, will give off its energy and momentum by emitting a real photon, that is the radio signal.
Comment: This answer is vaguely response to the original title but completely ignores the much more sophisticated question in the text and the edited title.
Comment: @ dmckee can you please tell me the sophisticated question?
Answer: When an electric dipole p is radiating, the electromagnetic field takes the form below(the equations are in spherical format):
$$E=\frac{p_0c^2}{r10^7} \langle \frac{2\cos \theta}{r}\left(\frac{1}{r}\cos\left(\omega\left(t-\frac{r}{c}\right)\right)-\frac{\omega}{c}\sin\left(\omega\left(t-\frac{r}{c}\right)\right)\right)|\sin\theta\left(\frac{1}{r^2}\cos\left(\omega\left(t-\frac{r}{c}\right)\right)-\frac{\omega}{cr}\sin\left(\omega\left(t-\frac{r}{c}\right)\right)-\frac{\omega^2}{c^2}\cos\left(\omega\left(t-\frac{r}{c}\right)\right)\right)|0\rangle$$
$$B=-\frac{p_0\omega\sin\theta}{r10^7}\langle0|0|\frac{1}{r}\sin\left(\omega\left(t-\frac{r}{c}\right)\right)+\frac{\omega}{c}\cos\left(\omega\left(t-\frac{r}{c}\right)\right)\rangle$$
At high values of r the equations become:
$$E=-\frac{p_0\omega^2}{r10^7} \langle 0|\sin\theta\cos\left(\omega\left(t-\frac{r}{c}\right)\right)|0\rangle$$
$$B=-\frac{p_0\omega^2\sin\theta}{cr10^7}\langle0|0|\cos\left(\omega\left(t-\frac{r}{c}\right)\right)\rangle$$
Which is far field radiation. I hope all of this has  increased your understanding and has answered your question.
Comment: Consider using different grouping symbols $()$, $[]$, and $\{\}$ as well as resizing angle brackets `\left<` and `\right>` for improved readability.


write() in sys/uio.h returns -1

Question: I'm using
Ubuntu Server 9.10
AMD Phenom 2 cpu
g++ (Ubuntu 4.4.1-4ubuntu9) 4.4.1
trying to run the application pftp-shit v 1.11, which runs successfully until the remote file list is going to be saved (into .pftp//pftpfxp--).
The following code in tcp.cc is executed successfully:
int outfile_fd = open(name, O_CREAT | O_TRUNC | O_RDWR | O_BINARY)

which returns a file descriptor int (in my case 6) - name is a char array containing a valid path to my file which successfully i created.
and successfully running:
fchmod(outfile_fd, S_IRUSR | S_IWUSR);

and
access(name, W_OK)

The issue occurs during running the function (from sys/uio.h)
write(outfile_fd, this->control_buffer, read_length)

which returns -1. -1 is of returned if nothing was written and otherwise a non-negative integer is returned which is equal to the number of bytes written.
Anyone having a clue how I can get the write function to work?
Comment: posting some source code with comments would make it easier for the readers to understand the problem
Answer:
On error, -1 is returned, and errno is set appropriately.

Perhaps errno could give you some hints about what's wrong.
write(outfile_fd, this->control_buffer, read_length);

Does read_length contain correct number of bytes to be written?
Answer: Are the directory and file definitely writable by the user attempting the write? Maybe try running it in /tmp just as a test.

write() in sys/uio.h returns -1


Fee rate and market cycle

Question: Why nobody wants to use Bitcoin most of the time? Why is the fee rate spike only in few periods?
Answer: Fees spike as more and more people want to move coins around on-chain. Each of the areas you have red boxes around were "bull markets" where the price was significantly appreciating. This appreciating price brought more and more activity to the Bitcoin network. New entrants were buying coins and moving them around, old hodlers were moving coins from their wallets to exchanges in order to sell and take profit. As the price of bitcoin is going up, mania begins to hit and more people are incentivized to start using the network.
Over time the protocol is becoming more efficient as well. Segwit and the development of the lightning network have made blocks denser, meaning that more transactions can be represented and fit into one block, driving down network fees.
As a reminder bitcoin is mainly used as a store of value. Oftentimes people don't need or want to move their bitcoin around on-chain because they just want to hold it in their wallet and see the value appreciate. As the world adopts Bitcoin more and more we will continue to see more network activity. It's all just a matter of time.

Fee rate and market cycle


Hyperbolic Metric on a Riemann Surface

Question: From uniformization theorem, it is known that every conformal class of metrics on a genus-$g$ Riemann surface with $n$ punctures such that $2g+n\ge 3$ contains a unique hyperbolic metric. The punctures correspond to the fixed points of the parabolic elements of the associated Fuchsian group. The question is that: what is the explicit local expression of this unique hyperbolic metric for such a surface around a puncture, associated with the fixed point $x$ of a parabolic element? A good reference is highly appreciated.
Comment: Thanks. I will remove my comments now, and you can do the same.
Answer: Choose an horocycle around the puncture. Then the end delimited by the horocycle is isometric to a cusp, which is obtained by quotienting the following domain of the Poincaré half-plane
$$
C_R = \{ z \in {\bf C} \mid Im(z) > R\}
$$
by the translation $z\mapsto z+1$. In that model, the bounding horocycle is just the horizontal line $Im(z) = R$. The model $C_R$ is endowed with the usual hyperbolic metric $ {|dz|^2 \over Im(z)^2} = {dx^2 + dy^2 \over y^2}$ and the geodesics are half circles orthogonal to $Im(z) = 0$ as always.
You can map $C_R$ to a punctured disk of radius $e^{-2\pi R}$ using the transform $w = e^{2\pi i z}$ if you want. The resulting metric is (the square of) ${|dw|\over |w|\ln(|w|)}$. But I think that the Poincaré half-plane model is nicer to work with.
A reference is the book of Hubbard, Teichmüller Theory and Applications to Geometry, Topology, and Dynamics, Volume 1.
Comment: Thank you for the answer. Is there a way to describe the metric as a function of Fenchel-Nielsen coordinates? Also, is there a good reference on these stuff? I don't know much about horocycles.

Hyperbolic Metric on a Riemann Surface


Output amount of instances in Geometry Nodes

Question: Let's say I populate a plane with points, each point is a rock, is there a way to count exactly how many instances are generated?
Answer: There are a couple of ways to do it.
1. You can simply hover over a socket to get a tooltip with the information:

2. You can use a Viewer node to get the relevant information displayed in the spreadsheet:

3. If you want to use that number inside your Geometry Nodes setup dynamically, you can employ a Domain Size node set to the relevant type (in this case, Instances):
Comment: Viewer node can a bit tricky to understand at first glance. In my screenshot the information is displayed where I'm pointing at with the red arrow, next to the category (it says Instances '40'). It's a simple setup with only a single source of geometry so it would show 40 even without a Viewer node anyways, but if you had many more sources, a Viewer node would limit that number to the node output you linked it to. Here an ex:  https://i.imgur.com/ITA1BOx.png I have 80 instances total in the whole setup, but the spreadsheet only shows the 40 I'm getting from the node I linked the Viewer to.
Comment: Let's say with the same setup, you wanna see the X positions of your instances as a list. You can do that like this: https://i.imgur.com/PjUuf1v.png They get their own special Viewer column. Be aware of what domain the Viewer is set to. By default, it's set to "Auto", but I find that it doesn't always work that well; be sure to set it something appropriate. Here with the same setup, I'm looking at the same Pos X values, but on the Point domain because I've linked it to the point distribution node. It also represent the values as color in the viewport: https://i.imgur.com/SAJ9qRE.png
Comment: I wasn't very clear in my wording, what I meant is I tried the viewer node before posting but couldn't figure it out until you provided your comprehensive answer above :)
But I do appreciate you further explaining ways to use it, especially the positioning stuff, that will for sure come in handy!
Comment: Thank you so much for all the different approaches, I tried the viewer node but couldn't figure out where the information was displayed.
Answer: I'm assuming you're using a node akin to Distribute Points on Faces to create them. In which case you can hover your mouse over the 'Points' output and a popup will appear noting the number of points.
See here:

Hovering over any input/output dealing with that point cloud or set of instances should show a number of them.


stack exchange data explorer on previous data dumps

Question: Can I use stack exchange data explorer to extract data on a previous data dump, say of year 2011 ?
Can anyone suggest how I could go about it ?
Answer: You cannot. The data explorer only contains the most recent database, and does not have archived former databases. You can download the torrent for a past dump, but I don't know of any way to analyze that dump using the data explorer (you can do it with your own SQL though, I understand that the structure is very similar).
Comment: I am not sure of this , but can you suggest if stack apps would work in this case.
Comment: @user, no, it wouldn't. The only way you will get the data is by downloading it and querying it yourself. You can turn that in to an app if you want afterwards, but it isn't going to be doable without downloading the torrent of the dump first.


Do I need Liferay jackrabbit clustered configuration when using db

Question: I configured Liferay jackrabbit to use database instead of disk store.
This Liferay will be deployed in a clustered Weblogic. I was thinking if I still need to configure jackRabbit for cluster if it is using database?
I understand that cluster configuration in repository.xml is required only when data is distributed between nodes but for my case data is in central db. Am I wrong?
-e- According to Liferay Administrator's Guide, 2nd Edition page 220 it seems that cluster config is still needed
Answer: We are running JackRabbit on single node for a cluster Liferay env, If you are heavily using document library you might need multiple nodes for it.


Can a speaker be damaged but not blown?

Question: If one plays too loud of a sound through a speaker, it can blow - i.e. become visibly torn or stop working entirely. However is it possible that the loud sound will damage it partly and result in the speaker operating at a less loud level; can a speaker blow just a bit?
Comment: A common failure that others have not mentioned is if you heat up the coil the glue on the coil could fail, but the windings themselves still conduct (DC resistance doesn't change).  The now deformed coil doesn't move correctly due to rubbing or the shape of the deformed magnetic field.  And when it doesn't move correctly you get distortion.  If you did a before and after graph showing impedance vs. frequency you would see a change.
Answer: Sure. Speakers are essentially large coils of wire, and when they "blow", it's generally that the coil is taking too much current and isn't being cooled enough, and is damaged. If the speaker is completely destroyed, this may be that the wire in the coil is broken or shorted, so that it doesn't operate.
However, one can imagine a scenario where something else in the speaker is damaged, such as the surround (the rubber coil that allows the cone to vibrate freely) or the spider (cloth "guide" inside the speaker, behind the cone) or leads leading into the cone are damaged, but the coil still operates. Any of these issues have the ability to reduce the volume level of the speaker.
It's worth noting that it's usually not the "loud sound" that damages the speaker, it's the large inrush of current that the voice coil cannot handle, the excursion of the cone (moving farther than designed for), or natural wear and tear on components.
Comment: It's hard to say. It could go either way. Speakers are one of those things that are robust, but hard to fix. When one starts acting up, the best option is generally to start over and get a new one.
Comment: In the event of the second paragraph, will the volume level be dramatically softer or just a little?
Answer: It is possible to damage a loudspeaker by driving it too hard. However, the symptoms are more likely to be no output at all, or excessive distortion (scratchy sound or rattling noises) rather than reduced output.
But let's understand exactly what you have damaged first. If your "loudspeaker" is something like a Hi-fi speaker, with separate drive units for low and high frequencies (woofer and tweeter) then it normally also has a circuit between them - a crossover - to split the signal into high and low frequencies.
In this case you might have destroyed just one of the drive units : an ear close to each will tell you which; or one of the components in the crossover, so that less power (or none) is fed to one of the drive units ("speakers") If the crossover is at fault, that is a much simpler and cheaper repair than replacing a drive unit.
In some speakers, each drive unit has its own amplifier (aka "active" speaker system) with the necessary crossover filter built in : they can be complex to repair.
Answer: You can damage the suspension of a speaker so that the voice-coil part of the cone will rub. Generally this makes a bad scratching sound, but it's possible it wouldn't be that obvious.
Answer: A speaker contains a number of components which are able to tolerate different levels of abuse.  If a speaker is abused, the exact construction and nature of the abuse may affect which components fail first.
A single speaker element typically has a cone of some sort of material to which a coil of wire is affixed.  Current in the wire will cause the coil to generate a force parallel to the axis of the cone; this should in turn cause the surface cone to move, thus displacing air.
For a speaker to produce good quality sound, it is important that the parts of the cone which are supposed to move, move smoothly as designed, without unwanted mechanical interference.  This will generally require that parts of the cone be stretched, compressed, and/or flexed.  Such stretching, compression, and flexing can cause concentrated stresses, which can easily cause tearing or mechanical failure of part of the cone.  A speaker with a torn cone may behave electrically much as it should, but will no longer move smoothly and will generally give lousy sound.
Another part of the speaker that can fail is the joint between the coil and the cone.  If the force on the coil exceeds the strength of that joint, it's possible that it may fail partially or completely.  If this happens, motion of the coil will not be properly conveyed to the cone, causing the speaker to sound rather weakly.  Additionally, the speaker will likely be more effective at producing sound when driven in the direction that would pull the coil against the one, than when driven in the opposite direction.  Thus, the sound will not only be quieter than it should, but distorted as well.
Finally, it's possible for the coil to fail electrically if it is overheated sufficiently to melt the wire and/or insulation.  While such a failure could occur without stressing the cone or joints sufficiently to cause mechanical failure, most speakers that are said to be "blown" have actually suffered mechanical failure rather than electrical failure.  It's possible than a mechanical failure would cause a consequent electrical failure (among other things, speakers convert electrical energy into sound and heat; a mechanical failure which reduces the amount of power converted to sound may increase the amount converted to heat) but in many cases, speakers are more likely to fail for mechanical reasons than electrical ones.

Can a speaker be damaged but not blown?


Using OBS studio on Sway with Pipewire

Question: I am on Debian 12 / SWAY desktop which is WLR based.

I first install the "OBS Studio" version 29.0 with:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/4
  └─> sudo apt install obs-studio

"OBS Studio" can now be started with terminal command:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/4
  └─> obs

If "OBS Studio" is configured to run on "Xorg" by default we will not see our display! If this is the case we can still force it to run on "Wayland" like this:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/4
  └─> env QT_QPA_PLATFORM=wayland obs

Now it is surely using "Wayland" but this is still not enough for it to detect the desktop! I tried installing packages:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/0
  └─> sudo apt install xdg-desktop-portal xdg-desktop-portal-wlr

Attention:
"Sway" is based on "WLR" and therefore we installed xdg-desktop-portal-wlr "portal" implementation for xdg-desktop-portal. Different "portal" implementations exist and should be installed for different desktops. Debian supports "portals" for "KDE" (xdg-desktop-portal-kde), "GTK" (xdg-desktop-portal-gtk) or "Gnome" (xdg-desktop-portal-gnome).

I tested and made a conclusion that it does not matter which "Pipewire session manager" is used. By default people use pipewire-media-session but I use wireplumber which deprecates pipewire-media-session (link).
At this point I get no screens shown in "OBS Studio"! But I am able to record my screen and microphone using a simple CLI video recorder like this:
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/0
  └─> sudo apt install wl-recorder
┌───┐
│ $ │ ziga > ziga--workstation > ~
└─┬─┘ /dev/pts/0
  └─> pw-jack wf-recorder -a

And this works like a charm...
It is just "OBS Studio" that fails to work...
Answer: Of all the "portals" we only have to install xdg-desktop-portal-wlr:
sudo apt install xdg-desktop-portal xdg-desktop-portal-wlr

Note:
"Portal" xdg-desktop-portal-gnome is very large and will also install an entire Gnome desktop! So do not install this one unkless you use Gnome. In this case it will not make a difference for you.

This will also install a "portal" configuration file in /usrl/share/xdg-desktop/portal/portals/wlr.portal. Inside there is a list variable UseInwhich contains sway and instructs xdg-desktop-portal to use this "portal" if it detects environmental variables XDG_CURRENT_DESKTOP=sway, XDG_SESSION_DESKTOP=sway.
And then we have to export enviromental desktop variables by putting this line in the Sway configuration file ~/.config/sway/config:
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway XDG_SESSION_DESKTOP=sway

Attention:
These enviromental variables will not work if they are only exported using the /etc/environment. If we want to do it like this, then we also have to import them in Sway by using this line of code in the
~/.config/sway/config:
exec systemctl --user import-environment"

Using OBS studio on Sway with Pipewire


What could be causing the copper green smells in my house when the furnace turns on?

Question: We just re-did the rotting siding on my t1-11 sided fireplace. We replaced siding and covered it with hardi-plank. The problem is, when my furnace turns on, air is pulled from the fire place and the whole living room smells like copper green. This was one week ago. Now I am very sick, can not go to work, have a doctors appointment tomorrow morning. I am wondering if this smell can be what is making me sick?, or is it a return on my colitis? I am weak, tired dizzy, headachey, and in much digestive distress. Any help or info would be greatly appreciated. Thank you.
Comment: there is a lot going on here. Why is the furnace pulling air from your fireplace? What is the connection between hardi-plank and copper green?
Comment: Why is air pulled from the fireplace?  Do you mean for combustion or circulation?
Answer: If by Copper-Green you mean any of the copper-naphthalene wood preservatives out there used to prevent wood rot, and it was applied to the studding, etc. that supports this fireplace shell:
These products are not to be used within living spaces or in construction where the fumes will be pulled into the living space.
Apply caulking to seal up the air gaps that allow air to get in from the external structure.
If any of it is inside the living space, it will need to be ripped out.
If no Copper Naphthalene products were used for wood preservation and rather it's the acrid creosote smell of air being drawn down the chimney despite the damper being closed, then you've got another problem altogether. Your secondary air intake for your furnace is plugged or you are missing one and the negative pressure in the living space is drawing air from wherever it can find ventilation.
Note: Hardi-Plank as produced by James Hardie is a cement board product that needs no preservatives to prevent rot.


Why is $\lim\limits_{n\to\infty } 1=0$ incorrect?

Question: $$
\lim_{n\to\infty } 1
=\lim_{n\to\infty }\frac{n}{n}
=\lim_{n\to\infty }\frac{\overbrace{1+1+\ldots+1}^{n \text{ times}}}{n}
=\lim_{n\to\infty }\frac{1}{n} + \lim_{n\to\infty }\frac{1}{n} + \ldots
=0.
$$
Clearly this is incorrect, but why?
Comment: So you're asking why $\lim_{n \to \infty} \sum_{k=1}^{n} \frac{1}{n} \neq \sum_{k=1}^{n} \lim_{n \to \infty} \frac{1}{n}$?  Do you see how the error comes from treating $n$ as fixed in one place but as varying in the other?
Comment: @AntonioVargas: make that into an answer. I was going to answer something similar, but it feels like plagiarizing (even though it isn't really).
Comment: To add to Antonio Vargas comment, a limit $\lim_{n \to \infty}f(n)$ is an expression independent of $n$. Whereas as an expression of type $\sum_{i = 1}^{n}f(i)$ is always dependent on $n$. And this is the fundamental subtle mistake here. The rule "limit of a sum is equal to sum of limit of terms" is valid when number of terms is independent of the variable of the limit operation. Using uniform convergence the rule can be extended to handle infinite number of terms, but then also the number of terms has no relation with variable of the limit operation.
Comment: @1110101001 Interestingly, you declare that you "still don't understand why (etc.)" one month **after** having accepted an answer. So, in the end, *do you consider that the answer you accepted addresses your problem, or not?* Please be reminded that on this site, accepting an answer is declaring ipso facto that it does address one's question, hence there seems to be a clear logical contradiction here. (In addition, I may mention my own analysis, which is that the accepted answer does not address your problem, but, in a first phase, this opinion (shared by others) is even irrelevant.)
Comment: ((I guess one should add some words here about the tons of users upvoting answers that do not address the question, but sometimes, one may feel that even exercises in futility have their limits...))
Comment: Is it because in the 4th step you are adding an infinite number of infinitesimals which will give back 1?
Comment: This is very similar (almost a duplicate?): http://math.stackexchange.com/questions/59795/proof-of-1-0-by-mathematical-induction-on-limits
Answer: Because $\infty\cdot0$ is undetermined. What you wrote is the same as $1=\displaystyle\lim_{n\to\infty}\frac nn=\lim_{n\to\infty}n\cdot\lim_{n\to\infty}\frac1n=$ $=\infty\cdot0=\underbrace{0+0+0+...}_{\begin{align}\text{conveniently 'forgetting' to  }\\\text{mention the 'number' of 0's}\end{align}}\overset{\text{"obviously"}}=0$. By the same token, $\displaystyle\lim_{n\to\infty}\left(1+\frac1n\right)^n=\left(1+0\right)^\infty$ $=$ $=1\cdot1\cdot1\cdot\,...=1\neq e$.
Comment: But that's exactly what he did. He split it into an *infinite* sum of $\lim_{n\to\infty}\frac1n$, all of which *tend* to $0$.
Comment: It seems to you that he did, but he did not express $1$ as a product of two things and use "limit of product = product of limits". He used the rule "limit of sum = sum of limits". While dealing with limits we need to very careful of expressing same thing in two different ways.
Comment: Even if we follow your point of view the real reason why this $1 = n \cdot (1/n)$ breaks is because the rule "limit of product = product of limits" is valid only when each limit exists and is finite. We should not invoke $\infty\cdot 0$ indeterminate form. If one uses the rules of limits very carefully and properly one would never get distracted by such indeterminate forms.
Comment: OP has not split the limit into the way you have mentioned in your answer. I don't see how your point of view answers his question. Please check the comments from Antonio Vargas. He has mentioned the real issue with OP's approach.
Comment: A product is a repeated sum. Just because something isn't mentioned explicitly doesn't mean that it's not there. Which is what you said above: *The rule "limit of a sum is equal to sum of limit of terms" is valid when number of terms is independent of the variable of the limit operation*. In this case it isn't, and that's what I was pointing out. I also don't understand how explicitly writing the $\infty$ contradicts what you said about *the rule "limit of product = product of limits" is valid only when each limit exists and is finite*. Obviously, $\infty$ isn't finite.
Answer: Unlike what Lucian said, it is possible to give a precise meaning (think measure theory) to an infinite sum of limits, and the answer can be 0 under suitable conventions. However, the problem was in the step of splitting the limit. There is a theorem that shows that you can split a limit of a sum of two terms into the sum of their limits provided they exist. That can never result in an infinite sum.
Comment: Do you understand the proof of the theorem that the sum of two limits is the limit of their sum? If you do, you will see that you cannot prove the theorem for an infinite sum of limits. All you can prove (by induction) is for a finite sum of limits.
Comment: I still don't understand why you can't split a sum of terms when the number of terms is dependent upon the variable of the limit. Could you explain further why this can't be?


Heart rate during a ~1 hour individual time trial?

Question: I'm wondering about heart rate data during a flat(-ish) Individual time trial that takes a bit below 1 hour to complete at elite level, like the typical ITTs in TdF. I know HR alone is far from the big picture but I remember reading about average HR during marathons and variability was remarkably low, irrespective of finish time. So does anyone know the average/max heart rates of well trained cyclists during such efforts?
Comment: Is there a specific question? This site is not intended for open discussion.
Comment: FWIW, the "220 - age" estimate for max heartrate is effectively useless.  The standard deviation on that is something like 10 bpm, which is wider than most "zones" used for HR-based training.  And even those "zones" are just estimates that actual humans rarely match. Asking about average HR in TdF TTs is like asking about the average height of NBA players. If you're not genetically-disposed to have the physical characteristics required for competing at that level, you're not going to be in the sample pool.
Comment: What is your question?  If you want to chat in an unstructured way then [chat]
Comment: I guess the OP is trying to ask what the average HR would be over a period of one hour for a set distance, I could be totally wrong though and even if it was right it would be all dependent on the group being of equal fitness.
Comment: @ArgentiApparatus I edited the answer but I don't think I could be asking for more than avg/max HR or a HR plot
Comment: @AndrewHenle I see nothing wrong with asking about the average height of NBA players. Just as I don't expect to become taller by learning that, I don't expect to become a faster time trialist by trying to replicate those heart rates. One can have many reasons for asking, among which is pure curiosity.
Comment: @DanK possibly - but we shouldn't have to guess the question.
Comment: About 92+/-2% of max hr for a 1hr gut-busting time-trial.
Answer: This is absolutely specific on the heart rate zones of each individual. Each person has a different heart rate at their functional threshold (FTHR). Professional cyclists are able to cycle for a long time (most of the road race) almost at their functional threshold but the actual heart rate is completely individual. Even the percentage of the functional threshold heart rate to some "maximum" heart rate will be individual. All these values must be determined by an appropriate physiological stress test to be reasonably accurate.
See, for example, https://cyklopedia.cc/cycling-tips/what-is-ftp-in-cycling/#1
When it comes to the maximum heart rate, that is not a very reliable value (may vary strongly for different activities) and it is much better to start all you zones and comparisons from your FTHR than some percentage of some maximum.
As a good source of example pro-cyclist heart rates you can use https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6572307/ although it uses a longer race.

The HR during the race was 158.9 ± 10.6 bpm (86.4 ± 2.2% HRmax), and
  exercise intensity is categorized as vigorous intensity.

As you can see, the variance for the heart rate is higher (more individual) than the variance of the maximum percentage.


Is it haram to say I don't believe in something about a disputed matter?

Question: Assalamualaikum, I actually searched on google whether eating lobster is halal or haram? I found that hanafi school calls eating lobster haram, I live in India where mostly everyone goes with hanafi way, but I actually wanted to eat a lobster and I said in my mind I don't believe in it but I found out that only hanafi calls eating lobster haram. Will this be shirk as saying something you don't believe in it haram?
Answer: I think we can separate this issue in multiple parts ;
Disbeliving in something to be haram
Is eating lobster haram;
"Abu Huraira reported: The Prophet, peace and blessings be upon him, was asked about sea water and he said, "Its water is purifying for ablution, and its dead animals are lawful to eat."
Source: Sunan al-Tirmidhī 69"
Basically eating any sea only food is halal ;
The sheikh explains; 00:33 sec  The title is octopus but he'll say every sea animal is halal
Also animals that lives on both land & sea are maybe haram;
Also about disbeliving in a matter that is clear; because madhabs are opinions of people and you should try your best to follow the truth , not madhab;
https://islamqa.info/en/answers/115125/ruling-on-one-who-rejects-a-saheeh-hadith
cuz if you disbelive in a matter that is clear , like in the quran or clear sahih hadith , that is problematic ; but a matter where there is no clear indications , you should try to know what's halal;
But if you know the truth , if you belive something to be true ,then you should follow ; like hijab &  niqab difference
If you're a layman it's okay to follow a madhab ,; but don't pick and choose things from madhab; watch this few mins
Comment: I think I've already asked you to distinguish your own words from quotes. Please act upon this inquiry.
Comment: Why for nothing downvote
Answer: True believers always consider themselves bound by the obligations of faith. Whether these obligations are in their personal interest or not in accordance with their personal interests, they obey God's command and submit to it.
In verse 91 of Surah Al-Hijr, he speaks of people who act only on parts of the Qur'an that the interpretation of the Qur'an is interesting in this regard ».
Some Muslims do not view religious responsibilities as a binding obligation. Rather, they adhere to those commitments to the extent that it is compatible with their personal interests, and otherwise, with negligence and carelessness, they set them aside. The Qur'anic culture explicitly declares such people - who may have stored a heart of faith for the days of distress in the corners of the heart - to be unbelievers and unbelievers, and considers God's promises to the believers to be those who adhere to them at all times. And are committed to the duties of religion.
The religion of the Imams is the condition for making fish permissible to have scales, and it is forbidden to eat anything in the sea except fish and shrimp.
In the Hanafi religion, except for fish and shrimp, everything in the sea is forbidden.
In the Maliki religion, all sea creatures are lawful; Except for hounds and guinea pigs, which are considered abominable.
In the Shafi'i and Hanbali religions, all kinds of sea fish and shrimp are considered halal; But for them, the blue frog is forbidden.
Imami and Hanafi religions have considered cultivation as a condition for fish, but other religions have not considered it as a condition and eating dead fish is permissible and lawful.


are amplifier and attentuator bascially of the similiar function?

Question: I just got a very old function generator (I can't even tell the manufacture and the model number) to produce sine wave. I open it and see a big module label video amplifier. The function generator come with a digital switch to choose different level of attenuation. I look everywhere inside and didn't see any module for attenuation. I wonder if the amplifier is really for built to attenuate the signal? Basically are amplifier and attenuator of similar circuit design?
Answer: It is extremely unlikely that the sole purpose of the amplifier is to provide attenuation.  Attenuation can be achieved with a bank of resistors that will provide more accuracy, higher bandwidth, lower noise and better reliability than an amplifier using active devices like vacuum tubes (if the generator is that old) or transistors.  Resistors also don't require any power. The most common design for signal generators is to have a basic oscillator to provide the signal followed by a power amplifier designed to deliver the maximum desired output power.  A resistive attenuator at the amplifier output than is used to select the desired output level and provide the desired output impedance (usually 50 or 600 ohms). At full power, the attenuator would be switched out entirely. As for the digital switch, could you provide a more detailed description.  It's possible that the attenuator resistors are built into the switch.
Answer:
Basically are amplifier and attenuator of similar circuit design?

No, an amplifier increases the power of a signal while an attenuator decreases the power of a signal.
In order to increase power, the amplifier circuit must have a power supply, i.e., it is an active circuit.
Now, keep in mind that an active circuit can have, for example, a (magnitude) voltage gain less than 1, e.g., a common-collector amplifier.  However, the common-collector amplifier can have substantial power gain since it has relatively high input impedance and relatively low output impedance.
An attenuator circuit can be passive.  For example, a resistive voltage divider converts some of the input signal power to heat.
Note that while an ideal transformer can give voltage gain or current gain, it cannot give both; the power out equals the power in.


"A [...] of riches" — what word is missing?

Question: There is a phrase that goes "a X of riches" which suggests that one had so much to choose from, lots of good choices. What is the missing word?
Comment: Have you Googled [*a of riches*](https://www.google.co.uk/search?q=a+of+riches)? It gives you the answer.
Answer: There is also the phrase, "an embarrassment of riches"
Comment: I think you've been [beaten to the punch](http://imgur.com/5YZhw)
Comment: Sorry, I hadn't seen the comment.
Answer: ... not to forget, a plethora of riches.
Answer: I've heard the expression a wealth of riches to mean an abundance of choices or appealing options, such as found in these examples:

...in the region of Tuscany, a region with a wealth of riches for
  the keen cyclist, culture vultures and fun seekers. (1)

The music is bold and epic, which are attributes you'll pick up on immediately.  There is a sense of might behind many of the tracks as
  the rich orchestral sound plays to great scope and the choir fills the
  speakers with startling beauty. Thankfully,
  Excelsius is far from being one dimensional; it offers a wealth of
  riches that will appeal to anyone who enjoyes a great film score. (2)

Explore Minsk, Belarus's modern city, built as a memorial to the glory of Soviet communism or step beyond the capital and find a
  wealth of riches that remain largely unknown to the outside world:
  the natural splendour of primeval forests, rivers and lakes; flora and
  fauna in abundance; stunning museums empty of visitors; rich culture
  and tradition; historical sites dating back to the Middle Ages;
  beautiful churches... (3)

Team Canada: A wealth of riches
Mike Babcock's greatest blessing as head coach of Canada's 2010 men's hockey team is also his greatest curse: Being positively spoiled for
  choice.  For head coach Babcock, executive director Steve Yzerman and
  the rest of the brain trust, the quandary is choosing the 23 that
  blend the best.
There's plenty of choice. Smyth or Staal? Green or Bouwmeester? Fleury or Ward? Either way, any way, it seems they can't go wrong. (4)

If the number of choices seems almost too great – enough to cause the fortunate one to perhaps blush – there's also the idiom embarrassment of riches.
Comment: Isn't being rich already wealthy?
Comment: @Mitch: I suppose - I didn't make up the expression.  Besides, _wealth_ can refer to things other than money: _a wealth of talent_, _a wealth of data_, etc., so the phrase _a wealth of riches_ isn't necessarily redundant.
Comment: @Mitch "wealth" in this case means "a large amount", not "a large amount of money".
Answer: I've heard of people using "a world of riches" and that was the first that sprung to mind. A google search delivers some wide ranging usage (search with the quotes).


API for montly and weekly averages

Question: Bitcoinwisdom shows in their charts lines for weekly and montly averages. Are these numbers somewhere available in an API? If so, one could setup an automated strategy for trading BTC based on this data.
Comment: You can get the price data using the API of the exchange you want to trade at. You can then do any calculations based on that data and place orders.
Answer: I have not heard about an API that would return averages per se. But there are APIs that will provide you with a historical price data which you can use to calculate averages on your own.
One example would be CoinDesk, but I am pretty sure there are more. They have a JSON endpoint that will return closing prices for a given period (1 month by default). Examples:
Default (one months period): https://api.coindesk.com/v1/bpi/historical/close.json
Custom date range: https://api.coindesk.com/v1/bpi/historical/close.json?start=2018-01-01&end=2018-07-01

API for montly and weekly averages


Correct usage of the Apple App Store Badge

Question: Is it against Apple policy / guidelines to create a custom button that links to the App Store, or does it have to be the official App Store Badge?
Comment: This question appears to be off-topic because it is not about graphic design.
Answer: I believe you can only use the official badge. See the App Store Marketing Guidelines:

Use only the App Store badge artwork provided by Apple.
Do not modify, angle, animate, rotate, or tilt the App Store badge. Do
  not use the Apple logo alone. Do not use icons, logos, or graphics
  from www.apple.com to promote your app. Do not refer to iOS in your
  communications. Instead refer to the Apple products your app natively
  supports.

The Download on the App Store badge must be legible on all marketing
  communications in which you promote your app offered on the App Store.
  For all online communications, you must provide a link to your app on
  the App Store wherever the badge is used.
Answer: To add onto Yisela:
Affiliate Logo Guidelines and Art

The iTunes and App Store logos are recognized worldwide and using them
  correctly is an important part of being an affiliate partner. A few
  simple guidelines can go a long way in helping your partnership in the
  affiliate program:

You must provide a link to iTunes or the App Store wherever a badge is used.
iTunes or App Store badges should be used anytime the link is not a text link.
You may never alter the artwork provided except to change the size. See guidelines for size spec and limitations.
You may never use the Apple logo alone.
The iTunes desktop icon, or other graphics from iTunes, cannot be used as a representation or link to the iTunes or App Store. iTunes,
  when used in headlines or text, is always shown as iTunes with a
  lowercase "i" and uppercase "T" even when it is the first word in a
  sentence. For the App Store, always capitalize "A" and "S."

Source
Identity Guidelines

Our badges are recognized worldwide. Proper implementation of badges
  gives your users clear direction on where to go to buy compelling
  content. Use the links below to access guidelines and badges for each
  of our stores.

Source


How to bring a system out of standby programatically?

Question: Is there a way to do it in c# or vb.net? I have to bring a system out of standby and play a notification sound if it is in standby mode, at specific time intervals. Is this possible?
Answer: You may take a look at this page. IMHO this task will involve some heavy interop calls.
Comment: If it's possible at all from managed code. Some things just aren't.
Answer: You can wake a computer from sleep with a scheduled task:

So the simplest option maybe to create a scheduled task to run at the appropriate time.
Answer: Given the system is in standby you are somewhat limited and almost certainly going to be reliant on an external trigger and/or the capabilities of the system bios for the device.
The primary method that springs to mind is Wake-On-LAN, if the system has this capability then you could have a central 'server' firing off 'wake-up' packets to the device(s) at the desired interval and then the system would spring into life, what I'm not sure of is the ability to determine if the system was in standby with a simple call. One solution might be to have your service running on the target system and to grab the current time at a designated time interval, your app would then sleep for the time interval and when it next comes to retrieve the time, do a quick compare with the stored time to see if the elapsed interval matches the sleep time, if not then you have probably spent some time in standby.


What do you call the furniture behind of which a speaker talks?

Question:
What do you call the furniture in front of which a speaker talks? This furniture is also found in university and allows a professor to give a presentation to the class. What do you call this furniture?
Comment: One usually speaks from *behind* a lectern, as in the picture you have included – not from in front of it! It's also worth noting that you will often see/hear a lectern incorrectly referred to as a "podium." (A podium is actually a low platform on which the speaker stands.) In the US, in fact, I think I hear lecterns called "podiums" more often than I hear them called "lecterns," and this usage of "podium" is included in some dictionaries. You should avoid using it but be prepared to encounter it.
Answer: It's a lectern usually on a podium.

a tall stand with a sloping top to hold a book or notes, from which someone, typically a preacher or lecturer, can read while standing up.
Comment: It's a lectern (= place you read from). The speaker is standing on a podium (= place where you stand).
Answer: As Shin says in this answer, it is a lectern. However, in some settings, it is also informally called a "podium," though that word traditionally referred to a raised dais where speakers stood (and not the stand on which they placed their notes). While some may argue that this usage is technically incorrect, it seems to be growing increasingly common in academic and political settings, even where there is not a dais.
In a church, the term "podium" is rarely used, but the primary lectern is often referred to as the "pulpit," a term that traditionally refers to another architectural feature, the small raised box where a preacher or priest would stand to speak that provided convenient acoustics for projecting to the entire space. With the advent of microphones and digital amplification, many newer churches forgo the traditional pulpit, thus the term has shifted from referring to the box to referring to the stand that used to be in the box.


How to make PM smaller than other characters in textbox in Sketch?

Question: I have this textbox here. And I just do not understand the magic, why "PM" is smaller? Though it seems just normal text on the left side.
Comment: This is unrelated to the problem, however I just thought I'd bring it up anyway. There's actually no such time as 19 PM.  It should be written as 7 PM.  You shouldn't mix up 19:00 (in 24 hour time notation) with the AM and PM time notation.  PM means *post meridiem", which is Latin for "after midday", and so you can't say 19 hours after midday because it wouldn't make any sense.
Answer: I'm not a Sketch User

Typically in most apps layers don't resize their names in the panel/list.. I mean the layer name doesn't become 30pts tall simply because the text is set to 30pts. That's not how User Interfaces work.
Chances are the text is set at a different size. Select it with the text editing tool and then check it's size.
Comment: its size (not it's) is also possibly a subscript for the font, if the program supports that feature for fonts.


Bends in cis Isomers

Question: It's been said over and over in my biochemistry books that the cis-double bonds between the Cs in the hydrocarbon tails in triglycerides causes a kink. This kink disappears when the bond is isomerized into its trans conformation. What is it about the cis bond that causes the kink?
Comment: You'll have to go and read up about electron pair repulsion and the concept of hybridisation in organic chemistry. The bond angles of the sp2 carbon (i.e. the ones in the double bond) are 120 degrees. How much chemistry background do you have? I don't think you should be reading biochemistry without having taken some organic chemistry in the past.
Comment: Do you know what a kink is? And what the shape of a cis double bond is?
Comment: Yes. But why is the cis double bond shaped like that?
Comment: Does @BenNorris's answer solve your problem, or are you asking about the reason for cis/trans isomerism and the shapes of the respective isomers?
Comment: "But why is the cis double bond shaped like that?" - The cis isomer, *by definition*, is the one in which the substituents on the double bond are on the same side. This leads to the kink that you see in the pictures that @BenNorris uploaded in his answer. Rotation of the C-C single bonds adjacent to the double bond is restricted, so once an alkene is in the cis configuration, it will stay as a cis alkene unless something helps it isomerise (in a biochemistry context, probably an enzyme, but you may not come across that yet so don't worry).
Comment: @orthocresol Why is there a kink when you have both Hs on the same side? Do the Hs just physically weigh down on the bend or what?
Answer: The best way to demonstrate this kink is with pictures. Usually we have some motivation to try to represent the molecule on a single line. So for oleic acid (cis-octadec-9-en-1-oic acid), we often get pictures like the following:

Elaidic acid, the trans-isomer is also sometimes depicted unhelpfully to save space:

The second structure for elaidic acid is not as misleading as the corresponding structure for oleic acid. A better bond-line structure for oleic acid is:

Better yet, here are some space-filling structures from Wikipedia based on crystal structures of both molecules.
Oleic

Elaidic

And here's $\gamma$-linolenic acid, which has three cis alkenes in it:

Bends in cis Isomers


Action of tetracycline on 30s ribosomal subunits

Question: My question concerns the mode of action of 30s ribosomal antibiotc inhibitors — tetracyclines. According to some online resources, the antibiotics enter the A-site, which prevents other tRNA from entering the ribosome. Others say that the antibiotic prevents the ribosome from moving along the mRNA. Which one is correct?
Comment: Adding references and citations to the "resources" and also naming the particular drug you were interested in would help your chances of getting this question answered considerably.
Comment: @RadekMartinez can you first please add references and focus your question on one class of antibiotics such as aminogycosides.
Comment: I am giving the class of antibiotics.  30s ribosomal Inhibitors. Some examples: Aminoglycosides Tetracyclines.
Comment: Firstly, as AMR said, you should add the online resources  which you referred to. Secondly, different antibiotics can have different effects. In fact there can be different effects based on concentration. Moreover, it is now established that aminoglycosides are bactericidal because they not just prevent translation but also cause mistranslation leading to toxic products.
Comment: Could you expand on "how they prevent" translation.
Answer: The crystal structure of tetracycline bound to the 30S ribosomal subunit of Thermus thermophilus has been determined by Pioletti et al. and the major binding site (Tet-1) interferes with the location where the A-site tRNA binds as shown in the stereo pair, below:

They write:

"Thus tetracycline can physically prevent the binding of the tRNA to the A-site. This mode of interaction is consistent with the classical model of tetracycline as an inhibitor of A-site occupation, and hence offers a clear explanation of the bacteriostatic effects of tetracycline."

So the proximal effect would appear to be the first alternative in the question, although the second may be an indirect consequence.


Related objects for Account and Opportunity

Question: I am using a tool which backsup data from my SFDC instance to local MySQL database. I am concerned with Account and Opportunity object only. But I want to bring all those other objects which are related in any way to Account and Opportunity. Is there any way to determine what objects do Account or Opportunity are related to via any custom or standard field?
Comment: you'll want to look at schema explorers.  Account, in particular is related to many many other objects in the OOTB SFDC org, let alone any customizations you may have done
Answer: You can use a variety of free metadata search tools like Octopus to see what objects and fields might be related. You can also directly do this by using Schema Explorer in Setup to see what objects are related to Account and Opportunity via lookup relationships. The issue there is that some my have multiple paths that continue beyond the first look-up; particularly with opportunity line items, products and quotes which are things that may not be inherently obvious. I suggest you also take a look at this ERD for Sales Objects and some of the ones that follow in the same document.
Comment: Octopus looks fabulous for what I am looking for. Ty.


pyglet Player.seek() causes unexpected results

Question: I am trying to create a video player using the Pyglet for Python 3.4. The current code I have is very basic, and will simply play a file such as this math gif.
I want to loop the video until the window is closed, however trying to use player.seek() with any time is causing very odd behaviour.
An example of such behaviour is when playing a .gif, attempting to perform self.player.seek(self.player.time - 2) (as a "rewind" feature), the video will jump forward a few seconds, then freeze on that frame for a moment before continuing playback.
When attempting the same code while playing a .webm video file, nothing happens.
When attempting the same code while playing a .mp3 video file, the video would skip to to about 5 seconds in, regardless of how much time had elapsed.
When attempting the same code while playing a .m4v video file, the program failed with the following traceback:
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "C:\Python34\lib\site-packages\pyglet\window\win32\__init__.py", line 617, in f
    result = event_handler(msg, wParam, lParam)
  File "C:\Python34\lib\site-packages\pyglet\window\win32\__init__.py", line 688, in _event_key
        self.dispatch_event(ev, symbol, modifiers)
  File "C:\Python34\lib\site-packages\pyglet\window\__init__.py", line 1154, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
  File "C:\Python34\lib\site-packages\pyglet\event.py", line 355, in dispatch_event
    if handler(*args):
  File "C:\Users\Matt\Documents\Coding\Pyglet Media Suite\video_player.py", line 30, in on_key_press
    self.player.seek(self.player.time - 2)
  File "C:\Python34\lib\site-packages\pyglet\media\__init__.py", line 1067, in seek
    self.source.seek(time)
  File "C:\Python34\lib\site-packages\pyglet\media\avbin.py", line 345, in seek
    av.avbin_seek_file(self._file, timestamp_to_avbin(timestamp))
  File "C:\Python34\lib\site-packages\pyglet\media\avbin.py", line 196, in f
    result = func(*args)
OSError: exception: access violation reading 0x00000028

I can understand that the .m4v file failed, as it is an Apple encoding, but the other failures confuse me. Specifically, why does seek() fail for .webm file formats.
My code is as follows:
import pyglet

class VideoPlayer(object):
    """Creates a new window and plays the requested video"""

    def __init__(self, filepath, fullscreen = False):
        self.filepath = filepath
        self.fullscreen = fullscreen
        self.window = pyglet.window.Window()
        self.video = pyglet.media.load(filepath)
        self.player = pyglet.media.Player()

        self.player.queue(self.video)

        @self.window.event
        def on_key_press(symbol, modifiers):
            key = pyglet.window.key
            if symbol == key.SPACE:
                if self.player.playing:
                    self.player.pause()
                    print("PAUSED")
                else:
                    self.player.play()
                    print("PLAYING")

            elif symbol == key.LEFT:
                self.player.seek(self.player.time - 2)
                print("Rewinding by 2 seconds")

        @self.window.event
        def on_draw():
            if (self.player.source.duration - self.player.time) < 0.1:
                # pyglet does not correctly handle EOS, so restart almost at the end
                self.player.source.seek(1.0)

            else:
                if self.player.playing:
                    self.player.get_texture().blit(0, 0)

        @self.window.event
        def on_close():
            self.player.delete()
            pyglet.app.exit()

        self.player.play()
        pyglet.app.run()

The reason I chose to try and use seek() is because Pyglet does not correctly handle EOS. Therefore I tried to simply seek back to the beginning of the video instead of using a more elegant "solution" like SourceGroups. I found a post which talks about the EOS problem in more detail.
How can I properly use seek()?
Answer: I don't know if I can help, but I also stumbled upon inconsistent behavior with the seek function for a current project where I am trying to control audio playback via python.
The first thing I notice in your code, is that in the on_draw() function you call seek for the media source. But seek has to be called from the player object.
The only guess I can make is that you are using a version of AVbin that has a bug of some kind. pyglet uses AVbin to support a vast array of different media formats other than wav. If you are using AVbin for video playback, you may try to install a different version and try it out again.
One thing that has helped me to improve the behavior of the seek function on my media source is to load your video as StaticSource (setting "streaming=False") as second parameter in
pyglet.media.load(filepath)

Sadly, as of pyglet version 1.2.4, this feature is not supported for video formats.


Is it prohibited to send Quranic verses by WhatsApp where people delete it after reading it?

Question: Is it prohibited to send Quranic verses by WhatsApp where people delete it after reading it?
Comment: No... Where did you get the claim from?
Comment: Could you explain the issue in this question? People delete verses and what??... They will remain a recited quran as long as this life exists, so where is the issue?
Answer: Deleting electronic verses of the Qur'an is not considered a big deal according to multiple fatawa.  An Ask Imam fatwa sums up why nicely:

When disposing of Quranic verses, the main objective is to protect the Quran from any form of disrespect. Since deleting Quranic files off of a storage device is not tantamount to disrespecting the Quran, it will be permissible to do so.

This is affirmed by IslamWeb, Darul Ifta (1, 2, 3, 4), Ask Mufti, Islam Help Line, and an Islam Q&A goes further an even encourages sharing the Qur'an electronically:

There is nothing wrong with sending Qur'aanic messages via e-mail or SMS. Rather this is the kind of deed for which a person will be rewarded ...

UAE news reports another fatwa encouraging it.

See also Is deleting the Qur'an from a computer prohibited? and Can I delete Qur'an recitation audio clips from my phone?, and Tamer Shlash's answer to Is it permissible to use a digital version of the Holy Quran?.  (However, none of these posts give references to this particular question.)


Syntax error: Unexpected "score: at "execute if >>score<< Seconds Timer matches 60

Question: I am trying to make a digital clock using the scoreboard commands and command blocks, when I try doing this and have followed steps correctly it says Syntax error: Unexpected "score: at "execute if >>score<< Seconds Timer matches 60.. in the previous output area and I can't find a solution anywhere. When I originally tried it on a tester world, it worked so I went over to do it on the world it was necessary for and it didn't work, when I rejoined my tester world and re-did the commands exactly as I did before, it didn't work and said the same Syntax Error. I have tried using scoreboard players test Seconds Timer 60 as a substitute but this too has not worked for me.
Comment: Is your testworld where the command worked in the same version like you other world?
Sometimes commands are changed from one version to another.

Maybe you could pots your command, that so people could better help you.
Answer: The arguments are wrong. You used the Java arguments not the bedrock ones. These are the bedrock arguments:
execute <origin: target> <position: x y z> <command: command>

For the Java arguments that you used visit: https://minecraft.wiki/w/Commands/execute
Notice: Bedrock arguments are the same as Java
Comment: You said that "The arguments are wrong." but you also said "Bedrock arguments are the same as Java". These can't both be true.


Should users be made aware they are beta testing in "live" environments?

Question: Should users be made aware they are beta testing in live environments?   Should they be given special instructions?
Should they have options to test or not test in "live/production" environments?
Comment: What does this question have to do with automated testing? Also, this question is far too broad - what industry are you looking at? Have these users signed up to a beta program? Are they being given access by a feature flag? A special URL? As worded, the answer to this question is "it depends" and then a long list of possible things it can depend on including industry, regulations, and your company's normal practices even before considering any technical considerations. Please read  https://sqa.stackexchange.com/help/how-to-ask then edit your question accordingly.
Answer: Normally beta-test users are aware of they are beta-testers because in beta-testing there is an emphasis on word testing.
Either the beta-testers are obliged to find and report defects depends on whether the beta testing is performed in open or closed model.
In closed model, normally, the professional testers are involved so that they are to find and report defects.
In open beta, normally regular users are involved. They are notified about the software currently is in beta phase hence the quality is not guaranteed. It is up to the users either to report found issues or not.
Answer: As pointed out by Kate: "it depends". There are many factors to consider, such as your industry, your product, your users, … moreover, as already said by Alexey, I think the word "beta" is important here because beta users are usually aware that they are using a beta version.
However, since it hasn't been mentioned so far: There is also canary testing:

In software testing, a canary is a push of programming code changes to a small group of end users who are unaware that they are receiving new code. Because the canary is only distributed to a small number of users, its impact is relatively small and changes can be reversed quickly should the new code prove to be buggy.

Additional resources for canary releases/testing:

https://martinfowler.com/bliki/CanaryRelease.html
http://featureflags.io/canary-testing/
Answer: Can they do serious harm? If yes, maybe it is wise to tell them.

Should they have options to test or not test in "live/production"
  environments?

Should they? This greatly depends on the risks. I prefer testing in production with feature toggles. Limiting the number of people that can "test" the new features.
We live in a continuous delivery world. Having separate beta testing and acceptance cycles will just slow you down. Do keep the risk in mind, don't play with peoples lives.


How to navigate between Facebook tabs?

Question: I have created a page in facebook. I have added a couple of tabs to it - 'Welcome' and 'Videos' (both of them are iframe based). I have set 'Welocome' as default tab so that whenever user visits this page he will be presented with the 'welcome' tab. Now in the canvas page of 'welcome' I have a link that says 'Click here to see our videos'. when user clicks on this link I want him to be directly navigated to the 'videos' tab. What script do i need to add in 'welcome' in order to achieve this?
Answer: in an a href use target="top"
with a javascript redirect use : top.location.href =
Cheers!
Answer: As far as I know, you can just use a link, but make sure you copy all of the url, every single bit.
It may be not this simple, but I think it might be.
Could you give us a link to the page. That would help.

How to navigate between Facebook tabs?


Is there an alternative design pattern for the autocomplete UI interaction

Question: I have a form in android mobile app which has 3 nested autocomplete each one will depends on the previous one for its value. But the customer wants something better than autocomplete. Since there are lots of items in each field and they don't have any logical order, I've no idea what to do. Any Ideas?
Comment: Can you provide a screenshot of your current UI?
Comment: Can you further describe the use case is. Is the form displayed on multiple screens (i.e. depending on answer a different screen is shown). Also, what is the ultimate goal of this user flow?
Comment: the App  is for Paints Purchasing Orders
each order can has multi Items and each item has 3 auto complete attributes: color family , color code , packaging
the possible values of each filed depends on the selection of the previous field for each item.
Comment: In autocomplete you don't see the huge number of items and their order, right? Since you're seeing only the items that match? Could you explain the problem a little better?
Comment: Thanks for your contribution to the UXSE pool of knowledge! Screen shot(s) of your application (or a mockup of it) is probably the best way to explain your use case, and also it is important to explain or understand why the customer does not autocomplete (is this an assumption or has it been tested?) so the best response from the community can be provided.
Answer: Without really knowing more about the specific use-case, consider your data.
Good UX is all about providing the clearest and simplest way to get the minimum data required to do the job to the user's specifications.
You said in your comment that you've got Color Family, Color Code and Packaging and this is a loop you'll need to run through quickly for multiple products in the same order.
A brief googling (because of my own lack of familiarity with the terms Family and Code in this context) cleaned it up in my head and explained why Color code is causing you problems.
Your ideal case I believe is to have the colours visible on-screen to select, with Secondary data like the name and color code visible as well.
Benjamin Moore has a good example of what I'm thinking of.
You simply select the family you want from a grid, then you're presented with a sub-grid of the different colours with the codes associated with them, select it and you see more data like the name and ultimately an option to purchase, where you get the price and volume/packaging option.
It's a simple visible hierarchy and it doesn't use drop-downs or autocomplete anywhere. You can also readily adapt it to whatever format you may like. for example a colour-wheel instead of the initial Family Grid.
Comment: +1 I like the answer to the question and hopefully we'll get a screen shot from the original poster of the question to clarify the requirements. A screenshot of your design pattern would also make your answer even better :)
Comment: @Ruadhan2300  thanks for ur detailed answer. unforuntally I can not use colors grid since the user of the apps wont purchase based on colors but based on the code since the users are professionals who know what paint they want to purchase
Comment: Well if they already know what paint they want to purchase by code..let them type in the code and then just for certitude, display the colour data before they confirm the choice. They shouldn't need the Family field at all in this case either.


Plot fractional trigonometric functions with the Mittag-Leffler function

Question:
Can anyone help please?
Im trying to plot the solution $X$ of the system as in the paper attached - about fractional calculus which is
$X= [E_{\nu}(2t^{\nu})][2 \cos_{\nu}(3t^{\nu})+4 \sin_{\nu}(3t^{\nu})]$
where $E$ is the Mittag-Leffler function
and the defintions of $\cos_{\nu}$ and $\sin_{\nu}$ are in the paper also.
Comment: Maybe the downvoters can chill a bit, working with the Mittag-Leffler function is not easy, and Jojo is a beginner.
Comment: For future reference, I think it is best to add an opening paragraph before embedding images. I had to scroll through carefully to see that it was not an image-only post.
Comment: Where are you stuck?
Comment: What is the commands in mathematica to get the graphs of the solution $ x = [ mittageleffler (2t^v)] [ 2cos _v(3t^v)+4Sin _v(3t^ )] as in the photo  ; Thanks
Answer: I'm not sure I'm understanding the notation right, but think that you can express all of these functions in terms of the builtin MittagLefflerE.
For the fractional cosine and sine definitions I'm using $z=x^{\alpha}$:
fcos[α_, z_] = Sum[(-z^2)^k/Gamma[1+2*α*k], {k, 0, ∞}]

MittagLefflerE[2 α, -z^2]

fsin[α_, z_] = Sum[(z*(-z^2)^k)/Gamma[(1+α)+2*k*α], {k, 0, ∞}]

z MittagLefflerE[2 α, 1 + α, -z^2]

For the fractional exponential I'm using $z=i x^{\alpha}$:
fexp[α_, z_] = fcos[α, z/I] + I*fsin[α, z/I]

MittagLefflerE[2 α, z^2] + z MittagLefflerE[2 α, 1 + α, z^2]

With these we can define your $X$-function:
X[ν_, t_] = fexp[ν, 2*t^ν]*(2*fcos[ν, 3*t^ν] + 4*fsin[ν, 3*t^ν])

(2 MittagLefflerE[2 ν, -9 t^(2 ν)] + 12 t^ν MittagLefflerE[2 ν, 1 + ν, -9 t^(2 ν)]) (MittagLefflerE[2 ν, 4 t^(2 ν)] + 2 t^ν MittagLefflerE[2 ν, 1 + ν, 4 t^(2 ν)])

Plot for $\nu=1$: using Evaluate to speed up the plotting dramatically,
Plot[Evaluate@X[1, t], {t, 0, 3}]

Plot for $\nu=0.8$: much slower as we cannot use the Evaluate trick,

I cannot read the labels on your other plots and so cannot reproduce them. What are their parameters $\nu$ and their axis labels?


Can a Schmitt trigger be used to start up a multivibrator?

Question: That is, suppose we have a monostable multivibrator and when the DC power is connected, the voltage initially rises rapidly from 0 to V(in). In reality there is a nonzero rise time when you turn on DC power. So the idea is use a schmitt trigger to generate a voltage impulse during the rising time after the power switch is closed and before the maximum DC voltage is reached that will start up the oscillator.
Comment: I think you'll attract more answers if you describe why you want to do this (unless it's a purely academic question). Assuming the Schmitt trigger is powered by the same supply, I'm not sure how you're thinking it would be ready to trigger any sooner than the monostable multivibrator. Also note that a monostable multivibrator is not free-running, in the sense of producing sustained oscillation. An *astable* multivibrator produces a squarish waveform and might be what you're thinking of.
Answer: What you are talking about is a POR (Power On Reset) generator, and it's actually quite important. The general, simplest version looks like

simulate this circuit – Schematic created using CircuitLab
This produces a logic LOW upon turnon which depends on the time constant of R1/C1. If you make this time longer than the worst-case risetime of the power supply, you can use it to initialize any circuitry whose starting state you care about. Normally this is applied to logic, but it could just as well be used for analog functions such as astables.
Doing this avoids nasties like unwanted operation of a mechanism or high-voltage output when you turn on the equipment.


Broken forward and inverse sync on Sublime+Skim

Question: I've recently begun exploring Sublime Text + Skim combination for my LaTeX stuff and I've been loving it so far. However, the forward and inverse search seems to be broken. I've tried looking around for solutions but none have been of any help.
For forward search, the user preference setting in the LaTeXTools forward_sync is set to True and using cmd+B to build it shows Running /Library/TeX/texbin/pdflatex /Users/xxx.tex on the Sublime console. Using cmd-l,j outputs Running "/Applications/Skim.app/Contents/SharedSupport/displayline -r -g 195 /Users/xxx.pdf  /Users/xxx.tex" where xxx replaces the file path. In both cases, Skim updates the file with the changes, but it doesn't go to my current cursor position in the PDF. I've also tried disabling Skim auto-reload as suggested here, but to no avail.
Possibly related note: On builing the document using cmd+B, Skim doesn't automatically open the PDF; I'll either have to manually open the PDF or use cmd+l,j. However, once the PDF is opened, I have no problems other than getting forward and inverse sync to work.
On the other hand, I have no clue how to get inverse search running. cmd+shift+click on the PDF does absolutely nothing.
I'm on OSX 10.12.5 (Sierra) and using Sublime Text build 4107 and Skim version 1.6.4 (134). My Skim sync preferences for PDF-TeX sync support is set to the Sublime Text preset (and the command and argument fields are greyed out). Any help will be appreciated. Thanks in advance.
Answer: Alright, just figured it out. I needed to explicitly include \synctex=1 in the preamble.


MDBootstrap Steppers

Question: I am using MDBootstrap Steppers, the documentation has only the css to achieve the layout. Now I want to implement the previous and next button functionalities. Anyone here to guide me.
Answer: Recently, we've expanded our stepper component so you can now use prev/next buttons. Here you can find more information about the implementation

MDBootstrap Steppers


Is there an industry standard on how many decimal places to display on an HMI screen?

Question: I can't seem to find anything, I'm trying to come up with a justification for how many decimal places to display on this Ignition SCADA system I'm building for a client. The answer might simply be that there is no industry standard, I'm just not sure.
Comment: I think it will depend on your interface and the degree of granularity your system needs, so I believe your guessing about the lack of a standard might be true
Answer: This depends, keep enough decimal places that the user can discern the difference between a bunch of items easily.
But if you need a standard to go by, this paper suggests that you use 2 decimal places
Personally, I've noticed that 2 is very common. I know it's a rule in currencies and of course finance/accounting fields that work with currencies. But the article above really helps solidify this idea. I've only schemed through what I needed for this answer, but I'm sure the author goes into more detail. Hopefully enough to convince you to stick to 2 for now.


Why is there no attempt to change the tennis scoring system?

Question: Why does the tennis scoring system still remain as it is ? By that I mean the 0-15-30-40 progression. The obvious 1,2,3,4 progression makes more sense as it is simplistic and does not indicate additional rules for inbetween the 30-40 points.
There is no real merit to it apart from confusing newcomers and make the game sound more excentric than it actually is. It confuses me how an obvious traditional approach to note points held up this long.
Comment: Could you provide some evidence from independent sources which shows this is actually a significant issue for recruiting new tennis players?
Comment: The simplistic answer is for the same reason there is no attempt to change the scoring system of any other sport.
Answer: I don't know that there's an objective answer to this question.  Most endeavors that require a lot of time and expertise have their own jargon and historical artifacts, not just in sports and certainly not just in tennis.  (Insert anecdote about cricket fielding position names).
In recent years there have been many proposals and implementations at different levels that are modifications on traditional tennis scoring.  None of the ones I'm aware of have attempted to recast the point advancement counts to just "1-2-3-game".  Instead, they have mainly focused on the desire to speed up play and prevent matches from being too long.  Examples being:

Increased use of tiebreaks
No-advantage scoring (removes deuce as a score)
Removal of let serve
4-point sets

It would appear that any confusion around the traditional 15-30-40-game scoring has not been a priority for match directors and rule makers to address.
Finally, the current system does have one feature that could be considered beneficial: that the game score other than 0-0 cannot be confused for the the set score or match score.
Comment: "the game score other than 0-0 cannot be confused for the the set score or match score."... other than in [exceptional circumstances](https://en.wikipedia.org/wiki/Isner%E2%80%93Mahut_match_at_the_2010_Wimbledon_Championships) (yes, I know Wimbledon has now changed the rules so we never get past 12-12)