How do I keep everyone's attention?

Question: I'm a student teacher in Karate. I try to teach younger students, but they don't take me seriously as an instructor. I've tried countless of times to get them to listen to me, but they don't. I've also spoken to my instructor about it and when he tried to get them to listen, they would for about a week then it's like they threw it all in the trash. What do I do to fix it?
Comment: Your experience is quite common. First answer some questions. How young are these students? How old are you? How many students? Do you teach the entire class? Are there other teachers in the class teaching at the same time? Oh, and what is your rank?
Comment: I second Steve's request. There are many possible factors and if we want to address your specific problem, we need to know a bit more.
Comment: You may want to take a look at [this](https://academia.stackexchange.com/q/87053/54237)
Answer: It is common to have this issue with kids.  As teachers we are so focused on helping the kids, keeping the parents happy, trying to pass on the incredible art we learned that we forget how to be kids!
Preamble:   Don't use any of this to punish the kids use these rules in the spirit of creating a community accepting of different learning styles.

Announce these rules at the beginning of class and tell each new
student when they join
Start every class leading the kids in jogging in a line around the
room. Not racing, jogging.  Everyone will subconsciously move toward
group participation.
When kids stop paying attention and start playing ask them to step
out of the "focus area".  Tell them it's OK if they need to rest but
you need enough mat space for those who want to participate to
safely participate.
Focus on the kids whose attention you think you have.  At different
times different kids learn better on the side lines. Maybe they
aren't ready for the intensive focused attention required for "adult
like" training at that moment.
Use games that built around the basic skills.  Jumping games are
good. You'd be amazed at how focused they get on winning the game
and you can referee (Keeping your focus on fairness and fun!) so
that the techniques they use in the game are high quality.
Do an age appropriate "impressive demonstration".  My wife and I were
shocked when after 3 years of teaching kids classes we decided to
have a demo day.  After the kids did their demos we did something
fairly simple just so the parents would have an idea of who we were.
The kids came back and said "Wow!  We didn't know you guys were that
good!". They were more respectful after that.
Answer: Kids have a short attention span. So keeps things short and sweet and to the point. Teach them only one or two concepts per class, since they won't remember more than that.
Answer: Younger kids typically are attracted to the spectacular, the 'cool', the heroic.
With this in mind, you could try:

Introduce each class by 'selling' them an impressive technique or sequence of techniques which rely on the very basics you need to teach them. You are doing this to gain their attention so they pay attention to the less exciting things they need to learn. Promise them that if they pay attention, that by the end of the class they will have come a step closer to being able to do the special thing you've shown them. Paint them a picture of how the technique might be employed by a hero/superhero to defeat a villain. Explain why a real hero needs such a technique in his or her arsenal (of course reminding them that no-one should ever use such a technique unless absolutely necessary).

Now, explain to them that no-one learns to execute such technique without learning a series of special steps first. Explain that even Bruce Lee, Jackie Chan (if kids still know these names), Batman, Deadpool... you get the picture all spent time and effort learning the fundamentals before they could lean to do the really cool stuff. Let them know that they too can learn to do amazing things if they are smart enough to practice the things they need to practice; that what separates the heroes from the zeros is often dedication and determination; and that they are smart enough to know that they need to learn to walk before they can run.

Now. Break down your 'amazing' technique or sequence into the elements of the technique/sequence. Show them how the basic technique relates to the development of the 'special' technique.

Start by teaching them the first step. You will hopefully now have their attention.

Move around the class, congratulating each student on whatever small progress they have (or haven't) been able to make. Remind them of their goal. Recognise their effort.

Return to the front of the class and comment on all the ways you've been impressed by them. Express your confidence that they are moving towards their goal. Demonstrate how they can make their basic/s even better. Relate it back again to the special technique/s.

Follow this pattern throughout the lesson (Demonstration/encouragement/refinement/goal).

When concluding a session, remind them of:
a) what their goal was,
b) of how the things they have learned in pursuit of their goal,
c) what to practice before the next lesson, and
d) what they will be learning in the next lesson.

This process is summarised more succinctly by Anderson, N.J. (2021), Principles for Lesson Planning. https://doi.org/10.1002/9781118784235.eelt1003:

The three principles [of lesson planning] are:
(a) Initiating the lesson planning process by articulating a clear learning outcome (LO);
(b) Designing learning opportunities that lead to accomplishing the LO; and
(c) Including an appropriate formative assessment that provides tangible evidence of achievement of the LO.

With kids, you have to keep reminding them of how their efforts are working to an interesting, impressive goal. It's not a dissimilar problem from that faced by many math teachers. For a lot of kids, math is rendered boring because the teacher is unable to draw relevance between equations and real-life problem-solving. You need to demonstrate how the basic equations of martial arts fundamentals lead to the complex equations of martial arts 'mastery'.
All this is by way of demonstrating that a teacher is a performer. You task is not merely to possess knowledge, but to learn how to engage students so that you are able to impart the valuable lessons to want to share with them.
I have provided one technique here. I suggest that if you want to improve as a teacher, you research not only on martial arts forums, but on teaching forums and websites with talk more generally about the art of teaching performance.
The skill of teaching does not come with a particular belt. True, you have the benefit of having spent many hours with teachers during your development and you can learn from this; you can remind yourself of what your found most powerful and entertaining, and of those teachers which failed to engage you, and why, but no-one has likely yet taught you how to teach and you must take teaching as a distinct, highly demanding skill which will take you years to develop, just as it has taken you years to develop your fighting arsenal.
Good luck.
Answer: My current Dojo has a program where belts purple and higher, who are also 13+ years of age can help to train white belts. We had a blue (recently received his green) belt doing it and I think he's around 14 or 15. No one took him seriously at first, but Grandmaster explained to us he was helping, and nobody's dared to let their guard down since. I think your instructor may be your best bet, explain to him that they still don't listen. NOTE: I'm not a member of this program, I'm a white belt. So I don't qualify.
If they STILL don't listen, you may have to take things into your own hands. Methods you can use are make everything look cooler than it is. I usually arrive at my dojo about 20 to 30 minutes early, which is when the younger kids are in there, and the green belt usually is keeping the kid's attention by making references to heroes (like another answer said may work) and saying "pow" every time they hit the bag (during one-on-one only, there's no human that can talk fast enough to compensate for the entire class!). This method works best with littler kids, if you try it on teens they'll probably just think you're lame/childish/some other insult.
Also, try to be actively instructing throughout the lesson, make it hard to not listen. That's the biggest way how you can keep anyone's attention. It's very hard to get distracted or not listen if the instructor is right there in front of you and actively showing everyone something. One example is again from my Dojo, and what they have people do, and they do this for everyone, is to have a dedicated time of each lesson where the instructor has everyone line up in neat rows and the instructor has everyone do the same move all at the same time. You can't not listen to this, because usually if you don't listen, you can be called out.
I hope this works. By the way, I have never actually instructed anyone before, these are all methods that I have actually seen and actually work.

How do I keep everyone's attention?


What are the benefits of virtue ethics compared to deontology?

Question: Deontology focuses on rules, while virtue ethics focuses on virtues. Both moral philosophies seem quite similar. What advantages does virtue ethics provide?
Comment: Can you explain what you mean by saying they "seem quite similar"? Also, can you be clearer as to what you mean by "benefits"? There's several different meanings that the last part could have. Some of them are on-topic; some off.
Answer: Deontology focuses on the rules, or the universal norms. A person is said to be morally right if he conforms to these rules. For example, given a choice, a person is morally right if he abstains from killing a person, even if killing that person could bring about greater benefits.
The fundamental difference is that for virtue ethics, you can say someone is morally right only if his actions express a certain virtue. For example, a man who helps an old lady cross the road has the virtue of kindness. In contrast, lying and cowardice are blameworthy since they depart from virtues like honesty and courage.
There are no absolute rights and wrongs in philosophy. However, here you may want to argue about which is the best way to go about consigning blame or blamelessness to actions/agents in different situations. Virtue ethics can perhaps provide a set of guidelines as to what to do and what not to do. For example, if by not lying you show that you are trustworthy, by virtue you are seen as morally right and thus praiseworthy. Similarly a deontologist would say that you did the right thing since you obeyed moral norms.
However, a scenario could discern between a deontologist and virtue ethicist: a child falls into deep sea- person A jumps in to save her, disregarding the danger of the high waves. Person B decides not to make the jump, given that he might risk dying. Both the deontologist and virtue ethicist would praise person A for doing the right thing morally, furthermore he is also seen as courageous. However, person B was wrong since he just stood by and weakened his claim to virtue by displaying cowardice.
In a similar scenario, what if there was a reward of a million dollars? We can predict that person B will likely jump in to save the child, since the reward far outweighs the cost. In the deontologist books, he does the right thing by this action alone. On the contrary, a virtue ethicist would say that one action is not enough to determine that he is a virtuous person. In essence, he is still a coward inside.
Comment: There is no "fundamental" difference. Where do you think the rules come from? The same place the virtues come from, human brains. The only difference is a trivial one, a rule is more often written down, a virtue rarely is. As I said in my answer, your example does not show a "fundamental " difference, it moves the goalposts. The "virtue" in the second part is bravery, but you set the "rule" as "save the child", thus you're not comparing like with like. Set the rule to "do not display cowardice" so that it more closely matches the virtue and the responses are now the same.
Answer: The fundamental "virtue" of virtue ethics over deontological ethics -- for which Lok123's answer provides a useful case-based analysis -- is that the former centers on what actually constitutes and underpins morality on the essential level (i.e. psychic and psychological) while the latter centers on an arguably "blind" commitment to certain abstract rules that due to their said abstract nature are incapable of accounting for indefinite contextual and relative factors that determine what is truly right in a particular situation.
In other words, virtue ethics focuses on the very essential aspect of ethics from which morally consistent decisions and results can emanate with respect to any given situation (a feature that is evidence of a truly "universal" ethics), whereas deontological ethics in its very quest for universal morality fails because of ignoring or dismissing what truly constitutes universal ethics: not abstract mental rules but actual psychic qualities, i.e. the ontological principles of ethics.
Consequently as pedagogical implications, in the school of virtue ethics, morality is materialized not merely by popularization of abstract moral maxims that are disconnected from an ontological basis and disregard benefits for the individual itself (that are also key in actually motivating morality), but more importantly by following codes of discipline and conduct that lead to cultivation of psychic qualities that basically makeup the whole character of the individual and consequently determine the moral nature of his actions consistent with the greater good in any given situation.
This contemplation may explain why under the deontological and quality-lacking morality of the modern world (and consequently the colonized traditional world in as much as the modern cultural norms have made inroads) despite all the official ethical rhetoric and pretensions, societies are suffering from all sorts of moral ills and most politicians have become basically lying crooks while putting on moral pretensions of saints!
Comment: I'd be interested to hear what virtue you think is capable of "...accounting for indefinite contextual and relative factors that determine what is truly right in a particular situation". Bravery?(not advisable all the time), Altruism?(how do you know the long-term effects of your actions), Honesty?(sometimes it's better to lie). Virtues are no more or less arbitrary than rules. Rules are not just made up randomly, they attempt to write down virtues and have a significant amount of complexity to account for as many different circumstances as possible, just like virtues do.
Comment: @Isaacson, I'd be contradicting my own critique of deontological ethics if I were to point out a single virtue that could be applied uniformly at all situations. But it can be generally said based on the fundamental wisdom of virtue ethics, that the richer and more profound the virtues cultivated in the character of any individual, the greater the degree of good he can realize in his moral choices. Additionally, the wisdom of human nature as well as correct assessment of any given situation are key in making ethically best decisions.


