When should I say "AM" / "PM" and when should I say "o'clock"?

Question: When I am asked "what time is it", when should I say "It is 1 o'clock" and when I should say "It is 1 AM /PM"? and in addition, could it be that both of them can be said continuously (It is 1 AM / PM o'clock)?
Comment: "It's 6 AM" or "6 PM" is short for "It's 6 [o'clock] in the morning/afternoon" Adding the abbreviations makes the response unnecessarily  *longer*. Never say: "It's 6 o'clock PM"
Answer: Speaking both PM/AM and o'clock together is odd!

It's 4 PM o'clock - no, no....

Now, it depends on the context. If someone is asking you now, obviously both of you know the part of the day or night. It makes no sense to add PM if the person is asking you in the afternoon. Yes, this is okay if you are teaching someone when to say PM/AM.
So, if the context is clear, you both know the part of the day, calling it 'o'clock' is common.

Hey, what's the time? ~ It's 3 o'clock (obviously, you both know that it is day and not night.

On the other hand, if you are telling a reference as in the past or in future, calling it with PM/AM is common just to clarify which part of the day/night you are talking about.

My train departs at 4 AM tomorrow

Because here, if you say 'o'clock,' the next question will be when? Early morning or in the evening?
However, what all I said is just in a general context. Special cases always do exist!
Answer: How to state the time
For stating times like this, you many options (they do not mix together naturally):

It is 1 o'clock (optional set phrase here). Typically the set phrases are in the morning, in the afternoon, noon (only for 12:00pm), at night, midnight (only for 12am). If you have a set phrase, you can leave out the o'clock but do not need to. There are also set phrases like on the dot or sharp to emphasize that the event will happen at the exact time stated.

For example

It's 4 in the afternoon (16:00)
It's 3 o'clock (3:00 or 15:00 depending on context)
It's 7 o'clock in the morning (7:00)
We will meet at 12 noon, correct? (The meeting is at 12:00)
I woke up yesterday morning at 2 o'clock. (The speaker woke up yesterday at 2:00)

It is 1(am/pm)

It common to leave out the o'clock or am/pm when there is no ambiguity when speaking. For example,

When's the next match?
It's at 2

Based on the current time the two speakers can infer the am/pm.
However, saying It's 2 by itself is uncommon: the o'clock is needed to specify that the current time is 2.
Usage
For business documents
Am/pm or 24-hour time are typically used.
Telling time
For exact hours (1:00, 2:00, 3:00, ...) it is typical to say 1 o'clock when stating the time because as mentioned above, It's 1 by itself is ambiguous.
For non-exact hours (1:01, 3:30, 4:12) it is typical to say one thirty, three thirty, or four twelve. These sequences are rare outside of telling time, so they work on their own.


Difference between [running-total] and [cumulative-sum]

Question: Is there a difference between the running-total and cumulative-sum tags?
Should these be merged?
Comment: They both look worthless to me
Answer: The running-total and cumulative-sum tags mean precisely the same thing. They both refer to the same underlying statistical tactic. As such, I've merged the two tags together.
I've somewhat arbitrarily chosen cumulative-sum as the "primary" tag. It gets significantly more hits on Google, and it seems to be the term of choice in several different programming environments. The choice doesn't really matter all that much, given the way our tag system supports synonyms.
This is probably not a very useful tag, and could someday be considered for removal ("burnination"), but it is not causing any harm, so I do not think that this would be a productive use of our time.


What is the original source for Yahrtzeit customs?

Question: There are various customs and even halachot associated with yahrtzeits, such as saying kaddish, getting called to Torah, lighting candles, fasting, serving as a prayer leader, giving charity, arranging a minyan at the cemetery, etc. What is the earliest or most authoritative source for any of these customs/halachot?
Comment: This seems like two distinct questions
Answer: Nitei Gavriel Aveilus2 75:1:1 brings the following sources for Yarzheit candles.
Minhagei Vermaisha Volume 2, Page 112
Maharshal Chapter 46
Magen Avraham 261:6
Nachalas Shiva Chapter 73
Kitzur Shulchan Aruch 221:1
Mishmeres Shalom Note 10:10
Gesher HaChaim 32:4
Will try to add more customs and sources later.
Comment: If you added the dates of these sources, it would be easier to judge which is the "original source".
Comment: @AvrohomYitzchok - You can edit and add dates if you want.


Saying or idiom for "if you know you won't be punished, you will misbehave"

Question: As when a spoiled child has never been punished by his parents, he will therefore continue to misbehave and do wrong.
Comment: Not my favorite idiom, but it's the first one that springs to mind: [Spare the rod and spoil the child](https://en.wiktionary.org/wiki/spare_the_rod_and_spoil_the_child). I think in modern times "the rod" has been abstracted to mean "discipline" and not actually beating a child with a stick. Still, not my favorite idiom.
Comment: Obliquely related is the idiom: *When the cat's away the mice will play*
Answer: The closest thing I can think of is the phrase to get out of hand. Even though this expression is mostly used for situations that gradually get out of control to the point where they become utterly chaotic, it can also be used to talk about people and children. The difference between this expression and the expressions offered in the comments section is that this one is definitely an essential part of everyday English vocabulary.
Example:

Little Johnny is getting completely out of hand! I think he needs a good old ass whipping.

But on a more conceptual note, the situation where you will misbehave because you know that you won't get punished for your actions is commonly known as acting with impunity.


How do I build an image dataset for CNN?

Question: I don't understand how images are actually fed into a CNN. If I have a directory containing a few thousand images, what steps do I need to take in order to feed them to a neural network (for instance resizing, grey scale, labeling, etc)? I don't understand how the labeling of an image works. What would this dataset actually look like? Or can you not look at it at all (something like a table)?
Comment: Can we see some example images please? What are you trying to predict from these images?
Comment: I do not have the sample images at this time, but I think my explanation will make it a little clearer. I have photos of a scene, the same scene every time. In some photos an object is present (although it may move position slightly, it will be roughly the same) in the other photos the object is not present. I just want the CNN to classify if the object is present or not.
Comment: @55thSwiss
I have the same exact question regarding image resizing/labelling. Please let me know if you did find the solution.
Comment: I was using the Keras library, what are you using? My code may be useless if you're using something else
Comment: This question is misleading as the OP does want to know how to BUILD the image database, but instead how to PREPROCESS the data and then how feed them into the CNN.
Answer: This is a very packed question. Let's try to go through it and I will try to provide some example for image processing using a CNN.
Pre-processing the data
Pre-processing the data such as resizing, and grey scale is the first step of your machine learning pipeline. Most deep learning frameworks will require your training data to all have the same shape. So it is best to resize your images to some standard.
Whenever training any kind of machine learning model it is important to remember the bias variance trade-off. The more complex the model the harder it will be to train it. That means it is best to limit the number of model parameters in your model. You can lower the number of inputs to your model by downsampling the images. Greyscaling is often used for the same reason. If the colors in the images do not contain any distinguishing information then you can reduce the number of inputs by a third by greyscaling.
There are a number of other pre-processing methods which can be used depending on your data. It is also a good idea to do some data augmentation, this is altering your input data slightly without changing the resulting label to increase the number of instances you have to train your model.
How to structure the data?
The shape of the variable which you will use as the input for your CNN will depend on the package you choose. I prefer using tensorflow, which is developed by Google. If you are planning on using a pretty standard architecture, then there is a very useful wrapper library named Keras which will help make designing and training a CNN very easy.
When using tensorflow you will want to get your set of images into a numpy matrix. The first dimension is your instances, then your image dimensions and finally the last dimension is for channels.
So for example if you are using MNIST data as shown below, then you are working with greyscale images which each have dimensions 28 by 28. Then the numpy matrix shape that you would feed into your deep learning model would be (n, 28, 28, 1), where $n$ is the number of images you have in your dataset.

How to label images?
For most data the labeling would need to be done manually. This is often named data collection and is the hardest and most expensive part of any machine learning solution. It is often best to either use readily available data, or to use less complex models and more pre-processing if the data is just unavailable.

Here is an example of the use of a CNN for the MNIST dataset
First we load the data
from keras.datasets import mnist
import numpy as np

(x_train, y_train), (x_test, y_test) = mnist.load_data()

x_train = x_train.astype('float32') / 255.
x_test = x_test.astype('float32') / 255.

print('Training data shape: ', x_train.shape)
print('Testing data shape : ', x_test.shape)

Training data shape:  (60000, 28, 28) Testing data shape :  (10000,
  28, 28)

from __future__ import print_function
import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras.callbacks import ModelCheckpoint
from keras.models import model_from_json
from keras import backend as K

Then we need to reshape our data to add the channel dimension at the end of our numpy matrix. Furthermore, we will one-hot encode the labels. So you will have 10 output neurons, where each represent a different class.
# The known number of output classes.
num_classes = 10

# Input image dimensions
img_rows, img_cols = 28, 28

# Channels go last for TensorFlow backend
x_train_reshaped = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)
x_test_reshaped = x_test.reshape(x_test.shape[0], img_rows, img_cols, 1)
input_shape = (img_rows, img_cols, 1)

# Convert class vectors to binary class matrices. This uses 1 hot encoding.
y_train_binary = keras.utils.to_categorical(y_train, num_classes)
y_test_binary = keras.utils.to_categorical(y_test, num_classes)

Now we design our model
model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3),
                 activation='relu',
                 input_shape=input_shape))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation='softmax'))

model.compile(loss=keras.losses.categorical_crossentropy,
              optimizer=keras.optimizers.Adadelta(),
              metrics=['accuracy'])

Finally we can train the model
epochs = 4
batch_size = 128
# Fit the model weights.
model.fit(x_train_reshaped, y_train_binary,
          batch_size=batch_size,
          epochs=epochs,
          verbose=1,
          validation_data=(x_test_reshaped, y_test_binary))

