Why aren't there attempts to evolve classical musical instruments so that they're easier to play?

Question: Roughly speaking, it takes anywhere between 5 and 15 years to become proficient in one of the classical music instruments, making it a very difficult skill for most of us.
But why not try and make music easier to play, similar to how cars evolved over time to make it easier to drive? As far as I can tell, instruments such as the piano haven't changed too much in the past 100 years, as even electronic pianos require about the same skills as their heavy wooden counterparts. Likewise the guitar looks about the same, with no attempts to make it more beginner-friendly. Even musical notation hasn't changed too much, requiring hundreds of hours of studying, even though we could now put a giant touch-screen display in front of every music player instead of being restricted to sheets of paper.
Or perhaps I'm wrong and there are indeed attempts to simplify musical instruments?
Comment: In the late 1800s, piano playing got simplified to the point that if one wanted to play a song for someone, all one had to do was go the the store, buy a roll, take it home, load it on the piano, and start pumping the foot pedals until the song was done and the roll was rewound.  Now you can simply select a song from a streaming service, click "play", and enjoy.  How much easier do you want?
Comment: Not enough rep to answer but the key isn't easier playing instruments. You can program any computerized keyboard to play Bach by hitting one key. Or by hitting the same key multiple times at the right intervals. Or by hitting some number of keys in the right order and at the right times (the normal way). The problem isn't the instrument, it's the amount of effort you want to put into it. If you want a generic instrument, a piano doesn't get much easier to play. Playing the notes in the right order and at the right times are what makes a song easy or hard to play.
Comment: Define proficient. it takes a few weeks to learn enough guitar to play songs around a campfire.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/101708/discussion-on-question-by-jonathanreez-supports-monica-why-arent-there-attempts).
Comment: Regarding notation, have you heard of Synthesia/Rock Band? It reduces reading to the the level of "place this finger in this spot"
Comment: @supercat Clicking "play" doesn't let you create your own music. In an ideal world there would be a device that reads your brain waves and then plays out the music that you imagine in your head - no instruments required. Obviously technology isn't at that level yet, but there could be intermediate steps.
Comment: As long as putting in 5-15 years of practice leads to a noticeable improvement in the produced music, and there are people willing to put in that amount of time, that's the standard we'll hold musicians to. Even if you make instruments simpler and easier to use, as long as it's possible to play them better and better almost without limit, that's the result.
Answer: Instruments are easier to play than they used to be.
Take intonation, for example. Wind instruments don't play in tune by default. This is not a surprise to any player, or any parent of a junior-school concert band member. That being said, some take more skill to play in tune than others. Typically, modern instruments have better intonation (they are closer to being in tune by default). They still take skill, but you fight the instrument less.
If we go back a year or two (hundred), a lot of work went into the world of wind instruments. Better design, better fingering. Similar efforts still happen today. Time will tell if they catch on.
New instruments are invented all the time. Most of them are forgotten; some survive until now. The piano supplanted the harpsichord for a variety of reasons. Saxophones got snubbed by the orchestra, snuck into marching bands, and then ended up a staple of Jazz. And Kenny G. Ok, bad example. Electric guitars opened up a whole new way to cause tinnitus.
My point is that we do try new things all the time. Each new thing comes with a set of advantages, and disadvantages. Arranger keyboards can play along with you (making it easier to play certain styles), but they also play along with you (making it impossible to play anything else). Plastic reeds for woodwinds last longer and don't dry out, but they don't sound exactly the same as an organic one. Not necessarily worse, but not the same. We use iPads for sheet music. Well, I don't, but there's going to be a couple of them at rehearsal tomorrow night. Recorders are simpler than clarinets, but, well, it's a recorder.
So to answer your question, we do improve and innovate. We simplify. But most changes do not survive; too much compromise, limited benefit, or in the wrong place at the wrong time. Sort of like other art forms. I can paint using Paint. But that's not going to replace the paintbrush any time soon.

