Trouble integrating $\int \frac{\sin(x)}{\cos(x)(1+\cos^2(x))}\mathrm dx$

Question: I am off by a pesky $1/2$ somewhere but I am not sure how what I have done is wrong. Taking $u=\cos(x)\Rightarrow \mathrm du=-\sin(x)\mathrm dx$ yields
$$\int \frac{\sin(x)}{\cos(x)(1+\cos^2(x))}\mathrm dx=
-\int \frac{1}{u(1+u^2)}\mathrm dx=$$
Which I can solve by partial fractions:
$$
\frac{1}{u(1+u^2)}=\frac{A}{u}+\frac{Bu+C}{1+u^2}\Rightarrow A=1,\;B=-A=-1
$$
Which gives
$$-\int \frac{1}{u(1+u^2)}\mathrm dx=-\ln|u|+\ln|1+u^2|=\ln|1+\cos^2(x)|-\ln|\cos(x)|\\
=\ln|\frac{1+\cos^2(x)}{\cos(x)}|$$
But the correct answer is
$$
\ln|\frac{\sqrt{1+\cos^2(x)}}{\cos(x)}|
$$
Any help on how I went wrong would be appreciated!
Comment: When you integrate $\frac{u}{u^2+1}$ there is a $\frac{1}{2}$ that comes out from the u-substitution.  So the line $ln|u|+ln|1+u^2|$ ought to be $ln|u|+\frac{1}{2}ln|1+u^2|$, using log rules you get the square root you want.
Answer: Hint. Observe that
$$
\int\frac{u}{1+u^2}du=\frac12\int\frac{2u}{1+u^2}du=\frac12\int\frac{(1+u^2)'}{1+u^2}du=\frac12\log(1+u^2)+C,
$$ since $$(u^2)'=2u.$$
Comment: oh doh! I completely forgot to keep the $u$ in the numerator. That was silly. Thank you!
Comment: @qbert This was your mistake. You are welcome.
Answer: Your answer missed the $\dfrac{1}{2}$ at the coefficient of $\ln(1+u^2)$. It comes from the need to have the $2u$ at the top, so you have to divide by $2$ to stay the same, hence introduce the $\dfrac{1}{2}$.
Comment: I see now, thank you @DeepSea


How can I change download location in aria2?

Question: I am really new to ubuntu and using 14.04 version. I have heard that Aria2 is one of the best download managers. How can I change the directory using terminal so that it can put the file on a specific hard drive after it finishes downloading?
Comment: @the_Seppi this question is not a duplicate at all. That is a global question this is application specific.
Comment: possible duplicate of [how to change directory?](http://askubuntu.com/questions/139598/how-to-change-directory)
Answer: -d, --dir=
<code>The directory to store the downloaded file.
</code>
This option is per download basis, you have to do this every time.
Alternatively, you can install uGet, http://uGetdm.com , which is a front-end to aria2. You can also ask for help on the uGet Forum, http://uGetdm.com/forum
Comment: I have tried using that command before and after a copied torrent link. But unfortunately I failed. If its not too much can you please show me a step by step process?
Comment: A full command for a magnet link would be:
```aria2c -d /path/to/download/dir 'magnet:...' ```


Unity RB Controller Jitter on a Moving Platform

Question: Brief Description: I have a RB based character controller that I want to move along with my Train platform (non physics based) when the player steps on it.

Main Problem
I manage to make the player follow the platform, but I also have a camera jitter problem that I can't solve without breaking player follow the Train platform logic.
Video showing the jitter.
Important: I'm not getting any jitter when only moving the camera
Important: I'm not getting any jitter when only moving the Character without moving the camera
this applies to both when the player is on a moving platform, or off the platform
https://www.youtube.com/watch?v=9M4dt00dEes
My Camera Implementation
For handling the camera I'm using Cinemachine, alongside a CameraHolder which is a separate gameobject from the player.
I'm setting the transform of the cameraHolder Gameobject to the players position in late Update
private void LateUpdate()
{
    transform.position = cameraPosition.position;
}

The Headbob Offset gameobject is a child in the cameraHolder without any movement.
Player Controller Movement
I'm using this code in FixedUpdate to handle my player movement
    private void HandleMovement()
{
    //old input system
    //float horizontal = Input.GetAxis("Horizontal");
    //float vertical = Input.GetAxis("Vertical");
    //Vector2 movementDir = new Vector2(horizontal, vertical).normalized;

    //New input system
    movementDir = GameInput.instance.GetMovementVectorNormalised();
    Vector3 currentVelocity = rb.velocity;
    Vector3 targetVelocity = new Vector3(movementDir.x, 0, movementDir.y);
    targetVelocity *= speed;

    targetVelocity = transform.TransformDirection(targetVelocity);

    Vector3 velocityChange = targetVelocity - currentVelocity;
    velocityChange = new Vector3(velocityChange.x, 0, velocityChange.z);

    Vector3.ClampMagnitude(velocityChange, maxForce);

    rb.AddForce(velocityChange, ForceMode.VelocityChange);
}

RB interpolation is set to Interpolate
Train Platform Movement Script
private void FixedUpdate()
{
transform.position += transform.forward * currentSpeed * Time.deltaTime;
}

Important I'm using FixedUpdate, but my train platform has no RB on it, I'm using FixedUpdate, because otherwise my player doesn't follow the train position change.
What I've Tried so far
1. Lerping Camera Position
Instead of setting the camera position to the cameraHolder, I tried lerping. It solved the overall jitter in the game, but my whole train platform became jiterry when moving.
        private void LateUpdate()
{
    transform.position = Vector3.Lerp(transform.position, cameraPosition.position, lerpSpeed * Time.deltaTime);
}

Videos showing the problem
jitter almost solved https://www.youtube.com/watch?v=sxXXk_oVpsg
Train jitter https://www.youtube.com/watch?v=85biDT_nl_4
2. Add dumping to Cinemachine virtual camera
results are the same as with lerping. everything else is smooth besides the train

I'll provide any necessary information if I haven't mentioned something here
Answer: Changing FixedTimeStep to 0.01 from 0.02 resolved the jitter issue!


What is the blue light from Loki's scepter?

Question: What is the blue light emitted by Loki's scepter? Is it the same light that the Cube emits? Does Thor have something with a similar light or is it something that Loki gets from the "Ice People"?
Answer: Whilst on the helicarrier and examining the sceptre, either Stark or Banner (I forget which) comments that it is powered by the Tesseract.
Comment: I thought it was "an energy similar to the Tesseract"
Comment: And, a scientist told that in the last.
Answer: Actually it is not. In fact, they assumed it was the Tesseract because they do not have enough details to see if it was from anything else. The stone is actually the mind gem. I know there's a whole hoopla of gems that belong to the Infinity Gauntlet. It is in fact the mind gem because that gave him the power to control people's minds!
Comment: "Actually it is not..." what? The question is what causes or emits the blue light. Nowhere in the question did the asker once posit that the scepter or glow was from the Tesseract. This seems like it's meant to be a comment/response to @philpursglove's answer.
Comment: Welcome to the site.  Do you have any references from material to backup those statements ?


Software for visually building regular expressions?

Question: I frequently need to create regular expressions for use in scripts (mostly when used in sed), however, I find, sometimes the regular expressions get very complicated and difficult for me to understand and edit. Is there any software which allows one to visually creates the code for regular expressions, which I can then copy and paste into a script?
Answer: How about Visual Regexp?
Comment: Not me, that is a link direct from the project homepage. But it looks like fvwm that was popular in the late 1990:s. Feel free to compare with something like this http://www.fvwm.org/screenshots/desktops/Helmuth_Schmelzer-1366x768/screenshot.png, I have no idea what state fvwm is today (but is used to be very stable before kde and gnome was invented).
Comment: The window decorations are directly out of Motif, which has since been ported/copied in other window managers. http://en.wikipedia.org/wiki/Motif_Window_Manager
Comment: What wm do you use?
Answer: How about kregexpeditor
Answer: Try txt2regex and see if that helps.  I've never used it seriously, but it seemed cool when I tried it out.
Answer: There is kodos if you prefer a standalone app. Lately I've been using online regex visualizers like http://debuggex.com or http://www.regexper.com/
Answer: Not exactly what OP asks for - but I think it's relevant, so I'll cross post Recommendation for Regex editor? #549107 - Ask Ubuntu:
Here's my attempt at a visual regex GUI tool, called visRegexTester.py:

http://sourceforge.net/p/sdaaubckp/code/HEAD/tree/single-scripts/visRegexTester.py

It has a "live preview" ("Auto rerun") if you type and change the "regex" field. Otherwise it's just that single file; there is a README comment at start - here's a snippet from it:

visRegexTester is a small Python/Tkinter GUI application to assist
  with writing of regular expressions; tested with Python 2.7 and
  3.2. In fact, it is merely an interface for other command line
  programs: it exploits the fact that a lot of Unix/GNU/Linux
  programs used as regex processors in the terminal (e.g. grep,
  sed, perl), have a similar command-line syntax in three parts:
(PROGRAM --ARGS) ('REGEX') (FILENAME)

... see the rest of it for more. The screenshot:
Answer: Yes, text2re.com should be close to what you're looking for. Given source text, you can choose to generate a regex that matches any of the given text. The tool generates code for a smattering of languages, as well.
The regex builder UI (step 2 on the page) is slightly difficult to learn; note that hovering over any of the options explains the object against which you're matching:
Answer: I'm not quite sure what you mean by "visually create the code" (do you mean a GUI tool?). If you are like me, I find it impossible to work with complex regular expressions, unless I lay them out in a structured manner, so I can get a better visual representation of the logic.
Really, sed is just a scripting language, and it can be laid out like other languages, ie. with one command per line.  Here is a typical example of what I mean: A sed regex showing structured layout.
A very handy feature of sed is its debugging command l, which is a simple line dump showing the pattern space with embedded newlines shown as \n, etc..
The issue with sed is not just the regular expressions. It has a funky cryptic set of commands for looping and condition testing; this takes time to get used to... The best tool I've ever found to assist me with dealing with sed is quite simply: I read the manual in detail.. From that, it is just a process of starting small and getting the simple things working; then build up to bigger things to gain experience..
Perl regex has some useful features to assist in laying out complex patterns; eg. the ability to ignore whitespace in your expression..  (As a challenge, and for the expereince factor, I wrote a sed parser to parse my sed code to allow such whitespace... PS. I don't need it now; because of the experience :) Actually just laying out commands, one per line, is almost as good as the perl feature.
The best tool to help you is: experience. eg. Tackling the regex questions on this site is a great way to get that experience... I feel that GUI tools don't really help much, because they inhibit the experience...
In summary, the best helper tools are experience and structured layout, and read the manual (in detail)..
I've used the word "expereince" a lot.. by it I mean that the act of preparing regular-expressions (and in the case of sed, any looping logic etc.) is the key factor..  "Regex-Builder" type tools; don't write the regex for you; they only test it, and they certainly won't handle sed's program logic, because that isn't a regex..(and you have specifically singled out sed)...   The syntax-highlighting they may offer doesn't do much for me.  An editor with good bracket matching is pretty handy though (I use emacs)..
Comment: I've used `emacs re-builder` and it did't help me at all ... not past day 1 ...All it showed me is that in `emacs` it needs an extra backslash or two, because of how emacs evaluates things... You can make the same test by evaluating your regex via `C-x C-e`.. It doesn't write the expression for you; **you** still need to write it... And then there is the `emacs` system of writitng a regex by using descriptive words.. (I thought that *verbose/english-like* system died out with COBOL.. but even COBOL isn't completely dead, yet) .. and regardles, **you** still need to write it.
Comment: I think it doesn't hurt if you have a tool for easy testing and experiment.
(emacs re-builder)
Answer: If a web app (that works offline, after loading) qualifies, nice one is regex101.com.


Is お・ご~させていただく 二重敬語?

Question: I want to know whether expressions such as お預かりさせていただく and ご説明させていただく are considered 二重敬語. お・ご~する is one way of making a verb into 謙譲語, and ~させていただく is another. Both are quite common, and I hear the combined form frequently as well; however, searches have provided conflicting answers. I am leaning towards that it is not 二重敬語, but even if it is it's generally accepted. I hear it quite often in official announcements, after all.
Comment: No, they are not 二重敬語, but 敬語連結.
Comment: Just FYI, when they are used thoughtlessly, they are looked down as ファミレス敬語 "family-restaurant honorifics" because uneducated waiters at cheap restaurant franchises for "families" tend to use them *a lot*.
Comment: @nodakai I'm well aware of that, though I'm more familiar with the term マニュアル敬語.
Answer: They aren't 二重敬語 (but 敬語連結) but I'm thinking the problem if they sound wrong or not is parallel to that of 二重敬語. Whether it's 二重敬語 or 敬語連結, the problem is if they sound redundant, indecent in a certain situation or so. It's not a problem of grammar.
Personally, I don't like recent tendency to abuse させていただく even when the speaker is supposed to be responsible for the action.
Edit: I'd like to clear out possible confusion. First, 二重敬語 is a grammatically correct expression. It just could be over-polite and indecent. After WW2, some people claimed that it's politically incorrect to use in public speech because it had been formally applied to imperial family member. (In private speech, it would be just randomly used.)

Is お・ご～させていただく 二重敬語?


Why didn't Hermione hug Ron Weasley in this scene?

Question: If Hermione hugged Harry Potter, then why didn't she hug Ron Weasley in this scene from the end of the Harry Potter and the Chamber of Secrets film?
Comment: Embarrassment. Hermione and Ron were beginning to have romantic feelings for each other, and they held off because hugging would have given conflicting signals.
Answer: Chris Columbus, director for the first and second films, answered this in an interview with The Leaky Cauldron. In short though this is foreshadowing of their feelings for each other and eventual relationship. That isn't the case with Harry because they are simply just friends.

*TLC*: Quick thing about the end of the movie. There's a very adorable scene where Hermione hugs Harry, but she doesn't hug Ron – what was behind that non-hug for you?
CC: Did you read book four?
*TLC*: Yeah, I did. [You've no idea.]
CC: So, it's a little bit of a taste of what's to happen, what's coming up.
TLC: So it is foreshadowing.
CC: It is foreshadowing, yeah. I just love the idea that the two of them, that there's an impending crush. And it's such a real thing for kids at that age. For instance, I asked Emma to hug Dan, and she said, 'No way,' and that was the day she was the most nervous being on the set. She was like, 'I am not going to hug him, no I'm not.' And I said, 'You've been petrified, this is one of your best friends, if not your best friend, you have to hug him,' I said, 'but you won't hug Ron, because that's where the tension is.
So basically, she had all her friends, all the actors, actresses, she had to hug him in front of 350 actors, so as a kid she was terrified. So she hugged him, and I had to extend it through editing. She would hug him, and at the next frame, gone.
The Leaky Cauldron, Harry Potter and the Chamber of Secrets – Press Junket: Chris Columbus Interview
Comment: Took me long enough to realise you were *not* the TLC at stake and that this was *not* an exchange you had with Chris Columbus on Twitter or something.
Comment: Might want to add a [] or a [sic] or something.
Answer: The original script by Steven Kloves calls for an awkward handshake because of the social dynamics between Ron and Hermione. This contradicts what the video All the Best Unscripted Moments from the Series! says, which is false.

Seated at the tables, are the formerly petrified, revived students. Justin Finch-Fletchley joins his fellow Hufflepuffs. Colin Creevey SNAPS photos of the proceedings.
At the rear of the hall, standing near the entrance, Filch is reunited with Mrs. Norris. Then... Hermione enters, searching the room for Harry and Ron. Finally, she sees them. Smiles. Runs forward and embraces Harry.
HERMIONE: You solved it! You solved it!
HARRY: With loads of help from you.
She turns to embrace Ron. They pause, an awkward moment between them and... shake hands instead.
RON: Welcome back, Hermione.

Kloves immersed himself so deeply into the world of HP that by the end of The Deathly Hallows Part 2, he seemed to "know" and understand the characters almost as well as JKR.
He almost certainly was working closely with JKR throughout the entire process of drafting the movie screenplays, and knew that Ron and Hermione would forge intimate feelings as a relationship crystalized in future installments as they grew older. It would have been seen as too intimate of an interaction between the two at the time.


Can a javascript variable be made configurable?

Question: I defined a variable in my .js file and want the user/client to change that as per his needs. Is it somehow possible to use that value in forms in drupal?
Answer: Too vague of a question, bring some examples of code.
It might go in a custom module (thus doing differently) or just using JavaScript where you can surely alter values of a variable.
Answer: Best practice is to store configuration in code, not in the database. With that said, the following will add an arbitrary JavaScript snippet:
<code>drupal_add_js(variable_get('your_variable'), array(
  'type' => 'inline',
  'scope' => 'footer',
));
</code>


Do tensile and compressive forces have significance only in pairs?

Question: In strength of materials, there are two types of axial forces which can act on a prismatic bar - Compressive and Tensile. Do they significance only in pairs?
Answer: In engineering we have external forces and internal forces or reactions. extrnal forces don't necessarily have to comtogether.
eg, you can apply tension force tangentially to a bicycle wheel and it will act as a torque and wheel will turn.
Answer: If a compressive force is applied, the bar will only experience compressive forces. If a tensile force is applied, the bar will only experience tensile force. They can only occur simultaneously on the same bar if the bar is subjected to bending.
The picture you have shared, it can be one of these cases. 1) Either you are pulling (tensile) or pushing (compressive) both the ends of the bars 2) You are fixing one end and pulling or pushing the other end 3) You are making an imaginary perpendicular cut somewhere in the bar and then observing this picture.
Lets consider case 1 now; both of your hands need to be putting a force in opposite direction to push or pull the bar. In case 2, the fixed end is doing the same thing as your other hand was doing in case 1. In case 3, you still observe the cutted cross section of the bar having an equal but opposite force (as compare to what you are applying to it). This can also be thought of as Newton's third law analogy for simplicity.
It should be noted that the top two pictures that you have shared will only be possible when the bar is static and not in a rigid body motion. Since you haven't shown any reaction forces in the bottom two pictures, it might do a rigid body motion (assuming the contact with the ground is frictionless).


