How can I show the admission board that I'm better than my academic record says

Question: I'm a last year student of a degree in mathematics ( and another in physics) in Spain.
I'm starting graduate education next year and I need some advices on how to improve my chances to get into graduate programmes.
Here in Spain the grading system is based almost entirely in exams in which I'm not very good at. I will explain this, since I don't want to sound like I'm complaining.
I have some concentration issues while working under pressure so I loose stupid points that matter a lot in the academic world. Somehow it is very hard to me to detect mistakes in these situations and fix them.
I'm writing this because working on my own I managed to get quite a high level in some topics that I'm interested in. This could be confirmed by some  teachers that spent some time talking with me.
I think I could function in academia for a number of reasons:

My supervisor thinks my thesis is promising and advanced.
I participated in summer schools (research oriented) having really good results. Some speakers are willing to write a recommendation letter for me.
The few hand out problems that I get to do here usually are marked as A.
Classmates rely on me when the need to understand some subject related to my interests. They appreciate my way of thinking.

I'd love to learn how to show this in my applications. How can I tell the universities that maybe I'm better than what my academic record says?
Comment: Off topic, but you may want to look into ways to address your concentration problems - perhaps with the aid of a counselor or mental health professional.  Graduate programs, especially at the masters level, often have high-stakes exams - you pass or you don't get a degree.  And likewise, even just for admission, they may want to see evidence that you are addressing this issue - whatever your other abilities, no program wants to admit a student who won't be able to finish.
Comment: Research and some strong letters of recommendation.
Comment: Possible duplicate: http://academia.stackexchange.com/q/324/19607  See also: http://academia.stackexchange.com/q/38237/19607 (focused on US grad schools)
Comment: Will you be applying to graduate programs in Spain only, or in other countries?  Admission procedures vary widely around the world.
Comment: Outside of Spain mostly. Germany and The Netherlands.
Comment: If your problems rise to the level of a disability, however, there can be flexibility as to how you satisfy program requirements.  But this is likely to require a formal diagnosis.
Comment: I think it's not that serious @NateEldredge.  Everybody has lower perfomances during exams I was just saying that for me that's a big handicap. It's just worse than average. It won't get me to the point of failing but I definitely matters in the academic record. I just want so show my strenghts.
Comment: @Ric , research opportunities are quite complicated in Europe (in mathematics) for undegrads. And also I'm working in the recommendation letters.
Comment: Do you have research experience? I didn't have amazing marks during my undergrad time but I had a ton of research experience. That helped me.
Answer: Abellán,
I grew up and attended college in Spain myself, then jumped to the US for a Ph.D. and been here for 20 years already. So I know the Spanish system well and have first-hard experience with the transition.
Your best bet is the recommendation letters. You really have to make sure that they come from people that know you well and that can speak at length and in depth about your qualities and potential. Letters from Spain don't always go to this level of depth; it would be best if your letter writers have had prior experience with this (of course not at the expense of their knowledge of you).
Letters are very important--the most consistently underrated component of an application by the students in my experience.
@lafemmecosmique's advice is very good. The best way to make your letters look outstanding is to do outstanding work with the people that will write them.
Good luck to you.
Answer: The best thing you can do in this situation (I was in it before!) is to:

Focus on your research experience -- any of it and all of it. Bonus points if the field of that research is the same as the one you are applying to. Focus on this extensively in your SOP. Speak with your former colleagues about that research; was there anything publishable in there? That is a huge help, although by no means is it expected for applicants at this level.
Get into contact with all prospective supervisors well before you apply. Read a lot about their work (or read enough that it seems like you know a lot). If they're willing to talk to you, ask them questions. You could even arrange to visit their lab, if they have the time (I wouldn't frame this as "can I come visit" and more as "I'm going to be in city x in the near future, and I was wondering if I may meet with you and ask you some questions, if you have the time"). The point of this, besides just familiarising you with the nature of the PhD, is to get your name stuck in their minds. You will come across as enthusiastic, interested, and competent. And when applications come around, and they're looking at those piles of papers and deciding which one of those piles looks the nicest, or whether they want any of those piles at all, you will have an advantage. It may or may not be enough to make up for a bad record, but it's better than nothing!
Get some good letters of recommendation, from your research colleagues as you said. Remember, a neutral letter of recommendation is harmful, so choose your referee wisely. When you do this, provide them with a summary of the PhD work so they can write you a letter highlighting the skills you have demonstrated in their lab which are important or helpful for the specific PhD for which you are applying.

If you have trouble with exams but you're otherwise good, you sound a lot like me when I was an undergrad. I'm outrageously dyslexic and I got a serious case of tunnel vision / panic attacks in exams. What I lacked there, I made up with research during every summer of my degree. So a 'meh' academic record is not a death sentence. It just means that it would be smart for you to cast a wide net, and don't over-invest in any one application. You may be disappointed if you shoot for the highest prestige, and you should prepare for that (as should anybody who applies to them) --
I think in your situation, a person who is bad at exams but good at science would be an easier 'sell' for an experimental PhD, if your field and research interests allow this.
And finally, whether to address your 'shortcomings' in a SOP is debatable. For my applications in the UK, I was encouraged to mention a struggle with depression and a close death in the family in order to explain my okay-but-not-great average. For my application in France, I was told to absolutely never do this. I suppose this is probably a function of culture. You should ask people in countries x y and z what they think about this.


complexity Partitioning with negative numbers

Question: I want to partition a set of numbers in two sets such that their sum is equal. Here in the original master set we can have positive as well as negative numbers. Can anyone tell me about the complexity of this problem. Partition with only positive numbers is NP hard.
Comment: Well, if Partition with positive numbers is NP-hard, Partition with positive and negative numbers is as well since it includes Partition with positive numbers
Comment: agreed. But what about the subclass of problems where atleast one number is negative? The same argument would not work.
Answer: Let $I = \{a_i, i = 1, \dots, n \}$ be an instance of "Partition with only positive numbers" that we want to solve.
Let $I' =  \{4 a_i, i = 1, \dots, n \} \cup \{ -1, -1 \}$ be an instance of "Partition with at least one negative number".

If $I'$ is "yes", then the two -1 cannot belong to the same partition. Otherwise, one would be a multiple of 4 and the other wouldn't. Therefore, $I$ is "yes" too.
If $I$ is "yes", then $I'$ is "yes" too since we can use the same partitions and put a -1 in each partition. Therefore, if $I'$ is "no", then $I$ is "no" too (converse proposition).

So if we were able to solve "Partition with at least one negative number" in polynomial time, we could solve "Partition with only positive number" in polynomial time as well.
Comment: This seems nice. I guess even subset-sum is hard as well by the same argument?
Comment: Subset sum is an optimization problem. The decision version where the value to find is fixed includes Partition.


Java FileWriter file location

Question: I'm very new to java so this may be simple but i couldn't find a way to fix it.
I'm building an app and i need to be able to write the current date to a file. The part I'm having problems with is actually getting the location of the file to write to.
Reading a file and putting all the text on each line into an arraylist i had no problem with using:
Scanner in = new Scanner(MainActivity.class.getResourceAsStream("notes.dat"));

However, when trying to declare a filewriter i tried both:
FileWriter f = new FileWriter(new File("date.dat"));

and
FileWriter f = new FileWriter(new File(MainActivity.class.getResourceAsStream("date.dat")));

(It works for the Scanner but on FileWriter it gives me the error: The constructor File(InputStream) is undefined):
I've also tried putting the file in various locations such as the src folder and the root android project folder and pointing to it correctly but it is never located.
Whatever i seem to do for trying to find the file using filewriter then writing to it, the file can never be located.
I created a java file not linked to an app development project folder and tried putting the date.dat in the same folder as the java file and was able to use the following with no issues:
FileWriter f = new FileWriter(new File("date.dat"));

My question is why does FileWriter seem to work when used on a normal java file not linked to an android project but when used on my project it stops working and how can it be fixed?
Answer: When you use .getResource() and friends, the JVM will look up a matching name in its class path. Which means this can be a file in a jar.
In order to be able to read from/write to a file, you therefore should not use it.
Try and create an external directory which you know the location of, and work in this directory.

Java FileWriter file location


Ringing volume is reduced after after updating Moto G2 to Android Lollipop

Question: After updating my Moto G2 to Lollipop 5.0, the ringing volume of my phone is reduced. Can anyone help me with a fix?
Answer: I suggest you to perform clear cache on your device. This steps will remove any temporary files that may be causing the problem, but will not delete your files or settings.

With the phone powered off, press and hold the Volume Down + Power button at the same time and release after two sec.
Press the Volume Down button twice to highlight "Recovery mode"
Press the Volume Up button to restart into Recovery mode.
You'll see an image of an Android robot with a red exclamation mark and the words "No command."
Hold the Power button, do not release it, press the Volume up button and release it (hold on the Power + Volume Up button and release).
Use the volume buttons to scroll to "Wipe cache partition" and press the Power button to select it.
"Reboot system now" will be highlighted, press the Power button to select it.
Answer: I hope I can help as my Moto g 2nd Gen had the same problem and it's running ok for now.
You are going to need to plug your phone into a computer and on AUTO PLAY click "OPEN FOLDER TO VIEW FILES".

Go to Media folder > Audio > Ringtones
Copy all ringtones and go back 3 tabs to the main storage page of your phone
Open Ringtones folder and paste your ringtones
Close the window, unplug your phone and cross your fingers it has solved your problem.

Worked for me so I hope this helps others.


How do I go into a message conversation

Question: My friends iPhone 4 will not provide notification when I send a message from my iPhone 5.  All other messages from all other contacts will notify him when they text him.  I was researching the issue and found the "just go into the go into the conversation -> details -> and toggle the do not disturb switch."  How does he do that.  We can find no "details" or "do not disturb" toggle.
Answer: Whilst viewing a list of messages (conversation view), tap the blue i in a circle at the top-right of the screen. This is the conversation details view, where one can change conversation settings.

How do I go into a message conversation


John the Baptist wore camel skin [Unclean animal]; could Tent of Meeting have had porpoise skin bought / plundered from Egyptians?

