text:
Q: Is there a way to mimic classes in Applescript? I'm currently trying to make a new "class" in Applescript. I know that, without making an application, it is technically impossible.
But I tried to mimic it with an embedded script:
script specialText
    property value : ""
    on flip()
        return reverse of (characters of my value) as string
    end flip
end script

set x to specialText

set value of x to "Hello World"

x's flip()

This works great and returns "dlroW olleH" as expected, however:
script specialText
    property value : ""
    on flip()
        return reverse of (characters of my value) as string
    end flip
end script

set x to specialText

set value of x to "Hello World"

x's flip() = specialText's flip()

This returns true.
So my question now is, can I do something like this without making the new variable a reference to the original?

A: Close. AS doesn't have classes, but you can create new instances of a script object just by executing the script block statement.
Wrap it in a handler like this:
to makeSpecialText()
    script specialText
        property value : ""
        on flip()
            return reverse of (characters of my value) as string
        end flip
    end script
    return specialText
end makeSpecialText

Create new instances by calling the handler, e.g.:
set x to makeSpecialText()
set y to makeSpecialText()
set z to makeSpecialText()

You now have three independent instances of the script object bound to x, y, and z, each with its own state.
Apress' Learn AppleScript, 3rd edition (which I lead-authored) has a chapter on script objects covering libraries (semi-obsolete now as AS finally got native library support in macOS 10.10) and object-oriented programming (reasonably thorough given the length limitations of a 1000-page book).

A: Warning: This solution is very memory intensive and is not recommended for doing this! Foo's answer (the accepted one) will most likely fit your needs better.

Another way to do it would be to use the copy statement:
script specialText
    property value : ""
    on flip()
        return reverse of (characters of my value) as string
    end flip
end script

copy specialText to x

set value of x to "Hello World"

log x's flip() = specialText's flip()
log specialText's flip()

(*false*)
(**)

Note that the syntax of the copy command is not like the set-command. So it is not copy newVariable to oldVariable but rather copy oldVariable to newVariable.


text:
Q: Is it possible to call Batch from a future call? I was wondering if it is possible to call a batch from a @future method? The reason I am asking as you may have guessed is because I am trying to call batches from a trigger. Eg: Leads are inserted then call batch after insert trigger on Leads.
I know it is possible to call Database.executeBatch, however there is a limitation to the number of batches you can send. With current FlexQueue implementation you can invoke up to 100 batch calls per a transaction.
But my question is what if I need to send more than that per a transaction?
I was thinking of calling a @future method and in that method I call the batch, but I get this error:

System.AsyncException: Database.executeBatch cannot be called from a
  batch start, batch execute, or future method.

Pseudocode:
trigger leadTrigger on Lead(after insert) {
    //some code
    TriggerHelper.callTheBatch();
}

public without sharing class TriggerHelper {
    @future
    public static void callTheBatch() {
        MyBatchClass myBatchClass1 = new MyBatchClass();
        Id batchId = database.executebatch(myBatchClass1, 50);
    }
}

Any suggestion or idea?

A: There's a number of ways to exceed 100 callouts per transaction using asynchronous code, but trying to call a batch from a future method doesn't even make sense, given all the sanctioned ways we've been given to do so. Here's a few things you could do:
Use @future methods
Break up your lists into batches of about 50 or so, and every 50 callouts just call your future method. You need to use callout=true to allow callouts, like this:
@future(callout=true) public static void doCallouts(Id[] recordIds) {
    ...
}

Use Queueable classes
Break up your lists into batches of about 50 or so, and every 50 callouts just call a Queueable. It'd look like this:
System.enqueueJob(new CalloutQueueable(Id[] recordIds));

Use Batchable classes... Responsibly
Dan Appleman made mention of using a retryable mechanism, and I've built one personally. The general idea is that you create a custom object that stores details about each callout you want to perform asynchronously. Then, you set up a scheduler that runs hourly, checks to see if any new integrations need to be processed, and if so, kicks off the batchable process. You can adjust the scheduler to be as frequent as you'd like, but by allowing a bit of pooling of the requests before trying to process them results in more efficient use of system resources. Other systems may not be able to handle this type of batching though, so smaller/more frequent batches may be required.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Unable to run 'composer.phar update' on the server I am trying to run Symfony application in the production server. I have uploaded my web files to public_html  folder. I have installed Composer in my project resource using composer.phar install. Now I am trying to update Composer on the server I am getting this message/error

php composer.phar update
  Loading composer repositories with package information
  Updating dependencies (including require-dev)
  Your requirements could not be resolved to an installable set of packages.
Problem 1
    - Conclusion: remove symfony/symfony v2.5.12
    - Conclusion: don't install symfony/symfony v2.5.12
    - Conclusion: don't install symfony/symfony v2.5.11
    - Conclusion: don't install symfony/symfony v2.5.10
    - Conclusion: don't install symfony/symfony v2.5.9
    - Conclusion: don't install symfony/symfony v2.5.8
    - Conclusion: don't install symfony/symfony v2.5.7
    - Conclusion: don't install symfony/symfony v2.5.6
    - Conclusion: don't install symfony/symfony v2.5.5
    - Conclusion: don't install symfony/symfony v2.5.4
    - Conclusion: don't install symfony/symfony v2.5.3
    - Conclusion: don't install symfony/symfony v2.5.2
    - Conclusion: don't install symfony/symfony v2.5.1
    - friendsofsymfony/rest-bundle 2.1.0 requires symfony/finder ^2.7|^3.0 -> satisfiable by symfony/finder[v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4].
    - friendsofsymfony/rest-bundle 2.1.1 requires symfony/debug ^2.7|^3.0 -> satisfiable by symfony/debug[v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.17, v2.7.18, v2.7.19, v2.7.2, v2.7.20, v2.7.21, v2.7.22, v2.7.23, v2.7.24, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.10, v2.8.11, v2.8.12, v2.8.13, v2.8.14, v2.8.15, v2.8.16, v2.8.17, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.8.6, v2.8.7, v2.8.8, v2.8.9, v3.0.0, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.1, v3.2.2, v3.2.3, v3.2.4].
    - symfony/debug v2.7.10 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.11 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.12 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.13 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.14 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.15 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.16 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.17 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.18 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.19 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.2 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.20 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.21 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.22 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.23 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.24 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.3 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.4 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.5 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.6 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.7 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.8 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.9 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.0 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.1 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.10 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.11 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.12 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.13 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.14 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.15 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.16 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.17 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.2 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.3 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.4 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.5 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.6 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.7 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.8 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.8.9 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.0 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.1 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.2 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.3 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.4 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.5 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.6 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.7 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.8 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.0.9 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.0 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.1 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.10 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.2 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.3 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.4 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.5 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.6 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.7 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.8 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.1.9 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.2.0 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.2.1 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.2.2 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.2.3 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v3.2.4 conflicts with symfony/symfony[v2.5.0].
    - don't install symfony/finder v2.7.0|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.1|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.10|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.11|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.12|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.13|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.14|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.15|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.16|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.17|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.18|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.19|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.2|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.20|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.21|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.22|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.23|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.24|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.3|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.4|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.5|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.6|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.7|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.8|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.7.9|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.0|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.1|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.10|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.11|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.12|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.13|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.14|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.15|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.16|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.17|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.2|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.3|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.4|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.5|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.6|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.7|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.8|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v2.8.9|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.0|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.1|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.2|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.3|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.4|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.5|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.6|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.7|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.8|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.0.9|don't install symfony/symfony v2.5.0
    - symfony/debug v2.7.0 conflicts with symfony/symfony[v2.5.0].
    - symfony/debug v2.7.1 conflicts with symfony/symfony[v2.5.0].
    - don't install symfony/finder v3.1.0|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.1|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.10|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.2|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.3|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.4|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.5|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.6|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.7|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.8|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.1.9|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.2.0|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.2.1|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.2.2|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.2.3|don't install symfony/symfony v2.5.0
    - don't install symfony/finder v3.2.4|don't install symfony/symfony v2.5.0
    - Installation request for symfony/symfony 2.5.* -> satisfiable by symfony/symfony[v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9].
    - Installation request for friendsofsymfony/rest-bundle ^2.1 -> satisfiable by friendsofsymfony/rest-bundle[2.1.0, 2.1.1].

please what could be wrong and how can this issue be tackled as this is weird to me. Kindly assist

A:
I have installed Composer in my project resource using composer.phar install.

First of all composer.phar install doesn't install Composer! It installs your dependencies. See Installing Dependencies
Second: Never run composer update in a production environment (on server). Always use composer install to install dependencies in a production environment. See Never run 'composer update' in production why?


text:
Q: A question on Arithmetic Progressions is given in the picture below.. What is the sum of an arithmetic progression whose first term is $a$, the second term is $b$, and the last term is $c$?
A. $\dfrac{(b+c-2a)(a+c)}{2(b-a)}$
B. $\dfrac{(b+c+a)(a+c)}{2b-a}$
C. $\dfrac{2(a+c)(b-c+2a)}{b+a}$
D. $\dfrac{(b+c-2a)(a-c)}{b+a}$

A:
The answer I got after solving from steps and guided by @lab bhattacharjee

A: HINT:
So, the common difference is $b-a$
If the $c$ is the $n$ the term $c=a+(n-1)(b-a),$ find $n$ in terms of $a,b,c$
Now, use the formula of summation of an Arithmetic Series

A: Hint: In the exceptional case where $a=b=c\ne 0$, it is impossible to determine the number of summands, so the correct formula must fail. The only expression that indeed fails in this way is the first.


text:
Q: Can I calculate the standard deviation of averages from the population in groups knowing the standard deviation? From a sample population lets say 1000 numbers, I know the standard deviation SD.
I take the size of the groups n=100 and fill the groups randomly with those 1000 numbers.
I find out the average of those groups: a0,a1,…,a10
I want to find out (or approximate) a new standard deviation taking now as a sample the averages of those groups of 100 numbers: a0,a1,…,a10
The data I know at the start is the standard deviation of the whole population of 1000 numbers, and the size 100 of those groups. I need to find out the new standard deviation of the sample a0,a1,…,a10 without knowing ai values
I have tried dividing the standard deviation of the full population by sqrt(n) and I get close, is there a more precises way?

