How does Charles Taylor's "politics of recognition" differ from the traditional liberal universalist conception of equal respect and recognition?

Question: Any examples of how these two different approaches might lead to different policy recommendations ?
Comment: I have restored your original wording. Unless you specify the two approaches, the question is unanswerable. But I note and have kept the perfectly reasonable addition about examples. Only trying to help. Best - Geoffrey
Answer: Welcome to PSE, Cygni P.
Stating the difference
The following passage may help to make clear such difference as there is between Taylor's 'politics and recognition' and traditional liberal ideas :

Taylor tells us that the politics of recognition - itself a distinctively
modern phenomenon - has come to mean two rather different things: on the
one hand, a politics of universalism, emphasizing the equal dignity of all
individuals and, on the other hand, a politics of difference that, too, has a
universalist thrust: everyone is to be recognized for his or her unique identity
(p. 38) Nonetheless, whereas the politics of equal dignity focuses on what
all human beings share in common, the politics of (equal) difference focuses
on each person's (or group's) distinctness from every other. The former is
based on the idea that all human beings are worthy of respect, whereby the
basis for respect is a universal human potential such as human beings' status
as rational agents who are capable of directing their own lives. The latter,
Taylor claims, picks out an alternative universal human potential: the potential for forming and defining one's own identity (p. 42). This is Taylor's initial
(weaker) specification of the politics of difference. He soon argues, however,
that the politics of difference has recently been given a stronger formulation
that takes it beyond the demand for recognition of a universal human potential
(p. 42). Taylor suggests that the politics of difference, at least in the intercultural context, now demands not merely that the potential equal value of all
human beings be recognized, but that the equal value of what they have in
fact made of this potential be acknowledged. (Maeve Cooke, 'Authenticity and Autonomy: Taylor, Habermas, and the Politics of Recognition', Political Theory, Vol. 25, No. 2 (Apr., 1997), pp. 258-288: 259.)

In other words the politics of recognition includes the traditional liberal universalism of equal respect and dignity which focuses on what what we have in common but it also embraces the politics of (equal) difference which focuses on each person's (or group's) distinctness from every other.
Examples of what the difference means in practice
The politics of universalism is blind to the differences between persons or groups. So, for instance, the right of free speech or the right to vote or the right to adequate levels of nutrition, are (regarded as) entitlements of all persons. Subject, that is, to conditions which are equally universal : three-year olds are not entitled to vote, but that applies to all three-year olds.
The politics of difference recognises differences between persons or groups as relevant to their specific entitlements. For instance, an ethnic group that has migrated to a society whose customs and traditions are radically different from their own would, or at least might, have an entitlement to maintain their distinctive style of dress wholly or within certain limits. The group's dignity is respected in this way. To deny this entitlement would be to undermine or destroy the group's sense of identity, of its rootedness in certain traditions of behaviour. The group retains its universal entitlements, those it shares with everyone else, but has such specific, differentiating entitlements recognised as well.
Examples could be multiplied indefinitely but maybe these cases convey a sense of the 'different policies' to which the two approaches might lead.
References
The Taylor citations are from Charles Taylor, "The Politics of Recognition," in Multiculturalism and the "Politics of Recognition", ed. Amy Gutmann (Princeton, NJ: Princeton University Press, 1992).

How does Charles Taylor’s “politics of recognition” differ from the traditional liberal universalist conception of equal respect and recognition?


How do you register a new token symbol?

Question: We are creating a new ERC223 token and can't find clear info on who controls the token symbols?
Answer: Nobody regulates or governs the use of symbols.
You can use any symbol you like, even if it's been used before. It might be prudent to choose one that hasn't been used before, though there's no way to stop somebody then cloning your contract, including its symbol, and deploying to the network.
Comment: Then I would think a federal trademark law would supersede any duplicate activity? Meaning if we have a federal trademark for AAA, then no one else could legally use it for the same function? Just like a domain name, you can register whatever you wish, but if you register www.applephone.com you are in a bit a trouble.
Comment: That would depend on where you are in the world. A "symbol squatter" in a warehouse in China couldn't care less about US law :-) Furthermore, if I create a contract containing your symbol, and I don't build that contract in a way that allows it to be removed in future (i.e. no `selfdestruct()`), then even if you prosecuted me under your country's laws, there's no way I could remove that contract (and therefore duplicate symbol) anyway.
Answer: There is no official registry for token symbols. There can be multiple tokens with the same symbol. The distinction comes from the contract address.
There was a discussion about creating an official registry in this EIP. AFAIK, there are no plans to create one.

How do you register a new token symbol?


Are styrofoam skyline diffusers efficient as wood?

Question: I'm making my own Skyline Diffusers using a pattern I got from the Internet, and the recommendations were to use a lighter type of wood, such as Pinus. The problem is it's still too heavy, once I'm going to hang it on my apartment. So I made some research and found some Styrofoam Acoustic Diffusers, and I'm wondering now if they would do the same job. Would they?
Answer: Diffusers are meant to reflect and scatter incoming sounds, not to absorb them.
Polystyrene is quite transparent to low frequencies, so the more rigid wood is the better material.
A more precise comparison could be made by looking at the acoustic reflection coefficients of both materials for the frequencies of interest.
Answer: No they would not . They make styrofoam pannels because those are 100 times much easy to produce compared to wood so is about making money. If you imagine an acoustic guitar body made of styrofoam is easy to figure that such instrument will sound dull, sloppy and without definition  compared to a real wood guitar ..
Comment: Although you are heading in the right track, the analogy isn't really accurate. Diffusers are all about reflection - not resonance. Styrofoam panels will diffuse to a certain extent, but not as effectively as wood, however the amount of diffusion will be determined by the overall shape of the diffuser. A well shaped Styrofoam diffuser might diffuse sound better than a badly shaped wooden one.
Answer: Not true . Styrofom diffusers are snake oil esspecially the 10 cm thickness ones. Those that sale such crap they trick every custromer really bad. The guitar body made of polystyrene analogy is very good . In a guitar the strings resonate and the sound goes inside the guitar body which reflects inside the body . So it has more to do with reflection and not resonance . Of course that the whole guitar will resonate a little but is more about reflection .
Comment: Are you talking about acoustic instrument guitar?


Integrated Version Control for Visual Studio

Question: What version control systems have you used to manage projects developed with Visual Studio (2005)? What would you recommend and Why? What limitations have you found with your top rated version control system?
Answer: Covered many times
Search for 'Visual Studio Source Control' sorted by Votes
Answer: I've used SourceGear's Vault - it integrates nicely with VS as well as with FogBugz.
Answer: We really need more information to make good recommendations.  For example, ClearCase is amazingly powerful but unless you're in a decent sized development studio it would be immensly wasteful, and likely reduce overall productivity.
For personal work I like SVN, but that's mainly personal taste and being familar with it.
Answer: Whatever you do, don't learn Git - after you learn it, you realize how every other SCM is trash and you'll hate every minute you have to use Perforce, SVN, or (God help you) VSS/TFS
Answer: I used to use SourceSafe, but have made the switch to Subversion and will never go back.
I use TortoiseSVN with VisualSVN. VisualSVN provides the IDE integration with Visual Studio so it feels much like SourceSafe.
The first big benefit is that it works very well over HTTP so I can work with a distributed team. I host my files with CVSDude.
Secondly, the fact that you don't need to check out a file before editing is a huge benefit, particularly when working with files that sit outside the Visual Studio project.
Thirdly, my source code actually feels safe. Ironically it never did with SourceSafe...


Possible to check NEST system compatibility by looking at current thermostat model?

Question: I'd like to replace my Honeywell CT87A thermostat with a Nest thermostat. I see that Nest has a page to check system compatibility. Is it possible to identify if my system is compatible without taking it off of the wall, perhaps by the fact that I have a CT87A? It's bitter cold out and I don't want to turn off the fuse for the furnace.
Answer: According to the installation instructions in your link, the Honeywell CT87A requires only two or three wires (R,W,[Y]) to operate.   The Nest compatibility checker shows that a system using those wires is compatible.   You should be good to go.


WiFi switched off after Update for 14.04 today

Question: Updates received today.  After directed restart, WiFi did not come turn on.  Can connect to internet using cable to Modem, but no WiFi connection.  Machine is Compaq Presario C727 (32bit) running Ubuntu 14.04.  Broadcom Corp BCM4311.11 b/g wireless lan controller installed, using Broadcom 802.11 Linux STA wireless bcmwl-kernel-source (proprietary) driver.
Comment: Please [edit] your question and add output of `lspci -knn | grep Net -A2` terminal command.
Answer: Was your kernel updated?  If so you need to rebuild the broadcom driver module.
There are two options for dealing with broadcom chips.
Option 1 is to use the proprietary driver (bcmwl kernel source) which must be rebuilt after each kernel update.
Option 2 is to use the b43 fw cutter reverse engineered driver.  This driver is kernel agnostic and it looks like your device is supported.  Might be worth using this driver instead of wl (bcmwl kernel source) as it will survive kernel updates.
http://linuxwireless.org/en/users/Drivers/b43/#Supported_devices shows your device is supported by the b43.
Comment: Thanks for the quick response & help.  I finally ask Google the right question yesterday, and got a step-by-step instruction for uninstalling the existing driver and installing a new one.  PRESTO!  Wireless is back.  Thanks for your help, and I'll save your support "for the future".  Only wish I was more knowledgeable about the program(s).  Thanks again.


How do I check if a certain item has been taken out of a chest?

Question: I am trying to make a custom crafting data pack for Minecraft. I have found some tutorials that show me how, but all of them use droppers that craft the item instantly after putting the items in. Currently I have a chest that crafts the items but I want to be able to detect once a player has taken out the crafted item so I can delete the items used in the recipe.
Comment: What item are you crafting? Does it have tags, custom name. What slot?
Comment: the recipe i am using to test is a diamond in slot 1b and a nether star in slot 10b. it gives me a netherite block in 15b i just want to know how to detect once the player has taken the netherite block so i can get rid of the items used for the recipe. it doesn't have any tags or custom name.
Answer: This should work:
execute unless data block 785 61 526 {Items:[{Slot:15b,id:"minecraft:netherite_block"}]} run say taken