How do you describe something that develops rapidly, is packed with events?

Question: Yes, I consulted a thesaurus, no help (or I couldn't use it properly). I need an adjective that describes a process that develops rapidly and is full of events (regardless of whether they are good or bad) as opposed to something stagnant, not changing. For example, '[word] political life of [a country]'. 'Turbulent' has negative connotations, I need something neutral or, maybe, slightly sarcastic. I also know the word 'eventful'. It doesn't fit either, in my view.
Comment: [***volatile***](https://www.thesaurus.com/browse/volatile) synonyms.
Comment: @FumbleFingersReinstateMonica I haven't found a single word that suits my needs
Comment: Please explain why ***volatile*** and ***fluid***, for example, don't suit your needs.
Comment: @FumbleFingersReinstateMonica "Liable to change rapidly and unpredictably, especially for the worse" Whereas I need a word that describes something that does changes rapidly (not just "liable") and is packed with events and developments
Comment: I wouldn't take too much notice of that "especially for the worse", even for ***volatile***. It's not so much part of the meaning of the *word* - just that pragmatically speaking, unstable rapidly-changing environments are *usually* "problematic" (evolution being the archetypal context to illustrate the fact that "random change" is more likely to be bad than good). But personally I'd very specifically say that using ***fluid*** rather than ***volatile*** completely does away with that element anyway.
Comment: *change 7 more to go...
Answer: You could use the word "unstable", which doesn't necessarily suggest that it changes quickly, but it does mean something could change at any time.
Otherwise, I can't think of a single, widely-used adjective to describe something that changes rapidly. Those are two different qualities. You might as well ask for a single adjective that describes something that moves and is red.
I would suggest you use a hyphenated compound of two words instead. Here are some possibilities:

Rapidly-evolving
Ever-changing
Constantly-developing
Fast-moving

Any of the above could potentially be mixed-and-matched, although these sound the most idiomatic to my ears.
There is also the expression "in a state of flux" which pretty much means unstable, but it wouldn't insert into your sentence without some re-writing.
Comment: Perhaps also action-packed?


How do I protect myself against a futures broker's collapse?

Question: I noticed that SIPC does not cover futures. Accounts at futures brokers are not protected by SIPC. If I am worried about the possibility of a futures broker's collapse, what should I do? Do I need to conduct due diligence on the broker before opening an account? What would this due diligence involve (what reports do I need to read)? Do futures brokers have something similar to SIPC which would relieve me from having to conduct this due diligence?
Answer: Due to the way that futures contracts are created and traded, it's rare that a broker's default or collapse would penalise end holders. I would expect that clearing positions held by a clearing broker that defaulted would probably get re-distributed to other clearing brokers. After all these are revenue earning positions/relationships so they would want  to receive them.
The costs of end holder defaults are usually borne by member clearing brokers or the exchange itself.
This is one of the reasons why futures are so liquid, as there is generally a very low counterparty default risk, as the other party of any trade is (eventually) the exchange.
Comment: What about the cash held in the futures trading account?
Comment: Yes you might not be able to get the cash easily - it depends on if your cash is segregated (most accounts are not). But you should be sweeping back any accumulated cash / profit on a regular basis as good practice.


Passive mobs not spawning in already-generated chunks

Question: I played on a Minecraft server, 2b2t, which has hundreds of people online, and generated some chunks for the first time to build a base. Mobs spawned in the newly-generated chunks, but after a while, they stopped spawning. Only hostile mobs spawned. I then built a mob grinder and no hostile mobs spawned in there, and I even double and triple checked that I had built it correctly. I do not know whether this is a problem in how far I go out, since I am super far out away from 0,0 XZ, or is it the TPS, since the TPS can go down to 0.75, which is extremely low. I really need to breed mobs, and without mobs, I cannot do this without going out about another 10,000 blocks, which is a very long journey, even if I use the Nether. Can someone please explain what is going on? Thank you.
Comment: Oh bro that changes things a lot. So many people play on 2b2t that almost no mobs spawn.
Comment: Well, first things first, how can you even play at 0.75 TPS. Are you sure that is right, as that would mean you could hardly move or break/place blocks. Any mobs would also be nearly frozen.
Comment: @Penguin, I'm playing on 2b2t, and now its whats called "No Server November", and people are building huge lag machines to lag the server to 0.75 TPS.
Comment: @Penguin You can go to this website(http://2b2t.miraheze.org/wiki/No_Server_November) to know more about No Server November on 2b2t
Answer: First off, passive mob cap is very low - normally on vanilla it's 10 mobs world-wide and regardless of the number of the players, and typically already occupied by mobs in spawn chunks whenever the world generates. Passive mobs generate with new chunks ignoring the mob cap, but after that they can only spawn if the total number of mobs in all loaded chunks (including spawn chunks and whatever's permaloaded) is below 10.
On any typical server, you won't be getting any spawns unless you spawn-proof the spawn chunks - remove all the grass, and likely most of the sand (turtles / rabbits!) and kill all passive mobs in the spawn chunks. On an active server you won't be getting any spawns because other players load areas with passive mobs in them - including their own private farms, animal pens, mounts, pets etc.
Low TPS would reduce the spawn rates (normally new passive mob spawn attempts occur 400 ticks apart, so 20 seconds on normal servers, but at 0.75tps that's once per 5 minutes) but it wouldn't block spawns completely. Distant location is non-factor. But the number of players online means there's way more than 10 passive mobs loaded at any time, and so no new spawns. It's best to give up on hoping to spawn them and breed your own from naturally generated instead.
Comment: @qwr: Playing on 2b2t requires a pretty special mindset, often involving a fair share of self-hate.
Comment: I would hate to be on a server with 0.75 tps
Answer: Because you are playing on 2b2t, which has a lot of people online, mobs try to spawn around everyone when they can which means that mobs rarely spawn and mob grinders don't work. Basically if a pig wants to spawn, it's got over 200 people to pick from and the chances of it picking you is less than 1%.
Comment: @qwr Sure they do. They "try" to spawn, but are not able to because the cap is reached, and then they do not spawn.
Comment: Mobs do not "try to spawn around everyone" if the mob cap is reached.
Comment: @qwr whenever a mob wants to spawn, it has 200 people to go by. This is why you almost never see a mob. Once a mob is available to spawn you got less than a 1% chance to have it spawn on you. I made that clear in post now


How to Delete Closed Questions?

Question: What would happen to closed questions..? (Are they deleted after some period?) I know that we could delete it after 2 days. But what if it has answers, It can't be deleted still..? How would I delete the closed question?
Comment: And, of course, there is http://meta.stackexchange.com/q/10582/
Comment: I think there have been some changes since http://blog.stackoverflow.com/2009/04/the-stack-overflow-question-lifecycle/, but don't have time to run them down just now.
Answer: Closed questions are not automatically deleted. They can be deleted by moderators, but we don't generally do that because, honestly, it doesn't seem like the best use of our time.
There are different types of closed questions; in particular, there are questions which are unsuitable in their current form but are close to being fine, and then there are questions which are entirely inappropriate for the site. When we close a question of the first time, we do so with the hope that it will be edited into a form that makes it suitable for reopening. But questions of the second sort, e.g. those that are egregiously off topic or completely nonsensical, we don't hold out much hope for - in other words, once closed, we pretty much expect that they are going to stay closed. Those questions are the ones that would be more appropriate for deletion.

How to Delete Closed Questions?


Layout booklet in inDesign

Question: I am trying to create a kind of book of those that are made with letter size sheets folded in half lengthwise. On my own I tried several things but I only managed to get 2 letter pages joined vertically and that is not what I am looking for. It is important to clarify that the pages will be printed on both sides. In my country we call it booklet ("folleto" in the image). I was working in Publisher but I saw that inDesign offered me better things, and this is the configuration I was using.
Comment: @Scott posted a brief, but concise tutorial of the settings you need to address. If you create and open a pdf of your booklet, you might need to set acrobat to the 2 page display setting. So you can view your booklet in the form you envision it.
Comment: So you want to make a booklet with the pages being 5.5" W x 8.5" H? But your image doesn't match those dimensions. I guess I am wondering what your question is. Do you need help setting up the file or are you confused about how the setup file would be printed?
Comment: @AndrewH Yes, the dimensions don't match, sorry, but inDesign I need to work with letter size. And yes, I need help to set up the project.
Comment: Are you producing this booklet yourself or will it be commercially printed? In other words, are you going to do the printing as well?
Answer: To create a "booklet" with a final size of 5.5"x8.5" (Letter half) you want the InDesign pages to be 13.97cm x 21.59cm (5.5"x8.5").
When 2 pages are next to each other they will create 1, letter-sized, horizontal, spread.

Upon output you can choose to output single pages (5.5x8.5") or Page Spreads (11x8.5").
Most often a commercial printer will want single pages so they can properly impose for a booklet. If you are doing this yourself at home, you may need page spreads output so you can manually bind the booklet.
Comment: @Jalkhov Indesign has a "print booklet" feature. Also, for larger booklets (i.e. more than a few sheets of paper), the paper thickness starts to affect the layout. When folded and stitched, The pages in the middle of the book stick out farther than the covers. This is called, in English, "creep" and the print booklet setting has a creep adjustment field. I think copy paper is around .005 inches thick, so maybe try that as a creep setting. the creep adjustment will help keep the design aligned, and then you can trim the edge after binding.
Comment: @Jalkhov Just set up as 5.5x8.5 pages, then when you print, or export to PDF tick the "page spreads" option in the print/export dialog. That will output 2 pages side by side. Whether or not you use facing pages is up to you. [Either way will work](https://graphicdesign.stackexchange.com/a/86063/3270). The other option would be to just use 1 letter-sized horizontal page, but you'd need to manually configure guides to know where the middle will fall.
Comment: Thanks, it had crossed my mind to handle it like this, set up a half sheet letter, but as I'm just getting to know inDesign, I didn't know how, that's what I'm looking for. This is not commercial, it is for something personal, so it will be printed at home, is there any way to save the project as pdf to print it somewhere else without using inDesign?
Comment: By the way, I guess I have to activate the option "Facing pages", I have inDesign 2019 and it looks a little different.
Comment: @Yorik There are only about 5 sheets, and one of them is a cardboard, which will be the cover and back cover. No problem, right? And to join them all together, we will use staples (not the prettiest but it will serve the purpose we are looking for).

Layout booklet in inDesign


Asus Zenbook jack problem

Question: I just got an asus ux430unr and I have managed to configure dual boot on it (windows and ubuntu).
Unfortunately, I ran into a sound problem, the speakers work perfectly but the audio jack (3.5) doesn't work on ubuntu, works perfectly on windows but on ubuntu, it doesn't produce sound and when I move the jack a little (in or out) it makes a weird crackling sound.
can anybody help me with this issue, I use the jack so often while working and I use ubuntu for work!
Answer: I don't have enough reputation to comment, so excuse me for not exactly answering your question. But I have some insight on this because I'm facing the same problem with a Samsung Notebook 7 Force on Ubuntu 19.10. So I have some points:

Did you tried to up the volume to the limit? On mine, if you do this,
you can hear the sound being played veeeery faint and distorted.
I also noticed that on the Samsung the HDMI output doesn't work

I'm sure those problems are related to drivers and quirks yet to be supported. It's important to report these issues so that they get fixed.
Comment: Turning up the volume does absolutely nothing and I did not try hdmi, I don't have a monitor or tv to try that unfortunately, so maybe if someone has the same issue and tests that, we would be thankful for him ^^

Asus Zenbook jack problem


Problems Building a WCF Project with TFS 2010

Question: I have a WCF project with a single .svc file and some .config files in it. I'm trying to create a build definition in TFS 2010 that will copy these files to an IIS folder on another machine.
I've done similar things with other MVC projects using the CopyDirectory task in the build XAML template. In those, I copy from the _PublishedWebsites folder to the IIS folder. However, with the WCF project, there is no _PublishedWebsites folder.
So I tried updating the MSBuild script for the WCF project to create a _PublishedWebsites folder and copy the files to it. This works when I build locally in Visual Studio 2010. But when it runs on the TFS build server, it doesn't quite work.
What I see there is that in "C:\Builds\1\PROJECT\PROJECT (Continuous Build)\Sources\PROJECT\bin\_PublishedWebsites", I can see all the files.
I'm guessing this "1 folder" is a temporary folder used for building...? I'm not sure what it's used for. But when I look at the actual drop location for the build, in "C:\Builds\PROJECT (Continuous Build)\PROJECT_BUILDNUMBER\", I see nothing except log files. None of the files from the "1 folder" are there.
Note that this same solution also has a WiX project to create a deployment package. That seems to build fine, and shows up in the drop location with no issue.
Answer: "1 folder" is a temporary folder used for building
Yes. "1" is number of build agent(service that actually executes builds activities) on your build machine.
But when I look at the actual drop location for the build, in "C:\Builds\PROJECT (Continuous Build)\PROJECT_BUILDNUMBER\", I see nothing except log files.
 - Usually "Copy Files To Drop Location" flag is responsible for that.


Converting a Matrix to a Gate in OpenQasm 2

Question: I am a beginner when it comes to quantum computing so forgive me if this is a dumb question. Does anyone know how to create a gate from any matrix on OpenQasm2? Specifically, can anyone provide any tips on how to convert a matrix to Qubit rotations using the U gate in OpenQasm2? Also, could you form an addition gate using a similarly designed matrix in this answer
Answer: Here's one example of a way to do it programmatically:
<code>from cirq import Circuit, LineQubit, ops

from qbraid.interface import random_unitary_matrix
from qbraid.transpiler.cirq_qasm import to_qasm

n_qubits = 1
matrix = random_unitary_matrix(dim=2**n_qubits)

qubits = [LineQubit(i) for i in range(n_qubits)]
circuit = Circuit(ops.MatrixGate(matrix)(*qubits))

qasm_str = to_qasm(circuit)

print(circuit)
print(qasm_str)
</code>
<code>      ┌                           ┐
0: ───│-0.255-0.574j  0.266-0.731j│───
      │-0.644-0.436j  0.131+0.615j│
      └                           ┘

// Generated from qBraid v0.4.0

OPENQASM 2.0;
include "qelib1.inc";

// Qubits: [q(0)]
qreg q[1];

u3(pi*1.4327602146,pi*0.822476743,pi*0.2440365932) q[0];
</code>
Can then track the qbraid.transpiler.cirq_qasm.to_qasm source code back through cirq.QasmOutput and break down the procedure step-by-step.


How to test predictive ability of an explanatory model?

Question: As a part of my research I create an explanatory negative binomial regression model. Now, I want to show this model can also have predictability power. I don't want to compare my model with other competing models. I just want to show that the model has some predictability power. I would be really thankful if you can help me on that.
Comment: I was going through my old answers and noticed this one was not accepted. Do you perhaps need further clarification?
Answer: Once you have used your whole sample for model selection and fitting, you cannot test in a fair way how well the model can predict. If you test on the same data that was used for model building, you will get overly optimistic results as the fitted model has adapted to that particular data set to fit it well. You will need a new sample for a fair evaluation.
Alternatively, you could go back and redo your analysis in the following way (which might ultimately lead to selecting a different model than you have now).

Split your sample into training, testing and validation parts (subsamples).
Keep the validation part hidden until you have chosen and fitted your model on the training and testing parts.
Try your chosen model on the validation part and evaluate its performance there. That would be a fair evaluation.
Refit the model on the whole data set before applying it elsewhere.

If you explicitly refuse to compare your model with other models and do not want to do model selection (e.g. you have a model entirely implied by theory or somehow imposed on you), you could skip model selection using training and testing subsets; but you still need to separate the data for model fitting (given model specification) and model validation to get a fair evaluation of forecasting performance.


How to Uninstall apps or move apps around

Question: When I hold my apps down the x does not appear where I can delete apps or move them around I have an iPhone 6s
Comment: have you tried this with multiple apps?  I get this same behavior but with only a few apps. Most work fine.
Answer: You should either hold your thumb on the app(s) firmer or softer. What happens when you do it now?
If it opens a menu with options or simply a menu that allows you to share the app, you're pushing too hard and actually doing Force Touch.
If it just sort of wiggles but the X doesn't show up and everything stands still again when you release, then you're not pushing enough and it's just not doing anything.
Best of luck.
Answer: Additionally: Apple's own and preinstalled Apps like Mail, Safari, etc cannot be deleted. I personally solved this by just shoving them over to a screen in the very back so they're out of my sight.


Cant see animated GIFs properly in web browser

Question: I just recently purchased a netbook with Windows 7 starter edition.  Some websites I go to with this will show animated .gif files properly, but others will not.  One example of a page that doesn't work correctly is http://www.preferencepools.com/about.htm where the second image should rotate through 4 pictures.  This fails in both IE and Firefox, so I know it's not the browser.  Anyone have any ideas why this might be failing?  Thanks.
Answer: This could be symptomatic of an underpowered netbook.
Does the web page finish loading? Try placing the URL of the image directly into your browser's location bar to see what happens.
BTW, your link to about.htm points to the wrong target.
Comment: The page does finish loading.  seems kinda odd that a brand new netbook wouldn't be able to handle the site since it was created using a p3 700 with 64 megs ram originally and this is an atom 1.6 with a full gig of ram...
Comment: Try temporarily disabling your firewall. Apparently ZoneAlarm has an option for disabling animations in its privacy options, and there could be others. This might explain why both IE and FF are affected.  I've tested on an Asus 1005PE with a configuration more or less identical to the one described and can't reproduce the fault.


A spectral analysis of Hebrew pronunciation, looking for source

Question: I recently was shown this article that claims that the Hebrew alphabet, when viewed in what appears to be a spectrogram, the actual frequencies in which the letter hits creates a shape of the physical letter itself. It is hard to explain, see the reference. The problem is, I have done a lot of searching and am unable to find the original research paper. The article above claims "the article is too extensive and technical for reproduction here." I want to see the extensive technical version. Has anyone seen this? Is anyone familiar with this idea?
Comment: Did you ever think about the fact that Hebrew letters evolved changing their shapes with the course of time and there is the second script in Hebrew called the [Rashi script](http://en.wikipedia.org/wiki/Rashi_script) in which many letters look completely different, for example Tet looks like usual Ayin, Tsadi looks like usual Lamed, etc.? How on Earth can this correlate with what they say in that article?
Comment: Hi Yellow Sky. My skepticism is the reason for such a question. I don't believe a spectrogram can show such discontinuous letters in the first place without some manipulation. Regarding the text itself, Rashi script, which is a mix of Hebrew and Aramaic, is not an evolution of Hebrew but rather an alternative. Historically the Torah is written in either Ivri script (first temple period) or Ashuri script. With the article above using the latter.
Comment: There are several lithurgical pronunciations of Hebrew: Iberian Sephardic, North-African, Egyptian, Iraqi and Irani (mostly same as those from Spain, with slight differences). Samaritan, Ashkenazi, Yemenite (which is considered by some as the closest to how it was pronounced in antiquity) and, of course, plenty of proposed reconstructed pronunciations by professional linguists. And, of course, modern Israeli. WHICH pronunciation are we talking about here???
Comment: Hi Joe, good question. I don't have the source so I cannot answer it.
Answer: The source for this is in a book called The Coming Revolution by Zamir Cohen. I glanced at the book once and I can't say I recommend it as a scientific publication. (A much fuller review is here if you want). One of the differences between books and a peer reviewed journal is that books don't have to be reviewed and approved by other experts in the field - they just have to convince a publisher they'll sell. That means that a book can, for example, only present one side of a scientific debate (even if it's a minority opinion maintained by very few) and still make it to the bookshelf, whereas a peer-reviewed article wouldn't make it past the experts who would notice the imbalance.
I can't find an online preview, so I'm afraid that if you want to see the original "source" you may have to buy the book.
Comment: Thank you. That would explain why there is no scientific publication available; because it does not exist.
Answer: Just to add this: what is usually called Hebrew script was in fact borrowed from Aramaic. The Old Hebrew script, as found in the oldest Hebrew inscriptions, looks more like Samaritan script.
Comment: Arabic, Cyrillic, Greek, and Latin scripts were all also "in fact borrowed from Aramaic". Some hold that all Indic scripts can also be traced back to Aramaic script. Writing has only been independently invented a handful of times in human history.
Comment: Greek not from Aramaic, but from Phoenecian, a different offshoot of ancient North Semitic script.
Comment: Ah yes you're right (-:
Answer: I found this page after hearing same in one of Dan Winter's videos. As much as I've enjoyed his material, it's clear there is fabrication therein. There are  several Freemasonic texts which set the record straight. The English alphabet of 26 letters is a better system, in the esoteric sense, to work with. You will also find much in perusing Marty Leeds' material on Pi. Pi, according to many sources including Freemasonry, is the conceptual Substrate to the modern English alphabet.
This would be case closed for me but for the amazing work by Stan Tenen. So I'm not sure what the heck is really going on. Seems to be two wholly exclusive systems (Hebrew/English). There's a chance it could be a comparison of say Runes to Hebrew. Meaning a celestial as to terrestrial or more earthy symbol array.
Yet consider the ado made about Hebrew's 22 letters corresponding to the features of a cube; with the so called Cube of Space. I had Hulse' book on this and took it for granted. I however, only recently, took a cube and counted faces, points and lines... and guess what, it comes out to 26. This, I am sure, evidences what those Freemasonic texts were alluding to. I am not a Freemason.
There is diversion when it comes to the exclusiveness, the high and mightiness, of the Hebrew row. It's not the case.... and likely why we have to endure false claims about spectrograms etc.
Answer: I actually have a copy of the original research done by two researchers with a rabbi intoning Hebrew vowels sounds in the 1960's. It wasn't formally published in a journal article. It does show the spectrum of the Hebrew words forming the actual glyph itself. It is entitled "The Qabalistic Primer of Creative Consciousness (previously entitled The Spectrograms of Hebrew Alphabet published and entitled in French as (Spectrogrammes de l'Alphabet Hebraique: Mont-Blanc Suisse) by Carlos Suares (deceased) in collaboration with Fred Alan Wolf, Ph.d
Comment: Can you make this available to us somehow? Can you upload a scan?


Electrical force vs gravitational force

Question: Given that the electrical force is so much stronger than gravitational force at atomic levels, why is it that it's the gravitational force between you and the earth that keeps you on the ground rather than the electrical force between you and the earth?
Comment: Please note that the "homework" tag does not solely indicate problems that someone is actively trying to solve for their next problem set.  Problems for exam review or problems encountered in a textbook during independent study are also considered "homework" http://meta.physics.stackexchange.com/questions/234/do-practice-problems-encountered-in-independent-study-or-exam-review-get-the-hom
Comment: Nope not studying for an exam either-semester just started. I was intrigued by something so I asked it. Apparently WIMP is the only one that really knew the answer-the rest of you guys just spent all your time trying to argue rather than answering questions. You lose nothing by answer this question whether its homework or not. Obviously you guys are just trying to argue about something and attempt to gain authority over this site. Last I checked it was run by the community. I am part of the community. If I claim its not homework, then its not homework.
Comment: hint: _which_ electrical force?
Comment: The tags are not for your benefit.  They're for everyone else's benefit as they sort through the questions.  That means the questions should be tagged according to their content, not according to the asker's whim.  Regardless, this has become a meta discussion so if you want to continue it,  we should do it on the meta site.
Answer: Gravitational force is what keeps us on the ground rather than electrical force because there's no negative gravitational mass. Electric charge can be neutralized, while gravitational attraction not.
Answer: Actually, if you were at rest on the ground, the van der Waals repulsion between the atoms of the soles of your feet and the atoms of the ground — which is electrical in origin — exactly cancels the gravitational force between your entire body and the entire mass of the Earth.
Imagine that!
And the van der Waals force isn't even a direct Coulomb force between two simple charges, but a much weaker indirect electrical repulsion between neutral atoms due to a deformation of the electron clouds. I know you might argue the repulsive van der Waals force is actually due to the Pauli exclusion principle, and that is also true. After fixing the positions of the nuclei, the physical ground state — which is given by a totally antisymmetric electron wavefunction — has a higher energy than some unphysical electron wavefunctions which aren't totally antisymmetric. But if we restrict ourselves to the physical wavefunction, the immediate repulsive force can still be traced back to electrostatics.
Comment: _"...exactly cancels the gravitational force between your entire body and the entire mass of the Earth."_ This might be a silly question, but why are we not floating then, since it implies that the net force is zero or am I misunderstanding your answer?
Answer: You write "rather than the electrical force between you and the earth". There is no electrical force between you and the earth because neither of you is charged! But you and the earth do both have mass so gravity acts but electricity doesn't.
"that the electrical force is so much stronger than gravitational force at atomic levels'" is only true between two charged particles of say the mass of a proton and the charge of a proton.

Electrical force vs gravitational force


Can a Linux environment be PCI compliant if the swap file is not encrypted and PANs are loaded into RAM?

Question: Can a Linux environment be PCI compliant if the swap partition/file is not encrypted and PANs are loaded into RAM by an application?
Comment: As with most PCI questions I end up seeing on here this seems to be in another gray area. Requirement 3.4 of the PCI-DSS states that the PAN must be rendered unreadable anywhere it is stored (which I interpret as at rest). If the data is in the swap file it may be "resting" but it's not really being "stored" because it's only there temporarily. I would still disable the swap partition/file just to make sure it's not an issue.
Answer: PCI compliance covers a lot of ground - anything that "stores", "processes" or "transmits" cardholder data.
Different systems need to have different parts of the standard applied to them to maintain a cohesive whole. Your system would fall into the "processes" category. Your needs would be different for storage, etc.
In the case you have outlined you can accomplish the protection of cardholder data written to disk in two distinct fashions. Either locking the pages holding cardholder data in RAM,  encrypting the swap file, or both.
A third less desirable option is totally disabling the swap file.
As true as all this is you seem to be missing the big picture - PCI compliance doesn't come from just keeping the credit card information in RAM.
There are a lot of other things that you need to consider, even if you are only handling cardholder data in RAM. Central logging, HIDS, NIDS, etc.
Comment: I know and agree that there are other things but my question is specific to this issue now.


Complex analysis in theoretical computer science

Question: There are many applications of real analysis in theoretical computer science, covering property testing, communication complexity, PAC learning, and many other fields of research. However, I can't think of any result in TCS that relies on complex analysis (outside of quantum computing, where complex numbers are intrinsic in the model). Does anyone has an example of a classical TCS result that uses complex analysis?
Comment: We use complex analysis in a paper "The Grothendieck Constant is Strictly Smaller than Krivine's Bound," which (from a TCS viewpoint) gives an approximation algorithm for the problem of maximizing $\sum_{i,j} a_{ij} x_i y_j$ subject to $x_i, y_j\in \{\pm 1\}$. See http://ttic.uchicago.edu/~yury/papers/grothendieck-krivine.pdf
Comment: @Yury that could very well be an answer.
Comment: Great question! I would suggest it would be better to exclude results related to number theory - e.g. any use of the Riemann hypothesis - rather than quantum computing, which tends to be about finite-dimensional systems (as far as I know).
Answer: It's not a single problem, but the entire field of analytic combinatorics (see the book by Flajolet and Sedgewick) explores how to analyze the combinatorial complexity of counting structures (or even algorithm running times) by writing down an appropriate generating function and analyzing the structure of the complex solutions.
Comment: Ah I miswrote. I meant "analyze the combinatorial complexity of structures" - will fix.
Comment: Hi Suresh, what do you mean by 'analyze the complexity'?
Answer: Barvinok's complex-based algorithm for approximating the permanent Polynomial time algorithms to approximate permanents and mixed discriminants within a simply exponential factor.
Also, obviously, complex operators (and some complex analysis) are important in quantum computing.
Let me recommend also this book: Topics in performence analysis by Eitan Bachmat with a lot of great relevant issues and great other things.
Comment: That's a great example, I wasn't aware of this result - thanks!
Answer: Jon Kelner won the STOC Best Student Paper Award in 2004 for his paper "Spectral partitioning, eigenvalue bounds, and circle packings for graphs of bounded genus"
I'll just quote from the abstract:

As our main technical lemma, we prove an O(g/n) bound on the second
  smallest eigenvalue of the Laplacian of such graphs and show that this
  is tight, thereby resolving a conjecture of Spielman and Teng. While
  this lemma is essentially combinatorial in nature, its proof comes
  from continuous mathematics, drawing on the theory of circle packings
  and the geometry of compact Riemann surfaces.

The use of complex analysis (and other "continuous" math) to attack "traditional" graph separator problems was memorable and is the main reason this paper stuck in my head even though it is completely unrelated to my research.
Answer: I guess that you might be more interested in complex analysis used directly in the proof. However, here are two examples from a graduate level Algorithms class I am currently attending:
a) Fast Fourier Transform, for example used in polynomial multiplication. Although the implementation can be done with modulo arithmetic or floating point (and some arithmetic analysis), the proof is best understood in terms of complex numbers and their roots of unity. I have not delved into the subject, but I am aware that FFT has a wide range of applications.
b) In general, equipping the RAM model with the ability to handle complex numbers in constant time (the real and imaginary parts still have finite precision) allows one to cleverly encode problems and exploit properties of the complex numbers that might reveal a solution (see also the comments why this won't allow you to be faster).
Comment: The proposed algorithm requires constant-time infinite-precision real arithmetic.  (You _can't_ compute a $\Omega(n\log n)$-bit integer in $o(n)$ time using a machine with $O(\log n)$-bit words, because you wouldn't even have time to write down the output!)  The question is asking you to add _square roots_ to the real RAM model, not _complex numbers_ per se.
Comment: Do you have an example of the second observation?  It's trivial to add a "complex O(log n)-bit integer" class to the standard RAM with constant-time operations.  Or by "faster", do you mean "faster by a factor of 2"?
Comment: This was an exercise from the lecture: "Assume you are dealing with an extended RAM that can compute with complex numbers at unit cost per multiplication, division, addition, and subtraction. In addition it can also compute the absolute value |c| of a complex number c in unit time. Moreover it "knows" the
complex constants 0, 1, and i. Show that given a positive integer n on such an extended RAM the number n! can be computed in $O( \sqrt{n} \log ^{2} n)$time. The solution uses polynomial multiplication, from what I know this is faster than the standard RAM model.
Comment: Thanks for the comment, it is very enlightening. I think I should update my answer to the part of only cleverly encoding a problem with complex numbers, i.e. to see a solution you would miss otherwise.
Answer: Perhaps this application is somewhat between TCS and Disc math, but I was slightly surprised when I read the paper "On the bent Boolean functions which are symmetric" by Petr Savicky (http://www2.cs.cas.cz/~savicky/papers/symmetric.ps). The theorems are only concerning Boolean functions, however one of the proofs uses complex numbers.
Answer: The Koebe-Andreev-Thurston circle packing theorem is originated in Riemann-mapping theorem and has various algorithmic aspects. For example, it allows a proof of the Lipton-Tarjan separator theorem for planar graphs.
Answer: We use Cauchy's Residue Theorem from complex analysis as the main technical tool in our paper "Approximating Linear Threshold Predicates".
Answer: Fresh from the oven:
A Polynomial Time Algorithm for Lossy Population Recovery
By: Ankur Moitra, Michael Saks
Quoting from the paper: "Here we will prove the uncertainty principle stated in the previous section using tools from complex analysis. Perhaps one of the most useful theorems in understanding the rate of growth of holomorphic functions in the complex plane is Hadamard's Three Circle Theorem..."
Comment: Let me give a quick sketch of how the Three Circle Theorem is used in this paper. In order to minimize a quantity $\sigma$ that satisfies some linear constraints, they look at the dual of this LP. Viewing the dual variables as coefficients of a polynomial, this becomes equivalent to maximizing $p(0) - \epsilon \|p\|_1$ over all degree $n$ polys $p$ satisfying $\|q\|_1 \leq 1$ where $q$ is $p$ composed with an affine transformation and $\|\cdot\|_1$ denotes the sum of abs value of coefficients.
Comment: (contd.) Now, the beautiful observation is that $\|p\|_1 \geq \|p\|_{sup}^{D_1}$ where $D_1$ is the unit disc in the complex plane of radius 1. If we use this relaxation, the problem boils down to maximizing $p(0) - \|p\|_{sup}^{D_1}$ subject to $p$ being bounded by $1$ over a smaller disc inside $D_1$. Making a coordinate transformation, we find ourselves in the setting of the Three Circle theorem: a holomorphic function is bounded on points in two concentric circles, bounding the function on any circle of intermediate radius.
Comment: (contd.) For the problem, this implies that $\|p\|_{sup}^{D_1} \geq |p(0)|^{\Omega(1)}$ if $p$ is bounded by $1$ over a smaller disc inside $D_1$. (Thanks to a wonderful talk by Mike Saks explaining the paper.)
Answer: In Section A.4 of this paper we use complex analysis, which leads us to a derandomization of Indyk's algorithm for $\ell_p$ estimation in data streams ($0 < p < 2$) that provides optimal space guarantees:
Daniel M. Kane, Jelani Nelson, David P. Woodruff. On the Exact Space Complexity of Sketching and Streaming Small Norms. SODA 2010.
You can get away with writing a proof that doesn't mention complex analysis explicitly (see the first bullet in the "notes" section for that paper on my webpage), but even that proof has complex analysis lurking under the covers.
Answer: There is use of complex numbers and analysis in a recent paper by Naor, Regev and Vidick, yielding results in approximation algorithms for NP-hard optimization problems:
http://arxiv.org/abs/1210.7656
Comment: Yet another paper that makes use of random roots of unity is

Daniel M. Kane, Kurt Mehlhorn, Thomas Sauerwald, and He Sun. Counting Arbitrary Subgraphs in Data Streams. ICALP 2012.
Answer: Recently Vishnoi gave an algorithm which finds TSP tours of length at most $n + O(n/\sqrt{k})$ in a $k$-regular simple graphs (talk & blog). The analysis crucially uses the van der Waerden conjecture (aka the Egorychev-Falikman theorem): the permanent of any doubly stochastic $n \times n$ matrix is at least $n!/n^n$. Egorychev and Falikman's proofs used deep results in convex geometry (in particular the Alexandrov-Fenchel inequality). On the other hand, a recent proof by Gurvits uses only elementary complex analysis and is quite a gem (nice presentation by Laurent and Schrijver in the MAA Monthly). Leaving the real line for the complex plane seems essential to Gurvits's proof and simplifies matters a lot.
Answer: The topic of trace reconstruction for the deletion channel relies crucially on complex analysis. (In reference [6] cited below, these methods are also used by Z. Chase to improve the state of the art on the word separation problem in automata theory.)
[1] Nazarov, Fedor and Peres, Yuval
Trace reconstruction with exp(O(n^{1/3})) samples.   STOC'17—Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, 1042–1046, ACM, New York, 2017
See https://dl.acm.org/doi/pdf/10.1145/3055399.3055494 or https://arxiv.org/pdf/1612.03599.pdf
Corresponding video and slides:
https://www.youtube.com/watch?v=4wxpFb4BKn4
https://yuval-peres-presentations.com/trace-reconstruction-for-deletion-channels/
The key fact used in the proof is a lower bound on the maximum of a complex polynomial on a small arc of the unit circle.
The same result was obtained independently in
[2] De, Anindya, Ryan O'Donnell, and Rocco A. Servedio. "Optimal mean-based algorithms for trace reconstruction." Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing. 2017.
Later refinements also use complex analysis heavily:
[3] Peres, Yuval, and Alex Zhai. "Average-case reconstruction for the deletion channel: subpolynomially many traces suffice." In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pp. 228-239. IEEE, 2017.
[4] Holden, Nina, Robin Pemantle, and Yuval Peres. "Subpolynomial trace reconstruction for random strings{and arbitrary deletion probability." In Conference On Learning Theory, pp. 1799-1840. PMLR, 2018.
[5] Hartung, Lisa, Nina Holden, and Yuval Peres. "Trace reconstruction with varying deletion probabilities." In 2018 Proceedings of the Fifteenth Workshop on Analytic Algorithmics and Combinatorics (ANALCO), pp. 54-61. Society for Industrial and Applied Mathematics, 2018.
[6] Chase, Z., 2021, June. Separating words and trace reconstruction. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing (pp. 21-31).
Answer: there is some research showing undecidability associated with various aspects of computation of the Mandelbrot set, a famous, prototype fractal which is computed using complex numbers and counting the number of iterations associated with the equation $z \leftarrow z^2 + c$ to reach an unbounded increasing sequence. a detailed account and survey can be found in [1], which appeared in a physics journal but with heavy use of TCS concepts eg Turing Machines etc. an early ref [2] by Blum concludes that the Mandelbrot set is not decidable.
[1] Inaccessibility and undecidability in computation, geometry, and dynamical systems
 Asaki Saito, Kunihiko Kaneko
[2] A theory of computation and complexity over the real numbers Lenore Blum, 1990
Answer: Nister, Hartley, and Stewenius used Galois theory to prove the optimality of certain algorithms in computer vision. While not specifically an instance of Complex Analysis, this work is intimately associated with $\mathbb{C}$ because of the fundamental theorem of algebra.
Answer: [Sticky Brownian Rounding and its Applications to Constraint Satisfaction Problems][1]
From abstract: In this work, we present a new general and simple method for rounding semi-definite programs, based on Brownian motion. Our approach is inspired by recent results in algorithmic discrepancy theory. We develop and present tools for analyzing our new rounding algorithms, utilizing mathematical machinery from the theory of Brownian motion, complex analysis, and partial differential equations.
[1]: https://arxiv.org/abs/1812.07769


Confusion about the use of ng-options.

Question: I have a following confusion with ng-options. I have build a dropdown from array
located into my controller. Here is my html code:

    <select multiple="multiple" ng-model="first" ng-options="c.name for c in listObj">
    </select>
    <select multiple="multiple" ng-model="second">
    </select>

    {{first}}

and this is my JavaScript:
function testCtrl($scope) {
    $scope.listObj = [{name: "x", content: [1,2,3]},
                      {name: "y", content: [4,5,6]}];

}

And this is working jsFiddle:
http://jsfiddle.net/zono/rkBUL/10/
When user choose element from left select (with selected CTRL) I want
the right select to be filled with corespondign content property.
Eg:
When user select x to the left will be 1,2,3.
When add y to the left will be 1,2,3,4,5,6.
When deselect x - 4,5,6.
Best regards.
Comment: Why don't you simply add an `ng-options` to your second `` which uses the `ng-model` of your first ``? http://jsfiddle.net/DPBZP/
Comment: Ah, my misunderstanding. Unfortunately, the `ng-options` expression syntax is limited in what it can unpack. If you don't want to rely on a `$watch` as suggested by @package, then you could provide a helper function which unpacks the values in each `content` to display. I've updated the JSFiddle: http://jsfiddle.net/DPBZP/1/
Comment: This is solution but I want 1,2,3 ant etc to be in separate options.
Comment: Your comment solved me question. Can you post it as answer because I must accept it?
Answer: You have to $watch first, and when it changes, read content of all selected values into a new array, let's call it firstContent. The second select would show items from firstContent. Here's code from updated fiddle:
<select multiple="multiple" ng-model="first" ng-options="c.name for c in listObj">
</select>
<select multiple="multiple" ng-model="second" ng-options="element for element in firstContent">
</select>

$scope.$watch('first', function(value) {
    if (!value) {
        return;
    }
    var firstContent = [];
    for (var i = 0; i < value.length; i++) {
        firstContent = firstContent.concat(value[i].content);
    }
    $scope.firstContent = firstContent;
});

Answer: If you don't want to rely on a $watch as suggested by @package, you can employ a helper function in your controller to unpack each individual value of content, for each selected item in listObj, into an array for the ng-options of your second <select>.
$scope.contents = function(arr) {
    var values = [];
    if (angular.isDefined(arr)) {
        arr.forEach(function(v) {
            values = values.concat(v.content);
        });
    }
    return values;
};

And then:
ng-options="c for c in contents(first)"

Here's a demonstration JSFiddle.

Confusion about the use of ng-options.


How to enable HTML TextArea auto width resizing?

Question: Is it possible to have a HTML TextArea automatically resize its width with the browser window width (I mean dynamically)?
Comment: textarea { width: xxx%; } ?
Answer: Sure. For example like this
HTML
<code><textarea id="flex">Test text</textarea>
</code>
CSS
<code>#flex { width: 80% }
</code>
Answer: We can also achieve the following functionality by using bootstrap. Bootstrap uses grid layout and divides the whole screen in 12 grids, and as the screen window re sizes, different elements inside the body also gets shifted and re sized.You can download bootstrap library from this site:
http://getbootstrap.com/
Comment: it does not seems to be an answer, it may be a good suggestion, but not an answer.


Cubic residues modulo primes

Question: Let k is integer which is not a cube.
If there exists a prime p [respectively infinitely many primes p] congruent to 3 modulo 8 and such that k is not a cube modulo p?
Thanks in advance for proof or counterexample!
Comment: Have you tried applying the Chebotarev density theorem to a suitable extension $\mathbf{Q}(k^{1/3}, \alpha)/\mathbf{Q}$?
Comment: (Hint: For $p \equiv 3 \pmod{8}$ look at cyclotomic extensions; you also have to adjoin a 3rd root of unity to make the extension Galois.)
Comment: If you do not mind, could you say a little in which context this question arose/why you are interested in this. Some people find it helpful to have such information alongside with the actual question.
Answer: Your condition $p \equiv 3 \pmod 8$ is unusual, everything is a cubic residue $\pmod 3$ and $\pmod q$ where $q \equiv 2 \pmod 3.$ However, Timo seems to have this well in hand.
This is just a bit of culture. A rational number is a square if and only if it is a square in every $\mathbb Q_p$ for all $p \leq \infty.$
I got a bit frustrated thinking about the analogous statement for cubes, but it works. In GSS it is proved that, if a polynomial in one variable with integer coefficients has prime degree, if it is reducible in all  $\mathbb Q_p,$  then it is reducible in $\mathbb Q.$ In particular, the polynomial $x^3 -k$ is irreducible  in $\mathbb Q$ if $k$ is not a cube. As the degree is 3, a prime,   $x^3 -k$ is irreducible in some  $\mathbb Q_p,$ meaning that there is no linear factor and no root, as $3 = 1 + 2.$ Finally, by Hensel's lemma, $k$ is not a cubic residue $\pmod p.$
Language in the article (mentioning Chebotarev density) suggests that the direction I use, prime degree, was known for quite some time, that the news in the article is about composite degree.
The laughter may now commence.
Comment: @jan, the collective opinion of the experts here seems to be that you ought to know how to do this yourself, if you are engaged in research that requires this. Timo told you how to apply Chebotarev density. If you don't know how to finish that argument (I do not), your best bet is to place a more detailed question at http://math.stackexchange.com/questions?sort=active in which you say exactly why you care about $3 \pmod 8,$ say what Grunwald-Wang gives and what it does not, but mostly detailing your background.
Comment: Will, the Grunwald-Wang Theorem states that "global $n$-th power" equals "locally everywhere $n$-th power", and usually equals "locally almost-everywhere $n$-th power" (with the exceptions precisely demarcated).
Comment: @BR, thanks, I found this: http://en.wikipedia.org/wiki/Grunwald%E2%80%93Wang_theorem
Comment: Thanks! I see that by Grunwald-Wang Theorem: if k is not a cube in Q then k is not a cube modulo infinitely many primes p. But what with my extra condition "p is congruent to 3 modulo 8" (or similar congruences modulo power of 2)? Is it breaking nothing?

Cubic residues modulo primes


Aborting commit due to empty message

Question: I am going through a tutorial on git and my next task is to use a "git commit" command and use an editor to make my commit message.  I can get the editor to come up but I always get the "Aborting commit due to empty message error."  I looked at How do I make Git use the editor of my choice for commits? and Aborting commit due to empty commit message among other places and none of the options work.  The --wait isn't legal and the -multiInst and -notabbar arguments didn't help.  Also when I put the code in my C:\Users\Kendall.gitconfig git still uses the value I put in the core editor from the command line.  I tried to use the -F flag in my .gitconfig file but it had no effect because it still used the value from the command line.  Any help would be appreciated.
Comment: *Slow down.*  I can infer that you're trying to use an editor you've got installed locally to create your commit messages.  Let's start with the basics:  what editor are you using?  I presume you're on Windows, would you mind confirming that?
Comment: have you saved the file before closing the editor?
Comment: I put all the info in because the instructions said to share my research.  Sorry if it was too much.  I tried notepad++ and wordpad on windows and I am using cygwin.  I have saved the file with both of them, does it matter what name I use or where I save it?  Both editors come up blank to start with.
Comment: Yes it matters, git needs to find it. It's somewhere under .git directory; but usually git creates it and then opens it, so you just have to use the save command which won't ask for a filename. Also the file comes with some comments initially. That's how it works in Linux, for instance. I'm not sure about Windows, though.
Comment: I just get a blank file with no comments so something isn't working right.
Comment: I found the answer to my problem.  Notepad++ comes up with a blank new file but if I open ~/.git/COMMIT_EDITMSG and type in my message it works fine.  I have to do the same thing if I do a revert.  Thanks for the help!
Answer: You are not saving the file in the editor therefore when git tries to read the temp file it sees no commit message.
The easiest thing for beginners is to use the -m flag and pass your message as a string in quotes.
git commit -m "commit message here"

Comment: I am fine with using the -m flag, but I am trying to learn everything the tutorial is presenting.
Answer: I found the answer to my problem.  Notepad++ comes up with a blank new file but if I open ~/.git/COMMIT_EDITMSG and type in my message it works fine.  I have to do the same thing if I do a revert.  Thanks for the help!
Answer: Git commit ignores a line starting with #.
If like the message generated by Git Bash , you need to change "#" to string "".
Save message (and editor) , then commit will continue.
Comment: Thank`s! I Wasted a lot of time with this problem, when i stopped to use # on my commits, everything worked all right.
Answer: I just want to thank to Mr. John Zoetebier's answer above. (This answer can be just under his answer but I can't do that as I don't have enough credit? ... Anyway, if you do "git commit" to open Commit Editor, at the top of it, you should find:
# Please enter the commit message for your changes. Lines starting
# with '' will be ignored, and an empty message aborts the commit.
So, if I want to use the comment automatically created based on the changes, I must remove all the # at the beginning of each line. But since I had many changes which made a very long comment displayed in the editor, I didn't notice such thing at the top and searching hours to figure out why it keeps me giving:
Aborting commit due to empty commit message.
even though I "Save"ed and checking it saved as COMMIT_EDITMSG.
Hope anyone who got the same problem do not waste his/her time for such thing!

Aborting commit due to empty message


Rewrite my url for generating seo friendly url

Question: I am trying to rewrite my url for generating the seo friendly url. My original url is something like
video_play.php?cat=1?author=3?video=4

where

"cat=1" is represents my category and 1 is id of my category name like song,movie etc..
"author=3" 3 is the id of singer.
"video=4" 4 is the id of track being played currently...

I want to make this url some thing like video_play/song/artistname/songtitle.html
I am trying this code in .htaccess if any one can help me.. Thanks in advance...
RewriteRule /author/(.*)/cate/(.*) video_play.php?author=$1&cate=$2

Answer: Try this instead:
RewriteRule  /author/([^\.]*)/cate/([^\.]*)  video_play.php?author=$1&cate=$2


Traits in Scala (Ch. 12, Odersky et al., 2010)

Question: I am new to Scala. What are the differences (and similarities) between "frog" and "phil" in the following two expressions? What does the second one ("phil") do precisely?
scala> val frog = new Frog
frog: Frog = green

scala> val phil: Philosophical = frog
phil: Philosophical = green

This example is from Odersky et al. (2010, p. 259); see image below.
Comment: What, precisely, about the text accompanying this code was unclear and/or caused confusion?
Answer: The declaration of phil is just a declaration that restricts you to treating phil as a Philosopher (i.e. you can only use it in places that expect a Philosopher or a supertype of Philosopher).  You can do this with a Frog as well (thanks to extends Philosopher; that the compiler let you declare phil is only because a Frog is always a Philosopher).  So there's no practical purpose to that declaration.
In the context of the book, it just illustrates that you can treat a trait as its own type.  Most notably, this means you can define functions and methods that take and result in objects implementing a particular trait (as well as define collections of objects implementing a particular trait).


Force on side of pool from water

Question: Given a pool with dimensions
$$\ell \times w \times h \, ,$$
I am trying to derive an equation that will yield the force by the water on the sides of the pool, namely
$$\ell\times h \quad \mathrm{or} \quad w \times h \, .$$
For the side of the pool with dimensions $\ell \times h$, I started by using the familiar equation for pressure
$$F = PA \, .$$
Plugging in the expression for hydrostatic pressure for $P$ gives
$$F = \rho ghA =\rho gh(\ell \times h) = \boxed{\rho g \ell h^2} \, .$$
Is my reasoning, and corresponding solution correct?
Comment: Hydrostatic pressure changes with height. You have just multiplied by area, which means that you have assumed it to be constant. Instead, you should integrate over the area. You'll get an extra 1/2 term for the force.
Answer: As @Goobs says, the pressure force is $0$ at the top of the water line and increases to $\rho~g~y~dA$ on a surface of area $dA$ at depth $y$. Since this pressure increases linearly from $0$ to $\rho~g~y$ the average force on the wall is the average of the start and end: so, it is half of this value, and the total pressure is $\frac 12 \rho g h (h \ell).$
Comment: Would this be correct?
$\int dF = \int_0^H\rho g A \,\,dh = \rho g\ell\int_0^H h\,\,dh = \boxed{\frac{1}{2}\rho g H^2}$
Comment: Yes. For bonus points you would write it as $\int dA~\rho~g~h$ to start with, as that's one of those forces that you "know" is correct (to get the net force in some direction, sum all the little forces in that direction).

Force on side of pool from water


Meaning of "time situation"

Question: I have heard the sentence "we have a time situation here" in many places. Although one could easily decipher it means we are short of time when asking someone to do something... But I couldn't find the term "time situation" in a dictionary or some usage of the word "time" as a verb or noun which could be used in this way. I am probably not looking correctly.
Comment: It sounds "uneducated" to me, but even without a specific context, I'm sure it will always mean that the current situation is [***time-critical***](https://www.wordhippo.com/what-is/another-word-for/time-critical.html) in some way. Most likely, there's a ***deadline*** date/time for something to happen, in a context where there's some degree of risk that the deadline might not be met. OR that whatever needs to be done must be done ***immediately / as soon as possible***.
Comment: I heard that recently in a 2000 hollywood movie
Answer: In general, "an X situation," where X is some noun, means "a situation, insofar as X is concerned." An example usage:

We're going to be in a horrible budget situation for years.

This means: "we're going to be in a horrible situation, insofar as our budget is concerned, for years." Alternatively: "regarding our budget, we're going to be in a horrible situation for years."
So: "we have a time situation" means "we have a situation, insofar as time is concerned." In this case, "situation" means: "a critical, problematic, or striking set of circumstances."
So your sentence means:

We have a problematic set of circumstances here, insofar as time is concerned.

This essentially means:

The amount of time that we have is a problem for us.
Answer: The term "time situation" wouldn't normally exist outside of a sentence such as this.
The sentence comes from the more general use of the term "situation" in phrases like "we have a situation here", and people have taken that sentence construction and applied it more specifically to time.
Even the sentence "we have a situation" isn't exactly "grammatically correct", it would probably be more correct to say something like "we have a difficult situation" or "a tricky situation" but as with many things in English people take shortcuts with language for humour, dramatic effect, or brevity.

Meaning of "time situation"


What is the interest rate online brokerages paying out tied to?

Question: From my understanding it's tied to something called the 'prime rate', but what is that really and who determines what it is?  Is it always less than the rate of inflation?
Comment: Welcome, Amir!  Excellent question.
Comment: As for " Is it always less than the rate of inflation?", the prime rate is always 'more' than the rate of inflation. The purpose of lending money and charging an interest rate is to make a profit, so if the interest rate is not even keeping up with inflation, then there will be no profit. I guess that is why there is a concept of 'real' interest rate which is the (interest rate - rate of inflation). If this becomes negative, then the lender has no incentive to lend money.
Comment: It will be written on the broker's website which rate they are using as the 'benchmark'. Varies from broker to broker.
Answer: The prime rate is the interest rate banks use amongst themselves to lend money to each other only.
It is used as the basis (sometimes) for what interest rate banks charge you.  The prime rate is based loosely on the Fed rate.  There is a committee that meets regularly to set this and other industry interest rates.
http://en.wikipedia.org/wiki/Prime_rate
I am not 100% positive the following is totally accurate
The banks keep our deposits and pay us interest for doing so.  They are paying us interest because they take yours, mine and everybody elses deposits as a large lump sum and invest that money.  Sometimes as business loans, sometimes as mortgages and sometimes as credit card.
The banks have a book of business that will be EXACTLY how much credit they have extended to everybody.  But they do not keep that amount of cash in the vaults, only some smaller percentage of that large amount.  When I use my credit card and they need to transfer money to amazon.com, if they don't happen to have enough cash that day, they will just borrow from another bank that does, and the interest rate they pay to do so is the prime rate.  Since they are paying interest on the money they borrow to pay the debt I charged because they told me my credit was worth so much (...???...) they charge me a little bit more than that.
Hence your credit card or mortgage's APR being based on the prime rate.
I THINK that is what they do  If I am wrong leave a comment and I will update, or the mods can.
Comment: the fed rate is what the banks pay to borrow  from the Bank of Canada.the prime rate is the best rate the banks can offer the consumer


The Taylor expansion of the metric at the origin in geodesic coordinates

Question: It is well known that in geodesic coordinates we have
$$
g_{ij}=\delta_{ij}-\frac{1}{3}\sum_{k,l}R_{ijkl}x^{k}x^{l}+O(|x|^{3})
$$
I have been trying to find a rigorous proof of it, but I cannot find a readable proof online (see this one, for example) or derive it myself. From the compatibility with metric we have
$$
\partial_{i}g_{jk}=\sum_{\alpha}(\Gamma^{\alpha}_{ij}g_{ak}+\Gamma^{\alpha}_{ik}g_{aj})
$$
Since we know that $\nabla_{X}X=0$ for any vector from the origin, we have $\nabla_{i}\partial_{j}=0,\forall i,j$. This then implies all $\Gamma^{k}_{ij}=0$. So the first order derivative vanishes. However, it is not clear to me how to compute the second derivative. We have:
$$
\partial_{l}\partial_{i}g_{jk}=\sum_{\alpha}(\partial_{l}\Gamma^{\alpha}_{ij}g_{\alpha k}+\partial_{l}\Gamma^{\alpha}_{ik}g_{\alpha j})
$$
This can be simplified further by noticing that in the origin we have $g_{ij}=\delta_{ij}$. Therefore the above sum is in fact
$$
\partial_{l}\partial_{i}g_{jk}=\partial_{l}\Gamma^{k}_{ij}+\partial_{l}\Gamma^{j}_{ik}
$$
And we would have proved the statement if we can show that
$$
\frac{1}{2}(\partial_{l}\Gamma^{k}_{ij}+\partial_{l}\Gamma^{j}_{ik})=-\frac{1}{3}(R_{ijkl}+R_{ljki})
$$
By definition we have
$$
R_{abcd}=g_{ae}R^{e}_{bcd}=\sum_{e}g_{ae}R^{e}_{bcd}=R^{a}_{bcd}=\partial_{c}\Gamma^{a}_{db}-\partial_{d}\Gamma^{a}_{bc}
$$
Therefore we have
$$
R_{ijkl}+R_{ljki}=\partial_{k}\Gamma^{i}_{jl}-\partial_{l}\Gamma^{i}_{jk}+\partial_{k}\Gamma^{l}_{ij}-\partial_{i}\Gamma^{l}_{jk}
$$
But I do not know why we would have
$$
\frac{1}{2}(\partial_{l}\Gamma^{k}_{ij}+\partial_{l}\Gamma^{j}_{ik})=-\frac{1}{3}(\partial_{k}\Gamma^{i}_{jl}-\partial_{l}\Gamma^{i}_{jk}+\partial_{k}\Gamma^{l}_{ij}-\partial_{i}\Gamma^{l}_{jk})
$$
I do not know if I missed something obvious like using the Bianchi identity.
Comment: This link is dead, is there another resource? I'm wondering this as well.
Comment: The idea is to differentiate the Gauss lemma; if you're still interested, I can post an answer.
Comment: @GlenWheeler can you post please? I'd be interested
Comment: I hope that the following site will be helpful : http://www.rose-hulman.edu/mathjournal/archives/2002/vol3-n2/Wolfe/Rmn_Metric.pdf
Comment: http://studylib.net/doc/13872779/the-taylor-expansion-of-a-riemannian-metric#
Comment: How did you get the expression $\partial_l\partial_i g_{jk} = \partial_l \Gamma_{ij}^k + \partial_l \Gamma_{ik}^j$ from the expression for $\partial_ig_{jk}$? It seems like you are supposing that $\partial_lg_{\alpha k}$ vanishes
Answer: I asked this many years ago as a beginning graduate student. One general method of solving it is using Jacobi fields, and it can be found for example in Schoen-Yau's book. If I recall correctly, it is listed as an execrise problem in Morgan-Tian's book. The first one proving it is apparently Riemann himself.
I do not know if my original method has any hope (it has been four years, so maybe not). Hopefully this helps other people.
Comment: For anyone interested, I think do Carmo says (chapter 4 of "Riemannian Geometry") that the only formula Riemann proved in relation to the metric is the one appearing on page 9 of (this translation by Clifford) of his original paper. https://www.emis.de/classics/Riemann/WKCGeom.pdf

In Riemann's formula the sectional curvature is constant so it's a lot less general than the one here. Do Carmo has a guided exercise to prove it in chapter 8. Also, I read that Riemann never worked with the the Riemann curvature tensor. That was introduced by Christoffel.
Comment: I think you have to use the geodesic equation in your original method.


How do i add detail when sculpting?

Question: Im trying to sculpt a monster in blender and i do not know how to add detail to it. It looks very blocky when using clay brushes etc. Do i need to subdivide my object for more triangles? thanks.
Comment: also how do i make parts more sharp for example if i were to do scales on it
Answer: Dyntopo (adaptive sculpting) is the option to use to add detail without being constrained by the underlying mesh topology. As I can see from your screenshot, you are already using it.
Be aware of the Dyntopo option: "Relative detail". It makes the stroke detail dependent on the zoom level: «Zoom out big details, zoom in small fine details». So... just try zooming in!
There are other possible options, that you might find more suitable for you. For instance, "Brush detail": «You can increase and lower topology by simply resizing the brush itself».
Have a look at the manual for details about all the Adaptive Sculpting options: link to the manual.
Comment: Maybe mention alternative to relative, like constant for example.. I'm being picky but it's Dyntopo not Dynotopo.
Comment: not picky but completely justified! I fixed it. as for suggesting alternatives: there are plenty of options (I mentioned one) and I just wanted to point in the right direction, for that reason I included a link to the manual

How do i add detail when sculpting?


Mixed way ANOVA

Question: I have two variables (group, achievement level). I want to check the effect of an intervention on different achievement levels. For example, I want to check whether there is an increase in achievement scores in low achievers, average and high achievers.  Please suggest me which statistical tool should I use? Shall I use individual t-test as I have found in many articles? Or I should use mixed ANOVA?
Comment: You say "an increase in achievement scores", do you have achievement scores from both before & after the intervention? How did you arrive at the groupings? Did you simply categorize the participants based on prior achievement scores?
Comment: Yes I have both scores. I have categorized them on the basis of their summative scores.
Answer: You say achievement level is an independent variable, then talk about it as a dependent variable. Do you have two scores per person (e.g. a pre-treatment score and post-treatment score) and you are interested in the difference between those scores? If so, it sounds like what you want is simple factorial ANOVA. Predict post-treatment achievement levels based on group, pre-treatment achievement levels, and their interaction. The interaction will tell you if the effect of treatment depends on the level of pre-treatment achievement level.
Comment: Dear Andrew,thanks for your early response. Yes, I do have both pre and post scores for each participant.I want to find difference between groups for all levels.
Comment: So you want to find the average difference between groups? Its the same things, but leave out the interaction. $POST=GROUP+PRE$. Technically speaking, you can leave the interaction in there. If there is no interaction, then the models are equivalent. If there is, then that may be of interest (e.g. people responded, on average, to treatment (the main effect of GROUP), but people with low scores responded better than people with high scores(the interaction between group and pre-treatment scores)).

Mixed way ANOVA


Raspberry pi sound level

Question: I had this project of smoke detection.. so the smoke detector when it detects smoke will output a sound with a volume of 80dB, How can I measure dB using the raspberry pi and a USB microphone?
Comment: You may want to read this http://www.raspberrypi.org/forums/viewtopic.php?t=18014&p=179448
Comment: I think you can do this with a [piezo](http://en.wikipedia.org/wiki/Piezoelectric_sensor).  They cost < $5 and should be easy to find at an electronics supply.  I guess you might have to calibrate it against something -- which you could try with the USB mic too, but I think it will not be as reliable or consistent.
Answer: To measure decibels you would have two ways, after you acquire the signal from the microphone, apply Windowing (Hamming), do a Fast Fourier Transform (FFT), make the spectrum normalisation, apply A-Weighting and finally do your RMS calculation. From the RMS with the Perseval Theorem you can have your values in decibels dB.
Other option would be to do it by convolution, you would have to work with filters FIR, A Weighting and RMS calculation as well, you just take the FFT and spectrum out, and put signal convolution on top of it.
The USB microphone gives you what kind of data input? digital or analog?

Raspberry pi sound level


Implementing sharding with CUBRID DB

Question: Do you know how can I utilize CUBRID database sharding on Amazon EC2 or any other computer environment. I can't find any information of how it is doe on their website. (http://www.cubrid.org/)
Answer: I am related with CUBRID project.
CUBRID SHARD, the native database sharding feature, has already been developed. It will be released as part of CUBRID 8.4.2 which is set to be announced in three weeks on June 8, 2012. The manual and examples will be published along with the official announcement. You may want to subscribe to CUBRID official blog to receive news.
Comment: Since CUBRID SHARD has been released, here is Slideshare which explains how to configure sharding with CUBRID: http://www.slideshare.net/cubrid/database-sharding-the-right-way-easy-reliable-and-open-source-highload-2012
Answer: As far as I understand sharding is still on their roadmap.
Current version is still 8.4.1 and the same presentation on slide 51 shows their plans for future releases.

Implementing sharding with CUBRID DB