A: I think you are doing it correctly by dividing the sample standard deviation by $\sqrt{n}$, however, there is a reason why the number is not exactly what you expect.
As  the Central Limit Theorem says, if you have a population, independently of its distribution (so, not necessarily normal), the average of a sample will be distributed as a normal distribution. That means that if you sample an infinite number of 100 groups and compute the mean of each sample, these mean values will follow a normal distribution. The standard deviation of the mean estimate (that is, the standard error) will be indeed the average divided by $\sqrt{n}$.
However, if you don't get closer to the expected number, it may be a sampling issue. In that case, your means (and standard deviations) are almost normal, but not quite, and its computation is subject to error. This is precisely what Student's t-distribution models, so that's a way of narrow down your estimates with confidence intervals. Or, increase the number of samples.


text:
Q: Show that the Radon-Nikodym density is $\mathcal{G}$ measurable iff $E_P[X|G] = E_Q[X|G]$ Let $\alpha$ and $\beta$ be equivalent probability measures on $(\Omega, \mathcal{F})$, with Radon-Nikodym density of $\alpha$ wrt $\beta$ is $\eta$, i.e., for all $A \in \mathcal{F}, \beta(A)  = \int_A\eta d\alpha$. Let $\mathcal{G}$ be a sub-$\sigma$-field of $\mathcal{F}$.
Show that $\eta$ is $\mathcal{G}$-measurable $\iff$ for any bounded random variable $X$, $E_{\alpha}[X|\mathcal{G}] = E_{\beta}[X|\mathcal{G}]$
I think I have the forward direction:
Let $\eta$ be $\mathcal{G}$ measurable. Using the General Baye's theorem:
$$E_{\beta}[X|\mathcal{G}] = \frac{E_{\alpha}[\eta X|\mathcal{G}]}{E_{\alpha}[\eta|\mathcal{G}]}$$
However, $\eta$ is $\mathcal{G}$ measurable, so we have $E_{\alpha}[\eta X|\mathcal{G}] = \eta E_{\alpha}[X|\mathcal{G}]$ and $E_{\alpha}[\eta|\mathcal{G}] = \eta$, so
$$E_{\beta}[X|\mathcal{G}] = \frac{E_{\alpha}[\eta X|\mathcal{G}]}{E_{\alpha}[\eta|\mathcal{G}]}$$
$$ = \frac{\eta E_{\alpha}[X|\mathcal{G}]}{\eta} = E_{\alpha}[X|\mathcal{G}]$$
I am just confused about the backward direction, I can't seem to get it. Also, I'm not sure I've done the forward direction in the best way. Thanks!

A: You didn't apply Bayes formula correctly; it should read
$$\mathbb{E}_{\color{red}{\beta}}(X \mid \mathcal{G}) = \frac{\mathbb{E}_{\color{red}{\alpha}}(\eta X \mid \mathcal{G})}{\mathbb{E}_{\color{red}{\alpha}}(\eta \mid \mathcal{G})}. \tag{1}$$
If you switch the roles of $\alpha$ and $\beta$ in your reasoning, then everything will work fine.
Regarding the backward direction:

*

*Use Bayes formula $(1)$ and the tower property to show that $$\mathbb{E}_{\alpha} \bigg[X \cdot \mathbb{E}(\eta \mid \mathcal{G})  \mid \mathcal{G} \bigg] = \mathbb{E}_{\alpha}(\eta X \mid \mathcal{G})$$ and so $$\mathbb{E}_{\alpha} \bigg[ X \cdot \big(\mathbb{E}(\eta \mid \mathcal{G})-\eta\big) \mid \mathcal{G} \bigg] = 0. \tag{2}$$

*By the definition of the conditional expectation, $(2)$ means that $$\int_G X \cdot \big(\mathbb{E}(\eta \mid \mathcal{G})-\eta\big) \, d\alpha = 0$$ for any $G \in \mathcal{G}$.

*Set $X = \text{sgn}(\mathbb{E}(\eta \mid \mathcal{G})-\eta)$ to conclude that $$\int |\mathbb{E}(\eta \mid \mathcal{G})- \eta| \, d\alpha =0.$$


text:
Q: Show that $G = \{x \in \mathbb{R}: 0 < x < 1\}$ is open.
As i am reading up on introduction to point set topology, i saw this
  example but they did not provide full details. Please help me take a
  look and see if it is correct! Thanks!

We have to make a good gauge and we pick epsilon $\epsilon$ to be either $x$ or $1-x$, whichever is smaller. This means $\epsilon \leq 0.5$.
Now we need to show that $(x-\epsilon,x+\epsilon)$ is a subset of $G$. Essentially this means that we show for any $u \in (x-\epsilon,x+\epsilon)$, then $u \in G$.
WLOG, we pick $\epsilon = x$, as the other case will be the same.
Now since we know $|u-x| < \epsilon$, we thus have $$|u-x| < \epsilon \Rightarrow -\epsilon < u -x < \epsilon \Rightarrow  0 < u < 2x \leq 1$$
Alternatively, we know from the beginning that $x-\epsilon < u < x+\epsilon $ and we can work from here as well.
This completes the proof as we have shown $u$ is indeed in $G$ for all $u$.

A: Your argument is valid. You didn't need the WLOG though; what you wanted to prove was that $u$ is in $(0,1)$. You know that $|u-x|<\epsilon$ therefore, $-\epsilon<u-x<\epsilon$. Adding $x$ yields $$x-\epsilon<u<x+\epsilon\quad (*)$$. Now, $\epsilon=\min\{x,1-x\}$ means that $x+\epsilon\leq x+1-x=1$ and $x-\epsilon\geq x-x=0$. Replacing this to $*$ brings you to
$$0<u<1$$
as desired.

A: Well you can circumvent all of this if you know that the order topology $\mathcal{T}$ on $\mathbb{R}$ has basis $\mathcal{B} = \{(a,b) \ | \ a, b \in \mathbb{R}\}$.
And it it a well-known (and easy to prove) theorem that the order topology on $\mathbb{R}$ and the metric topology (which is the topology you are using) on $\mathbb{R}$ are equivalent.
Therefore any open interval of the form $(a, b)$ is open in $\mathbb{R}$ endowed with either the order or metric topology. Hence $G = \{x \in \mathbb{R} | 0 < x< 1\}$ is open in $\mathbb{R}$ with either of these topologies.

Sidenote: If you're working with $\mathbb{R}$ or any arbitrary set $X$, please mention the topology endowed on the set $X$, after all a topological space is an ordered pair $(X, \mathcal{K})$ where $\mathcal{K}$ is the topology on $X$. The reason I mention this is that $G$ is not universally open in every topology endowed on $\mathbb{R}$, for example $G$ is neither open nor closed in the trivial topology on $\mathbb{R}$, which is given by $T' = \{\mathbb{R}, \emptyset\}$

A: G is the open ball with radius 1/2 centered at 1/2.


text:
Q: Slick print list of tables I want to print a list of tables from the database I connect to via JDBC but cannot figure out how to do this.  I have tried using MTable.getTables and defaultTables, thanks
import slick.driver.H2Driver.api._
import scala.concurrent._
import com.typesafe.config.{ ConfigFactory, Config }

object SlickTest {

  def main(args: Array[String]): Unit = {

    """
      |mydb = {
      |  driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
      |  slickDriver = com.typesafe.slick.driver.ms.SQLServerDriver
      |  url="jdbc:sqlserver://#############"
      |  properties = {
      |    databaseName = "######"
      |    user = "#######"
      |    password = "########"
      |  }
      |  numThreads = 10
      |}
    """.stripMargin

    val db = Database.forConfig("mydb")

    ???

  }

}

A: There are quite a few different ways of doing this, but following the layout of the code you had in your question, this works for Slick 3.1 (and using freeslick profiles, because I don't have the slick extensions SQLServer lib).
import com.typesafe.config.ConfigFactory
import slick.backend.DatabaseConfig
import slick.driver.JdbcProfile
import scala.concurrent.duration.Duration
import scala.concurrent.{Await, ExecutionContext}

object SlickTest {

  def main(args: Array[String]): Unit = {
    val config = """
    |mydb = {
    |
    |  driver = "freeslick.MSJDBCSQLServerProfile$"
    |  db {
    |    driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
    |    url="jdbc:sqlserver://localhost:2008"
    |    properties = {
    |      databaseName = "freeslicktest"
    |      user = "sa"
    |      password = "FreeSlick"
    |    }
    |  }
    |}
    """.stripMargin
    val dbConfig = DatabaseConfig.forConfig[JdbcProfile]("mydb", ConfigFactory.parseString(config))
    import ExecutionContext.Implicits.global
    Await.result(dbConfig.db.run(dbConfig.driver.defaultTables), Duration.Inf).foreach(println)
  }
}

produces this result for a database with one table called USERS in it.
*** (c.z.hikari.HikariDataSource) HikariCP pool mydb.db is starting.
MTable(MQName(freeslicktest.dbo.USERS),TABLE,null,None,None,None)

Process finished with exit code 0


text:
Q: Main Executable runs Launcher Executable and then Launcher runs Main Executable I have two .exe programs, one is the game launcher and the other is the main executable.  How would i go about making my main executable run the game launcher if someone goes to open it.  It would be something to do with the .dpr file and some Windows API's i am guessing just not sure what/where to start to be honest.
Reason i want it like this is simply because, the game launcher will be used to update the game and then when complete start the game thus people will always be using the latest up2date files.
So the functionality i would like too require is:
I can click on Main Executable or Launcher Executable both will open Launcher Executable and then when updates / downloads are complete Launcher will start Main Executable when the user has clicked Start button.
/Thanks

A: Have the main executables startup code look for a command-line parameter of your choosing. You can use the RTL's FindCmdLineSwitch() function for that purpose. If the parameter exists, run the game normally.  Otherwise, use the Win32 CreateProcess() function to run the launcher executable and then exit itself.  When the launcher is ready, it can use the CreateProcess() function to run the main executable, passing it the command line parameter to run the game.
For example:
Main.dpr:
Var
  SI: TStrartupInfo;
  PI: TProcessInformation;
Begin
  If not FindCmdLineSwitch('RunGameNow') then
  Begin
    ZeroMemory(@SI, SizeOf(SI));
    SI.cbSize := SizeOf(SI);
    ...
    If CreateProcess(nil, 'launcher.exe', nil, nil, False, 0, nil, nil, @SI, @PI) then
    Begin
     CloseHandle(PI.hThread);
     CloseHandle(PI.hProcess);
    End;
    Exit;
  End;
  ... Run game normally...
End.

Launcher.dpr:
Begin
  ...
  CreateProcess(nil, 'main.exe /RunGameNow', nil, nil, False, 0, nil, nil, @SI, @PI)
  ...
End.


text:
Q: What kind of AWS configuration is needed for running a low-to-medium bandwidth Web map app? Does anyone have experience with running Web maps (tile server + client JS scripting) on Amazon Web Services (S3, EC2 etc...)? What kind of AWS configuration is needed for running a low-to-medium bandwidth Web map app, covering a small(-ish) area (city to small-country size)?
All of the tiles would be pre-rendered and uploaded to S3. Ideally I would need a tile serving app on the web server that could serve MBTiles (instead of uploading hundreds of thousands of tile bitmaps individually). So some kind of EC2 instance would be needed, but what kind?
Thanks for any hints.
UPDATE: just to elaborate on my question. What I'm basically looking for is some feedback about how viable AWS is for hosting your own web maps as an individual (which means it shouldn't cost too much, say up to $30/month). I've been hosting my web maps for some time through "ordinary" hosting providers, but these have their own limitations (upload bandwidth is one, speed is another). I'm also looking for any good alternatives to AWS and anything to watch out for when using cloud services for web maps.

