Keyboard shortcut in Finder for selecting a different custom Favorite?

Question: I know I can get to e.g. Desktop with ⌘+⇧+D, but what about custom folders that I have added to Favorites? Can I move which Favorite is selected up and down?
Comment: Clarification: I want to change which Favorite is selected, not change the position of the Favorite within the Favorite list.
Comment: I'm confused. You can drag anything within the favorites sidebar up and down?!
Answer: You could use an application like Alfred or Automator services to assign shortcuts for opening folders:

If you want to open the folders over the current Finder window, you could use FastScripts to assign shortcuts to scripts like this:
<code>tell application "Finder"
    reopen -- open a new file browser window if there are no open ones
    activate -- make Finder frontmost if the script was run with a global shortcut
    tell window 1
        set target to POSIX file "/Library/"
    end tell
end tell
</code>
Default Folder X allows adding custom shortcuts that work in both file dialogs and Finder.
Answer: This is doable, but kind of tricky—at least as I've experienced it.  I am neurotic about optimizing my keyboard shortcuts, so I've spent quite a bit of time on this very issue.
There seem to be a few different ways you can go about this.  The three with which I'm most familiar are:

Add a keyboard shortcut via System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts.  This is the easiest method, but it's limited to locations which are already contained in the Finder's menu system.  e.g. I use ⌘⇧L for "Library" and ⌘⇧W for "Downloads"—but that's about all that's available via this method, to my knowledge.
Create a service (in Automator), and then assign a keyboard shortcut to trigger that service via the Keyboard section within System Preferences.  Personally, I find Automator to be maddening at times, but I think the service(s) I've set up for this are pretty solid.  (Details below)
Use an App specifically intended for controlling keyboard shortcuts.  I've tried a few, and the one that I use now is simply called Shortcuts (available via the App Store).  It's surprisingly trouble-free… and in fact, it's one of the only apps I have set to launch upon system start-up.  It has several other nice features as well—one of which I really like: using the volume keys to control volume without requiring the fn key to be pressed.  (i.e. It overrides my "Use all F1, F2… as standard function keys" setting—but only for my volume keys, which is great for a Photoshop user like myself.)