Question: I read here and in another website that the Tent of Meeting likely would not have used the skin of an unclean animal, since touching such an animal [Any and all parts of it??] or preparing such to make a covering would make the person unclean.  Apparently, John the Baptist wasn't concerned about covering himself with the skin of an unclean animal, wherever he had gotten it; but then he also wasn't trying to enter the Tabernacle thus clothed, before Jesus' sacrifice and resurrection that would declare 'all foods clean' (Don't know about skin coverings).  That's what made me wonder if in fact an unclean animal's skin such as that of a porpoise (deflecting the unclean elements outside?) would or would not have been an issue for God in the days of the Old Covenant.
Comment: An *unclean* animal is one not meant for *eating*.
Comment: Welcome to BH. Please take the Tour, see below, which will advise you that the site does not debate and discuss biblical topics. In order to conduct hermeneutic analysis, we need a specific text upon which to focus. For this reason, your question may be voted for closure.
Answer: The Bible is very clear on what an "unclean" animal was which you will find specificially in Leviticus 11. It is indeed specific to being EATEN not used for clothing. A great example of clothing being fur and being used is found in Genesis after Adam and Eve sinned. It is not specific on which animal was used. The IMPORTANT thing for the Jews was to know which animals were unclean to eat. I honestly believe a lot of this was due to health concerns of those days.


change order of shipping services in checkout

Question: I build two Shipping services in a drupal commerce shop. One with calculated rates. One with 0€ for pickup by the customer.
It looks like this:

But i would like to change the order and make shipping service with costs as default.
I tried to change the wight of the calculation rules, but without effect.
Is it true, that I need a module for this task?
It would be no problem, but I don't won't to overlook a easy solution.
Answer: Unfortunately, there's a pending feature request to make these orderable via the user interface, but in the meantime you're dependent on code to change their ordering. The hook to use is hook_commerce_shipping_collect_rates(), and what you need to do is alter the weight value of the line items in the $order->shipping_rates array.


magento1.9, how to speed up TTFB

Question: answer TTFB I expect 10 to 20 seconds of time
I can't understand why.
Tell me how to improve it.
here is a screenshot top command
Answer: install Aoe_profiler
https://github.com/AOEpeople/Aoe_Profiler

Aoe_Profiler is a drop-in replacement for the Varien_Profiler. It can
  be activated in the configuration and doesn't require you to change
  any core files. It captures all data and also records its hierarchal
  information and displays everything in a nice way.

you will see magento issues

magento1.9, how to speed up TTFB


Drag and Drop within NSCollectionView

Question: I have an NSCollectionView that is properly configured to display Core Data Entities based on what's found in an NSArrayController.  These Core Data entities, named MyManagedType, are defined to include an int32 indexing number "indexNumber" to keep them ordered, and binary NSData *myData.  I can also select the items by clicking them, but I can't "click and drag" them.  I only need to be able to select 1 item at a time (preferable actually).
I populate the NSArrayController by dragging and dropping files from finder in to the NSCollectionView.  It accepts dropped files by getting their FILENAMES.  I then open the file, do my processing, populate myData, get a new indexNumber (indexNumber = # of MyManagedType entities in persistent store), and insert this NSManagedObject * in to my persistent store.  That works great.
The 2 things I want to add, I'm lost.
1) I want to be able to click and grab an item in the NSCollectionView, drag it outside the view (or window), and drop it to "poof" it and have it delete from my persistent store.
2) I want to be able to click and grab an item in the NSCollectionView, drag it to ANOTHER SPOT in my NSCollectionView, and drop it to reorder my indexNumbers.
The main stumbling point here is I don't understand what drag&drop types to set myself up to handle - with my existing code it is filenames, but what is it now?  I've read the class reference several times and I understand what a lot of the methods do, but I just can't wrap my head around how I achieve #1 and #2.
Answer: I wanted to get drag and drop working on an NSOutlineView, and I found Jonathan Dann's source code incredibly helpful.
You might want to check it out and try to modify it for use with NSCollectionView.
Comment: He changed his blog's address. The new link resides here: http://jonathandann.wordpress.com/2008/05/13/nstreecontroller-and-core-data-sorted/
Answer: With a table view, the drag type for data from the view itself is, weirdly, an arbitrary string that you set, like this:
<code>#define arbitraryDataTypeForInterRowDragging @"arbitraryDataTypeForInterRowDragging".
</code>
Then you use it in the acceptDrop delegate method like this:
<code>NSData *rowData = [pboard dataForType:arbitraryDataTypeForInterRowDragging];
</code>
NSCollectionView delegate methods appear to follow the same pattern.

Drag and Drop within NSCollectionView


Covariance kernel of a Gaussian process

Question: I just started studying the theory of Gaussian processes. I'm mainly interested in studying functional data and I haven't found the answer to my doubt.
Let's say I have some curves that I consider as realizations of a Gaussian process with mean m and covariance matrix C. If I suppose that my data have been generated using a certain covariance kernel k, is it possible to estimate the parameters of k? Is there any R package to do it?
Thanks a lot in advance!
Answer: It is indeed possible to estimate the parameters of the Covariance kernel of a Gaussian process.
You can for instance use maximum likelihood methods or Bayesian methods to do so. Maximum Likelihood methods (including the urgently needed gradients for numerical optimisation) are discussed in this in this PhD thesis
for instance. The Bayesian approach for essentially the same problem has for instance been discussed in this paper. In this particular case, the Bayesian approach might be even easier, since there are no gradients required.
Depending on how many data points you have, the estimation procedure can be computationally very demanding. This is mostly the case, since many large and dense covariance matrices have to be constructed over and over again, essentially, whenever you change the parameter. Some colleagues and me have been working on this problem - therefore I hope you do not mind me advertising this work.
I do not know of any R-Package providing this. When you have large datasets, R may also be not the right choice, from an efficiency point of view.

Covariance kernel of a Gaussian process


Can a Raspberry Pi be operated at more than 115200 baud rate i.e : 230400

Question: I am now working on a project where I have to integrate a wireless module which supports baud rate of 230400  to Rasp Pi. I came to know that baud rate can be tweaked in Raspberry Pi. Is there any chance to send serial data from Raspberry pi at 230400 baud rate.
Answer: This page has a pretty good benchmark table as to the acceptable baud speed of the Raspberry Pi.
The short answer is it depends.  The more detailed is that it really depends on your library and how you plan on interfacing.  In the link, the author managed to max out a python connection around 44kHz while the C library maxed out at 22MHz.
I've read a couple projects where people have managed projects with a baud of 250,000.  So you should definitely be within the range of possibilities.  Just remember when dealing with such high speeds you really need to make sure your connection hardware is up to snuff.
Answer: available baudrate is upto 4000000 bits
baudrate_constants = {
    0:       0000000,  # hang up
    50:      0o000001,
    75:      0o000002,
    110:     0o000003,
    134:     0o000004,
    150:     0o000005,
    200:     0o000006,
    300:     0o000007,
    600:     0o000010,
    1200:    0o000011,
    1800:    0o000012,
    2400:    0o000013,
    4800:    0o000014,
    9600:    0o000015,
    19200:   0o000016,
    38400:   0o000017,
    57600:   0o010001,
    115200:  0o010002,
    230400:  0o010003,
    460800:  0o010004,
    500000:  0o010005,
    576000:  0o010006,
    921600:  0o010007,
    1000000: 0o010010,
    1152000: 0o010011,
    1500000: 0o010012,
    2000000: 0o010013,
    2500000: 0o010014,
    3000000: 0o010015,
    3500000: 0o010016,
    4000000: 0o010017
}


Python Requests non-blocking?

Question:
Possible Duplicate:
Asynchronous Requests with Python requests

