What is the difference between Abstraction and Polymorphism

Question: I seem to not understand two OOP concepts very well. Could you explain what abstraction and polymorphism are, preferably with real examples and code?
Thank you.
Comment: I don't think it sounds like homework, I would say he/she is just having a hard time understanding.
Comment: It's not homework, but just when I were discussing with my team, these concepts became a bit similar. That's why they make me confused. Abstraction refers to no specific detail of something, and Polymorphism refers to methods of different objects have the same, but do different task. Am I right?
Answer: Abstraction
Imagine a fraction class:
class fraction:
    int denominator
    int numerator

Now two objects of that:
fraction(obj1): denominator=-1 numerator=-1
fraction(obj2): denominator=1  numerator=1

Both objects have the value 1: (1/1) == (-1)/(-1). You wouldn't expect they behave any different to the outside. That's abstraction. You abstract the data your object holds into a logical view, even tho behind the scenes, there are other things. Theoretically, you have got a equivalence relation, with different equivalence groups:
[1]=(1, 1), (-1, -1), (5, 5), ...
[2]=(2, 4), (-2, -4), ...
...

And there is a abstraction function that abstracts the internal details to the outside:
f((1, 1)) = [1]
f((-1, -1)) = [1]

It maps from concrete values to the abstract values of an object. You do that by writing for example a constructor mapping (-1, -1) to (1, 1) and by writing a equals function for your class.
Polymorphism
Imagine a pen and two derived classes:
class pen:
    void draw(int x, int y)

class pen_thin extends pen:
    void draw(int x, int y) { color(x, y) = green; }

class pen_thick extends pen:
    void draw(int x, int y) { color(x, y) = green;
                              color(x, y+1) = green; }
and two objects:
    pen_thin(p1)
    pen_thick(p2)

Both pens can draw. your general "pen" cannot draw itself. It's just an interface to pen_thin, pen_thick and lots of other pens. You say: obj1.draw(1, 0); and whether obj1 is a thick or a thin pen doesn't matter to you as a user, neither to the compiler at compile time. The call behaves polymorphic. It's dynamic polymorphism (happens at runtime) and that's what people usually mean. Static Polymorphism happens at compile time:
class colorizer:
    void colorize(shirt s)
    void colorize(pants p)

That's called overloading. You call obj.colorize(something). If you call it with a shirt reference, it will call the version taking a shirt. And if you call it with a pant reference, it will call the pants version. The choice done here is at compile-time.
Answer: Abstraction and polymorphism are critical concepts by no means limited to OO.  Adding to the confusion, the word 'abstraction' is used multiple ways.  Here is a quick cheat sheet with one example:

Data abstraction means information hiding.  Usually what is hidden is the representation of a data structure.  Example: I implement sets, but I don't tell you whether a set is represented as a list, a balanced binary tree, or an unbalanced binary tree.  Done right, I can change representation without breaking your code.
Polymorphism means reuse with different types.  So with my set example you could create sets of Social Security numbers, sets of full names, or sets of fruitbats, all using the same code.

Obviously you can define a class which is both abstract and polymorphic.
Polymorphism is further confusing because there are two ways to implement polymorphism.  In parametric polymorphism, you can reuse the set with values of any type, or maybe any type satisfying some constraint.  The most obvious examples are C++ templates; if you write
class Set <T> { ... }

Then T is the type of objects contained in the set (the notation <T> indicates a so-called "type parameter", which is what makes it parametric polymorphism).
In subtype polymorphism, you can reuse sets only with objects whose types are subtypes of a particular type.  For example, you might be able to make sets only of objects that offer a less-than-or-equal-to method.  In a true object-oriented language like Smalltalk or Ruby, which offer so-called duck typing (us pointy-headed theorists sometimes call it behavioral subtyping), the presence of the method is good enough.  In a language like Java or C++, which conflate subtyping with inheritance, your use of polymorphism may be restricted to subclasses of a particular class.  (Java further confuses the issue by using one form of subtyping on classes and another on interfaces.)
Finally, old farts like me talk about procedural abstraction, which just means being able to take a bunch of statements that are frequently used together and plop them into a procedure or method which you can then reuse.  It's probably not germane to your question.
So, do you feel better about being confused?
Comment: So, what's the difference between data abstraction and ad-hoc polymorphism?
Answer: These two are among the most important characteristics of Object Oriented paradigm.
Abstraction.
Object orientation models the software as real world objects. However it would be too hard ( and useless ) to model ALL the properties a Customer may have, or all the properties an Employee have.
By listing only the interesting attributes of an object OO may use effectively that object for an specific domain. That's abstraction.
For instance an Employee in a HR system may have very different attributes than a Online BookStore. We abstract the details to make is useful.
Polymorphism.
Objects may behave differently depending on the "type" while keeping the same interface.
What does this means?
For instance an online store system may have two sub-classes of Employee
A) Internal employees.
B) Contractors
And a method to calculate the discount for internal purchases
The discount of an internal employee is calculated as: 10% + 2% for each worked year in the company + 2% for each.. mmhh child
The discount of a contractor is 10%
The following code to calculate the amount to pay:
 public Amount getAmountToPay( Product product, Employee internalCustomer ) {
      Amount amount = product.getPrice();
      amount.applyDiscount( internalCustomer.getDiscount() );
      return amount;
 }

Would produce different results for the two different kinds of Employee 's
class Employee {
    public int getDiscount();
}

class InternalEmployee extends Employee {
     public int getDiscount() {
        return 10 + 2 * getWorkedYears() + 2 * getNumberOfChilds();
     }
 }

 class Contractor extends Employee {
      public int getDiscount() {
          return 10;
     }
 }

This is the polymorphism in action. Instead of having something like
 Amount amount = product.getPrice();

 if( employee.isContractor() ) {
      amount.applyDiscount( 10 );
 } else if( employee.isSomthingElse() ) {
      amount.applyDiscount( 10 * 2 * getYrs() + 2 * getChilds() );
 } else if ( employee.contidions, condigions, conditions ) {
      amount.applyDiscount( getSomeStrageRuleHere() );
 }

We let the runtime to choose which one to calculate. Is like the program behaves differently depending on the type:
      Amount amount = product.getPrice();
      amount.applyDiscount( internalCustomer.getDiscount() );
      return amount;

By the way, in this example the "Amount" is an abstraction of a real life concept, that could also be represented as a double or an Integer, but maybe we have interestion methods inside that would be better if set in its own class.
I hope this helps.
Answer: Abstraction refers to the act of representing essential features without including the background details or explanations. Classes use the concept of abstraction and are defined as a list of abstract attributes.
One example of a software abstraction is Java's Object.equals(Object o) method.  You know that it will compare this object to the one passed in as a parameter, but you don't know, nor do you need to know, exactly how it will be implemented (unless you are the implementer of the class).
Polymorphism means the ability to take more than one form. A method might have different behaviors in different instances. The behavior depends on the data types used in the operation.
One of the classic examples of polymorphism uses an inheritance tree rooted in the Animal class.  All Animal's have a makeNoise() method, but the Dog class and the Cat class implement it differently.  This allows you to refer to any Dog's and Cat's using an Animal reference type.
Animal a = new Dog();
Animal b = new Cat();