Note: Invoking a shortcut from within Save and Open dialog boxes leads to different results, depending on your method.  The first 2 methods (i.e. not the Shortcuts app) have no effect whatsoever.  e.g. When saving a file, if I press ⌘⇧L, nothing happens —whereas pressing ⌘⇧H (which is built-in to the system) would take me to the Home folder.  The Shortcuts app (rightfully) has no idea when you're in a Save dialog box within another app, so invoking one of those shortcuts will actually just open up a new Finder window at that location (sometimes, smack dab in front of the dialog box you were just using.)
Final note:  I recently came across an app called KeyCue (perhaps when lurking on this site, actually).  To date, it's the only app I've found that provides a comprehensive overview of all your keyboard shortcuts (system and app-specific) in one place. I'd love to change a few things about the interface, but it can be pretty helpful at times.
(Note: I tried to post a screen-cap of my Automator service for custom keyboard shortcuts in Finder; also showing a script for invoking Moom upon opening the specified folder—but was denied because it's my first post on this forum.  Will update it when possible.)
Comment: Thanks! So there is no way to add a shortcut to the Save/Open dialog version of Finder?
Answer: I have had great luck with Spark. It looks like it may no longer be under active development, but so far it has done the trick with no issues. It's light, easy to configure, and FREE!
Answer: Not to my knowledge, no.
I would love to learn what distinguishes the system default shortcuts from those which the user creates.  It would be nice to be able to navigate to custom locations with a simple keyboard shortcut when within an Open/Save dialog window.


In Newton's 2nd Law, does $m$ stand for rest mass?

Question: I just learned that almost %99 percent of an atom's mass comes from Strong Force Field Energy. But this energy is counted as my rest mass nevertheless.
So in $ F=m.a$, should i take $m$ as rest mass (as standard description)? Or should i take $m$ as total energy that an object has?
To make it more clear; if an object's kinetic energy increases, would it be harder to accelerate?
Answer: $F = ma$ is the approximation for when an object's rest mass is much greater than it's kinetic energy. This approximation is good for anything traveling less than 50 million mph.
For objects moving 10% of the speed of light or more, you have to worry a little more about the 'total energy' of the particle. Then it's better to use the definition of force:
$F = \frac{\partial}{\partial t} p $
Where $p$ is the momentum; $p = \gamma mv$.
$m$ is the rest mass of the particle, so it has no time dependence.
Note that $\gamma$ and $v$ both have time dependence, so you have to use the product rule.
For slower objects (relative to the speed of light), $\gamma \approx 1$ and this reduces to $F = m\frac{\partial}{\partial t}v = ma$, the familiar result.
Comment: Some people do pretend like "mass increases" and they call it "relativistic mass" but most physicists find that interpretation inaccurate. Gravitational potential energy will not affect any of this (except, of course, that it could be used to accelerate you a lot)
Comment: Thank you for your answer. So the correct thing to say is; we cannot move at the speed of light because as we speed up our momentum increases and we would need more and more energy to speed up, not our mass increases right?
Comment: And one more question if i may, what about gravitational potential energy? What if my gravitational potential energy increases enormously, how does it apply with all this?
Comment: I'm not sure it's conclusive to say it's **because** our momentum increases (cause of course it'll increase as we speed up), but it's definitely related to the fact that you relativisitic momentum would have to go to infinity to travel the speed of light.
Answer: In Newton's 2nd law, written in terms of force, mass and acceleration, m stands for the mass in the original Newton's work, i.e. the quantity of the substance which makes up a material body. This quantity is absolute, i.e. will not change if a body is at rest or moves (which is fine, because a body could be at rest in some Galilean inertial frame while moving with constant velocity in another).
In the theory of special relativity, $\vec{F} = m\vec{a}$ is derived as the low-velocity approximation of $f^{a} = m \dot{u}^{a}$, where "a" is a generic index (in the sense of Wald's book), f is the 4-force, u is the 4-velocity, the dot stands for the derivative with respect to proper time, and m is the invariant mass (or simply mass).


Zero mean noise in images

Question: According to the literature, zero mean noises are those whose expected value is zero. But what does this mean in the context of images. Let us consider grayscale for now. The intensity values ranging from 0 to 255. The noise will also have values between 0 and 255. How can then the mean be zero?
Answer: To get a nice visualisation lets consider a colour image with zero mean noise & standard deviation 20! Which means the values of each RGB component can randomly vary from +20 to -20. So pixels will be added with this noise.
Here is the code for generating noise to an Image using opencv c++
<code>Mat mSource_Bgr,mNoise_Bgr;
mSource_Bgr= imread(FileName_S,1);

// We need to work with signed images (as noise can be
// negative as well as positive). We use 16 bit signed
// images as otherwise we would lose precision.
Mat mGaussNoise_Bgr(mSource_Bgr.size(), CV_16SC3);

double StdDev=10;
randn(mGaussNoise_Bgr, Scalar::all(0), Scalar::all(StdDev));
Mat mTemp;
mSource_Bgr.convertTo(mTemp,CV_16SC3);
addWeighted(mTemp, 1.0, mGaussNoise_Bgr, 1.0, 0.0, mTemp);
mTemp.convertTo(mNoise_Bgr,mSource_Bgr.type());

mGaussNoise_Bgr.convertTo(mGaussNoise_Bgr,CV_8UC3);
imshow("Noise Image",mGaussNoise_Bgr);
imshow("Original Image",mSource_Bgr);
imshow("Original Image + Noise",mNoise_Bgr);
</code>
Here is the Original Image

Noise Image with Mean : 0 & Std Deviation : 20

Original Image + Noise

Same Image with Noise Mean:0 Std Deviation:10
Answer: The image pixel values will be between 0 and 255 for 8 bit values.
There is nothing stopping the additive noise from increasing or decreasing the pixel values.  Obviously you can't increase the pixel values above 255 or reduce them below 0, but it still allows the noise to be zero mean.
Comment: OK, then you need to make a decision about how to represent it.  Often times, the noise range $[\mbox{min},\mbox{max}]$ is mapped to $[0,255]$ and that is shown.
Comment: So what if we try to visualize just the noise mask as an image?
Answer: I think it would be helpful to NOT think of images generally as having pixels with integer values between 0 and 255.
Think of images (and signals) as having floating point values of unlimited range.
A particular representation of an image -- in memory, on disk, or dictated by a particular file format -- might be to store values as one byte per channel, interpreted as an unsigned integer (between 0 and 255). But by doing so, you are severely limiting the set of possible images that you can represent.
As an example, if you were storing images as OpenEXR files (16 or 32 bit floating point values), or TIFF with float pixels, or FITS with float pixels, or any number of other higher-fidelity formats, it would be obvious that you could have negative values and a 0-mean signal. It is only because of the limitation of ancient 8 bit integer image file formats that it appears to be a problem.

Zero mean noise in images


Does Mass Effect: Andromeda contradict Mass Effect 3 ending?

Question: From the transmissions in Pathfinder's logs you learn that Reapers attacked and most likely everyone in the Milky Way is dead, as there hasn't been signs of life since 2186. But doesn't this contradict Mass Effect 3 ending, where no matter which of 3 choices you make, the Milky Way is saved?
Comment: Why remove spoiler protection?
Comment: i can't speak for Frank but i did debate myself on weather that the question title implied spoilers anyway so in question spoilers wouldn't be necessary
Comment: Because a question has to make sense without the spoilers. Your entire question was spoiled. We don't dance around asking a question; just ask it. If people don't want to be spoiled, they don't have to read it.
Comment: @Frank fair enough
Answer: IIRC, no matter which ending you choose in ME3, the relay network gets destroyed.  The relay network was, among other things, responsible for interstellar communications (apart from the quantuum communication system, which was top secret, bleeding edge stuff in ME2.)  So, although life in general was saved, civilization - at an interstellar level - was crippled.
So, from the perspective of the Andromeda team, there wouldn't be any signs of life back in the Milky Way after the Reaper invasion, but that doesn't mean there's no life at all.
Comment: So basically ME3 ended similar to: Futurama:
Bender's Game where dark matter is made useless and they had to start using nibbler powered vehicles instead :-)
Answer: Upon reading deeper into some of the logs, and also from certain conversations Ryder has with various NPC's, you learn that the Andromeda Initiative launched well before the events of the original trilogy occurred. Therefore once arrived in the new galaxy some 600+ years later, no one from the initiative would know what the outcome of the Milky Way conflict was.
So to answer the original question, no, it doesn't contradict the ME3 ending(s).
Answer: My opinion.
Within the game,
There are conversations on how the Golden worlds were picked. They did an extraordinary amount of research. The Andromeda Initiative chose the world, that each pathfinder would eventually explore and colonize. Once they finally got there, all their research and theories failed.
With saying that. Within the Pathfinder's logs, as you stated in your question.
"There hasn't been signs of life since 2186"
All you know is what's in the logs. It says that there hasn't been signs of life, but how do they actually know. They really don't. More of an observation.
Check this site out, for an interview that may help you out
Comment: I've read the linked article, and it does not answer my question at all.
Comment: i suggest you quote what parts of the link are relevant. alot of what i skimmed though just talked about production and comparisons with previous games and nothing on what explains the fate of life in the Milky Way Galaxy (which the Asker says that Andromeda implied that everyone died at the end of the third game)


Brewing Hibiscus tea

Question: I'm about to start a batch of Kombucha using 100% Hibiscus flowers as the tea. Just received a 1 pound bag of organic Hibiscus flowers. Can anyone give me some recomendations on amounts to use in a gallon of water and possibly some brewing methods for this type of tea? I know what to do for the Kombucha but I've never brewed Hibiscus flower for tea before and want to do it as nicely as possible before adding to the Kombucha first ferment.
Comment: There seem to be plenty of recipes for how to do it on the web. Is there something we can tell you that the recipes can not?
Comment: If I had to guess... answers might discuss pros and cons of hot vs cold brewing (probably the biggest categories of brewing methods) and reasonable range of ratios, in particular can you make it more concentrated then dilute? The question could be more explicit, though.
Comment: Yes, concentrate is what I usually do with green tea in my Kombucha so that I can add cold water to help it cool down quicker. The tea has to be room temperature when adding to the Scoby and starter tea otherwise it kills the beneficial bacteria that helps it ferment.
Comment: Catija, I'm looking for methods from people who are really into tea's. I've seen many posts here about tea brewing and the online searches just lead to a broad variety of directions that counter inform each other. I know we have some tea snobs here. ;) Would rather get their advice.
Comment: Have you asked this question at a specialty tea store. The ones out here will occasionally brew teas on site and give you good tips to follow.
Answer: I use 1 rounded teaspoon for 12 to 16 ounces (depends on the mug I'm using), so about 8 teaspoons (or about 2 1/2 tbsp) for a gallon of water. Hot water, just under boiling, is best.  Ideally, the water is heated and poured onto the tea at just under boiling.  Because I don't think you want to boil a gallon of water, I'd use the amount of hibiscus for a gallon of tea, but only use about a quart of hot water to start, let the tea steep in that (at least 5 minutes, longer will give a stronger flavor) then add the remaining 3 quarts of water.
Comment: I believe for kombucha you want something that's twice as concentrated, compared when you brew it for direct drinking. The fermentation process tends to dilute the flavour and aroma quite much.

Brewing Hibiscus tea


SAFe Innovation & Planning vs. Sprint Planning

Question: We're moving to SAFe in my company, and I have trouble understanding the differences. I'm certified in Scrum (CSM/CSPO), but don't know much about SAFe, and I don't really see much of a difference between the SAFe Innovation & Planning's planning part vs. the Scrum Sprint Planning. What's the difference? Tried Googling but it seems like they're the same, however in our team we're doing both I&P with scoring user stories and whatnot, but also have Sprint planning where we also (re-)score USs. I have a feeling we're doing something wrong.
Answer: In Scrum, the Sprint Planning occurs at the start of every Sprint. In most implementations of Scaled Scrum, the Sprint Planning is synchronized among the teams and often has a shared component where the teams align their plans for the upcoming Sprint. In SAFe, this activity is represented by Iteration Planning on the team level.
SAFe's Innovation and Planning Iteration doesn't have a corresponding event in Scrum. The Innovation and Planning Iteration occurs once per Program Increment. In Scrum, every Sprint (iteration) is intended to produce a potentially releasable product. However, the Innovation and Planning Iteration is a buffer period for improving tooling and infrastructure, continuing education and cross-training or skill building, formal verification and validation activities, user acceptance testing, other release-related activities, and Program Increment Planning. It has a different type of work than other Iterations.
Answer: Before one move into a scaled agile framework (SAFe, LeSS, or any other) everyone in the process must be 110% clear on why the movement.
The key about scaling the process is, as others already said, about doing the same process a normal team would do, but this time at another level. I've been working with Programs with 300+ engineers, so in this case a scaled framework is a must. Like a team of 7 engineers would do a planning, refine and agree with PO what can be delivered for the next 2 weeks, the "same" happens when you have 700 engineers... but the "same" in this case is... well, not exactly the same.
Back to the original question: "I don't see much of a difference between the SAFe Innovation & Planning's planning part vs. the Scrum Sprint Planning."
There's a series of artefacts that are a result of a PI planning that are not common on a Scrum Sprint Planning. Your mileage may vary, but a few key aspects I've observed to be fundamental to a proper PI Planning are:
Business Stakeholders active Participation
In comparison to a normal Scrum Sprint Planning, the business is represented by the PO. In the case of the PI planning, it's highly recommended to have the project and program sponsors actively participating, asking questions and, towards the end of the PI planning, to assign a business value to these features.
Visualisation of cross team dependencies
The visualisation of cross team dependencies, as others already mentioned, is almost inexistent on teams using pure Scrum. On scaled frameworks, it's (unfortunately) common to have cross team dependencies. They should be highlighted, risks identified and mitigations agreed between parts prior to the actual Sprint Planning. If team A depends on something from team B and team B cannot commit to help team A, then maybe team A may need to review their priorities or look for alternatives.
There's a lot of push on having such sessions with everyone on the same physical locations, although in Covid19 times that's not the case. That's how a normal physical dependency board looks like (this board is available for everyone at all times and teams go picking items from the backlog and assigning them accordingly, highlighting dependencies and risks):

Confidence vote
Also, towards the end of the PI planning, every engineer is asked about how confident they are about the committed (and uncommitted) work for the next PI. If the confidence is low, stakeholders and sponsors might have an opportunity on-spot to clarify questions, dependencies and open room for identifying problems that, in a normal model, sponsors would take weeks or months to realise.

This is how a PI planning agenda look like:

More details about the PI Planning in SAFe are available in https://www.scaledagileframework.com/pi-planning/
Answer: The Innovation&Planning in SAFe is effectively an activity consisting of two parts: the first is a classical inspect & adapt exercise, much similar to a Scrum's Retrospective.
The second part is the planning exercise, when the next Program Increment (PI) is committed by all teams.
The difference with a Sprint Planning is that in Scrum it refers to one single team and one single iteration.
SAFe instead is addressing how to scale Agile with multiple teams.
In SAFe all teams join the PI planning and it spans multiple iterations, typically three or four: the teams are presented with the vision for the Increment (what is the business target) and the requirements are split among the teams based on their area, then each team breaks out and plan its own iterations and details the assigned requirements into own User Stories.
This team's break out can be a classical Scrum Sprint planning (SAFe is agnostic about the Team methodology) but multiplied for all iterations. No need to have a separate Sprint Planning after the PI planning.
And after each team has prepared its own plans for all next iterations, they are reviewed with all other teams to find and solve/plan dependencies; finally each team is fine tuning the sprints plans/backlogs based on this review.
We are talking here about many teams. If a project is split among less than five teams, it does not make much sense to use SAFe. Coordination could be achieved by using e.g. Scrum of Scrums


QR Rockshox Reba fork for Axle frame?

Question: I just found a Reba for a bargain price and everything fits my frame except for the fact it uses quick release rather than axle; the rear dropouts are axle and with this fork the front will be QR, while I am up to changing my wheels because that was part of the plan, I wonder if it's a reasonable idea to mix QR and Axle, or if I should wait to find another bargain (who knows when) on a XC fork that has axle.
Comment: Question essentially boils down to whats better -  a thru axle setup with a cheaper wheel  or a QR setup with better wheel. The marketing guys will say the Thru axle, but my money is on a better wheel.
Answer: There's no fundamental reason why not but it would be an unusual combination. Through-axle fork with QR rear is much more common.
Bear in mind though that there are good reasons why through-axle designs have replaced QRs over the last 5-10 years. It helps make the fork stiffer and it prevents any chance of the front wheel being ejected from the dropouts under disk braking forces. You might also find it harder to find a suitable quality front wheel these days if you're restricted to QR compatible hubs.
Comment: I see I honestly wanted to save money in the fork so I could get better wheels.
Comment: what about conversion kits?...
Comment: Some hubs are convertible with spacers etc. which is usually easy to do yourself if the hub is suitable. The only way to convert a fork though is replacing the entire lower assembly which is a more difficult and expensive job.
Comment: From 350 euro to 450 euro would you consider it being reasonable to pay 100 euro more for full axle?...
Comment: The reason for QR on back and thru on front is its less advantage on back, but mostly comes from a well loved frame getting a fork upgrade, where it would be rare for a well loved fork to get a frame upgrade.
Answer: (The term you want is "thru-axle.")
It's a little backwards-looking but there's no critical reason not to. How wise it is depends a lot on what kind of rider you are; riders towards the smoother and/or lighter end of the spectrum are going to get less benefit from a thru-axle front. There are a handful of bikes that come this way because they're at the lower end of a model line where the frame is the same throughout.
While product recommendations are off-topic here, QR Rebas are good forks that a lot of people ride very happily, and thru-axles being common now doesn't change that.
One consideration if you're looking to get fancy wheels now with 15mm thru-axle adapters available and run them QR for the time being is that if you do wind up upgrading the fork again, unless we're talking about a 26" bike then you may very possibly want to get a Boost 110 fork, and while many normal 15mm thru hubs can be adapted to Boost 110, they fundamentally can't take advantage of its upside because the whole point is to get the flanges further apart than normal 15x100 hubs allow.
Comment: Well one thing is the Reba with QR I found... it is 350 euro, whereas the reba with maxle is 450 euro; I don't know if this price is normal or I just found a bargain, otherwise I'd just wait.
Comment: High light the recommendation for adapters for QR. That makes the wheel a keeper as opposed to an obsolete part.

QR Rockshox Reba fork for Axle frame?


Why does CO2 accept electrons?

Question: CO2 is a lewis acid as it can accept electrons. But as the octets of all atoms of CO2 are complete why does it accept electrons? Shouldn't it donate electrons and be a lewis base?
Comment: Most of the stable compounds have complete octets on all atoms. This has nothing to do with their willingness to donate or accept electrons.
Comment: @IvanNeretin Then how do we determine it?
Answer: Consider that the carbon in carbon dioxide is bonded to two electronegative oxygen atoms. This will cause shift the electrons towards the oxygens and away from the carbon, making it electron deficient:
$\hspace{7.5cm}$
This makes the central carbon electrophilic, and explains the reactivity of the carbonyl moiety towards nucleophiles. Similarly, $\ce{CO2}$ undergoes addition reactions with Grignard reagents to form carboxylate anions.
$\hspace{4cm}$

Why does CO2 accept electrons?


How to save directly from Word in Office 365 to an existing SharePoint 2010 library?

Question: A few people I need to share documents with have Office 365, for Word, while my computer has Word 2010. All of us need to open SharePoint 2010 libraries (without saving to our devices) and edit (with track changes), and save directly back to the SharePoint 2010 library. With Office 365 I've gotten as far as opening files in Word but can't find a way to send the edited file back to SharePoint 2010.
Answer: Can you make a mapped location on your PC that points to the SharePoint library?  This would effectively make SharePoint a place that O365 could see in the computer file structure.
To do this, I open the library in explorer view then drag the icon in the address bar to the favorites section.  Alternatively, you could make a mapped drive.


How does the voltage remain constant at secondary side of flyback SMPS when secondary current is decreasing linearly with time?

Question:
Continous Mode of Flyback SMPS
Answer: Voltage does not stay constant. There will be ripple voltage that depends on the output capacitor ESR and capacitance.
Answer: It's quite simply down to the formula for an inductor: -
$$V = L\dfrac{di}{dt}$$
When the fly-back transformer's primary is being "charged" with energy, a DC voltage is switched in parallel and this gives rise to a ramping current. In the 2nd half of the process, the energy is released and the current ramps back towards zero and, the rate of change of this current (\$\dfrac{di}{dt}\$) IS the output voltage produced divided by the turns ratio: -

The above is for a DCM fly-back circuit but the same is true of CCM. There are some worked examples on this page.
Comment: OK i got it. One more thing that during the transistor off time why does current in primary side is zero.Shouldn't be there linearly decreasing current because inductor opposes sudden changes?(shown in image attached with question)
Comment: Simple version: The primary and secondary inductors are coupled so either can be used to "discharge" the magnetic field. Longer version: primary and secondary are never 100% coupled so there will always be a bit of primary current that needs to be got rid of (using a snubber for instance).


Auditing AS 400 DB2 library user access

Question: As part of the testing to check for authorized users having access to applications and libraries on AS 400 systems, I need help to figure out a list of users having access to applications hosted on the AS 400 systems, need to understand is there way to list down users grouped to access specific libraries for certain applications and all users given access to and revoked access and also the privileges assigned to each users, over a period of time for the testing.
Answer: This depends on the specific application. Most AS400 DB2 applications have initial  Application Administration which configures privileges assigned to each application user. The administration role is normally a DBA or programming staff responsibility. To extract a list of Groups and/or users accessing specific functions speak to the DBA or Application Administrator.

Auditing AS 400 DB2 library user access


Redirecting robots.txt when moving to a new domain

Question: I'm moving a site to a new domain, to a local tld. I already redirected everything successfully to the new domain, except the robots.txt. My question would be that is it needed to redirect the olddomain.com/robots.txt to newdomain.com/robots.txt with 301 redirect? Is there any common practice for this situation?
Comment: You should redirect everything... using a global mod_rewrite... but it is not required to redirect robots.txt as Google and Bing will always check the new domain for it, heck you can even submit it in Google Search Console.
Comment: @SimonHayter I didn't use Google Search Console, it's a quite new site. I realized the need of another domain in time. I'm thinking about to redirect the robtos.txt because I see in the logs that Google visits it regularly so it might index the new site faster if I redirect it. Or you think I don't have to really care about it?
Comment: It will not speed up the indexation process.
Comment: Please remember that 301 redirects are applied per page. Even if you redirect all pages to the new domain, robots still read and process your robots.txt in the old domain.
Answer: This is really interesting question, It took me few minutes to search official statement from gary tweet..
When Google see 404/30X status, then Google will ignore your robots.txt completely. It is like not having a robots.txt at all.
But if Google see 50X status or server side errors, then Google will stop crawling your site, because may be you're busy to configure your server.
So do not redirect your robots.txt or if you do then make sure you've block same thing in new site robots.txt
Comment: This contradicts the information provided by Google: `Redirects will generally be followed until a valid result can be found (or a loop is recognized).` https://developers.google.com/search/reference/robots_txt
Comment: Thanks @dimiguel. I think someone should make a test on robots.txt redirection by using [Google robots.txt checker](https://support.google.com/webmasters/answer/6062598?hl=en), to know weather they follow 301 redirection or not. They even say they use same user-agent as Googlebot use, but still I'm not sure weather the test will be 100% correct or not.
Answer: The robots.txt on the old domain is now useless cause it helps google crawling the current domain website.
So if you correctly redirect olddomain.com/* to newdomain.com/*
The robots.txt will be forwared to, and you should put approriate rules in your new robots.txt (change the content if you also change the cms or url format ...)
hope it helps ...


Folder action to append to Spotlight comment for files in Finder

Question: I am using AppleScript and Python together to gather system information about the Macs in my stock as well as adding some supplemental info to the Spotlight comments field.
Specifically, AppleScript gathers the info on the Mac whose details I am capturing (whilst booted up to an external USB drive). I use dialogue boxes etc to gather feedback about OS version to be installed, the order number as well as the machine's actual marketing name (thanks to https://github.com/MagerValp/MacModelShelf), these are all saved as comments in the final System Profiler *.spx file that is generated/saved by the script.
I then use Dropbox to send the file back to my main Mac (which is running Filemaker). I use a rather complicated Python script to read the XML data of the system profiler file and to then paste the critical hardware info such as serial numbers, HD size and type etc into the relevant fields of the database.
I would like to parse the Spotlight comments of the spx file to get at the addition info e.g marketing name, Model Name and Order Number.
I try using (in Python script)
spotlightComments = 'mdls -raw -name kMDItemFinderComment ' + str(file_path)

to parse the comments. Even in Terminal as a standalone command this returns just a blank line, despite the comments being visible when I right click the spx file and go to 'Get Info'. N.B this is different from the "(null)" I used to get when using other Cloud services such as Sync.com which don't appear to carry-over file meta-data such as Spotlight comments.
If I open the edit the file's Spotlight comments and add just a single space " " character at the end of the string the command works - i.e I get back something like
iMac Late 2012 | 300001234 | 10.12

This can be further split up with the Python command
parts = spotlightComments.split('|')

Anyway back to AppleScript!
I've tried making a folder action to automatically append a single space/" " character to the end of a file's comments the moment something is added to the folder containing it, but nothing at all appears to happen.
Here is my script...
on adding folder items to this_folder after receiving added_items

    repeat with currentFile in added_items

        set TheComment to the comment of the currentFile

        set comment of the currentFile to TheComment & " "

    end repeat

end adding folder items to

Even when I swap out the appended string to be something far more obvious there is still no change. I've also tried using Automator.app's 'wizard' for making folder actions as well as manually writing the script, storing it in "~/Library/Scripts/Folder Action Scripts" and then connecting the folder to the script using "Folder Actions Setup"
How can I append text to existing comments in Finder via automation?
Answer: I think I may have found the answer...
on adding folder items to this_folder after receiving added_items

    tell application "Finder"

        repeat with currentFile in added_items

            set TheComment to the comment of the currentFile

            set comment of the currentFile to TheComment & "test"

        end repeat

    end tell

end adding folder items to


re:salad dressing shelf storage

Question: can I process salad dressing for shelf life in a water bath or pressure canner and if I can how long is the process time, I can't find out anything about it please help.
Answer: It REALLY depends on the recipe you are using.
Lots of salad dressings contain either dairy or oil and neither of these can be safely waterbathed OR pressure canned.
Something like a seasoned vinegar might be okay though however I am unable to give advice on how to process that safely.
check http://nchfp.uga.edu/ for guidelines and safe processes and recipes (their search feature on their website is pretty good)

re:salad dressing shelf storage


How did Fry survive the alien attacks while in cryosleep?

Question: Why when aliens Invasions during Fry's cryosleep the alien did not destroy the cryogenics lab in old New York
Comment: Heh, it looks like you answer your question: "They did not destroy the cryogenics lab"
Answer: As illustrated by the What-If Machine in the episode "Anthology of Interest I", it would create a universe-ending paradox if Fry didn't get frozen in the cryotube and sent to the future. Presumably, destroying the cryogenics lab storing that tube would create the same devastating paradox.
This paradox is likely thwarted by the fact that...

 ...Bender is actually the one responsible for the destruction of Old New York (at least the first destruction, and probably the second) when he traveled back in time using the time code, which has paradox correction capabilities. Had Bender tried to destroy the cryogenics lab, and thus Fry as well, some unforeseen doom would likely befall him first and stop him from doing it, avoiding the paradox.
Answer: Good question. I see two possible explanations. First the less likely; It could be a residual effect of the Luck of the Fryish (Philip J. Fry's/Philip Fry's seven leave clover).
More likely would be an involvement by the Nibblonians. We know that Nibbler (and later Fry himself) was responsible for Fry getting frozen in the first place.
Since the Nibblonian prophecy foretold Fry's importance, they could have taken measures to protect the building with Fry.
Also note that at least one of the devastating destructions of New New York was caused by Bender. There is a remote chance he avoided the cryo-building, as he always hesitates to kill that one human.
Answer: It's very simple. He didn't.
During "Bender's Big Score" you learn that those "aliens" were actually Bender fleeing from Nobel Peace Prize guards while in a ship that created multiple holograms.


Microsoft.EntityFrameworkCore.Design' has different version then 'Microsoft.EntityFrameworkCore.Tools'

Question: i have asp dot net core project and i need to make command
<code>$ dotnet ef database update
</code>
But after updating of dotnet this command is causing error like this:
<code>...Check that 'Microsoft.EntityFrameworkCore.Design' has been
added to "dependencies" in the startup project and that the
version of 'Microsoft.EntityFrameworkCore.Tools' in "tools"
and 'Microsoft.EntityFrameworkCore.Design' are the same...
</code>
I have a linux platform with 1.0.0-preview3-003590 version of dotnet. Partially, my project.json looks like that:
<code>"dependencies": {
    ...
    "Microsoft.AspNetCore.Diagnostics": "1.0.0",
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0",
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0",
    "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0",
    "Microsoft.EntityFrameworkCore.Sqlite.Design": {
        "version": "1.0.0",
        "type": "build"
    },
    "Microsoft.EntityFrameworkCore.Tools": {
        "version": "1.0.0-preview2-final", // and here is no 1.0.0 version!
        "type": "build"
    },
    ...
},
"tools": {
    ...
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final",
},
</code>
It looks like i have different versions of Tools and Design packages. But there is no package 1.0.0 of tools in nuget. Also i tried to downgrade all EF packages to 1.0.0-preview2-final version. And it is not work for me.
This problem is fully reproducible with project, generated by YO and with test project of entity framework core on my machine.
How do i need change my project.json to successfully update database?
Comment: created issue to github https://github.com/aspnet/EntityFramework/issues/6513
Answer: Solved by installing of preview 2 of dotnet instead of preview 3.


What is this vintage small airplane with low wings and twin propeller engines?

Question: Could anyone help me to identify this vintage aircraft, that can be seen in the background of this photograph, please?
Comment: The photo is probably from the 60s, as the car is a 'ZAZ 965', a Soviet copy of the 'Fiat 600'...
Answer: It's a LET L-200 Morava, a Czech plane...
http://www.aviastar.org/air/czech/let_l-200.php
Comment: It's morava refinement: _The original production model was superseded first by the generally similar L-200A, with more powerful Walter M 337 engines and, subsequently, by the final production version, the L-200D, which was introduced in mid-1962. This differed by in-corporating improved systems, strengthened landing gear, and three-bladed constant-speed propellers._
Comment: The props in the original picture appear to have two blades, while the props on the picture on that site you linked has three. Is that simply a different configuration?


Is there a way to test if a browser supports flash/silverlight?

Question: I'm trying to determine if a browser that my content is being pushed to supports flash/silverlight. That way, if there is no support on the browser, I can interchange the flash/silverlight components with HTML/AJAX components.
Answer: This is probably going to depend upon exactly what you're doing. Whatever method you're using to embed the Flash or Silverlight probably already provides a way to do this. For example, here's an article on how SWFObject handles this.
Answer: I recommend the jQuery browser plugin detection plugin.


Can't think of a good name for my story

Question: I've gotten pretty far into a story that I'm writing, but I can't for the life of me think of a name. I've never really been good at making names. Any tips on how I can come up with a good name for my story? It's a Fantasy if that helps.
Comment: Hey, welcome to Writing.SE! Nice to have you here :) Be sure to check out if you're question has already been answered, especially with very common questions like this one, which has undoubtedly been answered on this site before (as linked to in F1Krazy's comment). You'll probably notice your question being marked as a duplicate soon, but don't feel discouraged by that. Just always check ;)
Comment: Ok, thanks for letting me know, and thanks to everyone else who helped me with thinking of a name. I may not have thought of a permanent name, but I have a good idea of what to think of and I am planning it out now. Again, thanks!
Answer: Look at existing names, and try to figure out how they came up.
One strategy is to name it after your main character; in movies Superman, Indiana Jones. Hancock, Jerry Maguire, Erin Brockovich. In books, Harry Potter, Jane Eyre, Anne of Green Gables, Anna Karenina, [The Adventures of] Tom Sawyer, [The Adventures of] Huckleberry Finn, [The Adventures of] Sherlock Holmes, Robinson Crusoe. Carrie, by Stephen King. The Great Gatsby.
Or multiple characters; Little Women; which also conveys some theme of the book; young girls growing into adults. The Justice League.
Or characters indirectly: The Hobbit, The Lord of The Rings. Divergent (unusual teens that do not fit into standard cultural roles and are therefore labeled "divergent" and may be killed for it.) Inglourious Basterds (intentionally misspelled).
You can name it after a theme: Star Trek, which Roddenberry originally pitched as "Wagon Train in the Stars", basically heroes encountering one-off stories on their travels (one-off meaning the central characters in each story seldom resurface, but there are recurring roles).
Or Star Wars; rebels fighting an evil overlord in sci fi setting.
Many books offer a name and a mystery: Harry Potter and The Sorcerer's Stone (Most Harry Potter stories are mysteries Harry must figure out to save the day). Indiana Jones and The Raiders of the Lost Ark.
Your title is often about the theme of the story, or the central source of sparks and conflict in the story. "When Harry met Sally" is a romantic comedy named after the Inciting Incident in that story, literally when Harry met Sally (as college kids sharing expenses of a road trip, an opposites-attract love story).
Some titles are about the END of the story; Stephen King's "The Stand" is 700+ pages leading up to a final confrontation of good against evil, "The Stand".
But that said, your title doesn't give away the ending, it is just there to intrigue, and make readers curious what the story is about. It should be on point, meaning the Title should make SENSE when somebody reads the story. It should be relatively short, some say 7 words or less. Ten words is probably too many, but famous authors could probably get away with it (and dead authors).
Some titles include the setting, when the setting plays a central role in the stories: Star Wars and Star Trek and The Expanse come to mind. Or a character and the setting: Alice in Wonderland. The Wizard of Oz (movie) or The Wonderful Wizard of Oz (book).
Figure out what is most intriguing about your story. The main character? The setting? The mystery or problem to be solved? A McGuffin (a central object everyone wants, like Sauron's Ring, the Ark of the Covenant, The Sorcerer's Stone, etc). A relationship? (Harry/Sally).
The title is a tease, something to make readers wonder what the book is about, often with a curious allusion. (The Bourne Identity). It doesn't summarize the story, it often summarizes a juxtaposition or central conflict or crucial moment (When Harry met Sally).
Answer: Wait until you finish writing. Then let it sit a couple of days and reread it.
Often the name will jump off the page and smack you in the face.

Can't think of a good name for my story


SharePoint Development Newbie

Question: Just a general SharePoint development question. I am new to developing for this platform and have spent the last few weeks reading blog posts and cant find much consistency on best practices.  I am developing for Sharepoint Online not on-premise. In Visual Studio should I be using the "Sharepoint Add-in" template and create an "App Part" or the "SharePoint 2013 Visual Webpart" template and create solution package to deploy? Seems that the Visual web part has less limitations than an app part but might be depreciated with SharePoint Online?  Any suggestions are appreciated.
Comment: For Online your only valid option is to use the "Add-in" template
Comment: Thanks Robert.  Do you have any links to good examples or Github projects as reference. I am stumbling on the same Google results at this point.
Comment: http://dev.office.com/ is the best way to get started. It is a steep hill in the beginning to get a grip on the development model, but there is tons of samples there. And this community has a lot of help as well (when you have started and are running in to specific problems)
Answer: You need to use App Parts. Visual Webparts utilize server side code, which you can't install on SP Online (briefly, the way that App Parts get around this is that they have you install the server side code at a remote location like an Azure Cloud site and then add an iFrame to the page).

SharePoint Development Newbie


Batteries connected in parallel

Question: "If we connect two batteries in parallel, the battery with higher voltage will discharge into the other one." What is the intuition behind this?
Comment: why would you connect two batteries in parallel? :P I would expect an explosion too!
Answer: A battery is powered by a redox reaction. In the reaction the anode is oxidised and produces electrons while the cathode is reduced and consumes electrons. This is what produces the flow of electrons through your external circuit. As the reaction procedes and the current flows the battery is discharged.
However if you apply an external potential larger than the battery voltage you can drive electrons back into the anode and reduce it. This in turn pulls electrons out of the cathode and reduces it. The net effect is to recharge the battery, and indeed this is exactly what happens every time you recharge your phone.
In your example of two batteries the higher voltage one acts like the wall charger of your phone and it charges the smaller battery. In the process it is itself discharged.
Answer: The voltage across the ends of a battery is estimated by $$ V = E - I r$$ where $E$ is the volt rating, $I$ is the current and $r$ is the (small) internal resistance of the battery.
So with two batteries $E_1$ and $E_2$ connected in parallel to some load $R$ they must share a common voltage
$$ V = E_1 - I_1 r_1 = E_2 - I_2 r_2 $$
and the total current through the load is the sum of the battery currents
$$ I = \frac{V}{R} = I_1 + I_2 $$
with solution
$$\begin{aligned}
 I_1 & = \frac{E_1 (R+r_2)-E_2 R}{R(r_1+r_2)+r_1 r_2} \approx \frac{E_1 -E_2}{r_1+r_2} \\
 I_2 & = \frac{E_2 (R+r_1)-E_1 R}{R(r_1+r_2)+r_1 r_2} \approx \frac{E_2 -E_1}{r_1+r_2}\\
 V & = \frac{R (E_1 r_2 + E_2 r_1)}{R(r_1+r_2)+r_1 r_2} \approx \frac{E_1 r_2 + E_2 r_1}{r_1+r_2}
\end{aligned} $$
given that $r_1 \ll R$ and $r_2 \ll R$.
So $I_1$ and $I_2$ are equal and opposite to each other. If $E_1-E_2$ is postive (first battery has more voltage) then $I_1$ is positve (supplying power to system) and $I_2$ negative draining power.
Comment: @ChemEng - good catch. Thanks.

Batteries connected in parallel


What's the minimum possible gap needed to tie a slack-line between two trees?

Question: I'm assuming that if I bought a 15 meter slackline, I could actually tie it between two trees at any length less than 15 meters apart and use it. Please tell me if that assumption is wrong. So what's the minimum gap (distance between two trees) I need if I just want to learn as a beginner to step on the slackline without falling off and walk a few steps?
Answer: As close together as you want! Most climbing gyms will set up 5m (ish) lines which is a pretty good distance for beginners. In general you probably don't want to go much less than 3m. Keep it nice and taught while you are learning; the less slack in the line the easier it will be.
Most of all just get it set up and have fun. It doesn't need to be set up perfectly to enjoy slacklining. The learning curve for slacklining is really quick. Just keep your head up, arms up and out, bend the knees, and breathe. You'll be walking on it in no time!
Answer: Slack lining is actually a lot easier in the beginning the shorter your line is, as there will be less movement of the line (side-to-side wobble or up-and-down bouncing). There isn't really a minimum length for a slack line - personally, when I started out I sometimes set up a line no longer than some 3m...
So my suggestion is to find some nice trees not too far apart (maybe start with 4-5m) and once you're comfortable on that distance start increasing it.
As you seem to be new to slack lining and this question might attract other beginners, I'll add the usual tree protection advice:
Slack lining can damage trees and their bark, especially in public parks, and other areas where people frequently set up lines. There are some things to keep in mind that help minimise any damage:

Please pick trees that are strong enough, as the sidewards force of a taut and loaded slack line can be considerable. A common suggestion ist that the trees should have at least 30cm of diameter of the trunk (ca. 1m of circumference) at the height where you want to setup the line.
Between your slack line / loops and the tree bark there should always be some cushioning material, to help protect the bark from the applied forces. What I have seen in use / or used myself: a strap of an old carpet, a folded up bathing towel, an old rubber doormat. Of course there also exist dedicated solutions that you can buy (check google).
Some also suggest using a setup with no contracting loops around the trees as contracting loops can damage the tree bark. (This means you'd need two fixed-length loops to wrap around the trees and would set up your line between those loops.)

More info here.


What are unicoins useful for?

Question: On serverfault, I see that there is a sidebar containing information about unicoins.  What is this all about and any other details?
Comment: Why the downvote?
Comment: It's meta... who cares why the downvote?  Maybe because SE usually does something with unicorns on April Fool's day.
Answer: An April Fools joke that's getting a bit old.
See What are Stack Overflow unicoins? for more information.
Its release is based on your local timezone, so I in GMT+11 had this over 24 hours ago, and the rest of the world got it as midnight rolled around.
Comment: Old?! I thought it was brilliant. And quite a bit of work for just one day...

What are unicoins useful for?


What should be the text color with image having black and white colors

Question: The bullet points are not standing out with red.
Comment: Why do you want to use the background image? You can easily use plain colors along with some illustration and show your headings, bullets in parallel to the illustration.
Comment: It looks like a PowerPoint slide?
Comment: Hi, welcome to UXSE. A option would be to try and use black text on the white/lighter parts or white text on the darker parts. Another option is white text with a black border (like most subtitles in movies)
Answer: In this sort of a case, there is likely nothing you need to change about the text colour - red is a very vibrant colour that differs from the monochrome image, but the image's detail seemingly draws the attention away from the text. To solve that I would recommend:

A black overlay over the image - this will put the focus on the text whilst maintaining the impact of the background image:

A Lightbox-like overlay - this is similar to a black overlay but instead defines the text within a box. A darker opacity would be more
suitable for this style:

Change the placement of the image - Rather than placing the image behind the text, place it alongside, above or below your text. This makes the image appear more like an asset to your text, rather than dominating the focus:

In my personal experience, placing images behind large amounts of text actually discourages people from reading it as the detail of the image makes it less legible.
Answer: Based on the priority of the image & content we must edit the screen,
Considering the text has much more priority - put a subtle dark solid or gradient over lay on the image, which makes the text pop out.
Answer: Consider: White Text with Black Outline. Text is readable. Bullets show up fine.
Answer: Welcome! There are several options in this case:

Add a black outline to the text and make the text itself white.
Add a low opacity (semi see through) square behind the text as an overlay of the image.

Assuming ofcourse you want to add the text above the image. Is the image relevant or really necessary? Maybe it could be more appealing to add icons and place the information below those icons, instead of bullet points, like so:

Just a suggestion.


PhoneGap FileTransfer download stops after 6 kilobyte

Question: Hi Stackoverflowianers!
It's me again, having a PhoneGap question:
Working on PhoneGap 2.8.1 I made a file download working by the fileTransfer.download() method. Seams to work like a charm but all files (no metter what size or extension) are downloaded to 6 kilobyte files. Source and target is ok as far as I can see but the download ends regularly after 6 kilobytes. No error, no nothing...
My code:
<code>    navigator.notification.activityStart("Please wait....", "Loading");
    var fileTransfer = new FileTransfer();
    var uri = $(this).attr('file');
    var fName = uri.substring(uri.lastIndexOf('/')+1);
    var localPath = '/mnt/sdcard/download/';
    var filePath = localPath+fName;

    fileTransfer.download(
        uri,
        filePath,
        function(entry) {
            navigator.notification.activityStop();
            navigator.notification.alert('/sdcard/download/', function(){}, 'Saved in...', 'Close');
            console.log("download complete: " + entry.fullPath);
        },
        function(error) {
            navigator.notification.alert('Code: '+error.code, function(){}, 'Error...', 'Close');
            console.log("download error source " + error.source);
            console.log("download error target " + error.target);
            console.log("upload error code" + error.code);
        }
    );
</code>
Have anybody had this problem before? Does anybody have a glue what could be the reason for this misbehaviour???
I'd be very happy for some - or at least one - hint to the right direction...!
Thnx. in advance for your reply.
Ingmar
Answer: Sorry to all Stackoverflowianers!!! I solved it my self...
But enyway, if you ever run into this just get the idea here to help your self:
"Just copy the downloaded 6 kilobyt (or more or less) file from your device to the PC and - e.g. with Notepad++ - have a look what is in there. The content of the file will help you directly to solve your problem..."
Greatinx,
Ingmar


How to move vpn connection from ubuntu to elementary os

Question: If i want to export vpn connection from networkmanager (ubuntu) what should i do?
I already copied /etc/NetworkManager/system-connections/.nmconnection file into my new elementary installation. But i cant find this connection in settings. What i'm doing/thinking wrong?
Answer: What i did is moved all my settings by hand. If you moving openvpn connection, dont forget to also check "advanced settings" and check all tabs there.


Why use pull requests instead of merging

Question: What is the advantage of using pull requests instead of simply merging a branch into master without one? Particularly on a team where all developers have full access to master.
Comment: We don't use Pull Requests at our shop.  My understanding of Pull Requests is that they are mostly used on Github, where you have a public, open-source project published.  As the project manager of such a project, rather than giving the entire world free rein over your project to make arbitrary (and potentially harmful) changes, you instead require people to submit their changes in the form of pull requests, so that you can review their changes before you merge them yourself into the master branch.
Comment: Because it's the DVCS way to never do in one simple step what you can do in 3 or 4 complicated ones
Comment: @Goose Code review?
Comment: Pull requests allow the project manager to decide if they want the branch merged into master or not.
Comment: In practice, if all developers have access to master, does it make a difference?
Comment: And they allow to cooperate, to discuss the code and approach with colleagues without having to even checkout the code. We use them intensively for feedback and communications.
Answer: Pull requests provide for checks and balances, even if anyone can push to master.
The biggest advantage is that they provide an opportunity for code review. The person that is responsible for performing the pull can look at the code and tests and make sure that they meet any kind of guidelines that the organization or team has. There are also other reasons for code review - education, finding defects or enhancements, cross-training the team on the system, giving testers a white-box view of the system.
If the person that performs the pull is familiar with the architecture of the system, then they can make sure that the changes fit with the architectural vision of the system, especially if the entire team may not have the long-term vision.
Developing a habit of using pull requests may also help your team if you decide in the future that the whole team shouldn't have access to master. If your team grows larger, and especially if you have team members who are new to the product and/or new to Git, not giving them access to master can be safer for product integrity.
Answer: Having done both feature branching and forks + pull requests I think that pull requests offer little advantage when you all are developing in the same team or company
They do offer a good mechanism and interface for code review, but also complicate and slow down the whole 'getting stuff finished' process. Especially if you have many small features, each waiting on review, merging and then all the others being merged with master again to pull the changes etc. If you have large features though then these become difficult to review, so you are caught in a bind.
Having said that you can do pull requests between branches on the same repo. You don't have to fork, or have different permissions.
Additionally you have to consider you entire methodology and workflow. Do you also have a ticketing system, CI, automated acceptance tests etc? Do your code reviews provide a vital single check before codes goes live, or are they just rubber stamp exercises which are made redundant by other checks in your workflow?
Answer: There is an observation called Conway's Law which states:

organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations.

What does this have to do with pull requests?  Pull requests are a major communication channel at a critical junction for your code.  They provide an opportunity for review, automated testing, and improvement before the code moves on to the next stages of testing and production, where those changes are much more difficult to back out, and waste a lot more time of a lot more people.
Likewise, Conway's Law suggests if you want to have a microservice architecture with cleanly separated areas of autonomous responsibility, and well-defined interfaces, then your organization's communication channels should reflect the architecture you wish to achieve.  That means small teams of 5-10 people should have direct commit access to any given microservice, and anyone outside that team should be required to go through a pull request.  This ensures the people most familiar with a microservice are the ones reviewing and advising about it.
When you have a large organization with everyone having direct commit access to everywhere, your communication channels of least resistance are setting you up to produce a big ball of mud architecture.
Pull requests only feel like a burden if you don't trade off anything in return.  I've worked in environments where I can't get anything done for a week because the build is always broken, and I've worked in environments where someone submits a pull request and I don't even have to review it because they broke the CI build, and I tell you, they are worth every second of effort.
Answer: Karl Bielefeldt is exactly right.
I would add: it's all about quality.
Many (most?) shops have no formal processes in place to govern development, which results in:
"I've worked in environments where I can't get anything done for a week because the build is always broken, and I've worked in environments where someone submits a pull request and I don't even have to review it because they broke the CI build, and I tell you, they are worth every second of effort."
It really IS worth the effort.
Comment: Thank you for your comment. I'm not sure why to apply this as an answer to the question.
Comment: This is the only answer mentioning pre-merge CI.
Answer: We use pull requests for code review - no code should be merged into the main development branch (normally "develop" in our case, but sometimes "master") without having been through a pull request. We don't hard enforce this with repository controls, but that's because we don't have to - our developers are mature enough not to abuse the process.


What would be better for an engine driving at 60mph or 70mph? I wish to get the most miles out of my engine?

Question: At 60mph my engine revs at 2800RPM and at 70 it's 3200RPM. My qustion is which condition would give the most miles from my engine.
Comment: Basically, more load (faster speed/more wind resistance) the greater wear & tare. I don't know if this is accurate, but seems viable.
Comment: Can you post your make/model/year of vehicle?  Thanks  :)
Comment: Ford Fiesta 2007, 1.25cc duratec engine
Answer: 60 MPH assuming you are in the same gear at both speeds.
At a constant gear, your engine turns at a fixed ratio to the distance you travel.  So if you travel from A to B your engine will always turn X revolutions, regardless of speed.  In other words, the piston experiences the exact same number of cycles regardless of 60 or 70 mph
Air friction increases exponentially, so at 70 mph you are using more fuel per engine revolution, and thus increasing the load on your engine. This load is transferred through the pistons, bearings, crankshaft, etc all the way through your drive train, including your camshaft. The tension on the timing chain increases, the load on the lobes of the camshaft increases and these things wear down your engine.
Since you are comparing two speeds where the engine is in the same temperature range you do not have to be concerned about under/over cooling.  This comparison is not the same as going 1MPH vs 70MPH
Comment: Air friction actually only increases proportional to the square of velocity at these speeds.
Answer: While @Robert-Ryan is technically correct, I'd be surprised if there was a measurable difference in engine lifetime. Engine wear is dominated by cold starts. Once the engine is thoroughly warm, engine wear is minimal. If you want to maximize engine life, minimize the number of short trips where the engine doesn't get warm, or invest in an engine block heater.
Answer: Don't know if anybody has documented this, but I think it is self-evident that slower speeds and lower rpm's will result in greater longevity. Imagine driving your car at a steady 5000 rpm, and consider it's lifespan compared to 2500 rpm.
Answer: It depends on more factors. While generally lower RPM will save fuel there are cases, like when load increases due to a hill, where higher RPM can result in the engine working easier and lowering fuel consumption.
Likewise, being at the lowest possible RPM or highest gear is not the absolute way to get best MPG always.
Keep it under 60mph to reduce wind drag and you will surely see large benefits.


Fast fourier transform for an audio file

Question: I need to do FFT on an audio file(to be exact it is a real number array of audio samples). But the output of FFT should be complex numbers. I have a hard time understanding how to convert this.
For example: input is int input[N], and what to do next to get the output.re[] and output.imp[]? Should I treat input as a complex array only all the imaginary components equal to 0?
Thanks!
Answer: Your question is so "basic", so "fundamental", that I may be misunderstanding its true meaning. In any case, hopefully you have some software routine available to you that performs FFTs and will accept your 'int input[N]' sequence as an input. I have no idea what software 'package', or software language, you're using but if variable 'x' is your input sequence then there should be some available command (or subroutine) like
<code>Spec = fft(x)
</code>
you can use to compute your FFT spectral results. And there should be no need for you be concerned about defining your input sequence as complex-valued. Of course the length of your input sequence (number of samples) must be an integer power of two. Your FFT results will automatically be in the form of a sequence of complex numbers, so there's no need to worry about that.


Can I list all the Bonjour-enabled services that are running?

Question: I would be interested in knowing which programs advertise themselves using Bonjour on my machine. Is there a way to do that?
Answer: The dns-sd command-line tool can be helpful for this, but learning to use it is a bit tricky.
Running dns-sd -B _services._dns-sd._udp will return a list of all available service types that currently being advertised. (The list is per interface, so there will be some redundancy.) If this is done on a Mac with no active network connection, the list will of course only contain services running on that machine.
Using that list, you can request information about the individual services types by running things like dns-sd -B _home-sharing._tcp (which lists iTunes Home Sharing instances), and then, given an instance name, you can run dns-sd -L "Wes Campaigne's Library" _home-sharing._tcp to lookup information for a particular instance.
To be honest, though, this whole process is rather tedious, and it's exactly what Discovery (formerly Bonjour Browser) was built to do, so I highly recommend using that. Whichever way you do it, though, it may not always be clear what program is responsible for a given service entry.
You can use the strategy given in binarybob's answer to try to map service entries to running processes based on port number, but this may not always work. Another strategy is to run something like dns-sd -B _home-sharing._tcp which remains open and reports when instances are added or removed, then, one by one, quit various apps and (assuming it's not a system service) see which one's quitting triggers the removal message.
Comment: Looks like the music sharing service is now called `_daap` though.
Comment: Actually, DAAP refers the older of iTunes' two separate forms of library sharing. DAAP is enabled through Preferences > Sharing > Share my library on my local network.

Home Sharing, added in iTunes 9, is enabled through File > Home Sharing. It uses your Apple ID for authentication.
Answer: Although it might not satisfy your exact criteria, Tildesoft's Bonjour Browser can list all the all the bonjour services advertised on your local network and the hosts that are advertising them.
I guess for locally advertised services you could drill down in Bonjour Browser to find the port number the service is advertised on, then use lsof to determine the application associated with it, For example:
lsof -i | grep 57857

gives
iTunes    36720   ...     TCP *:57857 (LISTEN)

when I have iTunes running.
Answer: Although classified as a legacy article, this very may well be what you are looking for: DNSServiceMetaQuery.
As outlined by the documentation:

This sample uses DNSServiceQueryRecord to send a Multicast DNS query that returns a list of Bonjour service types being advertised on the local network. Machines must be running mDNSResponder-58.6 (Mac OS X 10.3.4) or later in order to respond to this query.

To run DNSServiceMetaQuery on Mountain Lion (the included build does not run properly), go to the sample code link and click Download Sample Code.  Then, install Xcode if you haven't already.  Create a new project under the template of Mac OS X > Application > Command Line Tool.
Open and copy all text in ~/Downloads/DNSServiceMetaQuery/DNSServiceMetaQuery.cand paste it into main.c of your new Command Line Tool project (replacing everything that was there in the template).  Next, you'll need to add CoreFoundation.framework to the project by clicking the project name in the sidebar > Build Phases and open the dropdown arrow next to Link Binary With Libraries.  Click the + button, search for CoreFoundation.framework, and add it.  Then click the Run button (looks like a play button) and wait for a Build Succeeded image.  Something should come from the button of the window with a log; this will display all of your Bonjour services. Make sure All Output is checked.
Comment: @Mr.Tao The code still exists on Apple's site. I've updated the link in the answer
Comment: I'm a proficient programmer, so I know my way around Xcode (and that's a good thing because I'm not sure I would like to install Xcode just for that). I'll check it out, thanks!
Comment: Apple has removed the code, however, it's available on a [mirror](http://mirror.informatimago.com/next/developer.apple.com/samplecode/DNSServiceMetaQuery/index.html).


When should mutual information be used for feature selection over other feature selection methods like correlation, ANOVA , etc?

Question: I have a data set with categorical and continuous/ordinal explanatory variables and continuous target variable. I tried to filter features using one-way ANOVA for categorical variables and using Spearman's correlation coefficient for continuous/ordinal variables.I am using p-value to filter. I then also used mutual information regression to select features.The results from both the techniques do not match. Can someone please explain what is the discrepancy and what should be used when ?
Answer: Pearson correlation and ANOVA will measure the linear variance between x,y.
A mutual information regression method is an entropy-based method which can find even non-linear correlation.
Let's see 2 pair of data (x, y_1) and (x, y_2).
<code>##0. Data setup
x = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
y_1 = 3.39*x_1
y_2 = np.array([1, 1, -1, -1, 0, 0, -2, -2, 2, 2])
df_1 = pd.DataFrame([x,y_1]).T
df_2 = pd.DataFrame([x,y_2]).T

##1. Pearson corr
df_1.corr()
df_2.corr()

##2. f_test
from sklearn.feature_selection import f_regression, mutual_info_regression
f_test, _ = f_regression(x.reshape(10, 1),y_1)
f_test
f_test, _ = f_regression(x.reshape(10, 1),y_2)
f_test

##3. Mutual reg
mutual_info_regression(x.reshape(10, 1),y_1,n_neighbors=1,random_state=123)
mutual_info_regression(x.reshape(10, 1),y_2,n_neighbors=1,random_state=123)

##4. Tree-based feature importance is also based on entropy reduction
##and is more reliable as  KNN needs a good k value

</code>
 We can observe that Mutual importance is able to catch the relation of x with not just y_1 when it is simple Linear bust also with y_2 when it is not linear(but has a strong relation)
You should use either MI if you are only looking for a filter-based method. Otherwise, Tree feature importance would be best for most of the cases.
Check this link -
F_test Vs MI
Comment: Hey, thanks a lot. So can we say that the two capture different types of relations and one cannot be used in place of another ?
Comment: Yes, esp. when relationship is not linear. Please accept the answer if you find it so. It helps the community!!
Comment: Hey, just one thing, I am not too sure if ANOVA measures a linear relations as well ?
Comment: ANOVA measures the ratio(Within and Between) of variance. If points are moving near the mean, it will not see the correlation. Please the 2nd image of the link given in the answer


Lack of Communication in Project

Question: The teamlead kept talking to me about an upcoming project verbally since last December or January.
The project formal kick-off was on April.
When I was assigned a task, I started downloading the documents related to it.
I discovered that among the documents, there was the tender.
I read it, and I thought "I should have read this a long time ago, not now when the project has started" - It felt like I was reading an outdated document.
The project could be divided in two part: a part that I know of, and another one I know nothing of - there was no training or anything.
The leader was asking for my weekly progress, as he had meetings with managers and the customer.
I've never had any feedback nor was I ever CCed in any formal correspondance.
In June, I had a discussion with one of my friends to whom I told "I don't know what's happening in this project, all I have is estimations to do the tasks. I feel lost and I don't know really know what is going on".
Later on, I kept discovering that the leader progressed a lot with the project. He was involved with very technical stuff related to system environments prepared by the customer.
Then, after time passed, the leader was blocked in the weekend, so I went to help him.
He kept sharing with me links of applications related to the project - I was wondering why I've never seen these apps in any document or email?
Why had he never spoken of it with me? Why didn't he notify me?
He was communicating with the customer, and the latter shared with him all of these, on which he based his progress to complete the project.
I had many opportunities to complain about this leader. He cares so much about his image that I keep postponing my remarks, because I knew he would be bothered. He is "dangerous" too. He can communicate with managers and even vilify and they would even take his defense.
Now that the project is not doing well, some managers gave me a speech where they infer that I was the one to blame.
My thought was that I can't ask my boss to share something with me if I didn't know its existence.
I was neglected for many months, knowing that I was formally assigned to this project.
Should I have asked the leader to share with me the knowledge (we work for the same company and we are in the same team)?
Isn't it his job to share with me the knowledge ASAP?
I personally share all the knowledge needed as soon as I can with my colleagues, especially when I know they are formally working on a task.
I have a similar situation last year where I was excluded from a formal email and then the decision was communicated to me in a verbal manner (I am always excluded from important things in the project).
PS: this leader, at the end of a project last year, had a serious fight with his partner (they were very good friends). Is he looking for a new scapegoat?
I did a tremendous job last year but I was not rewarded as I should. Now I am demotivated hence the lack of interest and passiveness.
Comment: This is completely normal in software.  For better or worse there are a zillion questions on here essentially the same:  "I'm a new programmer and I was shocked, shocked, shocked, to discover the shambolic fubar that is software engineering."
Answer:
Should I have asked the leader to share with me the knowledge (we work for the same company and we are in the same team)?

Yes you should have.
In the Workplace, being proactive always goes a long way, specially in cases like this where other coworkers may not be the best in communicating to you the things you should know/do.
If the Project is organized properly, you should not have to depend solely on this person (the leader). You could have asked any other teammate involved to bring you up-to-speed or to provide you with documents or things you should read.

Isn't it his job to share with me the knowledge ASAP?

That is part of their responsibilities.
It's not their sole responsibility, though, and surely not the most important. Yes, this person could/should have shared with you more things, but in a team every member should show be proactive and ask when they don't know or they feel they are missing something; don't expect to be given everything in a silver plate.

Is he looking for a new scapegoat?

This would be guessing I believe... but if I had to guess... maybe?
What I am sure is that if you keep being passive and doing few to nothing to get up to date or ask for help (in writing) it will be you the one making a scapegoat of yourself, I fear.
Comment: this great answer keys the keyword - proactive
Answer:
"I did a tremendous job last year but I was not rewarded as I should..."

There's no need to type another word. Start looking for a new job.
You also describe other negatives about the current position (political maneuvering, chaotic planning etc).  Again - start looking for a new job.

Lack of Communication in Project


What was known about the properties of the nucleus before the Liquid drop model was proposed?

Question: What was known about the properties of the nucleus (its shape, its density etc) and the nuclear forces before the Liquid drop model was proposed? I believe that some empirical knowledge must be out there already which motivated that the nuclei behave like a drop of liquid.
Comment: I assume you are asking too much of an open-ended question. One can't expect to get "everything" that was known about the nucleus.
Comment: Early nuclear physics texts, like Blatt & Weisskopf, can give you a start. Otherwise, you need to read some of Bohr's early papers on the liquid drop model and take it from there.
Answer: Sizes and masses were roughly known since Rutherford's 1911 experiments. Gamow references some more precise measurements from 1920s in Mass Defect Curve and Nuclear Constitution. For example, size measurements of Bieler from 1924 and Hardmeier from 1927 for light elements, and of Houtermans with Atkinson and with him from 1928-9 for heavy elements. The data on mass defects was taken from Aston's 1927 Bakerian Lecture on mass-spectrograph published in the Proceedings of Royal Society, which summarizes data accumulated since 1921.
Gamow also describes the interplay of attraction and repulsion forces known to exist between $\alpha$-particles in the nucleus as motivating his analogy to surface tension. His goal was to theoretically reproduce the experimental mass defect curve, but the motivation came from a theoretical analogy:

"In the present paper I shall attempt to treat the problem more closely, analysing from the theoretical point of view the experimental facts concerning the nuclear energy. To begin with we shall treat a nucleus built from a certain number of $\alpha$-particles only... The modern quantum theory of interaction between two complex particles gives a rather complicated expression for the mutual potential energy. We have here two kind of forces corresponding to symmetrical/antisymmetrical solutions of the wave equation. Both solutions show a strong repulsion at the distances compared with the dimension of particles. At greater distances the symmetrical solution gives an attraction decreasing exponentially with distance, the antisymmetrical one a repulsion of the same type...

Examining the behaviour of a collection of particles attracting one another with the forces very rapidly decreasing with distance (we neglect at first the Coulomb forces which are comparatively small at nuclear distances) we can introduce the well-known ideas made use of in the theory of capillarity".
Answer:
What was known about the properties of the nucleus (its shape, its density etc) and the nuclear forces before the Liquid drop model was proposed?

In 1897 Thomson discovered the negatively charged electron.  This prompted a revolution in thinking about the structure of the atom which before then had hardly been theorised. Thomsons discovery suggested that the neutral atom must contain a positively charged element.  In 1903, Thomson proposed his Plum-Pudding Model - that the atom was a sphere of uniform positive electrification, with electrons scattered through it like plums in a pudding, giving rise to name.
In the following year, the Japanese physicist, Hantaro Nagaoka, rejected this model argung that charged elements must be impenetrable. In it's stead, he proposed a planetary model,  in which a positively charged center is surrounded by a number of revolving electrons, in the manner of Saturn and its rings - prompting th name - The Saturnian Model. His model made two predictions:

a very massive atomic center (in analogy to a very massive planet)

electrons revolving around the nucleus, bound by electrostatic forces (in analogy to the rings revolving around Saturn, bound by gravitational forces).

Both of these predictions were successfully confirmed by Ernest Rutherford in his 1911 experiments and who mentions Nagaoka's model in his paper of that year - where the model of an atomic nucleus is mentioned.


Repurposing outdoor LED security floodlights for an indoor sconce

Question: I am trying to create a very bright wall sconce using two LED security floodlights. I have disassembled the floodlights so I could remove them from the very bulky, heavy duty outdoor metal packaging. I wish to disable the photosensitive/motion switch. The light/motion sensor has two red wires coming out of it that lead into a circuit board. If I disconnect those two red wires from the motion/light sensor and then connect them to each other, will I bypass the photo sensor and enable the light to be turned on and off using a wall switch? Thank you. Charlie
Comment: In theory yes, but that depends on the circuit. If you let us know the model number or some pictures of the lamp in question, we could possibly give you some help! Sometimes you can remove this circuit all together if the LEDs have their own drivers. Again a picture of the inside of the lamp, including the circuit in question, would help.
Comment: Pictures , Make / Model is more helpful - you might have a BYPASS switch and that would be easier.
Answer: Maybe.  A lot of LED floods actually use a 12V motion sensor as they are half the price of a 120V sensor.  What's unclear is whether the motion sensor switches lamp current, or if it just gives a pilot signal to the circuit board.  I suppose you could try it.
However in your haste to remove bulky, heavy metal "packaging", I hope you didn't remove the essential heat sinks.  If so, you'll need to get some data sheets on your LEDs or comparables and then do some learning about how to craft heat sinks.  The efficacy of the heat sink is what's important, the LED doesn't care what it looks like... if it looks like a stylish sconce, that's fine.


Is 呆 just a casual description or a medically-related thing

Question: I'm not too sure about 呆. If you say 这个孩子有一点儿呆, does that translate as this child is a bit stupid (just slightly offensive opinion, like 笨), or is it more like 'this child has a learning difficulty' (medical condition)?
Answer: 呆  mean "dumb" or "stupefied".
"呆" in "这个孩子有一点儿呆" modifies a noun, therefore, it is an adjective for "dumb" or "silly"
"this child has a learning difficulty" means  "这个孩子有一点学习障碍" which is a medical term for such condition
Example of 呆 as "dumb": "呆子" (dumb person); "呆頭呆腦" (dumb looking)
Example of 呆 as "stupefied": 呆了一呆 (stupefied for a moment)
Answer: I think the first slightly stupid.
not learning difficulty.
Comment: Please make sure you read the question.


What is the difference between a stack decoupler and a stack separator?

Question: So what is the functional difference between a stack decoupler and a stack separator?  Why might I use one over the other?  In what cases would I want to choose the TR-18D Stack Separator over the lighter TR-18A Stack Decoupler?
Answer: The Stack Separator decouples from both the child and the parent node whilst the Stack Decoupler remains attached to the child.

Why might I use one over the other?

Situations where you are separating satellites, rovers, probes or other payloads and don't want the Decoupler still attached.
Comment: @Christopher I think the latest update changed the behavior of decouplers.  They are now directional, and will stay attached to the component on their "bottom".
Comment: Is the parent the lower section (by default decoupler orientation)?
Comment: @GnomeSlice - Parent is the ship, child is the bits that come off.
Comment: "Situations where you are separating satellites, rovers, probes or other payloads and don't want the Decoupler still attached." In what situations *would* you want the Decoupler attached?
Answer: Also, the decoupler have an explosive charge attached to it that might change the orbit of your ship if the gravity of the planet/moon is too weak and/or your ship is too light. I'm not sure if that's the case of the separator. If it doesn't change the orbit, that's another advantage.
Comment: Separators have the same explosive charge. When you want less decoupling force, either use the tiny-size decouplers (any structural problems which occur from this can be fixed by additional struts) or use docking ports. Docking ports must be triggered manually, but they disconnect with no force at all. When you don't intent to re-dock, you only need one docking port.


Use of lounge overnight at NRT

Question: In a few months will be traveling from Calgary to Mumbai via Narita. I have a 21 hour, overnight connection at NRT. If I use the KAL lounge airside, which publishes itself to be open during the day only, can I remain there during the night?
Comment: "during the day only" what about that is unclear?
Comment: I was unclear if the open hours only referred to when you can enter and register yourself or they actually ask all pax to leave at closing time
Answer: The KAL Business Lounge closes at 8:50pm. While I've occasionally known an airport lounge to extend its hours due to flight delays, I've never seen one that allows people to remain once it does, in fact, close. So no, you will not be allowed to stay in the closed lounge overnight.
Sleeping in Airports has information about staying overnight at Narita, though for 21 hours, you have plenty of time to leave the airport, get a place to sleep, and see a little bit of the city.
Comment: Thanks. That was useful.
To leave the airside, I would need a transit visa. I am leaving my country about 4 months before my return. The transit visa, if I seek to get one, is valid for only 3 months. I'll have to see if they will issue me a transit visa while I am in Canada.
Comment: @Emilio You might be able to get a ["shore pass"](https://www.google.com/search?q=japan+shore+pass) in such situations to leave the airside, though that's apparently at the discretion of the immigration officers, doesn't seem to have well defined rules, and I'm not entirely sure how it works.
Comment: I am not sure if I'm eligible for a shore pass. From other answers I have seen, it looks like a shore pass is issued in unforeseeable circumstances like missing a connection or something. correct me if I am wrong. In my case, it is certain that I have a overnight transit. Will they issue a shore pass under such circumstances?
Comment: @Emilio I'm honestly not sure, and don't have good information on that. Maybe ask a new question about your specific circumstances? It's possible someone else will have the necessary knowledge.

Use of lounge overnight at NRT