Built in cache system doesn't work in Drupal 6

Question: Recently, I have selected "Normal" (recommended for production sites, no side effects) of the Caching mode at admin/settings/performance; I can see the CPU usage is drop from 60-70 to 6-8 by accessing the Drupal site on the same PC. However, when I use another PC to access the Drupal site, the CPU usage is risen to 60-70 again. So is there any mis-configure on my Drupal site?
Comment: Did you visit the same page? Did you log in?
Answer: Drupal generates cache when a node, block, or view is rendered the first time. How much cache is served versus how much is generated on that request can depend on both that visitor's role and specific user account.
If two anonymous users hit the same page, the first anonymous user will trigger the cache to be generated for elements on that page, then the second anonymous user will receive those cached elements and the page will load faster for them.
However, if one authenticated user hits a page, then an anonymous user hits the same page, two different versions of a selection of elements on that page will be cached (for instance, if authenticated users are allowed to see a block, but anonymous users aren't).
Therefore, Drupal's caching mechanism works best when there are lots of visitors with the same permissions hitting the same non-personalized pages. If it's a site with users who sign in, and there are lots of permissions (especially field-level permissions) at play, Drupal's cache will be fairly ineffective for anything but static content nodes and blocks.
Comment: Yes, I use several anonymous user to access my Drupal site, and found that the CPU is high for each access. So your mention `Drupal's caching mechanism works best when there are lots of visitors with the same permissions hitting the same non-personalized pages` is not true in my suitation. Is it something wrong on my site, such as server setting or Drupal configure?
Comment: I'd grab the devel module and turn on SQL Query logging and see if you can identify any slow queries. Also you'll be able to tell whether or not Drupal is asking for cache, or retrieving full page requests
Comment: @CharlesYeung you might want to take a look at which process consumes the resource using `top` command...there's a possibility that this might not be related to caching completely and might be related with the type of apache server and its settings or a bad query which could be checked with devel module as suggested by the previous comment


sistema de questionario com php

Question: Tenho duvidas fiz um sisitema de questionario com php mas o resulta do só dá Resposta errada e não Resposta certa
abaixo os códigos:
HTML
<form action="questionario_analise.php" method="post" name="questionaro">
    (1) A estancia Montana é um:

    (a) Salão de Eventos
    <input name="questao1" type="radio" value="a" />

    (b) Quadra de Esportes
    <input name="questao1" type="radio" value="b" />

    (c) Cinema
    <input name="questao1" type="radio" value="c" />

    (2) A estancia Montana suporta:

    (a) 400 pessoas
    <input name="questao2" type="radio" value="a" />

    (b) 1000 pessoas
    <input name="questao2" type="radio" value="b" />

    (c) 500 pessoas
    <input name="questao2" type="radio" value="c" />

    (3) Campo Grande é :

    (a) Capital
    <input name="questao3" type="radio" value="a" />

    (b) Interior
    <input name="questao3" type="radio" value="b" />

    (c) Rural
    <input name="questao3" type="radio" value="c" />

    <input name="enviar" type="submit" value="Enviar" />
</form>

PHP
<?php
$questao1=$_POST['questao1']."
";
$questao2=$_POST['questao2']."
";
$questao3=$_POST['questao3']."
";

echo "Questao 1 = ".$questao1."
";
echo "Questao 2 = ".$questao2."
";
echo "Questao 3 = ".$questao3."
";

$resposta1 = "a";
$resposta2 = "b";
$resposta3 = "c";

$acertou=0;
$errou=0;

if ($questao1 == $resposta1)
    echo "Resposta correta
";
else
    echo"Resposta errada
";

if ($questao2 == $resposta3)
    echo "Resposta correta
";
else
    echo"Resposta errada
";

if($questao3 == $resposta1)
    echo "Resposta correta
";
else
    echo"Resposta errada
";

?>

Answer: Teste o php da seguinte forma, removendo os  do POST:
  <?php
        $questao1 = $_POST['questao1']; // Sem o
 aqui
        $questao2 = $_POST['questao2']; // Sem o
 aqui
        $questao3 = $_POST['questao3']; // Sem o
 aqui

        echo "Questao 1 = ".$questao1."
";
        echo "Questao 2 = ".$questao2."
";
        echo "Questao 3 = ".$questao3."
";

        $resposta1 = "a";
        $resposta2 = "b";
        $resposta3 = "c";

        $acertou=0;
        $errou=0;

        if ($questao1 == $resposta1){
            echo "Resposta correta
";
        }else{
            echo"Resposta errada
";

        if ($questao2 == $resposta3){
            echo "Resposta correta
";
          }else{
            echo"Resposta errada
";

        if($questao3 == $resposta1){
            echo "Resposta correta
";
       }else{
            echo"Resposta errada
";

        ?>

Implementei seu código php colocando as { nas condições  e também removi os
 dos   $questao1 = $_POST['questao1']; pois como você esta guardando o resultado em uma variável não é indicado passar html junto uma vez que ele não é um parâmetro.
Answer: Remova os
 concatenados indevidamente nos POSTs, senão a comparação não funciona.
$questao1 = $_POST['questao1']."
"; // errado
$questao1 = $_POST['questao1'];        // certo

Aplicando ao código:
$questao1 = $_POST['questao1'];
$questao2 = $_POST['questao2'];
$questao3 = $_POST['questao3'];

$resposta1 = "a";
$resposta2 = "b";
$resposta3 = "c";

$acertou=0;
$errou=0;

if ($questao1 == $resposta1)
    echo "Resposta correta
";
else
    echo"Resposta errada
";

if ($questao2 == $resposta3)
    echo "Resposta correta
";
else
    echo"Resposta errada
";

if($questao3 == $resposta1)
    echo "Resposta correta
";
else
    echo"Resposta errada
";

sistema de questionario com php


inversed use of like withquery builder

Question: All is in the title.
<code>    $qb->expr()->like('a.lieu', ':advertLieu');
->setParameter('advertLieu', $postedAdvert->getVille()->getName()."%")
</code>
This will check if in the a.lieu entry there is a substring starting with the advertLieu parameter.
I want the inverse , like this :
<code>$qb->expr()->like(':advertLieu', '%a.lieu%',);
    ->setParameter('advertLieu', $postedAdvert->getVille()->getName())
</code>
So, check if ma database entry a.lieu is contained in the parameter advertLieu
I found this : MySQL: What is a reverse version of LIKE? but How can i implement this in my query builder ?

Update

I have a similar question :
If i have a collection of entity in my database and want to check if my parameter exist in this array like :  <code>$qb->expr()->in('u.ids', $id)</code>
I mean check if u.ids contain $id. Is it possible ?
Thanks
Answer: Try this:
<code>$qb->expr()
    ->like(
        ':advertLieu',
        $qb->expr()
            ->concat(
                $qb->expr()->literal('%'),
                $qb->expr()->concat('a.lieu', $qb->expr()->literal('%'))
            )
     );
->setParameter('advertLieu', $postedAdvert->getVille()->getName())
</code>
For your update I would suggest you do this:
<code>$qb->expr()->in('u.id', ':ids');
->setParameter('ids', $id)
</code>
Comment: Thank you a lot . Maybe can you answer to my update. I have a similar case but i don't know how to implement it
Comment: Thanks for reply , for the second question, i want the inverse use. Check if the array collection ( who is in database) contain the parameter $id. In you case, it look like  i'll pass the array in parameter and not the unique id.
Comment: NVM, i found the solution , we can use like on serialized object [check here](http://stackoverflow.com/questions/19709699/symfony2-doctrine2-display-items-by-category-with-query)
Comment: Sorry about the misunderstanding. Glad you found the solution.

inversed use of like withquery builder


Why are some people so paranoid about music theory?

Question: Music theory is cool. However, I've noticed that a few genres of music tend to discourage it. I just read that learning music theory "seems like the antithesis" of being able to improvise.
Apparently, having the equivalent of a doctorate in music can actually be a disadvantage if you want to get hired as a conductor, because they think you're too theoretical.
Is there anything about learning music theory well that slows down your musical capabilities?
Answer: tl;dr People don't like it because they don't actually know what it is.

There has been and will always be a stigma against music theory and studying it. Some of the reasons I've heard on this very site are:

Music is artistic and no theory can explain art.
It makes you think rather than play.
X musician doesn't know theory so I don't have to.

There are many more arguments and while I could counter each and every one, it outlines a problem that needs to be addressed. The biggest problem is people don't understand what music theory is. People take or see an intro music theory where your hand is being held to learn and compose a certiant style and it scares most people away without them seeing a bigger picture.
Music Theory in the simplest is the study of what works and what doesn't in music and mainly focuses on tools that help you get there by dissecting a piece of music. The tools that you are given help by formal Music Theory really help in this aspect with the only flaw being they are specifically geared for a specific era of music and while it lines up pretty well with most current ones, it's not a exact. The theory itself won't tell you if it sounds good or bad to you, but it will give you the tool and terminology needed for you to find if in a more objective way.
So while there is a formal path for studying the subject, simple things like someone listening to a song and figuring out what you like and what you don't is also music theory. Every musician I know does this even the ones that speak out against theory, just the ones without theory have a much more round about way to get there/describe it.
Most people only equate music theory to an intro class that focuses on the classical era which most modern types of western music are rooted in, but there is so much more. There are pop, jazz, blues, and rock music theory classes and books that focus much more on modern songs and deconstructing them so people can learn what works and what doesn't and even focuses on slightly different types of analysis that are better geared for them. People who study music theory in depth eventually tailor their ideas towards what they find works and what doesn't using what they learned as a foundation for this and utilizes this in what they compose.
This to my knowledge is the only subject that has this problem. Even in other artistic fields like film and art the study is extremely important and no one complains about that affecting the artistic value or creativity of them.
Comment: I wonder, since this site is 'Music, Practice and Theory', whether **we** in fact have a clear definition of 'Theory'. It means many things to many people - as the answers are starting to reveal. Maybe without that definition, we're a little in the dark?
Comment: Interestingly though, both Jimi and Eddie did know a lot of theory, they just hadn't done much (if any) **formal** training. But they sure knew theory where it was relevant to them.
Comment: @NeilMeyer - I recall reading an interview with Van Halen back in the 90s in one of the popular magazines aimed at guitarists... any notion that he doesn't know music theory was completely dispelled by that.  He may have taken a non-traditional approach to learning it, but the idea he therefore doesn't understand it is completely skewed.
Comment: @Dom It's great that you had a good college professor, but many people will have already been given misconceptions by a poor teacher / book / website at a much earlier stage.
Comment: *X musician doesn't know theory so I don't have to.* I have heard that one as well. Usually the X in question is Jimi Hendrix or Eddy Van Halen.
Comment: @topomorto no Professor worth their grain of salt would ever do such a thing. On the first day of my college music theory 1 class my Professor played his favorite atonal piece and explain how there's a lot more outside of this class but we need to start somewhere. I've never come across a teacher that would shoot down any students ideas or say you can't do this outside the context of an assignment where they're supposed to be learning something. If a student is hungry for knowledge a professor will never disappoint them.
Comment: @Tim I don't think even we have a consensus and it's a problem even outside the site. People on both sides look at it in extremes and even the people in the middle will have much different ideas of what it is depending on how they were taught. I was luck enough to have several  professors and teachers with drastically different views and then I would play with musicians who also had drastically different views. The broader perspective really let's you see how fractured the ideas are.
Comment: Sorry, but downvoted, because I think you imply strongly that the problem is simply on the side of students who don't take a holistic view of what theory is. I feel that theory teachers and institutions must take as much responsibility for propagating limited ideas.
Comment: @topomorto which we should fix by having as good of information as possible here to clarify what theory is for both sides. I'm not saying there aren't some bad teachers out there and the material is perfect , but instead how we all study theory as musicians even without taking a class, reading a book or looking it up on a website.
Comment: My pet peeve when this come up: people equivocate between the intentional, conscious academic study of music theory "as a thing" and the fact that people who engage in producing music unintentionally/intuitively internalize informal rules of "what sounds good".  In my estimation, in the context of this kind of question, these are two separate things, and this answer jumps between them.
Comment: @Dave there's no real reason to separate them. At the end of the day the are going towards the same goal. The only difference is formal study gives you better terms and tools to figure it out. For example if someone has never formally learned theory, but honed in on the I-IV-V progression is that really and different then learning it the same progression via a theory class?
Comment: I think describing music theory as being about "what works" makes sense and is probably easier to digest than my personal view, which is that whether something "works" is a bit subjective, and music theory is really about if-then relationships in music. E.g., **If** you play a G major and then C major chord, **then** we call it a *perfect authentic cadence* and it usually (but not always) feels like an "ending" of sorts. To me, theory is a tool to predict the the way certain sounds/phrases/patterns/etc. will usually feel.
Answer: The issue with music theory is the same issue science runs into.  It is easy to presume that it defines rules for what sounds good at what does not.  It is easy to think that is what it does, and if you do, you'll develop the hatred of music theory that you see.
With both music theory and science, one is not trying to define what reality is.  One is not trying to define what sounds good and what sounds bad with music theory.  One is not trying to define the laws of the physical universe with science.  What you're trying to do is develop a model for how music works (or how the universe works) which you can use to make future predictions.
If viewed in this way, music theory and science are running to catch up to reality.  They're constantly evolving, coming up with new patterns.  I guarantee you that if you showed Mozart the current music theory for how jazz is constructed, he'd call you a lunatic and keep producing the sounds he knew.  And he would probably even be right... because what people thought sounded "good" has changed over the years.  People didn't want to hear Blues or Jazz in his time.
The trap that both music theory and science face is the moment you say "That can't work, because my theory predicts it can't work."  That's when the theory stops helping you and starts imprisoning you.  That's when it earns the ire many musicians give it.
If instead, you say "That can't work according to my theory, so if I want it to work, I'm going to have to stretch and expand my theory," then music theory is a brilliant addition to any musician's vocabulary.  It may even give you hints as to what direction to look.  If you have some massive dissonant chord you want to slam your listener's ears with, music theory may suggest ways to shake up your listener and get them ready for your chord-de-triumph.
Or maybe you have some rockin' guitar solo you want to shred, but you need to figure out how to convince your audience to open their minds and hear the pure-soul you had in store for them.  With a proper application of theory, you might be able to play your squealing guitar solo without having to follow it up with, "I guess you guys aren't ready for that yet. But your kids are gonna love it!"
Answer: I think the main issue is the perception of its meaning, as others have mentioned.  The perception that many seem to have is that theory is a set of rules to live and die by.  The reality is that music theory is a couple different things and can be applied in a number of ways.  Music theory is a language and an explanation, not a set of rules.  It only becomes a set of rules when you are trying to replicate a specific sound/genre/composer.  If you're trying to compose Baroque music, then you should be following its strict guidelines or you will be unsuccessful.  It's possible to accomplish this without knowing the language itself but incredibly difficult within that particular setting.
Theory is a language because it gives us words to express what is happening.  We call it the note A because of theory; we call it a major chord because of theory; we can refer to beats and rhythms because of theory.  I mean, I'm kind of misstating it when I say because of theory because that is actually theory, or at least a part of it.
Theory has given us terms to use so that we can communicate with each other, even if it's just some rock guys that don't "know" theory saying, "play the A major chord on beat 3 of the 2nd bar".  That's still theory and wouldn't exist without the extensive development throughout history.
Theory is also an explanation to tell us why certain things seem to work nicely where others don't.  Consonance and dissonance are used as tools to have a sense of tension and release within a song, such as the V-I cadence sounding good because of the leading tone having increased dissonance, desiring a resolution to the tonic.  This is made stronger by adding the 7 to the V chord since that creates increased tension with the tritone between the 3 and 7 of the chord (scale degrees 7 and 4 respectively) and the desired note of resolution for the 7 of the V chord is the 3 of the tonic.  This is an explanation for why those things sound good and work consistently.
Depending on what you're doing and where, theory can feel like a burden, specifically if you're thinking of it as a set of rules, especially if the theory that you learned doesn't apply to the style of music you're playing.  The voice leading rules for Classical music don't properly apply to Jazz, in fact, it's arguably impossible to use those rules and accomplish a traditional Jazz sound because of the differences between the genres.
The argument that music is art and therefore theory should be disregarded is nonsense.  No one is able to play music without some amount of theory, even if it's just abstract.  Most people learn names of notes and chord types and I'm sure Jimi Hendrix, the classic example of a successful musician that didn't know theory, was able to say what note or chord he was playing, even though he wouldn't know why it sounds particularly interesting when someone goes from C major to Ab major (the answer is borrowing the Ab from the parallel minor).
So I think the main cause of discouragement from the subject has to do with the thought that theory is rules.  Any band I've been in where someone didn't know theory, we had some difficulties talking about certain things, which made it harder to accomplish what we were going for.  We were able to work it out without theory lessons but if we all had a common language to discuss things, it would have gotten rid of the ambiguity of describing things based on some abstract concepts that we all think of a little differently.  I consider myself a theory geek and use it just about constantly.  I don't feel bound by rules at all though, since I understand that theory is not law.  I use theory to give me ideas about how to approach something differently, like choosing to play a different bass note to create linear motion and smooth out the bass line, or potentially changing the chord entirely.  It allows me to think of ways to transition from one song to another without stopping even though they're in different keys and I don't have to play through 20 chords to figure out the pivot chord that will work best to accomplish the modulation.  Theory gives me a lot to work with to come up with new or nontraditional ideas.  This works for me because of how much I enjoy theory but I understand that it gets in the way for others because they are then thinking about theory instead of focusing on the art of it all and that's fine.  For those people, the approach to learning theory is best described as learning all the "rules" so that you can forget them while you're playing or break them while composing or improvising, or learning the language so you can better communicate. Theory can be used differently by everyone but I think everyone can benefit from learning some amount, if only because of the ability to communicate with your collaborators.
Answer: I think the "no theory" viewpoint is often a reaction against poorly taught and applied theory. I've met plenty of musicians who've learned some theory at school. They know what a subdominant is, and they can explain Dorian mode perfectly. But they have no practical connection between those concepts and the actual music they play. The theory, if you can call it that, loses all connection to the practical.
In my opinion, this is a flaw in the teaching process. Unfortunately, people often leap to the conclusion that the theory itself is useless.
To combat this, I believe that we must always teach theory in a way that is deeply connected to the practical. If we're going to talk about cadences, don't create a big worksheet with lots of 'fill in the blank' style answers, and leave it at that. Get some music out. Listen to actual cadences. Then analyse the notes. If the student sees no practical application of the theory, they will come to the conclusion that it is useless. If we perpetuate that error, we're not helping anyone.
Theory is great, because it helps us communicate. It's great because it stops us having to reinvent the wheel. It's great because it allows us to add structure and order to our analysis. I could go on. Whilst you can certainly play without knowing any theory, why would you want to? You're missing out! If the theory is done well, it can only make you a better musician.
Now, I have referred to 'overtheoreticised' questions on this site before. I think it is worth fleshing that idea out a little more. Theory is useful when it comes to musical communication, but we must use it as the audience understands. Otherwise we're just using big words with no meaning. If your band understands that A in the key of G is really a secondary dominant, call it that. But it might be better to just call it an A. If we're not careful, we can perpetuate the idea that theory is just a bunch of useless jargon.
As a related point, sometimes the wrong theory gets applied. Is there any point analysing a pop tune using Common Practice era theory? I'm pretty sure the vocal parts will contain all sorts of 'wrong' bits. Does that mean the theory is rubbish? Of course not; you just used the wrong tool for the job. A contrived example, perhaps, but I think it's a contributing factor to the viewpoint that music theory is useless.
Now, I know there are many teachers that do theory well. I'm not intending to tar everyone with the same brush here. But I do think we should be aware of the risks of teaching badly, and do our best to correct these errors before we reinforce this myth that theory is useless.
Comment: Well said!  It sounds like you're the musician's equivalent of my answer: http://music.stackexchange.com/a/50727/13265  Have an upvote.
Answer:
Is there anything about learning music theory well that slows down
  your musical capabilities?

None that I can think of.

Music theory is cool. However, I've noticed that a few genres of music
  tend to discourage it.

Only the poor kind tends to discourage it.

Apparently, having the equivalent of a doctorate in music can actually
  be a disadvantage if you want to get hired as a conductor, because
  they think you're too theoretical.

Utter tosh, I don't know of any kind of conducting you will be able to do without a sound theoretical knowledge base.
It all factors in as to how music is perceived by the general populace. The average Joe really wants to believe that there is some sort of inborn qualities to a musician, something he or she lacks that makes doing music impossible for him / her.
People also do not want to believe that you can study music in a scientific manner. It is all about your God-given talent and where the muse takes you.
People do not want to believe that if you work at it and educate yourself in its operation, that you can become proficient and skilled.
The reality is fortunately much different. There has been literally centuries worth of investigation into what makes music sound good. A good theoretical education is nothing more than learning the results of all that vast amount of inquiry.
You are fortunate enough to live in an age where all the great music of the past is available to us. Music teaching is widespread and often (but not always) of a good quality.
Why people refuse themselves such an education really baffles me sometimes.
In the end, I subscribe to the premise that all people (and children) can learn music.  No-one was born with talent where others were not. There are only those who decide to educate themselves and those who decide not to.
In every child there is a little Beethoven just waiting to come out.
Comment: There's still a huge distinction between someone technically proficient in theory and someone who can artfully apply it though, just as the same applies in any form of art.  Anyone can learn to write music that sounds technically ok, but there's an art to making it really speak eloquently that requires a knack for it.  This is often a lot more obvious in the visual arts where people generally have a somewhat more consistent view of what looks good.
Comment: You lost me at "Only the poor kind tends to discourage it" - that's 100% subjective.
Answer: Kid grows up playing power chords on guitar, kid take a course in music theory, teacher tells kid parallel fifths are forbidden, kid thinks music theory is crap.
That's my 'in a nutshell' version of why people are turned off by theory.
So, I expect many will think I'm suggesting 'rules' turn people off. Wrong. It's the (usually) unmentioned style context of music theory. Many theory texts are European Common Practice oriented with some modernism and maybe jazz tacked on at the end. The texts may have an introduction explaining the style context, but the rest of the book, or it's application by teachers, will be along the lines of 'most of this stuff applies to all tonal music.' How it does or doesn't apply kind of falls through the cracks, and the implication is your non-common-practice music will be assessed by common-practice standards.
I think the other thing that turns people off of theory is the harmony-centric focus with the usual progression from basic diatonic to 'advanced' chromatic harmony. It creates the impression the pinnacle of great music is complex harmony, even better if it's complicated counterpoint. This kind of approach doesn't offer much to explain why a simple song can be great. That can turn people off, because it seems dismissive of harmonically simple, but very good music.
Answer: There are already some good answers here, ranging from simple laziness to trying to institutionalize art.
My experience comes from the institutional side of things because I never saw the connection between theory and practice while I was taking lessons.  It was just a pointless exercise that I had to do in addition to the fun part of learning mostly self-selected pieces.
When my family moved, we never found another instructor, and I stopped playing altogether...but I did teach myself how to run the 24-channel Mackie analog sound board in my new church's youth building.  It was all hand-me-down equipment from the main sanctuary, and no one really knew anything about it including me.
A bit of trial-and-error, and I got to where I could get a good sound fairly quickly with a live band, plus fulfilling the musicians' requests to adjust their monitors and sometimes fighting feedback from the house or from a monitor.  (like most small-to-midsize installations, the Front-of-House and Monitor Engineers were one and the same)  Several years of internet articles and YouTubes later, I can:

Just take off running on any analog sound board that I happen to find.
Figure out the menu system of a new (to me) digital sound board within 30-60 minutes and then run with that, thinking of it as a "folded" analog board with a vastly unreasonable amount of useful features if it were actually analog.
Clean up any random-flailing-to-just-get-something messes that I often see from people who really have no interest in theory but insist on being directly involved anyway.  (or are forced to be involved because everyone else flatly refused for fear of letting the magic smoke out)

Only later did I realize that I was actually seeking out theory in regards to art.  At the time, I just found it fun and wanted to be good at it.
So I guess you might compare my understanding and use of a sound board to Jimi Hendrix's understanding and use of a guitar.  No formal training, but the theory is definitely there, and forms the foundation for everything else.
If I had seen that during my formal lessons on piano and trombone, I might still be playing today, but it just never crossed my mind.  So I'd consider myself back to square one now on those instruments, just like any other instrument that I've never touched at all.
It's not a complete waste though, because I can recognize the structure of a song and predict where the band is going.  This is useful for any part of the band, including:

Musicians (obviously)
Sound guy in case different sections need slightly different settings (guitar up for a solo and back down, or backup becoming lead)
Lyricist so the audience/congregation can read them with enough confidence to sing along strongly
Lighting for different moods or energies
Etc.

One more point:
My success at sound is because I saw the value of theory and actively sought it out, not realizing until later that that's what I was doing.  But I don't think you can argue that point and convince anyone.  It's just something that a student has to "catch" on their own and pursue on their own.  If they ask for help, then by all means help them, but it can easily kill their interest to use any kind of force.
Answer: I like to compare music theory to composition "rules" and color theory in the visual arts.  All arts have a degree of commonality in form that form a language that people generally understand, whether by instinct or culture.  They are the basis by which we communicate and understanding them is very helpful to expand the tools you have available to you.
Just because one doesn't study music theory doesn't mean they don't use it.  Some people have a natural affinity towards understanding the way to communicate through their medium subconsciously, others have the creative artistic nature, but lack understanding of some elements that can be used to accent what they are communicating.
I think the threat that people tend to see is that they fear that rigorous application of theory will result in a cold and calculated work that feels dead.  There's a lot of accuracy to that thought process.  As a sound guy, I much prefer a musician that I need to teach the technical to than a technician I need to teach the music to.  A perfect application of rules often does produce a boring and disinteresting end result, but I'd also argue that isn't proper use of theory.
Part of a good understanding of artistic theory is to understand when one should break from theory to accomplish your intent.  There are really no hard and fast rules in the arts.  There are times when breaking color theory or music theory or composition is more effective at conveying your meaning than using them.  They are simply the regular structures and patterns that are useful in your toolkit as a creative artist.  There is no danger in understanding them, as long as you keep them in their proper place as one tool available to you to use, modify or discard as appropriate.
Answer: Through my career I saw a lot of people shy away from music theory for a couple of reasons:

It is boring to learn and their mind will explode - this is the problem with existing teaching materials. There are excellent videos, however, on YouTube that teach theory in a fun and easy way.
They are afraid that theory will kill their natural instinct and sound - Did you have a friend who, for example, loved rock music, went to music school and came out hating anything but jazz?

Theory does not just teach tools, it teaches opinions: "While moving perfect fifths on the fretboard has power, the more sophisticated way are 4-note chords..." Though in reality there are things that work in a context.

Music theory is not yet developed in certain genres - If you are listening to 20 seconds of music, your mind will comprehend the rules and patterns of the song - and you could imagine how it would continue. Take for example this song:

 - here after the first repetition you would feel that a IV-V-I chord progression would not make sense anywhere, or it won't have a catchy chorus with bass drops. If they did it, it would break the song's own structure and rules. How to construct this song and how to approach the composition... Good luck in finding material for it.
They are simply not curious - Some of us like to understand things and are hungry for more knowledge about the inner workings of music. Some just want to experience music by playing it, e.g. if all you want to do is playing covers in a cover band, it is an absolutely valid thing.
Answer: People are actually afraid of academia.
Music theory isn't itself going to hinder your creative process, but the way in which it is taught might. In my school, most theory professors had some sort of complex about a 4 year music program being perceived as an easy degree. As a result, they make the material more difficult than necessary and absolutely will not permit deviations from the rules, such as "no parallel 5ths", even though the Bach chorales upon which our coursework is based has occasional examples of such.
This type of forceful adherence to the "rules" of music can become so ingrained into the student's mind that it becomes hard to break tradition, and as consequence, will only be able to write period music until they re-learn to break those rules. Unfortunately, in scholastic circles, this realization that all the music they learned to write in school essentially sounds the same leads to extreme departures from any musical guideline, form, structure, etc... Thus, you have what academic circles know as "contemporary music", (contemporary meaning since the late 1800's). No joke, once I finished theory 4, we began composition I learning how to make "music" by rubbing keys on concrete and then notating it on manuscript.
So, theory itself doesn't corrupt your creativity; it has more to do with teaching it as if it is the only way to write music, and punishing departures from the rules. Self-taught composers often benefit because they think of theory as a tool, not the whole toolbox.
Comment: One of my favorite composers (Nobuo Uematsu) writes music that clearly demonstrates his understanding of counterpoint, but he apparently never attended university. So, I'll say this; school is a resource where you'll attain all the skills and knowledge you definitely need, but at the same time you'll meet many other dedicated musicians, friends, and instructors who will help you in ways other people cannot, and who may work with you in the future.
Comment: That first paragraph interests me. And the last one. So then is a music degree, you think, not always the best way to pursue a music career?
Comment: Just as an example, one of my recent gigs was a paid gig producing the music for a video game. The people I worked with? Computer science students that I met in college while I was getting a degree in music. In fact, this group of friends works everywhere from LucasFilm to Telltale Games, and I met them all at school. Not to mention, whenever I need a specific instrumental part recorded, college gave me a huge network of talented session instrumentalists. Just remember when learning theory that the rules can be broken as long as you understand *why* the rules are there. You'll do fine.
Answer:
Is there anything about learning music theory well that slows down your musical capabilities?

Definitions and sets
Partly, it depends on your definition of 'music theory' - whether, according to one's definition, the term 'music theory' covers all the knowledge one can have about making music, or if you consider that only some of the knowledge you can have about music comes under the label 'music theory'.
If you are of the opinion that 'music theory' is only some of the set of musical knowledge, then clearly it's possible that, for a given musician with a given set of goals, they'd be helped towards those goals more quickly by leaning more of the non-'music theory' knowledge than by learning the music theory knowledge. In that sense, if you consider the opportunity cost of learning the music theory, it's clear that learning it would slow you down.
Of course if you consider 'music theory' to be any knowledge you can have about music, that wouldn't make sense - it depends on your definition.
The value of the Beginner's Mind
It's not necessarily true that more knowledge makes you better at something - the idea of the 'Beginner's Mind' is often valued when it comes to creativity. Of course some might say that this is simply a state of mind, and one that can still be achieved in the presence of knowledge, but nevertheless, one can see how it might be easier to achieve with less knowledge.
Introductory courses often don't give you the bigger picture, and may even obscure it to an extent by not telling 'the whole truth'.
To quote Dom -

People take or see an intro music theory where your hand is being held
  to learn and compose a certiant style and it scares most people away
  without them seeing a bigger picture.

But that invites the question - why are so many introductory music theory courses not good at leading people towards the bigger picture?
I honestly think that a lot of beginners music theory material is lacking in context and often has a - perhaps unintentional - presumption towards certain styles.
Comment: It's worth pointing out that calculus teaching suffers from a highly analogous problem, namely starting students off with the awkward and intricate "epsilon-delta proof" in the name of perceived rigor, rather than a more intuitive approach of infinitesimals. Having also had a bad experience with a Eurocentric, rote pattern-obsessed music theory class, I relate to the issue from both angles. Students would benefit from more relatable and less narrow "entryways" in either case. Neither "must start somewhere" nor "No True Scotsman" arguments about the meaning of theory address this.
Comment: @bright-star Though it's a more general point than the one you made, the thought did occur to me that maths does suffer from a similar problem - kids being taught stuff that may not be 'the stuff they need to know', in a way that is often lacking context and may be hard to relate to. The advantage it has over music is that the maths exam may be seen as a lot more important, so kids struggle through anyway!
Comment: More of the general public, who are not musicians and don't even play themselves, have more "knowledge" of music theory than you might think. Unfortunately, this mostly gets down to being able to read music and understand some basic tonal chord progressions and perhaps 4-part chorale style writing. After that, they think they know theory. There are many, many books marketed to beginning musicians and people who are curious about theory, and this is where it ends. In math, people know the concepts go way beyond Alg I. Most people would not dare say "I know math" after completing after Alg I.
Comment: You have to start somewhere. You can't teach calculus without teaching someone algebra first. Music theory is no different and why not start with the basis of most modern music. Also about your second point you can't have absence of knowledge in music unless you've never heard any. You will form is ideas based on what you've heard which is the point of my post.
Comment: @Dom taking concepts and building on them to make more advanced concepts....  sure, that's a thing - in music and in other subjects... I don't see why you think I think it isn't :).But does common music theory teaching actually succeed there?  You've said *This to my knowledge is the only subject that has this problem* - why do you think that is?
Comment: @Dom on the second point - even if it's hard to have "no knowledge", you can still have "more knowledge" and "less knowledge". And forming ideas based on what you've heard wouldn't come under many people's definition of 'music theory'.
Comment: because the reason stated my answer which is people don't understand what it is. It's not limited to one side of the argument. And for your second comment that's what music theory is! You do it subconsciously but you still do it. I don't think we're ever going to reach an agreement on this as this is one of many instances of this argument. Honestly the mindset of this answer is one of the things that I seriously think leads to this subject is the only one with this issue. I'm not sure what happened to make you be this against the concept of theory, but it's not what you think it is.
Comment: @Dom I'm not at all against the concept of theory, especially not a holistic idea of theory. I'm not even sure what being 'against a concept' would mean. What I'm saying is that what actually  gets *sold as music theory in real life* is often something very different, so people who urge caution (or are 'paranoid', as per this question) aren't necessarily wilfully ignorant - there's a valid point there.
Answer: Perceived Threat
At the broadest level paranoia is a form of fear. And, music theory is the study of the practices and possibilities of music. Thus, we fear music theory because we fear that study of music threatens us in some way.
As for what triggers this fear I would offer that, this is rooted in the historical attitude of academic music theory to approach music in a formalized way. Music practitioners who don't or won't describe their art in formalized terms will be left out of a formal approach to music theory.
Take for example the use of sheet music in western classical music theory. Because of the fact that music was historically not a fixed media artform, academia was forced to use artifacts like the written score to study music theory. A vocabulary was developed around the artifact (sheet music itself) creating a "cult of the written score" as described by Adam Neely.
This use of sheet music is a benefit in that those who understand it have a shared vocabulary. However, it excludes many practitioners whose experience is not readily described within its vocabulary. This exclusion is perceived as a threat. It can be wielded or perceived as a tool to bring people together or as a wall to separate.
As for whether studying theory slows you down. Think of it like learning a foreign language. Our first language sets the neural foundation for what phonemes constitute language. Every language we learn after that is colored by that foundation so there is a tendency to speak with an accent. Additionally, we learn things faster and more completely during "super learning windows of opportunity" driven by regulatory genes. Learning music earlier rather than later will set it as part of your foundation. This applies equally to western classical music theory, other formalized music theory and non-formalized music.
However, our foundations create a tendency, not a guarantee. Whether this tendency becomes an advantage or disadvantage depends on how we use it. Some adult language learners are able to sound more native than others as do some who come to music later.
Answer: "You found the right person for to talk to on this party!  I have a PhD in communications and another in English grammar!  I'll be telling you what every word you say to me means!"
Great.  In other words, the problem is not a solid grasp of music theory.  The problem is viewing it as a substitute rather than an asset for the practical work with music.
Biomechanics are nice, but they are not all that important to know about for taking a walk.  Or if they are, chances are that you are really handicapped.
Comment: @dom you missed the point: the problem is not theory, its the use or assumption of theory as a replacement. Music theory really does have nothing to do with music as an act, just as knowing pluperfects are or even that pluperfect exists has little to do with your ability to verbally charm friends and woo lovers. But Theory always informs our actions.
Comment: But this answer is neither an over or understatement, it is a reframing of the problem to begin with.
Comment: This is a complete overstatement of what the theory actually is.  Complete lack of music theory is more like always responding randomly to what is asked. You can here the sounds, but when trying to convey what you want it's always going to be a challenge.
Comment: @Yorik see my answer which is the core of my comment. People don't view it the same way which is why the conflict arises.  It's never meant to replace practice or apply a one-size fits all rule to all music. Some people overstate it, some understate it both are problems as it's why it's almost impossible to discuss with other musicians.
Answer: I see many answers, but I feel like I need to add my own.
I'm going to play the devils advocate.
Music theory is full of rules. You learn about scales: notes that you are told sound good together, rhythms, dynamics, and more.
Often, those who have theory background are afraid to break these rules.
If you never learn the rules and just go by what you think sounds good, you can learn some of these rules yourself, without knowing that they are rules, and break them whenever you want, without knowing.
You can play a few random notes on the piano and make a song without knowing that you are playing an E flat minor gypsy scale. If you change scales or play a note thats not in the scale and it still sounds good, you don't need to be told that what you wrote breaks the confines of the scale that you chose to write in.
If you can focus more on how good your songs can be, and less on what scales you rip through you will make better music.
Comment: I'd draw the distinction between the theory itself being at fault, and bad teaching of that theory. I think the rule keeping attitude you raise is mostly a result of poor teaching. They don't understand the purpose of the theory, so they overemphasise it. We should remember what they say about [babies and bathwater](https://en.wikipedia.org/wiki/Don't_throw_the_baby_out_with_the_bathwater).
Comment: Ok, well we're into the world of opinion here, which is fine but not exactly what we aim for on SE.  There's definitely plenty of Classical that's not so slow but you'd be hard pressed to find a specifically "funky groove" and harder pressed to find distortion.  The reason I say that Classical has broken the most rules is two fold.  One, they basically wrote all the rules and continuously broke them to evolve music.  Two, there is some waaaay, waaaay, waaaaaaaaay out there stuff from the 20th century and beyond that seems to be further outside than any Coletrane solo or Monk chords.
Comment: Yeah, I think your thought process here is exactly what the OP is asking about. You seem to have a stigma about theory. The way I clarify for those with this sort of impression is to specify that theory is not rules.  Theory is an explanation and a language.  Theory becomes rules when you are trying to imitate a specific genre or composer. This issue seems to often be the result of academic studies, where you're specifically learning Classical theory, which has lots of rules about voice leading and such that don't properly apply everywhere. See my answer for further thoughts along these lines.
Comment: That's an interesting way to think of things but I'd have to disagree.  If we were to say that theory is rules and I were to look at punk rock, I'd see very little rule breaking going on.  They break societal "rules", at least original punk did, but not really music rules, other than maybe taste, which is outside the realm of theory. Classical has definitely done the most rule breaking too, if you really delve into the full catalog. If you think Classical is boring, maybe check out some Stravinsky or someone like that.  He laughed in the face of conformity, probably more than punkers ever did.
Comment: I have indeed met many people who have learned a little music theory and are scared to break  'the rules'. Sad but true.
Comment: What's best, I think, is to regard music theory as a means of predicting what sorts of things are *likely* to sound consistent and pleasing and unlikely to sound jarring or "off".  That isn't to say that all music should be consistent and pleasing, but rather that a music should only be jarring when the composer *wants* it to be jarring.
Comment: @Basstickler The problem is that people (Even me) get narcassistic with genres "Classical music is the only real genre" "Pop music is the best music" etc. I am a fan of metal, rock, edm, oldschool rap, and punkrock, and I find that classical music and pop are both depressingly boring. Composition should be based on punk rock, which is about breaking all the rules. Any piece of music could be punk rock.
Comment: @basstickler it's more about the spirit of punk rock then the actual music itself. And the reason I tend to dislike classical is that it is often too slow. And it has no distortion or funky groove.
Answer: In my own experience, learning theory has helped me become a better musician. I have studied theory in one way or another since the age of 3, when I started learning to read music. I knew all my major and minor scales and chords by the time I was 8. Knowing the terminology helped me communicate with musicians who were more advanced players than I was. Theory opened more opportunities. When I was in high school, I was asked to accompany a small baroque ensemble and was suddenly thrown into making up a part based on a bass line with figured bass. I had a 5 minute crash course on figured bass. I wouldn't have been able to make heads or tails of that if I did not already know my intervals, chords, inversions, keys, or what "diatonic" meant. Theory has helped me be a better performer. In jazz music, it helped me focus my choices in improvisation. In classical music, it particularly helps with being able to identify where the melody is and where to accentuate tension, etc. As a composer, no matter the style of music, understanding voice leading can help one write better lines that make the music more understandable and enjoyable for the performer.
Despite all that, I have heard from other musicians, even some composers, that theory is useless. I have heard two main complaints: 1) it is boring, 2) it kills creativity.
Analysis is boring! Rules kill creativity! That is not a problem with theory, but rather a problem with how it is taught. I love theory and have a natural affinity for it, so I didn't mind when it was taught in a boring way. I was making the connections in my own mind despite the class. However, in college I was taught theory in an analytical way, where we broke apart pieces into all their little bits or examined disconnected exercises to identify all the non-chord tones. This turns making art into a chore.
Where I went to school, theory was taught as rules. "This is how music sounds good."  Rules kill creativity because they can cause one to think that, in order to write well, one must do as the "book" says. Fortunately, this was not my inner reaction to theory. I am one who enjoys learning by observation, so regardless of the situation, I like to watch how other people have done it before trying it myself, with my own take on it. That is how I approach theory, but I can understand why others might see it as a step-by-step manual.
Theory is descriptive, not prescriptive. It only tells us how others have arranged notes. It does not tell us how we should arrange our notes. If enough people are doing the same thing around the same time, a pattern for an era develops. Unfortunately, these patterns of development are often taught as rules about "how music works." I prefer to think of it as "music arranged this way creates this effect."  Composers continue to discover new ways to use notes to create new effects. If one understands that theory only describes the development of music, one realizes that theory expanded through the centuries and is still expanding.
I teach music theory to high schoolers. I make it very clear that I am teaching them Basic Tonal Harmony. I make it clear to them that music theory goes FAR beyond what I am teaching them in the classroom, but that we have to start somewhere, and we are starting at BASIC. What I am teaching them will help them in most of the music they will play (most are not going on to careers in music), but also provides a foundation for further study. It is not the end-all-be-all. I also teach theory in a way that is NOT analysis. I teach theory in a setting that involves composition. The kids are using what they learn in class to create their own small works, from melody-writing to chord progressions, to voicing. In my opinion, music theory means nothing if it is not a practical springboard for one's own creativity, whether in performance or composition.
Comment: have you heard about Diether De La Motte? His approach is the same as yours.
Comment: @AlbrechtHügli, no I haven't. I will have to look him up, thanks!
Comment: His 2 books "Harmonielehre" and "Kontrapunkt" are both available as Pdf for free.
Answer: There are some that regard it as the holy grail: without it, one cannot be a great musician.
There are some who regard it as a boring side to music, and they can play great music without this knowledge.
Certainly reading all there is to swimming is probably not going to be of use to a non-swimmer who falls in the water, but had that person already been a swimmer, it may well help him to become a far better swimmer. I don't think that theory has been tested properly!
Theory - and remember, it's called theory because it hasn't been 'proved' in order to become a law or rules - is our way of explaining what happens. It's what humans do, pigeon holing, putting on certain shelves, ordering, et al. For some, it's essential reading, which may or may not make them much better for it. For others, it gets in the way. So many students have moaned at me, saying they'll never merely enjoy listening to a guitarist/pianist/etc, because now they have the propensity to analyse what's going on, and that's what they'll have to do!
Whilst theory is there to be respected - after all, it's taken hundreds of years and many hours of people slaving over a hot piano, whatever - but, yes, it seems to be a Marmite thing. Very dependent upon the individual. Some need to know on a need to know basis, others are happy to let it pass by and carry on making wonderful music nevertheless.
Comment: A "theory" is a set of explanations.  The Theory of Evolution is a set of explanations as to why we have different species.  Music Theory is a set of explanations as to why some musical ideas sound good or bad.  It's the same definition, but it's being applied incorrectly in this answer.
Comment: I can't help the impression, that here (4th paragraph) different meanings of *theory* are not cleanly distinguished, in [Merriam Webster](http://www.merriam-webster.com/dictionary/theory) it would correspond to 4a vs. 6b.
Comment: Exactly; music "theory" and the "theory" of evolution are very different meanings!
Comment: _it's called theory because it hasn't been 'proved'_ Well, not really. There is scientific capital-T "Theory", which is so well proven that you can rely on it for any relevant predictions: the Theories of Gravity and Evolution come to mind. There is the everyday "theory" which usually means a hypothesis or guess. Then there's music "theory" which unlike the other two is a strongly empirical set of guidelines that help us understand what sounds good within a given style of music. I suspect much of the fear of music theory is confusion with other definitions of "theory".
Comment: @MattPutnam Yes, but people often conflate "hypothesize" and "guess" with "theory." Just consider how often people say "oh, well evolution is *only* a theory," implying that it's only "some dude's guess." In other words, "a set of explanations" doesn't seem to be a specific enough definition, since it includes "a deduced and tested and improve hypothesis" as well as "some guess I had this morning."
Comment: @JonPeltier - I thought gravity had its own *law* now, upgraded from theory. Under the impression that 'theory' , once unequivocally proven, became 'law'.
Answer: All music theory is at least somewhat opinionated. It isn't just about objective facts about "what works", but also, inevitably, a lot about the theoretician's opinions. Sometimes more so, sometimes less, but it can't be avoided entirely.
Now this is of course itself an opinion, but I'd say that in classical music, a lot of theory has been written without much concern for objective truths. Rather, more as a performative act in itself, the theoretician's attempt to put his personal stamp on music history.
Even when they just teach someone else's theories, in my experience music theorists favor those theories which put themselves in a good light. And in one sense, we can't complain about that. They have to teach what they are familiar with and believe themselves.
The problem isn't really that there are opinions, but that they're institutionalized opinions. Opinions liked by a professor, who became a professor because his opinions were liked by his professors, who was liked by his professors etc. And in this academic pedigree there may be some whose reputation was instead rooted in broad popular success as performers or composers - but that's all the input from outside their world there is in classical music theory.
So, I know some people will be wary if you say you have a PhD in music theory. What they will be thinking is probably something along the lines of, "Oh man, which cult-like school of theories is this guy into? Will we be playing micropolyphonic pieces all day long?".
Answer: I will add one point that I think a lot of people who are pro-they fail to think about. One of my pet peeves, when this topic is addressed, is the last argument. I can go on about how everyone is lazy when you factor that we all refuse to do things for our own reasons. However, I disagree with the argument that not learning theory is lazy from a hard work context. By not learning theory, you make your learning process harder for yourself than learning it. In fact, I believe learning theory is easier than playing by ear with the trial and error method. As a music student, I'm realising that as I learn theory, my job as a guitar player get easier than when I was finding things on my own. So, the laziness would really lie with learning theory, honestly, laziness is why I've chosen to learn theory. I'm impatient and don't feel I have time to learn the instrument through trial.and error, so, theory will speed things up, and make learning easier.
I would also add, music can kill creativity. On a general level, no. But in personal cases, yes. There are two cases that could lead to this:

Application. The way the player applies the theory can be limiting their creativity. By, finding a new way, you can come out that rut.
Using theory when it's not necessary. There are times when turning off the theoretical mind will help bust a rut. Using theory too much can kill creativity. So, take a vacation and think of a non-theoretical way of writing.

I have found that theory can be bulky, so, I do abandon it sometimes. But then I'll use it when I want to. However, to be fair, there are famous players who do not know theory. Those players are right, they don't need to know theory to play as good as almost any player. Guitar technique is something that can be developed separately, understanding what they are doing will be difficult unless they form their own language. In this case, only they will understand what they are trying to communicate.
Theory is about understanding I believe. I don't buy into the claims that theory will make you a better player as much as people say, if anything, you will improve to a minor extent. I've learned that improvement comes from application, not simply knowing. For example, I know that a chord is made of the I, III, V. Well, that's good to know, but if I don't have the technique to access those notes in every key, what good does theory do for me in this case. I need to apply theory to my technique to truly improve as a player. So, I've found myself reading theory books, and understand what's being said, but when I look at the guitar, my playing is where it was before I started reading the book. I can understand basic theory, but I need to learn to apply it in a technical way. As I apply theory, I find my understanding of theory, gets better, and my technique gets better. Another example is if someone asked me to say the formula for a 7th or 9th chord. I can say the formula. If you asked me to state the notes, in the key of A, I can ask me to find the notes on the guitar, it will take a little time. My technique is not as fast as my mind. I'll need to practice getting to those note to become a better musician.  But then I think most theorists already know that application is key to improvement as a player. Yet, based on stories I've read, it seems players are more about the understanding than application aspects, which is why I'm explaining this. For other players who are advanced, and are learning theory, they won't experience much of an improvement since most of what they'll be doing is understanding their own technique. For a beginner, they'll likely learn theory as they learn the instrument.
Answer: Interestingly, we've been trying to answer this Music Stack Exchange question lately: can music theory sabotage creativity
Some of the most pertinent statements the question asker has about his/her/hir growing paranoia about music theory are below:

but now as my studying is getting deeper I fear that when I will compose I will be influenced by the theory, no more able to play like a child daring and inventing compositions that sound nice.
when I play an old song of mine and I see all of a sudden the scale I used I get sad knowing what it is and then I force my brain to forget it.
don't want to lose this innocence of not knowing.
is there a way to get deeper without losing this innocence
is there a way that knowing music theory will even increase creativity ?

This person fears that learning music theory will restrict his/her/hir later compositions, force him/her/hir to analyze all of his/her/hir existing compositions through theory's lens, and drain his/her/hir creativity.
And I believe this person is not alone.
Comment: I like the connection between the two posts! Although, is this an answer to the question?
Comment: @jdjazz, in terms of answering General Nuisance's question, "Is there anything about learning music theory well that slows down your musical capabilities?", this person suspects that learning music theory well will slow down his/her/hir musical capabilities by making him/her/hir lose creativity, forcing him/her/hir to forget musical concepts or lose the innocence of composing without restrictions.
Answer: I value musical theory and am working to expand my knowledge of it. It has opened new doors for me and connected islands of knowledge I'd previously stumbled into with concepts I didn't know existed. I am indebted to everyone I've learned these concepts from, whether via text, in person or remotely, however:
Some of us have had unpleasant experiences with players who use knowledge of theory to criticize and condescend, rather than share and engage in meaningful collaboration.
It's not uncommon for an enthusiastic player who has initially learned "by ear" to explore the world of theory and end up in the company of a more knowledgeable player who's more intent on upstaging and belittling, than being an effective collaborative partner. This has the effect of turning some people away from musical theory itself, rather than the person that misrepresented or misapplied its usefulness and functionality, which is unfortunate.
Constructive, critical conversations are imperative to any creative collaboration. I rely on them in my profession and my work suffers without it. Musical theory, in my mind, provides an invaluable common language and roadmap with which to facilitate that conversation. But sticking to the rules, just for the sake of the rules, is not effective creative collaboration, it's more like math, or worse, could be perceived as contrarianism. That turns off a lot of creatives, no matter the discipline.
As examples, I've had vamps and chord progressions called "wrong" because they don't fit into the harmonic scale; I've had noses wrinkled at a simple modulation and told to change it or it's not "right"; I've been argued with over chord functions at an improv jam. All perhaps legitimate things to contemplate in the context of instruction or during a break, but total buzz-kills in the midst of an active collaboration.
These experiences didn't lead me away from theory, but I know others with similar experiences who now bristle at the word. This is unfortunate for them, and perhaps their own fault for being so easily discouraged, but it's not a mystery.
Comment: @jdjazz re: edit Sorry for the curse word. I'll keep it rated-G from now on.
Comment: I appreciate the comments and have edited to better get my ideas across with out being taken as confrontational.
Comment: I vaguely agree with you because the attitude of "theoretical construct == good, deviation from it == objectively bad" was basically what I got from my music education at school, and I strongly disagreed with it, but my impression from music theorists "in the wild" (e. g. on here on on YouTube) is that all they want is to gain a better  understanding of why some things sound good and some things don't. So, uh, you could possibly have phrased your answer a bit less confrontational.
Comment: @Taschi Fair enough. I share the same desire to understand why things work and wouldn't be here if I didn't. I've read and learned a lot from the subject here. My examples of interactions with some "theorists" were meant to answer why some of us become "paranoid" about theory: not because theory is bad, but because we encounter it in an unpleasant way. You're right I could have toned down my answer - evidently the question struck a nerve with me and my answer has done the same for others here. No confrontation intended. Nothing I wrote was pointed at anybody here. Thanks for the comment.
Comment: It seems you don't intend to suggest that *anyone* who's a nut about theory lacks heart & can't play. If so, I'd suggest striking the final paragraph. Many phenomenal jazz musicians are really into theory. Many other phenomenal players are really into theory *and* are critical toward other musicians. What I take issue with is the final paragraph, which suggests that there's an innate connection between enjoying theory & playing poorly. Your main point ('many people who don't like theory were turned off by encounters with musicians who use theory as a tool to criticize') isn't confrontational.
Answer: "I've noticed that a few genres of music tend to discourage it"
Which genres?  Be specific.  Jazz is the most improvisational genre I know of and they strongly encourage learning theory.
"I just read that learning music theory "seems like the antithesis" of being able to improvise."
This is very sad.  Nothing could be further from the truth.  I will delve into this later.
"Apparently, having the equivalent of a doctorate in music can actually be a disadvantage if you want to get hired as a conductor, because they think you're too theoretical."
I've never heard this before.  Again, can you cite a reference of give examples that you know of where a PhD musician applied for a conductor's job and was turned down for this reason?  Or is this just a perception?
"Is there anything about learning music theory well that slows down your musical capabilities?"
No!  Other than a general misunderstanding and fear of learning.
Now I shall try to delve deeper into this phenomenon, drawing on personal experiences.
I think that people misunderstand what music theory is and how it is related to our use of it as a tool for creating art.  The same could be said of painting, sculpting, etc.  Does learning theoretical treatments of light, shape, geometry, perspective, etc, suddenly make you a poor painter?  Never, I have literally never heard of this happening and most artists jump at the opportunity to learn more about how to manipulate 2-dim to create 3-dim.  Of course the artist can choose to ignore this and work in abstracts, etc.  But the really good ones understand that to hook the viewer they need to express the "thing" being abstracted.  One can VIOLATE the rules of shading to create visual illusions that will mesmerize the viewer.  But you need to know the rules and how they are perceived to know how to break them.
Here is where a misunderstanding occurs.  It seems to me that when learning music theory, specifically Western Music theory including multi voice Harmony, we learn that certain combinations of tones etc "work well together" and immediately we assume that anything NOT described by these rules has no chance of working well together.  This is a common thing people do, if category A has a property then its complement must NEVER have that property or have the opposite properties.  Unfortunately this is not generally true, especially in music.
As an art form we are free to put tones together or in succession "in time" or out of time as we like.  For whatever reason, reasons that I personally do not understand and doubt that there is any real theory behind, some combinations are "generally pleasing to the listener" and others not.  What western music theory explains is this general trend that is widely accepted not only by musicians but, via trial and error, by the uninitiated audience.  In some sense you could consider what you learn in music theory as a set of "best practices" guaranteed to almost always produce "music" that is not offensive to the ear.  Whether or not it becomes a "hit" requires more than just following a rule set.
There seems to be a tendency to interpret western music theory as being sacred or almost grounded in physical law, like physics.  You can't violate the laws of physics but you can violate the "laws" of music theory.  I think people give too much credit to this body of information than it deserves, or they misinterpret what it represents.  As I said, it reflects best practices in the western musical tradition and not a universal set of unbreakable rules or laws.
Does learning this make one less musical?  Sometimes it can.  Again, this comes from how the information is presented.  Here is a personal anecdote.  I learned music formally, classically, at a very young age.  I grew up around working Jazz musicians too.  I started going with some of them on "low key" gigs just for fun in 7th or 8th grade (age 12 or 13).  I played everything by ear, noodling around.  I got a lot of complements after a while and the other players were very supportive, saying that I had "good ears".  I don't think they were fibbing, they're pretty honest and would tell me straight away if something was off.  Then comes my music theory lessons.  I learned theory in school and in private guitar lessons at about the same time.  As soon as I saw a set of rules that said "Do This" I immediately thought "Oh crap, the thing I do are not in the rules, better stop that."  Biggest mistake of my young life.  I eventually got over that and went back to playing by ear but from this experience I saw the misunderstanding that was causing a lot of my friends to stay away for theory like the plague.
The truth is you can't "think" of anything when improvising, not even how to play your instrument.  This will screw you over every time.  So on some sense everything we learn has to be ignored.  But this doesn't mean that leaning is fruitless.  What we invest in learning theory and practicing gets imprinted in our subconscious mind and works behind the scenes when we improv.  In my opinion you can NEVER get worse by learning more.  You need to put it all in context.


How to get resource utilized by rethinkdb?

Question: Is there easy way to get information, like total database size, cache used and so on in rethinkdb?
Answer: You should take a look at system tables (stored in the rethinkdb database). They contain a lot of useful information about the database. In particular, you should take a look at status tables and system stats.


angular custom pipes unable to produce output

Question:

{{val | uxpipe}}

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'fan';

  val ="Hi  welcome to angular "

}

import { PipeTransform, Pipe } from '@angular/core';

@Pipe({
    name : 'uxpipe'
})
export class Uxpipe implements PipeTransform{

    transform(value : any ){

        console.log(value);
   }
}

compiler.js:2175 Uncaught Error: Template parse errors:
The pipe 'uxpipe' could not be found ("

{{[ERROR ->]val | uxpipe}}

"): ng:///AppModule/AppComponent.html@1:7
    at syntaxError (compiler.js:2175)
    at TemplateParser.parse (compiler.js:11388)
    at JitCompiler._parseTemplate (compiler.js:25963)
    at JitCompiler._compileTemplate (compiler.js:25951)
    at compiler.js:25895
    at Set.forEach (<anonymous>)
    at JitCompiler._compileComponents (compiler.js:25895)
    at compiler.js:25808
    at Object.then (compiler.js:2166)
    at JitCompiler._compileModuleAndComponents (compiler.js:25807)

Comment: Did you declare it anywhere? See https://angular.io/guide/pipes.
Answer: Declare custom pipe in app.module.ts
import { Uxpipe } from './uxpipe.pipe';
.
.

@NgModule({
  declarations: [
    AppComponent,
    Uxpipe,
    .
    .
  ]
})


Create view and replace null values with a word

Question: I have a view and I want to change the nulls in a column with a word: other.
This is what I have tried so far:
CREATE VIEW APB1 AS
  SELECT jos_jam.postcode, location_id, description,
         category, apb.street, location, apb
  FROM jos_jam
  LEFT JOIN apb
  ON jos_jam.postcode=apb.postcode;
  FROM apb
  UPDATE APB1 SET apb = 'Other' where apb is null

That did not replace the values correctly, I also tried:
CREATE VIEW APB1 AS
  SELECT jos_jam.postcode, location_id, description,
         category, apb.street, location, apb
  FROM jos_jam
  LEFT JOIN apb
  ON jos_jam.postcode=apb.postcode;
  REPLACE(apb.apb, 'NULL') as 'Other'
  FROM apb

I get the following error for the second query:
#1064 - You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use
near 'FROM apb
UPDATE APBVolunteers4 SET apb = 'Other' where apb is null' at line 1

What does this error mean and how do I replace null values with a word in a view?
Answer: The error message refers to the semicolon before the word FROM in the first query or the word Replace in the second query.
You cannot put an update statement inside of a create view statement. That looks like you were attempting to update the database rather than update what gets returned in the view.
Also you don't need a From APB at the bottom of your statement.
The COALESCE() operator returns the first not-null value in its list of arguments.
I think this should work:
CREATE VIEW APB1 AS
    SELECT jos_jam.postcode, location_id, description, category, apb.street,
    location, COALESCE(apb, 'Other') as apb
FROM jos_jam
LEFT JOIN apb
   ON jos_jam.postcode=apb.postcode


error in javascript conditional statement

Question: I am facing an issue in javascript. if key value is true they stop it return true whereas if key value is false they shows Error.
Problem: they don't read the condition number or name value in if body. if key value is true they terminate.
How should i handle this condition? that they should also read the condition number or name value in if body.
can i use else if statement here ?

 var key = $('#key').val().trim();

 if(key != "" ){
    return true;     //value is true  if value is true they stopped it
 }

 if(key === ''){
    showError();   //this field is required
    return false;
 }

//if key value is true they don't execute my number or name condition

if ( $('#number').val().trim() === '' || $('#name').val().trim() === '' )
   {
    if ($('#number').val().trim() === '') {
    showError();   //this field is required
    }
   if ($('#name').val().trim() === '') {
    showError();   //this field is required
   }
     return false;
   }
   else{
     return true;           //always return true
   }

how can i do? anyone help me?
Comment: Your script exits execution with a value of either `true` or `false`, depending on `value`'s value so it never makes it to the `if` (exits on lines `4` or `9`). Please read what [return](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return) does. Basically you want to remove the `return true` part (line `4`). It terminates the script returning `true`. You probably want it to continue execution and get to the `if` part.
Comment: is this code part of a function?
Comment: yes but the problem if user type `key, number or name` value in input field they return the true. [@](https://stackoverflow.com/users/1891677/tao)
Comment: yes it part of function [@](https://stackoverflow.com/users/2067047/amars)
Answer: Not sure if this is what you wanted. Have a look. The code continues after checking key.

var key = $('#key').val().trim();

 if(key === ''){
    showError();   //this field is required
    let keyStat = false;
 }

//if key value is true they don't execute my number or name condition

if ( $('#number').val().trim() === '' || $('#name').val().trim() === '' || keyStat === false) {
    if ($('#number').val().trim() === '') {
      showError();   //this field is required
    }
    if ($('#name').val().trim() === '') {
      showError();   //this field is required
    }
    if (!keyStat) {
      showError();   //this field is required
    }
      return false;
    }
 else{
   return true;           //always return true
 }
Comment: thanks i try your logic [@](https://stackoverflow.com/users/2067047/amars)
Comment: i ask one thing if  `keyStat = true  or undefined ` what should i do? [@](https://stackoverflow.com/users/2067047/amars)
Answer: when you call return statement your function will exit,only code before the return statement will run
Example:

function bar(){
var key = 12

if(key === 12){
  console.log("only code before the return statement will run")
  return true; // when you call return your function will exit
}

console.log("this will be terminated")
}
 click me
Comment: thanks your response. [@](https://stackoverflow.com/users/13665108/mohammed-khaled)


JSF Primefaces row value null in Edit popup window

Question: I am using JSF 2.0 with Primefaces 3.4.2
For some strange reason I am not able to get the value in popup dialog window when a command button of row in datatable is clicked. Not sure what am I doing wrong?
Any help is highly appreciable.
I have the following in JSF page

<f:setPropertyActionListener value="#{emp}"
target="#{myMB.selectedEmployee}" />

Dialog code
<h:form id="frmedit">

<h:panelGrid columns="2" cellspacing="5">
<h:outputText value="Employee #" />
<h:outputText value="#{myMB.selectedEmployee.empNo}"
style="font-weight:bold" />
</h:panelGrid>

And finally in ManagedBean
@Named("myMB")
@ViewAccessScoped

private Employee selectedEmployee= new Employee();

with getters and setters
Update 1

<f:setPropertyActionListener value="#{emp}"
target="#{myMB.selectedEmployee}" />

<h:form id="frmedit">

<h:panelGrid id="display" columns="2" cellspacing="5">
<h:outputText value="Employee #" />
<h:outputText value="#{myMB.selectedEmployee.empNo}"
style="font-weight:bold" />
</h:panelGrid>
</h:form>

Comment: Try to user oncomplete="Dialog.show()" in place onmousedown="dlg.show()"
Answer: The three main reasons why this would be the case are

The dialog was not actually ajax updated
The property listener didn't set the value. You could easily debug this by adding some logging to the setter for that property
The bean was actually recreated and the selectedEmployee property was re-initialized per your
line:
Employee selectedEmployee= new Employee();

Per your comments on the previous answer, you should not have widgetVar and id for the same dialog having the same value

My vote is on (3). You should verify that the bean is not actually being trashed and recreated (constructor or @PostConstructor logging).
Comment: @Polppan You might need to post more of your xhtml here. I suspect your ``s are not well placed. Take your dialog for example, the `` is enclosing your dialog; that's a major no-no when using dialogs
Comment: kolossus I will try your suggestions and will come back to you.
Comment: kolossus I was go through your suggestions. For point # 2 I put a log in set method of `selectedEmployee` and log statement did not print. Besides when I checked browser console, there is no communication to server when I clicked Edit button. Is that because it is firing ajax method?
Comment: kolossus I had put enclosed dialog with `` and I have removed that put `` inside dialog. I have added mmy modified code in my question as Update 1.  Now I am able to get the selected row values in popup window, however I do have one small issue i.e. I am always getting the first row values for all subsequent rows when I click view button. What could be the reason for this?
Comment: kolossus Finally I have managed to get this working. I am not sure whether this is a bug or not, after your suggestion of putting `` inside dialog, it was not working correctly. So I have changed from `onmousedown` to `oncomplete` and it started to work perfectly. Thanks for your help, appreciated.
Comment: @Polppan, that's probably my fault: I should've also recommended `appendToBody="true"` so that your dialog doesn't wind up within the HTML body, which already has it's own ``
Answer: Try widgetVar="dlg" instead, in
 , according to this Example you should call
dialog from its widgetVar attribute
so dlg.show() refers to widgetVar="dlg" not the id
Comment: I changed to refer to widgetVar, however this didn't solve the issue.
Comment: @Polppan: try this `update("ElementID")` instead of `update(:frmedit:editDlg)` also for make sure give `widgetVar` and `id` two different value


What are the rules for NFL restricted free agents that have a first round tender?

Question: For teams with multiple first round draft picks, what are the rules defining which first round draft pick that a team would need to give up if it signs a restricted free agent (RFA) that have the first round tender? An example would be the Cleveland Browns, which have the 4th and 22nd draft picks in the first round of the 2012 draft. One writer, Bill Barnwell, noted:

If we understand the rules right, a successful bid on Wallace would
  force the Browns to give up their selection — the fourth overall pick
  — and not the 22nd overall pick they received from the Falcons as part
  of the Julio Jones trade last year.

Does anyone have a reference/citation to the rule that Mr. Barnwell mentioned?
Comment: Good question. There's nothing obvious in article 9 of the CBA preventing them from giving up the #22 pick instead, but perhaps it's covered elsewhere in the 300+ pages. I'll keep digging.
Comment: I couldn't find anything, but it's hard to prove something *isn't* true without finding explicit language to the contrary.
Comment: @MichaelMyers, agreed - I couldn't find anything either.
Answer: I finally found something in the CBA:
Article 9 Section 3 (c)

Any Club that does not have available, in the upcoming Draft, the selection choice or choices (its own or better choices in the applicable rounds) needed to provide Draft Choice Compensation in the event of a timely First Refusal Exercise Notice may not sign an Offer Sheet in such circumstances.

This seems to indicate that you get the best pick available from the team signing the player you've tendered.
Comment: I don't know that it would necessarily be the *best* pick; it looks like the team just has the option of giving you a better one if they already traded away their normal pick.
Comment: @MichaelMyers True, it's a rather flimsy argument and I wouldn't take it to a lawyer :).
Answer: To me the cba reads team must give their original 1st round pick or in the event they already traded that one away and have acquired another 1st round pick that that is better than their original then they can sign a player with a 1st round tender.


PowerShell Convert "return" to HTML

Question: I have a PowerShell script that runs robocopy on two drives for backup and then send an email with the job results. It runs every evening. When I originally wrote the script, my test backups were small enough that I could include the backup log in the body of the message, and also as an attachment. However, with the script actually doing my live backups, the log is way too long for that, well over 100MB, so I don't get notification on the job's status.
I am looking for a way to get just a summary of the job. I came across a script that will give me just what I want, but I don't know how to turn the scripts output into something I can email as an attachment, or include in the body of an email message.
The script I found is here: Capturing Robocopy Metrics: Scanning the Log File. The output I want looks like this:

LogFilePath  : 150208TargetServer_S_MSO_R.TXT
Start        : Sun Feb 08 21:00:01 2015
End          : Sun Feb 08 21:05:53 2015
Source       : \\SourcerServer\S$\Group\MSO\
Destination  : \\TargetServer\R$\Platinum_Service_Replications\Group\MSO\
TotalDirs    : 3217
TotalFiles   : 30920
TotalMBytes  : 186,863.61
CopiedDirs   : 1
CopiedFiles  : 4
CopiedMBytes : 55.84
FailedDirs   : 0
FailedFiles  : 0
FailedMBytes : 0
SpeedMBMin   : 599.840
SOURCERSERVER:
TARGETSERVER:

The line of code "I think" I need to convert to HTML is
return $dataColl, $sourceServer, $sourceDrive, $targetServer, $targetDrive, $replicatingSysAdmin, $dataObject.LogFilePath

I've tried
$Results = $dataColl, $sourceServer, $sourceDrive, $targetServer,
           $targetDrive, $replicatingSysAdmin, $dataObject.LogFilePath

and
Get-Process |
    select ProcessName $dataColl, $sourceServer, $sourceDrive, $targetServer,
        $targetDrive, $replicatingSysAdmin, $dataObject.LogFilePath |
    ConvertTo-Html |
    Out-File results.html

and even this
Write-Host $dataColl, $sourceServer, $sourceDrive, $targetServer,
    $targetDrive, $replicatingSysAdmin, $dataObject.LogFilePath

But I can't get any output other than what "return" above gives me at the command line. Can anyone suggest a way to get the HTML, or body text I'm looking for? I'm not locked in to this script so if someone has a better method, that's ok, just as long as I can stitch into my existing robocopy script.
Also, if you need me to upload any samples, I can.
Answer: i think, you have multiple types of Data here. You can create a custom object or add the remaining data to an existing Object and then convert to html.
Modify the scripts last line to below
$dataColl | AddMember -MemberType Property -Name sourceServer -Value $sourceServer
$dataColl | AddMember -MemberType Property -Name sourceDrive -Value $sourceDrive
$dataColl | AddMember -MemberType Property -Name targetServer -Value $targetServer
$dataColl | AddMember -MemberType Property -Name targetDrive -Value $targetDrive
$dataColl | AddMember -MemberType Property -Name LogFilePath -Value$dataObject.LogFilePath

then
return $dataColl

you can convert the script output to html like below.
.\script.ps1 | ConvertTo-html

Comment: Thanks for the suggestion Prasoon. Changing the last line as to what you suggested did not work for me. What I ended up using was this: `$HTML = $dataColl | ConvertTo-HTML -head $head -precontent "DR Backup Results for STKBKX103 Drive E" | Out-String` along with some HTML formatting, and then using `$Body = $HTML` in send-mailmessage. It works, and it gives me readle output, but I would really like to get output that looks like the output in my original post. Thanks again, Rick

PowerShell Convert "return" to HTML


Load video to youtube when node save

Question: I have search but not found so I need to ask.
I need a module that permit to my users to load a video into the node add form and this video need to be loaded into my youtube/vimeo page.
Is there? Please...
M.
Answer: A combination of following modules would do what you want

Media

The Media module provides an extensible framework for managing files
  and multimedia assets, regardless of whether they are hosted on your
  own site or a 3rd party site - it is commonly referred to as a 'file
  browser to the internet'.
Media is a drop-in replacement for the Drupal core upload field with a
  unified User Interface where editors and administrators can upload,
  manage, and reuse files and multimedia assets. Any files uploaded
  before Media was enabled will automatically take advantage of the many
  of the features it comes with.

Media: YouTube

Media: Youtube integrates with the Media module to make Youtube videos
  available as file entities.
Users can add Youtube videos to their site in a file field or insert
  them into a WYSIWYG area by pasting the video's URL into the media
  browser web tab. Formatter options are available to customize the
  Youtube player's appearance, show the video preview image, and enable
  the Javascript API. The 2x branch is under active development and uses
  the Youtube iframe embed that can serve HTML5 videos to mobile
  devices.

Media Mover

This is the module that would do what you have asked. I have highlighted the point you have asked

Media Mover is a set of modules which allows website administrators to
  easily create complex file conversion processes. The core of Media
  Mover is the media_mover_api module which creates a set of rules
  allowing multiple modules to interact with a file. Media Mover can
  take a file emailed to an email account, turn a file attachment into
  an FLV file, create a new node with the file data, and then save the
  file on an external file storage system like Amazon's S3 all at once.
  And that's just the start.
What you can do The core set of Media Mover modules offers lots of
  options for someone manipulating rich media.

get attachments from an email account
get attached files from nodes of a specified type
get files from previously harvested files
get files from CCK filefield and imagefield fields
get files from a FTP server, provide file tokens for user authentication as well
create a thumbnail from a video file with ffmpeg
transcode video files into web friendly (and other) formats
compress a file with zip
move a file to Amazon's S3 service
attach file back to node
save file and related data as a node
add a file to a CCK filefield or imagefield
save a file to YouTube
Comment: Unfortunately, Media Mover relies on another module to save a file to YouTube. That module hasn't been ported to Drupal 7 yet.
Answer: There is another light weight module which does the same thing well.
https://www.drupal.org/project/youtube_uploader

Load video to youtube when node save


What instrument/device is used to make the rising electronic bell-like sounds in the song "The Hall of Mirrors"?

Question: In the song "The Hall of Mirrors" by Kraftwerk, there is a background to the song that is a rising sequence of electronic bell-like sounds, as if playing an arpeggio. This is similar to what I think is an electric piano playing more pronounced single notes starting around time 4:25 in the following video of the song:

I'm wondering what the instrument or device is used to make those digital arpeggios. A simple electric piano, some kind of computer program synthesizing it, or what?
Comment: Many different synthesizers could do this. If you like this sort of thing, you should look for a hardware analog synth or a software emulation of an analog synth. After that, you have years of learning and tweaking and playing ahead of you. It's s big world but it's fun.
Comment: sounds like a "ring modulator"
Comment: Why the downvote?
Answer: Google dates the track to 1977; appearing on Kraftwerk's Trans-Europe Express album. With Kraftwerk it is maybe easy to overlook the simplicity of their equipment (in relative terms), because they didn't use conventional acoustic or 'rock' instruments. A general rundown of their equipment, by era, can be found here:
Kraftwerk Frequently Asked Questions and Answers
More specifically they list the following equipment for 'the late 1970s'.

Equipment used in the late 1970's included:

2 "Synthanorma" 16-step custom-built analogue sequencers built by Matten & Wiechers
Farfisa electric piano
custom-built electronic drum pads
Moog Minimoog
ARP Odyssey
Orchestron (see the separate entry below)

From this list we can rule out the Orchestron, which was basically built along the lines of the classic Mellotron and used by Kraftwerk for string and orchestral lines and pads.
The bass line could be coming from either the Moog, the ARP Odyssey or even the Farfisa electric piano (potentially a 'Professional Piano' model). Farfisa electric pianos are fully electronic, rather than electro-acoustic like a Wurlitzer or Fender Rhodes, and in the lower register they will sound quite like the bass on this track.
The repeating sequence could be coming from the ARP or the custom sequencer listed above. The bell-like phrase highlighted in the original question sounds like Moog or ARP work, with a patch set to have quite a metallic edge to it, possibly with two oscillators, one set to a higher octave and slightly detuned. It could potentially be the Farfisa piano, treated or driving some sort of synth hardware. Both the sequencer and the lead synth lines are both treated with tape echo; possibly a Roland RE-201 Space Echo as listed elsewhere on the site above (and period correct for 1977).
Comment: The Mellotron and Orchestron both played analogue samples, but they are not really 'built along the same lines' - the Mellotron used tape-based samples (8 seconds max I think) whilst the orchestron used samples encoded on optical disks, which could sustain as long as you liked.
Comment: Thanks for clarifying that! I think I was mixing up the Orchestron with various other early samplers. From your description the Orchestron functions like the Optigan, whereas the Mellotron used tapes of a fixed length? I read that Tangerine Dream modified a Mellotron to work on a loop, using filtering to remove the 'click' from where the tape looped. I have a recording of Kraftwerk performing in Manchester in the '70s, and there does seem to be a repeated click on some of the vocal pad sounds they used, though this might just be from a damaged Orchestron disk.


Tweaking Fermat's primality test - Why does it work and should I expect different results?

Question: Fermat's primality test states that for any $p$ as a positive odd integer, IF:
$$a^{{p-1}}\equiv 1{\pmod  {p}}$$
or in a different way:
$$a^{{p}}-a\equiv 0{\pmod  {p}}$$
THEN $p$ is probably prime.
Out of curiosity I was trying to see if I can get the same or any different outcomes, applying some basic tweaking (without the complexities of other primality tests).
I came up with the following:
For it to work: $x$ can be any positive even integer and  $p > 5$:
$$\frac{2^{(p-2)}-2}{6}-\frac{p^x-1}{4} \equiv 0 \pmod p$$
To make it even more easy, I just set $x=2$:
$$\frac{2^{(p-2)}-2}{6}-\frac{p^2-1}{4} \equiv 0 \pmod p$$
I am not sure if the results are the same as the traditional test, but so far it seems to be working as well as the traditional test.
My question is: Why does it work in general and should I expect different results?
Examples:

$$\frac{2^{(7-2)}-2}{6}-\frac{7^2-1}{4} = -7$$ $$ -7 \equiv 0 \pmod 7$$

$$\frac{2^{(9-2)}-2}{6}-\frac{9^2-1}{4} = 1$$ $$ 1 \not\equiv 0 \pmod 9$$

$$\frac{2^{(11-2)}-2}{6}-\frac{11^2-1}{4} = 55$$ $$ 55 \equiv 0 \pmod {11}$$

$$\frac{2^{(13-2)}-2}{6}-\frac{13^2-1}{4} = 299$$ $$ 299 \equiv 0 \pmod {13}$$
Comment: When you simplify your equation it becomes $2^{p-1} \equiv 1 \bmod p$.
Comment: To clear the denominators, you do have to assume that p is not even and not a multiple of 3.
Comment: @Jaap Scherphuis but how come $561$ fails in the classical and passes in the above?
Answer: Call your test term  $f_p.\,$ Wlog $\,2,3\nmid p\,$ so $\, (p,12)=1\,$ so $\,p\mid f_p\iff p\mid 12f_p.\,$ But
$$\bmod p\!:\,\ 12f_p = 12\left[\dfrac{2^{p-2}-2}6 - \dfrac{p^{2k}-1}4\right]\equiv 2^{p-1}-1\qquad $$
Therefore $\,p\mid f_p \iff p\mid 2^{p-1}-1$ so your test is equivalent to the classical test.