Now you can call makeNoise() on either Animal instance and know that it will make the appropriate noise.  This is particularly useful if you have a Collection of Animals, and you don't know at run time exactly what type each of them really is.
Answer: short answer: abstraction is conceptual, polymorphism is behavioral
Answer: Both terms are used heavily in object oriented programming, but they are not specifically limited to that context.
Abstraction is a generalization of something else; a step higher in perspective. A heirarchy for instance can be seen as an abstraction on the organizational structure of a company. Generally it is used in the context of what things are underneath (such as their base types). The point of abstracting is to write less code that is more general in nature, so that you can run it for a larger set of problems. A spreadsheet for example is an abstraction that allows for a specific type of information storage. More?
Polymorphism is also a generalization, but one that occurs in a runtime context. A bunch of different object types are polymorphic if there is some way to access them where they are indistinguishable from each other. That is, all of the objects look and feel the same, even if they are not. The purpose of this is to significantly reduce code; you can write one generalized solution to save from writing all of the different permutations for each different type. If you write a graphics library, you'd rather just write some abstract code to handle 'shapes', then have to write code for each different type, such as circles, squares, etc.
These are both terms that are centered around properties in the code that will enable the programmers to do more with less. Less code has less bugs, is more stable and is easier to maintain. The alternative is to use "brute force" to pound out millions and million of lines of very specific (and very fragile) code. More code is harder to fix, and much harder to keep up-to-date.
Paul.
Answer: In simple term, Abstraction is conceptual and Poly is behavioral. In order to achieve abstraction in OOP, you need Poly.
Abstraction in object oriented programming is a concept or design pattern I may say, which enables better isolation, loosely coupling thus testability, and reusability and extensibility. In order to achieve all, we need poly, inheritance/extension and etc.
Comment: Or, alternatively, the design provides for polymorphism to the extent that abstraction makes it possible.
Answer: The confusion regarding the actual meaning of abstraction in the context of object orientation is comprehensible: it adds little, if something, to the concepts of inheritance, encapsulation and even polymorphism. If you master these three concepts, there is no need to concern too much with "abstraction" once it is naturally embedded in them (particularly inheritance).
To start with, note that the term "abstraction" has multiple meanings and it is not incorrect to state, e.g., that encapsulation requires abstraction: when you use access modifiers to protect the attributes of a class while exposing the methods that handle them (that's what encapsulation is), the class' user no longer needs to worry how to handle them by herself. So, in a sense, when you design a class, you abstract by properly encapsulating methods and attributes - everything the class' user needs to do is use it by invoking the right methods, and this is a form of abstraction.
Furthermore, if you think straight, polymorphism is also a form of abstraction: your code calls a method provided by some class and you have no idea how it is gonna act until that actual class type is determined (at runtime). So, it is correct to state that the polymorphic behavior is a kind of abstraction.
However, when used as a standalone term to describe the characteristics of OOP, abstraction must be understood as the proper representation of the system under discussion in the form of a suitable class hierarchy. As such, abstraction is the result of the designer's mental processes that culminate in an appropriate design for the classes that are gonna be used in a program. To quote an (excellent!) post that can be found at the javarevisited blog:

... Abstraction hides details at the design level, while Encapsulation
  hides details at the implementation level.

While the above statement is correct, I find the "hides details" part misstated - I would rephrase it as something like

Abstraction concerns with design details, deciding how the class hierarchy should look like, Encapsulation hides details
  implementation.

To be fair with the author, this very idea is put beautifully along his article. The term "abstraction" with this connotation is also seen in good books like Head First Object-Oriented Analysis and Design, and I quote a statement from there:

Whenever you find common behavior in two or more places, look to
  abstract that behavior into a class, and then reuse that behavior in
  the common classes

Notice the usage of abstraction here: "look to abstract that behavior into a class". Now, if to abstract means to design a class hierarchy properly as suggested above, abstraction could be defined as the representation of a domain by using classes conveniently, taking advantage of the concepts of inheritance and encapsulation.
In the particular case of Java, abstraction is implemented by using interfaces and abstract classes while encapsulation is implemented with the private, protected and package access modifiers.
Answer: Abstraction and Polymorphism are similar in nature with a different purpose.
For ex.
A driving license: you are given a license mentioning the class of vehicles you are allowed to drive. The license mentions the class of vehicle allowed by the authority but it doesn't define or mention which specific car or brand you should drive. This is Abstraction.
here License is an Abstract class and its method, the allowed vehicles is its Abstract method.
Now, here, Polymorphism is different ways individual License is alloted by the authority to different people, some are issued for light vehicles while some for heavy and some are given for commercial vehicles, according to different requirement. Here, License is a base class, and other kinds of licenses are its child classes, also obeying the is-a relationship. Commercial License is a License.
So, Abstraction is a general guideline giving independence of implementation to the follower classes while Polymorphism is differential approach which override the methods/rules set by parent class.
Answer: P.S: recently started learning java answer is based on my observation please correct me if i am wrong.
Abstraction and Polymorphism basically deep down does almost same work in programming .
let's Take a car for example..
it doesn't matter whether it is a Ford mini-van, Ferrari exotic, Land-Rover SUV or a BMW sedan they all follow a basic design of a car i.e an engine, a steering wheel , a gear box , lights , indicators and list goes on . what makes them different is their specific implementations like Ferrari might have a more powerful engine than a mini van, a suv might have a different gear box
hence A car (Superclass over here) has been implemented by subclasses (sedan, suv , mini-van, exotic)
This is polymorphism,  a basic idea being inherited or implemented by adding other specification. a 4 wheel vehicle (superclass) being implemented in various forms (subclasses)
Now, Abstraction , by definition it means hiding the details and making user see what is required by him..
Let's take example of car again.. You use gear but you don't know exactly the mechanism of how exactly the gear works and changes speed and all..
Now over to coding Part.
Abstract classes are incomplete classes and for a class to be abstract as the name suggest they need to have an incomplete method that needs to be completed by the subclass inheriting the superclass , IF they don't complete the abstract method they will stay incomplete as well.
abstract class car {
  abstract void gear();
}

class sedan extends car {
 public void gear()
 {
  //complete the method
 }
}

also you can not create objects of abstract classes because class is not complete. Yet these abstract classes can have static methods , arguments , concrete methods BUT for them to be abstract they need one abstract method. So one basic abstract superclass is implemented in other subclasses where they complete it
By looking at the method declaration we can estimate what exactly the method is doing, what it is going to return. But we don't know how exactly the abstract method will be implemented.
By using abstract classes or interfaces , we can achieve abstraction in Java.
As we all know that abstract classes, interfaces contains abstract methods
We can only estimate how they will work . We get to know how they work, once we provided the method implementation in the classes which implement the corresponding abstract class or interface.
HENCE, abstract basically helps polymorphism.
Answer: very easy.

Abstraction is abstraction. Class 'Student' is an abstraction of a real student.
Polymorphism is when one class represents another so that user won't notice. This could happen when classes implement the same interface or one class derives from another. Class 'HighSchoolStudent' is derived from class 'Student'. When class 'Teacher' calls #attendance method on the object it might not know whether this object is of 'Student' class or 'HighSchoolStudent' class.


Defense of a server against malicious uploaded resources

Question: We know that viruses and other threats can propagate through mail etc.But when any resource is shared,it is uploaded to the server and then shared.This means that the server does not take the responsibility of cleaning the uploaded files of viruses.Then how does it ensure self defense and secure the resources present on it and various services running on it?
Comment: Keep the admin from looking at shared content. One exploited Doc, PDF, etc. and the game is over.
Answer: The server should do validation on the user submitted file. E.g. If you allow the user to upload an image file for their profile picture, you should make sure that the file is a JPEG or PNG file and not an EXE file.
More info : http://www.waytocode.com/2012/file-uploading-validation-in-php/
If you are running a file sharing service and allow all types of files to be uploaded.
Even if a malicious file to be uploaded, it will not infect your system as long as you do not execute it. For added security, set the executable flag to be off so that it cannot be executed through any means.
Comment: "it will not infect your system as long as you do not execute it."  I disagree.  Some malware takes advantage of renderers.  It doesn't have to be an EXE and doesn't have to be executed.


Alternative to Google Play when publishing Android game app (.apk)?

Question: In order to register as a game developer and publisher of the Android app for Google Play Developer account, you must pay around $100. But what if there's a tight budget, especially for indie game developers from the start? I want to know where can I find alternatives to publish and promote Android game apps with no registration cost. It is something like a stepping stone.
Comment: You only need to pay $25. It's still could be a lot of money, but definitely less, than $100
Comment: Unfortunately, service recommendations are not on topic here.
Comment: @Bálint Oh! I see...approximation is too large to guess. I exactly remember that right price now.
Comment: @AlexandreVaillancourt I see. Then, there is no other good option but to invest it.
Answer: You can host the .apk anywhere online and just let the users download and install it manually. The down sides of this approach are many, for example discoverability (most people find all their applications only in Google Play) and lower level of trust (people are less likely to trust something outside of Google Play).
Having said that, this approach is used successfully by some apps, notably some betting companies do it this way due to Google Play's stance on gambling apps.
Comment: Come to think of it, if improvise a download website to promote an app, there are some penalties. For example, let's say an Android game app that has an ads attached such as AdMob. According to AdMob, usingthe live ads will result to a penalty for suspension. The only choice is to set a price tag per download via website programming skills in a way to promote or asking for donations (chances will be a hit-or-miss as most users tempted to download for free anyways).


How to use RemoteWebDriver + WebDriverBackedSelenium to connect to current grid (Not Grid2)

Question: If I can make use of RemoteWebDriver + WebDriverBackedSelenium and then connect to the existing selenium grid (Not Grid 2 that is recently released)
I need this to be able to provide backward compatibility in our framework, so that our users can make use of Selenium2 libraries and still work against the grid.
Following is how I am trying to get this done:
URL remoteAddress = new URL("http://mymachine:4444/");
//have tried using the below commented out lines as well, but in all cases I face errors.
//URL remoteAddress = new URL("http://mymachine:4444/grid/register");
//URL remoteAddress = new URL("http://mymachine:4444/wd/hub");

RemoteWebDriver driver = new RemoteWebDriver(remoteAddress, DesiredCapabilities.firefox());
Selenium selenium = new WebDriverBackedSelenium(driver, "http://www.google.com");

I have a Grid running on "mymachine" in port "4444" and it does have Firefox Remote Controls hooked on to it.
The moment the statement
RemoteWebDriver driver = new RemoteWebDriver(remoteAddress, DesiredCapabilities.firefox());

gets executed I get all sorts of errors.
Just wanted to know if Selenium2 does indeed provide backward compatibility to work with Grid 1, by making use of WebDriverBackedSelenium.
I am using Selenium 2.03b version.
Answer: You should use the same Selenium 2.03b version for grid too. You can manually update the jar in /vendor folder.
Comment: AJ : Can you please help elaborate your answer ? I didnt quite get you


PTC fuse resistance characteristic?

Question: I'm currently working on a project where I have to take into account the resistance of the in series PTC fuse, however after reading the datasheet I found two specs for resistance Rmin and R1max. I did a little more research and I came across this application note which states the following:
"Figure 4 shows typical behavior for a PolySwitch device that is tripped and then allowed to cool. In this figure, we can clearly see that even after a number of hours the device resistance is still greater than the initial resistance. Over an extended period of time, the resistance will continue to fall and will eventually approach the initial resistance.However, since this time can be days, months, or years, it is not practical to expect that the device resistance will reach the original value for operational purposes"
So my question basically my question is the use of R1max as the resistance of the PTC fuse the general consensus for engineering desing involving PTC fuses?
Thanks
Comment: +1 for interesting info on PTC fuse. But, seriously, you want general consensus to dictate how you design around two very clear parameters? Its pretty clear, if you want your project to behave well after a PTC trip, design for the R1max. If you want it to be fickle and maybe do something weird (I don't know, turn on the 'check engine' light or something), design with Rmin.
Comment: The value will be something between Rmin and Rmax, so if you're depending on its exact value you're going to have trouble.
Answer: One should design a device to work adequately (and safely) with any resistance between RMin and RMax.  In most cases, one would want the resistance to be as low as possible, and so RMax is the most relevant specification.  There are, however, some cases where knowing that the resistance will not fall below RMin may be very important.  Among other things, the RMin will limit peak fault current to (E/R) in the event of a short-circuit, even the supply could output much more.  If RMin weren't specified, it might be necessary to add series resistance to ensure that peak currents stay within allowable limits [even with RMin specified, resistors might still sometimes be necessary, but specifying RMin will allow them to be eliminated in many cases where they're not].
Answer: Yep, short circuit current can be up to \$V_{in}/R_{min}\$ initially and as low as \$V_{in}/R_{1max}\$ an hour after a trip.
So it would be prudent to design so that the device protected by the PTC operates with resistance between \$R_{min}\$ and \$R_{1max}\$. The longer you can tolerate down time after a fusing incident, the closer you can design for between \$R_{min}\$ and \$R_{max}\$ instead.

PTC fuse resistance characteristic?


wiring for garage lights

Question: I would like to change the light setup in my garage. Right now there is one switch that controls 3 lights, I would like to change to 3 Switchs that controls 6 lights.... 2 lights per one switch, can you show me a simple way to do this
Comment: Can you post photos and/or a diagram of the existing setup? Also, where do you want to put the switches and lights, and are the garage walls finished or not?
Comment: This is really easy take power to each of the 2 lights from 1 switch  or 3 total if this is two complex hire a electrician .
Answer: Take power to each switch. Then feed neutral, ground, and a switched hot to each set of lights.

Grounds not shown for simplicity

wiring for garage lights


Should I install vapor barrier over drywall behind a shower surround?

Question: I read that hanging a polyethylene sheeting on top of the drywall (between surround & drywall) was recommended because if moisture penetrates the surround, it stops at the sheeting and does no damage.
However, at least 2 people replying on another person's similar question stated no sheeting / vapor barrier should be used. Might you change your mind about this based on them indicating it to be on top of drywall instead of behind it?
Answer: The article was a bit sketchy on a few details, but remained consistent in saying you need a vapor barrier.  Of course installation behind the drywall  (or whatever backing is used) will offer no protection to that surface.
Though it is a bit pricy, I recommend a rolled on liquid barrier such as Redguard or Aqua Defense on the backing regardless what it is. It is actually good protection that will not tear, and provides an isolation membrane under tile, if that is you final surface.
Using this type of water/ vapor barrier has saved me repair costs when there were accidents, or abuse, or just plain years of use in my rental properties.
I believe it is the way to go.
Comment: ty so very much for the quick reply, really appreciate insight shared. I'm not tiling, will be an acrylic surround instead - no grout to worry about failing as has happened w/ shower just demo'd; but I was thinking the same until I found this video where he did a test - a seemingly very methodical and thought out process even with measurements for mil coverage; and it ended up with water filled bubbles.., ;-/ https://youtu.be/z-5egEwIxzk  he even has a video about kerdi systems failing. i'm at loss, was up till 3am trying to find best approach. silveRboard under drywall appears to be 1 option.
Comment: I watched your video, and found some basic errors were done in application.  A glaring error was filling the box with water.  The product is not made to be the frontline defense for a tub of water.   I saw a youtube video of a guy that coated a cardboard box with redguard, filled it with water and left it on his deck for 3 weeks with no leaks !    A real world simulation would be spraying it with some water, or filling and dumping it out after a few seconds.  Your shower will not be filled with water overnight. The product routinely performs it's intended purpose.
Comment: A liquid product over the sheathing behind your acrylic surround will be the best protection you can get in the real world, and is looked at as overkill by many in the bath remodeling trade.  Forget the pseudo science, techy ,spec heavy youtube vids and sleep well .
Comment: so glad you gave this insight on video! i want to insulate walls; if you will, are you comfortable sharing what specific products you would use? i work fulltime job as well, & being up till 3am cannot happen again - all to probably still not be confident in what I'm using..  so far i was looking at these: 1) rockwool unfaced stone wool batt  2) then silveRboard on top/across studs 3) then drywall - except i can't find green anywhere, purple is all i can find 3) waterproof product - redguard or is there a better one? **I'm getting old, can't keep doing this kind of labor with future issues. lol
Comment: to be clear are you insulating interior walls for sound deadening?
Comment: yes, precisely.
Comment: we also share a wall with another townhome, and can hear their toilets flush - it's muffled, not loud; but....
Comment: If it were me I would use simple R13 craft faced fiberglass between the studs, then water-resistant drywall, ( blue-board or Purple here in my location)  Then coat it with Aqua Defense, from the blue big box.  Then install my acrylic shower and sleep well.
Comment: THANK YOU THANK YOU THANK YOU!!! I'm so very grateful for your time and efforts to help me; especially the specific products you would use. looking online now to purchase. a gazillion thanks is not enough! :}
Comment: I am so sorry! last question RMD: do I put face of insulation towards shower or away from shower. I looked online & since found 2 separate sources, 1 shows facing towards shower & other shows no facing towards shower but both seem to be interior walls. ;-/. And, for our back wall of the shower - i'm certain the shared wall neighbor's shower is on that wall too, so I'd need to know if faced should be against shower, if so I'd have to split 2 & put each face facing each shower, correct?
Comment: sorry for the delay, was working today.  Craft face on the shower side.   Relax...you are way overthinking this.
Comment: gosh, i dunno - they say the side the facing goes on matters and I don't want more issues down the road. thanx again, really appreciate you and your guidance! :}
Comment: You are putting the insulation up for sound and an auxiliary purpose to block vapor from the shower.  However you already have a vapor barrier with the Aquadefense.  You are ULTRA protected.