Is the python module Requests non-blocking?  I don't see anything in the docs about blocking or non-blocking.
If it is blocking, which module would you suggest?
Answer: Like urllib2, requests is blocking.
But I wouldn't suggest using another library, either.
The simplest answer is to run each request in a separate thread. Unless you have hundreds of them, this should be fine. (How many hundreds is too many depends on your platform. On Windows, the limit is probably how much memory you have for thread stacks; on most other platforms the cutoff comes earlier.)
If you do have hundreds, you can put them in a threadpool. The ThreadPoolExecutor Example in the concurrent.futures page is almost exactly what you need; just change  the urllib calls to requests calls. (If you're on 2.x, use futures, the backport of the same packages on PyPI.) The downside is that you don't actually kick off all 1000 requests at once, just the first, say, 8.
If you have hundreds, and they all need to be in parallel, this sounds like a job for gevent. Have it monkeypatch everything, then write the exact same code you'd write with threads, but spawning greenlets instead of Threads.
grequests, which evolved out of the old async support directly in requests, effectively does the gevent + requests wrapping for you. And for the simplest cases, it's great. But for anything non-trivial, I find it easier to read explicit gevent code. Your mileage may vary.
Of course if you need to do something really fancy, you probably want to go to twisted, tornado, or tulip (or wait a few months for tulip to be part of the stdlib).
Answer: It is blocking, but this reminded me of a kind of a neat little wrapper I guy I know put around gevent, which fell back to eventlet, and then threads if neither of those two were present. You can add functions to data structures that resemble either dicts or lists and as soon as the functions are added they are executed in the background and have the values returned from the functions be available in place of the functions as soon as they're done executing. It's here.

Python Requests non-blocking?


Yet another google scholar preprint bug question

Question: I published a paper two months ago in JPR (publisher is ACS). Before the submission, I put the paper on biorvix with the same title. Now I am stuck with the preprint on google scholar and even searching by DOI returns the preprint instead of the published paper. Is this the infamous preprint bug in action? I was under the impression that was not crawling the correct source but in my case the DOI of the published paper returns the preprint?
Comment: I wouldn't waste much time or worry on this problem. Do the things that are easy (keep your own CV up to date; add publication data to your bioRxiv preprints) and let the world figure out the rest. Everyone in academia by now understands that google is all heuristics and search results are not meant to be a point of truth.
Comment: bioRxiv has a "Now published in" field that you can put the publication data in. There is no guarantee that it will make google scholar accept the published version as the "main" one (this still hasn't happened with a paper of mine from 2016 posted on the arXiv), but at least everyone clicking the link will see that your preprint has been published.
Comment: @darijgrinberg Well said. That's the best answer to most questions on this site about Google Scholar.
Answer: Yep, and this is an annoying bug! (which I have been affected by as well)
A possible workaround that I applied is to create a manual entry for your published paper and then merge it with the preprinted entry. GS will then ask you to choose which entry you want to be displayed on the page, go with the published one of course.
The link will then direct you to the bioaRxiv page, and there hopefully you already have the link to the published paper. It's not ideal, but better than nothing...


Benefit of running custom query over views

Question: I have a content type and some nodes. I am displaying latest 10 nodes from these content type through views block display. Is there any benefit if i add a custom SQL query to display latest 10 items. I will use the same SQL query that i got from view.
Answer: Not really. you should stick to using Views; it will provide you more benefits. To name a couple:

Less custom code to maintain; it's one of the mostly heavily used modules and will be part of D8 core. There's much less worries of security holes, bugs, etc.
The versatility of the Views features: caching, multiple view displays, filtering, a UI to change all this, etc.

I'd say the only exception to this would be the instances where your query is going to be hit very often, in which case you'd might be able to squeeze more performance out of an optimized SQL query.
For your needs, a block of 10 latest nodes, views will do everything you need it to, not be a burden on performance, and will take much less time to complete than creating & maintaining possibly bug ridden custom code.
Comment: Thanks friend! Yeah, I appreciate it. I got downvoted because I misread the question on the 1st version of the answer where I thought it was asking a pro/con to views vs. custom queries.
Comment: If I may add, if we're worries about performance of views, server tuning and other techniques (varnish, memcache) go a long way. \
Comment: @Pierre.Vriens - I don't feel it's a separate answer. It's just a reminder to look at the big picture. I seen some developers write there own 'simpler' queries in lieu of using a more drupaly/standard method without knowing the full implications. Having a good server foundation (updated linux, tuned, with appropriate caching for your situation) may do wonders.
Answer: Another module to consider for situations where views "might need some help" is Forena (disclosure: I'm a co-maintainer of it). Here is a quote from one of its community docu pages, i.e. Reasons for considering Forena:

"Why not use views instead of forena?" ... The answer is generally
  something along the lines of "Most forena users love views, views is
  great! If you want to report against external data though, or you want
  to do aggregation or analytics, Forena is much more suited to address
  these requirements."

And since this question is about blocks also, you may want to take advantage of the Forena integration with the Bean module. Here is a quote about that module, its project page:

Think of a Bean as a method to provide new types (compared to node this would be a content type) which then provides an add content interface to create as many blocks as you require (see screenshot below). The bean content can then be placed around the site just like any other block.

You may also want to look at my answers to these somehow related, I think, questions:

How to retrieve data directly from a Drupal database.
Use Views or Write Raw Query?


How do I name my ocelot in Minecraft PE?

Question: How do I name my ocelot? I have the name tag, but how do I put it on?
Answer: An alternative naming method is to name your ocelot spawn egg (creative/commands only) in an anvil, and then use it. The ocelot will be named.
Comment: however, all of the ocelots you spawn using that spawn egg will have the same name until you change the name of the spawn egg again.
Answer: According to this website
you use an anvil to put a name on the name tag (you have to change the name from "name tag" to something else, and this will cost XP, so make sure you have enough), and then, with the renamed name tag in your hand, tap on the mob (for PE, most games use right click, LT, L2, Or ZL) to use it. you should see the name above the mob's head.
Answer: On mobile, tap and hold on the animal after renaming the name tag. To see the name hover your cursor over the animal.
Comment: This adds nothing to an already posted answer 7 days prior..


Conditional Expectation of Gaussian Vectors

Question: Consider the random vector $\mathbf{X}=(X_1,X_2,\ldots,X_n)$. Assume that $\mathbf{X}$ is Gaussian with mean-vector $\mathbf{0}$ and covariance matrix $C$, that is $\mathbf{X}\sim \mathcal{N}(\mathbf{0},C)$.
In the simple case of two random variables $(X_1,X_2)$, we know that:
$$\mathbf{E}[X_2 | X_1] = \frac{\mathbf{E}(X_2 X_1)}{\mathbf{E}(X_1^2)}X_1 \tag{1}$$
So, the conditional expectation is a simple multiple of $X_1$.
We posit, that, in the case $n$ random variables, there exists constants $a_1$, $a_2$, $\ldots$, $a_{n-1}$, not all zero, such that:
$$\mathbf{E}[X_n | X_1\ldots X_{n-1}] = a_1X_1 + \ldots +a_{n-1}X_{n-1} \tag{2}$$
Now, we are interested to find the coefficients $a_1,\ldots,a_{n-1}$.
The book I am self-studying, applies the decomposition theorem, at this step. That is, a Gaussian vector $\mathbf{X}=(X_1,X_2,\ldots,X_n)$ with mean $\mathbf{0}$ and covariance matrix $C$ can be decomposed into $n$ IID standard normal random variables $\mathbf{Z}=(Z_1,\ldots,Z_n)$, $Z_j \sim N(0,1)$, and we can write:
$$\mathbf{X} = A \mathbf{Z}\tag{3}$$
or equivalently,
$$\mathbf{Z} = A^{-1}\mathbf{X} \tag{4}$$
We can find $\mathbf{Z}$ by performing the Gram-Schmidt orthogonalization of the random variables $(X_1,\ldots,X_n)$ (or cholesky factorization of $C$, $C=AA^T$). That is:
\begin{align*}
Z_1' &= X_1 \\
Z_1 &= \frac{Z_1'}{\mathbf{E}[Z_1'^2]}\\
Z_2' &= X_2 - \mathbf{E}[X_2 Z_1] Z_1 \\
Z_2 &= \frac{Z_2'}{\mathbf{E}[Z_2'^2]}\\
\vdots\\
Z_n' &= X_n - \mathbf{E}[X_nZ_1]Z_1 - \ldots - \mathbf{E}[X_nZ_{n-1}]Z_{n-1} \tag{5}
\end{align*}
We can check that the random variables $Z_i$, so constructed are orthogonal(independent), $\mathbf{E}[Z_i Z_j] = 0, i\neq j$.
Thus, we may as well write:
$$\mathbf{E}[X_n | X_1\ldots X_{n-1}] = b_1Z_1 + \ldots +b_{n-1}Z_{n-1} \tag{6}$$

Question. The author, then, suggests that $b_j = \mathbf{E}[X_n Z_j]$, where $1\leq j \leq n-1$. I'd like to ask for some help; how do I derive these $b_j$'s?
I've tried numerous things, I thought about it for nearly a day. But, I can't seem to derive it.
Answer: There is a much easier way. Write $$X_{n+1} = E(X_{n+1}\mid \vec X)+\zeta$$ where $$ \vec X = (X_1,\dots,X_n),\quad \zeta = X_{n+1}-E(X_{n+1}\mid \vec X) = X_{n+1}-\alpha^T \vec X$$
The orthogonality relationship $$\mathrm{Cov}(\zeta,\vec X) = 0$$ implies
$$\mathrm{Cov}(X_{n+1},\vec X) = \mathrm{Cov}(\vec X,\alpha^T \vec X) \implies \alpha = \mathrm{Cov}(\vec X)^{-1}\mathrm{Cov}(X_{n+1},\vec X)$$
This gives a guess for the conditional expectation $E(X_{n+1}\mid \vec X)$. To check that it's correct, note that we have decomposed $X_{n+1}$ as the sum of a $\vec X$ measurable function and $\zeta$ orthogonal to $\vec X$. Uniqueness of orthogonal decomposition in Hilbert spaces completes the proof.


Why was primality test thought to be NP?

Question: To check if $n$ is prime, one only need to try dividing $n$ by numbers up to $\sqrt{n}$, meaning that the complexity would be $O(\sqrt{n})$. In my opinion, $O(\sqrt{n}) < O(n)$ so this simple algorithm is already P. But why did people think that primality test is NP, and were surprised by the AKS primality test?
Comment: If something is in P then it is automatically in NP. You seem to be using "NP" as shorthand for either "NP - P" or "NP-complete".
Comment: And I don't think many people thought it was NP-complete; it doesn't seem that you can use it to solve other problems in NP. Then it was shown to be in NP and co-NP, which was odd. Many people believed it was "slightly" exponential.
Answer: To start, any decision problem with a witness verifiable for a "yes" answer in polynomial time is in NP.
$\bullet$ The problem 'Is $p$ composite?' has a witness $k$, and it can be tested in polynomial time whether $k$ divides $p$, therefore is in NP.
$\bullet$ The problem 'Is $p$ prime?' has a polynomial certificate (which can be found here), therefore is also in NP.
Now, your complexity analysis is not correct. If your input is a number $p$, then the input size is $\log (p)$, since you need $log(p)$ bits to represent it. Therefore, $n=\log(p)$ and $\sqrt{p}=\frac{1}{2} \log(p)$ bits. So the time required (in respect to $n$) checking all the numbers up to $\sqrt{p}$ will be $2^{\frac{1}{2}n}$, and is in fact exponential in terms of input size $n$.

The question "Where exactly does the Primality problem lie" has been answered in the link here
Comment: "Is p composite" is obviously in NP, because you can bring a witness easily. "Is p prime" is in NP, but not obviously at all - there is a quite deep theorem that every prime p has a short prove of being prime, which I think involves complete factorisations of p+1 and/or p-1.
Comment: @gnasher729 thank you for spotting it! I edited it in.
Answer: I don't think many people thought it was NP-complete; it doesn't seem that you can use it to solve other problems in NP (which is required for NP-complete). Then it was shown to be in NP and co-NP, which was odd.
And you could of course do probabilistic tests in polynomial time. It is quite likely that there is a not very large polynomial p(n) so that doing p(n) probabilistic tests proves indeed that a number of size n is a prime. In which case primality was always in P. (It's just hard to prove).


O-ring on oil pickup tube

Question: I have an 06 Silverado 5.3. The o-ring on the oil pickup tube has been going bad . I've been driving it with some ticking from the lifters which goes away after warmed up and pressure comes up. Until now I'm on a trip with 9 hours to go and pressure started to drop more than usual . My question is can I overfill the oil to submerge the o-ring and be able to get where I'm headed safely?
Comment: Can you explain why you think this is an issue with an O ring?
Answer: First, I doubt your o-ring is bad. It doesn't work that way on these engines.
Second, the o-ring is located just below the centerline of the crankshaft. To get the oil above the o-ring, you'd have to fill up the engine with enough oil the crankshaft would be hitting the oil, which would damage the engine.
These earlier LS engines are fairly notorious for having lifter noises when the mileage gets high. It usually stems from the pressure relief spring in the oil pump getting weak. When it does, it allows the oil to bypass more than it should. This shows as a drop in oil pressure as well as you may start hearing a little bit of noise out of the lifters. The only cure for this is to replace the pump (even an OEM pump works just fine). When the engine and oil get hot from long driving, the noise may be a little bit louder and the pressure may be a little bit lower than normal.
Depending on what you're seeing your oil pressure reading, there's probably no "big" issue here. Yes, it is a little disconcerting, but unless you're towing something (which would cause a larger burden on the engine), you shouldn't be in any danger. The engine can function just fine. Depending on what your oil pressure is reading, 15 lbs is more than enough to service the engine.

O-ring on oil pickup tube


Tolerances for DDR3 trace matching?

Question: What would be an acceptable tolerance for length matching trace, for DDR3 SDRAM?
Comment: Would that not depend on the frequency you run it?
Comment: @MattClark yep, that will determine how much you can tolerate skew-wise between say DQ/DM to the strobe. Using faster memory components with slower hosts buys you margin as well (see below).
Answer: The best answer will be from the hardware layout guide from your SoC/FPGA/ASIC vendor, especially because you will need to consider the inner-package flight times as well, which the manufacturer will give you in a datasheet / layout guide somewhere, based on your particular package (flip-chip, wire-bond, etc.). In the abscence of such a guide (like if you are doing your own DDR3 memory to a FPGA), see if their external memory interface handbook gives some ballpark numbers, or pick numbers from a vendor who provides good, conservative layout guides (IIRC, Intel used to do this).
Generally, tolerances will be the tightest within the pair (P/N), if differential, followed by intra-group tolerances (i.e. within an address group, command group, strobe, etc.). This is more applicable to PCIe, but a good practice I do is take the tolerance given by the manufacturer and half it (if practical) -- I.E. if they say match to within 0.254mm, I match to within 0.127mm. For something like PCIe where you have add-in cards that plug into another system, you're budgeting against the engineer on the other side of the system using up all of the specified tolerance.
Remember that the tolerances differ on the type of DDR3 signal it is, as well as your expected operating frequency. Choosing faster memory parts and running them at a lower frequency can buy you margin in layout -- see below examples from the Zynq-7000 PCB design guide (this is one very specific example, do not take these as gospel):

For this example, they also discuss needing to make your clock lines greater than or equal too the length of DQS.
A final tip: I use an Excel spreadsheet with all the requirements for the layout guide input into the sheet. I then export (via script) the lengths of every net from my PCB design document to a text file, import that into Excel, and use simple VLOOKUP to snag the net names + lengths and conditionally format based on whether they are passing or failing. This is the place to put all relevant data -- the requirements, intra-package delays, etc:
Comment: Clock line routed longer than the DQS line is a general DDR3 requirement. The DQS signal edge must reliably arrive to the DRAM before the clock edge if you want the write leveling feature to work.
Some controllers implement features to delay the clock by register setting instead.

Tolerances for DDR3 trace matching?


load function after page switch on querymobile ajax

Question: I have a jquerymobile ajax based web app. not using ajax is no option.
On one page a new script is inserted by
Now i would like to load that script, after the page is loaded by ajax. Unfortunately it does not happen. I tried for example:
 $(document).live( 'pageinit',function(event)
     CODE HERE
{});

But it does not work. As well as
$(document).bind('pageinit', function()

Any ideas how i can manage to load the function after the page is loaded by ajax??
Comment: Place script inside page div.
Comment: if i do so the following errors appear: http://cl.ly/image/1t11320Z1M23
Answer: Found the solution with help of "OMAR". I put the function inside the page div. But the link is not working, so i put the code itself into the top of the div. now it is working. not the best solution, but it is working.


creating a plugin return this question

Question: it says in the documentation to allways return the this object in all cases i've seen so far you return this.each() function. So are there anyother cases other than this.each that you would return
Answer: If you are trying to add a method similar to .prev() or another such function included in jQuery, using this.map() may be useful. To answer another question on this site, I created a jQuery plugin that does exactly that.
Likewise, one might want to return a string (or other data type) from a plugin (compare .attr(), .css(), and .data()), most often from the first wrapped element when only one argument is passed to the method.
For most plugins, the main reasons to return this.each(function() { ... }) are:

Your code is executed for every DOM element referred to within the jQuery object.
It returns that same jQuery object to allow method chaining. Obviously, that doesn't apply for methods intended to return a new jQuery object, such as mine.

creating a plugin return this question


Do we need a tag [csv-file]?

Question: I see we have a csv-file tag with nine questions mostly quite old and at a brief reading either off-topic as about software operation or not really about the file type. We do not seem to have any other tag for file types. If this is up-voted I will get rid of the tags and vote to close any which seem to me off-topic.
Comment: +1. There are some questions where it's the only tag. You will have to think what to replace it with. You might find [tag:project-management] useful.
Comment: @amoeba Last time I looked there were still three there so someone must have lent a helping hand. I think the appropriate thing is for me to post an answer and accept it.
Comment: @amoeba is right: to get rid of the tag, it needs to be removed from every thread. So we need something else for those threads where it is the only tag. We can close old, off topic threads, but in some cases consider flagging them to be 'locked', if they have any value (even while off topic).
Comment: @amoeba has made a good suggestion as I was unaware of that tag and it does look as though it would be suitable.
Comment: @gung I will do the easy ones first starting tomorrow and then if in doubt come back here.
Comment: It seems the tag is empty.
Comment: I did the last two yesterday. Don't know about the third.
Answer: The tag has now been emptied so this thread can be closed. I will accept my own answer.

Do we need a tag [csv-file]?


Alternator discharging

Question: Hi everyone thanks for your input
I have a 1994 Isuzu Rodeo and the alternator goes negative when I rev the engine also when staring the engine it goes to negative and I have to wait until it builds up to go positive Reeving the engine does not work I have to wait while it idles
With lights on and making a turn down a hill alternator goes to negative and will not go positive if I accelerate I have to wait at idle
Alternator has been rebuilt 4 times by 2 different companies
Alternator belt is good
Comment: Welcome to Motor Vehicle Maintenance & Repair! What do you mean by "it goes to negative"? And how are you detecting it does this?
Comment: Have you verified the readings with a digital multimeter (DMM)? If the gauge is bad or misreading, you could be chasing your tail.
Comment: On the gauge in the car it drops below 12 volts
Answer: If your gauge in the car is reading correctly, it sounds like it could be a bad regulator or a broken wire.

The first thing to check is the alternator.  Most auto parts shops have an alternator test bench and will test it for free.  Once you know the alternator is indeed doing what it needs, then you have to chase down the real issue.
Next check the wires connected to the alternator.  Look for chafing, exposed copper, corrosion and broken wires.  When you say making a turn down a hill stops charging, that makes me think you will find your issue here.  Some wire is seemingly hanging on and when the right conditions move it, it stops charging.  Alternators have a small wire called the "sense wire" that tells the alternator the battery voltage so it knows how much to charge.  If this wire is not making good connection, a good alternator will not charge.
Ensure the big positive cable connected to the alternator is tight and clean on both ends.  It should run from the alternator to the battery.
If your car has a PCM controlling the alternator, that could be failing and not telling the alternator to charge.
Comment: Thank you Mr. Anderson I will check this next week and let you know the results
Comment: Replaced the bad wires new belt and fan clutch all is good thanks again Mr. Anderson!

Alternator discharging


Missing short cuts created in Windows 10 Start Menu after upgrade to Windows 11

Question: I just upgraded from Windows 10 to Windows 11.
Now I lost the short cuts that I previously created in Windows 10 Start Menu.
Where can I find it and put them back on Windows 11?
Comment: Why can't you just recreate them? What were they shortcuts to exactly?
Comment: I created many shortcuts to various directories that I usually used to open it quickly in File Explorer. It will be great if there is a quick way to restore them in Windows 11.
Answer: The Start Menu in Windows 10 has changed to a Launcher in Windows 11.
So some items may have changed from Start Menu shortcuts to the Launcher.
Windows Tools is now part of the Start Menu in a different way than Windows 10 and if you had shortcuts for these, they may have been replaced by Windows Tools.
Open Start and look near the Top Right of the Start Menu, see All Apps (different location than Windows 10) and that shows all your apps. Look there.
The black, left click menu is very close in Windows 10 to Windows 11.
So look in the Launcher and in All Apps.  I have upgraded two machine and not actually lost shortcuts. They were replaced in the launcher and the new All Apps.
If indeed you actually lost 2 or 3 specific shortcuts, just make new ones.
Remember that Windows 11 is vastly different than Windows 10.
The Windows 10 (and prior operating systems) had the ability to create Toolbars (right click on the Task Bar .  That has been removed in Windows 11. In my Windows 10 system, Toolbar shortcuts were often in the Start Menu folders.
The All Apps button is in the top right of the Start menu:
Answer: I found the old shortcuts are still available in %appdata%\Microsoft\Windows\Start Menu\Programs (we can open it with File Explorer).
We could then add the shortcut to the Launcher with Pin to Start option in the context menu.


Reverting changes made to objects

Question: I have a grid which is binded to a list of objects using LINQ to sql.Now, the grid is editable.So, user can make changes to values in any column.But, if the user wants to cancel,I want to revert changes to the values of objects, and the grid should show original values(without hitting the database).Anyone has done this? How to manage this scenario in LINQ-to-sql
Answer: There should be no need to do anything with the database. Presumably you have bound the grid with a List of objects? One way to do this is to keep two copies of this List. One is bound to the grid and the other can be used to revert everything back to its original state. This would involve no additional trips to the database. However, unless the data in the database is mostly static, it might be a good idea to go back to the database to get fresh copies of all rows.

Reverting changes made to objects


Verifying Wallet Information

Question: I had my first Google play account for a little under a year and I made a few purchases and and long story short, those purchases got refunded so now my account won't let me buy anything without veryfying my wallet information. Well, I do not have that card anymore and I can't verify without it. I got a new phone and logged into my old account simply to link my contacts, pics, calendar info, etc. I then logged into my new account and tried to buy one small in-app purchase which was denied because my wallet info wasn't verified. I'm confused because this is a new account and I haven't bought anything so how could my wallet info need to be verified if their shouldn't be anything in the wallet?
Answer: Sounds like you need to update your Google Play Account and remove the old credit card.  From your phone hit Google Play store app, go to your account, go add a payment method, or edit an existing one. Once there delete the old card and add the new one.

Verifying Wallet Information


Is it possible to open a new space with the keyboard?

Question: There is a keyboard shortcut to open up spaces ctrl + up and you can press alt to see the new space +.  Is there anyway to create a new space with a keyboard command?
Answer: There are only three ways to create a new space in OS X Lion and above:

Press F3 to launch Mission Control hover the Pointer over the top left or right corner, where a window will now appear with a + sign – by clicking the + a new space is generated

drag and drop an application window from Mission Control to the top right or left corner of your screen; the Desktop icon will appear, and a new space is gererated and your window's application is assigned to it.
Once enabling an application's full screen mode by clicking the right-hand corner of an application window's title bar, a new space is generated for the application

Set Mission Control shortcuts

1) Choose Apple menu > System Preferences, then click Mission Control.
2) In the Keyboard and Mouse Shortcuts section, open the pop-up menus to choose keyboard shortcuts, mouse shortcuts, or both. If you have a multiple-button mouse, you see two columns of pop-up menus in this section.
3) Click Hot Corners, then open any of the pop-up menus and choose actions to perform when you move the pointer to a screen corner.
  After you set an active corner, move your mouse to that corner of the screen to see the result.

source1   —   source2   —   source3
Comment: I am aware of all of these options. The question is asking how to do this with a keyboard shortcut.


What is the difference between ' and " in PHP?

Question:
Possible Duplicate:
PHP: different quotes?

Simple question:
What is the difference between ' and " in php? When should I use either?
Comment: Dupe: http://stackoverflow.com/questions/1318028/php-different-quotes
Comment: The larger a repository of stuff gets the harder it is to actually find something. The absolute worst example I've seen so far is Mozilla's bug tracker. Stack Overflow gets close with some topics where you can't really be sure of the terms used and even less sure of the search terms to use to find it.
Comment: Please search stackoverflow (the searchbox is in the top right corner) before posting a new question.
Comment: i did, actually. apparently just not well enough. thanks
Comment: @Johannes Rössel, Google helps with searching for me at times.  =]
Answer: Basically, single-quoted strings are plain text with virtually no special case whereas double-quoted strings have variable interpolation (e.g. echo "Hello $username";) as well as escaped sequences such as "\n" (newline.)
You can learn more about strings in PHP's manual.
Answer: There are 3 syntax used to declare strings, in PHP <= 5.2 :