If you want to empty the chest use:
data merge block 785 61 526 {Items:[]}

Comment: this works and is awesome but how would this work if I had multiple recipes? if I run this under tick it will reset the chest all the time which would give the player no time to even craft the item.
Comment: so u want to delete only certan items?
Comment: no. but if i run this command every tick it will delete all the items once you put them in the chest because there isn't a netherite block in slot 15 yet. this would give the player no time to put in the items to craft the netherite block.


Migration of users with email/password accounts

Question: I got an email from a mi.yodeya user (Dave) who says that he can't access his account here. He registered it on mi.yodeya using the email/password method. Is there a general issue for such accounts?
Comment: I had a similar problem when migrating. My solution was to use openid with the account associated with my email address.
Comment: I had a similar problem and it was not solved by using OpenID.
Comment: @WAF "had" or "have"?
Answer: If you were an unregistered user (ie, your account just lives in your browser via a cookie), due to the domain change, you'll need to recover your account.  You can do this via the login page:
1) Go to https://judaism.stackexchange.com/users/login
 2) Click the recover link

This will prompt you for the email account you used on your account here.  An email will be sent to you that contains a link that will recover your account.
Once you do this, you can continue as an unregistered account, or you can register and associate an OpenID account so that your account will persist beyond a browser cookie.
Comment: @IsaacMoses, if you look at his account now (here), you'll see he's listed as unregistered.  Stack Exchange (2.0) only knows about OpenID accounts, we don't handle any password combinations ourselves.
Comment: Dave's [account](http://yodeya.stackexchange.com/users/67/dave) was registered, but using SE 1.0's email/password option. I guess the same procedure should work in that case as well?


WPS Office a16 install Ubuntu 14.04

Question: I was using WPS Office a15 beautifully on 14.04. Today, a box advertising a16 opened when I opened WPS word processor. I downloaded and tried installing via gdeb and software center but nothing happened. I redownloaded a15 and it installed correctly. Any idea if a16 is buggy?
Comment: Do you need some new functions or bug fixes in the new version? If not, just stay with the current one.
Comment: I installed a16p1_i386.deb (p1=patch 1) and it worked wonderfully.
Comment: Great! You should write an answer with the installation steps and accept it, since others with the same problem may stumble upon your question.
Answer: Same here, as far as I know it has a problem showing the menu icons so the page tells you to install some sort of a patch, a file named "fix-menu.sh".
I tried installing the patch from terminal but it seemed not to be working  so I went for the second option, which was re downloading and installing a16 again, didn't worked for me nether.
Final option (this worked for me):
sudo apt-get remove wps-office
sudo apt-get purge wps-office
sudo apt-get update
re downloaded the wps a16 package and reinstalled it.
Even though I used the command purge some configurations seem to have survived the massacre, Custom dictionary and saving format preferences among others.
Good Luck! :D
Comment: Thank you for your response. As mentioned above, I installed a16p1_i386.deb (p1=patch 1) and it worked wonderfully.

WPS Office a16 install Ubuntu 14.04


or similar in CKEditor - Trying to do a clean break

Question: So here is the deal, I am trying to have a clean break between images and text and am unable to use  in CKEditor. There is this plugin, but its not available via the CKeditor congfig, and I am not trying to maintain another extension to keep it running every time I update CiviCRM. Is there another way to get the same result using the stock CKEditor that is bundled with CiviCRM? Thanks!
Answer: Hope I've understood your issue correctly.  A workaround here is to use the editor to insert an image in the place where you wish it to appear.  Right click on the image to bring up image properties.  Select the advanced tag and in style, enter the following CSS  "margin-left:auto; margin-right:auto;" (without the quotes). That should centralise the image horizontally on the page.  If you want more margin space on the page, you can use the Hspace or Vspace in the Image Info tab in image properties.  Hope that helps.
Comment: No, I want a clear break. Image on left, text wrap, then clear break, new image on left, text wrap, clear break, repeat. Imagine mosaico blocks with left aligned images but texts wraps and then new block starts clean.
Comment: Within CKEditor and the Styles button, there is a "Special Container" which basically is a  tag.  Using the source code you can delete/change the background colour and border where required.  In the Container/ tag, you can insert both images (aligned as needed) and text where required.  I think this could acheive what you require.
Alternatively, why not just use Mosaico and its blocks, as it seems you have it installed?
Comment: This is for an event page, not for an email. headshots and bios. I tried what you suggested, it still does not work as needed. The only thing that has ever worked for me is


What is the area of the triangle having $z_1$, $z_2$ and $z_3$ as vertices in Argand plane?

Question: What is the area of the triangle having $z_1$, $z_2$ and $z_3$ as vertices in Argand plane?
Is it
$$\frac{-1}{4i}[z_1(z_2^* - z_3^*)-z_1^*(z_2-z_3)+{z_2(z_3^*)-z_3(z_2^*)}]$$
where $w^*$ denotes the complex conjugate?
Answer: Let $z_j = x_j + iy_j$, $j = 1, 2, 3$. The area of the triangle is given by
\begin{align*}
\frac{1}{2} \begin{vmatrix}
1 & x_1 & y_1 \\
1 & x_2 & y_2 \\
1 & x_3 & y_3
\end{vmatrix}&= \frac{1}{2} \begin{vmatrix}
1 & x_1+iy_1 & y_1 \\
1 & x_2+iy_2 & y_2 \\
1 & x_3+iy_3 & y_3
\end{vmatrix}\\
&= \frac{1}{4i} \begin{vmatrix}
1 & z_1 & z_1-z_1^*\\
1 & z_2 & z_2-z_2^* \\
1 & z_3 & z_3-z_3^*
\end{vmatrix}\\
\end{align*}
Now expand via first column to get the required expression.
Answer: If ${\bf 0}=(0,0)$, ${\bf z}_1=(x_1,y_1)$, and ${\bf z}_2=(x_2,y_2)$ are the vertices of a triangle $\triangle$ in the $(x,y)$-plane then the signed area of $\triangle$ is given by
$$\alpha(\triangle)={1\over2}(x_1y_2-x_2y_1)\ ,\tag{1}$$
as learned in high school analytic geometry. In the complex world we write $0$, $z_1$, $z_2$ for the three vertices, whereby the real coordinates $(x,y)$ are related to the corresponding $z$ via
$$z:=x+iy,\quad x={z+\bar z\over 2},\quad y={z-\bar z\over 2i}\ .$$
Plugging this into $(1)$ we obtain
$$\alpha(\triangle)={1\over8i}\bigl((z_1+\bar z_1)(z_2-\bar z_2)-(z_2+\bar z_2)(z_1-\bar z_1)\bigr)={1\over4i}(\bar z_1z_2-z_1\bar z_2)\ ,$$
which then can be rewritten as
$$\alpha(\triangle)={1\over2}{\rm Im}(\bar z_1z_2)\ .$$
I leave it to you to get the formula for a  triangle with vertices $z_0$, $z_1$, $z_2$ from this.
Answer: You can find the side lengths as $|z_1- z_2|, |z_2- z_3|, |z_3- z_1|$ and then use Heron's formula.
Answer: I assume you mean the oriented area of that triangle (since the number changes sign when you swap $z_2$ and $z_3$).
In order to verify it, allow me to write your formula as $$g(z_1,z_2,z_3)=\mathfrak{Im}\frac{\overline{z_1}(z_2-z_3)+z_3\overline{z_2}}{2}$$ It holds $$g(z_1+t,z_2+t,z_3+t)-g(z_1,z_2,z_3)= \mathfrak{Im}\frac{2\mathfrak{Re}(z_2\bar t)+\lvert t\rvert^2}{2}=0$$
So it is translation-invariant (hence, we need verify it only when $z_1=0$).
But that case is much easier.


Can a fresher look at Design Thinking program?

Question: My son completed his engineering graduation.  I am exploring a career around design or UX.  Can I suggest him Design Thinking program for him or UX ?  I need guidance?
Comment: I'm voting to close this question as off-topic because it's not about User Experience, but asking for a job recommendation.
Comment: I think it is a great question which lots of people ask me. I would love to be able to point people to answers on this.
Answer: Ask not what a program can do for your son. Ask what your son would like to learn and what career he would like to pursue.
Meanwhile, feel free to post more details about which Design Thinking programs and which UX programs he is considering. It's hard to answer question that's too general.
Answer: Welcome to StackExchange, your question is a bit broad are you looking for advice for your son or also for yourself? How would you currently rate your experience in UX design?
With any career it good to pick something you like, this way you will always have fun when you are working and you will spend more time learning new things! Regardless here are some tips I can give you.
If you are starting out and do not have a lot of experience in UX or Design it might be best to focus on one aspect before trying to combine them.
Tools
UX and Design both use a different amount of tools. Some tools can be used for both paths and others are mainly for either UX or Design.
Design tools
These are the main tools I have worked with for design.

Photoshop CC (Mainly used for the final stages in design)
Illustrator CC (Great tool if you want to create vector images)
Affinity Designer (Powerful editing program for vectors and pixel images)

UX tools
I use these tools mostly for mockups.

Paper (The paper you use for printing etc. Super fast to create wireframes and/or mockups)
Sketch (Great tool for nearly anything UX related. Sadly only on Mac)
Figma (Online tool for Mockups)
Balsamiq (Free tool, I recently started using this)

Learning
A big part in UX and in Design is to improve yourself, you can do this by looking at other designs or taking some courses. You will learn the most by doing everything.
Inspiration

Behance (Great website for inspiration)
Awwwards
Pintrest

Courses
Here you can learn more about Design thinking

Edx
NNGroup
Coursera

