How to write Unix end of line characters in Windows?

Question: How can I write to files using Python (on Windows) and use the Unix end of line character?
e.g. When doing:

f = open('file.txt', 'w')
f.write('hello\n')
f.close()

Python automatically replaces \n with \r\n.
Answer: The modern way: use newline=''
Use the newline= keyword parameter to io.open() to use Unix-style LF end-of-line terminators:
import io
f = io.open('file.txt', 'w', newline='\n')

This works in Python 2.6+.  In Python 3 you could also use the builtin open() function's newline= parameter instead of io.open().
The old way: binary mode
The old way to prevent newline conversion, which does not work in Python 3, is to open the file in binary mode to prevent the translation of end-of-line characters:
f = open('file.txt', 'wb')    # note the 'b' meaning binary

but in Python 3, binary mode will read bytes and not characters so it won't do what you want.  You'll probably get exceptions when you try to do string I/O on the stream. (e.g. "TypeError: 'str' does not support the buffer interface").
Comment: This help me by using this: # newline='' means don't convert \n

https://plus.google.com/+PongsametreySOK/posts/2Bg8AdNJCxV
Comment: @12431234123412341234123 I agree, using `'\n'` is clearer than `''`.  Then I won't need a comment to explain what the code is doing :)  But be aware that this is only true for writing files.  When reading files, `newline='\n'` is not exactly the same as `newline=''`, since `readlines()` will split only on `\n` in the former case but with `newline=''` it will do universal newline handling but still still return the actual newlines from the file in the data.  Thanks for the suggestion!  [Python test program](https://gist.github.com/cdbennett/dfae82b2202dc7561766ab6bf916ad7a)
Comment: You can set newline to `'\n'` direct, this is more explicit than `''`, and i think it is easier to read it.
Comment: Python 3.6+ (maybe previous Python3 versions, as well). If you worry a little bit about seeing the same `'\n'` that had been switched previously, you could use the Unicode codepoint (make sure the encoding is utf-8 or something else compatible). `with open('file.txt', 'w', encoding='utf-8', newline='\u000A')` ; P.S. the result isn't any different from the `newline='\n'` version, this is just if someone wants some more comfort.
Answer: For Python 2 & 3
See: The modern way: use newline='' answer on this very page.
For Python 2 only (original answer)
Open the file as binary to prevent the translation of end-of-line characters:
f = open('file.txt', 'wb')

Quoting the Python manual:

On Windows, 'b' appended to the mode opens the file in binary mode, so there are also modes like 'rb', 'wb', and 'r+b'. Python on Windows makes a distinction between text and binary files; the end-of-line characters in text files are automatically altered slightly when data is read or written. This behind-the-scenes modification to file data is fine for ASCII text files, but it'll corrupt binary data like that in JPEG or EXE files. Be very careful to use binary mode when reading and writing such files. On Unix, it doesn't hurt to append a 'b' to the mode, so you can use it platform-independently for all binary files.
Answer: You'll need to use the binary pseudo-mode when opening the file.
f = open('file.txt', 'wb')

Answer: def dos2unix(inp_file, out_file=None):
    if out_file:
        out_file_tmp = out_file
    else:
        out_file_tmp = inp_file + '_tmp'
        if os.path.isfile(out_file_tmp):
            os.remove(out_file_tmp)
    with open(out_file_tmp, "w", newline='\n') as fout:
        with open(inp_file, "r") as fin:
            lines = fin.readlines()
            lines = map(lambda line: line.strip() + '\n', lines)
            fout.writelines(lines)
    if not out_file:
        shutil.move(out_file_tmp, inp_file)
        print(f'dos2unix() {inp_file} is overwritten with converted data !')
    else:
        print(f'dos2unix() {out_file} is created with converted data !')

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).


WPF Zooming Problem

Question: In WPF, I have a sort of Curve Editor, which consists of a scrollviewer (for panning) on top of a canvas, where I display keys, and curve segments (linear, constant and splines). I'm using MVVM.  Also, I might have hundreds of keys, with segments between each other.  Also, the panning/zooming must be really smooth and responsive.
In the model (and ViewModel), a key has XY positions; segments have a PointCollection.
In the View, the keys are Rectangle, curves segments are Polyline.
All those UI elements are binded to the Canvas' Top and Left dependency properties.
The problem I have is when implementing the zoom.
I first worked with a viewbox that is inserted between the scrollviewer and the canvas
<ScrollViewer>
    <Viewbox>
        <Canvas/>
    </Viewbox>
</ScrollViewer>

Panning worked fine, but the zoom was not the right zoom that I want.  It made a "graphical" zoom, which makes everything bigger, rectangles and the polylines.
What I want is, that when zooming in, the keys (rectangles) go farther between each other, without getting bigger, and the segment (Polyline) stretches between the two keys, without the StrokeThickness looking any bigger.
The solution I was going for is to have all the coordinates translated in the VM when changing the zoom.
Ex:
The key, in the model, has a position of (2,3).  When the zoom's value is 2.0, the key's ViewModel will show positions of (4,6).  For the segments, I will translate all the Points in the Model's PointCollection, and put them inside the PointCollection of the ViewModel.
The problem with that solution is that it might get slow on performance when zooming in/out quicly when I'll have hundreds of keys.  Since changing the zoom factor will change -all- the ViewModels coordinates, and thus every UIElements will get moved.
I thought about the RenderTransform on the UIElements to apply the zoom translation, but it won't work with the Polylines.  I could use a ScaleTransform for the polylines, but that will stretch them visually.
It's quite complex to describe, so feel free to ask for more details.
Any ideas on how I could achieve that?
Answer: I've done something very simliar to what you are wanting. Unfortuantely I don't think you are going to get what you want by using a ViewBox or even a ScaleTransform.
You probably want to look into creating your own Panel that implements IScrollInfo so that you can handle the Arrange yourself.
Hope this helps.

WPF Zooming Problem


GPX to Feature loses elevation?

Question: I have been sent a GPX file to create a trails network on arcgis. When I run the GPX to Feature tool the elevation attributes are all zero, however when I view the GPX file on an online view, there is an elevation profile.
I am not familiar with the properties of GPX files, is it possible the GPX data has no elevation with it and is showing a profile on the viewers (e.g. maplorer) based on google maps?
In which case, can I add elevation data to the shapefile some other way?
Answer: Maybe you can use DNRGPS to do the conversion. I usually use this for tracklogs and other raw data types in gpx format.

GPX to Feature loses elevation?


Do people prefer to adopt kittens and puppies, over adult cats or dogs?

Question: Are kittens and puppies adopted over adult cats and dogs or is that just a rumor? If so what leads them to this choice?  Is it just because they are cuter?
Answer: Yes, puppies and kittens get adopted much faster than older dogs and cats.   I've worked at an animal shelter every weekend for almost 6 years. Puppies go the fastest because we have less of them and you can tell their breed easier than kittens.
We have one of the fastest adoption rates in the country (US):  17 days. Puppies and kittens can go within the hour we put them out.  Adult dogs and cats can take a month or two to be adopted.  Other shelters aren't so lucky.
I listen to people's reasoning for adopting a puppy or kitten.  I hear things like, "I want my kitten or puppy to grow up with my kids."  "My child wants the kitten or puppy."  "She\he is so cute.  I can't stand it.  I have to have her/him". Mostly these decisions are emotionally-based or uneducated.
We try to educate adopters on how difficult a new puppy or kitten will be. And of course my favorite thing to say (jokingly, but not) is..."you know they grow up, right?"
Answer: Unfortunately,  this is true.
Cuteness is part of it. Wanting to feel that the animal is clearly "yours" plays a part. Some folks are afraid that the animal was surrendered due to behavioral problems and don't want to risk adopting someone else's training mistakes.  Some folks don't want to give up more years of living with the animal than they must.
And so on. Different people have different concerns. But there are enough people with some concern to make this statistic exist.
Comment: My reason for preferring younger cats is related to your "Making the cat Yours" point. I have socialized many cats over time, including many abandoned or neglected adults. The young cats I had didn't require the intense socialization to repair bad habits or fear of others they learned from prior owners or abandonment. Abandoned cats can eventually be socialized to an amazing degree, but in some cases it may take years, and those cats are never as friendly around strangers as a cat socialized properly from a young age.


how to create a custom profile page

Question: I want to create a page which have user details like Name, user picture, designation, about , user's social link, these details should in left side and user uploaded images in right site both things in a single page.
Please help me.
Answer: You can use custom templates for user profile pages.
Basically, you have to copy the user-profile.tpl.php from /modules/user into your theme directory, clear the cache and edit it according to your needs.
To see the list of available variables to use inside the tpl.php file, look here: https://api.drupal.org/api/drupal/modules%21user%21user-profile.tpl.php/7
I think that another possible approach (that doesn't require coding) would be to use Panels + Views

how to create a custom profile page


Single word for?

Question: Please give me a single word for: the ability of writing and speaking of a language.
Answer: I think yo ucan use "fluent" without specifying if it is written or spoken. For example: "I'm fluent in English"
Answer: Some of these choices have already been suggested in the other answers. I going to suggest few additional words:
i)basic  ii) intermediate iii) professional working proficiency or business level iv) fluent. These words may be used to describe proficiency in each of the linguistic skill (writing, reading, speaking, listening).
You may also check out following resources:
i) https://academic.oup.com/applij/article-abstract/34/1/99/150948?redirectedFrom=PDF
ii) https://academic.oup.com/applij/article-abstract/34/1/99/150948?redirectedFrom=PDF
Answer: I think 'linguistic proficiency' is the word you are looking for. Wikipedia defines it as "the ability of an individual to speak or perform in a language."

Single word for?


Microscopic Theory of superfluidity

Question: In comparison with superconductivity what is the microscopic theory of superfluidity? Who has done it?
Answer: Superfluids come in several types. The most theoretically accessible case are superfluids that are Bose-Einstein condensates, just like in the case of superconductors. However, the bosons that get condensed in superconductors are Cooper pairs (of electrons). It's the whole atoms, including nuclei (e.g. helium-4), that get Bose-Einstein condensed in the superfluid case.
See e.g. this old paper

http://www.sciencedirect.com/science/article/pii/0003491665902800