In major keys, since the 7th scale degree resolves up to the 8th, does descending through the scale degrees 8-7-6 violate the leading tone rule?

Question: I need to understand how the leading tone (7th scale degree) functions in major keys.
I see that the 7th scale degree (leading tone) resolves up to the 8th (the tonic) because the leading tone is a half step below the tonic.
But in descending motion from the tonic, is it okay for the 7th scale degree to resolve to the 6th (i.e. 8-7-6)?
Comment: You've hit on a very tricky issue in music theory.
Answer: Eh... no. Specifically: no, I would not consider that to be a violation of the rule. I don't know about what your learning resources are going to say about this, but back when I learned this stuff, that walkdown from tonic to fifth was a specifically listed exception to the leading tone "rule" in voice-leading. In general, though, leading tone tends strongly to lead upwards to tonic in that style.
Here's a PDF of some other internet person who also mentions this exception, and although not all sources explicitly list this case as an exception, think about it - it makes a lot of sense that this would happen. The whole point is that during that descending line, you're often not really in a cadential resolution. More of a harmonic motion than a movement from unresolved to resolved, if you catch my drift.
Answer: In particular situations, this 8–7–6 line in either of the outer voices is acceptable.
When harmonizing a melody with I–iii–IV, this 8–7–6 melody line is very common; see "Puff the Magic Dragon." Part of the reason this works is that the 7 here isn't really a leading tone in the same sense that it is when 7 is harmonized with V. The iii chord doesn't have as strong a tendency to resolve to I as V does, so this 7 in the soprano is comparatively weaker and can move down.
But even when the 7 in the melody is harmonized with V, it can still go down to 6 in the right circumstances. Typically this is in a deceptive cadence, where the V moves to vi instead of to I.
But this 8–7–6 line can also happen in the bass. Often it harmonizes a I–V6–vi progression, but it can harmonize others (including a pretty rare I–iii64–vi!).
And in most cases, this 8–7–6 line in either outer voice continues on to 5, but it doesn't have to.
Answer: The rule of resolving the leading tone upwards concerns the progression V-I and V7-I, vii-I, vii dim7-I (dominant-tonic). Exception: in the middle voices the leading tone may go downwards to the 5th in purpose to have a full chord. (s. example of link user 45266.)
There are  other cases where we have other harmonic  progressions like iii-IV, V-IV, V7/vi-vi where the 7 doesn't have the function of a leading tone.
A melody with the line 8-7-6 is often harmonized with secondary dominants or the 7th is treated as a passing note.
Answer: I think you want to distinguish progressions that exemplify tendency tone movements from other kinds of harmonic movement and also whether the tones are real chord tones rather than embellishing tones.
Tendency tones like the following are mostly about tonic/dominant progressions...

...^7 the leading tone moves up to the tonic, because the progression is I V I.
If the progression is different and the goal isn't the tonic chord, then ^7 moves to some other degree appropriate for the chord...

...^7 doesn't move up to ^1 because the chord is IV6 and the voice with ^7 descends to ^6 while ^1 is in the upper parts.
When the line isn't moving to chord tones only but instead includes embellishing tones the concern is more rhythmic rather than harmonic and the leading tone isn't playing a harmonic role...

...this progression is just I V - it's actually an elaboration of the first two chords in the first example above. The ^7 in the bass part in m. 1 is just a passing tone, it's essential meaning is rhythmic and embellishing. The really harmonic tones of the bass are just ^1 to ^5. The ^7 that is the actual harmonic leading tone would be the one in the soprano in m. 2.
You can simplify all this and pretty much just use a rule of thumb that the leading tones moves like ^1 ^7 ^1 except when you have a continuous line descending like ^1 ^7 ^6 ^5. But I think it is better to step through the examples showing the differences in progressions and embellishing motion.
Answer:
But in descending motion from the tonic, is it okay for the 7th scale degree to resolve to the 6th (i.e. 8-7-6)?

Not all motion is resolution.  It's perfectly fine to have an 8-7-6 melody in which the 7the degree moves to the 6th, but you wouldn't normally say that the 7th degree resolves to the 6th.  Either the motion from 7 to 6 is not a resolution or the 7 has temporarily lost its function as a leading tone (for example if it is the fifth of the secondary dominant of the minor submediant, that is, of V/vi).
A common way to harmonize that melody, in fact, is I-V-vi, as in Pachelbel's Canon, where the second cycle of the canon has 8-7-6 (against the next voice playing the first cycle's 3-2-1).
Answer: Melody trumps everything else.   Even in the walled garden of hymn-tune style SATB writing, a strong melodic line excuses a multitude of sins.
In the wider musical world, leading notes regularly go just about anywhere of course.


How do I trigger a PostBack with arguments from Javascript?

Question: This is what I'm doing: Using jquery, I'm popping up a "form" over the page that lets the user search for branches of the company and select the one they want. When the form pops up, they can type in a textbox, and it will do AJAX requests back to the server to return the top n results for what they've entered, and those results will be put into a list for them. I want the user to be able to select one by clicking a link that says "select" or something, and at that point I want it to do a PostBack have the Branch Selector control that this is in change it's SelectedBranch property to the newly selected branch. I've got this all working right now with a hard coded list of LinkButtons, but how do I do the same thing with a dynamic list of links inserted with jquery?
Answer: Look at the HTML that gets emitted for your hard coded LinkButtons. You'll see that each one calls the JavaScript __doPostBack function when clicked. I believe this function takes two arguments: a control ID and an extra command argument you can use for your own purposes.
I would suggest adding a single control to the page whose only job is handling events for the dynamic links. Then, when you are creating the links with jquery, make each one call __doPostBack, passing the event handling control's ID for the first argument and some other string for the second argument that identifies which link was clicked. In the Click event for the handling control, look at the second argument value and do what you need to do.
Comment: You've covered the basics, but it's more complicated than that. You've not mentioned IPostBackEventHandler or the difference between ClientID and UniqueID, or ClientScriptManager.GetPostBackEventReference.
Answer: The short answer is... you don't.
ASP.NET relies on the Viewstate for the current state of the controls, including items in a DropDownList or similar control.  Dynamically updating a list on the client will not modify the viewstate, so will not be available on the back end.
The general workaround for this is to just add a hidden field which updates/stores the current selection via js on the client side.  Then read it from this field on the backend rather than List.SelectedValue.