Personal experience regarding courses/programs
I am currently enrolled in a design thinking course of RIT, while I like the content at the moment it only recently started so I can not form a complete opinion yet. But other courses on edx like the UX course of Michigan university were great and helpful.
I always advice people to share and look for peers on the internet. I always give interns at work the following tips: Buy books about UX/Design, Do 5 second tests, Be active and ask for feedback from peers, Bookmark interesting articles for reading.
(For others feel free to edit my post for more examples or websites that you used for learning)
Comment: Both, I believe he asked multiple questions at once. 'suggest Design Thinking / UX program?' and 'I need advice?' (given that he specifically stated that he just started exploring in UX). I covered both in my answer, I gave him the advice to start something he liked and later I covered a few websites where he could learn UX and/or Design Thinking. Regardless I will change the answer a bit to reflect more on Design Thinking.
Comment: You have not understood the question. It is not about UX Design. It is about Design Thinking.


No nikon-d850 tag?

Question: I was surprised when I wanted to tag my question with nikon-d850 as there isn't any such tag.  But there is a d800 tag.  Is it reasonable to expect a d850 tag, for a camera that came out in 2017? Or is the lack of a tag indicative of the need for one?
Answer: Tags are usually create as needed by editors with enough privilege (300 rep pts). I edited your post to create the nikon-d850 tag.
I'm sure there are a few existing questions that can benefit from the tag. There's nothing wrong with adding it, considering there are several existing model-number type tags.
However, most times the generic nikon tag is more appropriate, because the question will often apply to models such as the D810/D810A, maybe the D800/D800E, and maybe the D5, or even including other mid-range Nikons.
My recommendation is to not overthink it. If it's logical, and there's already a similar tag scheme, go ahead and create it. We can always create tag synonyms and clean up later if the tag(s) aren't useful.
Comment: I knew I didn't have the rep to create the tag myself.  I was just surprised that it didn't exist

No nikon-d850 tag?


Generating nodekey via geth init

Question: The geth init --datadir node/ genesis.json command generates an empty keystore directory and a geth directory. Its only after running the node that the geth folder is populated with the nodekey. Is it possible to generate the node.key file via the geth init command? Appreciate any help!
Answer: You can use the bootnode utility for this to create a nodekey immediately after geth init. You can download it with "Geth & Tools" from https://geth.ethereum.org/downloads/
bootnode -genkey <datadir>/geth/nodekey

If you wish to get the public key for the enode url, you can use:
bootnode -nodekey <datadir>/geth/nodekey -writeaddress

Comment: How is this method using  `geth init`? It just generates a private key and gives the public key for it. Can you tell how this can be applied on the node's directory after running `geth init genesis.json`? Or any other method?
Comment: When you start the node it will take the datadir/geth/nodekey file. So you can just create it infront with bootnode. I've edited the answer. Hope it helps.

Generating nodekey via geth init


What Exactly Does the Lagometer Display?

Question: I've been playing Minecraft for quite some time now, and I remember in previous versions of Minecraft (I don't know if it still exists) that there used to be a graph on the screen when the player pressed F3, called the "Lagometer" I never understood what the graph detailed, and would like to know specifically.
Answer: The lag graph still exists (with a slight change to how it looks); you can see it by pressing ALT + F3.
The graph shows how long each frame took to render. The higher the bar, the longer that a frame took to render.
The numbers along the side should be taken as 1/number of a second that the frame took to render. If your data is around the 30 line, then frames are taking 1/30 seconds to render, and you will be able to get around 30fps.
Comment: Thanks for the help! This Lagometer looks different from the old one I used to know, haven't seen it yet!


macOS Catalina software updates issue

Question: During parallel downloading Xcode and installing homebrew, I stopped installing Command Line Tools for Xcode. Now I can see in Software Update two items related to that. With different versions. After clicking Update Now I can see a progress bar. But finally, the message doesn't go and it proposes me update that 2 items again.
Answer: I recommend to download the Command Line Tools 11.2 from More Downloads for Apple Developers. An Apple ID is required.
Install it manually and afterwards the pending (and obviously not installing) updates in Software Update will vanish.
As an alternative a direct d/l link: Command Line Tools 11.2

macOS Catalina software updates issue


What's the common name of the design pattern used on the home screen of the Apple watch?

Question: I'm referring to the fish-eye/magnifier effect applied to app icons as they approach the center of the screen (animation here).
Comment: I have not seen this interaction before so it may be that it is too rare to have a common name for this. But I think magnifier is probably more apt than fish-eye.
Comment: I've also heard it referred to as 'Honeycomb'
Answer: It's often referred to as a 'pan and zoom' pattern.
You can pan across apps, and zoom in as needed to app 'groups', to make selection easier.
As @Greg Whitham correctly mentions, the layout has been referred to as a 'honeycomb', but I'm just referring to the interaction itself.
Comment: You're right that this is a zooming interface but I think the OP is referring to the way in which the objects at the center of the screen are magnified automatically.


On board / internal display works intermittently / randomly

Question: Macbook Pro Mid 2012. Original board and display. About 2 months ago, laptop screen cuts out. External display used to prove everything working normal, including passing Apple Hardware Test. Take to store, conclude the "display is dead", but all logic board components functioning correctly. Take home, hook up to external display, use for a week - then, randomly, the laptop screen starts working. Works until I reset laptop, stops working. Tried all different configurations of plugging in external monitor / power cycling / diagnostics / PRAM rest/ display resolution changes / external display change while power cycling to try and trigger the laptop screen to work again. Fails. 2 days pass - laptop boots up with screen on! Alas I'm forced to restart, and it goes away again. Then comes back in a week. Then I have to power off... and its gone. I'm currently at gone. I don't know what to do - it seems like I either have to buy another display and hope that works properly or replace the logic board, which I can't afford. Displays are ~$78 on ebay. Ideas? I'm about to conclude that it's a poltergeist and I should just pawn it off as a possessed artifact(jokes)
Comment: The MBP of this year had two graphics processors - NVIDIA GeFore 650M and Intel Iris.  It would switch between processors depending on what load it needed.  That being the case, I would try to stress your GPU to see if it crashes.  Download the tests from here:  - http://www.geeks3d.com/gputest/
Comment: This is an old question now but the first thing I would check here is what is actually 'cutting out' - is it just the display backlight, for example? A decent repairer should have checked this possibility, but...
Answer: I see you tried resetting the NVRAM (PRAM), but have you tried resetting your SMC?
For your model, the steps to do this are:

Shut down your computer
Keep the MagSafe adapter (power cable) plugged in.
Press at the same time shiftoptioncontrol (on the left side of the keyboard) and the power button
Let go
Turn your computer back on with the power button.

Let us know if this makes any difference.


Is a Set Bedtime Appropriate for Teens?