for a microscopic theory of superfluidity in helium. Other superfluids include superfluid Fermi gases whose dynamics is quite different but also mostly understood. The description of all the possible behaviors and transitions between them is a major part of condensed matter physics so one can't really summarize all of them in one answer.
Answer: A microscopic theory of superfluidity of Helium-4 was developed by Bogoliubov around 1947 (please see a short review and a reference in,  e.g., http://www.lptl.jussieu.fr/files/Dupuis09a.pdf (PRL 102, 190401 (2009)). It is a bit difficult to summarize the theory here.

Microscopic Theory of superfluidity


Why do baby plants (vegetables in particular) just shrivel up and die with no apparent reason?

Question: I planted some vegetables such as cabbages, pumpkins, tomatoes, and zucchini and, they did well at first. I transplanted them into small Jiffy biodegradable pots, and they seemed to thrive in those too. Then their roots started to grow out of the pots, which I thought was normal. I decided, since the roots had grown out of those pots, that I would plant them in the 5 inch Jiffy pots. The plants did fine for about a couple weeks, but eventually their leaves began to turn yellow. It started with the original seedling leaves and then spread to the adult leaves. After the yellow stage they began to shrivel and turn brown. Gradually they fell off, and sometimes the whole plant died. Why is this?
Comment: What kind of soil do you use in the pots?  Do you use any fertilizers or soil amendments?
Answer: Welcome Wyatt
I too made the same mistake of relying upon these Jiffy type coir+polymeric outer mesh things for my planting and I found them to not only be determinedly resistant to decomposing, the substrate itself was hydrophobic and additionally very compacted meaning that baby roots found it to be a poor medium for growing and my experience was the same as yours.
I found that the roots find it difficult to grow beyond the polymeric mesh and it acted like a corset. These days I tend to use more simple seed trays filled with my own seedling mix and it works better, though pricking out and transferring them to larger posts can be problematic. The alternative would be to use seed trays with compartments or as many people have successfully tried, store up your empty toilet rolls, folding them inwards at the bottom and putting your own seedling mix into them. The cardboard most certainly breaks down more easily and the additional volume means you can go straight from toilet roll to ground, avoiding the extra stress of a second transplant.
I used the Jiffy things when I first moved to my house 5 years ago and when all my seedlings died as you described, I decided to dump the ovaloid things into some felt sacks for growing potatoes, working on the basis they would break down and add some organic material to the grow-sack.
You will not be surprised that whenever I have cropped my potato harvest, every year, the entire oviod bag thing is still there. I put it back in the grow-bag with more compost to over winter each year. The last time I did this was in October 2022 and sure enough, those jiffy bag seedling things were still there in the mix and most certainly not decomposed 4 years later. They were and still are useless.
I have also tried the egg-box type pots by many manufacturers which you fill with your own substrate mix and they too do not break down well and again, despite discarding those into a raised bed to compost down, 2 years on, they are still recognisable complete with the marker pen with the name of the tomato seed I wished to grow. Again, I do not believe them to be decomposable in any reasonable time frame and they can also act as a wick, drawing water away from the seedling in the same way a terracotta pot does.


FBProfilePictureView object won't show image

Question: I'm doing the scrumptios facebook developer tutorial for the 3.1 iOS SDK.
I've managed to display my profile name from facebook, however the FBProfilePictureView wont show the picture
here's the code for iboutlet
@property (strong, nonatomic) IBOutlet FBProfilePictureView *useProfileImage;

here is what I used to display the pic
self.useProfileImage.profileID = user.id;

I have confirmed that the it changed the profileid variable of the image by displaying it in a label.
When I first ran the project I had this error

"2012-05-18 04:04:11.620 Scrumptious[6548:f803] Unknown class
  FBProfilePictureView in Interface Builder file."

and solved it they way the FB tutorial suggested- by adding [FBProfilePictureView class];
to "applicationdidfinishlaunching: withoptions" in the app delegate.
any idea why the picture wouldn't show?
link to the tutorial
Answer: Adding the [FBProfilePictureView class]; as the first line in the app delegate method of didFinishLaunching seems kinda hacky to me.
Check out the HelloFacebookSample inside the SDK.  Here is the 4 line comment:
// If you have not added the -ObjC linker flag, you may need to uncomment the following line because
// Nib files require the type to have been loaded before they can do the wireup successfully.
// http://stackoverflow.com/questions/1725881/unknown-class-myclass-in-interface-builder-file-error-at-runtime
// [FBProfilePictureView class];

I tried adding the -ObjC flag and it worked fine.
Answer: To resolve this, add this as the first line in the app delegate's application:didFinishLaunchingWithOptions: method:
[FBProfilePictureView class];
Answer: As documented in the facebook webpages you need to put the [FBProfilePictureView class]; as the first line in the app delegate method of didFinishLaunching. (Note their sample code does not have this but still works, in my case it will not work without it.
I created a UIView object sized it up and then selected the class from UIView to FBProfilePictureView.  This will disconnect any connection between your program and IB so you need to reconnect again, the error in which you are not able to see the picture is due to the object not being wired up to an IBOutlet item.
I am not sure if a cut and paste will work, maybe it will, but I created the object from UIView and just changed the class manually through IB.
Without the [FBProfilePictureView class];  it will give you an error.
If done correctly, if you view the XIB  - in the object window/list you should see "Profile Picture View"along with Button and Label instead of FBProfilePictureView. The profile pic from facebook should show.
Answer: I have the same problem. My solution is to uncheck the "Use autolayout" option in "File Inspector" of the xib file. To open the "File Inspector", press cmd+option+1 after opening the  xib file.
Edit 1: Just find another solution.
Try to set a width constraint and height constraint to the profile picture view. I find this tutorial is useful.
Comment: didn't work :( i alredy disabled autolayout since im running it on a 5.1 simulator. constraining the width didnt work either.
Comment: update: i copied the view controller from the example file and it worked, have no idea why. guess i just did something wrong in the xib
Answer: I had the same issue, xcode4.5.1 ios6.
to fix do this: in IB uncheck use autolayout for FBprofilepictureview, also uncheck "autoresize subview" into the view
Answer: They(fb developer forum) said paste that in your app delegate didLunch method like that
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

        [FBProfilePictureView class];

        // Create a LoginUIViewController instance where the login button will be
        LoginUIViewController *loginUIViewController = [[LoginUIViewController alloc] init];

        // Set loginUIViewController as root view controller
        [[self window] setRootViewController:loginUIViewController];

        self.window.backgroundColor = [UIColor whiteColor];
        [self.window makeKeyAndVisible];
        return YES;
    }

just replace
    [FBProfilePictureView class];

with these commented lines it will work

    // Override point for customization after application launch.

    // Load the FBProfilePictureView
    // You can find more information about why you need to add this line of code in our troubleshooting guide
    // https://developers.facebook.com/docs/ios/troubleshooting#objc
    [FBProfilePictureView class];

it will work magically :)
Answer: Classes that use categories to extend existing classes are not loaded automatically. Classes that are used from the Xcode interface builder aren't loaded automatically, for example when you add a FBLoginView to your interface by drawing a view in your .xib file and then classing it as FBLoginView from the interface builder UI.
class helps to create a pointer to the FBProfilePictureView.


How do remnants of supernova have a magnetic field which cause the insane speed of cosmic rays?

Question: If a star undergoes a supernova explosion, how does it retain its magnetic field to excite the moving particles to near speed of light velocities as stated in observations of NASA?
Answer: The magnetic field of neutron stars is generated by a magnetohydrodynamic dynamo. This is essentially the same process that forms the magnetic field of the Sun and the Earth, but continued to an extreme form due to the extreme nature of neutron stars.
Magnetic flux is conserved, so as the core of a massive star collapses, the flux is not lost, but becomes concentrated in the relatively tiny volume of the neutron star.  This can start a magnetohydrodynamic dynamo, in which heat and rotational energy of the neutron star (both of which are intense) cause enormous flows of electrically conducting material in the star and consequently enormous eddies of electricity, generating a magnetic field.  The field then acts to maintain the flow of electricity and the system is stable as long as it can be powered by the rotation and heat of the star.
So the key points.  A collapsing star keeps its magnetic field and concentrates it.  The magnetic field of a neutron star can generate a dynamo that further intensifies the field. Neutron stars are extreme objects with extreme properties.
Comment: Thank you for this answer , im not familiar with electricity point of view of physics , hence I only have a general idea of it so can you explain what is "eddies of electricity" mean in the answer? Thank you very much
Comment: The fundamental concept is that magnetic fields can induce currents in a moving conductive fluid, which in turn polarizes the fluid and reciprocally changes the magnetic field itself. Eddies means electrical flow in a circle, It is powered by the motion of the fluid in the magnetic field, which allows a conducting fluid to convert heat and rotation into a magnetic field.
Comment: Ah thanks now i can understand


Synthetic breathable fabrics vs natural fabrics for 'live-in' hiking clothing?

