What is the mirror half-moon object used in production?

Question: I was watching Pacific Rim Special Features disc last night. In one brief production scene, I saw a half moon shaped object which was chrome or mirror like. In another movie special features, I saw the same thing. It looked as though it was in the shape of a dumb bell, only with a thin rod between two half spheres. Just curious if someone could explain what this is and how it is used in production?
Comment: If you have the disc, could you grab a screenshot?
Comment: Yes, a picture of the offending object would be most helpful
Answer: I believe you are referring to a chrome/gray ball rig.
http://akromatic.com/gadgets-info/
This is photographed on set and then utilized by vfx look development and lighting departments in order to help facilitate the digital recreation of the lighting that was used on set.  This is one step/tool used in an often complex process.
I'm a vfx lighting td ...so I just assumed that's what you're referring to. Much like a hammer assumes everything is a nail :)
Comment: While this is not exactly what the tool I was seeing looks like, I'd have to assume it serves the same purpose. Thanks for the answer.


How to correct delete catalina.out?

Question: I couldn't restart Tomcat webserver. But catalina.out get very big.
I have tried delete on test server and created new empty. But Tomcat doesn't write anymore in new catalina.out. How correct delete/create empty new one ?
Comment: you don't need to create one. it will be automatically created. perhaps you've created with `root` or another user which leads tomcat to not open it.
Answer: If you are using Gnu/Linux or Mac OS X, you can just do:
echo "" > catalina.out

or even shorter:
> catalina.out

Comment: Important thing - don't delete never!!! Because program keeps file descriptor. File should be truncated as is suggested in this answer
Comment: as @Mustafa Genç said, you might have created the file as `root`? if so, delete it, don't recreate it, let tomcat create it automatically.
Answer: for me
echo "" > catalina.out

or
sudo echo "" > catalina.out

didn't work, as the file was created with root/other user privilege
sudo truncate -s 0 catalina.out

worked for me. here -s is for size and I am setting the file size to 0
Answer: In base Tomcat installs, catalina.out is usually the result of stdout/stderr redirections via the Tomcat launcher script.
If you run Tomcat on a Unix system, and if you delete the file while Tomcat is running, the problem is that the process will still have a descriptor open to that file and continue to write on it. The solution is therefore to use a program dedicated to handling such cases. For instance, logrotate (which is standard in pretty much all Linux distributions).
Answer: When tomcat server is used, it is pretty normal that the disk usage increases as logs accumulate in the catalina.out file.
If the catalina.out is deleted after tomcat is stopped, it will create a new catalina.out once tomcat starts and writes to it. But in your case, since catalina.out was deleted while tomcat was running it is holding up the file reference and writing to the deleted file. You can get rid of this by restarting the tomcat server.
Actually you can clear the log of catalina.out file without stopping tomcat with the command below.
sudo cat /dev/null > /opt/tomcat/apache-tomcat-9.0.37/logs/catalina.out

To keep catalina.out smaller and backup older logs, either one of the following ways can be used:

You could use the above Linux command and add it to a CronScheduler
to run daily/ weekly/ monthly or yearly as preferred.

Use logrotate tool in Linux. It is a log managing command-line tool
in Linux. This can rotate the log files under different conditions.
Particularly, we can rotate log files on a fixed duration or if the
file has grown to a certain size. You can click here for more
info on this.

How to correct delete catalina.out?


How the speed of light is constant in the universe if it decreases in water and glass and some other objects?

Question: My teacher told me that speed of light is constant in the universe.
But in optics it is clearly shown that speed of light slows down in some objects.
Please help.
Answer: The equations that describe how light, and all other electromagnetic radiation, works have a couple of constants which mean that the speed of light is constant.
The equations don't depend on where you are, what temperature it is, which way you are looking etc so we assume they apply everywhere.
It is entirely possible (although experimentally unlikely) that these constants and so the speed of light were different in the early universe or now in some distant place.
The reason that the speed of light appears slower in glass or water is (simplified) that the light travels at the speed of light between the atoms but is absorbed by an atom, then re-emitted after a short delay, to continue tat the speed of light to the next one. This gives a "speed of light" which is slowed depending on the material.
Answer:
My teacher told me that speed of light is constant in the universe.

Your teacher is mistaken I'm afraid. The speed of light varies with gravitational potential. You can see Einstein talking about this in 1920 in the Einstein digital papers:

Also see Irwin Shapiro saying the same in his Shapiro Delay paper dating from 1961:

There's also contemporary references such as Ned Wright's Deflection and Delay of Light: "In a very real sense, the delay experienced by light passing a massive object is responsible for the deflection of the light". Another one is Is The Speed of Light Everywhere the Same? by PhysicsFAQ editor and relativist Don Koks:
"Einstein talked about the speed of light changing in his new theory. In the English translation of his 1920 book "Relativity: the special and general theory" he wrote: "according to the general theory of relativity, the law of the constancy of the velocity [Einstein clearly means speed here, since velocity (a vector) is not in keeping with the rest of his sentence] of light in vacuo, which constitutes one of the two fundamental assumptions in the special theory of relativity [...] cannot claim any unlimited validity. A curvature of rays of light can only take place when the velocity [speed] of propagation of light varies with position." This difference in speeds is precisely that referred to above by ceiling and floor observers."
The underlying issue here is that that "the speed of light" is usually taken to mean "the locally-measured speed of light". This is constant by definition because we use the local motion of light to define our second and our metre, which we then use to measure the local speed of light. See http://arxiv.org/abs/0705.4507 where Magueijo and Moffat talked about it:
"As correctly pointed out by Ellis, within the current protocol for measuring time and space the answer is no. The unit of time is defined by an oscillating system or the frequency of an atomic transition, and the unit of space is defined in terms of the distance travelled by light in the unit of time. We therefore have a situation akin to saying that the speed of light is "one light-year per year", i.e. its constancy has become a tautology or a definition."
What Einstein called the speed of light is nowadays often called the "coordinate" speed of light. If you ask whether this varies with gravitational potential, people will say yes. But many of them will then say that this isn't actually the speed of light, despite what Einstein and others said. As you can imagine, this does cause some problems.

But in optics it is clearly shown that speed of light slows down in some objects.

See what Martin Beckett said about light moving through glass. An analogy is perhaps useful here. Imagine you walk at 4mph. If the pavement is clear of people, you walk 4 miles in 1 hour. If however the pavement is crowded with people coming at you, you have to dodge around them. You still walk at 4mph, but after 1 hour you're only 3 miles down the street.


Can pdf be previewed in dired+/peep-dired in the same way as jpg?

Question: I use emacs (v 18.104.22.168) on windows 10, and I am impressed by all the funtionality of dired+. One function I use often is peep-dired, so I can preview my text files when scrolling down my files in dired. For some reason jpg files are also previewed, not as code, but as a picture. Is it possible to preview pdf, doc, docx, and xls files also, not as their code, but readable for humans?
Comment: I use `qlmanage` on OSX to give me a quick human look -- **without** actually opening the file in a new buffer.  A cursory Google search lead me to `seer`:  https://sourceforge.net/projects/ccseer/  I would recommend looking at things like that and setting up a `start-process` and use something similar to the delete process function in the following link to help delete numerous processes with the same beginning name but the suffix is numbered:  http://stackoverflow.com/a/20023781/2112489  That thread/link also contains a sample method of using `start-process` to launch the quick look viewer.
Comment: This comment is an update/follow-up to my previous comment.  Unfortunately, the free program `seer` has no command-line support.  I've put in a feature request to the `seer` developer and will update if there is any news.  As the original poster of this thread noted in a different thread, `doc-view-mode` supports:  "*For PostScript files, GhostScript is a hard requirement. For DVI files, dvipdf or dvipdfm is needed. For OpenDocument and Microsoft Office documents, the unoconv tool is needed.*"  On OSX, `unoconv` is not available with `macports` -- but it is available with `homebrew`.
Answer: Customize option auto-mode-alist so that it has an entry that assigns .pdf to the mode you use for visualizing PDF files.  E.g., if that mode is my-pdf-mode then add an entry such as this to option auto-mode-alist:
("\\.pdf$" . my-pdf-mode)

Normally, you can use doc-view-mode for this (i.e., ("\\.pdf$" . doc-view-mode), after loading library doc-view), provided your Emacs build supports it. See the Emacs manual, node Document View, including this footnote.
Comment: Hi, and thanks. It did not work, yet. But I read somewhere that I have to install ghostscript in order to make doc-view let me see previews of pdf. How do I tell emacs where to find my ghostscript installation?
Comment: You also need some dll files placed in the bin directory where the Emacs executable is located.  There are several threads that can be found on Google about viewing pdf and png on Emacs for Windows, and I also wrote up a thread that describes how to build Emacs master branch with full image support.  Eli Z. has a page with all the dll files.  There are also pre-built Emacs installations with all the dll files already built-in.  To view pdf with the help of ghostscript within Emacs, search Google for **emacs doc-view windows**


Adding capacitor to model railway 12V motor to keep it going over a dead spot