Can I contribute money to a Roth IRA that I had previously withdrawn?

Question: I had contributed $1800 to a Roth IRA for the year of 2021. I had to withdraw $550 of it during the summer but I want to contribute that amount back to the year of 2021 if it is possible. I use Fidelity for my Roth IRA and when I select transfer it only gives information about 2022 contributions. I want to know if I can still put my contributions back for the year of 2021
Answer: If you withdraw money from your IRA, you have no more than 60 days to put it back before it is final. This is called "indirect rollover". You can only do one indirect rollover per year, at most.
Once the 60 days passed, you can no longer "return" it, you can only contribute new funds. Funds can be contributed during the year to which the contribution is attributed and up to the tax date (before extensions) of the next year. I.e.: for 2021, you could only contribute new funds until April 18th 2022 (April 15th was a holiday in DC).
Answer: No, you cannot do that. The deadline for making contributions to your IRA (traditional or Roth) for the 2021 tax year was April 15, 2022. It is now October 2, many months past the deadline.
Answer: No, in October 2022, you cannot re-contribute what you had withdrawn from your Roth IRA during 2021 (or before April 15/18 2022, the last date to make an IRA contribution for 2021).  That ship has already sailed, and Fidelity is quite right to offer you choices for 2022 contributions only.
Answer: Of note is it doesn't actually make a difference. Even after the 60 days, but before the April 2022 cutoff, you still could have contributed up to $4200 more for 2021, so whether you call it "putting $550 back" or contributing another $550 for 2021 wouldn't have mattered. Since we're in October now you can't code anything for 2021.
You can still contribute up to $6000 for 2022, and unless you are planning to max that out and wish you contribute even more than that, it also doesn't matter that you missed the window for more funds in 2021.


What happens when the centripetal force is equal and opposite to the centrifugal force?

Question: We say that centrifugal force is fictitious, yet we still use it in some problems. If the centrifugal force is equal and opposite to the centripetal force wouldn't that make the net force zero?
Comment: The title of the question should serve as a title to the whole question and one should probably avoid writing the text of the question in literal continuation of the phrase/sentence in the title. In other words, the body of the question should be such that it can convey some meaning on its own and need not be read in literal continuation of the title.
Comment: @CarlWitthoft Yes you can. In fact the object does exactly what expect it to do. Remain motionless (within the rotation frame of reference where the Centrifugal force appears).
Comment: @DmitryGrigoryev While the titles are similar, I would say that question is somewhat different and is asking about the misconception of the centrifugal force as a reaction force to the centripetal force and starting with the assumption that the forces do *not* cancel out. I think it's a related question rather than a duplicate. I should also note that the OP of this question didn't choose the title it currently has.
Comment: I am really sorry for title.I keep in mind for next time
Comment: You can't simultaneously have a real and a fictitious force, so the concept of "cancelling" cannot apply.
Comment: @Aron Well yes, but working in a rotational frame is rarely helpful.
Comment: @CarlWitthoft I'm sure car designers would disagree with you, and you should thank them that you don't fall out of the car, and instead are kept stationary in the rotating frame of reference of your car turning a corner.
Answer: The centrifugal force is a "fictitious force" that appears when working in a rotating coordinate system.  Basically (together with the Coriolis force) it's the imaginary force that would, if real, make objects move with respect to a fixed, non-rotating coordinate system in the same way that they actually move (due to inertia) with respect to the rotating coordinates that we're using.
If all that sounds really confusing, please see the second half of this earlier answer I wrote, where I try to explain this in more detail (and with pictures!).
Anyway, the point of these fictitious forces is that they let us apply the same laws and formulas of Newtonian physics in a rotating frame of reference as we would in a non-rotating one, and still get physically correct results, as long as we remember to also include the effect of those imaginary forces on all objects.
For example, in a normal non-rotating coordinate system, a stationary object will remain stationary if (and only if) all the forces acting upon it cancel out, so that the net force acting on the object is zero.  In a rotating coordinate system, an object which is stationary with respect to the coordinates (i.e. rotating along with them around the same axis at the same speed) will remain so if (and only if) all the real and imaginary forces acting on it cancel out, leaving an (apparent) net force of zero.

Here's a simple example, taken from the answer I linked above.  Imagine two spheres floating in space near each other.  If you do nothing, they'll just keep floating there.  If you push each of them in different directions, then they'll each float in the direction you pushed them, away from each other.  But if the spheres have been tied together with a string, then the tension of the string will exert a centripetal force that will curve their trajectories into circles:

Now, if we look at the same system of two spheres and a string in a coordinate system which is rotating along with them, then the spheres will look as it they were motionless.  But clearly something is still pulling the string taut (and, if it's elastic, stretching it), counteracting the tension force that is pulling the spheres together.  We call this apparent force (which is really just inertia, hidden by the fact that our coordinate system is rotating) the "centrifugal force":

In this example, since the spheres are motionless with respect to the rotating coordinate system, and since the centripetal and centrifugal forces balance out, they will remain motionless with respect to the rotating coordinates — i.e. they will continue to rotate around the same axis at the same speed.
Answer: First, it must be stated that Newton's laws only hold in inertial frames. What this means is that accelerations must arise from forces (Second Law), and these forces arise from interactions (Third Law). The issue with rotating frames is that accelerations arise when forces of interactions are not present, so Newton's laws do not hold in rotating frames.
However, the second law ($\mathbf F=m\mathbf a$) is nice to use since it tells us how to determine the position and velocity of a body given initial conditions. Therefore, we define "fictitious" centrifugal and Coriolis forces in order to keep this framework. They are "fictitious" because they are an artifact of the rotating reference frame rather than interactions, but they are not fake (for example, they are very real for anyone going around a sharp turn in a car). Essentially we have opted to abandon the third law in order to keep the second law.
Now, onto your specific inquiry: If you are in a rotating frame, and there is a force equally opposing the centrifugal force, then yes the net force is zero (assuming no Coriolis force either). Therefore in the rotating frame there is no acceleration of the object in question.
Of course, if you looked at the scenario from an inertial frame you would have a non-zero acceleration of the object as there is now a non-zero net force that is the centripetal force.
Comment: You should emphasize that Newton's laws are defined for inertial frames and that the treatment of non-inertial frame by applying inertial pseudo-forces is a lash-up to lets us apply the machinery of Newtonian mechanics to situations other than those for which in which the subject finds its natural expression. Otherwise you invite misunderstanding.
Comment: @dmckee I agree those are good points to make. I have added information pertaining to this. Thanks for the suggestion.
Comment: "Essentially we have opted to abandon the third law in order to keep the second law" That's one way of thinking about it, but you could equally well argue that we invented "gravity" to avoid abandoning the third law and keep the second law (and also keep Euclidean geometry) in the real world we live in, and inventing other so-called "fictitious forces" in non-inertial reference frames isn't really much different.
Comment: @alphazero I usually try to stay in the framework specified by the tags. But that is a good point.


How do I solve the differential equation $f(t) - f''(t) = \frac{\pi}{2e^t}$?

Question:
$$f(t) - f''(t) = \frac{\pi}{2e^t}$$

--
I would have been able to solve it if the right side was a constant.
Can someone please fully solve it. I feel really dumb right now..I've been stuck on it for a very long time
Comment: I don't get the logic of why we're substituting it as $e^{\lambda t}$
Answer: Take $g(t)=f(t)-f'(t)$ and get $g(t)+g'(t)=\frac{\pi}{2e^t}$ or $$\frac d{dt}(e^tg(t))=\frac{\pi}2$$
That is $f(t)-f'(t)=\frac{\pi t}{2e^t}$ which implies $$\frac d{dt}(-e^{-t}f(t))=\frac {\pi t}{2e^{2t}}$$ or $$f(t)=-\frac{\pi}2e^t\int te^{-2t}dt+c$$
Comment: Happy new year to you too! Cheers!
Comment: I'll get $f(t) - f'(t) = \frac{\pi t}{2e^t}$
Comment: $\frac{d}{dt}(-e^{-t}f(t)) =e^{-t}(f(t)-f'(t))$
Comment: Can you please fully solve it :) I've been stuck for a really long time
Comment: Thank you, can you tell me why we ignored the integration constant in the second step? it gives a diff result if we consider it.
Comment: Oh never mind..stupid me..the result remains the same. Happy new year :)
Answer: Hint: let $y=ze^{-t}$.
Which differential equation does $z$ satisfy?
Why this choice:
We see that the term on the right hand side is of the form $g(t)e^{-t}$, where $g(t)$ is a constant in this case. What I want to do is get rid of this $e^{-t}$ term so that I will get an easy differential equation. But I know that $(e^{-t})'=-e^{-t}$, so I know that no matter how many times I differentiate any function of the form $ze^{-t}$, I will still get a factor $e^{-t}$, so that I will be able to divide both the right hand side and the left hand side by this term, which will lead to an easy to solve differential equation.
Note: it is only a coincidence in this case that the right hand side is of the form $e^{\lambda t}$. In general, with the method I gave, you can solve the equation for any power of $e$. So it would work for $e^{3t}$ or $e^{-5t}$. There are shortcuts for the case $e^{\lambda t}$, though.
Answer: Hint:
The r.h.s. has the form $C\mathrm e^{-t}$, and $-1$ is a root of the characteristic equation. Try  a particular solution of the form:
$$y_0(t)=Ct\,\mathrm e^{-t}, \quad C\in\mathbf R. $$
Answer: Hint:
Substitute $g(t)=f(t)+f'(t)$
then your equation become a first order equation:
$$f(t) +f'(t)-f'(t)-f''(t)=h(t)$$
$$g(t)-g'(t)=h(t)$$
Answer: It's good that you don't get the logic of substituting it as $e^{\lambda t} $. The right approach is not learning such cheap tricks but to solve the equation step by step.
If we use the symbol $D$ to denote differentiation with respect to $t$ and powers of $D$ to denote repeated differentiation so that $$Df(t) =\frac{d} {dt} f(t), D^{n} f(t) =\frac{d^{n} } {dt^{n}} f(t) $$ then we can think of polynomials in $D$ with constant coefficients so that $$(a_{0}D^{n}+a_{1}D^{n-1}+\dots+a_{n-1}D+a_n)f(t)=\\ a_{0}f^{(n)}(t)+a_{1}f^{(n-1)}(t)+\dots+a_{n-1}f'(t) +a_{n} f(t) $$ This way of thinking has certain advantages in the sense that we can then add / multiply such polynomials according to the usual rules of operations with polynomials (this needs to be proved by the way and its not difficult to do so).