Question: I'm putting together a kit list for hiking and the last time I went on a big hike I wore a breathable t-shirt, but I didn't find it that comfy and it also tended to start to smell quickly. Any tips on fabrics / garments for upper body when hiking long distance and multiple days?
Answer: A lot depends on the climate, on your budget, and on how much you sweat on the move.
Pros and cons of merino
Merino is the king if you want to prevent odour and a good quality top can feel acceptably comfortable against the skin. It wicks quite well but holds around 25% more water than synthetics and takes around 50% longer to dry. Another issue is abrasion - if you wear a high wool content shirt directly under a pack you will quickly get holes in the shoulders and upper back. Finally, good wool garments can be expensive - keep an eye out for sales.
Because of the advantages of wool, researchers have been working hard to offset the disadvantages through blending with synthetics and through structural innovations such as grid weaves. One of the more interesting developments is Power Wool from Maldon Mills.
Pros and cons of synthetics
Synthetics are cheaper and more durable, and wick even better - though if you sweat up in the cold (always a bad idea), there's a danger of flash chilling as moisture is drawn off your skin. A good synthetic is pleasant against the skin. Warmth for weight it is lighter than wool, and it dries more quickly. I personally find that with a good modern treatment the build up of odour is manageable, even on a long trek. But some users find that odour is more of an issue - this is something you have to try for yourself.
A little known alternative - and my personal favourite
A little known option is to wear a technical mesh such as Brynje next to the skin capped by a lightweight wool or synthetic layer. This is essentially a sophisticated string vest and gives the best of all worlds. Although it's polypropylene it doesn't build up odour, at least in my experience, presumably because it's so well vented. In the cold, it traps a layer of warm air against your skin. When it's wet or sweaty it keeps the damp capping layer off your skin. And when it's hot, you can unzip the capping layer and dump heat instantly. It's widely used in Scandinavia, but has only recently been spreading to the UK and the US.
Comment: Forgot to mention bamboo, which has been attracting some attention. I've no personal experience, but it seems to sit between synthetics and merino in its properties. Reportedly, very pleasant to wear. The main problem seems to be that performance varies widely between manufacturers, and there's not yet an established brand which can be recommended.
Answer: The odors probable came from your shirt clinging on to all the perspiration, and not having a chance to dry out.  If you can afford the weight of a spare (or sleeping) shirt, spring for it so your wet clothes can dry overnight.
It also helps to coordinate the rest of your clothing.  If you're sweating, make sure anything you're wearing over your baselayer will not impede the evaporation.  For windy ascents, a breathable windbreaker is ideal.
I recommend cotton only as the outermost layer if you plan to be near a campfire.  Synthetic materials do melt, even from stray embers.  Even then, it wouldn't be of much use since you would only wear it at camp or while sleeping.  Spring for wool if it's in your price range.
Comment: Letting your synthetic base layers dry overnight won't help much with odour. The bacteria that cause the smell will still accumulate.in the fabric. Cotton is OK in the desert but a very bad idea indeed in the wet and cold. It's sometimes used by woodcraft folk because it's safer near fire, but is not recommended for active use.
Comment: Correct, but bacteria won't thrive and multiply as much as they would in that moist environment.  If anything, it would mitigate the smell.  Good point that I forgot to include about the cotton - it should be strictly for camp/sleep.


Meaning and usage of vintage

Question: I often trad the word "vintage" but I don't know if it used in everyday language?
Does it apply mainly to wines?
Answer: As a noun, yes, it mainly refers to a good quality wine or to the specific year that a wine was made.
As an adjective, it can be used to describe an old car/aircraft/watch that is still in a good condition and shows the best and most typical characteristics of its kind. Vintage things are old-fashioned, but of high quality and lasting value.
Comment: In Britain, a 'vintage' car is one made between 1919 and 1930. A 'veteran' car is older; strictly defined it is one made before 1905, but this is sometimes stretched to before 1919.

Meaning and usage of vintage


What is a good non-technical introduction to theories of everything?

Question: I'm not a physicist but I'm interested in unified theories, and I do not know how to start learning about it. What would be a good book to read to start learning about this topic?
Answer: These sorts of questions are hard to answer unless there is some understanding about the level of math and physics the asker actually has.  Probably one of the most irritating aspect about trying to learn physics is that there is a lot of literature out there that completely ignores any discussion of the Lagrangian and Hamiltonian which are so fundamental to physics formulations (in fact I have an entire college physics text that doesn't use either term once, which is mind numbing and infuriating in retrospect, and I even had a physics grad argue blue in the face that the Hamiltonian was not $\mathcal{H}=T+V$).  If a person has not been exposed previously to these concepts, then it is very difficult to have a coherent conversation about physics let alone the Theory of Everything.
Assuming you have at least this level of introductory understanding, the next place I would start is to get an understanding of algebra, lie groups and the standard model.  The best introductory paper I have ever read is A Simple Introduction to Particle Physics by Robinson, Bland, Cleaver and Dittman of Baylor University. I would focus especially on Part II - Algebraic Foundations.
The reason this is critical is that although the Theory of Everything is not some sort of crude algebra (despite attempts by some to make it so), modern physics is understood in the language of algebra, and even more importantly a supersymmetry algebra which makes us of Grassmann numbers for the fermionic fields.
Another good introductory text which is worth exploring is the book Lie Groups, Physics and Geometry by Robert Gilmore.  I would pay special attention to chapter one, as there is an excellent discussion of why the general polynomial of degree 5 or more can not be solved using radicals.  It also gives an excellent initial expose about Lie groups and their classification as simple vs. solvable.
In any case, if you want to master Theories of Everything, it is the language of algebra that needs to mastered first.
Comment: @Dilaton  Probably true, I am just to the point where I think people need to be realistic in the level of effort they are going to have to invest in order to get a good understanding to discuss TOE's.  Most popular discussions really barely touch on some of the more difficult concepts.  Algebra is really not too difficult, its just that we don't introduce it early enough in the curriculum for people to make the mental connections.
Comment: I particularly like the links to the Robinson et al. paper and the book about Lie groups and geometry for myself +1, but I'm not sure if this is what the asker had in mind too, since these resources are rather technical ...
Comment: of course, the hamiltonian is T + V, but I would argue that that is a horrible definition to use for the Hamiltonian--fundamentally, it is the Legendre transformation of the lagrangian, replacing time derivatives with their canonical momenta.
Comment: The Hamiltonian really _isn't_ $T+V$ in general, that only works for rather special cases.
Answer: As a theory of everything includes a theory of all particular things, it would be good if you start by learning about the theories that need to be unified.
This means first

some quantum mechanics,
something about classical electromagnetism,
something about special anf general relativity,
then
some quantum field theory,
something about quantum electrodynamics,
something about the standard model.

So you should look at the recommendations for introductions to these subjects available at our Book recommendations.
Unless you are content with such books as ''The elegant universe''
http://en.wikipedia.org/wiki/The_Elegant_Universe where you learn the buzzwords without a deeper understanding.
Answer: The book Out of this world written by Stephen Webb is a good introduction if you have really no idea what modern fundamental physics is up to. It is the one that made me excited about this stuff for the first time several years ago, and the excitement still holds on :-).
It gently starts by explaining why symmetries are important in physics, followed by an overview about QM and GR, what particle physics generally is about, and the standard model. Then the key ideas behind GUTs (Grand Unified Theories), supersymmetry, and extra dimensions leading to supergravity as a first unified theory including gravity, get introduced. The second part focuses on explaining string and M-theory (other approaches are shortly mentioned too) and some topics, such as black holes, the holographic principle, and cosmology that can be addressed by it.
The book builds up the wisdom it explains in a logical and systematic manner and it is written in a absorbing style that made it difficult for me to put it away. Historical notes about when which ideas and concepts are discovered by whom are included and the way the narrator tells the story made me think that these are all nice people who do awesome and cool things when reading it for the first time.
Answer: There is one book with a unique title Planets and Electromagnetic Waves which unifies laws in sky and laws for electromagnetic waves, which is somewhat non technical, and which covers the following things.
(1)  Existence of atmosphere in planets and capacity of planets to retain atmosphere.
(2)  Existence of winds in planets and relative speeds of winds in planets.
(3)  Existence of magnetic fields in self-rotating planets and stars.
(4)  A definition for black holes with maximum possible temperatures of black holes and a simple derivation for Chandrasekar limit for black holes.
(5)  Microwave back ground.
(6)  Gravitational waves and LIGO.
(7)  Maxwell's distribution law for black body radiation.
(8)   An unexpected application of Wien's displacement law.
(9)  Method to classify electromagnetic waves as light waves and radio waves.
(10)     Planck's equations for light waves and radio waves.
(11)     Simplified derivation for Einstein's energy-mass formula.
(12)    Unexpected connections between laws for sky and laws for electromagnetic waves.
This book is interesting, because it unifies sky and energy waves. But this book does not cover all fundamental aspects of physics.


How to create your own CDN? Is it just creating a subdomain?

Question: I was wondering if it is possible to create my own CDN on my server through plesk alone?
I mean would creating an extra subdomain like cdn.mywebsite.com be sufficient?
And should I create a cdn subdomain for each website I create or should I create a subdomain with server space and upload all images?
Answer: The main point of a Content Distribution Network (CDN) is to put the content as close to the end-user as possible, thereby reducing the Distance component of the Round Trip Time (RTT) and speeding up the request. Simply serving static content from a sub-domain isn't really the same as using a CDN.
The advantages of serving content from such a sub-domain, however, are that

