Do URL links copied from subscribed or web services like Apple News or YouTube embed tracking info?

Question: Suppose I'm logged into YouTube or Amazon, and I use their web pages "share" button to copy a link for the video/whatever into my paste buffer. Does this copied URL embed encoded info that specifically identifies my user account?
Answer: There is no generic rules stating what what a website must or must not do in this case.
For example, YouTube does not add any parameter tied to a user id in the sharing link. The link format is https://youtu.be/dQw...XcQ where the random string is the video id.
However, Stack Exchange does add the user id. The sharing link format is https://security.stackexchange.com/q/266612/91652 where the first parameter is the question id, and the second one the user id. It can be removed without breaking the link.
Answer: There is no simple yes/no answer, since services differ and link policies may change without notice.
A click on an URL may associated to your person in different ways:

inheritently in the link itself by a "user ID" attached. Lock at the link: does it contain enough apparent entropy for the likely number of users of that web service? "https://servicedomainxyz.com/currentoffers" is possibly, but unlikely a uniquely generated URL for 1000 web shop users, as compared to "https://servicedomainxyz.com/currentoffers_1234567/ABCDE". This may even change the way you copy the URL, e.g. using manual copy/paste of URL line or Chrome's share button, vs. e.g. stackaxchange share button below a question. Have the clipboard pasted as plain text and look at it befor you disseminate it.
URLs may be of low appaent entropy, but sent only to a limited number of people - if it is clicked, it was (one of) you (or a crawler/bot that randomly tried addresses). Is the URL known (or likely) to be reached via links from generic URL? Then it is likely to be visited by crawlers/bots more often, and seems less likely to be constructed for identification/tracking.
beyond that and out of scope of this question, of course there are more possibilities such as that the web page contacts the sender to load (possibly small and white, unvisible) images or do fingerprintimg of your system (OS, browser, screen resolution, fonts installed...). Also assuming network traffic interception is out of scope.


Switch Between Apps With Alt-Tab / Command-Tab on iPad or iPhone using Bluetooth Keyboard

Question: I have both iOS devices and with keyboards. I could be much more productive if I could do Alt-Tab / Command-Tab app switching using my keyboard. Is there any way to do this? Is there any way to switch between the two most recent apps or anything similar?
Comment: Here's another article on how to do this.
http://the.taoofmac.com/space/blog/2012/06/22/0023
Answer: No, there isn't a way to do this. As an alternative, I would suggest enabling multitasking gestures (Settings > General > Multitasking Gestures). With them on, you can switch to the next/previous app with a four-finger swipe, instead of bringing up the multitasking bar. You can actually swipe through all of the apps in the multitasking bar, in the same order (order of last use). Note that getting to an app through this gesture does not change their order, so if you swipe left to get to an app, you will swipe right to go back.
Comment: I'm afraid that's pretty useless for me. the reason why I bought a wireless keyboard was so that I didn't have to swipe and tap on the screen and keep the screen at arms length. :( what I really need is an external mouse, but when I bought a bought a Bluetooth mouse the iPad could not see it, apple support said they don't want people to use mice on an iPad' why do they care?
Comment: Still no support for cmd+tab as of iOS 8. The wait continues.
Answer: See here: http://richmintz.com/2011/04/ipad-app-switching-using-your-bluetooth-keyboard/
I haven't tried it, but if your keyboard has a home button, you should be able to double click it to get the task switcher up. So it seems it should be easy.

Method copied from source

First, you activate VoiceOver on the iPad, and specify that a Home button triple-press will turn VoiceOver on or off. Then, you just learn a few simple commands and practice, and a lot of common quickie things (like app switching, scrolling through web pages, etc.) become possible without taking your hands off the keyboard. This is most useful when, e.g., you're writing a blog post on the iPad, in the WordPress app, using the keyboard, and you want to hop over to a web page for a second to check something. Now you can do that without your hands leaving the keyboard, as follows:

press ctrl-opt-H twice to bring up the app switcher
press right-arrow to move to Safari, then ctrl-opt-spacebar to tap
press opt-down-arrow to scroll in Safari (or, if needed, right-arrow to move to the page selection button, etc.)
when done, switch back, via ctrl-opt-H twice, then right-arrow as needed, then ctrl-opt-spacebar to tap
Comment: This works great on my Anker Bluetooth keyboard. Just hold Fn then Esc twice.
Comment: On my iPhone 6s Plus with iOS 12 and a Realike Bluetooth external keyboard, which has an iOS mode, it is the ESC button alone, with no modifiers. Hitting ESC twice brings up app switcher. However, I can't find any keys that then move between apps. Alt+Tab mac-like app switcher does not work for me. However Alt+Space bar does bring up spotlight search. I can search then for the app name, and if (IF!) it narrows down to the only suggestion, then hitting enter switches to it.
Answer: As of iOS 9 the ability to switch between apps is included in the operating system. Just hook up a keyboard and press command+tab to switch between apps.
Answer: Edit: Below is pre-iOS9. See updated (accepted) answer below from Anonymous
In brief: It is possible, but not quite "alt-tab". Enable VoiceOver.
This is described here: http://decadentwaste.net/2011/03/navigate-using-a-bluetooth-keyboard-on-your-ios-device/
I believe this is also referenced from Graham Wheeler's answer. Sorry that I can't comment directly.
The article describes how to use the built-in "accessibility" options to navigate pretty much anything with the keyboard. I've tried it out using the basic Apple Wireless keyboard, which doesn't have a home button for example. I can now scroll, launch apps, switch apps from the keyboard.
Note, for comfort, I recommend setting the home button to enable/disable this voiceover mode. In addition, since the default for VoiceOver is to use spoken navigation for the UI, Opt-Control-S will mute the voiceover speech.
Comment: Link is dead as of 20140926. Here's archive.org: https://web.archive.org/web/20111023223347/http://decadentwaste.net/2011/03/navigate-using-a-bluetooth-keyboard-on-your-ios-device/
Answer: If you're jailbroken, you can install BeeKeyboard and Multitasktures to do this.
Answer: It's been added in iOS 9 or it was on before. I use an Anker Bluetooth keyboard.  I can Alt Tab just fine with it!
Answer: If one of you is using a simulator on MacOS, you should press "I/O" in the MacOS menu, and then "Input" -> "Send Keyboard Input to device".
After this, you can switch between apps with Cmd+Tab
Comment: The OP does not ask for how to Alt-Tab using the simulator, but with physical devices. Please amend your answer to keep it on-topic.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Do I need to replace my X-Box 360 DVD Rom drive?

Question: When I put in a game, it just says reading then says open tray.  Simply, it never reads, just toggles between reading and open tray.   Do I need to replace the DVD rom drive or is this a software glitch that can be fixed via an upgrade?
Comment: Can you get any games to work? For example, did you buy a brand new game that hasn't been used yet and try? I only ask because most of the time the games have been used so much they almost get 'burned' where it has a hard time reading the disc (Call of Duty addicts will agree with me).
Comment: Related, perhaps: http://gaming.stackexchange.com/questions/253/is-there-any-way-to-fix-an-xbox-360-that-intermittently-wont-read-discs
Comment: Also note, you can't just "replace" the dvd drive.  There is a specific key unique to your Xbox and dvd drive that if you swap out the drive it won't work.  You need to rip the key off of the dvd drive and push it out to the new one, it's quite complicated but possible.
Answer: I had this problem with my original Xbox 360. I was able to fix this by opening up my Xbox and cleaning the optics. Usually, it is not the actual DVD drive. Note, that if you open your Xbox it voids an warranty and may permanently damage the system. I will link a few Youtube videos displaying  the process I followed. Usually if your Xbox is old (5 years plus) the optics have dust and other particles that inhibit the disc from reading properly.
How to open Xbox
Then just use a cotton swab to clean the optical parts of the drive.
Comment: Failing that, you might need to replace the laser assembly.  It isn't difficult, but you do need to desolder an anti-static bead.
Comment: OK, I bought a opening kit, removed the drive, cleaned the laser, still no good.  I'm prepared to buy another drive.  How do I know which one to buy so my already in process games won't be lost?  I literally have 2 more races on Forza 4 to be done with every race on the game and I don't want to start over!  I have the Phillips/BenQ VAD6038 drive.  Can I just buy another one of those and be good?
Comment: @michaelSmith The data storing Forza 4 is located on your hard drive, and not not related to the DVD drive at all. As long as your hard drive still works, you can access your saved game files from any other xbox


Difference between Memory and Disk space

Question: I was watching this machine learning course by Andrew NG where he states memory requirement and disk space requirement separately while referring to machine learning algorithms.
What exactly is the difference and how are they occupied?
Answer: What you need to remember is :

Disk space : slow to read/write but cheap, any computer has > 100Go of hard disk
Memory : fast to read/write but expensive, usually a few Go