Comment: if I'm not using MNIST, how is the image directory loaded? Similar to `mnist.load_data()`? I will be using Keras with TensorFlow backend
Comment: @55thSwiss, what is the storage method for these images?
Comment: locally on a hard drive
Comment: @55thSwiss, can you post an example file here so I can write you a code snippet to load them up?
Comment: I am actually making some progress building a CNN, but it will likely take me another week or so to finish because I am only working on it in the evenings. I am unsure if some of my methods are the best practice, would I be able to show you the source code when finished for a review? Nothing serious, but if I made obvious mistakes etc
Comment: @55thSwiss, yes of course, wed be happy to help!
Answer: I understood your question and I've been there. Make sure the data you've collected is saved into its respective class folder, for example, all dog images in a folder named "dog" and cat images in "cat" and so on
I think might help
IMG_SIZE = 50

DATADIR = 'Path/classes'

CATEGORIES = ['class1 #folder name', 'class2', 'class3']

for category in CATEGORIES :
    path = os.path.join(DATADIR, category)
    for img in os.listdir(path):
        img_array = cv2.imread(os.path.join(path, img), cv2.IMREAD_UNCHANGED)

training_data = []

def create_training_data():
    for category in CATEGORIES :
        path = os.path.join(DATADIR, category)
        class_num = CATEGORIES.index(category)
        for img in os.listdir(path):
            try :
                img_array = cv2.imread(os.path.join(path, img), cv2.IMREAD_UNCHANGED)
                new_array = cv2.resize(img_array, (IMG_SIZE, IMG_SIZE))
                training_data.append([new_array, class_num])
            except Exception as e:
                pass

create_training_data()

random.shuffle(training_data)

X = [] #features
y = [] #labels

for features, label in training_data:
    X.append(features)
    y.append(label)

X = np.array(X).reshape(-1, IMG_SIZE, IMG_SIZE, 3)
y = np.asarray(y)