The sub-domain can be a cookie-less domain
If you use your cookies correctly (ie. don't have any *.mydomain.com cookies), you can dramatically reduce the size (ie. number of packets sent) of the HTTP request, which would save on bandwidth and speed up requests significantly if you use cookies heavily on the main site.

The page can benefit from a more simultaneous requests being made by the browser
Most browsers will make simultaneous requests for page assets, like images, fonts, CSS, etc. The catch is that most browsers will only allow a limited number of open requests to a particular domain (somewhere around 5 I think). By spreading your assets across multiple sub-domains, you "trick" the browser, and allow more parallel requests, since the limit applies to each sub-domain.

So, yes, you could set this up by just making a sub-domain, but you also have to make sure the cookies you are using don't get sent to requests for that sub-domain as well.
Comment: Although this solution it's not a real CDN, it would also take advantage of browser parallel downloads?
Comment: how could one test if cookies are being sent with files to determine if a subdomain option was the direction needed to be taken?
Comment: @joseantgv Good point. I've updated the answer to reflect this aspect.
Comment: @user658182 - The easiest way would be to use the Inspector in Firefox or Chrome and look at the headers on the request and response to see what is being sent (Take a look at the "Cookies" headers)
Comment: Answers the 2nd question very well, but skips the 1st. How does one put one's own wares on a CDN?


How can lizardmen be made to seem lizardly?

Question: Lizards don't seem to have many visible defining traits. All that I could find is the shape of the body, which would be changed for a humanoid, and the jaws. Are there any other visible features of lizards that would translate to a humanoid frame?
Comment: how are scales not a defining trait?
Answer: Nictitating membrane.
This is their "third eyelid", some birds, fish and mammals have them still but humans' have shrunk to almost nothing in the corner of your eye.
Blood colour.
Most lizards have red blood like ours in appearance, some however have green liquid circulating around their systems - if they blush, it won't be a human blush.
No earlobes.
Pinae are conspicuous in most mammals including humans, lizards never got around to developing them.
Claws not nails.
Self-explanatory.
No hair.
This follows on from the claw point as there's an evolutionary link between the two, and lizards haven't gotten as far as us humans in this regard.
Comment: Aren't most of these traits of reptiles in general?
Comment: Well, there's more than one colour changing lizard, but the vast majority of lizards and reptiles don't do that. Is there a particular characteristic/set of characteristics that you're interested in exploring? @IchthysKing
Answer: I'll assume your lizard folk have mostly traits found in monitor lizards for the majority of this:

A lizardfolk with a muscular tail would likely need to maintain a more hunched posture than a normal person, maybe even using the tail for balance while standing.

they'd most likely still have claws at the end of every digit, as well as having a different number of phalanxes in each finger, resulting in the fingers closer to the back of the hand being likely longer, or at least more jointed than the ones closer to the front, unless the fusion of phalanxes occurred.

their bodies would be covered in scales rather than "normal" soft skin, and these scales would probably begin to become pale as the time for shedding approached much like in normal lizards

they would most likely have a different head shape than ours, probably maintaining a long snout, also non-specialized teeth.

they'd have long tails. No need to elaborate.

nictiating membranes in addition to the normal eyelids.

no external ears whatsoever.

they'd have long tails. That's awesome!

they'd potentially have forked tongues, using them to smell (not applicable to some species. A gecko lizardfolk could potentially have no eyelids or nictiating membrane and simply lick their eyes regularly like their tiny counterparts).

big head + big muscles = powerful bite. Also a potentially venomous bite. The claws would not be the only reason not to pick a fight.

a potentially different group of relations and world views depending on how their brains evolved sapience. They might have less "warm" relationships with each other and other sapient beings, or they might not understand emotionbwell, or not view the external impacts of the world with the same impact (as in they don't feel less valuable or less capable if they screw up or have a limb bit off. They just keep going along like it doesn't matter because life won't wait).

they'd have long tails. And they might be able to use it as whips! Seriously give them a long tail it'll be worth it.

These are only a few examples. Depending on how much lizard and how much folk you add to your species you can get something pretty alien to a human or something really relatable, but a little different on the outside.
Answer: Lizards have scales and tails and can climb vertical structures, clinging to them even at incredible angles.
You can use the Geico gecko as an example and add a mane of scales to the individual similar to that of Murlocs found in the game Hearthstone.
You can set their posture with e a slight hunch and further exaggerate it when they don armour, a helmet, and are equipped with a spear and shield.
Good question, I like the idea of how some animals can be made to look humanoid (or a human made to look animalistic, or in this case... lizardly)
Answer: The easiest way is to look at how a lizards legs attach to the body.  The legs come out to the side.  This would pose a problem for a humanoid lizard since walking and running would be slower with leg that come out of the pelvis to the side instead of down (as ours do).
Another way is to have them travel on all four legs by preference and only take an upright stance when they need the height or need to use their hands while moving.
A combination would work as well (especially if that means that they wouldn't have to try to run upright with legs that stick out to the side).
Answer: Two penises, with spikes and hooks.
Lizard males have two penises.  This is a characteristic trait which I think could be used to set lizard people apart.  It is not limited to the males.
Why Snakes Have Two Penises and Alligators Are Always Erect:
From spiky penises to an extra clitoris, reptile reproductive parts don't lack for variety.

And it's not just males that are doubling up. Female lizards and
snakes have two clitorises, or hemiclitores, which were first
described in female monitor lizards in 1995 by W. Böhme as
"miniaturized mirror images of the hemipenes of the males."
Hemiclitores and their functions are still "poorly known" but should
be considered a defining characteristic of female lizards and snakes,
researchers Soledad Valdecantos and Fernando Lobo of the Universidad
Nacional de Salta in Argentina reported in a 2014 study.

In addition to being double, the penises of lizards have spikes and hooks.

Scientists have a few ideas about why hemipenes exhibit this sort of
ornamentation. According to one hypothesis, male and female genital
form has adapted so that mating can occur only between a male and
female of the same species. The genitals of males and females of the
same species fit together.

Consider also that the spikes and hooks might have evolved to attract mates.
The conventional scaly lizard man has been done, done, done and @ProjectApex covered all of the typical features.  Double penises and clitorises has not been done so much and the time has come! That would set your lizard people apart from dull prior renditions.  Remember: both spikes and hooks!  I am not sure if the clitorises of lizards also have spikes and hooks but for fiction you can make it whatever works.
Answer: For a lizard person, I think the Komodo Dragon is the best template. Here are some things to consider:

Cold blooded. Lizard people become very slow in cold weather, but become highly active and aggressive when it is warm.
Toxic bite. These lizard people's mouths are home to countless virulent bacteria. I wouldn't want to mess with them.
Ambush hunters. Komodo dragons hunt with a ferocity akin to lions. They've been known to attack humans without provocation.
Incredible upper body strength. Lizard people can climb anything, and their claws are brutal in a fight.
Group hunting. Lizard people work together to bring down massive prey.
Scaly skin. Lizard people have a natural armor in the form of their skin. This gives them significant protection from slashing and piercing.

There are a lot of options here, and you don't need to use all of them. However, a Komodo Dragon type of person would be incredibly unique.
Comment: Most of these don't seem that specific to lizards


How to fill a 20lb BBQ Propane tank with LPG?

Question: LPG filling stations fit forklift tank filler valve threads (1-3/4 ACME) not standard 20lb BBQ tanks threads. The 20lb BBQ threads are male 1-5/16″ ACME (OPD) threads, however most adaptors fit on the inside like this device designed to refill 1lb tanks from a standard 20lb:

Where can an adapter be found to simulate a forklift tank filler valve?
Comment: Just another question where OP's location may be of help. I know of somewhere in UK that probably makes just what you need.
Answer: If I understand correctly you want to adapt a 1" P.O.L. to a 1-3/4 ACME so that you can fill your BBQ propane tank with a different connector.
In that case you'd want something like this.

(source: ebayimg.com)
1-3/4" ACME to 1" POL Adapter
If you do get something like this, make sure it comes preassembled, or assemble carefully with yellow teflon or propane rated pipe dope.
Comment: You are right, The 1" POL end fits inside and the 1-3/4" ACME is the Forklift tank threads. 1-5/16″ ACME (OPD) is what a standard BBQ has.


Replacing ceramic tape on Wanhao Duplicator i3

Question: I need new ceramic tape for my 3D printer. Does it matter which I get? Can I just get the cheapest? Is there a quality difference?
Answer: I have a Wanhao Duplicator i3 too. It does not matter a lot which ceramic wadding and / or kapton  you use. The more you seal off, the better it works. If you have a full metal hotend and a powerful cooling blower and need temps above 250 °C, you might want to do the best you can with a good padding of ceramic and kapton. For normal operation, a half-done job will do just fine.
See this question too: Efficient and easy way to thermally insulate the heat block of the hotend?


Splitting 750km street into 10m intervals?

Question: I am using ArcGIS 10.3. The length of my street network is 745127.157m and would like to split this into 10m equal intervals so that I can calculate the slope of each segment. The split tool does not allow beyond 999
Answer: There is a proportion tool on the COGO toolbar that will divide a line into equal length segments.  You could get close to 10m intervals but it will not work with a basic license.  There are several tools on the internet to accomplish this task.  Here is one I found on ArcScripts(beta).
http://www.arcgis.com/home/item.html?id=d5d27ee47330434b9a96b91136a0118f
Answer: If you don't have Standard or Advanced license of ArcGIS to use COGO, then you can use GRASS plugin under QGIS instead of ArcGIS software to split the polylines by specific length. There is a tool "v.split.length - Split lines to shorter segments by length" that can do exactly what you asking, as you can see below:

If QGIS is not installed in your machine, you can find a detailed explanation on how to install QGIS with GRASS in this answer.


System updates - how to see what is updating

Question: One thing that puzzle s me as i move from mint is the system updates. In mint you could see what was going to be updated.   The app store does not show what it's updating when it's says there are system updates.  It's not a problem that much i just like to see.  Any way it can be seen?
Comment: if you want to see what packages are available for update prior to updating you can run sudo apt list --upgradeable
Answer: This is probably not the answer you'd like to have, but: in terminal you can always do a sudo apt upgrade and you will see the packages which will be updated.
Answer: Additionally, try run sudo apt -u upgrade --assume-no in terminal to see which packages are upgradeable.


How to constrain a large image over multiple artboards

Question: I am trying to place a large image over multiple artboards in illustrator. The image stretches over 8 artboards. I would like each artboard to be able to separate constraining the image proportions to each artboard. When I save as .ai and check separated artboards it will save the artboards individually but each board contains the entire image instead of the portion of the image I want.
Comment: Artboard never "split" images and there's no default method to make them operate that way. You'll have to *manually* create the tiles, or try saving artboards as PDFs. That may give you PDF pages of the "pieces"
Comment: Hi Stephanie, welcome to GDSE and thanks for your question. If you want to know more about the site, please see the [help] or ping one of us in [chat] once your reputation is sufficient (20). Keep contributing and enjoy the site!
Answer: The Artboard never split an image unless you export it to Jpg using Artboard
here is my solution:

arrange your artboard the way you want
place the image and stretch it over all your Artboard the way you want

export the file as JPG or TIF and check the checkbox use Artboard

Illustrator will export all your artboard into some individual images, you will notice that each Artboard will export a portion from the bidder image version. you will notice that each file name have a suffix with the artboard name. you will never get lost.

-- if you for artboard that have a portion of the bigger image individual so you have to continue with the next steps.

Now return to the illustrator and delete the bigger image.
place the images that you have just exported into illustrator each image in its artboard.

-- That's it.


Gliding: why pulling the stick back in a spiral dive would tighten the turn?

Question: I have recently done my spiral dive recovery lesson in a glider ASK21.
The instructor taught me to level the wings first, then ease out of the dive by pulling the stick back. He said that pulling the stick back would only tighten the spiral and not help with reducing the speed.
Why is that? Should the nose not pitch up and reduce the speed?
Comment: Also, once you've rolled wings level, don't pull the stick hard and suddenly, unless ground impact is imminent. Doing so may exceed the structural limit of the aircraft. Pull it smoothly.
Answer: The effects of rudder and elevator get mixed when the aircraft flies at a roll angle. See it this way: When you pull the elevator at a roll angle of 60°, it will mostly (86.6%) work like a rudder would for a level airplane.
Why those 86.6%? When looking at the aircraft in an earth-fixed reference system, the additional tail force from an elevator deflection will produce a side load component proportional to the sine of the roll angle (which is 86.6% at 60°). The vertical component which would help to get the nose up is only 50% at a roll angle of 60° because it is proportional to the cosine of the roll angle.
Coordinated flight at higher roll angles is almost like flying a loop sideways. You will only lift your glider's nose in the reference system of the glider and tighten the loop. The reference system that counts more here is the one in which gravity acts, and you should lift the glider's nose up in this system.
Not knowing this subtlety ended the life of several early aviators until it was found out in 1912 that the rudder is what lifts the nose in a spiral dive. Of course, it is even more efficient to first roll wings level and make the elevator work properly again.
The horizontal-loop thing works in reverse, too: Rüdiger Kunz, the designer of the Standard Austria, was always fond of telling the story that happened on occasion of the first flight: At some point, the pilot started to fly loops. After the third, he asked Herr Kunz over the radio: "Notice anything?" - "Yes, you're climbing" was his answer. Thereupon the pilot replied: "That's how you can circle in thermals, too!"
Comment: Rudder lifts the nose in a spiral dive, but it does not do much to arrest the dive, just makes the plane descend sideways, doesn't it? You still need to reduce the bank angle to get the vertical lift to arrest the dive.
Comment: @JanHudec Yes, absolutely. I only mention it to show that it influences the attitude in banked flight like the elevator does in straight flight.
Answer: In a steep spiral with a steep roll attitude, that is true as most of the lift vector is directed into a horizontal component.  Therefore aft stick pressure is simply going to force the aircraft into a tighter turn.  In addition this is going to impose much higher structural loads at high air speeds which may be beyond the design limits of the glider and put you at risk of a structural failure.  Your best bet from a steep spiral is to roll wings level, then pull out of the dive.
Answer: The other posts answer the question, but I think they fail to make an important point, or at least they fail to emphasize it. You are practicing the Spiral Dive Recovery, which is a "recovery" procedure. You are trying to extricate yourself from something like an unusual attitude. You are attempting to recover the aircraft, and not trying to stay in the turn!
If you are recovering from a spiral dive, then you level your wings first so that when you pull back on the stick all the lift generated is towards getting you out of the dive. This is the "recovery" of the exercise. This is solely about stopping your descent.
If you remain in the turn while pulling back on the stick then some of the lift will go into tightening the turn, instead of pulling out of the dive.
It might be possible that your intention is to be in a safe spiral dive, and in that case it might be appropriate to tighten the turn. For example, you might want to get the nose around quicker. This would not be a typical recovery procedure though.
I was doing a popup delivery in the single seat, light-attack jet A7-E Corsair when I successfully "recovered" from a turn in a steep dive. At 100 feet AGL, 750 MPH, with the target 3 miles away the pilot pulls the nose up to between 15-30 degrees to reach an apex in the climb of approximately 3,000 feet. At the apex the aircraft is rolled on its back and the target identified, pulling the nose onto it while inverted. In a 7-15 degree dive the run is made and bombs released with the egress fast and low. This is a very dynamic maneuver close to the ground, with lots of tasks to complete in a short period of time.
I found myself in the dive while still in a hard turn trying to get my nose on the target to release my bombs. The HUD indicated a 15 degree dive, and a safety article I read months earlier flashed through my head. Thank you Grandpa Pettibone! "If you find yourself in a 15 degree dive in a popup maneuver level your wings immediately and pull up." If I hadn't leveled my wings, and tried to stay in the turn while recovering I wouldn't be writing this today. As I came over the cleared target area, pulling in buffet, and finally had the flight path directed above the ground, I was looking up at the tree tops that surrounded it. This is a successful recovery procedure.
Comment: yikes!  sounds scary.
Answer: It may help you to understand the situation if you consider this-- imagine that you trimmed the glider for a moderately fast glide-- like perhaps 60 or 70 knots.  Now without exerting any forward or aft pressure on the stick, slowly roll the glider into a steep bank-- perhaps 45 or 50 degrees.  You'll find the airspeed rapidly increases as the glider enters a spiral dive.  This is partly due to the fact that for any given angle-of-attack, the steady-state airspeed is proportional to the square root of the load factor, and banking increases the load factor.  This is also partly due to the fact that an aircraft-- especially a relatively slow-flying aircraft like a glider-- tends to trim to a lower angle-of-attack in turning flight than in linear flight, due to aerodynamic effects generated by the curvature of the flight path.
Once the glider has entered the spiral dive, you'll find that simply rolling the wings back to level is sufficient to make the flight path start curving up out of the dive toward the trajectory associated with the original trim speed-- even if you exert no aft pressure on the control stick at all.  The reason for this is that as long as the glider retains some of the excess speed associated with the spiral dive, the wing is generating too much lift to allow the flight path to simply continue in a straight line on a diving trajectory.
Conversely, if you've ever practiced taking your hands completely off the control stick and controlling the aircraft via rudder inputs only, so that you are not making any pitch inputs at all, you've noticed that the rudder has a roll effect, and you've also noticed that the nose tends to rise as you roll towards wings-level, and tends to descend as you roll toward a steeper bank angle.
So it's clear that simply decreasing the bank angle, without pulling the stick aft at all, is sufficient to allow the aircraft to eventually recover from a spiral dive.  On the other hand, as other answers have noted, if the bank angle gets steep enough, then pulling the stick aft without decreasing the bank angle will not bring the nose up toward the horizon.
Comment: Potential future ASE question-- something along the lines of-- how to compute the exact combination of bank angle and trimmed airspeed at which moving the stick aft no longer brings the nose up relative to the horizon--


Is it okay to post products and ask which one is better?

Question: I want to buy a violin and there's none to advise me. I searched through the Internet. Read a lot and concluded on some products. Is it okay if I post them and ask for an opinion? They are online products. I'm desperate for help.
Answer: I'm afraid not - this site is not a comparison site or a shopping recommendation site. In fact we have that as an explicit close reason in our off topic section. Please read our help pages for info.
Comment: @noobmaster69 You can always word and shape your question to something that will be useful to many, like talk about woods, tone, action, materials, etc. Simply asking "which brand is better" is subjective and not very useful, but specific objective sound and music dynamics are the actual important part of your choice, and can be very useful to future readers.
Comment: @noobmaster69 try YouTube videos instead for violin reviews. You might also stumble upon "interesting" videos demonstrating the difference between cheap violins and expensive violins, in which you might not even hear/distinguish the difference.
Comment: I'd probably go to google, but realistically, if you are buying over the internet, the most important thing is how much you trust the seller. Not much point getting people to opine on pictures or descriptions without seeing the instrument in person, as they could be faked. The few instruments I have bought online, I made sure I had a no quibble return policy.
Comment: can you recommend some forum to ask help?
Comment: I want to know which violin produces better sound. I am a beginner and don't trust my judgment. Is there any forum where I can ask them providing some demo videos of the products?
Comment: I don't know - google is a much better place to search for that sort of thing.


Help in understanding line and surface integrals.

Question: I've been trying to teach myself a few modules of my university course in preparation before I start and I'm currently attempting some Vector Calculus, but I'm finding it much more difficult to grasp than previous modules. I was beginning to think I was getting the hang of it until I came across the question below.

The closed curve $C$ in the $z=0$ plane consists of the arc of the
  parabola $y^2=4ax$ $(a>0)$ between the points $(a,±2a)$ and the
  straight line joining $(a, ∓2a)$. The area enclosed by $C$ is $A$.
  Show, by calculating the integrals explicitly, that
  $$\int_C(x^2y\,\mathrm d\mkern1mu x + xy^2\,\mathrm d\mkern1mu
 y)=\int_A(y^2−x^2)\,\mathrm d\mkern1mu A=\frac{104}{105}a^4$$ where
  $C$ is traversed anticlockwise.

Apologies if my attempts here are laughable, at the moment I'm just trying to familiarise myself with a few of the concepts so that I'll have already met it when it comes to studying it in my course. As a result of this I'm rushing quite quickly through the topic and not worrying so much about my understanding of 'why' but just trying to compute a few answers. It's likely that I'll throw around some incorrect terms here and there, this is just so that people can see my thought process.
What I'm having issues with:
For $\int_C(x^2y\,\mathrm d\mkern1mu x + xy^2\,\mathrm d\mkern1muy)$ I thought what we could do is use the line integral formula $\int_{C} \mathbf f\cdot d\mathbf r = \int_{t_0}^{t_1} \mathbf f(\mathbf r)\cdot \mathbf r'(t)\ dt$, with the parametrisation ${\bf r}(t)=(\frac{t^2}{4a},t)$ we have $\int^{2a}_{-2a}(x^2y,xy^2)\cdot (\frac t{2a},1) dt$ which when we substitute in $t$ for $x$ and $y$ and evaluate the integral I get something like $\frac{152}{35}a^4$ which is clearly wrong. I doubt highly that I've made an arithmetic error, it's far more likely that I've fundamentally misunderstood and got mixed up, so apologies for that.
I get $\int_A(y^2−x^2)\,\mathrm d\mkern1mu A=\int^{2a}_{-2a}\int^{\frac{y^2}{4a}}_0(y^2-x^2) \mathrm d\mkern1mux \mathrm d\mkern1muy$ and I won't even bother going further becuase I know this is already wrong.

My question (finally): Answer the original question, but also if
  possible give criticism of my attempts, why am I wrong, what have I
  mixed up, where would my answer be right? I'm also unclear as to what the last line of the question is saying "where $C$ is traversed anticlockwise" (I have an idea of what this could mean, but not why it would ever affect an answer).

Apologies again for my embarrassing attempts (thankfully this is anonymous), I know it's a big ask, (essentially reteach me an entire topic) so any input is appreciated.
Thank you
Answer: There is nothing to be ashamed about here. You are trying to learn something on your own and got pretty close. The only mistake you made was in the interpretation of what you were already given. If you take a function $f = (f^1,f^2)$ and $c(t) = (x = x(t), y = y(t))$ and let $C$ be some curve over which the line integral makes sense and parametrized over $[a,b]$ then;
$$\int_C f \cdot ds = \int_{t=a}^b \langle f^1(c(t)),f^2(c(t))\rangle \cdot \langle x'(t),y'(t) \rangle = \int_{t=a}^b \left(f^1(c(t)) x'(t) + f^2(c(t)) y'(t)\right) \ dt  = \int_C  f^1 dx + f^2 dy$$
So the form of the line integral you have is the same as the standard one. What you have to plug in for $x,y$ are the parametrized coordinate functions in $r(t)$ and $dx,dy$ just means take the derivatives of these coordinate functions. To not deprive you of the problem, I just did a few computations to show you what I mean. I hope this helps.
$$\\$$
$(1)$ You have $r(t) = \left(x = \dfrac{t^2}{4a},y=t\right)$ where $t \in [-2a,2a]$
$(2)$ Then $dx = \dfrac{t}{2a}$, $dy = 1$ and $x^2y = \dfrac{t^6}{16a^2}$, $xy^2 = \dfrac{t^4}{4a} $
Comment: Thanks for the response. Sorry I'm going to continue to be an idiot here, but I can't see the difference between our approaches.  I had $\int^{2a}_{-2a}(x^2y,y^2x)\cdot (\frac t{2a},1)dt$ which when we substitute in $t$ we get $\int^{2a}_{-2a}(\frac{t^6}{16a^2},\frac{t^4}{4a})\cdot (\frac t{2a},1)dt$ Surely this is also what you're suggesting would yield? Any thoughts on the other integral?


Create customized "block" in Mosaico

Question: My website is on Drupal.
We have preformatted Mosaico templates with header (view in your browser) and footer (social media buttons, organizational address, and unsubcribe options) in English.
HOWEVER, we do many identical mailings in 3 languages. It is simplest to copy the English mailing, then switch out the text to French and Spanish, rather than recreate the mailing from scratch using a French or Spanish.
But, this means i have to copy and paste French or Spanish text into the header and footer EVERY time.
It seems to me I should be able to save a custom block with my footer in Fr and another with footer in Sp to drop into a mailing.
But how?
(Or, another solution to my problem, I guess, would be a better photo gallery, so I could just use the "make a french template" option. The absolutely wretchedness of the ridiculously inadequate photo gallery is part 1 of what makes me choose copying and pasting all the fr and sp text into the original english draft so as not to have to deal with photos again, rather than recreating a draft on a Fr or Sp template. How does this program have the worst photo gallery imaginable? Part 2 is the huge amount of white space in the template that makes it impossible to see the end of a long link. [the number of times I've sent a messed up link because I can't see what I've pasted there...(fist shaking)!!])
Comment: I am curious: did you do the extension or did you follow the recommendation of @ChumKui? Can you post here your solution? So it might be useful to me and others.
Comment: My technical skills are low so I did not try configuring anything myself. I have started using the traditional templates more. A developer configured the header and footer sections with required tokens in all 3 languages, so that has simplified that part.
Answer: It is possible to define custom blocks to mosaico templates. To do this, you have to create an extension that provides a custom base template and implements the hook_civicrm_mosaicoBaseTemplates hook to register your template. In your custom base templates you can define custom blocks. I found these tutorials useful for understanding how the mosaico blocks work.

https://github.com/voidlabs/mosaico/blob/master/templates/tutorial/mosaico-tutorial.md
https://github.com/voidlabs/mosaico/wiki/Template-language

I think you should start creating your base templates from the one you are currently using. So copy it to your extension. Then edit the html file, duplicate the header and footer blocks, rename them to prevent issues from the duplicated block names. In the duplicates you can add text in different languages. Repeat from the duplication for the third language. Now you have the blocks, but the thumbnail images are missing for them. There is a script in the versafix template repo that could be used for generating the thumbnails for your template. This script needs to be modified a little bit, but you can execute it to generate the images for your template. The generated main image for your custom template could be too similar to the main image of template that you copied before. For making them distinguishable you can add a watermark or some text to the generated image called _full.png
Comment: Creating your own blocks is not for the fainthearted - take a look at this blog post by ArfulRobot: https://artfulrobot.uk/blog/adding-custom-block-mosaico-email-editor-civicrm#comment-4252 . You can avoid using an extension by copying an existing template into your mosaico_tpl folder.  See post here: https://civicrm.stackexchange.com/a/42288/6361

Create customized "block" in Mosaico


The SE blog is missing an image

Question: A little embarrassing; the blog post about the "new image uploader" has a missing image:
Comment: Haha, that's quite ironic :D
Comment: Ever since we moved to a new blogging platform we've had broken images. The best way to raise the issue, I think, is to [submit a pull request](https://github.com/StackExchange/stack-blog/pulls).
Comment: @JonEricson is there a helpful tutorial for that anywhere?
Comment: [GitHub help](https://help.github.com/articles/creating-a-pull-request/) might be helpful for you. You'll need to [create a fork](https://help.github.com/articles/about-forks/) first. Or [create an issue](https://github.com/StackExchange/stack-blog/issues) if you prefer. (Pulls requests are more likely to be acted upon, I suspect.)
Answer: I have submitted a pull request to add this image again. The image doesn't seem to have been copied from the old platform, so I just got it from the Wayback Machine.
https://github.com/StackExchange/stack-blog/pull/198
Answer: I just did a mass migration of all of our old blog assets, this should be fixed now.

The SE blog is missing an image


Restrict Which Node a Jenkins Job can be Run On, but only allow this field to be modified by Administrator

Question: I know that you can restrict where a project is run, by filling in that field in in a Job. I was hoping to find a way to allow individual users who have configuration access to the job to still be able to edit the rest of the job, but to remove this field from their view. I would like only the System Administrator to be able to modify it. The reason for doing this is we currently have a number of nodes set up that are tied to individual users and I want to prevent one user from running on another user's node (aka running as the other user), but I still want the user to be able to change other parts of their job.
Comment: Are you afraid that they'll do it on purpose or by accident?
Answer: As much as i know the security system, you can just allow all user to edit the job, or allow specific users to edit the job.
once you can edit the job, you can edit all of the fields available and there is no way to restrict specific configuration value.
I think letting all users edit jobs permission is not a good practice, and if i had to let all users have some kind of control it would be using parameters that you can add.
Comment: Thanks for the quick response. We've found through our initial trial with a sub-set of our team that let the users edit their own jobs has been very beneficial in terms of them coming up with improvements as well as buying into the utility of Jenkins as a whole. If we have to lock down the entire job, then maybe we'll go down that route, but I'm still hoping to avoid it. Thanks again


Telepathy for Humans

Question: So, I want to give my good-aligned human Telepath Psion a Mindsight, for which I need to give him a Telepathy special quality first, but the Mind's Eye (and every other non-printed-rules-source) was banned from use in our game. Are there any meanings of achieving that Telrepathy ability without giving up the alignment or getting into a horrid cascade of multiple classes/prestige classes?
Answer: The Shedu Crown soulmeld (Magic of Incarnum) grants the ability to "communicate telepathically" when bound to the Crown chakra.
Potential problem: The name of the ability is not "Telepathy", as soulmeld-granted abilities do not have specific names. Regardless, the reader will see that this is precisely the ability described by under Telepathy.
This can be accessed by either using two feats (Shape Soulmeld and Open Least Chakra) or a two-level dip in the Incarnate class. Too bad that the Mind's Eye is not allowed, as the Soul Manifester prestige class can be made quite useful. Still, there is some synergy between meldshaping and psionics through feats such as Midnight Augmentation.
Note: The Soulspeaker Circlet bound to the Throat chakra grants the same ability, but with a shorter range unless significant amounts of essentia are invested. It is less suitable for dips and/or dabbling.
Comment: So, without Mind's Eye its either to lose several Psion levels on dip or losing the alignment for prc, huh... Well, thank you anyway 8)
Comment: No, you *can* use the feats! Expensive too, but you don't need to lose manifester levels.
Comment: Oh, I see. Gotta ask my DM bout those, they look bit weird, but at least It's something. Thanks again 8)
Answer:
Take one level of Mindbender (Complete Arcane PrC), if adaptation authorized - gives you telepathy 100 feet  at level 1.

Take Psicrystal Affinity - you'll have a psicrystal that'll get feats - give him Mindsight - enjoy! (Your DM'll have to rule that psicrystal get feats, though... much debated...)

Convince your DM to let you become a Crystal Master (Mind's Eye Prc: Link) - and get the "Malachite embeded gem": "Malachite: The crystal master gains a limited telepathy. She can communicate telepathically with any creatures that speak a language that she speaks, provided they are within 30 feet. This range increases by 10 feet for each additional imbedded gem. She can address multiple creatures at once telepathically, although maintaining a telepathic conversation with more than one creature at a time is just as difficult as simultaneously speaking and listening to multiple people at the same time."

Telepathy for Humans


Normalization question in VQLS

Question: I was studying VQLS in https://qiskit.org/textbook/ch-paper-implementations/vqls.html and run into the following normalization during the cost calculation.  It says if $ |\Phi\rangle$ has a small norm.  but, how come?  I thought all vectors are unit vectors.  Could you explain why we need the normalization factor? I think I missed something.  Thanks
Answer: This is due to how the $\mathbf{A}$ matrix was defined; from that same tutorial page we have:
$$\tag{1}
\mathbf{A} = \sum_{n} c_n A_n
$$
where each $A_n$ is unitary and $c_n$ is complex (and in the original VQLS paper they further impose $\lVert {\mathbf{A}}\rVert<1$ and bounded condition number) but $\mathbf{A}$ is never required to be unitary. Therefore, L2 norm isn't necessarily preserved under the action of this matrix and so a state like $|\Phi\rangle =\mathbf{A}|\psi\rangle$ may not be normalized.
Comment: Thanks.   That was a missing piece.
Answer: In a similar way to how the global phase difference of a state makes no physical difference, neither does amplitude of a state. We normalise states to have unit magnitude for mathematical convenience in the same way we don't carry around an $e^{i\phi}$ factor for arbitrary $\phi$ with all our states. This is because having unit vectors means we don't need to include normalisation in the Born rule. Here adding the normalisation is a way of making the cost function independent of amplitude so that you can find the global minimum of the cost function with respect to $|\Phi\rangle$ as opposed to having to find the minimum under the constraint that $|\Phi\rangle$ has unit magnitude using Lagrange multipliers. Doing so makes the minimisation mildly easier because you can just differentiate the cost with respect to the coefficients of $|\Phi\rangle$ given some orthonormal basis. That said both will give the same answer providing you normalise at the end.
In fact, in physics, there are a few situations such as infinite plane waves where one does not normalise the magnitude of the state to one. That said I do not know of any such situations in quantum computing as far as my education in the subject goes.
Comment: @ Chris Long , Thanks but I am confused that $\langle\Psi|\Psi\rangle$ is 1 by definition isn't it?  Quantum state is always normalized 1 and unitary transformation doesn't change the norm.
Comment: No we set $\langle\Psi|\Psi\rangle=1$ becaus eit makes the probability rules simpler, you can use $\langle\Psi|\Psi\rangle=a$ for any real positive non-zero $a$ and unitaries will still not change the norm and all of quantum mechanics still works just you need to divide all the probabilities you calculated by $a$ so it is just easier to set $a=1$ but in this case it is easier to let $a$ vary in the minimisation and then set $a=1$ after.

Normalization question in VQLS


Telling a child about a playmate's death

Question: My grandson is 4 1/2.  My family attends a small church so all the families are fairly close to each other.  This weekend, one family lost their 8 year old son in a drowning accident.  My daughter would like some advice about informing her son about the death of his playmate.  Of course she should tell the truth in a simple fashion.  Are there landmines out there to avoid?  Certainly when the 8 year old isn't in Sunday School anymore, or running about after service or at any of our events, the issue will come up.  Should she wait till he asks or should she prepare him?
Comment: It sounds like the family are Christian, considering they go to church together. Is the child being raised within the faith?

If so, it would be wise to incorporate that in an answer.
Answer: It's absolutely tragic to have a child die.
Your daughter should tell her son asap that the 8-year-old child has died.  Yes, it's hard to have that conversation, because there's no easy way to talk about a child dying.
For a 4½-year-old, I would recommend that you tell your grandson that the child was involved in an accident and died.
Be prepared to explain what death is, and avoid things like "he's sleeping."  You can explain that while we are alive our heart beats, we breathe, and we need to eat and drink because food is fuel for our bodies.
A concrete explanation of death could be a simple statement how this 8-year-old was in an accident that caused his heart to stop beating.
Death is a natural part of life, and be prepared to reassure your grandson that you and your daughter are going to be alive for a long time.
From there I think your grandson will have questions, and I would suggest that you not give details about the accident other than general info like it happened at the lake.
Lastly, include a discussion about your feelings about the death of this child and death in general, and explain that after a death people have different ways of showing their sadness and grief, and that it's okay for him and other children to feel sad and also to run and play and have fun.
Comment: In my experience, at the age of 4 - 5, a child doesn't really care for long explanations about what death is, except for the concrete consequences, if I may be so crude: his friend is no longer there and is not coming back, and the fact that everybody is feeling very sad.
Comment: @j4nd3r53n I lost a sister when I was 3 and can verify that, at least at age 3, concrete consequences are all that I cared about. I was upset to have lost my playmate.
Comment: Thanks for your answer.  I liked the bit about "and also to run and play and have fun."   As a kid, my emotions were never validated and I tried to make sure my kids and grandkids knew it was OK to be sad and mad.
Comment: As a religious  person with a child this age (just turned 5), we have explained death simply as follows: "There was an accident that hurt her body, and that made her body stop working. It doesn't work anymore so she has gone to be with Jesus in heaven instead. We won't be able to see her anymore because she is in heaven with Jesus and he is looking after her. " I emphasize that the accident caused her death (ie it's not random chance otherwise the child worries it'll happen to them too out of the blue) and i emphasize we won't be able to see them again, but they are OK and being looked after.
Comment: Every child's response will be different.  We made sure mom, dad, and children were all together to discuss and support each other, and I think that is what is important.  My almost 5 year old boy made it clear he no longer wants to discuss it because it made him sad and carried on as usual.  My 7yr old daughter was not functional for 24 hours and it took a good week to return to normal, we even involved her teacher for support.  The oldest grieved during the discussion but she didn't show much outwardly after that. This was after a premature birth and loss, not quite a playmate.
Comment: @j4nd3r53n I actually realised the concept of "death" when I was that age (without anyone explaining it to me). In short: I cried.
Answer: The question is important, and i think that the kid should be the first who asks.
If kid not ask - he has no need. If he has no need - he have no thought. If he has no thoughts about this - why he need this injury information?
But i think that the most likely the mom will create situation and provoke the kid to ask. But it is less problem.
The ability to ask important questions is only good, that can be learned from this bad case.
And also better, then all of the words, if he ask, to go at the dead-kid grave and to tell that the body of the boy is there in the earth, but his soul(as i understand you go in Church school) with God(?) So, you don't have to create more drama that this tragedy is already has all the content, answer him straight and truthfully but only when he will ask. And better do it - show it, bring the flowers, say good last words on the grave. Maybe he can art something for mark the end of friend earthly life story.
But only if he ask and if he want to do this, if it is important for him.
If it is not important for him  - he not need this information yet.
Comment: If you wait for the kid to ask, you give up all control over when, where and with whom that conversation takes place.
Comment: **Comments have been [moved to chat](https://chat.stackexchange.com/rooms/147082/discussion-on-answer-by--telling-a-child-about-a-playmates-death); please do not continue the discussion here.** Before posting a comment below this one, please review the [purposes of comments](/help/privileges/comment). Comments that do not request clarification or suggest improvements usually belong as an [answer](/help/how-to-answer), on [meta], or in [chat]. Comments continuing discussion may be removed.


Can you roast vegetables before freezing instead of blanching?

Question: I don't like the texture of green beans after blanching and freezing, I'd like to know if you can roast them in the oven instead of blanching.
Answer: Yes you can, however they will suffer the same problems with texture as you find with the blanched beans. This is because it is the cooking part that is affecting the texture, not the freezing.
You can also freeze green-beans fresh without blanching. All you need to do is rinse, slice (if you like), then freeze. They may change color when cooked after thawing to a more brownish green, but the texture is less mushy in my opinion.
Comment: do you mean "it is the freezing part that is affecting the texture, not the cooking"?
Comment: No - the cooking breaks down the cell wall and makes them soft. Freezing does this too to some extent, but it depends on how fast they freeze and a few other things. Blanching is primarily about preserving color - it is par-cooking essentially, so when you pull them out of the freezer and then re-cook they go soft because they have been partially cooked already.


Is my Roland FP-7F keyboard touch sensitive?

Question: My piano teacher asked me if my keyboard can play soft with my left hand and harder with my right. I am not so sure I can do that. Must I buy a piano?
Comment: Simple check is to turn it on, and play a note or two gently, then getting more forceful. If the sound gets louder, it's touch sensitive, but in a different way from an acoustic piano. Ideally, your teacher should try your piano for himself.
Answer: It sounds like your teacher wants a touch sensitive piano. This means the volume and timbre change depending on how hard you play the keys.
I have access to a FP-7F, and it's definitely touch sensitive. Whilst a real piano is nice, the FP-7F should be fine for your needs.


"You have too many pending edits"

Question: I know what this means, but it has been like that for about 24 hours. Only once one of my edits was acknowledged, and then this message again. Are there so many pending edits that people are not being able to check them?
Comment: I just approved a number of your edits, but I think it takes 3 people for the edits to be final.
Comment: @ArturMeinild it takes two to 'approve' or two to 'reject', or one to 'improve' or one 'reject and edit'. If there are 3 reviewers it means there was disagreement.
Comment: @Zanna thanks for clearing that up
Comment: Thanks @ArturMeinild & Zanna
Comment: I also approved one of your edits today to an answer I posted to a question yesterday. It didn't take long for it to be applied and thanks for your formatting input
Comment: Thank you @graham
Answer: Sorry about that. Suggested edits to be reviewed used to show up much more prominently in the top bar. Grumble grumble, back in my day, etc etc. We keep having this problem. I'm not sure how to solve it. Please do become a prolific reviewer of Suggested Edits once you earn the privilege ;)
By the way...

I rejected that. Please don't remove the link text entirely. Keep it as alt text if it is not needed or replace it with something more informative. Also make images links with this syntax:
<code>[![alt text here][1]][1]
</code>
Answer: I completely agree with @Zanna's answer and rejection reason for your edit (I also rejected the edit for the same reason).
I would like to make clear, though, that the reason why you got the message "You have too many pending edits" is not that the Suggested edits review queue is full. It's almost empty right now actually and in quite good shape in terms of edits waiting for review.
The real reason that you got the message is because a user with less than 2000 rep (i.e. without editing privileges) can only suggest up to 5 edits at any given time. So, if you have 5 edits pending review and try to suggest another one, you will get the message. If then one of your suggested edits gets reviewed, you will be able to suggest another edit, but if you try to suggest one more you will get the same message again, because your pending edits are already 5. In other words, it's like a personal queue, unrelated to the number of posts waiting for review in the Suggested edits queue.
Finally, keep in mind that the reason for some delays in reviews of suggested edits can be attributed to the time difference, which is of course related to the fact that not many people participate in the review queues.

"You have too many pending edits"


How do we determine the common ancestor of a species?

Question: I have seen a lot of articles about common ancestors. But I didn't find any perfect articles that said about the evidence of common ancestor.
Comment: What is your actual question? If you have read up on the subject what specifically do you not understand?
Comment: https://www.khanacademy.org/science/high-school-biology/hs-evolution/hs-phylogeny/a/phylogenetic-trees
Comment: What do you define perfect? Are you speaking about making phylogenetic trees or about the theory of evolution in general? If about the later, it is a theory (so no definitive proof) but with a lot of supporting data and biological value. As far as I remember this site does not try to convince about that theory, there is enough material online
Answer: The most definitive conclusions about the common ancestor are made by comparing genetic sequences of the organisms, for which well developed mathematical/computational methods exist, see, e.g., Inferring Phylogenies or An introduction to molecular evolution and phylogenetics.
For distant species the genomes are rarely directly comparable, so that some ambiguities can exist. Therefore the existing tree of life and species classification are based on comparison of the ribosomal RNA, which is believed to be rather conserved:
<code>rRNA is one of only a few gene products present in all cells. For this reason,
genes that encode the rRNA (rDNA) are sequenced to identify an organism's
taxonomic group, calculate related groups, and estimate rates of species
divergence. As a result, many thousands of rRNA sequences are known and stored in
specialized databases such as RDP-II and SILVA.
</code>
Note that this still leaves out the viruses, which are acellular and therefore do not have theor own rRNA.
Comment: Thank you so much.


Are there any statements in ancient Jewish literature that refer to the dead as being like angels?

Question: Are there any statements in ancient Jewish literature that refer to the dead as being like angels?
Comment: Enoch is said to have become an angel in some writings, though per those same writings he never died. Elijah seems to be treated like an angel in some naratives as well, receiving the angelic equivalent of lashes, but according to tradition he didn't die either. It looks like people can become [like?] angels, but as far as I know, not once they have died.
Comment: In one of the books of the Maccabees, the prophet Jeremiah appears as an angel and gives someone a sword. Does that count?
Comment: @Aaron Counts for me!
Answer: Angels are beings that are created for a specific purpose. People are created with free will and establish their own level. This concept is discussed in a number of questions such as What is the purpose of life on this earth and Is free will limited to humans? and  Jewish concept of angels and Is free will limited to humans? and Sources for free will of angels
I put the word and between each link so that you can see that they are separate.
However, this only applies to while people are alive. After death, they can no longer perform mitzvos and they have established the level at which they will exist for eternity. This is one of the concepts of "reward and punishment". Thus, after a person dies, they no longer have the ability to change (like angels), but they are not as "robotic" as angels which were created for a specific task and only exist as long as that task has not yet been completed.
Comment: Are there any statements in ancient Jewish literature that refer to the dead as being like angels?


What action can be taken on a B2B portal which collects upfront import fees

Question: What action can be taken on a B2B portal which collects upfront import fees through their courier service providers to a country which does not impose any import fees for importers. The worst thing is that they are collecting from buyers behalf and paying to the customs department at origin which is not true!
Answer: Duties and Fees are not the same thing
Duties are levied by states on imports. Fees are charged for providing a service. I can charge you a fee for importing a product irrespective of if I have to pay duty or not.


Between the half-orc's Savage Attacks trait and the Elven Accuracy racial feat, which is better?

Question: In a mathematical comparison of the Half-Orc Savage Attacks trait and the Elf/Half-Elf feat Elven Accuracy (XGtE, p. 74), which one increases average damage more at level 10 for a Fighter-Champion 5 / Warlock 5?
The Monster Manual (p.245) has a specific section about Orc Crossbreeds. It states that:

. . . they readily crossbreed with other races. When an orc procreates
  with a non-orc humanoid of similar size and stature . . . the
  resulting child is either an orc or a half-orc.

As a result it is forbidden to have a character that is half-orc/half-elf, as such a child would simply be a half-orc and use those rules as written. Therefore only one of the following benefits would be achievable via race (RAW).
The description of Savage Attacks says:

When you score a critical hit with a melee weapon attack, you can roll
  one of the weapon's damage dice one additional time and add it to the
  extra damage of the critical hit.

The description of Elven Accuracy says:

Increase your Dexterity, Intelligence, Wisdom, or Charisma score by
  1, to a maximum of 20.
Whenever you have advantage on an attack roll using Dexterity,
  Intelligence, Wisdom, or Charisma, you can reroll one of the dice
  once.

I would like a mathematical comparison of these two situations at level 10:
A Half-Orc Champion 5 / Warlock 5 using a Greataxe +1 (1d12 Slashing +1) as a weapon with a +4 bonus from Str. This character benefits from Savage Attacks and the Great Weapon Fighting fighting style from Fighter level 2.
A Half-Elf Champion 5 / Warlock 5 using a Rapier +1 (1d8 Piercing +1) as a weapon with a +4 bonus from Dex. This character received the Elven Accuracy feat at level 4 and the Dueling fighting style from Fighter level 2.
In both cases:

The character can Critical Hit on a 19-20 due to the archetype ability for Champion at 3rd level.
The character can attack twice per Attack Action from Extra Attack at fighter level 5.
The character has advantage (on average) for 50% of their attacks. (If you need a reason, they are within 5' of their prone target, or they are attacking a target their Barbarian/Path of the Totem Warrior - Wolf at level 3 - ally is within 5' of, or they have Darkvision 60' as per their race and they are attacking a target in non-magical darkness who is Blinded due to a lack of Darkvision - take your pick.)
The target is subject to the Warlock Spell Hex which causes an extra 1d6 necrotic damage on hit.
The target is Challenge 10 and has 16 AC.

My preliminary analysis is that the former hits much harder on Critical hits, with the ability to re-roll damage dice due to both Savage Attacks and Great Weapon Fighting. They also do a lot more damage on non-crits due to having larger damage dice.
With the latter scenario they do less damage and are unable to re-roll damage dice but crit much more often, because they can roll three d20s on advantage instead of two.
I am also curious about two similar situations: a critical range of 18-20, or a 1d10 finesse weapon (as mentioned in comments).
I would really enjoy an analysis similar to what was provided here: Does the Resilient (Con) feat or the War Caster feat most improve the chances of maintaining concentration?
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/107750/discussion-on-question-by-nalgarryn-between-the-half-orcs-savage-attacks-trait).
Answer: Fighter/Champion level 3 (critical on 19-20)
Savage Attacker is better because elves/half-elves can't take a feat until they get an Ability Score Improvement at 4th level.
Fighter/Champion level 15 (critical on 18-20)
As described using a Heavy weapon, Savage Attacker is better because Heavy weapons do not use Dexterity, Intelligence, Wisdom, or Charisma and cannot benefit from Elven Accuracy.
However, if you want to compare the best GWF weapon (1d12) with the best finesse or ranged weapon (1d8) then Savage Attacker is clearly better unless the attack has advantage because Elvan Accuracy doesn't work unless it has advantage.  It's also better when there is advantage. How much better?  Assuming an AC of 18 (normal for a CR15 creature) and a +10 to hit (+5 proficiency, +5 stat bonus):
\$
\begin{array}{c|c|c}
\text {Expected Damage}& \text{Disadvantage} & \text{Normal} & \text{Advantage} \\
\hline
\text{Savage Attacker} & 3.50 & 7.11 & 10.72\\
\text{Elvan Accuracy} & 2.00 & 3.60 & 6.04\\
\end{array}
\$
Fighter/Champion level 15 (critical on 18-20)/ Warlock 5 (Hexblade w/- Pact of the Blade)
Now we can benefit from GWF and Elvan Accuracy at the same time. We can use the same program because even though the proficiency is now +6, CR20 monsters have 19 AC.
\$
\begin{array}{c|c|c}
\text {Expected Damage}& \text{Disadvantage} & \text{Normal} & \text{Advantage} \\
\hline
\text{Savage Attacker} & 5.13 & 10.43 & 15.73\\
\text{Elvan Accuracy} & 4.89 & 8.79 & 14.75\\
\end{array}
\$
Savage Attacker is still better.


Image Capture and CanoScan 8800F

Question: I have discovered, through personal experience and checking online forums, that the software for my 10-year old, CanoScan 8800f, film and negative scanner is no longer supported for High Sierra users.  Users of this particular scanner, a wonderful workhorse, are furious.  I know that one solution is to purchase VueScan software for about $50.  I have seen that another solution would be to find an open-source driver.
As I continued my search for an answer, someone noted that scanners should work with Image Capture, but Image Capture does not recognize this scanner.  Further searching revealed (and I hope I have this right) that Image Capture does not "see" this scanner because the scanner is not TWAIN-compliant. Is there some way I can make this scanner TWAIN-compliant?
Comment: That site scares the pants off of me!  The English is so bad that Canon would never allow it to stand.  Examples:  "See Impossible", "88oo" with the letter "o" instead of 8800, with zeros.  "keeping the CanoScan 8800F up-to-date is important and really should participate your company's regular printing device maintenance."  Not for me, mate, thank you very much.
Answer: I have been using VueScan with my Epson slide scanner, with better results than the rather ropey SW that came with it.
50 bucks isn't much, and you can try it first for free to at least see if it will work with your scanner at all.
Otherwise, I can only wish you luck (I'm no HW or SW expert…).
Comment: Thanks, Ciel. My search for updated drivers/software for my 8800F proved fruitless and I have purchased a factory-refurbished Epson for $50.  If I don't like it, I'll return it and pay the $50 for VueScan.  Thanks for chiming in with help.

Image Capture and CanoScan 8800F


Cannot adjust headphone volume under XPS 17

Question: I am running Ubuntu 11.10 under a Dell XPS 17 machine, I cannot adjust the headphone using the master volume control. It's either muted or the loudest. I have to use AlsaMixer to lower the loudest volume to make the headphone usable.
Answer: You're using the SPID digital output instead of the analog output. In your Dell XPS, you have three audio ports. One for Line-in/Mic, a second for SPID audio and the third for analog audio. Use the Analog audio port and under the Audio settings (Output Tab), select Analog Speakers or alike and not Headphones!
Answer: This is another workaround.
When you plug your headphones in the analog port. You will get no sound at all. Then,
Click the orange Fn (function) on your keyboard + the orange button with a crossed speaker in order to mute the sound, and finally again Fn + orange crossed speaker button, in order to unmute the sound. It's faster than opening the sound settings and selecting ANALOG SPEAKERS.
Comment: this works also on dell xps 15 (L502x), thanks a lot.
Answer: Go to the sound preferences in the system settings window and select the output tab.
Make sure you selected the "Analog speakers" at the bottom instead of "Analog headphone", even though you're using headphones. This was the solution on my XPS 17.
And ofcourse, make sure nothing else is muted :).


compiler-optimization for numerical stability

Question: do GCC or similar compilers perform optimizations that are aimed at improving the numerical stability of floating-point operations.
It is known that seemingly simply operations like addition or computing the norm of a vector are numerically unstable if implemented in the obvious manner, and, on the other hand, compilers sometimes destroy work-arounds for these problems for the sake of speed optimization.
What is the state of the art of optimizing compiler output for numerical stable computation? Anything better than pending?
Answer: Oracle (formerly Sun) compilers for Linux and Solaris.
Their C++ and Fortran compilers have support for Interval Arithmetics


Use both differencing and normalization in time series modeling to make it stationary?

Question: I am working on a time series dataset. Should we use both differencing and normalizing or either of the ones to make it stationary?
Answer: Normalization does not stationarize a time series, as by definition, a non-stationary process has time-variant unconditional joint probability distributions - this implies that the mean and variance changes over time.
To see this for yourself, try computing the mean and standard deviation then normalizing the first half of the time series. Keep these estimates and transform the remaining half, and the resulting time series is still non-stationary.
Differencing $K$ times is a common method of stationarizing time series if it is integrated of order K, $I(K)$, and usually works in practice. However, note that stationarity implies $I(0)$ but the converse is not necessarily true.