When you run an algorithm you usually use only RAM. In deep learning your dataset is often too big so you store it in the disk space and load pieces of it into RAM when needed for training.
There are tons of resources on the internet if you want to better understand how they differ (for example https://www.differencebetween.com/difference-between-hard-disk-and-vs-ram/)
Comment: -Go = gigaoctet (measures how much you can store : https://en.wikipedia.org/wiki/Octet_(computing))
-I mean "expensive" in terms of how much it will cost you, having an extra 8Go of RAM is much more expensive than an extra 8Go of hard disk
-"So Disk Space means hard disk and memory means RAM right?" I think so yes
Comment: Because you used it twice: What do you mean by Go? Is this an abbreviation?
Comment: What does "expensive" mean here?
Comment: So Disk Space means hard disk and memory means RAM right?


How do I tap multiple images to share them all at once with iCloud Photo Sharing?

Question: I can't reproduce Apple's first tip on their iPhone tips and tricks page. When they say tap multiple images I assumed them mean tap the 'Select' button in the upper right then select photos one by one but their screenshot shows photos selected while not in selection mode. The only way this screenshot makes sense to me is if they photoshopped the nav bar with the rest of the screen while in selection mode. Am I missing something?
Answer: Indeed, the screenshot does appear to have been edited.
The correct way to select multiple photos is to press the Select button, then tap the pictures.
As far as I know, it is impossible to select images without pressing the Select button, and pressing the button changes it to a Cancel button, and the navigation bar title changes to Select Items (or the number of items selected), as well as removing the back navigation button.

On the left: Apple's screenshot; On the right: how it should appear when selecting multiple pictures.
Answer: Though I don't have my iPhone on me, here's what I found on my iPad.
If you go to an existing Photo Stream and tap the '+' button, it will bring you to moments. You can tap "Select" for all or just individual moments. From there, you are able to select and deselect one photo at a time!


Is there a way to make the bounding box of a group rotate with the group in Illustrator?

Question: I'm trying to skew square grouped art onto a "cube" shape (a hexagon). I can get the two sides, but the top "diamond" is hard to do because, when I rotate the square image to match the front edge of the diamond, the bounding box resets to align with the x and y axes, preventing me from warping it correctly.
Comment: Unfortunately, no.
Comment: This is strange - for me in CS6 (windows, recent install so few custom settings), it just works how you want - UNLESS I have something else not in the group selected. In fact the only way I can make it act like you say is by selecting the group *and* something else. Are you sure everything in your selection is properly grouped, *and* all objects are part of that group? Also, maybe try putting it all in a square clipping mask? Also, maybe try without the graphs, or after breaking (ungrouping) the graphs. The graph tool is ancient and is not compatible with many basic Illustrator functions.
Comment: I ended up just rotating the other parts by a numeric value for the change (so that I could leave the group to be skewed with one "horizontal" edge), then rotating them back.
Answer: It depends upon what the object is and WHEN the object was rotated - current working session or previous session where the file has been closed and reopened. In addition to what has been done since the object was rotated, assuming it's still the current working session.
The primary thing is that the bounding box resets upon certain actions such as saving, expanding, copy/pasting, duplicating, transforming, etc. The bounding box has never been designed to stay rotated with the object, although it will do just that in some instances.
The issue with groups is that each object within the group technically has its own bounding box. So which box is the correct one to display? AI can not possibly determine that in most cases, so it creates one bounding box square to the artboard.
It does seem like it would be an easy matter for AI to "find the edges" of the group, determine corners, thus determine angle and create a bounding box... but it just doesn't work that way. Chalk this up to along the same lines of AI never remembering the degree of rotation for objects (like InDesign does). There's little reason that could not be part of the application, it just is not.
In many cases using Effects > Distort & Transform > Transform may be better to use, although less intuitive. Primarily because the effect will remember degrees of rotation along with other settings.
Answer: I was wrestling with this today and found a fix for one case at least.
It turned out I'd rotated one of the objects in my group exactly 90 degrees, so it still looked axis-aligned. But when I grouped it together with other objects, Illustrator saw multiple different bounding box orientations and so it ignored them all and stuck with the default axis-aligned box for the group as a whole, even after I'd rotated it.
To fix this, I did the following:

Undo any rotation of the group so the contents are in an axis-aligned orientation.
Ungroup the objects
Select each object, and choose Object -> Transform -> Reset Bounding Box
Regroup the objects

Now that they all agree about what bounding box orientation they want, Illustrator will respect that consensus as we rotate the full group.
Answer: selecting objects and hitting object>transform>reset bounding box will cause the outer bounding box to rotate with the objects until one of the objects is rotated relative to the others.
Comment: Please can you explain better what you mean, for example with an screenshoot?


Metric trace of third derivative

Question: Let $(M,\langle \cdot, \cdot\rangle)$ be a Riemannian manifold, and $\varphi: M\to \Bbb R$ be a smooth map. Denoting the gradient of $\varphi$ by $\nabla \varphi$ and the covariant Hessian by $\nabla^2\varphi$ (that is, $\nabla^2\varphi(X,Y) = \langle \nabla_X(\nabla\varphi), Y\rangle$), I would like to compute the metric trace $${\rm tr}_{\langle \cdot,\cdot\rangle}\big((X,Y)\mapsto \nabla^2\varphi(\nabla_X(\nabla\varphi), Y)\big).$$I'm a bit stumped. I tried to do it in coordinates using $({\rm d}x^i)^\sharp = g^{ij}\partial_j$ but I couldn't simplify anything. Help?
Answer: Writing everything in local coordinates. First of all, we have
$$(\nabla_{\cdot} \nabla \phi)_i^j = g^{jk}\phi_{ik} = \phi_i^j.$$
Let $A(X, Y) = \nabla^2 \phi(\nabla_X \nabla \phi, Y)$. Then
\begin{align}
\text{tr} A &= g^{ij} A(\partial_i, \partial_j) \\
&= g^{ij} \nabla^2 \phi (\nabla_{\partial_i} \nabla \phi, \partial _j) \\
&= g^{ij} \nabla^2 \phi ( \phi_i^k \partial_k , \partial_j)\\
&= g^{ij} \phi_{kj}\phi_i^k = \phi_k^i \phi_i^k.
\end{align}
Remark: For any symmetric bilinear form $V\times V\to \mathbb R$, let $\tilde B : V\to V$ be given by
$$B(X, Y) = g(X,  \tilde B Y)\ \  \text{ for all }X, Y\in V.$$
Then with $B = \nabla^2 \phi$,
$$ A(X, Y) = B ( \tilde B X, Y) = g(\tilde BX, \tilde B Y).$$
One might assume that $\tilde B$ is diagonalized at one point, then
$$\text{tr}A = \sum_{i=1}^n g (\tilde B e_i, \tilde Be_i) = \sum_{i=1}^n \lambda_i^2.$$
Comment: @IvoTerek: In its full ugliness, it's the contraction $$\def\tr{\operatorname{tr}}\tr_{18}\tr_{23}\tr_{45}\tr_{67}\nabla^2 \phi \otimes g^{-1} \otimes \nabla^2 \phi \otimes g^{-1}.$$ Since $\nabla^2 \phi$ is symmetric, this can be simply written $|\nabla^2 \phi|^2$.
Comment: I can follow your computation, but is there a way to describe that result without coordinates?
Comment: I am not sure what you want, @IvoTerek . I added something anyway.

Metric trace of third derivative


Why do we take the compressibility factor equal to one when graph is plotted?

Question: I saw the graph of compressibility factor against pressure I was confused to see that all the gases are started by 1 unit of conpressibility factor when pressure is zero. So why do we take the compressibility factor equal to one when the graph is being plotted?
Answer: I think that at $p = 0$ the compressibility factor ($Z = pV_m/RT$) itself is not particularly well-defined since $p = 0$, $V_m = \infty$ and $T = 0$. Zero pressure is not a state that we can reach.
However, if you use any equation of state and take the limit as $p \to 0$ (or $V_m \to \infty$, which is equivalent), you will find that $Z \to 1$. Try it with the virial equation of state:
$$pV_m = RT\left( 1 + \frac{B}{V_m} + \frac{C}{V_m^2} + \cdots \right)$$
This happens with all gases because the individual gases are identified by their virial coefficients $B, C, \ldots$ and the terms involving these constants vanish as $V_m \to \infty$.
A simple qualitative explanation is that in the limit of $p = 0$ all gases behave ideally; for an ideal gas, $Z$ is of course equal to $1$ because of the ideal gas law $pV_m = RT$.


How to use technically dual-licensed software?

Question: From a practical angle.
Say I downloaded some Open Source SW which is dually licensed, e.g. by AGPL and European Union Public license.
Now I want to include it into my project.
What steps should I make to establish that of 2 licenses I choose to comply with, say, AGPL?
Is it necessary to make such choice and declaration?
Answer:
Is it necessary to make such choice and declaration?

No, it is not needed to make an explicit choice and declaration on which license you choose to follow. It is even possible to use the library in a way that is compliant with all the applicable licenses and allow your users to choose.
Nearly all licenses require that you inform your users about the license under which you received the third-party code. If the software is dual-/multi-licensed and you choose not to follow some of those licenses, then you choose to receive the software only under those licenses. You communicate only the licenses you comply with to your users and you don't mention the licenses that you chose to ignore.
For your users, the most important information is what terms apply to the copy they received from you, not what other terms could apply if they get a separate copy directly from the upstream provider.
Answer: I agree and share the answer by @Bart van Ingen Schenau, adding that dual licensing should be granted with licenses presenting some similarity. EUPL & AGPL fit, because they both cover remote access "distribution" and are both share-alike/reciprocal (however, with more compatibility/interoperability on the EUPL side).
At the contrary, dual licensing with a strong copyleft license one side and a totally persissive license on the other side would not be the most appropriate.


ZX Spectrum+ 48K with faulty memory writing address

Question: I have ZX Spectrum+ 48k (board issue 6a) with writing to memory issue.
When I try to write a value by POKE command to address 49152 (C000h) then it overwrites additionally value with address 16384 (4000h). See also attached screenshots.
Any thoughts how to fix this?
Answer: As pointed out in the other answer, $4000 is indeed the screen memory - so, if you print something to the screen from your BASIC program (which you do), your test program will indeed change that memory in other ways than you seem to expect.
If you want to PEEK and POKE starting from 16384, make sure your program doesn't print to the top line of the screen, for example by adding a line
<code>1 CLS : PRINT
</code>
That will produce much less confusing results and give you the first 32 bytes from 16384 to play with (as long as your screen doesn't scroll).
If the screen output you show is generated from the program, then your symptom is indeed a bit different from what you have analyzed (it's apparently not the write that goes wrong, but in fact the read):
You seem to print a "0" to the first screen position in line 10, so PEEK($4000) in line 20 should indeed return 0 (the pixel pattern of the empty top line of the "0" character), which it doesn't. This indicates your PEEK in that line 20 does indeed not read $4000, but in fact $C000 - or something entirely different. This hints to the /RAS and /CAS generation for the upper memory being at fault. If the write had gone wrong, you should have been able to see a black overbar on the topmost "0" character reflecting a 255 at 16384.
/RAS and /CAS for the upper memory are (unfortunately) generated from A15 and some control signals by the ZX8401 (a custom IC) in the later Spectrum issues (there used to be discrete logic, simpler to repair in earlier revisions). The RAS line passes the IC24 inverter, which could be another source of fault. This assumes you haven't messed with some other parts of the system (like the "TI" and "OKI" jumpers) which could confuse the 8401.
After some clarifications:
Your problem doesn't seem to be with upper, but with lower memory address decoding. Your real problem seems to be that the ULA (IC1) doesn't seem to be taking A14 into account when it decodes lower memory addresses for write (the ULA does the low memory address decoding totally independently from the 8401, which does the upper memory decoding.) When A14 is asserted, the ULA shouldn't generate lowmem RAS and CAS - apparently it does, however.
There's two possible reasons that A14 is ignored:

ULA is toast. This can easily be, the ZX Spectrum ULA is known to fail. It is, however, relatively unknown (at least to me) that an ULA is failing partially. All cases of defective ULAs so far I've only seen them failing completely (resulting in a totally non-functional computer).
A14 doesn't reach the ULA at all. This would lead to your symptoms. When the ULA can't see the address line at all, it would assume it always low, thus always asserting low memory RAM select. Check continuity from the CPU pin 4 to the ULA pin 36. Maybe the ULA socket has a problem. A14 to ZX8401 seems to work though, so the problem can only be on the short path between 8401 and ULA.
Comment: Yes. I can see black dash near the left top corner when writing a value to $C000. Also can you explain when "TI"/"OKI" jumpers placed on Issue 6A board?
Comment: That black overbar is not on your screenshot. Anyhow, if you can see it when POKING to $C000, then clearly the write goes wrong. The TI/OKI jumpers are directly in the middle of the PCB near IC 27. The jumpers must match the DRAM type (rather the vendor) you have in the upper16k of memory. Explained here: http://blog.retroleum.co.uk/electronics-articles/repairing-a-zx-spectrum/ram-in-the-zx-spectrum/
Comment: Did you change the upper RAM chips? If you did, you probably have to set the jumpers according to the vendor and chip types.
Comment: It is not on my screenshots due to line 40. Current upper memory chips are TMS4532-20NL4.
Comment: Ignore the complete upper memory stuff above. Your problem seems to be in *lower*, not *upper* memory addressing. Apparently the ULA doesn't see (or ignore) A14.
Comment: The CPU pin 4 and the ULA pin 36 are connected.
Comment: That just leaves one conclusion...
Answer: 4000h is in the screen memory area and is going to get overwritten when the screen is updated, so only write here if you want to update the screen
you need to use the clear command to limit the basic memory then you can peek and poke the high memory locations
Comment: *In an emulator this code works correct.* If it does work "correct" in all circumstances, then the emulator has a problem. Otherwise, what you had on the emulator screen wasn't the same as what you had on the screen in the hardware.
Comment: It is unlikely your code works like you seem to expect in an emulator. The PEEK (16384) in line 20 should indeed return 126. This PEEK peeks the first byte in screen memory, which at this point in time should contain the pixel pattern of the upper bar of the "0" you have printed there.
Comment: You don't actually need to use CLEAR to be able to PEEK and POKE into memory if you know what you're doing. $4000 is the screen memory and should be safe to PEEK and POKE, $C000 also is relatively safe as well if you don't have a particularly large BASIC program in memory - ZX Spectrum BASIC fills memory from the bottom up.
Comment: In an emulator this code works correct. This is some hardware issue (I can successfully load only small programs due to this memory issue) but don't know what I need to replace (CPU, ULA or some other chip). Also test program rebooting computer on a high memory test.
Comment: Agreed, however, that you shouldn't normally wildly POKE into Spectrum memory....
Comment: @tofro: The first line of the '0' character bitmap is blank, at least using the standard Spectrum font. Try `10 CLS: PRINT "0": PRINT PEEK 16384, PEEK 16640` for example.
Comment: @john_e I've already realized that, see my answer. Problem is I can't fix the comment


CSS3 PIE Issue(s) with loading properly

Question: I've uploaded the .htc file to my S3 CDN which did not seem to load at all. Then, I proceeded to uploading the .htc file to the same web server as the domain the document is running on, linked it properly and implemented the behavior CSS the way I've done it for previous shims in the past. However, the border-radius input boxes are not re-rendering within IE(8). Can any provide any insight to why this is not working properly?
Please view https://give.massgeneral.org/bootstrap/sslpage.aspx?pid=2045 and view the CSS properties for any of the input boxes within the Donation form.
It appears that once the script is loaded, the boxes disappear within IE8. The script appears to be loading properly, so I'm not sure where the "hiccup" is.
Thanks ahead of time for any help/assistance provided.

This question is in relation to the one I left last Friday on the
  developers support forums, which I have yet to receive a response for
  http://css3pie.com/forum/viewtopic.php?f=3&t=2033
Answer: It appears, after further review and troubleshooting, that the issue was with the elements not being positioned relatively that are inheriting the behavior(PIE.htc).

Please refer to: http://css3pie.com/documentation/known-issues/

CSS3 PIE Issue(s) with loading properly


What effect does the non linear narrative of Mr.Nobody give?

Question: The film uses a narrative that subverts from normal linear narratives. I would like to know why this is and what effect it has.
Comment: @BCdotWEB Doesn't matter even if it is, though. Judge the question on its own merits, not on the motivation of the asker.
Comment: "I need to know why this is and what effect it has." Is this a homework assignment?
Answer: Why is this non-linear narration?
Spoilers alert
As the protagonist name goes by Nemo Nobody, we're talking about nobody in the film. Nobody we see on screen exists in Nobody's life-yet. Infact there was a particular scene(few minutes before the climax) when 118 year old Nemo says

In chess, there is a move called Zugzwang ...when the only viable move is to not move at all.

That's where the story's gist is being revealed. Whatever the viewers have been seeing right from the beginning to the very point ,have never happened at all,atleast not yet. Nemo at 9 year old was confused to make a choice.He wonders whether he has to stay with his dad or go along with mom.Then he goes on thinking what would happen to each and every choices that he would make. He imagines all the possible combinations.

Goes with mom. Meets and falls in love with Anna at 15.only to miss and find her again at 20 something.Makes love with her and Anna leaves. They find each other again(damn,Butterfly effect). They get married.Some year later, the car in which Nemo travels is met with an accident. He drowns and dies. (Butterfly effect again)
Stays back with dad.Meets and falls in love with Eisle. Here some sub cases:

1) Eisle rejects him for Stefano(the man she desires). So Nemo finds Jean, falls in love with her, marries and becomes rich but unhappy. Later was assassinated.
2) Eisle was somehow convinced and Nemo finally get her to marry him. Here, he imagines the car which carries them after marriage explodes due to an accident and he lives with Eisle's memory and aeons later goes to Mars to fulfil Eisle's earlier wish of-
to bury her ashes in Mars and there he meets Anna again. Well, even here he dies due to sudden explosion(oh no. Not again)

or rather he likes to imagine where their marriage car doesn't meet with any explosion but their marriage broke due to Eisle's depression and kind of guilt. One day after Eisle leaves him, he dies by drowning himself due to some unsaid, unseen Holocaust where water drowns his whole home. (should have learnt swimming properly when you were 9, Nemo instead of peeking at Anna -_-)
All of these are might happen cases of Nemo's imaginations. Now,back at 9, he wonders what choice to make. Which choice would lead to what life? He thinks all the possible scenarios as a 9 year old while chasing his mommy behind a train (all these happens in movies, meh!). That's when Nemo makes a decision.

Every path is the right path. Everything could have been anything else and it would have just much meaning.

As said by 118 year old Nemo.
So, since at the end  Everyone dies in all of his 'may be possible scenarios', he runs in the middle track (neither back to his dad nor behind his mommy) concluding as long as he makes a choice, anything and everything might be possible.
What effect did it had?
I can just talk about myself but not everyone. Probably, the director wants to see this movie in the eyes of 9 year old Nemo which indeed made it an unforgettable experience. The non-linear narration is partially to keep the viewers hooked to their seats with 'WTH is happening now and which is true' thoughts and partially to show how a 9 year old is learning about making choices and it's effects. Though the movie was said to be based on The Butterfly fly effect, I highly disagree with the crew as it gives a false picture of it. They described the Butterfly effect just as in definition but gave really bad examples to it.
But nonetheless, it was one of the most Wonderful movies. I thought to show it to my little brother saying 'As long as one makes choices, nothing can be predicted and our well-being depends more on the choices we make than anything else'. But the movie is R-rated and after completely watching it, I decided not to show that movie to my baby bro for obvious reasons(-_-). May be Nobody would tell us that. We have to find it ourselves-The importance of making choices.
Comment: Were they trying to say it was based on the "butterfly effect" as in chaos theory, or the "Butterfly Effect" movie?  It sounds a lot like the latter.
Comment: It sounds more like the latter to me too.It's also a very bad example of the 'The butterfly effect' as in Chaos Theory
Answer: Well, for me personally, it is more interesting to follow a movie that deviates from the normal linear timeline, jumps back and forth in time. It makes me more curious about the story line, more included, and it makes me follow the story more carefully. So, I even kinda prefer this kind of story telling to the usual, "normal" way..
This approach is not used only in the movie industry (e.g. Mr.Nobody, Memento). It's shown as very effective in series (e.g. Lost), and novels (e.g. The Witcher), too.


When I paint in vertex paint mode, can I paint per vertex with python script?

Question: I know that selecting vertices is possible in edit mode. I want to color after selecting a vertex in vertex paint mode. Is that possible?
Answer: This does what you want I think. It's not particularly efficient though since it loops through all verts and all loops.
<code>import bpy

ob = bpy.context.active_object
assert ob.type == 'MESH'
assert ob.mode == 'VERTEX_PAINT'

mesh = ob.data

# Get the active vertex color layer
color_data = mesh.vertex_colors.active.data

# Find index of all selected verts
sel_vindexs = set(
    v.index for v in mesh.vertices if v.select
)

# Find all loops (loop = corner of a poly) that touch
# a selected vert and make them to red
for loop in mesh.loops:
    if loop.vertex_index in sel_vindexs:
        color_data[loop.index].color = [1, 0, 0, 1]
</code>


show desktop in gnome-classic

Question: I am trying to add a "Show Desktop" button on the panel. Super + Alt + RightClick does not work on Gnome Classic. Does anyone know how can I add this button to show the desktop? Also, assigning the keyboard shortcut Super + Ctrl + D in the keyboards / Shortcut did not work.
Any help would be highly appreciated.
I am a beginner in Xwindow, but proficient in terminal.
Since I am using a pretty old machine, unity and compiz have failed to deliver the performance. gnome-classic has been the best so far.
Answer: Ctrl + Alt + D ( Under SystemSettings -> Hardware -> Keyboard -> KeyboardShortcuts -> Navigation -> HideAllNormalWindows is the answer for the show desktop shortcut atleast. I still haven't found any way to put an icon on the panel though.

show desktop in gnome-classic


Punctual Hilbert scheme of four points

Question: I am looking at $\text{Hilb}^4(\mathbb{C}^2)$, which is the Hilbert scheme of four points on $\mathbb{C}^2$. In particular, I am just looking at four points collided (at the origin), and want to know what all the non-isomorphic ideal representations are. For example, $I = \langle x, y^4 \rangle$ has colength 4, thus is an element in $\text{Hilb}^4(\mathbb{C}^2)$. I'm curious to know what are the non-isomorphic ideals like this of colength four. Thanks for the help.
Answer: The $T=(\mathbb C^\times)^2$-action on $\textrm{Hilb}^n\mathbb C^2$ (lifted from the natural one on $\mathbb C^2$) has, as fixed points, the monomial ideals, which correspond to (one-dimensional) partitions of $n$. Hence if you can list the $p(n)$ partitions (Young tableaux if you prefer!) of $n$ and you write down the corresponding monomial ideals, you are done. In the case of $n=4$, you get:
$$(x,y^4),(y^4,x),(x^2,y^2),(x^3,xy,y^2),(x^2,xy,y^3).$$
NB. (In case you wonder how to find the generators in general.) Represent the polynomial ring $\mathbb C[x,y]$ by listing all possible monomials in $x$ and $y$, along two axes. A Young tableaux shapes for you a "staircase" (called Hilbert staircase), and since the Young tableaux (or partition) is the complement of the corresponding ideal, you can read the generators of the ideal "under the stairs"!
Comment: Thanks for the help @Brenin! I was hoping you could clarify a few things.  I see what you are talking about with the tableaux, but if you do this for the n=3 case, I seem to be getting $\langle x, y^3 \rangle$, $\langle x^3, y\rangle$ (isomorphic), but then $\langle x^2, y^2\rangle$, but this has colength 4, not 3. I'm somehow missing the $xy$ term. For this one, my tableaux looks like two vertical blocks and two horizontal (sharing one block). Can you help me see what I'm doing wrong? Thanks again for the help.
Comment: Yes, the third fixed point for $n=3$ corresponds to $I=(x^2,xy,y^2)$.Think of the box in the corner as $1\in\mathbb C[x,y]$, and the two other boxes as $x$ and $y$. All the rest is the ideal $I$. Can you see it now? (It's a pity I cannot draw here!) Again, if you draw the tableau, the generators of the corresponding ideal are the monomials which define the shape of the staircase.
Comment: Yes, I was misinterpreting where the "x's" and "y's" went but I see that they go in the Tableaux (duh). And yeah as you said, the Tableaux is the compliment of the ideal. That was also misunderstood by me but I see it now. Thanks so much!
Comment: My pleasure. Have fun with boxes :)

Punctual Hilbert scheme of four points


Comparing nodejs c++ addon's speed with js equivalent?

Question: I've got a nodejs programm in which I do a lot of computations. I was thinking about making it faster so i decided that I will try to move some code to c++. But first I've performed a quick test to see if the performance boost is significant.
I know that calling a c++ function in a v8 is expensive so in my test there is only one call!
binding.gyp file:
{
  "targets": [
    {
      "target_name": "test",
      "sources": [ "test.cc" ]
    }
  ]
}

test.cc file:
#include <node.h>
#include <v8.h>
#include <cstdlib>
#include <time.h>

using namespace v8;

Handle<Value> Func(const Arguments& args) {
  HandleScope scope;
  double sum = 0;
  double x = rand() / RAND_MAX;
  double y = rand() / RAND_MAX;

  for (int i = 0; i < 1e9; i += 1) {
    x = x / y;
    y = x * rand() / RAND_MAX;
    sum += x + y;
  }

  return scope.Close(Number::New(sum));
}

void init(Handle<Object> exports) {
  srand(time(NULL));
  exports->Set(String::NewSymbol("func"),
      FunctionTemplate::New(Func)->GetFunction());
}

NODE_MODULE(test, init)

test.js file:
'use strict';

var cpp = require("./build/Release/test").func;

function js() {
  var sum = 0;
  var x = Math.random();
  var y = Math.random();

  for (var i = 0; i < 1e9; i += 1) {
    x = x / y;
    y = x * Math.random();
    sum += x + y;
  }

  return sum;
}

function log(msg, hrtime) {
  console.log(msg, (hrtime[0] * 1e9 + hrtime[1]) * 1e-9);
}

var t = process.hrtime();
js();
log('JS', process.hrtime(t));

t = process.hrtime();
cpp();
log('CPP', process.hrtime(t));

The results:
JS 8.060747399
CPP 15.041201326000001

Why c++ addon is so slow?
I'm using node v0.10.21
Comment: Please see this question http://stackoverflow.com/questions/15393039/why-v8-in-node-js-is-faster-than-in-my-native-c-addon
Answer: The thought of "write perf sensitive parts in C++" is flawed in V8. It makes sense in python/php where the canonical interpreters are literally 10000x+ slower than javascript compiled by V8.
If you write JS with perf in mind you will easily reach a fast enough level. Although writing such JS is not really easy because pretty much every intuitive idiom is bad for performance.
Answer: The div operation is the most expensive, and you're using it 3 more times in comparison with the js code. Also, you don't know how random() is implemented. The random() code from c++ might be very different from the random() code from js, so don't make assumptions.
Comment: It turns out that c++ rand() function is MUCH slower then Math.random() js function.


When to use/difference between "Amoroso" and "Cariñoso"

Question: When looking for the term "loving" on SpanishDict.com, it gives two different words that seem to translate the same. However the examples show different applications. Is there a difference between amoroso and cariñoso? If so, what are the applications for each?
Comment: cariñoso is affectionate, as an good dictionary will tell you.
Comment: @Lambie it also shows loving as an alternate definition. Likewise, amoroso shows affectionate as an alternate definition. I knew there was a distinction, but I needed clarification.
Comment: cariño is affection or tenderness, not loving. amor is love, and amoroso is loving. So, I dunno what dictionaries you are using. I suggest the Larousse Spanish - English, which you will find under Larousse Espagnol - Anglais. If cariñoso is used to mean to take care of someone with loving care, for example, then, yes, it is loving but not on its own.
Answer: The DLE is not very helpful in this case. It says for cariño:

m. Inclinación de amor o buen afecto que se siente hacia alguien o algo.

But the examples on SpanishDict go in the right direction: the word amor describes a much stronger feeling, and is most often used for romantic love or sometimes for the love between a parent and a child, as shown in the first example of the DLE's entry for amoroso ("Padre amoroso").
The word cariño refers to love and affection in a broader sense and a less strong way: it may describe the love between a parent and a child, but it also often describes affection between friends.
In my experience, the adjective amoroso describes a person who feels intense love (regardless of how they show it), while the adjective cariñoso refers to a person who often shows their affection or love, for example by hugging. This last paragraph comes with the usual disclaimer that this may be a regional thing (Spain) and it might be different in other regions.
Answer: To add to Wimi's reply as to the difference between both adjectives when they accompany the noun, which is based on the distinction between "amor" and "cariño", the adjective "amoroso" can also be said of somebody who is lovable, that is, who arouses a feeling of tenderness, or who has nice and kind gestures.
Instead, "cariñoso" is used to mean "affectionate".
If you say:

¡Qué amoroso!

you mean that the person is nice or kind, and arouses your positive sentiment towards him or her.
Instead, saying:

¡Qué cariñoso!

is a statement that the other person shows affection towards others.


Why is the solution of a first-order nonhomogeneous equation equal to a particular integral and a complementary function?

Question: I just learned today how to solve a first-order nonhomogeneous equation by breaking it down into a particular integral and a complementary function. What i'm wondering is WHY is the solution equal to these 2 things added together? I can see how each individual part of them is solved from the general term but I dont understand why when u add them together, u get the general solution to the complete differential equation?
Comment: 0% accepted rate is not a good sign here. :)
Answer: Are you asking why the general solution is composed of a homogeneous solution and a particular solution?  All right, let's say we have a particular solution $y_p$ that satisfies the linear differential equation
$$\sum f_n(x)\frac{d^ny_p}{dx^n}=g(x)$$
and a corresponding homogeneous solution $y_h$ satisfying
$$\sum f_n(x)\frac{d^ny_h}{dx^n}=0$$
Now because the derivative of a sum is equal to the sum of the derivatives, we have
$$\sum f_n(x)\frac{d^n(y_p+y_h)}{dx^n}=\sum f_n(x)\frac{d^ny_p}{dx^n}+\sum f_n(x)\frac{d^ny_h}{dx^n}=g(x)+0=g(x)$$


What is the vimscript's no operation statement?

Question: What is the NOP code for vimscript?
Answer: VimScript interpreter ignores colons and spaces, so : could be qualified as "nop" command. For example, echo 'foo' | : is the same as just echo 'foo'.
However, there's a problem: due to Vi compatibility :| is forcefully parsed as :print, so echo 'foo' | : | echo 'bar' surprisingly transforms into echo 'foo' | print | echo 'bar'.
To deal with this one can create a user-defined command, e.g.
command! -bar Nop :

Now this works: echo 'foo' | Nop | echo 'bar'
Answer: According to the url provided:

The simplest possible statement in C that behaves like a NOP is the so-called null statement, which is just a semi-colon in a context requiring a statement. (A compiler is not required to generate a NOP instruction in this case; typically, no instructions whatsoever would be generated.)

  ;

Alternatively, an empty block (compound statement) may be used, and may be more legible:

  {}

What about "empty command" :
func! Test()
    :
endfunc

Answer: The command execute with no arguments is a no-op. Importantly, :echo 'bar' | execute | echo 'foo' does not transform to contain a print.


Can I get 2560 x1600 resolution on my dell 3007wfp-hc using the hdmi cable connection on my dell I660s desktop/

Question: I have a dell monitor 3007wfp-hc with dual link  dvi 25 pin cable connection. We just bought a dell desktop I660s which has a hdmi cable connection what can I do to get 2560  1600 resolution.Can I upgrade my video output? I have a integrated video card Intel HD graphics (dell)
Comment: Difficult to tell, I believe your PC has an Intel integrated GPU which may or may not be able to be used at that resolution, the monitor used DVI-D so should work with an HDMI to DVI converter, they are pretty cheap on eBay.
Comment: Yes, I am using HDMI to dvi converter and my max resolution is 1280x800.My graphics is integrated Intel(r)HD with a max resolution of 1280x800. How can I upgrade my graphics
Answer: Took me hours to resolve this, so posting for others in the hope they find it quicker. From here.

The only resolutions officially supported on the 10 year old 3007WFP-HC are 1280x800 60Hz and 2560x1600 60Hz. But you must be using a DVI-D DL out port on the computer and DVI-D DL to DVI-D DL cable. Using HDMI, DP, or mDP outs from a computer with any combination of converters or cabling will not get 2560x1600 60Hz. They might get 1280x800 60Hz but Dell never tested them.
Comment: Please do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by [voting to close it as a duplicate](https://superuser.com/help/privileges/close-questions) or, if you don't have enough reputation for that, [raise a flag](https://superuser.com/help/privileges/flag-posts) to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
Answer: To get 2560x1600 resolution from that HDMI port it would require HDMI spec 1.3.  I'm not sure but I find it unlikely your Integrated Graphics would support that.
The best solution is to put a Low profile PCI express video card in the expansion slot.  If you got a graphics card with a Dual Link DVI or equivalent port it would definately support that high resolution.
Here is a possible Video Card
Answer: I know this is an old thread, but the monitor in question displays only 1280x800 and below with any cable other than a dual link dvi-d. An HDMI to DVI-D cable didn't work, nor did DVI-D single link. When the dual link is used, multiple resolutions up to 2560x1600 are available. The monitor auto switches to lower resolutions for games (1920x1080). I'm using an NVIDIA GTX 1060 for graphics. Great monitor.
Comment: I'm having trouble understanding your post.  Are you saying that the answer is to use a dual link DVI-D cable?  Please [edit] your post to be clearer.


What do I need to know to write a client server socket program in Java using Caesar Cipher authentication?

Question: I have an assignment called "Write a client server socket program in Java in which server will authenticate client using authentication algorithm." How do I get started? Which are the prerequisites of knowledge of computer security and socket programming to implement this? Any links to good tutorials?
EDIT: Using Caesar Cipher
Comment: Choose a more descriptive name for your question.
Comment: Writing the socket part is something you can find examples of, but what do you mean by "authenticate client using authentication algorithm"? Does this imply encryption, or is it as simple as asking for a username and password?
Comment: Googling for `java socket tutorial` will give you some good results to get you started.
Answer: Maybe this can help you:
http://www.javaworld.com/jw-12-1996/jw-12-sockets.html
The authentication can be a simple username/password scheme.
Answer:
Sockets
Authentication Algorithm
Answer: This requirement is vague. I will give you the simplest possible answer:
write the server in such a way, that it requires a username and password with every request.
Answer: Are your using an authentication algorithm or are you just encrypting the message?
If you just have to encrypt the message then make sure both ends have the same cypher stored in them (Two arrays of characters should work ) and encrypt the string character by character before you send the message then decrypt it character by character on the other end.
You don't use a Caesar Cypher for authentication merely encryption. If you want authentication then separately you can have the first message of the socket connection be a username/password both of which you can encrypt client side and decrypt server side, then check they are valid. For the simplest example of this just hard code an acceptable username and password on the server and have the username and password on the client be entered on the command line.
Answer: For anybody that Googled their way here, an example of an authentication algorithm or "handshake" is more than a username and password. It would be a challenge sent from the server to the client, such as a random string; and the client performs an algorithm on the challenge, such as bit wise operations for example, and sends it back to the server. The server then does this same thing to the challenge and compares with the one the client sent before verifying the log in.
This is used to create a more arcane protocol to deter 3rd party developers such as bot makers from creating unauthorized software. Often times the handshake procedure is very difficult, not only in operation but also using complex functions of the used language to make porting very difficult.


Why is my computer's wifi speed slower than my laptop?

Question: I have a computer and a laptop (netbook) at my home both of which I use very frequently. Both of these devices are connected to the same network, with a 4 MB per second conncection. One thing I am really tired of is that my PC (1 GB Ram, 64-Bit Windows 8, Core 2 Duo) gets much slower internet speeds than my Asus netbook (1 GB Ram, 32-Bit Windows 7, Atom). Torrents and other downloads get me about 650 kbps speed, which is much more than my PC that gets around only 250 kbps speed. Does anyone know how to fix this? Both the devices are connected using Wi-Fi. Thanks
Comment: What band are each of the wireless devices set to use? Are you sure your connection is a 4MB/sec connection that is actually pretty fast. Are both devices in the same room when you perform these tests?  **Pleae add this information to your question instead of replying to my comment.**
Comment: Do both computers have the same line-of-sight to the router? Is there anything between the desktop and the router that could be interfering with the signal from the router?
Answer: In addition to Don Nickel's answers, and to elaborate on Leatherwing's comment, it could definitely be the environment.

When you compare the two, are you using your netbook in the same room as the PC? The construction of your walls can affect a wireless signal, as can a variety of devices in between and around them (phones, microwaves, other wifi devices, neighbor's wifi, etc.)
Even if you're in the same room at the same desk, where is the PC's wifi antenna in relation to the laptop? It's likely on the floor, or behind a desk, or just at a slight disadvantage compared to the laptop.
When you are comparing, how scientific are you being? Make sure that nothing else is running on either computer when you run speedtest.net or your network monitoring tool.

I wouldn't expect any of these to be solely responsible for the differences you've observed. But they can add up for sure.
Answer: Just two possible answers.
Is it possible some application is secretly eating your bandwidth? Without actively running any app, start the PC and watch the network monitor - see if something is accessing the network.
It's also possible it could be the NIC driver on the PC needs updated. Are they the same manufacturer?


Illustrator Image Trace results in image disappearing

Question: After selecting the image and trying to Image Trace the image just disappears.
Comment: It's most likely the **settings** for image trace.. too high of a threshold and art which is overall light in value. Without seeing the settings as well as the artwork, it's pretty impossible to be definitive.
Answer: When you do an Image Trace, the default is set to black and white. This means for a colour image containing objects that are blue, the threshold setting is too low for you to see anything, and what you probably want is to change the settings to colour anyway.

After doing the trace, click on the Image Trace Panel button in the controls along the top

When the panel opens up, change the Preset to something like 6 Colors to begin with. You can change the number of colours later

Note: From your screen shot I can see your image is very pixelated, which probably means it's a very low resolution image.  You may need a higher resolution image to get a good trace. Image tracing doesn't work well on very low resolution images.


Direct buried service wire from house to shop

Question: what type of wired i need to wire my shop for 120/240 single phase buried about 200' from the house? I plan a 60amp main breaker in the shop. Will 2-2-4 stephens aluminum urd cable be okay?
Comment: Close. I think you'll need 2-2-2-4 - i.e., 2 for both hots & neutral, 4 for ground.
Comment: Are you dropping a separate *service* from your utility service point, or a *feeder* from a panel either at your pole or in your house?  Also, are you still shopping for wire, or were you "gifted" this URD?
Comment: It will come from the panel in the house. I will probably need to upgrade the house service but right now I just want to have adequate wire in the ground. I am still shopping the wire. Thanks
Answer: You'll need 4 wires, no matter what else you choose
The first issue is that your initial choice of cable (2-2-4) was short a wire, as you need to keep neutral and ground separated everywhere downstream of your service disconnect at your house.  The good news is that your revised choice (2-2-2-4) has enough wires to get the job done without extra help.
You'll want to run conduit in the ground instead of direct burying the cable, too
The other problem with your plan is that a direct buried cable is rather hard to replace if it breaks or becomes obsolete.  Given the cost of PVC conduit, compared to the cost and labor of digging up the cable and replacing it, it's far more economical to lay conduit now so that you don't have to trench again in the future.  I would run a 1.5" PVC for the power and a spare 1" PVC, with expansion joints at the stub-ups, as this provides room for running up to 125A(!) to the shop, as well as a network cable or generator feed if you wish it.
Don't sell yourself short on power
While pulling that 2-2-2-4 URD through the PVC will work just fine, expecting a mere 60A from it is selling your cable short as it can handle 80-90A without issue.  Furthermore, while you'll need to keep the breaker at the house to an appropriate size for the cable, the "main breaker" at the shed has no such constraint as all it's functioning as is the shed's Code-required local shutoff.  Finally, an actual 60A panel is tiny, providing only a few precious spaces for branch breakers, which is a constraint you will rue later on, when the time comes to expand your shop or such.
As a result, I'd put in a 100A or 125A, 24-space or 30-space, main breaker panel at the shed, with a ground bar or two fitted if the panel doesn't come with them from the factory.  You'll need to remember to pull the green bonding screw out, of course, and also run an 8AWG or 6AWG copper wire from the panel to a pair of 8' deep rods 6-8' apart.  The latter complements your grounding wire by providing the shed with a "shortcut" path for errant natural electricity to get back to Mother Nature, while the grounding wire in the feeder sends wayward utility electricity on an express trip back to the utility's transformer via the main panel neutral bond.
TORQUE ALL LUGS TO SPEC
Last but not least, you'll want to use an inch-pound torque screwdriver or torque wrench to torque all loadcenter and breaker terminal lug connections to the tightening torques marked on the breaker or loadcenter.  This is required by 110.14(D) in 2017 and newer editions of the NEC, and is a good idea anyway, as it can keep your electrical system from giving you the loose lugnut!
Answer: Actual load is needed to calculate voltage drop, but at a full 240v 60A load #2 aluminum should be adequate to only experience 3% voltage drop, which is the maximum voltage drop recommended by the NEC for a feeder.
There is some small risk of load imbalance causing a larger voltage loss. If by chance you randomly more than 30A of loads to just one leg your voltage drop could exceed 3%.
You do need 4 wires, two hots, a neutral, and a separate ground for a 120/240v feeder.
Comment: Sounds like this wire would get started in the right direction then? Dyke 2-2-2-4 Quadruplex Aluminum URD Cable Direct Burial Wire
Comment: @Pat -- that's a far better choice, yes.  Is there a reason you want to direct bury this run instead of laying conduit in the trench?
Comment: 3% is only a guideline as is 5% at the furthest point both are informational notes in the NEC and not enforceable. If there is 10% drop on occasion the op probably would not notice other than a slightly slow motor spin up.
Answer: Conduit is so darned expensive; I'd suggest filling the entire trench with pea gravel. Might be the same money, or a bit more, but expecting to remove the conductors after several years of use may not happen.
Gravel is easy to excavate, and a clear indication that something special is below it. Don't forget the warning ribbon.
And that trench will serve double duty as French drain.
Comment: Ah, but the THHN wire that goes _into_ the conduit is so much less expensive than direct burial wire. _And_, if you ever need to change the wire for any reason, you tie the new to the old and pull. No need to dig, not even with your kid's beach shovel...


Differentiate the Function $f(x)= \sqrt{x} \ln x$

Question: Differentiate the Function $f(x)= \sqrt{x} \ln x$
Comment: Confirm how you took logs of both sides of $y = \sqrt{x}\ln x$?
Comment: Yes. I am assuming I have to differentiate before I take the log?
Answer: $f(x) = \sqrt{x} \ln x$. Using the product rule we have that $$f'(x) = \ln x \cdot \frac{\mathrm{d}}{\mathrm{d}x}\sqrt{x} + \sqrt{x}\cdot\frac{\mathrm{d}}{\mathrm{d}x} \ln x$$
Hence $$f'(x) = \frac{\ln x}{2\sqrt{x}} + \frac{\sqrt{x}}{x}.$$
Further simplification results in $$f'(x) = \frac{\ln x}{2\sqrt{x}} + \frac{2}{2\sqrt{x}} = \frac{\ln x + 2}{2\sqrt{x}}$$

Doing it your way: $$\ln f(x) = \ln\left(\sqrt{x} \ln x\right) = \frac{1}{2}\ln x + \ln (\ln x).$$
Then differentiating both sides with respect to $x$ yields $$\frac{f'(x)}{f(x)} = \frac{1}{2x} + \frac{1}{x\ln x}.$$
Multiplying both sides by $f(x)$ gives
$$f'(x) = \sqrt{x} \ln x \left(\frac{1}{2x} + \frac{1}{x \ln x}\right) = \frac{\ln x + 2}{2\sqrt{x}}$$
Comment: If you have $f(x) = \sqrt{x} \ln x$ then taking the logs of both sides means that you do $\ln f(x) = \ln (\sqrt{x} \ln x)$ which you can then split up by using the product rule for logs. Basically, if you $\ln $ one side, then you need to $\ln$ the other side as well!
Comment: So although there is ln on the right side already, I need to place another by the term which lacks one?
Answer: Why did you not take the derivative of $\sqrt{x}$ in step 2? Also, verify what it means to take the log of both sides of an equation. If you want to simply fix your solution, those are my suggestions.
Alternatively, I propose this could be solved with the chain rule.
\begin{equation}
f'(x)=\frac{1}{2\sqrt{x}}\ln(x)+\sqrt{x}\frac{1}{x}=\frac{\ln(x)}{2\sqrt{x}}+\frac{2}{2\sqrt{x}}
\end{equation}
Answer: It seems you want to use the logarithmic derivative:
$$
\ln f(x)=\ln(\sqrt{x}\ln x)=\ln\sqrt{x}+\ln\ln x=
\frac{1}{2}\ln x+\ln\ln x
$$
Then, differentiating both sides,
$$
\frac{f'(x)}{f(x)}=\frac{1}{2}\frac{1}{x}+\frac{1}{\ln x}\frac{1}{x}=
\frac{\ln x+2}{2x\ln x}
$$
and therefore
$$
f'(x)=\frac{\ln x+2}{2x\ln x}\sqrt{x}\ln x=\frac{\ln x+2}{2\sqrt{x}}
$$
Strictly speaking, this works only for $\sqrt{x}\ln x>0$, but it can be shown the method is sound also for the other case.
You have several mistakes. First, the derivative of
$$
\sqrt{x}\ln x
$$
is not
$$
\sqrt{x}\frac{1}{x}
$$
because you have to apply the product rule. But the main error is in the previous step, where you take the logarithm of one side but not also of the other side.
Answer: How do you go from $y=\ln (x)\sqrt{x}$ to $\ln y=\ln (x)\sqrt{x}$?
This should be
$$\ln y= \ln(\ln (x)\sqrt{x})=\ln(\ln (x))+0.5\ln(x)$$
As others suggested, you can just use the product rule.
Answer: Solution 1 (logarithmic deriviative):
$$y=\sqrt{x}\ln{(x)}$$
$$\ln(y)=\ln{(\sqrt{x}\ln{(x)})}$$
$$\frac{y'}{y}=\ln{(\sqrt{x})}+\ln{(\ln{(x)})}$$
$$\frac{y'}{y}=\frac{1}{2x}+\frac{1}{x\ln{(x)}}$$
$$y'=\frac{\sqrt{x}\ln{(x)}}{2x}+\frac{\sqrt{x}\ln{(x)}}{x\ln{(x)}}$$
$$y'=\frac{2+\ln{(x)}}{2\sqrt{x}}$$
Solution 2 (product rule):
$$y=\sqrt{x}\ln{(x)}$$
$$y'=\frac{\ln(x)}{2\sqrt{x}}+\frac{1}{\sqrt{x}}$$
$$y'=\frac{2+\ln{(x)}}{2\sqrt{x}}$$


Pronunciation of direct

Question: What is the correct pronunciation of direct? I found two different pronunciations. Probably both of them are true, but what, if anything, is the difference?
Comment: A pronunciation is neither true nor false.  It may, however, be correct, incorrect, standard or non-standard, preferred, optional, antiquated, regional, obsolete, and so forth.
Comment: Sometimes "DIE-rect" is used as a form of emphasis, even though the speaker would normally say "dur-ect".
Answer: dɪˈrekt (di-rect, pronounced with a short vowel sound i) and dʌɪ-rekt (d'EYE-rect, pronounced with a long vowel sound I) don't correspond to different meanings of the word "direct". They're both correct, and can be used interchangeably for the multiple meanings of "direct" depending on a person's preference or on regional difference.
Answer: The difference in pronunciation comes from something known as the "Great Vowel Shift" which happened from the 14th century to the 16th century and gave significant changes to vowel sounds such as I>U and E>O
Source
"direct" became "durect" so the difference is that the latter is more modern way to pronounce the word.

Pronunciation of direct


EJB Session Bean / Client Hibernate Session interaction?

Question: in a school project we are using an EJB Session Bean,
this EJB offers simple services such as add, delete, modify, findAll, findbyId. Such methods are implemented using hibernate 4.0 (add -> saveOrUpdate, modify -> saveOrUpdate...) and are available for the client
I have two classes :  Game (id, description, category) and Category (id, title).
A category has also a set of games.
The ids are generated using the identity generator. The databased used is mysql.
In the client
A form is used by the application user to fill out informations about a game (description and category ) In the controller I use the method findById to get the category that the user chose, then I create a new game with this category and I save it (using SaveOrUpdate)
first problem that I notice : the id is generated correctly in the EJB and the game passed is modified but back in the client the game doesn't have an id (I guess passing objects between a client and a EJB is not by reference) Can anyone confirm it ?
second problem : when the game is save I tried to add this game to the set of the category and update this category (using also saveOrUpdate). I get the exception org.hibernate.NonUniqueObjectException:
a different object with the same identifier value was already associated with the session
which I don't understand
Can anyone help me ?
Comment: can you post some code? I can't really help you without it.
Answer: For the first question, it sounds like the ID isn't being sent back to the client, or being stored with the controller .
You could send it back to the client by adding it to the URL, ie, in the return from the client call  add "?id=" + newGameId
With this you can have the value populate back into the controller with setters and getters for an id field;
<code>long id;
</code>


Is there a packages to estimate Diebold-Li Parameters in R?

Question: "The models implemented are: Nelson-Siegel, Diebold-Li and Svensson" is written in the description of the packages "YieldCurve". However, I can't find a specific estimation function for the diebold-li parameters. How can I fix this problem with this packages or do you know other packages for the estimation?
Comment: Can't you use that package along with the "vars" package?
Answer: Diebold/Li is not a separate yield-curve model: for a given cross-section of
yields, they fix the shape parameter in Nelson-Siegel and then estimate the remaining parameters via linear regression. See Calibrating the Nelson-Siegel-Svensson Model.
The function NSf in package in package NMOF, which I maintain, sets up the factor loadings for Nelson-Siegel, as used by Diebold/Li.


Smale's theorem for $C^1$ diffeomorphisms of the sphere

Question: In 1926 Kneser showed that homeomorphisms of $\mathbf{S}^2$ admit a retraction into the orthogonal group $O(3)$. Smale extended this result to Diffeomorphisms of $\mathbf{S}^2$ in 1958; however, in that paper he assumes that the diffeomorphisms are of class $C^k$ for $k\geq 2$. So my question is: Has anyone established Smale's theorem for $C^1$ diffeomorphisms?
Answer: Let $M$ be a closed $C^{\infty}$-manifold, then for any $k>0$ the canonical inclusion:
$$\mathrm{Diff}^{C^{\infty}}(M)\subset \mathrm{Diff}^{C^{k}}(M)$$
is a homotopy equivalence.
Embed $M$ in an euclidean space $\mathbb{R}^n$ as a $C^{\infty}$-submanifold and build a smoothing operator by using the convolution product.
Comment: @Mohammed: there is no canonical smoothing that I know of, but there are certainly "fairly canonical" families of smoothings. It's enough for this theorem.
Comment: You seem to be saying that first retract the space of $C^1$ diffeomorphisms into the space of $C^\infty$ diffeomorphisms. This would involve deforming a $C^1$ diffeomorphism into a $C^\infty$ one in a canonical way. Is it obvious that one can do that? (I know how to smoothen a $C^1$ diffeomorphism, but do not immediately see how to do it canonically)
Comment: OK, maybe I am beginning to see how this should work: for every point $p\in S^2$, let $\theta=\theta_{p,t}$ be a smooth convolution kernel function with support in a ball of radius $t$ centered at $p$, and total integral $1$. So as $t\to 0$, $\theta$ converges to the Dirac delta function at $p$. Now for some $\epsilon>0$, take the convolution of  the $C^1$ diffeomorphism $f\colon S^2\to S^2\subset R^3$ with $\theta$ for all $t<\epsilon$, and then project the resulting map back to $S^2$, i.e., let $f_t(p)$ be the projection of $f\circ\theta_{p,t}$ into $S^2$.
Answer: I think it should be covered by M.-T. Wang's papers on deformation of graphs of diffeomorphisms, in particular a combination of the main results in https://intlpress.com/site/pub/pages/journals/items/cag/content/vols/0012/0003/a004/ and https://intlpress.com/site/pub/pages/journals/items/mrl/content/vols/0008/0005/a007/.
Answer: I am quite sure it follows from:
Bloch, Ethan D.; Connelly, Robert; Henderson, David W., The space of simplexwise linear homeomorphisms of a convex 2-disk, Topology 23, 161-175 (1984). ZBL0547.57016.
(using an idea of Nico Kuiper, which can be found in the references).


Calculator with four arithmetic operations

Question: #include <iostream>

using namespace std;

class Math
{
private:
    int answer;
public:
    /*void getAn()
    {
        cout << answer;
    }*/
    int add(int x, int y)
{
    cout << "Add two numbers:\n";
    cin >> x;
    cin >> y;
    answer = x + y;
    return answer;
}
    int sub(int x, int y)
{
    cout << "Subtract one number from the other:\n";
    cin >> x;
    cin >> y;
    answer = x - y;
    return answer;
}
    int multi(int x, int y)
{
    cout << "Multiply two numbers:\n";
    cin >> x;
    cin >> y;
    answer = x * y;
    return answer;
}
    int divi(int x, int y)
{
    cout << "Divide two numbers:\n";
    cin >> x;
    cin >> y;
    answer = x / y;
    return answer;
}
};

int main()
{
    int choice;
    int x,y;
    int learning = 1;
    Math doMath;
    cout << "This is a calculator!\n" << endl;
    while(learning==1)
    {
        //doMath.getAn();
        cout << endl;
        cout << "Menu:\n1) Addition\n2) Subtraction\n3) Multiplication\n4) Division\n5) Quit\n" << endl;
        cout << "Choose your option.\n";
        cin >> choice;
        if(choice==1)
        {
            cout << doMath.add(x,y) << endl;
        }else if(choice==2)
        {
            cout << doMath.sub(x,y) << endl;
        }else if(choice==3)
        {
            cout << doMath.multi(x,y) << endl;
        }else if(choice==4)
        {
            cout << doMath.divi(x,y) << endl;
        }else if(choice==5)
        {
            learning = 0;
        }else
        {
            cout << "THAT WASN'T A CHOICE, YOU LITTLE SHIT!!!" << endl;
            learning = 0;
        }
    }
    return 0;
}

Comment: Welcome.  Does this code work as intended?  We need to make sure of that.  I'd also recommend replacing the one curse word with something else, especially if this is to be a serious application.
Comment: @Arvus Ok, anyway as a rule of thumb (not only in programming but also in life) limit insults to a minimum.
Comment: It's also helpful if you can provide a bit of description about the problem that the code is solving.  It's not a huge deal in this case because the code is straightforward, but still good practice.
Comment: @ Jamal you are right, software should never offend users, I wrote that advice in my answer too.
Comment: This is just a practice program I am writing as I am going about learning C++. Nobody is using this except for me @Caridorc
Answer: Do not insult users
"THAT WASN'T A CHOICE, YOU LITTLE SHIT!!!" is absolutely not acceptable.

You are repeating yourself a lot, in programming you should avoid as much as possible code repetition as it leads to bugs and is not easily reusable.
Instead do this:
template<typename Function>
int do_operation(int x, int y,Function operation,string message) {
    cout << message
    cin >> x;
    cin >> y;
    answer = operation(x,y);
    return answer;
}

You can then do:
int add(int x,int y) {
    return do_operation(x, y, std::plus<int>(), "Add two numbers:\n");
}

I see many many if and elif, it is better to use a switch statement. You may even use an array but perhaps then it would be overkill.
learning is quite puzzling as a name. A more standard running is more intuitive.
//doMath.getAn(); and
/*void getAn()
{
    cout << answer;
}*/

are really puzzling. Either uncomment them or delete them because commented out code confuses the readers.
Use constants for your strings and put them at the top. You can modify them in a simpler and faster way.
static const string Menu = "Menu:\n1) Addition\n2) Subtraction\n3) Multiplication\n4) Division\n5) Quit\n"
static const string ErrorMessage = "Invalid choice, enter a valid number."

and then
cout << Menu << endl;
cout << "Choose your option.\n";

and
else {
    cout << ErrorMessage << endl;
    running = 0;
}

Do not use while(learning==1) because it is redundant and weird, use the simpler while(learning) (or even better while(running))
Do not use using namespace std;, if you are curious to know why, look here
Put the first brace on the same line of the function title and indent the function body.
int add(int x, int y) {
    cout << "Add two numbers:\n";
    cin >> x;
    cin >> y;
    answer = x + y;
    return answer;
}

Comment: I can't emphasis enough the point about not insulting the user (even in throw away code). A colleague of mine was fired as a result of a mistake where he forgot to change the string he was using for testing "Dear Rich XXXXXXX" when the code went into production. As a result the banks largest clients got an e-mail with a very unprofessional salutation.
Comment: The C++ lambda syntax would have been too long. I took the liberty to replace it by the standard functor `std::plus()`.
Comment: Please clarify the expression, in your `add` function: `(x,y) => x + y`.  I don't recognize it.
Comment: @ThomasMatthews I took that sintax from http://msdn.microsoft.com/en-us/library/bb397687.aspx . It is a lambda expression.
Comment: @Caridorc: That corresponds to C#, not C++.
Comment: @Jamal You are right, if you are good at C++ it would very kind of you to correct it.
Comment: @MOrwenn well done, your solution is also idiomatic.
Answer: You don't need to pass x and y into your functions.  You are passing everything by value, so you might as well declare them inside the functions.  The versions outside the functions are never used.  If you use Caridorc's method, you could just
template<typename Function>
int do_operation(Function operation,string message) {
    int x, y;
    cout << message
    cin >> x;
    cin >> y;
    answer = operation(x,y);
    return answer;
}

Your use of endl is a bit odd.
cout << "This is a calculator!\n" << endl;
    cout << endl;
    cout << "Menu:\n1) Addition\n2) Subtraction\n3) Multiplication\n4) Division\n5) Quit\n" << endl;
    cout << "Choose your option.\n";

You get two things from std::endl.  First, it issues a line feed in the appropriate fashion for that system.  Second, it causes the output buffer to flush.  I.e. it takes everything that is currently in the buffer and makes it output.  Sometimes people will tell you to use a \n rather than an std::endl to avoid that flush.  If you were going to do that in your code, you'd say
std::cout << "This is a calculator!\n\n";
    std::cout << "\nMenu:\n1) Addition\n2) Subtraction\n3) Multiplication\n4) Division\n5) Quit\n\n";
    std::cout << "Choose your option.\n" << std::endl;

That does one flush at the end of the output (and you may not need that, as the std::cin will also force a flush).
Math doMath;

Objects are not verbs.  It is not doing anything, so give it a noun name.  E.g. math or calculator.
int learning = 1;
while(learning==1)
        learning = 0;

As Caridorc noted, learning is a bad name here.  Another issue is that learning only has two possible values.  This suggests to me that it is either true or false, so use a true/false variable:
bool isDone = false;
while ( ! isDone )
        isDone = true;

That's much clearer about what it's doing, but the truth is that you don't even need to do that in this case.
while (true)
        break;

That's sufficient for your needs.  No extra variable needed.  Loop forever until explicitly told to stop by the break; statement.  Alternately, you could also use return EXIT_SUCCESS; and return EXIT_FAILURE; instead of break; in your code.  You might have to do an #include <cstdlib> to get those defined.
return 0;

You don't actually need to return anything in this case.  Just let it fall through and the compiler will automatically return the appropriate value.


Will PHP Meta hurt SEO?

Question: If I use PHP to place my meta tags such as keywords and descriptions will that hurt SEO? Will the bots not be able to crawl through the keywords and descriptions?
Answer: PHP is performed on the serverside.  Therefore it takes place before bots see the page so it has no affect on the SEO.
Answer: It won't matter since the information that the bots will pickup will be after the PHP code has printed out the statements into the HTML document. The keyword meta values themselves are kinda outdated so they won't be used much in regards to Searching Engine criteria.

Will PHP Meta hurt SEO?


Asymptotic behaviour of $\mathbb{E}[|\chi_n^2 - n|]$.

Question: I want to know how $\mathbb{E}[|\chi_n^2 - n|]$ behaves as $n\to \infty$. Simulating this in R suggest that it grows at a rate of $\sqrt{n}$, but I am unable to prove it. Setting $\chi_n^2 =\sum_{i=1}^n Z_i^2$, where $Z_i$ are iid standard normal random variables, there is a trivial upper bound
$$
\mathbb{E}[|\chi_n^2 - n]|]
= \mathbb{E}[|\sum_{i=1}^n (Z_i^2-1)|]\\
\leq \sum_{i=1}^n \mathbb{E}[|Z_i^2 - 1|],
$$
which grows at a rate of $n$ as $n\to\infty$. However, this bound is clearly too high. What can we say about the limiting behaviour of $\mathbb{E}[|\chi_n^2 - n|]$, or is there even an explicit expression for it?
Answer: Your simulation is correct. Let us observe that
$$
\frac1{\sqrt n}\sum_{i=1}^n(Z_i^2-1)\to\mathcal N(0,2)
$$
in distribution as $n\to\infty$ by the central limit theorem. We can show that
$$
\operatorname E\biggl|\frac1{\sqrt n}\sum_{i=1}^n(Z_i^2-1)\biggr|\to\operatorname E|Y|
$$
as $n\to\infty$, where $Z\sim\mathcal N(0,2)$ (see Theorem 25.12 and its Corollary on p. 338 of Billingsley's textbook). Hence,
$$
\operatorname E|\chi_n^2-n|=\sqrt n\operatorname E\biggl|\frac1{\sqrt n}\sum_{i=1}^n(Z_i-1)^2\biggr|\sim\sqrt n\operatorname E|Y|
$$
as $n\to\infty$.
Answer: By the central limit theorem we have $\frac{1}{\sqrt{n}}(\chi_n^2 - n) \xrightarrow{n \to \infty} \mathcal{N}(0, 2)$, which suggests that the scaling speed of $\sqrt{n}$ is correct.
If you just need an upper bound, we can use Jensen's inequality. If $X_n$ is chi-square distributed with $n$ degrees of freedom and $Z_i$ are independent standard Gaussians, then
$$E[|X_n - n|]^2 \le E[(X_n - n)^2] = E\left[\left(\sum \limits_{i = 1}^n (Z_i^2 - 1)\right)^2\right] = \sum \limits_{i = 1}^n E[(Z_i^2 - 1)^2] + \sum \limits_{i < j} \operatorname{cov}(Z_i^2, Z_j^2) = 2n$$
This shows that actually $E[|X_n - n|] \le \sqrt{2n}$.
More precisely, if we actually had $E[|X_n - n|] \le \sqrt{n} a_n$ for some null sequence $a_n$, we would get $E\left[\frac{1}{\sqrt{n}}|X_n - n|\right] \le a_n$, which would imply that $\frac{1}{\sqrt{n}} |X_n - n|$ converges to zero in distribution (but this would contradict the central limit theorem).


How generalized and curvilinear coordinates are different?

Question: I have read about Cartesian, polar, spherical polar and cylindrical coordinates. All these are generalized coordinates. But many a times they are written as general curvilinear coordinates. And I have also read that both are different. Then what is actually the difference?
Answer: One difference arises when you have constraints.
Let's say that we constrain a particle constrained to live on a sphere of radius $R$. I could describe this system in Cartesian coordinates $x,y,z$ with the constraint $x^2+y^2+z^2=R^2$.
Alternatively, I could describe the system with just two generalized coordinates (say the angles $\theta,\phi$) and no constraints. In this description, the comstraint doesn't appear explicitly because we chose coordinates that live purely on the constraint surface.
I would reserve curvilinear coordinates to refer to non-Cartesian coordinates in flat space, so for example $r,\theta,\phi$ (not just $\theta,\phi$). Note we could also describe the particle on a sphere using these three curvilinear coordinates plus the constraint $r=R$ (which is easy to solve :-)).


Where is the Air Reveria?

Question: I already completed the mission at Al Maajik and I have to complete Butterfly's requests to move on. I DO NOT want to walk all the way there, But I can't find Air Reveria. Where is it?
Answer: If you mean the Air Reveria branch in Castele, it's in the West Castele area. From your room (Pam's house), go west, past the shopping district. The next screen will be West Castele, and the airship dock is there. The icon on your lower map looks like some sort of blimp, and the person you want to talk to is one of the ones named/labeled "Staff".
I believe it costs 100 dosh per party member to fly to Al Maajik.
Answer: I know this is kinda old already, but for completeness sake, if the OP was meaning "where is the Air Reveria branch in Al Maajik", he should look at the northwestern part of Al Maajik Outskirts =)

Where is the Air Reveria?


Proof that the space of morphisms between equivalent irreps has dimension 1.

Question: Schur's lemma says that for finite group representations, this space between non-equivalent irreps has dimension 0, and that the morphisms between identical irreps are homothety. Yet I forgot how to prove that the space of morphisms between equivalent irreps has dimension 1 using these two results. Could anybody give me a hint or answer?
Answer: Let $\rho\colon G \to \mathrm{GL}(V)$ be representation and $k$ the field of scalars.
Morphisms from the representation $\rho$ to itself are linear maps $V \to V$ that commute with the action of $\rho$.  The important bit hear is that the map $V \to V$ is linear and a linear homothety is just multiplication by a scalar.  So if we define $\phi_\lambda$ by $v \mapsto \lambda v$ then $\lambda \mapsto \phi_\lambda$ gives the isomorphism between $k$ and the space of endomorphisms of the representation $\rho$.
Comment: Now I can understand the mechanism. Thanks a lot!


Antivirus in Macbook

Question: Do we need to install antivirus in OS X? I'm using macbook Pro 13" currently. Which antivirus is recommended (and free)? Any other better way to protect information in OS X?
Comment: Hi, welcome to Ask Different. I think you mean OS X, not iOS? MacBooks run OS X. iOS is the OS on iPhones, iPads, etc.
Answer: I think you mean OS X, not iOS? MacBooks run OS X. iOS is the OS on iPhones, iPads, etc.
Some good, free antivirus options for OS X are Avast and AVG.
You're definitely safer if you use them. There are viruses out there for OS X. That said, it's not as needed as it is on Windows. I personally don't use any antivirus on OS X, because I feel that it slows down the system a little bit. I feel the risk is rather small, so I am willing to take it.
It comes down to how careful you want to be. If you don't mind your system slowing down a little bit, and want to minimize the risk of viruses as much as possible, then get antivirus. If you don't want the small slowdown, are wise enough to spot obvious traps like fraudulent websites asking you to install programs, etc, and you feel the risk is small enough, then don't install it.
Comment: I see. I got no worry now =)
Comment: Thanks @Fiksdal How about the iPhone that using iOS?
Comment: On non-jailbroken iPhones, I'd say iOS is so sandboxed and resilient to viruses that there's really no need for antivirus. Each app runs inside an extremely protected, closed environment, and there really is no way for it to do damage. There isn't even a way for a third party to create antivirus for iOS, because it would have to be an app, and an app running inside a sandbox can't act as a systemwide antivirus. Apple has very stringent programs to keep the App Store free of malware. Don't worry about viruses on iOS. More details here: http://apple.stackexchange.com/a/103400/153510

Antivirus in Macbook


Covariance of a certain kind

Question: Suppose that $X$ and $Y$ are two random variables defined on a  say, finite sample space $A$ and suppose that $p$ is a probability distribution on $A$. Is there a special name for the following quantity?
$$\sum_{a\in A} X(a)Y(a)p(a)-\sum_{a\in A} X(a)p(a)\cdot \sum_{a\in A} Y(a)p(a)$$
It's certainly not covariance. Covariance of $X$ and $Y$ is
$$\sum_{a,b\in A} X(a)Y(b)p_{X,Y}(a,b)-\sum_{a\in A} X(a)p_{X}(a)\cdot \sum_{a\in A} Y(a)p_Y(a)$$ where $p_{X,Y},p_X,p_y$ are the joint distribution on $A\times A$ and marginals on $A$ respectively.
I don't know whether this can be thought of as a covariance of $X$ and $Y$ in some sense. Or am I missing something here?
Comment: You might try to give an example, perhaps where $X$ and $Y$ each take two values and they are neither independent not completely dependent.  In particular, you might try to say what $p_X(a)$ means, and look at whether $\sum_{a \in A} p_X(a) =1$.
Comment: @Henry: Yes $X(a)$ and $Y(a)$ could be different and independent. $P_X(a)=\sum_{b\in A}P_{X,Y}(a,b)$.
Answer: Your first expression is covariance, but the space $A$ may not be what you expect, and is not the same as the $A$ in your second expression.
For example if $A$ has four distinct parts $e_1, e_2, e_3, e_4$ with

$p(e_1)= 0.4, \qquad X(e_1)=6, \qquad Y(e_1)=6$
$p(e_2)= 0.1, \qquad X(e_2)=6, \qquad Y(e_2)=7$
$p(e_3)= 0.2, \qquad X(e_3)=7, \qquad Y(e_3)=6$
$p(e_4)= 0.3, \qquad X(e_4)=7, \qquad Y(e_4)=7$

then your first expression gives $41.7-6.5\times 6.4 =0.1$, which is the covariance of $X$ and $Y$.
Comment: Thank you Henry. But, the actual covariance is 0 because $E[XY]=\sum_{x,y}x~y~P(X=x,Y=y)=41.6$. What's wrong here? Am I missing something?
Comment: $0.4 \times 6 \times 6 + 0.1 \times 6 \times 7 + 0.2 \times 7 \times 6 + 0.3 \times 7 \times 7 = 41.7$.   In my example the covariance must be positive as low/low and high/high are more likely than high/low or low/high.
Comment: Yes you are right. Sorry for the confusion.

Covariance of a certain kind


Is it too dangerous to smoke a stuffed turkey?

Question: Sorry if this is a redundant question, but I'm finding conflicting advice about this: If I want to smoke an ~18 lb turkey, is there a great risk of it spending too much time in the temperature "danger zone" if I stuff it with traditional stuffing?
Comment: Welcome to the site @Scott, are you taking about hot smoking or cold smoking? If hot, what temperature would you be smoking at and for how long?
Comment: Maybe cold smoking just the turkey, and then finishing it in the oven with stuffing might work? Might want to see if there's anything out there on the Interwebs about that.
Comment: Thank you! Sorry for the question being vague. I was referring to hot smoking, well above the temperatures where bacteria get comfy. Exact temperature is TBD, but I'd assumed it would need to be over 250 degrees for me to have a fighting chance. (Still learning!)
Answer: I've had delicious hot smoked/grilled turkey, which was brined first (not stuffed).  However, stuffing always becomes a problem with turkey.  Whether you smoke, or cook in the oven, you are going to over cook the white meat by the time the center of your stuffing is at a safe temperature.  You can certainly make it safe by using the appropriate temperature, time, and measuring with a thermometer. ...and, brining can help retain moisture.  Having to wait for the center of the stuffing to reach a safe temperature means that the question will be, how overcooked can you stand your turkey meat?
Comment: Agreed.  You'd be better off having the stuffing under the turkey to catch any drippings, but then you'd get smoked stuffing.   (which might not be bad, if you didn't over smoke it).  And you can throw the pan of stuffing into the oven if it hasn't reached the necessary temperature.
Comment: I did a brined fresh turkey in my rotisserie oven, stuffed. The white meat drying out was not an issue, but that bird was exceptionally juicy (unbelievable amount of pan juices, especially for a stuffed bird). I don't think I'd be as confident smoking it with the stuffing already in it, though.
Comment: Thank you! All of your comments have given me some stuff to think about and a couple new ideas to try.
Answer: For an 18 pound turkey, I would suggest that you are tempting fate. You would be smoking a large bird, at presumably a low temperature (under 300*F). And you are going to be stuffing its cavity with a large thermal mass that does not conduct heat very well. It seems unlikely you would reach inactivation temperature in a reasonably safe amount of time.
Comment: Yeah, that's what I'm afraid of. I think I'm going to go the unstuffed route. Thanks!
Comment: Good call. I think it's a little too much on the risky side, and I tend to go right up to that line. On a tangential note, consider spatchcocking the bird if you are going to smoke it. Cooks faster and more evenly.


What are $f\circ\emptyset$ and $\emptyset\circ f$ if $\circ$ is function composition and $f$ is any function?

Question: My guess is that both are $\emptyset$ because if $g\circ f=\{(x,z)\mid \exists y\in \text{Im}f:(x,y)\in f\land (y,z)\in g\}$ then if $f$ or $g$ are the empty set then it doesn't exist any $y$ with such condition, so the set is empty. Am I right?
Comment: Yes, you are right.
Comment: +1 I've never seen such composition with the empty set..$\emptyset\circ f$, where did you see it?
Comment: @Isah I need it for a project that I'm working on.
Comment: I'm a little confused but I think you are right? You are talking about function compositions so you have to talk about 2 functions.$\emptyset$ usually stands for the empty set, which isn't a function.Briefly looking this up, I found something about "empty functions" and empty set stuff but I didn't really read the material. (as an aside your definition of the composition $g\circ f$ is a little strange to me, but maybe I'm not familiar with the notation.It sounds like you are talking about the graph of $g \circ f$. I've never seen $(x,y) \in f$ before because $f$ isn't a set - but I understand)
Comment: @DWade64 The empty set is indeed a function.
Comment: In fact, $\emptyset \circ f$ only makes sense as a function composition if $f$ is also an empty function.
Answer: Yes, you are right.
Under the convention that a function is a set $f$ of ordered pairs such that

if $(x,y)\in f$ and $(x,z)\in f$, then $y=z$

we can define function composition in the following way.

Let $f$ and $g$ be functions; then $g\circ f=\{(x,z):(x,y)\in f\text{ and }(y,z)\in g,\text{ for some }y\}$ is a function.

The empty set is obviously a function in the sense described above and, for every function $f$,
$$
\emptyset\circ f=\emptyset=f\circ\emptyset
$$
because $(a,b)\in\emptyset$ is false for every $a$ and $b$.
Answer: This is old, but I don't think I agree with the accepted answer.
In the usual interpretation of $g\circ f$, we assume that $\mathrm{cod}(f) = \mathrm{dom}(g)$, or at least $\mathrm{Im}(f) \subseteq \mathrm{dom}(g)$. Then $g\circ f:\mathrm{dom}(f)\to\mathrm{cod}(g)$. If we don't have $\mathrm{Im}(f) \subseteq \mathrm{dom}(g)$, then we must regard $g$ as a partial function to take the composition.
Since the empty function has domain $\emptyset$, I claim we have
$$
f\circ\emptyset = \emptyset,
$$
but
$$
\emptyset\circ f\ \textrm{is undefined (unless $f=\emptyset$)}.
$$
Taking instead the laxer definition of composition where we disregard domains and codomains, I of course agree with egreg, and the claim would be equivalent to
$$
\emptyset\circ_{\mathrm{lax}} f
:= \emptyset\circ \left(f\upharpoonright_{f^{-1}(\mathrm{dom}\ \emptyset)} \right)
= \emptyset\circ\emptyset
= \emptyset.
$$


Is there a way to sync only one partition?

Question: Is there a way to sync only one partition instead of all partitions?
Something like "sync /dev/sdc1".
Comment: No. As far as I am aware. Good question, though.
Answer: you can remount with sync option and then remount it back with async:
mount -o remount,sync /mountpoint
mount -o remount,async /mountpoint

Using remount option will not mess with processes using remounted filesystem.
Comment: Why do you think that 2 remounts are necessary? In at least 2.6.32 kernel do_remount_sb performs sync_filesystem which is the same function that is called in syncfs system call introduced in https://lwn.net/Articles/433384/.
Answer: There is a standard function to synchronize data (and metadata) of one file: fsync. There is no standard or common shell command to access it, but you can use perl's sync method in IO::Handle:
perl -MIO::File -e 'new IO::File($ARGV[0], "r+")->sync()' filename

There is no standard or common function or shell command to synchronize just one partition.
On recent Linux systems, there is the syncfs system call (introduced in kernel 2.6.39, and exposed since glibc 2.14). I don't think this system call is exposed in coreutils or util-linux yet.
Comment: The last sentence about `syncfs` is the most relevant part.
Answer: It is now possible with sync -f:
sync -f /mount/point

Excerpt from sync(1):
       -f, --file-system
              sync the file systems that contain the files

Answer: Mounting the partition with the sync option may be a solution.
Answer: If you mean the sync utility that flushes data in memory to disk, then the answer is no.  This is due to the fact that sync is generally used during a shutdown or reboot procedure, where it's advisable to get data written safely to disk, and the real target of the operation is memory, not the disks, and getting that buffered data out of RAM to somewhere safe.  The disks are just where the data ends up.
Answer: If btrfs:
btrfs filesystem sync /path/under/mountpoint


Where is everything I install stored?

Question: I have Ubuntu 14.04 and I never made any disk partitions.I'm trying to ask that if a install a certain game or program from Ubuntu Software Center, where exactly does it go? I have this game that I downloaded from the Software center but now that I need to apply mods, I really don't know where the game is stored. I even tried searching for it but only the launcher that was used to install the game appears in the search results.
Comment: What you install goes to /usr/bin/ directory.
Answer: You can type in the command line
whereis gimp

To see where gimp is installed. Replace with the name of the program you want to find. This command will usually return multiple locations, as applications have multiple files they use to run on your system. To see only the program binary itself use
which gimp

Programs you install yourself might go in /usr/local or /opt as well as /usr/bin /usr/lib and /usr/share
If you want a really long list ;)
locate gimp

(for a somewhat shorter list use locate -b gimp which only show paths that end in gimp)
You can launch the application by typing...
gimp

Note: the locate command uses a periodically regenerated database, so if you're looking for something you've only just installed, you must first run sudo updatedb for locate to find it.
Answer: User program/games are stored in /usr/bin directory. The /bin directory stores main (important) programs (binaries) that all users need. Look at the answer to this question for more details about linux filesystem layout: How to understand the Ubuntu file system layout?

Where is everything I install stored?


Drop & re-add subscribers to transactional replication

Question: I'm trying to get stored procedures to execute on the subscribers, as seems to be best practice. I already have transactional replication running happily.
I add a new stored procedure, and set properties of this stored procedure article, but 'Replicate' is grayed out.
Ok - so I go to the stored procedure root and set properties for all stored procedure articles. Under 'Replicate' I set it to: "Execution in a serialized transaction of the SP", which is the recommended setting.
Yay! All is good!
But SQL Server lies.
If I go back in and check the properties for all stored procedures, it's changed the 'Replicate' setting back to "stored procedure definition only".   It doesn't actually keep my change.
The only mention of this issue I could find was here: http://www.informit.com/articles/article.aspx?p=343672&seqNum=4  where the solution is:
"To make stored procedure execution options available, you must drop any subscriptions from this publication and drop the article from the publication. After you add the article back to the publication, all options will be available to you again."
So - apologies for the long pre-amble, but here's my question:
If I remove my subscribers, make my necessary changes, and add the subscribers back, is SQL Server going to want to create a full snapshot?
I'm asking because a full snapshot takes a few hours & chews up our server, so it needs to be carefully planned.
Any insight anyone can provide would be awesome - thank you!
Answer: When you create a publication, you can choose whether or not you want to create a snapshot. Similarly (and more importantly), when you create a subscription, you can say if you want it to initialize or not. Choosing not to is probably what you need, but I suggest you test it before doing it in production


Which surah can help me get out of my depression

Question: Assalamualaikum.A few days ago I came to know my term final result and since then I am in great depression.I just can't get the result and my failure out of my head.This sort of things happened with me a year before but I somehow managed myself not getting into the acuteness of it by communicating with my friends and cousins.But this time it's worsening with every passing day because I am under lockdown since past 2/3 months.i am not even able to catch up on a sound sleep for almost 4 days.Would you please suggest me anything  any surah or Hadith or anything to get rid of my current condition?
Answer: Assalamalaikum
I wish you would be better soon but bro everything will pass soon and somehow you will forget those bad things and I wish this period of time pass quickly and don't effect on you, There's no doubt that the best Suruh to remove your depression is Suruh Yusuf what a wonderful Suruh and I wich you will understand the lessons from this Suruh and how prophet Yusuf passed through bad things and then he became the Dear of Egypt
Answer: A popular suggestion and a Surah that was revealed to the Prophet (AS) during a time that he had not received a revelation in a long while and started feeling as though Allah (SWT) had forsaken him, is Surat Al-Duha.
Here is also a very beneficial video from Ustadh Nouman Ali Khan regarding your situation: https://www.youtube.com/watch?v=M8TUTn5UBSw