A: When picking an architecture for a service that relies so much on a 'classic' architecture like web maps never underestimate the effectiveness of more traditional hosting solutions like RackSpace Cloud Servers or Linode.
You will have much less choices to make (like use S3 or not, load balancers or not, backups, etc or not and how much is that going to cost?) whose outcome is difficult to predict AND, more importantly you will be able to use tools that you are already familiar with.
Having gone through the same myself some time ago I can tell you that the critical factors in my decision to host a web maps service on Rackspace rather than AWS were:

*

*Cloud Server are (more) resilient than EC2 instances. EC2 instances are actually expected to fail and they will fail

*EBS volumes fail too (there's plenty of sad stories in the news) and generally have poor I/O

*unless you pick the larger instances I/O contention could be an issue (especially if you plan on seeding the tiles on EC2, rather than copying them over). It could also be an issue with MTBtiles databases

*Whenever you reboot your server the public ip will change: this does not happen on Linode or Rackspace

*You will have to come up with a backup and restore strategy yourself whereas both Linode and Rackspace provide point and click daily and weekly automated snapshots and restores

*If the host running your VPS fails Rackspace will take care of relocating your instance and restarting it on a different server and they will do this in 4h (it's in their SLA). It happened to me while I was on holiday: it felt very professional. Linode should do the same

*Linode has a great availability SLA: 99.9% and they claim great performance because they don't overprovision

*Rackspace has recently come up with a volume strategy like EBS so disk space should not be an issue anymore. Previously if you needed lots of disk space you HAD to get a large instance while on EC2 you can provision storage, cpu and memory with finer control

With this I'm not saying that Amazon AWS is inferior to others, I'm just saying that sometimes traditional hosting solutions can scale as well as Cloud-based ones. A notable example is the StackExchange network itself.

So, in your case I would start up a large instance on Rackspace and then load all the data in a local Postgis instance. Then, after configuring the rendering engine I would seed the cache. A large instance will complete the seeding process fast enough so that it doesn't become too expensive to run. You can store tiles in the fs, MTBtiles, even on S3 (btw, you can serve S3 data on a CDN with CloudFront).
After the seeding completed I would reboot the server and resize it into a small (maybe even 512MB) instance as at that point it would only have to serve static data.

This is getting a kinda long answer so I'm going to stop here. If you want me to elaborate on certain aspects just drop a comment.
Disclaimer: I am not affiliated with Rackspace, Linode, or any other provider I cited.

A: I've been using WebFaction for hosting GIS data in a Postgresql/PostGIS database with MapServer and I think the service is unrivaled for the cost of <$10 per month. If you want to use PostGIS 2.0 you need to install it yourself which is a bit tricky, but they provide PostGIS 1.5 by default (you need to open a support ticket). This is a shared hosting service on CentOS where you have full flexibility to install anything in your own portion of the server.
I have not been using Webfaction for serving tiles, but they do provide 100GB of space; I'm not sure if the RAM would be too costly as the default is 256 MB (and each 256 block costs an additional $7 per month)

A: One other possibility that uses AWS:
You may want to look into using the AWS Lambda Tiler method that Seth Fitzsimmons devised. He has been using it for the Open Aerial Map project and I used it for a private client project while working at Stamen Design.
There is a thorough blog post which I wrote that documents how to set up the AWS Lambda Tiler on Medium.com. Note that the blog post only covers tiling raster data, but we also used this process at Stamen to drive our global Terrain Classic map tiles which are generated from a combination of OSM and Natural Earth data via PostgreSQL, PostGIS, Mapnik, and CartoCSS.
One of the benefits of this approach is that you don't have a tile server to maintain and you only pay per use of each AWS Lambda function call, which I'm fairly certain is on the cheap side for smaller projects that don't receive a huge amount of web traffic. One of the downsides of this approach is that the tiles are seeded by the user panning and zooming the map, so the first rendering can be on the slow side, though you could pre-seed the tiles ahead of time. Tiles are written and stored to S3 after they are first rendered, so subsequent tile loading is much faster.

A: I am not an expert with much or really any knowledge about it other than I have been running a web server on amazon EC2 for some time now, So this is not an answer.
I am not sure you are utilizing these tools to their best use by pre-rendering and uploading.

*

*The biggest part of my aws expense is on my data transfer (what you are talking about loading).

*What else does your server have to do (unless you are utilizing licenses to render tiles and don't have license for the AWS).

If that doesn't deter or cause a re-think, Probably first pick your favorite map server, Then pick a supported OS for that map server, Then go to AWS EC2 and find the Instance that best meets your needs (size, memory, space, region).
There may or may not be an AMI containing all the stack you need so next get it configured and then install your stack.
There is a strong possiblility that you will accomplish all of that for "free" or cheap.

A: To get detailed pricing for AWS services you can use the online calculator located here:
http://calculator.s3.amazonaws.com/calc5.html
For a small EC2 instance running Linux, if you are willing to commit to a year, you can buy a Reserved Instance that will cost about $25/month. That is in comparison to about 44/month for on demand pricing, or no-contract pricing.
I think the short answer to your question is that if you are looking for an infrastructure provider to take care of your personal web mapping application needs, AWS might be overkill.  If you are looking for IT provider for production apps, especially if they require HA and scalability, then AWS is your answer. This becomes even more true if you are creating apps that leverage the many glue services that AWS provides, such as SQS, SNS, SWF etc.
As to what kind of EC2 you need? That is a function your apps specific requirement.  The whole point of cloud-based IT is that you can try before you buy. Test your app without commitment, and only when you know, make an informed decision about committing to an EC2 type over a period of time (the RI buy).

A: That true you can go for AWS if you are using the different services of them as AWS is quite costly. If you want to go for the cheaper prices with the same benefits i would recommend for https://fxdata.cloud or https://digitalocean.com as both of them are having appreciable services and cheapest prices.
You will basically get all the OS and DBMS options with high reliability.


text:
Q: Checking string for correct input Im doing an activity to extend my existing code to check for user input and I can't get it to work properly.

*

*First attempt:

while 5 > appcounter:
    StudentGender.append (input(StudentName[namecount]+",Please Enter Student Gender M or F:"))
    if StudentGender[appcounter] == "M":
        appcounter = appcounter + 1
        namecount = namecount + 1
    elif StudentGender[appcounter] == "F":
        appcounter = appcounter + 1
        namecount = namecount + 1
    else:
        print("Not a valid input")

*

*Second Try

for Counter in range (ConstNoStudents+1):
    try:
        StudentGender[Counter] = (input(StudentName[namecount]+",are you Male or Female, Please use M or F:") )
        StudentGender[Counter] = "M" or "F" or "f" or "m"
        namecount = listcount+1
    except:
        print("That is not a valid number")

I ideally want it to identify when the user type's something other than M or F in and Get the user to re-enter the value without adding anything extra to the list

A: You would need to get the input in a loop and check if one of the correct values was entered and if it was not, then repeat the loop.
You can also apply .upper() to the gender selection, instead of specifying the lower case versions of the gender values.
invalid_gender = True
while invalid_gender:
    gender = input('Please Enter Student Gender (M or F):')

    if gender.upper() not in ['M', 'F']:
        print('Invalid gender! Please, try again.')
    else:
        invalid_gender = False

A: Use this pattern:
accepted_inputs = ["M", "F"]
while True:
    user_input = input("message")
    if user_input in accepted_inputs:
        break
    print("Bad input, try again")

A: Rearranging your code, you need to prompt the user again if his input is invalid. You can do so with a while loop :
for index in range(ConstNoStudents+1):
    input = input(StudentName[index]+", are you Male or Female, Please use M or F:")
    while not input.upper() in ["M", "F"]:
        input = input("Invalid input. Please use M or F :")
    StudentGender[index] = input


text:
Q: Making sure that all elements in array is not zero How can I code this in a simpler way?
for(int i=0; i<array.length; i++)
{
    if(myArray[i] == 0)
    {
        myBoolean = false;
        break;
    }
    else if(myArray[0] != 0 && myArray[1] != 0 && myArray[2] != 0)
    //may continue depending on array length
    {
        myBoolean = true;
    }
}

What I currently have is a "if else statement" that if in my array, just an element is not zero it will change my boolean to true. But what I need is to make sure that all elements in the array is not zero then it will change the boolean to true.

A: You're overcomplicating it: :-) (I seem to have misread the question earlier, but I've fixed the answer now.)
boolean allNonZero = true;
for (int i = 0; allNonZero && i < array.length; ++i) {
    if (array[i] == 0) {
        allNonZero = false;
    }
}

or even
boolean allNonZero = true;
for (int i = 0; allNonZero && i < array.length; ++i) {
    allNonZero = array[i] == 0;
}

or using the enhanced for loop:
boolean allNonZero = true;
for (int entry : array) {
    if (entry == 0) {
        allNonZero = false;
        break;
    }
}

A: EDIT:
boolean isAllNonZero = true;
for(int i = 0; i < array.length; i++) {
    if(myArray[i] == 0) {
        isAllNonZero = false;
        break;
    }
}

A: Just check pretense of zero.
boolean isAllNonZero = true;
for(int i=0; i<array.length; i++)
{
    if(myArray[i] == 0)
    {
        isAllNonZero = false;
        break;
    }
}
if(!isAllNonZero) {
  System.out.println("Array Contains zero value");
}

Even more
int count = 0 ;
for(int i=0; i<array.length; i++)
{
    if(myArray[i] == 0)
    {
        count++;
    }
}
if(count>0){
  System.out.println("Array Contains "+count+" zeros");
}

A: This is (I think) the briefest way to do it:
boolean allNonZero = true;
for (int i : array)
    if (!(allNonZero &= i != 0)) break;


text:
Q: How to make tree output only directories? 150 directories I can handle but 900 files is too many for a review. I've no manual entry for tree so maybe I can ask you if you know how to output only directories since files get too detailed?
.
├── agreement.htm
├── appengine_admin
│   ├── admin_forms.py
│   ├── admin_forms.pyc
│   ├── admin_settings.py
│   ├── admin_settings.pyc
│   ├── admin_widgets.py
│   ├── admin_widgets.pyc
│   ├── authorized.py
│   ├── authorized.pyc
│   ├── db_extensions.py
│   ├── encoding.py
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── media
│   │   ├── images
│   │   │   ├── default-bg.gif
│   │   │   ├── icon_calendar.gif
│   │   │   ├── icon_clock.gif
│   │   │   ├── nav-bg.gif
│   │   │   └── sidebar-li.png
│   │   ├── js
│   │   │   ├── calendar.js
│   │   │   ├── core.js
│   │   │   └── DateTimeShortcuts.js
│   │   └── style.css
│   ├── model_register.py
│   ├── model_register.pyc
│   ├── templates
│   │   ├── 404.html
│   │   ├── 500.html
│   │   ├── admin_base.html
│   │   ├── index.html
│   │   ├── model_item_edit.html
│   │   └── model_item_list.html
│   ├── utils.py
│   ├── utils.pyc
│   ├── views.py
│   └── views.pyc
├── appengine_config.py
├── appengine_config.py.bak
├── appengine_config.pyc
├── app.yaml
├── br.py
├── br.py.bak
├── br.py.old
├── captcha.py
├── captcha.pyc
├── common
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── templatefilters.py
│   └── templatefilters.pyc
├── conf
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── locale
│   │   ├── ar
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── bg
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── en
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── es
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── fi
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── fr
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       ├── django.po
│   │   │       └── django.po~
│   │   ├── ja
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── pt
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       ├── django.po
│   │   │       └── django.po~
│   │   ├── ro
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── ru
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── sq
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── sv
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── tl
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   ├── tr
│   │   │   └── LC_MESSAGES
│   │   │       ├── django.mo
│   │   │       └── django.po
│   │   └── zh
│   │       └── LC_MESSAGES
│   │           ├── django.mo
│   │           └── django.po
│   └── settings.py
├── credit
│   └── credit.html
├── cron.yaml
├── demjson.py
├── demjson.pyc
├── errorpages.py
├── facebookapi.py
├── facebookapi.py.bak
├── facebookapi.pyc
├── facebookconf.py
├── facebookconf.pyc
├── geo
│   ├── geocell.py
│   ├── geocell.pyc
│   ├── geocell_test.py
│   ├── geomath.py
│   ├── geomath.pyc
│   ├── geomath_test.py
│   ├── geomodel.py
│   ├── geomodel.pyc
│   ├── geotypes.py
│   ├── geotypes.pyc
│   ├── geotypes_test.py
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── test_coverage.sh
│   ├── util.py
│   ├── util.pyc
│   └── util_test.py
├── help.html
├── i18n.py
├── i18n.py.bak
├── i18n.pyc
├── index.yaml
├── __init__.py
├── in.old.py
├── in.old.py.bak
├── in.py
├── in.py.bak
├── in.tidy.py
├── javascript.py
├── js
│   ├── a.css
│   ├── b.css
│   ├── c.css
│   ├── d.css
│   ├── listcss.css
│   ├── load.js
│   ├── main.css
│   └── mycss.css
├── jsmin.py
├── json.py
├── json.pyc
├── listfiles.py
├── login_required.py
├── login_required.py.bak
├── mailman.py
├── main.old.py
├── main.py
├── main.py.bak
├── main.pyc
├── mapreduce
│   ├── base_handler.py
│   ├── base_handler.py.bak
│   ├── context.py
│   ├── context.py.bak
│   ├── control.py
│   ├── control.py.bak
│   ├── errors.py
│   ├── errors.py.bak
│   ├── handlers.py
│   ├── handlers.py.bak
│   ├── hooks.py
│   ├── hooks.py.bak
│   ├── __init__.py
│   ├── __init__.py.bak
│   ├── __init__.pyc
│   ├── input_readers.py
│   ├── input_readers.py.bak
│   ├── lib
│   │   ├── blobstore
│   │   ├── files
│   │   │   ├── blobstore.py
│   │   │   ├── crc32c.py
│   │   │   ├── file.py
│   │   │   ├── file_service_pb.py
│   │   │   ├── __init__.py
│   │   │   ├── records.py
│   │   │   └── testutil.py
│   │   ├── graphy
│   │   │   ├── backends
│   │   │   │   ├── google_chart_api
│   │   │   │   │   ├── encoders.py
│   │   │   │   │   ├── __init__.py
│   │   │   │   │   └── util.py
│   │   │   │   └── __init__.py
│   │   │   ├── bar_chart.py
│   │   │   ├── common.py
│   │   │   ├── formatters.py
│   │   │   ├── __init__.py
│   │   │   ├── line_chart.py
│   │   │   ├── pie_chart.py
│   │   │   ├── README
│   │   │   └── util.py
│   │   ├── __init__.py
│   │   ├── key_range
│   │   │   └── __init__.py
│   │   ├── pipeline
│   │   │   ├── common.py
│   │   │   ├── handlers.py
│   │   │   ├── __init__.py
│   │   │   ├── models.py
│   │   │   ├── pipeline.py
│   │   │   ├── simplejson
│   │   │   │   ├── decoder.py
│   │   │   │   ├── encoder.py
│   │   │   │   ├── __init__.py
│   │   │   │   ├── ordered_dict.py
│   │   │   │   ├── scanner.py
│   │   │   │   └── tool.py
│   │   │   ├── testutil.py
│   │   │   ├── ui
│   │   │   │   ├── common.css
│   │   │   │   ├── common.js
│   │   │   │   ├── images
│   │   │   │   │   ├── treeview-black.gif
│   │   │   │   │   ├── treeview-black-line.gif
│   │   │   │   │   ├── treeview-default.gif
│   │   │   │   │   └── treeview-default-line.gif
│   │   │   │   ├── jquery-1.4.2.min.js
│   │   │   │   ├── jquery.ba-hashchange.min.js
│   │   │   │   ├── jquery.cookie.js
│   │   │   │   ├── jquery.json.min.js
│   │   │   │   ├── jquery.timeago.js
│   │   │   │   ├── jquery.treeview.css
│   │   │   │   ├── jquery.treeview.min.js
│   │   │   │   ├── status.css
│   │   │   │   ├── status.html
│   │   │   │   └── status.js
│   │   │   └── util.py
│   │   └── simplejson
│   │       ├── decoder.py
│   │       ├── encoder.py
│   │       ├── __init__.py
│   │       ├── README
│   │       └── scanner.py
│   ├── main.py
│   ├── main.py.bak
│   ├── mapper_pipeline.py
│   ├── mapper_pipeline.py.bak
│   ├── mapreduce_pipeline.py
│   ├── mapreduce_pipeline.py.bak
│   ├── model.py
│   ├── model.py.bak
│   ├── namespace_range.py
│   ├── namespace_range.py.bak
│   ├── operation
│   │   ├── base.py
│   │   ├── base.pyc
│   │   ├── counters.py
│   │   ├── counters.pyc
│   │   ├── db.py
│   │   ├── db.pyc
│   │   ├── __init__.py
│   │   └── __init__.pyc
│   ├── output_writers.py
│   ├── output_writers.py.bak
│   ├── quota.py
│   ├── quota.py.bak
│   ├── shuffler.py
│   ├── shuffler.py.bak
│   ├── static
│   │   ├── base.css
│   │   ├── detail.html
│   │   ├── jquery-1.4.2.min.js
│   │   ├── overview.html
│   │   └── status.js
│   ├── status.py
│   ├── status.py.bak
│   ├── test_support.py
│   ├── test_support.py.bak
│   ├── util.py
│   └── util.py.bak
├── mapreduce.yaml
├── market
│   ├── categories.html
│   ├── credit.html
│   ├── __init__.py
│   ├── market_ad_detail.html
│   ├── market_ad_edit.html
│   ├── market_ad_newpasswd.html
│   ├── market_ad_pay.html
│   ├── market_ad_preview.html
│   ├── market_ad_remove.html
│   ├── market_ad_renew.html
│   ├── market_detail.html
│   ├── market_full.html
│   ├── market_list.html
│   ├── market_mailc2c.html
│   ├── market_search.html
│   ├── market_usersads_list.html
│   ├── models.py
│   ├── nav.html
│   └── publish.html
├── onlinedebug
│   ├── codeinput.html
│   └── onlinedebug.py
├── paginator.py
├── paginator.pyc
├── PythonTidy-1.20.py
├── PythonTidy-1.20.py.bak
├── reindent.py
├── remote_api.py
├── reports.py
├── settings.py
├── settings.pyc
├── static
│   ├── base.css
│   ├── button-background.gif
│   ├── cancel.png
│   ├── challenge
│   ├── channel.html
│   ├── codebase
│   │   ├── dhtmlxcommon.js
│   │   ├── dhtmlxtree.css
│   │   ├── dhtmlxtree.js
│   │   └── imgs
│   │       ├── blank.gif
│   │       ├── but_cut.gif
│   │       ├── folderClosed.gif
│   │       ├── folderOpen.gif
│   │       ├── iconCheckAll.gif
│   │       ├── iconCheckDis.gif
│   │       ├── iconCheckGray.gif
│   │       ├── iconUncheckAll.gif
│   │       ├── iconUncheckDis.gif
│   │       ├── leaf.gif
│   │       ├── line1.gif
│   │       ├── line1_rtl.gif
│   │       ├── line2.gif
│   │       ├── line2_rtl.gif
│   │       ├── line3.gif
│   │       ├── line3_rtl.gif
│   │       ├── line4.gif
│   │       ├── line4_rtl.gif
│   │       ├── line.gif
│   │       ├── lock.gif
│   │       ├── minus2.gif
│   │       ├── minus2_rtl.gif
│   │       ├── minus3.gif
│   │       ├── minus3_rtl.gif
│   │       ├── minus4.gif
│   │       ├── minus4_rtl.gif
│   │       ├── minus5.gif
│   │       ├── minus5_rtl.gif
│   │       ├── minus_ar.gif
│   │       ├── minus.gif
│   │       ├── plus2.gif
│   │       ├── plus2_rtl.gif
│   │       ├── plus3.gif
│   │       ├── plus3_rtl.gif
│   │       ├── plus4.gif
│   │       ├── plus4_rtl.gif
│   │       ├── plus5.gif
│   │       ├── plus5_rtl.gif
│   │       ├── plus_ar.gif
│   │       ├── plus.gif
│   │       ├── radio_off.gif
│   │       ├── radio_on.gif
│   │       └── Thumbs.db
│   ├── comet-helper.js
│   ├── comet.js
│   ├── common.js
│   ├── credit.html
│   ├── crossajax.html
│   ├── css
│   │   ├── 960.css
│   │   ├── business.css
│   │   ├── montao.css
│   │   ├── openid.css
│   │   ├── reset.css
│   │   ├── style.css
│   │   ├── text.css
│   │   ├── uni-form.css
│   │   └── uni-form-generic.css
│   ├── extinfowindow.js
│   ├── failure.png
│   ├── favicon.ico
│   ├── favindex.ico
│   ├── fbjs.js
│   ├── feedicon.gif
│   ├── file.html
│   ├── for_sale_files
│   │   ├── 1x1_pages_li_c6_apuk_qh5569.gif
│   │   ├── all_pages.js
│   │   ├── arrays_v2.js
│   │   ├── bevakning_mini.gif
│   │   ├── common_in.css
│   │   ├── common.js
│   │   ├── ga.js
│   │   ├── generic.css
│   │   ├── jquery-1.js
│   │   ├── list.css
│   │   ├── searchbox.js
│   │   ├── thumb_extra_left_bottom.gif
│   │   ├── thumb_extra_right_bottom.gif
│   │   ├── thumb_extra_right_top.gif
│   │   ├── thumb_left_top.gif
│   │   ├── thumb_single_left_bottom.gif
│   │   ├── thumb_single_right_bottom.gif
│   │   ├── thumb_single_right_top.gif
│   │   ├── transparent.gif
│   │   └── xtcore.js
│   ├── frames.html
│   ├── ga.js
│   ├── geo.html
│   ├── googleb4b3b9748fe57cbf.html
│   ├── greybox.js
│   ├── iframe.js
│   ├── images
│   │   ├── 1.jpg
│   │   ├── 2.jpg
│   │   ├── 3.jpg
│   │   ├── dl.jpg
│   │   ├── go.jpg
│   │   ├── openid-providers-en.png
│   │   ├── openid-providers-ru.png
│   │   ├── openid-providers-uk.png
│   │   ├── p_debug1.JPG
│   │   ├── p_debug2.JPG
│   │   ├── p_debug3_1.JPG
│   │   ├── p_debug3_2.JPG
│   │   ├── p_debug3.JPG
│   │   ├── p_listfiles.JPG
│   │   ├── preview.jpg
│   │   ├── Thumbs.db
│   │   └── view.jpg
│   ├── images.large
│   │   ├── aol.gif
│   │   ├── facebook.gif
│   │   ├── google.gif
│   │   ├── myopenid.gif
│   │   ├── openid.gif
│   │   ├── rambler.gif
│   │   ├── verisign.gif
│   │   ├── yahoo.gif
│   │   └── yandex.gif
│   ├── images.small
│   │   ├── aol.ico
│   │   ├── aol.ico.gif
│   │   ├── aol.ico.png
│   │   ├── blogger.ico
│   │   ├── blogger.ico.gif
│   │   ├── blogger.ico.png
│   │   ├── claimid.ico
│   │   ├── claimid.ico.gif
│   │   ├── claimid.ico.png
│   │   ├── clickpass.ico
│   │   ├── clickpass.ico.gif
│   │   ├── clickpass.ico.png
│   │   ├── facebook.ico
│   │   ├── facebook.ico.gif
│   │   ├── facebook.ico.png
│   │   ├── flickr.ico
│   │   ├── flickr.ico.gif
│   │   ├── flickr.ico.png
│   │   ├── google.ico
│   │   ├── google.ico.gif
│   │   ├── google.ico.png
│   │   ├── google_profile.ico
│   │   ├── google_profile.ico.gif
│   │   ├── google_profile.ico.png
│   │   ├── launchpad.ico
│   │   ├── launchpad.ico.gif
│   │   ├── launchpad.ico.png
│   │   ├── linkedin.ico
│   │   ├── linkedin.ico.gif
│   │   ├── linkedin.ico.png
│   │   ├── livejournal.ico
│   │   ├── livejournal.ico.gif
│   │   ├── livejournal.ico.png
│   │   ├── myopenid.ico
│   │   ├── myopenid.ico.gif
│   │   ├── myopenid.ico.png
│   │   ├── openid.ico
│   │   ├── openid.ico.gif
│   │   ├── openid.ico.png
│   │   ├── rambler.ico
│   │   ├── rambler.ico.gif
│   │   ├── rambler.ico.png
│   │   ├── technorati.ico
│   │   ├── technorati.ico.gif
│   │   ├── technorati.ico.png
│   │   ├── twitter.ico
│   │   ├── twitter.ico.gif
│   │   ├── twitter.ico.png
│   │   ├── verisign.ico
│   │   ├── verisign.ico.gif
│   │   ├── verisign.ico.png
│   │   ├── vidoop.ico
│   │   ├── vidoop.ico.gif
│   │   ├── vidoop.ico.png
│   │   ├── wordpress.ico
│   │   ├── wordpress.ico.gif
│   │   ├── wordpress.ico.png
│   │   ├── yahoo.ico
│   │   ├── yahoo.ico.gif
│   │   ├── yahoo.ico.png
│   │   ├── yandex.ico
│   │   ├── yandex.ico.gif
│   │   └── yandex.ico.png
│   ├── img
│   │   ├── anuncio.gif
│   │   ├── facebook.gif
│   │   ├── facebook.png
│   │   ├── favicon.ico
│   │   ├── flerabildericon1.gif
│   │   ├── gratis.gif
│   │   ├── kamera.gif
│   │   ├── kool_business.png
│   │   ├── logo.gif
│   │   ├── mail.gif
│   │   ├── marketlogo.gif
│   │   ├── montao.gif
│   │   ├── montao_small.gif
│   │   ├── monton.gif
│   │   ├── sign-in-with-twitter-d.png
│   │   ├── sign-in-with-twitter-d-sm.png
│   │   ├── sign-in-with-twitter-l.png
│   │   ├── sign-in-with-twitter-l-sm.png
│   │   ├── tele.gif
│   │   ├── thumb_left_top.gif
│   │   ├── thumb_single_left_bottom.gif
│   │   ├── thumb_single_right_bottom.gif
│   │   ├── thumb_single_right_top.gif
│   │   └── twittericon.png
│   ├── jquery-1.js
│   ├── js
│   │   ├── jquery-1.2.6.min.js
│   │   ├── openid-jquery-en.js
│   │   ├── openid-jquery.js
│   │   ├── openid-jquery-ru.js
│   │   └── openid-jquery-uk.js
│   ├── json2.js
│   ├── labeledmarker.js
│   ├── listfileshelp.html
│   ├── login.js
│   ├── main.js
│   ├── mootools-1.js
│   ├── myfbjs2.js
│   ├── myfbjs3.js
│   ├── myfbjs.js
│   ├── obrigado.txt
│   ├── onlinedebughelp.html
│   ├── openid-icon.png
│   ├── openid-logo.png
│   ├── orbited.js
│   ├── plugin.js
│   ├── plugin_management.html
│   ├── plugin_management.js
│   ├── privacy.html
│   ├── recaptcha.js
│   ├── robots.txt
│   ├── round_bottom_left.png
│   ├── round_bottom_right.png
│   ├── round_top_left.png
│   ├── round_top_right.png
│   ├── search.html
│   ├── selectuser.js
│   ├── success.png
│   ├── terms.html
│   ├── Thumbs.db
│   ├── Transform.xls
│   ├── transparentpixel.gif
│   ├── tree.html
│   ├── wz_dragdrop.js
│   ├── xd_receiver.htm
│   ├── xd_receiver.html
│   └── yui
│       ├── assets
│       │   ├── bg_hd.gif
│       │   ├── dpSyntaxHighlighter.css
│       │   ├── dpSyntaxHighlighter.js
│       │   ├── example-hd-bg.gif
│       │   ├── Thumbs.db
│       │   ├── title_h_bg.gif
│       │   ├── yui-candy.jpg
│       │   ├── yui.css
│       │   ├── yuiDistribution.css

...
153 directories, 890 files

A: tree man page says:

   -d     List directories only.

So the output of tree -d YOUR_TARGET_FOLDER looks like:
├── appengine_admin
│   ├── media
│   │   ├── images
│   │   └── js
│   └── templates
├── common
├── conf
│   └── locale
│       ├── ar
│       │   └── LC_MESSAGES
│       ├── bg
│       │   └── LC_MESSAGES
│       ├── en
│       │   └── LC_MESSAGES
│       ├── es
│       │   └── LC_MESSAGES
│       ├── fi
│       │   └── LC_MESSAGES
│       ├── fr
│       │   └── LC_MESSAGES
│       ├── ja
│       │   └── LC_MESSAGES
│       ├── pt
│       │   └── LC_MESSAGES
│       ├── ro
│       │   └── LC_MESSAGES
│       ├── ru
│       │   └── LC_MESSAGES
│       ├── sq
│       │   └── LC_MESSAGES
│       ├── sv
│       │   └── LC_MESSAGES
│       ├── tl
│       │   └── LC_MESSAGES
│       ├── tr
│       │   └── LC_MESSAGES
│       └── zh
│           └── LC_MESSAGES
├── credit
├── geo
├── js
├── mapreduce
│   ├── lib
│   │   ├── blobstore
│   │   ├── files
│   │   ├── graphy
│   │   │   └── backends
│   │   ├── key_range
│   │   ├── pipeline
│   │   │   ├── simplejson
│   │   │   └── ui
│   │   │       └── images
│   │   └── simplejson
│   ├── operation
│   └── static
├── market
├── onlinedebug
├── static
│   ├── challenge
│   ├── codebase
│   │   └── imgs
│   ├── css
│   ├── for_sale_files
│   ├── images
│   ├── images.large
│   ├── images.small
│   ├── img
│   ├── jquery-1.js
│   ├── js
│   └── yui
│       ├── assets

A: If you're looking for just a simple list of directories in this directory, then you could try
find . -maxdepth 1 -type d

The 1 following maxdepth indicates how many levels of recursion you want. If you're looking for all directories(regardless of depth), then try
find . -type d

A: To control the depth of the tree use the -L option.
tree -d -L 2 .


text:
Q: How to check and fix a component in a InnoSetup project? I'm developing a InnoSetup project and I'm wondering how to always install a component (let's say 'Acrobat Reader') but don't allow to uncheck that item in the list of components.
I don't want the user uncheck it.

A: Generally, a component is selected when the selected installation type is listed in the Types parameter of its entry. So if you list all the available installation types there, it will be selected always.
To disable the component so that users cannot modify its state, you need to include the fixed flag for the entry.
So to make a disabled, always selected component with default installation types (which are used when you don't specify your own installation types in the [Types] section), you would write entry like this:
[Components]
Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed

In your comment you've asked how to disable a task entry. As far as I know, there is no direct way to do this and the only way I could come up with is doing this in code from the CurPageChanged event:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program

[Tasks]
Name: something; Description: "Install something"

[Code]
procedure CurPageChanged(CurPageID: Integer);
begin
  // the ItemEnabled property uses a 0 based index for item access, so the following
  // code you can read as, if we have entered the tasks selection page, disable the
  // first tasks list item
  if CurPageID = wpSelectTasks then
    WizardForm.TasksList.ItemEnabled[0] := False;
end;


text:
Q: How to use named pipes in C# correctly -- several connections, server recreation etc I need to implement an inter-process communication between C# applications. I decided to use named pipes and wrote the following code:
Server
while (true)
{
    using (var server = new NamedPipeServerStream("some_pipe"))
    {
        server.WaitForConnection();
        using (var reader = new StreamReader(server))
        {
            string line = reader.ReadLine();
            MessageBox.Show(line);
        }
    }
}

Client
using (var client = new NamedPipeClientStream("some_pipe"))
{
    client.Connect();

    using (var writer = new StreamWriter(client))
    {
        writer.AutoFlush = true;
        writer.WriteLine(path);
        client.WaitForPipeDrain();
    }
}

I have the following questions about it:

*

*Is this solution correct at all? Is there any issues or bugs you already see?

*What will happen if the second client will try to connect to this server? Will it wait for the first client to finish or just send its message along with another client's instance resulting in garbage?

*Should I really create another instance of NamedPipeServerStream class every time? If I move its construction from the while (true) loop it gives me an exception "Cannot access a closed pipe". How can I avoid it? If I can't avoid it and should re-create this object every time, what will happen if there is no NamedPipeServerStream at the moment when client will try to connect to it?

A: This will not work. Multiple clients connecting to just one NamedPipeServerStream is a feature not available. Its name with "...ServerStream" is misleading. Pipes are 1 to 1 connections. You must have multiple server instances serving the same pipe for many clients. This Code Project shows how to implement a Server Pipes and  may help you.


text:
Q: Question about vending machine circuit I have this assignment I finished for a vending machine circuit.  Just as some background, there are three inputs for nickels, dimes and a return option.  The return option is for only one nickel/dime at a time (a crappy system I know).  At 25 cents, you get to choose between pepsi and coke.  At 30 cents a nickel is automatically returned and at 35, a dime. As for outputs, there is RN (return nickel), RD (return dime), DC (drop coke), DP (drop pepsi).
I have my state diagram and table attached here.  Now, there is an extra option to implement a next state decoder (which I will not be doing), but just to satisfy my own curiosity, could someone explain to me briefly how I would go about doing that?


text:
Q: Maven Package - ClassNotFoundException I was packaging a project under a jar with maven.
The project works well on IntelliJ.
When I execute the jar :
java -jar target/restcvi-client-1.0.jar

I got the following error :
Exception in Application start method
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javafx.fxml.LoadException:
file:/Users/thomaspetillot/Desktop/project/rest-cvi-client/target/restcvi-client-1.0.jar!/app.fxml

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2571)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
    at Main.start(Main.java:12)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$161(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
    ... 14 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/http/converter/HttpMessageNotReadableException
    at controller.AppController.initialize(AppController.java:43)
    ... 24 more
Caused by: java.lang.ClassNotFoundException: org.springframework.http.converter.HttpMessageNotReadableException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 25 more
Exception running application Main

There is my pom.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>fr.urouen.restcvi.client</groupId>
    <artifactId>restcvi-client</artifactId>
    <version>1.0</version>

    <properties>
        <spring.version>4.2.4.RELEASE</spring.version>
    </properties>

    <dependencies>
        <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/javax.servlet/jstl -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.springframework/spring-oxm -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/commons-validator/commons-validator -->
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.6</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.5</version>
        </dependency>
        <!-- rest-cvi-xml -->
        <dependency>
            <groupId>fr.urouen.restcvi.xml</groupId>
            <artifactId>rest-cvi-xml</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/../rest-cvi-xml/target/rest-cvi-xml-1.0.jar</systemPath>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>src/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Clearly, I am lost on this and I don't know what I should look for to make it work.
I have tried to package all libraries into the jar, but it doesn't change the error. What am I missing ?
Not knowing where to start to find out what's wrong, feel free to ask me for clarification.
Edit :
I manage to launch the application with "mvn spring-boot:run", why does that change anything ?

A: add the springboot maven plugin to package an executable jar
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.0.1.RELEASE</version>
            <executions>
                <execution>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>


text:
Q: MS Excel Load and Batch Print Records I've made an invoice template with drop downs etc in Sheet 1, While my Database is in Sheet InvoiceDB, I came to load record with vLookup successfully, but printing dozens of invoices one by one is a pain.
What I need is to add two cells or one to auto load records based on Invoice number and/or by date. I know that's only possible with VBA and I can't yet code..
Any help with this would be highly appreciated.


text:
Q: Synchronization problem with std::atomic<> I have basically two questions that are closely related and they are both based on this SO question:
Thread synchronization problem with c++ std::atomic variables
As cppreference.com explains:

For memory_order_acquire:
A load operation with this memory order performs the acquire operation
on the affected memory location: no reads or writes in the current
thread can be reordered before this load. All writes in other
threads that release the same atomic variable are visible in the
current thread
For memory_order_release: A store operation with this memory order
performs the release operation: no reads or writes in the current
thread can be reordered after this store. All writes in the current
thread are visible in other threads that acquire the same atomic
variable

*

*Why people say that memory_order_seq_cst MUST be used in order for that example to work properly? What's the purpose of memory_order_acquire if it doesn't work as the official documentation says so?
The documentation clearly says: All writes in other threads that release the same atomic variable are visible in the current thread.

*Why that example from SO question should never print "bad\n"? It just doesn't make any sense to me.
I did my homework by reading all available documentation, SO queastions/anwers, googling, etc... But, I'm still not able to understand some things.

A: Your linked question has two atomic variables, your "cppreference" quote specifically mentions "same atomic variable". That's why the reference text doesn't cover the linked question.
Quoting further from cppreference: memory_order_seq_cst : "...a  single total order exists in which all threads observe all modifications in the same order".
So that does cover modifications to two atomic variables.
Essentially, the design problem with memory_order_release is that it's a data equivalent of GOTO, which we know is a problem since Dijkstra. And memory_order_acquire is the equivalent of a COMEFROM, which is usually reserved for April Fools. I'm not yet convinced that they're good additions to C++.


text:
Q: What's the difference between Clustering and Load Balancing? In Server 2008 R2 you can create a cluster of computers, which as I understand provides fail-over if a server dies. With Network load balancing I beleive this "offloads" some of the load to other servers, for example you could have two web servers with NLB...but couldn't you also have a cluster and NLB on the cluster as well?
Basically, where to use NLB and where to use clustering, for example, a database and a website.

A: I think of it as keeping an eye on the problem that is primarily being solved. Clustering primarily gives you improved availability of a particular application by improving the platform it's running on.
NLB allows you to group together a series of resources to primarily improve performance, by allowing you to hide several resources behind one network address, and this may also help with availability depending on the task in hand.

A: NLB is best used in cases where replicating the data needed by a service is a trivial task, multiple servers may run the service simultaneously with no harm, and any changed data is passed through to another service completely. Most webservers.
Clustering is best used in cases where shared storage is in use and only one service may run at a time for data-integrity or other reasons. Most databases.
You use NLB to create a group of identically configured web-app servers, all of whom talk to a clustered Database server.


text:
Q: Why do these calculations 'stop'? Question 1: If I change guess to a integer, for example guess = 1 then ListPlot already stops at $n=50$. This seems strange to me, any ideas on why this happens? Update, if I change guess to guess = 1.0 then this doesn't occur. Maybe this has something to do with the loss of precision with Sin?
Question 2: Why does the ListPlot stop at $n=512$? Is there something special about the number $4^{512}$?
For reference; to see what is going on I also included the Grid.
Clear["Global`*"]
guess = 1.5;
iter = 1000;
n = Table[j, {j, 0, iter}];
y = SetPrecision[Sin[4^n guess]^2, 30];
Grid[Transpose[{n, y}], Frame -> All];
ListPlot[y]

A: I offer the following slightly modified version as a better illustration of the problem:
Clear["Global`*"]
guess = N[3/2, 300];
iter = 1000;
n = Table[j, {j, 0, iter}];
y = Sin[4^n guess]^2;
Grid[Transpose[{n, y}], Frame -> All]
ListPlot[y]

What see from the Grid is that at each iteration the number of residual digits of precision decreases - we have 2 less bits available after reduction mod 2 Pi each time.  Eventually there is no precision left and we have a result indistinguishable from zero.
This is slightly hidden in the original version, since the SetPrecision function is applied after precision has been lost - we neither force Mathematica to work to higher precision nor track it accurately.


text:
Q: How can I pass parameters into my put call? How can I do a put call where I call an action and then give that action some parameters?
Here is my saga code where I call the action:
if (response.data.Success) {
    yield call(DashboardActions.getAnalyticsSuccess(response.data.Object),{dataName: action.dataName});
}

Here is the action that has the dataName parameter:
export const getAnalyticsSuccess = (state, action, dataName) => {
    const mergedData = {...state.data, ...{ [dataName]: action.data } }
    const newState = state.merge({ fetching: 0, error: null, data: mergedData });
    return newState
}

currently, I get this error:

uncaught at check call: argument [object Object] is not a function

I want to pass dataName into my action so that I can use it to change the correct state as you can see in my action. However, I cannot figure out how to get the dataName value into my action.

A: Figured it out!
correct yield call:
yield put({ type: "GET_ANALYTICS_SUCCESS", data: response.data.Object, dataName: action.dataName });


text:
Q: Reuse existing resources as a parameters in cloudformation I want to create cloudfomation template that reuse the existing resources for example I want to create a new instance and attach it to an existing loadbalancer and I want to select the loadbalancer form my existing loadbalancers in a dropdown.
Is there anyway to make cloudformation template to show the existing resource and reuse it ?

A: You can not list the loadbalancer in the dropdown as its not available in AWS-Specific Parameter Types.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html#aws-specific-parameter-types
But you can use aws Fn::ImportValue to import existing loadbalancer value.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html


text:
Q: Volume of $SL(2,\mathbb{C})$ So according to http://www-users.math.umn.edu/~garrett/m/v/SL2C.pdf
I can write the Haar measure of $SL(2,\mathbb{C})$ as
$$d\mu = \sinh^2(r) dr dk dk'$$
where $r$ runs over nonnegative real numbers and $k,k' \in SU(2)$.
Does this mean that I can decompose the volume of $SL(2,\mathbb{C})$ as
volume of $S^3$ times some infinite residual volume? Namely,
$$\rm{vol} SL(2,\mathbb{C})= \rm{vol} S^3\times vol_R$$
where $\rm vol_R = \int_0^\infty \sinh^2(r)dr$?

$\mathbf{Update}$:
I have a path integral of the form
$$ Z= \int_M\frac{d\mu}{{\rm vol}G}\exp\left[-\int_{S^1} dt{L[\phi(t),d\phi(t)/dt,d^2\phi(t)/dt^2]}\right]. $$
where $G=SL(2,\mathbb{C})$, $t\in [-\pi,\pi]$ parametrizes a circle and $\phi(t)$ is a complex-valued periodic function with possible singularities for some values of $t$, defined on a non-compact space of $M=\rm{Diff}(S^1)_\mathbb{C}$ and finally $L$ is a functional of $\phi$ and its derivatives. Now the path integral here diverges like $\lim_{\epsilon\rightarrow 0}\exp\log[\sinh(\epsilon)]$ and I need to cancel that divergence with the volume of $SL(2,\mathbb{C})$ in the manner I explained above.
Thank you,
AB


text:
Q: JustGage not working properly with Bootstrap on Chrome I included JustGage as:
var g1 = new JustGage({
              id: "g1",
              value:32,
              min: 0,
              max: 100,
              title: "Country",
              label: "",
              levelColorsGradient: false,

              levelColors: [
                            "#cd0000",
                            "#0066cc",
                            "#006400"
                          ]
            });

I have placed the gage div as:

This should render the gage properly on the jsp page, but it is showing as:

Neither max, min, nor value is visible now. This is working fine on Firefox, but not on Chrome.


text: Q: Invoking columns and filters panel programatically Is there a way to programatically open and close the ColumnsPanel and FilterPanel in XGrid/DataGrid? My Toolbar needs state so I am building it independently to the DataGrid (not using the components interface).


text:
Q: Regex lookahead ordering I'm pretty decent with regular expressions, and now I'm trying once again to understand lookahead and lookbehind assertions. They mostly make sense, but I'm not quite sure how the order affects the result. I've been looking at this site which places lookbehinds before the expression, and lookaheads after the expression. My question is, does this change anything? A recent answer here on SO placed the lookahead before the expression which is leading to my confusion.

A: It's easier to show in an example than explain, I think. Let's take this regex:
(?<=\d)(?=(.)\1)(?!p)\w(?<!q)

What this means is:

*

*(?<=\d) - make sure what comes before the match position is a digit.

*(?=(.)\1) - make sure whatever character we match at this (same) position is followed by a copy of itself (through the backreference).

*(?!p) - make sure what follows is not a p.

*\w - match a letter, digit or underscore. Note that this is the first time we actually match and consume the character.

*(?<!q) - make sure what we matched so far doesn't end with a q.

All this will match strings like abc5ddx or 9xx but not 5d or 6qq or asd6pp or add. Note that each assertion works independently. It just stops, looks around, and if all is well, allows the matching to continue.
Note also that in most (probably all) implementations, lookbehinds have the limitation of being fixed-length. You can't use repetition/optionality operators like ?, *, and + in them. This is because to match a pattern we need a starting point - otherwise we'd have to try matching each lookbehind from every point in the string.
A sample run of this regex on the string a3b5ddx is as follows:

*

*Text cursor position: 0.

*

*Try to match the first lookbehind at position -1 (since \d always matches 1 character). We can't match at negative indices, so fail and advance the cursor.

*Text cursor position: 1.

*

*Try to match the first lookbehind at position 0. a does not match \d so fail and advance the cursor again.

*Text cursor position: 2.

*

*Try to match the first lookbehind at position 1. 3 does match \d so keep the cursor intact and continue matching.

*Try to match the first lookahead at position 2. b matches (.) and is captured. 5 does not match \1 (which is the captured b). Therefore, fail and advance the cursor.

*Text cursor position: 3.

*

*Try to match the first lookbehind at position 2. b does not match \d so fail and advance the cursor again.

*Text cursor position: 4.

*

*Try to match the first lookbehind at position 3. 5 does match \d so keep the cursor intact and continue matching.

*Try to match the first lookahead at position 4. d matches (.) and is captured. The second d does match \1 (which is the first captured d). Allow the matching to continue from where we left off.

*Try to match the second lookahead. b at position 4 does not match p, and since this is a negative lookahead, that's what we want; allow the matching to continue.

*Try to match \w at position 4. b matches. Advance cursor since we have consumed a character and continue. Also mark this as the start of the match.

*Text cursor position: 5.

*

*Try to match the second lookbehind at position 4 (since q always matches 1 character). d does not match q which is what we want from a negative lookbehind.

*Realize that we're at the end of the regex and report success by returning the substring from the start of the match to the current position (4 to 5), which is d.

A: When tutorials introduce lookarounds, they tend to choose the simplest use case for each one.  So they'll use examples like (?<!a)b ('b' not preceded by 'a') or q(?=u) ('q' followed by 'u').  It's just to avoid cluttering the explanation with distracting details, but it tends to create (or reinforce) the impression that lookbehinds and lookaheads are supposed to appear in a certain order.  It took me quite a while to get over that idea, and I've seen several others afflicted with it, too.
Try looking at some more realistic examples.  One question that comes up a lot involves validating passwords; for example, making sure a new password is at least six characters long and contains at least one letter and one digit.  One way to do that would be:
^(?=.*[A-Za-z])(?=.*\d)[A-Za-z0-9]{6,}$

The character class [A-Za-z0-9]{6,} could match all letters or all digits, so you use the lookaheads to ensure that there's at least one of each.  In this case, you have to do the lookaheads first, because the later parts of the regex have to be able to examine the whole string.
For another example, suppose you need to find all occurrences of the word "there" unless it's preceded by a quotation mark.  The obvious regex for that is (?<!")[Tt]here\b, but if you're searching a large corpus, that could create a performance problem.  As written, that regex will do the negative lookbehind at each and every position in the text, and only when that succeeds will it check the rest of the regex.
Every regex engine has its own strengths and weaknesses, but one thing that's true of all of them is that they're quicker to find fixed sequences of literal characters than anything else--the longer the sequence, the better.  That means it can be dramatically faster to do the lookbehind last, even though it means matching the word twice:
[Tt]here\b(?<!"[Tt]here)

So the rule governing the placement of lookarounds is that there is no rule; you put them wherever they make the most sense in each case.

A: 1(?=ABC) means - look for 1, and match (but don't capture) ABC after it.
(?<=ABC)1 means - match (but don't capture) ABC before the current location, and continue to match 1.
So, normally, you'll place the lookahead after the expression and the lookbehind before it.
When we place a lookbehind after the expression, we're rechecking the string we've already matched. This is common when you have complex conditions (you can think about it as the AND of regexs). For example, take a look on this recent answer by Daniel Brückner:
.&.(?<! & )

First, you capture an ampersand between two characters. Next, you check they were both not spaces (\S&\S would not work here, the OP wanted to capture 1&_).


text:
Q: How to develop: Web server and mobile clients I want to link (in both directions) mobile clients (Android, etc.) with the Web application (central server). In other words : mobile Client-Server communication.
I'm new to developing for Android, but had on the development of PHP and MySQL.
Specify, please, the right direction for me: what technologies to use (REST, JSON, XML or something else), OAuth Authorization, there can be [micro] framework for PHP for these purposes.
Keywords, links to best articles, books, examples are welcome.
UPD. Yes, a lot of information in Google, I see. But I want to start right, use the best practices, of course.

A: I am also new in Android development and also searched a lot for doing this.I will explain how i achieved this.
For communicating with php server you need to create php rest apis  [I am using flight php frame work for this ref : http://flightphp.com/ ]
In Android side you need to call this apis. For this I am using third party library retrofit (because it is easy to use) ref : http://square.github.io/retrofit/
You can also use HttpURLConnection (ref: http://developer.android.com/reference/java/net/HttpURLConnection.html) android library i think it is a bit difficulty because we need to create a asynctask and all
you can find some tutorial about how to use retrofit in google :https://www.google.co.in/?gws_rd=ssl#q=android+retrofit+tutorial

A: Welcome to Android development!
First of all, design your API. You may find details here. Once you have it, you can build your REST server in PHP. I am using slim framework (http://www.slimframework.com/) for routes and RedBeanPHP (http://redbeanphp.com) for database access. Here is a tutorial for creating REST server with slim.
After your server is settled (or several servers), you can set up your android application.
I am actively using retrofit (http://square.github.io/retrofit/ please refer to the v2.beta).
This is an example of how you implement it. There is magic as retrofit will convert JSON objects received from the REST server into java objects.
public interface RestInterface {

    @POST("/register")
    Call<RestResponse> register(@Body RestRegister register);

    @POST("/request_validation")
    Call<RestResponse> request_validation(@Header(Constants.HEADER_KEY) String header);
...
}

Of course, you have to implements the objects. I can give a more detailed example if you want.
You also have to create a restClient:
public class RestClient {
    private OkHttpClient client;
    private RestInterface restInterface;
    public RestClient()
    {
        client = new OkHttpClient();
        client.interceptors().add(new LoggingInterceptor());

        Retrofit retrofit = new Retrofit.Builder()
                .client(client)
                .baseUrl(Constants.WEBSERVICE_URL)
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        restInterface = retrofit.create(RestInterface.class);
}

Finally, I have a service where I call the RestClient to get my calls. Here is a method.
private void handleSendingRegistration(RestRegister register) {
    final String method = "handleSendingRegistration: ";
    Call<RestResponse> response = restClient.getGatherInterface().register(register);
    response.enqueue(new RestCallback<RestResponse>() {
        @Override
        public void onSuccess(Response<RestResponse> response) {
            Log.d(TAG, method + response.body().getMessage());
        }

        @Override
        public void onFailure(Throwable t) {
            Log.e(TAG, method + t.getMessage());
        }
    });
}

This message is a bit crude, but you can see the idea of your question. Hope it can help you building your application.


text:
Q: TypeError: Cannot read properties of undefined (reading 'length') Working my way through my first fullstack MERN  app that allows a user to add multiple places to an array. Trying to map over the array to display the number of places for the user. Code works fine until I use .length, then it crashes.
import React from 'react';

import UserItem from './UserItem';
import Card from '../../shared/components/UIElements/Card/Card';
import './UsersList.css';

const UsersList = props => {
    if (props.items.length === 0) {
        return (

                <Card>

No users found.

                </Card>

        );
    }

    return (

            {props.items.map(user => (
                <UserItem
                    key={user.id}
                    id={user.id}
                    image={user.image}
                    name={user.name}
                    // placeCount={user.places.length}
                    placeCount={user.places}
                />
            ))}

    );

};

export default UsersList;

The full error stack:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')

The above error occurred in the <UsersList> component:

Consider adding an error boundary to your tree to customize error handling behavior.

Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.

I did a keyword search of .length throughout the backend and frontend files to double check the code and make sure I didn't have any typos anywhere--but for the life of me I can't figure out why adding .length isn't working.
I've gone through a few different posts on here but cannot find a working solution.
Any insight would be greatly appreciated. For now I just commented out .length so I can keep working. Thank you!

A: You can define a default value for items to fix it.
const UsersList = ({ items = [] }) => {
  if (items.length === 0) {
    return (
      ...
    );
  }

  return (

      {items.map((user) => (
        ...
      ))}

  );
};

A: Changing this if condition from this:
if (props.items.length === 0) {

To
if (!props.items?.length) {

Should work.
Similarly if using for places,you can check using ternary operator if length exists in array of places.
How? Because items could possibly be null or undefined from apis, so the length property on array might be missing.
Moreover, using ! Not operator would make this condition true if length of items is 0 or is null or undefined or any falsy value

A: The other answers are focusing on prop.items list but in your question you mention that you get the exception when trying to access the length of the places inside users.
You are getting the error message because some users may not have any places listed inside them, hence, no places list -> no length property.
To fix this, you need to check if the places list exists and then access its length:
placeCount={ user.places ? user.places.length : 0 }

Here, we use a ternary operator to check if user.places exists, then we use the length, else use zero.
Edit:
As pointed out by Phil in the comments below, you can also use coalescing operator, which is much cleaner, like this:
placeCount={ user.places?.length ?? 0 }

The syntax simply translates as if user.places has a value for length, then use that value, else use zero as a default value.

A: Here you can use object destructuring. if you are not sure whether the data will come or not.
JSX will always render first and after that props, so in some cases it may render empty JSX.
you can make the changes in your component like this
const UsersList = props => {
const { items = [] } = props

    // checking whether its an array or not and have some items in it
    if (!Array.isArray(items) || items.length === 0) {
        return (

                <Card>

No users found.

                </Card>

        );
    }

    return (

            {items.map(user => {
              const { id = "", image = "", name = "", places = "" } = user
              return <UserItem
                key={id}
                id={id}
                image={image}
                name={name}
                // placeCount={user.places.length}
                placeCount={places}
              />
           })}

    );
};


text:
Q: Diagonalization with the given eigenvalue and its vector Let $-3$ be an eigenvalue of a $3\times3$ singular matrix $P$ and
$$P\begin{bmatrix}
5\\
3\\
-2
\end{bmatrix}=\begin{bmatrix}
-20\\
-12\\
8
\end{bmatrix}.$$
Then find whether $P$ is diagonalizable or not. Also find whether $P^2+3P$ is diagonalizable.
My attempt
Given $-3$ is one eigenvalue
 and from
$$P\begin{bmatrix}
5\\
3\\
-2
\end{bmatrix}=\begin{bmatrix}
-20\\
-12\\
8
\end{bmatrix},$$
we know $Ax=\lambda x$. So we get $-4$ is another eigenvalue .
Also
$$\begin{bmatrix}
5\\
3\\
-2
\end{bmatrix}$$
is an eigenvector corresponding to the eigen value $-4$.
I am struck now don't know how to find another eigenvalue and how to proceed further.
This was the question asked for NET exam for PhD entrance in India

A: "Singular" means that $0$ is a third eigenvalue. With three distinct eigenvalues $0,-3,-4$, $P$ must be diagonalizable.
$P^2 + 3P$ is also diagonalizable with respect to the same basis as $P$.

A: A singular matrix is one which is not full rank, meaning that there is at least one row (or column) that is a linear combination of the others, since a matrix represents a linear basis-space.
If one of the eigenvalues has been given, then as shown, you can find a second eigenvalue of 4. Since the first two "discovered" eigenvalues are non-zero and the matrix is singular, thus not full-rank, then there must be a zero-valued eigenvalue.
You can also understand that a singular matrix has a determinant of 0. Since the determinant of a square matrix is equal to the product of its eigenvalues, the only way to have a zero-valued determinant is for at least one of those eigenvalues to be 0.
Once you've diagonalized a matrix, then you can now use the features of matrix calculus by applying functions of a matrix instead to its eigenmatrix.
$$f\left( \underline{\underline{A}} \right) = \underline{\underline{Q}} f\left( \underline{\underline{\Lambda}} \right) \underline{\underline{Q}}^{-1}
$$
Since the function is being applied to the diagonal matrix, it only affects the diagonal values, thus the result is still a diagonalizable matrix. This is a more practical view of understanding that the operations being applied to a diagonalizable matrix are equivalent to simply operating upon the underlying space's bases.

A: To diagonalize a matrix, only "distinct eigen values" is not enough...
We must consider the field over which, we are going to diagonalize.
You can easily get an example of a matrix, which has distinct eigen values but "not diagonalizable over Real numbers, But diagonalizable over complex numbers".
Also there is a necessary and sufficient condition for diagonalizable, which is based on eigen vectors, not on eigen values... You can get that from any good book on linear algebra.


text:
Q: Unable to resolve 'glGenFramebuffers' and fussy rendering on Qt5.1.1 I have install qt5 on my window machine.to see it is working i just create new simple Qt Quick 2 UI project that contain one main view file. when i run it the application run well except this issues on my application output pane

*

*getProcAddress: Unable to resolve 'glBindFramebuffer'

*getProcAddress: Unable to resolve 'glBindFramebufferOES'

*getProcAddress: Unable to resolve 'glBindFramebufferARB'
and fussy rendering on the application output window(qmlscene)

A: fussy rendering problems are usually due to out date of graphics card not able to support OpenGL. so if you encounter such kind of issues in Qt5 while working with qt Quick 2 it can be solved the problem by updating your graphics card