As a postscript, the music notation question comes up regularly. I would say we have invented a new sort of notation in the last hundred years; the chord chart (or lead sheet). It's well suited to improvisational styles. But it doesn't replace the conventional system. It solves a different problem. Replacing those five parallel horizontal lines has been attempted many times. I can count the number that succeeded on the fingers of zero hands. It would be like replacing the written spelling of the English language. The Americans got away with dropping the occasional 'u', but imagine changing everything. At the end of the day, why would you?
Comment: For clarity's sake, the recorder thing is an example of humour. It is not intended to be a value judgement on said instrument (or Celine Dion, for that matter). If you want to remove the humour, my point is that simpler is not always better. Sometimes less is less. Recorders have their place. So do clarinets, despite the fact they are more complicated (range, fingering, mechanics, reeds, etc). The recorder is much older. If simplicity was the driving factor, would the clarinet has caught on at all?
Comment: "Electric guitars opened up a whole new way to cause tinnitus" - bah. Electric guitars are practically silent and do not cause tinnitus. Electric guitars AND A STACK OF MARSHALLS, ON THE OTHER HAND...!!!!!!!!!
Comment: I take issue with your statement about recorders and the terrible and pointless video you linked.
Comment: @endorph ...you mis-spelled humor .... oh :p
Comment: "Americans got away with dropping the occasional 'u'" --> Are yo sre?  ;-)
Comment: I'm not sure you meant to imply that recorders are a recent invention.
Comment: The recorder isn't really any simpler than a clarinet, once you get the hang of the reed. Clarinets certainly play in more keys more easily and have a simpler fingering system. I know you meant to be humorous, but it's just not a very good comparison. Clarinets caught on because they sounded like nothing else did and people liked that sound and wanted to use it. Recorders got resurrected for the same reason, really.
Comment: For notation, I am thinking about tablatures that are quite simpler than standard music sheet. Maybe it doesn't apply well to all instrument though...
Comment: I would just like to emphasize the point about fingerings because even now upright bass fingerings are different from those done 20 years ago.
Comment: The written spelling of the English language really SHOULD have been replaced... Music notation is a LOT less ambiguous!
Answer: Here's my armchair-philosophical speculation.
For the purposes of this speculation, I assume that the "difficulty" of playing an instrument means having too much responsibility i.e. freedom relative to the player's capability. And making something "easier" means somehow narrowing the set of responsibilities.
Freedom and responsibility go hand in hand. "You don't have to do x" is very close to "you cannot do x". Artistry is in the area where "you could do x, but you choose not to." If you reduce a person's (musical) responsibility by limiting her possibilities to do (play) "wrong", you limit her freedom at the same time.  The ultimate musical freedom would be something like, create your own world and develop a civilization where there's a culture of music and instrument-making. Think of the possibilities? On the other end of the spectrum, you just listen to existing music made by others and don't have to do / you cannot do anything.
The set of things you can do and things you have to do, define an instrument. Each different set creates its own kind of dynamics or mechanics, things that happen naturally with that instrument, as in "fluid mechanics" vs. "solid mechanics" - different interactions, different phenomena. I guess you're not happy with currently available instruments, and you'd like something with a different set of can-dos and have-to-dos? What would you like to have?
On the violin you're totally responsible for all the pitches, and you can easily play pitches and intervals "out of tune". A guitar is different. It has frets in order to make it easier to play nice-sounding pitches and intervals, but on the other hand, your possibility/freedom to do pitch slides and different intonation is somewhat limited. It can be done with other means, but it's not totally fluid like on a violin. The lack of frets in violins requires time and effort to be spent on learning to play nice-sounding pitches, and that's time guitarists don't have to spend. Some people cannot learn to play violin cleanly even if they try all their lives. But would you say the guitar is a better instrument because of that? It's just different. Would punk music have been invented if they had only had cellos and contrabasses, not guitars?
Do we have any violinists here, is there something that you can do with your instrument, but wouldn't want to be able to do? You can play out of tune if you want, but would you like to give up that freedom, perhaps so that you could concentrate on something more important?
I'd like to turn the question around. Whatever the instrument is, whatever the art is, you need to have talent and spend the 5 - 15 years mastering your skills with it. What is the instrument - what is the area of can-do/must-do where you operate skillfully? What is the art? If you don't have to spend time learning to play nice sounds, then that aspect is trivialized away, and your art, your creative effort, has to be somewhere else. It's pretty incredibly easy to produce a nice-sounding note with a piano, so that doesn't count as art, and your art has to be about which notes you play and when. If the song has been composed for you, then that further narrows down the area of art. But if you have to improvise what you play, it's different. For a DJ, the art could be in selecting what songs to play, when, and how to mix them. A random classical violinist might completely suck at that. But DJs and producers are making very different sorts of music with their instruments - they have a different perspective.
So. If it doesn't take at least a few years to learn, then it's trivial and commoditized. If it's respect and social status you're after, you don't get that by doing trivial things anyone could do. ;) But if it's not social status but music itself, if you'd just like to enjoy making music, there are lots of computer-assisted ways to do that. Click-click-click, try to make sounds in a music production application and see where you can take it? You might be able to produce beautiful violin sounds and piano chords without having any idea what you're doing. Is that art? It can be if you spend time learning it.
Comment: +1 for the mastery aspect. You can make expressive, powerful music even by literally banging on pots and pans, but it's still going to take both talent and 5-15 years of mastering your skills to do so well.
Comment: As a violinist of a sort, what I'd like my instrument to not be able to do is make squeaking noises instead of playing an open E. But that's a fault in my technique, and I'm pretty sure I'd have to give up something else I can do with bowing technique in order to fix that annoyance.
Comment: @Peteris maybe if you're a producer and it's a brilliant idea to bang on pots and pans, it may not have to be world-class banging. ;) The question is: what is your art, is it to play a classical instrument in an orchestra, or is it writing melodies, or harmonizations, orchestration ... creating synth sounds maybe? If you're the first person in the world to explore something, going to new places can be valuable in itself. Whatever the art, it needs to be mastered, and it takes time. :)
Comment: In particular, I was thinking about artists such as Dario Rossi (here's an example https://www.youtube.com/watch?v=YbsvFMEvPo4) - on one hand, it's literally banging some junk; a toddler can "play this instrument", but on the other hand it's obvious how bringing it to this level requires extensive mastery.
Comment: @Peteris: Check out the band "Einstürzende Neubauten". Not banging on pots and pans, but on anything you find in a decent junkyard. I think it took them a few years to master it and create some impressive music.
Comment: Maybe there should be some attempts to make pots and pans easier to bang?
Comment: *solid mechanics* - the physics term you're looking for is "[rigid body dynamics](https://en.wikipedia.org/wiki/Rigid_body_dynamics)" (or rigid body mechanics or kinematics).
Comment: There's plenty of punk played on fretless instruments, and Stump's Kev Hopper and a quarter of The Police's output if you extend punk to include nuwave. Of course, most players have more than one instrument so can switch between fretted and fretless depending whether they want the capabilities and tone of one or the other. (whereas the players of the best violins often seem not to own their instrument but play it for the owner to keep it in good order for them)
Comment: @PeterCordes I took that from Wikipedia https://en.wikipedia.org/wiki/Solid_mechanics  the box titled "Continuum mechanics" on the right side of the page. :) If it's a fluid or gas, then things like in fluid dynamics happen. But if it's a solid, different things happen.
Comment: @PeteKirkham I tried to refer to the sometimes heard tale of how punk music was born - guys who couldn't really play, and didn't care because it wasn't relevant for their ideas, wanted to make music. Guitars were easy enough to just start playing, and a new genre of music was born.
Comment: @piiperi ah, I see.  Yup, Solid mechanics is indeed about non-rigid solids, rather than modeling something as a bunch of perfectly-rigid chunks connected together.  Not a term I'd seen before, didn't realize it was a thing.  I was thinking of something like a bunch of rigid marbles or blocks as opposed to a continuous fluid, but sure a continuous plastic solid works too.
Comment: I think this is spot on.  As per @MatthewWalton and the squeaking, this is due to the  bowing technique controlled by the right hand. The right hand has to control the grip tightness, the front-back balance, the rotation, and it's angle relative to the violin. The right hand alone has 4 sets of parameters to adjust, and this can completely change the sound.
Answer: I reject your premise. Lots of work is being done in this regard.

The synthesizer. Now you can use a single interface to make any sound you want. Do you want to play guitar but you only know piano? MIDI keyboard->guitar sound library and hey presto. Don't play the piano either? Well, there are MIDI controllers in many forms. Some emulate classical instruments, but entirely new forms have also been invented. You can also set up a synthesizer to make more sounds when you hit one note, so you can accompany yourself.
Don't want to learn to play? Well, you can build a song note-by-note in software.
Making the learning process easier: Alternative notations have been invented. My 6 year-old nephew is learning to play using a color coding.

That said, music is complex. It involves several different skills at once:

operating an instrument
reading a new language (notes), which has some unavoidable complexity because of the number of variations you get. A new notation does not change the underlying complexity.
keeping time, hand/eye coordination, doing several things at once
Comment: Yes virtual instruments that can be written in midi are improving all of the time. Some instruments it's hard to tell the difference anymore.
Comment: That Hob idea: works (in part) for piano - what other instrument? And somewhat like bad tab (which is exclusive to guitar) in that there's no timing guide. And - getting used to playing notes that look like crochets and minims. I'm sceptical. I remember ITA (a reading aid in UK in '60s) as a new teacher. It's now history. Kids had to re-learn it all after they could 'read' using ITA, actually making progress slower!
Comment: This is the answer. Classical instruments aren't any harder than non-classical instruments to master to the level of "proficiency", the proficiency comes from practicing **music**, not an instrument.
Answer: Instruments are already easy to play. A piano could hardly be simpler, you push a key and it makes sound. You could teach an absolute beginner how to play jingle bells in around an hour. You need no understanding of how the piano works, no understanding of music either.
The thing is when you make something simpler people just get better at it. Its not difficult to play the piano but it is difficult to play as well as the pros since they have spent x years learning it. If you make something simpler the pros still spend x years learning it only their output improves.
This is why almost all skills take roughly the same amount of time (~10,000 hours) to learn. Not because they are all exactly the same difficulty but because that is the amount of time we have in our lives to learn a skill professionally.
Comment: Yeah. If our lives kept the same general pattern but lasted twice as long, we'd probably have a 20,000 hour rule :) Even if we develop teaching techniques that make X ten times as easy to learn, the guy with 1,000 hours of learning may master the virtuosos of old, but still be an amateur "today".
Answer: I note, that despite the progress of car technology the process of acquiring a driving license did not shorten noticably. The mechanics of handling a car or pressing the keys on an instrument is only a very small subset of what is required. A driver with a new license can hardly be considered an expert driver.
The other processes, like recognizing traffic signs or typical situations and the likely reactions by other drivers (reading scores with strange clefs and accidentals) can't really be neglected, and especially playing in ensembles (somewhat comparable to driving a car in Rome/Paris/... in the rush hour) requires cognitive processing and interactions which have to be learned step by step.
But even the mechanical part of playing an instrument has to be moved into the muscle memory, which is a slow process for many of us.
Comment: Indeed, it now takes longer than it used to in some countries to be able to drive (legally, safely). Despite all mod cons!
Comment: Hmmmph.  As an employee of a company producing hardware & software for self-driving cars, I'm insulted (not really :-)  )
Answer: Learning to play is not really about overcoming technical obstacles. It's about learning to express yourself with an instrument.
Take for example the human voice. It's the most natural instrument we have ever used in music. Everyone knows how to use it, everyone does so every day. But still, how long does it take to become a proficient singer? Many years!
What do you learn when you become a singer? Mostly how to hear! Yes, you need to learn some techniques to get your vocal chords to produce the tones that you want. But until your ears tell you when you are a notch flat, you won't be able to hit any note.
Most instruments are like the human voice: It is plain simple to get a note out of a piano. But you need quite impressive circuitry in your brain to be able to play most of the literature. You don't learn to push the button, but you learn to coordinate the notes you are playing, to find the buttons blind, to know which finger to use for which button to be able to hit the next note/chord well, and, most importantly, to associate the sounds of the different chords/keys with a mental image of how they sound, allowing you to think of a sound and instinctively hit the right keys to produce that sound.
And I have not even mentioned putting expression into your music yet. There are many people who can produce correct notes from an instrument, but are unable to make music with it, to transport their feelings into the sound they produce.

That said, many instruments are already very near their respective optimum of ease of use: The piano can play any diatonic note at the push of a button. The tuning of a guitar is not just regular fourths, but rather includes one mayor third for the sole reason of making it easier to play chords. The electric guitar is so thin because it's easier to play that way (and it doesn't need a resonance body).
However, each instrument has its own kind of optimum. A violin with six strings would be much harder to play, and a guitar with only four strings would make much good music impossible to play. They are different instruments, and they call for different string counts.
Answer: The way I look at this is: instruments are designed for a wide expressive range and that makes them extremely sensitive and difficult to control!
I think the violin is the best example. The slightest movement of the bow produces a response. The smallest movement of the finger position changes pitch. It's super sensitive. That makes it very expressive... and very difficult to control.

...But why not try and make music easier to play, similar to how cars evolved over time to make it easier to drive?

I think you may be making the wrong comparison. People are developing collision avoidance systems for cars. That's like Auto-Tune for singers who can't sing. But if you are thinking of classical violin and virtuosity, it seem better to compare it to high speed F1 racing! If you want full control, you get full control and all the perils that come with it.
Easier to play instruments have been developed. In the case of string instruments there are the hurdy gurdy and autoharp as examples.
In the end it's about trade offs. If you constrain an instrument in terms of pitch and dynamics, it will be easier to control. If you want an instrument with a full range of pitch and dynamics, you need to learn how to control it.
Answer: They have been simplified. Much of that simplification happened in the late 1800s to mid 1900s. The Boehm system arrangement for flute and adapted to clarinets, saxophones, oboes, bassoons, etc., was a big simplification (and extension) of cross-fingering keyless instruments.
There are physical limits on instruments. Wind instruments produce sound by setting a column of air in motion. This column must be broken up into sections that are in tune to produce other notes. Stringed instruments, fretted or unfretted or bowed or plucked basically are just string attached at each end. The string can be shortened somehow. Not  much simplification (keyed zithers are simpler but don't sound like other instruments.) Same for piano and harpsichord. One must always preserve the characteristics of the instruments.
Comment: Are there alternative musical instruments that solve this issue by generating every sound electronically? There are electronic pianos nowadays, but they seem to require the same skills as a classical piano, even though they don't need to generate any physical sounds at all.
Comment: @JonathanReezSupportsMonica Maybe you'd be interested in the jammer keyboard https://en.wikipedia.org/wiki/Jammer_keyboard?wprov=sfla1 it produces all the sounds electronically and claims to have some advantages to the piano by spacing the notes based on larger intervals. There are also several other isometric keyboard layouts, like those found on the accordion, which try to simplify or improve on certain things.
Comment: One can record instruments (like Garritan and the like) and play them from any keyboard. However, the real-time things like moving a string with the finger to change the sound or intonation. Breath phrasing isn't that easy to mimic.
Comment: A small correction. The Boehm system never became popular on the bassoon.
Answer: Well, there are good answers that explain how various simplifications and improvements were already implemented in various instrument designs. That's true. Same goes for the notation, just look at the history of its evolution. I also want to agree and confirm that the mental abilities required to play music can only come as a result of a lot and a lot of practice.
But also I think you are interested in asking a different and a more exact and practical question:
Why are not the classical instruments made as much easier to play, as requiring only about a year or even less to master?
And I want to question your premise on this one.
A classical musical instrument is all about making a complex physical medium emit a particular characteristic sound in a very controlled manner. And the simple answer to why this cannot be simplified is because you can't avoid dealing with the particular physical configuration of materials that comprise the instrument.
There are hundreds of ways of plucking a guitar string, there are hundreds of ways of pressing and releasing piano keys, there are hundreds of ways of closing a pipe hole with a finger.. Every tiny detail of every movement of the hand contributes to exciting the physical medium into producing the particular sound with particular details. Every movement should be performed at its exact timing, lead by intuition, without additional time for consideration, and with connection to all other movements. Otherwise there will be no music.
Building your control over this to an extent suitable for playing music that can be enjoyed by other people requires a considerable amount of practice and training. Your hands, your brain, your ears, your posture, everything must be trained.
Physically, playing a classical musical instrument is a dance, and you probably won't question why dance is not being made simpler. Or shooting from a classical bow if you are familiar with that, or fighting with a sword, or learning kung-fu.. it's art.
Also, changing a guitar or a piano, would make it to be not a guitar or a piano anymore. They will sound and handle completely differently.
In your analogy with a car, I would note that playing music is more akin to professional driving like rally, drift, Formula-1 or similar kinds of it where a driver is expected to be able to control the car on an immensely vast spectrum of possible situations and to be able to have a working mental model, prediction and analysis of what is going on. Driving in these kinds of sports takes years and years to learn. Even the typical daily life car driving experience in most cases is about 5 years until the person becomes a seasoned driver.
Learning things through practice is just how life works. You are going to make a much better progress if you accept this and learn to enjoy the process.
I am not sure how electronics or touch screen technology can help with playing classical instruments or reading notation, but if you have any exact idea on this, I suggest asking a more direct question like "why methodology X is not used to simplify playing instrument Y in the way Z", so you could get a more direct answer.
That being said, there are tons of learning material available today for almost any instrument. For example you can find wonderful people on Youtube who share a lot of information, experience and spirit. As well as approaches to learning and understanding musical theory.
About musical theory and notation: from my personal experience I can say that they are already simple, it's just rules and a simple script that you need to learn. Reading notes does not take years to learn, it's more a question of about a couple of months at maximum for most people. I must also say that I know professional musicians who have trouble playing from the notesheet in real time, so that is possible too.
If you can think of an alternative and easier notation, please post a separate question about it and it can be discussed, maybe something interesting can come out of that.
Besides that, reading notes is easy, but being able to understand what they mean and how the musical piece works in terms of its inner structure and countless details, takes years to get into.
By the way, there are constant attempts to invent an alternative musical notation, for example take a look at https://www.hummingbirdnotation.com/
And there are attempts to take a fresh look on studying musical theory, for example take a look at https://www.hooktheory.com/
Comment: +1 The comparison with F1/rally/drift is spot-on. Musical instruments don't evolve to be simpler partly because there is an underlying aesthetic that favours complexity (and velocity), and simple tools tend not to produce complex behaviour. Same with cars.
Comment: Shooting with a bow [isn't a good example](https://en.wikipedia.org/wiki/Compound_bow) to make the point.
Comment: @leftaroundabout yeah, you are right, compound bows erode the example :D I know they are easy, but I don't exactly know how much body training they require though, since I only have experience with the usual bows.
Answer: The reason it takes 10 years or more to learn to play an instrument has little to do with the physical skills required.
It is because it takes that length of time to learn to imagine the exact sound you want to produce (not just the elementary idea of "play middle C") and then to create precisely what you imagined.
The only way to shorten that process is to redesign human brains, not redesign musical instruments.
With current technology, it requires no physical skill whatever to create a performance that is indistinguishable from a virtuoso playing a conventional instrument. But the number of people with the imagination to do that, and the intellectual stamina to learn how to control the technology to make it possible, is comparable with the number of virtuosos who do it the traditional way.
Of course if you don't want to aspire to "virtuoso" level, things get easier. You might not realize that some of the muzak you hear in shopping malls and elevators was not even composed by humans, and certainly not performed by them. "Making music" doesn't get much "easier" than that, by any definition - just buy the software and press "start".
Comment: I like the second paragraph, but "requires no physical skill to create a performance that is indistinguishable from a virtuoso playing a conventional instrument" is dubious at best.
Comment: @leftaroundabout Try "record a virtuoso playing a conventional instrument and play it back". Nobody said you need to be creative or do something new :) In fact, even if you do require that, that's where "sampling" came from - record people playing instruments, mix and match, add effects here and there... a sampler can easily do things the greatest virtuoso couldn't ever do playing on a conventional instrument. The "playing a mechanical instrument" part is completely optional, except by a few extremists who keep telling everyone "it's not the same thing" (well, duh; so what?).
Answer: Great instruments are made for great musicians. Great musicians want to have control of each corner of the instrument, hence making instruments complex.
If one desires to be a great musician, learning from a simplified instrument generally is considered waste of time, because you could be already learning to control the complex instrument since the learning start. Mastering an instrument can takes a lifetime, then is important de avoid losing time...
Instruments and their manufacturing means are evolving. Topline pianos, for example, are even harder to play due to all details that it allows you, as a player, to control. Their under the hood mechanism are evolving to improve their quality in the minimal details to attend the evolution of the musical technique and improve what is already consolidated.
Now, in my opinion, instruments simplications either gives technical limitations, hence reducing artistic expressiveness range, or gives the player undesirable addictions.
And about music notation, if you are "just" performing, learning it should not take a lot of time. It's not that complex. I agree that some improvements could be made, but not big changes...
Answer: The car analogy is a little unfortunate. Most 'improvements' are focussed on safety - fewer bits and pieces to cope with makes it more effective for the driver to not kill anyone. Not many folk get killed by musicians! O.k. some get driven to kill themselves, after listening,  but that's another story!
'Improvements' are being made. No need to tune up your guitar any more - and I'm not considering those little things we see on the ends of so many guitars - I'm thinking press a button, and it tunes itself!
Auto-tune comes along to aid vocalists who should but can't keep in tune.
Drum machines save us the trouble of keeping in time - and even put breaks in when we press the approriate button.
Keyboards can be made to accompany us, a little or a lot. Press one key, and the whole chord and rhythm comes out.
Plug just about anything into MIDI and there's a plethora of different sounds available - probably even more than that!
But at the end of the day, playing music is a skill and an art, so making it so that the dogs in the street can do it would be an improvement? Don't think so. We don't become great artists by painting by numbers - we strive - it's not for everyone, and many who do strive still don't achieve their dreams.
So, even when it's all automated and can be played by any old half-wit, will it still be music..?
Comment: Ah, the elitist argument: Making music should be difficult to keep out the riffraff. Not so long ago, before the advent of ubiquitous recorded music, people had to make music themselves if they wanted to hear any. So they'd get together and sing, with an instrument or two for accompaniment. Were they a match for the professionals entertaining the king? No. did they make music? Hell, yes. Lowering the barriers of entry into the world of making music is a good thing. Those with the skill and art will grow into the more difficult realms, those without still get to enjoy themselves at their level.
Comment: @Tim it's mainly the phrase "making it so that the dogs in the street can do it would be an improvement? Don't think so" I tripped over.
Comment: @Hobbes - sorry it came over that way! Throughout my career, I've played with both sides of the coin - some brilliant pros and some brilliant amateurs, and brilliant players who really didn't know what they were doing, but that never stopped the great music they played. Hard pushed to decide which of the better ones I prefer to play with. All have their plus points. Didn't realise my answer alluded to what you think.
Comment: "Auto-tune comes along to aid vocalists who should but can't keep in tune" - and totally trashes the sound of the human voice in the process. Imho, when you need an auto-tune to hit your notes, you are simply not ready to sing for a large audience.
Comment: @cmaster The trashing is intentional - auto-tune was _intended_ to be used to help people who can't hold a note sing like people who can, but it was very quickly adapted to "improve" vocals in a very non-human direction (Cher again). It wasn't really even meant for _audiences_; heck, one of the points was exactly the music pundits that kept claiming their nonsense about there being no technological solution to something as complex as human voice. Everything after that is just moving the goalposts to keep "proving" they were right after all.
Comment: @cmaster - or, basically, not ready to sing. Unless you're Cher.
Answer: For one thing instruments are improved all the time: that's why "period instrument performances" are a thing.  For another, not all improvements regarding simplicity of play lead to results convincing the audience.  For example, unfretted string instruments are notoriously hard to play in tune for unpracticed musicians.  So there were a number of attempts using frets to make life easier for players.  Viols are fretted, lutes were fretted.  A simplified version of a lute that is quite easier to play and to keep in tune is the so-called "guitar" that has come into some prominence recently, with players like Segovia making this simplistic folklore instrument acceptable for some kinds of classic music environments.
Trying to turn viols into a more reliably working key instrument are known under the name of "hurdy gurdy".  They haven't really made it out of the Renaissance except as an operative prop for pretend Middle Age performers.
Notoriously hard to play brass instruments not containing brass, namely cornetts, have been replaced by valved instruments made of, well, brass.  Frankly, if you compare the sound quality of some leggiero runs on a cornett in the hand of an experienced player with that of a brass brass instrument, you wonder whether this change to better playability and louder volume is always beneficial.
Wind instruments like flutes and hautboys (and of course all kinds of brass instruments) have grown complex valve systems to replace more arduous fingering systems.
Even recorders have been simplified.  Some instruments like ophicleides, saxophones and sousaphones have not attained their projected role in the classical orchestra permanently.
Calling a piano hard to play is a joke.  You can perform a lot of polyphonic four-part harmony by just pressing straightforwardly arranged keys closely mimicking the notation.  There are no wrong notes and no screeches or other things afflicting bowed string instruments.  You don't need to invest any work for controlling tone or intonation.  You don't need to retune your instrument every few hours or more often.
Yes, there are things like Chopin nocturnes that are hard to play.  Their sole reason of existence is that a piano is a simple instrument to play compared to, say, a string quartet, and if people spend half of a life time practising a simple instrument to play, they will grow a repertoire that employs this simplicity by enabling more complex music.
You don't want to bore the audience with stuff they can hear everywhere, you don't want to bore the musicians spending their life with creating music.
The playability and simplicity instrument developments and progress deliver gets reinvested in more virtuosic and more complex play.
And worse: the ubiquitous availability of recordings and broadcasts mean that the competition by the ones having invested their life into music means that better performances are omnipresent.  Living at the same time as great performers is not fun when the recordings of those performers are everywhere at the press of a button.
So while the playability of instruments and instrument families have grown a lot and keep to grow, being at the forefront of your generation with music still requires consistent dedication.
Answer: In classical music progress happens, using different material or construction techniques. A piano built today is different from one built in 1920s and piano makers have patented mechanical modification. On the other hand instruments can and will evolve morphing in other instruments, more capable and easier to play.
Musical notation evolved too, look a printed sheet music in the '700 or the Gregorian music sheets, compare them on one printed nowadays and see the differences.
The biggest problem to learn to play is understanding the music and learn to learn and to persevere.
About car analogy, it's true that car have become a bit easier to drive, you have synchromesh and ignition by key, with electronic injection you don't have to jet the carburettor and so on. But having to be aware of other cars, people and road conditions is remained the same, and that is the difficult skill.
Answer: it takes anywhere between 5 and 15 years to become proficient in one of the classical music instruments, making it a very difficult skill for most of us.
As a frame challenge, I reject the basic premise of the question. Your reason for asking it is not just wrong, but displays an entire thought pattern which is wrong. The rest of the question is therefore moot.
It is not a "difficult skill". Anyone with working ears and the relevant limbs can put in those 5 years and become proficient, literally anyone. If you picked any instrument at all and started playing it today, in 5 years you would be competent.
The "difficult skill" is not learning to play, it's learning to persevere. Of course you'll start out pretty bad, but if you keep working at it then you'll get better. The difficulty is not within the instrument, but within you.
For a similar example, consider running. There exist "couch to 5k" programs to get people into running. Generally it takes 3-6 months to get a non-exerciser fit enough to do a 5k run. The marathon is much harder, but training programs for that exist too. And coincidentally it often seems to take around 5 years of perseverance to be fit enough to do a marathon without injury too.
Will you be as good as some other people? Probably not. Even if you're an Olympic-gold-medal runner, someone is going to go faster than you eventually. But you didn't ask for best-in-the-world, you asked for competence - and that's within everyone's grasp.
Edit following a comment by @WayneConrad: The OP uses the word "proficient".
 But learning an instrument is not 5 to 15 years of nothing - this isn't Mr Miyagi's "wax on, wax off" method where you spend 5 years sweeping the floors and then by magic you discover you're "proficient".  It's actually 5 to 15 years of getting steadily better day by day and month by month, where every step of the way from day one onwards involves you playing that instrument with gradually increasing proficiency.  The only point in the process where you don't play the instrument is the point where, like the OP, you choose not to put in that time.
Comment: I agree very much that learning to persevere is the trick to becoming a musician; I gave you a +1 for that very important point.  However, it seems to me that taking 5 to 15 years of perseverance to attain competence is the very definition of a difficult skill.
Comment: @WayneConrad It depends on your definition of "competence" or "proficiency".  It doesn't take very long to learn the moves in chess.  It takes a bit longer to learn the idea of looking ahead a bit. To be a good club player?  Easily 5-15 years. :)  But you can be playing to some recognisably-OK level, and enjoying playing, a long way before that.  All instruments are the same - you won't be playing complicated stuff to start with, but you'll still be playing *something*.
Comment: I still agree with OP that learning to play an instrument is difficult, but I like the edit you've made: How good you sound is not a binary function of the time you've practice, for sure.  I'm not sure it's linear either, but every year you practice, you do sound better than the year before.


Can import the gradle of android app to build in AOSP project

Question: I have an android app build by android-studio that use gradle script, now I want to move app to AOSP build system. So how can I import the gradle script and convert to AOSP build (may be Android.bp or Android.mk).
In gradle project have many dependency, android-studio can automatic download this dependency, can I do that in AOSP?
Answer: From my experience, you probably need to write Andorid.mk manually. By the way, AOSP build system not download dependencies automatically for you. If the dependencies are available in AOSP you no need to download them, just link to them. Otherwise, you need to download them to local directory then use Android.mk to add them to AOSP and linking.
This is an example of Android.mk. In which, the "libs" directory contains the libraries not available in AOSP.
<code>LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PACKAGE_NAME := testapp

LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_REQUIRED_MODULES := com.example.testapp

LOCAL_CERTIFICATE := platform

LOCAL_MODULE_TAGS := optional

LOCAL_PRIVILEGED_MODULE := true

LOCAL_USE_AAPT2 := true

LOCAL_PROGUARD_ENABLED := disabled

LOCAL_STATIC_ANDROID_LIBRARIES += \
    androidx.lifecycle_lifecycle-extensions \
    androidx.appcompat_appcompat \
    androidx-constraintlayout_constraintlayout \
    androidx.recyclerview_recyclerview \
    androidx.cardview_cardview \
    android-support-v4 \

LOCAL_STATIC_JAVA_LIBRARIES := \
    cdi-api \
    zxing-core \
    http \
    httpclient \
    httpcore \

include $(BUILD_PACKAGE)

include $(CLEAR_VARS)

LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
    cdi-api:libs/cdi-api.jar \
    zxing-core:libs/core-3.3.2.jar \
    http:libs/http-2.2.1.jar \
    httpclient:libs/httpclient-4.2.2.jar \
    httpcore:libs/httpcore-4.2.3.jar \

include $(BUILD_MULTI_PREBUILT)
</code>


integration of $\frac{x}{(x^2-1)^\frac{1}{2}}$

Question: When I use the substitution $u=\cosh x$ to integrate $\frac{x}{(x^2-1)^\frac{1}{2}}$, I get $\frac{1}{2}(x+\sqrt{x^2-1}-\frac{1}{x+\sqrt{x^2-1}})$ but when I check online the answer is $\sqrt{x^2-1}$ which is much tidier. I'm probably being thick, but how can my answer be simplified to $\sqrt{x^2-1}$? and if it can't, is there a reason why I got a different answer to the integral?
Comment: You could have done an algebraic sub. Let $u=x^2-1$.
Comment: but can the answer I got be simplified to the one online?
Comment: Your answer is equivalent.
Answer: Your answer is correct:
\begin{align}
\frac{1}{2}(x+\sqrt{x^2-1}-\frac{1}{x+\sqrt{x^2-1}})&=\frac{1}{2}(x+\sqrt{x^2-1}-\frac{1}{x+\sqrt{x^2-1}}\times \frac{x-\sqrt{x^2-1}}{x-\sqrt{x^2-1}})\\
&=\frac{1}{2}(x+\sqrt{x^2-1}-\frac{x-\sqrt{x^2-1}}{x^2-(x^2-1)})\\
&=\frac{1}{2}(x+\sqrt{x^2-1}-x+\sqrt{x^2-1})\\
&=\sqrt{x^2-1}
\end{align}
Answer: Hint: Let $u = x^2 -1$ then $du = 2x\  dx$ and
$$\frac{1}{2}\int \frac{1}{u^{1/2}} du$$
Alternatively,as you suggested letting $x = \cosh t$ then $dx = \sinh t\  dt$ and
$$\int \frac{\cosh t \sinh t}{(\cosh^2 t - 1)^{1/2}} dt = \int \cosh t\  dt = \sinh t + C$$
Answer: If $x=\cosh u$, then
$\displaystyle\int\frac{x}{\sqrt{x^2-1}}dx=\int\frac{\cosh u}{\sinh u}\cdot\sinh u du=\int\cosh u du=\sinh u+C=\sqrt{x^2-1}+C$
Comment: why does sinh u= (x^2-1)^1/2?
Comment: Since $\cosh^{2}u-\sinh^{2}u=1, \sinh^{2}u=\cosh^{2}u-1=x^2-1$.


Galois Action on Absolutely Irreducible Polynomials

Question: Consider an absolutely irreducible polynomial $f(x)$ with coefficients in $\mathbb{F}_{q^r}$. Consider also $Gal(\mathbb{F}_{q^r}, \mathbb{F}_q)$. Is there any possibility that $\sigma(f(x))$ remains an absolutely irreducible polynomial where $\sigma \in Gal(\mathbb{F}_{q^r}, \mathbb{F}_q)$ different from identity?
To be more clear, my question is that when we take a function $p(x) \in \mathbb{F}_q [x]$ and suppose that $p(x)= \prod_{\sigma \in Gal(\mathbb(F)_{q^r}, \mathbb{F}_q)} \sigma(h(x))$ where $h(x)$ is a polynomial in $\mathbb{F}_{q^r}[x]$ which is absolutely irreducible. I am wondering that can $\sigma(h(x))$ be absolutely irreducible under some condition on $\sigma$? If so, what are the conditions on $\sigma$?
Comment: $f(x)=x+1$ is fixed by $\sigma$.
Comment: Since $x+1$ is a polynomial in $\mathbb{F}_q \[ x\]$, so it does, yes.
Comment: My question was like that, take a function $p(x) \in \mathbb{F}_q [x]$ and suppose that $p(x)= \prod_{\sigma \in Gal(\mathbb(F)_{q^r}, \mathbb{F}_q)} \sigma(h(x))$ where $h(x)$ is a polynomial in $\mathbb{F}_{q^r}[x]$ which is absolutely irreducible. I am wondering that can $\sigma(h(x))$ be absolutely irreducible under some condition on $\sigma$? I am sorry if I asked in a wrong way at the beginning.
Comment: What does absolutely irreducible mean here? Did you mean $x=(x_1,\ldots,x_n)$? Every one-variable polynomial splits over the algebraic closure. $\sigma$ extends to an automorphism of $\overline{k}$ then of $\overline{k}[x_1,\ldots,x_n]$ so it sends the irreducibles to themselves.
Answer: Let $f \in \mathbb{F}_{q^r}[x]$ be absolutely irreducible.
Given a polynomial $g$ and an automorphism $\sigma$ of a field containing the parameters of $g$ (eg a global automorphism), allow me to write $g^\sigma : x \mapsto \sigma(g(x))$. In other words $g^\sigma(x) := \sigma(g(x))$.
For any global automorphism $\sigma \in Gal(\operatorname{acl}(\mathbb{F}_{q}), \mathbb{F}_q)$, the polynomial
$f^\sigma$ is also absolutely irreducible.
To see this, notice that if $f^\sigma$ factors, say $f^\sigma = P \cdot Q$ where $P, Q$ have coefficients in the algebraic closure of $\mathbb{F}_q$, then $f = (f^\sigma)^{\sigma^{-1}} = (P \cdot Q)^{\sigma^{-1}} = P^{\sigma^{-1}} \cdot Q^{\sigma^{-1}}$. Moreover, $\deg(P) = \deg(P^{\sigma^{-1}})$ and $\deg(Q) = \deg(Q^{\sigma^{-1}})$.
Comment: You need first to extends $\sigma$ to $\overline{\Bbb{F}}_q$ (obvious for the Frobenius, at bit less over other fields) as it is $P^{\sigma^{-1}}$ doesn't make sense.
Comment: Yes! Thank you very much for your answer.
Comment: @nomadd if this answers your question, fell free to accept the answer and/or upvote it :)
Comment: @reuns This is perfectly correct, one needs to adress this technical issue. I used the abuse of notation consisting in considering $\sigma$ given as a global automorphism. This abuse of notations is consistent (eg the map $\bar{\sigma} \mapsto f^\sigma$ is well defined) and very convenient when doing Galois theory. :)
Comment: @reuns Besides, given $\sigma \in Gal(\mathbb{F}_{q^r}, \mathbb{F}_q)$ there is a very natural candidate to expand $\sigma$ since $\sigma$ is a power of the Frobenius.