Can you make a PC who is a werewolf?

Question: So I have a player that wants to play a werewolf, and I'm not sure if he can or can't. He's very interested in it, so is it possible for him to do this? And if so how does character creation work?
Comment: You appear to have accidentally created more than one account. You will be unable to comment on or accept answers to your older questions until you [merge your accounts using the instructions in the help centre](http://rpg.stackexchange.com/help/merging-accounts).
Comment: Welcome to RPG.Stackexchange! You'll find all sorts of useful things here in the [tour]. I am assuming you are, but just to check - are you the DM in this group?
Answer: It's up to you as the DM.  From a purely rules-based perspective, absolutely he can.  From a storytelling perspective you will need to consider a few things.
The rules do have support for this, and if you have the 5e Monster Manual, you can read the rules for werewolf players in the sidebar under the Lycanthropes section (where all the "were-" monsters are listed).  You will need to consider for yourself the type of game you want to run and the powers you want your player character to have.  This has the potential to offset the balance of standard character progression, which could potentially affect your CR calculations when determining appropriate encounters for the party.
You also should consider the effect this might have on other players at the table.  It could create spotlighting issues or other table-balance problems.  Werewolf characters tend to have built-in story hooks and personally I'd be concerned with that character derailing any plot lines that don't involve him directly.  Your mileage may vary and of course I don't know you, your group, or your player, but I would be hesitant to allow this as part of a character concept.
Character creation is unchanged, whether he plays as a werewolf (or other lycanthrope) or not.  As lycanthropy is treated as a disease/curse, it is applied the same way to any character of any level.  He should make his character as normal (without considering the lycanthropy curse) and then apply any modifications that come from lycanthropy after character generation has been completed.
Answer: @LegendaryDude's answer does a great job of addressing the 'can he' part of your question so I'll give another option for the 'how to' part of your question.
The Eberron Unearth Arcana free download contains the race of Shifter. They are described as being descended from humans and lycanthropes. They can only turn into a hybrid form (think classic movie werewolves of a human in a furry suit) as opposed to the full D&D werewolf which has a hybrid form and a wolf form.
Compared to other standard D&D races a Shifter would be more balanced that a full werewolf (especially at low levels) as it doesn't have any damage immunity like a werewolf. It does have nice abilities tied to its hybrid form and these abilities are less powerful than the werewolf's shape change which can happen as often as desired.
It would also give the DM more flexibility to work into the story as Shifters lack a lot of the negative storytelling aspects that a regular werewolf could bring to the story. A Shifter is just another minor race with its own history and prejudices (or you can make your own to fit into your world/story).
Comment: https://www.dndbeyond.com/races/shifter
Answer: A bit late, but if other sources are OK, there are classes. If you get the Touch of Class PDF there's something called the Occultist which allows you to play an abomination, a vampire, or a werewolf as your class, so you would keep control and it'd be even.
In fact, looking over the class, they start off in a worse spot than Barbarians:
Action to shift (though it is permanent until dismissed by an action)
Don't get resist until level 7 (and its easier to bypass)
Don't get Barbarian AC rules until 10
However once they get going things get better:
At level 10 one of their resistances becomes an immunity, gaining another at 14 and 18
They get unarmed dice as a "Dark Strike" and for a bonus action can add Con and does Necrotic damage for their attacks, and the dice are a bit higher than monk, they go up to d12, but only get 2 attacks.
Additionally, all Ocultists get 3 of these 4 as they level:
Speed Boost, Climb Speed, Fly Speed, Burrow Speed
So a Were-Occultist is like a combination of a Monk and a Barbarian.
I reccomend the PDF, it has some cool classes, even a Yu-Gi-Oh reference.
Comment: This would be better if you could provide a link to a source for the suggested PDF.
Comment: Do you have experience with the class and how it plays? [Suggesting homebrew is allowed](https://rpg.meta.stackexchange.com/questions/5153/is-homebrew-an-acceptable-answer-to-a-question) on this site, but it needs to be backed up with an explanation as to why this is better (in your mind) than the rules in the core game and some experience. [I also added a link to the PDF I believe you are referring to. Is this correct?]

Can you make a PC who is a werewolf?


Decorator pattern versus sub classing

Question: I can solve the problem of adding functionality by adding sub classing then why should I use decorator pattern what's the real advantage of decorator pattern ?
Comment: You can see an example about this two patterns [here](https://github.com/dherik/gof-decorator-vs-subclassing), resolving the same problem in GoF book (about `TextView`).
Comment: An article written to answer this very question: https://dzone.com/articles/is-inheritance-dead
Comment: Just adding my 2 cents: when reading the answers below you can keep in mind that the Decorator DP can simplify the management of the subclasses. You can use them separately, create different combinations among them, etc. All of this in just one class: the Decorator class. Take a look at the UML diagram for this DP. For example: http://cdn.journaldev.com/wp-content/uploads/2013/07/decorator-pattern.png
Comment: The way I like to break this down is the following: if you need polymorphic behaviors, then use object inheritance. If it's to provide added functionality, then decorator pattern is better suited
Answer: An example from GoF:

Suppose you have a TextView class. Then in someplace you want a scrolled text view, so you subclass TextView and create ScrolledTextView class. And in some other place, you want a border around text view. So you subclass again and create BorderedTextView. Well, now in someplace you want border and scroll both. None of the previous two subclasses have both capabilities. So you need to create a 3rd one. When creating a ScrolledBorderedTextView you are actually duplicating the effort. You don't need this class if you have any way to compose the capability of the previous two. Well, things can go worse and these may lead to an unnecessary class explosion.

Basically, by using the decorator pattern you can add any number of additional responsibility to object at RUNTIME which you can not achieve by subclassing without potentially damaging your code structure or adding many duplicate combinations for subclasses.
But one thing, Design patterns are not something that you must use.
Whether a pattern is needed or not is dependent on your particular problem, you want to maintain the code for a long time or not, whether you want to extend or not and on many other factors like these.
And there is no pattern that is useful in all cases.
A pattern (decorator or anything else) suitable for a situation may not be a good choice for another situation.
Comment: But such class does not conform to Single Responsibility Principle, isn't it? Such "multi-talented" classes should be avoided
Answer: from Decorator pattern at wikipedia

The decorator pattern can be used to
  make it possible to extend (decorate)
  the functionality of a certain object
  at runtime.

The whole point of decorator pattern is to dynamically add additional behaviour/functionality, which is of course not possible at design time.
from the same article:

The decorator pattern is an
  alternative to subclassing.
  Subclassing adds behavior at compile
  time, and the change affects all
  instances of the original class;
  decorating can provide new behavior at
  runtime for individual objects.
Comment: I have to create decorator classes at design too . So I in similar fashion I could add sub class so what's the point .
Comment: the article at wikipedia provides some examples. Of course you have to do create the decorator classes at design time, put you can choose to apply them dynamically at runtime.
Comment: @Gainster indeed, you're correct here. The biggest advantage of Decorator is a possibility of re-using such decorator for other classes. Exactly as other people stated in this thread.
Comment: @Gainster There are many reasons why to prefer a decorator, among which, 1) You can reuse the same decorator on multiple implementations of the same interface (with inheritance you'll have to subclass every implementation), 2) You can test your decorator in isolation of the decorated object (not possible with inheritance to mock the parent class). Take a look at: https://dzone.com/articles/is-inheritance-dead
Answer: The GoF Design Patterns book identifies two major advantages of using Decorators over subclassing:

More flexibility than static
  inheritance.  The Decorator pattern
  provides a more flexible way to add
  responsibilities to objects than can
  be had with static (multiple)
  inheritance. With decorators,
  responsibilities can be added and
  removed at run-time simply by
  attaching and detaching them. In
  contrast, inheritance requires
  creating a new class for each
  additional responsibility (e.g.,
  BorderedScrollableTextView,
  BorderedTextView). This gives rise
  to many classes and increases the
  complexity of a system. Furthermore,
  providing different Decorator
  classes for a specific Component
  class lets you mix and match
  responsibilities.
Decorators also make it easy to add
  a property twice. For example, to
  give a TextView a double border,
  simply attach two BorderDecorators.
  Inheriting from a Border class twice
  is error-prone at best.
Avoids feature-laden classes high up
  in the hierarchy. Decorator offers a
  pay-as-you-go approach to adding
  responsibilities. Instead of trying
  to support all foreseeable features
  in a complex, customizable class,
  you can define a simple class and
  add functionality incrementally with
  Decorator objects. Functionality can
  be composed from simple pieces. As a
  result, an application needn't pay
  for features it doesn't use. It's
  also easy to define new kinds of
  Decorators independently from the
  classes of objects they extend, even
  for unforeseen extensions. Extending
  a complex class tends to expose
  details unrelated to the
  responsibilities you're adding.

From  my point of view, preventing subclass explosion alone is quite compelling.
If you have a TextWindow to which you want to add horizontal scrolling, vertical scrolling, and borders all independently and optionally, using subclasses, you'd have to define subclasses for HorizontalScrollingTextWindow, VerticalScrollingTextWindow, HorizontalAndVerticalScrollingTextWindow, BorderedTextWindow, HorizontalScrollingBorderedTextWindow, VerticalScrollingBorderedTextWindow, HorizontalAndVerticaScrollingBorderedTextWindow, and more if you care about the order of scrolling and bordering.
With Decorators, you only need to define two scrolling decorators and one border decorator.
Comment: But such class does not conform to Single Responsibility Principle, isn't it? Such "multi-talented" classes should be avoided
Answer: Subclassing can lead to issues with the Liskov substitution principle.  The decorator avoids this.
Another advantage of the decorator is that you are writing (forced to write) to an interface.  This makes things easier for testing.  It is true that your object hierarchy can also be written to an interface and thus have some of the same advantages, however, I can test a single implementation of a decorator class in isolation.  I cannot do the same with a subclass because I will always get the whole hierarchy back to the base class.  I am unable to test the new code in isolation.
Using the decorator pattern and following the single responsibility principle, I can create several decorators and stack them anyway I wish.  I can configure that at runtime.  In inheritance I either have to create every possible branch (a->b->c then a->c->b, thus duplicating code and exploding the number of tests), or I create 1 hierarchy then add another when needed, but this triggers a new test/release cycle.
This is why you would want to use the decorator pattern instead of subclassing.
Comment: This is a good point...my initial thought was just to use interfaces for such classes, but those are not as modular/testable as having a decorator.
Answer: Here is the differences based on the real implementation.
Decoration is an alternative way of sub classing to extend the functionality of existing classes. Here is some scenario where we should use sub classing or decorator.
1) Sub classing mainly used in the case of extend the functionality of similar
   group of classes which wants to retain the old functionality as well as new
   in the sub classes
   and all the instances of the sub classes share the same functionality. If we
   make the changes of child classes and then it will reflect all the instaces
   of child classes.Such as
   a hierarchy relation ship, similar group of classes.
Parent->Child->GrandSon.
Car->Maruti 800->Maruti 100( will have the feature of Maruti 800 as well as New)
2) Decorator pattern is used to decorate the existing classes without changing the old behavior.Such as a class circle have plain border but we need to decorate it with red border,after some time some user wants circle with yellow color and some user wants circle with green border and some user wants red and yellow border circle and some user wants red and green border circle etc,for this it is the perfect pattern as it will reduces no of combination classes.Below is the example.
Icircle cir=new RedDecorator(new circle()) decorating the circle with red color
Icircle cir=new YellowDecorator(new circle()) decorating the circle with Yellow color
Icircle cir=new RedDecorator(new YellowDecorator(new circle())) decorating the
circle with red and Yellow, here we do not need to create RedAndYellow class decorator. same way we can decorate the circle with other set of combination without creating new set of combination classes.
In this way it reduces the no of combination classes.
Here is the useful link for decorator pattern
https://www.tutorialspoint.com/design_pattern/decorator_pattern.htm
Answer: Flexibility, that's the reason IMO.

Decorator pattern versus sub classing


photon absorption by atoms causes heat?

Question: I have came up with a weird doubt: photon absorption by atoms causes heat? I mean, I was always told that if the photon's frequency is the magic one, the atoms absorbs the photon and goes to an excited state. So I have to suppose that heating (increasing in kinetic energy) happens when the frequency is outside the set of permitted transitions. Is it correct?
Answer: This is true. If for example you subject Hydrogen gas to a perfectly monochromatic 121.57 nm laser, then all that will happen is that the gas will scatter the light in all directions, glowing without increasing the temperature.
Otherwise there are many different phenomena that are involved in the heat transfer of energy by radiation. For example in solids, photons are absorbed and turn into phonons which are waves that when they are numerous lead to thermalization, and for molecules you have photon absorption that leads to molecular vibration which again increases the root mean square speed, etc...
Comment: "If for example you subject Hydrogen gas to a perfectly monochromatic 121.57 nm laser" Well, even this will cause heat, as due to the conservation of momentum and natural line width the line will be shifted off the resonance by the repeated absorption/emission processes, depositing energy in the gas during this process.
Comment: true, but for a dilute enough gas this can be neglected.
Comment: Sure, but still, the answer to question will be no in general, for several reasons. (Unless it is directed at a single isolated atom, for which speaking of a temperature is pointless). (Although there are obviously exceptions, for example laser cooling).

photon absorption by atoms causes heat?


How to find direction of friction on a banked curve?

Question:
I don't understand how the force of friction can face a different direction in each case. To my understanding, without friction there is a net force down the slope. We want the net force to be towards the right (centripetal acceleration). So why isn't the force of friction always up the slope to cancel the y component of the net force?
Answer: You o want the net force to be to the right, but when the component of gravity that is to the right is already larger than that, then you need friction to point the other way.  So the free-body diagrams are correct, all that remains is to use the v and r to figure out the centripetal force, and then make friction, gravity, and the normal force add up to it.
Comment: Don't you mean "when the component of *the normal force* that is to the right"? Gravity is always vertical and never has a horizontal component. Or do you mean "the component of gravity *down the slope*"?
Comment: Yes, I meant to the right and down the slope, when that component of gravity is larger than the component of the centripetal force to the right and down the slope, then there will need to be a friction upward and to the left.  You could also do it horizontally as you suggest, but you will need to know the normal force, so it will end up the same way.
Answer: When the car is at rest on the banked track, the component of the gravitational force on the car in the direction parallel to the slope is down the slope (in your figures).  For the car to be in equilibrium (at rest) on the bank, the frictional force (parallel to the slope) exerted by the track on the car must be up the slope.
When the car starts traveling at a low velocity around the track, the gravitational force component down the slope stays the same, but the frictional force exerted by the track on the car up the slope must decrease to provide a net force down the slope to allow the car to experience centripetal acceleration.  As the speed increases, at some point, the frictional force exerted by the track will drop to zero, and the gravitational component down the slope will be sufficient to solely match the mass times the centripetal acceleration.  This is called the critical speed.  At speeds exceeding the critical speed, the track will have to exert a frictional force down the slope (i.e., in the same direction as the gravitational component) in order to provide the centripetal acceleration.
Answer: Perhaps it is best explained by using some diagrams showing the forces acting on the car being added together to produce a net inward force $\vec F_{\rm net}$ which produces the centripetal acceleration.

Diagram 3 shows the "ideal" banking situation where no frictional force is required.
The constraints are:

The gravitational force $\vec F^{\;\rm grav}_{\;\rm EC}$ is fixed in
magnitude and direction.
The normal reaction force $\vec F^{\;\rm norm}_{\;\rm TC}$ is fixed in
direction relative to the gravitational force $\phi$ by the angle of
the slope $\theta$.
The frictional force $\vec F^{\;\rm s-fric}_{\;\rm TC}$is has to be at
right angles to the normal force.
The net force $F_{\rm net}$ must be horizontal and towards the centre
of the curve.

So you want the car to go round the corner faster than the ideal banking situation.
This requires a larger net inward force and the only way that can be done is to make the magnitude of the normal force larger, remember you cannot change its direction, and add an inward, down the slope, friction force at right angles to the normal force as in diagram 1.
For the car to go slower around the corner diagram 2 shows the way.
Reduce the normal force and add a frictional force up the slope.


What is the best way to encrypt a password?

Question: I am about to make a 'Log In' for my app and was wondering what is the best way to encrypt a password for my user that i will enter in my database ? I found many way on Google but don't know which is the best.
Comment: Do you need "Encrypted" passwords or "Hashed" passwords? This is not ths same. Hashed is more secure, but if you need to be able to read them someday, then Encrypted is the way to go. Most answers below assume you want hashes. Can you clarify :) ?
Comment: i want hashes . More secure :)
Answer: I would go with a one way salted hash.
Using a SHA1 hash for example, you would have a way to store the password as a hash which cannot be reversed back to the original password. Then when the user enters his/her password you perform the same SHA1 hash on the password and compare that hash with what you have stored in the DB, if they match then the password is correct.
To further secure the hashing, you can add a salt, this is essentially a randomly generated value that you generate for each user then you create the account, and store the salt value in the user record. When you create the hash of the password, you first combine the password with the salt and hash this combined value. To authenticate the user you combine the entered password with the salt stored for the user, perform the hash on the combined value and compare.
By adding the salt to the mix, you ensure that the hash for passwords that happend to be the same have a different hash because the salted portion differs. So if two users have the same password "Password1234", the stored hash for the two will not be the same so it cannot be determined that two users have the same password.
Comment: This is a great place to get started on this http://www.obviex.com/samples/EncryptionWithSalt.aspx
Comment: +1, but I would not recommend to use SHA1. I'd recommend blowfish/twofish or SHA-2. See: http://stackoverflow.com/questions/1561174/sha512-vs-blowfish-and-bcrypt
Comment: Purse SHA1/SHA2 isn't optimal since it's fast and thus more susceptible to brute-force. So using a good KDF is better.
Comment: salted hashes are all well and good, but they don't protect against brute-force attacks - SHA is fast. These days, you can rent access to password-breaking clusters built with GPGPUs, and those are *fast* at bruteforcing.
Answer: I recommend using Rfc2898DeriveBytes
It uses a good standardized Key-Derivation-Function, and modern hashes. You need to pass in a salt in addition to the password to prevent rainbow-tables. And it mixes salt and password for you, so you don't need to figure out how to do that yourself.
Comment: RFC2898 is also known as PBKDF2.
Answer: Use bcrypt. No, really, drop whatever ideas you have of building your own method, and use bcrypt. The world has enough homebrew insecure password hashing schemes already.
Storing salted password hashes, with per-user salts of course, is all well and good. But salting only prevents rainbow table attacks, it doesn't prevent bruteforcing. So, paradoxically, you don't want to use a fast method to generate or verify the password hashes. MD5, SHA, whatever - they're all fast. Repeat after me: use bcrypt.
Comment: Bcrypt and PBKDF2 (aka RFC2898) are both fine KDFs.  But *do* use a real KDF!
Answer: You can use RSA Algorithm: http://www.codeproject.com/KB/security/RSACryptoPad.aspx
Answer: Use Cryptography algorithm provided by .net framework
normally , many application uses MD5 algorithem
See here
Comment: Unless you absolutely need the smaller key size or the speed, there is really no reason to use MD5 in new applications.
Comment: There is no reason to use MD5 except backwards compatibility. For new code I'd prefer SHA-1 or SHA-2
Comment: Definitely SHA-2. The .NET Framework provides SHA256 and SHA512 as built-in functions in the [`System.Security.Cryptography`](http://msdn.microsoft.com/en-us/library/system.security.cryptography.aspx) namespace.
Comment: please downvote answer also so that i can learn something useful


Concise word or phrase for someone who is good at using knowledge or concepts across disciplines?

Question: I am struggling to think of a word for this to be used if you are to describe someone who has an aptitude for using experience in one field, say mechanics and applying it to say biology. This adaptability. Maybe it's a just a description of the knowledge itself. Can anyone help me out? This word or phrase escapes me
Comment: I don't know about adaptability. Perhaps someone who is isn't limited by the artificial compartments into which knowledge is pigeonholed. Someone who can think "out of the box."
Comment: Well, there's "polymath", but it doesn't quite fit your requirements.
Comment: Does it have to bea real word? Sci-fi writer A. E. van Vogt coined the word [nexialist](http://www.nexialism.info/) in his 1950 fix-up novel [*The Voyage of the Space Beagle*](https://en.wikipedia.org/wiki/The_Voyage_of_the_Space_Beagle).
Answer: Such a person would have the ability to work in a cross-disciplinary manner.
Whether anyone has coined a word like 'cross disciplianarian' I don't know but even if it exists with the meaning you require I fear that most people would take it to refer to an annoyed schoolmaster or military drill sergeant.
Answer: The answer I was looking for was 'lateral thinking'!
Comment: Remember to accept this as soon as you can. Also, don't edit the answer into the question, just tick this one instead.
Answer: I would say they are eclectic:

[Merriam-Webster]
2 : selecting what appears to be best in various doctrines, methods, or styles

In particular, this not only says that they have knowledge from multiple disciplines, but that they are also good at using the best aspects of each of those disciplines.


Properties of relays

Question: i know how a relay works, my question is this. i have a load that needs to be turned off and on remotely. The piece of equipment is 220volts at 30 amps. is there such a thing as being able to use a small, low voltage  of 12 or 24vac or dc to actuate the relay? It sounds simple, and what relays are for, but i can't find relays on line that can do that. this is in a commercial building application. thank you.
Comment: S/he hasn't asked for a product recommendation. It's a design question asking what sort of component to use.
Comment: Questions seeking recommendations for specific products or services are off-topic in this forum and will be closed.
Comment: If you have access into a common domestic shower water heater, pls pry open and see inside. You will get what you want.
Answer: What you're looking for is called a contactor. An example of a contactor meeting your requirements can be found at Digikey, but any electronics distributor will have the sort of thing you need.
Be aware, though, that high-power relays need high-power coils in order to move the contacts quickly through a long throw to quench any arcs. The units I linked, for instance, need a 24VDC coil, but pull nearly 3 amps. And yes, that's about 70 watts of coil power.
They also are not cheap, and you should figure on a ballpark figure of 100 to 150 dollars.
Answer: Old-school mechanical relays (or "contactors" as they are called in larger sizes) that are physically large enough to switch 30A typically take more to turn-on (or "pull-in") than the small amount of power available in a low-voltage control circuit.
Certainly, you could use a simple and inexpensive SSR (Solid State Relay) to control the larger relay/contactor.  That would allow you to use very low power (essentially "logic-level") to control the 120 or 240VAC to the large relay.
For that matter you could use a SSR to control the 240V, 30A directly without the need for the large mechanical relay/contactor.  SSRs are available up to probably over 100A.
Note, however, that any kind of mains wiring in a commercial building is probably regulated to be designed, specified and installed by licensed professional electricians.  For that reason, it might be a better trade-off to leave the high-current mains wiring (including the relay/contactor) to the licensed people who are responsible for the safety, and then you can use an SSR as a safe interface between your low-voltage control signal and the 120V (or whatever) it takes to activate the large relay/contactor.
I would not attempt to do this myself in a commercial installation, nor would I recommend it as a DIY project to anyone else.
Answer: You're on the right track.  For projects like this, you'll find a robust and inexpensive parts bin intended for air conditioning units, furnaces and thermostats.  These systems use 24VAC sent to a thermostat to switch contactors which operate air conditioning compressors, dehumidifiers, etc.
For a contactor, look to 30-40A DPST contactors intended for air conditioning units.  $13 to $25.
For low voltage power, use a 120V to 24V transformer intended to power thermostats.  $10 to $20.  Many of them are physically packaged for easy NEC compliance, e.g. the transformer mounts on the cover of a junction box, or in a 1/2" knockout, and put the 120V contacts inside the junction box, and the 24V contacts outside.

Properties of relays


Python: how to setup python-ldap to ignore referrals?

Question: how can I avoid getting (undocumented) exception in following code?
import ldap
import ldap.sasl

connection = ldap.initialize('ldaps://server:636', trace_level=0)
connection.set_option(ldap.OPT_REFERRALS, 0)
connection.protocol_version = 3
sasl_auth = ldap.sasl.external()
connection.sasl_interactive_bind_s('', sasl_auth)

baseDN = 'ou=org.com,ou=xx,dc=xxx,dc=com'
filter = 'objectclass=*'
try:
  result = connection.search_s(baseDN, ldap.SCOPE_SUBTREE, filter)
except ldap.REFERRAL, e:
  print "referral"
except ldap.LDAPError, e:
  print "Ldaperror"

It happens that baseDN given in example is a referral. When I run this code I get referral as output.
What would I want is that python-ldap just would skip it or ignore without throwing strange exception (I cannot find documentation about it)?
(this may help or not) The problem happened when I was searching baseDN upper in a tree. When I was searching 'ou=xx,dc=xxx,dc=com' it started to freeze on my production env when on development env everything works great. When I started to looking at it I found that it freezing on referral branches. How can I tell python-ldap to ignore referrals? Code above does not work as I want.
Answer: This is a working example, see if it helps.
def ldap_initialize(remote, port, user, password, use_ssl=False, timeout=None):
    prefix = 'ldap'
    if use_ssl is True:
        prefix = 'ldaps'
        # ask ldap to ignore certificate errors
        ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)

    if timeout:
        ldap.set_option(ldap.OPT_NETWORK_TIMEOUT, timeout)

    ldap.set_option(ldap.OPT_REFERRALS, ldap.OPT_OFF)
    server = prefix + '://' + remote + ':' + '%s' % port
    l = ldap.initialize(server)
    l.simple_bind_s(user, password)


Can black make a draw offer?

Question: I am playing a chess game and my opponent is black and he asked me if I would accept a draw since I have a King and a Knight while he has a King and a Bishop. I told him that he can make an offer and he mentioned it's against etiquette when black makes an offer. Can you please lead me to locate the source? The game is on GameKnot.com.
Comment: If random people on third-rate chess sites are making claims about rules and it's not about a weird pawn capture, assume they're lying.
Comment: Your opponent offered you a draw, and you told him that he can offer you a draw, and he said it wouldn't be etiquette for him to offer you a draw? What am I missing?
Answer: There is no such rule.
It would be against etiquette for one side to offer a draw repeatedly, or to offer one in a position which is a certain loss. FIDE rule 11.5 lists "unreasonable offers of a draw" as one thing that can constitute distracting or annoying an opponent, which is prohibited.
In an official over-the-board game, the proper time to request a draw is after you've made your move but before you hit the clock (FIDE rule 184.108.40.206.) That seems to be impossible in an online game, so I would say that it would be best to make the offer right before you move, so that the offer notification doesn't come during your opponent's thinking time.
Comment: While this may be obvious, this would not be considered a "certain loss". Checkmate is possible in this situation only if both players work together so the game would draw from fifty moves or threefold repetition.
Comment: What is this etiquette to do with purpose of Chess. Chess has been so heavily moderated by Fide, that Original Chess lost its purpose.. What we play today is fantasized Chess
Comment: @ComicSansSeraphim Of course OP's situation is not a certain loss; a loss would be quite unexpected here, and a draw offer is appropriate. But if the opponent had two queens and a bishop vs OP's knight, then OP offering a draw would ordinarily not be appropriate (exceptions include situations where the opponent has a real chance of losing on time, or has made no progress after a large number of moves.)

Can black make a draw offer?


Could not calculate upgrade when upgrading to Ubuntu 20.04. Can't find solution that works

Question: I finally decided to upgrade to Ubuntu 20.04 from 18.04 today after waiting to ensure there was compatibility with some programs I use my Ubuntu machine for. While running the upgrade today I got an error saying:

Could not calculate the upgrade
An unresolvable problem occurred while calculating the upgrade.
If none of this applies, then please report this bug using the command 'ubuntu-bug ubuntu->release-upgrader-core' in a terminal. If you want to investigate this yourself the log files in >'/var/log/dist-upgrade' will contain details about the upgrade. Specifically, look at >'main.log' and 'apt.log'."

I've searched tirelessly through forums and anywhere I could find help with this subject, and tried a few solutions I found, but none seem to fit my circumstance. I've disabled all unofficial and third-party packages that I know of.  I wanted to see if someone could take a look at my logs from /var/log/dist-upgrade/ and help me with a solution to this error. I would really appreciate any help anyone could give me.
Links to log files-
apt.log
main.log
Answer: From the apt.log it seems like most of the issues relate to python2, python3, etc.
Would you be willing to
<code>    sudo apt remove python2
    sudo apt remove python3
</code>
then retry your upgrade?
If that succeeds, you may replace the packages that you need.
Make sure you capture the list of removals so that you can reinstall when you hit 20.04
avoid running
<code>    sudo apt purge
</code>
though.
Regards,
mondotofu


Variance-covariance matrix in lmer

Question: I know that one of the advantages of mixed models is that they allow to specify variance-covariance matrix for the data (compound symmetry, autoregressive, unstructured, etc.) However, lmer function in R does not allow for easy specification of this matrix. Does anyone know what structure lmer uses by default and why there is no way to easily specify it?
Answer: Mixed models are (generalized versions of) variance components models. You write down the fixed effects part, add error terms that may be common for some groups of observations, add link function if needed, and put this into a likelihood maximizer.
The various variance structures you are describing, however, are the working correlation models for the generalized estimating equations, which trade off some of the flexibility of the mixed/multilevel models for robustness of inference. With GEEs, you are only interested in conducting inference on the fixed part, and you are OK with not estimating the variance components, as you would in a mixed model. For these fixed effects, you get a robust/sandwich estimate that is appropriate even when your correlation structure is misspecfieid. Inference for the mixed model will break down if the model is misspecified, though.
So while having a lot in common (a multilevel structure and ability to address residual correlations), mixed models and GEEs are still somewhat distinct procedures. The R package that deals with GEEs is appropriately called gee, and in the list of possible values of corstr option you will find the structures you mentioned.
From the point of view of GEEs, lmer works with exchangeable correlations... at least when the model has two levels of hierarchy, and only random intercepts are specified.
Comment: I'm not sure the distinction being suggested by StasK is really correct here. While these alternative correlation structures are indeed used by GEEs, it is perfectly possible to fit (fully parametric) mixed models with more complicated structures for the covariance of either random effects or residual errors, and the nlme package in R, SAS Proc Mixed, or Stata's mixed commands do this.
Comment: Thank you, Stas. I have not heard of GEEs before and just trying to learn mixed modeling (which is tricky and is also amplified by the differences in software implementation). I will give GEE a try. I really have a simple experiment with repeated measures with biomedical dependent measures. I am interested in the fixed part mostly. My previous training is mostly in standard fixed effects ANOVAs so it may be an easier transition.
Comment: I like the idea of estimating the fixed parameters and have tried the gee library. There are other libraries too (geepack, for example). Are they worse for some reason? In my field people need to report p-values. Is there a way to get these from the estimates and also conduct pairwise comparisons taking clustering into consideration?
Comment: Pairwise comparisons of what? The variety of R libraries has always been driving me nuts, and I don't research into the differences between packages unless I have a real need to work on a specific model.
Comment: StatsK, is this really correct? I am a beginner in multilevel modelling but Hox (2010) or Rabe-Hesketh & Skrondal (2013) clearly distinguish between different variance estimaters via MLE and GEE. For example when calculating "robust" sandwich standard error, Hox (p. 260) says you can either calculate them via multilevel modelling using the Information matrix / inverse of the Hessian matrix (taking the multilevel structure into account) or via estimating the variance from  raw residuals and using GLS afterwards to calculate the coefficients (GEE approach)
Comment: @JonathanBartlett, I mostly work with Stata, and its `mixed` [command](http://www.stata.com/help.cgi?mixed) indeed allows exchangeable, unstructured and independent structures (not the autoregressive one though for which you need to make additional assumptions that your units are observed at the regular time intervals).  Won't vouch for SAS or R though as I don't know them as thoroughly. Let me see if I can edit my response to make my points clearer.
Answer: The FlexLamba branch of lmer provides such a functionality.
See https://github.com/lme4/lme4/issues/224 for examples how to implement a specific structure of errors or random effects.
Comment: Can I have both the regular and FlexLambda branches installed at once?. How?
Answer: To my knowledge lmer is not having an "easy" way to address this. Also given that in most cases lmer makes heavy use of sparse matrices for Cholesky factorization I would find it unlikely that it allows for totally unstructured VCV's.
To your address your question on "default structure": there is not a concept of default; depending on how you define your structure, you use that structure. Eg. using random effects like : $(1|RandEff_1)+(1|RandEff_2)$ where each random effect has 3 levels will result in unnested and independent random effects and a diagonal random effects VCV matrix of the form:
$R = \begin{bmatrix}
\sigma_{RE1}^2 &  0& 0 & & 0 & 0  & 0\\
0 &  \sigma_{RE1}^2& 0 & & 0 & 0  & 0\\
0 &  0& \sigma_{RE1}^2 & & 0 & 0  & 0\\
0&  0& 0 & &  \sigma_{RE2}^2 & 0 & 0 \\
0 &  0& 0 & & 0 &  \sigma_{RE2}^2 & 0\\
0&  0& 0 & &  0& 0 & \sigma_{RE2}^2  \\\end{bmatrix}$
All is not lost with LME's though:
You can specify these VCV matrix attributes "easily" is you are using the R-package MCMCglmm. Look at the CourseNotes.pdf, p.70. In that page it does give some analogues on how lme4 random effects structure would be defined but as you'll see yourself, lmer is less flexible than MCMCglmm in this matter.
Half-way there is problem nlme's lme corStruct classes, eg. corCompSymm, corAR1, etc. etc. Fabian's response in this tread gives some more concise examples for lme4-based VCV specification but as mentioned before they are not as explictly as those in MCMCglmm or nlme.
Comment: I don't "trust" MCMCglmm, because of the naive choice of prior distributions.
Comment: A. I don't think it is "naive"; they can reflect valid assumptions. You can even define improper priors if you feel that strongly for something. B. That was only part of my answer, it didn't say it is the only way to go; I gave example for lme4. C. If you need to do multivariate mixed effects it is practically the only available package along with sabreR...
Comment: Sorry, my comment was not a criticism about your answer. When saying "naive priors", I talked about the noninformative priors.
Comment: It does not seem likely that this R matrix is right. Even the "classical" repeated-measures ANOVA allows for non-zero correlations between the conditions (I'm thinking of the compound symmetry matrix). Seems to me that this matrix would only be valid for a between-subject design with random assignment with two clusters.
Comment: The matrix is "right"; given that I indeed defined two clusters as: $(1|RandEff_1)+(1|RandEff_2)$, it makes sense. Clearly it encodes no compound symmetry in the dynamics of the variance.
Comment: Great! Thank you for the link to Fabian's question.

Variance-covariance matrix in lmer


Coefficients in a binomial expression

Question: Using combinations find the coefficient of $x^3$ in the binomial expression of $(2x+3)^5$
I don't even know where to start, all I know is it has something to do with Pascal's triangle.
Answer: Well, $(2x+3)^5 = (2x+3)(2x+3)(2x+3)(2x+3)(2x+3)$.  Now think about how you expand such expressions.  The cube terms are going to be formed by multiplying three $2x$ terms together.  How many ways are there to do that?  Well, we need to choose three of them, and there are 5 possibilities from which to choose.  Hence, there are $\binom{5}{3}$ ways.  Now when we multiply three $2x$ terms together, the resulting coefficient is going to be $2^3 = 8$.  In addition, since we are multiplying over $5$ pairs of parenthesis, once we have chosen three $2x$ terms, we finish up by multiplying that by two $3$'s from the remaining two pairs of parentheses.
Hence, the final coefficient on a single $x^3$ term will be $8 \cdot 3 \cdot 3 = 72$, and there are $\binom{5}{3}$ such terms...
Answer: Using the binomial expansion
\begin{align}
(t+u)^{m} = \sum_{k=0}^{m} \binom{m}{k} t^{m-k} \ u^{k}
\end{align}
then
\begin{align}
(2x+3)^{m} &= \sum_{k=0}^{m} \binom{m}{k} 2^{k} \ 3^{m-k} \ x^{k} \\
&= 3^{m} + 2 \cdot 3^{m-1} m x + 4 \cdot 3^{m-2} \binom{m}{2} x^{2} + 8 \cdot 3^{m-3} \binom{m}{3} x^{3} + \cdots \\
\end{align}
Answer: Hint: $5\choose3$ would be the binomial coefficient of $x^3$ in $(x+1)^5$ which isn't quite what you have.
Instead of $x$ you have $2x$ and instead of $1$ you have $3$ on the end which are also worth considering here. What kind of adjustments do you think you have to make for your case?
Answer: It is $ 5C_2*(2x)^3*3^2 $. So co-efficient would be: $10*8*9 = 720$.
This can be calculated using Binomial theorem. If you are new to the topic, you can learn quickly about Binomial theorem here.
Answer: Perhaps you should start with a simpler problem. Pascals triangle is 1,121,1331,etc... you can find it here, but make sure you see how the next row is calculated from the previous.
Lets look at 121. What is this saying in terms of polynomials? It is on the 2nd level so it tells you it can simplify a polynomial of the form $(ax+b)^2$ for some numbers $a$ and $b$. If you are asked to simplify $(3x-2)^2$ then $a=3, b=-2$. For example, $$(ax+b)^2 = 1(ax)^2(b)^0 + 2(ax)^1(b)^1 + 1(ax)^0(b)^2$$
Do you see how the 1,2,1 were used? And how the $ax$ and $b$ were combined? Remember that anything to the power $0$ is $1$ (well, except $0$, but that's sort of an edge case)
Lets do a polynomial of degree 3. Lets do $(ax + b)^3$. Ok, where is the cheat for this in Pascals triangle? The 3rd line is 1,3,3,1. So we need: $$1(ax)^3(b)^0 + 3(ax)^2 (b)^1 + 3(ax)^1(b)^2 + 1(ax)^0(b)^3$$
So, I will show you how to get the $x^2$ term from the polynomial $(2x-3)^4$.
The line in pascals triangle is 1,4,6,4,1. This means the $x^4$ term has a 1 in front, the $x^3$ term has a 4 and the $x^2$ term is then:
$$6(2x)^2(-3)^2$$
Which we simplify as:
$$6(4x^2)(9)=24\times 9 x^2 = 216x^2$$
Hope this helps. There are some videos at Khan Academy which explain this better.

Coefficients in a binomial expression


Is round trip of 80 KM enough to exempt from Fasting?

Question: I travel from home to university which is 40 KM and then travels back to home. So my total travel is 80KM. is it allowed for me to leave the fast? if yes when I can complete them?
Comment: Is 80 km the distance defined by Hanafi school of fiqh? Further I couldn't find any fatwa counting both direction because the meaning of travel is to stay the night outside not at home. And even if we assume it is the case when and how will you perform qada' of these missed days? In modern days 80 km is no distance...and if I'm not wrong the Hanafi didn't count a distance by length rather than time of days
Answer: Yes, it is permissible for you to leave fast, however, based on modern technology, you would be driving in a car, so that would not make you tiresome, however, if you are taking a long walk, then it would make it permissible for you to leave your fast. As such, a person on a journey is given the concession that he or she does not need to fast in Ramadan, but he or she must compensate for it by fasting the same number of days he or she did not fast during his or her travel.
[Fasting for] a limited number of days. So whoever among you is ill or on a journey [during them] - then an equal number of other days [are to be made up]. And upon those who are able [to fast, but with hardship] - a ransom [as substitute] of feeding a poor person [each day]. And whoever volunteers good [i.e., excess] - it is better for him. But to fast is best for you, if you only knew.
-Quran 2:184
Narrated by Aisha:
(The wife of the Prophet) Hamza bin `Amr Al-Aslami asked the Prophet, "Should I fast while travelling?" The Prophet (ﷺ) replied, "You may fast if you wish, and you may not fast if you wish."
-Sahih al-Bukhari 1943
Narrated by Ibn Abbas:
Allah's Messenger (ﷺ) set out for Mecca in Ramadan and he fasted, and when he reached Al-Kadid, he broke his fast and the people (with him) broke their fast too. (Abu `Abdullah said, "Al-Kadid is a land covered with water between Usfan and Qudaid.")
-Sahih al-Bukhari 1944
Answer: Bro, sitting in your car, driving, don't count, at all, whatsoever. I know you ain't walkin' 80k lol. 1400 years ago they didn't drive cars (travel meant on foot) final answer.


Question about ipsec prevent SYN flooding attack

Question: how IPSec prevents SYN flooding attacks Like if A is sending packets to B using IPsec. Suppose B's TCP ack gets lost, and A's TCP retransmits the packet since it assumes the packet was lost. Will B's IPsec implementation notice that the packet is a duplicate and discard it?
Answer: IPSec does not prevent SYN flooding. IPSec is a VPN at the network layer (i.e. IP) and not the transport layer (TCP, UDP). It will transport any IP packets and not look deeper. But since SYN is a capability of TCP and SYN flooding an attack thus at the transport layer a pure IPSec VPN will not detect SYN flooding.
Of course you could augment an IPSec VPN with additional software or hardware to detect such attacks the same way as you could augment plain (non-VPN) IP networks this way. Though it will not be possible to detect such attacks within the encrypted IPSec traffic but only in the decrypted traffic.


Impossible knot

Question: Encountered this knot in a real life example (tangled necklace). Is it possible to untangle it (without e.g cutting the loop) and if so, how?
Comment: What is the question?
Comment: There could be multiple possibilities. You could've been asking about step-by-step how to untangle it, or whether it is possible to shape an uncut loop of string in the shape you showed, or whether it is isomorphic to some other shape with N intersections, or whether you have transcribed this correctly and would like to get feedback where the error would have been. Or, you know, maybe there is no question at all since you just find this shape cool. :)
Comment: @justhalf I post a picture of a knot. What do you think the question is?
Comment: The question has been edited to ask explicitly whether the loop can be untangled without cutting. It seems to me that this resolves the objection that led to the question's closing, but three users left it closed when it was presented in review. I am reluctant to overrule the Will Of The People by reopening it myself, but I don't quite understand why reopening wasn't successful. (It's possible that it might then get closed _again_ for being not puzzle-y enough, but that's a separate issue.)
Comment: It got 4 reopen votes from other people, so I added mine. Again, I can't guarantee that it won't now get re-closed for being more a mathematical exercise than a puzzle or something of the kind.
Comment: This definitely felt like a puzzle to me!
Answer: First, to check that it's possible for this knot diagram to be untangled (that this is a diagram of the unknot), I computed its Jones Polynomial. Its Jones Polynomial evaluated to 1, which is the value of all unknot diagrams. For all known knot diagrams which cannot be untangled (which are not diagrams of the unknot), the Jones polynomial is different from 1. Therefore, at this point I was confident that this knot could be untangled.
Here's how I untangled it. Read left-to-right, then top-to-bottom:

Comment: @msh210 I think the diagrams show the arrangement of the string over time. It's not necessarily to scale. Are you suggesting that something about the loop of string makes it impossible to exist in that configuration (i.e. with that pattern of crossings)?
Comment: @msh210 On the Jones Polynomial, that's why I said "all known knot diagrams ..." - though if this was the first counterexample to the pattern, that would be way more exciting.
Comment: The way you did your first step requires a longer string than is given. Since the question noted that this is a physical object, I don't think this is a good solution.
Comment: At least according to Wikipedia, it's still unproven that only the unknot has trivial Jones polynomial.
Comment: No, @Sneftel, just that it was drawn longer. Anyway, on second thought, I've upvoted this now, though I still maintain it doesn't meet the letter of the question.

Impossible knot


How to remove paint from light socket

Question: I had my house painted, the painter did not cover my motion detector light, he sprayed paint into the socket. I can see paint on the threads but not where the bulb touches the connectors.
I screwed on a light bulb, and it still works.
But is the light safe to use? Will the paint cause a fire?
There is no way I can remove the socket, how will I go about cleaning it safely?
Comment: Is this a regular light socket for incandescent lights?  When you say "connectors" that makes it sound like possibly something else since the screw threads actually conduct electricity in regular old light sockets.
Answer: If the light is working, it should be okay without having to clean the threads.
Personally, I would probably clean it...but thats just because, mentally, I can't allow that imperfection. Although, It would certainly be unnecessary if the light is functioning properly.
If you are like me and must at least try something, and you are not comfortable cutting the power and testing for a current before cleaning it, you could simply twist the bulb all the way in and out a few times in an effort to rub some of the paint off of the threads.
Comment: Welcome to Home Improvement! Nice first answer.
Answer: When I was a kid building a house with my family I noticed some of our recessed "can" lights had gotten paint spray into the sockets and covered the little "button" terminal. Before I'd even thought it through I put my finger in there to scratch the paint off.. yeah, the circuit was live. Obviously I lived to laugh about it, and I still occasionally work on circuits live.. but I recommend light socket cleaning be done with the power off. ;-)
The part of the threads where the light bulb contacts won't have received paint spray because they're on the side facing away from the spray source. If the button terminal at the bottom of the socket is clean then don't worry about it. Paint overspray into sockets happens often.
Comment: It probably isn't a safety concern but - especially with LEDs - power fluctuations can make bulbs burn out faster no matter how slight.
Answer: The socket threads conduct electricity so there must be some bare spots that touch the bulb threads.
Trying to clean it could be dangerous...if you spill solvents in the fixture or damage it trying to scrap the paint out.
It's fine.   Don't worry.
Comment: True, there are no guarantees in life (except, of course, death and taxes!).
Comment: I would say *probably* don't worry. But if the connection is "barely enough" then it could lead to arcing or overheating.

How to remove paint from light socket


Why do we use the whole radius vector in the angular momentum, and not just the unit vector?

Question: Why don't we only use the unit vector of the radius?
I was thinking that, all we need to know is the component of the linear momentum, perpendicular to it, so why use the magnitude of the radius vector too?
Comment: What would be the angular momentum of the earth, if we measured it from  just say, a metre or kilometer from the core, compared to its real value?
Comment: @StudyStudy sorry, I don't think I got what you're trying to tell. Is it that the origin will be placed, that(few metres) close to earth? Then the angular momentum will be changing..so is it that we want this(angular momentum) to be constant?
Comment: Hi. We are all agreed that the angular momentum of the Earth is a certain constant value, measured from the core out to the surface,  that's why you will find it quoted on Wikipedia as whatever it is. If you decide to use  a radius less than that of the Earth, you will be leaving out the effect of the mass above the radius you choose.
Comment: @StudyStudy Yes, but I wanted to know that, for example, why do two objects, with the same velocity, mass and origin, but moving along two different circles (with different radii) have different angular momentum? Since the velocity are the same, and it's just that they're sweeping angles at different rates
Comment: @SwaroopJoshi - Exactly. They are different because their momentum acts through different points in space. See my answer for more details.
Comment: It's because of Archimedes. He figured it out thousands of years ago.
Answer: The answer to this is true for all definitions in physics. You are asking why angular momentum is defined as $\mathbf L=\mathbf r\times\mathbf p$ instead of $\mathbf L=\hat r\times\mathbf p$. The answer is because the former is very useful. In other words, not only is it useful to know the orientation of the momentum $\mathbf p$ relative to the origin, it is also important to know how far away from the origin you are.
I am sure there are many, many ways to show why the distance is important. One such way is through torque $\boldsymbol\tau=\mathbf r\times\mathbf F$. I am sure you can think of some real-world examples where using the entire $\mathbf r$ vector is important; for example, when opening a door, is it better to push on the door closer or farther from the hinge? Is it better to push perpendicular or parallel to the door? Torque and angular momentum are related through a time derivative: the rate of change of the total angular momentum of a system is equal to the external torque acting on it i.e. $\boldsymbol\tau=\mathbf{\dot L}$. This relation would not hold if the latter proposed angular momentum was used.
Would it be wrong to try and use what you propose? Certainly not. Would it be useful? I am not sure, but if it is you would need to show why it is useful. Either way, you seem to be going backwards. You seem to have an idea of how angular momentum "should be", but this isn't how we determine useful quantities in physics. It would be like me saying I want to define a new concept called "ultra-fine momentum", and I want to come up with an equation for it. This doesn't make sense, because how would I know what is the "right definition" for this random thing I am deciding to use?
In other words, the question isn't, "I want to define angular momentum, what should the definition be?" The question is, "This thing here, $\mathbf r\times\mathbf p$, keeps popping up. Could this be an important/fundamental quantity for certain systems?" It turns out that keeping the entire $\mathbf r$ vector in this definition turns out to be very useful for many systems across many branches of physics, so we keep it like that and we have given it the name "angular momentum".
Comment: Yes, in fact, the last question you quoted was what I wanted to know. As in, why are we differentiating two objects in a system with the same 'momentum' but, moving along different circles(with different radii)? I was expecting an answer that would involve the angle swept(since it's 'angular' momentum). If you say that the same answer holds, then I think, I'll stay with it: that knowing the radius is important. And, from the relation you gave, between torque and angular momentum, is it coincidental? Or was any of them built on the either?
Comment: @SwaroopJoshi Yes you can relate it to angular displacement as well. I don't understand your final two questions. If you are just asking about the history of torque and angular momentum, then I'm not really sure which came first, where they exactly first came about, etc.
Comment: So, if you may answer this follow-up, when the rate at which the angle is swept(larger radius) for one object is lesser, why is it assigned greater angular momentum? Or is this just an outcome that we should accept?
Comment: so, because the angular momentum as rXp for the planets hold true, we can consider this to be a reason to use this expression itself?
Comment: @SwaroopJoshi Angular momentum is a definition. There isn't a way for $\mathbf r\times\mathbf p$ to not be the angular momentum of the plantets (or anything), since that is just the definition of angular momentum.
Comment: what I was referring to was the last part of your answer. As in, if we can use the natural conversation of angular momentum as a reason or motivation to use rXp. Anyway another thought I got was that if we arrive at this formula from the definition of angular velocity->rotational kinetic energy->moment of inertia, and then multiply moment of inertia with angular velocity to get the angular momentum. Is this suggested?
Comment: @SwaroopJoshi  Surely because of how useful angular momentum is, and how often it shows up, there are bound to be many ways to show why we have defined it to be what it is.
Answer: Angular momentum is the moment of momentum just as torque is the moment of force and velocity is the moment of rotation.
All the moment of xxx  quantities are evaluated using the full radius vector since the moment arm (minimum perpendicular distance) to the line where the quantity is acting though is needed.
$$\matrix{ \text{(moment of rotation)} = \boldsymbol{r} \times \text{(rotation)} & \} &
 \boldsymbol{v} = \boldsymbol{r} \times \boldsymbol{\omega} & \} & v = d_\perp\, \omega }$$
$$\matrix{ \text{(moment of momentum)} = \boldsymbol{r} \times \text{(momentum)} & \} &
 \boldsymbol{L} = \boldsymbol{r} \times \boldsymbol{p} & \} & L = d_\perp\, p }$$