single quoted
double quoted
heredoc

With single quotes :

variables and escape sequences for
  special characters will not be
  expanded

For instance :
echo 'Variables do not $expand $either';

Will output :
Variables do not $expand $either

With double-quotes :

The most important feature of
  double-quoted strings is the fact that
  variable names will be expanded.

For instance :
$a = 10;
echo "a is $a";

Will output :
a is 10

And, with heredoc :

Heredoc text behaves just like a
  double-quoted string, without the
  double quotes. This means that quotes
  in a heredoc do not need to be
  escaped,

For instance :
$a = 10;
$b = 'hello';

$str = <<<END_STR
a is $a
and "b" is $b.
END_STR;

echo $str;

Will get you :
a is 10
and "b" is hello.

Answer: Any variables inside a " quoted string will be parsed. Any variables in a ' quoted string will not be parsed, and will be shown literally as the variable name. For this reason, ' quoted strings are very slightly faster for PHP to process.
$test = 'hello';
echo "this is a $test"; // returns this is a hello
echo 'this is a $test'; // returns this is a $test

I'd say use ' quotes unless you want variables inside your strings.
Answer: The difference is, strings between double quotes (") are parsed for variable and escape sequence substitution. Strings in single quotes (') aren't.
So, using double quotes (") you can do:
$count = 3;
echo "The count is:\t$count";

which will produce
The count is:<tab>3

The same in single quotes returns the literal string.
Also, the characters that need to be escaped. If you have a string like:
'John said, "Hello"'

you would probably use single quotes, to avoid having to escape the quotes in the string and vice-versa.
Answer: " interprets escape characters and variables. ' doesn't do either.
Answer: In one word: when you would like to all your special chars (like \n) and varables (like $number) be noticed and process.


Why did Beleg choose the sword, Anglachel, to wield in his quest for Turin?

Question: When Beleg asked Thingol to let him go find Turin, Thingol let him take any sword in the realm (save his own). Beleg chooses Anglachel, although there were probably plenty of nice Elven swords to choose from. Why is that? (Yes, I know that it was fated to be so; I mean at that time, why make that choice?)
Answer: Beleg's request was for a good sword:

'I ask then for a sword of worth,' said Beleg; 'for the Orcs come now too thick and close for a bow only, and such blade as I have is no match for their armour.'

And Anglachel was a very good sword indeed:

Then Beleg chose Anglachel; and that was a sword of great worth, and it was so named because it was made of iron that fell from heaven as a blazing star; it would cleave all earth-delved iron.

There are two key points here:

Beleg's primary motivation in choosing a sword was to have one that could pierce Orcish armour.
Anglachel could do this.

In fact, the second passage I quote goes on to say:

One other sword only in Middle-earth was like to it.

And that other sword was not in Thingol's possession at the time.  So it's quite obvious that Anglachel wasn't just a typical "nice Elven sword" but was actually the best sword available, the best tool for the job Beleg wanted to do.
(All quotes from the Silmarillion, Of Túrin Turambar)
Comment: Were Middle-Eath swords steel or iron?
Comment: Well, it was just barely an Elven sword at all, as Eol was a pretty unique guy.
Comment: @DVK - I'm sure that some were steel, some iron, some bronze, and different metals were probably used by different peoples at different points of history.  Letter 187 suggests that Tolkien didn't do metallurgy so I don't think there's going to be a single definitive answer to that.


LEDS and Resistors

Question: So this may seem simple but I have wired up 6 LEDS (3 pairs of 2) with each of the pairs in parallel. Sorry if that's confusing. Anyway I am using the TSAL7400 IR LED and with 1A (which is what I am getting) it has a typical forward voltage of 2.6V and I have 3 of these in series and hence I am using 7.8V. In saying this I am supplying 9V hence I need a resistor to drain the remaining 1.2V so the LEDS don't blow. Using V = IR it should be simple and a 1.2ohm resistor should do the trick. However when testing the resistor starts smoking. Is there some practical application I am missing because theoretically it should work?
Comment: The way to not be confusing is to provide a schematic diagram.
Comment: While it would be nice to know if the *desired* ampere of current is per LED or the total for the two LEDs in parallel in each set, the circuit topology is entirely clear from the wording, and fully sufficient for this question.
Answer: LEDs have a negative temperature coefficient of resistance, so in order to prevent current hogging You shouldn't use a single resistor to ballast parallel strings of resistors because of the different forward voltages of the strings.
Instead, you should provide a ballast for each string and then connect each series string in parallel with the other(s).
The value of the resistor can be found by using:
$$ R = \frac{Vs - (n\times Vf)}{Iled}, $$
In your case that would be:
$$ R = \frac{9V - (3\times 2.6V)}{1A} = 1.2 \text{ ohms} $$
and the power the resistor would dissipate would be:
$$P = Iled^2 R = 1A^2 \times 1.2 \Omega = 1.2 \text { watts} $$
1.2 ohms is a standard E24 value, and Yageo makes a nice little 2 watt metal oxide film resistor which is available from Digi-Key for about USD 0.29 each.
Keep in mind though, that resistor is for one series string only, so you'll need another one for the other string of three series LEDs.
Answer: You might be using too small a wattage (power dissipation) resistor. For example a 0.5W 1/2W resistor. That will get very hot.
The resistor must be able to dissipate the power, otherwise it will increase its operating temperature, possibly until it fails.
Power = Voltage x Current.
1.2V x 1A = 1.2W.
So I would use a 2W resistor to give a bit of headroom. Is your resistor that wattage?
You could put 4 smaller power resistors in parallel (or series) to share the power dissipation, and get them into a reasonable operating power range.
Comment: I am not to sure. We have a "shop" on campus that I just bought the 1.2ohm resistor from, I will have to look at the wattage.
Comment: It is 0.6W so thats the problem. Thanks for the help
Comment: Work out the Ohm's law for three 0.6W resistors in parallel (it'll likely be easier to get values above 1 ohm), and that should work okay.

LEDS and Resistors


My dedicated ip address is blacklist for spam email sending

Question: My question is that How can I know that which client's computer is infected? so that I can block him. I am running more than 300 websites on that server. that is really ruining the business. Could someone advice me how to tract that domain or computer? maillog does not provide sufficient information.
Comment: Probably difficult to track it down now. But for the future, why not have a wrapper script for sendmail, which adds sender information, like vhost and stuff into a database. With that you could easily find out who to blame.
Answer: Given that you are running websites on the system, you could also have a compromised client script. A spammer can submit data to the script via HTTP, and the script will happily send mail on behalf of the spammer.
The easiest suggest I can give you is to correlate your Apache logs and your message injection logs via timestamp. Look for a timestamp in your Apache access logs around the same time as the message submission (same or a couple of seconds before) and look for a successful post. If you find a few consistent entries, look at that script and see if it sends email. If it does, you probably have your culprit.
If this server also runs a mail server, require SMTP authentication and then read your logs.
Answer: You could require authentication for SMTP, and provide unique username for each site. Also, disallow direct emailing from that host.

Install SMTP server (for example postfix)
Configure authentication, add users and deliver usernames/passwords to website owners
Wait appropriate time
Block all traffic to SMTP (port 25), except from your postfix processes.

Otherwise it's impossible to tell who is sending emails. If you allow direct connections, everyone can send their spam messages directly to receiving server, and you won't get anything to your email logs.


How to update my drupal launched sites

Question: I want to ask about how to update Drupal 7 sites. My site is divided into 2 phases, after launching and adding data in the first phase, I now want to update the second phase. I have a lot of new content type, Views and panels. I added a new language and blocks, a lot of things. I can export panel and view but what about the content type, language and any permission or configuration that saved into database.
Answer: Use the Features module to export content types and permission. You can go to admin/structure/features/create and the select the features you want to export.
Answer: The Features module is your friend in deployment. However, there are some other things that are not supported by Features, and which require you to create an install script.

How to update my drupal launched sites


How is lift generated due to Coanda effect?

Question: I can understand the generation of lift via Newton's 3rd law but I cannot understand via Coanda effect. I watched a video on YouTube that said that for the upper side of the aerofoil the pressure will be lower near the surface because the fluid has to 'stick' on the surface and they said that on the lower side the pressure must be higher for the same reason. But how can the pressure be higher on the lower side due to the same reason. Also fluid sticks on the surface due to viscosity so why the Coanda effect ?? Please check this link.
m.youtube.com/watch?v=w78JT6azrZU
Comment: [*It's important not to confuse wing behavior with coanda effect.*](https://www.av8n.com/how/htm/spins.html#sec-coanda) The coanda effect has to do with putting energy into the boundary layer. Normally, wings do not do that. Either way, Newton's laws apply. Also, check out [*Kutta Condition*](https://www.av8n.com/how/htm/airfoils.html#sec-circulation).
Answer: The operative idea  here seems to be the exploitation of convex, or at least  "tightly" curved surfaces, especially with regard to aircraft wing sections. From reading various articles, it seems to be quite easy to misjudge if and when the Coandă effect occurs, even to the extent of confusing the Bernoulli effect with the Coandă effect.

Image source and Text Extract Thermofluids UK:

The  Coandă effect is the phenomena in which a jet flow attaches itself to a nearby surface and remains attached even when the surface curves away from the initial jet direction. In free surroundings, a jet of fluid entrains and mixes with its surroundings as it flows away from a nozzle.
When a surface is brought close to the jet, this restricts the entrainment in that region. As flow accelerates to try balance the momentum transfer, a pressure difference across the jet results and the jet is deflected closer to the surface - eventually attaching to it.
Even if the surface is curved away from the initial direction, the jet tends to remain attached. This effect can be used to change the jet direction. In doing so, the rate at which the jet mixes is often significantly increased compared with that of an equivalent free jet.

Quite a few aircraft have been built with extra engines specifically designed to direct flow over the top of the wing, where the camber is most pronounced. Air directed  over the wing can be "bent down" towards the ground using flaps and a jet sheet blowing over the curved surface of the top of the wing for a, usually temporary, high lift effect. This may be particularly applicable in regions where mountainous terrain restricts runway length.
The Coandă effect augments the normal role of flaps by significantly increasing the velocity gradient in the shear flow in the boundary layer over the uper surfae of the wing.  In this velocity gradient, particles are blown away from the surface, thus lowering the pressure in that region.
According to Wikipedia, the Coandă effect is often  misapplied to situations where it is not the cause, such as the well known "trick" of holding the curved side of a spoon close to a running tap, where surface tension is the cause of the pull into the stream of water.
If you look at your illustration above, because of the particular profile of the wing section, the lower surface is far less curved than than the upper one. If you look out of the windows of any modern aircraft as it extends its flaps, the downwards curve is obvious and this supports the idea mentioned above of fitting blown air devices to exploit this convex surface.

But how can the pressure be higher on the lower side due to the same reason. Also fluid sticks on the surface due to viscosity so why the Coanda effect.

I think the illustration in your post above,  or possibly the intreperation of it, may be incorrect. The bottom surface is obviously not where the greatest camber appears, so pressure differences will occur.
From Coandă Effect Wikipedia

To compare experience with a calculation we refer to a two-dimensional plane wall jet of width h along a circular wall of radius r. A wall jet follows a flat horizontal wall, say of infinite radius, or better whose radius is that of the Earth, without separation because the surface pressure as well as the external pressure in the mixing zone is everywhere equal to the atmospheric pressure and the boundary layer does not separate from the wall.
With a much smaller radius (12 centimeters in the image) a transverse difference arises between external and wall surface pressure, creating a pressure field depending upon h/r, the relative curvature. This pressure field can appear between a zone around and after the origin of the jet where it gradually arises, and a zone before the point where the jet boundary layer separates at atmospheric pressure where it gradually decreases.

Image Source: Marcel kadosch - Own work.
Surface pressure of a wall jet along a circular wall

Experiments made in 1956 at a Reynolds number 106 and various widths h show the pressure measured along a circular wall, entered at a horizontal distance from the origin of the jet.
Above a critical h/r ratio of 0.5 only a local effect formed by these two zones each extending over a small angle 9° is observed. This is not a Coandă effect. If the h/r ratio is smaller than the critical value 0.5, an additional deflection that can validly be called a true Coandă effect occurs in between at a nearly constant pressure, as in a conventional wall jet.

Finally, the NOTAR (no tail rotor) equipped  helicopters used the effect to replace the usual shaft driven tail rotor.

Obviously, the word "hug", in the illustration is a reference to the effect described at the start of this answer.
Answer: If the question is :Lift of an airfoil and Coanda effect, the answer is implicit in my contribution to: Wikipedia the free encyclopedia: Coanda Effect: Conditions for existence.
Coanda Effect has nothing to do with airfoil lift, it is a purely inertial effect thoroughly explained by an inviscid irrotational theory involving  no vortex at all, bounded or not. The boundary layer  of this inviscid flow and the turbulent mixing with ambient air are the only places for viscosity effects which do not produce any Coanda Effect: on the contrary  their influence is to put a limit and finally impede the production of a Coanda Effect. Marcel Kadosch
Comment: *Coanda Effect: Conditions for existence. Coanda Effect has **nothing to do with airfoil lift, it is a purely inertial effect** thoroughly explained by an inviscid irrotational theory involving no vortex at all, bounded or not.* Will you please comment [this](https://www.youtube.com/watch?v=AvLwqRCbGKY) demonstration? It shows that the water flow from the tap pull the plastic spoon as long it touched, so do with the wind blow from the pipe he blown.
Answer:
As shown in the figure, we define that the curvature center direction of the streamline is the interior of the streamline and the opposite direction is the exterior of the streamline. Looking at the streamline at the bottom of the wing, we can see that the wing is outside the streamline. Therefore, the pressure of the airflow increases because the airflow is changed by the compression of the wing. Looking at the streamline at the top of the wing, we can see that the wing is inside the streamline. Wings are pulled to change the direction of the flow, so the pressure of the flow decreases. So the wing has a pressure difference, so the wing can get lift.

Therefore, the lift of the wing is not generated by Coandeffector, because Coandeffector can not be without viscosity, and the lift of the wing can be generated without viscosity.
Answer: If you can understand the generation of lift via Newton's 3rd law; then applying the  Coanda effect is simple.
Just to be clear, the Newtonian explanation of flight: The airplane flies through a mass of air ('m') that the wings accelerate ('a') downwards, to create a downward force (Force = ma). The 'equal & opposite' upward force generates lift. https://youtu.be/GAAOYOmtEQI
Demonstrate the Coanda effect by an example: If an airplane's flat wings are replaced with curved wings. The Coanda effect on the top-side of the curved wings, increases the mass of air ('m') accelerated downwards; this then increases the downward force (F = ma).  In turn, this increases the 'equal & opposite' upward force (lift).
Answer: Most of the lift on the top side of the airfoil is caused because of the decrease of atmospheric pressure (over 1000 lbs. per. square foot) pushed away by incoming air, at an angle of attack, from the bottom of the wing.
The top of the wing creates appx. 67% of the lift!


Is daily vocal workout a must for a professional singer?

Question: It's no doubt that being a professional singer requires a certain extent of innate ability/talent. But even with that talent, does that singer need to practice every day? If yes, what is the purpose of practicing and what are some kinds of exercises that a singer should focus on?
Comment: In my opinion/experience, it's the opposite. No amount of talent is enough to make it so you don't have to practice. But enough practice can make up for a lack of talent.
Comment: Related questions: https://music.stackexchange.com/questions/4611/on-being-a-musician-and-doing-weightlifting and https://music.stackexchange.com/questions/115803/how-long-can-a-professional-trumpet-player-go-without-practicing-before-seeing-d/115811#115811.
Comment: Did someone tell you you need to practice?
Answer: This varies from one person to another.  In the cello world, Rostropovich was famous for not having to practice much.  But most cellists do need to practice almost every day.  Extrapolating, I imagine that some rare singers would be the rare bird like Rostropovich.  For vocalises that make sense for you, please consult a voice teacher you trust.
Answer: Use it or lose it. An oft quoted saying. Just as true of an athlete, as a vocalist, as a surgeon. Whether one would lose one's talent in a day is debatable, therefore a matter of opinion, therefore not something acceptable on this site.
However, most professional singers would not let many days go by without singing something, even if they were cooking their meal, or better still, having a bath! It's not like they need to go somewhere to practise without bothering others, or set up their instrument, etc.
Professional singers will be singing at venues, or rehearsing with accompanists anyway, so there may well be not many times when they're not singing. On those odd occasions when nothing much is happening, they'll probably do some warm-up exercises - scales, making strange noises, at least keeping their singing muscles and other body parts supple. Why wouldn't they? Certainly when a concert or such like is imminent, there would be lots of singing.
Then there's the learning of lines of words. Why try to learn them as if speaking, when they need the melody? Singing also incorporates breathing techniques, which will go slack in no time, so practising daily seems to be a great way to keep things on the boil. Athletes need to (are expected to) hone their skills on a daily basis, why not singers? I know trumpet players who lose their embouchure after only a few days of not playing, and used to coach a world champion water skier who came back from a week's holiday with his edge quite lost. Use it or lose it!
As far as exercises are concerned - as with choirs, a warm-up is a good thing to do, if nothing else. And looking at new material, not necessarily polishing it, could come after. But all this will depend a lot on how far away the next gig is...


How can I create a wall with random bumps?

Question: I am trying to create a wall in blender that looks like the picture but I don't know how to make the wall create the random bumps. How can I do that?
The wall I am trying to create.
Answer: If you're ok with using a shader, something like this can be accomplished by a single Noise Texture, run through a ColorRamp to give a harsh cutoff to the tops which forms the flat sections.
This is just a simple example - if you want more variation in size, you can combine different noise textures of different scales until it's more to your liking.
Remember to turn on ambient occlusion in the render properties panel.
Comment: Note that there are two ways to do this, one with bump map (shading only, no actual 3d displacement) or by using displacement in the material output, in which you can choose to have bump or actual 3D.
Comment: also might want to somehow offset the noise (?) so more of the surface is flat (like in the OP)


What are some uses of oxidative/reductive power inside cells?

Question: I know respiration and photosynthesis are based on oxidation and reduction, and the formation of NADH and NADPH in them is very important for many cell processes. I know that NADPH, for example, is used in the CBB cycle to fix carbon. However where else are oxidation and reduction reactions needed in cells? I can think of an example for oxidation: getting rid of toxic products. For example, alcohol dehydrogenase in the liver oxidises alcohol to acetaldehyde. However I can't think of much else, and i'm especially stuck on ehy reductive power is useful in cells.
Answer: This topic is quite broad, excluding energetic metabolism, there are still many reactions that use redox equivalents, whether NADH, NADPH, or FADH. Here are some paradigmatic illustrations.
Xenobiotic metabolism

Oxydation of substrate : as you mentioned, alcohol to aldehyde to carboxylic acid. Generate reducing power. (The alkane oxydation shown below occurs in bacteria)

Mono-oxygenation : hydroxylation of a substrate with $O_2$, with the other oxygen atom reduced to water. This proceeds as follow with CYP450 enzymes :

Regeneration of oxided gluthatione

Anabolic metabolism
Basically every time there is a need to create/remove a double bond, or move from carbonyl to aldehyde to alcohol and back, redox equivalent are used.

Fatty acid elongation : as this proceeds with acetyl-CoA as carbon source, intuitively one sees the need to reduce the carbonyl to obtain an alkane chain.

HMG-CoA Reductase (HMGCoAR) catalyses the commited step in cholesterol synthesis.

Synthesis of prostaglandins from arachidonic acid. (More generally, any lipidic mediator)

There are many, many more examples. You may want to check out the Wikipedia page for NADH, NADPH, FADH, or the list of enzyme that use them (1, 2, 3)
All illustrations from Biochemical Pathways, G. Michal & D. Schomburg, 2nd edition, Wiley


View newest note in long text field on a LIST

Question: I'd like to have a long text field to enter notes in, but I only want to see the last 3 notes I have made in the field. I want to keep all content ever put in the field, and view it as needed but not by default.
Comment: What kind of list is this in?
Answer: One thing that you can do is turn on versioning for the list. Then you can create a "Notes" column that is set to multiple lines of text and select Yes for "Append changes to existing text." If you don't want to show the notes in the list, then you can modify the view and deselect the Notes column.


How can I 'select to end of file' in Notepad?

Question: Temporarily stuck with Notepad, I'd like to know if there is any better or quicker way of selecting from here to the end of the file than moving the mouse to the bottom of the screen and then vigorously from side to side (which is more exercise than I expect to get at a computer).
Comment: All of my exercise comes from a computer so I better take what little I can find (:
Comment: Did you try the "End" button and "Ctrl"+"End"?
Answer: Place the cursor at the start of your selection then:
Ctrl + Shift + End
To select to the end of notepad.
Comment: @Brian Hooper, no problem. It's a fairly ubiquitous keyboard short cut. Ctrl + Shift + Home will take you to the start too.
Comment: To elaborate, End alone means go to the end of the line, Ctrl+End means go to the end of the line. Adding Shift to the mix selects along the way (as it would with just Shift and arrow keys or even the mouse)
Comment: Thanks, Phydaux. It would never have entered my head to try that.
Comment: On my laptop, where end is doubled on the right arrow key instead,  I additionally needed `fn` key for end of file.
Comment: @Alex I think you mean "file" in your second sentence ;) @Brian it works with other combinations of Ctrl and Shift, too. Ctrl+Right will move along words, for example. Holding Shift while making movements will select the text that you are moving over. Ctrl+Shift+Right will select a word at a time. Shift+PgDown will select from the current cursor position down a page. Play around with it.
Comment: @Corey: Maybe ;)
Comment: Works with Notepad++ as well
Answer: FYI in OSX you have to use the alternative key command like so:
control + fn + →
This arose when I was remote desktoping into a Windows 2000 server from my OSX laptop.
Comment: @leinad13 - I would typically not do this, but wasn't finding results when I googled, hence why I posted it.
Comment: I think this is a bit irrelevant to this question, unless you want to post the possible combinations for all computer systems :)
Answer: In Microsoft Word on Mac, it took me several tries but this worked:
Shft + Fn + Cmd + Right Arrow
...to select to end of file and delete.
Comment: The question doesn't mention a Mac.
Answer: On Windows, it is simpler.

Place your cursor where you want to begin selection.
Go to this line and press Context Menu (right-click-mouse)|Begin/End Selection. Nothing is visually indicated but don't worry, selection start has been set.
Go to the line in the text where you want your selection to end and again press Context Menu|Begin/End Selection. The text block is now selected and this is visually indicated.
Do whatever you need with the text block.
Comment: It seems to me that Ctrl + Sift + End is simpler.


How to import a SQL Server .bak file into MySQL?

Question: The title is self explanatory. Is there a way of directly doing such kind of importing?
Comment: also [covered on dba.stackexchange](http://dba.stackexchange.com/q/20078/1580)
Comment: Epic question bro! I finaly managed to import the bak file from my crappy hosting provider where all SQL tools were broken.
Answer: The .BAK files from SQL server are in Microsoft Tape Format (MTF) ref: http://www.fpns.net/willy/msbackup.htm
The bak file will probably contain the LDF and MDF files that SQL server uses to store the database.
You will need to use SQL server to extract these. SQL Server Express is free and will do the job.
So, install SQL Server Express edition, and open the SQL Server Powershell. There execute sqlcmd -S <COMPUTERNAME>\SQLExpress (whilst logged in as administrator)
then issue the following command.
restore filelistonly from disk='c:\temp\mydbName-2009-09-29-v10.bak';
GO

This will list the contents of the backup - what you need is the first fields that tell you the logical names - one will be the actual database and the other the log file.
RESTORE DATABASE mydbName FROM disk='c:\temp\mydbName-2009-09-29-v10.bak'
WITH
   MOVE 'mydbName' TO 'c:\temp\mydbName_data.mdf',
   MOVE 'mydbName_log' TO 'c:\temp\mydbName_data.ldf';
GO

At this point you have extracted the database - then install Microsoft's "Sql Web Data Administrator". together with this export tool and you will have an SQL script that contains the database.
Comment: The problem is that SQL Server 2008 Express Edition can only handle database files that are 10GB and smaller. I have a 30GB file I have to work with. The Internet connection at work is too slow to download the 4GB .iso image of the full SQL Server 2008 R2 version, which I get for free from dreamspark.com as a student. So I have this exact same question.
Comment: The first install software link is broken
Comment: Are you sure about the file format being MTF? When I try to use the [command-line mtf-tool](http://layton-graphics.com/mtf/) to list the contents of a `.bak` file, I get an error...
Comment: @MikhailT.when I wrote this answer nearly 10 years ago I'm fairly sure that MTF was being used; this may have since changed.
Answer: MySql have an application to import db from microsoft sql.
Steps:

Open MySql Workbench
Click on "Database Migration" (if it do not appear you have to install it from MySql update)
Follow the Migration Task List using the simple Wizard.
Comment: @Sean, if you see a problem with MySQL Workbench then file a bug report. Migration is a complicated matter, so implementations need a few rounds to become stable.
Comment: MySql Workbench sucks. It cannot handle character encodings good enough
Answer: In this problem, the answer is not updated in a timely. So it's happy to say that in 2020 Migrating to MsSQL into MySQL is that much easy. An online converter like RebaseData will do your job with one click. You can just upload your .bak file which is from MsSQL and convert it into .sql format which is readable to MySQL.
Additional note: This can not only convert your .bak files but also this site is for all types of Database migrations that you want.
Comment: Note we paid for RebaseData to have access to the Premium features (as Free only lets you do very small files) and we haven't been able to get RebaseData working with our nearly 35GB .bak file no matter what we tried: CLI tool, upload via API, etc. It pretty much ran out of memory everywhere (even though our server has 32GB memory and we gave it all we could)
Comment: Also worth noting they have a '7 day money back guarantee' if you can't convert your files and even though I emailed support with a very detailed explanation of everything we tried and hoping they'll be able to have a look on their side at the uploaded file via the API we still haven't heard back from them in over 2 weeks.
Comment: RebaseData has a 10 MB limit. This is not clear until after the .bak is uploaded and 'conversion' is completed. My suggestion is to avoid.
Answer: I did not manage to find a way to do it directly.
Instead I imported the bak file into SQL Server 2008 Express, and then used MySQL Migration Toolkit.
Worked like a charm!
Comment: The 'Database Migration' functionality is now part of [MySQL Workbench](http://dev.mysql.com/downloads/tools/workbench/)
Comment: Yes the import worked fine for me. Right click on the 'databases' node click import- First select the BAK file then choose database - It automatically gets the database name from the loaded .bak file and puts it into the list.(to create the new database) Select that and click import.. Woohoo - 6 days later!
Comment: MySQL Migration Toolkit has reached EOL. see http://dev.mysql.com/downloads/gui-tools/5.0.html
Answer: Although my MySQL background is limited, I don't think you have much luck doing that. However, you should be able to migrate over all of your data by restoring the db to a MSSQL server, then creating a SSIS or DTS package to send your tables and data to the MySQL server.
hope this helps
Answer: I highly doubt it.  You might want to use DTS/SSIS to do this as Levi says.  One think that you might want to do is start the process without actually importing the data.  Just do enough to get the basic table structures together.  Then you are going to want to change around the resulting table structure, because whatever structure tat will likely be created will be shaky at best.
You might also have to take this a step further and create a staging area that takes in all the data first n a string (varchar) form.  Then you can create a script that does validation and conversion to get it into the "real" database, because the two databases don't always work well together, especially when dealing with dates.
Answer: SQL Server databases are very Microsoft proprietary.  Two options I can think of are:

Dump the database in CSV, XML or similar format that you'd then load into MySQL.
Setup ODBC connection to MySQL and then using DTS transport the data.  As Charles Graham has suggested, you may need to build the tables before doing this.  But that's as easy as a cut and paste from SQL Enterprise Manager windows to the corresponding MySQL window.
Answer: The method I used included part of Richard Harrison's method:

So, install SQL Server 2008 Express
  edition,

This requires the download of the Web Platform Installer "wpilauncher_n.exe"
Once you have this installed click on the database selection ( you are also required to download Frameworks and Runtimes)
After instalation go to the windows command prompt and:

use sqlcmd -S \SQLExpress (whilst
  logged in as administrator)
then issue the following command.
restore filelistonly from
  disk='c:\temp\mydbName-2009-09-29-v10.bak';
  GO This will list the contents of the
  backup - what you need is the first
  fields that tell you the logical names
  - one will be the actual database and the other the log file.
RESTORE DATABASE mydbName FROM
  disk='c:\temp\mydbName-2009-09-29-v10.bak' WITH     MOVE 'mydbName' TO
  'c:\temp\mydbName_data.mdf',     MOVE
  'mydbName_log' TO
  'c:\temp\mydbName_data.ldf'; GO

I fired up Web Platform Installer and from the what's new tab I installed SQL Server Management Studio and browsed the db to make sure the data was there...
At that point i tried the tool included with MSSQL "SQL Import and Export Wizard"  but the result of the csv dump only included the column names...
So instead I just exported results of queries like "select * from users" from the SQL Server Management Studio
Answer: For those attempting Richard's solution above, here are some additional information that might help navigate common errors:
1) When running restore filelistonly you may get Operating system error 5(Access is denied).  If that's the case, open SQL Server Configuration Manager and change the login for SQLEXPRESS to a user that has local write privileges.
2) @"This will list the contents of the backup - what you need is the first fields that tell you the logical names" - if your file lists more than two headers you will need to also account for what to do with those files in the RESTORE DATABASE command.  If you don't indicate what to do with files beyond the database and the log, the system will apparently try to use the attributes listed in the .bak file.  Restoring a file from someone else's environment will produce a 'The path  has invalid attributes.  It needs to be a directory' (as the path in question doesn't exist on your machine).
Simply providing a MOVE statement resolves this problem.
In my case there was a third FTData type file. The MOVE command I added:
MOVE 'mydbName_log' TO 'c:\temp\mydbName_data.ldf',
MOVE 'sysft_...' TO 'c:\temp\other';

in my case I actually had to make a new directory for the third file.  Initially I tried to send it to the same folder as the .mdf file but that produced a 'failed to initialize correctly' error on the third FTData file when I executed the restore.
Answer: The .bak file from SQL Server is specific to that database dialect, and not compatible with MySQL.
Try using etlalchemy to migrate your SQL Server database into MySQL. It is an open-sourced tool that I created to facilitate easy migrations between different RDBMS's.
Quick installation and examples are provided here on the github page, and a more detailed explanation of the project's origins can be found here.
Comment: etlalchemy  is not maintained
Comment: Last commit was over 5 years ago. I would use it with a grain of salt unless you're keen on fixing problems and hopefully forking it with fixes.


NHibernate Event Listener Audit

Question: I am working on a small project that requires an audit trail.
I have hooked into IPostUpdateEventListener and have a basic audit trail working for simple objects.
<code>public class Foo
{
      public virtual int Id { get; set; }
      public virtual string PropName { get; set; }
      public virtual ISet<Boo> Boos { get; set; }
}

public class Boo
{
      public virtual int Id { get; set; }
      public virtual string PropName { get; set; }
      public virtual Foo Foo { get; set; }
}
</code>
When I want to change the foreign key of Boo load in the relevant Foo object and do a SaveOrUpdate - This works fine with the audit trail.
WHen I get the event listener I check for dirty values and the only dirty property will be that Foo object but problem is that the ISet Boos in Foo isn't initiated. so will throw an error of accessing a property that is lazy loaded.
If I change other properties other than entity it works fine, I just can't seem to do it for Properties that are of another object.
Is there a better way to update the parent of the Boo?
As I want to display the display the changed Foo ID in my audit trail to show that the Foreign key changed.
Cheers
Answer: You can use Envers! We use it with success.

NHibernate Event Listener Audit


Changing Word's default document zoom

Question: Word for Mac (Office 2011) defaults to a ridiculous 100% document zoom, that leaves more empty margin than readable text. Is there a way of changing this to something that usable, such as page width?
Answer: View > Zoom > Page Width
As to the question of how to get that to be default.  I'm not sure.
Answer: To set a default zoom for all new documents the procedure isn't user friendly (I'm french so I'm not sure about the names between "" but the tutorial cannot make you do an error):

Open the Finder, "Go" menu -> "Go to the folder" and paste <code>~/Library/Application Support/Microsoft/Office/</code>
In this folder you should find a folder "Templates" with a file named "Normal.dotm" in it, drag the folder "Templates" in your "Favorites" sidebar.
Open Word 2011, "File" menu -> "Open" and choose "Normal.dotm" by using the "Templates" folder in your "Favorites".
The file is empty, it's normal. "View" menu -> "Zoom", select what you want (125% is good on my 13" MBA).
Save the file and close it, now all your new files are with a default zoom of 125%.

You can remove "Templates" from your favorites, you shouldn't have to use it anymore!
Answer: In OSX Yosemite, after step 1, you may not see the shortcut in the Favorite bar when you try "File" menu -> "Open" (at least in my case).
However, you can make an alias of the "Office Template" folder or the "Normal.dotm" file, and place the alias in desktop. Then open the "Normal.dotm" file from there. Then follow step 4. This alternative works for me.

Changing Word's default document zoom


Non trivial solutions of $g\circ f-f\circ g=g\circ f\circ g$

Question: While thinking of perfect numbers, I came across the functional equation $g\circ f-f\circ g=g\circ f\circ g$ where the unknowns $f$ and $g$ are functions from $\mathbb{R}$ to itself. I only know one non trivial solution: $(f,g)=(x\mapsto 2^x,x\mapsto x-1)$. Can someone tell me whether it is the only one or not? Thanks in advance.
Comment: If $g$ is invertible, the condition is equivalent to $f\circ h-h\circ f=f$ (where $h=g^{-1}$). And then if $f=k\circ k$ for some invertible $k$ it is equivalent to $k\circ h-h\circ k = \text{id}$.
Comment: @xavierm02 this is considered a *trivial* solution
Comment: $g = \Bbb 0$, $f(0)=0$
Comment: I don't know if this helps, but $g\circ f=(I+g)\circ f\circ g$.
Comment: @Hagen von Eitzen: I know nothing about Lie algebras, but the equation $k\circ h-h\circ k=id$ might be related to this theory.
Comment: I assume there are no nontrivial analytic solutions
Answer: Let $g\colon \mathbb R\to\mathbb R$ be any fixpoint-free homeomorphism with inverse $h$ and $g(0)<0$ (hence $h(0)>0$). Then $k\colon x\mapsto x+h(x)$ is also invertible.
Let $x_0=0$ and recursively $x_{n+1}=h(x_n)$, $x_{n-1}=g(x_n)$. Note that $\lim_{n\to\pm\infty}x_n=\pm\infty$ as otherwise we'd have convergence to a fixed point of $g$.
Let $\phi\colon[x_0,x_1]\to\mathbb R$ be any continuous function with $\phi(x_1)=k(\phi(x_0))$.
Proposition. For $n\in\mathbb N$ there exists a unique continuous function $f_n\colon[x_{1-n},x_n]\to\mathbb R$ with $f_n|_{[x_0,x_1]}=\phi$ and $f_n(h(x))=k(f_n(x))$ whenever $\{x,h(x)\}\subseteq [x_{1-n},x_n]$.
Proof: For $n=1$ this follows with $f_1=\phi$.
Assume we have already shown existence and uniqueness for $f_{n-1}\colon[x_{2-n},x_{n-1}]\to\mathbb R$.
Then we must define
$$f_n(x)=\begin{cases}f_{n-1}(x)&\text{if }x_{2-n}\le x\le x_{n-1}\\
k(f_{n-1}(g(x))&\text{if }x_{n-1}\le x\le x_n\\
k^{-1}(f_{n-1}(h(x)))&\text{if }x_{1-n}\le x\le x_{2-n}\\\end{cases} $$
by uniqueness on the smaller interval and the required functional equation.
Fortunately, we can define this way and obtain a continuous function (because $f_{n-1}(x_{2-n})=k^{-1}(f_{n-1}(h(x_{2-n}))$ and $ f_{n-1}(x_{n-1})=k(f_{n-1}(g(x_{n-2}))$ by induction hypothesis) that satisfies the condtion. $_\square$
Then it is well-defined to let $f(x)=f_n(x)$ for any $n$ with $x_{1-n}\le x<x_n$. Then $f\colon \mathbb R\to\mathbb R $ is continuous with $f|_{[x_0,x_1]}=\phi$ and $f\circ h=k\circ f$, i.e. $f\circ h-h\circ f=f$. We conclude that
$$\tag1g\circ f-f\circ g = g\circ(f\circ h-h\circ f)\circ g = g\circ f\circ g.$$
Conclusion. For any $g$ and $\phi$ as above there exists a unique continuous $f$ such that $(1)$ holds.
Remark. We could do the same with $g(0)>0$. If we drop the fixed-point-freeness condition, we can argue as above for all intervals bounded by consecutive fixed points. One has to take care a bit to check the continuity of $f$ at the fixed-points in this case: If $x$ is a fixed point of $g$, we need to have $f(x)=0$ and this restricts the choice of $\phi$ (possibly too much). Or we recall that continuity wasn't even among the requirements from the problem statement.
Comment: Thank you very much for this beautiful answer. Conversely, do we know $\phi$ and $g$ if we know $f$ (supposed to be continuous)?
Answer: There are quite a lot of solutions to this. To simplify the setting a bit, set $f := id$. Then the equation becomes $g \circ g = 0$, which has a number of non-trivial solutions, e.g.:    $g(x) = -x$ for $x \geq 0$ and $g(x) = 0$ for $x \leq 0$.
Edit: Starting from the choice of $g$ and revisiting the choice of $f$, note that $g$ also works just fine together with $x \mapsto 2x$ in place of $f$, or any other positive real in place of $2$.
Comment: Yes, but to me it sounds like a trivial solution to set $f=id$.
Comment: This is a very subjective matter, of course, but I would only call a solution trivial if either both parameters are set to "obvious" examples, or if setting one parameter to an obvious example removes all constraints on the second one. However, I've modified my answer to provide a solution with two non-trivial components


Where does Nautilus-actions configuration tool save actions?

Question: I want to use a command line, but don't know how this configuration looks like and where to save it.
Comment: `~/.local/share/file-manager/actions/`
Answer: According to the source code, it uses GConf to store configuration. Gconf can be manipulated from the command line using gconftool-2 but you do need to understand the schema because gconftool is pretty low-level and can't ensure that your changes are correct or consistent.
You might find it easier to use the nautilus action configuration tool to change an action and gconftool to see what gets changed than to make sense of the schema description directly.
Comment: Thanks, but can you provide a small code example?
Comment: Sorry, I can't without doing more work than you'd need to because I don't use nautilus-actions and try not to use gconftool if I can avoid it.
Comment: the actions can be exported in different formats by going to `tools: export aassistant`. Also, look at `Edit-Preferences-Export`.
Answer: When they are exported  by going to tools: export aassistant (also, look at Edit-Preferences-Export) they contain Gconf settings, but at the same time the settings made in nautilus action configuration tool are .desktop files created in /.local/share/file-manager/actions, and those do not contain such settings, except some that stand for the upper levels of a tree-menu.
For example, after creating this setting in  Nautilus action configuration tool:

which gives this:

the upper level menus like "Subtitles" and "Download subtitles" contain lines like ItemsList=3f0b618c-c6fe-436c-86a9-2ebd9b1a77dd;1601ae38-5d78-4214-aeef-b7feb9864fc7;d67b7f55-6b10-418b-bfe8-eb9d4e5e7732;66242038-c8b1-414f-9ef2-4d5bb831a027;, which are gconf settings that cannot really be edited manually in the text file, while the lowest level items (the actions themselves - EN, RO, FR, etc) do not have such code lines and can be edited.