I now edited the proof, thank you! :-)


Export blocks to production site

Question:
Possible Duplicate:
Quickest way to reimport menus and blocks (D7)

I need a way to easily transfer the block configuration from my staging site over to the live site.
I've been working on implementing a new theme for my client and showing them my progress using a staging site, which is basically a clone of the live site. The staging site's blocks configuration is completely different from the live site.
I've heard about the Features module, but unless i'm mistaken, it doesn't work with Blocks. Maybe I need to use Chaos Tools?
I'm just trying to avoid having to manually place each block in its correct position when it's time to go live, which would be very time consuming. Using exportable blocks sounds like a good idea, but I am unsure if it is a safe procedure.
Answer: Yo will need to use the Features Extra module. It currently supports: vocabularies; nodequeues (definitions); block settings; custom blocks (boxes).

Export blocks to production site


Experimental Units

Question: I am doing a paper airplane project for school.
I am doing a two-factor experiment, each with three levels, the factors are design of the plane and angle of launch. I am also having three people make a copy each of the airplane designs to account for variation when manufacturing the planes.
Am I correct in believing that there are 9 experimental units (3 designs $\times$ 3 people each making each design)?
Or are there 81 experimental units (3 designs $\times$ 3 launch angles $\times$ 3 people making a plane each $\times$ 3 repetitions).
Comment: stats.stackexchange.com might do better with this than math.stackexchange.com can. ${}\qquad{}$
Answer: If your factors are design of the plane and angle of launch you have three of each so $9$ cases.  You have decided that the manufacturer and the repetition do not matter systematically, so repeating them will reduce the random variability.  You have $81$ data points that you have decided to bin into $9$ bins of $9$ points.
This is a reasonable approach when you cannot afford many trials.  You have to guess what matters and what doesn't.  The problem comes when something you thought was uniform is not, like one manufacturer is better than the others.  Maybe s/he creases the paper better, so there is less air resistance to the flight.  Then the one of his/her planes that got launched at  a better angle will bias your selection toward that design.
It is hard.