$$\matrix{ \text{(moment of force)} = \boldsymbol{r} \times \text{(force)} & \} &
 \boldsymbol{\tau} = \boldsymbol{r} \times \boldsymbol{F} & \} & \tau = d_\perp\, F }$$
See also this answer for why cross products in physics related to the moment arm (minimum distance to line).
The truth of the matter is that angular momentum (and all other moments of xxx) only tell us where momentum is acting though. It is a supplementary quantity that describes the geometry of a problem. See this answer asking of torque is a fundamental quantity. Same argument applied to angular momentum.
When angular momentum is conserved, it means that not only the magnitude and direction of momentum is conserved, but also the line in space where momentum acts through. The location where momentum acts is commonly called the center of percussion, although it is actually an axis.


How do I do a people search on Myspace.com in c#?

Question: I have been to so many sites and documentation pages trying to access the myspace search function via an API call. This function is located at http://searchservice.myspace.com/index.cfm?fuseaction=sitesearch.friendfinder.
With MySpace's extensive APIs for everything, I can't seem to find a way to access a simple search in code! Whats more is, I don't even need (or want) OAUTH authentication, I just want a simple public search, without having to hack apart the HTML page result from the URL above.
Has anyone done this before?
Answer: MySpace has recently launched a search API based on the OpenSearch standard.
See here for more info.: http://wiki.developer.myspace.com/index.php?title=Open_Search