Question: I have read that you can add a capacitor to a model loco to keep it going over a dead spot on the track - not DCC - just DC. Is this accurate? On one forum someone has been experimenting with 2000mF 12V DC polarised capacitors. However what happens if the power is reversed - I assume a short circuit - can anyone help with advice?
Answer: This is easy for digitally controlled railroads, where you can connect the capacitors to the DC part of the circuit behind the rectifier.
I've done it for LGB garden railroads with nominal 24V (in reality up to 28V), using ten or eleven 3 Farad supercaps in series, which gives about 0.3F = 300mF.  The supercaps need to have low internal resistance.
With that the train can continue to run for about a meter, which IMHO is a bit much (but there are no suitable smaller capacitors, so I can't easily change it).  If control is lost near the end of the track this can result in a crash.
A more detailed description of the circuit:
The circuit uses a diode and a resistor to limit current when charging, but not when discharging.  There is also a choke in series with the capacitor, so that the fast digital data signals are not filtered out.  Resistors across each capacitor even out the voltage and discharge it slowly when not in use.
Answer: Connecting a regular electrolytic capacitor in reverse results in that capacitor blowing up (or just creating a short circuit if there is not enough power for it to blow up).
However, there are non-polarized electrolytic capacitors. if you really need to, you can make a non-polarized capacitor by taking two capacitors of equal capacity and connecting their positive leads together (while connecting the negative leads to the circuit). The resulting capacity will be half of that of a single capacitor and the voltage rating will be the same as a single capacitor.
Comment: Thank you all for the advice - as a start would it would be worth trying two 5000uf capacitors connected back to back. Googling mentions 2000uf but as now explained 5000uf seems more reasonable - could someone suggest the capacitor type etc I should be looking for - 12volt ones seem a bit thin on the ground ....thanks
Comment: @smokeyone, the capacitor voltage has to be higher than the highest voltage you are going to apply to it. For a 12V system, the capacitor has to be at least 16V. You can use capacitors rated for even higher voltages, just that they are bigger and more expensive.
Answer: As @Pentium100 says - connecting two std polarised capacitors "back to back" is a reasonably good way of making a non polarised capacitor of half the value.
Note that 1 mF = 1 milli-Farad = 1000 uF = 1000 microFarad.
Was your forumite using a 2,000 uF cap or a 2,000,000 uF one ? Probably the former.
As a guide A capacitor will droop APPROXIMATELY 1 volt in time t where

t = C/I

It will droop V volts in V times as long.
C = capacitance in FARADS and I = current in amps.
On a 12 Volt system I ~= W/12
where W = motor watts.
So  a 1000 uF (not mF) cap will droop 1 V in 1 mS at 1A or in 10 mS at 100 mA or in 100 mS at 10 mA or in 1 second at 1 mA
In a model railway system you can probably run over a dead spot if V >= 6V (at a guess) so

t ~~= 6C/I    [s, F, A]

Rearranging

C = t x I /6  [F, s, A]

If time is in mS and capacitance in uF then

t (ms) ~~= 6 x C (uF)  / (1000 x I) = C/(166 x I)

So if you want a 300 mA motor to hold up for 100 mS at 6V droop
t = C/166I
So C = 166 x t x I
 = 166 x 100ms x 0.3A = 5000 uF


Reference request for philosophical texts on race

Question: Is there even such a thing as the philosophy of race, or race viewed from a philosophical point of view? If so, I would like to read some references on the philosophy of race. I would be very interested to hear what philosophers have said about race, racism, and other racial issues. I am not primarily interested in a biological or even sociological perspective on race, I am more interested in the philosophical perspective on race, if there even is such a thing.
Comment: Here are [SEP, Race](https://plato.stanford.edu/entries/race/) and [SEP, Critical Philosophy of Race](https://plato.stanford.edu/entries/critical-phil-race/) with surveys of philosophical positions and arguments, and multiple references. Even just googling "philosophy of race" returns multiple hits. For a cogent answer here, your request needs to be more specific.
Comment: Sometimes fiction talks clearer than fact. Look to Shakespeare's Othello for a super toxic  mix of race n jealousy
Answer: Of course there is. Biology, social analysis, politics and realpolitik, legal theory and rights discourse, and philosophy intersect. The industrialised genocide of the Holocaust, provides particular grounds for ethical questions and moral dilemmas.
Some related discussions on here:
Is biological ancestry distinct from race?
Can you explain clearly the difference between race and ethnicity?
What are diversity partitioning and clustering analysis, applied to hominids & race?
Do decolonialists have to attack science and modernity?
Are there philosophically serious moral arguments against eugenics?
Need help with this paper on epistemic justice
What is the difference between Subaltern and any other oppressed group?
Studies exploring the rationale of gender equality


my iPhone 6, 16gb is almost full because of the "other" space, how can I get rid of it?

Question: Around 5gb is what my other space is taking up on my iPhone 6. I see this in iTunes when I hook my phone up to the computer. So I can't install more apps and I want to. How can I mend this, how can I delete this other space. I am sure I am not actively using 5gb of space. Most of the photos I uplpoad to facebook, and I doubt my saved games take up so much space. Which program can I use or something like that?
Answer: First of all, you should know exactly what is the "Other". Because there are just too many things that require physical storage in iPhone. That's why Apple chose to lump a lot of things into the "Other" category. If there is many "other" storage on your iPhone 6, it's seems like your phone is filled with cached files and data. That can include:

Documents & Data
Safari browsing data
Mail data
iTunes data, including files that have been streamed (which can be BIG).

Deleting data, and then restoring is a good way, but you should back up first. or it will cause data lost. So it will take a little risk. Have you updated the application on your iPhone or upgraded iOS system to the newest version available? Some similar problems have been resolved using this way. If above ways still not work, you can choose some professional tools. You can try iMyfone Umate. It claims that this tool can optimize storage space and reduce the storage space occupied by apps to free up iPhone space. Maybe it's useful.
Answer: Try using battery pro app, see if that will help clearing up your space. Should do the work at least somewhat.
Comment: Thanks I already tried it, but didn't get me much, maybe couple of megabytes, which is not really much.


What happens if 2 wizards cast Secret Chest on the same chest?

Question: In my game, in which I play a wizard, I have met an NPC wizard who is willing to let me learn Leomund's Secret Chest from her spellbook. This got me wondering what would happen if I learned the spell and cast it on the same large chest that she had already cast it on (using my own separate tiny replica). Would this enable us to effectively teleport objects back and forth by alternately summoning the chest and placing things in it, then letting the other person summon it and remove the items? Or would something else happen? How would the chest work if 2 different wizards cast Secret Chest on it?
Comment: My first thought is "jinx- double jinx!" But that might just because I have small children.
Answer: The most "potent" effect prevails
Under the rules for Combining Magical Effects, two effects with the same name don't stack. QED.
The only tricky part is the DM has to decide which is the most "potent". If one caster used a higher-level spell slot, that would be the most potent.; otherwise, the "most recent effect applies".
Comment: @MaikoChikyu the chest is both a material component and a target.
Comment: This seems sensible, although the Combining Magical Effects rule refers to effects with overlapping durations, whereas *secret chest* has "instantaneous" duration. Does the rule still apply?
Comment: @MikeQ The spell's text also refers to the effect ending after 60 days. So I think it's still effects with the same name and a duration, even if it doesn't match the duration of the spell.
Comment: @MaikoChikyu Material components [are generally not consumed at all](https://www.dndbeyond.com/sources/sac/sage-advice-compendium#Components).
Comment: To sidestep questions about whether the secret chest is an ongoing magical effect despite the spell having instantaneous duration, I'd recommend you link to the DMG section on [combining game effects](https://www.dndbeyond.com/sources/dmg/running-the-game#CombiningGameEffects) instead of the PHB section on combining magical effects.
Comment: I'd like to point out that in this case the chest is used as a material component rather than receiving an effect like bless. As such it does not become a magical chest but is rather 'consumed' by the spell whilst allowing the user to summon a chest from the ethereal plane.
Comment: @RyanC.Thompson Would that reasoning also mean the Leomund's Secret Chest spell can be dispelled?
Comment: @aschepler I have no idea. That would be a separate question (and a hotly contested one at that).
Comment: Does this mean I have an excuse to blow a 9th level slot on Secret Chest? :P
Answer: In principle, this would allow both of them to summon the chest.
Leomund's secret chest doesn't restrict the chest from being used as the component for multiple castings of the spell. You'd just need to summon it back so the other wizard can cast the spell.
The ability to summon the chest only works "while the chest is on the Ethereal Plane", so if you speak the password and the chest doesn't appear, probably the other guy is using it.


Can I use a steam controller with Overwatch?

Question: Is it possible to get a Steam Controller to work with Overwatch?  I'd like to map the right touchpad to mouse movement if possible.
Comment: dont know if its possible, but why would you like to do that? mouse has a lot more sensitivity imo. i hate using a controller for anything besides racing or sports games
Comment: oh, well I feel sorry for them. :)
Comment: @Dragonrage I have friends who prefer controllers to KB + M and I don't feel like being 'that guy' lecturing them on KB + M response time.
Answer: Yes, it's fully compatible with Steam Controllers. You'll be at a slight disadvantage against keyboard/mice players, but it should still work fine.
Here's an example of a player using the Steam Controller to play Overwatch. Appropriate buttons can be mapped in the Controls settings.

To actually get Overwatch compatible with the Steam Controller, it must be run through Steam, so:

Select the option Games -> Add a Non-Steam Game to my Library
Add Overwatch.exe to your library.

Launch Overwatch through Steam.

Note that this will also cause you to have two clients running, both Steam, and Battle.net, so you may want to avoid setting up a controller if you have issues running both clients at the same time.
This is just an overview,  but reddit user /u/malecden has a very good setup tutorial listed here on reddit. in order to get the Steam Controller functionality to work with OW.


Sleeping on the Sweden-Finland ferry; how rowdy does it get?

Question: I'm considering to travel from Helsinki (Finland) to Stockholm (Sweden) on the direct overnight ferry on a Friday night on the Silja Symphony, but I'm worried about the reputation of those ferries as party boats.  How loud does it get?  Can I hope to escape the drunken, rowdy, howling masses if I book a B-class cabin on the ship?  I can bring ear plugs, but if it's anything like, say, the night train from Munich during Oktoberfest, then those won't be enough to get any rest.  What is it really like?
Answer: I took the Viking Line Gabriella ferry the other way from Stockholm to Helsinki last year. I went on a Tuesday night. Yes, people are having fun, but it didn't disturb my sleep at all and my ordinary cabin was far away from the music.
The entertainment is all organised rather than people chaoticly drinking and shouting in the accomodation area. Most people are fairly old as well, probably majority 60+. The vibe is nothing like Oktoberfest (I went there last year as well) and there were no rowdy masses.
Here's a picture of the bar on the Gabriella. Plenty of fun to be had if you like dancing to Abba covers, but the rest of the boat including the dining areas were quite chilled out.
Comment: Sounds like Las Vegas
Comment: ABBA cover bands on a Sweden/Finland ferry? Whoda thunk it??? `` :D Honestly, I'd enjoy that, too!
Comment: heh great pic !
Answer: There can be some noise and activity in the public areas of the ferry, like in the bar and restaurant, the sleeping areas are generally quiet and chilled out.
Of course, there may be occasional disruptions, such as passengers returning to their cabins late at night hammered, but these are typically minor and not disruptive much.
Answer: The short answer is not very rowdy, but as a rule of thumb, the more you pay for your cabin, the higher your floor, the older the crowd and the quieter your cabin.  At the extreme ends of the spectrum, on Silja the cheapest windowless four-bunk cabins below the car decks are where the students party, while the top of the line Commodore Suites have their own dedicated section at the front of the ship where you can't even get into the corridor without a special key.  But security keeps a pretty close eye even on the lower decks and anybody who's really out of control will be hauled off to the drunk tank pretty fast.
Back in the day Viking Line used to allow younger cruise passengers than competitors Silja Line and was thus known as the party boat, but these days I gather the roles have reversed and the age limits are largely gone.
Comment: As a Finn, this answer does seem truthful to me.
Comment: I don't know if this is true but sounds interesting.
Answer: The day of the week has a big impact on the number of passengers. In the weekend there might be more party people cruising. You can ask the ship's staff about the amount of passengers on board.
Cruise and one way passengers might be separated into different cabin sections, even if the cabin class is the same. In other words, passengers in the cabin next to yours will be also traveling to Stockholm instead of just cruising to Stockholm and back to Helsinki.
For your own peace of mind, once you are in your cabin, you can find out how to contact the ship's information desk, which is the same thing as the reception in hotels. There may be a telephone in your cabin or you can contact the information desk using your own phone.
If necessary, the ship's security guards will come to interrupt the loud cabin parties. They may also confiscate a bluetooth speaker etc. if necessary.


Magento2: Can we add range slider on product attribute:DropDown

Question: Hi can we add range slider on layer navigation on product attribute Drop-drown selection. In current magenro2 provide same range slider but on product attribute "price".
I have requirement range slider on color attribute.

I want same range slider on my custom attribute. Dropdown:
Answer: You can add that, In-fact i have worked on one such extension but it would require lots of modification and to describe here is not possible. But for a hint i can tell you the way, you need to change in layout first to set your slider then in corresponding phtml file you can get the range for your custom attribute (will get the range with attribute id [from drop-down options]) and you would require plenty of JS work too. One function would be there for slider functionality which is not much hectic but magento filter the products based on range for price type attribute so you need to adjust your custom attribute functionality for that as well.
I tried my best to give you the hint as much as possible as its very vast and you need to take care lot of things for this. you will get reference for the same to some extent on internet though.


How can I restore an app on my iPad if it isn't available in the Store anymore?

Question: I was using ios version 4 till yesterday, and I just upgraded the version. Some apps which I purchased before cannot be found in the app store or in the itunes purchases section.
what is to be done??
Answer: If you had your iPad in sync with your computer, the app should still be in the "Apps" section of iTunes, available for you to synchronize with your restored iPad.
Alternatively, on your computer, select "iTunes Store", and from the "Quick Links" section on the upper-right hand side, select "Purchased", and then "Apps" (and then "iPad").  Some removed apps are still available for re-downloaded from that area.
Answer: Apps fall into four categories:

The version you had is still live on the App Store for purchase and re-download.
The version you had is replaced by a newer version.
The version you had is withdrawn from new sales, but available for re-download.
The version is entirely removed from the store.

As written, it looks like the app you have in mind is in the last category. Your only hope there is to restore a backup copy from iTunes and sync that app over WiFi (if your iOS is new enough) or over USB cable.
As to the status of an app in my list above, the developer has total control over their desires to place, update or withdraw an app partially or totally. Of course Apple reviews these requests and can broker / take action above and beyond the developer.
If you fall into the last category where the app truly is not available, you have several options:

Contact the developer and see if they can or will sell you the app through Apple's B2B store. That store operates under the same review, but both buyer and seller need to submit to extra steps other than making an Apple ID.
Contact the developer and get a binary that you could then sign and distribute yourself as an Apple iOS developer or Apple Enterprise Developer.
Jailbreak your device and/or crack the code signing so that you can run a copy of that app (here you'll need a backup copy or a source of the app from someone else).


What is the term for out of key playing with a singular monophonic instrument?

Question: Lets say im playing a violin piece that's primarily in C major/G mixo-Lydian but i start to use notes outside of the scale without any chord accompaniment , technically those notes wouldn't be referred to as non chord tones, which include passing tones, incomplete neighboring tones,and etc. So what is the term for using out of scale notes on a monophonic instrument, and if possible can you add some more insight on the topic..Thanks!
Comment: _without any chord accompaniment...non chord tones_ Seems you're asking because there are no chords being played. That really doesn't make much difference: the prevalent tonality - the key - of the melody you're playing implies certain chords and scales, even if they're not being played by an accompanist, so _non-chord tones_ would still be apropos. Perhaps the question is what's the technical term for _non-chord tones_ , which isn't really a technical term. On that, @Tim has given you the answer: Notes within  the  key are generally called _diatonic_, outside the key,  _chromatic_.
Answer: Chromatic notes would fit, as in they are not going to be diatonic, thus they're out of the normal scale/mode, and will generally be represented on the dots as accidentals.
Comment: Does using the chromatic notes change the key? and if so how can it re- established on a singular monophonic instrument?
Comment: If the same chromatic notes get used frequently, it could be said that there's a change of key - or just a modulation. Re-establishing key is the same as in any piece - the key notes, particularly root and leading note - are stated more often.
Comment: Can any note aside from the root and leading, be used for re-establishment? And what are the benefits of using the root and leading?
Comment: Leading note usually leads to the root, and then using 3rd and 5th of key will re-tune listeners' ears.
Answer: It depends how the notes are being used. Technically they could be non-chord tones. You can specify chromatic with NCT's like chromatic appoggiatura or chromatic passing chord. Also, the chromatic tones could result in a shift in key. If it's temporary you could call it a tonicization, or if it is longer it could be called a modulation. Another term that could be appropriate is secondary dominant. It depends on the musical context. Even if the part is monophonic, if chords are being arpeggiated, then using some chord terms would be fine.


How do I configure my broadband connection?

Question: I have broadband connection,in windows it is working properly.In ubuntu 9.10 it is not working,So suggest me possible solution..
Comment: Ubuntu 9.10 is no longer supported. You should consider upgrading to a new release.
Answer: If you are talking about 3g/4g mobile broadband like an aircard install the "usb_mode_switch"..so you would need to be connected to the internet to be able to install it.what type of card are you using?
Comment: I will not flag this to become a comment, but in future, ask questions in comments, and leave answers as answers ;).


How to update a column with multiple row values for each group?

Question: In my Postgres table, there are about 2 million rows in total and for each ticker, there are 752 rows. I have an algorithm that shows different prediction price values for each date and ticker which needs to be uploaded to the table every day. As of now, I delete the ticker rows for which I have new data and insert the new data to the table using python. This table has a foreign key (1:M) on the ticker column.
I read that deleting and inserting has side effects like it increases the transactional log, the index needs to get updated and a few more. Deleting and inserting seems simple as I have to call only 2 functions in python to do it. I cannot upload the data to a new table and rename it to old name and drop the old table because this table is connected to an API that is used by a lot of users. So, if someone calls the API during this process, I cannot save the user analysis data.

Is delete+insert a good way to update a large table like this which has different row values every day for all tickers?
How about doing UPSERT using a temp table?
How about storing all the prediction data in a JSON structure for all tickers in postgres so it's easy to update 1 JSON row (value) for each ticker (key) instead of 752 rows for each ticker in a traditional table?

Table 1: Original table

id (PK)
ticker (indexed)
prediction_price
date

1
AAPL
5.4
2021-01-01

2
AAPL
5.6
2021-01-03

3
AAPL
5.8
2021-01-04

4
MSFT
10.2
2021-01-01

5
MSFT
10.8
2021-01-03

6
MSFT
10.8
2021-01-04

Table 2: New predictions for all the dates. Keep only x days for each ticker and delete previous ones

id (PK)
ticker (indexed)
prediction_price
date

1
AAPL
5.9
2021-01-03

2
AAPL
5.1
2021-01-04

3
AAPL
10
2021-01-05

4
MSFT
12.8
2021-01-03

5
MSFT
11
2021-01-04

6
MSFT
15
2021-01-05
Answer: You could, instead of delete and insert, update the oldest record for a given ticker, with the new data you have for that ticker.  If the primary key of your table was the ticker plus a sequence from 1 to 752, you could save the sequence of that new record in the ticker table, so that finding the next one to be updated would be very fast.  Your table would never need reorganizing, vacuuming or even dusting.


Sharepoint 2013 Auto Create Managed Property not work

Question: Hi i developed a site column, custom content type and a list definition.
I set the value for this column and started crawling but i don't find these properties in search schema.
If i add this column manually in a library and start crawling, these properties are showed.
What 's the difference?
Answer: I think it should work as you described - the following steps are needed, maybe you can try again:

To be picked up, the new items must be crawled. If you're not using
  Continuous crawling, this will be limited to when your incremental
  crawls run.
The column must be a site column! To be picked up, crawled
  properties MUST have a value. To be applied to items already existing
  in the index, a full crawl will be required still.
http://www.myfatblog.co.uk/index.php/2012/12/automagic-managed-properties-in-sharepoint-2013-search/

Or Technet: http://technet.microsoft.com/en-us/library/jj613136.aspx
Btw, I would not recommend you the automatically approach, you loose a lot IMHO. The managed property benefits a lot when you merge several crawled properties into one managed property.
Comment: +1 For the column must be a site column
Answer: The difference between setting the column as index-able at the list level will mean that all other lists that have this column will not be indexed.
To expand on Max's list I also recommend:

Index reset

I have seen scenarios where following the steps Max outlined ends in the crawled property still not being created. I recommend manually creating the properties.
You can create the managed property and crawled property in the search administration page or via powershell script using the following commands:
<code>$crawledproperty = New-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication [search app] -Category [Category] -PropSet [Property set] -Name [Name] -IsNameEnum $false -VariantType [crawled property template varient type]

$managedproperty = New-SPEnterpriseSearchMetadataManagedProperty -Name [ManagedPropertyName] -SearchApplication [searchapp] -Type [property type] -FullTextQueriable [$true or $false] -Queryable $true -Retrievable $true -EnabledForScoping $true -NameNormalized $false -Safe $true -NoWordBreaker [$true or $false] -Description [Description] -Refinable [$true or $false] -sortable [$true or $false] -HasMultipleValues [$true or $false]
</code>
For more information see here:
https://docs.microsoft.com/en-us/powershell/module/sharepoint-server/new-spenterprisesearchmetadatacrawledproperty?view=sharepoint-ps


What does Smallest width in Developer settings mean?

Question: I was stumbling upon the "Smallest width" settings. It seems increasing this value will make everything show up smaller on the screen and vice versa.
What does it mean and what's its function?
Answer: The propery smallest width is inversely proportional to the PPI setting (called ro.sf.lcd_density) that is specified in the file /system/build.prop. Meaning higher numbers for smallest width correspond to lower numbers for ro.sf.lcd_density.
The property ro.sf.lcd_density specifies the UI 'density': for lower numbers, it will render the same UI element using fewer pixels, making it smaller.
The upside of rendering the UI smaller is that it's just like using a higher resolution (or lower DPI setting) on a desktop computer: you have more space to put everything because smaller things means you can fit more of those things on your screen.
The downside is that the smaller UI makes it harder to read for people having difficulties reading small fonts or discerning small details.
Another downside is that your touches need to be very precise to hit the smaller UI elements. Unfortunately the resolution of the hardware touch-sensors doesn't scale along, so very precise touches are not that easy to achieve consistently, thus putting a lower limit to ro.sf.lcd_density for what you can comfortably use daily.
Answer: Here is the relevant excerpt from https://developer.android.com/training/multiscreen/screensizes.

The "smallest width" or "minimum width" screen size qualifier allows
you to provide alternative layouts for screens that have a minimum
width measured in density-independent pixels (dp or dip).
By describing the screen size as a measure of density-independent
pixels, Android allows you to create layouts that are designed for
very specific screen dimensions while avoiding any concerns you might
have about different pixel densities.
The smallest width qualifier specifies the smallest of the screen's
two sides, regardless of the device's current orientation, so it's a
simple way to specify the overall screen size available for your
layout.
Here's how other smallest width values correspond to typical screen
sizes:
320dp: a typical phone screen (240x320 ldpi, 320x480 mdpi, 480x800 hdpi, etc).
480dp: a large phone screen ~5" (480x800 mdpi).
600dp: a 7" tablet (600x1024 mdpi).
720dp: a 10" tablet (720x1280 mdpi, 800x1280 mdpi, etc).

Remember that all the figures for the smallest width qualifier are
density-independent pixels, because what matters is the amount of
screen space available after the system accounts for pixel density
(not the raw pixel resolution).


Objections to token-token identity theory in philosophy of mind

Question: There are well known objections to type-type identity (IEP) such as multiple realization and Kripke's argument, but I don't know any objections acceptable (by the majority of philosophers)  to this identity version of physicalism. Are there any serious problems in identifying a particular mental event with some physical event?
Comment: Since token identity is currently the primary version of physicalism objections against it largely overlap with objections to physicalism generally. I do not think there are any that most philosophers consider conclusive, but some prominent ones are arguments from qualia, see [SEP](https://plato.stanford.edu/entries/physicalism/#CaseAgaiPhysIQualCons), and arguments from mismatch between physical and mental properties, see e.g. [argument for the mind-body dualism from immateriality of thoughts](https://philosophy.stackexchange.com/q/31312/9148).
Comment: Voting to close because the question uses technical jargon with  no attempt to explain it.
Comment: Thanks a lot, yeah, I was thinking about qualia but it is a challenge rather than an objection. Thanks for the references.
Comment: Is there a Nobel Prize for philosophy?
Comment: @AgentSmith Nope!
Comment: @DavidGudeman I added a link https://iep.utm.edu/identity/ which identifies the subject which should help anyone ignorant of the material gain a foothold. Sometimes it's better to tape a small tear than shred an entire document, though I find it curious to close a document that Conifold responded to so fluently and well.
Comment: @JD . This is most unfortunate.
Answer: Identity Theory is a claim that the brain state is identical to the conscious state: https://iep.utm.edu/identity/  Philosophers have treated Identity Theory AS a theory, and tried to falsify it.  There are a variety of problems with it that have been identified:

Multiple Realizability.  We experience a thought over time, say 2+2=4.  Over that time, we have synaptic connections dissolve, and new ones forming, repeatedly.  We also have continually varying patterns of energy activation passing thru our brains.  Neither the network, nor the activation pattern, remain constant, despite the constant thought.  This though therefore CANNOT be identical to either a brain network structure, nor an activation pattern.  We are also able to communicate this thought to others, despite their different neural structure, and activation patterns.

Identity of Indiscernibles:  Qualia are not indiscernible from brain states. Identity Theory fails the basic criteria of identity.

Physicalism has adopted several different strategies to address these failed falsification tests.  The most common is Functionalism.  Functionalism ALSO is an Identity Theory, but what is claimed to be identical to consciousness is a function.  In my example, the function of 2+2=4 is asserted to be identical to the awareness of 2+2=4.
In Functionalism, functions ALSO have an identity to brain states, but that identity is the token-token identity your question references.  Many brain states are postulated that can produce slightly different 2+2=4 functions.  HOWEVER, the brain is postulated to act BASED on functions.  Somehow, the brain is aware of the large suite of tokens that can produce the related 2+2=4 functions, and keeps its status within that suite.  So functionalism postulates that the Functional family resemblance is what is causally effective in bounding the states the brain enters.    Token identity itself is casually irrelevant, and cannot EXPLAIN anything.  The family of functions are asserted to the type-type identical to consciousness, and therefore this type-identity is the explanation of consciousness.
Objections to functionalism:

The primary objection is the other side of the coin to multiple realizability, it is a surplus of functions relative to consciousness.  One can write 2+2=4, design an and gate structure that executes 2+2=4, write a digital code that executes 2+2=4, design a neural net that generates 2+2=4, etc. Yet, 99.999% of these functions will not be conscious.  Functionalism is not a sufficient condition for consciousness. INCLUDING IN OUR BRAINS! We process 2+2=4 in many cases UNCONSCIOUSLY -- hence even the family of related 2+2=4 CANNOT BE IDENTICAL TO CONSCIOUSNESS.

Our brains don't actually DO functions!  We humans developed the concept of functions from introspection on how we do analysis.  We then created digital computers to do this sort of stepwise analytic processing.  BUT -- when we examine our neurology, we are wired COMPLETELY DIFFERENTLY than our digital computers, even though our digital computers were structured on how we think we think.  Our brains are wired with as associative neural nets, which are analog, not digital.  Functions are not discernable at all in our wiring.  Daniel Dennett postulates that we run a "virtual" digital computer on our analog neural net structure.  Interestingly, much recent work in Artificial Intelligence involves running virtual neural net processing on the actual digital wiring structure of digital computers.  BUT back to Functionalism -- if we don't have physical functions in our neurology, yet we are conscious, then functions cannot be a physical explanation of consciousness.

These objections have generated a variety of proposals to get around them.
Paul Churchland proposed that the operation of a recursive neural net IS consciousness -- in an effort to revive neural identity theory.  This proposal falls afoul of the first objection to functionalism -- our brains do recursive neural net processing all the time, for basically everything, yet consciousness is a rarity.
Higher Order Processing, and Global Workspace Theory, and Strange Loops, were all proposals to limit the TYPE of functions that could be identical to consciousness. the problem for each is that we have instantaneous conscious qualia that is not higher order, global, etc., AND we have higher order processing, globally shared info, etc. that are not conscious.  These narrower functions do not match the experiences of consciousness in functional objection 1, AND do not address functional objection 2 at all.
Integrated Information theory is a proposal that Functional Identify requires, additionally, that the substrate the function is run on must have a high wiring uniqueness (high Phi) in order to generate consciousness (or that the consciousness generated is proportional to Phi).  IIT runs afoul of both objections to functionalism -- we don't run functions, and most of our processing is completely unconscious despite being run on either high or moderate Phi wiring.
These various failures to make Identity Theories work, are why most physicalists today DON'T hold by an Identity Theory, and instead are emergentists.  Emergent physicalism holds that some neural structures, or possibly some types of neural processing, lead to consciousness emerging. In emergent physicalism consciousness is not IDENTICAL, but a CONSEQUENCE of brains.
I hope this discussion of Identity Theory has made clear the problem with token Identity.  Theories of consciousness seek to explain why we are conscious, and for physicalist theories, how the brain maintains our being conscious.  Token Identity removes any predictive power from Identity theory, making it an untestable claim, with no predictive or explanatory utility.  If Token Identity is all one has, there is no way for a brain to maintain consciousness or functional stability, and neither our functional behavior, nor our conscious awareness are explainable.
And in particular, their stability and apparent effectiveness over time is counter-predicted.
In Popperian philosophy of science terms, the token-token claim is an effort to maintain a dogmatic assertion of Mind/Brain identity, while vitiating it of any testable consequences, due to every actual predictive consequence of an actual Identity Theory being refuted.
Comment: Thank you for your detailed review on some physical theories. Although I am agree with you that token theory is not predictive and has not explanatory utility, but some version of it such as anomalous monism is not so ad hoc. Consciousness is a challenge for any version of physicalism but as a real objection?(I don't think so)
Comment: @Arian. An ontology which cannot encompass any of our observed data (all observations are experiences) — is about as decisive an objection as one can find.  Anomalous monism asserts conscious emergence, and two way causation.  It is basically emergent dualism.  The one thing added to try to paper over that it isn't monism is deliberately untestable.  "Supervenience" is explicitly NOT "identity" and is a deliberately vague and undefined relationship to evade the falsifications that actual predictive identity claims fail. It is  a similar evasion tactic to avoid test ability like token-token is.
Answer: Your question, as I read it, seems straight forward:

Are there any serious problems in identifying a particular mental event with some physical event?

I think there plenty of philosophical objections to identifying mental events with physical events IF one ignores naturalistic epistemology. That being said, if one embraces it, then one clearly has to accept neuroimaging as the nail in the coffin of any philosophical theory that attempts to refute the general equivalence between mental and physical events. Neural correlates of consciousness are simply too irrefutable to deny statements like "physical events in the brain are strongly correlated to mental events".
I think some philosophers have an axe to grind, as Conifold noted, with some operating principles of physicalism, particlarly those who want to validate some non-empirical transcendental reality. In this case, if one were to accept that NCCs fundamentally show an obdurate metaphysical relationship (of any kind), it becomes much more difficult to allow metaphysical presupposition that posit additional realities. For instance, the need for a soul is obviated by NCCs since they're both non-empirical (to orthodox formulations of empiricism that reject paranormality) and non-parsimonious.
Beyond the powerful correlation, however, all is fair in love, war, and metaphysics. In no way do NCCs endorse particular views in regards to shed light on mental causation, or weigh in on the spectrum of positions from subjective idealism to eliminative materialism, other than to suggest that one can claim that there are no known instances of mental events without the appropriate physical events that we have come to know in love that underlie thinking. That is, clearly the affecting the brain affects the functioning of mental events. And then that fact is free to be used strategically.
Comment: As your link notes, Francis Crick played a key role in recruiting a generation of researchers into the neurologic search for consciousness, and the presumption of finding the "neural correlates of consciousness" has been that field's goal for 3 decades.  However, the output of that search has been far LESS than the goal  -- the "correlates" identified in your Wikipedia link are entirely to pre-conscious processing.  Citing that search as having been successful, rather than its basically total failure, is a misrepresentation of the state of the science.
Comment: @lol I had to include non-orthodox empiricism in my response just to stave off justifiable metaphysical commentary on your part. Apparently, I should have put more thought in to other parts. Let's see. I made no claim that NCCs have been successful in a scientific sense of establishing a science of consciousness. I think the granularity in neuroimaging simply won't allow for it. My claim is that NCCs are evidence that a philosopher cannot ignore when considering the metaphysical necessity of physical events as a basis for mental events...
Comment: thus, identity theory, in some formulation, is the only way of associating mental events with physical events (according to empirical orthodoxy), and that there are no real philosophical problems doing so. That the state of science is lacking isn't an objection, because scientific methodology has the purpose of starting with epistemic and ontic simplicity and creating a reliable theory from it.
Comment: I consider the success of neurologic research in characterizing the neurologic basis of pre-conscious processing, to be explicit evidence against functional identity theory.  The data from correlations between brain damage and loss of conscious mental faculties is strong evidence against the "radio receiver" idealist and dualist model.  The failure to actually correlate to consciousness, however, and the adoption of homunculus models that track the "entry into consciousness" by many researchers, support the basic dualist model of "interface of brain to consciousness", not Crick's reductionism.
Comment: In my review of The Myth of an Afterlife, I agree that the data from cognition losses due to brain damage or chemical influence show that simple dualist models need to be adapted.  I offered a model for how this data can be accommodated dualistically.  I don't think it can be accommodated by idealism.  See this review:  https://www.amazon.com/gp/customer-reviews/R10Z02T2ZEYPFY/ref=cm_cr_dp_d_rvw_ttl?ie=UTF8&ASIN=0810886774   To make materialism work as an alternative model, you would need to embrace strong emergence.  IE Identity of consciousness with a physically emergent phenomenon.
Comment: Once one accepts that first person empiricism is not only viable, but necessary, and what all of science is based on,  then "there are no known instances of mental events without the appropriate physical events that we have come to know in love that underlie thinking" is simply false.  Millions of mystics cite their first person experiences otherwise.  And emergent physicalist identity theory is refuted by this data.
Comment: @Dcleve In a sense, all empiricism is first-person because all thought is phenomenological. This is simple empiricism. In another sense, no empiricism is first person, because empiricism grants moderate skepticism the argument that makes all first-person accounts fallible. So sophisitcated forms of empiricism grant the necessity of intersubjectivity and demote first-person evidence in terms of weighting matters of truth. Your first-person empiricism is an attempt to reject orthodox peer-review and reproducibility and appeal to the popularity of an experience...
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/144513/discussion-between-j-d-and-dcleve).
Comment: @J D, To be honest I didn't grasp what you were trying to explain to me. As I said to Dcleve, anomalous monism (as a token identity theory) implies some version of epiphenomenalism which claims that some mental events such as free will and... are just illusions which is very counterintuitive.


Why does WP7 save GIFs as JPGs?

Question: When I save GIFs -- especially animated GIFs -- from a web page to my phone, it always saves it as a JPG.  This means that the animation is lost and only the first frame is preserved in JPG format.  Is there a way to get my WP7 to save GIFs as GIFs without messing around with the format (ie animated vs. non-animated)?
Answer: Windows Phone (both 7 and 8) uses Silverlight to decode different image formats and until the Apollo update for Windows Phone 8, WP did not support .gif file types unless developers used a third party library such as .NET Image Tools to decode animated gif types.
So to answer your question, saving an animated .gif from Internet Explorer on to your phone will (at this point anyway) result in you losing all frames except the first.
You're not the only one who faces this issue though: there is a feature request that has been made on the Windows Phone User Voice site to allow for this capability. Check it out.

Why does WP7 save GIFs as JPGs?


Unsure how to connect the anode in this circuit

Question: I am making a game of X and O's and ran out of pins on the Arduino. After searching on the internet I found out about connecting it in a grid connecting all the anodes in columns and the different colours in rows but I don't know how to connect the anodes so it only turns on only one of the LEDs rather than the other 2 in the grid if they are all connected to ground. The wires I am unsure to connect are the orange ones in the diagram below (bottom left corner). Note the Red on the RGBs are not used so don't need to be connected
Answer: Firstly, you have made the classic rookie mistake with your circuit regarding your LED current limiting resistors.  You have one per LED group instead of one per LED within a group.  The arrangement you have at the moment means that at best some LEDs will be dim or not light at all, and at worst will result in LEDs burning out.
There should be a resistor in every red, green and blue wire in your diagram.
As for what to do with the three orange wires (once you have re-arranged the resistors) they connect to three spare IO pins on the Arduino - you then turn each column on or off as you need - only one column is on at a time.  If you need more than 20mA for a column (which is highly likely with up to 9 LEDs on at a time) then those lines should be connected to either +5V or GND (depending on if you are common anode or common cathode) via transistors and the transistors should be switched by the IO pins.
Comment: So you just connect it to the 3 analogue pins and how would you code it if it would normally go to the ground
Comment: If they are common cathode (normally connect to ground) then set a pin HIGH to turn a column off, or LOW to turn it on.  Cycle through them nice and fast.
Comment: Thanks for the help but I ended up abandoning this project in the end


Ways of handling asynchronous receive calls

Question: I am implementing a primitive message-passing system. Currently, I am designing a receive function for async calls. Can I implement such a async receive function without using callback functions?
Comment: Does your system need to perform classifications (triage, or sort) of those messages? Is the classification built-into the system, or is it configurable at runtime (requiring registration of "handlers" or "listeners", which are callback objects)?
Answer: Received messages can be placed in a queue.
Additionally you can use a signal to indicate to the application when the queue has received a new message.
Comment: Or the queue can provide a "wait for input" function. This is generally known as concurrent queue.
Answer: I don't think you can, at least not easily. The problem is that while you are waiting for the message you will need to have a thread that is not blocking and that requires a call back.
If you want to do a huge amount of language hackery you might be able to have the async callback be invisible to the programmer but I don't think you can do that in anything that is not lisp. (Or at least I would not want to try!)
Answer: Depends what language you want to do that with and what communications stack you plan to use.
Anything that handles sockets should be able to do that.
In C at least that's exactly how you are supposed to write a socket server: in a loop that checks or waits for messages, not with callbacks - if your server has other tasks to do, just have another thread handle that.
I would need to know a little bit more about your problem area before I can give any meaningful help.
Answer: You can replace callbacks with a pointer to a message queue. This not as portable though unless you have wrapper around the message queue facilities to hide the OS dependencies.
Answer: There's a Scala library for reactive programming which uses Scala's support for delimited continuations to allow the API client to write code as if it were synchronous. I've forgotten the name of the library, unfortunately.
C# 5/VB.NET 11 do the same thing but using a CPS transform in the compiler (similar to the state machine transform they already do for generators; in fact, the two are so similar, that the VB.NET team actually decided to introduce generators in VB.NET 11 as well, since they are able to reuse the design across both features anyway).
StratifiedJS does the same thing for ECMAScript.
Rx is a library for .NET, ECMAScript and soon Objective-C/Cocoa developed by Microsoft, which uses a monadic combinator interface for dealing with asynchronous events.
Functional Reactive Programming is also quite popular.
Because of the rise of distributed computing, this is a very active area of research currently. Continuations, Monads, FRP, Objects, Actors, ... name any program structuring tool you can think of and I bet there is someone working on applying it to asynchronous programming.


Can we tell when a distinction (e.g., infer vs imply) is likely to be lost?

Question: Is there some way to tell that a distinction is doomed to disappear?  When did the difference between presently and currently disappear?  Presently and momentarily? The distinction between imply and infer seems to be hanging on, but will spell-check inevitably kill the difference between principal and principle?  The question is not whether the disappearance of distinctions is good or bad, but when the tipping point -- or tipping range -- occurs.
Comment: I've never heard *imply* and *infer* conflated. Let it also be said that the meaning of *presently* hasn't changed to be synonymous with *currently*. It at first meant *currently* but evolved to mean *shortly*; over time, however, people began to think that this was nonsensical, and so they changed the meaning back to what it logically should be: the adverb of *present*.
Comment: I'm voting to close this question as off-topic because we can't predict how English will evolve.
Comment: To predict when some distinction is 'doomed'? Use science instead of anecdotes. Use corpora to count instances, and use statistics to see if a noticed trend is real or not.
Comment: `Infer` and `imply` are two totally different concepts. The fact that some users confuse between them isn't a reason to "lose distinction"
Answer: Garner's Modern American Usage has a useful feature called the Language-Change Index (page xxxv), whose purpose "is to measure how widely-accepted various linguistic innovations have become".
The Language-Change Index has 5 stages, as outlined in this Language Log entry by Mark Liberman. Garner's key to the 5 stages includes 10 amusing, if idiosyncatic, analogies. So the Olfactory Analogy lists the 5 stages as follows:

Stage 1: Foul
Stage 2: Malodorous
Stage 3: Smelly
Stage 4: Vaguely odorous
Stage 5: Neutral

And the Etiquette Analogy has:

Stage 1: Audible farting
Stage 2: Audible belching
Stage 3: Overloud talking
Stage 4: Elbows on the table
Stage 5: Refined

Garner includes a lengthy discussion of how he decides on the stage that any given usage has reached in his prefatory chapter The Ongoing Struggles of Garlic-Hangers.
As to the confusion of infer/imply, Garner says (page 464):

Writers frequently misuse infer when imply would be the correct word.
  ... Don't be swayed by apologetic notes in some dictionaries that
  sanction the use of infer as a substitute for imply, Stylists agree
  that the important distinction between these words deserves to be
  maintained.

Garner rates the use of infer to mean imply at stage 3 of the language change index.
He rates presently for now or currently at stage 4. And principle for principal at stage 2.


What is the difference between Java's BufferedReader and InputStreamReader classes?

Question: What is the difference between Java's BufferedReader and InputStreamReader classes?
Comment: @amod0017 the question is fully answered in the Javadoc. Asking questions on forums that have well-specified answers in the product documentation is to be discouraged as a very bad habit. It just wastes valuable time. The correct answer is already in the Javadoc and any response here will either quote it verbatim, which the OP could have already read, or else paraphrase it which is a loss of value and precision. And asking an question that you could answer yourself on a forum, and waiting possibly forever, for a possibly incorrect answer. isn't a rational learning strategy.
Comment: @EJB i do agree you but i guess the question that is asked is presented in a wrong way... he has some particular input on some web application and he just want to ask which he should prefer... as he is confused between the both... just simple as that.
Comment: Also Tell Abt DataInputStream Class
Comment: If I were to rephrase the question, I would ask: "Under what conditions would I NOT want to buffer a an input stream reader?" It seems the buffer is used pretty much by default everywhere.
Comment: @AjayYadav  Can you please change the accepted answer to ChaitanyaVaishampayan's answer. Totally depends on you, but, maybe you need to revisit his answer which is explained to such detail.
Comment: @amod  I'm commenting on the question that was asked. You're just guessing. You don't know what he has. There is not one word about web applications in the question.
Answer: BufferedReader is a wrapper for both "InputStreamReader/FileReader", which buffers the information each time a native I/O is called.
You can imagine the efficiency difference with reading a character(or bytes) vis-a-vis reading a large no. of characters in one go(or bytes). With BufferedReader, if you wish to read single character, it will store the contents to fill its buffer (if it is empty) and for further requests, characters will directly be read from buffer, and hence achieves greater efficiency.
InputStreamReader converts byte streams to character streams. It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
Hope it helps.
Comment: amod I want to use these classes to store the content of a webpage .I want to know either i should use BufferedReader or InputStreamReader ?
Comment: @ajay i am not much sure about this.. but i read somewhere that BufferReader is efficient.
Comment: for competitive coding, should I be using BufferedReader or InputReader
Comment: `BufferedReader` is a wrapper for *any* `Reader`.
Answer: Reading from main memory is faster than reading from disk/STDIN.
BufferedReader uses a technique called buffering that allows us to reduce how often we read from disk/STDIN by copying chunks to main memory.
Consider:
BufferedReader in = new InputStreamReader(System.in);
in.read(); //
in.read(); //
// ...
in.read(); // could be hitting the disk/STDIN a lot (slow!)

vs:
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
in.read(); //
in.read(); //
// ...
in.read(); // hitting main memory a lot (fast!)

From the documentation:

Without buffering, each invocation of read() could cause bytes to be read from [disk/STDIN], converted into characters, and then returned, which can be very inefficient.

The two classes implement the same interface of Reader. So while you could use just InputStreamReader without BufferedReader, it could result in poor performance. We are just using the decorator pattern here so that we end up with a InputStreamReader which now has a buffering capability.
Comment: This code does not compile.
Answer: The InputStreamReader class adapts type InputStream (uninterpreted bytes) to the Reader class (bytes interpreted as characters in some character set), but does not apply any additional buffering. The BufferedReader class takes a Reader class (presumably unbuffered) and applies buffering to it.
Comment: Buffering means that data is aggregated in an array called a "buffer". The use of a buffer makes reads more efficient in that you copy large chunks from the network to the buffer at a time even if you only read a small amount from the buffer at a time. It also makes it possible to reread content that has already been consumed (by moving back to an earlier position in the buffer which is what "mark"/"reset" do ).
Comment: "buffering" what does it mean?
Comment: When to use `read()` byte by byte and when to use `read(byte[])` array of byte. As I think reading array is always better. then can you give me example where to use one both of them?
Answer: BufferedReader reads a couple of characters from the specified stream and stores it in a buffer. This makes input faster.
InputStreamReader reads only one character from specified stream and remaining characters still remain in the stream.
Example:
class NewClass{
    public static void main(String args[]) throws IOException{

        BufferedReader isr = new BufferedReader(new InputStreamReader(System.in));

        Scanner sc = new Scanner(System.in);

        System.out.println("B.R. - "+(char)isr.read());
        System.out.println("Scanner - " + sc.nextLine());
    }
}

When the isr.read() statement is executed, I entered the input "hello" and the character "h" of "hello" is printed on the screen. If this was InputStreamReader then the remaining characters "ello" would have remained in the System.in stream and the sc.nextLine() would have printed them. But in this case it doesn't happens because the BufferedReader reads all of the "hello" characters from the System.in stream and stores them in its own personal buffer and thus the System.in stream remains empty when sc.nextLine() is executed.
For the code:
class NewClass{

    public static void main(String args[]) throws IOException{

        InputStreamReader isr = new InputStreamReader(System.in);

        Scanner sc = new Scanner(System.in);

        System.out.println("I.S.R. - "+(char)isr.read());
        System.out.println("Scanner - " + sc.nextLine());

    }
}

In this case InputStreamReader reads only one character for "hello" input and the remaining "ello" still remain in the System.in stream and these characters are printed by sc.nextLine();
Conclusion:
BufferedReader reads a couple of characters(even if we want only one character it will read more than that) from the Input Stream and stores them in a buffer. That's why it is called BufferedReader. I was unable to figure out how much characters it read in one go. It varied from 3 to 10 when I tested it for this answer.
InputStreamReader reads only one character from input stream and remaining characters still remain in the stream. There is no intermediate buffer in this case.
When one or more Threads or objects want to read characters from System.in then in that case InputStreamReader should be used because it reads only one character and remaining can be used by other objects or threads.
BufferedReader is fast because it maintains a buffer and retrieving data from buffer is always fast as compared to retrieving data from disk/stdin.
Comment: When I run your example in My IDE (Intellij), both B.R and I.S.R returns me a char "h" and neither Scanner execute, unless I enter another line (or enter "Enter").  However, given your explanation, for the latter example, the code "Scanner sc = new Scanner(System.in);" should be executed automatically and corresponding print result should be expected "Scanner - e";    do you know why there is a difference ? thank you!
Comment: @JacquelineP. Maybe it is because for InputStreamReader, there may be a tiny buffer maintained internally, so when you type "hello", the whole string is read from the stream and stored in internal buffer and thus the Scanner is waiting for some other input to be entered as the stream now is empty. So, try entering a very long string of maybe 50 or more characters and then see, or maybe try entering a big sentence with spaces and then see the results.
Comment: Probably, this is the best explanation. Adding for those, who are confused about not getting the desired result as explained by @ChaitanyaVaishampayan, enter a very large string in both the cases. In first case, you will see that when the buffer is full, then all remaining characters from large string will be printed by Scanner object. For the second case, the first character of the large string will be printed by InputStreamReader object while from second character till the end will be printed by the scanner object.
Comment: This is the one answer which does not explain what is there in books and google. But, it explains the concept to the very core with example. Thanks for this.
Comment: @ChaitanyaVaishampayan I've tried! Unfortunately, no matter how many characters i have entered, the result is the same all the time - scanner always requires one more enter :(
Comment: @ChaitanyaVaishampayan it's weird. Before i've executed this program in linux console, but i have just tried to execute it in ide on windows and i've been able to fill the buffer and reach that the characters, has left in the stream, have been read by scanner automatically. For some reason the result depending on OS. Why ?
Comment: `BufferedReader` reads an *unpecified* number of characters from the input reader, but it certainly far more than just 'a couple'. In fact it is 4096.
Answer:
BufferedReader is a class in Java that reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, lines and arrays. The buffer size may be specified. If not, the default size, which is predefined, may be used.
In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore good practice to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example,
FileReader reader = new FileReader("MyFile.txt");
BufferedReader bufferedReader = new BufferedReader(reader);

will buffer the input from the specified file. Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient.

Source: https://medium.com/@isaacjumba/why-use-bufferedreader-and-bufferedwriter-classses-in-java-39074ee1a966
Answer: As I understand that instead of InputStreamReader BufferedReader takes less time to convert the data from bytes to character.so we prefer BufferedReader for better performance
Comment: You do not understand correctly. `BufferedReader` doesn't do any conversions at all. See the Javadoc. This is not the point of difference.


What does allelomorph mean?

Question: Is there any difference between allele and allelomorph since most websites call them the same.
If they are same then why two different term?
Comment: Welcome to Biology.SE! Thank you for taking the [tour], but please also go through the [help] pages starting with [Ask] questions effectively on this site. In particular asking why synonyms exist is about language not biology. Also note that for ["homework"](https://biology.stackexchange.com/help/homework) questions, you are **required** to use the "homework" tag. (Note that "homework" can apply to questions even if they are not assigned as homework — in this case you question "addresses a basic biology concept that may seem trivial to biology professionals".) Thanks!
Comment: Ok , thanks would consider your points
Answer: Allele, allelomorphs - the common word in both is "Allele" - When Multiple genes code for a contrasting or similar traits/ or multiple genes in the same locus on homologous chromosomes can be qualified as an allele.
Now let's look at second word "Morph" - Adjective MORPHOLOGICAL meaning that - relating to the form or structure of things. Now I'm going to mix this word MORPH with another word POLY which gives "Polymorphic" (Meaning Many Shapes/Forms) - Polymorphism is the ability of an object to take on many forms. This is the same behavior that we could see in an allele. Let me put this polymorphism more specific to our topic.
Gene-Polymorphism -

A gene is said to be polymorphic if more than one allele of a gene exists within a population.

In addition to having more than one allele at a specific locus, each allele must also occur in the population at a rate of at least 1% to generally be considered polymorphic. - Wiki definition

Now comparing the definition of allele with this second point of Gene Polymorphism, we get Allelomorphs - Meaning that a single Allele taking different forms/ multiple occurrences within a given population.
Here is an example for easier understanding,
Eye Color is a Trait,
Let us say that eye color is controlled by a single gene, for simplicity (this is generally not true in nature).

Blue Eye gene variant is an Allele,
Red Eye gene variant is an Allele,
Yellow Eye gene variant is an Allele,

Your eye color is then controlled by which of these alleles you have for the eye color gene.
Here eye color allele takes different forms. Thus making it polymorphic, Putting all these forms together we get Allelomorph(s) (plural), each individual one is as an allele/allelomorph (singular)
Comment: I edited to remove some unclear statements and make it easier to understand. (I think that this is a case where diagrams would really help.)

What does allelomorph mean?


do you hide nav in your print stylesheet?

Question: would you hide the navigation in your print stylesheet?
what are pros/cons? my initial thoughts:
hide:

uses up paper real-estate
not very useful on paper

keep:

keep look and feel of page
helps indicate which (sub-) page is being printed

thanks
Answer: Personally, I think the pros of hiding navigation far outweigh the cons:

uses up paper real-estate
not very useful on paper

I think these pros you list are facts, not just opinions. They weigh a lot as such. Now let's look at the cons:

keep look and feel of page

Whenever I print something from the Web, more often that not I do it because of the content. In fact, I can't remember a single case of printing something out because of its look and feel. If anything, I'd just take a screenshot.

helps indicate which (sub-) page is being printed

Most, if not all, browsers by default include a URL on each printed page. I can later navigate to that URL if I want.
Answer: There's no point to having a user print a your design, if they're after that they could print your regular page. Your print page should have the content that they want to print, and an indication of how to find that source on your site. Often I will just include something like My Account > Past Orders > Order # 12345 > Overview and maybe a timestamp at the top, nothing fancy, but if the document is handed off to someone else, they're able to relocate its origin.
Answer: In your header:
<link rel="stylesheet" href="print.css" type="text/css" media="print" />

In your print.css file:
#nav {display: none;}

Comment: my question isn't how to do it, but rather _whether_ to do it.
Comment: Whoops!  I added "How" automatically!


switching Google accounts (apps(all free), etc)

Question: I got my first smartphone, a Nexus 4, last year. I've been using two different Google accounts for e-mail etc, and I want to switch everything to one. I signed up for all my apps, etc on my nexus 4 using the Google account I want to get rid of. How do I switch over to just using my other gmail account on google play?
Comment: Sign into both accounts on your phone or tablet, download whatever apps you want from each account, then delete the old account, maybe they've blocked this since, but I've had this same problem, paid for apps, then got rid of the account and can't transfer the payment, so I signed into that account, downloaded the app, and then deleted the account, all is good...If I've misunderstood what you're asking I apologize, just let me know and I'll delete this and go away lol
Answer: I just went through this with google and their answer is "you can't".  I knocked on several of their help chat doors (including the play store) and - sadly - got the same line there.


If a file is re-written with the same content, will the modification time be changed?

Question: I have a file which is written by a Java program periodically.
If it is re-written with exactly the same content, will the file modification time change?
It seems that it doesn't; which surprised me - I wouldn't suppose anything is checking the old content against the new content.

Oops, realised that if the content hasn't changed, the Java program isn't writing the file. My bad. But good to get a definitive answer.
Comment: Which file system? File systems that do checksumming need to recalculate the checksum anyhow and could recognize if there actually wasn't a change. But this is plain speculation.
Comment: File system is xfs
Comment: @Philippos they wouldn't be POSIX-compliant then.
Answer: Yes, the modification time will change. You can see this yourself:
echo Hello > test
stat test
sleep 2
echo Hello > test
stat test

The second stat will show the same access time as the first (which proves that the file wasn't deleted and re-created — which of course matches the required behaviour for >), but updated modify and change times.
This is specified by POSIX, e.g. in write():

Upon successful completion, where nbyte is greater than 0, write() shall mark for update the last data modification and last file status change timestamps of the file, and if the file is a regular file, the S_ISUID and S_ISGID bits of the file mode may be cleared.
Answer: Everytime the file is saved, its modification time changes. If you are saving the file after making changes or just saving the file without making any changes, the modification time changes.
If the time is not changing, most probably the file is not being saved. As you are rewriting the same content again, try checking if the file is getting saved after the content is rewritten.
Comment: File writing/saving is all being handled by Java library classes, and I don't know what's going on under the hood. I'd be very surprised if it wasn't being saved.
Answer: NOTE: This is not a direct answer to your question, instead it is an answer to the obvious followup question "How do i detect whether a file has actually changed if I can't rely on the timestamp?"
If you ever need to check whether a file's contents (and not just its timestamp) have changed, you have to compare the current contents to previous contents.  For example, in sh:
Performing a byte-for-byte comparison with cmp:
if [ -e "$oldcopy" ] && cmp -s "$oldcopy" "$currentcopy" ; then
  # do whatever needs doing if the file hasn't changed
else
  # first do whatever needs doing if the file is new or has changed
  # then make a copy of the current file
  cp -af "$currentcopy" "$oldcopy"
fi

Using checksums aka hashes aka message digests with md5sum:
if [ -e "$filename.md5sum" ] && md5sum --status "$filename.md5sum)" ; then
  # do whatever needs doing if the file hasn't changed
else
  # first do whatever needs doing if the file is new or has changed
  # then save an md5sum of the current file
  md5sum "$filename" > "$filename.md5sum"
fi

md5sum uses more CPU power to generate the message digest for the file.  cmp uses more disk space to make a 2nd complete copy of the file.
Any other digest tool (e.g. sha512) can be used instead of md5sum if required...and probably should be if there are any security implications if the files differ.
Java, like many other languages, has libraries to perform message digest calculations.


Can I get continuous power from a light controlled by a switch?

Question: I have a garage where all the lights are controlled by one switch. I want to install a separate motion light from all these lights so that when someone opens the garage door, the motion light will automatically turn on. If I try and use the power from the current light fixtures, that means I have to leave all the lights on in the garage for the motion light to work. Is there any way of accessing the power from the light fixture and have continuous power coming to the motion light fixture?
Answer: Yes, but probably not in a terribly convenient manner as you seem to be hoping for.
You'll need to find where the power is supplied to the lighting circuit:

It may be power to the switch and then switched power to the lights -
in which case you'll need to run a non-switched wire from the power
source at the switch to the place you want the new light.
It may be power supplied to one of the light boxes, and then a "switch loop" down to the switch - in which case you can tap continuous power at the light fixture where power is supplied on the feed side of the "switch loop." If that does not happen to the fixture you'd like to connect to, you'll need to run a non-switched wire from the power supply to the place you'd like the new light. If it does, congratulations, you've won the terribly convenient lottery.
it may be simpler to connect to a non-switched outlet circuit, if there are outlets in this garage as well as lights. If you're looking for one on the ceiling level, look at the garage door opener (or where one would be if there was one.) If none are convenient, again, run wire.


download RDS snapshot

Question: I recently downgraded my EC2 instance.  I can no longer connect to RDS.  I think it might be that the internal IP is different and now the logins are attached to that specific IP.  I haven't been able to figure it out.  I would like to be able to get a backup from the snapshot.  Is there a way to download it through AWS?
Answer: You can't download an RDS snapshot. You can however connect to it and export your databases. Downgrading your instance should not affect connectivity unless you had set up your security groups incorrectly (Opening ports to an IP instead of another security group).
Comment: @ScotterC, you need to create a new instance with the snapshot.
Comment: How do you connect to a snapshot?  Can it be done without restoring that snapshot to the db?
Comment: This seems way more complicated than it should be.
Comment: @datasage an example of this would have been good.  Pretty lazy answer
Comment: I have verified that the EC2 instance can connect by telnet to port 3306 on the RDS endpoint.  However my logins do not work.  My security group did not even have mysql specified (I think that is for inbound into the EC2 instance anyway).  The db security group has the EC2 security group specified which my EC2 instance also has.  I believe that is how it is supposed to be set up.  That is what worked initially.

I just tried an older password than the one that was in my files and it worked.  It is good to know for sure that one cannot download an RDS snapshot though.  Thank you!
Comment: Did you set up grants that specify an ip address? The root account should not have a grant that is ip specific and if needed it can be reset via the RDS console.
Comment: @datasage - How to connect RDS snapshot to take database dump?
Comment: This is way more complicated than it should be. I wrote up a blog post to remind my future-self how to do this: http://mikebian.co/dumping-a-aws-rds-database-to-your-local-machine/
Comment: Note that this answer may have been true in 2013, but has since 2020 been flat out wrong, and really should get updated to point to the right answer instead.
Comment: One can use the "export to s3" action of the snapshot - to export specific relations and they will be stored in s3 as parquet files.
Answer: The accepted answer is not up-to-date anymore. Instead of using command line tools, you can use the AWS console.
Navigate to RDS -> Snapshots -> Manual/System ->
Select Snapshot -> Actions -> Export to S3
Going through S3 is common in most production environments, as you won't have direct access to the DB instance.
Comment: This exports in Parquet format, which may not be what you want.
Comment: as a clarification : this is only true in a selected list of regions, not available everywhere: https://aws.amazon.com/about-aws/whats-new/2020/01/announcing-amazon-relational-database-service-snapshot-export-to-s3/
Comment: I'm getting "Missing required key 'KmsKeyId' in params" every time I attempt to export a snapshot. Are we forced to use encryption?
Comment: for some reason my option to Export to S3 is greyed out :/
Comment: You can export to to S3, from which you could download, but then it will be encrypted using KMS key which you can't download which would make your package useless on any environment remote to AWS. Am I right?
Comment: This certainly looks nice, but AWS just says "Internal Server Error" when attempting this. Hopefully they iron out the bugs soon.
Comment: This doesn't cover all the cases, the "Export to Amazon S3" isn't available to me.
Answer: In addition to datasage answer.
As an option for production instance you can create a readonly replica in RDS and make dumps from this replica. You could avoid freezing of production DB this way.
We use this scheme for PostgreSQL + pg_dump. Hope it will be helpful to somebody else too.
Answer: I use:
pg_dump -v -h RDS_URL -Fc -o -U username dbname > your_dump.sql
Comment: Thank you for your answer - although code/config snippets might provide some limited short-term help, a proper explanation [would greatly improve](https://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) its long-term value by showing why this is a good solution to the problem, and would make it more useful to future readers with other, similar questions. Please edit your answer to add some explanation, including the assumptions you've made.
Comment: Short versions of flags are for writing. Long versions are for reading
Answer: I also needed to do this so I created a dump of the db (MySQL) by logging into my app server which has permissions to access the db.  I then downloaded the dump to my local machine using scp.
I used:
mysqldump -uroot -p -h<HOST> --single-transaction <DBNAME> > output.sql

Comment: This is unhelpful for two reasons: first of all it doesn't answer the question, and second of all this requires connecting with the RDS instance, and OP is asking this question precisely because they can't.
Comment: @toon81 actually he covers connection issue.
If you unable to connect from outside, you would be able to connect from EC2, if that's VPC issue.
Comment: @BogdanMart Since downgrading their EC2 instance, OP is unable to connect, suggesting that they were trying to connect from the EC2 instance all along. Anyway, it still doesn't matter because OP isn't asking about how to connect. I think they should be, but the fact remains this question is about something else.
Answer: Another option is to share your snapshot if you don't need to download it and just want to share it with a different AWS account ID.
Comment: You will need to share master key as well, or it won't be possible to decrypt the snapshot.
Answer: It sounds like your RDS is within a VPC inside a private subnet with security group and ACL. The only way to solve your issue is to take a snapshot and cerate a new DB instance out of it within the default VPC where all connections are allowed. After that you take backup classic backup using a db client or CLI.
Answer: The "Export to S3" option worked for me. I was able to restore only the table I wanted and view it locally using the "Tad" app.

download RDS snapshot


Is there a term in English (or any other language) to refer to the movement of a large, rapidly spreading fire?

Question: I like very specific words and this would help me with a poem I'm writing. Also, if you have any references for very specific words/know any yourself (English or otherwise), they would be appreciated. (:
Comment: Wildfire......?
Answer: I think conflagration would work for this.

con·fla·gra·tion noun \ˌkän-flə-ˈgrā-shən\
  : a large destructive fire
Answer: 'Holocaust' also comes to mind although it is a heavily laden term , meaning 'burnt whole' and 'thorough destruction by fire.' From your description it's hard to beat 'conflagration' or 'wildfire'--their only down-side is that they are so familiar.
Answer: You could call your fire a three-alarmer:-

One-alarm, two-alarm, three-alarm fires, or higher, are categories of
  fires indicating the level of response by local authorities, with an
  elevated number of alarms indicating increased commitment of
  resources.

This would have the advantage that it has already appeared (or not) in poetry:-

The one L lama, he's a priest
The two L llama, he's a beast
And I will bet my silk pyjama
There isn't any three L lllama.

(Ogden Nash) Some publications have his footnote:-

*The author's attention has been called to a type of conflagration known as a three-alarmer. Pooh.


Can a player in a lawn tennis match request that the umpire be changed?

Question: If, during a lawn tennis match, one or both players request the match commissioner or the tournament organisers to substitute the umpire of the match, can the request be granted for any reasons at all?
Comment: Can you please clarify what kind of tournament you are talking about here?  What rules would it follow - in the US, for example, it might be the USTA, or it might be the ATP or the WTA in professional world tennis.
Answer: The supervisor of an ATP Tournament can do that. Here is an excerpt of the rulebook.

Section: V. Personnel / 5.06 Supervisor / D. Responsibilities
In all ATP Tour and ATP Challenger Tour tournaments the Supervisor shall:
4) Direct, supervise, instruct and evaluate the Referee, Chief of Umpires and all oncourt officials, including the authority to:
b) Remove a Chair Umpire and/or remove, rotate or replace any Line Umpire or
net judge when necessary to improve the officiating of a match.

Moreover, the chair umpire has the right to remove a line umpire.

Section: V. Personnel / 5.07 Chair Umpire / Review Official / D. Responsibilities
In all ATP Tour and ATP Challenger Tour tournaments the Supervisor shall:
15) Remove, rotate or replace any Line Umpire or net judge whenever, in the opinion of the Chair Umpire, it will improve the officiating of a match.

However, this is an extremely rare case. I have never witnessed it and I watch a lot of tennis. Maybe it can happen more 'frequently' at the lower levels of professional competition (ATP Challenger Tour and the ITF Tour). Then again at these lower levels, there are often only 2 (if at all) line umpires on court. Removing one of them may make things even worse.
In the second round match between McEnroe and Nastase at the 1979 US Open it seems that the chair umpire was replaced. Read point 2 at this story. See a short documentary on this encounter here.
The rulebook can be found here: https://www.atptour.com/en/corporate/rulebook


Analytical mechanics with SR

Question: Is there an analytical mechanics with SR? Of course you can write down the Lagrangian and Hamiltonian of a free particle. What about non-free? Are there any problems? To be specific: what would the Lagrangian and Hamiltonian look like for a spherical pendulum considering SR?
Comment: A pendulum requires gravity, so now you are talking about general relativity. Nothing stops you from solving the equations of motion of a pendulum in a weak (or strong) gravity metric caused by a small or large gravitating body.
Comment: Thanks. Lets stick to flat spacetime. So in that case wouldnt an infinite charged plane and the pendulum with an opposite charge lead to a spherical pendulum without gravity.
Comment: Gravity means that spacetime is not flat, no matter how much you wish that it were.
Answer: A Lagrangian can easily be written down for a relativistic particle in a curved spacetime (i.e., under the influence of gravity.)  Specifically, the "action" is the proper time between two events along a particle's world-line, and the particle's trajectory will extremize the proper time between these events:
$$
S = \tau = \int \sqrt{ - g_{\mu \nu} dx^\mu dx^\nu }
$$
Here, $s$ is a parameter along the particle's worldline, and $x^\mu$ are a set of spacetime coordinates.
In particular, if we want to look at a test particle moving in a weak gravitational field, then the metric is such that
$$
S = \int \sqrt{ \left( 1 + \frac{2 \Phi}{c^2} \right) dt^2 - \left( 1 - \frac{2 \Phi}{c^2} \right) d\vec{r}^2 } = \int \sqrt{ \left( 1 + \frac{2 \Phi}{c^2} \right) - \left( 1 - \frac{2 \Phi}{c^2} \right) \vec{v}^2 } dt
$$
where $\Phi (\vec{r})$ is the Newtonian gravitational potential and $\vec{v} = d\vec{r}/dt$ is the coordinate velocity of the particle.  Extremizing this integral over all paths $\vec{r}(t)$ will yield the equations of motion for the particle.1  You can also define a Hamiltonian from this "Lagrangian" (i.e., the integrand above) by taking a Legendre transform in the usual way.
Free bonus Lagrangian:  If you want to add a charge to your relativistic particle, you can do that too;  the Lagrangian becomes
$$
S = \int \sqrt{ - g_{\mu \nu} dx^\mu dx^\nu } + q \int A_\mu dx^\mu
$$
where $A_\mu$ is the relativistic four-vector potential.

1  This assumes that $t$ is a valid parameter for the particle's trajectory, which is true in the case of weak gravitational fields but may not be so in stronger gravitational fields (e.g., black holes.)
Comment: Thanks. How do u add the rope constraint this Lagrangian.
Comment: Same way you would in the non-relativistic case:  either set $|\vec{r}| = L$ in the Lagrangian and use $\theta$ and $\phi$ as generalized coordinates, or use a Lagrange multiplier to enforce the constraint.
Comment: A little addendum to the answer: if you pass to a system of particles instead and want to maintain Lorentz covariance then you have to introduce fields interactions, otherwise the invariance cannot hold (which is the basis of why you need field theories instead of classical mechanics).

Analytical mechanics with SR