The equation in your question can then be written as $$(1-D^2)f(t)=(\pi/2)e^{-t}\tag{1}$$ The right way to solve such equations is to understand that a linear equation of type $$(D+a)p(t)=q(t)\tag{2}$$ can always be solved by multiplying the above equation with $e^{at} $. Note that $$D(e^{at} p(t)) = e^{at} Dp(t) +a e^{at} p(t) =e^{at} (D+a)p(t) $$ and hence multiplying equation $(2)$ by $e^{at} $ gives us $$D(e^{at}p(t))= e^{at} q(t) $$ Integrating this equation with respect to $t$ gives us $e^{at} p(t) $ and hence $p(t) $. Thus we need to solve $(1)$ by reducing it to a series of equations of type $(2)$. How? Just by factorizing the polynomial occurring in the equation $(1)$.

Thus we rewrite $(1)$ as $$(1-D)(1+D)f(t)=(\pi/2)e^{-t}$$ and set $$(1+D)f(t)=g(t)\tag{3}$$ so that $$(1-D)g(t)=(\pi/2)e^{-t} \tag{4}$$ The given equation $(1)$ is thus reduced to a set of two linear equations $(3),(4)$ which are easily solved in succession as described earlier. Thus multiplying $(4)$ by $e^{-t}$ we get $$-D(e^{-t} g(t)) =(\pi/2)e^{-2t}$$ On integrating we get $$e^{-t} g(t) =\frac{\pi} {4}e^{-2t}+c$$ or $$g(t) =ce^{t} +\frac{\pi} {4}e^{-t}$$ Equation $(3)$ can now be solved in similar manner by multiplying it with $e^{t} $ and we then have $$D(e^{t} f(t)) = ce^{2t}+\frac{\pi}{4}$$ On integrating we get $$e^{t} f(t) =\frac{ce^{2t}}{2}+\frac{\pi t} {4}+d$$ or $$f(t) =Ae^{t} +Be^{-t}+\frac{\pi} {4}te^{-t}$$ where $A=c/2, B=d$ are arbitrary constants.