how to run a custom command start up application as root

Question: I would like to make it so a terminal command runs every time I start up my computer, but the command I want to run requires root permissions. I enter in the command in the start up applications part of settings with sudo before it, but since it requires my password I don't think it is running.
Comment: How to use @reboot in /etc/cron.d http://superuser.com/questions/708149/how-to-use-reboot-in-etc-cron-d
Answer: Add a cron job to root's cron table. Cron jobs are tasks that run on a schedule. You can schedule jobs to run every time the system starts up.
As root, enter crontab -e (or use sudo crontab -e) to edit the cron table, which is just the list of scheduled tasks. Then use the @reboot nickname (instead of the normal timing syntax) to make a job that runs on every startup:
@reboot your_command

Answer: You could configure sudo to allow you to run that command without entering your password. I'd normally recommend against this, but then again I'd recommend not running root applications automatically at all (unless they're setuid root and properly permissions/security-managed), and hey it's your machine. This technique is especially useful if you need a sudo command to run, say, on every login. (A boot cronjob makes sense if it's only needed on startup, I agree).
You can do this in one of two ways:

Add an appropriate entry in /etc/sudoers, the sudo configuration file, which is edited by running visudo as root (or through sudo).
(RECOMMENDED) Create a file in /etc/sudoers.d with your configuration changes. The /etc/sudoers file should contain the directive #includedir /etc/sudoers.d at the bottom, which will cause it to read files in this directory as additional configs. (If it doesn't, this option #2 won't work.)

Either way, the existing /etc/sudoers has an explanation of the config syntax, but it's kind of long and you don't need to worry too much about any of the existing config. (There's also a man page, man 5 sudoers.)
What you need to do is write a user specification line allowing you to run a particular command without entering your password.
As the file comments note, user specifications have this basic format:
## Syntax:
##
##      user    MACHINE=COMMANDS
##
## The COMMANDS section may have other options added to it.

And there are some examples of the syntax for certain types of configs. To accomplish what you need, the user specification is:
username ALL = NOPASSWD: /path/to/command

(Replace "username" and "/path/to/command" with the appropriate values; "ALL" and "NOPASSWD" are literal.)
Note that you should always use the full path to the command, both in the sudoers configuration, and when launching it automatically. This helps ensure that the program run is the one you expect, not some other (potentially malicious) program taking its place due to $PATH hijacking. That advice also applies to root crontab entries or any other method of automatically granting root permissions.


Pinning cloth to moving model

Question: I'm having trouble figuring out how to properly pin cloth to a moving object. The cloth is acting as a mane for a horse and therefore needs to be pinned in multiple places. I've looked at several tutorials but can't really 'transfer' the technique used to get the result I want. How can I pin cloth to multiple points on a moving model?
Answer:
Select the cloth. Enter Weight paint mode with CtrlTab, assign weights of 1 to the vertices you want to pin (paint with brush these vertices red)
In cloth physics settings, check 'pinning' and select the vertex group
Then enter Object mode with CtrlTab. Make sure to select the cloth first and then the object you want to pin on.
Parent the cloth to the object with CtrlP and select 'Set parent to object'
Comment: This solution should work just as well as the hook modifier (and is simpler), as long as all vertices are to be pinned as a unit to a single item.  If you want parts pinned to one bone and other parts to another bone, the hook modifier might become necessary.
Comment: Basically pin part of the cloth and then parent the cloth object so the pin follows the parent around?
Answer:
Pin a vertex group in your cloth sim settings
Hook those pin vertices to something.  For my test I used Ctrl-h to hook them to a new empty. You will probably hook them to a bone or something.
Go into the modifier panel and move the Hook-Empty modifier above the cloth modifier in the stack.

After doing that, I was able to drag the cloth around by animating the empty.
Comment: This method is definitely not working for me. The hook is being completely ignored by the simulation no matter what I try.

I have tried assigning the vertex's to a group and choosing that as a group in the hook modified, and I have tried the hook modifier in both positions above and below the cloth modifier. It is absolutely ignoring the hook.

Stumped.

Pinning cloth to moving model


How to move item back to original folder

Question: Is there a way to move items back to the original folder? I'm asking this because I accidentally moved multiple items from different folders to a single folder. And now, problem is that I could not figure out which item belongs to which folder.
Answer: It doesn't exist such a functionality out of the box. But you can check in your logs what items were move.
You will see something like in the logs file:
<code>33268 17:09:46 INFO  AUDIT (sitecore\admin): Move item: master:/sitecore/content/Website/Error, language: en, version: 1, id: {94ABEF89-B177-4F72-AA5A-AE8A8AEA4D8F} to sitecore://master/{09503406-D423-445B-B82A-AD9F4623F524}?lang=en&ver=1
</code>


Does there exist a non-square number which is the quadratic residue of every prime?

Question: I want to know whether there exist a non-square number $n$ which is the quadratic residue of every prime.
I know it is very elementary, and I think those kind of number are not exist, but I don't know
how to prove.
Comment: On the other hand, 16 is an 8th power modulo every prime!
Comment: Following on @LaurentBerger's remark, we can observe that for $\alpha$ an algebraic integer generating an abelian but not-cyclic extension of $\mathbb Q$, the minimal polynomial of $\alpha$ over $\mathbb Q$ is reducible modulo every prime. The simplest case is $x^4+1$.
Comment: This is an instance of the Hasse-Minkowski principle, which, as pointed out in the answers, is a souped-up version of quadratic reciprocity (cf. Hilbert symbols). http://en.wikipedia.org/wiki/Hasse%E2%80%93Minkowski_theorem
Answer: This is actually an elementary consequence of quadratic reciprocity,
generalizing the familiar proof à la Euclid that that are infinitely many
primes of the form $4k+3$
(i.e. primes of which $-1$ is not a quadratic residue).
We want to show that there exists $p$ such that $(n/p) = -1$.
[As stated Paul's question asks only for $(n/p) \neq +1$, but this is
trivial (if $n = -1$, take $p=3$; else let $p$ be a factor of $n$),
so we'll exclude the finitely many prime factors $p$ of $n$.]
By QR there exists a nontrivial homomorphism
$\chi: ({\bf Z} / 4n{\bf Z})^* \rightarrow \lbrace 1, -1 \rbrace$
such that $(n/p) = \chi(p)$ for all primes $p \nmid 2n$.
Let $a$ be any positive integer coprime to $4n$ such that $\chi(a) = -1$.
Then we have a prime factorization $a = \prod_j p_j$,
and $\prod_j \chi(p_j) = \chi(a) = -1$.
Therefore $\chi(p_j) = -1$ for some $j$, QED.
As in Euclid we can iterate this argument to construct
infinitely many distinct $p$ for which $(n/p) = -1$.
Answer: This follows from the Chebotarev density theorem, or from the earlier and easier Frobenius density theorem.  The polynomial $f(x):=x^2-n$ is irreducible in $\mathbb{Q}[x]$, so these density theorems imply that the mod $p$ reduction of $f(x)$ is irreducible for infinitely many primes $p$ (in fact: for half of all primes $p$).
It would be interesting to know a proof that didn't rely on these density theorems.
Comment: Mike: See Ireland & Rosen's book, Chapter 5, Section 2, Theorem 3. They prove a nonsquare integer $a$ is a quadratic nonresidue modulo infinitely many primes, but without making any density statement.
Answer: Let $a$ be any non-square. Then write $a=p^nm$ for some odd $n$ and prime $p$ which does not divide $m$. By Dirichlet's Theorem on primes in arithmetic progressions and the Chinese Remainder Theorem we can find a prime  $q$ which is $1\mod 4$, $(q|p)=-1$, and $1\mod l$ for each prime $l$ dividing $m$. Then by quadratic reciprocity, $(a|q)=(p|q)^n(m|q)=(q|p)^n=-1$ (where $(\cdot|l)$ is the Legendre symbol modulo $l$).
Comment: In the last step you implicitly assumed that $p\equiv 3\pmod{4}$.  So your argument proves the result for non-squares which have a prime factor congruent to $3\pmod{4}$.
Comment: Where is the assumption? I can't see it. Thanks.
Comment: In the last step you say $(q|p)^n=-1$, which is only true when $(q|p)=-1$.  Since $q\equiv -1\pmod{p}$, this means that $(-1|p)=-1$, so $p\equiv 3\pmod{4}$.  Although now that I write this, I see that you could have replaced your condition $q\equiv -1\pmod{p}$ with the condition that $q$ is a nonsquare mod $p$, and then your proof would work whenever $a$ has an odd prime factor.  And of course for the remaining values of $a$ one can explicitly describe a prime modulus in which $a$ is a nonsquare.
Comment: Ah right, what I had in my head was $(q|p)=-1$, not $q=-1\mod p$.
Answer: A Chebotarev-free argument is given by our own @Pete L Clark here:
https://math.stackexchange.com/questions/6976/proving-that-an-integer-is-the-n-th-power


Why is reflexive "se" not used in the sentence "Las clases empiezan"?

Question: In Russian language "Las clases empiezan" is said "Классы начинаются", where the ending "тся" shows reflexiveness. This is because we consider that classes ("las clases") start themselves.
I see that in Spanish it is not like that. Why is it so? Why is it not said "Las clases se empiezan"?
Comment: Not all phrases in all languages are 1-1 analogues. Would it help to think of empezar as *'to begin'*, rather than *'to start'*?
Answer: The only answer I can think of for your question is that

Languages have many differences.  If all verbs matched up perfectly, in meaning and usage, such as transitive/intransitive, reflexive/not reflexive, then we would lose the beautiful variability and richness of the world's languages.  How boring that would be!

However, I thought you might like to know that there's another way of expressing the same concept, that is reflexive (pronominal):
iniciarse

Las clases se inician el 27 de agosto.
Comment: @fedorqui - I hope you don't mind, I'm going to change my answer and use your verb.  It sounds better to my ear too, and it fits the bill of being a reflexive verb that  can be used for the same purpose as *empezar* or *comenzar*.
Comment: _Las clases se dan inicio_ suena rarísimo en España. Me suena mucho mejor _las clases se inician_.
Comment: Of course! _Dar inicio_ is normally used in a formal way and without reflexives: _Hoy dio inicio la legislatura en el Parlamento_.
Answer: I traveled through South America for 9 months and I can say that some people use se for almost any verb. They are natives and they use incorrect grammar, but that does not mean they are speaking correctly.
Also every language is a reflection of a culture. There are rules that come to be through a long process and they do not depend on any opinion. So do not worry about the grammar so much.
Just try to communicate with people and you will learn why, either way.
Answer: 'Las clases' doesn't start themselves. A group of people begins them -students and teacher-, usually at a given schedule. Adding reflexive 'se' implies that they start wether someone is present or not.


Can registering a Business (LLC) in the USA get me a residence permit?

Question: Can registering a business in the USA get me a residence permit, or do I have to apply for an H1B visa instead?
Comment: You can't qualify for legal residence simply by creating a corporation or other legal entity.  If it were possible, most of the people who are now in the US without authorization would have done it.
Comment: You can't apply for an H-1b for yourself. A company in the USA has to sponsor you and apply on your behalf and employ you.
Comment: @phoog the eb5 more or less does allow you to get a green card by setting up a _qualifying_ corporation. Unauthorized migrants in the USA mostly won't have enough money to use this option. (I'm sure you know this, I just mention it for completeness).
Comment: @user16259 thanks for pointing that out.  I did have that in mind when writing "simply by creating...," but it was not at all clear.  I was more thinking of (for example) day laborers, who, if they could gain legal status by incorporating construction businesses, would doubtless have very different lives.
Answer: The USA has some investor visa options so you don't have to go the H1B route. You will need substantial amounts of money to invest. (And other conditions apply, including you must employ a number of local staff. See Patricia's comment below)
https://www.uscis.gov/eb-5
There is also an E2 visa but it is more limited in what you can use it for and who can qualify.
Comment: It's not just money to invest. The business has to create jobs for US workers - it can't just be a one person business.


What issues would changing the default policy in Core to mempoolfullrbf=1 resolve and which of the current policy proposals would be simplified?

Question: What issues would changing the default mempool policy in Core to mempoolfullrbf=1 resolve and which of the current policy proposals (e.g. BIP125 replacement, V3 Policy, package RBF, discussed here) would be simplified?
Comment: Your question is quite broad and covers multiple topics, which makes it difficult to answer. I'd suggest giving https://bitcoin.stackexchange.com/help/how-to-ask a read and breaking this down into more specific questions. Ideally, your post should mention what research you've done already and ask as specific of a question as possible.
Comment: @josie: This is a specific question even if it is difficult to answer. I link to an alternative question on the status of these proposals. If you can't answer the question that's fine (I am also struggling to) but I don't think I need a tutorial on how to ask questions on this site to try to understand this, thanks.
Answer: This is a work in progress answer. As always alternative answers are welcome.
The -mempoolfullrbf option when set to 1 ignores RBF signaling and assumes every transaction can be RBFed. This option was introduced in Bitcoin Core v24.0 although it was off by default in 24.0. For more discussion on the introduction of the mempoolfullrbf option see this question.
If the default mempool policy in Core was set to mempoolfullrbf=1 then one would assume that within 1-2 years the majority of Core nodes (and the majority of nodes on the network) would be running this policy (when they update to a new version). Of course users have the option to change from the default but in reality most seem to run with policy defaults.
The V3 Policy proposal introduces an additional set of rules to existing standardness and policy rules (V2 Policy?). This includes RBF signaling so it seems to be proceeding assuming that transactions do still need to signal that they are replaceable and we are not assuming a network of nodes running the mempoolfullrbf=1 option. Even if the majority of the network was running that option one would assume there would be a minority of the network checking RBF signaling rules were being applied correctly.


What do we call countable nouns when used as a category with a definite article?

Question: Sometimes we can use countable nouns in a general context with a definite rather than indefinite article to create a sense of the thing as a category. For example, 'The computer has transformed modern life.' Here 'computer' is not being used as a countable noun, but rather the definite article implies that we are talking about it as a general category.  Is there a name in grammar for this exception to the normal rules on how we choose articles for nouns?
Comment: It's not the actual *noun* (such as "computer") that gets a "name" in such constructions - it's the *use of the definite article* ("the"). And *it's important to note that [**the generic use of "the"**](https://english.stackexchange.com/a/198842/2637) is actually very restricted, in that we only use it with a relatively small selection of nouns* (from an answer to a similar question asked on ELU).
Answer: I've heard it called the 'generic definite article', but I'm not certain there is a name for the use as such because it isn't really an 'exception' to the use of the definite article when you understand what the noun represents.
In English we commonly use a singular noun to represent a class of objects - eg 'the deer' to mean all deers. Because the class is a specific, unique thing, it follows that it is used with the definite article. Likewise, 'the computer' is a generic term for a wide range of computing devices. Saying 'the computer' instead of 'computers' can be a stylistic choice, but what the term means today is very different from what it meant to Charles Babbage in the 1800s, and saying, for example, "the history of the computer" may better acknowledge everything that falls under the term than saying 'computers'.


Scrivener 3 on older MacBook

Question: I have an oldish MacBook Pro and want to buy Scrivener but the latest version is 3.  It says it's suitable for OS 10.2 or later.  My MacBook (which won't now update any further as it's late 2008 model) runs on version 10.11.6.  Will I be able to buy it and use it on this machine.  My Mac itself is fine but I do most of my writing on the MacBook.  Any comments would be very useful.  Thank you.
Comment: I'm voting to close this question as off-topic because it's not about writing.
Comment: You can download older versions from [their website](https://www.literatureandlatte.com/scrivener/release-notes?os=macOS). I am sure that if you contact the developers directly, they will be happy to help you. They might give a discount for an older version.  I also highly recommend Scrivener itself for any writing needs. I used it for fiction, screenwriting, scientific writing, magazine articles, outlines, and almost any other kind of writing. I found it to be the most rewarding (and organised) experience.
Comment: @FraEnrico I believe questions on writer's tools are generally allowed as long as they are not recommendations or endorsements of a particular product.
Comment: How does "10.11.6" not meet the criteria "10.2 or later"...?
Comment: This question definitely does *not* belong on [meta].
Answer: Not to sound rude, but you mostly answered it in your own question. You have a lesser version than the requirement. Sometimes this means the application will not run at all, other times it means it will run but with errors and often time not worth the hassle of the errors. I would not recommend it. I have personally found Pages to be adequate for my writing needs.
If you really, really want a software, you can also check out novlr (I have no affiliation with them). It's a simple web based SAAS that allows you to have version control, back ups to dropbox/google docs, word counts, chapters, distraction free writing, night mode, notes. The only issue is that they do not provide any form of pre-writing tools such as story boarding, character profiles/relational trees and the likes. Since I am a discover writer, I don't need a lot of the pre-writing fluff and found this tool to be adequate enough.
Back to your main issue though, I would not recommend it. Software is also something hard to get a refund for and you could be out 50 bucks. If you are willing to take that kind of risk then by all means give it a try. My macbook pro is relatively new (a 2014 model) so I can't really provide any personal experience.
Comment: Thank you for this, ggiaquin - I kind of thought this.  I may end up in two scenarios - one is using the app on my IMac and writing in Pages as you say then cut/paste on the Mac to the app and working there, or upgrading my MacBook to something a little newer.  But you know how it is - you get attached to things ...!  Thanks again for you time.
Comment: @JeremyPrice I was going to suggest for you to upgrade your macbook, but 1200 dollar upgrade vs free/relatively cheap software seemed like a better alternative XD
Comment: @JeremyPrice see Olga's comment as they have a good idea to do as well.
Answer: Likely worth verifying with the Scrivener publishers and/or Apple, but in most software version numbering systems, 10.11.* is newer than 10.2.*.  That would mean Mac Scrivener will work as well on your Macbook as it would on your desktop Mac (presuming adequate processor, RAM, and storage available).
Answer: To follow what other people have said, it should work considering 10.11.2 is newer than 10.2. 13 years newer, actually. See the releases section here. I use Scrivener on Windows and highly recommend it.

Scrivener 3 on older MacBook