Experimental Units


Does there exist a Laplace series for the Laplace transform?

Question: I am trying to get a better understanding of what the Laplace transform is. When I learnt about the Fourier transform I found it useful to learn about the Fourier series first. Does there exist some kind of Laplace series which is to the Laplace transform what the Fourier series is to the Fourier transform?
Comment: Yes, it's called the z-transform: https://en.m.wikipedia.org/wiki/Z-transform
Comment: Think of the Laplace transform as the extension of the Fourier transform to the whole s plane.  The Fourier transform itself "lives" on the $s=i\omega$ axis of the complex s plane.
Comment: Your question has a personal element that makes your question hard to answer. How would you describe "what the Fourier series is to the Fourier transform?"
Comment: The motivation for the Laplace transform is IMO that the solutions of linear DE with constant coefficients come in the form $\sum c_ke^{\lambda_k t}$. Interpret that as a point mass measure and you can write it as integral $\int e^{st}dc(s)$. Then switch over to a real or formal density to write this as $x(t)=\int X(s)e^{st}ds$. Then contemplate the existence and form of an inverse transform. (This may have the directions switched, the coefficient computation is usually the forward transform and the function reconstruction the inverse.)
Comment: @QiaochuYuan Hm, no. As far as I know, the Z transform is used for discrete-time signals, while the Laplace transform, the (continuous-time) Fourier series and the (continuous-time) Fourier transform are used for continuous-time signals. The OP never talked about discrete-time signals.
Answer: By introducing the dirac comb,
$\sum\limits_{t=0}^\infty f(t)e^{-st}=\int_0^\infty\operatorname{\text{Ш}}_1(t)f(t)e^{-st}~dt$