Not my code
Source
scroll down to Preparing the data and you'll find your answer to create dataset and importing it into your code from your computer. :)
Comment: While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/50228)
Answer: Dataset just consists of Features and Labels. Here features are your images and labels are the classes.
There is a fit() method for every CNN model, which will take in Features and Labels, and performs training.
for the first layer, you need to mention the input dimension of image, and the output layer should be a softmax (if you're doing classification) with dimension as the number of classes you have.
model = Sequential()
model.add(Conv2D(32, (3, 3), padding='same', input_shape=(64, 64, 3)))
model.add(Activation('relu'))
model.add(Conv2D(32, (3, 3)))
model.add(Activation('relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))

model.add(Flatten())
model.add(Dense(512))
model.add(Activation('relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes))
model.add(Activation('softmax'))

model.compile(loss='categorical_crossentropy', optimizer='Adam', metrics=['accuracy'])

model.fit(x_train, y_train, epochs=10)

The above is the code for training a Keras sequenctioal model.
General Points:

input_shape should be the dimension of X_train.
You need to get this shape when you do X_train.shape (numpy)
Convolutions are then applied with respective Activations
Dropout and Pooling layers are optional.
After the convolution layers, the data is flattened. using Flatten()
Then it is sent to few Fully Connected layers
The last but one layer should have the dimensions of number of classes
Last layer will be softmax.
Now, compile the model with the loss, optimizer and metric
Then fit()

Vote up ;) if you like it.
Comment: Thank you for the explanation, my problem is though there are many code snippets online for setting up the CNN as you described, what I am confused about is preparing the data. How are the images actually loaded? What does it look like?


Cone of complex and isomorphism

Question: let $M$ be a smooth manifold with boundary $\partial M= X\times F$, where $X$ and $F$ are smooth manifolds, $F$ compact. The embedding $i : \partial M\longrightarrow M$ induces the restriction
 $$i^{*} : \Omega^{*}(M)\longrightarrow \Omega^{*}(\partial M) $$ The projection $\pi : \partial M \longrightarrow X$ induces the mapping $$\pi_{*} : \Omega^{*}(\partial M)\longrightarrow) \Omega^{*-\nu}(X), \quad dimF=\nu $$ which takes the forms to their integrals along the fiber $F$. Consider the morphism $$\alpha: (\Omega^{*}(M),d)\longrightarrow (\Omega^{*-\nu}(X),d)$$ of de Rham complexes $M$ and $X$ and denote the cone of this morphism by $$\Omega^{k}(M,\pi) = \Omega^{k}(M)\oplus \Omega^{k-\nu-1}(X),\quad \partial = \begin{pmatrix}
d & 0 \\ -\alpha & -d \end{pmatrix}.$$ let $\quad \Omega^{*}_{0}(M) = \ker \alpha$. How to prove that this inclusion $\quad r : \Omega^{*}_{0}(M)\longrightarrow \Omega^{k}(M,\pi)\quad $ induces isomorphism in cohomology groups?
Comment: This question would be more appropriately tagged [algebraic-topology] instead of [algebraic-geometry]. I have adjusted the tags on this question, and I would ask you to look out for this going forwards.
Comment: There are couple of problems in your question. First, you may want to assume $F$ being compact to allow integration along the fiber. Second, in the boundary morphism of mapping cone, you may want to specify $\alpha=\pi_*i^*$. Lastly, it does not seems to me that your claim is true in general. Can you provide a reference?
Comment: AG, Hello! I found a lemma saying that: if a morphism of chain (cochain) complex $f$ is surjective, then $cone(f)$ and $\ker f$ have the same cohomology groups
Answer: As you noted in the comments, if a morphism is surjective, then its kernel is quasi-isomorphic to what you call its "cone" (I would call it the homotopy kernel). It's not too hard to prove. Suppose $f : X \to Y$ is a surjective cochain map and consider the inclusion $\iota : \ker f \to \operatorname{cone} f$.

$\iota_*$ is injective. Let $x \in \ker f$ be a cocycle ($dx = 0$), such that $\iota_*[x] = 0$, i.e. $\iota(x) = (x,0) = d\alpha$ for some $\alpha = (x',y') \in \operatorname{cone} f$. But $d\alpha = (dx', f(x') + dy')$ so $(x,0) = d\alpha$ implies that $x = dx'$ is therefore a coboundary, i.e. $[x] = 0$.
$\iota_*$ is surjective. Let $(x,y) \in \operatorname{cone} f$ be a cocycle, i.e. $d(x,y) = (dx, f(x) + dy) = (0,0)$. Since $f$ is surjective, we can find $x' \in X$ such that $f(x') = y$. Therefore $$(x,y) = (x - dx',0) + d(x',0) \implies [(x,y)] = \iota_*[x-dx'].$$

So now the question is why your map $\alpha = \pi_* i^*$ is surjective: it's because both $\pi_*$ and $i^*$ are surjective.

$\pi_*$ is surjective. Suppose $\omega \in \Omega^*(X)$ is some form. Let $\mathrm{vol}_F$ be a volume form for $F$. Then $\omega = \pi_*(\omega \times \mathrm{vol}_F)$.
$i^*$ is surjective. You can find a collar around $\partial M$, i.e. a smooth embedding $g : \partial M \times [0,1) \to M$ such that $g(\partial M \times \{0\}) = \partial M$. Let $U \cong \partial M \times [0,1)$ be the image of $g$ which is open in $M$. Find some open set $\partial M \subset V \subset U$ such that $\bar{V} \subset U$. Define a bump function $\rho : M \to [0,1]$ such that $\rho_{| \partial M} = 1$ and $\rho$ vanishes outside $V$.
Now let $\omega \in \Omega^*(\partial M)$ be some form. Consider $\rho \cdot \omega \times 1 \in \Omega^*(\partial M \times [0,1)) = \Omega^*(U)$. Its support is contained in $V$, so you can extend it by zero outside $U$ to get a well-defined form $\hat{\omega} \in \Omega^*(M)$ which restricts to $\rho \cdot \omega \times 1$ on $U$. In particular, it restricts to $\omega$ on $\partial M$, i.e. $i^*(\hat{\omega}) = \omega$.

Cone of complex and isomorphism


What is this shrub that is 7ft tall?

Question: I have a shrub that came with this house, and it is about 7ft tall and 3ft wide. It grows white flowers at the summers-fall, and is drought-tolerant. It grows in North Carolina, United States. It has small 1/2 inch flowers that are maybe white or yellow. The flowers come in the fall, are fragrant and don't produce berries.
Answer: Looks like a rhododendron to me, they grow all over NC. If the leaves are thicker/stiffer/tougher than most tree leaves I would be almost positive. To me, the leaves feel fake, like they are polyester.
It's a great plant, one of my favorites. When I was backpacking the Smokies they grew ubiquitously in the valleys. Enjoy it and don't be afraid to trim it or beat it into submission; it can take it, and if left unchecked could get too big for that space.
Comment: The description of flowers as small, 1/2 inch makes me think it's not a rhododendron.
Comment: You shouldn't generalize about the size of the shrub - there are many rhododendron cultivars, and many remain small enough to fit into the space shown in the photos. For example, the PJM cultivar is usually about 4 feet x 4 feet in height and width. Other cultivars are more columnar. Saying that the plant will, if left unchecked "get too big for that space" is not good advice without knowing the actual cultivar.
Comment: @Jurp fair enough. The white flowering ones i've seen in the past seemed bigger than some of the fancy/more decorative ones, but anecdotes are not 100% by any means; good call. That said, I think it's already borderline too big as it's about tall enough to shadow the garage lighting...
Answer: Looks like a Ligustrum variety, commonly known as privet, possibly japanese privet, Ligustrum japonicum. These bear fragrant (some people would say unpleasant smelling) white sprays/panicles of small flowers in late summer or fall, sometimes followed by berries, so it rather depends on whether that flower description fits the flowers you see. https://www.rhs.org.uk/plants/77548/Ligustrum-japonicum/Details
There are other varieties of privet, but japanese privet tends to have slightly thicker, waxier leaves than the other varieties, like the leaves in your photo appear to have.
Answer: This looks to me like Osmanthus fragrans , sweet/tea olive bush.  https://hgic.clemson.edu/factsheet/tea-olive/

What is this shrub that is 7ft tall?


Why python's list slicing doesn't produce index out of bound error?

Question: While playing with array slicing I noticed that a[index:] or a[:index] type of slicing doesn't produce array index out of bound error for strings.
str = "abcde"
print str[10:]
print str[:10]

produces output :
''
abcde

Can anybody explain why? Shouldn't it produce array index out of bounds error ? Python does produce this error if I try to do something like : print str[10].
Answer: Slicing is used to create a new list. If the indices don't fall within the range of the number of elements in the list, we can return an empty list. So, we don't have to throw an error.
But, if we try to access the elements in the list which is greater than the number of elements, we cannot return any default value (not even None because it could be a valid value in the list). That is why
IndexError: list index out of range

is thrown.
While slicing, if the starting index is greater than or equal to the length of the sequence, the length of the returned sequence is set to be 0, in this line
defstop = *step < 0 ? -1 : length;
...
if (r->stop == Py_None) {
    *stop = defstop;
}
...
if ((*step < 0 && *stop >= *start)
    || (*step > 0 && *start >= *stop)) {
    *slicelength = 0;

For the Strings, if the length of the string to be returned after slicing is 0, then it returns an empty string, in this line
if (slicelength <= 0) {
    return PyString_FromStringAndSize("", 0);
}

Answer: That's how the slicing operator is implemented in python. If the array indices are out of bounds, it will automatically truncate then at the right places.


Does Each program has its own separate segments (code, stack, data) in memory?

Question: Say there are many programs running at the same time.
Does each executable program that runs has its own code, data, and stack segment in RAM or is the complete RAM divided into 4 segments and each of theses segments holds respective segments for each programs.
Comment: How it's handled in hardware and the operating system differs depending on, well, hardware and operating system. But generally yes, each process has it's own code, heap, stack etc.
Comment: In the [Apollo guidance computer](http://en.wikipedia.org/wiki/Apollo_Guidance_Computer), all processes use the same memory.
Comment: Generally?  C'mon, aren't we talking like 99.9%?  With specific exceptions like shared memory, etc.  In general, programs can't botch with each while running in terms of their own processing space.
Comment: I don't do much programming on my Apollo guidance computer....
Answer: This depends on two things:

Your deployment architecture
Your OS that runs your process

If you are running on x86 on common mainstream Linux, Windows, BSD then

each process has it's own private virtual RAM
All segments text (code), heap, data are in the same logical address space (virtual RAM segment)

Historically x86 was designed with the ability to support segmented memory, but OSes never made use of it and support for it was initially dropped in AMD64. Though recent Processors support it again for use in virtualisation and Hypervisors. Userland applications are commonly deployed without segmentation today.
Comment: @user1660982 More or less. Each program is given today commonly 256TB of virtual RAM (which is unusable in it's raw state). Program code is placed automatically somewhere and calls that request memory (`mmap` and family) place your new memory mappings anywhere in that virtual space which is yet unused. Commonly the OS decides where new mappings are put, but your program may hint where it wants them.
Comment: So that means each program is given a amount of memory say 100 MB and that program divide that 100 MB into stack, data, code segments?
Comment: You could even argue that each program is "only" given 128TB of VRAM because the kernel will take the other half, but again, that's OS-dependent
Answer: Short answer: it depends on the hardware and OS it's running on.
Usually, each process gets its own virtual memory space, giving it the illusion of it seeming like the only process running on the computer. That virtual memory space is divided into code/data/stack segments by the OS (these usually have fixed/common addresses).
As far as physical RAM usage, that depends entirely on the OS - it can use different sections of RAM as it pleases, and the programs won't even know about it.
Answer: This question is Operating System specific and not C specific.
In general, OSes maintain an execution context per process, which holds the stack and runtime flags, but how memory is allocated by the likes of malloc varies between systems.
For more information you may wish to delve deeper into the malloc documentation.


Is there any well-populated list or database of pulsar "glitches"?

Question: Besides listing which pulsars have ever actually glitched, it would hopefully also include some historical data on their periods before and after they glitched.
Answer: There are two substantial (~650 entries) glitch databases I'm aware of, one maintained by Jodrell Bank and one maintained as part of the ATNF's pulsar catalog. Both list similar information for each glitch, including the glitch MJD (with ATNF's values sometimes being more precise) and the fractional changes in spin frequency and frequency derivative. References are listed for each entry if you need more information. The databases unsurprisingly overlap (~473 entries, by a count with a quick script), but neither is totally complete.
Comment: fyi I've just asked [What are the main ways that pulsar "glitches" are noticed and documented? Do they have to be caught in the act of glitching to be catalogued?](https://astronomy.stackexchange.com/q/48994/7982)


Exe file creating directories with just no right permissions to folder

Question: I have a script that runs in aws which basically pulls data feeds via api then creates a folder which it then dumps a csv file into.  Right now it is supposed to name the directory based on its name.  It does create the folder but rather than creating it with inherited permissions it creates it with read only access and therefore cant dump the csv file.  Now I can easily run chmod 755 on the folder and ill be fine, but I have thousands of folders to do and that will be a bit monotonous.
Comment: What is the value of the [user mask](https://en.wikipedia.org/wiki/Umask)? Did you try to change it?
Comment: 377 - yes I can change it manually but this will be a big pain if I have to do it for every single one of them
Answer: A value of 377 (or is that 0377) for the user mask is unusual to say the least, it resets all the access flags and only leaves read access to the file owner (if even resets the execute flags, making directories unusable even by their owner).
The usual umask values are

0002: full r/w access to user and group, R/O access for others
0022: full r/w access to user only, R/O access for group and others
0077: full r/w access to user only, no access to others

To change the umask you just add a umask command in your ~/.profile but it is also possible that said ~/.profile already has a umask 0377 command, that you just need to change or remove.


Mechanical tolerances on a CNC machine

Question: I have a project which involving several mating parts and also shaft guided through bearings, my issue here is that I don't have much experience with tolerances and manufacturing processes and I cannot determine the perfect balance between cost and accuracy. I am using Aluminium 6061 for raw material. For example I have some guidance "shafts" which are "made" by removing a large material from the part, I made some research and I saw that a +- 0.025 mm is a typical tolerance for a decent CNC machine. My question is, could I go down with that value, in terms of cost or is already a tight tolerance ?
Answer: It's going to be an uphill battle from that point on. While you can get every part of the machine and the process to tighter tolerances, their errors may compound to the sort of tolerance of 0.025; you may manufacture relatively simple parts with lower error but whether you succeed or not is more up to luck than your efforts - whether the tolerances of the tool, the table drive, the head drives, the frame rigidity, the sliders rigidity, and the material itself add up and ruin the accuracy or cancel each other resulting in near-perfect workpiece.
One nasty property to consider is the internal stresses of the material, resulting from the manufacturing process. If you remove large parts of it, the stresses that were canceled out by say, two outer surfaces pulling with equal strength against the central bulk pushing, will result in the workpiece ending as soon as you unlatch it. I had worked with 7mm brass sheets, and upon removing most of material from one side, I't observe good 2cm of deflection on a 30cm bar.
Regardless, if you aim at sub-0.01mm accuracy in all domains you can control (tool shape, material alignment, table flatness and machine being level), and the machine is good quality, you can expect better than 0.03mm accuracy in the result. If you want better, you'll need to get into the "guts" of the process - drives of the head and table, bearings, vibration dampening etc.
Comment: @StefanMerfu: You can always declare negative tolerances. Note how that goes for nuts and bolts tolerances: say, both nut (inner) and bolt (outer) diameter are declared as 10mm, but they will always fit, because the bolt's tolerance is (...making up the numbers, I don't recall the exact value) [-0.05 ; -0.15] meaning a bolt of 10mm exactly would be out of specs, exceeding the bracket. Just provide a tolerance top bracket of shaft that is lower than the bottom end of the hole bracket, and it guarantees they will fit. (add some extra margin for oxidation, contaminants, lubricant etc too...)
Comment: @StefanMerfu: Sorry, a little too long since I've been into that stuff. I'd suggest looking into standards; the aforementioned nuts and bolts (ISO 965-1) are one safe place where you'll find generally accepted tolerances for various diameters of shafts. It's a bit grueling work finding the right numbers (never mind free copies of the standards) though, so I'm not going to do it for you.
Comment: Thank you very much for the answer. I am the designer and I am about to give the project to production. You just make my work harder. I have a gap in my knowledge and imagination, for example if I will make an aluminium shaft smaller with 0.01 mm always that the hole (using true position tolerance, for orientation and form) the assembly will always work ?
Comment: Could you provide me a safe value for extra margin ?
Comment: No problem, you just help me a lot, thanks for all the good stuff from your experience.

Mechanical tolerances on a CNC machine


Algorithm suggestion for correlated models

Question: I'm looking for suggestions on how to proceed with predicting on separate but correlated models.
The example I will use is housing data. I have three inputs:

Latitude
Longitude
1-Google Street View Image

I want to create models that predict things like:

Square Footage (regression)
Home Price (regression)
Number of Floors (categorical)
For Sale or Not (binary)

The dataset is supervised, so we are given 7 features. The model in production will only have 3 inputs (lat, long, image). Ideally, we could solve this dependence by using 6 input features for every model, but production will only use 3 inputs.
So if I start out creating four independent models (sqft, price, floors, sale/no-sale) based only on 3 inputs, I may run into some potential issues. For example, the models may independently predict a small square footage and a high number of floors in the home. So as a manual reviewer, I can say something like, "Hey, one of these models is probably wrong. I wish that they could take into account each other's predictions and confidence levels.".
I'm trying to read up on how this is done in any literature, but I can't really find the correct terminology to search.
My thoughts so far:

Maybe create one-model on only 3 inputs that has the four multiple outputs / output types, probably a NN of some sort.

Another thought would be to create each model with all the other 6 inputs, and use a model that deals with missing data well (naive bayes?).

Some sort of post ensemble model that looks at all the four model outputs.

I'm sure this type of problem has been looked at before in statistical learning, I just am unsure where to look.
Answer: In general this is a prime opportunity to use Geospatial Data Science methods. These are more complex in some cases than ML models and sometimes more simplified.
In this case if you have sufficient examples to sufficiently populate your entire study region in a random spread across the landscape, you could use the variables in the actual data as points on a map and create meshes of value across the landscape and use this to interpolate the values of the four individual outcomes which you are looking to predict.
QGIS, an open source geospatial modeling application and some youtube searches are a great place to start solving this problem.
Comment: Thank you! I will check this out and see if this works.


What exactly did Apollo do with respect to the Sun?

Question: My understanding is that Helios (a Titan) was actually the one who drove the Sun Chariot across the sky every day. But why, then, was Apollo the god of the Sun?
Am I correct in this understanding? Was Apollo (as a son of Zeus) sort of Helios's boss? He could ride the chariot if he wanted to, but he was also free to mate with Daphne, Cyrene and so forth, and otherwise meddle in human affairs, while Helios had to drive the bus every day? Or did it work another way?
Comment: See the related question http://mythology.stackexchange.com/q/411/197 "What is the difference between Hecate, Selene, Artemis, and Phoebe?"
Answer: Apollo didn't have any solar properties in Homeric times, and he and Helios were clearly distinct entities. Helios is extensively discussed in Book XII of the Odyssey, for example.
From the 5th century BCE and onwards Helios started to be identified with Apollo. An early reference to the fusion of the two beings can be found in fragment 781 of Euripidis' Faethon, where the poet tells us that Helios is "rightly called Apollo":

ὦ καλλιφεγγὲς Ἥλι᾿, ὥς μ᾿ ἀπώλεσας καὶ τόνδ᾿ Ἀπόλλων δ᾿ ἐν βροτοῖς ὀρθῶς καλῇ, ὅστις τὰ σιγῶντ᾿ ἀνόματ᾿ οἶδε δαιμόνων.

The association became a lot more commonplace during Hellenistic times.


How does earthing a plate of an isolated charged capacitor even work?

Question: If one plate of an isolated charged parallel plate capacitor is earthed, then that plate must have a potential zero after being earthed as that is what earthing an isolated conductor does, but potential on each plate is only due to the charges on the other plate. Since the other plate(the one which is not earthed) is isolated and non-neutral, potential due to it on the earthed plate should not change. As surface charge density on the unearthed plate cannot be zero... how on earth will I manage to get the potential of the earthed plate to be zero without changing the charge on the other plate?
Answer: It depends how you charged your capacitor. a) You first earthed bot plates and then carged one for example with +Q then one side of your C has -Q on the inside, +Q on the outside, if you connect it to earth  the +Q outside go to earth ( or -Q from earth comes  to the outside) If you connect bot sides in the Beginning to a high potential both plates max have  the same positive charge say Q . Charging one side then  with additional 1Q  gives you for example +2Q on one side, +1Q on the inside of the other , so the same potential difference.  Now connecting one side to earth  both stay the same.
So what happens is different from the initial potential to earth.
Answer:
how on earth will I manage to get the potential of the earthed plate
to be zero without changing the charge on the other plate?

Earthing (grounding) one plate causes the potential (voltage) of the other plate to be measured with respect to earth (ground).  It does not effect the charge on the capacitor. Think of using a voltmeter with the negative lead connected to earth (ground) and the positive lead connected to the ungrounded plate of the capacitor.


Cookies created with php setcookie() and called through AJAX and XMLHttpRequest disappear on Firefox restart

Question: I'm making a simple ajax login system using cookies to remember username or login automatically on the next visit. Everything works ok, the cookies are set 10 days to the future, I can see them when I go and see Firefox's cookies but they are deleted when I restart the browser.
The cookies are set with setcookie() from a php script called using jQuery .get function. I tried .post too but the same happens. Firebug reports the Set-Cookie header correctly.
I tried it on localhost, and on a real live server, I tried passing all the parameters to setcookie() because I read something that Firefox treats it as session cookie if you don't, I tried 2 dots on hostname and every possible solution I could find on the net. I don't see why it doesn't work...
Answer: have you tried any other browser? it could be that you configured your firefox to delete cookies every time it is closed.
take following steps:

click options or preferences depending on your OS.
click privacy
un check "Always clear my private data".
Answer: Ok seems like it happens only on my browser, probably it's because it's Firefox portable.
Comment: Better to add this as an edit to your original question, not to place it as an answer. Further, portable Firefox likes to not leave traces behind, so it could be perfectly feasible that it's set up to delete cookies upon close.


Can I use the name of a fictional company

Question: How could I possibly know if I can use the name 'LexCorp' for a real company. LexCorp is the company of Lex Luthor in the comic books of DC.
https://en.wikipedia.org/wiki/LexCorp
Answer: You can check the USPTO trademark database, to see if it is a registered trademark. You could also ask LexCorp about their claim that it is a registered trademark of DC comics or WB, though their CEO appears to be a criminal mastermind and might not tell the truth. There is some unclarity as to the latter point (criminality). USPTO includes a "don't rely on the database" disclaimer, so maybe it is registered and it just doesn't show up
Answer: LexiCorp was registered then abandoned. See details below.

https://huski.ai/trademark/78509802
The reason of giving up this trademark was not clear.
Comment: Given  that LexCorp in real life has a Spanish language description for a law firm in the advertisement displayed, it seems likely that the person using it didn't know of its comic book connotations originally and eventually found those connotations to be a drag and found another name.
Comment: LexCorp, or LexiCorp?


CDG terminal transfer

Question: How long will it take me to go from my Icelandic Airline flight in Terminal 1 to an Air France flight to Madrid in Terminal 2? I have several flights to choose from to Madrid and want to allow for plenty of time.
Answer: Part of the answer depends at what time of the day (or night), as security checks at T2 can be a mess. It will also depend on whether you have luggage to pick up and check in again.
I would say the timing in average would be:

45 mn from the time the doors open on your flight to T2 (D?) departure hall. Especially if you are not familiar with CDG.
30 mn for check-in and security checks.
20 mn before departure time.

That's about 1.5 hours. Early mornings and early evenings are very busy, and could require longer.
Answer: If you're moving between airlines and terminals, try and schedule 3 hours between the flights, especially if you're not familiar with the airport and have checked luggage. When I travel, I allow 2.5 hours at the absolute minimum for international flights, and 1.5 hours for domestic.

CDG terminal transfer


Non-Convex Loss Function in Deep Learning Is a Big Deal?

Question: I want to use deep learning to estimate the value of a function based on some data. However, the loss function would be neither convex nor concave. Can I know if it is a big deal in deep learning? Is training a deep network, when loss function is convex, the same as optimizing a convex problem or not? I would be thankful if any paper has addressed this issue.
Answer: Optimization
In optimization, the loss function (sometimes called the error function) is a function that aggregates the disparity between actual and ideal behavioral states in multiple dimensions and over a sequence of input cases.  In re-entrant (reinforced) learning, a feedback scalar or vector acts as a corrective signal that can replace or further aggregate with the loss function and additionally impact the training back-propagation.
Convergence
In any of these architectures, including systems without NN components but attempt to adapt by converging on an optimal static or moving target behavior, one generality can be made.  As the goal state is approached, the probability of successful convergence increases if the size of each incremental estimation decreases.  The estimation is nothing more than an informed guess.
Decreasing the learning rate as the detected convergence value improves is one strategy being used experimentally if not in production, but that strategy has drawbacks when used alone.  Involving the loss function in slowing down as the destination approaches is a best practice.
Biology Analogy
A biological system of a similar nature is the human subjective experience of pain.  As the pain level goes down, the human brain cares less about the pain, therefore the steps taken to reduce it decrease and eventually vanish.  Evolution has proven such to be advantageous for the same reason.
The Mathematics Involved
Maximizing the probability of an unknown function to be learned adequately to perform well is done in NNs by convergence.  The term gradient descent is often used to describe the iterative process intended to converge on some ideal characterized by labeled data, a concept built into the network, or some fitness signal.  The likelihood of converging on at least a local minima (which may or may not be the global minima) is much higher if the slope decreases as the minima is approached in successive approximation scenarios.  This is when d2E / dt2 is positive.
The geometric idea of convexity is correlated to the calculus concept of the second derivative of a line or surface with respect to time or some other measure of forward progress.  In successive approximation, the independent variable that measures forward progress could be time, computing cycles, the index of the training sample, iteration number, or some aggregation of these.  The second derivative is the rate of the rate of change.
Convergence is more likely if the rate of change decreases as the disparity between what is perceived as optimal behavior and what is the actual current behavior.  In other terms, the relationship between risk in making the next adjustment to circuit (NN) behavior should approach zero as proximity to the optimal behavior approaches zero.  (If one senses they have worked there way to close proximity of their desired state, it makes no sense to make wild guesses.)
An Easy to Visualize Analogy
If you drop a rubber ball into a rigid cone, it will take time to reach thermodynamic rest, at the bottom.  A lossless ball (considered impossible) will bounce forever.  A paraboloid (parabolic in two dimensions like a solar reflector) will produce faster convergence with the same rubber ball because the ball drops in energy (the sum of kinetic and potential energy) with each bounce.  The trajectory does not overshoot the bottom nearly as much or as frequently.  This analogy is not perfect, but it provides a visual image without a diagram.
If you aggregate your disparity between your target trained behavior and the current in-training behavior in a way where the second derivative is negative (concave loss function with respect to distance) on either side of the targeted ideal, convergence is much less likely.  In the analogy, the rubber ball is likely to bounce out of the flared cone altogether.  A lossless ball will always bounce out eventually.
A more provincial analogy is that it would be like trying to catch a baseball with the back of a baseball glove.
Concave, Convex, or Zero Second Derivative
Whether continuous or discrete, convex functions converge much more frequently and usually with less time and computing resource than concave ones.  A second derivative of zero is in the middle.  The word linear is actually incorrect for this zero acceleration case.  The correct term is first degree polynomial.
Sum of squares over the dimensions of the domain (inputs) and over the sequence of input cases will perform well in many cases.  If you were to sum the square roots of the absolute value of error instead, your NN will rarely converge at all.
Executive Summary
The following three things are more likely to be favorable if you find a way to aggregate your disparity between ideal and actual current behaviors in a way where the second derivative is greater than zero.

Reliability of eventual convergence
Speed of convergence
Response time in the case of re-entrant (reinforced) learning
Savings of computing cycles
Reduction in the complexity of introspection
Conservation of computational memory (RAM or SDD)
Conservation of space needed for persistance and archiving
Reduction of project cost to the business
Comment: The biological analogy was a bit out of context since we don't know whether brain follows a loss function or not
Comment: Is this a famous groundbreaking paper? Can you give me a link or something so I can get some idea on this topic


Can you apply an apostrophe to any word?

Question: If I were to say The skill is could I say it as The skill's? Or would this not work? Also, if it does work, could I apply to it to any word?
Answer: One of the functions of the apostrophe is as a written designation of missing letters. While it would probably be understood by native speakers that the word is is being shortened if you said, "The skill's hard to acquire," that's not really an accepted use of an apostrophe in written English. If you were to write dialogue, though, I think it would pass.
We do that in speech all the time for the verb is or has and other constructions that are not written out.

The dog's in the neighbor's yard again! (dog is)
The game's already started. (game has)

Could you apply it to any word? No more than you can use is or has after every word and have it make sense.
Comment: In speech, yes, it's colloquial.
Comment: The key word is "attempts". Anything that refers to a goal of the writer is automatically not part of language but of art, and it can only attempt to reproduce speech, never to actually achieve it. Written words are silent, as Socrates pointed out. Punctuation, as something unique to writing, can't be colloquial because it is standardized.
Comment: So actually using an apostrophe in the above phrase is more colloquial?
Comment: No, it's not. In speech there are no apostrophes; they're only for writing, so using an apostrophe is not colloquial, because "colloquial" means spoken dialog, not writing. Contractions occur in speech and they're colloquial; but apostrophes have nothing to do with the language. They're used as a crutch for the written language, to indicate a few changes in words forced by language change. The use of apostrophe for possessives, however, is simply silly, since it adds nothing useful and is mostly used wrong.
Comment: @JohnLawler: Saying *colloquial* can only apply to speech is a prime example of the etymological fallacy.
Comment: @JohnLawler - I agree there are no apostrophes in speech; I thought that was clear from my first sentence. And I stipulated that it could be used to *record dialogue*. So I'm not sure why you are correcting me, as I believe we're on the same page about that. But, as I have your attention, is there never writing that is colloquial, that is, that attempts to affect a conversational tone?


Good books on money creation and monetary theory?

Question: I just finished reading "Where does money come from?" (Ryan-Collins) on how commercial banks create the bulk of the money supply, and I am still hungry for more material that will help me understand things like the role of the central-bank and the government in creating money (both through money creation and public debt), the interaction between taxes, the money supply and inflation, and other related topics. I have a background in Finance but not in academic Economics. However, all suggestions are welcome. Thank you.
Answer: For a broad topic like this you can simply read some textbook. For example, Walsh Monetary Theory and Policy, you can skip all the math if that is not interesting for you.
Answer: If you have an interest in historical economics and the basis of modern economic theory there is no way around Keynes – The General Theory of Employment, Interest and Money. Some parts might be challenging for contemporary readers, as we've moved past certain theoretical hurdles that were prevalent during Keynes's era.


Poulan chain saw

Question: How do I install a new piston with 21 loose needle bearings around the wrist pin in the little end of the connecting rod?  I have tried to install the wrist pin but the needle bearings keep falling out.
Answer: A light weight grease can be useful to keep the needle bearings in place while completing the assembly. It will provide lubrication and eventually be worn or be washed away by the normal lubrication system.
Comment: Another possibility is assembly lube.  Some brands are relatively "sticky" and work well for this sort of thing.  Assembly lube is also formulated so that it eventually gets dissolved and washed away by engine oil.
Comment: Would assume this is a 2-stroke engine which uses the oil in the gas mixture to lubricate things. I agree with your methodry, but would suggest using petroleum jelly as the light weight grease.
Comment: +1 for engine assembly lube. The exact tool for this job - does a very good job of sticking things where they need to be and then shears very easily when used

Poulan chain saw


Types of technical fouls in NBA

Question: Generally there are various types of technical fouls in NBA at what sort of situation which technical foul will be called?
Answer: There are actually 15 categories of fouls in the NBA (depending on how you count).  Given the number of possibilities, most fans/announcers tend to treat fouls that are not "routine" as technical fouls, though some of the "special" fouls are actually personal fouls (they might still result in undefended free throws).
Technical Fouls

Delay of game - any action that would keep an opposing team from starting their possession

This one is often bizarre as a player might inadvertently touch the ball after they score, but not stop and pass it to the referee.  A player may completely ignore the ball and run back on defense, but if they touch it, they have to pass it to the referee

Excessive timeouts - calling a timeout when the team has no more remaining

Hi Chris Webber!  https://www.youtube.com/watch?v=-QPB9NBUG2g

Substitution - Not checking in with the officials before entering the court

Loosely enforced

Hanging on the basket - Player cannot hang on the basket, net, etc except to avoid injury

Barely enforced

Coaches box violations - Coach must stay within the markings and not run down the court

Loosely enforced

Defensive 3-seconds - A defensive player in the lane must have been within arms reach of an offensive player in the last three seconds
5 players violation - You must have 5 players if the ball is alive

There are actually exceptions to the fouling out rule so that a team always has at least 5 eligible players.  Cavs v Lakers this year ran into these exceptions.

Conduct - unsportsmanlike conduct

The list here is a mile long, and almost completely at the referee's discretion.  An interesting case is that personal fouls committed while play is stopped can be assessed as techs

Fighting

Punching someone may or may not be a technical foul, see the personal foul below.  Also there are no free throws at all if fighting is the foul assessed by the referee.  Everyone involved gets ejected

Personal Fouls

Defensive - illegal contact by a defender

This includes the "new" clear-path-to-the-basket and away-from-the-ball fouls

Offensive - illegal contact by an offensive player
Loose ball - illegal contact when neither team has the ball
Flagrant 1 - Unnecessary contact

This one will not cause an ejection

Flagrant 2 - Unnecessary and excessive contact

This one will cause an ejection

Punching - throwing a punch

This one will cause an ejection
Answer: This is what wikipedia has on technical fouls in basketball

In basketball, a technical foul is any infraction of the rules
  penalized as a foul which does not involve physical contact during the
  course of play between opposing players on the court, or is a foul by
  a non-player. The most common technical foul is for unsportsmanlike
  conduct. Technical fouls can be assessed against players, bench
  personnel, the entire team (often called a bench technical), or even
  the crowd. These fouls, and their penalties, are more serious than a
  personal foul, but not necessarily as serious as a flagrant foul.
Comment: This is sadly, incomplete, a discussion of NBA technical fouls needs to cover normal techs, flagrant 1s and flagrant 2s.
Comment: I thought a flagrant foul was a personal foul?

Types of technical fouls in NBA


Is it possible to obtain Full Crew achievement without romancing with Triss?

Question: To make possible to gather her for the Kaer Morhen battle, I need to succeed a romance. However, if I do it and I also romance with Yennifer (I want her for my love interest) am I doomed to this threesome scenario? Or can I choose again and decide on one of them again at the castle?
Answer: I got the achievement/trophy (playing on PS4) without even starting Triss' side-quest.
Here is what you need to do:

Don't start Triss' side-quest until you get the main quests that start with Brothers in Arms.
Then all you need to do is talk to Triss and ask her to come to Kaer Morhen.
She will then say that you need to help her first before she can come along with you disregarding the romance choices you will make during her side-quest.

Provided you didn't kill Keira and did all the required quests for the others then you will get the Full Crew achievement.
Answer: If you already romanced Triss I'm pretty sure you have to choose her if you don't want the bad scenario, but I've heard there are a few ways to get her to the Fortress without romancing her; look at option 2 on this guide: http://www.ign.com/wikis/the-witcher-3-wild-hunt/Sex_and_Romance
I've also heard that you can let her go and she shows up anyways letting you get the trophy. Not sure on that though as I haven't beat the game.
Comment: I know that I must kiss her at the party
Comment: I let her go and she showed up anyway. I wasn't sure if this was a bug or a feature. I'm running 1.31 but I'm not sure if it matters.


Can Tridion be used for knowledge management or customer support portals?

Question: I just wondered if anyone has customized Tridion to manage their online customer help portal, with help articles, advanced search, dynamic FAQ lists, etc. I feel like it is unlikely, as SDL themselves are using the same knowledge management system as we do (Moxie) to support their customers. Maybe this could get more likely in v2013?
Comment: Generally the "can product X to be used for solution domain Y" question in IT can be answered with a "yes but..." so perhaps you should tell us what features you're hoping to get and what other products you are considering?
Answer: Tridion is a very generic content management system which exerts no restrictions on the type of application it can be used for. You can architect Tridion to deliver content to any type of application.
So the simple answer is yes and no.
Tridion can not be used as a customer help portal out of the box, however, if you want to build the yourself, it could be.
The decision you will have to make is, do you want to build a custom portal (factors: features, cost, time etc..) vs. buying an off the shelf product.
Tridion has very powerful APIs, so given the right off the shelf product, Tridion could still be responsible for the content management of articles, FAQs etc...
The features you have described (help articles, advanced search, dynamic FAQ lists, etc) would be relatively easy using a Tridion powered web application. It might get a bit more tricky if you want to run real support tickets.
Answer: One of the projects we've worked on in the past sounds pretty similar to what you're looking for.
The customer was using SDL Tridion for their websites / applications and was looking to rebuild their internal help site for the customer support team of this particular client.  Their support team receives a call and they then use the help site to quickly search and answer questions for the customer etc.
Functionality included : search, dynamic faqs, content taxonomies etc etc.
This made sense as we'd built a lot of content, layout and functionality for their websites that we could re use into the internal help sites, if your client is using SDL for other projects, i'd recommend there's a lot to gain from using it to build the help portal.
Comment: What about the Tridion product knowledge center. Is http://docs.sdl.com/ created in SDL Tridion 2013 CMS or is it the new CXM product Knowledge Center
Comment: it is built with Knowledge Center which is great for contextual and collaborative technical documentation, knowledge base articles and more. I would definitely recommend it for customer support portal in terms of self service and interactive documentation, and even more when your products are technical or even complex.
Comment: SDL uses Moxie to offer Knowledgebase features. This suggests to me that SDL Tridion nor CXM Knowledge Center are good for that functionality. http://help.sdl.com/support/index-tab2.html#tabs
Answer: I have worked on a Tridion implementation where it was used to provide a customer support portal. Yes, Tridion can be used for customer support portals. Tridion published content to a database and the web application used AJAX and a REST API to serve the content to a call center with about 1,000 employees.
Tridion is a Content Management System that's focused towards web content management. Software always performs best when you use it the way it is meant to be used. So, as a Knowledge Management tool, Tridion may not be great. But if you wanted it to store and publish content for a knowledge management tool, then Tridion would do very well.
Especially if the content or knowledge is shared between both internal and external users (i.e. intranet and website), Tridion would be a very powerful tool for your organization.
Answer: You can try using atlassian's confluence for knowledge management. pretty quick to setup without too many hassles. SDL tridion is very powerful and does many other things related to WCM and might be an overkill for your requirment.
Comment: My goal was to move CMS and KMS onto one platform for the good of our authors and our customers. This may not be possible/recommended given the comments I've seen here.


Reflection operator in amplitude amplification for block encoding

Question: I am trying to figure out equation (2.33) here.
Given that
\begin{gather}
U_{\psi_0}|{0^m}\rangle|{0^n}\rangle=\sqrt{p_0}|{0^m}\rangle|{\psi_0}\rangle+\sqrt{1-p_0}|{\perp}\rangle,\\
(\Pi\otimes I_n)|{\perp}\rangle=0, \quad \Pi=|{0^m}\rangle\langle{0^m}|,
\end{gather}
we call $|\psi_{\rm good}\rangle=|0^m\rangle|\psi_0\rangle$ and would like to prepare $|\psi_0\rangle$ in the second register with $O(1)$ probability. The recipe is to define
\begin{gather}
R_{\mathrm{good}}=(1-2|{0^m}\rangle\langle{0^m}|)\otimes I_n=(1-2\Pi)\otimes I_n,\\
R_{\psi_0}=U_{\psi_0}(2|{0^{m+n}}\rangle\langle{0^{m+n}}|-I)U^{\dagger}_{\psi_0}.
\end{gather}
and to "apply $G^k=(R_{\mathrm{good}}R_{\psi_0})^k$ to $|\psi_0\rangle$ for $k=O(1\sqrt{p_o})$ times." (I think that there's a typo, and we should actually apply $G^k$ to the first equation above, correct?)
What I do not understand here is why the so-defined $R_{\mathrm{good}}$ is equivalent to $(1-2|\psi_{\rm good}\rangle\langle \psi_{\rm good}|)= (1-\Pi \otimes\Pi_{\rm good})$, which is the original definition requried for the amplitude amplification. The line after (2.33) says: "This is because $|{\psi_{\mathrm{good}}}\rangle$ can be entirely identified by measuring the ancilla qubits."
So at which point in this process do we measure ancillas? It seems that measuring ancillas each time after we apply $R_{\mathrm{good}}$ would ruin the whole procedure. If we don't measure anything until the very end, then, as I said above, it's unclear why $R_{\mathrm{good}} = (1-2|\psi_{\rm good}\rangle\langle \psi_{\rm good}|)$ and how this construction reduces to amplitude amplification.
UPDATE
OK, I still don't understand what the sentence "This is because $|\psi_{\rm good}\rangle$ can be entirely identified by measuring the ancilla qubits." after (2.33) means but I just checked the following:
\begin{gather}
(1-2\Pi\otimes\Pi_{\rm good}) (\sqrt{p_0}|0^m\rangle |\psi_0\rangle + \sqrt{1-p_0}|\perp\rangle =
(1-2\Pi) (\sqrt{p_0}|0^m\rangle |\psi_0\rangle + \sqrt{1-p_0}|\perp\rangle \,,
\end{gather}
because in the first term $\Pi_{\rm good}$ acts trivially and in the second term $\Pi$ annihilates $|\perp\rangle$ anyways.
On later steps the same happens, as the only thing that's changing is the amplitudes.
So I'm assuming that no measurements of ancillas are required until the very end. Correct?
Comment: Are you still wondering about this?
Answer: This is because when you're in the subspace where the block-encoding was applied, the ancilla qubits are in the $|0\rangle$ state. So you can boost the success probability on the state $|0\rangle|\psi\rangle_{\text{good}}$, by using amplitude amplification with the Grover iterate providing a phase kickback. The reflector picks out the state in which to perform the sign flip on. It's basically a Pauli Z-gate in the $\{|\psi\rangle_\text{good}, |\perp\rangle\}$ basis.


What is the difference between Quaternions and Bicomplex Numbers?

Question: So, I know Quaternions are basically 4 dimensional Complex numbers, and the dimensions can double forever to Octonions, Sedinions, etc. I recently heard about bicomplex numbers, which are also sort of 4 dimensional complex numbers. I looked into it a bit, and I found that bicomplex numbers are a commutative version of quaternions. But I wanted to know how exactly that works. How is the multiplication defined? Also can that be extended to 8-Dimensional biquaternions, 16-D bioctonions, etc? And how are those defined exactly? I know with regular hypercomplex numbers, you lose properties as you go up in dimensions, so does the same thing happen with the bi- ones? If so does it just lose the property that it would normally lose one dimension lower? Or do they not lose properties at all? Any answers would be greatly appreciated.
Comment: Quaternions are basically 4 dimensional **real** numbers?
Comment: Well, however you want to say I guess. I was more just saying that I knew what Quaternions were, not trying to give an in-depth description. Really they are their own thing, 4-Dimensional Hypercomplex Numbers.
Answer: I'd never heard of a bicomplex number, but I like algebra, so let's go for it. From what I understand, reading Wikipedia and playing around:
We assume that, in addition to $i$, our favorite square root of $-1$, we have another, $h$, so that $h^2 = -1 = i^2$. Further, we force $i$ and $h$ to commute, so that $ih = hi$.
You can see for yourself that $(ih)^2 = 1$, since $h$ and $i$ commute. So, $ih$ is a square root of $1$. We know of some other square roots of $1$, let's see what happens when we multiply something by $ih$. At this point, we'll assume our numbers are associative (just like we assumed $h$ and $i$ commute).
$(ih)h = ih^2 = i(-1) = -i$. Thus, multiplication by $ih$ sent $h$ to $-i$. This means $ih$ can't be $1$ or $-1$, the square roots of $1$ we already know and love, since $i$ and $h$ are distinct (that is, $h \neq -i$).
It turns out the set $\{1, i, h, ih\}$ forms a basis for these numbers. Thus, a generic "bicomplex number" looks like $a + bi + ch + dih$.
But, these bicomplex numbers are certainly don't act like quaternions. For one, they form a commutative algebra; the order of multiplication never matters! But more seriously, we have zero-divisors:
$$(1 + ih)(-1 + ih) = -1 + ih - ih +(ih)^2 = -1 +ih - ih - 1 = 0.$$
This is a pretty serious departure from the quaternions.
It turns out that the biquaternions are isomorphic to the direct sum $\mathbb{C} \oplus \mathbb{C}$ of the field of complex numbers with itself (here, addition and multiplication are performed component-wise, like vector addition). This is not obvious to me, but it's believable.
Direct sums are fairly uninteresting: Just slap two copies of something together, and there you go! It explains why we have zero-divisors, and commutativity. We just do everything we normally would, but do it twice; business as usual.
The quaternions on the other hand - now that's an algebra! Associative, but not commutative; no zero divisors; we can define a norm. Generally, life with the quaternions is great.
To build the complex numbers, quaternions, or octonians from the reals, the situation is a lot more subtle; the construction is an example of a "twisted group algebra." The complex numbers, quaternions, and octonions are all examples of twisted group algebras over the real numbers. In particular, we get the quaternions by introducing a "twisted" way of multiplying elements of the group algebra $\mathbb{R}[\mathbb{Z}_2^2]$.
Unfortunately, I'm still processing all the details myself, so it's up to you to figure out exactly what "twisting" something entails. Essentially, it's like a direct sum, but with the terms interacting multiplicatively more than just "component-wise," we need some extra magic thrown in.

Sources:
John Baez' write up on octonions, where I first saw the term "twisted group algebra." Lacking on details of the construction, lots of attention to the big picture.
John Bales' write up on "Properly Twisted Group Algebras", which is way more detail than I'd hoped for, but could fill in some of the gaps.
Comment: Ok, thanks, that explains it to an extant. They are more different than I expected. Also, I'm glad my question introduced you to something new as well!
Comment: Also, you said $−1+ih−ih+(ih)^2 = −1+ih−ih−1$, when it should be $−1+ih−ih+(ih)^2 = −1+ih−ih+1$
Comment: @RothX Correct you are, and thank you! I'll hold off on changing anything at the moment -- while it is certainly an error, maybe in a day or two I'll be able to improve the post in a more significant way (although probably not :)).
Answer: Bicomplex numbers, or tessarines is a commutative algebra as other people said.
It has zero divisors. And I would say, being commutative is a lot more important than disadvantages from zero divisors!
Moreover, zero divisors are not a disadvantage at all, because it allows bicomplex numbers to generalize not only the concept of complex numbers, but also hyperbolic (split-complex) numbers. They are included in bicomplex numbers and have zero divisors.
There is nothing essentially bad regarding zero divisors: this means that we have some elements by which we cannot divide, but we anyway had one such real number: zero.
Unlike what the other answer said, of course there is norm (modulus) in bicomplex numbers.
They can be represented as real matrices of certain structure with usual matrix operations, so one can experiment with them in any computer algebra system that allows to apply analytic functions to matrices.

Images source:https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.527.356&rep=rep1&type=pdf
Comment: Despite the zero divisors, what you say about dual numbers is incorrect. There are no nonzero solutions of $z^2=0$ in the bicomplex numbers.
Comment: @J.G. but if one adds dual unity over it, the algebra remains commutative and associative.
Comment: @J.G. This paper describes tessarines and dual hyperbolic: https://www.jcscm.net/fp/126.pdf


What are the requirements for an outdoor zimun

Question: Inspired by this question about an outdoor minyan, I am curious, what are the requirements for counting Jews in an outdoor zimun? Say three Jews who otherwise would qualify in a zimun ate together outside, what are the requirements for counting them? Is it similar to a Minyan with regard to having to see and hear them?
Comment: https://www.sefaria.org/Turei_Zahav_on_Shulchan_Arukh,_Orach_Chayim.195.1
Answer: See the halachipedia article on zimmun. The important part would seem to be independent of whether you are indoors or outdoors and is:

There is only an obligation to have a zimmun if three or more people
eat together. The three conditions to be considered "together" is that
those who are eating

eat while seated,

sit at one table, and

start or end the
meal together. [14] They are considered starting together if they all
start to eat the first kezayit of bread while the others are still
eating that first kezayit.[15]


A single word for labelling someone a disbeliever in a particular religion despite them adhering to it

Question: Can anybody provide a single word for labelling someone a disbeliever in a particular religion despite them adhering to that religion?
Comment: This question needs to be clarified - in present form it is ambiguous and self-contradicting (most answers present very different answers that are correct depending on how the question is interpreted).
Comment: please try to make yourself a little clearer. Do you mean someone who is an adherent of that religion, but doesn't seem to be so?
Comment: @Thurs: I think the OP means a person is born into a certain religion, but does not actively practise or believe in it.
Comment: @JoseK, that would be 'born [religion]' and might not be what OP wants. Mahjoob, you should specify (or give examples) of what kind of adhering is practiced - if the complete adhering is practiced then the person is a firm believer; if only some adhering occurs then it is important what type...
Comment: @Unreason: Exactly, I thought of heretic & unbeliever but not sure what mahjoob intends.
Comment: The question is ambiguous. Is it someone who practices openly but is a nonbeliever in private? Or is it someone who has been forced to practice a religion?
Comment: Also "infidel", but as @Unreason and others have already said, needs clarification.
Comment: **apostate** ...
Answer: If I understand the question correctly I would use the word "nominal" e.g. a nominal christian. From http://dictionary.reference.com/browse/nominal
1.being such in name only
Answer: I think the best word would be heretic. A heretic claims to be a believer, but either professes ideas contrary to the official religious doctrine or rejects ideas included in that doctrine.
During the Reformation (and in some contemporary circles, for that matter) a Catholic would have called a Protestant a 'heretic', though the Protestant would have called him/herself a Christian.
The judgment is ultimately subjective.
Comment: I think a heretic is sincere, in that they openly profess, act, and believe consistently, just that it is different from what everybody else does (and everybody else is intolerant of that difference).
Comment: I don't at all disagree, Mitch. I interpreted the question to be asking after just such a person - someone who adheres to a religion but is, in actuality (from the speaker's perspective, at least), not a "true believer". I don't think the question is entirely clear when it comes to the person's sincerity ("adhere" is rather vague), so I can see why words like hypocrite were suggested, too.
Comment: Oh, I see now. Really much more ambiguous a question than I thought..every part depends on a possibly different point of view, who is doing the adhering, who is the judge of true believer, what each individual believes or not.
Comment: I see why you said this but I think the better word would be "apostate".
Answer: Though hypocrite is the probable expected one-word answer, there is another concept which fits the description. Throughout history there have been many instances where an invading or ruling class forces a group of people to convert to the main religion (at least in the west this has occurred in many directions among Christians, Jews, and Muslims). In English such a  person is called a:

forced convert

Many convert altogether, but some, despite outwardly keeping the converted practices, maintain hidden privately the religious practices and beliefs of preconversion religion (and this can be for generations).
There are a number of specific terms for a Jew who was forced to convert but maintained practices and/or beliefs in private (and descendants who maintain them too). The accepted term in English is the borrowing from Hebrew:

anusim

which means 'coerced'.
Answer: I think the normal word is 'hypocrite'.
Comment: Hyprocrite is usually the reverse, someone who doesn't adhere to a religion despite at least professing to believe (and possibly actually believing).
Comment: @David: it depends on what is meant by 'adhere'. I take it to mean 'outwardly practices'., and actual beliefs are hidden.
Answer: I don't know about other belief systems, but Christians commonly refer to this as in name -- as in somebody is a Christian in name if they label themselves as Christians but don't actually believe in its tenants or live by them. It is also common to use expressions like cultural Christian for those who let themselves wear the label but don't actually know or believe in the teachings.
In spite of the dictionary definition being so similar, the term nominal tends to have a different shade of meaning than saying in name. A nominal Christian, for example, would imply a shade stronger adherence to the beliefs, but would be somebody who doesn't take them very seriously.
If the disbelief you mention is more active than passive, you could call them doubters or dissenters. It's possible to belief something and yet doubt aspects of it, in which case it's acceptable to be labeled like this. However at some point, if the doubting or dissenting becomes the defining feature, stronger descriptors such as hypocrite start becoming appropriate. Somebody who actively disbelieves rather than just questions and yet still labels themselves as Christian eventually stops having the right to use that label at all. If you keep down this path of holding dissenting views and yet claiming those views belong to the whole, eventually you become a heretic. Note that it's somebody who does not claim that their beliefs are Christian at all can't be labeled as a heretic. Heretical teachings give false doctrines under a wrong label.
Answer: Is it possible to adhere to a religion and not believe it? Usually belief is one of the requirements of most religions.
Anyway:
I'm a Christian and when my Christian friends don't go to church I say they're a "heathen" or a "backslider"
Or for add emphasis you could say a "heathen backslider"
You could also say "non-practicing" as in "I'm a non-practicing Catholic"
Comment: Generally "non-practicing" refers to the opposite: someone who believes but doesn't attend church/worship/rituals.
Comment: "Usually belief is one of the requirements of most religions." Most modern Western religions, anyway. This doesn't apply to most forms of modern Paganism, where practice, not belief, is what matters.
Answer: Wikipedia's article on atheism and religion lists a term Humanistic Judaism where

It defines Judaism as the cultural and historical experience of the Jewish people and encourages humanistic and secular Jews to celebrate their Jewish identity by participating in Jewish holidays and life cycle events (such as weddings and bar and bat mitzvah) with inspirational ceremonies that draw upon but go beyond traditional literature.

It would fit a specific type of disbeliever - so it might be completely inappropriate. Also, it seems to be a common term only for Judaism.
You should define what kind of adhering and for what purpose is going on for the term you seek.
Answer: Such a person would have been called "sanctimonious":

making a hypocritical show of religious devotion, piety, righteousness.

Putting that into noun form, he could be:

A sanctimonious fraud,
  Pretender,
Religionist
  A religious hypocrite,
Answer: Try agnostic. Or perhaps agnostic theist.
EDIT: Unfaithful seems to work.
Answer: Excommunication.
'The early Catholics excommunicated the Protestants.'
Comment: Besides having the wrong meaning (no matter how you interpret the admittedly rather vague question), *excommunication* is entirely the wrong part of speech.
Comment: excommunication implies that the religion's authority (forcibly) excluding certain people from practicing the religion, I don't think that's the intended meaning.
Comment: @Marthaª I think Mahjoob is looking for a noun that reflects the process of labelling someone as a disbeliver not the actual label itself.


Updating a client's EE installation from 2.3.1 to 2.9

Question: I have a client whose site was basically abandoned by the previous developer. I've managed to get ownership of the license transferred and was in the process of updating EE from 2.3.1 to 2.9.0.  I followed the instructions to the letter and then logged into the control panel. The only difference was an alert that index.php had changed. Nothing else.  How do I activate the update wizard? Is there something missing in the instructions?
Answer: Assuming you mean the instructions in the EE documentation then you need to ensure that the installer directory is within the system directory. Also ensure that the system directory hasn't been renamed.
The most important thing Back up your database and files before starting. It is very common for the update process to run into problems when going from a version as old as 2.3.1
You will also find that you may be better off going to 2.8 rather than 2.9. The latest version introduces some changes to the way conditionals work and if your site is complex it might be bit of a job to 'fix' any conditional logic in your templates.
Comment: Copy the whole thing to a local server first and get it up and running (you can use a add-on like Reelocate to change the path and url settings site-wide)! Then do a test run of the update process first in this developing environment before updating the live production website!


ArcGIS Python - Convert feature class names to lower case

Question: Can anybody anyone point me to directions on how to convert file geodatabase feature class names to lower case by using Python?
Comment: So you'd like the geodatabases themselves renamed? (As opposed to just getting a list of them in lower case.)
Comment: I'd like to rename the actual feature classes inside the geodatabase. So for example a polygon called "awesome_DOG_PARK" would be renamed to "awesome_dog_park"
Comment: Right, of course -- I read that and then typed something else. Sorry.
Answer: Using a combination of string manipulation and renaming the feature classes using arcpy.Rename_management works, sort of.
There's an odd problem with doing this directly. Since your output and input names are technically the same in ArcMap's opinion (this is apparently one of its operations that's case insensitive), it will complain if you just convert them directly.
fcList = arcpy.ListFeatureClasses()
for fcName in fcList:
    fcLCName = fcName.lower()
    arcpy.Rename_management(fcName, fcLCName, 'FeatureClass')

However, you can work around this by renaming to a dummy variable first, and then converting that to the actual lowercase name...
    arcpy.Rename_management(fcName, 'TEMPNAME', 'FeatureClass')
    arcpy.Rename_management('TEMPNAME', fcLCName, 'FeatureClass')

Comment: I have done this except just add something like "_temp" to the end of the existing name for the first step.  That way if there is an error you can still locate the proper feature class later with out wondering what it was called, especially if you are renaming a bunch of layers in batch.
Comment: Note that this method *will* overwrite the original feature class name; if you're worried about this for any reason, then Jason's answer is a better choice :)
Comment: Thanks Erica! That is just what I was looking for. I got stuck on the case insesitive problem.
Answer: You could do this by copying each featureclass with a new name, though this could take some time if there are many or if they are large datasets. This may not be the most elegant solution, but it should work:
import arcpy,os
arcpy.env.workspace = r'c:\geodatabase.gdb'
arcpy.CreateFileGDB_management(r'c:','geodatabase_lowercase.gdb')
for fc in arcpy.ListFeatureClasses('*'): arcpy.CopyFeatures_management(fc,os.path.join(r'c:\geodatabase_lowercase.gdb',fc.lower()))


Logo on Facebook looks blurry?

Question: I have a confusing issue, I delivered the logo to the client with the standard sizes for social media applications (link to the page I took sizes from https://globalspex.com/logo-dimensions/ ), but he came back and told me that FB size which is 200px*200px looks blurry. I tried it myself and it looked blurry too. Now my question is: are those sizes in this link(In other links too all over the internet) wrong, or there is something that I don't understand?. And if they are correct then why the logo looks blurry? (it looks blurry on all social media sizes). should I only deliver 5000px*5000px version instead of these sizes? (because I tried it and it's very good on all social media apps).
Answer: There is no such thing as "standard sizes" for social media applications. Each application has its own sizes.

Please google the sizes and look for each answer each social media has.

https://www.facebook.com/help/125379114252045

Another simple thing to do is, go to Facebook and take a measure of the images.

I would trust more this second option. The images it seems are not resampled to 170 px as the facebook page says. They seem to be at 180 px.
But as all on the internet. You can not control it. So make your logo as everyone else and focus on more important things.
Answer: You didn't mention the file formate here. Why not check with the PNG. In my experience, I've used several sizes 200, 300, 500, 180 and so many, no matter how big the source file.  Also, You did not mention anything about the tool used to create a profile image. If you use Photoshop then Select the Color Profile sRGB
Comment: I used adobe illustrator to create my logo, and what do you mean by( Why not check with the PNG. In my experience, I've used several sizes 200, 300, 500, 180 and so many, no matter how big the source file) ? @clippingpath

Logo on Facebook looks blurry?


Doing a Flash-style webcam site in Java

Question: Would the following be possible in Java?

Client A goes to a site and sends a live video stream from a webcam.
Client B visits the same site and sees the video stream.
Answer: It's definitely possible, but admittedly probably less pleasant than Flash. Check out JMF to capture the video; once you have it, you can just send it over a socket or something.

Doing a Flash-style webcam site in Java


Do the optical power and energy of LED vary with distance?

Question: I have an application with LED and It requires a bigger beam .
I could obtain a bigger beam by incresing the distance between LED and surface. But îs there the possibility to decrease the energy delivered ??? Photo attached.
Comment: The energy is absorbed by the medium (air I guess?)
Comment: Yes, but it îs about 30 mm. Could the energy loss be more than ..5% ??
Comment: I think you will need to quantify the nature of the particulates in the air if you are worried about energy being absorbed that way. Also, be sure you aren't saying "energy" when you really mean luminance, luminous intensity, or something else.
Comment: Yes, it îs about only energy [Joule] and optical power [W].
Comment: Is the energy you are talking about energy per unit of surface area (intensity)? Or just energy summed over a much larger surface area?
Answer: Assuming that you're shining the LED beam through some non-dispersive, non-absorbtive medium (clean air or vacuum, etc.) then the total energy impinging on the surface won't change.
This is basic physics -- the light energy coming out of the LED continues being light, unless it smacks into something that absorbs it, and it goes in a straight line, unless it smacks into something that disperses it.
Comment: Or if it goes too close to a black hole. But then one could argue that the definition of "straight" changes near black holes. Relativity is fun.
Comment: If the curvature of space-time is significant enough to have an effect over 30mm, you may have bigger problems to worry about than all your light hitting the target.  I could edit my question "Assuming that you're *on Earth* and ..."
Comment: Sometimes I just feel like being pedantic when it has slightly amusing results. I should probably try to do that less.
Comment: I was enjoying the thought of that poor LED getting crushed in a black hole, though.
Comment: May as well include [boson flocking (bunching) effects](https://www.nii.ac.jp/qis/first-quantum/forStudents/lecture/pdf/noise/chapter2.pdf) since bosons can all have the same state (unlike fermions.) Plus the impact observed in [Measurement of quantum back action in the audio band at room temperature](https://doi.org/10.1038/s41586-019-1051-4). And while we are at it, [Experimental rejection of observer-independence in the quantum world](https://arxiv.org/abs/1902.05080).
Answer: Ignoring the effects of contamination in the medium between the emitter and the receptor, the energy received when the receptor is up-close to the emitter will be the same as the energy received when the receptor is at a greater distance. This of course assumes that the receptor has a big enough surface area to receive the "spread-out" light.
What goes down is the received energy per square metre (as the distance is increased) but, nevertheless, the same total energy will hit the receptor because as the energy per metre thins-out, it illuminates a bigger surface area hence, energy is the same.


Can we access the Microphone driver of my android phone

Question: Can we access the Microphone driver of my android phone using Android NDK if so then how can I?
Can I set the driver disabled for some time?
Can I detect application name of my phone which is using my phone microphone?
As per Android Multimedia framework the MediaServer is responsible for opening the device and the Java based audio applications connect it as a client. The data transfer happens on the Binder. May because of this there is only one process seen which opens the audio device. Now I want to know how to get information from MediaServer? Anyone knows this or any other idea to find which application is using my phone microphone,i can't use the root permission.
Comment: http://stackoverflow.com/questions/6874881/how-does-setmicrophonemute-work
Answer: No, you cannot. :-)
(even using NDK)
Specific hacks might exist for certain devices.
But they would definitely interfere with the proper operation of Android framework.


Old Testament verses about faith in the promised Messiah

Question: I am looking for Old Testament verses about faith in the promised Messiah.  It would help to have Old Testament scripture to show continuity with New Testament scripture concerning the promise of the Messiah.
Comment: Welcome to Christianity Stack Exchange.  Please take our Tour to understand what we look for in well researched questions and answers: https://christianity.stackexchange.com/tour
Comment: There are multiple quotes available online, for example at [Grace Theological Seminary](https://seminary.grace.edu/old-testament-prophecies-about-the-coming-of-the-messiah/) and at [Wikipedia - Old Testament Messianic Prophecies](https://en.wikipedia.org/wiki/Old_Testament_messianic_prophecies_quoted_in_the_New_Testament).
Answer: The word "Messiah" for a specific future individual appears only in very few passages of the OT.
Psalm 2.2 - "his Anointed" can equally be translated "his Messiah".  The whole of Psalm 2 then becomes plainly a Psalm indicating this Messiah will also be the Son of God (7, 12), who will bring salvation to the nations (v8).
Isaiah 45:1 "his anointed", a Messiah,refers here to the Persian King Cyrus, who will "save" the Jews from captivity in Babylonia, and allow them to return to Judaea and rebuild the temple in Jerusalem. Isaiah prophesied the decree of Cyrus about 150 years beforehand.
Daniel 9:25 and 26 refer to the coming Messiah, and are fulfilled in Jesus Christ. This "Messiah shall be cut off but not for himself".. he will not die for his own sins but for the sins of others. (The accuracy of the timing of the 70 weeks (v24) is astonishing.. see other questions in stack exchange Christianity and Hermeneutics.)
Other passages talk of anointed ones, but they refer to men being anointed to be king or anointed to be a priest.  The anointing in each case symbolises they are God's choice, the one chosen for that position/task.
The first promise of a Saviour is in Genesis 3:15. See also Psalm 22:16, Isaiah 53, isaiah 28:16, 49:6; job 19:25-27; Psalm 118:22-23.
Answer: Job, Abraham and Moses all had faith in God's promise of a future Messiah.  Although their understanding of who this Messiah would be was not known to them, they acted in faith, trusting God's promises.

I know that my Redeemer lives, and that in the end he will stand upon the earth (Job 19:25).

Moses abandoned the power, privilege and wealth of Pharaoh's house to stand alongside God's chosen people through whom the Messiah would be born:

He regarded disgrace for the sake of Christ [the Greek name for the Hebrew name Messiah] as of greater value than the treasures of Egypt, because he was looking ahead to his reward (Hebrews 11:26).

This Messiah was revealed to the prophet Isaiah 700 years in advance of the birth of Jesus, the Christ:

Therefore the Lord himself will give you a sign: the virgin will be with child and will give birth to a son, and will call him Immanuel [which means God with us] (Isaiah 7:14).

This prophecy given to Isaiah is quoted in Matthew 1:22-23 as a fulfilment of Isaiah 7:14.

For unto us a child is born, to us a son is given, and the government will be on his shoulders.  And he will be called Wonderful Counsellor, Mighty God, Everlasting Father, Prince of Peace (Isaiah 9:6).

The Old Testament prophets acted in faith based on God's promises.  Many of them are listed in Hebrews chapter 11.  They were all living by faith when they died, confident in God's promises:

These were all commended for their faith, yet none of them received what had been promised (Hebrews 11:39).

This article gives a useful summary of Old Testament prophesies about the future Messiah.