It should be noted that the above procedure involves writing the equation using differential operator $D$ and factoring the polynomial in $D$ (also known as characteristic polynomial of the equation) down to the linear factors and handling each factor one by one.
Answer: Hint: Use characteristic equation $1-\lambda^2=0$ and find the general solution, then with $y=Ate^{-t}$ find particular solution.
Comment: Happy new year :)
Answer: I use for simplicity $K=\frac {\pi} 2$
$$f(t) +f'(t)-f'(t)-f''(t)=Ke^ {-t}$$
Multiply by $e^t$
$$f(t)e^t +f'(t)e^t-(f'(t)e^t+f''(t)e^t)=K$$
$$(f(t)e^t)'-(f'(t)e^t)'=K$$
integrate both side
$$(f(t)e^t)-(f'(t)e^t)=Kt+C$$
Divide by $e^{2t}$
$$\frac {f(t)e^t-f'(t)e^t}{e^{2t}}=e^{-2t}(Kt+C)$$
Then,
$$-(\frac {f(t)}{e^{t}})'=e^{-2t}(Kt+C)$$
Integrate again,
$$f(t)=-e^{t}\int e^{-2t}(Kt+C)dt$$


Set "Backspace" to Go Back in Nautilus

Question: I'd like to press "Backspace" to go up/back in file explorer as I do in Windows. However, My OS is Debian 9 and I'm using Nautilus(GNOME nautilus 3.22.3) and "Alt + Left Arrow" is assigned for this function. How can I change it? I tried a few methods that used for Ubuntu but they didn't work.
Answer: Nautilus currently doesn't support shortcut's customization. There are many similar threads as this one with complaints about Nautilus' lack of shortcut customization and the old solutions available don't seem to work in 2020.
Backspace is probably not enabled by default for navigating one folder back because it might create issues when editing a text (for example if you are trying to rename a file/folder), although Microsoft Windows Explorer and even older versions of Nautilus handle it very well.
In my opinion, the current default Alt+← totally kills the usability in navigating through folders on Nautilus when you can't use one hand on the keyboard to move backwards.
One way that I have found to work around is to enable the "Allow folders to be expanded" option on Preferences/Views. This way, you can navigate using ← and → keys.
Answer: On https://askubuntu.com/q/289535/676490 are several solutions to this problem.
I used https://askubuntu.com/a/1212889/676490
if [ -f "/etc/debian_version" ]; then
 sudo apt-get install python-nautilus
fi
if [ "$(grep -Ei 'fedora|redhat' /etc/*release)" ]; then
 sudo dnf install nautilus-python
fi
mkdir -p ~/.local/share/nautilus-python/extensions
cd ~/.local/share/nautilus-python/extensions
wget https://raw.githubusercontent.com/riclc/nautilus_backspace/master/BackspaceBack.py
killall nautilus

The file BackspaceBack.py contains:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# by Ricardo Lenz, 2016-jun
# firstname.lastname@example.com
#

import os, gi
gi.require_version('Nautilus', '3.0')
from gi.repository import GObject, Nautilus, Gtk, Gio, GLib

def ok():
    app = Gtk.Application.get_default()
    app.set_accels_for_action( "win.up", ["BackSpace"] )
    #print app.get_actions_for_accel("BackSpace")
    #print app.get_actions_for_accel("<alt>Up")

class BackspaceBack(GObject.GObject, Nautilus.LocationWidgetProvider):
    def __init__(self):
        pass

    def get_widget(self, uri, window):
        ok()
        return None

I recommend before installing nautilus-python-extensions, to make a basic check if the code looks suspicious like malware. (Don't know if such malware could exist, but I prefer to be on the safe side.)

Set "Backspace" to Go Back in Nautilus


Cross-Distro Compatibility- What's stopping it?

Question: For example, why can't I run Ubuntu programs on Fedora or Arch, and vice versa? And on the same note, why can't I use apt-get in Fedora or pacman in LFS? And what about .deb and .rpm files? Could someone please explain for a complete Linux novice?
Comment: You can get pacman in LFS, you just have to build and install it.  The LFS docs have a section on building and installing the deb package management systems.  Alien is a way to convert from rpm to deb that works sometimes.  Not worth posting as an answer, but possibly informative.
Comment: What about running, say, "Distro XYZ" programs in "Distro ABC"?
Comment: You can sort of.  It just takes lots of tweaking.  It's about different ways to manage what goes where, dependency chains, and other almost trivial but non-trivial things.
Answer: There are several layers of the problem, mainly:

binary compatibility - software in each distribution is compiled against libraries from that distribution. These may differ in the compiler/compiler flags used for building them and/or selected features. Hence you could hit problems where some pieces of a library from distribution A being not available in the same library in distribution B. Software from A running on B could be looking for something that just isn't there.
package management - you can use several package management systems, but it's bound for troubles, because they don't know about each other. If you use pacman to install X, then rpm on the same system won't know about it. And that's just the beginning - next thing is rpm overwriting some file from a package installed via pacman, thus very likely breaking the package in question and likely something more (see 1.).
There are some tools that can convert packages from one format to another, but these are often rather useless exactly because of 1.
A lot also depends on what package manager you stack on top of what. Compiling your own versions on an underlying distribution is fine, you just have to keep track of the installed files yourself. Using advanced package managers on top of LSB is likely to be more problematic, because they might remove/change files for which they think they are free to do so.
Comment: @cloudcoder2000, Doesn't LFS compile everything? Use the source!
Comment: In an LFS system, would it be possible to run Ubuntu programs, since you can get `apt-get`?
Comment: @cloudcoder2000 LSB mandates that a system must accept `rpm`. In `debian` based distros there is `alien` for this compliance.
Comment: @cloudcoder2000 sure it would be possible, I never said it's impossible - there are just quite some obstacles if you want to use it on a larger scale. The more applications from other distributions you decide to use, the more likely you are to get the system screwed.
Comment: @peterph Have any distro/program tried to create cross-distro compatibility? The closest I can think of is packageKit.
Comment: @cloudcoder2000 again: it's not just question of being able to install packages in various formats, it's about binary compatibility of libraries and binaries and about configuration compatibility. As for PackageKit, the only thing it really does, is presenting the user with a single interface (front end) to various package management systems **on different distributions**. It might make the user experience "compatible", but that's as far as it gets.
Answer: Just to add some small points to peterph's answer
Here I illustrate with a minimal C example how trying to run a program against a library it wasn't compiled against can fail (or not): https://stackoverflow.com/questions/2171177/what-is-an-application-binary-interface-abi/54967743#54967743
The consequence of this is that the only way to ship a reliable cross distro binary is to ship all its library dependencies with it, which is what formats such as snap, flatpak, etc. do. The result is a much larger software package than a distro-specific build, which can rely on native .so dependencies, but it is the only alternative to having distro-specific releases.
Peter does however mention one more issue in passing: you cannot ship multiple versions of certain system components easily like you can ship .so shared libraries. The X server is an example, but perhaps the kernel itself is the most fundamental one.
These are typically runtime components that are running at all times waiting for user input to respond to (server like), and which distros normally only support one of at a time. If an incompatibly with those comes up in those, then it becomes a question of how much you need to visualize to get your software running properly. The extreme case would be "you have to run a full virtual machine like QEMU", but the more you virtualize, the slower things get, so there's a tradeoff.
Answer: They are all the same programs; it's just a matter of how they're packaged.  The biggest reason is simply because you want to have the management of the packages centralized.  Each distribution's package manager is not compatible with packages from a different distribution, so to brute force install a package from a different distribution (without converting it) you would have to have multiple package managers managing packages.  This causes problems with each one being unaware of which packages the other might be managing.  So, you will end up with a lot of conflicts between them.
On the note of using a package manager with LFS, there really isn't much stopping you from using apt, pacman, or yum on top of LFS.  I wouldn't recommend it though.  It could work if you were to try right now.  You could compile Arch Linux's pacman, configure it to use Arch's repositories on top of an LFS system.  There is a possibility that it could work if you provided everything in the "base" package.  If it works now, there's no guarantee that it will continue to work in the future.  You could end up with conflicting and incompatible libraries, major changes to how the filesystem is set up (like Arch's recent move from /var/run to /run).  The package maintainers are expecting the system the packages are being installed on to be a certain way, so if you can guarantee that your LFS system will meet those expectations, it should work.  It would require a lot of maintenance on your part though.


Rules concerning long vowel sounds

Question: I am not a native english speaker and I find it   difficulty to  identify some of english words with long vowel sounds.                        I read rules concerning long vowel sounds but there are some words with vowels of long sounds which i think they should have short sound and i don't know why they pronounce those vowels long. May be there are other rules which i don't know.
                      Forexample which rule makes vowel "a" in words like "brazen" and "flagrant" to have long vowel sounds?
Comment: English writing is a lot like Chinese in that the way the word is written only gives you a clue about how to pronounce it, it doesn't give you the exact pronounciation.
Comment: Unlike in, say, Spanish, English spelling does not provide a reliable indication of pronunciation. Words with similar spelling may be pronounced quite differently. Even when there seems to be a rule or pattern (e.g., bar, car, far, jar, par, tar) an exception will come along (war).
Answer: As with many aspects of English, there are no "rules", but there are some "guidelines".
The main guideline has to do with "open" and "closed" syllables.  An "open" syllable is one that ends with a vowel, while a "closed" syllable ends with a consonant.  So "brazen" breaks into syllables as "bra zen", while "flagrant" breaks into "fla grant".
When an syllable is "open" the vowel usually adopts the "long" pronunciation, while if it's "closed" it's usually a "short" pronunciation.  Of course, this being English, there are exceptions (an obvious one being the word "bra" vs the "bra" syllable in "brazen").
A kind of rider to this guideline is that when a word ends with a vowel, then consonant, then a trailing "e" (as with "rare", eg), the first vowel is (usually) "long" (and the trailing "e" is silent).
There are other caveats to this "guideline" that I've no doubt forgotten since I studied this stuff in the 3rd and 4th grade.  There is most certainly a more authoritative description online somewhere.
And of course I've skipped over the "guidelines" you'd need to determine where syllables are separated.  Ie, if the breaks are "flag rant" and "braz en" then the pronunciations would be different.  And this is a harder nut to crack, starting from zero.

Rules concerning long vowel sounds


A summary on the goal of Cardano

Question: On the website it's mentioned that:

Cardano is a blockchain platform for changemakers, innovators, and visionaries, with the tools and technologies required to create possibility for the many, as well as the few, and bring about positive global change.

We've estabilished that one of the focal points of Cardano is innovation. It's about durability and there's a chain of (peer-)research, specification and integration. A sustainable future, a global society that is secure, transparent and fair., a world without intermediaries but controlled by the empowered many. It provides the template and toolset to a new age of innovation.
For an outsider though, that's all a lot of buzzwords. I've read some of the research, but what I'm missing is a concise overview of the goals of the project. There must've been a need that wasn't met, a goal that was unattainable because there were no tools or anything remotely like that.
All the use-cases listed mention Atala and seem to go across several disciplines. They seem to share the theme of proving things. Credentials, authenticity, origin tracing and auditability. Is that basically what all the buzzwords boil down to?
By the buzzwords alone, you'd almost think their goal is world peace and power to the people. My guess is such a target is a bit broad, so there must be a smaller one. Right?
Answer: The phrase I like to use often is that Cardano is "An operating system for the decentralized web".

A summary on the goal of Cardano


why t-distribution and normal distribution?

Question: Why do we use the t-distribution when the population standard deviation is not known? And similarly why the normal distribution when standard deviation is known?
Comment: If $X ~ N(\mu, \sigma^2)$ the the sum of $n$ independent samples of $X$ has an $N(n\mu, n\sigma^2)$ distribution and thanks to the Central Limit Theorem the same is approximately the case for non-normally distributed random variables with the same mean and standard deviation for large $n$.  So the mean of  $n$ independent samples of $X$ has an $N(\mu, {\sigma^2/n})$ distribution, leading to the position when $\sigma$ is known
Answer: The $t$ distribution arises in the following situation. You have a normally distributed population with unknown mean $\mu$ and standard deviation $\sigma$. You draw $n$ independent samples $X_i$ from this population, and then you want to test a hypothesis about the mean of the population using this sample. The null hypothesis for this test is $\mu=\mu_0$. (The alternative hypothesis varies depending on context.)
The test statistic for this is
$$\frac{\overline{X}-\mu_0}{S/\sqrt{n}}$$
where $S$ is the sample standard deviation. Now if $S$ were just a fixed number then this ratio would be normally distributed. Moreover, if it were exactly $\sigma$ then this would be $N(0,1)$ distributed under the null hypothesis (which is why we use the normal distribution for hypothesis tests for the mean when the true standard deviation is known). But in fact $S$ is not fixed, it depends on the sample. The distribution of this ratio, assuming the null hypothesis, is called the Student's $t$ distribution with $n-1$ degrees of freedom.
Intuitively, the difference is that $S$ is occasionally much smaller than $\sigma$, and it is these cases that cause the $t$ distribution to have a longer tail than the normal distribution, especially when the number of degrees of freedom is small.
Comment: @Henry I revised a little bit. The point I was trying to convey is that the $t$ distribution just *is* the distribution of the ratio $\frac{\overline{X}-\mu}{S/\sqrt{n}}$, if $X_i$ are iid $N(\mu,\sigma)$ variables. It isn't guaranteed to be normal because $S$ is not fixed and in fact it just isn't normal, period.
Comment: More generally, the key idea here is that of a [pivotal quantity](https://en.wikipedia.org/wiki/Pivotal_quantity).
Comment: And as $n \rightarrow \infty$, the $t$ distribution approaches the $z$ distribution.


How to dynamically create html snippet in CkEditor5 using JavaScript/jQuery?

Question: I am working on converting a custom app that currently is using Redactor and jQuery over to CkEditor, v5. It is generally working but we have a feature that generates some HTML and then inserts it into the editor. For the old editor this worked fine, but for CkEditor I think I need to insert the HTML inside a new HTML snippet. I can wrap the html in a div with class=raw-html-embed, which is what the snippet plugin generates normally, but CkEditor doesn't recognize it as a new snippet, it is just inserted as text.
Is there an API call or other process that would allow be to trigger creation of a new HTML snippet?
Answer: I eventually looked at the Clipboard source code and was able to figure it out. Just had to convert the string to a view elements, then to model fragments, then insert. A simple example in the docs would have helped! If this isn't the best way to do it, please leave a comment.
<code>ckeditor.model.change(writer => {
    const clipboard = ckeditor.plugins.get('Clipboard');
    const view = clipboard._htmlDataProcessor.toView(newText);
    const modelFragment = ckeditor.data.toModel(view, '$clipboardHolder');
    if (modelFragment.childCount === 0) {
        return;
    }
    ckeditor.model.insertContent(modelFragment);
});
</code>


How can I prove that the language is not CFL?

Question: I have this language: $L=\{x^ny^jz^k:k=j\cdot n\}$, I know I can use the pumping lemma for CFL, but I have managed to do it for $k, j, n \leq 0$, and with $k = j \cdot n$ I have not been able.
Comment: Please do not delete your question after receiving an answer.  Part of our mission is to build up an archive of high-quality questions and answers that will be useful not only to you but also to others in the future.  Deleting your question after receiving an answer can be considered impolite to answerers.
Answer: We will replace the symbols x,y,z by a,b,c respectively , so we don't get confused when using the pumping lemma
Consider the string w = a^p b^p c^(p^2) , clearly w ∈ L , we will show that w cannot be pumped
Neither v or y can have 2 type of symbols or the order gets messed up when pumping , so both v and y must have one type of symbols ( so for ex v has only as , y has only bs )
Now if v and y don't have cs the string can't be pumped , if they have only cs the string can't be pumped too , since you can't maintain k=jn
So we know now that each of v and y must have only one type of symbol and that they must include cs but no only cs  ,so y must have cs , and  v must have bs (it can't have as or |vxy| > p)
The only way to pump the string now is for v = b and y = c^p , in this way whenever the string is pumped , when we add a b we add c^p , maintaining k=jn
But for this to happen |vxy| > p which is unacceptable
So w can't be pumped and thus L is not a CFL


Ubuntu virtualization with Virtualbox

Question: On ubuntu 11.04 I created a virtual machine with Windows 7. Now at /home/username folder I have both ISO image of Windows and a folder with the system created by VirtualBox. The question is can I delete ISO image and will it affect virtual machine?
Answer: A virtual machine behaves similar to an actual machine

A virtual machine (VM) is a software implementation of a machine (i.e.
  a computer) that executes programs like a physical machine.
  -Wikipedia

So similar to an actual machine when you finish installing an operating system, you remove the disc, likewise, after you have installed Windows 7 you can remove the disk by

Select your Windows 7 VM > Machine > Settings > Storage > Select
  Disc Drive > Click on the CD icon > Remove disk from virtual drive

Then you can delete the <code>.iso</code> file and it will not affect your virtual machine.

Ubuntu virtualization with Virtualbox


Creating PDF file in PowerBuilder

Question: I am new to PowerBuilder. I got an assignment to create a PDF file using PowerBuilder. How can I do that?
Comment: We can help you beter with more specific requirements. Do you need PDFs of reports, or something else?
Answer: Our organization used to use Ghostscript, but has instead moved to Amyuni.
Answer: as suggested by Alberto Megia, download PDF creator, but dont use SAVE AS.
After you install pdf creator it will install a printer, use that printer to save the
datawindow with the print function.
after call print function, you will see a "Save as" dialog.
If you use "saveas" function, the pdf will not have the format that the datawindow shows.
Answer: What version of PowerBuilder are you using?  The most recent versions have PDF capability built in (using Ghostscript).
Answer: Install Ghostscript.
Get PDFCreator for free there and install it.
Then you can save as PDF any datawindow or datastore with the statement:
dw_1.saveAs(path_where_to_save_with_name_of_file.pdf, PDF!, true)
Third parameter is for override if the file exists with that name. I hope it works for you.
Regards,
Alberto
Answer: We just use Ghostscript. I wrote Ghostscript setup instructions earlier.  We also print Word documents we've filled in to PDF from our app by printing them to 'Sybase DataWindow PS' printer then running Ghostscript to make the PDF.
Answer: Use the tutorial  How to use PowerBuilder to create PDF file?.
Comment: Your link is just available to some people.
Answer: Good Question - There really isn't an easy way other than finding a third party tool. I've tried the prior method mentioned and it does work but not without headaches and you are left with deployment headaches, deploying ghost script and having to make sure Post Script drivers are on the client.
I ended up trying many PDF converters, both free and paid, the one that worked most seamlessly was one that installed as a "printer" such as if you have Adobe installed on the PC, but you need to dynamically verify existence of the printer via RegistryGet and if it doesn't exist ask user to install or install it dynamically via code, and registry entries (not fun).
After several headaches mostly related to deployment issues I ended up going with a server solution, but it requires having a server that you can have a process (distiller) running that grabs post script files and distills them to PDF.  I used a response window with progress bar, the PB app printed post script file to server location upon which the distiller grabs and converts. My PB app polls the server until it finds the PDF, or the user cancels whichever comes first.  With a good distiller the process is fast (< 5 seconds) which was acceptable to our users.
Upon existence of the PDF, we'd attach it to an email and send via Oracle (mapi).  This solution limits the requirements on client to post script driver which in most corporate environments is there, but you need to check it via Registry.  Maybe there is a better solution out there since I did this last, around 2008.
fyi- I usually don't make vendor recommendations but will in this case because there was one that stood out in ease of use and quality, it was called PDFCreator which installs as a windows printer.  It looks to be open-source right now but I recall that we would have had to pay to use it in corporate environment.
Good Luck.

Creating PDF file in PowerBuilder


Difference between folder size reported by Windows and total file size for Documents and Settings folder

Question: My Documents and Setting folder occupies 8.42 GB, but When I check the files inside individually it just shows 800 MB. Why is that?
Answer: Almost unbelieveable that you 7.6 gb unaccounted for.  I could see being off by a bit due to rounding off or hidden files.
First i would check my math, if correct you could try WinDirStat -it's an awesome little tool that doesn't need to be installed with a very nice GUI that may help you find something you missed.
Also, empty your recycle bin - i don't think that will account for the difference but it might.  In your tags you have temporary files listed -if you believe that may be your problem i can recommend CCleaner.  Would suggest the standard virus/malware scans also.
Answer: Can you see all the system and hidden files? These could be taking up some of the space, but 90% seems a bit excessive.
Go to Tools > Folder Options > View > Advanced Settings.
You might be able to see more.
You could also install something like Treesize which should reveal more information.
Comment: I'd install TreeSize and use that.
Comment: No i have choosed the options to show hidden and system files.


Vim: how to change font color of current line number

Question: i have line highlighting set in my .vimrc:
if v:version > 700
 set cursorline
 hi CursorLine ctermbg = Red guibg = #F5FBF6
endif

and line numbers on. Background and foreground of line numbers is set to:
highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=Black guibg=#589A5D

Current line is correctly highlighted but fore/back color of  line number (this on the left side of editor) is the same. How can i change color of line numbers?
Cheers,
jbk
Answer: Since this post is still showing up as a top search result for this problem and the top-voted answer is now out of date, I'll post a link to a more recent StackExchange question which provides the current answer.
Short version:  in recent versions of vim, there is now a CursorLineNr highlighting group that allows you set a different color for the line numbering of the current line.
Answer: It looks like a bug in Vim that only certain forms of highlighting for CursorLine apply to the LineNumber column.  I'm not sure whether the bug is that the CursorLine highlighting is being applied to the LineNumber column or if the bug is that not all of the ways CursorLine can be specified apply to the LineNumber column.


What makes a Bitcoin Miner chip such as an Antminer different than a usual CPU?

Question: Is it the processor? Or maybe RAM? I'm sure, it's not the GPU though. Which and what part does it make them powerful to mine?
Answer: Bitcoin miners have ASIC (application-specific integrated circuits), special chips which can perform mining calculations and nothing else, and are very efficient for it. The specific calculations required are encoded in the hardware - the transistors are arranged in the pattern "calculate SHA-256".
In contrast, the CPU that exists in normal computers can do everything, but is not very efficient at any one task. The transistors are arranged in the pattern "execute the instructions that you are given". So you can give it any instructions you want, including "calculate SHA-256" - but it will not be as efficient as a special-purpose chip.
Comment: so the special purpose chips on Bitcoin Miners can't be used for anything else i recall? only a CPU for mining. is it?
Comment: @RobertWilliam: I think your problem is that you think "cpu" is a word for any kind of computer chip. It's not. CPU is a specific type of chip. ASIC is a different type of chip, neither of the two are a subset of the other.
Comment: @RobertWilliam: Right, those chips can only be used for mass computation of SHA-256, for which virtually the only application is Bitcoin mining. And Murch is correct, the term "CPU" is inappropriate for referring to these chips.


I just want to move this login button up above the create new account and request new password. How?

Question: I want to move login button up above other two options create new and request new password links. what I do I have to do. I am new to drupal
Comment: possible duplicate of [How can I modify the login form using hook\_form\_alter()?](http://drupal.stackexchange.com/questions/11735/how-can-i-modify-the-login-form-using-hook-form-alter)
Answer: You can use hook_form_FORM_ID_alter in your custom module and change the weight of the links
<code>function MYMODULENAME_form_user_login_block_alter(&$form, &$form_state){
  $form['links']['#weight'] = 100; //define weight as such the links moves below  submit button.
}
</code>
Replace "MYMODULENAME" with the name of your custom module.
Comment: Really thanks, It is the right one but forgot to clear the cache


do I need to change terminal at mumbai airport?

Question: I am traveling through Indigo from Oman to Mumbai to Bagdograh(Siliguri).I heard that I've to change airport in order to change terminal from 1 to 2. How long does it takes? The next flight to Bagdogra is after 4.5hrs of arrival, is it enough for me to reach and do the immigration?
Comment: "I heard that I've to change terminals." You change terminals only if Mumbai-Bagdogra flight is operated by a low cost carrier (like Indigo). Vistara and Air India fly out of T2 only.
Comment: thnx.appreciated
Answer: From the airport's website:

The 2 terminals are in fact two separate airports 5km one from other
If you have a flight connection landing in T2 and departing from T1, take in mind that the transfer process will take 2-3 hours
Domestic Terminal is busiest during the day while International Terminal is busiest during night
Is not allowed to check in more than 4 hours prior your flight

So if you have 4,5 hours between the flights, that should be enough time to transfer.

There is a paid service that connects both terminals (Domestic -
  Terminal 1B and International - Terminal 2).

T1B to T2: Prices Rs.245 for a Sedan. Rs.700 for a SUV.
T2 to T1B: Prices Rs.230 for a Sedan. Rs.750 for a SUV.

The counters to buy the ticket are located:
  T1B: Arrivals. Phone: 8767350021
  T2: Level 2, International Arrivals. Phone: (022) 65882672


What word describes an author's deployment of a word/term?

Question: I'm writing about Hobbes and Locke who basically have two different understandings of the word 'right'. When Hobbes says 'right' or 'rights' he is referring to one's liberty to do something, whereas Locke uses 'right' to mean someone's claim to something. This may seem a subtle difference, but I'm looking for terms that describe the authors' different use of the same word without the sentence looking clumsy. Thanks.
Comment: Hi Oscar, this would be better placed on English SE, as it isn't about writing. That said, what you are describing are homonyms - words that look the same and sound the same, but have different meanings. I'd also point out, they don't have two different understandings of the word, they are both using the word correctly - it's the context (and hence meaning) that is different.
Comment: Can you give us an example sentence showing how you want to use the term? That will give is a better idea of what you're looking for in terms of part of speech, nuance, etc.
Comment: How about "weaponization"?
Answer: You could say that they are using the word in a different interpretation.

interpretation
an explanation or opinion of what something means

Source: Cambridge Dictionary


Magento 2: How to delete multiple store views?

Question: How do I delete multiple store views in Magento 2?
I need a path to delete all store views in admin.
Comment: I cannot see the `**Delete Store View**` button. Can you please explain why?
Answer: Go to STORES > Settings > All Stores , click on the name of the store view, at the top of the corner delete store view button is there. click and remove the store view.
Answer: At admin side you can see store list at Menu: STORES > Settings > All Stores
From here you can delete store view.
Answer: The answers are correct. To add sth. more specific if someone asks himself why is delete button not appearing?
Sometimes u cannot see the delete button on store view level, because there is exactly ONE store view entry under the specified store. In this case u have to delete the store and not the store view.
I.E.
1 Store -> 2 Store Views (i.e. de/en) -> Delete Button on store view appears
I.E.
1 Store -> 1 Store Views (i.e. en) -> Delete Button on store view does not appear because of the above explanation
The reason is, that at least u must have one store view left, when all are gone. So your search must go to look how to delete stores and websites and get familiar with your domains and setup.


How to I cite from one source with some additional information from other sources in APA?

Question: I have a brief section in my thesis that is pretty much entirely a paraphrase from a single source, but with a few additional pieces of information from other sources. Would it be APA-compliant to simply write something like "This section is based on X, other sources are cited when necessary"?
Answer: You need to cite each source explicitly. Saying that you got "something from somewhere" isn't a citation. You may need to re-write it to split out the ideas for proper citation.
But, your suggested format would certainly be improper, independent of the style.
Comment: If you make it clear enough what derives from who, then you probably don't have a problem unless a reviewer objects. But it needs to be clear. Not just that the ideas aren't yours, but whose they are. This is academic courtesy among other things.
Comment: What do you mean by "cite each source explicitly"? I would explicitly state the page in the source from which almost everything in the section is paraphrased at the beginning of the section. Then, after every sentence that is not paraphrased from that source, I would cite the respective other source. Is there no way to cite more than one consecutive sentence from the same source without putting a citation after every single sentence?
Comment: If you quote, rather than paraphrase, then it might be easier, actually. You can quote several sentences as one. But, as I said, a re-write may be needed.
Comment: I think a quote is not an option, since there are several equations in the text. I'm just struggling to understand why my proposed way wouldn't be appropriate. The point is to credit the source, which I do, and I leave no doubt that none of the text was my original idea. Is this just a pointless formality, or is there a deeper reason as to why this is improper that I'm missing?


Lagrangian for electron radiating a photon

Question: I know the electron-photon interaction Lagrangian from QED: ($-ie\bar{\Psi}\gamma^{\mu}A_{\mu}\Psi$). However, this interaction seems to describe the interaction of electron and positron with a photon (thus there is a $\bar{\Psi}$ for positron). This makes sense when an electron radiates a virtual photon (and becomes a positron) and then reabsorbs the photon again (and becomes an electron again). What about the case when an electron emits a real photon (and never becomes a positron) like the case of synchrotron radiation? What is the Lagrangian in that case since we wouldn't have any electron-positron vertex?
Comment: $\bar\psi$ refers to the technical way of forming a scalar in the Lagrangian that is invariant to Lorentz transformations together with $\psi$; its definition involves a complex-conjugation but like the answer below states, you should not really think of $\bar\psi\psi$ as a specification for particles-in/antiparticles-out or so, but rather as a technical way of comparing two fieldvalues at a point in an invariant way. The particle/antiparticleness is contained within $\psi$'s composition itself.
Comment: I'm not well versed in QFT, but in your example that "makes sense", are you implying that the virtual photon is charged? Otherwise how is charge conserved when the electron becomes a positron?
Comment: The term conserves charge. It describes an electron emitting a photon, or a positron emitting a photon, or an electron absorbing a photon, ... etc.., or a photon producing an electron-positron pair, or an electron and positron annihilating to an electron, ... Have you studied the Dirac equation?
Comment: So, let me phrase it another way: if $\Psi$ represents electron, wouldn't $\bar{\Psi}$ represent positron? What if I just want to show an electron-electron-photon vertex (like an electron emitting a photon)?
Answer: First, the examples you state that "make sense" are completely phenomenologically wrong. An electron that radiates a photon can't ever become a positron because the photon isn't charged and the interaction conserves charge (and similarly for the positron).
Now to get to the point of your question, the Lagrangian doesn't change at all. The important thing to note is that $\Psi$ (and thus $\bar{\Psi}$) contains two distinct pieces. One corresponds to the electron, and the other corresponds to the positron. This is what lies behind the solutions to the Dirac equation: that $\Psi$ contains four components, two of which are for the electron and two for the positron. This means the vertex $\bar{\Psi}\gamma^\mu A_\mu\Psi$, isn't for an electron-photon-positron vertex, it's for all of the possible combinations of electron or positron and photon.
Any reference on the Dirac equation should help out if you have more confusion.
EDIT:
To be more precise and clear about how the Dirac field contains both matter and antimatter parts to it, consider the Dirac equation:
$$(i\gamma^\mu\partial_\mu - m)\Psi = 0.$$
This can be solved through the Fourier expansion of $\Psi$:
$$\Psi(x) = \int \frac{d^3p}{(2\pi)^3} \ a(p)u(p)e^{ipx} + b^\dagger(p)v(p)e^{-ipx}.$$
Where $a$ and $b^\dagger$ are annihilation and creation operators after canonical quantization, respectively, and $u$ and $v$ are four component spinors. Now the important thing to note here is that in general this spinor field is a complex field, so the two terms I've summed here need not be related, and so the sets of creation/annihilation operators correspond to different kinds of excitations.
This is what I mean by saying the Dirac field contains both the positron and the electron: since the sets of creation/annihilation operators correspond to different particles coming from the same field. Now due to the sign difference in the exponentials, one of the particles has positive energy and one has negative energy. In this case$-$metric signature $(-+++)$$-$the creation operator $b^\dagger$ is associated with the negative energy solution, and so in fact, the state $\Psi(x)|0\rangle$ is the state with one positron.
The upshot is that because you have one particle and one antiparticle term each in $\bar{\Psi}$ and $\Psi$, when you expand the interaction it looks more like
$$\gamma^\mu A_\mu(a^\dagger a + a^\dagger b^\dagger + b a + b b^\dagger),$$
which corresponds to interactions involving all combinations of electrons and positrons.
Comment: OK. Thanks. Unfortunately, I'm still not clear. Let's consider the Dirac spinor in the case of massless electron in the Weyl basis. The Dirac spinor $\Psi$ will have two components: $\kappa$ and $\eta$ where $\kappa$ represents the left handed electron and $\eta$ the right handed electron. The Lagrangian would then yield: $\kappa^{\dagger}\sigma^{\mu}a_{\mu}\kappa$ +  $\eta^{\dagger}\sigma^{\mu}a_{\mu}\eta$
So, are you saying that $\kappa^{\dagger}$ is both the left handed electron and right handed positron at the same time?
Comment: I have edited my answer, which hopefully will clear up your confusions.


how to restore a mysql database from full database backup

Question: I have all MySQL databases backup dump file (50 Databases) with in a server, and i want to restore a single database from this dump file.Is that possible? Any suggestions?
Thanks in Advance
Comment: Assuming you've used `mysqldump` with the option `--all-databases` then you can import a single database using `mysql -u root -p --one-database My_DB_NAME < all_databases_dump.sql`
Comment: It mostly depends on the format of your backup. What does your backup look like?
Comment: Do you use `mysqldump` for the backup? Do you do one for each database?
Comment: @val0x00ff that is a somewhat dangerous operation for an inexperienced user to attempt.
Comment: @lgeorget its like full_backup.sql
Answer: Yes
Just copy your full-backu.sql into C:\xampp\mysql\bin
then open cmd.exe (command prompet ) with administrator account
then run :
cd c:\xampp\mysql\bin
mysql.exe -u root -p --one-database destdbname < full-backu.sql
goodluck
Comment: This seems to be a windows solution.


What is a "road" bike? Don't they all ride on a road?

Question: Trying to learn about bicycles.  I have heard the term "road" bike a lot.  What is the difference between a "road" bike and a regular bike?
Answer: Yes, all bikes could ride on roads. However, a road bike is one that's optimized for riding on smooth pavement. It usually has skinny tires (no wider than 32mm, often much narrower) with a very light tread. (If they have any tread at all. Some road tires, such as the Kojac, are treadless or "bald", to cut down on rolling resistance.) Road bikes usually have handlebars that are designed to be comfortable for long stretches of time, sacrificing a little bit of fine control that you'd get with a wider flat bar or riser bar.
By way of contrast, mountain bikes come with wider tires that have more agressive tread ("knobby" tires) designed to grip gravel or dirt.
Road bikes can sometimes ride on packed dirt or gravel, but the ride will be very harsh. A bike optimized for off-road will be easier to control and can ride on surfaces that'd be problematic on a road bike, such as rocks, gravel, loose dirt, or pockets of sand. There are even bikes that will accept extra-wide tires (3 - 4"). People who ride on very bad roads that have had potholes and cracks installed copiously may prefer a mountain bike to a road bike, or may decide to get a hybrid bike, which is exactly what it sounds like.
In the end, road bikes can sometimes do a little bit of off-roading, and mountain bikes can ride on the pavement, but these kind of bikes have different strengths.
Answer:
What is the difference between a "road" bike and a regular bike?

There are at least three kinds of bike:

Road bike -- for racing on roads: lightweight, drop handlebars, narrow tires, no fenders or panniers.
Off-road bike -- for unpaved trails: wide, knobby tires, suspension (front and rear), expected to get dirty/muddy
Hybrid/urban -- for commuting and leisure rides: like a road bike but maybe with wider tires, more equipment (e.g. panniers and fenders, and disc brakes), straight (not dropped) handle bars, for riding in traffic in all weathers.
Comment: I would add touring as another category.  Looks like a road bike (though possibly with straight bars), still designed for relatively high speeds on smooth roads, but heavier built and designed for more comfort and stability.
Comment: There are subdivisions amongst roadsters as well...  As noted, touring bikes are set up for "loaded" touring and carrying heavy luggage.  One might have a bike set up for sport/racing, including "aero" or time-trial machines, or ones set up for more casual riding with "slack" geometry....
Comment: Don't forget about "Mountain" bikes, who coined that term anyway?
Comment: And stunt bikes and utility . . the categories sounds like something that would be in wikipedia . . .  http://en.wikipedia.org/wiki/Bicycle#Types


Seeking spreadsheet template for planning multiple people/city visits

Question: Are there spreadsheet templates to help plan a several week visit by 6 family units, covering several locations, when not everyone will be in the same place at the same time?  The goal is to see where everyone is at any time, and to see who will be in the same city on any given day.
Comment: Wouldn't a calendar be more useful than a spreadsheet?
Comment: How could a calendar keep track of multiple family units and multiple cities?
Comment: I have seen companies use a matrix to track where people will be on dates extending out into the future.  You could adapt a scheme like that to your purpose without much trouble.
Comment: @Yehuda_NYC One colour per family, then add entries like "Smith Family in NYC" and "Jones Family in Paris", then look at the calendar to see where everyone is?
Comment: @Gayot Fow  Can you post an example of such a spreadsheet?
Comment: I added one that has INDICATIVE value only.
Answer: This is an example of a itinerary matix...

It shows three couples on a short trip to Europe.
This example is set for the granularity of one day, but could be increased to morning, afternoon, and evening granularity.
Colour coding is optional.  This example uses orange to indicate international travel.
Greenish colours indicate activities in and around London, and pinkish colours indicate activities in and around Paris.
Using this matrix, it's apparent that 'Fred' wants to stay an extra day in London to see the V&A Museum; 'Mary' wants to see Chantilly while others want to see Chartes. 'Francis', on the other hand, wants to visit her long lost uncle.  'John' and 'Fred' have a special thing for Monet, so they want to visit Giverny.  As shown, everybody is safely home and well rested for the big 4th of July BBQ and fireworks.
You can add notes, annotations, and call-outs to the matrix as needed.


Why does the old woman in the film The Survivalist die?

Question: In The Survivalist, why does the old woman in the film poison herself and die?
Answer: The old woman doesn't poison herself. She asks the girl to poison the man (since food is scarce), but the girl is in love with the man (and pregnant with his child), and she knows her mother is old anyway, so since food is not enough for three people, she decides to kill her mother with the mushrooms. When the mother realizes this in the morning, she accepts her fate.