Is it possible to have two instances of GKSession on the same device when using Bluetooth?

Question: I am writing mutliplayer game and thought I would create two instances of GKSession. One session set to GKSessionModeServer and the other to GKSessionModeClient. The server is properly reported when I call peersWithConnectionState: on the client peer and each session has different peer ids. But when I try to connect to the server I receive the message session:connectionWithPeerFailed:withError: with the error description "Failed while pending outgoing invitation.".
Using two GKSessions works when Wi-Fi is available. I am afraid that there is some limitation with Bluetooth that disallows this but I am not sure. I could rewrite the code to use a single GKSession on the server but I would rather not code special cases if I know that someone else got it working with two instances.
If I turn off both Wi-Fi and Bluetooth i get the error "Network not available." which I don't get if either is turned on. This makes me believe it won't work when there is another iPhone is nearby either.
Answer: I rewrote the code so I only create one GKSession on the hosting device and send data between the server and the local client directly without using the GKSession. I could finally test this with two devices and they properly connect to each other. So the lesson is to have only one GKSession on the host and it will work with Bluetooth as well as Wi-Fi.


Why are so many pieces originally written for the lute now arranged for guitar?

Question: While looking for baroque music on Spotify (mainly Bach), I noticed that all of the pieces originally written for lute are arranged for guitar when played by contemporary artists.  NOTE: This wasn't a scientific survey, just an observation.
Why is this being done?
Are there advantages of guitar or is it just reflecting changing fashions?
Comment: Probably because they're very similar instruments.  (Do you know what they call a person who makes guitars?)
Comment: This doesn't qualify for an answer but from a recovering lutenist (I'm on a 12-fret program):  If you're going to play lute music on the guitar, you will find it MUCH easier if you tune your G down to F# and learn to read the tab. Most lute music is in Italian tab which is identical to modern guitar tab but uses letters instead of numbers (a=0, b=1, etc).  A very short learning curve and well worth it.  What looks horribly complex in "arranged" modern notation becomes beautifully simple in its original form.  And there's a huge amount of it available.
Comment: Forgive me if I'm over-simplifying here, but _why not_?
Comment: 1. Shortage of lutes. 2. Shortage of pieces for the guitar, especially from the lute-composition period.
Comment: I'll just add that there are also contemporary artists who play the lute, and that lots of lute music, although transcribable for guitar, really does sound better on the lute.
Comment: @DoritoStyle it wasn't the presence of the guitar arrangements that struck me (because sure, why not) but the total absence of any actual lute performances.
Comment: Ah, I think you'll need a new question with different wording to get those answers, although some of the answers here indirectly address that question as well.
Answer: Availability.
Guitars are far more available than lutes.  You can go down to any music store and buy a guitar for a very reasonable price.  Even non-musicians will sometimes keep a guitar on hand.  Just from personal experience, but I know someone who only occasionally plays the guitar, but he has 3 on hand.  Why?  He found them for a couple hundred dollars.
Even just a quick search on Google in your state shows at least three stores that specialize in guitar sales: guitars are all over the place.
Contrast that with the lute:  It's more expensive, you'll probably have to travel farther to get one, and you'll have a much narrower selection.
Basically, it's the same reason that a lot of pieces that were originally written for the clavichord or the harpsichord are now played on piano: most people have access to a piano, whereas very few have access to a harpsichord and even fewer to a clavichord.
Comment: My guitar teacher went half way across the world to the US to buy his lute.
Comment: The analogy to keyboard music is excellent. Welcome to Music.SE!
Comment: I'm not sure about the keyboard analogy: now as many people have access to digital keyboards as to acoustic pianos, still they'll more commonly opt for a piano sound when playing Bach even if a harpsichord sound is available.
Answer: The lute is a very difficult instrument to maintain.  Has lots of issues with stability in various temperatures and humidities.  And the sharp angle in the neck makes it easy to mistreat physically.  Also, it's difficult to build, and a lot of people who used to make them have switched to violin-family, only partly because there's more demand for those.  So, since it's a fretted instrument, and since it's range is very similar to that of the guitar, a lot of guitarists, especially those who specialize in classical, have made arrangements of classic lute pieces for their guitars and then published those.  So while, yes, it's partly a matter of changing fashions, it's much more because the guitar is easier to take good care of.
Comment: This is a great support answer in combination with anonymous2's answer.  Why are lute songs so often rearranged for guitar?  Because guitars are more available.  Why are guitars more available?  Because lutes are much more difficult to build and maintain.
Answer: The lute has a very pleasant part of the audio spectrum in the classical repertoire. It is much easier to get a lute working with a string ensemble than it is a guitar.
It just seems to fit the spectrum better. Unfortunately, that is often overshadowed by the sheer impractical nature of the lute. It has a number of strings more than a guitar. You have violin style pegs instead of machine heads and until relatively recently the lute used old fashioned gut strings as well.
Restringing it is a nightmare, tuning it takes forever. It takes a really dedicated player to master, you cannot play the lute with nails so if you come from a guitar background you have to totally remaster your picking technique
It is even notated in an archaic form of tablature, so you even have to learn a completely new form of notation if you want to play the music written for the instrument.
And lastly, it is nowhere near as versatile an instrument. Where with a guitar you are only limited by your adaptation skills with a lute you really are only ever going to play renaissance and baroque music.
It is not a bad instrument it just takes an amount of dedication to master it that 90 percent of the people in the world don't have.
Answer: Well, in many cases "arranging" for the guitar involves looking at the notes on the G string (third highest) and see whether they could still be fingered when the lute "G sharp" string (actually D sharp) was tuned one half note down to its nominal guitar G.
Of course, apart from this one-string change, a common lute is tuned a whole fourth higher on the melody strings, and it often has a number of additional bass strings, often to be played without fretting.
But once you transpose the basic tuning, the remaining core change is a semitone in the third highest string.
Which is reasonably easy to "arrange" for.  And the guitar is played a lot more than the lute these days...
Comment: User 36792-- Yes, your last sentence is in fact what the OP was asking about!  He wondered why.


Solving limit with unknown exponent without L'Hopital