Question: For teens, in this case a rising Junior in High School, is it appropriate to set a bedtime for him of 10PM? How does this compare with the majority of teens?
Comment: Please could you add the actual age in years rather than some weird reference to "high school".
Comment: Junior in high school usually means somewhere between 15 and 18. (16 or 17 mostly).
Answer: High school is a much better time to learn "how to go to bed on time" and "how much sleep you need" than your first year of college, university, or work. Therefore I recommend letting the teen work out when they want to go to sleep and get up. They will get this wrong a few times, and go to school groggy and exhausted, or miss a day of school, or not finish something that they wanted to finish. You can't and shouldn't protect them from these consequences.
What you can do is suggest a time for them to go to bed, 10 or 11 depending on when school starts and how they get there (the high school bus arrived at our driveway shortly before 7am, meaning a 6am wakeup to have time for shower, breakfast, packing a backpack etc.) Maybe even 9 if they are not getting enough sleep otherwise. When they stay up past it you can remind them what time it is. More importantly, in the morning, when they're feeling the consequences (they're tired, or rushed, or whatever) you can connect it to their choices the night before. And next time they're doing something late into the evening you can remind them about "last week when you played past midnight and felt so awful the next day."
The thing is, some things are way more important to teens than we know. Sure, homework is important, but band practice, gaming, and socializing are important too.  Letting them set their priorities now gives them a chance for small failures with minor consequences. Making these choices for them throughout high school will mean the consequences are a lot larger once they start doing it themselves.
That said, you should not be kept awake by TV, video games, or music, and you shouldn't be leaving a 15 or 16 year old to talk to strangers on the internet all night. There is nothing wrong with mandated quiet time starting at 9pm, or an internet-off time of midnight. Just don't tell the teen when they have to sleep, or they won't get a chance to work out the learning process themselves.
Comment: Agreed! I think you hinted at this but didn't say it explicitly - this will only work if you do insist that they not miss their commitments the next day. So, if they stay up until 2 on a school night and then are tired the next day, they still need to go to school. If they do miss school, you should not call them in sick or give them an excuse. If you do, it takes away the learning opportunity.
Comment: @bjb568 [I got them for you.](https://www.helpguide.org/articles/emotional-health/benefits-of-play-for-adults.htm)
Comment: "gaming, and socializing are important" [citation-needed]
Answer: My kids had a 10:00 pm bedtime through middle school on school nights. It worked well. In high school, there's no way we could stick to a fixed bedtime because the workload is too great and varies night to night.
Answer: At 16-17 I had no bedtime so long as I was home before legal curfew(where I lived curfew was 12 AM for anyone under 18 unless work related), went to school, passed my classes, and did my chores.  This seemed to be pretty common because everyone I knew had the same rules.  I think it works pretty good and is a more of a "real life" approach than having bed times.  If they follow the laws and complete their obligations they get to choose their own schedule.
Answer: I'm a 14 year old boy and I'm pretty sure most people in 8th grade stay up past their bed times and just don't get caught. They stay up either because they do not want to be told what to do or want to show they can still be active the next day.
And I'm reading this at 11:30 and my bed time is 10 and I'm not tired at this time and the first time I stayed up like this I wasn't tired.
Comment: I think the expectation is that they are in their room, settled in, not up at their desk, or with the TV or devices on.  I don't think the parents expect, at that age, they're going to have their eyes shut on command, so I'm not sure that "getting caught" really enters into it, unless someone tries bolting from the house.
Answer: I think kids should not have bedtimes because it's a good way to show your parents you're responsible enough to wake up in time and go to bed at a reasonable time.
Maybe they have some late homework or some studying, I understand sometimes kids might stay up texting or on their phones or something like that or even TV, but if they don't wake up in time for school, it's on them.
But for kids that have to drive or bike, skateboard, scooter, I recommend going to bed early so you're awake when you're riding, driving!

Is a Set Bedtime Appropriate for Teens?


Why does Simplify[b-a] give -a+b and not b-a?

Question: Simplify[b - a] results in -a + b. I prefer b - a, which is a bit simpler (3 symbols instead of 4).
Can I make Mathematica to think the same way?
I believe one needs to redefine the ComplexityFunction.
Comment: It's because *Mathemaica* uses alphabetical order, try: `Simplify[a - b]`. Also try `HoldForm[-a + b] // FullForm` and
`HoldForm[b - a] // FullForm` to see that it isn't very different.
Comment: If you'd like to see $b-a$, you might look into `TraditionalForm`.
Answer: It is not Simplify that changes b-a to -a+b.  It happens automatically, and it cannot generally be prevented except by using Hold or HoldForm which will make it impossible to use the expression for calculations (until you remove the Hold wrapper again).  But while you can't prevent changing b-a to -a+b internally, you can change how it will be displayed on screen, by using TraditionalForm.
Why does Mathematica not consider one form simpler than the other?
Let's look at the structure of these expressions:
In[1]:= Hold[b-a]//FullForm
Out[1]//FullForm= Hold[Plus[b,Times[-1,a]]]

In[2]:= Hold[-a+b]//FullForm
Out[2]//FullForm= Hold[Plus[Times[-1,a],b]]

The only difference is the ordering of the terms within Plus, but neither expression has fewer parts than the other.  This is the consequence of the particular choice for their internal representation, which is shown above using FullForm.
Why does Mathematica reorder the terms of Plus?
Plus has the Orderless attribute.  This attribute is used for functions that are commutative.  The system will automatically bring any Orderless function to a canonical form by sorting its arguments the same way Sort would.  See that documentation page for the sorting rules: symbols will generally be sorted alphabetically, so a comes before b.
It's not difficult to see why canonical forms are advantageous to use in computer algebra systems when it is at all possible to define and efficiently compute one.  For example, it will make a comparison such as a+b==b+a trivial to carry out efficiently.
But I don't care what's simpler for a computer, $b-a$ is just more readable for humans!
You're right about that, that's why the function TraditionalForm will change the way expressions are displayed.  It won't change their internal representation: it will still be Plus[Times[-1,a],b], i.e. something like (-1)*a + b. However it will change how they're displayed on screen and show $b-a$ for better readability.

I sometimes select the output cell and press Command-Shift-T to automatically convert the cell to TraditionalForm for better readability (e.g. it'll show matrices in 2D form and will order polynomials with higher order terms first).
Comment: What about `Simplify[Tan[b - a]]`? `TraditionalForm` doesn't help here...
Answer: You can also make StandardForm handle this case the way TraditionalForm does, and ensure all other expressions are formatted as StandardForm normally does them. You might like that if you don't have TraditionalForm notation for special functions memorized. Besides that this is an instructive example that you can read here.
Answer: I think HornerForm as a wrapper will do what you're after...
HornerForm[Simplify[a - b]]

Comment: You mean `HornerForm[Simplify[b - a]]`? I believe `HornerForm` can't help here. Besides, I am interested in simplyfying arbitrary expressions (not just polynomials) (`Simplify[1/(b-a)]`).
Comment: Hmm... I don't think that `HornerForm` is really a wrapper in the same sense that `InputForm`, `StandardForm`, and `TraditionalForm` are wrappers.  In fact, `HornerForm[Simplify[b - a]]` returns the same thing as just `Simplify[b - a]`.
Comment: @MarkMcClure - Hmm, you're right.  Should have tested it a bit more and not relied on my (faulty) memory!


My dogs EXTREME seperation anxiety. When do i give him the treat?

Question: if he isn't barking he is trying to escape. how do i positively reinforce my dog when he never stops the bad behavior? I never know when to give him a treat because he NEVER stops the bad behavior. Ill wait for hours at a time trying to be patient but he doesnt stop. He has severe separation anxiety and has developed a self distructive trait. Now he will jam his face into the floor during his freak outs and when I come home he has cuts on his face. HOW DO I GET HIM TO STOP?!?!?! HES HURTING
Comment: Does this answer your question? [Severe separation anxiety in dog](https://pets.stackexchange.com/questions/193/severe-separation-anxiety-in-dog)
Answer: This problem is quite obviously too severe to solve with treats. That's like trying to treat a person with schizophrenia or clinical depression with sugar cubes.
Severe separation anxiety must be treated with care and as the mental illness it is. Your dog shouldn't be left alone for hours because he'll freak out and never stop his destructive behavior. If you want to treat his anxiety yourself, you need to avoid any freak-outs at all. That's the only way your dog can learn that being alone  is manageable doesn't mean being abandoned.
The best advice I can give you is to hire a professional dog trainer specialized in problematic behavior. They should ideally come to your home, observe how you and your dog act and interact with each other and give you hints to change your behavior.


What is this insect found in a shower?

Question: I hope the picture is clear enough, I've found a worm like insect like the one below a little while ago in my shower, and today I found another one. I've never seen something like this. I would say it is slightly bigger than a centimeter.
Location: Netherlands

Why do they come in my shower ?
Answer: It is a species of silverfish such as Ctenolepisma longicaudata or Lepisma saccharina for examples (thanks @RHA for correction in comments).
Silvefish are well known very resistant pest typically found in washrooms and sometimes in kitchens. They are not directly dangerous but can cause property damage. Here is a webpage giving advice on how to get rid of them
Comment: Sorry. It is Ctenolepisma longicaudata, called gray silverfish in English. Paperfish is my bad translation of the Dutch 'papiervisje'. It eats books...
Comment: It might be a silverfish or a paperfish. And getting rid of them is, at least in the Dutch climate, virtually impossible. I speak from expierence here. Unless maybe, if you convince all your neighbours to do the same...
Comment: What is a paperfish? I could not find a wikipedia entry for paperfish except for a fish species. Yes, silverfish are really resistant and it can be really hard to get rid of them esp. in apartment building.

What is this insect found in a shower?


Solution in case of violation of the linearity assumption in the logistic regression model? (possibly in R)

Question: I have a problem with my logistic regression that I set up and I hope someone can help me.
(I am working with R)
My data is based on hourly values. The dependent variable is a dichotomous variable (1 or 0). The model includes 30 metric independent variables (9 of them have both positive and negative observations).
Now my problem:
One assumption of logistic regression is that there is a linear relationship between the logit of the outcome and each independent metric variable. This assumption is violated in all my models.
(All other assumptions of logistic regression are not violated).
To check this, I applied the Box-Tidwell test several times.
Once with all variables in a logistic regression, where I regressed the original dependent variable on the independent variables and the product of the independent variables with the respective logarithmic transformation of the independent variables.
(y ~ x1 + (x1*ln(x1)) + x2 + (x2*ln(x2)) + ... , familiy = binomial("logit"))

Furthermore I tested the linearity assumption with the R function boxTidwell(model$linear.predictors ~ independent variable) for each variable separately.
For almost all variables, the test showed significance and thus a violation of the model assumption. Several transformations of the independent variables did not help either.
Additionally, my models failed the Hosmer-Lemeshow test.
I know that I can get around the assumption if I transform the metric independent variables to categorical variables. However, I would like to avoid this.
I also read that I can counter the problem with the methodology of splines. Unfortunately I could not find any literature explaining this. Especially not for a logistic model estimation.
Now I would like to know if someone can kindly help me here.
Does a violation of the assumption mean that I am not allowed to use this model and thus the results could be wrong?
(I don't want to use the model as a predictive or forecasting model, but only to explain/describe within the time period of the data.)
How do I apply the methodology of splines to solve my problem? How do I interpret the results?
( It would help me immensely if these explanations were supported by R-codes.)
Answer: Several points:

Hosmer-Lemeshow test is considered obsolete:  Hosmer-Lemeshow vs AIC for logistic regression

Rather than test the linearity assumption, use regression splines directly so you don't need that assumption. There are many examples on this site (note that using splines in logistic regression works the same as in other regression models) How do splines work when being used on the right side of an equation?,   How do I find a p-value of smooth spline / loess regression?

An alternative is gam's (generalized additive models) which can choose the degree of smoothing (number of spline knots, for instance) as part of the fitting.  See Transforming variables for multiple regression in R,    Why do my splines become not more flexible after altering the parameters in R mgcv?


Is "Inbox" the old stock email application?

Question: I am setting up a new Nexus 5X with Marshmallow. There does not appear to be a default mail application as in prior versions; instead there is just the GMail application. Is the Inbox by Google application what was formerly the stock mail application called "Email"?
Answer: No. Inbox is a very different application that was opened to the public in early 2015. It's primarily designed around the idea that your inbox is like a to-do list of sorts. The project's website explains this in more detail.
The "Android" email application is no longer developed by Google in any meaningful capacity, aside from ensuring that new platform releases do not break the build (and some translation updates, which are mostly automated). The Exchange and IMAP/POP features were instead rolled into Gmail, which is now considered the "stock" email application on any Google device.
Answer:
Is the Inbox by Google application what was formerly the stock mail
  application called "Email"?

No, it is not.
As said already in earlier Answer, the support for Stock Email app is no more. I recently bought Moto G3 and it came pre-installed with Gmail with no other Email app.
Inbox is developed by Gmail team. Hence, all your messages from Gmail are with Inbox, along with the reliability and spam protection of Gmail.
But there are few advantages of Inbox over Gmail App.

Creating a new labels: If you want to create new labels using Gmail app, it is not supported, Yet in Android. However, you can create new label using Inbox app.
Inserting Images inline: Attaching inline images is not supported by Gmail, but you can attach images inline in the Inbox by Gmail app for Android.

But on flip side, Inbox does not support App widgets like Gmail app do.


What does the term "fixed" mean on the radio spectrum?

Question: On the United States Radio frequency allocation chart, the term "fixed" radio comes up a lot. What does that mean? Who is allowed to used "fixed"?
Answer: Generally we distinguish two types of stations:

Mobile, when the device is portable
Fixed, when the device stays on one location

See Amateur Radio Stations for more information:

(left: fixed; right: mobile)
Answer: Fixed wireless is normally used as a term for radio communications between fixed locations such as buildings that don't move as opposed to mobile communications. One reason the allocations are treated differently is that for a fixed location it's often possible to allocate the same frequency to different regions.
For example for a given installation it may be determined for a specific frequency / power range that interference is only likely within a 10km radius, giving the possibility that the same frequency may be used hundreds of times by different users within a country as long as they are geographically far enough apart. That assumption of course can't be made for mobile communications systems that move around.
License costs are normally a combination of power and bandwidth and how far the signals are likely to emanate and also population density. I can only only speak from an Australian perspective but I believe here anyone is allowed to use fixed frequencies if you pay the license fee and it is approved. That may range from hundreds of dollars per year for a narrowband low-power license (for example courier voice communications over a limited area) and into millions for the sort of allocation you'd need for TV broadcasting over a large area.
Answer: http://www.ntia.doc.gov/files/ntia/publications/2003-allochrt.pdf ? (That is one ugly chart.)
Opposite of "mobile": the transmitter is at a fixed location. Why are there different rules for fixed and mobile? Because an interference problem caused by a mobile transmitter is a lot harder to track down.
Comment: It's better then Europe's!!! So who gets privileges to use fixed?
Comment: Exact regulation depends on the band, but there's a set of bands allocated for amateur ("ham") radio, and a training and certification process to be allowed to broadcast on them. Amateur radio is very much a community of its own.


positive (semi)definite, negative (semi)definite and indefinite?

Question: When looking at a quadratic form in a matrix, I am not completely sure how to tell if is one of the answers from above.
-positive (semi)definite
-negative (semi)definite
-indefinite
how do i figure this out
Comment: This lecture from MIT might help you [Lecture 5: Positive Definite and Semidefinite Matrices](https://ocw.mit.edu/courses/mathematics/18-065-matrix-methods-in-data-analysis-signal-processing-and-machine-learning-spring-2018/video-lectures/lecture-5-positive-definite-and-semidefinite-matrices/)
Answer: There are two approaches.  One is to write the (symmetric) matrix associated the quadratic form, the other is to "complete the square", as the a deleted answer notes.
For example:
$$
q(x_1,x_2) = x_1^2 - 4x_1x_2 + x_2^2 =
x_1^2 - 2x_1x_2 - 2x_2x_1 + x_2^2
$$
The matrix associated with this quadratic form is
$$
M = \pmatrix{1&-2\\-2&1}
$$
and we wish to determine its definiteness.  Applying Sylvester's criterion to both $M$ and $-M$ allows us to check if $M$ is positive/negative definite.  Since the $2 \times 2$ determinant $\det(M)$ is negative, we can conclude that $M$ is neither positive nor negative definite.
Now, $\det(M) \neq 0$, so $M$ is invertible.  Since $M$ is invertible without being positive/negative definite, it is invertible.
If $M$ were singular, we'd have to try something else.  In practice (with pencil and paper), one would find the eigenvalues of $M$.  If all non-zero eigenvalues have the same sign, then the singular $M$ is postive/negative semidefinite. Otherwise, $M$ would be indefinite.

Another approach to apply (especially for large matrices) is to attempt a Cholesky factorization.  If $M$ has a Cholesky factorization, it is positive semidefinite.  If $-M$ has a Cholesky factorization, it is negative semidefinite.  Otherwise, $M$ is neither.
In this case, we find $M$ and $-M$ have no Cholesky factorization

Equivalent (in a sense) to Cholesky factorization is the approach of completing the square.  We find
$$
q(x_1,x_2) = x_1^2 - 4x_1x_2 + x_2^2 =
(x_1^2 - 4x_1x_2 + 4x_2^2) - 3x_2^2 = \\
(x_1 - 2x_2)^2 - 3x_2^2
$$
Correspondingly, we see that
$$
M = \pmatrix{1&0\\-2&1}^T\pmatrix{1&0\\0&-3}\pmatrix{1&0\\-2&1}
$$


Can you explain "time value of money" and "compound interest" and provide examples of each?

Question: Can you explain the time value of money concept, including present value and future value?
How does compound interest work?  Why is compound interest a powerful concept when it comes to borrowing, saving, or investing?
Answer: I will just explain the time value of money in general, descriptive terms and save the math for someone else.
Imagine: You have half a million dollars. I'd like to borrow it all from you. I'll pay it all back, every penny, but no more. And I'll pay it back in about, oh, thirty years or so. (Imagine also that you can be 100% sure that I'll pay it back.)
Does this sound like a good deal? Not really. Why not?
Well, you could do something with that sort of money. With that sort of money, you could do a lot of things for 30 years. You could buy a nice house and live in it for 30 years and save yourself from spending a lot of money on rent during that time (or save money on interest by paying off a mortgage early) even if the price of the house goes nowhere. If you already had a house, you could do some home improvement, like insulate the place better (to save on heating bills) or even just on something that you're going to enjoy for part of those 30 years (a patio in the back yard). If you were feeling entrepreneurial, you could take that money and start a business. Or you could invest that money in the stock market, and get a lot more back.... and if that's too risky for you, just start a savings account and earn interest. And finally, in 30 years, the value of the dollar will be lower because of inflation, so it won't buy as much now as it will then.
That's the time value of money. It's the opportunity cost of the best of the things that you could have done with that money during the time it was gone. When you take out a loan, your interest payments will depend in part on the time value of the money you're borrowing: the people making the loan could be investing that money somewhere else, like government bonds. (It will also depend on factors like the risk of default on the loan - this is why credit card debt is more expensive than debt like a mortgage that's backed by a big fat asset like a house which can be seized and sold if you happen to default.) This is how the Federal Reserve can affect interest rates across the economy by just buying or selling government bonds.
Comment: @SurjitSamra You're welcome to post that as a separate question. This is a focused Q&A site, not your typical discussion forum where a conversation thread can move between topics.
Comment: Not to mention the risk of dying within thirty years.
Answer: Time Value of Money - The simple calculation for this is FV = PV * (1+r)^N which reads The Future Value is equal to the Present Value times 1 plus the interest rate multiplied by itself by the number of periods that will pass. A simple way to look at this is that if interest rates were 5%/yr a dollar would be worth (1.05)^N where N is the number of years passing.
The concept of compound interest cannot be separated from the above. Compounding is accounting for the interest on the interest that has accrued in prior periods. If I lend you a dollar at 6% simple interest for 30 years, you would pay me back $1 + $1.80 or $2.80. But - 1.06^30 = 5.74 so that dollar compounded at 6% annually for 30 years is $5.74. Quite a difference.
Often, the time value of money is discussed in light of inflation. A dollar today is not the same dollar as 30 years ago or 30 years hence. In fact, inflation has eroded the value of the dollar by a factor of 3 over the past 30 years. An average item costing $100 would now cost $300. So when one invests, at the very least they try to stay ahead of inflation and seek additional return for their risk.
One quirk of compounding is the "rule of 72." This rule states that if you divide the interest rate into the number 72 the result is the number of years to double. So 10% per year will take about 7.2 years to double, 8%, 9 years, etc. It's not 100% precise, but a good "back of napkin" calculation.
When people talk about the total payments over the thirty year life of a mortgage, they often ignore the time value of money. That payment even ten years from now has far less value than the same payment today.
Comment: To further illustrate the point about inflation, think about how many times you have heard old people say things like "In my day, I could get into the movies for a nickel." Consider how much that nickel was worth in terms of movie tickets then vs. now and you realize that yesterday's money was far more valuable than today's. We assume this will continue into the future, so that's why you'd rather have a 2014 dollar than a promise of a 2020 dollar.
Comment: 25 cents in 1920 (the oldest price I found) inflates to $2.83 in 2012. Interesting that inflation isn't 'across the board,' each product having a slightly different rate, and the CPI we all know, indexing a list the government chose.
Answer: The fundamental concept of the time value of money is that money now is worth more than the same amount of money later, because of what you can do with money between now and later. If I gave you a choice between $1000 right now and $1000 in six months, if you had any sense whatsoever you would ask for the money now. That's because, in the six months, you could use the thousand dollars in ways that would improve your net worth between now and six months from now; paying down debt, making investments in your home or business, saving for retirement by investing in interest-bearing instruments like stocks, bonds, mutual funds, etc. There's absolutely no advantage and every disadvantage to waiting 6 months to receive the same amount of money that you could get now.
However, if I gave you a choice between $1000 now and $1100 in six months, that might be a harder question; you will get more money later, so the question becomes, how much can you improve your net worth in six months given $1000 now? If it's more than $100, you still want the money now, but if nothing you can do will make more than $100, or if there is a high element of risk to what you can do that will make $100 that might in fact cause you to lose money, then you might take the increased, guaranteed money later.
There are two fundamental formulas used to calculate the time value of money; the "future value" and the "present value" formulas. They're basically the same formula, rearranged to solve for different values. The future value formula answers the question, "how much money will I have if I invest a certain amount now, at a given rate of return, for a specified time"?. The formula is FV = PV * (1+R)N, where FV is the future value (how much you'll have later), PV is the present value (how much you'll have now), R is the periodic rate of return (the percentage that your money will grow in each unit period of time, say a month or a year), and N is the number of unit periods of time in the overall time span.
Now, you asked what "compounding" is. The theory is very simple; if you put an amount of money (the "principal") into an investment that pays you a rate of return (interest), and don't touch the account (in effect reinvesting the interest you earn in the account back into the same account), then after the first period during which interest is calculated and paid, you'll earn interest on not just the original principal, but the amount of interest already earned. This allows your future value to grow faster than if you were paid "simple interest", where interest is only ever paid on the principal (for instance, if you withdrew the amount of interest you earned each time it was paid). That's accounted for in the future value formula using the exponent term; if you're earning 8% a year on your investment, then after 1 year you'll have 108% of your original investment, then after two years you'll have 1.082 = 116.64% (instead of just 116% which you'd get with simple interest). That .64% advantage to compounding doesn't sound like much of an advantage, but stay tuned; after ten years you'll have 215.89% (instead of 180%) of your original investment, after 20 you'll have 466.10% (instead of 260%) and after 30 your money will have grown by over 1000% as opposed to a measly 340% you'd get with simple interest.
The present value formula is based on the same fundamental formula, but it's "solved" for the PV term and assumes you'll know the FV amount. The present value formula answers questions like "how much money would I have to invest now in order to have X dollars at a specific future time?". That formula is PV = FV / (1+R)N where all the terms mean the same thing, except that R in this form is typically called the "discount rate", because its purpose here is to lower (discount) a future amount of money to show what it's worth to you now.
Now, the discount rate (or yield rate) used in these calculations isn't always the actual yield rate that the investment promises or has been shown to have over time. Investors will calculate the discount rate for a stock or other investment based on the risks they see in the company's financial numbers or in the market as a whole. The models used by professional investors to quantify risk are rather complex (the people who come up with them for the big investment banks are called "quants", and the typical quant graduates with an advanced math degree and is hired out of college with a six-figure salary), but it's typically enough for the average investor to understand that there is an inherent risk in any investment, and the longer the time period, the higher the chance that something bad will happen that reduces the return on your investment. This is why the 30-year Treasury note carries a higher interest rate than the 10-year T-note, which carries higher interest than the 6-month, 1-year and 5-year T-bills.
In most cases, you as an individual investor (or even an institutional investor like a hedge fund manager for an investment bank) cannot control the rate of return on an investment. The actual yield is determined by the market as a whole, in the form of people buying and selling the investments at a price that, coupled with the investment's payouts, determines the yield. The risk/return numbers are instead used to make a "buy/don't buy" decision on a particular investment. If the amount of risk you foresee in an investment would require you to be earning 10% to justify it, but in fact the investment only pays 6%, then don't buy it. If however, you'd be willing to accept 4% on the same investment given your perceived level of risk, then you should buy.
Answer: Compound interest means that the interest in each time period is calculated taking into account previously earned interest and not only the initial sum. Thus, if you had $1000 and invested it so that you'd earn 5% each year, than if you would withdraw the earnings each year you in 30 years you would earn 0.05*30*1000 = $1500, so summarily you'd have $2500, or 150% profit.
However, if you left all the money to earn interest - including the interest money - then at the end of 30 years you'd have $4321 - or 330% profit.
This is why compound interest is so important - the interest on the earned interest makes money grow significantly faster. On the other hand, the same happens if you owe money - the interest on the money owed is added to the initial sum and so the whole sum owed grows quicker.
Compound interest is also important when calculating interest by time periods. For example, if you are told the loan accumulates 1% interest monthly, you may think it's 12% yearly. However, it is not so, since monthly interest is compounded - i.e., in February the addition not only February's 1% but also 1% on 1% from January, etc. - the real interest is 12.68% yearly. Thus, it is always useful to know how interest is compounded - both for loans and investments - daily, monthly, yearly, etc.
Answer: Here are some really excellent video tutorials on these topics:
Introduction to Compound Interest
Introduction to Present Value
Answer: A real simple definition or analogy of present Value would be the "Principal" or "Loan Amount" being lent and the future value as being returning the Principal along with cost of borrowing
The (1+i)^n is the interest you earn on present value
The (i+i)^-n is the interest you pay on future value
The first one is the FVIF or future value of a $1
The second one is the PVIF or present value of a $1
Both these interest factors assume interest is paid annually, if the interest payment is made more often within the payment year then interest factors look this way
(1+i/m)^mn

(i+i/m)^-mn

m is the frequency of interest payment, the higher this frequency the more of interest you pay or earn and you pay or earn the most interest when compounding occurs on each small fraction of time
This entails
m->∞
i/m->0
(1+i/∞)^∞ -> e^i

here e is the Euler's e
Thus the interest factors turn to this
FVIF = e^it
PVIF = e^-it

The preceeding examples only considered a single repayment at future date.
Now if you were obliged to make periodic loan repayments say in amount of $1 for n number of periods. Then the present value of all such periodic payment is the "Principal" or amount you borrowed. This is the sum of discounted periodic payments as
(1+i)^-1 + (1+i)^-2 + (1+i)^-3 + ... + (1+i)^n-1 + (1+i)^-n

if we replace 1/1+i with x then this turns out to be geometric series of the form
x + x^2 + x^3 + ... + x^n-1 + x^n

This simplifies to
(1-x^n) / (1 - x)

replacing (1/1+i) for x we get
[1-(1+i)^-n] / (1-1+i)
PVIFA = [1-(1+i)^-n] / i

which is the present value of periodic payment in amount of $1
The future value of periodic payments in amount of $1 can be arrived at multiplying the PVIFA by (1+i)^n giving
FVIFA = (1+i)^n[1-(1+i)^-n] / i
FVIFA = [(1+i)^n-(1+i)^n(1+i)^-n] / i
FVIFA = [(1+i)^n-(1+i)^n-n] / i
FVIFA = [(1+i)^n-(1+i)^0] / i
FVIFA = [(1+i)^n-1] / i

Once again the interest is compounded per annum and for intra-year compounding you would have to at first find the annual effective yield AEY to use as the effect rate is the PVIFA and FVIFA calculation
AEY = (1+i/m)^m -1

for continuous compounding
AEY = e^i - 1

All the calculation discussed thus far did not take inflation into consideration, if we were to adjust the amounts for a growth of g% then the present value of a $1 would be as follow
PVIFG = (1+g)^(n-1) . (1+i)^(-n)

FVIFG = (1+g)^(n-1) . (1+i)^(n)

PVIFGA = [ 1 - (1+g)^n . (1+i)^-n ] / [i - g]

FVIFGA = (1+i)^n[ 1 - (1+g)^n . (1+i)^-n ] / [i - g]
FVIFGA = [ (1+i)^n - (1+i)^n. (1+g)^n . (1+i)^-n ] / [i - g]
FVIFGA = [ (1+i)^n - (1+g)^n ] / [i - g]

Once again you would have to use AEY if compounding frequency of interest is intra-year
Now assume that each loan repayment increases or decreases by an extra amount Q per period. To find the present value of series of payments P that increase or decrease per period by an amount Q we would do the following calculations
PV = P PVIFA(i%, n) + Q/i [ PVIFA(i%, n) - n PVIF(i%,n) ]

Here
PVIFA(i%, n) = [ 1 - (1+i)^-n ] / i

and
PVIF(i%, n) = (1+i)^-n

All of these calculations have been available in tadXL add-in for finance and incrementally being offered as JavaScript financial functions library tadJS. Please note that the tad series of the financial functions library for various environments such as Excel, JavaScript, PHP, Ruby, Microsoft.net and others are property of the author writing this post. All of these libraries except one for Excel are available for FREE for public use.
And the future value of such payments with increments may be found by multiplying the PV by (1+i)^n as follows
FV = P PVIFA(i%, n)(1+i)^n + Q/i [ PVIFA(i%, n)(1+i)^n - n PVIF(i%,n)(1+i)^n ]
FV = P FVIFA(i%, n) + Q/i [ FVIFA(i%, n) - n ]

Here
FVIFA(i%, n) = [ (1+i)^n - 1 ] / i

Comment: Please note that if you are going to mention your product / web site, you *must* disclose your affiliation in your answer (it is not sufficient to have it mentioned only on your profile page.) Please refer to [the help center](http://money.stackexchange.com/help/behavior).
Comment: I hope this does not get taken as over promotion of the product or service, but I only refer to the product as it offers the solution to the problem that is being discussed. This is one reason I have created a Free JavaScript version of the functions so the links don't get taken as SPAM. It already seems that big software companies are copying the idea from the product and are working on churning out their own version of the financial library. And the small guy like me who hasn't got a dime has lost out on the big bucks that only the big companies are suppose to make.
Comment: I don't think your post is spam. It is informative. But the rules are clear: disclosure about affiliated products or links is required. Thanks for editing accordingly. You ought to do this on your other answers that also refer to the affiliated items.
Answer: s&p 500 CAGR: 7%
5 years: 1000 * 1.07 ^ 5   =   1 402
10 years: 1000 * 1.07 ^ 10 =   1 967
80 years: 1000 * 1.07 ^ 80 = 224 234
Just math.
CAGR: compound annual growth rate


Can I request a visual approach before I have the field in sight?

Question: I was on an IFR flight plan in VMC. The ATC asked me what approach I wanted, and I said visual approach. He said expect RNAV approach instead without saying why. I wonder if it's okay to ask for vectors for visual approach when you are still far out and have no visual yet, or it's expected to ask for an IAP first and then ask for visual when you have the field in sight? Thanks!
Comment: Please limit your usage of acronyms (or expand/explain them), as not all readers are pilots. Some are simply enthusiasts or looking to expand their personal knowledge.
Comment: More context would be helpful. Was this at JFK or ALO? At three pm or midnight? When you say "VMC" was it marginal or clear-and-a-million?
Comment: Which country are you asking about? The regulations or procedures may be different in different places.
Comment: It's a busy class D airport under a class B shelf in the US. It was in day time with clear sky and 10sm visibility.
Answer: The answer to this question really has to do with shared expectations between pilots and controllers with regards to workload.  Let's consider two scenarios:
Before the field is in sight – (your question)  As an instrument rated pilot, on a filed flight plan with an appropriate equipment code, ATC expects you to be capable of following a published approach procedure to navigate yourself to a position from which you can make a landing.  If you are asking a visual approach before you are in a position to accept it, (i.e. need vectors) you are in essence telling the controller that you are either unable, or just don't feel like doing so.  Instead, you want them to do the work for you to get set up on final.
Workload permitting they may be happy to oblige, or they may vector you anyway for separation, but they are not required to navigate for you.  However, if you have an equipment malfunction you are required to let them know, and declare "unable" for any approach they might try to clear you for that you cannot comply with.
Field/Traffic in sight – In this case the controller might look favorably upon your request because visual approaches put some responsibility for maintaining separation on the pilots.  (if you report the traffic you are following in sight you are required to maintain adequate separation from it, not ATC.)  This may help them out some, and they would really have no reason to deny you the approach request.  But if for any reason they did deny the visual, you would have two options:

Just continue to fly the published approach you were cleared for.  Once you are VMC with the field in sight you will have met the criteria for descending below published mins, so there is really nothing stopping you from proceeding by using primarily visual reference at any time after that.  Just make sure you continue to monitor the instruments for guidance.  And to the best of your ability it would be wise to continue to comply with all procedure altitudes, VDP, etc.  (FYI, most airlines require pilots flying a visual approach to have an instrument procedure loaded and to use it for guidance.)
Cancel IFR.  Switching to a visual approach while still on your IFR clearance really serves no purpose once you have the field in sight.  And if you fly IFR into untowered airfields on a regular basis, it might be a good habit to get into canceling IFR airborne as soon as you have the field in sight to prevent forgetting to call and cancel your flight plan after landing.

In short, by requesting a visual approach before you have the field in sight you are making more work for ATC, (making them less apt to clear you...) but requesting or accepting a visual after the field is in sight you may be helping them.
ADDENDUM:
I had an afterthought...  If you don't want to be bothered loading, activating, flying a (possibly complex) approach that you have no need for and don't really want, yet you want to remain on your IFR clearance, there is an option other than asking for vectors.  Look at the approach and pick out a waypoint or two that will roughly sequence you for arrival as if you were flying the published procedure, and that will put you in a good position to see the runway.  (say a 5-10 mile straight in)  Then make a request to fly direct at your current (or some other) altitude for a visual final.  That way you do the navigation, ATC isn't burdened with vectoring you, and you still get the approach type you want.
For example:
You - "N123Y request present position direct CHUNKS at 3000' for visual approach RW 16."
ATC - "Cleared direct CHUNKS at 3000', you can expect the visual, report field in sight."
You - (when there) "Field in sight."
ATC - "Roger, cleared visual approach RW 16."
ATC is generally pretty good about trying to give you what you want as long as you are clear in the way you are asking it.  They know when the weather is beautiful, and why you might not want to bother with a full instrument approach. And understanding what you want, they might even offer a compromise based on MVA in different sectors, i.e. "Unable direct CHUNKS at 3000', can you accept 4000' to PUKE, then 3000' to CHUNKS for the visual?"
Comment: It works,  but you might just say that the pilot is responsible for maintaining visual separation from a preceding aircraft he/she has in sight and instructed to follow. ATC retains responsibility for separation from all other aircraft.  Just my opinion to ensure your point is clear.
Comment: Nice answer, your research is appreciated.  Just one clarifing point- ATC cannot clear an aircraft for a visual approach until all potential conflicts with other aircraft are resolved (ATC retains responsibility for standard separation not the the pilot). But this ATC separation responsibility only excludes an aircraft the pilot  reports in-sight and is instructed to follow.  The pilot in this case is responsible for providing separation from the aircraft he/she is instructed to follow (visual separation).
Comment: @757toga, thanks for the feedback.  No research required, just 30+ years of flying experience!  I made a minor edit to clarify this point, please let me know if you think it needs more emphasis.
Answer: It's perfectly fine to request a visual approach before you have visual reference, just make it clear that you are not ready for the approach yet ("Request visual later on" or something).
ATC may still assign you another type of approach if a visual does not fit in the traffic picture.
Comment: In the US a visual approach request is not permission for ATC to issue a visual approach clearance—we need the pilot to explicitly call either the airport or a preceding aircraft "in sight" before issuing the clearance.
Answer: Typically the type of approach to expect is noted on the ATIS (e.g., ILS, RNAV, Visual [including Charted Visual Flight Procedures -CVFP). It's OK to request an approach not being advertised on the ATIS or the approach you are told to expect by ATC on initial contact with the approach controller (e.g., TRACON).
Often the traffic flow requirements to the runway(s) in use reduces or eliminates the controller's flexibility in letting you fly a different approach than the "approach in use." But you can always ask.
If the ILS is in use, for example, if flying a Visual Approach at a busy airport  the controller will likely vector you to final anyway to establish the appropriate sequence and spacing the Tower needs.
Also for CVFP's the weather minimums are often higher than for a regular Visual Approach and may disallow the use of that approach.
Again,  you can always ask.


How do I make a video preview of my Android game?

Question: I noticed some apps have a link to a Youtube video instead of a screenshot in Google's Android Play store.  How can I make a video of my Android game running on a physical device?  The emulator won't work for me (my game uses the camera preview feed). I guess I could take a video of the phone with another device, but that seems a little cheesy to me.
Answer: There are programs available to capture video on the physical device. See this question about that. Beyond that, I think you have an opportunity here to not just make a video capture of your game, but to make a trailer. Check out this article on making video game trailers to see what time/resources you have to making a excellent trailer.
Comment: A good answer to the lag, is making the video on your own game. How? If you have fixed framerate, take one screenshot per frame them join them at the right speed (1 / framerate). If not, take a ss with the current delta time as the shot stamp. then join them with this time. This should be pretty neat, and maybe hard to implement, but will grant you that even if the recording is slow, the result will be smooth.
Comment: Thanks to the link to the question about the "DroidScreen" program.  This isn't the ideal for my game because of the noticeable time lag between frames captured.  Since I'm using the camera preview, I was hoping to find something that produces a "smoother" video (so folks don't thing it will play "choppy" on their device).  Also, thanks for the link on the trailer article...that's a great idea!
Comment: That'll be tricky. If you're not capturing smooth video now, it's possible your hardware is not powerful enough. Video screen capture is resource intensive. I can only suggest borrowing someone's device that's more powerful or making a "sample" of your application using pre-recorded video from your device with your game overlay on top. Or faking it essentially. Sorry I wasn't able to help more. Good luck!
Comment: @GustavoMaciel That would work if using pre-recorded video so you could play it back at the same framerate.
Comment: @byte56 Yes, that was my idea. Some games use this technique to make their replays. Something like saving the game state every frame and then replaying at the same rate. But here it could be something like just images. Then you can work them out into a movie.
Comment: @GustavoMaciel You should add that as an additional answer. Since it's pretty separate from my original answer and it's useful. We can remove these comments once that's done, as to not double up information.
Answer: Some phones(or tablets) have an HDMI output, you can connect your HDMI cable to a video recorder linked to your PC.


texas holdem question on split pot

Question: if the 5 cards out after the river show Ace, 10, 7, 5 and 2 flush of hearts and (player 1) has 4 of hearts and (player 2) has 8 of hearts , who wins hand or is it a split pot
Comment: Thanks for your Q Umbro Kid, If you search on this site for the "Top Five Card" rule you'll find the answers about split pots what you are looking for.
Answer: Player 2 will win. It is always the best 5 card hand.
Player 2's hand: A♥T♥8♥7♥5♥
Player 1's hand: A♥T♥7♥5♥4♥
Comment: and likewise, the board doesn't show the nut flush... either player holding the king of hearts would hold the nut flush.

texas holdem question on split pot


Can cos(x) or sin(x) be the function of stationary action?

Question: Is there a way to express $\cos(x(t))$ (or $\sin(x(t))$) as the solution to the Euler-Lagrange equation, in other words is there a sense in which this function is the path of stationary action?
Comment: Comment to the question(v2): The path $t\mapsto \cos(x(t))$ is not a solution. It should rather be thought of as a coordinate transformation $x\mapsto \cos(x)$ of an arbitrary virtual path $t\mapsto x(t)$.
Answer: If x(t) solves the Euler Lagrange equation for $L(x,\dot{x})$, then f(x(t)) is stationary for $L(f^{-1}x, \dot{f^{-1}x(t)})$. The reason is that the action evaluates to the same thing, so that a small perturbation in either coordinate gives zero action change.
This means that in the domain where the function sin(x) has an inverse, you can freely change $x(t)$ to $\sin(x(t))$, so long as you change the action as above. This is a coordinate change on the configuration space, and the change in action automatically extends it to be a symplectic transformation on phase space (once you define the new momentum from the new Lagrangian).
Comment: Yes this might be more what I was looking for, but I will have to work through some of the Reimannian-speak before I can know for sure.  So thanks for the effort but in the meantime I will go with Lubos' answer.
Comment: @ben you haven't a clue, have you? ;)
Comment: @Dilaton I don't generally insult people if you look at the history of my comments.
Answer: Most naturally, both sine and cosine – I suppose you meant simply $x=\sin(t)$ and $x=\cos(t)$ because $\cos(x(t))$ isn't a particular path, it's a functional of a path – are solutions to the differential equation
$$ \frac{d^2}{dt^2} x(t) = -x(t) $$
which is the equation for a harmonic oscillator (with a unit spring constant, in this case). This equation may also be derived as the Euler-Lagrange equation from the action for the harmonic oscillator,
$$ S = \int dt \left[ \frac 12 \left(\frac{dx(t)}{dt}\right)^2 - \frac {x^2}{2} \right] $$
which is the difference between the kinetic and potential energy (the Lagrangian) integrated over  time (the action).
Comment: @RonMaimon I think this is exactly what the OP meant, and Lubos answers the question very nicely.
Comment: that's not what OP meant. They meant if x(t) is stationary, can you change the action so that a reparametrized f(x(t)) is stationary. It's about changing coordinates (with singular coordinate changes too, but I'm not sure if that is significant), not about a special case.
Comment: Oh I see. Understood.
Comment: Given the green check, @Larry may be right, Ron! ;-) Only the OP really knows what he or she meant.


What do companies look for in candidates during a virtual whiteboard technical interview round?

Question: I am due to appear in my first "whiteboard" interview round ever (most of my prior interviews have been direct Q&A with one or more team members).
It is going to be on a problem that is specific to the role and that I (most likely) won't have the exact technical solution for. What are the things I should focus on, and avoid, during my problem-solving approach on the whiteboard?
Comment: Also: don't be surprised if you can't fully code the solution in the time available; consider working top-down unless asked to focus on something specific. And if requirements are unclear, ask; worst they will say is "that doesn't matter right now, do whatever you prefer but be prepared to discuss tradeoffs later."
Comment: @SNIreaPER I would just ask. "Do you want me to collaborate with you to answer this or are you more interested in how I'd solve it myself?"
Comment: Is it a coding interview ? If yes, then try to google "Leetcode" and practice solving coding problems at that website (or at similar websites).
Comment: I should have added this in my question, but, it is NOT a coding interview.
Comment: As for focusing on solving the problem, should I treat it like a group activity where I collaborate with them and take their inputs as well to solve the problem? Or should I just focus on how I would solve it, but also verbally keep saying what I'm doing as if I'm demonstrating my thought process?
Comment: Google has a good video about what to expect from a whiteboard coding interview. I'd recommend you look at it.  https://www.youtube.com/watch?v=XKu_SEDAykw
Answer: When it comes to virtual whiteboard interviews, companies are really looking to see how you think through problems, communicate your process, and demonstrate technical skills - not necessarily coming up with some genius solution.
They want to get a feel for how you'd collaborate day-to-day. Can you chat through your problem-solving methods in a clear way? Do you ask good questions to clarify the issues? Are you open to suggestions and feedback? That collaborative stuff can be just as important as raw technical abilities.
It's totally normal to feel a little unsure about using new tools or platforms during the interview. Being adaptable is key, since you probably won't know the environment beforehand. The best preparation is practicing mock interviews with colleagues using whatever whiteboard tools you can access.
When it's time for the real thing, make absolutely sure you understand what problem you're being asked to solve. Ask the interviewers clarifying questions if needed. Define the inputs, outputs, edge cases - treat it like a conversation where you're aligning on the scope. As you work through ideas, focus on explaining your thought process rather than racing to the perfect solution. Ask for feedback, listen to suggestions, and be open to adjusting your approach.
At the end of the day, they're trying to get a glimpse into how you tackle problems and work with others. The whiteboard is just a medium to have that conversation.


tail -f equivalent for MySQL logging database

Question: It was decided that we should move to using a (MySQL) database for our application logs (it is a Java app using the logback lib). I am hoping to find something like tail -f that I can use with a specific table in that database that will show me new rows as they are added (similar to how tail -f worked on log files).
Comment: I'm looking for this too. Clarification on the subject: Of course we can poll the database or binlog periodically to detect data changes. That is a no brainer. But is there someway one can `tail -f` the bin log, so to be **notifiied** when changes occur, that *avoids* periodic polling. The difficulty with polling is especially determing the polling interval. Too short and you're wasting resources. Too long and you introduce delay into the system.
Answer: I don't think  some people understand the question (or I don't). You don't want to log the queries against the DB; rather a log from an application is going into a DB. If it were a file you could tail the log. How do you tail a table so that when a new row is added it is output?
It shouldn't be to hard to write a simple loop to handle this, assuming you have a unique field that monotonically increases over time (e.g., a sequence number).
current_pos = select max(seq) from table
while true
  new_pos = select max(seq) from table
  if new_pos > current_pos
    select * from table where seq > current_pos
    current_pos = new_pos
  endif
  sleep 1
endwhile

Comment: this is called polling and it's not that much fun :) but a good technique I suppose, if you must use polling.
Answer: Turn on MySQL binary logging.  Then you can use the mysqlbinlog command to see all data-modifying statements.
Comment: This does not `tail -f` (follow) the binlog to show rows "as they are added". It allows for a polling approach, but then we might as well use a periodic query.
Comment: can you show an example of how to do this in the language of your choice or with bash?
Answer: It appears that many of us don't quite understand your question. What do you mean by "logging database", which isn't a standard MySQL term.
Use the MySQL General Query Log, which logs each statement received from a client.
You can then set log_output = TABLE in your my.cnf . The file will be written to $mysql_data_directory/general_log.CSV . You can tail -f this file to view queries in real time.
Answer: Here's what I use. Seems the simplest solution, though it's not very efficient:
watch "mysql db_name -e '(SELECT * FROM my_table ORDER BY id DESC LIMIT 10) ORDER BY id ASC;'"

Comment: `watch` does not `tail -f` (follow) the binlog to show rows "as they are added". It allows for a polling approach, but then we might as well use a periodic query.
Answer: If you have binary logging enabled in MySQL, you can use this method from https://coderwall.com/p/0tmhla/tailing-mysql-binary-log to tail queries:
export D=$(date +"%Y-%m-%d %H:%M:%S" --date="30 minutes ago"); watch "mysqlbinlog --start-datetime=\"$D\" /var/log/mysql/mysql-bin.000001|tail"

It will watch the binary log and updates the output every 2 seconds.
Answer: You could do it a hacky way by using tail -f on the database files in /var/lib/mysql/database_name/table_name.MY* and then running your query every time a line is read.
Answer: I suggest adding a timestamp field to any table you want to tail. That will allow you to get the desired results very easily with a simple query.
Comment: This does not `tail -f` (follow) the binlog to show rows "as they are added". It allows for a polling approach, but then we might as well use a periodic query.
Answer: You might like to give this a go:
http://www.jetprofiler.com/blog/10/tail--f-table-with-myterm/#comments
It's old and hasn't been touched for 3 years - but I just tried it out and it works OK. Clone the BZR repo and read the README.
Comment: This polls the database "every second" and does not `tail -f` (follow) the binlog to show rows "as they are added". It allows for a polling approach, but then we might as well use a periodic query.
Answer: Here is a java library that can do a "real" tail -f of the binlog:
shyiko/mysql-binlog-connector-java: MySQL Binary Log connector
With mysql-binlog-connector-java you can actually react asynchronously to changes in the binlog without periodic polling.
It allows you to:
BinaryLogClient client = new BinaryLogClient("hostname", 3306, "username", "password");
EventDeserializer eventDeserializer = new EventDeserializer();
...
client.setEventDeserializer(eventDeserializer);
client.registerEventListener(new EventListener() {

    @Override
    public void onEvent(Event event) {
        ...
    }
});
client.connect();

Note that the data in Event event is not a super-handy as you've come to expect from your faviorite MySQL client, as the data is lower-level than that. See the link above for details.
Also, here is a list of projects that will let you do replication from MySQL to Kafka where I found mysql-binlog-connector-java. You can also find equivalents in at least go and python.


Bourée 1 and 2 for "fast" piece (bass trombone)?

Question: I am hoping to audition for the New England Conservatory Preparatory School Youth Philharmonic Orchestra on bass trombone (website found here).  As you can see, this is a very tough ensemble to get into.  I have to prepare a slow and lyrical piece, as well as a fast, technical piece.  For my slow piece I have Lebedev's Concerto in One Movement.  Would it be appropriate to do the Bourée 1 and 2 Bach cello suites as my fast piece, or should I generally play only pieces written for my instrument (Meditation by Hidas is my backup fast piece).
Answer: A Bach transcription is entirely appropriate for a trombone audition. If the audition requirements don't say anything that exclude it, I'd say that's an excellent choice, provided you can play it well!
One thing I would be looking for as an adjudicator of an audition would be how you adapt the breathing required for playing the piece on bass trombone to the music. Portraying your interpretation convincingly and confidently is essential -- this is beloved music, and no one wants to hear it done halfheartedly. That's perhaps one risk you run in doing Bach compared to standard trombone repertoire, but it's such excellent music that if you pull it off, it will make a great impression.
Comment: Would you consider it a "technical enough" piece for bass trombone?
Comment: Agreed with NReilingh - Bach is unforgiving and mistakes are *instantly* apparent when they arise. Yes, your breathing must be convincing. If I were an adjudicator, I would also be interested in hearing your slurring - especially through faster passages. Articulated notes show accuracy and flexibility, but clean slurring on the trombone shows nuance and dedication. That all said, I would also **definitely** prepare the required material as well: http://necmusic.edu/pdf/prep/Spring_Bass_Trombone.pdf  if you have not done so already.
Comment: Oh of course I will prepare the excerpts; I have to in order to make YPO.  I was talking about doing this as one of my pieces.
Comment: So it is definitely considered "technical?"
Comment: @Someone I did notice that the Hidas is more overtly virtuosic in nature, but that wasn't part of the question. Personally I'd find the Bach to be more impressive, though you may want to run that question by your private teacher. Also, chances are that the orchestral excerpts are chosen in part to give them the amount of "flash" they need to see.
Comment: My apologies.  So you would take Bourée over Meditation?
Comment: @Someone Oh, no apology necessary -- I was just explaining why I didn't mention it in my answer. If I was confident in my ability to execute it and my private teacher was on board, I would do the Bourée. Tempo is variable, so just make sure you're on the technical side of what's acceptable.
Comment: Got it.  I'll try to prepare Bourée.