TRENDING NEWS

POPULAR NEWS

How Can I Evaluate The Expression Xpy

What are some of the best type design books?

As many as possible. Not just design books. History, the Classics – anything to get a perspective. We have to design communication for many businesses, so we need to know about the world at large, not our little world of Indesign, Photoshop and MyFonts. I read everything that comes before my eyes, including newspapers, online and offline. I aim to know as least as much as my clients – about their business and about the world. And learn at least one other language, that widens your horizon.

What is the maximum number of points of intersection of 4 distinct lines?

If you have a single line, and then draw another line with a different gradient those lines will intersect once. Now a third line with a gradient other than either of the last two, and you have two intersections (a total of three so far). Now with the introduction of another distinct line, the fourth, with a gradient other than the previous three you get a further three points of intersection. This gives a total of[math]1+2+3=6 \text{ points of intersection}[/math]We note that if we keep introducing a distinct line it will intersect with the previously introduced lines. The pattern is of course the triangular numbers:[math]1,\mbox{ }3,\mbox{ }6,\mbox{ }10,\mbox{ }15, \ldots[/math]In general the number of intersection would be[math]\text{Number of intersections }= \dfrac{(n-1)n}{2}[/math]where n is the number of lines being considered.

Probability- difference between 6P4 and 6C4?

6P4 is a permutation, where order does matter.
Example :
Choosing casts of King, Queen, and Knight from 12 actors.
So, choosing Alex, Cathy, and John, will not be the same as choosing John, Cathy, and Alex (same actors, but different roles).

6C4 is a combination, where order doesn't matter.
Example :
Choosing casts of three scout soldiers from 12 actors.
So, choosing Ben, Eric, and Mike, will be the same as choosing Eric, Mike, and Ben.


How To calculate:

n!= n * n-1 * n-2 * n-3 * ... * 1
xPy = x! / (x-y)!
xCy = x! / [(x-y)! * y!]

Example :
6P3 = 6! / (6-3)!
= 6! / 3!
= (6*5*4*3*2*1) / (3*2*1)
= 6*5*4
= 120

How does the find command work?

One way to learn "how it works" would be to read the source code to one or two different implementations.  The most commonly deployed implementations of the find command is use today are almost certainly those written by the GNU project (http://www.gnu.org) which is included in every major Linux distribution, and the version that was written for BSD (and is included with FreeBSD, NetBSD, OpenBSD, and other BSD derivatives, especially MacOS X).(http://www.freebsd.org/)Of course reading the source code would require at least a passing familiarity with the C programming language and the UNIX APIs (stdlib). In general it parses its command line, which is effectively a "little language" consisting of a list of top level directory or filenames, followed by a set of "predicates" (options which match certain characteristics of files under the given directories or which cause find to do take certain actions on those files which matched all previous predicates (evaluated from left to right ... but with some precedences rules for more complex expressions).This parsing process generates what is, essentially, a program, which is then executed by find's core engine.This is, conceptually, quite similar to how awk and sed work.  Their command ones are little languages which are parsed and then evaluated within an implicit loop (or "framework").  In the case if find this loop or framework is basically:for each argument:    evaluate predicate_expressions    if each is a directory and not pruned by predicate expression:        recurse into itIn another words the find command will default to traversing the depths of every directory named in its argument list.  (Note the distinction between the argument list and the predicate expressions ... which may have their own arguments embedded amongst them).It is, of course, possible to create almost arbitrarily complex predicate expressions using find's "little language."

TRENDING NEWS