Question: I came across this limit and it was told that we should not use L'Hopital's rules for this one:
$$
\lim _{x\to 0\:}\left(\frac{\left(1+x\right)^a-1}{x}\right)
$$
I can't see a way to get around that x on the denominator, I can't expand the binomial because it's an unknown.. Any solutions? Is it even possible without L'Hopital?
Comment: Use the derivative definition $\lim_{x\to 0}\frac{f(1+x)-f(1)}{x}$
Comment: Are you not using binomial theorem because you don't know whether $a \in \mathbb N $ or not. Right?
Comment: @JaideepKhare exactly
Comment: Have you heard of squeeze theorem?
Comment: Then let me edit my answer.You can use extended binomial theorem dor any $a \in \mathbb R$
Comment: @bthmas not in this context.. Sorry guys I'm pretty new to calculus.
Comment: If you are new to calculus, it is best to prove the result for rational $a$ using the techniques of algebraic manipulation or if you are adventurous enough you can take inequalities / Squeeze Theorem approach also. The case for irrational $a$ has to be deferred till the time when you have understood the theory of exponential and logarithmic functions (see Dr. MV's answer which uses this).
Comment: Also note that this limit is in form of derivative so using L'Hospital's Rule here is kind of very roundabout.
Answer: We will evaluate the limit using only standard inequalities and the squeeze theorem.  To that end, we begin with a short primer.

PRIMER ON STANDARD INEQUAITIES
In THIS ANSWER, I showed using only the limit definition of the exponential function and Bernoulli's Inequality that the logarithm and exponential functions satisfy the inequalities
$$\frac{x-1}{x}\le\log(x)\le x-1 \tag 1$$
for $x>0$ and
$$1+x\le e^x\le \frac{1}{1-x}\tag 2$$
for $x<1$

First, note that we can write $(1+x)^a=e^{a\log(1+x)}$.  Then, using $(1)$ and $(2)$ we find that for $ax<1$
$$\frac{a}{x+1}\le\frac{(1+x)^a-1}{x}\le \frac{a}{1-ax}\tag3$$
whence applying the squeeze theorem to $(3)$ yields the coveted limit

$$\bbox[5px,border:2px solid #C0A000]{\lim_{x\to 0}\frac{(1+x)^a-1}{x}=a}$$
Comment: Oh, I see it now! Thanks!
Comment: You're welcome!  My pleasure and pleased I could help you.  -Mark
Comment: +1 This was the approach I was alluding to in my comment.
Comment: @bthmas Thank you; much appreciative!  -Mark
Comment: I think this is a very suiting answer because that uses things that i've seen in the course thanks again @Dr.MV
Comment: Caio, that's great!  I'm glad that this is fit for purpose.
Answer: Use binomial theorem for any index.
$$(1+x)^a=1+ax+\frac{a(a-1)}{2!}x^2+\frac{a(a-1)(a-2)}{3!}x^3+\frac{a(a-1)(a-2)(a-3)}{4!}x^4 .....$$
$$\implies \lim _{x\to 0\:}\left(\frac{\left(1+x\right)^a-1}{x}\right)=\lim _{x\to 0\:}\left(\frac{\big(1+ax+\frac{a(a-1)}{2!}x^2+ \ldots)-1}{x}\right)$$
$$=\lim _{x\to 0\:}\left(a+\frac{a(a-1)}{2!}x+\ldots \right)=\boxed a$$
$\big($ Here $|x| <1$ and $a \in \mathbb R$  $\big)$
Comment: OP says he cannot use the Binomial th.
Comment: @caverac He said because he is not sure whether $a$ is an natural number, I am saying to use for any index
Comment: It's much easier to read this quotient as a rate of variation.
Comment: @CaioPetrelli See this.This can be used for *any* $a$.
Comment: @JaideepKhare I can't really see how that makes it easier..
Comment: @CaioPetrelli See now.
Comment: @JaideepKhare Oh, I see it. That's a very beautiful approach.. I would never seen that, thanks!
Comment: The binomial theorem for any index is proved using that limit in question. So this is kind of circular.
Answer: Whenever there's $h \to 0$ on the denominator, you should think of the derivative. You have written the derivative of $y \mapsto (1+y)^a$ at $y=0$, which you can easily calculate by the chain rule.
Comment: I see where you're coming from but unfortunately I'm still looking at limits as being just limits. I'm still early in the course! But thanks that made me appreciate the simplicity of things!
Answer: Let $z=x+1$, then $x\to 0$ as $z\to 1$, and for change of variable:
$$\lim_{x\to0}\frac{(1+x)^{a}-1}{x}=\lim_{z\to1}\frac{z^{a}-1}{z-1}$$
Using the fact that $a^{n}-b^{n}=(a-b)\left(\displaystyle\sum_{i=0}^{n-1}a^{n-1-i}b^{i}\right)$, therefore:
$$\lim_{z\to1}\frac{z^{a}-1}{z-1}=\lim_{z\to1}\frac{(z-1)\left(\displaystyle\sum_{i=0}^{a-1}z^{a-1-i}\right)}{z-1}=\lim_{z\to1}\left(\displaystyle\sum_{i=0}^{a-1}z^{a-1-i}\right)=\displaystyle\sum_{i=0}^{a-1}\lim_{z\to1}z^{a-1-i}=\sum_{i=0}^{a-1}1=a$$
As desidered.
Comment: $a$ is not necessarily a positive integer.
Answer: Just in case you want to see another approach, using
$$\lim_{x\to0}\frac{e^x-1}{x} = 1$$ and $$\lim_{x\to0}\frac{\ln(1+x)}{x}=1$$
Therefore, $$\lim_{x\to0}\frac{(1+x)^a-1}{x} = \lim_{x\to0}\frac{e^{\ln(1+x)^a}-1}{\ln(1+x)^a}\cdot\frac{a\ln(1+x)}{x} = a$$


Novato em aplicativos. Por onde começar?

Question: Olá.
Desenvolvo com Ruby on Rails e PHP a algum tempo. Gostaria de criar um aplicativo agora...
Queria partir do ponto que ja sei, ou seja, usar uma dessas duas linguagens para criar o aplicativo.
Vi que existem ferramentas que fazem aplicativo em HTML 5, como o PhoneGap e o Sencha touch. E eu gostaria de partir desse ponto.
O grande porém é que eu gostaria de utilizar mapas, geolocalização e alguma API de lugares, bares, restaurantes, etc.
Dei uma olhada no Mapbox mas nao tenho certeza se ele faz esse tipo de coisa, também não sei se o PhoneGap vai me oferecer o que preciso quanto a isso.
Preciso de algumas dicas de por onde começar, algumas APIs recomendadas.
Obrigado.
Comment: recomendo dar uma olhada no Ionic http://ionicframework.com/
Answer: Se vai desenvolver com o PhoneGap, pode usar qualquer API de mapas que funcione na web, como Google Maps, Bing Maps e OpenStreetMap. Para obter a posição atual do dispositivo que está usando sua aplicação, você usa o plugin de geolocalização do PhoneGap.
Answer: Se for começar eu indicaria o https://flutter.dev/
Além de ser uma novidade, está se firmando muito bem no mercado e além disto tem muitos plugins
Você pode pesquisa no seguinte endereço: https://pub.dev/flutter/packages?q=maps
Eu já pesquisei maps para você ver um exemplo
E além disto você poderá gerar seus apps para Android e iOS
Espero que ajude


Describe sheaf properties via equalizers

Question: Let $X$ be a topological space and $\mathcal{F}$ be a presheaf on $X$, with value in the category $\mathsf{C}$.

To be more specific, $\mathcal{F}$ is a functor from the category $(\mathsf{Open}_X)^{\mathrm{op}}$ to $\mathsf{C}$, where objects in $(\mathsf{Open}_X)$ are open sets of $X$ and $\mathrm{Hom}_{(\mathsf{Open}_X)}(U,V)$ is a singleton iff $U \subseteq V$, otherwise the hom set is empty.

In this broader context above, I want to describe the sheaf property. I have seen two descriptions:
Description 1: The following equalizer diagram holds for any open set $U \subseteq X$ and its cover $\{U_i\}_{i \in I}$:
$$F(U) \rightarrow \prod_{i} F(U_i) {{{} \atop \longrightarrow}\atop{\longrightarrow \atop {}}} \prod_{i, j} F(U_i \cap U_j)$$

This is adapted from Wikipedia and the note Section 2.2.

Description 2: The following equalizer diagram is exact:
$$0 \rightarrow F(U) \rightarrow \prod_{i} F(U_i) {{{} \atop \longrightarrow}\atop{\longrightarrow \atop {}}} \prod_{i, j} F(U_i \cap U_j)$$

This is adapted from "Gortz and Wedhorn's Algbraic Geometry 1 - Schemes".

I have figured out what the two arrows means from the helpful post Definition of sheaf using equalizer.
My question 1: In Description 1, it seems that this ONLY means that the two paths from $F(U)$ to $\prod_{i, j} F(U_i \cap U_j)$ (via the "upper arrow" and the "lower arrow") coincide and they both equal to the restriction $F(U) \rightarrow \prod_{i, j} F(U_i \cap U_j)$ directly. ** I cannot see why this is the sheaf property**.
My question 2: In Description 2, we claimed that the "diagram of equalizer" exacts. But I have not found any references to really define what does the exactness mean for such a diagram.
My motivation: My original attempt is to understand when a certain presheaf is indeed a sheaf. For example, the kernel of a sheaf morphism is automatically a sheaf while cokernel and image do not. (We still need to do sheafification.) I'm trying to give a reasonable explanation of such phenomenons and it seems that by working from such categorical perspective might help. (So to some extent, I cannot accept the Description 2 since the EXACTNESS of such diagrams are quite vague and I don't know how to play with it categorially.) However, Description 1 (with merely an "equalizer diagram") may not be equivalent to the sheaf property (from my naive thought).
My question 3: How to really describe the sheaf property categorially and how such consideration shed light on my motivation? Any references are welcome!
Sorry for such a long (and maybe vague) post. Thank you all for commenting and answering.
Comment: So one thing to be careful with is that your Description 2 holds for sheaves of Abelian groups, while Description 1 is true more generally for sheaves of sets. I'll add a few more comments in a little bit to help with this, but a good exercise is seeing how Description 1 is equal to Description 2 when $F$ is a sheaf of Abelian groups.
Answer: Let's recall the sheaf axioms:

Locality: If $U$ is an open set with open cover $\{U_i\}_{i\in I}$ and $s,t\in\mathcal{F}(U)$ are sections so that $s|_{U_i}=t|_{U_i}$ for all $i\in I$, then $s=t$.
Gluing: If $U$ is an open set with open cover $\{U_i\}_{i\in I}$ and $s_i\in\mathcal{F}(U_i)$ is a collection of sections so that $s_i|_{U_i\cap U_j} = s_j|_{U_i\cap U_j}$, then there exists a section $s\in\mathcal{F}(U)$ so that $s_i=s|_{U_i}$.

Now suppose we have $T$ with a map $\varphi:T\to \prod_{i\in I} \mathcal{F}(U_i)$ equalizing our diagram. For any $t\in T$, let $t_i$ denote the image of $t$ in $\mathcal{F}(U_i)$. We see that the condition that $\varphi$ equalizes our diagram is equivalent to $t_i|_{U_i\cap U_j}=t_j|_{U_i\cap U_j}$, so there exists a section in $\psi(t)\in\mathcal{F}(U)$ which has $\psi(t)|_{U_i}=t_i$ by gluing, and this section $\psi(t)$ is unique by locality. We can therefore define a unique map $\psi:T\to\mathcal{F}(U)$ by sending $t\mapsto \psi(t)$, and therefore we've verified that $\mathcal{F}(U)$ satisfies the universal property of the equalizer of the diagram $\prod_i\mathcal{F}(U_i)\rightrightarrows \prod_{i,j}\mathcal{F}(U_i\cap U_j)$. This takes care of question 1.
For question 2, as has been noted in the comments, exactness is a feature of abelian categories. What's happening here is that we can express a binary equalizer in the category of abelian groups in terms of constructions we already know: if we have two maps in an abelian category $f:A\to B$ and $g:A\to B$, their equalizer is an object $T$ with a map $\varphi:T\to A$ so that $f\circ\varphi = g\circ\varphi$. But this is the same as saying $(f-g)\circ\varphi=0$, which we can recognize as the definition of the kernel of $f-g$. So $\ker(f-g)$ naturally admits a monomorphism to $A$, and therefore the equalizer injects in to $A$ and the image of the equalizer in $A$ is exactly the kernel of $A\rightrightarrows B$, demonstrating exactness of the diagram.
Question 3 is answered by the description of $\mathcal{F}(U)$ as the equalizer of $\prod_i\mathcal{F}(U_i)\rightrightarrows \prod_{i,j}\mathcal{F}(U_i\cap U_j)$. One of the upshots of this description is that it's rather clear why you should need to sheafify some constructions. Let's look at the kernel and cokernel of a map $\varphi:\mathcal{F}\to\mathcal{G}$. Given an open set $U$ with open cover $\{U_i\}_{i\in I}$ and considering the kernel gives us the following diagram:

Some quick diagram chasing shows that $\ker(\varphi(U))$, defined as the kernel of the vertical map, is also the kernel of the horizontal map! Therefore the kernel presheaf is already a sheaf and does not require sheafification. On the other hand, if you consider the diagram with cokernels instead of kernels, you can't prove that the cokernel of $\mathcal{F}(U)\to\mathcal{G}(U)$ is the kernel of $\prod_i \operatorname{coker}(\varphi(U_i)) \to \prod_{i,j} \operatorname{coker}(\varphi(U_i\cap U_j))$, and so you need sheafification.
Let me just quickly remark that my favorite application of sections as equalizers is that it suffices to specify a sheaf on a basis for a topological space, which can be very useful and save a tremendous amount of time.
Comment: Thank you so much for your answer! Yet I still have two points that want to make sure. Firstly, on your explanation of the Question 3, especially the "$\ker$" part, you mentioned that by some quick diagram chasing, $\ker(\phi(U))$ is also the kernel of the horizontal map. This is indeed a quite easy diagram chasing, yet do we still need to show that the first row is exact at $\prod_{i} \ker(\phi(U_i))$? (Though it seems that this is again a diagram chasing stuff).
Comment: .... Secondly, in the last paragraph, you mentioned the application that we only need to specify a sheaf on a basis for a topological space. I have read the stack project tag 009H (https://stacks.math.columbia.edu/tag/009H) these days on this. Do you mean such considerations? Or we can use equalizers to further simplify the process (simpler than the one in stack project)? Are there any references? Thank you again for your time and kind help!
Comment: Exactness at $\prod_i \ker(\varphi(U_i))$ is precisely the fact that $\ker(\varphi(U))$ is the kernel of the horizontal map. Your link to the Stacks Project is along the lines of what I'm talking about, yes - Vakil also has some material about sheaves on a base in his text. The applications I'm thinking of are a bit smaller/quicker than what's in their texts, though - for instance, [1](https://math.stackexchange.com/questions/3713019/) and [2](https://math.stackexchange.com/questions/3542790/)
Answer: Description 1 is indeed a formulation of the sheaf axiom, but the way you interpreted it is incorrect. Saying that that sequence is an equalizer does not just mean that it commutes; it means that if any other map $X \longrightarrow \prod F(U_i)$ commutes with the two arrows to $\prod F(U_i \cap U_j)$, then the map $X \longrightarrow \prod F(U_i)$ factors uniquely through the equalizer $F(U) \longrightarrow \prod F(U_i)$. That is, given such a map from $X$, we have the following commutative diagram:
$$
\require{AMScd}
\begin{CD}
F(U) @>>> \prod F(U_i)\\
@AAA @AidAA\\
X @>>> \prod F(U_i)
\end{CD}
$$
where in fact the map $X \longrightarrow F(U)$ is unique among all maps making this square commute. I wrote this diagram as a square instead of a triangle for two reasons. First of all, the AMScd package doesn't allow diagonal arrows. But this is a blessing in disguise in this case, as it illustrates that the equalizer of $\prod F(U_i) {{{} \atop \longrightarrow}\atop{\longrightarrow \atop {}}} \prod F(U_i \cap U_j)$ is not just the object $F(U)$, but the map $F(U) \longrightarrow \prod F(U_i)$. Then the diagram above essentially says that the map $F(U) \longrightarrow \prod F(U_i)$ is terminal among all maps $X \longrightarrow \prod F(U_i)$. I won't specify the category in which it is literally terminal, but I hope this gets the idea across.
For a more concrete example, we can take two maps $f_0, f_1: A \longrightarrow B$. It turns out that their equalizer is $\{a \in A : f_0(a) = f_1(a)\}$ along with the inclusion map into $A$. For instance, if $f_0 = f_1$ then this is just $A$ itself. And indeed, in this case, any map $X \longrightarrow A$ commutes with $A {{{f_1} \atop \longrightarrow}\atop{\longrightarrow \atop {f_0}}} B$, but only the identity $A \longrightarrow A$ is the equalizer. This terminal/unique factoring condition is an essential part of the definition.
Now, let's see why that is the sheaf axiom. This won't be a wholly rigorous proof but it does give the key idea. Let's take a map $\{*\} \longrightarrow \prod F(U_i)$ such that the diagram $\{*\} \longrightarrow \prod F(U_i) {{{} \atop \longrightarrow}\atop{\longrightarrow \atop {}}} \prod F(U_i \cap U_j)$ commutes. A map from a singleton is just a choice of element, so call the image of $*$ under this map $(f_i)_{i \in I}$, where each $f_i \in F(U_i)$. Then the assumption of commutativity says that $(f_i)_{i \in I}$ maps to the same thing under both maps $\prod F(U_i) {{{} \atop \longrightarrow}\atop{\longrightarrow \atop {}}} \prod F(U_i \cap U_j)$. In other words, it means that $(f_i|_{U_i \cap U_j})_{i, j} = (f_j|_{U_i \cap U_j})_{i, j}$. This is the exact compatibility for the gluing assumption! Now, since we assumed that we had an equalizer diagram, we have the following commutative diagram:
$$
\require{AMScd}
\begin{CD}
F(U) @>>> \prod F(U_i)\\
@AAA @AidAA\\
\{*\} @>>> \prod F(U_i)
\end{CD}
$$
so let $f$ be the image of $*$ under $\{*\} \longrightarrow F(U)$. Then this says precisely that $f \mapsto (f_i)_{i \in I}$ under $F(U) \longrightarrow \prod F(U_i)$. In other words, $f|_{U_i} = f_i$ for all $i$. Thus, saying that that diagram was an equalizer allowed us to take a compatible sequence of sections $f_i \in F(U_i)$ and glue them to a section $f \in F(U)$. Now, this was not a whole proof. First of all, I didn't show uniqueness of the glued map $f$, but this comes from uniqueness of the induced map in the equalizer. I also only showed that equalizer $\implies$ sheaf (with the usual gluing definition). The converse isn't too bad once you have the main idea.
Now for your second description, you made an error in transcribing it. There should not be two maps $\prod F(U_i) {{{} \atop \longrightarrow}\atop{\longrightarrow \atop {}}} \prod F(U_i \cap U_j)$. Instead, you want one arrow that is the difference of these two maps. But of course, that means we need to sensibly define the difference of maps, so this works if $F$ is a sheaf of abelian groups (or more generally in some abelian category). This way we can make sense of what that $0$ at the start is and what exactness means. That is, we say that a diagram $A \xrightarrow{f} B \xrightarrow{g} C$ of abelian groups is exact if $im(f) = ker(g)$. And we say that a longer sequence is exact if each 3-long segment like this is exact. Now, let me return to equalizer for a moment. Recall that I said that the equalizer of $A {{{f_0} \atop \longrightarrow}\atop{\longrightarrow \atop {f_1}}} B$ is $\{a \in A : f_0(a) = f_1(a)\}$ along with the inclusion into $A$. Well, if these are both abelian groups, and if the $f_i$ are group homomorphisms, then this is precisely the kernel of $f_0 - f_1$. In other words, equalizers can be computed as kernels when you're working with abelian groups, so exactness of the sequence
$$
0 \longrightarrow F(U) \longrightarrow \prod F(U_i) \longrightarrow \prod F(U_i \cap U_j)
$$
will turn out to be the same as the equalizer diagram you drew.
This last question is a harder to answer, and my expertise here is not so great. The answer, in the case of sheaves of abelian groups, seems to be that kernels play nicely and cokernels do not because sheafification is a left adjoint to the forgetful functor from the category of sheaves to the category of presheaves. This means that the forgetful functor is left exact (preserves kernels), but is not generally right exact (preserves cokernels). This is probably hard to parse, and I'm afraid I don't know this well enough to give a more elementary answer, but at the very least here are two references that give some more information (but are still very abstract):
When the the presheaf of image of morphism of sheaves is a sheaf?
Why does sheafification functor being left adjoint imply that the presheaf kernel is a sheaf kernel
Comment: Your answer and especially the step by step guidance really help a lot! The things are much more clearer for me now! The references you linked are also great! Thank you so much!
Comment: I'm glad I could help!


WebView with custom HTTP client

Question: My task is to load web site in WebView over HTTPS with unsupported by vanilla Android TLS cipher.
Right now as proof of concept I have implemented apache http client capable of doing http requests to such resources.
What is the best approach to make WebView use my custom client implementation to do all network requests?
Comment: Just a note, that the request method and headers are available since Android 5.0 in the new version of `shouldInterceptRequest` by means of [WebResourceRequest](http://developer.android.com/reference/android/webkit/WebResourceRequest.html) parameter.
Comment: I am starting to think this is impossible. I found `WebViewClient.shouldInterceptRequest()` with which I can make network requests to page resources with my own http client, but this method passes only requested url without related request information (http method GET/POST/..., http headers etc) so it can not be used for real "proxying".
Answer: Actually, the accepted answer is wrong. You do not get full information; what's missing are request bodies.
So you can implement GET or HEAD requests just fine, but POST requests are trickier.
I haven't seen a good solution for that yet. One I've come across uses JavaScript inserted into the page to collect the POST data, hand it to Java via a binding https://developer.android.com/guide/webapps/webview.html#BindingJavaScript and then performs the request in Java.
Unfortunately, the WebView will try to perform the same request again, so you need to add more hackery to make it work.
Answer: Since Android 5.0 (API 21+) you can use WebViewClient.shouldInterceptRequest(WebView, WebResourceRequest) to intercept web requests with full information and perform them with custom HTTP client.
Thanks @Stan for the tip.

WebView with custom HTTP client


Problema com código JavaScript resetando após incluir CSS

Question: Fiz um script em Java para dar o cálculo de ST para uso e consumo. O cálculo está funcionando, porém quando eu adiciono CSS para estilizar a página, ao executar o código ele aparece a resposta em milésimos de segundos e já zera todos os campos.
O que estou fazendo de errado ? Abaixo estão os arquivos ST.html e o ST.css.
ST.html
<!DOCTYPE html>

        <meta charset="UTF-8">
        <title>ST</title>
        <link rel="stylesheet" href="reset.css">
        <link rel="stylesheet" href="st.css">

        <form>

                Tipo
                <select id="tipo">
                    <option name="tipo1" value="1">Contribuinte</option>
                    <option name="tipo2" value="2">Não Contribuinte</option>
                </select>

                Origem
                <select id="origem">
                    <option name="nacional" value="1">Nacional</option>
                    <option name="importado" value="2">Importado</option>
                </select>

                Estado
                <select id="estado">
                    <option name="AC" value="1">Acre</option>
                    <option name="AL" value="2">Alagoas</option>
                    <option name="AM" value="3">Amazonas</option>
                    <option name="AP" value="4">Amapá</option>
                    <option name="BA" value="5">Bahia</option>
                    <option name="CE" value="6">Ceara</option>
                    <option name="DF" value="7">Distrito Federal</option>
                    <option name="ES" value="8">Espirito Santo</option>
                    <option name="GO" value="9">Goias</option>
                    <option name="MA" value="10">Maranhão</option>
                    <option name="MG" value="11">Minas Gerais</option>
                    <option name="MS" value="12">Mato Grosso do Sul</option>
                    <option name="MT" value="13">Mato Grosso</option>
                    <option name="PA" value="14">Para</option>
                    <option name="PB" value="15">Paraíba</option>
                    <option name="PE" value="16">Pernambuco</option>
                    <option name="PI" value="17">Piauí</option>
                    <option name="PR" value="18">Paraná</option>
                    <option name="RJ" value="19">Rio de Janeiro</option>
                    <option name="RN" value="20">Rio Grande do Norte</option>
                    <option name="RO" value="21">Rondonia</option>
                    <option name="RR" value="22">Roraima</option>
                    <option name="RS" value="23">Rio Grande do Sul</option>
                    <option name="SC" value="24">Santa Catarina</option>
                    <option name="SE" value="25">Sergipe</option>
                    <option name="TO" value="26">Tocantins</option>
                </select>

                Valor do Produto
                <input id="valorProduto"/>

                Aliquota Interna
                <input id="aliquotaInterna" value="18"/>

            <button id="botao">Calcular</button>

                Valor Total:

                Difal:

        </form>

ST.css
body {
    margin: 50px 0 0 100px;
}

.entradas {
    display: inline-block;
    border: 2px solid #3366ff;
    border-radius: 10px;
    padding: 5px;
}

.entradas label {
    display: block;
    font-size: 17px;
    font-weight: bold;
    margin: 0 0 0 0;
}

.entradas select {
    display: block;
    margin: 5px 0 15px 0;
}

.entradas input {
    display: block;
    margin: 5px 0 15px 0;
}

button {
    display: block;
    margin: 15px 0 15px 60px;
}

.saidas {
    display: inline-block;
    padding: 15px;
    font-size: 17px;
    font-weight: bold;
}

.saidas span {
    display: block;
    margin: 15px auto;
}

Comment: Ele manda para alguma outra página ou o resultado é na mesma página?
Comment: O resultado é na mesma página. Aparece no span resultado1 e resultado2.
Comment: Basta retirar as tags ``.
Answer: O problema está no botão.
O button por padrão é submit. Isso é utilizado quando o resultado aparece em outra página ou quando envia dados por post/get.
Como no teu caso o resultado é na mesma página e toda a lógica fica no cliente e não no servidor, deves inserir o type="button", assim ele não irá tentar mandar para nenhuma outra página ou api.
Ficaria assim:
<button type="button" id="botao">Calcular</button>

Comment: Funcionou perfeitamente, obrigado Matheus. Salvou minha life =D.


Can fields validation errors be displayed below the fields?

Question: Can field validation errors be displayed below the fields instead of as a list at the top of the form?
Answer: I think you are looking for something like the Inline Form Errors Module. Here is a quote about it (from the module's project page):

... allows you to place form submission error inline with the form elements. Three options are provided for setting your inline error behaviour. You can configure the default behaviour or override the behaviour on a per form basis. You can add as many forms as you like.
IFE provides three behaviors for the configured forms

Leave the messages in place, this option will copy the error messages and place them inline. The original error messages set by Drupal will remain in place
Show an alternative message, this option will replace the original messages with a generic error message such as 'Please correct all errors.'. This message can be set in the IFE configuration page. The original error messages are placed inline with the form elements
Remove all messages, this option will remove all error messages and place them inline with the form element

In all cases only the messages related to the form will be touched. All other messages will remain in tact.
Comment: It does, you just need to check the option "Show form_ids on form", visit your form and get its form_id at the bottom and finally add it back to the IFE settings page.
Comment: Thank you for your reply. I may miss something but it seems however that this module does not work for forms made with webform module
Answer: The module of the last answer is only available in alpha for Drupal 7 (but anyway, it's working for me).
But I found this one for Drupal 7, it's just a little bit less good but it does the job if you don't want an alpha version: Inline Messages. Hope it can help someone on my case.
Here is a quote about it (from the module's project page):

...  allows you to move form messages (error/status/warning) from the top of the page to just above where your form appears.
You can enable Inline Messages for your site, content editing or administration pages. Additionally you can also specify forms to include or exclude by id. It will also work for pages with multiple forms.
An example usage is with the comment form, which is typically placed at the bottom of the page. Should an error be generated when someone submits, they jump back to the top of the page. So to get back to the comment form, you have to scroll back to the bottom of the page.
Using jQuery and the jQuery ScrollTo plugin, Inline Messages will capture the $messages, place them just above your form and move the page
to the top of the form.
Answer: The Drupal Clientside Validation module transforms any form to support JavaScript clientside validation and allows the following error message placements:

jQuery selector
Top of form
Before label
After label
Before input
After input
Top of first form
Custom function

For example, here's a screenshot of a Webform in Drupal 7.x with inline error messages shown below the fields, instead of as a list at the top of the form (which is the default behavior).


Passar dados arquivo CSV para array em R (BARPLOT)

Question: Preciso plotar um gráfico em R importando um arquivo csv. Após fazer a importação do csv e chamar o barplot ele acusa que a variavel que eu importei o csv não é um vetor. Então, como eu transformo em um vetor para utilizar no barplot? Tbm gostaria de usar o header de de cada coluna pra nomear a respectiva barra, tem como? O arquivo é simples; só tem 2 linhas, uma com as headers e outra com os valores correspondentes.
Tentei assim primeiro:
    > data <- read.csv("tabela4_p2.csv", header = TRUE)
    > names <- c("Bancos", "Arborização", "EstComerc", "CasaResid","EdifResid", "ConstAband")

    barplot(as.integer(data$Bancos, data$Arborização, data$EstComerc, data$CasaResid, data$EdifResid, data$ConstAband), names.arg = names)

E deu isso aqui:
    Error in barplot.default(as.integer(data$Bancos, data$Arborização,data$EstComerc,:
    número incorreto de nomes

Depois usei assim:
    barplot(data, names.arg = names)

E deu:
    Error in barplot.default(data, names.arg = names) :
    'height' deve ser um vetor ou uma matriz

Answer: Acredito que o que você quer é algo deste tipo:
x <- data.frame(x = 1, y = 2, z = 3)
names(x) <- c("a", "b", "c")
barplot(height = as.numeric(x[1,]), names.arg = names(x))

Note que:
> as.integer(1,2,3)
[1] 1

Ou seja é um escalar e não um vetor. O seu código poderia funcionar fazendo:
barplot(as.integer(c(data$Bancos, data$Arborização, data$EstComerc, data$CasaResid, data$EdifResid, data$ConstAband)), names.arg = names)

Veja que dentro do as.integer coloquei a função c que concatena os elementos, antes de você chamar o as.integer.
Comment: Eu tava fazendo coisa errada! Deu certo de mais! Vlw!
Comment: Retornou o seguinte:  ** Error in barplot.default(as.integer(c(data$Bancos, data$Arborização, data$EstComerc,  :
  número incorreto de nomes **
Comment: sua base tem realmente uma linha e o mesmo numero de colunas que o vetor names?
Comment: A tabela é assim e fiz como tu colocou:
Bancos Arborização EstComerc CasaResid EdifResid ConstAband
  112       22       80          72            40              11